@openbrf/plugin-sdk 0.0.0-stage → 1.2.0
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/LICENSE +661 -0
- package/LICENSE-EXCEPTION.md +28 -0
- package/README.md +94 -2
- package/dist/abort-signal.d.ts +23 -0
- package/dist/abort-signal.d.ts.map +1 -0
- package/dist/abort-signal.js +2 -0
- package/dist/abort-signal.js.map +1 -0
- package/dist/action-refusal.d.ts +101 -0
- package/dist/action-refusal.d.ts.map +1 -0
- package/dist/action-refusal.js +96 -0
- package/dist/action-refusal.js.map +1 -0
- package/dist/action-schema.d.ts +42 -0
- package/dist/action-schema.d.ts.map +1 -0
- package/dist/action-schema.js +67 -0
- package/dist/action-schema.js.map +1 -0
- package/dist/actions.d.ts +287 -0
- package/dist/actions.d.ts.map +1 -0
- package/dist/actions.js +68 -0
- package/dist/actions.js.map +1 -0
- package/dist/api-version.d.ts +23 -0
- package/dist/api-version.d.ts.map +1 -0
- package/dist/api-version.js +27 -0
- package/dist/api-version.js.map +1 -0
- package/dist/blocks.d.ts +310 -0
- package/dist/blocks.d.ts.map +1 -0
- package/dist/blocks.js +185 -0
- package/dist/blocks.js.map +1 -0
- package/dist/catalog.d.ts +707 -0
- package/dist/catalog.d.ts.map +1 -0
- package/dist/catalog.js +567 -0
- package/dist/catalog.js.map +1 -0
- package/dist/define-plugin.d.ts +14 -0
- package/dist/define-plugin.d.ts.map +1 -0
- package/dist/define-plugin.js +15 -0
- package/dist/define-plugin.js.map +1 -0
- package/dist/entitlements.d.ts +117 -0
- package/dist/entitlements.d.ts.map +1 -0
- package/dist/entitlements.js +62 -0
- package/dist/entitlements.js.map +1 -0
- package/dist/extensions.d.ts +183 -0
- package/dist/extensions.d.ts.map +1 -0
- package/dist/extensions.js +67 -0
- package/dist/extensions.js.map +1 -0
- package/dist/finances.d.ts +294 -0
- package/dist/finances.d.ts.map +1 -0
- package/dist/finances.js +56 -0
- package/dist/finances.js.map +1 -0
- package/dist/findings.d.ts +156 -0
- package/dist/findings.d.ts.map +1 -0
- package/dist/findings.js +146 -0
- package/dist/findings.js.map +1 -0
- package/dist/host.d.ts +827 -0
- package/dist/host.d.ts.map +1 -0
- package/dist/host.js +80 -0
- package/dist/host.js.map +1 -0
- package/dist/imports.d.ts +104 -0
- package/dist/imports.d.ts.map +1 -0
- package/dist/imports.js +70 -0
- package/dist/imports.js.map +1 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -0
- package/dist/integrity.d.ts +38 -0
- package/dist/integrity.d.ts.map +1 -0
- package/dist/integrity.js +105 -0
- package/dist/integrity.js.map +1 -0
- package/dist/localized-text.d.ts +18 -0
- package/dist/localized-text.d.ts.map +1 -0
- package/dist/localized-text.js +17 -0
- package/dist/localized-text.js.map +1 -0
- package/dist/manifest.d.ts +1122 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +1118 -0
- package/dist/manifest.js.map +1 -0
- package/dist/module.d.ts +35 -0
- package/dist/module.d.ts.map +1 -0
- package/dist/module.js +2 -0
- package/dist/module.js.map +1 -0
- package/dist/package-check.d.ts +66 -0
- package/dist/package-check.d.ts.map +1 -0
- package/dist/package-check.js +755 -0
- package/dist/package-check.js.map +1 -0
- package/dist/permissions.d.ts +224 -0
- package/dist/permissions.d.ts.map +1 -0
- package/dist/permissions.js +277 -0
- package/dist/permissions.js.map +1 -0
- package/dist/recipients.d.ts +139 -0
- package/dist/recipients.d.ts.map +1 -0
- package/dist/recipients.js +223 -0
- package/dist/recipients.js.map +1 -0
- package/dist/records.d.ts +130 -0
- package/dist/records.d.ts.map +1 -0
- package/dist/records.js +85 -0
- package/dist/records.js.map +1 -0
- package/dist/require-capability.d.ts +37 -0
- package/dist/require-capability.d.ts.map +1 -0
- package/dist/require-capability.js +88 -0
- package/dist/require-capability.js.map +1 -0
- package/dist/settings-schema.d.ts +130 -0
- package/dist/settings-schema.d.ts.map +1 -0
- package/dist/settings-schema.js +272 -0
- package/dist/settings-schema.js.map +1 -0
- package/dist/standard-schema.d.ts +43 -0
- package/dist/standard-schema.d.ts.map +1 -0
- package/dist/standard-schema.js +2 -0
- package/dist/standard-schema.js.map +1 -0
- package/package.json +55 -3
- package/src/abort-signal.ts +22 -0
- package/src/action-refusal.ts +178 -0
- package/src/action-schema.ts +89 -0
- package/src/actions.ts +344 -0
- package/src/api-version.ts +28 -0
- package/src/blocks.ts +289 -0
- package/src/catalog.ts +679 -0
- package/src/define-plugin.ts +18 -0
- package/src/entitlements.ts +150 -0
- package/src/extensions.ts +212 -0
- package/src/finances.ts +317 -0
- package/src/findings.ts +163 -0
- package/src/host.ts +894 -0
- package/src/imports.ts +135 -0
- package/src/index.ts +316 -0
- package/src/integrity.ts +125 -0
- package/src/localized-text.ts +19 -0
- package/src/manifest.ts +1412 -0
- package/src/module.ts +38 -0
- package/src/package-check.ts +894 -0
- package/src/permissions.ts +295 -0
- package/src/recipients.ts +294 -0
- package/src/records.ts +172 -0
- package/src/require-capability.ts +106 -0
- package/src/settings-schema.ts +334 -0
- package/src/standard-schema.ts +39 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EACV,gBAAgB,EAChB,0BAA0B,EAC3B,MAAM,kBAAkB,CAAC;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AOG;IACH,YAAY,CAAC,EAAE,kBAAkB,CAAC;CACnC;AAED;;;;;;;GAOG;AACH,qBAAa,0BAA2B,SAAQ,KAAK;IAEjD,QAAQ,CAAC,QAAQ,EAAE,MAAM;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM;IAFzB,YACW,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EAIxB;CACF"}
|
package/dist/host.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The host services a plugin receives.
|
|
3
|
+
*
|
|
4
|
+
* Every service is present on the object whether or not the plugin declared
|
|
5
|
+
* the permission it needs; the ones it did not declare throw
|
|
6
|
+
* PluginPermissionError on use. Handing out nulls instead would push a
|
|
7
|
+
* null-check into every call site of a plugin that did declare the permission,
|
|
8
|
+
* for the sake of a case the plugin author has already ruled out by writing
|
|
9
|
+
* the manifest. `permissions` is on the object for the plugin that genuinely
|
|
10
|
+
* wants to degrade rather than fail.
|
|
11
|
+
*/
|
|
12
|
+
export class PluginPermissionError extends Error {
|
|
13
|
+
pluginId;
|
|
14
|
+
permission;
|
|
15
|
+
constructor(pluginId, permission) {
|
|
16
|
+
super(`Plugin "${pluginId}" used a service requiring the "${permission}" ` +
|
|
17
|
+
`permission, which its manifest does not declare.`);
|
|
18
|
+
this.pluginId = pluginId;
|
|
19
|
+
this.permission = permission;
|
|
20
|
+
this.name = "PluginPermissionError";
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/** Why `host.recipients.fetch` sent nothing, or got no answer. */
|
|
24
|
+
export const PLUGIN_RECIPIENT_ERROR_CODES = [
|
|
25
|
+
/** The manifest declares no recipient by that id. */
|
|
26
|
+
"recipient-not-declared",
|
|
27
|
+
/** The path is not a path on the recipient's origin. */
|
|
28
|
+
"path-refused",
|
|
29
|
+
/** The method, a header, the body or the timeout is not one the host sends. */
|
|
30
|
+
"request-refused",
|
|
31
|
+
/** The disclosure names a category the recipient is not declared to receive. */
|
|
32
|
+
"personal-data-not-declared",
|
|
33
|
+
/** The disclosure names a person the plugin may not send data about. */
|
|
34
|
+
"subject-refused",
|
|
35
|
+
/** The origin's host is not an address this instance may connect to. */
|
|
36
|
+
"address-refused",
|
|
37
|
+
/** The recipient redirected to another origin, or more than five times. */
|
|
38
|
+
"redirect-refused",
|
|
39
|
+
/** No answer: the connection failed or the deadline passed. */
|
|
40
|
+
"unreachable",
|
|
41
|
+
/** The answer's body was longer than 16 MiB. */
|
|
42
|
+
"response-too-large",
|
|
43
|
+
];
|
|
44
|
+
/**
|
|
45
|
+
* A request to a recipient the host refused or could not complete.
|
|
46
|
+
*
|
|
47
|
+
* The message never repeats the path, a header or the body: a plugin may put
|
|
48
|
+
* a resident's name in any of them, and the error ends up in the log.
|
|
49
|
+
*/
|
|
50
|
+
export class PluginRecipientError extends Error {
|
|
51
|
+
pluginId;
|
|
52
|
+
recipient;
|
|
53
|
+
code;
|
|
54
|
+
constructor(pluginId, recipient, code) {
|
|
55
|
+
super(`Plugin "${pluginId}" could not reach its recipient "${recipient}": ${code}.`);
|
|
56
|
+
this.pluginId = pluginId;
|
|
57
|
+
this.recipient = recipient;
|
|
58
|
+
this.code = code;
|
|
59
|
+
this.name = "PluginRecipientError";
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* A host service was used before the application finished starting, or after
|
|
64
|
+
* the plugin stopped serving.
|
|
65
|
+
*
|
|
66
|
+
* Both cases are the plugin reaching for the host at a moment the host cannot
|
|
67
|
+
* answer for: the first is work done in a constructor that belongs in
|
|
68
|
+
* `onModuleInit`, the second is a plugin the board switched off.
|
|
69
|
+
*/
|
|
70
|
+
export class PluginHostUnavailableError extends Error {
|
|
71
|
+
pluginId;
|
|
72
|
+
detail;
|
|
73
|
+
constructor(pluginId, detail) {
|
|
74
|
+
super(`Plugin "${pluginId}" used a host service ${detail}`);
|
|
75
|
+
this.pluginId = pluginId;
|
|
76
|
+
this.detail = detail;
|
|
77
|
+
this.name = "PluginHostUnavailableError";
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=host.js.map
|
package/dist/host.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.js","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAaA;;;;;;;;;;GAUG;AAEH,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IAEnC,QAAQ;IACR,UAAU;IAFrB,YACW,QAAgB,EAChB,UAA4B;QAErC,KAAK,CACH,WAAW,QAAQ,mCAAmC,UAAU,IAAI;YAClE,kDAAkD,CACrD,CAAC;wBANO,QAAQ;0BACR,UAAU;QAMnB,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;IACtC,CAAC;CACF;AAskBD,kEAAkE;AAClE,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,qDAAqD;IACrD,wBAAwB;IACxB,wDAAwD;IACxD,cAAc;IACd,+EAA+E;IAC/E,iBAAiB;IACjB,gFAAgF;IAChF,4BAA4B;IAC5B,wEAAwE;IACxE,iBAAiB;IACjB,wEAAwE;IACxE,iBAAiB;IACjB,2EAA2E;IAC3E,kBAAkB;IAClB,+DAA+D;IAC/D,aAAa;IACb,gDAAgD;IAChD,oBAAoB;CACZ,CAAC;AAKX;;;;;GAKG;AACH,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAElC,QAAQ;IACR,SAAS;IACT,IAAI;IAHf,YACW,QAAgB,EAChB,SAAiB,EACjB,IAA8B;QAEvC,KAAK,CACH,WAAW,QAAQ,oCAAoC,SAAS,MAAM,IAAI,GAAG,CAC9E,CAAC;wBANO,QAAQ;yBACR,SAAS;oBACT,IAAI;QAKb,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AAyND;;;;;;;GAOG;AACH,MAAM,OAAO,0BAA2B,SAAQ,KAAK;IAExC,QAAQ;IACR,MAAM;IAFjB,YACW,QAAgB,EAChB,MAAc;QAEvB,KAAK,CAAC,WAAW,QAAQ,yBAAyB,MAAM,EAAE,CAAC,CAAC;wBAHnD,QAAQ;sBACR,MAAM;QAGf,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC;IAC3C,CAAC;CACF"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handing a member list to the board (ADR 0043).
|
|
3
|
+
*
|
|
4
|
+
* A plugin that brings the association's member list in from elsewhere - a
|
|
5
|
+
* file mailed to an address, an export fetched from the economic manager's
|
|
6
|
+
* system - hands it to the core here, and the core holds it as an **import
|
|
7
|
+
* proposal**: an import session on the core's own import screen, marked as
|
|
8
|
+
* proposed by the plugin, which a board member previews, decides and applies,
|
|
9
|
+
* or rejects. The plugin never applies anything, and it learns nothing about
|
|
10
|
+
* what the file would do: each of those is a read of the register, and the
|
|
11
|
+
* permission behind this, addressBook:proposeImport, grants none.
|
|
12
|
+
*/
|
|
13
|
+
/** The file a plugin hands over. */
|
|
14
|
+
export interface ImportProposalFile {
|
|
15
|
+
/** Shown to the board beside the proposal. 1 to 255 characters. */
|
|
16
|
+
fileName: string;
|
|
17
|
+
/**
|
|
18
|
+
* The file, CSV or XLSX, which the core parses exactly as it parses an
|
|
19
|
+
* upload, with the same limits. A source that gives JSON is written out as
|
|
20
|
+
* CSV first.
|
|
21
|
+
*/
|
|
22
|
+
content: Uint8Array;
|
|
23
|
+
/**
|
|
24
|
+
* Who sent the file, as the source reports it: the address an email came
|
|
25
|
+
* from. Absent for a source that has no sender, such as a fetch from a
|
|
26
|
+
* manager's system. A claim, not a verified identity, and shown to the board
|
|
27
|
+
* as one. At most 320 characters.
|
|
28
|
+
*/
|
|
29
|
+
sender?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface ImportProposalReceipt {
|
|
32
|
+
proposalId: string;
|
|
33
|
+
/** Data rows read from the file, below its column titles. */
|
|
34
|
+
rowCount: number;
|
|
35
|
+
/** ISO 8601. When the proposal expires if nobody decides it. */
|
|
36
|
+
expiresAt: string;
|
|
37
|
+
}
|
|
38
|
+
/** Where one of the plugin's own proposals stands. */
|
|
39
|
+
export declare const IMPORT_PROPOSAL_STATES: readonly [
|
|
40
|
+
/** Waiting for the board. */
|
|
41
|
+
"pending",
|
|
42
|
+
/** A board member started the import, and it is being written. */
|
|
43
|
+
"applying", "applied",
|
|
44
|
+
/** The import a board member started stopped before the end. */
|
|
45
|
+
"failed", "rejected",
|
|
46
|
+
/** A newer proposal from the same plugin replaced it. */
|
|
47
|
+
"superseded",
|
|
48
|
+
/** Nobody decided it in time. */
|
|
49
|
+
"expired",
|
|
50
|
+
/** The plugin took it back. */
|
|
51
|
+
"withdrawn",
|
|
52
|
+
/** Not one of this plugin's proposals, or no longer kept. */
|
|
53
|
+
"unknown"];
|
|
54
|
+
export type ImportProposalState = (typeof IMPORT_PROPOSAL_STATES)[number];
|
|
55
|
+
export interface ImportProposalStatus {
|
|
56
|
+
state: ImportProposalState;
|
|
57
|
+
/** ISO 8601. When it reached the state it is in. Null while pending or unknown. */
|
|
58
|
+
decidedAt: string | null;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Why a file was refused. Nothing was stored for it.
|
|
62
|
+
*
|
|
63
|
+
* The reasons an upload is refused for, and four of a proposal's own:
|
|
64
|
+
* `file-unchanged` when the rows are those of the last file from this plugin
|
|
65
|
+
* the board applied or of the one still pending, `sender-too-long`,
|
|
66
|
+
* `sender-invalid` when the sender is neither text nor left out, and
|
|
67
|
+
* `file-name-invalid`. Treat a reason you do not know as a refusal all the
|
|
68
|
+
* same: a later core may add one.
|
|
69
|
+
*/
|
|
70
|
+
export declare const IMPORT_PROPOSAL_REFUSAL_REASONS: readonly ["file-name-invalid", "file-empty", "header-row-missing", "file-too-large", "file-unreadable", "file-mixed-encoding", "too-many-rows", "too-many-columns", "cell-too-long", "unterminated-quote", "workbook-too-large", "file-unchanged", "sender-too-long", "sender-invalid"];
|
|
71
|
+
export type ImportProposalRefusalReason = (typeof IMPORT_PROPOSAL_REFUSAL_REASONS)[number];
|
|
72
|
+
/**
|
|
73
|
+
* `host.imports.propose` refused the file. Carries the reason and nothing from
|
|
74
|
+
* the file, so it can be logged as it is.
|
|
75
|
+
*/
|
|
76
|
+
export declare class ImportProposalRefusedError extends Error {
|
|
77
|
+
readonly reason: string;
|
|
78
|
+
constructor(reason: string);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Proposing imports. Requires addressBook:proposeImport.
|
|
82
|
+
*
|
|
83
|
+
* A plugin has at most one pending proposal: a new one replaces the one
|
|
84
|
+
* before, which becomes `superseded`. A proposal nobody decides expires after
|
|
85
|
+
* 14 days, and a decided one stays answerable by `status` for 90 days.
|
|
86
|
+
*
|
|
87
|
+
* What the plugin must not keep, which the catalog review checks: the file,
|
|
88
|
+
* or any part of it, is never passed to `host.jobs`, written to the log, the
|
|
89
|
+
* settings, any store the host offers or an error the plugin throws, and the
|
|
90
|
+
* plugin drops its copy once `propose` has answered. The sender likewise.
|
|
91
|
+
*/
|
|
92
|
+
export interface PluginImports {
|
|
93
|
+
/**
|
|
94
|
+
* Hands a member list to the core for the board to review. Resolves once the
|
|
95
|
+
* core has parsed the file and stored the proposal, or rejects with
|
|
96
|
+
* ImportProposalRefusedError and stores nothing.
|
|
97
|
+
*/
|
|
98
|
+
propose(file: ImportProposalFile): Promise<ImportProposalReceipt>;
|
|
99
|
+
/** Where one of this plugin's own proposals stands. */
|
|
100
|
+
status(proposalId: string): Promise<ImportProposalStatus>;
|
|
101
|
+
/** Withdraws this plugin's pending proposal. True when there was one. */
|
|
102
|
+
withdraw(proposalId: string): Promise<boolean>;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=imports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imports.d.ts","sourceRoot":"","sources":["../src/imports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,oCAAoC;AACpC,MAAM,WAAW,kBAAkB;IACjC,mEAAmE;I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WG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,OAAO,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAElE,uDAAuD;IACvD,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAE1D,yEAAyE;IACzE,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAChD"}
|
package/dist/imports.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handing a member list to the board (ADR 0043).
|
|
3
|
+
*
|
|
4
|
+
* A plugin that brings the association's member list in from elsewhere - a
|
|
5
|
+
* file mailed to an address, an export fetched from the economic manager's
|
|
6
|
+
* system - hands it to the core here, and the core holds it as an **import
|
|
7
|
+
* proposal**: an import session on the core's own import screen, marked as
|
|
8
|
+
* proposed by the plugin, which a board member previews, decides and applies,
|
|
9
|
+
* or rejects. The plugin never applies anything, and it learns nothing about
|
|
10
|
+
* what the file would do: each of those is a read of the register, and the
|
|
11
|
+
* permission behind this, addressBook:proposeImport, grants none.
|
|
12
|
+
*/
|
|
13
|
+
/** Where one of the plugin's own proposals stands. */
|
|
14
|
+
export const IMPORT_PROPOSAL_STATES = [
|
|
15
|
+
/** Waiting for the board. */
|
|
16
|
+
"pending",
|
|
17
|
+
/** A board member started the import, and it is being written. */
|
|
18
|
+
"applying",
|
|
19
|
+
"applied",
|
|
20
|
+
/** The import a board member started stopped before the end. */
|
|
21
|
+
"failed",
|
|
22
|
+
"rejected",
|
|
23
|
+
/** A newer proposal from the same plugin replaced it. */
|
|
24
|
+
"superseded",
|
|
25
|
+
/** Nobody decided it in time. */
|
|
26
|
+
"expired",
|
|
27
|
+
/** The plugin took it back. */
|
|
28
|
+
"withdrawn",
|
|
29
|
+
/** Not one of this plugin's proposals, or no longer kept. */
|
|
30
|
+
"unknown",
|
|
31
|
+
];
|
|
32
|
+
/**
|
|
33
|
+
* Why a file was refused. Nothing was stored for it.
|
|
34
|
+
*
|
|
35
|
+
* The reasons an upload is refused for, and four of a proposal's own:
|
|
36
|
+
* `file-unchanged` when the rows are those of the last file from this plugin
|
|
37
|
+
* the board applied or of the one still pending, `sender-too-long`,
|
|
38
|
+
* `sender-invalid` when the sender is neither text nor left out, and
|
|
39
|
+
* `file-name-invalid`. Treat a reason you do not know as a refusal all the
|
|
40
|
+
* same: a later core may add one.
|
|
41
|
+
*/
|
|
42
|
+
export const IMPORT_PROPOSAL_REFUSAL_REASONS = [
|
|
43
|
+
"file-name-invalid",
|
|
44
|
+
"file-empty",
|
|
45
|
+
"header-row-missing",
|
|
46
|
+
"file-too-large",
|
|
47
|
+
"file-unreadable",
|
|
48
|
+
"file-mixed-encoding",
|
|
49
|
+
"too-many-rows",
|
|
50
|
+
"too-many-columns",
|
|
51
|
+
"cell-too-long",
|
|
52
|
+
"unterminated-quote",
|
|
53
|
+
"workbook-too-large",
|
|
54
|
+
"file-unchanged",
|
|
55
|
+
"sender-too-long",
|
|
56
|
+
"sender-invalid",
|
|
57
|
+
];
|
|
58
|
+
/**
|
|
59
|
+
* `host.imports.propose` refused the file. Carries the reason and nothing from
|
|
60
|
+
* the file, so it can be logged as it is.
|
|
61
|
+
*/
|
|
62
|
+
export class ImportProposalRefusedError extends Error {
|
|
63
|
+
reason;
|
|
64
|
+
constructor(reason) {
|
|
65
|
+
super(`The core refused the import proposal: ${reason}.`);
|
|
66
|
+
this.reason = reason;
|
|
67
|
+
this.name = "ImportProposalRefusedError";
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=imports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imports.js","sourceRoot":"","sources":["../src/imports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA6BH,sDAAsD;AACtD,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,6BAA6B;IAC7B,SAAS;IACT,kEAAkE;IAClE,UAAU;IACV,SAAS;IACT,gEAAgE;IAChE,QAAQ;IACR,UAAU;IACV,yDAAyD;IACzD,YAAY;IACZ,iCAAiC;IACjC,SAAS;IACT,+BAA+B;IAC/B,WAAW;IACX,6DAA6D;IAC7D,SAAS;CACD,CAAC;AAUX;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,mBAAmB;IACnB,YAAY;IACZ,oBAAoB;IACpB,gBAAgB;IAChB,iBAAiB;IACjB,qBAAqB;IACrB,eAAe;IACf,kBAAkB;IAClB,eAAe;IACf,oBAAoB;IACpB,oBAAoB;IACpB,gBAAgB;IAChB,iBAAiB;IACjB,gBAAgB;CACR,CAAC;AAKX;;;GAGG;AACH,MAAM,OAAO,0BAA2B,SAAQ,KAAK;IAC9B,MAAM;IAA3B,YAAqB,MAAc;QACjC,KAAK,CAAC,yCAAyC,MAAM,GAAG,CAAC,CAAC;sBADvC,MAAM;QAEzB,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC;IAC3C,CAAC;CACF"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @openbrf/plugin-sdk - the public plugin contract for Open BRF.
|
|
3
|
+
*
|
|
4
|
+
* A plugin depends on this package for types and for the manifest schema it
|
|
5
|
+
* validates itself against in its own CI. At runtime the host injects
|
|
6
|
+
* everything a plugin uses (see PluginHost), so nothing exported here needs to
|
|
7
|
+
* be resolvable from inside an installed plugin directory - which is what lets
|
|
8
|
+
* a plugin ship as a self-contained bundle (ADR 0003).
|
|
9
|
+
*/
|
|
10
|
+
export type { PluginAbortSignal } from "./abort-signal.ts";
|
|
11
|
+
export { ACTION_CHANNELS, ACTION_EFFECTS, ACTION_NAME_PATTERN, ACTION_PERSONAL_DATA, ACTION_SURFACES, type ActionChannel, type ActionClient, type ActionContext, type ActionDefinition, type ActionEffect, type ActionErrorSpec, type ActionPersonalData, type ActionPrincipal, type ActionRequest, type ActionRetry, type ActionSummary, type ActionSurface, type PendingChangeReceipt, type ActionWithSchemas, type PluginActionFilter, type PluginActionRegistration, type PluginActions, } from "./actions.ts";
|
|
12
|
+
export { ACTION_ERROR_MCP, ACTION_ERROR_REASONS, type ActionErrorReason, type ActionRefusal, type ActionRefusalKind, type ActionRefusalTransport, isActionRefusal, } from "./action-refusal.ts";
|
|
13
|
+
export { actionInputJsonSchema, actionOutputJsonSchema, isHostZodSchema, } from "./action-schema.ts";
|
|
14
|
+
export { isSupportedApiVersion, PLUGIN_API_VERSION, SUPPORTED_PLUGIN_API_VERSIONS, } from "./api-version.ts";
|
|
15
|
+
export { PLUGIN_BLOCK_ATTRIBUTES, PLUGIN_BLOCK_CATEGORIES, PLUGIN_BLOCK_ELEMENTS, PLUGIN_BLOCK_ICONS, PLUGIN_BLOCK_NAME_PATTERN, PLUGIN_BLOCK_RENDER_TIMEOUT_MS, type PluginBlockAbortSignal, type PluginBlockCategory, type PluginBlockContent, type PluginBlockDeclaration, type PluginBlockElement, type PluginBlockElementName, type PluginBlockIcon, type PluginBlockNode, type PluginBlockRegistration, type PluginBlockRenderContext, type PluginBlocks, pluginBlockSchema, pluginBlocksSchema, pluginBlockType, } from "./blocks.ts";
|
|
16
|
+
export { type Catalog, CATALOG_INDEX_VERSIONS, CATALOG_REFUSALS, type CatalogArtifact, catalogArtifactSchema, type CatalogDiagnostic, type CatalogEntry, catalogEntrySchema, type CatalogExtensionPoint, catalogExtensionPointSchema, type CatalogParseResult, type CatalogPluginEntry, catalogPluginEntrySchema, type CatalogRefusal, type CatalogRefusalCode, catalogSchema, type CatalogThemeEntry, catalogThemeEntrySchema, type LocalizedText, parseCatalogIndex, } from "./catalog.ts";
|
|
17
|
+
export { definePlugin } from "./define-plugin.ts";
|
|
18
|
+
export { createTestEntitlements, ENTITLEMENT_STATUSES, type EntitlementState, type EntitlementStatus, LICENCE_FILE_MAX_BYTES, LICENCE_FORMAT, LICENCE_PRESENTATION_FORMAT, LICENCE_PRESENTATION_MAX_BYTES, type PluginEntitlements, type TestEntitlementsOptions, undeclaredAudienceError, } from "./entitlements.ts";
|
|
19
|
+
export { EXTENSION_MAX_OUTPUT_LENGTH, EXTENSION_MAX_TIMEOUT_MS, EXTENSION_POINT_ID_PATTERN, EXTENSION_RESULT_REASONS, EXTENSION_TIMEOUT_MS, type ExtensionContext, type ExtensionContributionDefinition, type ExtensionContributionSummary, type ExtensionPointDefinition, type ExtensionResult, type ExtensionResultReason, type ExtensionTarget, MAX_EXTENSION_POINTS, type PluginExtensions, } from "./extensions.ts";
|
|
20
|
+
export { PLUGIN_FINANCE_EVENTS, PluginDeliveryRefusedError, type PluginDeliveryReceipt, type PluginDeliveryReceiptInput, type PluginDeliveryReference, type PluginFeeNotice, type PluginFeeNoticeHolders, type PluginFeeNotification, type PluginFeeNotificationSummary, type PluginFinanceEvent, type PluginFinanceEvents, type PluginFinanceEventType, type PluginFinances, type PluginMemberCharge, type PluginMemberChargeParty, type PluginMemberChargeReason, } from "./finances.ts";
|
|
21
|
+
export { IMPORT_PROPOSAL_REFUSAL_REASONS, IMPORT_PROPOSAL_STATES, type ImportProposalFile, type ImportProposalReceipt, type ImportProposalRefusalReason, ImportProposalRefusedError, type ImportProposalState, type ImportProposalStatus, type PluginImports, } from "./imports.ts";
|
|
22
|
+
export { formatSha512, IntegrityError, parseSha512 } from "./integrity.ts";
|
|
23
|
+
export { PLUGIN_FINDING_REASONS, PLUGIN_MANIFEST_RULES, type PluginFindingDetail, type PluginFindingReason, type PluginManifestRule, } from "./findings.ts";
|
|
24
|
+
export { PLUGIN_RECIPIENT_ERROR_CODES, type DeviceTokenSummary, type PluginAddress, type PluginAddressBook, type PluginAddresses, type PluginApartment, type PluginBookableResource, type PluginBookings, type PluginBusyInterval, type PluginCalendar, type PluginContentAudience, type PluginDevices, type PluginDisclosure, type PluginHost, PluginHostUnavailableError, type PluginJobs, type PluginLogger, type PluginMail, type PluginMailMessage, type PluginMedia, type PluginMediaFile, type PluginMediaStream, type PluginMeetingNotice, type PluginNews, type PluginNewsItem, type PluginOccupancySummary, type PluginOccurrence, PluginPermissionError, PluginRecipientError, type PluginRecipientErrorCode, type PluginRecipientRequest, type PluginRecipientResponse, type PluginRecipients, type PluginResident, type PluginSettings, type PluginInstalledTheme, type PluginSms, type PluginSmsMessage, type PluginThemeInstallOptions, type PluginThemeInstallResult, type PluginThemeInstallWarning, type PluginThemes, } from "./host.ts";
|
|
25
|
+
export type { PluginModuleFactory } from "./module.ts";
|
|
26
|
+
export { assertPluginPackage, composedActionName, CURRENT_PLUGIN_API_VERSION, declaredExtensionPointsSchema, declaredExtensionsSchema, extensionGroupRefusals, extensionHostPersonalDataRefused, extensionPermissionsRefused, extensionPointIdSchema, extensionPointRefusal, type ExtensionPointRefusal, extensionRuleIssues, MAX_DEVICE_ROUTES, isCalendarDay, licenceAudienceSchema, licenceKeyIdSchema, licencePublicKeySchema, type ManifestParseResult, type PluginActionDeclaration, pluginActionSchema, pluginActionsSchema, type PluginDeviceRoute, pluginDeviceRouteSchema, pluginDeviceRoutesSchema, type PluginEntry, pluginEntrySchema, type PluginExtensionDeclaration, type PluginExtensionPointDeclaration, pluginExtensionPointSchema, pluginExtensionSchema, pluginIdSchema, type PluginLicenceDeclaration, pluginLicenceSchema, type PluginManifest, pluginManifestSchema, type PluginPackage, pluginPackageSchema, type PluginView, pluginViewSchema, type PluginViewSection, PLUGIN_VIEW_SECTIONS, parsePluginPackage, proposeImportPersonalDataIssues, routePathsOverlap, } from "./manifest.ts";
|
|
27
|
+
export { HOST_SHARED_PACKAGES, type PluginPackageContents, pluginPackageProblems, } from "./package-check.ts";
|
|
28
|
+
export { PLUGIN_ROUTE_CAPABILITIES, type PluginRouteCapability, REQUIRED_CAPABILITIES_KEY, RequireCapability, } from "./require-capability.ts";
|
|
29
|
+
export type { StandardSchemaIssue, StandardSchemaResult, StandardSchemaV1, } from "./standard-schema.ts";
|
|
30
|
+
export { isPluginPermission, PLUGIN_PERMISSIONS, PLUGIN_PERSONAL_DATA_CATEGORIES, type PluginPermission, type PluginPersonalDataCategory, PROPOSE_IMPORT_ONLY_PERSONAL_DATA, PROPOSE_IMPORT_PERSONAL_DATA, } from "./permissions.ts";
|
|
31
|
+
export { canonicalRecipient, type PluginRecipient, pluginRecipientSchema, pluginRecipientsSchema, RECEIVING_HOSTS_MAX_LENGTH, receivingHosts, recipientHost, recipientOriginSchema, recipientsBeyondConsent, sameRecipientDeclaration, } from "./recipients.ts";
|
|
32
|
+
export { type JsonValue, PLUGIN_RECORD_COLLECTION_PATTERN, PLUGIN_RECORD_KEY_PATTERN, PLUGIN_RECORD_LIMITS, type PluginRecord, PluginRecordConflictError, PluginRecordIdentityNumberError, type PluginRecordLimit, PluginRecordLimitError, type PluginRecords, } from "./records.ts";
|
|
33
|
+
export { defaultSettings, type PluginSettingsField, pluginSettingsFieldSchema, type PluginSettingsSchema, pluginSettingsSchema, type PluginSettingsValues, secretValueValidator, settingsValidator, withoutSecretFields, } from "./settings-schema.ts";
|
|
34
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EACL,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC7B,KAAK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oBAAoB,EACzB,oBAAoB,EACpB,KAAK,oBAAoB,EACzB,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,sBAAsB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @openbrf/plugin-sdk - the public plugin contract for Open BRF.
|
|
3
|
+
*
|
|
4
|
+
* A plugin depends on this package for types and for the manifest schema it
|
|
5
|
+
* validates itself against in its own CI. At runtime the host injects
|
|
6
|
+
* everything a plugin uses (see PluginHost), so nothing exported here needs to
|
|
7
|
+
* be resolvable from inside an installed plugin directory - which is what lets
|
|
8
|
+
* a plugin ship as a self-contained bundle (ADR 0003).
|
|
9
|
+
*/
|
|
10
|
+
export { ACTION_CHANNELS, ACTION_EFFECTS, ACTION_NAME_PATTERN, ACTION_PERSONAL_DATA, ACTION_SURFACES, } from "./actions.js";
|
|
11
|
+
export { ACTION_ERROR_MCP, ACTION_ERROR_REASONS, isActionRefusal, } from "./action-refusal.js";
|
|
12
|
+
export { actionInputJsonSchema, actionOutputJsonSchema, isHostZodSchema, } from "./action-schema.js";
|
|
13
|
+
export { isSupportedApiVersion, PLUGIN_API_VERSION, SUPPORTED_PLUGIN_API_VERSIONS, } from "./api-version.js";
|
|
14
|
+
export { PLUGIN_BLOCK_ATTRIBUTES, PLUGIN_BLOCK_CATEGORIES, PLUGIN_BLOCK_ELEMENTS, PLUGIN_BLOCK_ICONS, PLUGIN_BLOCK_NAME_PATTERN, PLUGIN_BLOCK_RENDER_TIMEOUT_MS, pluginBlockSchema, pluginBlocksSchema, pluginBlockType, } from "./blocks.js";
|
|
15
|
+
export { CATALOG_INDEX_VERSIONS, CATALOG_REFUSALS, catalogArtifactSchema, catalogEntrySchema, catalogExtensionPointSchema, catalogPluginEntrySchema, catalogSchema, catalogThemeEntrySchema, parseCatalogIndex, } from "./catalog.js";
|
|
16
|
+
export { definePlugin } from "./define-plugin.js";
|
|
17
|
+
export { createTestEntitlements, ENTITLEMENT_STATUSES, LICENCE_FILE_MAX_BYTES, LICENCE_FORMAT, LICENCE_PRESENTATION_FORMAT, LICENCE_PRESENTATION_MAX_BYTES, undeclaredAudienceError, } from "./entitlements.js";
|
|
18
|
+
export { EXTENSION_MAX_OUTPUT_LENGTH, EXTENSION_MAX_TIMEOUT_MS, EXTENSION_POINT_ID_PATTERN, EXTENSION_RESULT_REASONS, EXTENSION_TIMEOUT_MS, MAX_EXTENSION_POINTS, } from "./extensions.js";
|
|
19
|
+
export { PLUGIN_FINANCE_EVENTS, PluginDeliveryRefusedError, } from "./finances.js";
|
|
20
|
+
export { IMPORT_PROPOSAL_REFUSAL_REASONS, IMPORT_PROPOSAL_STATES, ImportProposalRefusedError, } from "./imports.js";
|
|
21
|
+
export { formatSha512, IntegrityError, parseSha512 } from "./integrity.js";
|
|
22
|
+
export { PLUGIN_FINDING_REASONS, PLUGIN_MANIFEST_RULES, } from "./findings.js";
|
|
23
|
+
export { PLUGIN_RECIPIENT_ERROR_CODES, PluginHostUnavailableError, PluginPermissionError, PluginRecipientError, } from "./host.js";
|
|
24
|
+
export { assertPluginPackage, composedActionName, CURRENT_PLUGIN_API_VERSION, declaredExtensionPointsSchema, declaredExtensionsSchema, extensionGroupRefusals, extensionHostPersonalDataRefused, extensionPermissionsRefused, extensionPointIdSchema, extensionPointRefusal, extensionRuleIssues, MAX_DEVICE_ROUTES, isCalendarDay, licenceAudienceSchema, licenceKeyIdSchema, licencePublicKeySchema, pluginActionSchema, pluginActionsSchema, pluginDeviceRouteSchema, pluginDeviceRoutesSchema, pluginEntrySchema, pluginExtensionPointSchema, pluginExtensionSchema, pluginIdSchema, pluginLicenceSchema, pluginManifestSchema, pluginPackageSchema, pluginViewSchema, PLUGIN_VIEW_SECTIONS, parsePluginPackage, proposeImportPersonalDataIssues, routePathsOverlap, } from "./manifest.js";
|
|
25
|
+
export { HOST_SHARED_PACKAGES, pluginPackageProblems, } from "./package-check.js";
|
|
26
|
+
export { PLUGIN_ROUTE_CAPABILITIES, REQUIRED_CAPABILITIES_KEY, RequireCapability, } from "./require-capability.js";
|
|
27
|
+
export { isPluginPermission, PLUGIN_PERMISSIONS, PLUGIN_PERSONAL_DATA_CATEGORIES, PROPOSE_IMPORT_ONLY_PERSONAL_DATA, PROPOSE_IMPORT_PERSONAL_DATA, } from "./permissions.js";
|
|
28
|
+
export { canonicalRecipient, pluginRecipientSchema, pluginRecipientsSchema, RECEIVING_HOSTS_MAX_LENGTH, receivingHosts, recipientHost, recipientOriginSchema, recipientsBeyondConsent, sameRecipientDeclaration, } from "./recipients.js";
|
|
29
|
+
export { PLUGIN_RECORD_COLLECTION_PATTERN, PLUGIN_RECORD_KEY_PATTERN, PLUGIN_RECORD_LIMITS, PluginRecordConflictError, PluginRecordIdentityNumberError, PluginRecordLimitError, } from "./records.js";
|
|
30
|
+
export { defaultSettings, pluginSettingsFieldSchema, pluginSettingsSchema, secretValueValidator, settingsValidator, withoutSecretFields, } from "./settings-schema.js";
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EACL,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,GAkBhB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EAKpB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EAClB,yBAAyB,EACzB,8BAA8B,EAY9B,iBAAiB,EACjB,kBAAkB,EA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0B,EAC1B,qBAAqB,EACrB,cAAc,EAEd,mBAAmB,EAEnB,oBAAoB,EAEpB,mBAAmB,EAEnB,gBAAgB,EAEhB,oBAAoB,EACpB,kBAAkB,EAClB,+BAA+B,EAC/B,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,oBAAoB,EAEpB,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,yBAAyB,EAEzB,yBAAyB,EACzB,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AAMjC,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,+BAA+B,EAG/B,iCAAiC,EACjC,4BAA4B,GAC7B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,kBAAkB,EAElB,qBAAqB,EACrB,sBAAsB,EACtB,0BAA0B,EAC1B,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEL,gCAAgC,EAChC,yBAAyB,EACzB,oBAAoB,EAEpB,yBAAyB,EACzB,+BAA+B,EAE/B,sBAAsB,GAEvB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,eAAe,EAEf,yBAAyB,EAEzB,oBAAoB,EAEpB,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a catalog entry spells the sha512 digest of its tarball.
|
|
3
|
+
*
|
|
4
|
+
* The instance verifies the digest before it unpacks a download, and the
|
|
5
|
+
* catalog's own check verifies it before a listing is merged. Both must accept
|
|
6
|
+
* exactly the same spellings, or the catalog passes an entry the instance then
|
|
7
|
+
* refuses. So the parsing lives here, in the contract both depend on, and
|
|
8
|
+
* nowhere else.
|
|
9
|
+
*
|
|
10
|
+
* Written without `Buffer` or `node:crypto`: this package is also bundled into
|
|
11
|
+
* apps/web, a browser, where neither exists, and hashing itself stays with the
|
|
12
|
+
* caller. Base64 is decoded by hand rather than with `atob` so that padding and
|
|
13
|
+
* stray trailing bits are read as `Buffer` reads them, whatever the runtime.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Why a digest was refused. `malformed-digest` is a catalog entry that is
|
|
17
|
+
* written wrongly; `digest-mismatch` is bytes that are not the ones the entry
|
|
18
|
+
* names. Installers branch on the difference.
|
|
19
|
+
*/
|
|
20
|
+
export declare class IntegrityError extends Error {
|
|
21
|
+
readonly reason: "malformed-digest" | "digest-mismatch";
|
|
22
|
+
constructor(message: string, reason: "malformed-digest" | "digest-mismatch");
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Normalizes a declared digest to raw bytes.
|
|
26
|
+
*
|
|
27
|
+
* Both spellings are accepted because both are what a publisher actually has
|
|
28
|
+
* to hand: `npm pack --json` reports the subresource-integrity form
|
|
29
|
+
* (`sha512-<base64>`), while `sha512sum` prints hex. Requiring one would mean
|
|
30
|
+
* every catalog entry is transcribed by hand from the other, which is how a
|
|
31
|
+
* digest ends up wrong in a way nobody notices until an install fails.
|
|
32
|
+
*
|
|
33
|
+
* @throws IntegrityError with reason `malformed-digest`.
|
|
34
|
+
*/
|
|
35
|
+
export declare function parseSha512(declared: string): Uint8Array;
|
|
36
|
+
/** The subresource-integrity spelling, which is what a catalog entry carries. */
|
|
37
|
+
export declare function formatSha512(digest: Uint8Array): string;
|
|
38
|
+
//# sourceMappingURL=integrity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrity.d.ts","sourceRoot":"","sources":["../src/integrity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AASH;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,KAAK;IAGrC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,GAAG,iBAAiB;IAFzD,YACE,OAAO,EAAE,MAAM,EACN,MAAM,EAAE,kBAAkB,GAAG,iBAAiB,EAIxD;CACF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAuBxD;AAED,iFAAiF;AACjF,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAEvD"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a catalog entry spells the sha512 digest of its tarball.
|
|
3
|
+
*
|
|
4
|
+
* The instance verifies the digest before it unpacks a download, and the
|
|
5
|
+
* catalog's own check verifies it before a listing is merged. Both must accept
|
|
6
|
+
* exactly the same spellings, or the catalog passes an entry the instance then
|
|
7
|
+
* refuses. So the parsing lives here, in the contract both depend on, and
|
|
8
|
+
* nowhere else.
|
|
9
|
+
*
|
|
10
|
+
* Written without `Buffer` or `node:crypto`: this package is also bundled into
|
|
11
|
+
* apps/web, a browser, where neither exists, and hashing itself stays with the
|
|
12
|
+
* caller. Base64 is decoded by hand rather than with `atob` so that padding and
|
|
13
|
+
* stray trailing bits are read as `Buffer` reads them, whatever the runtime.
|
|
14
|
+
*/
|
|
15
|
+
const SRI_PATTERN = /^sha512-([A-Za-z0-9+/]+)={0,2}$/;
|
|
16
|
+
const HEX_PATTERN = /^[0-9a-f]{128}$/i;
|
|
17
|
+
const SHA512_BYTES = 64;
|
|
18
|
+
const BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
19
|
+
/**
|
|
20
|
+
* Why a digest was refused. `malformed-digest` is a catalog entry that is
|
|
21
|
+
* written wrongly; `digest-mismatch` is bytes that are not the ones the entry
|
|
22
|
+
* names. Installers branch on the difference.
|
|
23
|
+
*/
|
|
24
|
+
export class IntegrityError extends Error {
|
|
25
|
+
reason;
|
|
26
|
+
constructor(message, reason) {
|
|
27
|
+
super(message);
|
|
28
|
+
this.reason = reason;
|
|
29
|
+
this.name = "IntegrityError";
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Normalizes a declared digest to raw bytes.
|
|
34
|
+
*
|
|
35
|
+
* Both spellings are accepted because both are what a publisher actually has
|
|
36
|
+
* to hand: `npm pack --json` reports the subresource-integrity form
|
|
37
|
+
* (`sha512-<base64>`), while `sha512sum` prints hex. Requiring one would mean
|
|
38
|
+
* every catalog entry is transcribed by hand from the other, which is how a
|
|
39
|
+
* digest ends up wrong in a way nobody notices until an install fails.
|
|
40
|
+
*
|
|
41
|
+
* @throws IntegrityError with reason `malformed-digest`.
|
|
42
|
+
*/
|
|
43
|
+
export function parseSha512(declared) {
|
|
44
|
+
const trimmed = declared.trim();
|
|
45
|
+
const sri = SRI_PATTERN.exec(trimmed);
|
|
46
|
+
if (sri !== null) {
|
|
47
|
+
const bytes = fromBase64(sri[1] ?? "");
|
|
48
|
+
if (bytes.length !== SHA512_BYTES) {
|
|
49
|
+
throw new IntegrityError("A sha512 digest is 64 bytes; this one is not.", "malformed-digest");
|
|
50
|
+
}
|
|
51
|
+
return bytes;
|
|
52
|
+
}
|
|
53
|
+
if (HEX_PATTERN.test(trimmed)) {
|
|
54
|
+
return fromHex(trimmed);
|
|
55
|
+
}
|
|
56
|
+
throw new IntegrityError('Expected a digest written as "sha512-<base64>" or 128 hex characters.', "malformed-digest");
|
|
57
|
+
}
|
|
58
|
+
/** The subresource-integrity spelling, which is what a catalog entry carries. */
|
|
59
|
+
export function formatSha512(digest) {
|
|
60
|
+
return `sha512-${toBase64(digest)}`;
|
|
61
|
+
}
|
|
62
|
+
function fromHex(hex) {
|
|
63
|
+
const bytes = new Uint8Array(hex.length / 2);
|
|
64
|
+
for (let index = 0; index < bytes.length; index += 1) {
|
|
65
|
+
bytes[index] = Number.parseInt(hex.slice(index * 2, index * 2 + 2), 16);
|
|
66
|
+
}
|
|
67
|
+
return bytes;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Standard base64 without its padding, which the caller has already split off.
|
|
71
|
+
* Stray trailing bits are dropped, as `Buffer.from(_, "base64")` drops them.
|
|
72
|
+
*/
|
|
73
|
+
function fromBase64(characters) {
|
|
74
|
+
const bytes = new Uint8Array(Math.floor((characters.length * 6) / 8));
|
|
75
|
+
let accumulator = 0;
|
|
76
|
+
let bits = 0;
|
|
77
|
+
let written = 0;
|
|
78
|
+
for (const character of characters) {
|
|
79
|
+
accumulator = (accumulator << 6) | BASE64_ALPHABET.indexOf(character);
|
|
80
|
+
bits += 6;
|
|
81
|
+
if (bits >= 8) {
|
|
82
|
+
bits -= 8;
|
|
83
|
+
bytes[written] = (accumulator >> bits) & 0xff;
|
|
84
|
+
written += 1;
|
|
85
|
+
accumulator &= (1 << bits) - 1;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return bytes;
|
|
89
|
+
}
|
|
90
|
+
function toBase64(bytes) {
|
|
91
|
+
let encoded = "";
|
|
92
|
+
for (let index = 0; index < bytes.length; index += 3) {
|
|
93
|
+
const first = bytes[index] ?? 0;
|
|
94
|
+
const second = bytes[index + 1] ?? 0;
|
|
95
|
+
const third = bytes[index + 2] ?? 0;
|
|
96
|
+
const group = (first << 16) | (second << 8) | third;
|
|
97
|
+
const remaining = bytes.length - index;
|
|
98
|
+
encoded += BASE64_ALPHABET.charAt((group >> 18) & 63);
|
|
99
|
+
encoded += BASE64_ALPHABET.charAt((group >> 12) & 63);
|
|
100
|
+
encoded += remaining > 1 ? BASE64_ALPHABET.charAt((group >> 6) & 63) : "=";
|
|
101
|
+
encoded += remaining > 2 ? BASE64_ALPHABET.charAt(group & 63) : "=";
|
|
102
|
+
}
|
|
103
|
+
return encoded;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=integrity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrity.js","sourceRoot":"","sources":["../src/integrity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,GAAG,iCAAiC,CAAC;AACtD,MAAM,WAAW,GAAG,kBAAk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ACrD,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAChC,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC;QACrC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC;QACpC,MAAM,KAAK,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC;QACpD,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC;QAEvC,OAAO,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;QACtD,OAAO,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;QACtD,OAAO,IAAI,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QAC3E,OAAO,IAAI,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IACtE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Text written in both languages the interface is offered in.
|
|
4
|
+
*
|
|
5
|
+
* For what the board reads before anything has been downloaded: the catalog's
|
|
6
|
+
* own name and description of an entry, and the parts of a declaration the
|
|
7
|
+
* consent screen shows, such as a recipient's purpose. A plugin's locale files
|
|
8
|
+
* reach the instance with its package, so a key into them would have no words
|
|
9
|
+
* behind it on the screen that decides whether the package is fetched.
|
|
10
|
+
*
|
|
11
|
+
* Strict, so a misspelled language is refused rather than dropped.
|
|
12
|
+
*/
|
|
13
|
+
export declare const localizedTextSchema: z.ZodObject<{
|
|
14
|
+
sv: z.ZodString;
|
|
15
|
+
en: z.ZodString;
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
export type LocalizedText = z.infer<typeof localizedTextSchema>;
|
|
18
|
+
//# sourceMappingURL=localized-text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localized-text.d.ts","sourceRoot":"","sources":["../src/localized-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB;;;kBAG9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Text written in both languages the interface is offered in.
|
|
4
|
+
*
|
|
5
|
+
* For what the board reads before anything has been downloaded: the catalog's
|
|
6
|
+
* own name and description of an entry, and the parts of a declaration the
|
|
7
|
+
* consent screen shows, such as a recipient's purpose. A plugin's locale files
|
|
8
|
+
* reach the instance with its package, so a key into them would have no words
|
|
9
|
+
* behind it on the screen that decides whether the package is fetched.
|
|
10
|
+
*
|
|
11
|
+
* Strict, so a misspelled language is refused rather than dropped.
|
|
12
|
+
*/
|
|
13
|
+
export const localizedTextSchema = z.strictObject({
|
|
14
|
+
sv: z.string().min(1).max(500),
|
|
15
|
+
en: z.string().min(1).max(500),
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=localized-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localized-text.js","sourceRoot":"","sources":["../src/localized-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,YAAY,CAAC;IAChD,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAC9B,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;CAC/B,CAAC,CAAC"}
|