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

Commit

Permalink
fix(data): keep runtime for data-embed and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tripodsan committed Apr 21, 2021
1 parent 51f3cae commit 41b9276
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
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.

2 changes: 1 addition & 1 deletion src/schemas/secrets.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"DATA_EMBED_SERVICE": {
"type": "string",
"description": "URL of a DataEmbed Service that takes the appended URL and returns an iterable JSON representation.",
"default": "https://helix-pages.anywhere.run/helix-services/data-embed@v2"
"default": "https://adobeioruntime.net/api/v1/web/helix/helix-services/data-embed@v2"
},
"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

0 comments on commit 41b9276

Please sign in to comment.