Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

use universal runtime for embeds #1056

Merged
merged 4 commits into from
Apr 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/action-properties-secrets.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ URL of an Embed Service that takes the appended URL and returns an embeddable HT
The default value is:

```json
"https://adobeioruntime.net/api/v1/web/helix/helix-services/embed@v1"
"https://helix-pages.anywhere.run/helix-services/embed@v1"
```

## DATA_EMBED_SERVICE
Expand All @@ -197,7 +197,7 @@ URL of a DataEmbed Service that takes the appended URL and returns an iterable J
The default value is:

```json
"https://adobeioruntime.net/api/v1/web/helix/helix-services/data-embed@v1"
"https://adobeioruntime.net/api/v1/web/helix/helix-services/data-embed@v2"
```

## EMBED_SELECTOR
Expand Down
2 changes: 1 addition & 1 deletion docs/secrets-properties-data_embed_service.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ URL of a DataEmbed Service that takes the appended URL and returns an iterable J
The default value is:

```json
"https://adobeioruntime.net/api/v1/web/helix/helix-services/data-embed@v1"
"https://adobeioruntime.net/api/v1/web/helix/helix-services/data-embed@v2"
```
2 changes: 1 addition & 1 deletion docs/secrets-properties-embed_service.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ URL of an Embed Service that takes the appended URL and returns an embeddable HT
The default value is:

```json
"https://adobeioruntime.net/api/v1/web/helix/helix-services/embed@v1"
"https://helix-pages.anywhere.run/helix-services/embed@v1"
```
4 changes: 2 additions & 2 deletions docs/secrets.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ URL of an Embed Service that takes the appended URL and returns an embeddable HT
The default value is:

```json
"https://adobeioruntime.net/api/v1/web/helix/helix-services/embed@v1"
"https://helix-pages.anywhere.run/helix-services/embed@v1"
```

## DATA_EMBED_SERVICE
Expand All @@ -197,7 +197,7 @@ URL of a DataEmbed Service that takes the appended URL and returns an iterable J
The default value is:

```json
"https://adobeioruntime.net/api/v1/web/helix/helix-services/data-embed@v1"
"https://adobeioruntime.net/api/v1/web/helix/helix-services/data-embed@v2"
```

## EMBED_SELECTOR
Expand Down
2 changes: 1 addition & 1 deletion docs/secrets.schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/schemas/secrets.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@
"EMBED_SERVICE": {
"type": "string",
"description": "URL of an Embed Service that takes the appended URL and returns an embeddable HTML representation.",
"default": "https://adobeioruntime.net/api/v1/web/helix/helix-services/embed@v1"
"default": "https://helix-pages.anywhere.run/helix-services/embed@v1"
},
"DATA_EMBED_SERVICE": {
"type": "string",
"description": "URL of a DataEmbed Service that takes the appended URL and returns an iterable JSON representation.",
"default": "https://adobeioruntime.net/api/v1/web/helix/helix-services/data-embed@v1"
"default": "https://adobeioruntime.net/api/v1/web/helix/helix-services/data-embed@v2"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment below

},
"EMBED_SELECTOR": {
"type": "string",
Expand Down
8 changes: 4 additions & 4 deletions test/fixtures/embeds.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ <h1 id="hello-world">Hello “World”</h1>
<h2 id="gatsby-style-embeds">Gatsby-Style-Embeds</h2>
<p>
<esi:include
src="https://adobeioruntime.net/api/v1/web/helix/helix-services/embed@v1/https://www.youtube.com/embed/2Xc9gXyf2G4">
src="https://helix-pages.anywhere.run/helix-services/embed@v1/https://www.youtube.com/embed/2Xc9gXyf2G4">
</esi:include>
<esi:remove><code>video: https://www.youtube.com/embed/2Xc9gXyf2G4</code></esi:remove>
</p>
Expand All @@ -12,7 +12,7 @@ <h2 id="gatsby-style-embeds">Gatsby-Style-Embeds</h2>
<p><code>video: http foo bar</code> looks interesting, but doesn’t work either.</p>
<h2 id="link--image-style-embeds">Link + Image-Style Embeds</h2>
<esi:include
src="https://adobeioruntime.net/api/v1/web/helix/helix-services/embed@v1/https://www.youtube.com/watch?v=KOxbO0EI4MA">
src="https://helix-pages.anywhere.run/helix-services/embed@v1/https://www.youtube.com/watch?v=KOxbO0EI4MA">
</esi:include>
<esi:remove>
<p><a href="https://www.youtube.com/watch?v=KOxbO0EI4MA" title="Audi R8"><img
Expand All @@ -22,7 +22,7 @@ <h2 id="link--image-style-embeds">Link + Image-Style Embeds</h2>
<img src="http://img.youtube.com/vi/KOxbO0EI4MA/0.jpg" alt="Audi R8">is just an image.</p>
<h2 id="image-style-embeds">Image-Style Embeds</h2>
<esi:include
src="https://adobeioruntime.net/api/v1/web/helix/helix-services/embed@v1/https://www.youtube.com/watch?v=KOxbO0EI4MA">
src="https://helix-pages.anywhere.run/helix-services/embed@v1/https://www.youtube.com/watch?v=KOxbO0EI4MA">
</esi:include>
<esi:remove>
<p><img src="https://www.youtube.com/watch?v=KOxbO0EI4MA" alt=""></p>
Expand All @@ -37,7 +37,7 @@ <h2 id="image-style-embeds">Image-Style Embeds</h2>
<p>is on a paragraph of its own.</p>
<h2 id="ia-writer-style-embeds">IA Writer-Style Embeds</h2>
<esi:include
src="https://adobeioruntime.net/api/v1/web/helix/helix-services/embed@v1/https://www.youtube.com/watch?v=KOxbO0EI4MA">
src="https://helix-pages.anywhere.run/helix-services/embed@v1/https://www.youtube.com/watch?v=KOxbO0EI4MA">
</esi:include>
<esi:remove>
<p><a href="https://www.youtube.com/watch?v=KOxbO0EI4MA">https://www.youtube.com/watch?v=KOxbO0EI4MA</a></p>
Expand Down
2 changes: 1 addition & 1 deletion test/testDataEmbeds.js
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ describe('Integration Test with Data Embeds (version locked)', () => {

action.versionLock = new VersionLock({
__ow_headers: {
'x-ow-version-lock': 'data-embed=data-embed@v1.2.3',
'x-ow-version-lock': 'data-embed=v1.2.3',
},
});
action.downloader = new Downloader(context, action, { forceHttp1: true });
Expand Down
2 changes: 1 addition & 1 deletion test/testEmbedHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe('Test Embed Handler', () => {
await coerce(action);

embed(action.secrets)((_, tagname, parameters, children) => {
assert.equal(parameters.src, 'https://adobeioruntime.net/api/v1/web/helix/helix-services/embed@v1/https://www.example.com/');
assert.equal(parameters.src, 'https://helix-pages.anywhere.run/helix-services/embed@v1/https://www.example.com/');
assert.equal(children, undefined);
assert.equal(tagname, 'esi:include');
}, node);
Expand Down
4 changes: 2 additions & 2 deletions test/testPipeWithMarkupConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,13 @@ https://soundcloud.com/mariamamermounib/el-ghasala?in=mariamamermounib/sets/mari
`<hr>
<p>from github.</p>
<pre class="zupp" data-embed="https://www.youtube.com/watch?v=dQw4w9WgXcQ">
<esi:include src="https://adobeioruntime.net/api/v1/web/helix/helix-services/embed@v1/https://www.youtube.com/watch?v=dQw4w9WgXcQ" class="bar" baz="qux"></esi:include>
<esi:include src="https://helix-pages.anywhere.run/helix-services/embed@v1/https://www.youtube.com/watch?v=dQw4w9WgXcQ" class="bar" baz="qux"></esi:include>
<esi:remove class="bar" baz="qux">
<p><a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">https://www.youtube.com/watch?v=dQw4w9WgXcQ</a></p>
</esi:remove>
</pre>
<p>And here is something from Soundcloud</p>
<esi:include src="https://adobeioruntime.net/api/v1/web/helix/helix-services/embed@v1/https://soundcloud.com/mariamamermounib/el-ghasala?in=mariamamermounib/sets/mariam-amer-mounib-amel-eh-fe" onerror="fail"></esi:include>
<esi:include src="https://helix-pages.anywhere.run/helix-services/embed@v1/https://soundcloud.com/mariamamermounib/el-ghasala?in=mariamamermounib/sets/mariam-amer-mounib-amel-eh-fe" onerror="fail"></esi:include>
<esi:remove onerror="fail"><p><a href="https://soundcloud.com/mariamamermounib/el-ghasala?in=mariamamermounib/sets/mariam-amer-mounib-amel-eh-fe">https://soundcloud.com/mariamamermounib/el-ghasala?in=mariamamermounib/sets/mariam-amer-mounib-amel-eh-fe</a></p></esi:remove>`);
});

Expand Down