@forge-cms/runtime 0.7.0 → 0.8.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/dist/runtime.d.ts +27 -3
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +125 -29
- package/dist/runtime.js.map +1 -1
- package/package.json +7 -7
package/dist/runtime.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ForgeCmsConfig, AdapterSet } from './config.js';
|
|
2
2
|
import type { CollectionBySlug, CollectionDefinition, CollectionDocument, CollectionRegistry, CollectionSlug, GlobalDefinition } from '@forge-cms/core';
|
|
3
|
-
import type { DatabaseRecord } from '@forge-cms/db';
|
|
3
|
+
import type { DatabaseRecord, SchemaPlan } from '@forge-cms/db';
|
|
4
4
|
import type { OperationContext } from './context.js';
|
|
5
5
|
import type { ReconcileStorageOptions, ReconcileStorageReport } from './storage-intents.js';
|
|
6
6
|
import type { TypedCountArgs, TypedCreateArgs, TypedDeleteArgs, TypedFindArgs, TypedFindByIDArgs, TypedFindOneArgs, TypedPaginatedDocs, TypedPreviewArgs, TypedUpdateArgs } from './typed-api.js';
|
|
@@ -33,13 +33,37 @@ export declare class ForgeCmsRuntime<TEnv = unknown, TCollections extends Collec
|
|
|
33
33
|
private wireManagedDeleteGuards;
|
|
34
34
|
/** Initialise all adapters with the runtime environment */
|
|
35
35
|
init(): this;
|
|
36
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* Creates and additively upgrades every table the CMS uses: collections, `_global_<slug>`,
|
|
38
|
+
* `_versions_<slug>`, `_forge_storage_intents`, and the auth adapter's own tables.
|
|
39
|
+
*
|
|
40
|
+
* Plan first (spec 070): when the database implements `planSchema`, the whole schema — including the
|
|
41
|
+
* auth adapter's tables — is planned before anything runs. Any change that needs a reviewed
|
|
42
|
+
* migration throws `SchemaDriftError` with **no table touched anywhere**. Otherwise each area is
|
|
43
|
+
* synced (fresh tables and safe additive changes only). A database without `planSchema` keeps its
|
|
44
|
+
* own `syncSchema` behaviour, unplanned.
|
|
45
|
+
*/
|
|
37
46
|
syncSchema(): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* The complete schema drift plan (spec 070) for every table {@link syncSchema} manages, merged with
|
|
49
|
+
* the auth adapter's own (`AuthAdapter.planSchema`). Read-only: inspects the database and runs
|
|
50
|
+
* aggregate probes, never DDL or writes. Throws when the database adapter cannot inspect its
|
|
51
|
+
* persisted schema — an uninspectable schema is never reported as compatible.
|
|
52
|
+
*/
|
|
53
|
+
planSchema(): Promise<SchemaPlan>;
|
|
54
|
+
/** Every table definition this runtime syncs through its database adapter. */
|
|
55
|
+
private tableDefinitions;
|
|
56
|
+
/**
|
|
57
|
+
* The refusal for a blocking plan. Duplicate version identities keep spec 062's domain diagnostic
|
|
58
|
+
* (examples and the inspection query) instead of the generic index conflict.
|
|
59
|
+
*/
|
|
60
|
+
private schemaDriftError;
|
|
38
61
|
/**
|
|
39
62
|
* Creates/extends one `_versions_<slug>` table additively. Adding its unique
|
|
40
63
|
* `(documentId, versionNumber)` index fails on a database that already holds duplicate version
|
|
41
64
|
* identities (only the pre-062 read-then-insert race produced them): history is then reported, never
|
|
42
|
-
* deleted, renumbered or merged — the operator decides (spec 062 §8
|
|
65
|
+
* deleted, renumbered or merged — the operator decides (spec 062 §8). Planning (spec 070) normally
|
|
66
|
+
* reports this before anything runs; this path covers adapters without `planSchema`.
|
|
43
67
|
*/
|
|
44
68
|
private syncVersionTable;
|
|
45
69
|
/** Find a collection definition by slug */
|
package/dist/runtime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,KAAK,EACV,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,cA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;OAMG;IACH,OAAO,CAAC,KAAK,SAAS,cAAc,CAAC,YAAY,CAAC,EAChD,IAAI,EAAE,gBAAgB,CAAC,YAAY,EAAE,KAAK,CAAC,GAC1C,OAAO,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC,CAAC;CAKtE;AA+BD;;;;;;;;GAQG;AAEH,MAAM,MAAM,kBAAkB,CAAC,IAAI,GAAG,OAAO,IAAI,eAAe,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC"}
|
package/dist/runtime.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SchemaDriftError, formatSchemaPlan, mergeSchemaPlans, resolveCollectionIndexes } from '@forge-cms/db';
|
|
1
2
|
import { isReferenced, noReferenceAssertions, validateRelationSchema } from './relation-lifecycle.js';
|
|
2
3
|
import * as operations from './operations.js';
|
|
3
4
|
import { validateLocalizationSchema } from './localization.js';
|
|
@@ -83,25 +84,19 @@ export class ForgeCmsRuntime {
|
|
|
83
84
|
this.adapters.storage.init(env);
|
|
84
85
|
return this;
|
|
85
86
|
}
|
|
86
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* Creates and additively upgrades every table the CMS uses: collections, `_global_<slug>`,
|
|
89
|
+
* `_versions_<slug>`, `_forge_storage_intents`, and the auth adapter's own tables.
|
|
90
|
+
*
|
|
91
|
+
* Plan first (spec 070): when the database implements `planSchema`, the whole schema — including the
|
|
92
|
+
* auth adapter's tables — is planned before anything runs. Any change that needs a reviewed
|
|
93
|
+
* migration throws `SchemaDriftError` with **no table touched anywhere**. Otherwise each area is
|
|
94
|
+
* synced (fresh tables and safe additive changes only). A database without `planSchema` keeps its
|
|
95
|
+
* own `syncSchema` behaviour, unplanned.
|
|
96
|
+
*/
|
|
87
97
|
async syncSchema() {
|
|
88
|
-
await this.adapters.database.syncSchema(this.config.collections);
|
|
89
|
-
await this.adapters.auth.syncSchema?.();
|
|
90
|
-
// Durable storage-cleanup intents (spec 067), only where uploads exist.
|
|
91
|
-
if (hasUploadCollections(this.config.collections)) {
|
|
92
|
-
await this.adapters.database.syncSchema([storageIntentsDefinition()]);
|
|
93
|
-
}
|
|
94
|
-
for (const global of this.config.globals ?? []) {
|
|
95
|
-
await this.adapters.database.syncSchema([
|
|
96
|
-
{
|
|
97
|
-
slug: `_global_${global.slug}`,
|
|
98
|
-
fields: global.fields,
|
|
99
|
-
...(global.drafts === true && { drafts: true })
|
|
100
|
-
}
|
|
101
|
-
]);
|
|
102
|
-
}
|
|
103
|
-
// Version tables for collections with versions enabled (spec 062 §1/§8).
|
|
104
98
|
const versioned = this.config.collections.filter((c) => versionOps.versionsEnabled(c));
|
|
99
|
+
// Checked before anything is created: history needs a document and its snapshot to commit together.
|
|
105
100
|
if (versioned.length > 0) {
|
|
106
101
|
const database = this.adapters.database;
|
|
107
102
|
if (typeof database.atomicWrite !== 'function') {
|
|
@@ -110,15 +105,104 @@ export class ForgeCmsRuntime {
|
|
|
110
105
|
`snapshot must commit together (specs 060/062); '${String(database.name)}' does not.`);
|
|
111
106
|
}
|
|
112
107
|
}
|
|
108
|
+
if (typeof this.adapters.database.planSchema === 'function') {
|
|
109
|
+
const plan = await this.planSchema();
|
|
110
|
+
if (plan.blocking)
|
|
111
|
+
throw await this.schemaDriftError(plan);
|
|
112
|
+
}
|
|
113
|
+
await this.adapters.database.syncSchema(this.config.collections);
|
|
114
|
+
await this.adapters.auth.syncSchema?.();
|
|
115
|
+
// Durable storage-cleanup intents (spec 067), only where uploads exist.
|
|
116
|
+
if (hasUploadCollections(this.config.collections)) {
|
|
117
|
+
await this.adapters.database.syncSchema([storageIntentsDefinition()]);
|
|
118
|
+
}
|
|
119
|
+
for (const global of this.config.globals ?? []) {
|
|
120
|
+
await this.adapters.database.syncSchema([globalTableDefinition(global)]);
|
|
121
|
+
}
|
|
122
|
+
// Version tables for collections with versions enabled (spec 062 §1/§8).
|
|
113
123
|
for (const collection of versioned) {
|
|
114
124
|
await this.syncVersionTable(collection);
|
|
115
125
|
}
|
|
116
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* The complete schema drift plan (spec 070) for every table {@link syncSchema} manages, merged with
|
|
129
|
+
* the auth adapter's own (`AuthAdapter.planSchema`). Read-only: inspects the database and runs
|
|
130
|
+
* aggregate probes, never DDL or writes. Throws when the database adapter cannot inspect its
|
|
131
|
+
* persisted schema — an uninspectable schema is never reported as compatible.
|
|
132
|
+
*/
|
|
133
|
+
async planSchema() {
|
|
134
|
+
const database = this.adapters.database;
|
|
135
|
+
if (typeof database.planSchema !== 'function') {
|
|
136
|
+
throw new Error(`The '${database.name}' database adapter cannot inspect its persisted schema: it does not ` +
|
|
137
|
+
`implement DatabaseAdapter.planSchema() (spec 070), so ForgeCMS cannot tell whether that ` +
|
|
138
|
+
`schema is compatible with this configuration.`);
|
|
139
|
+
}
|
|
140
|
+
const plans = [await database.planSchema(this.tableDefinitions())];
|
|
141
|
+
const auth = await this.adapters.auth.planSchema?.();
|
|
142
|
+
if (auth)
|
|
143
|
+
plans.push(auth);
|
|
144
|
+
return mergeSchemaPlans(plans);
|
|
145
|
+
}
|
|
146
|
+
/** Every table definition this runtime syncs through its database adapter. */
|
|
147
|
+
tableDefinitions() {
|
|
148
|
+
return [
|
|
149
|
+
...this.config.collections,
|
|
150
|
+
...(hasUploadCollections(this.config.collections) ? [storageIntentsDefinition()] : []),
|
|
151
|
+
...(this.config.globals ?? []).map(globalTableDefinition),
|
|
152
|
+
...this.config.collections
|
|
153
|
+
.filter((c) => versionOps.versionsEnabled(c))
|
|
154
|
+
.map((c) => versionOps.versionCollectionDefinition(c.slug))
|
|
155
|
+
];
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* The refusal for a blocking plan. Duplicate version identities keep spec 062's domain diagnostic
|
|
159
|
+
* (examples and the inspection query) instead of the generic index conflict.
|
|
160
|
+
*/
|
|
161
|
+
async schemaDriftError(plan) {
|
|
162
|
+
for (const collection of this.config.collections.filter((c) => versionOps.versionsEnabled(c))) {
|
|
163
|
+
const definition = versionOps.versionCollectionDefinition(collection.slug);
|
|
164
|
+
const identityIndex = resolveCollectionIndexes(definition)[0]?.name;
|
|
165
|
+
const conflict = plan.changes.find((change) => change.table === definition.slug &&
|
|
166
|
+
change.target.name === identityIndex &&
|
|
167
|
+
(change.duplicateGroups ?? 0) > 0);
|
|
168
|
+
if (!conflict)
|
|
169
|
+
continue;
|
|
170
|
+
try {
|
|
171
|
+
// Registers just the identity columns with the adapter so the scan can read them (the blocked
|
|
172
|
+
// plan added none of the table's new columns). This sync blocks by construction, whatever
|
|
173
|
+
// another process does meanwhile: the stored version table always has `data`/`createdAt`,
|
|
174
|
+
// which this definition omits (`column-removed`). So it runs no DDL and writes no baseline.
|
|
175
|
+
// Like any refused sync, it leaves the adapter unfit for use until a sync succeeds; that
|
|
176
|
+
// successful sync registers the full definition again.
|
|
177
|
+
const identity = definition.fields;
|
|
178
|
+
await this.adapters.database
|
|
179
|
+
.syncSchema([
|
|
180
|
+
{
|
|
181
|
+
...definition,
|
|
182
|
+
fields: {
|
|
183
|
+
...(identity.documentId && { documentId: identity.documentId }),
|
|
184
|
+
...(identity.versionNumber && { versionNumber: identity.versionNumber })
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
])
|
|
188
|
+
.catch(() => undefined);
|
|
189
|
+
const duplicates = await versionOps.findDuplicateVersionIdentities(this.adapters.database, definition.slug);
|
|
190
|
+
if (duplicates.length > 0) {
|
|
191
|
+
return new SchemaDriftError(plan, `${duplicateVersionMessage(definition.slug, duplicates)}\n\n${formatSchemaPlan(plan)}`);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
catch {
|
|
195
|
+
// Fall through to the generic report, which still names the conflict.
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
return new SchemaDriftError(plan);
|
|
199
|
+
}
|
|
117
200
|
/**
|
|
118
201
|
* Creates/extends one `_versions_<slug>` table additively. Adding its unique
|
|
119
202
|
* `(documentId, versionNumber)` index fails on a database that already holds duplicate version
|
|
120
203
|
* identities (only the pre-062 read-then-insert race produced them): history is then reported, never
|
|
121
|
-
* deleted, renumbered or merged — the operator decides (spec 062 §8
|
|
204
|
+
* deleted, renumbered or merged — the operator decides (spec 062 §8). Planning (spec 070) normally
|
|
205
|
+
* reports this before anything runs; this path covers adapters without `planSchema`.
|
|
122
206
|
*/
|
|
123
207
|
async syncVersionTable(collection) {
|
|
124
208
|
const definition = versionOps.versionCollectionDefinition(collection.slug);
|
|
@@ -135,17 +219,7 @@ export class ForgeCmsRuntime {
|
|
|
135
219
|
}
|
|
136
220
|
if (duplicates.length === 0)
|
|
137
221
|
throw err;
|
|
138
|
-
|
|
139
|
-
.slice(0, 5)
|
|
140
|
-
.map((d) => `document "${d.documentId}" version ${d.versionNumber} (${d.rows} rows)`)
|
|
141
|
-
.join('; ');
|
|
142
|
-
throw new Error(`Cannot add the unique (documentId, versionNumber) index to "${definition.slug}": it already ` +
|
|
143
|
-
`contains ${duplicates.length} duplicate version ${duplicates.length === 1 ? 'identity' : 'identities'} ` +
|
|
144
|
-
`— e.g. ${examples}. They were produced by concurrent updates before ForgeCMS enforced ` +
|
|
145
|
-
`version identity. ForgeCMS will not delete, renumber or merge version history automatically. ` +
|
|
146
|
-
`Inspect them with: SELECT "documentId", "versionNumber", COUNT(*) FROM "${definition.slug}" ` +
|
|
147
|
-
`GROUP BY "documentId", "versionNumber" HAVING COUNT(*) > 1; decide which rows to keep ` +
|
|
148
|
-
`(renumber or delete the extras after taking a backup), then restart.`, { cause: err });
|
|
222
|
+
throw new Error(duplicateVersionMessage(definition.slug, duplicates), { cause: err });
|
|
149
223
|
}
|
|
150
224
|
}
|
|
151
225
|
/** Find a collection definition by slug */
|
|
@@ -237,4 +311,26 @@ export class ForgeCmsRuntime {
|
|
|
237
311
|
return operations.preview(this, args);
|
|
238
312
|
}
|
|
239
313
|
}
|
|
314
|
+
/** The internal table a global is stored in. */
|
|
315
|
+
function globalTableDefinition(global) {
|
|
316
|
+
return {
|
|
317
|
+
slug: `_global_${global.slug}`,
|
|
318
|
+
fields: global.fields,
|
|
319
|
+
...(global.drafts === true && { drafts: true })
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
/** Spec 062's diagnostic for historical duplicate version identities. */
|
|
323
|
+
function duplicateVersionMessage(slug, duplicates) {
|
|
324
|
+
const examples = duplicates
|
|
325
|
+
.slice(0, 5)
|
|
326
|
+
.map((d) => `document "${d.documentId}" version ${d.versionNumber} (${d.rows} rows)`)
|
|
327
|
+
.join('; ');
|
|
328
|
+
return (`Cannot add the unique (documentId, versionNumber) index to "${slug}": it already ` +
|
|
329
|
+
`contains ${duplicates.length} duplicate version ${duplicates.length === 1 ? 'identity' : 'identities'} ` +
|
|
330
|
+
`— e.g. ${examples}. They were produced by concurrent updates before ForgeCMS enforced ` +
|
|
331
|
+
`version identity. ForgeCMS will not delete, renumber or merge version history automatically. ` +
|
|
332
|
+
`Inspect them with: SELECT "documentId", "versionNumber", COUNT(*) FROM "${slug}" ` +
|
|
333
|
+
`GROUP BY "documentId", "versionNumber" HAVING COUNT(*) > 1; decide which rows to keep ` +
|
|
334
|
+
`(renumber or delete the extras after taking a backup), then restart.`);
|
|
335
|
+
}
|
|
240
336
|
//# sourceMappingURL=runtime.js.map
|
package/dist/runtime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,wBAAwB,EACzB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAA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CAAC;SACpF,IAAI,CAAC,IAAI,CAAC,CAAC;IACd,OAAO,CACL,+DAA+D,IAAI,gBAAgB;QACnF,YAAY,UAAU,CAAC,MAAM,sBAAsB,UAAU,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,GAAG;QACzG,UAAU,QAAQ,sEAAsE;QACxF,+FAA+F;QAC/F,2EAA2E,IAAI,IAAI;QACnF,wFAAwF;QACxF,sEAAsE,CACvE,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge-cms/runtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Runtime orchestrator for ForgeCMS — binds schema, adapters, and handlers.",
|
|
5
5
|
"author": "ForgeCMS contributors",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@forge-cms/api": "0.
|
|
39
|
-
"@forge-cms/auth": "0.
|
|
40
|
-
"@forge-cms/
|
|
41
|
-
"@forge-cms/
|
|
42
|
-
"@forge-cms/
|
|
38
|
+
"@forge-cms/api": "0.8.0",
|
|
39
|
+
"@forge-cms/auth": "0.8.0",
|
|
40
|
+
"@forge-cms/storage": "0.8.0",
|
|
41
|
+
"@forge-cms/core": "0.8.0",
|
|
42
|
+
"@forge-cms/db": "0.8.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@libsql/client": "0.17.3",
|
|
46
46
|
"typescript": "5.9.2",
|
|
47
47
|
"vitest": "4.1.6",
|
|
48
|
-
"@forge-cms/testing": "0.
|
|
48
|
+
"@forge-cms/testing": "0.8.0"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"build": "tsc -p tsconfig.build.json",
|