@sonicjs-cms/core 2.3.16 → 2.4.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/{chunk-4CLJPURJ.cjs → chunk-2MI3LZFH.cjs} +2 -2
- package/dist/{chunk-4CLJPURJ.cjs.map → chunk-2MI3LZFH.cjs.map} +1 -1
- package/dist/{chunk-AE27GPMY.cjs → chunk-7I5INVNR.cjs} +4 -4
- package/dist/{chunk-AE27GPMY.cjs.map → chunk-7I5INVNR.cjs.map} +1 -1
- package/dist/{chunk-ICDJ7KPP.cjs → chunk-A4SVOGG6.cjs} +143 -96
- package/dist/chunk-A4SVOGG6.cjs.map +1 -0
- package/dist/{chunk-33Q6ETMQ.js → chunk-D2NLCPO2.js} +2 -2
- package/dist/{chunk-33Q6ETMQ.js.map → chunk-D2NLCPO2.js.map} +1 -1
- package/dist/{chunk-ATNWDVAD.js → chunk-DXM575E2.js} +3 -3
- package/dist/{chunk-ATNWDVAD.js.map → chunk-DXM575E2.js.map} +1 -1
- package/dist/{chunk-QUBMTYRI.js → chunk-FT6NBHNX.js} +61 -15
- package/dist/chunk-FT6NBHNX.js.map +1 -0
- package/dist/{chunk-EUQDJQHJ.cjs → chunk-FYEDK7K7.cjs} +3 -3
- package/dist/{chunk-EUQDJQHJ.cjs.map → chunk-FYEDK7K7.cjs.map} +1 -1
- package/dist/{chunk-LRFDZHLM.js → chunk-VNCYCH3H.js} +3 -3
- package/dist/{chunk-LRFDZHLM.js.map → chunk-VNCYCH3H.js.map} +1 -1
- package/dist/index.cjs +672 -78
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +601 -7
- package/dist/index.js.map +1 -1
- package/dist/middleware.cjs +23 -23
- package/dist/middleware.js +2 -2
- package/dist/migrations-32QAYLWJ.cjs +13 -0
- package/dist/{migrations-QCBN4TLD.cjs.map → migrations-32QAYLWJ.cjs.map} +1 -1
- package/dist/migrations-57ZHBQ4X.js +4 -0
- package/dist/{migrations-7TWFJVNT.js.map → migrations-57ZHBQ4X.js.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/package.json +1 -1
- package/dist/chunk-ICDJ7KPP.cjs.map +0 -1
- package/dist/chunk-QUBMTYRI.js.map +0 -1
- package/dist/migrations-7TWFJVNT.js +0 -4
- package/dist/migrations-QCBN4TLD.cjs +0 -13
package/dist/index.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkA4SVOGG6_cjs = require('./chunk-A4SVOGG6.cjs');
|
|
4
4
|
var chunk7FOAMNTI_cjs = require('./chunk-7FOAMNTI.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunk7I5INVNR_cjs = require('./chunk-7I5INVNR.cjs');
|
|
6
6
|
var chunkILZ3DP4I_cjs = require('./chunk-ILZ3DP4I.cjs');
|
|
7
|
-
var
|
|
7
|
+
var chunk2MI3LZFH_cjs = require('./chunk-2MI3LZFH.cjs');
|
|
8
8
|
var chunkYIXSSJWD_cjs = require('./chunk-YIXSSJWD.cjs');
|
|
9
9
|
var chunkAZLU3ROK_cjs = require('./chunk-AZLU3ROK.cjs');
|
|
10
10
|
var chunkDTLB6UIH_cjs = require('./chunk-DTLB6UIH.cjs');
|
|
11
|
-
var
|
|
11
|
+
var chunkFYEDK7K7_cjs = require('./chunk-FYEDK7K7.cjs');
|
|
12
12
|
require('./chunk-P3XDZL6Q.cjs');
|
|
13
13
|
var chunkRCQ2HIQD_cjs = require('./chunk-RCQ2HIQD.cjs');
|
|
14
14
|
var chunkKYGRJCZM_cjs = require('./chunk-KYGRJCZM.cjs');
|
|
@@ -19,6 +19,31 @@ var cookie = require('hono/cookie');
|
|
|
19
19
|
var zod = require('zod');
|
|
20
20
|
var d1 = require('drizzle-orm/d1');
|
|
21
21
|
|
|
22
|
+
// src/middleware/admin-setup.ts
|
|
23
|
+
function adminSetupMiddleware() {
|
|
24
|
+
return async (c, next) => {
|
|
25
|
+
const path = new URL(c.req.url).pathname;
|
|
26
|
+
if (path.startsWith("/auth/")) {
|
|
27
|
+
return next();
|
|
28
|
+
}
|
|
29
|
+
if (path.match(/\.(js|css|ico|png|jpg|jpeg|gif|svg|woff|woff2|ttf|eot)$/)) {
|
|
30
|
+
return next();
|
|
31
|
+
}
|
|
32
|
+
if (path === "/health") {
|
|
33
|
+
return next();
|
|
34
|
+
}
|
|
35
|
+
if (path.startsWith("/api/")) {
|
|
36
|
+
return next();
|
|
37
|
+
}
|
|
38
|
+
const db = c.env.DB;
|
|
39
|
+
const adminExists = await chunkA4SVOGG6_cjs.checkAdminUserExists(db);
|
|
40
|
+
if (!adminExists) {
|
|
41
|
+
return c.redirect("/auth/register?setup=true");
|
|
42
|
+
}
|
|
43
|
+
return next();
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
22
47
|
// src/plugins/core-plugins/database-tools-plugin/services/database-service.ts
|
|
23
48
|
var DatabaseToolsService = class {
|
|
24
49
|
constructor(db) {
|
|
@@ -558,7 +583,7 @@ function formatCellValue(value) {
|
|
|
558
583
|
// src/plugins/core-plugins/database-tools-plugin/admin-routes.ts
|
|
559
584
|
function createDatabaseToolsAdminRoutes() {
|
|
560
585
|
const router2 = new hono.Hono();
|
|
561
|
-
router2.use("*",
|
|
586
|
+
router2.use("*", chunk7I5INVNR_cjs.requireAuth());
|
|
562
587
|
router2.get("/api/stats", async (c) => {
|
|
563
588
|
try {
|
|
564
589
|
const user = c.get("user");
|
|
@@ -738,8 +763,575 @@ function createDatabaseToolsAdminRoutes() {
|
|
|
738
763
|
});
|
|
739
764
|
return router2;
|
|
740
765
|
}
|
|
766
|
+
|
|
767
|
+
// src/plugins/core-plugins/seed-data-plugin/services/seed-data-service.ts
|
|
768
|
+
var SeedDataService = class {
|
|
769
|
+
constructor(db) {
|
|
770
|
+
this.db = db;
|
|
771
|
+
}
|
|
772
|
+
// First names for generating realistic users
|
|
773
|
+
firstNames = [
|
|
774
|
+
"Emma",
|
|
775
|
+
"Liam",
|
|
776
|
+
"Olivia",
|
|
777
|
+
"Noah",
|
|
778
|
+
"Ava",
|
|
779
|
+
"Ethan",
|
|
780
|
+
"Sophia",
|
|
781
|
+
"Mason",
|
|
782
|
+
"Isabella",
|
|
783
|
+
"William",
|
|
784
|
+
"Mia",
|
|
785
|
+
"James",
|
|
786
|
+
"Charlotte",
|
|
787
|
+
"Benjamin",
|
|
788
|
+
"Amelia",
|
|
789
|
+
"Lucas",
|
|
790
|
+
"Harper",
|
|
791
|
+
"Henry",
|
|
792
|
+
"Evelyn",
|
|
793
|
+
"Alexander"
|
|
794
|
+
];
|
|
795
|
+
// Last names for generating realistic users
|
|
796
|
+
lastNames = [
|
|
797
|
+
"Smith",
|
|
798
|
+
"Johnson",
|
|
799
|
+
"Williams",
|
|
800
|
+
"Brown",
|
|
801
|
+
"Jones",
|
|
802
|
+
"Garcia",
|
|
803
|
+
"Miller",
|
|
804
|
+
"Davis",
|
|
805
|
+
"Rodriguez",
|
|
806
|
+
"Martinez",
|
|
807
|
+
"Hernandez",
|
|
808
|
+
"Lopez",
|
|
809
|
+
"Gonzalez",
|
|
810
|
+
"Wilson",
|
|
811
|
+
"Anderson",
|
|
812
|
+
"Thomas",
|
|
813
|
+
"Taylor",
|
|
814
|
+
"Moore",
|
|
815
|
+
"Jackson",
|
|
816
|
+
"Martin"
|
|
817
|
+
];
|
|
818
|
+
// Content titles for blog posts
|
|
819
|
+
blogTitles = [
|
|
820
|
+
"Getting Started with Modern Web Development",
|
|
821
|
+
"The Future of JavaScript Frameworks",
|
|
822
|
+
"Building Scalable Applications with Microservices",
|
|
823
|
+
"Understanding TypeScript: A Complete Guide",
|
|
824
|
+
"Best Practices for API Design",
|
|
825
|
+
"Introduction to Cloud Computing",
|
|
826
|
+
"Mastering Git and Version Control",
|
|
827
|
+
"The Art of Code Review",
|
|
828
|
+
"Performance Optimization Techniques",
|
|
829
|
+
"Security Best Practices for Web Apps",
|
|
830
|
+
"Exploring Serverless Architecture",
|
|
831
|
+
"Database Design Fundamentals",
|
|
832
|
+
"Testing Strategies for Modern Apps",
|
|
833
|
+
"CI/CD Pipeline Implementation",
|
|
834
|
+
"Mobile-First Development Approach"
|
|
835
|
+
];
|
|
836
|
+
// Content titles for pages
|
|
837
|
+
pageTitles = [
|
|
838
|
+
"About Us",
|
|
839
|
+
"Contact",
|
|
840
|
+
"Privacy Policy",
|
|
841
|
+
"Terms of Service",
|
|
842
|
+
"FAQ",
|
|
843
|
+
"Our Team",
|
|
844
|
+
"Careers",
|
|
845
|
+
"Press Kit",
|
|
846
|
+
"Support",
|
|
847
|
+
"Documentation",
|
|
848
|
+
"Pricing",
|
|
849
|
+
"Features"
|
|
850
|
+
];
|
|
851
|
+
// Content titles for products
|
|
852
|
+
productTitles = [
|
|
853
|
+
"Premium Wireless Headphones",
|
|
854
|
+
"Smart Watch Pro",
|
|
855
|
+
"Laptop Stand Adjustable",
|
|
856
|
+
"Mechanical Keyboard RGB",
|
|
857
|
+
"HD Webcam 4K",
|
|
858
|
+
"USB-C Hub 7-in-1",
|
|
859
|
+
"Portable SSD 1TB",
|
|
860
|
+
"Wireless Mouse Ergonomic",
|
|
861
|
+
'Monitor 27" 4K',
|
|
862
|
+
"Desk Lamp LED",
|
|
863
|
+
"Phone Case Premium",
|
|
864
|
+
"Tablet Stand Aluminum",
|
|
865
|
+
"Cable Management Kit",
|
|
866
|
+
"Power Bank 20000mAh",
|
|
867
|
+
"Bluetooth Speaker Portable"
|
|
868
|
+
];
|
|
869
|
+
// Content for generating blog posts
|
|
870
|
+
blogContent = [
|
|
871
|
+
"This comprehensive guide covers everything you need to know about modern development practices and tools.",
|
|
872
|
+
"Learn the fundamentals and advanced concepts that will help you build better applications.",
|
|
873
|
+
"Discover the latest trends and best practices used by industry professionals.",
|
|
874
|
+
"A deep dive into the technologies and methodologies shaping the future of software development.",
|
|
875
|
+
"Practical tips and real-world examples to improve your development workflow.",
|
|
876
|
+
"Explore cutting-edge techniques and proven strategies for building robust applications.",
|
|
877
|
+
"Master the essential skills needed to excel in modern software development.",
|
|
878
|
+
"An in-depth look at the tools and frameworks that power today's web applications.",
|
|
879
|
+
"Step-by-step instructions and expert insights for developers of all levels.",
|
|
880
|
+
"Understanding the core principles that drive successful software projects."
|
|
881
|
+
];
|
|
882
|
+
// Generate a random ID
|
|
883
|
+
generateId() {
|
|
884
|
+
return `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
885
|
+
}
|
|
886
|
+
// Generate a slug from a title
|
|
887
|
+
generateSlug(title) {
|
|
888
|
+
return title.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "");
|
|
889
|
+
}
|
|
890
|
+
// Generate random date within the last year
|
|
891
|
+
randomDate() {
|
|
892
|
+
const now = /* @__PURE__ */ new Date();
|
|
893
|
+
const yearAgo = new Date(now.getFullYear() - 1, now.getMonth(), now.getDate());
|
|
894
|
+
const randomTime = yearAgo.getTime() + Math.random() * (now.getTime() - yearAgo.getTime());
|
|
895
|
+
return new Date(randomTime);
|
|
896
|
+
}
|
|
897
|
+
// Create 20 example users
|
|
898
|
+
async createUsers() {
|
|
899
|
+
const roles = ["admin", "editor", "author", "viewer"];
|
|
900
|
+
const hashedPassword = "password123";
|
|
901
|
+
let count = 0;
|
|
902
|
+
for (let i = 0; i < 20; i++) {
|
|
903
|
+
const firstName = this.firstNames[Math.floor(Math.random() * this.firstNames.length)] || "John";
|
|
904
|
+
const lastName = this.lastNames[Math.floor(Math.random() * this.lastNames.length)] || "Doe";
|
|
905
|
+
const username = `${firstName.toLowerCase()}${lastName.toLowerCase()}${i}`;
|
|
906
|
+
const email = `${username}@example.com`;
|
|
907
|
+
const createdAt = this.randomDate();
|
|
908
|
+
const createdAtTimestamp = Math.floor(createdAt.getTime() / 1e3);
|
|
909
|
+
const stmt = this.db.prepare(`
|
|
910
|
+
INSERT INTO users (id, email, username, first_name, last_name, password_hash, role, is_active, last_login_at, created_at, updated_at)
|
|
911
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
912
|
+
`);
|
|
913
|
+
await stmt.bind(
|
|
914
|
+
this.generateId(),
|
|
915
|
+
email,
|
|
916
|
+
username,
|
|
917
|
+
firstName,
|
|
918
|
+
lastName,
|
|
919
|
+
hashedPassword,
|
|
920
|
+
roles[Math.floor(Math.random() * roles.length)],
|
|
921
|
+
Math.random() > 0.1 ? 1 : 0,
|
|
922
|
+
// 90% active
|
|
923
|
+
Math.random() > 0.3 ? createdAtTimestamp : null,
|
|
924
|
+
createdAtTimestamp,
|
|
925
|
+
createdAtTimestamp
|
|
926
|
+
).run();
|
|
927
|
+
count++;
|
|
928
|
+
}
|
|
929
|
+
return count;
|
|
930
|
+
}
|
|
931
|
+
// Create 200 content items across different types
|
|
932
|
+
async createContent() {
|
|
933
|
+
const usersStmt = this.db.prepare("SELECT * FROM users");
|
|
934
|
+
const { results: allUsers } = await usersStmt.all();
|
|
935
|
+
const collectionsStmt = this.db.prepare("SELECT * FROM collections");
|
|
936
|
+
const { results: allCollections } = await collectionsStmt.all();
|
|
937
|
+
if (!allUsers || allUsers.length === 0) {
|
|
938
|
+
throw new Error("No users found. Please create users first.");
|
|
939
|
+
}
|
|
940
|
+
if (!allCollections || allCollections.length === 0) {
|
|
941
|
+
throw new Error("No collections found. Please create collections first.");
|
|
942
|
+
}
|
|
943
|
+
const statuses = ["draft", "published", "archived"];
|
|
944
|
+
let count = 0;
|
|
945
|
+
for (let i = 0; i < 200; i++) {
|
|
946
|
+
const collection = allCollections[Math.floor(Math.random() * allCollections.length)];
|
|
947
|
+
const author = allUsers[Math.floor(Math.random() * allUsers.length)];
|
|
948
|
+
const status = statuses[Math.floor(Math.random() * statuses.length)];
|
|
949
|
+
let title;
|
|
950
|
+
let contentData;
|
|
951
|
+
if (collection.name === "blog_posts" || collection.name.includes("blog")) {
|
|
952
|
+
title = this.blogTitles[Math.floor(Math.random() * this.blogTitles.length)] || "Untitled Blog Post";
|
|
953
|
+
contentData = {
|
|
954
|
+
body: this.blogContent[Math.floor(Math.random() * this.blogContent.length)] || "Blog content here",
|
|
955
|
+
excerpt: "A brief introduction to this article that provides an overview of the main topics covered.",
|
|
956
|
+
tags: this.generateTags(),
|
|
957
|
+
featured: Math.random() > 0.7
|
|
958
|
+
};
|
|
959
|
+
} else if (collection.name === "pages" || collection.name.includes("page")) {
|
|
960
|
+
title = this.pageTitles[Math.floor(Math.random() * this.pageTitles.length)] || "Untitled Page";
|
|
961
|
+
contentData = {
|
|
962
|
+
body: "This is a standard page with important information about our services and policies.",
|
|
963
|
+
template: "default",
|
|
964
|
+
showInMenu: Math.random() > 0.5
|
|
965
|
+
};
|
|
966
|
+
} else if (collection.name === "products" || collection.name.includes("product")) {
|
|
967
|
+
title = this.productTitles[Math.floor(Math.random() * this.productTitles.length)] || "Untitled Product";
|
|
968
|
+
contentData = {
|
|
969
|
+
description: "High-quality product with excellent features and great value for money.",
|
|
970
|
+
price: (Math.random() * 500 + 10).toFixed(2),
|
|
971
|
+
sku: `SKU-${Math.random().toString(36).substr(2, 9).toUpperCase()}`,
|
|
972
|
+
inStock: Math.random() > 0.2,
|
|
973
|
+
rating: (Math.random() * 2 + 3).toFixed(1)
|
|
974
|
+
// 3.0 - 5.0
|
|
975
|
+
};
|
|
976
|
+
} else {
|
|
977
|
+
title = `${collection.display_name || collection.name} Item ${i + 1}`;
|
|
978
|
+
contentData = {
|
|
979
|
+
description: "This is a sample content item with generic data.",
|
|
980
|
+
value: Math.floor(Math.random() * 1e3)
|
|
981
|
+
};
|
|
982
|
+
}
|
|
983
|
+
const slug = `${this.generateSlug(title)}-${i}`;
|
|
984
|
+
const createdAt = this.randomDate();
|
|
985
|
+
const createdAtTimestamp = Math.floor(createdAt.getTime() / 1e3);
|
|
986
|
+
const publishedAtTimestamp = status === "published" ? createdAtTimestamp : null;
|
|
987
|
+
const stmt = this.db.prepare(`
|
|
988
|
+
INSERT INTO content (id, collection_id, slug, title, data, status, published_at, author_id, created_at, updated_at)
|
|
989
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
990
|
+
`);
|
|
991
|
+
await stmt.bind(
|
|
992
|
+
this.generateId(),
|
|
993
|
+
collection.id,
|
|
994
|
+
slug,
|
|
995
|
+
`${title} ${i}`,
|
|
996
|
+
JSON.stringify(contentData),
|
|
997
|
+
status,
|
|
998
|
+
publishedAtTimestamp,
|
|
999
|
+
author.id,
|
|
1000
|
+
createdAtTimestamp,
|
|
1001
|
+
createdAtTimestamp
|
|
1002
|
+
).run();
|
|
1003
|
+
count++;
|
|
1004
|
+
}
|
|
1005
|
+
return count;
|
|
1006
|
+
}
|
|
1007
|
+
// Generate random tags for blog posts
|
|
1008
|
+
generateTags() {
|
|
1009
|
+
const allTags = [
|
|
1010
|
+
"tutorial",
|
|
1011
|
+
"guide",
|
|
1012
|
+
"javascript",
|
|
1013
|
+
"typescript",
|
|
1014
|
+
"web-dev",
|
|
1015
|
+
"backend",
|
|
1016
|
+
"frontend",
|
|
1017
|
+
"best-practices",
|
|
1018
|
+
"security",
|
|
1019
|
+
"performance",
|
|
1020
|
+
"testing",
|
|
1021
|
+
"deployment",
|
|
1022
|
+
"cloud",
|
|
1023
|
+
"database",
|
|
1024
|
+
"api"
|
|
1025
|
+
];
|
|
1026
|
+
const numTags = Math.floor(Math.random() * 4) + 1;
|
|
1027
|
+
const shuffled = allTags.sort(() => 0.5 - Math.random());
|
|
1028
|
+
return shuffled.slice(0, numTags);
|
|
1029
|
+
}
|
|
1030
|
+
// Seed all data
|
|
1031
|
+
async seedAll() {
|
|
1032
|
+
const userCount = await this.createUsers();
|
|
1033
|
+
const contentCount = await this.createContent();
|
|
1034
|
+
return {
|
|
1035
|
+
users: userCount,
|
|
1036
|
+
content: contentCount
|
|
1037
|
+
};
|
|
1038
|
+
}
|
|
1039
|
+
// Clear all seed data (optional cleanup method)
|
|
1040
|
+
async clearSeedData() {
|
|
1041
|
+
const deleteContentStmt = this.db.prepare("DELETE FROM content");
|
|
1042
|
+
await deleteContentStmt.run();
|
|
1043
|
+
const deleteUsersStmt = this.db.prepare(
|
|
1044
|
+
"DELETE FROM users WHERE role != 'admin'"
|
|
1045
|
+
);
|
|
1046
|
+
await deleteUsersStmt.run();
|
|
1047
|
+
}
|
|
1048
|
+
};
|
|
1049
|
+
|
|
1050
|
+
// src/plugins/core-plugins/seed-data-plugin/admin-routes.ts
|
|
1051
|
+
function createSeedDataAdminRoutes() {
|
|
1052
|
+
const routes = new hono.Hono();
|
|
1053
|
+
routes.get("/", async (c) => {
|
|
1054
|
+
const html3 = `
|
|
1055
|
+
<!DOCTYPE html>
|
|
1056
|
+
<html>
|
|
1057
|
+
<head>
|
|
1058
|
+
<title>Seed Data - SonicJS Admin</title>
|
|
1059
|
+
<meta charset="utf-8">
|
|
1060
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
1061
|
+
<style>
|
|
1062
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
1063
|
+
body {
|
|
1064
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
1065
|
+
background: #f5f5f5;
|
|
1066
|
+
padding: 2rem;
|
|
1067
|
+
}
|
|
1068
|
+
.container {
|
|
1069
|
+
max-width: 800px;
|
|
1070
|
+
margin: 0 auto;
|
|
1071
|
+
background: white;
|
|
1072
|
+
border-radius: 8px;
|
|
1073
|
+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
1074
|
+
padding: 2rem;
|
|
1075
|
+
}
|
|
1076
|
+
h1 {
|
|
1077
|
+
color: #333;
|
|
1078
|
+
margin-bottom: 1rem;
|
|
1079
|
+
font-size: 2rem;
|
|
1080
|
+
}
|
|
1081
|
+
.description {
|
|
1082
|
+
color: #666;
|
|
1083
|
+
margin-bottom: 2rem;
|
|
1084
|
+
line-height: 1.6;
|
|
1085
|
+
}
|
|
1086
|
+
.card {
|
|
1087
|
+
background: #f9f9f9;
|
|
1088
|
+
border-radius: 6px;
|
|
1089
|
+
padding: 1.5rem;
|
|
1090
|
+
margin-bottom: 1.5rem;
|
|
1091
|
+
}
|
|
1092
|
+
.card h2 {
|
|
1093
|
+
color: #333;
|
|
1094
|
+
font-size: 1.25rem;
|
|
1095
|
+
margin-bottom: 0.75rem;
|
|
1096
|
+
}
|
|
1097
|
+
.card p {
|
|
1098
|
+
color: #666;
|
|
1099
|
+
line-height: 1.6;
|
|
1100
|
+
margin-bottom: 1rem;
|
|
1101
|
+
}
|
|
1102
|
+
.card ul {
|
|
1103
|
+
color: #666;
|
|
1104
|
+
margin-left: 1.5rem;
|
|
1105
|
+
margin-bottom: 1rem;
|
|
1106
|
+
}
|
|
1107
|
+
.card li {
|
|
1108
|
+
margin-bottom: 0.5rem;
|
|
1109
|
+
}
|
|
1110
|
+
button {
|
|
1111
|
+
background: #3b82f6;
|
|
1112
|
+
color: white;
|
|
1113
|
+
border: none;
|
|
1114
|
+
padding: 0.75rem 1.5rem;
|
|
1115
|
+
border-radius: 6px;
|
|
1116
|
+
font-size: 1rem;
|
|
1117
|
+
cursor: pointer;
|
|
1118
|
+
transition: background 0.2s;
|
|
1119
|
+
}
|
|
1120
|
+
button:hover {
|
|
1121
|
+
background: #2563eb;
|
|
1122
|
+
}
|
|
1123
|
+
button:disabled {
|
|
1124
|
+
background: #94a3b8;
|
|
1125
|
+
cursor: not-allowed;
|
|
1126
|
+
}
|
|
1127
|
+
.danger {
|
|
1128
|
+
background: #ef4444;
|
|
1129
|
+
}
|
|
1130
|
+
.danger:hover {
|
|
1131
|
+
background: #dc2626;
|
|
1132
|
+
}
|
|
1133
|
+
.warning {
|
|
1134
|
+
background: #f59e0b;
|
|
1135
|
+
color: #fff;
|
|
1136
|
+
padding: 1rem;
|
|
1137
|
+
border-radius: 6px;
|
|
1138
|
+
margin-bottom: 1.5rem;
|
|
1139
|
+
}
|
|
1140
|
+
.success {
|
|
1141
|
+
background: #10b981;
|
|
1142
|
+
color: #fff;
|
|
1143
|
+
padding: 1rem;
|
|
1144
|
+
border-radius: 6px;
|
|
1145
|
+
margin-bottom: 1.5rem;
|
|
1146
|
+
display: none;
|
|
1147
|
+
}
|
|
1148
|
+
.error {
|
|
1149
|
+
background: #ef4444;
|
|
1150
|
+
color: #fff;
|
|
1151
|
+
padding: 1rem;
|
|
1152
|
+
border-radius: 6px;
|
|
1153
|
+
margin-bottom: 1.5rem;
|
|
1154
|
+
display: none;
|
|
1155
|
+
}
|
|
1156
|
+
.loading {
|
|
1157
|
+
display: none;
|
|
1158
|
+
margin-left: 1rem;
|
|
1159
|
+
}
|
|
1160
|
+
.back-link {
|
|
1161
|
+
display: inline-block;
|
|
1162
|
+
margin-bottom: 1rem;
|
|
1163
|
+
color: #3b82f6;
|
|
1164
|
+
text-decoration: none;
|
|
1165
|
+
font-size: 0.9rem;
|
|
1166
|
+
}
|
|
1167
|
+
.back-link:hover {
|
|
1168
|
+
text-decoration: underline;
|
|
1169
|
+
}
|
|
1170
|
+
</style>
|
|
1171
|
+
</head>
|
|
1172
|
+
<body>
|
|
1173
|
+
<div class="container">
|
|
1174
|
+
<a href="/admin/plugins/seed-data" class="back-link">\u2190 Back to Plugin Settings</a>
|
|
1175
|
+
<h1>\u{1F331} Seed Data Generator</h1>
|
|
1176
|
+
<p class="description">
|
|
1177
|
+
Generate realistic example data for testing and development. This will create 20 users and 200 content items with realistic data.
|
|
1178
|
+
</p>
|
|
1179
|
+
|
|
1180
|
+
<div class="warning">
|
|
1181
|
+
<strong>\u26A0\uFE0F Warning:</strong> This will create new data in your database. Make sure you're not running this in production!
|
|
1182
|
+
</div>
|
|
1183
|
+
|
|
1184
|
+
<div class="success" id="successMessage"></div>
|
|
1185
|
+
<div class="error" id="errorMessage"></div>
|
|
1186
|
+
|
|
1187
|
+
<div class="card">
|
|
1188
|
+
<h2>What will be created?</h2>
|
|
1189
|
+
<ul>
|
|
1190
|
+
<li><strong>20 Users:</strong> With realistic names, emails, and various roles (admin, editor, author, viewer)</li>
|
|
1191
|
+
<li><strong>200 Content Items:</strong> Including blog posts, pages, and products with realistic titles and data</li>
|
|
1192
|
+
<li><strong>All passwords:</strong> Set to "password123" for testing</li>
|
|
1193
|
+
<li><strong>Random dates:</strong> Created within the last year</li>
|
|
1194
|
+
<li><strong>Various statuses:</strong> Draft, published, and archived content</li>
|
|
1195
|
+
</ul>
|
|
1196
|
+
</div>
|
|
1197
|
+
|
|
1198
|
+
<div class="card">
|
|
1199
|
+
<h2>Generate Seed Data</h2>
|
|
1200
|
+
<p>Click the button below to generate example data. This may take a few moments.</p>
|
|
1201
|
+
<button id="seedButton" onclick="generateSeedData()">
|
|
1202
|
+
Generate Data
|
|
1203
|
+
<span class="loading" id="loading">...</span>
|
|
1204
|
+
</button>
|
|
1205
|
+
</div>
|
|
1206
|
+
|
|
1207
|
+
<div class="card">
|
|
1208
|
+
<h2>Clear Seed Data</h2>
|
|
1209
|
+
<p>Remove all users and content from the database (except admin users).</p>
|
|
1210
|
+
<button class="danger" id="clearButton" onclick="clearSeedData()">
|
|
1211
|
+
Clear All Data
|
|
1212
|
+
<span class="loading" id="clearLoading">...</span>
|
|
1213
|
+
</button>
|
|
1214
|
+
</div>
|
|
1215
|
+
</div>
|
|
1216
|
+
|
|
1217
|
+
<script>
|
|
1218
|
+
async function generateSeedData() {
|
|
1219
|
+
const button = document.getElementById('seedButton');
|
|
1220
|
+
const loading = document.getElementById('loading');
|
|
1221
|
+
const success = document.getElementById('successMessage');
|
|
1222
|
+
const error = document.getElementById('errorMessage');
|
|
1223
|
+
|
|
1224
|
+
button.disabled = true;
|
|
1225
|
+
loading.style.display = 'inline';
|
|
1226
|
+
success.style.display = 'none';
|
|
1227
|
+
error.style.display = 'none';
|
|
1228
|
+
|
|
1229
|
+
try {
|
|
1230
|
+
const response = await fetch('/admin/seed-data/generate', {
|
|
1231
|
+
method: 'POST',
|
|
1232
|
+
headers: {
|
|
1233
|
+
'Content-Type': 'application/json'
|
|
1234
|
+
}
|
|
1235
|
+
});
|
|
1236
|
+
|
|
1237
|
+
const data = await response.json();
|
|
1238
|
+
|
|
1239
|
+
if (response.ok) {
|
|
1240
|
+
success.textContent = \`\u2705 Successfully created \${data.users} users and \${data.content} content items!\`;
|
|
1241
|
+
success.style.display = 'block';
|
|
1242
|
+
} else {
|
|
1243
|
+
throw new Error(data.error || 'Failed to generate seed data');
|
|
1244
|
+
}
|
|
1245
|
+
} catch (err) {
|
|
1246
|
+
error.textContent = \`\u274C Error: \${err.message}\`;
|
|
1247
|
+
error.style.display = 'block';
|
|
1248
|
+
} finally {
|
|
1249
|
+
button.disabled = false;
|
|
1250
|
+
loading.style.display = 'none';
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
async function clearSeedData() {
|
|
1255
|
+
if (!confirm('Are you sure you want to clear all data? This cannot be undone!')) {
|
|
1256
|
+
return;
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
const button = document.getElementById('clearButton');
|
|
1260
|
+
const loading = document.getElementById('clearLoading');
|
|
1261
|
+
const success = document.getElementById('successMessage');
|
|
1262
|
+
const error = document.getElementById('errorMessage');
|
|
1263
|
+
|
|
1264
|
+
button.disabled = true;
|
|
1265
|
+
loading.style.display = 'inline';
|
|
1266
|
+
success.style.display = 'none';
|
|
1267
|
+
error.style.display = 'none';
|
|
1268
|
+
|
|
1269
|
+
try {
|
|
1270
|
+
const response = await fetch('/admin/seed-data/clear', {
|
|
1271
|
+
method: 'POST',
|
|
1272
|
+
headers: {
|
|
1273
|
+
'Content-Type': 'application/json'
|
|
1274
|
+
}
|
|
1275
|
+
});
|
|
1276
|
+
|
|
1277
|
+
const data = await response.json();
|
|
1278
|
+
|
|
1279
|
+
if (response.ok) {
|
|
1280
|
+
success.textContent = '\u2705 Successfully cleared all seed data!';
|
|
1281
|
+
success.style.display = 'block';
|
|
1282
|
+
} else {
|
|
1283
|
+
throw new Error(data.error || 'Failed to clear seed data');
|
|
1284
|
+
}
|
|
1285
|
+
} catch (err) {
|
|
1286
|
+
error.textContent = \`\u274C Error: \${err.message}\`;
|
|
1287
|
+
error.style.display = 'block';
|
|
1288
|
+
} finally {
|
|
1289
|
+
button.disabled = false;
|
|
1290
|
+
loading.style.display = 'none';
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
</script>
|
|
1294
|
+
</body>
|
|
1295
|
+
</html>
|
|
1296
|
+
`;
|
|
1297
|
+
return c.html(html3);
|
|
1298
|
+
});
|
|
1299
|
+
routes.post("/generate", async (c) => {
|
|
1300
|
+
try {
|
|
1301
|
+
const db = c.env.DB;
|
|
1302
|
+
const seedService = new SeedDataService(db);
|
|
1303
|
+
const result = await seedService.seedAll();
|
|
1304
|
+
return c.json({
|
|
1305
|
+
success: true,
|
|
1306
|
+
users: result.users,
|
|
1307
|
+
content: result.content
|
|
1308
|
+
});
|
|
1309
|
+
} catch (error) {
|
|
1310
|
+
return c.json({
|
|
1311
|
+
success: false,
|
|
1312
|
+
error: error.message
|
|
1313
|
+
}, 500);
|
|
1314
|
+
}
|
|
1315
|
+
});
|
|
1316
|
+
routes.post("/clear", async (c) => {
|
|
1317
|
+
try {
|
|
1318
|
+
const db = c.env.DB;
|
|
1319
|
+
const seedService = new SeedDataService(db);
|
|
1320
|
+
await seedService.clearSeedData();
|
|
1321
|
+
return c.json({
|
|
1322
|
+
success: true
|
|
1323
|
+
});
|
|
1324
|
+
} catch (error) {
|
|
1325
|
+
return c.json({
|
|
1326
|
+
success: false,
|
|
1327
|
+
error: error.message
|
|
1328
|
+
}, 500);
|
|
1329
|
+
}
|
|
1330
|
+
});
|
|
1331
|
+
return routes;
|
|
1332
|
+
}
|
|
741
1333
|
function createEmailPlugin() {
|
|
742
|
-
const builder =
|
|
1334
|
+
const builder = chunkA4SVOGG6_cjs.PluginBuilder.create({
|
|
743
1335
|
name: "email",
|
|
744
1336
|
version: "1.0.0-beta.1",
|
|
745
1337
|
description: "Send transactional emails using Resend"
|
|
@@ -1416,7 +2008,7 @@ var DEFAULT_SETTINGS = {
|
|
|
1416
2008
|
appName: "SonicJS"
|
|
1417
2009
|
};
|
|
1418
2010
|
function createOTPLoginPlugin() {
|
|
1419
|
-
const builder =
|
|
2011
|
+
const builder = chunkA4SVOGG6_cjs.PluginBuilder.create({
|
|
1420
2012
|
name: "otp-login",
|
|
1421
2013
|
version: "1.0.0-beta.1",
|
|
1422
2014
|
description: "Passwordless authentication via email one-time codes"
|
|
@@ -1580,7 +2172,7 @@ function createOTPLoginPlugin() {
|
|
|
1580
2172
|
error: "Account is deactivated"
|
|
1581
2173
|
}, 403);
|
|
1582
2174
|
}
|
|
1583
|
-
const token = await
|
|
2175
|
+
const token = await chunk7I5INVNR_cjs.AuthManager.generateToken(user.id, user.email, user.role);
|
|
1584
2176
|
cookie.setCookie(c, "auth_token", token, {
|
|
1585
2177
|
httpOnly: true,
|
|
1586
2178
|
secure: true,
|
|
@@ -1983,12 +2575,12 @@ function createMagicLinkAuthPlugin() {
|
|
|
1983
2575
|
SET used = 1, used_at = ?
|
|
1984
2576
|
WHERE id = ?
|
|
1985
2577
|
`).bind(Date.now(), magicLink.id).run();
|
|
1986
|
-
const jwtToken = await
|
|
2578
|
+
const jwtToken = await chunk7I5INVNR_cjs.AuthManager.generateToken(
|
|
1987
2579
|
user.id,
|
|
1988
2580
|
user.email,
|
|
1989
2581
|
user.role
|
|
1990
2582
|
);
|
|
1991
|
-
|
|
2583
|
+
chunk7I5INVNR_cjs.AuthManager.setAuthCookie(c, jwtToken);
|
|
1992
2584
|
await db.prepare(`
|
|
1993
2585
|
UPDATE users SET last_login_at = ? WHERE id = ?
|
|
1994
2586
|
`).bind(Date.now(), user.id).run();
|
|
@@ -2136,14 +2728,15 @@ createMagicLinkAuthPlugin();
|
|
|
2136
2728
|
// src/app.ts
|
|
2137
2729
|
function createSonicJSApp(config = {}) {
|
|
2138
2730
|
const app = new hono.Hono();
|
|
2139
|
-
const appVersion = config.version ||
|
|
2731
|
+
const appVersion = config.version || chunkFYEDK7K7_cjs.getCoreVersion();
|
|
2140
2732
|
const appName = config.name || "SonicJS AI";
|
|
2141
2733
|
app.use("*", async (c, next) => {
|
|
2142
2734
|
c.set("appVersion", appVersion);
|
|
2143
2735
|
await next();
|
|
2144
2736
|
});
|
|
2145
|
-
app.use("*",
|
|
2146
|
-
app.use("*",
|
|
2737
|
+
app.use("*", chunk7I5INVNR_cjs.metricsMiddleware());
|
|
2738
|
+
app.use("*", chunk7I5INVNR_cjs.bootstrapMiddleware(config));
|
|
2739
|
+
app.use("*", adminSetupMiddleware());
|
|
2147
2740
|
if (config.middleware?.beforeAuth) {
|
|
2148
2741
|
for (const middleware of config.middleware.beforeAuth) {
|
|
2149
2742
|
app.use("*", middleware);
|
|
@@ -2160,21 +2753,22 @@ function createSonicJSApp(config = {}) {
|
|
|
2160
2753
|
app.use("*", middleware);
|
|
2161
2754
|
}
|
|
2162
2755
|
}
|
|
2163
|
-
app.route("/api",
|
|
2164
|
-
app.route("/api/media",
|
|
2165
|
-
app.route("/api/system",
|
|
2166
|
-
app.route("/admin/api",
|
|
2167
|
-
app.route("/admin/dashboard",
|
|
2168
|
-
app.route("/admin/collections",
|
|
2169
|
-
app.route("/admin/settings",
|
|
2756
|
+
app.route("/api", chunkA4SVOGG6_cjs.api_default);
|
|
2757
|
+
app.route("/api/media", chunkA4SVOGG6_cjs.api_media_default);
|
|
2758
|
+
app.route("/api/system", chunkA4SVOGG6_cjs.api_system_default);
|
|
2759
|
+
app.route("/admin/api", chunkA4SVOGG6_cjs.admin_api_default);
|
|
2760
|
+
app.route("/admin/dashboard", chunkA4SVOGG6_cjs.router);
|
|
2761
|
+
app.route("/admin/collections", chunkA4SVOGG6_cjs.adminCollectionsRoutes);
|
|
2762
|
+
app.route("/admin/settings", chunkA4SVOGG6_cjs.adminSettingsRoutes);
|
|
2170
2763
|
app.route("/admin/database-tools", createDatabaseToolsAdminRoutes());
|
|
2171
|
-
app.route("/admin/
|
|
2172
|
-
app.route("/admin/
|
|
2173
|
-
app.route("/admin/
|
|
2174
|
-
app.route("/admin/
|
|
2175
|
-
app.route("/admin",
|
|
2176
|
-
app.route("/
|
|
2177
|
-
app.route("/",
|
|
2764
|
+
app.route("/admin/seed-data", createSeedDataAdminRoutes());
|
|
2765
|
+
app.route("/admin/content", chunkA4SVOGG6_cjs.admin_content_default);
|
|
2766
|
+
app.route("/admin/media", chunkA4SVOGG6_cjs.adminMediaRoutes);
|
|
2767
|
+
app.route("/admin/plugins", chunkA4SVOGG6_cjs.adminPluginRoutes);
|
|
2768
|
+
app.route("/admin/logs", chunkA4SVOGG6_cjs.adminLogsRoutes);
|
|
2769
|
+
app.route("/admin", chunkA4SVOGG6_cjs.userRoutes);
|
|
2770
|
+
app.route("/auth", chunkA4SVOGG6_cjs.auth_default);
|
|
2771
|
+
app.route("/", chunkA4SVOGG6_cjs.test_cleanup_default);
|
|
2178
2772
|
if (emailPlugin.routes && emailPlugin.routes.length > 0) {
|
|
2179
2773
|
for (const route of emailPlugin.routes) {
|
|
2180
2774
|
app.route(route.path, route.handler);
|
|
@@ -2254,83 +2848,83 @@ function createDb(d1$1) {
|
|
|
2254
2848
|
}
|
|
2255
2849
|
|
|
2256
2850
|
// src/index.ts
|
|
2257
|
-
var VERSION =
|
|
2851
|
+
var VERSION = chunkFYEDK7K7_cjs.package_default.version;
|
|
2258
2852
|
|
|
2259
2853
|
Object.defineProperty(exports, "ROUTES_INFO", {
|
|
2260
2854
|
enumerable: true,
|
|
2261
|
-
get: function () { return
|
|
2855
|
+
get: function () { return chunkA4SVOGG6_cjs.ROUTES_INFO; }
|
|
2262
2856
|
});
|
|
2263
2857
|
Object.defineProperty(exports, "adminApiRoutes", {
|
|
2264
2858
|
enumerable: true,
|
|
2265
|
-
get: function () { return
|
|
2859
|
+
get: function () { return chunkA4SVOGG6_cjs.admin_api_default; }
|
|
2266
2860
|
});
|
|
2267
2861
|
Object.defineProperty(exports, "adminCheckboxRoutes", {
|
|
2268
2862
|
enumerable: true,
|
|
2269
|
-
get: function () { return
|
|
2863
|
+
get: function () { return chunkA4SVOGG6_cjs.adminCheckboxRoutes; }
|
|
2270
2864
|
});
|
|
2271
2865
|
Object.defineProperty(exports, "adminCodeExamplesRoutes", {
|
|
2272
2866
|
enumerable: true,
|
|
2273
|
-
get: function () { return
|
|
2867
|
+
get: function () { return chunkA4SVOGG6_cjs.admin_code_examples_default; }
|
|
2274
2868
|
});
|
|
2275
2869
|
Object.defineProperty(exports, "adminCollectionsRoutes", {
|
|
2276
2870
|
enumerable: true,
|
|
2277
|
-
get: function () { return
|
|
2871
|
+
get: function () { return chunkA4SVOGG6_cjs.adminCollectionsRoutes; }
|
|
2278
2872
|
});
|
|
2279
2873
|
Object.defineProperty(exports, "adminContentRoutes", {
|
|
2280
2874
|
enumerable: true,
|
|
2281
|
-
get: function () { return
|
|
2875
|
+
get: function () { return chunkA4SVOGG6_cjs.admin_content_default; }
|
|
2282
2876
|
});
|
|
2283
2877
|
Object.defineProperty(exports, "adminDashboardRoutes", {
|
|
2284
2878
|
enumerable: true,
|
|
2285
|
-
get: function () { return
|
|
2879
|
+
get: function () { return chunkA4SVOGG6_cjs.router; }
|
|
2286
2880
|
});
|
|
2287
2881
|
Object.defineProperty(exports, "adminDesignRoutes", {
|
|
2288
2882
|
enumerable: true,
|
|
2289
|
-
get: function () { return
|
|
2883
|
+
get: function () { return chunkA4SVOGG6_cjs.adminDesignRoutes; }
|
|
2290
2884
|
});
|
|
2291
2885
|
Object.defineProperty(exports, "adminLogsRoutes", {
|
|
2292
2886
|
enumerable: true,
|
|
2293
|
-
get: function () { return
|
|
2887
|
+
get: function () { return chunkA4SVOGG6_cjs.adminLogsRoutes; }
|
|
2294
2888
|
});
|
|
2295
2889
|
Object.defineProperty(exports, "adminMediaRoutes", {
|
|
2296
2890
|
enumerable: true,
|
|
2297
|
-
get: function () { return
|
|
2891
|
+
get: function () { return chunkA4SVOGG6_cjs.adminMediaRoutes; }
|
|
2298
2892
|
});
|
|
2299
2893
|
Object.defineProperty(exports, "adminPluginRoutes", {
|
|
2300
2894
|
enumerable: true,
|
|
2301
|
-
get: function () { return
|
|
2895
|
+
get: function () { return chunkA4SVOGG6_cjs.adminPluginRoutes; }
|
|
2302
2896
|
});
|
|
2303
2897
|
Object.defineProperty(exports, "adminSettingsRoutes", {
|
|
2304
2898
|
enumerable: true,
|
|
2305
|
-
get: function () { return
|
|
2899
|
+
get: function () { return chunkA4SVOGG6_cjs.adminSettingsRoutes; }
|
|
2306
2900
|
});
|
|
2307
2901
|
Object.defineProperty(exports, "adminTestimonialsRoutes", {
|
|
2308
2902
|
enumerable: true,
|
|
2309
|
-
get: function () { return
|
|
2903
|
+
get: function () { return chunkA4SVOGG6_cjs.admin_testimonials_default; }
|
|
2310
2904
|
});
|
|
2311
2905
|
Object.defineProperty(exports, "adminUsersRoutes", {
|
|
2312
2906
|
enumerable: true,
|
|
2313
|
-
get: function () { return
|
|
2907
|
+
get: function () { return chunkA4SVOGG6_cjs.userRoutes; }
|
|
2314
2908
|
});
|
|
2315
2909
|
Object.defineProperty(exports, "apiContentCrudRoutes", {
|
|
2316
2910
|
enumerable: true,
|
|
2317
|
-
get: function () { return
|
|
2911
|
+
get: function () { return chunkA4SVOGG6_cjs.api_content_crud_default; }
|
|
2318
2912
|
});
|
|
2319
2913
|
Object.defineProperty(exports, "apiMediaRoutes", {
|
|
2320
2914
|
enumerable: true,
|
|
2321
|
-
get: function () { return
|
|
2915
|
+
get: function () { return chunkA4SVOGG6_cjs.api_media_default; }
|
|
2322
2916
|
});
|
|
2323
2917
|
Object.defineProperty(exports, "apiRoutes", {
|
|
2324
2918
|
enumerable: true,
|
|
2325
|
-
get: function () { return
|
|
2919
|
+
get: function () { return chunkA4SVOGG6_cjs.api_default; }
|
|
2326
2920
|
});
|
|
2327
2921
|
Object.defineProperty(exports, "apiSystemRoutes", {
|
|
2328
2922
|
enumerable: true,
|
|
2329
|
-
get: function () { return
|
|
2923
|
+
get: function () { return chunkA4SVOGG6_cjs.api_system_default; }
|
|
2330
2924
|
});
|
|
2331
2925
|
Object.defineProperty(exports, "authRoutes", {
|
|
2332
2926
|
enumerable: true,
|
|
2333
|
-
get: function () { return
|
|
2927
|
+
get: function () { return chunkA4SVOGG6_cjs.auth_default; }
|
|
2334
2928
|
});
|
|
2335
2929
|
Object.defineProperty(exports, "Logger", {
|
|
2336
2930
|
enumerable: true,
|
|
@@ -2498,83 +3092,83 @@ Object.defineProperty(exports, "workflowHistory", {
|
|
|
2498
3092
|
});
|
|
2499
3093
|
Object.defineProperty(exports, "AuthManager", {
|
|
2500
3094
|
enumerable: true,
|
|
2501
|
-
get: function () { return
|
|
3095
|
+
get: function () { return chunk7I5INVNR_cjs.AuthManager; }
|
|
2502
3096
|
});
|
|
2503
3097
|
Object.defineProperty(exports, "PermissionManager", {
|
|
2504
3098
|
enumerable: true,
|
|
2505
|
-
get: function () { return
|
|
3099
|
+
get: function () { return chunk7I5INVNR_cjs.PermissionManager; }
|
|
2506
3100
|
});
|
|
2507
3101
|
Object.defineProperty(exports, "bootstrapMiddleware", {
|
|
2508
3102
|
enumerable: true,
|
|
2509
|
-
get: function () { return
|
|
3103
|
+
get: function () { return chunk7I5INVNR_cjs.bootstrapMiddleware; }
|
|
2510
3104
|
});
|
|
2511
3105
|
Object.defineProperty(exports, "cacheHeaders", {
|
|
2512
3106
|
enumerable: true,
|
|
2513
|
-
get: function () { return
|
|
3107
|
+
get: function () { return chunk7I5INVNR_cjs.cacheHeaders; }
|
|
2514
3108
|
});
|
|
2515
3109
|
Object.defineProperty(exports, "compressionMiddleware", {
|
|
2516
3110
|
enumerable: true,
|
|
2517
|
-
get: function () { return
|
|
3111
|
+
get: function () { return chunk7I5INVNR_cjs.compressionMiddleware; }
|
|
2518
3112
|
});
|
|
2519
3113
|
Object.defineProperty(exports, "detailedLoggingMiddleware", {
|
|
2520
3114
|
enumerable: true,
|
|
2521
|
-
get: function () { return
|
|
3115
|
+
get: function () { return chunk7I5INVNR_cjs.detailedLoggingMiddleware; }
|
|
2522
3116
|
});
|
|
2523
3117
|
Object.defineProperty(exports, "getActivePlugins", {
|
|
2524
3118
|
enumerable: true,
|
|
2525
|
-
get: function () { return
|
|
3119
|
+
get: function () { return chunk7I5INVNR_cjs.getActivePlugins; }
|
|
2526
3120
|
});
|
|
2527
3121
|
Object.defineProperty(exports, "isPluginActive", {
|
|
2528
3122
|
enumerable: true,
|
|
2529
|
-
get: function () { return
|
|
3123
|
+
get: function () { return chunk7I5INVNR_cjs.isPluginActive; }
|
|
2530
3124
|
});
|
|
2531
3125
|
Object.defineProperty(exports, "logActivity", {
|
|
2532
3126
|
enumerable: true,
|
|
2533
|
-
get: function () { return
|
|
3127
|
+
get: function () { return chunk7I5INVNR_cjs.logActivity; }
|
|
2534
3128
|
});
|
|
2535
3129
|
Object.defineProperty(exports, "loggingMiddleware", {
|
|
2536
3130
|
enumerable: true,
|
|
2537
|
-
get: function () { return
|
|
3131
|
+
get: function () { return chunk7I5INVNR_cjs.loggingMiddleware; }
|
|
2538
3132
|
});
|
|
2539
3133
|
Object.defineProperty(exports, "optionalAuth", {
|
|
2540
3134
|
enumerable: true,
|
|
2541
|
-
get: function () { return
|
|
3135
|
+
get: function () { return chunk7I5INVNR_cjs.optionalAuth; }
|
|
2542
3136
|
});
|
|
2543
3137
|
Object.defineProperty(exports, "performanceLoggingMiddleware", {
|
|
2544
3138
|
enumerable: true,
|
|
2545
|
-
get: function () { return
|
|
3139
|
+
get: function () { return chunk7I5INVNR_cjs.performanceLoggingMiddleware; }
|
|
2546
3140
|
});
|
|
2547
3141
|
Object.defineProperty(exports, "requireActivePlugin", {
|
|
2548
3142
|
enumerable: true,
|
|
2549
|
-
get: function () { return
|
|
3143
|
+
get: function () { return chunk7I5INVNR_cjs.requireActivePlugin; }
|
|
2550
3144
|
});
|
|
2551
3145
|
Object.defineProperty(exports, "requireActivePlugins", {
|
|
2552
3146
|
enumerable: true,
|
|
2553
|
-
get: function () { return
|
|
3147
|
+
get: function () { return chunk7I5INVNR_cjs.requireActivePlugins; }
|
|
2554
3148
|
});
|
|
2555
3149
|
Object.defineProperty(exports, "requireAnyPermission", {
|
|
2556
3150
|
enumerable: true,
|
|
2557
|
-
get: function () { return
|
|
3151
|
+
get: function () { return chunk7I5INVNR_cjs.requireAnyPermission; }
|
|
2558
3152
|
});
|
|
2559
3153
|
Object.defineProperty(exports, "requireAuth", {
|
|
2560
3154
|
enumerable: true,
|
|
2561
|
-
get: function () { return
|
|
3155
|
+
get: function () { return chunk7I5INVNR_cjs.requireAuth; }
|
|
2562
3156
|
});
|
|
2563
3157
|
Object.defineProperty(exports, "requirePermission", {
|
|
2564
3158
|
enumerable: true,
|
|
2565
|
-
get: function () { return
|
|
3159
|
+
get: function () { return chunk7I5INVNR_cjs.requirePermission; }
|
|
2566
3160
|
});
|
|
2567
3161
|
Object.defineProperty(exports, "requireRole", {
|
|
2568
3162
|
enumerable: true,
|
|
2569
|
-
get: function () { return
|
|
3163
|
+
get: function () { return chunk7I5INVNR_cjs.requireRole; }
|
|
2570
3164
|
});
|
|
2571
3165
|
Object.defineProperty(exports, "securityHeaders", {
|
|
2572
3166
|
enumerable: true,
|
|
2573
|
-
get: function () { return
|
|
3167
|
+
get: function () { return chunk7I5INVNR_cjs.securityHeaders; }
|
|
2574
3168
|
});
|
|
2575
3169
|
Object.defineProperty(exports, "securityLoggingMiddleware", {
|
|
2576
3170
|
enumerable: true,
|
|
2577
|
-
get: function () { return
|
|
3171
|
+
get: function () { return chunk7I5INVNR_cjs.securityLoggingMiddleware; }
|
|
2578
3172
|
});
|
|
2579
3173
|
Object.defineProperty(exports, "PluginBootstrapService", {
|
|
2580
3174
|
enumerable: true,
|
|
@@ -2630,7 +3224,7 @@ Object.defineProperty(exports, "validateCollectionConfig", {
|
|
|
2630
3224
|
});
|
|
2631
3225
|
Object.defineProperty(exports, "MigrationService", {
|
|
2632
3226
|
enumerable: true,
|
|
2633
|
-
get: function () { return
|
|
3227
|
+
get: function () { return chunk2MI3LZFH_cjs.MigrationService; }
|
|
2634
3228
|
});
|
|
2635
3229
|
Object.defineProperty(exports, "renderFilterBar", {
|
|
2636
3230
|
enumerable: true,
|
|
@@ -2690,43 +3284,43 @@ Object.defineProperty(exports, "ScopedHookSystemClass", {
|
|
|
2690
3284
|
});
|
|
2691
3285
|
Object.defineProperty(exports, "QueryFilterBuilder", {
|
|
2692
3286
|
enumerable: true,
|
|
2693
|
-
get: function () { return
|
|
3287
|
+
get: function () { return chunkFYEDK7K7_cjs.QueryFilterBuilder; }
|
|
2694
3288
|
});
|
|
2695
3289
|
Object.defineProperty(exports, "SONICJS_VERSION", {
|
|
2696
3290
|
enumerable: true,
|
|
2697
|
-
get: function () { return
|
|
3291
|
+
get: function () { return chunkFYEDK7K7_cjs.SONICJS_VERSION; }
|
|
2698
3292
|
});
|
|
2699
3293
|
Object.defineProperty(exports, "TemplateRenderer", {
|
|
2700
3294
|
enumerable: true,
|
|
2701
|
-
get: function () { return
|
|
3295
|
+
get: function () { return chunkFYEDK7K7_cjs.TemplateRenderer; }
|
|
2702
3296
|
});
|
|
2703
3297
|
Object.defineProperty(exports, "buildQuery", {
|
|
2704
3298
|
enumerable: true,
|
|
2705
|
-
get: function () { return
|
|
3299
|
+
get: function () { return chunkFYEDK7K7_cjs.buildQuery; }
|
|
2706
3300
|
});
|
|
2707
3301
|
Object.defineProperty(exports, "escapeHtml", {
|
|
2708
3302
|
enumerable: true,
|
|
2709
|
-
get: function () { return
|
|
3303
|
+
get: function () { return chunkFYEDK7K7_cjs.escapeHtml; }
|
|
2710
3304
|
});
|
|
2711
3305
|
Object.defineProperty(exports, "getCoreVersion", {
|
|
2712
3306
|
enumerable: true,
|
|
2713
|
-
get: function () { return
|
|
3307
|
+
get: function () { return chunkFYEDK7K7_cjs.getCoreVersion; }
|
|
2714
3308
|
});
|
|
2715
3309
|
Object.defineProperty(exports, "renderTemplate", {
|
|
2716
3310
|
enumerable: true,
|
|
2717
|
-
get: function () { return
|
|
3311
|
+
get: function () { return chunkFYEDK7K7_cjs.renderTemplate; }
|
|
2718
3312
|
});
|
|
2719
3313
|
Object.defineProperty(exports, "sanitizeInput", {
|
|
2720
3314
|
enumerable: true,
|
|
2721
|
-
get: function () { return
|
|
3315
|
+
get: function () { return chunkFYEDK7K7_cjs.sanitizeInput; }
|
|
2722
3316
|
});
|
|
2723
3317
|
Object.defineProperty(exports, "sanitizeObject", {
|
|
2724
3318
|
enumerable: true,
|
|
2725
|
-
get: function () { return
|
|
3319
|
+
get: function () { return chunkFYEDK7K7_cjs.sanitizeObject; }
|
|
2726
3320
|
});
|
|
2727
3321
|
Object.defineProperty(exports, "templateRenderer", {
|
|
2728
3322
|
enumerable: true,
|
|
2729
|
-
get: function () { return
|
|
3323
|
+
get: function () { return chunkFYEDK7K7_cjs.templateRenderer; }
|
|
2730
3324
|
});
|
|
2731
3325
|
Object.defineProperty(exports, "metricsTracker", {
|
|
2732
3326
|
enumerable: true,
|