@trackunit/iris-app-api 0.0.143 → 0.0.144

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 CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.0.144](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.143...iris-app-api/0.0.144) (2024-01-18)
6
+
5
7
  ## [0.0.143](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.142...iris-app-api/0.0.143) (2024-01-17)
6
8
 
7
9
  ## [0.0.142](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.141...iris-app-api/0.0.142) (2024-01-12)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/iris-app-api",
3
- "version": "0.0.143",
3
+ "version": "0.0.144",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "repository": "https://github.com/Trackunit/manager",
6
6
  "engines": {
@@ -7,6 +7,7 @@ export type CspDirectives = {
7
7
  "script-src": string[];
8
8
  "worker-src": string[];
9
9
  "style-src": string[];
10
+ "img-src": string[];
10
11
  "connect-src": string[];
11
12
  "frame-ancestors"?: string[];
12
13
  };
@@ -26,16 +26,10 @@ const irisAppCspInput = (validDomains, frameAncestors, extraScriptSrc) => {
26
26
  directives: {
27
27
  "default-src": ["'self'", ...validDomains],
28
28
  "script-src": ["'self'", ...validDomains],
29
- "worker-src": ["'self'", "blob:", ...validDomains],
29
+ "img-src": ["'self'", "https://images.iris.trackunit.com", "https://*.awsapi.trackunit.com/", ...validDomains],
30
+ "worker-src": ["'self'", ...validDomains],
30
31
  "style-src": ["'unsafe-inline'", "https://fonts.googleapis.com"],
31
- "connect-src": [
32
- "'self'",
33
- "https://*.sentry.io",
34
- "https://sentry.io",
35
- "http://localhost:3003",
36
- ...BrandedUrls,
37
- ...validDomains,
38
- ],
32
+ "connect-src": ["'self'", "https://*.sentry.io", "https://sentry.io", ...BrandedUrls, ...validDomains],
39
33
  },
40
34
  reportUri: "https://o343335.ingest.sentry.io/api/1888181/security/?sentry_key=62900a1fa49748d8ba12f4ffbdbd8e07",
41
35
  };
@@ -1 +1 @@
1
- {"version":3,"file":"irisAppCspInput.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/irisAppCspInput.ts"],"names":[],"mappings":";;;AAAA,MAAM,WAAW,GAAG;IAClB,yBAAyB;IACzB,4BAA4B;IAC5B,uBAAuB;IACvB,gCAAgC;IAChC,uBAAuB;IACvB,2BAA2B;IAC3B,uBAAuB;IACvB,uBAAuB;IACvB,yBAAyB;IACzB,sBAAsB;CACvB,CAAC;AAiBF;;;;;;;GAOG;AACI,MAAM,eAAe,GAAG,CAC7B,YAAsB,EACtB,cAAyB,EACzB,cAAuB,EACR,EAAE;IACjB,MAAM,QAAQ,GAAkB;QAC9B,UAAU,EAAE;YACV,aAAa,EAAE,CAAC,QAAQ,EAAE,GAAG,YAAY,CAAC;YAC1C,YAAY,EAAE,CAAC,QAAQ,EAAE,GAAG,YAAY,CAAC;YACzC,YAAY,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,YAAY,CAAC;YAClD,WAAW,EAAE,CAAC,iBAAiB,EAAE,8BAA8B,CAAC;YAEhE,aAAa,EAAE;gBACb,QAAQ;gBACR,qBAAqB;gBACrB,mBAAmB;gBACnB,uBAAuB;gBACvB,GAAG,WAAW;gBACd,GAAG,YAAY;aAChB;SACF;QACD,SAAS,EAAE,oGAAoG;KAChH,CAAC;IACF,IAAI,cAAc,EAAE;QAClB,QAAQ,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;KACxD;IACD,IAAI,cAAc,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE;QAC/C,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC,GAAG,cAAc,CAAC;KACzD;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AA9BW,QAAA,eAAe,mBA8B1B","sourcesContent":["const BrandedUrls = [\n \"https://*.trackunit.com\",\n \"https://*.wackerneuson.com\",\n \"https://*.manitou.com\",\n \"https://*.niftylinkmanager.com\",\n \"https://*.skyjack.com\",\n \"https://*.ahernaccess.com\",\n \"https://*.magnith.com\",\n \"https://*.terberg.com\",\n \"https://*.mymecalac.com\",\n \"https://*.delille.be\",\n];\n\n/**\n * This type is used to generate the CSP input for the Iris Apps Csp Header\n */\nexport type CspDirectives = {\n directives: {\n \"default-src\": string[];\n \"script-src\": string[];\n \"worker-src\": string[];\n \"style-src\": string[];\n \"connect-src\": string[];\n \"frame-ancestors\"?: string[];\n };\n reportUri?: string;\n};\n\n/**\n * This function is used to generate the CSP input for the Iris Apps Csp Header\n *\n * @param validDomains input valid domains to add to the CSP header\n * @param frameAncestors input frame ancestors to add to the CSP header\n * @param extraScriptSrc input extra script src to add to the CSP header\n * @returns { CspDirectives } the CSP input for the Iris Apps Csp Header\n */\nexport const irisAppCspInput = (\n validDomains: string[],\n frameAncestors?: string[],\n extraScriptSrc?: string\n): CspDirectives => {\n const cspInput: CspDirectives = {\n directives: {\n \"default-src\": [\"'self'\", ...validDomains],\n \"script-src\": [\"'self'\", ...validDomains],\n \"worker-src\": [\"'self'\", \"blob:\", ...validDomains],\n \"style-src\": [\"'unsafe-inline'\", \"https://fonts.googleapis.com\"],\n\n \"connect-src\": [\n \"'self'\",\n \"https://*.sentry.io\",\n \"https://sentry.io\",\n \"http://localhost:3003\",\n ...BrandedUrls,\n ...validDomains,\n ],\n },\n reportUri: \"https://o343335.ingest.sentry.io/api/1888181/security/?sentry_key=62900a1fa49748d8ba12f4ffbdbd8e07\",\n };\n if (extraScriptSrc) {\n cspInput.directives[\"script-src\"].push(extraScriptSrc);\n }\n if (frameAncestors && frameAncestors.length > 0) {\n cspInput.directives[\"frame-ancestors\"] = frameAncestors;\n }\n return cspInput;\n};\n"]}
1
+ {"version":3,"file":"irisAppCspInput.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/irisAppCspInput.ts"],"names":[],"mappings":";;;AAAA,MAAM,WAAW,GAAG;IAClB,yBAAyB;IACzB,4BAA4B;IAC5B,uBAAuB;IACvB,gCAAgC;IAChC,uBAAuB;IACvB,2BAA2B;IAC3B,uBAAuB;IACvB,uBAAuB;IACvB,yBAAyB;IACzB,sBAAsB;CACvB,CAAC;AAkBF;;;;;;;GAOG;AACI,MAAM,eAAe,GAAG,CAC7B,YAAsB,EACtB,cAAyB,EACzB,cAAuB,EACR,EAAE;IACjB,MAAM,QAAQ,GAAkB;QAC9B,UAAU,EAAE;YACV,aAAa,EAAE,CAAC,QAAQ,EAAE,GAAG,YAAY,CAAC;YAC1C,YAAY,EAAE,CAAC,QAAQ,EAAE,GAAG,YAAY,CAAC;YACzC,SAAS,EAAE,CAAC,QAAQ,EAAE,mCAAmC,EAAE,iCAAiC,EAAE,GAAG,YAAY,CAAC;YAC9G,YAAY,EAAE,CAAC,QAAQ,EAAE,GAAG,YAAY,CAAC;YACzC,WAAW,EAAE,CAAC,iBAAiB,EAAE,8BAA8B,CAAC;YAChE,aAAa,EAAE,CAAC,QAAQ,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,GAAG,WAAW,EAAE,GAAG,YAAY,CAAC;SACvG;QACD,SAAS,EAAE,oGAAoG;KAChH,CAAC;IACF,IAAI,cAAc,EAAE;QAClB,QAAQ,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;KACxD;IACD,IAAI,cAAc,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE;QAC/C,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC,GAAG,cAAc,CAAC;KACzD;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAvBW,QAAA,eAAe,mBAuB1B","sourcesContent":["const BrandedUrls = [\n \"https://*.trackunit.com\",\n \"https://*.wackerneuson.com\",\n \"https://*.manitou.com\",\n \"https://*.niftylinkmanager.com\",\n \"https://*.skyjack.com\",\n \"https://*.ahernaccess.com\",\n \"https://*.magnith.com\",\n \"https://*.terberg.com\",\n \"https://*.mymecalac.com\",\n \"https://*.delille.be\",\n];\n\n/**\n * This type is used to generate the CSP input for the Iris Apps Csp Header\n */\nexport type CspDirectives = {\n directives: {\n \"default-src\": string[];\n \"script-src\": string[];\n \"worker-src\": string[];\n \"style-src\": string[];\n \"img-src\": string[];\n \"connect-src\": string[];\n \"frame-ancestors\"?: string[];\n };\n reportUri?: string;\n};\n\n/**\n * This function is used to generate the CSP input for the Iris Apps Csp Header\n *\n * @param validDomains input valid domains to add to the CSP header\n * @param frameAncestors input frame ancestors to add to the CSP header\n * @param extraScriptSrc input extra script src to add to the CSP header\n * @returns { CspDirectives } the CSP input for the Iris Apps Csp Header\n */\nexport const irisAppCspInput = (\n validDomains: string[],\n frameAncestors?: string[],\n extraScriptSrc?: string\n): CspDirectives => {\n const cspInput: CspDirectives = {\n directives: {\n \"default-src\": [\"'self'\", ...validDomains],\n \"script-src\": [\"'self'\", ...validDomains],\n \"img-src\": [\"'self'\", \"https://images.iris.trackunit.com\", \"https://*.awsapi.trackunit.com/\", ...validDomains],\n \"worker-src\": [\"'self'\", ...validDomains],\n \"style-src\": [\"'unsafe-inline'\", \"https://fonts.googleapis.com\"],\n \"connect-src\": [\"'self'\", \"https://*.sentry.io\", \"https://sentry.io\", ...BrandedUrls, ...validDomains],\n },\n reportUri: \"https://o343335.ingest.sentry.io/api/1888181/security/?sentry_key=62900a1fa49748d8ba12f4ffbdbd8e07\",\n };\n if (extraScriptSrc) {\n cspInput.directives[\"script-src\"].push(extraScriptSrc);\n }\n if (frameAncestors && frameAncestors.length > 0) {\n cspInput.directives[\"frame-ancestors\"] = frameAncestors;\n }\n return cspInput;\n};\n"]}