@trackunit/iris-app-webpack-plugin 1.7.76 → 1.7.78
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/CHANGELOG.md +12 -0
- package/package.json +2 -2
- package/src/lib/indexHtmlUtil.js +1 -0
- package/src/lib/indexHtmlUtil.js.map +1 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/iris-app-webpack-plugin",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.78",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"repository": "https://github.com/Trackunit/manager",
|
|
6
6
|
"engines": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"csp-header": "^5.2.1",
|
|
11
11
|
"webpack": "5.97.1",
|
|
12
|
-
"@trackunit/iris-app-api": "1.9.
|
|
12
|
+
"@trackunit/iris-app-api": "1.9.12",
|
|
13
13
|
"tslib": "^2.6.2"
|
|
14
14
|
},
|
|
15
15
|
"types": "./src/index.d.ts",
|
package/src/lib/indexHtmlUtil.js
CHANGED
|
@@ -10,6 +10,7 @@ const csp_header_1 = require("csp-header");
|
|
|
10
10
|
const updateIndexHtml = (indexContents, manifest, packageJson) => {
|
|
11
11
|
const scopeAndModuleNonce = (0, crypto_1.randomBytes)(16).toString("base64");
|
|
12
12
|
const csp = (0, csp_header_1.getCSP)({
|
|
13
|
+
// eslint-disable-next-line local-rules/no-typescript-assertion
|
|
13
14
|
directives: (0, iris_app_api_1.irisAppCspInput)(manifest.validDomains, manifest.cspHeader),
|
|
14
15
|
presets: {
|
|
15
16
|
irisAppDefaultCsp: iris_app_api_1.irisAppDefaultCsp,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexHtmlUtil.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-webpack-plugin/src/lib/indexHtmlUtil.ts"],"names":[],"mappings":";;;AAAA,0DAA8F;AAC9F,mCAAqC;AACrC,2CAAoC;AAEpC;;GAEG;AACI,MAAM,eAAe,GAAG,CAAC,aAAqB,EAAE,QAAyB,EAAE,WAAmB,EAAE,EAAE;IACvG,MAAM,mBAAmB,GAAG,IAAA,oBAAW,EAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAE/D,MAAM,GAAG,GAAG,IAAA,mBAAM,EAAC;QACjB,UAAU,EAAE,IAAA,8BAAe,EAAC,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"indexHtmlUtil.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-webpack-plugin/src/lib/indexHtmlUtil.ts"],"names":[],"mappings":";;;AAAA,0DAA8F;AAC9F,mCAAqC;AACrC,2CAAoC;AAEpC;;GAEG;AACI,MAAM,eAAe,GAAG,CAAC,aAAqB,EAAE,QAAyB,EAAE,WAAmB,EAAE,EAAE;IACvG,MAAM,mBAAmB,GAAG,IAAA,oBAAW,EAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAE/D,MAAM,GAAG,GAAG,IAAA,mBAAM,EAAC;QACjB,+DAA+D;QAC/D,UAAU,EAAE,IAAA,8BAAe,EAAC,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,SAAS,CAAuC;QAC5G,OAAO,EAAE;YACP,iBAAiB,EAAjB,gCAAiB;YACjB,QAAQ,EAAE,EAAE,aAAa,EAAE,CAAC,sBAAsB,CAAC,EAAE,YAAY,EAAE,CAAC,UAAU,mBAAmB,GAAG,CAAC,EAAE;SACxG;KACF,CAAC,CAAC;IAEH,MAAM,iBAAiB,GAAG,GAAG;SAC1B,KAAK,CAAC,GAAG,CAAC;SACV,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;SAC5D,IAAI,CAAC,GAAG,CAAC,CAAC;IACb,IAAI,IAAI,GAAG,aAAa,CAAC,OAAO,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;IAEtE,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC;IAEtD,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC;IAC/D,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;QACpB,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7E,CAAC;SAAM,CAAC;QACN,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,WAAW,CAAC,CAAC;IACzD,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AA3BW,QAAA,eAAe,mBA2B1B","sourcesContent":["import { irisAppCspInput, irisAppDefaultCsp, IrisAppManifest } from \"@trackunit/iris-app-api\";\nimport { randomBytes } from \"crypto\";\nimport { getCSP } from \"csp-header\";\n\n/**\n * Updates the index.html file with the given manifest and package.json file.\n */\nexport const updateIndexHtml = (indexContents: string, manifest: IrisAppManifest, packageJson: string) => {\n const scopeAndModuleNonce = randomBytes(16).toString(\"base64\");\n\n const csp = getCSP({\n // eslint-disable-next-line local-rules/no-typescript-assertion\n directives: irisAppCspInput(manifest.validDomains, manifest.cspHeader) as import(\"csp-header\").CSPDirectives,\n presets: {\n irisAppDefaultCsp,\n localDev: { \"connect-src\": [\"ws://localhost:8097/\"], \"script-src\": [`'nonce-${scopeAndModuleNonce}'`] },\n },\n });\n\n const cspWithoutSandbox = csp\n .split(\";\")\n .filter(substring => !substring.trim().startsWith(\"sandbox\"))\n .join(\";\");\n let html = indexContents.replace(\"{{cspContent}}\", cspWithoutSandbox);\n\n html = html.replace(\"{{nonce}}\", scopeAndModuleNonce);\n\n html = html.replace(\"{{scope}}\", JSON.parse(packageJson).name);\n if (manifest.scopes) {\n html = html.replace(\"{{manifestScopes}}\", JSON.stringify(manifest.scopes));\n } else {\n html = html.replace(\"{{manifestScopes}}\", \"undefined\");\n }\n return html;\n};\n"]}
|