@sonicjs-cms/core 2.3.4 → 2.3.5
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/{chunk-HAEKMXWF.cjs → chunk-6IZ4RIHG.cjs} +3 -3
- package/dist/{chunk-HAEKMXWF.cjs.map → chunk-6IZ4RIHG.cjs.map} +1 -1
- package/dist/{chunk-OPG5HRDH.cjs → chunk-6TRVJ54O.cjs} +5 -33
- package/dist/chunk-6TRVJ54O.cjs.map +1 -0
- package/dist/{chunk-PSPLHFXB.js → chunk-HI3BSNZ5.js} +5 -33
- package/dist/chunk-HI3BSNZ5.js.map +1 -0
- package/dist/{chunk-ZM6JGGRM.js → chunk-IDLIOJD2.js} +3 -3
- package/dist/{chunk-ZM6JGGRM.js.map → chunk-IDLIOJD2.js.map} +1 -1
- package/dist/{chunk-IJMMS22M.cjs → chunk-KGAS3IP3.cjs} +90 -90
- package/dist/{chunk-IJMMS22M.cjs.map → chunk-KGAS3IP3.cjs.map} +1 -1
- package/dist/{chunk-DJZKVUOZ.js → chunk-PKQNS4L7.js} +3 -3
- package/dist/{chunk-DJZKVUOZ.js.map → chunk-PKQNS4L7.js.map} +1 -1
- package/dist/{chunk-YSPRTSGF.cjs → chunk-VQ7SXTIO.cjs} +4 -4
- package/dist/{chunk-YSPRTSGF.cjs.map → chunk-VQ7SXTIO.cjs.map} +1 -1
- package/dist/{chunk-BUTUOYTE.js → chunk-ZA5NPYSD.js} +8 -8
- package/dist/{chunk-BUTUOYTE.js.map → chunk-ZA5NPYSD.js.map} +1 -1
- package/dist/index.cjs +74 -74
- package/dist/index.js +7 -7
- package/dist/middleware.cjs +23 -23
- package/dist/middleware.js +2 -2
- package/dist/migrations-5CHIZHBW.js +4 -0
- package/dist/{migrations-76HALF5N.js.map → migrations-5CHIZHBW.js.map} +1 -1
- package/dist/migrations-CZGQGXZO.cjs +13 -0
- package/dist/{migrations-JEVEEYXL.cjs.map → migrations-CZGQGXZO.cjs.map} +1 -1
- package/dist/routes.cjs +24 -24
- package/dist/routes.js +4 -4
- package/dist/services.cjs +2 -2
- package/dist/services.js +1 -1
- package/dist/utils.cjs +11 -11
- package/dist/utils.js +1 -1
- package/migrations/001_initial_schema.sql +3 -31
- package/package.json +1 -1
- package/dist/chunk-OPG5HRDH.cjs.map +0 -1
- package/dist/chunk-PSPLHFXB.js.map +0 -1
- package/dist/migrations-76HALF5N.js +0 -4
- package/dist/migrations-JEVEEYXL.cjs +0 -13
package/dist/routes.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkKGAS3IP3_cjs = require('./chunk-KGAS3IP3.cjs');
|
|
4
4
|
require('./chunk-ES3BRZQJ.cjs');
|
|
5
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-VQ7SXTIO.cjs');
|
|
6
6
|
require('./chunk-NAYD76QF.cjs');
|
|
7
|
-
require('./chunk-
|
|
7
|
+
require('./chunk-6TRVJ54O.cjs');
|
|
8
8
|
require('./chunk-YU6QFFI4.cjs');
|
|
9
|
-
require('./chunk-
|
|
9
|
+
require('./chunk-6IZ4RIHG.cjs');
|
|
10
10
|
require('./chunk-7KCDFDRI.cjs');
|
|
11
11
|
require('./chunk-RCQ2HIQD.cjs');
|
|
12
12
|
require('./chunk-IGJUBJBW.cjs');
|
|
@@ -15,83 +15,83 @@ require('./chunk-IGJUBJBW.cjs');
|
|
|
15
15
|
|
|
16
16
|
Object.defineProperty(exports, "ROUTES_INFO", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkKGAS3IP3_cjs.ROUTES_INFO; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "adminApiRoutes", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkKGAS3IP3_cjs.admin_api_default; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "adminCheckboxRoutes", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkKGAS3IP3_cjs.adminCheckboxRoutes; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "adminCodeExamplesRoutes", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkKGAS3IP3_cjs.admin_code_examples_default; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "adminCollectionsRoutes", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkKGAS3IP3_cjs.adminCollectionsRoutes; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "adminContentRoutes", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkKGAS3IP3_cjs.admin_content_default; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "adminDashboardRoutes", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkKGAS3IP3_cjs.router; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "adminDesignRoutes", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkKGAS3IP3_cjs.adminDesignRoutes; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "adminLogsRoutes", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkKGAS3IP3_cjs.adminLogsRoutes; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "adminMediaRoutes", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkKGAS3IP3_cjs.adminMediaRoutes; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "adminPluginRoutes", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkKGAS3IP3_cjs.adminPluginRoutes; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "adminSettingsRoutes", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkKGAS3IP3_cjs.adminSettingsRoutes; }
|
|
63
63
|
});
|
|
64
64
|
Object.defineProperty(exports, "adminTestimonialsRoutes", {
|
|
65
65
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunkKGAS3IP3_cjs.admin_testimonials_default; }
|
|
67
67
|
});
|
|
68
68
|
Object.defineProperty(exports, "adminUsersRoutes", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunkKGAS3IP3_cjs.userRoutes; }
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "apiContentCrudRoutes", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkKGAS3IP3_cjs.api_content_crud_default; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, "apiMediaRoutes", {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkKGAS3IP3_cjs.api_media_default; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "apiRoutes", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkKGAS3IP3_cjs.api_default; }
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "apiSystemRoutes", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunkKGAS3IP3_cjs.api_system_default; }
|
|
87
87
|
});
|
|
88
88
|
Object.defineProperty(exports, "authRoutes", {
|
|
89
89
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunkKGAS3IP3_cjs.auth_default; }
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(exports, "testCleanupRoutes", {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunkKGAS3IP3_cjs.test_cleanup_default; }
|
|
95
95
|
});
|
|
96
96
|
//# sourceMappingURL=routes.cjs.map
|
|
97
97
|
//# sourceMappingURL=routes.cjs.map
|
package/dist/routes.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { ROUTES_INFO, admin_api_default as adminApiRoutes, adminCheckboxRoutes, admin_code_examples_default as adminCodeExamplesRoutes, adminCollectionsRoutes, admin_content_default as adminContentRoutes, router as adminDashboardRoutes, adminDesignRoutes, adminLogsRoutes, adminMediaRoutes, adminPluginRoutes, adminSettingsRoutes, admin_testimonials_default as adminTestimonialsRoutes, userRoutes as adminUsersRoutes, api_content_crud_default as apiContentCrudRoutes, api_media_default as apiMediaRoutes, api_default as apiRoutes, api_system_default as apiSystemRoutes, auth_default as authRoutes, test_cleanup_default as testCleanupRoutes } from './chunk-
|
|
1
|
+
export { ROUTES_INFO, admin_api_default as adminApiRoutes, adminCheckboxRoutes, admin_code_examples_default as adminCodeExamplesRoutes, adminCollectionsRoutes, admin_content_default as adminContentRoutes, router as adminDashboardRoutes, adminDesignRoutes, adminLogsRoutes, adminMediaRoutes, adminPluginRoutes, adminSettingsRoutes, admin_testimonials_default as adminTestimonialsRoutes, userRoutes as adminUsersRoutes, api_content_crud_default as apiContentCrudRoutes, api_media_default as apiMediaRoutes, api_default as apiRoutes, api_system_default as apiSystemRoutes, auth_default as authRoutes, test_cleanup_default as testCleanupRoutes } from './chunk-ZA5NPYSD.js';
|
|
2
2
|
import './chunk-Q52ZQFMB.js';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-PKQNS4L7.js';
|
|
4
4
|
import './chunk-7CXL5K7N.js';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-HI3BSNZ5.js';
|
|
6
6
|
import './chunk-5RKQB2JG.js';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-IDLIOJD2.js';
|
|
8
8
|
import './chunk-RRKXFGIO.js';
|
|
9
9
|
import './chunk-FICTAGD4.js';
|
|
10
10
|
import './chunk-V4OQ3NZ2.js';
|
package/dist/services.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkES3BRZQJ_cjs = require('./chunk-ES3BRZQJ.cjs');
|
|
4
4
|
var chunkNAYD76QF_cjs = require('./chunk-NAYD76QF.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunk6TRVJ54O_cjs = require('./chunk-6TRVJ54O.cjs');
|
|
6
6
|
require('./chunk-7KCDFDRI.cjs');
|
|
7
7
|
require('./chunk-IGJUBJBW.cjs');
|
|
8
8
|
|
|
@@ -106,7 +106,7 @@ Object.defineProperty(exports, "validateCollectionConfig", {
|
|
|
106
106
|
});
|
|
107
107
|
Object.defineProperty(exports, "MigrationService", {
|
|
108
108
|
enumerable: true,
|
|
109
|
-
get: function () { return
|
|
109
|
+
get: function () { return chunk6TRVJ54O_cjs.MigrationService; }
|
|
110
110
|
});
|
|
111
111
|
//# sourceMappingURL=services.cjs.map
|
|
112
112
|
//# sourceMappingURL=services.cjs.map
|
package/dist/services.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { CACHE_CONFIGS, CacheService, Logger, SettingsService, TelemetryService, createInstallationIdentity, getCacheService, getLogger, getTelemetryService, initLogger, initTelemetry } from './chunk-Q52ZQFMB.js';
|
|
2
2
|
export { PluginBootstrapService, PluginService, cleanupRemovedCollections, fullCollectionSync, getAvailableCollectionNames, getManagedCollections, isCollectionManaged, loadCollectionConfig, loadCollectionConfigs, registerCollections, syncCollection, syncCollections, validateCollectionConfig } from './chunk-7CXL5K7N.js';
|
|
3
|
-
export { MigrationService } from './chunk-
|
|
3
|
+
export { MigrationService } from './chunk-HI3BSNZ5.js';
|
|
4
4
|
import './chunk-RRKXFGIO.js';
|
|
5
5
|
import './chunk-V4OQ3NZ2.js';
|
|
6
6
|
//# sourceMappingURL=services.js.map
|
package/dist/utils.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk6IZ4RIHG_cjs = require('./chunk-6IZ4RIHG.cjs');
|
|
4
4
|
var chunk7KCDFDRI_cjs = require('./chunk-7KCDFDRI.cjs');
|
|
5
5
|
var chunkRCQ2HIQD_cjs = require('./chunk-RCQ2HIQD.cjs');
|
|
6
6
|
require('./chunk-IGJUBJBW.cjs');
|
|
@@ -9,43 +9,43 @@ require('./chunk-IGJUBJBW.cjs');
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "QueryFilterBuilder", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunk6IZ4RIHG_cjs.QueryFilterBuilder; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "SONICJS_VERSION", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunk6IZ4RIHG_cjs.SONICJS_VERSION; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "TemplateRenderer", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunk6IZ4RIHG_cjs.TemplateRenderer; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "buildQuery", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunk6IZ4RIHG_cjs.buildQuery; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "escapeHtml", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunk6IZ4RIHG_cjs.escapeHtml; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "getCoreVersion", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunk6IZ4RIHG_cjs.getCoreVersion; }
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "renderTemplate", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunk6IZ4RIHG_cjs.renderTemplate; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "sanitizeInput", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunk6IZ4RIHG_cjs.sanitizeInput; }
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "sanitizeObject", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunk6IZ4RIHG_cjs.sanitizeObject; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "templateRenderer", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunk6IZ4RIHG_cjs.templateRenderer; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "generateInstallationId", {
|
|
51
51
|
enumerable: true,
|
package/dist/utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { QueryFilterBuilder, SONICJS_VERSION, TemplateRenderer, buildQuery, escapeHtml, getCoreVersion, renderTemplate, sanitizeInput, sanitizeObject, templateRenderer } from './chunk-
|
|
1
|
+
export { QueryFilterBuilder, SONICJS_VERSION, TemplateRenderer, buildQuery, escapeHtml, getCoreVersion, renderTemplate, sanitizeInput, sanitizeObject, templateRenderer } from './chunk-IDLIOJD2.js';
|
|
2
2
|
export { generateInstallationId, generateProjectId, getDefaultTelemetryConfig, getTelemetryConfig, isTelemetryEnabled, sanitizeErrorMessage, sanitizeRoute, shouldSkipEvent } from './chunk-RRKXFGIO.js';
|
|
3
3
|
export { metricsTracker } from './chunk-FICTAGD4.js';
|
|
4
4
|
import './chunk-V4OQ3NZ2.js';
|
|
@@ -129,22 +129,8 @@ CREATE INDEX IF NOT EXISTS idx_api_tokens_token ON api_tokens(token);
|
|
|
129
129
|
CREATE INDEX IF NOT EXISTS idx_workflow_history_content ON workflow_history(content_id);
|
|
130
130
|
CREATE INDEX IF NOT EXISTS idx_workflow_history_user ON workflow_history(user_id);
|
|
131
131
|
|
|
132
|
-
--
|
|
133
|
-
|
|
134
|
-
id, email, username, first_name, last_name, password_hash,
|
|
135
|
-
role, is_active, created_at, updated_at
|
|
136
|
-
) VALUES (
|
|
137
|
-
'admin-user-id',
|
|
138
|
-
'admin@sonicjs.com',
|
|
139
|
-
'admin',
|
|
140
|
-
'Admin',
|
|
141
|
-
'User',
|
|
142
|
-
'9c9ec10df964f588e51acc794a63f18d5582e9b91c8366ba292ebde84d3834fd', -- SHA-256 hash of 'sonicjs!' with salt
|
|
143
|
-
'admin',
|
|
144
|
-
1,
|
|
145
|
-
strftime('%s', 'now') * 1000,
|
|
146
|
-
strftime('%s', 'now') * 1000
|
|
147
|
-
);
|
|
132
|
+
-- Note: Admin user is created via the seed script with user-provided credentials
|
|
133
|
+
-- Run 'npm run seed' after migrations to create the admin user
|
|
148
134
|
|
|
149
135
|
-- Insert sample collections
|
|
150
136
|
INSERT OR IGNORE INTO collections (
|
|
@@ -181,18 +167,4 @@ INSERT OR IGNORE INTO collections (
|
|
|
181
167
|
strftime('%s', 'now') * 1000
|
|
182
168
|
);
|
|
183
169
|
|
|
184
|
-
--
|
|
185
|
-
INSERT OR IGNORE INTO content (
|
|
186
|
-
id, collection_id, slug, title, data, status,
|
|
187
|
-
author_id, created_at, updated_at
|
|
188
|
-
) VALUES (
|
|
189
|
-
'welcome-blog-post',
|
|
190
|
-
'blog-posts-collection',
|
|
191
|
-
'welcome-to-sonicjs-ai',
|
|
192
|
-
'Welcome to SonicJS AI',
|
|
193
|
-
'{"title":"Welcome to SonicJS AI","content":"<h1>Welcome to SonicJS AI</h1><p>This is your first blog post created with SonicJS AI, a modern headless CMS built on Cloudflare Workers.</p><h2>Features</h2><ul><li>Cloudflare-native architecture</li><li>TypeScript-first development</li><li>Hono.js framework</li><li>D1 database</li><li>R2 media storage</li><li>Edge computing</li></ul><p>Get started by exploring the admin interface and creating your own content!</p>","excerpt":"Welcome to SonicJS AI, a modern headless CMS built on Cloudflare Workers with TypeScript and Hono.js.","status":"published","tags":["welcome","cms","cloudflare"]}',
|
|
194
|
-
'published',
|
|
195
|
-
'admin-user-id',
|
|
196
|
-
strftime('%s', 'now') * 1000,
|
|
197
|
-
strftime('%s', 'now') * 1000
|
|
198
|
-
);
|
|
170
|
+
-- Note: Sample content can be created via the admin interface after the admin user is seeded
|
package/package.json
CHANGED