@wickermoney/plugin-sdk 0.4.2 → 0.6.0-rc.1
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/README.md +265 -12
- package/dist/{recurrence → date}/calendar.d.ts +30 -2
- package/dist/date/calendar.d.ts.map +1 -0
- package/dist/{recurrence → date}/calendar.js +42 -3
- package/dist/date/calendar.js.map +1 -0
- package/dist/date/index.d.ts +17 -0
- package/dist/date/index.d.ts.map +1 -0
- package/dist/date/index.js +17 -0
- package/dist/date/index.js.map +1 -0
- package/dist/index.d.ts +15 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/dist/isolated/PluginApiError.d.ts +20 -0
- package/dist/isolated/PluginApiError.d.ts.map +1 -0
- package/dist/isolated/PluginApiError.js +25 -0
- package/dist/isolated/PluginApiError.js.map +1 -0
- package/dist/isolated/client.d.ts +118 -0
- package/dist/isolated/client.d.ts.map +1 -0
- package/dist/isolated/client.js +275 -0
- package/dist/isolated/client.js.map +1 -0
- package/dist/isolated/format.d.ts +25 -0
- package/dist/isolated/format.d.ts.map +1 -0
- package/dist/isolated/format.js +59 -0
- package/dist/isolated/format.js.map +1 -0
- package/dist/isolated/index.d.ts +48 -0
- package/dist/isolated/index.d.ts.map +1 -0
- package/dist/isolated/index.js +45 -0
- package/dist/isolated/index.js.map +1 -0
- package/dist/isolated/protocol.d.ts +217 -0
- package/dist/isolated/protocol.d.ts.map +1 -0
- package/dist/isolated/protocol.js +31 -0
- package/dist/isolated/protocol.js.map +1 -0
- package/dist/isolated/theme.d.ts +24 -0
- package/dist/isolated/theme.d.ts.map +1 -0
- package/dist/isolated/theme.js +32 -0
- package/dist/isolated/theme.js.map +1 -0
- package/dist/isolated/validate.d.ts +47 -0
- package/dist/isolated/validate.d.ts.map +1 -0
- package/dist/isolated/validate.js +260 -0
- package/dist/isolated/validate.js.map +1 -0
- package/dist/manifest/PERMISSIONS.d.ts +5 -0
- package/dist/manifest/PERMISSIONS.d.ts.map +1 -1
- package/dist/manifest/PERMISSIONS.js +5 -0
- package/dist/manifest/PERMISSIONS.js.map +1 -1
- package/dist/manifest/checkRemoteEntry.d.ts +2 -1
- package/dist/manifest/checkRemoteEntry.d.ts.map +1 -1
- package/dist/manifest/checkRemoteEntry.js +2 -1
- package/dist/manifest/checkRemoteEntry.js.map +1 -1
- package/dist/manifest/checkRemoteEntryIntegrity.d.ts +27 -0
- package/dist/manifest/checkRemoteEntryIntegrity.d.ts.map +1 -0
- package/dist/manifest/checkRemoteEntryIntegrity.js +47 -0
- package/dist/manifest/checkRemoteEntryIntegrity.js.map +1 -0
- package/dist/manifest/index.d.ts +2 -5
- package/dist/manifest/index.d.ts.map +1 -1
- package/dist/manifest/index.js +2 -5
- package/dist/manifest/index.js.map +1 -1
- package/dist/manifest/integritySchema.d.ts +28 -0
- package/dist/manifest/integritySchema.d.ts.map +1 -0
- package/dist/manifest/integritySchema.js +30 -0
- package/dist/manifest/integritySchema.js.map +1 -0
- package/dist/manifest/parseIntegrity.d.ts +14 -0
- package/dist/manifest/parseIntegrity.d.ts.map +1 -0
- package/dist/manifest/parseIntegrity.js +16 -0
- package/dist/manifest/parseIntegrity.js.map +1 -0
- package/dist/manifest/pluginManifestSchema.d.ts +2 -0
- package/dist/manifest/pluginManifestSchema.d.ts.map +1 -1
- package/dist/manifest/pluginManifestSchema.js +48 -1
- package/dist/manifest/pluginManifestSchema.js.map +1 -1
- package/dist/manifest/tableGrantSchema.d.ts +6 -1
- package/dist/manifest/tableGrantSchema.d.ts.map +1 -1
- package/dist/manifest/tableGrantSchema.js +6 -1
- package/dist/manifest/tableGrantSchema.js.map +1 -1
- package/dist/money/index.d.ts +4 -0
- package/dist/money/index.d.ts.map +1 -1
- package/dist/money/index.js.map +1 -1
- package/dist/recurrence/index.d.ts +8 -0
- package/dist/recurrence/index.d.ts.map +1 -1
- package/dist/recurrence/index.js +10 -0
- package/dist/recurrence/index.js.map +1 -1
- package/dist/recurrence/projection.js +1 -1
- package/dist/recurrence/projection.js.map +1 -1
- package/dist/recurrence/schedule.js +1 -1
- package/dist/recurrence/schedule.js.map +1 -1
- package/dist/recurrence/scheduled.js +1 -1
- package/dist/recurrence/scheduled.js.map +1 -1
- package/dist/runtime.d.ts +26 -3
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js.map +1 -1
- package/dist/server/ConditionForMatching.d.ts +18 -0
- package/dist/server/ConditionForMatching.d.ts.map +1 -0
- package/dist/server/ConditionForMatching.js +2 -0
- package/dist/server/ConditionForMatching.js.map +1 -0
- package/dist/server/PluginRouteError.d.ts +27 -0
- package/dist/server/PluginRouteError.d.ts.map +1 -0
- package/dist/server/PluginRouteError.js +32 -0
- package/dist/server/PluginRouteError.js.map +1 -0
- package/dist/server/PluginRouteIssue.d.ts +8 -0
- package/dist/server/PluginRouteIssue.d.ts.map +1 -0
- package/dist/server/PluginRouteIssue.js +2 -0
- package/dist/server/PluginRouteIssue.js.map +1 -0
- package/dist/server/Query.d.ts +11 -0
- package/dist/server/Query.d.ts.map +1 -0
- package/dist/server/Query.js +2 -0
- package/dist/server/Query.js.map +1 -0
- package/dist/server/RegisterRoute.d.ts +24 -0
- package/dist/server/RegisterRoute.d.ts.map +1 -0
- package/dist/server/RegisterRoute.js +2 -0
- package/dist/server/RegisterRoute.js.map +1 -0
- package/dist/server/RouteContext.d.ts +12 -0
- package/dist/server/RouteContext.d.ts.map +1 -0
- package/dist/server/RouteContext.js +2 -0
- package/dist/server/RouteContext.js.map +1 -0
- package/dist/server/RouteMethod.d.ts +3 -0
- package/dist/server/RouteMethod.d.ts.map +1 -0
- package/dist/server/RouteMethod.js +2 -0
- package/dist/server/RouteMethod.js.map +1 -0
- package/dist/server/RuleForMatching.d.ts +16 -0
- package/dist/server/RuleForMatching.d.ts.map +1 -0
- package/dist/server/RuleForMatching.js +2 -0
- package/dist/server/RuleForMatching.js.map +1 -0
- package/dist/server/RuleSubject.d.ts +10 -0
- package/dist/server/RuleSubject.d.ts.map +1 -0
- package/dist/server/RuleSubject.js +2 -0
- package/dist/server/RuleSubject.js.map +1 -0
- package/dist/server/RunAsPlugin.d.ts +9 -0
- package/dist/server/RunAsPlugin.d.ts.map +1 -0
- package/dist/server/RunAsPlugin.js +2 -0
- package/dist/server/RunAsPlugin.js.map +1 -0
- package/dist/server/index.d.ts +30 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +3 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/isUuid.d.ts +18 -0
- package/dist/server/isUuid.d.ts.map +1 -0
- package/dist/server/isUuid.js +26 -0
- package/dist/server/isUuid.js.map +1 -0
- package/package.json +13 -1
- package/dist/recurrence/calendar.d.ts.map +0 -1
- package/dist/recurrence/calendar.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../src/isolated/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAgBxC,oDAAoD;AACpD,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAA;AACnC,mEAAmE;AACnE,MAAM,CAAC,MAAM,mBAAmB,GAAG,OAAO,CAAA;AAC1C,iDAAiD;AACjD,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;AACnC,yDAAyD;AACzD,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAA;AAIpC,MAAM,KAAK,GAAG,CAAC,CAAU,EAAY,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;AAChG,MAAM,IAAI,GAAG,CAAC,CAAU,EAAe,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC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AAC,CAAC,IAAI,CAAA;IAC5H,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,WAAW,EAAE,CAAC;QACjC,MAAM,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,CAAA;QAC3B,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAK,CAAe,CAAC,KAAK,CAAC,IAAI,CAAC;YACrD,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,CAAa,EAAE,CAAC,CAAC,CAAC,IAAI,CAAA;IAC5D,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Capabilities beyond table access that a plugin may ask the host for.
|
|
3
3
|
*
|
|
4
|
+
* The names are reserved. A host that cannot enforce a permission refuses a
|
|
5
|
+
* manifest that declares it, with a message naming it, rather than loading the
|
|
6
|
+
* plugin and ignoring the declaration. The Wicker Money host enforces none of
|
|
7
|
+
* these yet, so a manifest that lists one does not load.
|
|
8
|
+
*
|
|
4
9
|
* - `network:outbound` - make outgoing network requests.
|
|
5
10
|
* - `schedule:daily` - run work once a day.
|
|
6
11
|
* - `notify` - send the user notifications.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PERMISSIONS.d.ts","sourceRoot":"","sources":["../../src/manifest/PERMISSIONS.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"PERMISSIONS.d.ts","sourceRoot":"","sources":["../../src/manifest/PERMISSIONS.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,WAAW,2DAA4D,CAAA"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Capabilities beyond table access that a plugin may ask the host for.
|
|
3
3
|
*
|
|
4
|
+
* The names are reserved. A host that cannot enforce a permission refuses a
|
|
5
|
+
* manifest that declares it, with a message naming it, rather than loading the
|
|
6
|
+
* plugin and ignoring the declaration. The Wicker Money host enforces none of
|
|
7
|
+
* these yet, so a manifest that lists one does not load.
|
|
8
|
+
*
|
|
4
9
|
* - `network:outbound` - make outgoing network requests.
|
|
5
10
|
* - `schedule:daily` - run work once a day.
|
|
6
11
|
* - `notify` - send the user notifications.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PERMISSIONS.js","sourceRoot":"","sources":["../../src/manifest/PERMISSIONS.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"PERMISSIONS.js","sourceRoot":"","sources":["../../src/manifest/PERMISSIONS.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,kBAAkB,EAAE,gBAAgB,EAAE,QAAQ,CAAU,CAAA"}
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* A same-origin path is always allowed: it is served by the host itself. An
|
|
5
5
|
* `https:` URL is allowed only when its origin is in `allowedOrigins`, which is
|
|
6
|
-
* empty by default (same-origin only).
|
|
6
|
+
* empty by default (same-origin only). An allowlisted origin is fully trusted:
|
|
7
|
+
* its code runs in the host's origin with the user's full API access.
|
|
7
8
|
*
|
|
8
9
|
* Run by the host when a manifest is registered, after `parseManifest` has
|
|
9
10
|
* checked the entry's shape.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkRemoteEntry.d.ts","sourceRoot":"","sources":["../../src/manifest/checkRemoteEntry.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"checkRemoteEntry.d.ts","sourceRoot":"","sources":["../../src/manifest/checkRemoteEntry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,MAAM,EACnB,cAAc,GAAE,SAAS,MAAM,EAAO,GACrC,MAAM,GAAG,SAAS,CAUpB"}
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* A same-origin path is always allowed: it is served by the host itself. An
|
|
5
5
|
* `https:` URL is allowed only when its origin is in `allowedOrigins`, which is
|
|
6
|
-
* empty by default (same-origin only).
|
|
6
|
+
* empty by default (same-origin only). An allowlisted origin is fully trusted:
|
|
7
|
+
* its code runs in the host's origin with the user's full API access.
|
|
7
8
|
*
|
|
8
9
|
* Run by the host when a manifest is registered, after `parseManifest` has
|
|
9
10
|
* checked the entry's shape.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkRemoteEntry.js","sourceRoot":"","sources":["../../src/manifest/checkRemoteEntry.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"checkRemoteEntry.js","sourceRoot":"","sources":["../../src/manifest/checkRemoteEntry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,gBAAgB,CAC9B,WAAmB,EACnB,iBAAoC,EAAE;IAEtC,IAAI,WAAW,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,SAAS,CAAA;IACjD,IAAI,MAAc,CAAA;IAClB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,GAAG,CAAC,WAAW,CAAC,CAAC,MAAM,CAAA;IACtC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,gBAAgB,WAAW,sBAAsB,CAAA;IAC1D,CAAC;IACD,IAAI,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,SAAS,CAAA;IACrD,OAAO,uBAAuB,MAAM,gEAAgE,CAAA;AACtG,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decides whether a manifest's `integrity` pin is complete enough for a host to
|
|
3
|
+
* load its `remoteEntry`.
|
|
4
|
+
*
|
|
5
|
+
* A pin is a map from file to hash, and the host verifies each listed file
|
|
6
|
+
* before it is loaded (the browser checks it against the bytes it fetched). That
|
|
7
|
+
* only protects the entry if the entry is listed, so the entry's own file name
|
|
8
|
+
* must be a key. It also must be addressable by a path: an entry with a query
|
|
9
|
+
* string or a fragment could be fetched under a URL no key can name.
|
|
10
|
+
*
|
|
11
|
+
* Whether a manifest *needs* a pin is host policy, not manifest shape: a host
|
|
12
|
+
* requires one for every plugin it did not ship and for every entry that is not
|
|
13
|
+
* served by the host itself. Run this after `parseManifest` has checked the
|
|
14
|
+
* shapes, and only for a manifest the host requires a pin for.
|
|
15
|
+
*
|
|
16
|
+
* Files the entry loads that are not listed are not verified. List every file of
|
|
17
|
+
* the build to pin the whole plugin; see the plugin README for what a pin covers.
|
|
18
|
+
*
|
|
19
|
+
* @param remoteEntry - The manifest's `remoteEntry`.
|
|
20
|
+
* @param integrity - The manifest's `integrity` map, if it has one.
|
|
21
|
+
* @returns `undefined` when the pin can be used, otherwise a message saying why not.
|
|
22
|
+
* @example
|
|
23
|
+
* checkRemoteEntryIntegrity('/plugins/acme/remoteEntry.js', undefined)
|
|
24
|
+
* // "remoteEntry '/plugins/acme/remoteEntry.js' has no integrity pin ..."
|
|
25
|
+
*/
|
|
26
|
+
export declare function checkRemoteEntryIntegrity(remoteEntry: string, integrity: Readonly<Record<string, string>> | undefined): string | undefined;
|
|
27
|
+
//# sourceMappingURL=checkRemoteEntryIntegrity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkRemoteEntryIntegrity.d.ts","sourceRoot":"","sources":["../../src/manifest/checkRemoteEntryIntegrity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,GACtD,MAAM,GAAG,SAAS,CAkBpB"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decides whether a manifest's `integrity` pin is complete enough for a host to
|
|
3
|
+
* load its `remoteEntry`.
|
|
4
|
+
*
|
|
5
|
+
* A pin is a map from file to hash, and the host verifies each listed file
|
|
6
|
+
* before it is loaded (the browser checks it against the bytes it fetched). That
|
|
7
|
+
* only protects the entry if the entry is listed, so the entry's own file name
|
|
8
|
+
* must be a key. It also must be addressable by a path: an entry with a query
|
|
9
|
+
* string or a fragment could be fetched under a URL no key can name.
|
|
10
|
+
*
|
|
11
|
+
* Whether a manifest *needs* a pin is host policy, not manifest shape: a host
|
|
12
|
+
* requires one for every plugin it did not ship and for every entry that is not
|
|
13
|
+
* served by the host itself. Run this after `parseManifest` has checked the
|
|
14
|
+
* shapes, and only for a manifest the host requires a pin for.
|
|
15
|
+
*
|
|
16
|
+
* Files the entry loads that are not listed are not verified. List every file of
|
|
17
|
+
* the build to pin the whole plugin; see the plugin README for what a pin covers.
|
|
18
|
+
*
|
|
19
|
+
* @param remoteEntry - The manifest's `remoteEntry`.
|
|
20
|
+
* @param integrity - The manifest's `integrity` map, if it has one.
|
|
21
|
+
* @returns `undefined` when the pin can be used, otherwise a message saying why not.
|
|
22
|
+
* @example
|
|
23
|
+
* checkRemoteEntryIntegrity('/plugins/acme/remoteEntry.js', undefined)
|
|
24
|
+
* // "remoteEntry '/plugins/acme/remoteEntry.js' has no integrity pin ..."
|
|
25
|
+
*/
|
|
26
|
+
export function checkRemoteEntryIntegrity(remoteEntry, integrity) {
|
|
27
|
+
if (integrity === undefined || Object.keys(integrity).length === 0) {
|
|
28
|
+
return `remoteEntry '${remoteEntry}' has no integrity pin: list the entry file and the files it loads under "integrity" as sha384 Subresource Integrity values`;
|
|
29
|
+
}
|
|
30
|
+
let path;
|
|
31
|
+
try {
|
|
32
|
+
const url = new URL(remoteEntry, 'https://plugins.invalid');
|
|
33
|
+
if (url.search !== '' || url.hash !== '')
|
|
34
|
+
return `remoteEntry '${remoteEntry}' must not have a query string or a fragment when it is pinned`;
|
|
35
|
+
path = url.pathname;
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return `remoteEntry '${remoteEntry}' is not a valid URL`;
|
|
39
|
+
}
|
|
40
|
+
const file = path.slice(path.lastIndexOf('/') + 1);
|
|
41
|
+
// An own-property test: `'constructor' in {}` is true, and a file may be called that.
|
|
42
|
+
if (file === '' || !Object.hasOwn(integrity, file)) {
|
|
43
|
+
return `the integrity pin does not list the entry file '${file}', so a changed entry would still load`;
|
|
44
|
+
}
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=checkRemoteEntryIntegrity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkRemoteEntryIntegrity.js","sourceRoot":"","sources":["../../src/manifest/checkRemoteEntryIntegrity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,yBAAyB,CACvC,WAAmB,EACnB,SAAuD;IAEvD,IAAI,SAAS,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnE,OAAO,gBAAgB,WAAW,6HAA6H,CAAA;IACjK,CAAC;IACD,IAAI,IAAY,CAAA;IAChB,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,WAAW,EAAE,yBAAyB,CAAC,CAAA;QAC3D,IAAI,GAAG,CAAC,MAAM,KAAK,EAAE,IAAI,GAAG,CAAC,IAAI,KAAK,EAAE;YAAE,OAAO,gBAAgB,WAAW,gEAAgE,CAAA;QAC5I,IAAI,GAAG,GAAG,CAAC,QAAQ,CAAA;IACrB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,gBAAgB,WAAW,sBAAsB,CAAA;IAC1D,CAAC;IACD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;IAClD,sFAAsF;IACtF,IAAI,IAAI,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC;QACnD,OAAO,mDAAmD,IAAI,wCAAwC,CAAA;IACxG,CAAC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC"}
|
package/dist/manifest/index.d.ts
CHANGED
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
export { checkRemoteEntry } from './checkRemoteEntry.js';
|
|
2
|
+
export { checkRemoteEntryIntegrity } from './checkRemoteEntryIntegrity.js';
|
|
2
3
|
export { CORE_TABLES } from './CORE_TABLES.js';
|
|
3
4
|
export type { CoreTableName } from './CoreTableName.js';
|
|
4
5
|
export { federationName } from './federationName.js';
|
|
5
6
|
export { isCompatible } from './isCompatible.js';
|
|
6
7
|
export type { ManifestParseResult } from './ManifestParseResult.js';
|
|
7
|
-
export { pageContributionSchema } from './pageContributionSchema.js';
|
|
8
8
|
export type { PageContribution } from './PageContribution.js';
|
|
9
9
|
export { pagePath } from './pagePath.js';
|
|
10
|
+
export { parseIntegrity } from './parseIntegrity.js';
|
|
10
11
|
export { parseManifest } from './parseManifest.js';
|
|
11
12
|
export { PERMISSIONS } from './PERMISSIONS.js';
|
|
12
13
|
export type { Permission } from './Permission.js';
|
|
13
14
|
export type { PluginManifest } from './PluginManifest.js';
|
|
14
|
-
export { pluginManifestSchema } from './pluginManifestSchema.js';
|
|
15
|
-
export { remoteEntrySchema } from './remoteEntrySchema.js';
|
|
16
15
|
export { REMOTE_ENTRY_TYPE } from './REMOTE_ENTRY_TYPE.js';
|
|
17
16
|
export { SDK_MAJOR_VERSION } from './SDK_MAJOR_VERSION.js';
|
|
18
17
|
export type { TableGrant } from './TableGrant.js';
|
|
19
|
-
export { tableGrantSchema } from './tableGrantSchema.js';
|
|
20
18
|
export type { WidgetContribution } from './WidgetContribution.js';
|
|
21
|
-
export { widgetContributionSchema } from './widgetContributionSchema.js';
|
|
22
19
|
export { WIDGET_SIZES } from './WIDGET_SIZES.js';
|
|
23
20
|
export type { WidgetSize } from './WidgetSize.js';
|
|
24
21
|
export { WIDGET_SLOTS } from './WIDGET_SLOTS.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/manifest/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/manifest/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AACnE,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA"}
|
package/dist/manifest/index.js
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
export { checkRemoteEntry } from './checkRemoteEntry.js';
|
|
2
|
+
export { checkRemoteEntryIntegrity } from './checkRemoteEntryIntegrity.js';
|
|
2
3
|
export { CORE_TABLES } from './CORE_TABLES.js';
|
|
3
4
|
export { federationName } from './federationName.js';
|
|
4
5
|
export { isCompatible } from './isCompatible.js';
|
|
5
|
-
export { pageContributionSchema } from './pageContributionSchema.js';
|
|
6
6
|
export { pagePath } from './pagePath.js';
|
|
7
|
+
export { parseIntegrity } from './parseIntegrity.js';
|
|
7
8
|
export { parseManifest } from './parseManifest.js';
|
|
8
9
|
export { PERMISSIONS } from './PERMISSIONS.js';
|
|
9
|
-
export { pluginManifestSchema } from './pluginManifestSchema.js';
|
|
10
|
-
export { remoteEntrySchema } from './remoteEntrySchema.js';
|
|
11
10
|
export { REMOTE_ENTRY_TYPE } from './REMOTE_ENTRY_TYPE.js';
|
|
12
11
|
export { SDK_MAJOR_VERSION } from './SDK_MAJOR_VERSION.js';
|
|
13
|
-
export { tableGrantSchema } from './tableGrantSchema.js';
|
|
14
|
-
export { widgetContributionSchema } from './widgetContributionSchema.js';
|
|
15
12
|
export { WIDGET_SIZES } from './WIDGET_SIZES.js';
|
|
16
13
|
export { WIDGET_SLOTS } from './WIDGET_SLOTS.js';
|
|
17
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/manifest/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/manifest/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAG9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAG1D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* One Subresource Integrity value: a single hash, `sha256-`, `sha384-` or `sha512-`
|
|
4
|
+
* followed by the standard base64 of the digest at its exact length.
|
|
5
|
+
*
|
|
6
|
+
* Several hashes in one value, option suffixes (`?foo`) and the URL-safe base64
|
|
7
|
+
* alphabet are refused: browsers accept them, but a pin this strict is easy to
|
|
8
|
+
* state, to generate and to compare, and a host never needs the looser forms.
|
|
9
|
+
*/
|
|
10
|
+
export declare const SRI_VALUE: RegExp;
|
|
11
|
+
/**
|
|
12
|
+
* A file path relative to the directory of the plugin's `remoteEntry`: plain
|
|
13
|
+
* segments joined by `/`, each starting with a letter, digit or underscore (bundlers name virtual
|
|
14
|
+
* modules `_virtual_...`). That keeps out
|
|
15
|
+
* `..`, a leading `/`, backslashes, percent-encoding, query strings and empty
|
|
16
|
+
* segments, so a key always names a file inside the plugin's own directory.
|
|
17
|
+
*/
|
|
18
|
+
export declare const PINNED_PATH: RegExp;
|
|
19
|
+
/** The most files one pin may list. A federated build is tens of files; this is a bound, not a target. */
|
|
20
|
+
export declare const MAX_PINNED_FILES = 500;
|
|
21
|
+
/**
|
|
22
|
+
* Validates the shape of a manifest's `integrity` map: file path to SRI value.
|
|
23
|
+
*
|
|
24
|
+
* Shape only. Whether the entry file itself is in the map is checked by
|
|
25
|
+
* `checkRemoteEntryIntegrity`, because it depends on `remoteEntry`.
|
|
26
|
+
*/
|
|
27
|
+
export declare const integritySchema: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
28
|
+
//# sourceMappingURL=integritySchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integritySchema.d.ts","sourceRoot":"","sources":["../../src/manifest/integritySchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,QAAwF,CAAA;AAE9G;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,QAAoE,CAAA;AAE5F,0GAA0G;AAC1G,eAAO,MAAM,gBAAgB,MAAM,CAAA;AAEnC;;;;;GAKG;AACH,eAAO,MAAM,eAAe,uCAKsF,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* One Subresource Integrity value: a single hash, `sha256-`, `sha384-` or `sha512-`
|
|
4
|
+
* followed by the standard base64 of the digest at its exact length.
|
|
5
|
+
*
|
|
6
|
+
* Several hashes in one value, option suffixes (`?foo`) and the URL-safe base64
|
|
7
|
+
* alphabet are refused: browsers accept them, but a pin this strict is easy to
|
|
8
|
+
* state, to generate and to compare, and a host never needs the looser forms.
|
|
9
|
+
*/
|
|
10
|
+
export const SRI_VALUE = /^(?:sha256-[A-Za-z0-9+/]{43}=|sha384-[A-Za-z0-9+/]{64}|sha512-[A-Za-z0-9+/]{86}==)$/;
|
|
11
|
+
/**
|
|
12
|
+
* A file path relative to the directory of the plugin's `remoteEntry`: plain
|
|
13
|
+
* segments joined by `/`, each starting with a letter, digit or underscore (bundlers name virtual
|
|
14
|
+
* modules `_virtual_...`). That keeps out
|
|
15
|
+
* `..`, a leading `/`, backslashes, percent-encoding, query strings and empty
|
|
16
|
+
* segments, so a key always names a file inside the plugin's own directory.
|
|
17
|
+
*/
|
|
18
|
+
export const PINNED_PATH = /^[A-Za-z0-9_][A-Za-z0-9._-]*(?:\/[A-Za-z0-9_][A-Za-z0-9._-]*)*$/;
|
|
19
|
+
/** The most files one pin may list. A federated build is tens of files; this is a bound, not a target. */
|
|
20
|
+
export const MAX_PINNED_FILES = 500;
|
|
21
|
+
/**
|
|
22
|
+
* Validates the shape of a manifest's `integrity` map: file path to SRI value.
|
|
23
|
+
*
|
|
24
|
+
* Shape only. Whether the entry file itself is in the map is checked by
|
|
25
|
+
* `checkRemoteEntryIntegrity`, because it depends on `remoteEntry`.
|
|
26
|
+
*/
|
|
27
|
+
export const integritySchema = z
|
|
28
|
+
.record(z.string().max(200).regex(PINNED_PATH, 'Must be a plain path relative to the remoteEntry directory, such as assets/chunk-1a2b3c.js'), z.string().regex(SRI_VALUE, 'Must be one sha256-, sha384- or sha512- Subresource Integrity value (standard base64)'))
|
|
29
|
+
.refine((map) => Object.keys(map).length <= MAX_PINNED_FILES, `At most ${MAX_PINNED_FILES} files can be pinned`);
|
|
30
|
+
//# sourceMappingURL=integritySchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integritySchema.js","sourceRoot":"","sources":["../../src/manifest/integritySchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,qFAAqF,CAAA;AAE9G;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,iEAAiE,CAAA;AAE5F,0GAA0G;AAC1G,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;AAEnC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC;KAC7B,MAAM,CACL,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,4FAA4F,CAAC,EACpI,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,SAAS,EAAE,uFAAuF,CAAC,CACrH;KACA,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,IAAI,gBAAgB,EAAE,WAAW,gBAAgB,sBAAsB,CAAC,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validates an untrusted `integrity` value with the same rules the manifest
|
|
3
|
+
* uses, for code that receives a pin outside a manifest (the sandboxed frame
|
|
4
|
+
* reads it from its URL).
|
|
5
|
+
*
|
|
6
|
+
* @param value - The value to check, already decoded from JSON.
|
|
7
|
+
* @returns The pin, or a message saying what is wrong with it.
|
|
8
|
+
*/
|
|
9
|
+
export declare function parseIntegrity(value: unknown): {
|
|
10
|
+
readonly integrity: Readonly<Record<string, string>>;
|
|
11
|
+
} | {
|
|
12
|
+
readonly error: string;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=parseIntegrity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseIntegrity.d.ts","sourceRoot":"","sources":["../../src/manifest/parseIntegrity.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG;IAAE,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAIpI"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { integritySchema } from './integritySchema.js';
|
|
2
|
+
/**
|
|
3
|
+
* Validates an untrusted `integrity` value with the same rules the manifest
|
|
4
|
+
* uses, for code that receives a pin outside a manifest (the sandboxed frame
|
|
5
|
+
* reads it from its URL).
|
|
6
|
+
*
|
|
7
|
+
* @param value - The value to check, already decoded from JSON.
|
|
8
|
+
* @returns The pin, or a message saying what is wrong with it.
|
|
9
|
+
*/
|
|
10
|
+
export function parseIntegrity(value) {
|
|
11
|
+
const result = integritySchema.safeParse(value);
|
|
12
|
+
if (!result.success)
|
|
13
|
+
return { error: result.error.issues[0]?.message ?? 'The integrity pin is not valid.' };
|
|
14
|
+
return { integrity: result.data };
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=parseIntegrity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseIntegrity.js","sourceRoot":"","sources":["../../src/manifest/parseIntegrity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAEtD;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,MAAM,MAAM,GAAG,eAAe,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;IAC/C,IAAI,CAAC,MAAM,CAAC,OAAO;QAAE,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,IAAI,iCAAiC,EAAE,CAAA;IAC3G,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,CAAA;AACnC,CAAC"}
|
|
@@ -33,6 +33,8 @@ export declare const pluginManifestSchema: z.ZodObject<{
|
|
|
33
33
|
notify: "notify";
|
|
34
34
|
}>>>;
|
|
35
35
|
remoteEntry: z.ZodString;
|
|
36
|
+
integrity: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
37
|
+
isolated: z.ZodOptional<z.ZodBoolean>;
|
|
36
38
|
contributes: z.ZodDefault<z.ZodObject<{
|
|
37
39
|
pages: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
38
40
|
path: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pluginManifestSchema.d.ts","sourceRoot":"","sources":["../../src/manifest/pluginManifestSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"pluginManifestSchema.d.ts","sourceRoot":"","sources":["../../src/manifest/pluginManifestSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAQvB;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkG/B,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { integritySchema } from './integritySchema.js';
|
|
2
3
|
import { PERMISSIONS } from './PERMISSIONS.js';
|
|
3
4
|
import { pageContributionSchema } from './pageContributionSchema.js';
|
|
4
5
|
import { remoteEntrySchema } from './remoteEntrySchema.js';
|
|
@@ -23,7 +24,14 @@ export const pluginManifestSchema = z.object({
|
|
|
23
24
|
author: z.string().default(''),
|
|
24
25
|
/** Major version of the SDK the plugin was built against. */
|
|
25
26
|
sdkVersion: z.number().int().nonnegative(),
|
|
26
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Core tables the plugin needs, each with the access level requested.
|
|
29
|
+
* Defaults to none.
|
|
30
|
+
*
|
|
31
|
+
* Enforced by a per-plugin PostgreSQL role for the plugin's server-side code.
|
|
32
|
+
* It is a declaration and early feedback, not an enforced boundary, for the
|
|
33
|
+
* plugin's UI code, which runs fully trusted in the host origin.
|
|
34
|
+
*/
|
|
27
35
|
requiredTables: z.array(tableGrantSchema).default([]),
|
|
28
36
|
/** Capabilities beyond table access the plugin asks for. Defaults to none. */
|
|
29
37
|
permissions: z.array(z.enum(PERMISSIONS)).default([]),
|
|
@@ -31,11 +39,50 @@ export const pluginManifestSchema = z.object({
|
|
|
31
39
|
* URL of the Module Federation entry: a same-origin `/plugins/<folder>/...`
|
|
32
40
|
* path, or an `https:` URL whose origin the host has allowlisted.
|
|
33
41
|
*
|
|
42
|
+
* Whatever is loaded from here runs with full trust in the host's origin.
|
|
43
|
+
* Third-party plugin install is not supported yet; do not allowlist an
|
|
44
|
+
* origin you do not fully trust.
|
|
45
|
+
*
|
|
34
46
|
* The entry must be an ES module: the host registers every remote with
|
|
35
47
|
* `type: 'module'` and loads it with a dynamic `import()`, never a classic
|
|
36
48
|
* script tag.
|
|
37
49
|
*/
|
|
38
50
|
remoteEntry: remoteEntrySchema,
|
|
51
|
+
/**
|
|
52
|
+
* Subresource Integrity values for the files of the plugin's build, keyed by
|
|
53
|
+
* path relative to the directory of `remoteEntry` (the entry itself is
|
|
54
|
+
* `remoteEntry.js`, a chunk is `assets/chunk-1a2b3c.js`).
|
|
55
|
+
*
|
|
56
|
+
* A host verifies each listed file before the plugin's code runs and does not
|
|
57
|
+
* load a file whose bytes differ. It is how an operator vouches for one build
|
|
58
|
+
* of a plugin the image did not ship: a host requires it for every such plugin
|
|
59
|
+
* and for any entry it does not serve itself, and ignores it for a bundled
|
|
60
|
+
* plugin served from the image. Only listed files are verified; a file the
|
|
61
|
+
* entry loads that is not listed loads unchecked, so list the whole build.
|
|
62
|
+
* Stylesheets are not covered.
|
|
63
|
+
*
|
|
64
|
+
* The hash is only as trustworthy as where it came from: a manifest fetched
|
|
65
|
+
* from the same place as the code it pins proves nothing. Take it from the
|
|
66
|
+
* file you reviewed, not from the server that will serve it.
|
|
67
|
+
*
|
|
68
|
+
* Optional with no default, so existing manifests stay valid unchanged.
|
|
69
|
+
*/
|
|
70
|
+
integrity: integritySchema.optional(),
|
|
71
|
+
/**
|
|
72
|
+
* True if the plugin is built for the isolated runtime
|
|
73
|
+
* (`@wickermoney/plugin-sdk/isolated`): its modules run in a sandboxed frame
|
|
74
|
+
* and reach the host only through the message protocol.
|
|
75
|
+
*
|
|
76
|
+
* This says what the plugin was built for. It is not a grant and not a
|
|
77
|
+
* request for privilege: it can only move a plugin towards isolation. Which
|
|
78
|
+
* runtime a plugin actually gets is the host's decision, and the host never
|
|
79
|
+
* runs a plugin it did not ship in the page's own realm, whatever this says.
|
|
80
|
+
* Absent means `false`.
|
|
81
|
+
*
|
|
82
|
+
* Optional with no default, unlike the other fields, so existing manifests
|
|
83
|
+
* (and code that builds a `PluginManifest` by hand) stay valid unchanged.
|
|
84
|
+
*/
|
|
85
|
+
isolated: z.boolean().optional(),
|
|
39
86
|
/** What the plugin adds to the application. Defaults to nothing. */
|
|
40
87
|
contributes: z
|
|
41
88
|
.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pluginManifestSchema.js","sourceRoot":"","sources":["../../src/manifest/pluginManifestSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,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C,OAAO,CAAC,EAAE,CAAC;QAClD,kDAAkD;QAClD,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;QACtD;;;;;WAKG;QACH,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;QACrC;;;;;;;;WAQG;QACH,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;KACtC,CAAC;SACD,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;CAC3E,CAAC,CAAA"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Validates one entry of a manifest's `requiredTables`: a core table and the access level requested on it.
|
|
4
|
+
*
|
|
5
|
+
* The grant becomes a database privilege for the plugin's server-side code. It
|
|
6
|
+
* does not restrict the plugin's UI code, which runs fully trusted in the host origin.
|
|
7
|
+
*/
|
|
3
8
|
export declare const tableGrantSchema: z.ZodObject<{
|
|
4
9
|
table: z.ZodEnum<{
|
|
5
10
|
accounts: "accounts";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tableGrantSchema.d.ts","sourceRoot":"","sources":["../../src/manifest/tableGrantSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB
|
|
1
|
+
{"version":3,"file":"tableGrantSchema.d.ts","sourceRoot":"","sources":["../../src/manifest/tableGrantSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;iBAK3B,CAAA"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { CORE_TABLES } from './CORE_TABLES.js';
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Validates one entry of a manifest's `requiredTables`: a core table and the access level requested on it.
|
|
5
|
+
*
|
|
6
|
+
* The grant becomes a database privilege for the plugin's server-side code. It
|
|
7
|
+
* does not restrict the plugin's UI code, which runs fully trusted in the host origin.
|
|
8
|
+
*/
|
|
4
9
|
export const tableGrantSchema = z.object({
|
|
5
10
|
/** The core table the plugin wants to reach. */
|
|
6
11
|
table: z.enum(CORE_TABLES),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tableGrantSchema.js","sourceRoot":"","sources":["../../src/manifest/tableGrantSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C
|
|
1
|
+
{"version":3,"file":"tableGrantSchema.js","sourceRoot":"","sources":["../../src/manifest/tableGrantSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAE9C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,gDAAgD;IAChD,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;IAC1B,+FAA+F;IAC/F,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC,CAAC,CAAA"}
|
package/dist/money/index.d.ts
CHANGED
|
@@ -22,6 +22,10 @@
|
|
|
22
22
|
*
|
|
23
23
|
* Pure and dependency-free, so it is safe in the browser and in Node. For
|
|
24
24
|
* showing an amount to a person, use the host's `ctx.formatMoney`.
|
|
25
|
+
*
|
|
26
|
+
* Stability: `@stable`. Plugins, the API and the web app all use it.
|
|
27
|
+
*
|
|
28
|
+
* @stable
|
|
25
29
|
*/
|
|
26
30
|
export type { Money } from './Money.js';
|
|
27
31
|
export { MONEY_SCALE } from './MONEY_SCALE.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/money/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/money/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,YAAY,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA"}
|
package/dist/money/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/money/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/money/index.ts"],"names":[],"mappings":"AA8BA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA"}
|
|
@@ -9,10 +9,18 @@
|
|
|
9
9
|
* zone. The caller works out the user's today once, in their zone, and passes
|
|
10
10
|
* it in. Ranges are half-open (`from` inclusive, `to` exclusive), like
|
|
11
11
|
* `DashboardRange`.
|
|
12
|
+
*
|
|
13
|
+
* Stability: `@experimental`. Only the host consumes the projections today
|
|
14
|
+
* (the API and the web app), and the item and schedule shapes mirror the
|
|
15
|
+
* host's recurring-item rows. They may change in any pre-1.0 minor release
|
|
16
|
+
* until a plugin needs them and the shape is settled.
|
|
17
|
+
*
|
|
18
|
+
* @experimental
|
|
12
19
|
*/
|
|
13
20
|
export { DEFAULT_SEMIMONTHLY_DAYS, RECURRENCE_FREQUENCIES } from './types.js';
|
|
14
21
|
export type { DailyBalance, FlowTotals, OccurrenceOverride, RecurrenceFrequency, RecurrenceSchedule, RecurringItem, RecurringLeg, ScheduledOccurrence, } from './types.js';
|
|
15
22
|
export { nextOccurrence, occurrences } from './schedule.js';
|
|
16
23
|
export { nextScheduledOccurrence, scheduledOccurrences } from './scheduled.js';
|
|
17
24
|
export { dailyBalances, flowTotals, monthlyEquivalent, nextPayday, } from './projection.js';
|
|
25
|
+
export { addDays, addMonths } from '../date/index.js';
|
|
18
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/recurrence/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/recurrence/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAC7E,YAAY,EACV,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,aAAa,EACpG,YAAY,EAAE,mBAAmB,GAClC,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAC9E,OAAO,EACL,aAAa,EAAE,UAAU,EAAE,iBAAiB,EAAE,UAAU,GACzD,MAAM,iBAAiB,CAAA;AAGxB,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA"}
|
package/dist/recurrence/index.js
CHANGED
|
@@ -9,9 +9,19 @@
|
|
|
9
9
|
* zone. The caller works out the user's today once, in their zone, and passes
|
|
10
10
|
* it in. Ranges are half-open (`from` inclusive, `to` exclusive), like
|
|
11
11
|
* `DashboardRange`.
|
|
12
|
+
*
|
|
13
|
+
* Stability: `@experimental`. Only the host consumes the projections today
|
|
14
|
+
* (the API and the web app), and the item and schedule shapes mirror the
|
|
15
|
+
* host's recurring-item rows. They may change in any pre-1.0 minor release
|
|
16
|
+
* until a plugin needs them and the shape is settled.
|
|
17
|
+
*
|
|
18
|
+
* @experimental
|
|
12
19
|
*/
|
|
13
20
|
export { DEFAULT_SEMIMONTHLY_DAYS, RECURRENCE_FREQUENCIES } from './types.js';
|
|
14
21
|
export { nextOccurrence, occurrences } from './schedule.js';
|
|
15
22
|
export { nextScheduledOccurrence, scheduledOccurrences } from './scheduled.js';
|
|
16
23
|
export { dailyBalances, flowTotals, monthlyEquivalent, nextPayday, } from './projection.js';
|
|
24
|
+
// Kept so imports that predate the `./date` entry point keep working. Prefer
|
|
25
|
+
// `@wickermoney/plugin-sdk/date`, which is stable.
|
|
26
|
+
export { addDays, addMonths } from '../date/index.js';
|
|
17
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/recurrence/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/recurrence/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAK7E,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAC9E,OAAO,EACL,aAAa,EAAE,UAAU,EAAE,iBAAiB,EAAE,UAAU,GACzD,MAAM,iBAAiB,CAAA;AACxB,6EAA6E;AAC7E,mDAAmD;AACnD,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fromDayNumber, toDayNumber } from '
|
|
1
|
+
import { fromDayNumber, toDayNumber } from '../date/calendar.js';
|
|
2
2
|
import { divideUnits } from '../money/divideUnits.js';
|
|
3
3
|
import { moneyToUnits } from '../money/moneyToUnits.js';
|
|
4
4
|
import { unitsToMoney } from '../money/unitsToMoney.js';
|