@trackunit/iris-app-api 1.6.40 → 1.6.42
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
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## 1.6.42 (2025-09-15)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for iris-app-api to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
5
|
+
## 1.6.41 (2025-09-15)
|
|
6
|
+
|
|
7
|
+
This was a version bump only for iris-app-api to align it with other projects, there were no code changes.
|
|
8
|
+
|
|
1
9
|
## 1.6.40 (2025-09-12)
|
|
2
10
|
|
|
3
11
|
This was a version bump only for iris-app-api to align it with other projects, there were no code changes.
|
package/package.json
CHANGED
|
@@ -5,7 +5,6 @@ exports.permissionsPolicyStringify = permissionsPolicyStringify;
|
|
|
5
5
|
* Stringifies a PermissionsPolicy, so that it can be added to the `allow` property of an iframe element
|
|
6
6
|
*/
|
|
7
7
|
function permissionsPolicyStringify(policy) {
|
|
8
|
-
// eslint-disable-next-line local-rules/prefer-custom-object-entries
|
|
9
8
|
return Object.entries(policy)
|
|
10
9
|
.filter(([_, allowlist]) => !!allowlist)
|
|
11
10
|
.map(([directive, allowlist]) => Array.isArray(allowlist) ? `${directive} ${allowlist.join(" ")}` : `${directive} ${allowlist}`)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permissionsPolicy.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/permissionsPolicy.ts"],"names":[],"mappings":";;AA8CA,
|
|
1
|
+
{"version":3,"file":"permissionsPolicy.js","sourceRoot":"","sources":["../../../../../../libs/iris-app-sdk/iris-app-api/src/types/permissionsPolicy.ts"],"names":[],"mappings":";;AA8CA,gEAOC;AAVD;;GAEG;AACH,SAAgB,0BAA0B,CAAC,MAAyB;IAClE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;SAC1B,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;SACvC,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,EAAE,CAC9B,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,IAAI,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,SAAS,IAAI,SAAS,EAAE,CAC/F;SACA,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC","sourcesContent":["type AllowList = \"*\" | Array<\"src\" | \"self\" | `http://${string}` | `https://${string}`>;\n\n/*\n * Based on types from https://github.com/klnjs/basique/blob/master/packages/utils/headers/src/permissions-policy.ts and\n * adapted to our needs.\n */\nexport interface PermissionsPolicy {\n accelerometer?: AllowList;\n \"ambient-light-sensor\"?: AllowList;\n \"attribution-reporting\"?: AllowList;\n autoplay?: AllowList;\n bluetooth?: AllowList;\n camera?: AllowList;\n \"clipboard-read\"?: AllowList;\n \"clipboard-write\"?: AllowList;\n \"cross-origin-isolated\"?: AllowList;\n \"display-capture\"?: AllowList;\n \"document-domain\"?: AllowList;\n \"encrypted-media\"?: AllowList;\n \"execution-while-not-rendered\"?: AllowList;\n \"execution-while-out-of-viewport\"?: AllowList;\n fullscreen?: AllowList;\n geolocation?: AllowList;\n gyroscope?: AllowList;\n hid?: AllowList;\n \"idle-detection\"?: AllowList;\n \"interest-cohort\"?: AllowList;\n magnetometer?: AllowList;\n microphone?: AllowList;\n midi?: AllowList;\n \"navigation-override\"?: AllowList;\n payment?: AllowList;\n \"picture-in-picture\"?: AllowList;\n \"publickey-credentials-get\"?: AllowList;\n \"screen-wake-lock\"?: AllowList;\n serial?: AllowList;\n speaker?: AllowList;\n \"sync-xhr\"?: AllowList;\n usb?: AllowList;\n \"web-share\"?: AllowList;\n \"xr-spatial-tracking\"?: AllowList;\n}\n\n/**\n * Stringifies a PermissionsPolicy, so that it can be added to the `allow` property of an iframe element\n */\nexport function permissionsPolicyStringify(policy: PermissionsPolicy): string {\n return Object.entries(policy)\n .filter(([_, allowlist]) => !!allowlist)\n .map(([directive, allowlist]) =>\n Array.isArray(allowlist) ? `${directive} ${allowlist.join(\" \")}` : `${directive} ${allowlist}`\n )\n .join(\"; \");\n}\n"]}
|