@trackunit/iris-app-api 0.0.82-alpha-beca370860.0 → 0.0.82
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,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
-
## [0.0.82
|
|
5
|
+
## [0.0.82](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.81...iris-app-api/0.0.82) (2023-04-10)
|
|
6
6
|
|
|
7
7
|
## [0.0.81](https://github.com/Trackunit/manager/compare/iris-app-api/0.0.80...iris-app-api/0.0.81) (2023-03-30)
|
|
8
8
|
|
package/package.json
CHANGED
package/src/types/index.d.ts
CHANGED
package/src/types/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./irisAppCspInput"), exports);
|
|
4
5
|
tslib_1.__exportStar(require("./irisAppManifest"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./mocks"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./modulefederation"), exports);
|
package/src/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC;AAClC,kDAAwB;AACxB,6DAAmC","sourcesContent":["export * from \"./irisAppManifest\";\nexport * from \"./mocks\";\nexport * from \"./modulefederation\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC;AAClC,4DAAkC;AAClC,kDAAwB;AACxB,6DAAmC","sourcesContent":["export * from \"./irisAppCspInput\";\nexport * from \"./irisAppManifest\";\nexport * from \"./mocks\";\nexport * from \"./modulefederation\";\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This type is used to generate the CSP input for the Iris Apps Csp Header
|
|
3
|
+
*/
|
|
4
|
+
export type CspDirectives = {
|
|
5
|
+
directives: {
|
|
6
|
+
"default-src": string[];
|
|
7
|
+
"script-src": string[];
|
|
8
|
+
"worker-src": string[];
|
|
9
|
+
"style-src": string[];
|
|
10
|
+
"connect-src": string[];
|
|
11
|
+
};
|
|
12
|
+
reportUri?: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* This function is used to generate the CSP input for the Iris Apps Csp Header
|
|
16
|
+
*
|
|
17
|
+
* @param validDomains input valid domains to add to the CSP header
|
|
18
|
+
* @returns { CspDirectives } the CSP input for the Iris Apps Csp Header
|
|
19
|
+
*/
|
|
20
|
+
export declare const irisAppCspInput: (validDomains: string[]) => CspDirectives;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.irisAppCspInput = void 0;
|
|
4
|
+
const BrandedUrls = [
|
|
5
|
+
"https://*.trackunit.com",
|
|
6
|
+
"https://*.wackerneuson.com",
|
|
7
|
+
"https://*.manitou.com",
|
|
8
|
+
"https://*.niftylinkmanager.com",
|
|
9
|
+
"https://*.skyjack.com",
|
|
10
|
+
"https://*.ahernaccess.com",
|
|
11
|
+
"https://*.magnith.com",
|
|
12
|
+
"https://*.terberg.com",
|
|
13
|
+
"https://*.mymecalac.com",
|
|
14
|
+
"https://*.delille.be",
|
|
15
|
+
];
|
|
16
|
+
/**
|
|
17
|
+
* This function is used to generate the CSP input for the Iris Apps Csp Header
|
|
18
|
+
*
|
|
19
|
+
* @param validDomains input valid domains to add to the CSP header
|
|
20
|
+
* @returns { CspDirectives } the CSP input for the Iris Apps Csp Header
|
|
21
|
+
*/
|
|
22
|
+
const irisAppCspInput = (validDomains) => {
|
|
23
|
+
return {
|
|
24
|
+
directives: {
|
|
25
|
+
"default-src": ["'self'", ...validDomains],
|
|
26
|
+
"script-src": ["'self'", ...validDomains],
|
|
27
|
+
"worker-src": ["'self'", "blob:", ...validDomains],
|
|
28
|
+
"style-src": ["'unsafe-inline'", "https://fonts.googleapis.com"],
|
|
29
|
+
"connect-src": [
|
|
30
|
+
"'self'",
|
|
31
|
+
"https://*.sentry.io",
|
|
32
|
+
"https://sentry.io",
|
|
33
|
+
"http://localhost:3003",
|
|
34
|
+
...BrandedUrls,
|
|
35
|
+
...validDomains,
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
reportUri: "https://o343335.ingest.sentry.io/api/1888181/security/?sentry_key=62900a1fa49748d8ba12f4ffbdbd8e07",
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
exports.irisAppCspInput = irisAppCspInput;
|
|
42
|
+
//# sourceMappingURL=irisAppCspInput.js.map
|
|
@@ -0,0 +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;AAgBF;;;;;GAKG;AACI,MAAM,eAAe,GAAG,CAAC,YAAsB,EAAiB,EAAE;IACvE,OAAO;QACL,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;YAChE,aAAa,EAAE;gBACb,QAAQ;gBACR,qBAAqB;gBACrB,mBAAmB;gBACnB,uBAAuB;gBACvB,GAAG,WAAW;gBACd,GAAG,YAAY;aAChB;SACF;QACD,SAAS,EAAE,oGAAoG;KAChH,CAAC;AACJ,CAAC,CAAC;AAlBW,QAAA,eAAe,mBAkB1B","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 };\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 * @returns { CspDirectives } the CSP input for the Iris Apps Csp Header\n */\nexport const irisAppCspInput = (validDomains: string[]): CspDirectives => {\n return {\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 \"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};\n"]}
|