@brightsideoy/kama 0.1.0-alpha.185 → 0.1.0-alpha.187
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/content/definitions/nodes/article.yaml +12 -0
- package/content/definitions/taxonomies/categories.yaml +15 -0
- package/content/definitions/taxonomies/tags.yaml +12 -0
- package/dist/assets/index-BWyFmL1x.js +164 -0
- package/dist/assets/index-DW3EoeqB.css +1 -0
- package/dist/{dist-DzRvEXbl.js → dist-DwVP5kPq.js} +3899 -3550
- package/dist/index.html +2 -2
- package/dist/index.js +3931 -3578
- package/dist/schema-compiler.js +3 -3
- package/package.json +1 -1
- package/schema.sql +29 -0
- package/dist/assets/index-BSatZkQn.js +0 -164
- package/dist/assets/index-DGexed34.css +0 -1
package/dist/schema-compiler.js
CHANGED
|
@@ -30,17 +30,17 @@ async function f() {
|
|
|
30
30
|
if (n(f)) l = (await import(t(f).href)).compileDefinitions;
|
|
31
31
|
else if (n(p)) l = (await import(t(p).href)).compileDefinitions;
|
|
32
32
|
else try {
|
|
33
|
-
l = (await import("./dist-
|
|
33
|
+
l = (await import("./dist-DwVP5kPq.js")).compileDefinitions;
|
|
34
34
|
} catch (e) {
|
|
35
35
|
console.error("❌ Could not resolve Kama Schema Engine:", e), process.exit(1);
|
|
36
36
|
}
|
|
37
37
|
l || (console.error("❌ compileDefinitions function missing from resolved module"), process.exit(1));
|
|
38
|
-
let m = l(), h = Object.keys(m?.nodes || {}).length, g = Object.keys(m?.blocks || {}).length, _ = `// AUTO-GENERATED BUNDLE - DO NOT EDIT
|
|
38
|
+
let m = l(), h = Object.keys(m?.nodes || {}).length, g = Object.keys(m?.blocks || {}).length, _ = Object.keys(m?.taxonomies || {}).length, v = `// AUTO-GENERATED BUNDLE - DO NOT EDIT
|
|
39
39
|
const defs = ${JSON.stringify(m, null, 2)};
|
|
40
40
|
export const BUNDLED_DEFINITIONS = defs;
|
|
41
41
|
export default defs;
|
|
42
42
|
`;
|
|
43
|
-
a(c,
|
|
43
|
+
a(c, v, "utf-8"), console.log(`✅ Schema securely compiled using engine.ts to ${c} (${h} nodes, ${g} blocks, ${_} taxonomies)`);
|
|
44
44
|
}
|
|
45
45
|
f().catch((e) => {
|
|
46
46
|
console.error("❌ Schema Compiler Runtime Error:", e), process.exit(1);
|
package/package.json
CHANGED
package/schema.sql
CHANGED
|
@@ -177,6 +177,30 @@ CREATE TABLE IF NOT EXISTS "node_assets" (
|
|
|
177
177
|
FOREIGN KEY (assetId) REFERENCES assets(id) ON DELETE CASCADE
|
|
178
178
|
);
|
|
179
179
|
|
|
180
|
+
CREATE TABLE IF NOT EXISTS "taxonomy_terms" (
|
|
181
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
182
|
+
taxonomy TEXT NOT NULL,
|
|
183
|
+
key TEXT NOT NULL,
|
|
184
|
+
label TEXT NOT NULL,
|
|
185
|
+
parentId INTEGER,
|
|
186
|
+
sortOrder INTEGER DEFAULT 0,
|
|
187
|
+
dataJson TEXT,
|
|
188
|
+
createdAt TEXT DEFAULT CURRENT_TIMESTAMP,
|
|
189
|
+
updatedAt TEXT DEFAULT CURRENT_TIMESTAMP,
|
|
190
|
+
FOREIGN KEY (parentId) REFERENCES taxonomy_terms(id) ON DELETE CASCADE,
|
|
191
|
+
UNIQUE(taxonomy, key)
|
|
192
|
+
);
|
|
193
|
+
|
|
194
|
+
CREATE TABLE IF NOT EXISTS "node_terms" (
|
|
195
|
+
nodeId INTEGER NOT NULL,
|
|
196
|
+
termId INTEGER NOT NULL,
|
|
197
|
+
fieldKey TEXT NOT NULL,
|
|
198
|
+
sortOrder INTEGER DEFAULT 0,
|
|
199
|
+
PRIMARY KEY (nodeId, termId, fieldKey),
|
|
200
|
+
FOREIGN KEY (nodeId) REFERENCES content_nodes(id) ON DELETE CASCADE,
|
|
201
|
+
FOREIGN KEY (termId) REFERENCES taxonomy_terms(id) ON DELETE CASCADE
|
|
202
|
+
);
|
|
203
|
+
|
|
180
204
|
CREATE INDEX IF NOT EXISTS idx_tree_nodes_tree_parent ON tree_nodes(treeId, parentId);
|
|
181
205
|
CREATE INDEX IF NOT EXISTS idx_tree_nodes_contentId ON tree_nodes(contentId);
|
|
182
206
|
CREATE INDEX IF NOT EXISTS idx_content_nodes_slug_status ON content_nodes(slug, status);
|
|
@@ -204,3 +228,8 @@ CREATE INDEX IF NOT EXISTS idx_assets_system_created ON assets(isSystemVariant,
|
|
|
204
228
|
CREATE INDEX IF NOT EXISTS idx_assets_system_mime ON assets(isSystemVariant, mimeType);
|
|
205
229
|
CREATE INDEX IF NOT EXISTS idx_assets_deleted ON assets(deletedAt);
|
|
206
230
|
CREATE INDEX IF NOT EXISTS idx_assets_parent ON assets(parentAssetId);
|
|
231
|
+
CREATE INDEX IF NOT EXISTS idx_taxonomy_terms_tax ON taxonomy_terms(taxonomy);
|
|
232
|
+
CREATE INDEX IF NOT EXISTS idx_node_terms_node ON node_terms(nodeId);
|
|
233
|
+
CREATE INDEX IF NOT EXISTS idx_node_terms_term ON node_terms(termId);
|
|
234
|
+
CREATE INDEX IF NOT EXISTS idx_node_terms_node_term ON node_terms(nodeId, termId);
|
|
235
|
+
CREATE INDEX IF NOT EXISTS idx_node_terms_term_node ON node_terms(termId, nodeId);
|