alinea 2.0.0-preview.8 → 2.0.0-preview.9
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/.init/content/pages/welcome.json +1 -1
- package/dist/LICENSES.md +136 -136
- package/dist/adapter/next/cms.js +24 -8
- package/dist/adapter/next/handler.js +63 -10
- package/dist/adapter/next/renderStats.d.ts +25 -4
- package/dist/adapter/next/renderStats.js +71 -3
- package/dist/adapter/next/syncCheck.js +2 -8
- package/dist/adapter/next/with-alinea.js +6 -2
- package/dist/backend/HandleAction.d.ts +1 -1
- package/dist/backend/HandleAction.js +1 -1
- package/dist/backend/Handler.js +12 -35
- package/dist/backend/api/CreateBackend.js +6 -6
- package/dist/backend/api/DatabaseApi.js +2 -2
- package/dist/backend/api/ProxyMedia.d.ts +2 -3
- package/dist/backend/api/ProxyMedia.js +7 -22
- package/dist/backend/api/database.js +6 -6
- package/dist/backend/store/GeneratedDatabase.d.ts +6 -3
- package/dist/backend/store/GeneratedDatabase.js +13 -11
- package/dist/backend/store/GeneratedDatabaseNode.d.ts +1 -1
- package/dist/backend/store/GeneratedDatabaseNode.js +1 -1
- package/dist/bundled.d.ts +280 -211
- package/dist/chunks/{node-sqlite-7CSGL27V.js → bun-sqlite-5SHXN3AT.js} +3 -3
- package/dist/chunks/{chunk-IL7FJQAY.js → chunk-66YZ47TY.js} +1 -1
- package/dist/chunks/{chunk-M7KDJEGH.js → chunk-AIU6CMVT.js} +1 -1
- package/dist/chunks/{chunk-K7LHQXI4.js → chunk-ASYKC6IE.js} +1 -1
- package/dist/chunks/{chunk-RWWYUNVX.js → chunk-DWR5A5KL.js} +6 -2
- package/dist/chunks/{chunk-NLZLRQ5U.js → chunk-ETWOY4AL.js} +1 -1
- package/dist/chunks/{chunk-TFMUSWGG.js → chunk-MOWR65LM.js} +72 -67
- package/dist/chunks/{chunk-2U43BB6P.js → chunk-QJGGYF6E.js} +5 -5
- package/dist/chunks/{chunk-A42DP5T7.js → chunk-QSN6RH6X.js} +1 -1
- package/dist/chunks/{bun-sqlite-ZZDB7YQQ.js → node-sqlite-XVNTNMCY.js} +3 -3
- package/dist/cli/Serve.js +1 -1
- package/dist/cli/bin.js +6 -2
- package/dist/cli/generate/DevDB.js +4 -2
- package/dist/cli/serve/DevServer.d.ts +2 -0
- package/dist/cli/serve/DevServer.js +7 -2
- package/dist/cloud/CloudRemote.js +1 -1
- package/dist/components/Breadcrumbs.js +2 -2
- package/dist/components/Calendar.js +7 -7
- package/dist/components/Checkbox.js +3 -3
- package/dist/components/ComboBox.js +12 -12
- package/dist/components/DatePicker.js +3 -3
- package/dist/components/DateRangePicker.js +5 -5
- package/dist/components/Disclosure.js +7 -7
- package/dist/components/Label.js +5 -5
- package/dist/components/List.js +37 -37
- package/dist/components/Menu.js +2 -2
- package/dist/components/Modal.js +3 -3
- package/dist/components/MultipleSelect.js +26 -26
- package/dist/components/NumberField.js +6 -6
- package/dist/components/ProgressCircle.js +3 -3
- package/dist/components/RadioGroup.js +2 -2
- package/dist/components/SearchField.js +7 -7
- package/dist/components/Select.js +7 -7
- package/dist/components/Surface.js +2 -2
- package/dist/components/Switch.js +2 -2
- package/dist/components/Table.js +7 -7
- package/dist/components/Tabs.js +3 -3
- package/dist/components/TagGroup.js +2 -2
- package/dist/components/TextField.js +4 -4
- package/dist/components/TimeField.js +3 -3
- package/dist/components/Toggle.js +2 -2
- package/dist/components/Toolbar.js +3 -3
- package/dist/components/Tree.js +7 -7
- package/dist/core/Client.d.ts +1 -4
- package/dist/core/Client.js +5 -7
- package/dist/core/Connection.d.ts +4 -1
- package/dist/core/Connection.js +3 -1
- package/dist/core/db/LocalStore.d.ts +2 -0
- package/dist/core/source/GithubSource.js +39 -11
- package/dist/dashboard/App.js +2 -2
- package/dist/dashboard/app/AccessDenied.js +4 -4
- package/dist/dashboard/app/ActivityStatus.js +15 -15
- package/dist/dashboard/app/AuthView.js +13 -13
- package/dist/dashboard/app/Badge.js +2 -2
- package/dist/dashboard/app/CompactField.js +9 -9
- package/dist/dashboard/app/DashboardErrorBoundary.js +7 -7
- package/dist/dashboard/app/DashboardLayout.js +3 -3
- package/dist/dashboard/app/EntryFields.js +2 -2
- package/dist/dashboard/app/EntryHeader.js +10 -10
- package/dist/dashboard/app/EntryReferences.js +7 -7
- package/dist/dashboard/app/EntrySidebar.js +16 -16
- package/dist/dashboard/app/EntrySidebarPreview.js +10 -10
- package/dist/dashboard/app/EntryTranslationBanner.js +3 -3
- package/dist/dashboard/app/Explorer.js +44 -44
- package/dist/dashboard/app/ExplorerCards.js +34 -34
- package/dist/dashboard/app/ExplorerFileCard.js +21 -21
- package/dist/dashboard/app/ExplorerList.js +10 -10
- package/dist/dashboard/app/ExplorerModal.js +4 -4
- package/dist/dashboard/app/ExplorerTable.js +49 -49
- package/dist/dashboard/app/LinkPicker.js +4 -4
- package/dist/dashboard/app/LocaleMenu.js +3 -3
- package/dist/dashboard/app/SidebarTree.js +42 -42
- package/dist/dashboard/app/WorkspaceMenu.js +12 -12
- package/dist/dashboard/app/WorkspaceRoots.js +28 -28
- package/dist/dashboard/app/editor/FileEditor.js +27 -27
- package/dist/dashboard/app/editor/FilePreview.js +7 -7
- package/dist/dashboard/app/modals/CreateEntry.js +3 -3
- package/dist/dashboard/app/pages/EntryPage.js +19 -19
- package/dist/dashboard/app/pages/SplashPage.js +46 -46
- package/dist/dashboard/app/pages/UsersPage.js +36 -36
- package/dist/dashboard/app/ui/DashboardModal.js +19 -19
- package/dist/dashboard/app/ui/Rail.js +3 -3
- package/dist/dashboard/app/ui/Sidebar.js +2 -2
- package/dist/dashboard/boot/DashboardWorker.js +6 -2
- package/dist/dashboard/boot/WorkerDB.d.ts +2 -2
- package/dist/database/BrowserEntryStore.d.ts +18 -6
- package/dist/database/BrowserEntryStore.js +95 -81
- package/dist/database/DatabaseSource.d.ts +2 -2
- package/dist/database/DatabaseTables.js +2 -2
- package/dist/database/EntryDatabase.d.ts +83 -7
- package/dist/database/EntryDatabase.js +420 -30
- package/dist/database/EntryStore.d.ts +10 -12
- package/dist/database/EntryStore.js +27 -66
- package/dist/database/EntryTransaction.d.ts +3 -3
- package/dist/database/EntryTransaction.js +39 -21
- package/dist/database/Version.d.ts +2 -2
- package/dist/database/Version.js +1 -1
- package/dist/database/driver/DatabaseHandle.d.ts +17 -0
- package/dist/database/driver/DatabaseHandle.js +0 -0
- package/dist/database/driver/OverlayExtension.browser.d.ts +2 -0
- package/dist/database/driver/OverlayExtension.browser.js +9 -0
- package/dist/database/driver/OverlayExtension.d.ts +1 -0
- package/dist/database/driver/OverlayExtension.js +7 -0
- package/dist/database/driver/RuntimeDatabase.d.ts +11 -6
- package/dist/database/driver/RuntimeDatabase.js +66 -22
- package/dist/database/driver/WasmDatabase.d.ts +23 -2
- package/dist/database/driver/WasmDatabase.js +22 -9
- package/dist/database/entry/EntryTable.d.ts +21 -5
- package/dist/database/entry/EntryTable.js +59 -10
- package/dist/database/query/EntryQuery.d.ts +3 -2
- package/dist/database/query/EntryQuery.js +23 -25
- package/dist/database/query/EntryReferences.d.ts +2 -3
- package/dist/database/query/EntryReferences.js +43 -41
- package/dist/database/query/Relation.js +1 -1
- package/dist/database/query/ResolveQuery.d.ts +1 -4
- package/dist/database/query/ResolveQuery.js +54 -19
- package/dist/database/query/Search.d.ts +8 -17
- package/dist/database/query/Search.js +17 -37
- package/dist/database/sync/EntryParser.d.ts +5 -1
- package/dist/database/sync/EntryParser.js +4 -1
- package/dist/database/sync/EntrySyncer.d.ts +7 -19
- package/dist/database/sync/EntrySyncer.js +17 -45
- package/dist/database/sync/Ingest.js +40 -31
- package/dist/database/sync/SyncQueries.d.ts +5 -2
- package/dist/database/sync/SyncQueries.js +27 -3
- package/dist/field/check/CheckField.view.js +2 -2
- package/dist/field/code/CodeField.view.js +11 -11
- package/dist/field/link/LinkField.view.js +34 -34
- package/dist/field/list/ListField.view.js +17 -17
- package/dist/field/metadata/MetadataField.view.js +15 -15
- package/dist/field/richtext/RichTextBlock.js +2 -2
- package/dist/field/richtext/RichTextExtensions.js +23 -23
- package/dist/field/richtext/RichTextField.view.js +2 -2
- package/dist/field/richtext/RichTextInsertMenu.js +2 -2
- package/dist/next.cjs +6 -2
- package/dist/preview/widget.d.ts +29 -0
- package/dist/preview/widget.js +31 -5
- package/package.json +6 -2
- package/dist/adapter/next/DevRemote.d.ts +0 -3
- package/dist/adapter/next/DevRemote.js +0 -45
- package/dist/database/EntryLayer.d.ts +0 -93
- package/dist/database/EntryLayer.js +0 -459
- package/dist/database/entry/EntryView.d.ts +0 -22
- package/dist/database/entry/EntryView.js +0 -106
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
connect
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-QSN6RH6X.js";
|
|
4
|
+
import "./chunk-AIU6CMVT.js";
|
|
5
5
|
import "./chunk-N47Y62CI.js";
|
|
6
6
|
import "./chunk-QBPYWU6C.js";
|
|
7
7
|
import "./chunk-2BJ2IFQM.js";
|
|
8
8
|
import "./chunk-XCZXR3C2.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-MOWR65LM.js";
|
|
10
10
|
import "./chunk-76VMZTLN.js";
|
|
11
11
|
import "./chunk-2PIFHEYR.js";
|
|
12
12
|
import "./chunk-K62JP6HR.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// package.json with { type: 'json' }
|
|
2
2
|
var package_default = {
|
|
3
3
|
name: "alinea",
|
|
4
|
-
version: "2.0.0-preview.
|
|
4
|
+
version: "2.0.0-preview.9",
|
|
5
5
|
description: "Headless git-based CMS",
|
|
6
6
|
repository: "github:alineacms/alinea",
|
|
7
7
|
license: "MIT",
|
|
@@ -28,6 +28,10 @@ var package_default = {
|
|
|
28
28
|
},
|
|
29
29
|
"./*.cjs": "./dist/*.cjs",
|
|
30
30
|
"./*": "./dist/*.js",
|
|
31
|
+
"./database/driver/OverlayExtension": {
|
|
32
|
+
browser: "./dist/database/driver/OverlayExtension.browser.js",
|
|
33
|
+
default: "./dist/database/driver/OverlayExtension.js"
|
|
34
|
+
},
|
|
31
35
|
"./core/media/CreatePreview": {
|
|
32
36
|
"edge-light": "./dist/core/media/CreatePreview.js",
|
|
33
37
|
worker: "./dist/core/media/CreatePreview.js",
|
|
@@ -69,7 +73,7 @@ var package_default = {
|
|
|
69
73
|
},
|
|
70
74
|
dependencies: {
|
|
71
75
|
"@alinea/iso": "^0.3.3",
|
|
72
|
-
"@alinea/sqlite-wasm": "0.
|
|
76
|
+
"@alinea/sqlite-wasm": "0.3.0",
|
|
73
77
|
esbuild: "^0.28.0"
|
|
74
78
|
},
|
|
75
79
|
peerDependencies: {
|
|
@@ -34,6 +34,77 @@ import {
|
|
|
34
34
|
sql
|
|
35
35
|
} from "./chunk-ETBQTP2S.js";
|
|
36
36
|
|
|
37
|
+
// node_modules/rado/dist/core/Constraint.js
|
|
38
|
+
var UniqueConstraint = class _UniqueConstraint {
|
|
39
|
+
[internalData];
|
|
40
|
+
constructor(data) {
|
|
41
|
+
this[internalData] = data;
|
|
42
|
+
}
|
|
43
|
+
on(...columns) {
|
|
44
|
+
const fields = columns.map(getField);
|
|
45
|
+
return new _UniqueConstraint({ ...getData(this), fields });
|
|
46
|
+
}
|
|
47
|
+
nullsNotDistinct() {
|
|
48
|
+
return new _UniqueConstraint({ ...getData(this), nullsNotDistinct: true });
|
|
49
|
+
}
|
|
50
|
+
get [internalConstraint]() {
|
|
51
|
+
const { fields, nullsNotDistinct } = getData(this);
|
|
52
|
+
return sql.join([
|
|
53
|
+
sql`unique`,
|
|
54
|
+
nullsNotDistinct ? sql`nulls not distinct` : void 0,
|
|
55
|
+
sql`(${sql.join(
|
|
56
|
+
fields.map((field) => sql.identifier(field.fieldName)),
|
|
57
|
+
sql`, `
|
|
58
|
+
)})`
|
|
59
|
+
]);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
var PrimaryKeyConstraint = class {
|
|
63
|
+
constructor(data) {
|
|
64
|
+
this.data = data;
|
|
65
|
+
this[internalData] = data;
|
|
66
|
+
}
|
|
67
|
+
data;
|
|
68
|
+
[internalData];
|
|
69
|
+
get [internalConstraint]() {
|
|
70
|
+
const { fields } = getData(this);
|
|
71
|
+
return sql`primary key (${sql.join(
|
|
72
|
+
fields.map((field) => sql.identifier(field.fieldName)),
|
|
73
|
+
sql`, `
|
|
74
|
+
)})`;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
function primaryKey(...args) {
|
|
78
|
+
if (args.length === 1 && "columns" in args[0])
|
|
79
|
+
return new PrimaryKeyConstraint({
|
|
80
|
+
name: args[0].name,
|
|
81
|
+
fields: args[0].columns.map(getField)
|
|
82
|
+
});
|
|
83
|
+
return new PrimaryKeyConstraint({ fields: args.map(getField) });
|
|
84
|
+
}
|
|
85
|
+
var ForeignKeyConstraint = class _ForeignKeyConstraint {
|
|
86
|
+
[internalData];
|
|
87
|
+
constructor(data) {
|
|
88
|
+
this[internalData] = data;
|
|
89
|
+
}
|
|
90
|
+
references(...fields) {
|
|
91
|
+
return new _ForeignKeyConstraint({
|
|
92
|
+
...getData(this),
|
|
93
|
+
references: fields.map(getField)
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
get [internalConstraint]() {
|
|
97
|
+
const { fields, references } = getData(this);
|
|
98
|
+
return sql`foreign key (${sql.join(
|
|
99
|
+
fields.map((field) => sql.identifier(field.fieldName)),
|
|
100
|
+
sql`, `
|
|
101
|
+
)}) references ${sql.identifier(references[0].targetName)} (${sql.join(
|
|
102
|
+
references.map((field) => sql.identifier(field.fieldName)),
|
|
103
|
+
sql`, `
|
|
104
|
+
)})`;
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
|
|
37
108
|
// node_modules/rado/dist/core/Column.js
|
|
38
109
|
function formatType(kind, args) {
|
|
39
110
|
return args.length === 0 ? sql.unsafe(kind) : sql`${sql.unsafe(kind)}(${sql.join(args.map(sql.inline), sql`, `)})`;
|
|
@@ -350,69 +421,6 @@ function collectEnumQuery(table2) {
|
|
|
350
421
|
return enums;
|
|
351
422
|
}
|
|
352
423
|
|
|
353
|
-
// node_modules/rado/dist/core/Constraint.js
|
|
354
|
-
var UniqueConstraint = class _UniqueConstraint {
|
|
355
|
-
[internalData];
|
|
356
|
-
constructor(data) {
|
|
357
|
-
this[internalData] = data;
|
|
358
|
-
}
|
|
359
|
-
on(...columns) {
|
|
360
|
-
const fields = columns.map(getField);
|
|
361
|
-
return new _UniqueConstraint({ ...getData(this), fields });
|
|
362
|
-
}
|
|
363
|
-
nullsNotDistinct() {
|
|
364
|
-
return new _UniqueConstraint({ ...getData(this), nullsNotDistinct: true });
|
|
365
|
-
}
|
|
366
|
-
get [internalConstraint]() {
|
|
367
|
-
const { fields, nullsNotDistinct } = getData(this);
|
|
368
|
-
return sql.join([
|
|
369
|
-
sql`unique`,
|
|
370
|
-
nullsNotDistinct ? sql`nulls not distinct` : void 0,
|
|
371
|
-
sql`(${sql.join(
|
|
372
|
-
fields.map((field) => sql.identifier(field.fieldName)),
|
|
373
|
-
sql`, `
|
|
374
|
-
)})`
|
|
375
|
-
]);
|
|
376
|
-
}
|
|
377
|
-
};
|
|
378
|
-
var PrimaryKeyConstraint = class {
|
|
379
|
-
constructor(data) {
|
|
380
|
-
this.data = data;
|
|
381
|
-
this[internalData] = data;
|
|
382
|
-
}
|
|
383
|
-
data;
|
|
384
|
-
[internalData];
|
|
385
|
-
get [internalConstraint]() {
|
|
386
|
-
const { fields } = getData(this);
|
|
387
|
-
return sql`primary key (${sql.join(
|
|
388
|
-
fields.map((field) => sql.identifier(field.fieldName)),
|
|
389
|
-
sql`, `
|
|
390
|
-
)})`;
|
|
391
|
-
}
|
|
392
|
-
};
|
|
393
|
-
var ForeignKeyConstraint = class _ForeignKeyConstraint {
|
|
394
|
-
[internalData];
|
|
395
|
-
constructor(data) {
|
|
396
|
-
this[internalData] = data;
|
|
397
|
-
}
|
|
398
|
-
references(...fields) {
|
|
399
|
-
return new _ForeignKeyConstraint({
|
|
400
|
-
...getData(this),
|
|
401
|
-
references: fields.map(getField)
|
|
402
|
-
});
|
|
403
|
-
}
|
|
404
|
-
get [internalConstraint]() {
|
|
405
|
-
const { fields, references } = getData(this);
|
|
406
|
-
return sql`foreign key (${sql.join(
|
|
407
|
-
fields.map((field) => sql.identifier(field.fieldName)),
|
|
408
|
-
sql`, `
|
|
409
|
-
)}) references ${sql.identifier(references[0].targetName)} (${sql.join(
|
|
410
|
-
references.map((field) => sql.identifier(field.fieldName)),
|
|
411
|
-
sql`, `
|
|
412
|
-
)})`;
|
|
413
|
-
}
|
|
414
|
-
};
|
|
415
|
-
|
|
416
424
|
// node_modules/rado/dist/core/Table.js
|
|
417
425
|
var { assign, fromEntries, entries, keys } = Object;
|
|
418
426
|
var TableData = class {
|
|
@@ -540,9 +548,6 @@ function configEntries(config) {
|
|
|
540
548
|
function table(name, columns, config, schemaName) {
|
|
541
549
|
return createTable(name, columns, config, schemaName, false);
|
|
542
550
|
}
|
|
543
|
-
function temporaryTable(name, columns, config) {
|
|
544
|
-
return createTable(name, columns, config, void 0, true);
|
|
545
|
-
}
|
|
546
551
|
function createTable(name, columns, config, schemaName, temporary) {
|
|
547
552
|
const api = assign(new TableApi(), {
|
|
548
553
|
name,
|
|
@@ -593,6 +598,7 @@ export {
|
|
|
593
598
|
column,
|
|
594
599
|
columnConfig,
|
|
595
600
|
formatColumn,
|
|
601
|
+
primaryKey,
|
|
596
602
|
integer,
|
|
597
603
|
oid,
|
|
598
604
|
boolean,
|
|
@@ -600,6 +606,5 @@ export {
|
|
|
600
606
|
tableFields,
|
|
601
607
|
primaryKeyColumns,
|
|
602
608
|
table,
|
|
603
|
-
temporaryTable,
|
|
604
609
|
alias
|
|
605
610
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
connect
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QSN6RH6X.js";
|
|
4
4
|
import {
|
|
5
5
|
connect as connect2
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ETWOY4AL.js";
|
|
7
7
|
import {
|
|
8
8
|
connect as connect3
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-66YZ47TY.js";
|
|
10
10
|
import {
|
|
11
11
|
Dialect,
|
|
12
12
|
Emitter,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
execTransaction,
|
|
18
18
|
sqliteDialect,
|
|
19
19
|
sqliteDiff
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-AIU6CMVT.js";
|
|
21
21
|
import {
|
|
22
22
|
AsyncDatabase,
|
|
23
23
|
Batch,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
table,
|
|
48
48
|
tableFields,
|
|
49
49
|
text
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-MOWR65LM.js";
|
|
51
51
|
import {
|
|
52
52
|
Field,
|
|
53
53
|
selection
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
connect
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-ETWOY4AL.js";
|
|
4
|
+
import "./chunk-AIU6CMVT.js";
|
|
5
5
|
import "./chunk-N47Y62CI.js";
|
|
6
6
|
import "./chunk-QBPYWU6C.js";
|
|
7
7
|
import "./chunk-2BJ2IFQM.js";
|
|
8
8
|
import "./chunk-XCZXR3C2.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-MOWR65LM.js";
|
|
10
10
|
import "./chunk-76VMZTLN.js";
|
|
11
11
|
import "./chunk-2PIFHEYR.js";
|
|
12
12
|
import "./chunk-K62JP6HR.js";
|
package/dist/cli/Serve.js
CHANGED
package/dist/cli/bin.js
CHANGED
|
@@ -220,7 +220,7 @@ var lib_default2 = (e, t2) => new o(e, t2);
|
|
|
220
220
|
// package.json
|
|
221
221
|
var package_default = {
|
|
222
222
|
name: "alinea",
|
|
223
|
-
version: "2.0.0-preview.
|
|
223
|
+
version: "2.0.0-preview.9",
|
|
224
224
|
description: "Headless git-based CMS",
|
|
225
225
|
repository: "github:alineacms/alinea",
|
|
226
226
|
license: "MIT",
|
|
@@ -247,6 +247,10 @@ var package_default = {
|
|
|
247
247
|
},
|
|
248
248
|
"./*.cjs": "./dist/*.cjs",
|
|
249
249
|
"./*": "./dist/*.js",
|
|
250
|
+
"./database/driver/OverlayExtension": {
|
|
251
|
+
browser: "./dist/database/driver/OverlayExtension.browser.js",
|
|
252
|
+
default: "./dist/database/driver/OverlayExtension.js"
|
|
253
|
+
},
|
|
250
254
|
"./core/media/CreatePreview": {
|
|
251
255
|
"edge-light": "./dist/core/media/CreatePreview.js",
|
|
252
256
|
worker: "./dist/core/media/CreatePreview.js",
|
|
@@ -288,7 +292,7 @@ var package_default = {
|
|
|
288
292
|
},
|
|
289
293
|
dependencies: {
|
|
290
294
|
"@alinea/iso": "^0.3.3",
|
|
291
|
-
"@alinea/sqlite-wasm": "0.
|
|
295
|
+
"@alinea/sqlite-wasm": "0.3.0",
|
|
292
296
|
esbuild: "^0.28.0"
|
|
293
297
|
},
|
|
294
298
|
peerDependencies: {
|
|
@@ -43,10 +43,13 @@ var DevDB = class _DevDB extends EntryStore {
|
|
|
43
43
|
const source = new CachedFSSource(
|
|
44
44
|
join(options.rootDir, Config.contentDir(options.config))
|
|
45
45
|
);
|
|
46
|
-
const db = await runtimeDatabase({
|
|
46
|
+
const { database: db } = await runtimeDatabase({
|
|
47
|
+
path: options.databasePath
|
|
48
|
+
});
|
|
47
49
|
try {
|
|
48
50
|
await EntryDatabase.createSchema(
|
|
49
51
|
db,
|
|
52
|
+
options.config,
|
|
50
53
|
ReadonlyTree.EMPTY.sha,
|
|
51
54
|
options.configFingerprint
|
|
52
55
|
);
|
|
@@ -83,7 +86,6 @@ var DevDB = class _DevDB extends EntryStore {
|
|
|
83
86
|
);
|
|
84
87
|
this.#options = { ...this.#options, ...options };
|
|
85
88
|
this.config = options.config;
|
|
86
|
-
await this.closePreviews();
|
|
87
89
|
await this.database.reindex(options.config, options.configFingerprint);
|
|
88
90
|
this.#persistedRevision = void 0;
|
|
89
91
|
await this.sync();
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CMS } from 'alinea/core/CMS';
|
|
1
2
|
import { Config } from 'alinea/core/Config';
|
|
2
3
|
import { Request, type Response } from '@alinea/iso';
|
|
3
4
|
import type { BuildOptions } from 'esbuild';
|
|
@@ -18,3 +19,4 @@ export interface DevServer {
|
|
|
18
19
|
handle(input: Request): Promise<Response>;
|
|
19
20
|
}
|
|
20
21
|
export declare function createDevServer(dir: string, options: CreateDevServerOptions): Promise<DevServer>;
|
|
22
|
+
export declare function forwardMutation(request: Request, cms: CMS, apiKey: string): Promise<Response | undefined>;
|
|
@@ -6,7 +6,10 @@ import { createHandler } from "alinea/backend/Handler";
|
|
|
6
6
|
import { gitUser } from "alinea/backend/util/ExecGit";
|
|
7
7
|
import { CloudRemote } from "alinea/cloud/CloudRemote";
|
|
8
8
|
import { Config } from "alinea/core/Config";
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
developmentKeyHeader,
|
|
11
|
+
forwardedMutationHeader
|
|
12
|
+
} from "alinea/core/Connection";
|
|
10
13
|
import { createId } from "alinea/core/Id";
|
|
11
14
|
import { fetch, Headers, Request } from "@alinea/iso";
|
|
12
15
|
import path from "node:path";
|
|
@@ -138,6 +141,7 @@ async function createDevServer(dir, options) {
|
|
|
138
141
|
};
|
|
139
142
|
}
|
|
140
143
|
async function forwardMutation(request, cms, apiKey) {
|
|
144
|
+
if (request.headers.has(forwardedMutationHeader)) return;
|
|
141
145
|
const origin = forwardedRequestOrigin(request);
|
|
142
146
|
if (!origin) return;
|
|
143
147
|
const source = new URL(request.url);
|
|
@@ -188,5 +192,6 @@ function forwardedRequestOrigin(request) {
|
|
|
188
192
|
return `${normalizedProtocol}//${host}`;
|
|
189
193
|
}
|
|
190
194
|
export {
|
|
191
|
-
createDevServer
|
|
195
|
+
createDevServer,
|
|
196
|
+
forwardMutation
|
|
192
197
|
};
|
|
@@ -17,8 +17,8 @@ import "../chunks/chunk-CQ52GEHY.js";
|
|
|
17
17
|
|
|
18
18
|
// src/components/Breadcrumbs.module.css
|
|
19
19
|
var Breadcrumbs_default = {
|
|
20
|
-
"
|
|
21
|
-
"
|
|
20
|
+
"Breadcrumb": "alinea-Breadcrumb",
|
|
21
|
+
"Breadcrumbs": "alinea-Breadcrumbs"
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
// src/components/Breadcrumbs.tsx
|
|
@@ -27,17 +27,17 @@ import {
|
|
|
27
27
|
|
|
28
28
|
// src/components/Calendar.module.css
|
|
29
29
|
var Calendar_default = {
|
|
30
|
-
"Calendar": "alinea-Calendar",
|
|
31
|
-
"
|
|
32
|
-
"CalendarHeader": "alinea-Calendar-header",
|
|
33
|
-
"Calendar-button": "alinea-Calendar-button",
|
|
34
|
-
"CalendarButton": "alinea-Calendar-button",
|
|
30
|
+
"Calendar-grid": "alinea-Calendar-grid",
|
|
31
|
+
"CalendarGrid": "alinea-Calendar-grid",
|
|
35
32
|
"Calendar-heading": "alinea-Calendar-heading",
|
|
36
33
|
"CalendarHeading": "alinea-Calendar-heading",
|
|
37
34
|
"Calendar-cell": "alinea-Calendar-cell",
|
|
38
35
|
"CalendarCell": "alinea-Calendar-cell",
|
|
39
|
-
"Calendar-
|
|
40
|
-
"
|
|
36
|
+
"Calendar-button": "alinea-Calendar-button",
|
|
37
|
+
"CalendarButton": "alinea-Calendar-button",
|
|
38
|
+
"Calendar-header": "alinea-Calendar-header",
|
|
39
|
+
"CalendarHeader": "alinea-Calendar-header",
|
|
40
|
+
"Calendar": "alinea-Calendar"
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
// src/components/Calendar.tsx
|
|
@@ -16,11 +16,11 @@ import "../chunks/chunk-CQ52GEHY.js";
|
|
|
16
16
|
|
|
17
17
|
// src/components/Checkbox.module.css
|
|
18
18
|
var Checkbox_default = {
|
|
19
|
+
"Checkbox-box": "alinea-Checkbox-box",
|
|
20
|
+
"CheckboxBox": "alinea-Checkbox-box",
|
|
19
21
|
"Checkbox": "alinea-Checkbox",
|
|
20
22
|
"Checkbox-mark": "alinea-Checkbox-mark",
|
|
21
|
-
"CheckboxMark": "alinea-Checkbox-mark"
|
|
22
|
-
"Checkbox-box": "alinea-Checkbox-box",
|
|
23
|
-
"CheckboxBox": "alinea-Checkbox-box"
|
|
23
|
+
"CheckboxMark": "alinea-Checkbox-mark"
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
// src/components/Checkbox.tsx
|
|
@@ -29,24 +29,24 @@ import {
|
|
|
29
29
|
|
|
30
30
|
// src/components/ComboBox.module.css
|
|
31
31
|
var ComboBox_default = {
|
|
32
|
-
"ComboBoxPopover-listbox": "alinea-ComboBoxPopover-listbox",
|
|
33
|
-
"ComboBoxPopoverListbox": "alinea-ComboBoxPopover-listbox",
|
|
34
|
-
"ComboBoxTrigger-input": "alinea-ComboBoxTrigger-input",
|
|
35
|
-
"ComboBoxTriggerInput": "alinea-ComboBoxTrigger-input",
|
|
36
|
-
"ComboBoxTrigger-button-arrow": "alinea-ComboBoxTrigger-button-arrow",
|
|
37
|
-
"ComboBoxTriggerButtonArrow": "alinea-ComboBoxTrigger-button-arrow",
|
|
38
32
|
"ComboBoxItem-check": "alinea-ComboBoxItem-check",
|
|
39
33
|
"ComboBoxItemCheck": "alinea-ComboBoxItem-check",
|
|
40
|
-
"
|
|
34
|
+
"ComboBoxTrigger-input": "alinea-ComboBoxTrigger-input",
|
|
35
|
+
"ComboBoxTriggerInput": "alinea-ComboBoxTrigger-input",
|
|
36
|
+
"ComboBox": "alinea-ComboBox",
|
|
41
37
|
"ComboBoxTrigger-actions": "alinea-ComboBoxTrigger-actions",
|
|
42
38
|
"ComboBoxTriggerActions": "alinea-ComboBoxTrigger-actions",
|
|
43
|
-
"ComboBoxTrigger": "alinea-ComboBoxTrigger",
|
|
44
|
-
"ComboBox": "alinea-ComboBox",
|
|
45
|
-
"ComboBoxTrigger-button": "alinea-ComboBoxTrigger-button",
|
|
46
|
-
"ComboBoxTriggerButton": "alinea-ComboBoxTrigger-button",
|
|
47
39
|
"ComboBoxTrigger-button-value": "alinea-ComboBoxTrigger-button-value",
|
|
48
40
|
"ComboBoxTriggerButtonValue": "alinea-ComboBoxTrigger-button-value",
|
|
49
|
-
"ComboBoxItem": "alinea-ComboBoxItem"
|
|
41
|
+
"ComboBoxItem": "alinea-ComboBoxItem",
|
|
42
|
+
"ComboBoxTrigger-button-arrow": "alinea-ComboBoxTrigger-button-arrow",
|
|
43
|
+
"ComboBoxTriggerButtonArrow": "alinea-ComboBoxTrigger-button-arrow",
|
|
44
|
+
"ComboBoxTrigger-button": "alinea-ComboBoxTrigger-button",
|
|
45
|
+
"ComboBoxTriggerButton": "alinea-ComboBoxTrigger-button",
|
|
46
|
+
"ComboBoxPopover-listbox": "alinea-ComboBoxPopover-listbox",
|
|
47
|
+
"ComboBoxPopoverListbox": "alinea-ComboBoxPopover-listbox",
|
|
48
|
+
"ComboBoxClear": "alinea-ComboBoxClear",
|
|
49
|
+
"ComboBoxTrigger": "alinea-ComboBoxTrigger"
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
// src/components/ComboBox.tsx
|
|
@@ -25,14 +25,14 @@ import { Calendar } from "./Calendar.js";
|
|
|
25
25
|
|
|
26
26
|
// src/components/DatePicker.module.css
|
|
27
27
|
var DatePicker_default = {
|
|
28
|
-
"Icon": "alinea-Icon",
|
|
29
28
|
"DatePicker-input": "alinea-DatePicker-input",
|
|
30
29
|
"DatePickerInput": "alinea-DatePicker-input",
|
|
31
30
|
"DatePicker-trigger": "alinea-DatePicker-trigger",
|
|
32
31
|
"DatePickerTrigger": "alinea-DatePicker-trigger",
|
|
33
|
-
"
|
|
32
|
+
"Icon": "alinea-Icon",
|
|
34
33
|
"DatePicker-input-segment": "alinea-DatePicker-input-segment",
|
|
35
|
-
"DatePickerInputSegment": "alinea-DatePicker-input-segment"
|
|
34
|
+
"DatePickerInputSegment": "alinea-DatePicker-input-segment",
|
|
35
|
+
"DatePicker": "alinea-DatePicker"
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
// src/components/DatePicker.tsx
|
|
@@ -25,17 +25,17 @@ import { RangeCalendar } from "./Calendar.js";
|
|
|
25
25
|
|
|
26
26
|
// src/components/DateRangePicker.module.css
|
|
27
27
|
var DateRangePicker_default = {
|
|
28
|
+
"DateRangePicker-input": "alinea-DateRangePicker-input",
|
|
29
|
+
"DateRangePickerInput": "alinea-DateRangePicker-input",
|
|
28
30
|
"DateRangePicker-separator": "alinea-DateRangePicker-separator",
|
|
29
31
|
"DateRangePickerSeparator": "alinea-DateRangePicker-separator",
|
|
30
|
-
"Icon": "alinea-Icon",
|
|
31
32
|
"DateRangePicker-inputs": "alinea-DateRangePicker-inputs",
|
|
32
33
|
"DateRangePickerInputs": "alinea-DateRangePicker-inputs",
|
|
33
|
-
"DateRangePicker-trigger": "alinea-DateRangePicker-trigger",
|
|
34
|
-
"DateRangePickerTrigger": "alinea-DateRangePicker-trigger",
|
|
35
34
|
"DateRangePicker-input-segment": "alinea-DateRangePicker-input-segment",
|
|
36
35
|
"DateRangePickerInputSegment": "alinea-DateRangePicker-input-segment",
|
|
37
|
-
"DateRangePicker-
|
|
38
|
-
"
|
|
36
|
+
"DateRangePicker-trigger": "alinea-DateRangePicker-trigger",
|
|
37
|
+
"DateRangePickerTrigger": "alinea-DateRangePicker-trigger",
|
|
38
|
+
"Icon": "alinea-Icon",
|
|
39
39
|
"DateRangePicker": "alinea-DateRangePicker"
|
|
40
40
|
};
|
|
41
41
|
|
|
@@ -25,17 +25,17 @@ import { Icon } from "./Icon.js";
|
|
|
25
25
|
var Disclosure_default = {
|
|
26
26
|
"Disclosure-panel": "alinea-Disclosure-panel",
|
|
27
27
|
"DisclosurePanel": "alinea-Disclosure-panel",
|
|
28
|
-
"Disclosure-trigger": "alinea-Disclosure-trigger",
|
|
29
|
-
"DisclosureTrigger": "alinea-Disclosure-trigger",
|
|
30
|
-
"Disclosure-chevron": "alinea-Disclosure-chevron",
|
|
31
|
-
"DisclosureChevron": "alinea-Disclosure-chevron",
|
|
32
|
-
"Disclosure-panel-content": "alinea-Disclosure-panel-content",
|
|
33
|
-
"DisclosurePanelContent": "alinea-Disclosure-panel-content",
|
|
34
28
|
"Disclosure-heading": "alinea-Disclosure-heading",
|
|
35
29
|
"DisclosureHeading": "alinea-Disclosure-heading",
|
|
30
|
+
"Disclosure-panel-content": "alinea-Disclosure-panel-content",
|
|
31
|
+
"DisclosurePanelContent": "alinea-Disclosure-panel-content",
|
|
36
32
|
"Disclosure": "alinea-Disclosure",
|
|
37
33
|
"Disclosure-title": "alinea-Disclosure-title",
|
|
38
|
-
"DisclosureTitle": "alinea-Disclosure-title"
|
|
34
|
+
"DisclosureTitle": "alinea-Disclosure-title",
|
|
35
|
+
"Disclosure-trigger": "alinea-Disclosure-trigger",
|
|
36
|
+
"DisclosureTrigger": "alinea-Disclosure-trigger",
|
|
37
|
+
"Disclosure-chevron": "alinea-Disclosure-chevron",
|
|
38
|
+
"DisclosureChevron": "alinea-Disclosure-chevron"
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
// src/components/Disclosure.tsx
|
package/dist/components/Label.js
CHANGED
|
@@ -20,15 +20,15 @@ import { IcRoundPublic } from "../dashboard/icons.js";
|
|
|
20
20
|
|
|
21
21
|
// src/components/Label.module.css
|
|
22
22
|
var Label_default = {
|
|
23
|
-
"LabelRequired": "alinea-LabelRequired",
|
|
24
23
|
"LabelLabel": "alinea-LabelLabel",
|
|
25
|
-
"
|
|
24
|
+
"LabelDescription": "alinea-LabelDescription",
|
|
26
25
|
"LabelHeader": "alinea-LabelHeader",
|
|
27
|
-
"LabelStack": "alinea-LabelStack",
|
|
28
26
|
"LabelError": "alinea-LabelError",
|
|
27
|
+
"LabelRequired": "alinea-LabelRequired",
|
|
28
|
+
"LabelTitle": "alinea-LabelTitle",
|
|
29
|
+
"LabelStack": "alinea-LabelStack",
|
|
29
30
|
"LabelIcon": "alinea-LabelIcon",
|
|
30
|
-
"
|
|
31
|
-
"LabelTitle": "alinea-LabelTitle"
|
|
31
|
+
"LabelInline": "alinea-LabelInline"
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
// src/components/Label.tsx
|