Skip to content

Commit ae70017

Browse files
committed
DOC-3188: Update fetch API import URLs to use Skypack for improved reliability.
1 parent 99be87f commit ae70017

File tree

9 files changed

+20
-19
lines changed

9 files changed

+20
-19
lines changed

modules/ROOT/examples/live-demos/ai/example.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const fetchApi = import(
2-
'https://unpkg.com/@microsoft/[email protected]/lib/esm/index.js'
3-
).then((module) => module.fetchEventSource);
1+
const fetchApi = import('https://cdn.skypack.dev/@microsoft/[email protected]')
2+
.then((module) => module.fetchEventSource);
3+
44

55
// This example stores the API key in the client side integration. This is not recommended for any purpose.
66
// Instead, an alternate method for retrieving the API key should be used.

modules/ROOT/examples/live-demos/ai/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const fetchApi = import(
2-
'https://unpkg.com/@microsoft/[email protected]/lib/esm/index.js'
3-
).then((module) => module.fetchEventSource);
1+
const fetchApi = import('https://cdn.skypack.dev/@microsoft/[email protected]')
2+
.then((module) => module.fetchEventSource);
3+
44

55
const ai_request = (request, respondWith) => {
66
respondWith.stream((signal, streamMessage) => {

modules/ROOT/examples/live-demos/full-featured/example.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
const fetchApi = import(
2-
"https://unpkg.com/@microsoft/[email protected]/lib/esm/index.js"
3-
).then((module) => module.fetchEventSource);
1+
const fetchApi = import('https://cdn.skypack.dev/@microsoft/[email protected]')
2+
.then((module) => module.fetchEventSource);
3+
44

55
// This example stores the OpenAI API key in the client side integration. This is not recommended for any purpose.
66
// Instead, an alternate method for retrieving the API key should be used.

modules/ROOT/examples/live-demos/full-featured/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
const fetchApi = import(
2-
"https://unpkg.com/@microsoft/[email protected]/lib/esm/index.js"
3-
).then((module) => module.fetchEventSource);
1+
const fetchApi = import('https://cdn.skypack.dev/@microsoft/[email protected]')
2+
.then((module) => module.fetchEventSource);
3+
4+
45

56
/* Script to import faker.js for generating random data for demonstration purposes */
67
tinymce.ScriptLoader.loadScripts(['https://cdn.jsdelivr.net/npm/faker@5/dist/faker.min.js']).then(() => {

modules/ROOT/examples/live-demos/premiumskinsandicons-material-classic/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<script src="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.js"></script>
2-
<link rel="stylesheet" href="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.css">
1+
<script src="https://cdn.jsdelivr.net/npm/material-components-web@latest/dist/material-components-web.min.js"></script>
2+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/material-components-web@latest/dist/material-components-web.min.css">
33
<link href="https://fonts.googleapis.com/css?family=Roboto:400,400i,700,700i" rel="stylesheet">
44

55
<div class="mdc-layout-grid">

modules/ROOT/examples/live-demos/premiumskinsandicons-material-outline/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<script src="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.js"></script>
2-
<link rel="stylesheet" href="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.css">
1+
<script src="https://cdn.jsdelivr.net/npm/material-components-web@latest/dist/material-components-web.min.js"></script>
2+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/material-components-web@latest/dist/material-components-web.min.css">
33
<link href="https://fonts.googleapis.com/css?family=Roboto:400,400i,700,700i" rel="stylesheet">
44

55
<div class="mdc-layout-grid">

modules/ROOT/pages/ai-azure.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ This example demonstrates how to integrate the {pluginname} plugin with the http
7878

7979
[source,js]
8080
----
81-
const fetchApi = import("https://unpkg.com/@microsoft/[email protected]/lib/esm/index.js").then(module => module.fetchEventSource);
81+
const fetchApi = import("https://cdn.skypack.dev/@microsoft/[email protected]").then(module => module.fetchEventSource);
8282
8383
// This example stores the API key in the client side integration. This is not recommended for any purpose.
8484
// Instead, an alternate method for retrieving the API key should be used.

modules/ROOT/pages/ai-gemini.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ tinymce.init({
101101
This example demonstrates how to integrate the {pluginname} plugin with the Vertex AI API to generate streaming responses.
102102
[source,js]
103103
----
104-
const fetchApi = import("https://unpkg.com/@microsoft/[email protected]/lib/esm/index.js").then(module => module.fetchEventSource);
104+
const fetchApi = import("https://cdn.skypack.dev/@microsoft/[email protected]").then(module => module.fetchEventSource);
105105
106106
// Providing access credentials within the integration is not recommended for production use.
107107
// It is recommended to set up a proxy server to authenticate requests and provide access.

modules/ROOT/pages/ai-openai.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ This example demonstrates how to integrate the {pluginname} plugin with the Open
7878

7979
[source,js]
8080
----
81-
const fetchApi = import("https://unpkg.com/@microsoft/[email protected]/lib/esm/index.js").then(module => module.fetchEventSource);
81+
const fetchApi = import("https://cdn.skypack.dev/@microsoft/[email protected]").then(module => module.fetchEventSource);
8282
8383
// This example stores the API key in the client side integration. This is not recommended for any purpose.
8484
// Instead, an alternate method for retrieving the API key should be used.

0 commit comments

Comments
 (0)