-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix server transformer not respecting host and port overrides (#33425)
* fix server transformer not respecting host and port overrides * Update build-system/server/new-server/transforms/transform.ts Co-authored-by: Raghu Simha <rsimha@amp.dev> * Update build-system/server/new-server/transforms/transform.ts Co-authored-by: Raghu Simha <rsimha@amp.dev> * fix tests * add CDNURLToLocalHostRelativeAbsoluteDist and use it in script transform Co-authored-by: Raghu Simha <rsimha@amp.dev>
- Loading branch information
1 parent
2d01a12
commit 7dac0bb
Showing
13 changed files
with
38 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
build-system/server/new-server/transforms/scripts/test/convert-to-max-names/input.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<script src="https://cdn.ampproject.org/v0.js" async></script> | ||
<script src="https://cdn.ampproject.org/v0.js?a=b&c=d#hello=world" async></script> | ||
<script src="https://cdn.ampproject.org/v0/amp-bind-0.1.js" async></script> | ||
<script src="https://cdn.ampproject.org/v0/amp-bind-0.2.js" async></script> |
6 changes: 3 additions & 3 deletions
6
build-system/server/new-server/transforms/scripts/test/convert-to-max-names/output.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<script src="http://localhost:8000/dist/amp.js" async=""></script> | ||
<script src="http://localhost:8000/dist/v0/amp-bind-0.1.max.js" async=""></script> | ||
<script src="http://localhost:8000/dist/v0/amp-bind-0.2.max.js" async=""></script> | ||
<script src="/dist/amp.js?a=b&c=d#hello=world" async=""></script> | ||
<script src="/dist/v0/amp-bind-0.1.max.js" async=""></script> | ||
<script src="/dist/v0/amp-bind-0.2.max.js" async=""></script> |
6 changes: 3 additions & 3 deletions
6
build-system/server/new-server/transforms/scripts/test/invalid-src-loose/output.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<script src="http://localhost:8000/dist/v0.js" async=""></script> | ||
<script src="http://localhost:8000/dist/amp.js" async=""></script> | ||
<script src="http://localhost:8000/dist/amp.js" async=""></script> | ||
<script src="/dist/v0.js" async=""></script> | ||
<script src="/dist/amp.js" async=""></script> | ||
<script src="/dist/amp.js" async=""></script> |
4 changes: 2 additions & 2 deletions
4
build-system/server/new-server/transforms/scripts/test/multiple/output.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
<script src="http://localhost:8000/dist/v0.js" async=""></script> | ||
<script src="http://localhost:8000/dist/v0.js" async=""></script> | ||
<script src="/dist/v0.js" async=""></script> | ||
<script src="/dist/v0.js" async=""></script> |
10 changes: 5 additions & 5 deletions
10
build-system/server/new-server/transforms/scripts/test/port-transform-loose/output.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<script async="" src="http://localhost:9876/dist/amp.js"></script> | ||
<script async="" src="http://localhost:9876/dist/v0.js" nomodule=""></script> | ||
<script async="" src="http://localhost:9876/dist/v0.mjs" type="module"></script> | ||
<script async="" src="http://localhost:9876/dist/v0/amp-bind-0.1.js"></script> | ||
<script async="" src="http://localhost:9876/dist/dist/amp.js"></script> | ||
<script async="" src="/dist/amp.js"></script> | ||
<script async="" src="/dist/v0.js" nomodule=""></script> | ||
<script async="" src="/dist/v0.mjs" type="module"></script> | ||
<script async="" src="/dist/v0/amp-bind-0.1.js"></script> | ||
<script async="" src="/dist/dist/amp.js"></script> |
4 changes: 2 additions & 2 deletions
4
build-system/server/new-server/transforms/scripts/test/port-transform-strict/output.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<script async="" src="http://localhost:8000/amp.js"></script> | ||
<script async="" src="http://localhost:9876/dist/v0.js" nomodule=""></script> | ||
<script async="" src="http://localhost:9876/dist/v0.mjs" type="module"></script> | ||
<script async="" src="/dist/v0.js" nomodule=""></script> | ||
<script async="" src="/dist/v0.mjs" type="module"></script> | ||
<script async="" src="http://localhost:8000/v0/amp-bind-0.1.js"></script> | ||
<script async="" src="/dist/amp.js"></script> |
6 changes: 3 additions & 3 deletions
6
build-system/server/new-server/transforms/scripts/test/retain-extension/output.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<script async="" src="http://localhost:8000/dist/v0.js"></script> | ||
<script async="" src="http://localhost:8000/dist/v0.mjs"></script> | ||
<script async="" src="http://localhost:8000/dist/v0.sxg.js"></script> | ||
<script async="" src="/dist/v0.js"></script> | ||
<script async="" src="/dist/v0.mjs"></script> | ||
<script async="" src="/dist/v0.sxg.js"></script> |
2 changes: 1 addition & 1 deletion
2
build-system/server/new-server/transforms/scripts/test/runtime/input.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
<script src="https://cdn.ampproject.org/v0.js" async></script> | ||
<script src="https://cdn.ampproject.org/v0.js?a=b&c=d#hello=world" async></script> | ||
<script src="https://cdn.ampproject.org/v0/amp-bind-0.1.js" async></script> |
4 changes: 2 additions & 2 deletions
4
build-system/server/new-server/transforms/scripts/test/runtime/output.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
<script src="http://localhost:8000/dist/v0.js" async=""></script> | ||
<script src="http://localhost:8000/dist/v0/amp-bind-0.1.js" async=""></script> | ||
<script src="/dist/v0.js?a=b&c=d#hello=world" async=""></script> | ||
<script src="/dist/v0/amp-bind-0.1.js" async=""></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters