@beechcms/core 0.6.0-preview.4 → 0.6.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/automations/automations-grammar-words.d.ts.map +1 -0
- package/dist/automations/automations.repository.interface.d.ts.map +1 -0
- package/dist/automations/automations.runner.interface.d.ts.map +1 -0
- package/dist/automations/automations.types.d.ts.map +1 -0
- package/dist/common/clock.d.ts.map +1 -0
- package/dist/common/email.provider.d.ts +32 -0
- package/dist/common/email.provider.d.ts.map +1 -0
- package/dist/common/email.provider.js +4 -0
- package/dist/{hooks.d.ts → common/hooks.d.ts} +2 -2
- package/dist/common/hooks.d.ts.map +1 -0
- package/dist/common/id-generator.d.ts.map +1 -0
- package/dist/common/storage.d.ts.map +1 -0
- package/dist/{content-scan.repository.d.ts → content/content-scan.repository.d.ts} +1 -1
- package/dist/content/content-scan.repository.d.ts.map +1 -0
- package/dist/{content.repository.d.ts → content/content.repository.d.ts} +13 -4
- package/dist/content/content.repository.d.ts.map +1 -0
- package/dist/content/demo-data.repository.d.ts.map +1 -0
- package/dist/content/idempotency.repository.d.ts.map +1 -0
- package/dist/content/richtext/richtext-render.d.ts +12 -0
- package/dist/content/richtext/richtext-render.d.ts.map +1 -0
- package/dist/{richtext-render.js → content/richtext/richtext-render.js} +7 -14
- package/dist/content/richtext/richtext.d.ts.map +1 -0
- package/dist/{seed.repository.d.ts → content/seed.repository.d.ts} +1 -1
- package/dist/content/seed.repository.d.ts.map +1 -0
- package/dist/content/slug-utils.d.ts.map +1 -0
- package/dist/{dashboard-layout.d.ts → dashboard-layout/dashboard-layout.d.ts} +1 -1
- package/dist/dashboard-layout/dashboard-layout.d.ts.map +1 -0
- package/dist/dashboard-layout/dashboard-layout.repository.d.ts.map +1 -0
- package/dist/dashboard-layout/dashboard-permissions.d.ts.map +1 -0
- package/dist/dashboard-layout/dashboard-scopes.d.ts.map +1 -0
- package/dist/dashboard-layout/kanban/kanban-position.repository.d.ts +19 -0
- package/dist/dashboard-layout/kanban/kanban-position.repository.d.ts.map +1 -0
- package/dist/dashboard-layout/kanban/kanban.d.ts +75 -0
- package/dist/dashboard-layout/kanban/kanban.d.ts.map +1 -0
- package/dist/dashboard-layout/kanban/kanban.js +82 -0
- package/dist/dashboard-layout/layout-permissions.d.ts.map +1 -0
- package/dist/{seed-layout.d.ts → dashboard-layout/seed-layout.d.ts} +77 -3
- package/dist/dashboard-layout/seed-layout.d.ts.map +1 -0
- package/dist/{seed-layout.js → dashboard-layout/seed-layout.js} +101 -8
- package/dist/{seed-layout.repository.d.ts → dashboard-layout/seed-layout.repository.d.ts} +5 -1
- package/dist/dashboard-layout/seed-layout.repository.d.ts.map +1 -0
- package/dist/dashboard-layout/view-authorization.d.ts +18 -0
- package/dist/dashboard-layout/view-authorization.d.ts.map +1 -0
- package/dist/dashboard-layout/view-authorization.js +28 -0
- package/dist/engine/ddl.d.ts +173 -0
- package/dist/engine/ddl.d.ts.map +1 -0
- package/dist/engine/ddl.js +454 -0
- package/dist/engine/define-seed.d.ts.map +1 -0
- package/dist/engine/engine.d.ts +4 -0
- package/dist/engine/engine.d.ts.map +1 -0
- package/dist/engine/engine.js +4 -0
- package/dist/engine/policies.d.ts.map +1 -0
- package/dist/engine/query.d.ts +23 -0
- package/dist/engine/query.d.ts.map +1 -0
- package/dist/engine/query.js +217 -0
- package/dist/engine/relations.d.ts.map +1 -0
- package/dist/{schema-mutator.d.ts → engine/schema-mutator.d.ts} +4 -0
- package/dist/engine/schema-mutator.d.ts.map +1 -0
- package/dist/engine/seed-ddl-destructive.d.ts.map +1 -0
- package/dist/engine/seed-ddl.d.ts.map +1 -0
- package/dist/engine/seed-registry.d.ts.map +1 -0
- package/dist/{seed-registry.js → engine/seed-registry.js} +1 -1
- package/dist/engine/seed-types-generator.d.ts +10 -0
- package/dist/engine/seed-types-generator.d.ts.map +1 -0
- package/dist/engine/seed-types-generator.js +86 -0
- package/dist/engine/seed-validation.d.ts.map +1 -0
- package/dist/{seed-validation.js → engine/seed-validation.js} +14 -1
- package/dist/engine/seeds.d.ts.map +1 -0
- package/dist/engine/serialize.d.ts +20 -0
- package/dist/engine/serialize.d.ts.map +1 -0
- package/dist/engine/serialize.js +160 -0
- package/dist/engine/types.d.ts +278 -0
- package/dist/engine/types.d.ts.map +1 -0
- package/dist/engine/validation/cache.d.ts +12 -0
- package/dist/engine/validation/cache.d.ts.map +1 -0
- package/dist/engine/validation/cache.js +136 -0
- package/dist/engine/validation/file-branch.d.ts +48 -0
- package/dist/engine/validation/file-branch.d.ts.map +1 -0
- package/dist/engine/validation/file-branch.js +133 -0
- package/dist/engine/validation/index.d.ts +115 -0
- package/dist/engine/validation/index.d.ts.map +1 -0
- package/dist/engine/validation/index.js +336 -0
- package/dist/engine/validation/primitives.d.ts +34 -0
- package/dist/engine/validation/primitives.d.ts.map +1 -0
- package/dist/engine/validation/primitives.js +47 -0
- package/dist/engine/validation/richtext-sanitizer.d.ts +30 -0
- package/dist/engine/validation/richtext-sanitizer.d.ts.map +1 -0
- package/dist/engine/validation/richtext-sanitizer.js +203 -0
- package/dist/engine/validation/schema-builders.d.ts +12 -0
- package/dist/engine/validation/schema-builders.d.ts.map +1 -0
- package/dist/engine/validation/schema-builders.js +413 -0
- package/dist/index.d.ts +48 -44
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +48 -44
- package/dist/media/file-types.d.ts +13 -0
- package/dist/media/file-types.d.ts.map +1 -0
- package/dist/media/media.repository.d.ts.map +1 -0
- package/dist/queue/queue.interface.d.ts +39 -0
- package/dist/queue/queue.interface.d.ts.map +1 -0
- package/dist/queue/queue.stub.d.ts +6 -0
- package/dist/queue/queue.stub.d.ts.map +1 -0
- package/dist/queue/queue.stub.js +8 -0
- package/dist/queue/scheduler.interface.d.ts.map +1 -0
- package/dist/queue/scheduler.interface.js +3 -0
- package/dist/queue/scheduler.stub.d.ts.map +1 -0
- package/dist/queue.interface.d.ts +4 -4
- package/dist/queue.interface.d.ts.map +1 -1
- package/dist/queue.stub.d.ts.map +1 -1
- package/dist/rate-limit/rate-limiter.d.ts +5 -0
- package/dist/rate-limit/rate-limiter.d.ts.map +1 -1
- package/dist/search/search.repository.d.ts +1 -1
- package/dist/search/search.repository.d.ts.map +1 -1
- package/dist/seed-types-generator.d.ts +1 -1
- package/dist/seed-types-generator.d.ts.map +1 -1
- package/dist/settings/site-settings.repository.d.ts.map +1 -0
- package/dist/settings/site-settings.repository.js +3 -0
- package/dist/webhooks/webhook-crypto.d.ts +8 -0
- package/dist/webhooks/webhook-crypto.d.ts.map +1 -0
- package/dist/webhooks/webhook-crypto.js +37 -0
- package/dist/webhooks/webhook-validation.d.ts.map +1 -0
- package/dist/widget/widget.repository.d.ts +1 -1
- package/dist/widget/widget.repository.d.ts.map +1 -1
- package/package.json +4 -3
- package/dist/automations-grammar-words.d.ts.map +0 -1
- package/dist/automations.repository.interface.d.ts.map +0 -1
- package/dist/automations.runner.interface.d.ts.map +0 -1
- package/dist/automations.runner.stub.d.ts +0 -5
- package/dist/automations.runner.stub.d.ts.map +0 -1
- package/dist/automations.runner.stub.js +0 -7
- package/dist/automations.types.d.ts.map +0 -1
- package/dist/clock.d.ts.map +0 -1
- package/dist/content-scan.repository.d.ts.map +0 -1
- package/dist/content.repository.d.ts.map +0 -1
- package/dist/dashboard-layout.d.ts.map +0 -1
- package/dist/dashboard-layout.repository.d.ts.map +0 -1
- package/dist/dashboard-permissions.d.ts.map +0 -1
- package/dist/dashboard-scopes.d.ts.map +0 -1
- package/dist/define-seed.d.ts.map +0 -1
- package/dist/demo-data.repository.d.ts.map +0 -1
- package/dist/engine.d.ts +0 -144
- package/dist/engine.d.ts.map +0 -1
- package/dist/engine.js +0 -723
- package/dist/file-types.d.ts +0 -13
- package/dist/file-types.d.ts.map +0 -1
- package/dist/hooks.d.ts.map +0 -1
- package/dist/id-generator.d.ts.map +0 -1
- package/dist/idempotency.repository.d.ts.map +0 -1
- package/dist/layout-permissions.d.ts.map +0 -1
- package/dist/media.repository.d.ts.map +0 -1
- package/dist/policies.d.ts.map +0 -1
- package/dist/relations.d.ts.map +0 -1
- package/dist/richtext-render.d.ts +0 -11
- package/dist/richtext-render.d.ts.map +0 -1
- package/dist/richtext.d.ts.map +0 -1
- package/dist/scheduler.interface.d.ts.map +0 -1
- package/dist/scheduler.stub.d.ts.map +0 -1
- package/dist/schema-mutator.d.ts.map +0 -1
- package/dist/seed-ddl-destructive.d.ts.map +0 -1
- package/dist/seed-ddl.d.ts.map +0 -1
- package/dist/seed-layout.d.ts.map +0 -1
- package/dist/seed-layout.repository.d.ts.map +0 -1
- package/dist/seed-registry.d.ts.map +0 -1
- package/dist/seed-validation.d.ts.map +0 -1
- package/dist/seed.repository.d.ts.map +0 -1
- package/dist/seeds.d.ts.map +0 -1
- package/dist/site-settings.repository.d.ts.map +0 -1
- package/dist/slug-utils.d.ts.map +0 -1
- package/dist/storage.d.ts.map +0 -1
- package/dist/types.d.ts +0 -237
- package/dist/types.d.ts.map +0 -1
- package/dist/validation.d.ts +0 -50
- package/dist/validation.d.ts.map +0 -1
- package/dist/validation.js +0 -659
- package/dist/webhook-validation.d.ts.map +0 -1
- /package/dist/{automations-grammar-words.d.ts → automations/automations-grammar-words.d.ts} +0 -0
- /package/dist/{automations-grammar-words.js → automations/automations-grammar-words.js} +0 -0
- /package/dist/{automations.repository.interface.d.ts → automations/automations.repository.interface.d.ts} +0 -0
- /package/dist/{automations.repository.interface.js → automations/automations.repository.interface.js} +0 -0
- /package/dist/{automations.runner.interface.d.ts → automations/automations.runner.interface.d.ts} +0 -0
- /package/dist/{automations.runner.interface.js → automations/automations.runner.interface.js} +0 -0
- /package/dist/{automations.types.d.ts → automations/automations.types.d.ts} +0 -0
- /package/dist/{automations.types.js → automations/automations.types.js} +0 -0
- /package/dist/{clock.d.ts → common/clock.d.ts} +0 -0
- /package/dist/{clock.js → common/clock.js} +0 -0
- /package/dist/{hooks.js → common/hooks.js} +0 -0
- /package/dist/{id-generator.d.ts → common/id-generator.d.ts} +0 -0
- /package/dist/{id-generator.js → common/id-generator.js} +0 -0
- /package/dist/{storage.d.ts → common/storage.d.ts} +0 -0
- /package/dist/{storage.js → common/storage.js} +0 -0
- /package/dist/{content-scan.repository.js → content/content-scan.repository.js} +0 -0
- /package/dist/{content.repository.js → content/content.repository.js} +0 -0
- /package/dist/{demo-data.repository.d.ts → content/demo-data.repository.d.ts} +0 -0
- /package/dist/{demo-data.repository.js → content/demo-data.repository.js} +0 -0
- /package/dist/{idempotency.repository.d.ts → content/idempotency.repository.d.ts} +0 -0
- /package/dist/{idempotency.repository.js → content/idempotency.repository.js} +0 -0
- /package/dist/{richtext.d.ts → content/richtext/richtext.d.ts} +0 -0
- /package/dist/{richtext.js → content/richtext/richtext.js} +0 -0
- /package/dist/{seed.repository.js → content/seed.repository.js} +0 -0
- /package/dist/{slug-utils.d.ts → content/slug-utils.d.ts} +0 -0
- /package/dist/{slug-utils.js → content/slug-utils.js} +0 -0
- /package/dist/{dashboard-layout.js → dashboard-layout/dashboard-layout.js} +0 -0
- /package/dist/{dashboard-layout.repository.d.ts → dashboard-layout/dashboard-layout.repository.d.ts} +0 -0
- /package/dist/{dashboard-layout.repository.js → dashboard-layout/dashboard-layout.repository.js} +0 -0
- /package/dist/{dashboard-permissions.d.ts → dashboard-layout/dashboard-permissions.d.ts} +0 -0
- /package/dist/{dashboard-permissions.js → dashboard-layout/dashboard-permissions.js} +0 -0
- /package/dist/{dashboard-scopes.d.ts → dashboard-layout/dashboard-scopes.d.ts} +0 -0
- /package/dist/{dashboard-scopes.js → dashboard-layout/dashboard-scopes.js} +0 -0
- /package/dist/{media.repository.js → dashboard-layout/kanban/kanban-position.repository.js} +0 -0
- /package/dist/{layout-permissions.d.ts → dashboard-layout/layout-permissions.d.ts} +0 -0
- /package/dist/{layout-permissions.js → dashboard-layout/layout-permissions.js} +0 -0
- /package/dist/{seed-layout.repository.js → dashboard-layout/seed-layout.repository.js} +0 -0
- /package/dist/{define-seed.d.ts → engine/define-seed.d.ts} +0 -0
- /package/dist/{define-seed.js → engine/define-seed.js} +0 -0
- /package/dist/{policies.d.ts → engine/policies.d.ts} +0 -0
- /package/dist/{policies.js → engine/policies.js} +0 -0
- /package/dist/{relations.d.ts → engine/relations.d.ts} +0 -0
- /package/dist/{relations.js → engine/relations.js} +0 -0
- /package/dist/{schema-mutator.js → engine/schema-mutator.js} +0 -0
- /package/dist/{seed-ddl-destructive.d.ts → engine/seed-ddl-destructive.d.ts} +0 -0
- /package/dist/{seed-ddl-destructive.js → engine/seed-ddl-destructive.js} +0 -0
- /package/dist/{seed-ddl.d.ts → engine/seed-ddl.d.ts} +0 -0
- /package/dist/{seed-ddl.js → engine/seed-ddl.js} +0 -0
- /package/dist/{seed-registry.d.ts → engine/seed-registry.d.ts} +0 -0
- /package/dist/{seed-validation.d.ts → engine/seed-validation.d.ts} +0 -0
- /package/dist/{seeds.d.ts → engine/seeds.d.ts} +0 -0
- /package/dist/{seeds.js → engine/seeds.js} +0 -0
- /package/dist/{types.js → engine/types.js} +0 -0
- /package/dist/{file-types.js → media/file-types.js} +0 -0
- /package/dist/{media.repository.d.ts → media/media.repository.d.ts} +0 -0
- /package/dist/{scheduler.interface.js → media/media.repository.js} +0 -0
- /package/dist/{site-settings.repository.js → queue/queue.interface.js} +0 -0
- /package/dist/{scheduler.interface.d.ts → queue/scheduler.interface.d.ts} +0 -0
- /package/dist/{scheduler.stub.d.ts → queue/scheduler.stub.d.ts} +0 -0
- /package/dist/{scheduler.stub.js → queue/scheduler.stub.js} +0 -0
- /package/dist/{site-settings.repository.d.ts → settings/site-settings.repository.d.ts} +0 -0
- /package/dist/{webhook-validation.d.ts → webhooks/webhook-validation.d.ts} +0 -0
- /package/dist/{webhook-validation.js → webhooks/webhook-validation.js} +0 -0
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mapping of core branch types to SQLite column types.
|
|
3
|
+
*/
|
|
4
|
+
const BRANCH_TYPE_SQL = {
|
|
5
|
+
text: { sqlType: 'TEXT' },
|
|
6
|
+
number: { sqlType: 'REAL' },
|
|
7
|
+
boolean: { sqlType: 'INTEGER' },
|
|
8
|
+
date: { sqlType: 'INTEGER' }, // Unix timestamp (seconds)
|
|
9
|
+
json: { sqlType: 'TEXT' }, // Serialized JSON string
|
|
10
|
+
richtext: { sqlType: 'TEXT' },
|
|
11
|
+
file: { sqlType: 'TEXT' }, // Single URL or serialized JSON array of URLs
|
|
12
|
+
tags: { sqlType: 'TEXT' }, // Serialized JSON array or object
|
|
13
|
+
relation: { sqlType: 'TEXT' }, // Foreign Key reference stored as TEXT (id of the target row)
|
|
14
|
+
repeater: { sqlType: 'TEXT' }, // Serialized JSON array of records
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* System-defined columns that exist on all content tables.
|
|
18
|
+
*/
|
|
19
|
+
export const SYSTEM_COLUMNS = new Set(['id', 'slug', 'status', 'created_at', 'updated_at']);
|
|
20
|
+
/**
|
|
21
|
+
* Returns the SQL table name for a given Seed.
|
|
22
|
+
*
|
|
23
|
+
* @param seed The seed definition.
|
|
24
|
+
* @returns The table name.
|
|
25
|
+
*/
|
|
26
|
+
export function tableName(seed) {
|
|
27
|
+
return `content_${seed.slug}`;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Returns the draft SQL table name for a given Seed.
|
|
31
|
+
*
|
|
32
|
+
* @param seed The seed definition.
|
|
33
|
+
* @returns The draft table name.
|
|
34
|
+
*/
|
|
35
|
+
function draftTableName(seed) {
|
|
36
|
+
return `content_${seed.slug}_drafts`;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Returns the FTS (Full-Text Search) virtual table name for a given Seed.
|
|
40
|
+
*
|
|
41
|
+
* @param seed The seed definition.
|
|
42
|
+
* @returns The FTS table name.
|
|
43
|
+
*/
|
|
44
|
+
export function ftsTableName(seed) {
|
|
45
|
+
return `fts_${seed.slug}`;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Determines whether a column is valid for a given Seed (either system column or branch alias).
|
|
49
|
+
*
|
|
50
|
+
* @param seed The seed definition.
|
|
51
|
+
* @param col The column name to check.
|
|
52
|
+
* @returns True if the column is valid, false otherwise.
|
|
53
|
+
*/
|
|
54
|
+
export function isValidColumn(seed, col) {
|
|
55
|
+
if (SYSTEM_COLUMNS.has(col))
|
|
56
|
+
return true;
|
|
57
|
+
return seed.branches.some(b => b.alias === col);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Filters the branches of a Seed to return only the ones that are indexable for full-text search.
|
|
61
|
+
*
|
|
62
|
+
* @param seed The seed definition.
|
|
63
|
+
* @returns An array of indexable branches.
|
|
64
|
+
*/
|
|
65
|
+
export function indexableSearchBranches(seed) {
|
|
66
|
+
return seed.branches.filter(b => (b.type === 'text' || b.type === 'richtext') && b.policies?.search !== false);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The default ON DELETE referential integrity rule for single-value relations.
|
|
70
|
+
*/
|
|
71
|
+
const DEFAULT_ON_DELETE_RULE = 'SET NULL';
|
|
72
|
+
/**
|
|
73
|
+
* Builds the SQL foreign key clause for a single-value relation branch.
|
|
74
|
+
*
|
|
75
|
+
* Multi-relation branches (multiple: true) produce NO column on the parent table;
|
|
76
|
+
* they live in a dedicated junction table. Returns an empty string for them.
|
|
77
|
+
*
|
|
78
|
+
* @param branch The branch definition.
|
|
79
|
+
* @throws {Error} If the relation branch is missing the `targetSeed` parameter.
|
|
80
|
+
* @returns The foreign key SQL clause, or an empty string.
|
|
81
|
+
*/
|
|
82
|
+
function buildForeignKeyClause(branch) {
|
|
83
|
+
if (branch.type !== 'relation')
|
|
84
|
+
return '';
|
|
85
|
+
if (branch.multiple === true)
|
|
86
|
+
return '';
|
|
87
|
+
if (!branch.targetSeed) {
|
|
88
|
+
throw new Error(`Branch "${branch.alias}" is of type 'relation' but has no targetSeed`);
|
|
89
|
+
}
|
|
90
|
+
const onDeleteRule = branch.onDelete ?? DEFAULT_ON_DELETE_RULE;
|
|
91
|
+
return ` REFERENCES content_${branch.targetSeed}(id) ON DELETE ${onDeleteRule}`;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Generates the SQL `CREATE TABLE IF NOT EXISTS content_{slug}` statement
|
|
95
|
+
* with system columns and one column per branch.
|
|
96
|
+
*
|
|
97
|
+
* @param seed The seed definition.
|
|
98
|
+
* @returns The CREATE TABLE SQL statement.
|
|
99
|
+
*/
|
|
100
|
+
export function generateCreateTable(seed) {
|
|
101
|
+
const table = tableName(seed);
|
|
102
|
+
const lines = [
|
|
103
|
+
`CREATE TABLE IF NOT EXISTS ${table} (`,
|
|
104
|
+
` id TEXT NOT NULL PRIMARY KEY,`,
|
|
105
|
+
` slug TEXT NOT NULL UNIQUE,`,
|
|
106
|
+
` status TEXT NOT NULL DEFAULT 'draft' CHECK (status IN ('draft', 'review', 'published', 'archived')),`,
|
|
107
|
+
];
|
|
108
|
+
for (const branch of seed.branches) {
|
|
109
|
+
if (branch.type === 'relation' && branch.multiple === true)
|
|
110
|
+
continue;
|
|
111
|
+
const { sqlType } = BRANCH_TYPE_SQL[branch.type];
|
|
112
|
+
let col = ` ${branch.alias} ${sqlType}`;
|
|
113
|
+
if (branch.requiredOnCreate)
|
|
114
|
+
col += ' NOT NULL';
|
|
115
|
+
if (branch.type === 'boolean')
|
|
116
|
+
col += ` CHECK (${branch.alias} IN (0, 1))`;
|
|
117
|
+
col += buildForeignKeyClause(branch);
|
|
118
|
+
lines.push(col + ',');
|
|
119
|
+
}
|
|
120
|
+
lines.push(` created_at INTEGER NOT NULL DEFAULT (unixepoch()),`);
|
|
121
|
+
lines.push(` updated_at INTEGER NOT NULL DEFAULT (unixepoch())`);
|
|
122
|
+
lines.push(`);`);
|
|
123
|
+
return lines.join('\n');
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Generates the SQL `CREATE TABLE IF NOT EXISTS content_{slug}_drafts` statement
|
|
127
|
+
* for seeds that allow drafts.
|
|
128
|
+
*
|
|
129
|
+
* @param seed The seed definition.
|
|
130
|
+
* @returns The draft table CREATE TABLE SQL statement, or null if drafts are disabled.
|
|
131
|
+
*/
|
|
132
|
+
export function generateDraftTable(seed) {
|
|
133
|
+
if (!seed.allowDrafts)
|
|
134
|
+
return null;
|
|
135
|
+
const table = `content_${seed.slug}_drafts`;
|
|
136
|
+
const mainTable = `content_${seed.slug}`;
|
|
137
|
+
const lines = [
|
|
138
|
+
`CREATE TABLE IF NOT EXISTS ${table} (`,
|
|
139
|
+
` entry_id TEXT NOT NULL PRIMARY KEY`,
|
|
140
|
+
` REFERENCES ${mainTable}(id) ON DELETE CASCADE,`,
|
|
141
|
+
];
|
|
142
|
+
for (const branch of seed.branches) {
|
|
143
|
+
if (branch.type === 'relation' && branch.multiple === true)
|
|
144
|
+
continue;
|
|
145
|
+
const { sqlType } = BRANCH_TYPE_SQL[branch.type];
|
|
146
|
+
let col = ` ${branch.alias} ${sqlType}`;
|
|
147
|
+
if (branch.type === 'boolean')
|
|
148
|
+
col += ` CHECK (${branch.alias} IN (0, 1))`;
|
|
149
|
+
lines.push(col + ',');
|
|
150
|
+
}
|
|
151
|
+
lines.push(` _touched_fields TEXT,`);
|
|
152
|
+
lines.push(` updated_at INTEGER NOT NULL DEFAULT (unixepoch())`);
|
|
153
|
+
lines.push(`);`);
|
|
154
|
+
return lines.join('\n');
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Generates the SQL `ALTER TABLE content_{slug} ADD COLUMN {alias} {type}` statement.
|
|
158
|
+
*
|
|
159
|
+
* @param seed The seed definition.
|
|
160
|
+
* @param branch The branch definition for the new column.
|
|
161
|
+
* @returns The ALTER TABLE SQL statement.
|
|
162
|
+
*/
|
|
163
|
+
export function generateAddColumn(seed, branch) {
|
|
164
|
+
const { sqlType } = BRANCH_TYPE_SQL[branch.type];
|
|
165
|
+
return `ALTER TABLE ${tableName(seed)} ADD COLUMN ${branch.alias} ${sqlType}${buildForeignKeyClause(branch)};`;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Generates SQL index statements for system fields (status, created_at)
|
|
169
|
+
* and indexable branch columns.
|
|
170
|
+
*
|
|
171
|
+
* @param seed The seed definition.
|
|
172
|
+
* @returns An array of CREATE INDEX SQL statements.
|
|
173
|
+
*/
|
|
174
|
+
export function generateIndexes(seed) {
|
|
175
|
+
const table = tableName(seed);
|
|
176
|
+
const slug = seed.slug;
|
|
177
|
+
const indexes = [
|
|
178
|
+
`CREATE INDEX IF NOT EXISTS idx_${slug}_status ON ${table}(status);`,
|
|
179
|
+
`CREATE INDEX IF NOT EXISTS idx_${slug}_created_at ON ${table}(created_at);`,
|
|
180
|
+
];
|
|
181
|
+
for (const branch of seed.branches) {
|
|
182
|
+
if (branch.type === 'relation' && branch.multiple === true)
|
|
183
|
+
continue;
|
|
184
|
+
const isRelation = branch.type === 'relation';
|
|
185
|
+
if (!isRelation && branch.policies?.filter === false)
|
|
186
|
+
continue;
|
|
187
|
+
if (['text', 'number', 'date', 'boolean', 'relation'].includes(branch.type)) {
|
|
188
|
+
indexes.push(`CREATE INDEX IF NOT EXISTS idx_${slug}_${branch.alias} ON ${table}(${branch.alias});`);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
return indexes;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Generates the FTS5 virtual table definition for indexable text/richtext branches.
|
|
195
|
+
*
|
|
196
|
+
* @param seed The seed definition.
|
|
197
|
+
* @returns The CREATE VIRTUAL TABLE SQL statement, or null if no branches are indexable.
|
|
198
|
+
*/
|
|
199
|
+
export function generateFtsTable(seed) {
|
|
200
|
+
const rtBranches = indexableSearchBranches(seed);
|
|
201
|
+
if (rtBranches.length === 0)
|
|
202
|
+
return null;
|
|
203
|
+
const ftsTable = ftsTableName(seed);
|
|
204
|
+
const cols = rtBranches.map(b => ` ${b.alias}`).join(',\n');
|
|
205
|
+
return [
|
|
206
|
+
`CREATE VIRTUAL TABLE IF NOT EXISTS ${ftsTable} USING fts5(`,
|
|
207
|
+
` entry_id UNINDEXED,`,
|
|
208
|
+
`${cols},`,
|
|
209
|
+
` tokenize = 'unicode61'`,
|
|
210
|
+
`);`,
|
|
211
|
+
].join('\n');
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Generates FTS5 triggers (insert, update, delete) to keep the FTS virtual table synchronized.
|
|
215
|
+
*
|
|
216
|
+
* @param seed The seed definition.
|
|
217
|
+
* @returns An array of CREATE TRIGGER SQL statements.
|
|
218
|
+
*/
|
|
219
|
+
export function generateFtsTriggers(seed) {
|
|
220
|
+
const rtBranches = indexableSearchBranches(seed);
|
|
221
|
+
if (rtBranches.length === 0)
|
|
222
|
+
return [];
|
|
223
|
+
const table = tableName(seed);
|
|
224
|
+
const ftsTable = ftsTableName(seed);
|
|
225
|
+
const slug = seed.slug;
|
|
226
|
+
const cols = rtBranches.map(b => b.alias);
|
|
227
|
+
const ftsColList = ['entry_id', ...cols].join(', ');
|
|
228
|
+
const newValList = ['new.id', ...cols.map(c => `new.${c}`)].join(', ');
|
|
229
|
+
return [
|
|
230
|
+
[
|
|
231
|
+
`CREATE TRIGGER IF NOT EXISTS fts_${slug}_insert`,
|
|
232
|
+
`AFTER INSERT ON ${table} BEGIN`,
|
|
233
|
+
` INSERT INTO ${ftsTable}(${ftsColList}) VALUES (${newValList});`,
|
|
234
|
+
`END;`,
|
|
235
|
+
].join('\n'),
|
|
236
|
+
[
|
|
237
|
+
`CREATE TRIGGER IF NOT EXISTS fts_${slug}_update`,
|
|
238
|
+
`AFTER UPDATE OF ${cols.join(', ')} ON ${table} BEGIN`,
|
|
239
|
+
` DELETE FROM ${ftsTable} WHERE entry_id = old.id;`,
|
|
240
|
+
` INSERT INTO ${ftsTable}(${ftsColList}) VALUES (${newValList});`,
|
|
241
|
+
`END;`,
|
|
242
|
+
].join('\n'),
|
|
243
|
+
[
|
|
244
|
+
`CREATE TRIGGER IF NOT EXISTS fts_${slug}_delete`,
|
|
245
|
+
`AFTER DELETE ON ${table} BEGIN`,
|
|
246
|
+
` DELETE FROM ${ftsTable} WHERE entry_id = old.id;`,
|
|
247
|
+
`END;`,
|
|
248
|
+
].join('\n'),
|
|
249
|
+
];
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Returns the list of expected columns for a Seed's table.
|
|
253
|
+
* Used to compare current vs expected schema (diffing).
|
|
254
|
+
*
|
|
255
|
+
* @param seed The seed definition.
|
|
256
|
+
* @returns The array of expected schema columns.
|
|
257
|
+
*/
|
|
258
|
+
export function getExpectedColumns(seed) {
|
|
259
|
+
return [
|
|
260
|
+
{ name: 'id', sqlType: 'TEXT', notNull: true, isPk: true },
|
|
261
|
+
{ name: 'slug', sqlType: 'TEXT', notNull: true, isPk: false },
|
|
262
|
+
{ name: 'status', sqlType: 'TEXT', notNull: true, isPk: false },
|
|
263
|
+
...seed.branches
|
|
264
|
+
.filter(b => !(b.type === 'relation' && b.multiple === true))
|
|
265
|
+
.map(b => ({
|
|
266
|
+
name: b.alias,
|
|
267
|
+
sqlType: BRANCH_TYPE_SQL[b.type].sqlType,
|
|
268
|
+
notNull: b.requiredOnCreate ?? false,
|
|
269
|
+
isPk: false,
|
|
270
|
+
})),
|
|
271
|
+
{ name: 'created_at', sqlType: 'INTEGER', notNull: true, isPk: false },
|
|
272
|
+
{ name: 'updated_at', sqlType: 'INTEGER', notNull: true, isPk: false },
|
|
273
|
+
];
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Returns the junction table name for a many-to-many relation branch.
|
|
277
|
+
* Format: `rel_<seedSlug>_<branchAlias>`.
|
|
278
|
+
*
|
|
279
|
+
* @param seedSlug The slug of the parent Seed.
|
|
280
|
+
* @param branchAlias The alias of the relation branch.
|
|
281
|
+
* @returns The junction table name.
|
|
282
|
+
*/
|
|
283
|
+
export function junctionTableName(seedSlug, branchAlias) {
|
|
284
|
+
return `rel_${seedSlug}_${branchAlias}`;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Generates `CREATE TABLE IF NOT EXISTS rel_<seed>_<alias>` statement for a multi-relation branch.
|
|
288
|
+
*
|
|
289
|
+
* @param seed The parent seed definition.
|
|
290
|
+
* @param branch The multi-relation branch definition.
|
|
291
|
+
* @throws {Error} If called on a non-multi-relation branch or if `targetSeed` is missing.
|
|
292
|
+
* @returns The CREATE TABLE SQL statement.
|
|
293
|
+
*/
|
|
294
|
+
export function generateJunctionTable(seed, branch) {
|
|
295
|
+
if (branch.type !== 'relation' || branch.multiple !== true) {
|
|
296
|
+
throw new Error(`Branch "${branch.alias}" is not a multi-relation`);
|
|
297
|
+
}
|
|
298
|
+
if (!branch.targetSeed) {
|
|
299
|
+
throw new Error(`Branch "${branch.alias}" has no targetSeed`);
|
|
300
|
+
}
|
|
301
|
+
const onDeleteRule = branch.onDelete ?? 'CASCADE';
|
|
302
|
+
const table = junctionTableName(seed.slug, branch.alias);
|
|
303
|
+
return [
|
|
304
|
+
`CREATE TABLE IF NOT EXISTS ${table} (`,
|
|
305
|
+
` parent_id TEXT NOT NULL REFERENCES content_${seed.slug}(id) ON DELETE CASCADE,`,
|
|
306
|
+
` target_id TEXT NOT NULL REFERENCES content_${branch.targetSeed}(id) ON DELETE ${onDeleteRule},`,
|
|
307
|
+
` position INTEGER NOT NULL DEFAULT 0,`,
|
|
308
|
+
` created_at INTEGER NOT NULL DEFAULT (unixepoch()),`,
|
|
309
|
+
` PRIMARY KEY (parent_id, target_id)`,
|
|
310
|
+
`);`,
|
|
311
|
+
].join('\n');
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Generates the two B-tree indexes for a junction table:
|
|
315
|
+
* one on `parent_id` (listing entries by parent) and one on `target_id` (handling cascade checks from target side).
|
|
316
|
+
*
|
|
317
|
+
* @param seed The parent seed definition.
|
|
318
|
+
* @param branch The multi-relation branch definition.
|
|
319
|
+
* @returns An array of CREATE INDEX SQL statements.
|
|
320
|
+
*/
|
|
321
|
+
export function generateJunctionIndexes(seed, branch) {
|
|
322
|
+
const table = junctionTableName(seed.slug, branch.alias);
|
|
323
|
+
return [
|
|
324
|
+
`CREATE INDEX IF NOT EXISTS idx_${table}_parent ON ${table}(parent_id);`,
|
|
325
|
+
`CREATE INDEX IF NOT EXISTS idx_${table}_target ON ${table}(target_id);`,
|
|
326
|
+
];
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Generates the drafts junction table `rel_<seed>_<alias>_drafts` for a many-to-many relation branch.
|
|
330
|
+
*
|
|
331
|
+
* @param seed The parent seed definition.
|
|
332
|
+
* @param branch The multi-relation branch definition.
|
|
333
|
+
* @returns The CREATE TABLE SQL statement, or null if drafts are disabled.
|
|
334
|
+
*/
|
|
335
|
+
export function generateJunctionDraftTable(seed, branch) {
|
|
336
|
+
if (!seed.allowDrafts)
|
|
337
|
+
return null;
|
|
338
|
+
if (branch.type !== 'relation' || branch.multiple !== true)
|
|
339
|
+
return null;
|
|
340
|
+
const table = `${junctionTableName(seed.slug, branch.alias)}_drafts`;
|
|
341
|
+
const mainDraftTable = `content_${seed.slug}_drafts`;
|
|
342
|
+
return [
|
|
343
|
+
`CREATE TABLE IF NOT EXISTS ${table} (`,
|
|
344
|
+
` entry_id TEXT NOT NULL REFERENCES ${mainDraftTable}(entry_id) ON DELETE CASCADE,`,
|
|
345
|
+
` target_id TEXT NOT NULL,`,
|
|
346
|
+
` position INTEGER NOT NULL DEFAULT 0,`,
|
|
347
|
+
` PRIMARY KEY (entry_id, target_id)`,
|
|
348
|
+
`);`,
|
|
349
|
+
].join('\n');
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Returns every `DROP TABLE IF EXISTS` needed to fully remove a content type:
|
|
353
|
+
* the main table, the drafts table (if drafts enabled), full-text search table/triggers, and junction tables.
|
|
354
|
+
*
|
|
355
|
+
* @param seed The seed definition.
|
|
356
|
+
* @returns An array of DROP TABLE / DROP TRIGGER SQL statements.
|
|
357
|
+
*/
|
|
358
|
+
export function generateDropTable(seed) {
|
|
359
|
+
const stmts = [];
|
|
360
|
+
for (const branch of seed.branches) {
|
|
361
|
+
if (branch.type !== 'relation' || branch.multiple !== true)
|
|
362
|
+
continue;
|
|
363
|
+
const jt = junctionTableName(seed.slug, branch.alias);
|
|
364
|
+
stmts.push(`DROP TABLE IF EXISTS ${jt}_drafts;`);
|
|
365
|
+
stmts.push(`DROP TABLE IF EXISTS ${jt};`);
|
|
366
|
+
}
|
|
367
|
+
if (seed.allowDrafts) {
|
|
368
|
+
stmts.push(`DROP TABLE IF EXISTS ${draftTableName(seed)};`);
|
|
369
|
+
}
|
|
370
|
+
if (indexableSearchBranches(seed).length > 0) {
|
|
371
|
+
const slug = seed.slug;
|
|
372
|
+
stmts.push(`DROP TRIGGER IF EXISTS fts_${slug}_insert;`);
|
|
373
|
+
stmts.push(`DROP TRIGGER IF EXISTS fts_${slug}_update;`);
|
|
374
|
+
stmts.push(`DROP TRIGGER IF EXISTS fts_${slug}_delete;`);
|
|
375
|
+
stmts.push(`DROP TABLE IF EXISTS ${ftsTableName(seed)};`);
|
|
376
|
+
}
|
|
377
|
+
stmts.push(`DROP TABLE IF EXISTS ${tableName(seed)};`);
|
|
378
|
+
return stmts;
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Returns the `DROP COLUMN` SQL statements for removing a single field.
|
|
382
|
+
* Drops the junction table for multi-relations, or alters the tables to drop the column.
|
|
383
|
+
*
|
|
384
|
+
* @param seed The seed definition.
|
|
385
|
+
* @param alias The alias of the branch to drop.
|
|
386
|
+
* @returns An array of SQL statements.
|
|
387
|
+
*/
|
|
388
|
+
export function generateDropColumn(seed, alias) {
|
|
389
|
+
const branch = seed.branches.find(b => b.alias === alias);
|
|
390
|
+
if (branch && branch.type === 'relation' && branch.multiple === true) {
|
|
391
|
+
const jt = junctionTableName(seed.slug, alias);
|
|
392
|
+
return [
|
|
393
|
+
`DROP TABLE IF EXISTS ${jt}_drafts;`,
|
|
394
|
+
`DROP TABLE IF EXISTS ${jt};`,
|
|
395
|
+
];
|
|
396
|
+
}
|
|
397
|
+
const stmts = [`ALTER TABLE ${tableName(seed)} DROP COLUMN ${alias};`];
|
|
398
|
+
if (branch && seed.allowDrafts) {
|
|
399
|
+
stmts.push(`ALTER TABLE ${draftTableName(seed)} DROP COLUMN ${alias};`);
|
|
400
|
+
}
|
|
401
|
+
return stmts;
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Returns the `RENAME COLUMN` SQL statements for renaming a field's alias.
|
|
405
|
+
* For a multi-relation branch, renames the junction table (+ drafts junction table) instead.
|
|
406
|
+
*
|
|
407
|
+
* @param seed The seed definition.
|
|
408
|
+
* @param from The old alias.
|
|
409
|
+
* @param to The new alias.
|
|
410
|
+
* @returns An array of SQL statements.
|
|
411
|
+
*/
|
|
412
|
+
export function generateRenameColumn(seed, from, to) {
|
|
413
|
+
const branch = seed.branches.find(b => b.alias === from);
|
|
414
|
+
if (branch && branch.type === 'relation' && branch.multiple === true) {
|
|
415
|
+
const oldJt = junctionTableName(seed.slug, from);
|
|
416
|
+
const newJt = junctionTableName(seed.slug, to);
|
|
417
|
+
const stmts = [`ALTER TABLE ${oldJt} RENAME TO ${newJt};`];
|
|
418
|
+
if (seed.allowDrafts) {
|
|
419
|
+
stmts.push(`ALTER TABLE ${oldJt}_drafts RENAME TO ${newJt}_drafts;`);
|
|
420
|
+
}
|
|
421
|
+
return stmts;
|
|
422
|
+
}
|
|
423
|
+
const stmts = [`ALTER TABLE ${tableName(seed)} RENAME COLUMN ${from} TO ${to};`];
|
|
424
|
+
if (branch && seed.allowDrafts) {
|
|
425
|
+
stmts.push(`ALTER TABLE ${draftTableName(seed)} RENAME COLUMN ${from} TO ${to};`);
|
|
426
|
+
}
|
|
427
|
+
return stmts;
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Returns the statements that change a column's SQL type in place using CAST, bypassing SQLite rebuild limitations.
|
|
431
|
+
*
|
|
432
|
+
* @param seed The seed definition.
|
|
433
|
+
* @param branch The target branch definition (carrying the new type).
|
|
434
|
+
* @throws {Error} If called on a multi-relation branch.
|
|
435
|
+
* @returns An array of SQL statements.
|
|
436
|
+
*/
|
|
437
|
+
export function generateRetypeColumn(seed, branch) {
|
|
438
|
+
if (branch.type === 'relation' && branch.multiple === true) {
|
|
439
|
+
throw new Error(`Branch "${branch.alias}" is a multi-relation and has no column to retype`);
|
|
440
|
+
}
|
|
441
|
+
const { sqlType } = BRANCH_TYPE_SQL[branch.type];
|
|
442
|
+
const alias = branch.alias;
|
|
443
|
+
const tmp = `__retype_${alias}`;
|
|
444
|
+
const rebuild = (table) => [
|
|
445
|
+
`ALTER TABLE ${table} ADD COLUMN ${tmp} ${sqlType};`,
|
|
446
|
+
`UPDATE ${table} SET ${tmp} = CAST(${alias} AS ${sqlType});`,
|
|
447
|
+
`ALTER TABLE ${table} DROP COLUMN ${alias};`,
|
|
448
|
+
`ALTER TABLE ${table} RENAME COLUMN ${tmp} TO ${alias};`,
|
|
449
|
+
];
|
|
450
|
+
const stmts = rebuild(tableName(seed));
|
|
451
|
+
if (seed.allowDrafts)
|
|
452
|
+
stmts.push(...rebuild(draftTableName(seed)));
|
|
453
|
+
return stmts;
|
|
454
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-seed.d.ts","sourceRoot":"","sources":["../../src/engine/define-seed.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEtC,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAE3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/engine/engine.ts"],"names":[],"mappings":"AACA,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policies.d.ts","sourceRoot":"","sources":["../../src/engine/policies.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAExC,wBAAsB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAK9D;AAED,wBAAsB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAEzF;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAgBzF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Seed, SelectOptions, ParameterizedQuery } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Builds a parameterized SQL SELECT query and bindings for a given Seed based on search, filtering, status, and ordering options.
|
|
4
|
+
*
|
|
5
|
+
* If `options.isCount` is set to `true`, it generates a counting query (`COUNT(*) as total`) rather than returning database rows.
|
|
6
|
+
* In count mode, column projections (`fields`), ordering (`orderBy` / `kanbanOrder`), and pagination (`LIMIT` / `OFFSET`) clauses and
|
|
7
|
+
* bindings are omitted, while join and filtering clauses are preserved.
|
|
8
|
+
*
|
|
9
|
+
* @param seed The seed definition.
|
|
10
|
+
* @param options Query configuration options.
|
|
11
|
+
* @returns The SQL query string and bindings.
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const { sql, bindings } = buildSelectQuery(postSeed, {
|
|
15
|
+
* status: 'published',
|
|
16
|
+
* filters: [{ column: 'title', type: 'text', conditions: [{ op: 'contains', value: 'cms' }] }],
|
|
17
|
+
* orderBy: { column: 'created_at', dir: 'DESC' },
|
|
18
|
+
* pagination: { limit: 20, offset: 0 },
|
|
19
|
+
* })
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare function buildSelectQuery(seed: Seed, options?: SelectOptions): ParameterizedQuery;
|
|
23
|
+
//# sourceMappingURL=query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/engine/query.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,IAAI,EAMJ,aAAa,EACb,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAIpB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,GAAE,aAAkB,GAAG,kBAAkB,CAoF5F"}
|