@jsenv/core 29.1.16 → 29.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js
CHANGED
|
@@ -29978,7 +29978,7 @@ const jsenvPluginInjectGlobals = urlAssociations => {
|
|
|
29978
29978
|
return {
|
|
29979
29979
|
name: "jsenv:inject_globals",
|
|
29980
29980
|
appliesDuring: "*",
|
|
29981
|
-
transformUrlContent: async urlInfo => {
|
|
29981
|
+
transformUrlContent: async (urlInfo, context) => {
|
|
29982
29982
|
const url = Object.keys(urlAssociations).find(url => {
|
|
29983
29983
|
return url === urlInfo.url;
|
|
29984
29984
|
});
|
|
@@ -29990,7 +29990,7 @@ const jsenvPluginInjectGlobals = urlAssociations => {
|
|
|
29990
29990
|
let globals = urlAssociations[url];
|
|
29991
29991
|
|
|
29992
29992
|
if (typeof globals === "function") {
|
|
29993
|
-
globals = await globals();
|
|
29993
|
+
globals = await globals(urlInfo, context);
|
|
29994
29994
|
}
|
|
29995
29995
|
|
|
29996
29996
|
if (Object.keys(globals).length === 0) {
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ export const jsenvPluginInjectGlobals = (urlAssociations) => {
|
|
|
4
4
|
return {
|
|
5
5
|
name: "jsenv:inject_globals",
|
|
6
6
|
appliesDuring: "*",
|
|
7
|
-
transformUrlContent: async (urlInfo) => {
|
|
7
|
+
transformUrlContent: async (urlInfo, context) => {
|
|
8
8
|
const url = Object.keys(urlAssociations).find((url) => {
|
|
9
9
|
return url === urlInfo.url
|
|
10
10
|
})
|
|
@@ -13,7 +13,7 @@ export const jsenvPluginInjectGlobals = (urlAssociations) => {
|
|
|
13
13
|
}
|
|
14
14
|
let globals = urlAssociations[url]
|
|
15
15
|
if (typeof globals === "function") {
|
|
16
|
-
globals = await globals()
|
|
16
|
+
globals = await globals(urlInfo, context)
|
|
17
17
|
}
|
|
18
18
|
if (Object.keys(globals).length === 0) {
|
|
19
19
|
return null
|