@adminiumjs/manifest 0.2.9 → 0.3.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/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/plan.d.ts +4 -4
- package/dist/plan.js +4 -4
- package/dist/schema.d.ts +100 -38
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +94 -67
- package/dist/schema.js.map +1 -1
- package/dist/validate.d.ts +10 -10
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +4 -4
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @adminium/manifest — Micro-SaaS manifest spec v1
|
|
2
|
+
* @adminium/manifest — Micro-SaaS manifest spec v1.
|
|
3
3
|
*
|
|
4
4
|
* The frozen envelope schema + validator (browser-safe, pure Zod), and the
|
|
5
5
|
* install planner (`requiredSchema` → create-or-map diff, `plan.ts`) that both
|
|
6
|
-
* install paths run: add-ons since
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* install paths run: add-ons since, apps since. The DDL that applies a plan
|
|
7
|
+
* lives server-side in `apps/server/src/add-ons/install-ddl.ts`; nothing in
|
|
8
|
+
* this package does I/O.
|
|
9
9
|
*/
|
|
10
10
|
export declare const PACKAGE_NAME = "@adminium/manifest";
|
|
11
11
|
export { MANIFEST_VERSION, MANIFEST_KINDS, MANIFEST_CATEGORIES, MANIFEST_CAPABILITIES, RESERVED_KEYS, COLUMN_TYPES, COLUMN_SEMANTICS, COLUMN_ROLES, FRONTEND_KINDS, FIRST_PARTY_PUBLISHER_ID, manifestSchema, appManifestSchema, addOnManifestSchema, manifestKindSchema, addOnIssues, isAddOnManifest, identitySchema, compatibilitySchema, requiredSchemaSchema, requiredTableSchema, requiredColumnSchema, pageSchema, roleSchema, settingSchema, seedSchema, frontendSchema, capabilitySchema, categorySchema, publisherSchema, i18nMessageSchema, compareSemver, type Manifest, type AppManifest, type AddOnManifest, type ManifestKind, type AddOnBlock, type Capability, type Publisher, type I18nMessage, type RequiredTable, type RequiredColumn, } from './schema.js';
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
2
|
/**
|
|
3
|
-
* @adminium/manifest — Micro-SaaS manifest spec v1
|
|
3
|
+
* @adminium/manifest — Micro-SaaS manifest spec v1.
|
|
4
4
|
*
|
|
5
5
|
* The frozen envelope schema + validator (browser-safe, pure Zod), and the
|
|
6
6
|
* install planner (`requiredSchema` → create-or-map diff, `plan.ts`) that both
|
|
7
|
-
* install paths run: add-ons since
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* install paths run: add-ons since, apps since. The DDL that applies a plan
|
|
8
|
+
* lives server-side in `apps/server/src/add-ons/install-ddl.ts`; nothing in
|
|
9
|
+
* this package does I/O.
|
|
10
10
|
*/
|
|
11
11
|
export const PACKAGE_NAME = '@adminium/manifest';
|
|
12
12
|
export { MANIFEST_VERSION, MANIFEST_KINDS, MANIFEST_CATEGORIES, MANIFEST_CAPABILITIES, RESERVED_KEYS, COLUMN_TYPES, COLUMN_SEMANTICS, COLUMN_ROLES, FRONTEND_KINDS, FIRST_PARTY_PUBLISHER_ID, manifestSchema, appManifestSchema, addOnManifestSchema, manifestKindSchema, addOnIssues, isAddOnManifest, identitySchema, compatibilitySchema, requiredSchemaSchema, requiredTableSchema, requiredColumnSchema, pageSchema, roleSchema, settingSchema, seedSchema, frontendSchema, capabilitySchema, categorySchema, publisherSchema, i18nMessageSchema, compareSemver, } from './schema.js';
|
package/dist/plan.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `planInstall` — what installing an add-on would DO to a connected database,
|
|
3
|
-
* decided before anything is done
|
|
3
|
+
* decided before anything is done.
|
|
4
4
|
*
|
|
5
5
|
* ─── The plan is a user-facing document, not an internal step ───────────────
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* The consent dialog is "the security surface, not decoration: it is where a
|
|
8
8
|
* user sees what an add-on may reach before it can reach it". The thing it
|
|
9
9
|
* shows is this plan. So the output is shaped to be READ — every table says
|
|
10
10
|
* whether it will be created or reused, every reused table says which of its
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
* That is also why nothing here writes: a plan that could not be computed
|
|
15
15
|
* without side effects could not be shown before consent.
|
|
16
16
|
*
|
|
17
|
-
* ─── One field, both kinds
|
|
17
|
+
* ─── One field, both kinds ─────────────────────────────────────────────────
|
|
18
18
|
*
|
|
19
19
|
* This planner reads exactly ONE field of a manifest — `requiredSchema` — and
|
|
20
20
|
* that field is on the shared envelope, so an app's tables diff the same way an
|
|
21
21
|
* add-on's do. Installing an APP now runs through here too; what stays outside
|
|
22
22
|
* it is the rest of the app envelope (`pages`, `roles`, `settings`, `seeds`),
|
|
23
|
-
* which
|
|
23
|
+
* which still own and which no install path creates yet.
|
|
24
24
|
*
|
|
25
25
|
* Three of the six shipped add-ons declare `requiredSchema`; `import-canva`,
|
|
26
26
|
* `barcode-labels` and `holiday-calendars` declare none and plan to nothing,
|
package/dist/plan.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
2
|
/**
|
|
3
3
|
* `planInstall` — what installing an add-on would DO to a connected database,
|
|
4
|
-
* decided before anything is done
|
|
4
|
+
* decided before anything is done.
|
|
5
5
|
*
|
|
6
6
|
* ─── The plan is a user-facing document, not an internal step ───────────────
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* The consent dialog is "the security surface, not decoration: it is where a
|
|
9
9
|
* user sees what an add-on may reach before it can reach it". The thing it
|
|
10
10
|
* shows is this plan. So the output is shaped to be READ — every table says
|
|
11
11
|
* whether it will be created or reused, every reused table says which of its
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
* That is also why nothing here writes: a plan that could not be computed
|
|
16
16
|
* without side effects could not be shown before consent.
|
|
17
17
|
*
|
|
18
|
-
* ─── One field, both kinds
|
|
18
|
+
* ─── One field, both kinds ─────────────────────────────────────────────────
|
|
19
19
|
*
|
|
20
20
|
* This planner reads exactly ONE field of a manifest — `requiredSchema` — and
|
|
21
21
|
* that field is on the shared envelope, so an app's tables diff the same way an
|
|
22
22
|
* add-on's do. Installing an APP now runs through here too; what stays outside
|
|
23
23
|
* it is the rest of the app envelope (`pages`, `roles`, `settings`, `seeds`),
|
|
24
|
-
* which
|
|
24
|
+
* which still own and which no install path creates yet.
|
|
25
25
|
*
|
|
26
26
|
* Three of the six shipped add-ons declare `requiredSchema`; `import-canva`,
|
|
27
27
|
* `barcode-labels` and `holiday-calendars` declare none and plan to nothing,
|
package/dist/schema.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Manifest spec v1
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* Manifest spec v1, frozen at `manifestVersion: 1` for all of Adminium 1.x.
|
|
3
|
+
* Pure Zod v4 + types — no `node:` imports — so the storefront and the
|
|
4
|
+
* Electron shell can validate a manifest in the browser (the
|
|
5
|
+
* `@adminium/manifest` package row).
|
|
6
6
|
*
|
|
7
7
|
* This module is the envelope: every block's shape and the cross-block rules.
|
|
8
8
|
* The install PLANNER (planInstall / requiredSchema → create-or-map diff) and
|
|
9
9
|
* the server-side installer are later layers that consume a validated manifest.
|
|
10
10
|
*/
|
|
11
|
-
import { type AddOnBlock } from '@adminium/add-on-contracts';
|
|
11
|
+
import { i18nMessageSchema, type AddOnBlock, type I18nMessage } from '@adminium/add-on-contracts';
|
|
12
12
|
import { z } from 'zod';
|
|
13
|
-
/** Integer spec version, frozen at 1 for Adminium 1.x
|
|
13
|
+
/** Integer spec version, frozen at 1 for Adminium 1.x. */
|
|
14
14
|
export declare const MANIFEST_VERSION = 1;
|
|
15
15
|
/**
|
|
16
|
-
* What kind of thing this manifest describes
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
16
|
+
* What kind of thing this manifest describes. OPTIONAL, defaulting to `"app"` —
|
|
17
|
+
* which is the whole reason `manifestVersion` does not move: every manifest
|
|
18
|
+
* written before wave 4 stays valid unchanged, and an additive optional field
|
|
19
|
+
* with a back-compatible default is how a frozen spec grows without lying about
|
|
20
|
+
* its version.
|
|
21
21
|
*/
|
|
22
22
|
export declare const MANIFEST_KINDS: readonly ["app", "add-on"];
|
|
23
23
|
export declare const manifestKindSchema: z.ZodEnum<{
|
|
@@ -25,13 +25,17 @@ export declare const manifestKindSchema: z.ZodEnum<{
|
|
|
25
25
|
"add-on": "add-on";
|
|
26
26
|
}>;
|
|
27
27
|
export type ManifestKind = (typeof MANIFEST_KINDS)[number];
|
|
28
|
-
/**
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
/**
|
|
29
|
+
* An i18n message: a catalog key plus the English fallback rendered if absent.
|
|
30
|
+
*
|
|
31
|
+
* DEFINED IN `@adminium/add-on-contracts` since 51a and re-exported here under
|
|
32
|
+
* its own name, so every importer of `@adminium/manifest` is unchanged. It
|
|
33
|
+
* moved because an add-on's page title and nav-group label are written in a
|
|
34
|
+
* manifest and read by a host through the contracts package — one shape, one
|
|
35
|
+
* definition, rather than two that drift a `max()` apart.
|
|
36
|
+
*/
|
|
37
|
+
export { i18nMessageSchema, type I18nMessage };
|
|
38
|
+
/** Closed v1 storefront facet set. */
|
|
35
39
|
export declare const MANIFEST_CATEGORIES: readonly ["commerce", "hospitality", "operations", "crm", "internal-tools"];
|
|
36
40
|
export declare const categorySchema: z.ZodEnum<{
|
|
37
41
|
commerce: "commerce";
|
|
@@ -40,7 +44,7 @@ export declare const categorySchema: z.ZodEnum<{
|
|
|
40
44
|
crm: "crm";
|
|
41
45
|
"internal-tools": "internal-tools";
|
|
42
46
|
}>;
|
|
43
|
-
/** The one publisher id v1 accepts unless `third-party-publishers` is on
|
|
47
|
+
/** The one publisher id v1 accepts unless `third-party-publishers` is on. */
|
|
44
48
|
export declare const FIRST_PARTY_PUBLISHER_ID = "adminium";
|
|
45
49
|
export declare const publisherSchema: z.ZodObject<{
|
|
46
50
|
id: z.ZodString;
|
|
@@ -93,13 +97,12 @@ export declare const identitySchema: z.ZodObject<{
|
|
|
93
97
|
* Keys no app or add-on may ever take, because they would shadow a storefront
|
|
94
98
|
* route or a data file (D17). Apps and add-ons share one key namespace.
|
|
95
99
|
*
|
|
96
|
-
* `dashboard` joined them for a different reason
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
* attachment ambiguous.
|
|
100
|
+
* `dashboard` joined them for a different reason: it is the HOST KEY a stock
|
|
101
|
+
* Adminium deployment attaches an add-on under, so an add-on `attaches:
|
|
102
|
+
* [{app: '*'}]` resolves against it and the consent dialog has something to
|
|
103
|
+
* enable and disable. Treating an empty `attachTo` as "the dashboard" was the
|
|
104
|
+
* alternative and leaves nothing to switch off. Reserving the literal means
|
|
105
|
+
* no app can also be called `dashboard` and make an attachment ambiguous.
|
|
103
106
|
*/
|
|
104
107
|
export declare const RESERVED_KEYS: readonly ["apps", "add-on", "add-ons", "dashboard", "demo", "index", "search"];
|
|
105
108
|
export declare const MANIFEST_CAPABILITIES: readonly ["hosted-only", "offline-required", "receipt-printer", "barcode-scanner", "payments", "file-storage", "email-delivery", "realtime", "outbound-http", "oauth-connect"];
|
|
@@ -116,7 +119,7 @@ export declare const capabilitySchema: z.ZodEnum<{
|
|
|
116
119
|
"oauth-connect": "oauth-connect";
|
|
117
120
|
}>;
|
|
118
121
|
export type Capability = z.infer<typeof capabilitySchema>;
|
|
119
|
-
/** The three meta/data engines Adminium can talk to
|
|
122
|
+
/** The three meta/data engines Adminium can talk to. */
|
|
120
123
|
export declare const MANIFEST_ENGINES: readonly ["postgres", "mysql", "sqlite"];
|
|
121
124
|
export declare const compatibilitySchema: z.ZodObject<{
|
|
122
125
|
minAdminiumVersion: z.ZodString;
|
|
@@ -139,11 +142,11 @@ export declare const compatibilitySchema: z.ZodObject<{
|
|
|
139
142
|
"oauth-connect": "oauth-connect";
|
|
140
143
|
}>>>;
|
|
141
144
|
}, z.core.$strict>;
|
|
142
|
-
/** Abstract column types the introspection engine emits (
|
|
145
|
+
/** Abstract column types the introspection engine emits (research). */
|
|
143
146
|
export declare const COLUMN_TYPES: readonly ["id", "text", "int", "bigint", "decimal", "money", "float", "bool", "enum", "json", "date", "timestamptz", "uuid", "fk", "blob"];
|
|
144
|
-
/** Optional semantic pre-seed so widgets auto-instantiate
|
|
147
|
+
/** Optional semantic pre-seed so widgets auto-instantiate. */
|
|
145
148
|
export declare const COLUMN_SEMANTICS: readonly ["name", "money", "image", "email", "avatar", "geo-lat", "geo-lng"];
|
|
146
|
-
/** Structural role markers
|
|
149
|
+
/** Structural role markers. */
|
|
147
150
|
export declare const COLUMN_ROLES: readonly ["pk", "created_at", "updated_at"];
|
|
148
151
|
export declare const requiredColumnSchema: z.ZodObject<{
|
|
149
152
|
ref: z.ZodString;
|
|
@@ -394,7 +397,7 @@ export declare const frontendEnvVarSchema: z.ZodObject<{
|
|
|
394
397
|
example: z.ZodOptional<z.ZodString>;
|
|
395
398
|
}, z.core.$strict>;
|
|
396
399
|
/**
|
|
397
|
-
* Which of the three sides a frontend is
|
|
400
|
+
* Which of the three sides a frontend is.
|
|
398
401
|
*
|
|
399
402
|
* The product rule this exists to make CHECKABLE: a micro-SaaS is the Adminium
|
|
400
403
|
* dashboard (mandatory, and never declared here — it comes from introspection)
|
|
@@ -655,9 +658,20 @@ export declare const appManifestSchema: z.ZodObject<{
|
|
|
655
658
|
manifestVersion: z.ZodLiteral<1>;
|
|
656
659
|
}, z.core.$strict>;
|
|
657
660
|
/**
|
|
658
|
-
* `pages` and `
|
|
659
|
-
*
|
|
660
|
-
*
|
|
661
|
+
* `pages`, `roles` and `frontends` are absent from this branch on purpose, and
|
|
662
|
+
* leaving the fields off a `.strict()` schema entirely is a stronger guarantee
|
|
663
|
+
* than a lint rule.
|
|
664
|
+
*
|
|
665
|
+
* WHAT CHANGED, AND WHAT DID NOT. An add-on may now own a dashboard page — but
|
|
666
|
+
* it declares that page as CODE, inside `addOn.pages`, never as a `pages` entry
|
|
667
|
+
* up here. The two are
|
|
668
|
+
* different things wearing one word: a `pages` row is a generated page, a
|
|
669
|
+
* `template` the engine renders with `bindings` and `config`, and an add-on
|
|
670
|
+
* still cannot install one. Roles and frontends remain refused outright.
|
|
671
|
+
*
|
|
672
|
+
* So the absence of `pages` from this object is no longer "an add-on has no
|
|
673
|
+
* pages". It is "an add-on's pages are not the engine's page templates", which
|
|
674
|
+
* is a narrower promise and the one this shape actually keeps.
|
|
661
675
|
*/
|
|
662
676
|
export declare const addOnManifestSchema: z.ZodObject<{
|
|
663
677
|
categories: z.ZodArray<z.ZodEnum<{
|
|
@@ -752,6 +766,30 @@ export declare const addOnManifestSchema: z.ZodObject<{
|
|
|
752
766
|
}, z.core.$strict>>;
|
|
753
767
|
publicSettings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
754
768
|
demoTransport: z.ZodOptional<z.ZodString>;
|
|
769
|
+
pages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
770
|
+
ref: z.ZodString;
|
|
771
|
+
title: z.ZodObject<{
|
|
772
|
+
key: z.ZodString;
|
|
773
|
+
fallback: z.ZodString;
|
|
774
|
+
}, z.core.$strict>;
|
|
775
|
+
icon: z.ZodString;
|
|
776
|
+
client: z.ZodString;
|
|
777
|
+
nav: z.ZodOptional<z.ZodObject<{
|
|
778
|
+
group: z.ZodDefault<z.ZodString>;
|
|
779
|
+
order: z.ZodNumber;
|
|
780
|
+
adminOnly: z.ZodOptional<z.ZodBoolean>;
|
|
781
|
+
}, z.core.$strict>>;
|
|
782
|
+
detail: z.ZodOptional<z.ZodBoolean>;
|
|
783
|
+
}, z.core.$strict>>>;
|
|
784
|
+
navGroups: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
785
|
+
key: z.ZodString;
|
|
786
|
+
label: z.ZodObject<{
|
|
787
|
+
key: z.ZodString;
|
|
788
|
+
fallback: z.ZodString;
|
|
789
|
+
}, z.core.$strict>;
|
|
790
|
+
order: z.ZodNumber;
|
|
791
|
+
}, z.core.$strict>>>;
|
|
792
|
+
hostApi: z.ZodOptional<z.ZodLiteral<1>>;
|
|
755
793
|
}, z.core.$strict>;
|
|
756
794
|
requiredSchema: z.ZodOptional<z.ZodObject<{
|
|
757
795
|
tables: z.ZodArray<z.ZodObject<{
|
|
@@ -1247,6 +1285,30 @@ export declare const manifestSchema: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.
|
|
|
1247
1285
|
}, z.core.$strict>>;
|
|
1248
1286
|
publicSettings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1249
1287
|
demoTransport: z.ZodOptional<z.ZodString>;
|
|
1288
|
+
pages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1289
|
+
ref: z.ZodString;
|
|
1290
|
+
title: z.ZodObject<{
|
|
1291
|
+
key: z.ZodString;
|
|
1292
|
+
fallback: z.ZodString;
|
|
1293
|
+
}, z.core.$strict>;
|
|
1294
|
+
icon: z.ZodString;
|
|
1295
|
+
client: z.ZodString;
|
|
1296
|
+
nav: z.ZodOptional<z.ZodObject<{
|
|
1297
|
+
group: z.ZodDefault<z.ZodString>;
|
|
1298
|
+
order: z.ZodNumber;
|
|
1299
|
+
adminOnly: z.ZodOptional<z.ZodBoolean>;
|
|
1300
|
+
}, z.core.$strict>>;
|
|
1301
|
+
detail: z.ZodOptional<z.ZodBoolean>;
|
|
1302
|
+
}, z.core.$strict>>>;
|
|
1303
|
+
navGroups: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1304
|
+
key: z.ZodString;
|
|
1305
|
+
label: z.ZodObject<{
|
|
1306
|
+
key: z.ZodString;
|
|
1307
|
+
fallback: z.ZodString;
|
|
1308
|
+
}, z.core.$strict>;
|
|
1309
|
+
order: z.ZodNumber;
|
|
1310
|
+
}, z.core.$strict>>>;
|
|
1311
|
+
hostApi: z.ZodOptional<z.ZodLiteral<1>>;
|
|
1250
1312
|
}, z.core.$strict>;
|
|
1251
1313
|
requiredSchema: z.ZodOptional<z.ZodObject<{
|
|
1252
1314
|
tables: z.ZodArray<z.ZodObject<{
|
|
@@ -1413,7 +1475,7 @@ export declare const manifestSchema: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.
|
|
|
1413
1475
|
}, z.core.$strict>], "kind">>;
|
|
1414
1476
|
export type AppManifest = z.infer<typeof appManifestSchema>;
|
|
1415
1477
|
export type AddOnManifest = z.infer<typeof addOnManifestSchema>;
|
|
1416
|
-
/** One table an add-on declares under `requiredSchema
|
|
1478
|
+
/** One table an add-on declares under `requiredSchema`. */
|
|
1417
1479
|
export type RequiredTable = z.infer<typeof requiredTableSchema>;
|
|
1418
1480
|
/** One column of a {@link RequiredTable}. */
|
|
1419
1481
|
export type RequiredColumn = z.infer<typeof requiredColumnSchema>;
|
|
@@ -1422,8 +1484,8 @@ export type { AddOnBlock };
|
|
|
1422
1484
|
/** Narrowing helper — the discriminant is the only thing worth branching on. */
|
|
1423
1485
|
export declare function isAddOnManifest(m: Manifest): m is AddOnManifest;
|
|
1424
1486
|
/**
|
|
1425
|
-
* Cross-block rules the envelope cannot express, each with its issue
|
|
1426
|
-
*
|
|
1487
|
+
* Cross-block rules the envelope cannot express, each with its issue
|
|
1488
|
+
* code. Runs only for `kind: "add-on"`; returns [] for an app.
|
|
1427
1489
|
*/
|
|
1428
1490
|
export declare function addOnIssues(m: Manifest, ctx?: {
|
|
1429
1491
|
/** Installed app keys, so `attaches` can be checked. Omit to skip. */
|
|
@@ -1438,7 +1500,7 @@ export declare function addOnIssues(m: Manifest, ctx?: {
|
|
|
1438
1500
|
/**
|
|
1439
1501
|
* Numeric semver compare on the release triple (pre-release/build ignored —
|
|
1440
1502
|
* enough for the compatibility-window and upgrade ordering checks). Returns
|
|
1441
|
-
* <0, 0, >0. Exported for the installer's upgrade rule
|
|
1503
|
+
* <0, 0, >0. Exported for the installer's upgrade rule.
|
|
1442
1504
|
*/
|
|
1443
1505
|
export declare function compareSemver(a: string, b: string): number;
|
|
1444
1506
|
//# sourceMappingURL=schema.d.ts.map
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AACA;;;;;;;;;GASG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AACA;;;;;;;;;GASG;AAEH,OAAO,EAGL,iBAAiB,EAEjB,KAAK,UAAU,EACf,KAAK,WAAW,EACjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,0DAA0D;AAC1D,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,4BAA6B,CAAC;AACzD,eAAO,MAAM,kBAAkB;;;EAAyB,CAAC;AACzD,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAO3D;;;;;;;;GAQG;AACH,OAAO,EAAE,iBAAiB,EAAE,KAAK,WAAW,EAAE,CAAC;AAI/C,sCAAsC;AACtC,eAAO,MAAM,mBAAmB,6EAMtB,CAAC;AACX,eAAO,MAAM,cAAc;;;;;;EAA8B,CAAC;AAE1D,6EAA6E;AAC7E,eAAO,MAAM,wBAAwB,aAAa,CAAC;AAEnD,eAAO,MAAM,eAAe;;;;kBAMjB,CAAC;AACZ,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD;;;GAGG;AACH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EAAE,MAAM,CAAA;CAAE,EAAE,CAsGnD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAU1D"}
|
package/dist/schema.js
CHANGED
|
@@ -1,39 +1,42 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
2
|
/**
|
|
3
|
-
* Manifest spec v1
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* Manifest spec v1, frozen at `manifestVersion: 1` for all of Adminium 1.x.
|
|
4
|
+
* Pure Zod v4 + types — no `node:` imports — so the storefront and the
|
|
5
|
+
* Electron shell can validate a manifest in the browser (the
|
|
6
|
+
* `@adminium/manifest` package row).
|
|
7
7
|
*
|
|
8
8
|
* This module is the envelope: every block's shape and the cross-block rules.
|
|
9
9
|
* The install PLANNER (planInstall / requiredSchema → create-or-map diff) and
|
|
10
10
|
* the server-side installer are later layers that consume a validated manifest.
|
|
11
11
|
*/
|
|
12
|
-
import { addOnBlockSchema, addOnCategorySchema, isSlotId, } from '@adminium/add-on-contracts';
|
|
12
|
+
import { addOnBlockSchema, addOnCategorySchema, i18nMessageSchema, isSlotId, } from '@adminium/add-on-contracts';
|
|
13
13
|
import { z } from 'zod';
|
|
14
|
-
/** Integer spec version, frozen at 1 for Adminium 1.x
|
|
14
|
+
/** Integer spec version, frozen at 1 for Adminium 1.x. */
|
|
15
15
|
export const MANIFEST_VERSION = 1;
|
|
16
16
|
/**
|
|
17
|
-
* What kind of thing this manifest describes
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
17
|
+
* What kind of thing this manifest describes. OPTIONAL, defaulting to `"app"` —
|
|
18
|
+
* which is the whole reason `manifestVersion` does not move: every manifest
|
|
19
|
+
* written before wave 4 stays valid unchanged, and an additive optional field
|
|
20
|
+
* with a back-compatible default is how a frozen spec grows without lying about
|
|
21
|
+
* its version.
|
|
22
22
|
*/
|
|
23
23
|
export const MANIFEST_KINDS = ['app', 'add-on'];
|
|
24
24
|
export const manifestKindSchema = z.enum(MANIFEST_KINDS);
|
|
25
25
|
/** strict semver — `major.minor.patch` with optional pre-release/build. */
|
|
26
26
|
const SEMVER = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/;
|
|
27
27
|
const semver = z.string().regex(SEMVER, 'must be strict semver (major.minor.patch)');
|
|
28
|
-
/**
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
/**
|
|
29
|
+
* An i18n message: a catalog key plus the English fallback rendered if absent.
|
|
30
|
+
*
|
|
31
|
+
* DEFINED IN `@adminium/add-on-contracts` since 51a and re-exported here under
|
|
32
|
+
* its own name, so every importer of `@adminium/manifest` is unchanged. It
|
|
33
|
+
* moved because an add-on's page title and nav-group label are written in a
|
|
34
|
+
* manifest and read by a host through the contracts package — one shape, one
|
|
35
|
+
* definition, rather than two that drift a `max()` apart.
|
|
36
|
+
*/
|
|
37
|
+
export { i18nMessageSchema };
|
|
38
|
+
// ── identity ─────────────────────────────────────────────────────────────────
|
|
39
|
+
/** Closed v1 storefront facet set. */
|
|
37
40
|
export const MANIFEST_CATEGORIES = [
|
|
38
41
|
'commerce',
|
|
39
42
|
'hospitality',
|
|
@@ -42,7 +45,7 @@ export const MANIFEST_CATEGORIES = [
|
|
|
42
45
|
'internal-tools',
|
|
43
46
|
];
|
|
44
47
|
export const categorySchema = z.enum(MANIFEST_CATEGORIES);
|
|
45
|
-
/** The one publisher id v1 accepts unless `third-party-publishers` is on
|
|
48
|
+
/** The one publisher id v1 accepts unless `third-party-publishers` is on. */
|
|
46
49
|
export const FIRST_PARTY_PUBLISHER_ID = 'adminium';
|
|
47
50
|
export const publisherSchema = z
|
|
48
51
|
.object({
|
|
@@ -74,13 +77,12 @@ export const identitySchema = z
|
|
|
74
77
|
* Keys no app or add-on may ever take, because they would shadow a storefront
|
|
75
78
|
* route or a data file (D17). Apps and add-ons share one key namespace.
|
|
76
79
|
*
|
|
77
|
-
* `dashboard` joined them for a different reason
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* attachment ambiguous.
|
|
80
|
+
* `dashboard` joined them for a different reason: it is the HOST KEY a stock
|
|
81
|
+
* Adminium deployment attaches an add-on under, so an add-on `attaches:
|
|
82
|
+
* [{app: '*'}]` resolves against it and the consent dialog has something to
|
|
83
|
+
* enable and disable. Treating an empty `attachTo` as "the dashboard" was the
|
|
84
|
+
* alternative and leaves nothing to switch off. Reserving the literal means
|
|
85
|
+
* no app can also be called `dashboard` and make an attachment ambiguous.
|
|
84
86
|
*/
|
|
85
87
|
export const RESERVED_KEYS = [
|
|
86
88
|
'apps',
|
|
@@ -91,7 +93,7 @@ export const RESERVED_KEYS = [
|
|
|
91
93
|
'index',
|
|
92
94
|
'search',
|
|
93
95
|
];
|
|
94
|
-
// ──
|
|
96
|
+
// ── capabilities ─────────────────────────────────────────────────────────────
|
|
95
97
|
export const MANIFEST_CAPABILITIES = [
|
|
96
98
|
'hosted-only',
|
|
97
99
|
'offline-required',
|
|
@@ -101,7 +103,7 @@ export const MANIFEST_CAPABILITIES = [
|
|
|
101
103
|
'file-storage',
|
|
102
104
|
'email-delivery',
|
|
103
105
|
'realtime',
|
|
104
|
-
// Added by wave 4
|
|
106
|
+
// Added by wave 4. Adding a capability key is a THREE-place change
|
|
105
107
|
// and all three land together: here, `CAP_ICONS` in the website's
|
|
106
108
|
// marketplace data (note `CAP_META` derives from it), and a
|
|
107
109
|
// `marketplaceData.cap.<key>` label in all eight locales.
|
|
@@ -111,8 +113,8 @@ export const MANIFEST_CAPABILITIES = [
|
|
|
111
113
|
'oauth-connect',
|
|
112
114
|
];
|
|
113
115
|
export const capabilitySchema = z.enum(MANIFEST_CAPABILITIES);
|
|
114
|
-
// ──
|
|
115
|
-
/** The three meta/data engines Adminium can talk to
|
|
116
|
+
// ── compatibility ────────────────────────────────────────────────────────────
|
|
117
|
+
/** The three meta/data engines Adminium can talk to. */
|
|
116
118
|
export const MANIFEST_ENGINES = ['postgres', 'mysql', 'sqlite'];
|
|
117
119
|
export const compatibilitySchema = z
|
|
118
120
|
.object({
|
|
@@ -121,12 +123,12 @@ export const compatibilitySchema = z
|
|
|
121
123
|
/**
|
|
122
124
|
* Which data engines this app's `requiredSchema` actually works on.
|
|
123
125
|
*
|
|
124
|
-
* ADDED rather than dropped from the manifests
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
126
|
+
* ADDED rather than dropped from the manifests. Thirteen shipped manifests
|
|
127
|
+
* already carried `engines` and this `.strict()` schema rejected every one
|
|
128
|
+
* — it is a spec field that never reached the code. The information is
|
|
129
|
+
* real: an app whose schema uses Postgres-only DDL cannot be installed
|
|
130
|
+
* against SQLite, and deleting the field to satisfy the validator would
|
|
131
|
+
* have thrown away the only place that is written down.
|
|
130
132
|
*
|
|
131
133
|
* Optional and additive, so nothing that validated before stops.
|
|
132
134
|
*/
|
|
@@ -134,8 +136,8 @@ export const compatibilitySchema = z
|
|
|
134
136
|
requires: z.array(capabilitySchema).optional(),
|
|
135
137
|
})
|
|
136
138
|
.strict();
|
|
137
|
-
// ──
|
|
138
|
-
/** Abstract column types the introspection engine emits (
|
|
139
|
+
// ── requiredSchema (create-or-map) ───────────────────────────────────────────
|
|
140
|
+
/** Abstract column types the introspection engine emits (research). */
|
|
139
141
|
export const COLUMN_TYPES = [
|
|
140
142
|
'id',
|
|
141
143
|
'text',
|
|
@@ -153,7 +155,7 @@ export const COLUMN_TYPES = [
|
|
|
153
155
|
'fk',
|
|
154
156
|
'blob',
|
|
155
157
|
];
|
|
156
|
-
/** Optional semantic pre-seed so widgets auto-instantiate
|
|
158
|
+
/** Optional semantic pre-seed so widgets auto-instantiate. */
|
|
157
159
|
export const COLUMN_SEMANTICS = [
|
|
158
160
|
'name',
|
|
159
161
|
'money',
|
|
@@ -163,7 +165,7 @@ export const COLUMN_SEMANTICS = [
|
|
|
163
165
|
'geo-lat',
|
|
164
166
|
'geo-lng',
|
|
165
167
|
];
|
|
166
|
-
/** Structural role markers
|
|
168
|
+
/** Structural role markers. */
|
|
167
169
|
export const COLUMN_ROLES = ['pk', 'created_at', 'updated_at'];
|
|
168
170
|
export const requiredColumnSchema = z
|
|
169
171
|
.object({
|
|
@@ -201,7 +203,7 @@ export const requiredSchemaSchema = z
|
|
|
201
203
|
message: 'duplicate table ref in requiredSchema',
|
|
202
204
|
path: ['tables'],
|
|
203
205
|
});
|
|
204
|
-
// ──
|
|
206
|
+
// ── pages ────────────────────────────────────────────────────────────────────
|
|
205
207
|
export const pageNavSchema = z
|
|
206
208
|
.object({
|
|
207
209
|
group: z.string().min(1).max(80),
|
|
@@ -220,7 +222,7 @@ export const pageSchema = z
|
|
|
220
222
|
config: z.record(z.string(), z.unknown()).optional(),
|
|
221
223
|
})
|
|
222
224
|
.strict();
|
|
223
|
-
// ──
|
|
225
|
+
// ── roles ────────────────────────────────────────────────────────────────────
|
|
224
226
|
export const roleSchema = z
|
|
225
227
|
.object({
|
|
226
228
|
key: z.string().regex(/^[a-z][a-z0-9-]*$/, 'role key must be a kebab-case identifier'),
|
|
@@ -230,18 +232,18 @@ export const roleSchema = z
|
|
|
230
232
|
permissions: z.array(z.string().min(1)).optional(),
|
|
231
233
|
})
|
|
232
234
|
.strict();
|
|
233
|
-
// ──
|
|
235
|
+
// ── settings ─────────────────────────────────────────────────────────────────
|
|
234
236
|
const settingBase = {
|
|
235
237
|
key: z.string().regex(/^[a-z][a-z0-9_]*$/, 'setting key must be snake_case'),
|
|
236
238
|
required: z.boolean().optional(),
|
|
237
239
|
secret: z.boolean().optional(),
|
|
238
240
|
label: i18nMessageSchema.optional(),
|
|
239
241
|
/*
|
|
240
|
-
* The sentence UNDER the field, where a label alone cannot carry the
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
*
|
|
242
|
+
* The sentence UNDER the field, where a label alone cannot carry the
|
|
243
|
+
* answer. Every variant below is `.strict()`, so a manifest that wrote
|
|
244
|
+
* `help` without this line was rejected rather than ignored — which is why
|
|
245
|
+
* it rides the same release as `RESERVED_KEYS` above rather than waiting
|
|
246
|
+
* for a settings form to need it.
|
|
245
247
|
*/
|
|
246
248
|
help: i18nMessageSchema.optional(),
|
|
247
249
|
};
|
|
@@ -275,11 +277,11 @@ export const settingSchema = z.discriminatedUnion('type', [
|
|
|
275
277
|
.strict(),
|
|
276
278
|
z.object({ ...settingBase, type: z.literal('json'), default: z.unknown().optional() }).strict(),
|
|
277
279
|
]);
|
|
278
|
-
// ──
|
|
280
|
+
// ── seeds ────────────────────────────────────────────────────────────────────
|
|
279
281
|
export const seedSchema = z
|
|
280
282
|
.object({
|
|
281
283
|
table: z.string().min(1),
|
|
282
|
-
// inline rows, or a reference to a bundled seeds/<file> dataset
|
|
284
|
+
// inline rows, or a reference to a bundled seeds/<file> dataset.
|
|
283
285
|
rows: z.array(z.record(z.string(), z.unknown())).optional(),
|
|
284
286
|
file: z.string().min(1).optional(),
|
|
285
287
|
})
|
|
@@ -287,14 +289,14 @@ export const seedSchema = z
|
|
|
287
289
|
.refine((s) => (s.rows === undefined) !== (s.file === undefined), {
|
|
288
290
|
message: 'a seed provides exactly one of `rows` or `file`',
|
|
289
291
|
});
|
|
290
|
-
// ──
|
|
292
|
+
// ── widgets (optional custom bundles) ────────────────────────────────────────
|
|
291
293
|
export const manifestWidgetSchema = z
|
|
292
294
|
.object({
|
|
293
295
|
id: z.string().min(1).max(80),
|
|
294
296
|
entry: z.string().min(1),
|
|
295
297
|
})
|
|
296
298
|
.strict();
|
|
297
|
-
// ──
|
|
299
|
+
// ── frontend ─────────────────────────────────────────────────────────────────
|
|
298
300
|
export const FRONTEND_KINDS = ['spa', 'electron', 'none'];
|
|
299
301
|
export const frontendEnvVarSchema = z
|
|
300
302
|
.object({
|
|
@@ -303,7 +305,7 @@ export const frontendEnvVarSchema = z
|
|
|
303
305
|
})
|
|
304
306
|
.strict();
|
|
305
307
|
/**
|
|
306
|
-
* Which of the three sides a frontend is
|
|
308
|
+
* Which of the three sides a frontend is.
|
|
307
309
|
*
|
|
308
310
|
* The product rule this exists to make CHECKABLE: a micro-SaaS is the Adminium
|
|
309
311
|
* dashboard (mandatory, and never declared here — it comes from introspection)
|
|
@@ -315,7 +317,7 @@ export const frontendSchema = z
|
|
|
315
317
|
.object({
|
|
316
318
|
/**
|
|
317
319
|
* REQUIRED, and the whole point of the array form. Without it the split
|
|
318
|
-
* lives only in prose and nothing can enforce
|
|
320
|
+
* lives only in prose and nothing can enforce rule.
|
|
319
321
|
*/
|
|
320
322
|
side: z.enum(FRONTEND_SIDES),
|
|
321
323
|
kind: z.enum(FRONTEND_KINDS),
|
|
@@ -326,15 +328,15 @@ export const frontendSchema = z
|
|
|
326
328
|
*
|
|
327
329
|
* RE-ADMITTED, not newly invented. Eleven shipped manifests already carry
|
|
328
330
|
* this key and the `.strict()` schema rejected every one of them — while
|
|
329
|
-
* being, per the
|
|
330
|
-
*
|
|
331
|
-
* normalization was the tempting move and would have made
|
|
331
|
+
* being, per the fleet audit, "the only machine-readable record of the
|
|
332
|
+
* staff/customer split anywhere in the fleet". Deleting it during
|
|
333
|
+
* normalization was the tempting move and would have made rule
|
|
332
334
|
* permanently uncheckable.
|
|
333
335
|
*/
|
|
334
336
|
routes: z.record(z.string(), z.string()).optional(),
|
|
335
337
|
})
|
|
336
338
|
.strict();
|
|
337
|
-
/**
|
|
339
|
+
/** Hosted-only and offline-required are mutually exclusive. */
|
|
338
340
|
const capabilitiesNotContradictory = (m) => !((m.capabilities?.includes('hosted-only') ?? false) &&
|
|
339
341
|
(m.capabilities?.includes('offline-required') ?? false));
|
|
340
342
|
/** maxAdminiumVersion (exclusive) must be strictly above the min. */
|
|
@@ -383,7 +385,7 @@ export const appManifestSchema = z
|
|
|
383
385
|
widgets: z.array(manifestWidgetSchema).optional(),
|
|
384
386
|
capabilities: z.array(capabilitySchema).optional(),
|
|
385
387
|
/**
|
|
386
|
-
* ONE OR MORE SIDES
|
|
388
|
+
* ONE OR MORE SIDES. Replaces the singular `frontend`.
|
|
387
389
|
*
|
|
388
390
|
* `minItems: 1` is the gate: a manifest declaring no side does not validate,
|
|
389
391
|
* which is what turns "dashboard mandatory, staff optional, customer
|
|
@@ -398,9 +400,20 @@ export const appManifestSchema = z
|
|
|
398
400
|
.refine(compatibilityWindowOrdered, { ...WINDOW_MESSAGE, path: [...WINDOW_MESSAGE.path] })
|
|
399
401
|
.refine(sidesAreDistinct, { ...SIDES_MESSAGE, path: [...SIDES_MESSAGE.path] });
|
|
400
402
|
/**
|
|
401
|
-
* `pages` and `
|
|
402
|
-
*
|
|
403
|
-
*
|
|
403
|
+
* `pages`, `roles` and `frontends` are absent from this branch on purpose, and
|
|
404
|
+
* leaving the fields off a `.strict()` schema entirely is a stronger guarantee
|
|
405
|
+
* than a lint rule.
|
|
406
|
+
*
|
|
407
|
+
* WHAT CHANGED, AND WHAT DID NOT. An add-on may now own a dashboard page — but
|
|
408
|
+
* it declares that page as CODE, inside `addOn.pages`, never as a `pages` entry
|
|
409
|
+
* up here. The two are
|
|
410
|
+
* different things wearing one word: a `pages` row is a generated page, a
|
|
411
|
+
* `template` the engine renders with `bindings` and `config`, and an add-on
|
|
412
|
+
* still cannot install one. Roles and frontends remain refused outright.
|
|
413
|
+
*
|
|
414
|
+
* So the absence of `pages` from this object is no longer "an add-on has no
|
|
415
|
+
* pages". It is "an add-on's pages are not the engine's page templates", which
|
|
416
|
+
* is a narrower promise and the one this shape actually keeps.
|
|
404
417
|
*/
|
|
405
418
|
export const addOnManifestSchema = z
|
|
406
419
|
.object({
|
|
@@ -431,8 +444,8 @@ export function isAddOnManifest(m) {
|
|
|
431
444
|
return m.kind === 'add-on';
|
|
432
445
|
}
|
|
433
446
|
/**
|
|
434
|
-
* Cross-block rules the envelope cannot express, each with its issue
|
|
435
|
-
*
|
|
447
|
+
* Cross-block rules the envelope cannot express, each with its issue
|
|
448
|
+
* code. Runs only for `kind: "add-on"`; returns [] for an app.
|
|
436
449
|
*/
|
|
437
450
|
export function addOnIssues(m, ctx = {}) {
|
|
438
451
|
if (!isAddOnManifest(m))
|
|
@@ -461,6 +474,20 @@ export function addOnIssues(m, ctx = {}) {
|
|
|
461
474
|
});
|
|
462
475
|
}
|
|
463
476
|
});
|
|
477
|
+
/*
|
|
478
|
+
* THERE IS NO NAV_GROUP_UNKNOWN CHECK HERE, AND THAT IS DELIBERATE.
|
|
479
|
+
*
|
|
480
|
+
* A page whose group is neither built in nor declared is refused by
|
|
481
|
+
* `addOnBlockSchema` itself, and these cross-block rules run only on a
|
|
482
|
+
* manifest that has already parsed — so a check here could never fire. It was
|
|
483
|
+
* written, and removed once its own test proved it unreachable: the refusal
|
|
484
|
+
* arrived as a schema issue with no code.
|
|
485
|
+
*
|
|
486
|
+
* SLOT_UNKNOWN above is the same shape and is kept, labelled "belt and
|
|
487
|
+
* braces". One unreachable branch is not a reason for a second: this
|
|
488
|
+
* repository has shipped four features that passed every test and could not
|
|
489
|
+
* be called, and a validator branch nobody can reach is where that starts.
|
|
490
|
+
*/
|
|
464
491
|
// SCOPE_OUT_OF_RANGE — a `records:<table>:<verb>` scope must name a table this
|
|
465
492
|
// add-on can actually reach: one of the host app's, or one of its own.
|
|
466
493
|
const reachable = new Set([
|
|
@@ -520,7 +547,7 @@ export function addOnIssues(m, ctx = {}) {
|
|
|
520
547
|
/**
|
|
521
548
|
* Numeric semver compare on the release triple (pre-release/build ignored —
|
|
522
549
|
* enough for the compatibility-window and upgrade ordering checks). Returns
|
|
523
|
-
* <0, 0, >0. Exported for the installer's upgrade rule
|
|
550
|
+
* <0, 0, >0. Exported for the installer's upgrade rule.
|
|
524
551
|
*/
|
|
525
552
|
export function compareSemver(a, b) {
|
|
526
553
|
const triple = (v) => v
|
package/dist/schema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC;;;;;;;;;GASG;AAEH,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,QAAQ,GAET,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,sEAAsE;AACtE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAElC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAU,CAAC;AACzD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AAGzD,2EAA2E;AAC3E,MAAM,MAAM,GACV,2HAA2H,CAAC;AAC9H,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,2CAA2C,CAAC,CAAC;AAErF,mFAAmF;AACnF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC;KAC/B,MAAM,CAAC;IACN,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAC/B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;CACrC,CAAC;KACD,MAAM,EAAE,CAAC;AAGZ,gFAAgF;AAEhF,6CAA6C;AAC7C,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,UAAU;IACV,aAAa;IACb,YAAY;IACZ,KAAK;IACL,gBAAgB;CACR,CAAC;AACX,M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E,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAC3C,MAAM,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAC3C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AACvC,CAAC"}
|
package/dist/validate.d.ts
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Manifest validation entry point
|
|
3
|
-
*
|
|
4
|
-
* `
|
|
5
|
-
*
|
|
2
|
+
* Manifest validation entry point. Layers the envelope schema with the v1
|
|
3
|
+
* publisher policy: the installer rejects any `publisher.id` other than
|
|
4
|
+
* `adminium` unless the `third-party-publishers` feature flag is on (off
|
|
5
|
+
* in v1). Pure — safe in the browser storefront.
|
|
6
6
|
*/
|
|
7
7
|
import { type Manifest } from './schema.js';
|
|
8
8
|
export interface ManifestIssue {
|
|
9
9
|
/** Dotted path to the offending field, e.g. `publisher.id`. */
|
|
10
10
|
path: string;
|
|
11
11
|
message: string;
|
|
12
|
-
/** Issue code for the add-on rules
|
|
12
|
+
/** Issue code for the add-on rules; absent for schema issues. */
|
|
13
13
|
code?: string;
|
|
14
14
|
}
|
|
15
15
|
export interface ValidateManifestOptions {
|
|
16
16
|
/**
|
|
17
17
|
* Allow a non-`adminium` publisher. Wired to the `third-party-publishers`
|
|
18
|
-
* feature flag
|
|
18
|
+
* feature flag; OFF in v1, so third-party manifests are rejected.
|
|
19
19
|
*
|
|
20
20
|
* For an add-on the gate matters MORE, not less: an add-on's server half runs
|
|
21
|
-
* in the host process with no sandbox
|
|
22
|
-
*
|
|
23
|
-
*
|
|
21
|
+
* in the host process with no sandbox, so an unsandboxed in-process add-on
|
|
22
|
+
* from an unknown publisher would be remote code execution with a marketplace
|
|
23
|
+
* in front of it.
|
|
24
24
|
*/
|
|
25
25
|
allowThirdPartyPublishers?: boolean;
|
|
26
|
-
/** Installed app keys, so an add-on's `attaches` can be checked
|
|
26
|
+
/** Installed app keys, so an add-on's `attaches` can be checked. */
|
|
27
27
|
knownAppKeys?: readonly string[];
|
|
28
28
|
/** The host app's table refs, so an add-on's `scopes` can be bounded. */
|
|
29
29
|
hostTables?: readonly string[];
|
package/dist/validate.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AAEH,OAAO,EAKL,KAAK,QAAQ,EACd,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,aAAa;IAC5B,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AAEH,OAAO,EAKL,KAAK,QAAQ,EACd,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,aAAa;IAC5B,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,iEAAiE;IACjE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,uBAAuB;IACtC;;;;;;;;OAQG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,oEAAoE;IACpE,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,yEAAyE;IACzE,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAChC;AAED,MAAM,MAAM,sBAAsB,GAC9B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,QAAQ,CAAA;CAAE,GAChC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,aAAa,EAAE,CAAA;CAAE,CAAC;AAE3C;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,OAAO,EACd,IAAI,GAAE,uBAA4B,GACjC,sBAAsB,CAwCxB;AAED,0FAA0F;AAC1F,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,GAAE,uBAA4B,GAAG,QAAQ,CAO1F"}
|
package/dist/validate.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
2
2
|
/**
|
|
3
|
-
* Manifest validation entry point
|
|
4
|
-
*
|
|
5
|
-
* `
|
|
6
|
-
*
|
|
3
|
+
* Manifest validation entry point. Layers the envelope schema with the v1
|
|
4
|
+
* publisher policy: the installer rejects any `publisher.id` other than
|
|
5
|
+
* `adminium` unless the `third-party-publishers` feature flag is on (off
|
|
6
|
+
* in v1). Pure — safe in the browser storefront.
|
|
7
7
|
*/
|
|
8
8
|
import { FIRST_PARTY_PUBLISHER_ID, RESERVED_KEYS, addOnIssues, manifestSchema, } from './schema.js';
|
|
9
9
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adminiumjs/manifest",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0-rc.1",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@adminium/add-on-contracts": "npm:@adminiumjs/add-on-contracts@0.
|
|
23
|
+
"@adminium/add-on-contracts": "npm:@adminiumjs/add-on-contracts@0.3.0-rc.1",
|
|
24
24
|
"zod": "^4.4.3"
|
|
25
25
|
},
|
|
26
26
|
"files": [
|