@sonicjs-cms/core 2.3.15 → 2.3.17
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-H2X4BFCW.cjs → chunk-2XCJ3HT5.cjs} +3 -3
- package/dist/{chunk-H2X4BFCW.cjs.map → chunk-2XCJ3HT5.cjs.map} +1 -1
- package/dist/{chunk-5OLN5JO3.cjs → chunk-74DP754U.cjs} +90 -90
- package/dist/{chunk-5OLN5JO3.cjs.map → chunk-74DP754U.cjs.map} +1 -1
- package/dist/{chunk-72I2MOSH.js → chunk-B6YJRVFQ.js} +2 -2
- package/dist/{chunk-72I2MOSH.js.map → chunk-B6YJRVFQ.js.map} +1 -1
- package/dist/{chunk-63LV4YVI.cjs → chunk-IEWLOVP3.cjs} +2 -2
- package/dist/{chunk-63LV4YVI.cjs.map → chunk-IEWLOVP3.cjs.map} +1 -1
- package/dist/{chunk-4M2UOUXV.js → chunk-QBWD6FKH.js} +8 -8
- package/dist/{chunk-4M2UOUXV.js.map → chunk-QBWD6FKH.js.map} +1 -1
- package/dist/{chunk-67SKO5RQ.js → chunk-TMQOLXLY.js} +3 -3
- package/dist/{chunk-67SKO5RQ.js.map → chunk-TMQOLXLY.js.map} +1 -1
- package/dist/{chunk-A27RBGBA.js → chunk-VYL6RIV6.js} +3 -3
- package/dist/{chunk-A27RBGBA.js.map → chunk-VYL6RIV6.js.map} +1 -1
- package/dist/{chunk-QG3YQKL4.cjs → chunk-YHJB26RJ.cjs} +4 -4
- package/dist/{chunk-QG3YQKL4.cjs.map → chunk-YHJB26RJ.cjs.map} +1 -1
- package/dist/index.cjs +656 -78
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +586 -8
- package/dist/index.js.map +1 -1
- package/dist/middleware.cjs +23 -23
- package/dist/middleware.js +2 -2
- package/dist/migrations-6HKPNPTK.js +4 -0
- package/dist/{migrations-H3Q5FZGZ.js.map → migrations-6HKPNPTK.js.map} +1 -1
- package/dist/migrations-EOV7NJZ7.cjs +13 -0
- package/dist/{migrations-VN5VTX3C.cjs.map → migrations-EOV7NJZ7.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/package.json +1 -1
- package/dist/migrations-H3Q5FZGZ.js +0 -4
- package/dist/migrations-VN5VTX3C.cjs +0 -13
package/dist/index.cjs
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk74DP754U_cjs = require('./chunk-74DP754U.cjs');
|
|
4
4
|
var chunk7FOAMNTI_cjs = require('./chunk-7FOAMNTI.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkYHJB26RJ_cjs = require('./chunk-YHJB26RJ.cjs');
|
|
6
6
|
var chunkILZ3DP4I_cjs = require('./chunk-ILZ3DP4I.cjs');
|
|
7
|
-
var
|
|
7
|
+
var chunkIEWLOVP3_cjs = require('./chunk-IEWLOVP3.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 chunk2XCJ3HT5_cjs = require('./chunk-2XCJ3HT5.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');
|
|
15
15
|
require('./chunk-IGJUBJBW.cjs');
|
|
16
16
|
var hono = require('hono');
|
|
17
17
|
var html = require('hono/html');
|
|
18
|
+
var cookie = require('hono/cookie');
|
|
18
19
|
var zod = require('zod');
|
|
19
20
|
var d1 = require('drizzle-orm/d1');
|
|
20
21
|
|
|
@@ -557,7 +558,7 @@ function formatCellValue(value) {
|
|
|
557
558
|
// src/plugins/core-plugins/database-tools-plugin/admin-routes.ts
|
|
558
559
|
function createDatabaseToolsAdminRoutes() {
|
|
559
560
|
const router2 = new hono.Hono();
|
|
560
|
-
router2.use("*",
|
|
561
|
+
router2.use("*", chunkYHJB26RJ_cjs.requireAuth());
|
|
561
562
|
router2.get("/api/stats", async (c) => {
|
|
562
563
|
try {
|
|
563
564
|
const user = c.get("user");
|
|
@@ -737,8 +738,575 @@ function createDatabaseToolsAdminRoutes() {
|
|
|
737
738
|
});
|
|
738
739
|
return router2;
|
|
739
740
|
}
|
|
741
|
+
|
|
742
|
+
// src/plugins/core-plugins/seed-data-plugin/services/seed-data-service.ts
|
|
743
|
+
var SeedDataService = class {
|
|
744
|
+
constructor(db) {
|
|
745
|
+
this.db = db;
|
|
746
|
+
}
|
|
747
|
+
// First names for generating realistic users
|
|
748
|
+
firstNames = [
|
|
749
|
+
"Emma",
|
|
750
|
+
"Liam",
|
|
751
|
+
"Olivia",
|
|
752
|
+
"Noah",
|
|
753
|
+
"Ava",
|
|
754
|
+
"Ethan",
|
|
755
|
+
"Sophia",
|
|
756
|
+
"Mason",
|
|
757
|
+
"Isabella",
|
|
758
|
+
"William",
|
|
759
|
+
"Mia",
|
|
760
|
+
"James",
|
|
761
|
+
"Charlotte",
|
|
762
|
+
"Benjamin",
|
|
763
|
+
"Amelia",
|
|
764
|
+
"Lucas",
|
|
765
|
+
"Harper",
|
|
766
|
+
"Henry",
|
|
767
|
+
"Evelyn",
|
|
768
|
+
"Alexander"
|
|
769
|
+
];
|
|
770
|
+
// Last names for generating realistic users
|
|
771
|
+
lastNames = [
|
|
772
|
+
"Smith",
|
|
773
|
+
"Johnson",
|
|
774
|
+
"Williams",
|
|
775
|
+
"Brown",
|
|
776
|
+
"Jones",
|
|
777
|
+
"Garcia",
|
|
778
|
+
"Miller",
|
|
779
|
+
"Davis",
|
|
780
|
+
"Rodriguez",
|
|
781
|
+
"Martinez",
|
|
782
|
+
"Hernandez",
|
|
783
|
+
"Lopez",
|
|
784
|
+
"Gonzalez",
|
|
785
|
+
"Wilson",
|
|
786
|
+
"Anderson",
|
|
787
|
+
"Thomas",
|
|
788
|
+
"Taylor",
|
|
789
|
+
"Moore",
|
|
790
|
+
"Jackson",
|
|
791
|
+
"Martin"
|
|
792
|
+
];
|
|
793
|
+
// Content titles for blog posts
|
|
794
|
+
blogTitles = [
|
|
795
|
+
"Getting Started with Modern Web Development",
|
|
796
|
+
"The Future of JavaScript Frameworks",
|
|
797
|
+
"Building Scalable Applications with Microservices",
|
|
798
|
+
"Understanding TypeScript: A Complete Guide",
|
|
799
|
+
"Best Practices for API Design",
|
|
800
|
+
"Introduction to Cloud Computing",
|
|
801
|
+
"Mastering Git and Version Control",
|
|
802
|
+
"The Art of Code Review",
|
|
803
|
+
"Performance Optimization Techniques",
|
|
804
|
+
"Security Best Practices for Web Apps",
|
|
805
|
+
"Exploring Serverless Architecture",
|
|
806
|
+
"Database Design Fundamentals",
|
|
807
|
+
"Testing Strategies for Modern Apps",
|
|
808
|
+
"CI/CD Pipeline Implementation",
|
|
809
|
+
"Mobile-First Development Approach"
|
|
810
|
+
];
|
|
811
|
+
// Content titles for pages
|
|
812
|
+
pageTitles = [
|
|
813
|
+
"About Us",
|
|
814
|
+
"Contact",
|
|
815
|
+
"Privacy Policy",
|
|
816
|
+
"Terms of Service",
|
|
817
|
+
"FAQ",
|
|
818
|
+
"Our Team",
|
|
819
|
+
"Careers",
|
|
820
|
+
"Press Kit",
|
|
821
|
+
"Support",
|
|
822
|
+
"Documentation",
|
|
823
|
+
"Pricing",
|
|
824
|
+
"Features"
|
|
825
|
+
];
|
|
826
|
+
// Content titles for products
|
|
827
|
+
productTitles = [
|
|
828
|
+
"Premium Wireless Headphones",
|
|
829
|
+
"Smart Watch Pro",
|
|
830
|
+
"Laptop Stand Adjustable",
|
|
831
|
+
"Mechanical Keyboard RGB",
|
|
832
|
+
"HD Webcam 4K",
|
|
833
|
+
"USB-C Hub 7-in-1",
|
|
834
|
+
"Portable SSD 1TB",
|
|
835
|
+
"Wireless Mouse Ergonomic",
|
|
836
|
+
'Monitor 27" 4K',
|
|
837
|
+
"Desk Lamp LED",
|
|
838
|
+
"Phone Case Premium",
|
|
839
|
+
"Tablet Stand Aluminum",
|
|
840
|
+
"Cable Management Kit",
|
|
841
|
+
"Power Bank 20000mAh",
|
|
842
|
+
"Bluetooth Speaker Portable"
|
|
843
|
+
];
|
|
844
|
+
// Content for generating blog posts
|
|
845
|
+
blogContent = [
|
|
846
|
+
"This comprehensive guide covers everything you need to know about modern development practices and tools.",
|
|
847
|
+
"Learn the fundamentals and advanced concepts that will help you build better applications.",
|
|
848
|
+
"Discover the latest trends and best practices used by industry professionals.",
|
|
849
|
+
"A deep dive into the technologies and methodologies shaping the future of software development.",
|
|
850
|
+
"Practical tips and real-world examples to improve your development workflow.",
|
|
851
|
+
"Explore cutting-edge techniques and proven strategies for building robust applications.",
|
|
852
|
+
"Master the essential skills needed to excel in modern software development.",
|
|
853
|
+
"An in-depth look at the tools and frameworks that power today's web applications.",
|
|
854
|
+
"Step-by-step instructions and expert insights for developers of all levels.",
|
|
855
|
+
"Understanding the core principles that drive successful software projects."
|
|
856
|
+
];
|
|
857
|
+
// Generate a random ID
|
|
858
|
+
generateId() {
|
|
859
|
+
return `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
860
|
+
}
|
|
861
|
+
// Generate a slug from a title
|
|
862
|
+
generateSlug(title) {
|
|
863
|
+
return title.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/(^-|-$)/g, "");
|
|
864
|
+
}
|
|
865
|
+
// Generate random date within the last year
|
|
866
|
+
randomDate() {
|
|
867
|
+
const now = /* @__PURE__ */ new Date();
|
|
868
|
+
const yearAgo = new Date(now.getFullYear() - 1, now.getMonth(), now.getDate());
|
|
869
|
+
const randomTime = yearAgo.getTime() + Math.random() * (now.getTime() - yearAgo.getTime());
|
|
870
|
+
return new Date(randomTime);
|
|
871
|
+
}
|
|
872
|
+
// Create 20 example users
|
|
873
|
+
async createUsers() {
|
|
874
|
+
const roles = ["admin", "editor", "author", "viewer"];
|
|
875
|
+
const hashedPassword = "password123";
|
|
876
|
+
let count = 0;
|
|
877
|
+
for (let i = 0; i < 20; i++) {
|
|
878
|
+
const firstName = this.firstNames[Math.floor(Math.random() * this.firstNames.length)] || "John";
|
|
879
|
+
const lastName = this.lastNames[Math.floor(Math.random() * this.lastNames.length)] || "Doe";
|
|
880
|
+
const username = `${firstName.toLowerCase()}${lastName.toLowerCase()}${i}`;
|
|
881
|
+
const email = `${username}@example.com`;
|
|
882
|
+
const createdAt = this.randomDate();
|
|
883
|
+
const createdAtTimestamp = Math.floor(createdAt.getTime() / 1e3);
|
|
884
|
+
const stmt = this.db.prepare(`
|
|
885
|
+
INSERT INTO users (id, email, username, first_name, last_name, password_hash, role, is_active, last_login_at, created_at, updated_at)
|
|
886
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
887
|
+
`);
|
|
888
|
+
await stmt.bind(
|
|
889
|
+
this.generateId(),
|
|
890
|
+
email,
|
|
891
|
+
username,
|
|
892
|
+
firstName,
|
|
893
|
+
lastName,
|
|
894
|
+
hashedPassword,
|
|
895
|
+
roles[Math.floor(Math.random() * roles.length)],
|
|
896
|
+
Math.random() > 0.1 ? 1 : 0,
|
|
897
|
+
// 90% active
|
|
898
|
+
Math.random() > 0.3 ? createdAtTimestamp : null,
|
|
899
|
+
createdAtTimestamp,
|
|
900
|
+
createdAtTimestamp
|
|
901
|
+
).run();
|
|
902
|
+
count++;
|
|
903
|
+
}
|
|
904
|
+
return count;
|
|
905
|
+
}
|
|
906
|
+
// Create 200 content items across different types
|
|
907
|
+
async createContent() {
|
|
908
|
+
const usersStmt = this.db.prepare("SELECT * FROM users");
|
|
909
|
+
const { results: allUsers } = await usersStmt.all();
|
|
910
|
+
const collectionsStmt = this.db.prepare("SELECT * FROM collections");
|
|
911
|
+
const { results: allCollections } = await collectionsStmt.all();
|
|
912
|
+
if (!allUsers || allUsers.length === 0) {
|
|
913
|
+
throw new Error("No users found. Please create users first.");
|
|
914
|
+
}
|
|
915
|
+
if (!allCollections || allCollections.length === 0) {
|
|
916
|
+
throw new Error("No collections found. Please create collections first.");
|
|
917
|
+
}
|
|
918
|
+
const statuses = ["draft", "published", "archived"];
|
|
919
|
+
let count = 0;
|
|
920
|
+
for (let i = 0; i < 200; i++) {
|
|
921
|
+
const collection = allCollections[Math.floor(Math.random() * allCollections.length)];
|
|
922
|
+
const author = allUsers[Math.floor(Math.random() * allUsers.length)];
|
|
923
|
+
const status = statuses[Math.floor(Math.random() * statuses.length)];
|
|
924
|
+
let title;
|
|
925
|
+
let contentData;
|
|
926
|
+
if (collection.name === "blog_posts" || collection.name.includes("blog")) {
|
|
927
|
+
title = this.blogTitles[Math.floor(Math.random() * this.blogTitles.length)] || "Untitled Blog Post";
|
|
928
|
+
contentData = {
|
|
929
|
+
body: this.blogContent[Math.floor(Math.random() * this.blogContent.length)] || "Blog content here",
|
|
930
|
+
excerpt: "A brief introduction to this article that provides an overview of the main topics covered.",
|
|
931
|
+
tags: this.generateTags(),
|
|
932
|
+
featured: Math.random() > 0.7
|
|
933
|
+
};
|
|
934
|
+
} else if (collection.name === "pages" || collection.name.includes("page")) {
|
|
935
|
+
title = this.pageTitles[Math.floor(Math.random() * this.pageTitles.length)] || "Untitled Page";
|
|
936
|
+
contentData = {
|
|
937
|
+
body: "This is a standard page with important information about our services and policies.",
|
|
938
|
+
template: "default",
|
|
939
|
+
showInMenu: Math.random() > 0.5
|
|
940
|
+
};
|
|
941
|
+
} else if (collection.name === "products" || collection.name.includes("product")) {
|
|
942
|
+
title = this.productTitles[Math.floor(Math.random() * this.productTitles.length)] || "Untitled Product";
|
|
943
|
+
contentData = {
|
|
944
|
+
description: "High-quality product with excellent features and great value for money.",
|
|
945
|
+
price: (Math.random() * 500 + 10).toFixed(2),
|
|
946
|
+
sku: `SKU-${Math.random().toString(36).substr(2, 9).toUpperCase()}`,
|
|
947
|
+
inStock: Math.random() > 0.2,
|
|
948
|
+
rating: (Math.random() * 2 + 3).toFixed(1)
|
|
949
|
+
// 3.0 - 5.0
|
|
950
|
+
};
|
|
951
|
+
} else {
|
|
952
|
+
title = `${collection.display_name || collection.name} Item ${i + 1}`;
|
|
953
|
+
contentData = {
|
|
954
|
+
description: "This is a sample content item with generic data.",
|
|
955
|
+
value: Math.floor(Math.random() * 1e3)
|
|
956
|
+
};
|
|
957
|
+
}
|
|
958
|
+
const slug = `${this.generateSlug(title)}-${i}`;
|
|
959
|
+
const createdAt = this.randomDate();
|
|
960
|
+
const createdAtTimestamp = Math.floor(createdAt.getTime() / 1e3);
|
|
961
|
+
const publishedAtTimestamp = status === "published" ? createdAtTimestamp : null;
|
|
962
|
+
const stmt = this.db.prepare(`
|
|
963
|
+
INSERT INTO content (id, collection_id, slug, title, data, status, published_at, author_id, created_at, updated_at)
|
|
964
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
965
|
+
`);
|
|
966
|
+
await stmt.bind(
|
|
967
|
+
this.generateId(),
|
|
968
|
+
collection.id,
|
|
969
|
+
slug,
|
|
970
|
+
`${title} ${i}`,
|
|
971
|
+
JSON.stringify(contentData),
|
|
972
|
+
status,
|
|
973
|
+
publishedAtTimestamp,
|
|
974
|
+
author.id,
|
|
975
|
+
createdAtTimestamp,
|
|
976
|
+
createdAtTimestamp
|
|
977
|
+
).run();
|
|
978
|
+
count++;
|
|
979
|
+
}
|
|
980
|
+
return count;
|
|
981
|
+
}
|
|
982
|
+
// Generate random tags for blog posts
|
|
983
|
+
generateTags() {
|
|
984
|
+
const allTags = [
|
|
985
|
+
"tutorial",
|
|
986
|
+
"guide",
|
|
987
|
+
"javascript",
|
|
988
|
+
"typescript",
|
|
989
|
+
"web-dev",
|
|
990
|
+
"backend",
|
|
991
|
+
"frontend",
|
|
992
|
+
"best-practices",
|
|
993
|
+
"security",
|
|
994
|
+
"performance",
|
|
995
|
+
"testing",
|
|
996
|
+
"deployment",
|
|
997
|
+
"cloud",
|
|
998
|
+
"database",
|
|
999
|
+
"api"
|
|
1000
|
+
];
|
|
1001
|
+
const numTags = Math.floor(Math.random() * 4) + 1;
|
|
1002
|
+
const shuffled = allTags.sort(() => 0.5 - Math.random());
|
|
1003
|
+
return shuffled.slice(0, numTags);
|
|
1004
|
+
}
|
|
1005
|
+
// Seed all data
|
|
1006
|
+
async seedAll() {
|
|
1007
|
+
const userCount = await this.createUsers();
|
|
1008
|
+
const contentCount = await this.createContent();
|
|
1009
|
+
return {
|
|
1010
|
+
users: userCount,
|
|
1011
|
+
content: contentCount
|
|
1012
|
+
};
|
|
1013
|
+
}
|
|
1014
|
+
// Clear all seed data (optional cleanup method)
|
|
1015
|
+
async clearSeedData() {
|
|
1016
|
+
const deleteContentStmt = this.db.prepare("DELETE FROM content");
|
|
1017
|
+
await deleteContentStmt.run();
|
|
1018
|
+
const deleteUsersStmt = this.db.prepare(
|
|
1019
|
+
"DELETE FROM users WHERE role != 'admin'"
|
|
1020
|
+
);
|
|
1021
|
+
await deleteUsersStmt.run();
|
|
1022
|
+
}
|
|
1023
|
+
};
|
|
1024
|
+
|
|
1025
|
+
// src/plugins/core-plugins/seed-data-plugin/admin-routes.ts
|
|
1026
|
+
function createSeedDataAdminRoutes() {
|
|
1027
|
+
const routes = new hono.Hono();
|
|
1028
|
+
routes.get("/", async (c) => {
|
|
1029
|
+
const html3 = `
|
|
1030
|
+
<!DOCTYPE html>
|
|
1031
|
+
<html>
|
|
1032
|
+
<head>
|
|
1033
|
+
<title>Seed Data - SonicJS Admin</title>
|
|
1034
|
+
<meta charset="utf-8">
|
|
1035
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
1036
|
+
<style>
|
|
1037
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
1038
|
+
body {
|
|
1039
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
1040
|
+
background: #f5f5f5;
|
|
1041
|
+
padding: 2rem;
|
|
1042
|
+
}
|
|
1043
|
+
.container {
|
|
1044
|
+
max-width: 800px;
|
|
1045
|
+
margin: 0 auto;
|
|
1046
|
+
background: white;
|
|
1047
|
+
border-radius: 8px;
|
|
1048
|
+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
1049
|
+
padding: 2rem;
|
|
1050
|
+
}
|
|
1051
|
+
h1 {
|
|
1052
|
+
color: #333;
|
|
1053
|
+
margin-bottom: 1rem;
|
|
1054
|
+
font-size: 2rem;
|
|
1055
|
+
}
|
|
1056
|
+
.description {
|
|
1057
|
+
color: #666;
|
|
1058
|
+
margin-bottom: 2rem;
|
|
1059
|
+
line-height: 1.6;
|
|
1060
|
+
}
|
|
1061
|
+
.card {
|
|
1062
|
+
background: #f9f9f9;
|
|
1063
|
+
border-radius: 6px;
|
|
1064
|
+
padding: 1.5rem;
|
|
1065
|
+
margin-bottom: 1.5rem;
|
|
1066
|
+
}
|
|
1067
|
+
.card h2 {
|
|
1068
|
+
color: #333;
|
|
1069
|
+
font-size: 1.25rem;
|
|
1070
|
+
margin-bottom: 0.75rem;
|
|
1071
|
+
}
|
|
1072
|
+
.card p {
|
|
1073
|
+
color: #666;
|
|
1074
|
+
line-height: 1.6;
|
|
1075
|
+
margin-bottom: 1rem;
|
|
1076
|
+
}
|
|
1077
|
+
.card ul {
|
|
1078
|
+
color: #666;
|
|
1079
|
+
margin-left: 1.5rem;
|
|
1080
|
+
margin-bottom: 1rem;
|
|
1081
|
+
}
|
|
1082
|
+
.card li {
|
|
1083
|
+
margin-bottom: 0.5rem;
|
|
1084
|
+
}
|
|
1085
|
+
button {
|
|
1086
|
+
background: #3b82f6;
|
|
1087
|
+
color: white;
|
|
1088
|
+
border: none;
|
|
1089
|
+
padding: 0.75rem 1.5rem;
|
|
1090
|
+
border-radius: 6px;
|
|
1091
|
+
font-size: 1rem;
|
|
1092
|
+
cursor: pointer;
|
|
1093
|
+
transition: background 0.2s;
|
|
1094
|
+
}
|
|
1095
|
+
button:hover {
|
|
1096
|
+
background: #2563eb;
|
|
1097
|
+
}
|
|
1098
|
+
button:disabled {
|
|
1099
|
+
background: #94a3b8;
|
|
1100
|
+
cursor: not-allowed;
|
|
1101
|
+
}
|
|
1102
|
+
.danger {
|
|
1103
|
+
background: #ef4444;
|
|
1104
|
+
}
|
|
1105
|
+
.danger:hover {
|
|
1106
|
+
background: #dc2626;
|
|
1107
|
+
}
|
|
1108
|
+
.warning {
|
|
1109
|
+
background: #f59e0b;
|
|
1110
|
+
color: #fff;
|
|
1111
|
+
padding: 1rem;
|
|
1112
|
+
border-radius: 6px;
|
|
1113
|
+
margin-bottom: 1.5rem;
|
|
1114
|
+
}
|
|
1115
|
+
.success {
|
|
1116
|
+
background: #10b981;
|
|
1117
|
+
color: #fff;
|
|
1118
|
+
padding: 1rem;
|
|
1119
|
+
border-radius: 6px;
|
|
1120
|
+
margin-bottom: 1.5rem;
|
|
1121
|
+
display: none;
|
|
1122
|
+
}
|
|
1123
|
+
.error {
|
|
1124
|
+
background: #ef4444;
|
|
1125
|
+
color: #fff;
|
|
1126
|
+
padding: 1rem;
|
|
1127
|
+
border-radius: 6px;
|
|
1128
|
+
margin-bottom: 1.5rem;
|
|
1129
|
+
display: none;
|
|
1130
|
+
}
|
|
1131
|
+
.loading {
|
|
1132
|
+
display: none;
|
|
1133
|
+
margin-left: 1rem;
|
|
1134
|
+
}
|
|
1135
|
+
.back-link {
|
|
1136
|
+
display: inline-block;
|
|
1137
|
+
margin-bottom: 1rem;
|
|
1138
|
+
color: #3b82f6;
|
|
1139
|
+
text-decoration: none;
|
|
1140
|
+
font-size: 0.9rem;
|
|
1141
|
+
}
|
|
1142
|
+
.back-link:hover {
|
|
1143
|
+
text-decoration: underline;
|
|
1144
|
+
}
|
|
1145
|
+
</style>
|
|
1146
|
+
</head>
|
|
1147
|
+
<body>
|
|
1148
|
+
<div class="container">
|
|
1149
|
+
<a href="/admin/plugins/seed-data" class="back-link">\u2190 Back to Plugin Settings</a>
|
|
1150
|
+
<h1>\u{1F331} Seed Data Generator</h1>
|
|
1151
|
+
<p class="description">
|
|
1152
|
+
Generate realistic example data for testing and development. This will create 20 users and 200 content items with realistic data.
|
|
1153
|
+
</p>
|
|
1154
|
+
|
|
1155
|
+
<div class="warning">
|
|
1156
|
+
<strong>\u26A0\uFE0F Warning:</strong> This will create new data in your database. Make sure you're not running this in production!
|
|
1157
|
+
</div>
|
|
1158
|
+
|
|
1159
|
+
<div class="success" id="successMessage"></div>
|
|
1160
|
+
<div class="error" id="errorMessage"></div>
|
|
1161
|
+
|
|
1162
|
+
<div class="card">
|
|
1163
|
+
<h2>What will be created?</h2>
|
|
1164
|
+
<ul>
|
|
1165
|
+
<li><strong>20 Users:</strong> With realistic names, emails, and various roles (admin, editor, author, viewer)</li>
|
|
1166
|
+
<li><strong>200 Content Items:</strong> Including blog posts, pages, and products with realistic titles and data</li>
|
|
1167
|
+
<li><strong>All passwords:</strong> Set to "password123" for testing</li>
|
|
1168
|
+
<li><strong>Random dates:</strong> Created within the last year</li>
|
|
1169
|
+
<li><strong>Various statuses:</strong> Draft, published, and archived content</li>
|
|
1170
|
+
</ul>
|
|
1171
|
+
</div>
|
|
1172
|
+
|
|
1173
|
+
<div class="card">
|
|
1174
|
+
<h2>Generate Seed Data</h2>
|
|
1175
|
+
<p>Click the button below to generate example data. This may take a few moments.</p>
|
|
1176
|
+
<button id="seedButton" onclick="generateSeedData()">
|
|
1177
|
+
Generate Data
|
|
1178
|
+
<span class="loading" id="loading">...</span>
|
|
1179
|
+
</button>
|
|
1180
|
+
</div>
|
|
1181
|
+
|
|
1182
|
+
<div class="card">
|
|
1183
|
+
<h2>Clear Seed Data</h2>
|
|
1184
|
+
<p>Remove all users and content from the database (except admin users).</p>
|
|
1185
|
+
<button class="danger" id="clearButton" onclick="clearSeedData()">
|
|
1186
|
+
Clear All Data
|
|
1187
|
+
<span class="loading" id="clearLoading">...</span>
|
|
1188
|
+
</button>
|
|
1189
|
+
</div>
|
|
1190
|
+
</div>
|
|
1191
|
+
|
|
1192
|
+
<script>
|
|
1193
|
+
async function generateSeedData() {
|
|
1194
|
+
const button = document.getElementById('seedButton');
|
|
1195
|
+
const loading = document.getElementById('loading');
|
|
1196
|
+
const success = document.getElementById('successMessage');
|
|
1197
|
+
const error = document.getElementById('errorMessage');
|
|
1198
|
+
|
|
1199
|
+
button.disabled = true;
|
|
1200
|
+
loading.style.display = 'inline';
|
|
1201
|
+
success.style.display = 'none';
|
|
1202
|
+
error.style.display = 'none';
|
|
1203
|
+
|
|
1204
|
+
try {
|
|
1205
|
+
const response = await fetch('/admin/seed-data/generate', {
|
|
1206
|
+
method: 'POST',
|
|
1207
|
+
headers: {
|
|
1208
|
+
'Content-Type': 'application/json'
|
|
1209
|
+
}
|
|
1210
|
+
});
|
|
1211
|
+
|
|
1212
|
+
const data = await response.json();
|
|
1213
|
+
|
|
1214
|
+
if (response.ok) {
|
|
1215
|
+
success.textContent = \`\u2705 Successfully created \${data.users} users and \${data.content} content items!\`;
|
|
1216
|
+
success.style.display = 'block';
|
|
1217
|
+
} else {
|
|
1218
|
+
throw new Error(data.error || 'Failed to generate seed data');
|
|
1219
|
+
}
|
|
1220
|
+
} catch (err) {
|
|
1221
|
+
error.textContent = \`\u274C Error: \${err.message}\`;
|
|
1222
|
+
error.style.display = 'block';
|
|
1223
|
+
} finally {
|
|
1224
|
+
button.disabled = false;
|
|
1225
|
+
loading.style.display = 'none';
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
async function clearSeedData() {
|
|
1230
|
+
if (!confirm('Are you sure you want to clear all data? This cannot be undone!')) {
|
|
1231
|
+
return;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
const button = document.getElementById('clearButton');
|
|
1235
|
+
const loading = document.getElementById('clearLoading');
|
|
1236
|
+
const success = document.getElementById('successMessage');
|
|
1237
|
+
const error = document.getElementById('errorMessage');
|
|
1238
|
+
|
|
1239
|
+
button.disabled = true;
|
|
1240
|
+
loading.style.display = 'inline';
|
|
1241
|
+
success.style.display = 'none';
|
|
1242
|
+
error.style.display = 'none';
|
|
1243
|
+
|
|
1244
|
+
try {
|
|
1245
|
+
const response = await fetch('/admin/seed-data/clear', {
|
|
1246
|
+
method: 'POST',
|
|
1247
|
+
headers: {
|
|
1248
|
+
'Content-Type': 'application/json'
|
|
1249
|
+
}
|
|
1250
|
+
});
|
|
1251
|
+
|
|
1252
|
+
const data = await response.json();
|
|
1253
|
+
|
|
1254
|
+
if (response.ok) {
|
|
1255
|
+
success.textContent = '\u2705 Successfully cleared all seed data!';
|
|
1256
|
+
success.style.display = 'block';
|
|
1257
|
+
} else {
|
|
1258
|
+
throw new Error(data.error || 'Failed to clear seed data');
|
|
1259
|
+
}
|
|
1260
|
+
} catch (err) {
|
|
1261
|
+
error.textContent = \`\u274C Error: \${err.message}\`;
|
|
1262
|
+
error.style.display = 'block';
|
|
1263
|
+
} finally {
|
|
1264
|
+
button.disabled = false;
|
|
1265
|
+
loading.style.display = 'none';
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
</script>
|
|
1269
|
+
</body>
|
|
1270
|
+
</html>
|
|
1271
|
+
`;
|
|
1272
|
+
return c.html(html3);
|
|
1273
|
+
});
|
|
1274
|
+
routes.post("/generate", async (c) => {
|
|
1275
|
+
try {
|
|
1276
|
+
const db = c.env.DB;
|
|
1277
|
+
const seedService = new SeedDataService(db);
|
|
1278
|
+
const result = await seedService.seedAll();
|
|
1279
|
+
return c.json({
|
|
1280
|
+
success: true,
|
|
1281
|
+
users: result.users,
|
|
1282
|
+
content: result.content
|
|
1283
|
+
});
|
|
1284
|
+
} catch (error) {
|
|
1285
|
+
return c.json({
|
|
1286
|
+
success: false,
|
|
1287
|
+
error: error.message
|
|
1288
|
+
}, 500);
|
|
1289
|
+
}
|
|
1290
|
+
});
|
|
1291
|
+
routes.post("/clear", async (c) => {
|
|
1292
|
+
try {
|
|
1293
|
+
const db = c.env.DB;
|
|
1294
|
+
const seedService = new SeedDataService(db);
|
|
1295
|
+
await seedService.clearSeedData();
|
|
1296
|
+
return c.json({
|
|
1297
|
+
success: true
|
|
1298
|
+
});
|
|
1299
|
+
} catch (error) {
|
|
1300
|
+
return c.json({
|
|
1301
|
+
success: false,
|
|
1302
|
+
error: error.message
|
|
1303
|
+
}, 500);
|
|
1304
|
+
}
|
|
1305
|
+
});
|
|
1306
|
+
return routes;
|
|
1307
|
+
}
|
|
740
1308
|
function createEmailPlugin() {
|
|
741
|
-
const builder =
|
|
1309
|
+
const builder = chunk74DP754U_cjs.PluginBuilder.create({
|
|
742
1310
|
name: "email",
|
|
743
1311
|
version: "1.0.0-beta.1",
|
|
744
1312
|
description: "Send transactional emails using Resend"
|
|
@@ -1415,7 +1983,7 @@ var DEFAULT_SETTINGS = {
|
|
|
1415
1983
|
appName: "SonicJS"
|
|
1416
1984
|
};
|
|
1417
1985
|
function createOTPLoginPlugin() {
|
|
1418
|
-
const builder =
|
|
1986
|
+
const builder = chunk74DP754U_cjs.PluginBuilder.create({
|
|
1419
1987
|
name: "otp-login",
|
|
1420
1988
|
version: "1.0.0-beta.1",
|
|
1421
1989
|
description: "Passwordless authentication via email one-time codes"
|
|
@@ -1490,7 +2058,7 @@ function createOTPLoginPlugin() {
|
|
|
1490
2058
|
appName: settings.appName
|
|
1491
2059
|
});
|
|
1492
2060
|
const emailPlugin2 = await db.prepare(`
|
|
1493
|
-
SELECT settings FROM plugins WHERE id = 'email'
|
|
2061
|
+
SELECT settings FROM plugins WHERE id = 'email'
|
|
1494
2062
|
`).first();
|
|
1495
2063
|
if (emailPlugin2?.settings) {
|
|
1496
2064
|
const emailSettings = JSON.parse(emailPlugin2.settings);
|
|
@@ -1579,6 +2147,14 @@ function createOTPLoginPlugin() {
|
|
|
1579
2147
|
error: "Account is deactivated"
|
|
1580
2148
|
}, 403);
|
|
1581
2149
|
}
|
|
2150
|
+
const token = await chunkYHJB26RJ_cjs.AuthManager.generateToken(user.id, user.email, user.role);
|
|
2151
|
+
cookie.setCookie(c, "auth_token", token, {
|
|
2152
|
+
httpOnly: true,
|
|
2153
|
+
secure: true,
|
|
2154
|
+
sameSite: "Strict",
|
|
2155
|
+
maxAge: 60 * 60 * 24
|
|
2156
|
+
// 24 hours
|
|
2157
|
+
});
|
|
1582
2158
|
return c.json({
|
|
1583
2159
|
success: true,
|
|
1584
2160
|
user: {
|
|
@@ -1586,6 +2162,7 @@ function createOTPLoginPlugin() {
|
|
|
1586
2162
|
email: user.email,
|
|
1587
2163
|
role: user.role
|
|
1588
2164
|
},
|
|
2165
|
+
token,
|
|
1589
2166
|
message: "Authentication successful"
|
|
1590
2167
|
});
|
|
1591
2168
|
} catch (error) {
|
|
@@ -1973,12 +2550,12 @@ function createMagicLinkAuthPlugin() {
|
|
|
1973
2550
|
SET used = 1, used_at = ?
|
|
1974
2551
|
WHERE id = ?
|
|
1975
2552
|
`).bind(Date.now(), magicLink.id).run();
|
|
1976
|
-
const jwtToken = await
|
|
2553
|
+
const jwtToken = await chunkYHJB26RJ_cjs.AuthManager.generateToken(
|
|
1977
2554
|
user.id,
|
|
1978
2555
|
user.email,
|
|
1979
2556
|
user.role
|
|
1980
2557
|
);
|
|
1981
|
-
|
|
2558
|
+
chunkYHJB26RJ_cjs.AuthManager.setAuthCookie(c, jwtToken);
|
|
1982
2559
|
await db.prepare(`
|
|
1983
2560
|
UPDATE users SET last_login_at = ? WHERE id = ?
|
|
1984
2561
|
`).bind(Date.now(), user.id).run();
|
|
@@ -2126,14 +2703,14 @@ createMagicLinkAuthPlugin();
|
|
|
2126
2703
|
// src/app.ts
|
|
2127
2704
|
function createSonicJSApp(config = {}) {
|
|
2128
2705
|
const app = new hono.Hono();
|
|
2129
|
-
const appVersion = config.version ||
|
|
2706
|
+
const appVersion = config.version || chunk2XCJ3HT5_cjs.getCoreVersion();
|
|
2130
2707
|
const appName = config.name || "SonicJS AI";
|
|
2131
2708
|
app.use("*", async (c, next) => {
|
|
2132
2709
|
c.set("appVersion", appVersion);
|
|
2133
2710
|
await next();
|
|
2134
2711
|
});
|
|
2135
|
-
app.use("*",
|
|
2136
|
-
app.use("*",
|
|
2712
|
+
app.use("*", chunkYHJB26RJ_cjs.metricsMiddleware());
|
|
2713
|
+
app.use("*", chunkYHJB26RJ_cjs.bootstrapMiddleware(config));
|
|
2137
2714
|
if (config.middleware?.beforeAuth) {
|
|
2138
2715
|
for (const middleware of config.middleware.beforeAuth) {
|
|
2139
2716
|
app.use("*", middleware);
|
|
@@ -2150,21 +2727,22 @@ function createSonicJSApp(config = {}) {
|
|
|
2150
2727
|
app.use("*", middleware);
|
|
2151
2728
|
}
|
|
2152
2729
|
}
|
|
2153
|
-
app.route("/api",
|
|
2154
|
-
app.route("/api/media",
|
|
2155
|
-
app.route("/api/system",
|
|
2156
|
-
app.route("/admin/api",
|
|
2157
|
-
app.route("/admin/dashboard",
|
|
2158
|
-
app.route("/admin/collections",
|
|
2159
|
-
app.route("/admin/settings",
|
|
2730
|
+
app.route("/api", chunk74DP754U_cjs.api_default);
|
|
2731
|
+
app.route("/api/media", chunk74DP754U_cjs.api_media_default);
|
|
2732
|
+
app.route("/api/system", chunk74DP754U_cjs.api_system_default);
|
|
2733
|
+
app.route("/admin/api", chunk74DP754U_cjs.admin_api_default);
|
|
2734
|
+
app.route("/admin/dashboard", chunk74DP754U_cjs.router);
|
|
2735
|
+
app.route("/admin/collections", chunk74DP754U_cjs.adminCollectionsRoutes);
|
|
2736
|
+
app.route("/admin/settings", chunk74DP754U_cjs.adminSettingsRoutes);
|
|
2160
2737
|
app.route("/admin/database-tools", createDatabaseToolsAdminRoutes());
|
|
2161
|
-
app.route("/admin/
|
|
2162
|
-
app.route("/admin/
|
|
2163
|
-
app.route("/admin/
|
|
2164
|
-
app.route("/admin/
|
|
2165
|
-
app.route("/admin",
|
|
2166
|
-
app.route("/
|
|
2167
|
-
app.route("/",
|
|
2738
|
+
app.route("/admin/seed-data", createSeedDataAdminRoutes());
|
|
2739
|
+
app.route("/admin/content", chunk74DP754U_cjs.admin_content_default);
|
|
2740
|
+
app.route("/admin/media", chunk74DP754U_cjs.adminMediaRoutes);
|
|
2741
|
+
app.route("/admin/plugins", chunk74DP754U_cjs.adminPluginRoutes);
|
|
2742
|
+
app.route("/admin/logs", chunk74DP754U_cjs.adminLogsRoutes);
|
|
2743
|
+
app.route("/admin", chunk74DP754U_cjs.userRoutes);
|
|
2744
|
+
app.route("/auth", chunk74DP754U_cjs.auth_default);
|
|
2745
|
+
app.route("/", chunk74DP754U_cjs.test_cleanup_default);
|
|
2168
2746
|
if (emailPlugin.routes && emailPlugin.routes.length > 0) {
|
|
2169
2747
|
for (const route of emailPlugin.routes) {
|
|
2170
2748
|
app.route(route.path, route.handler);
|
|
@@ -2244,83 +2822,83 @@ function createDb(d1$1) {
|
|
|
2244
2822
|
}
|
|
2245
2823
|
|
|
2246
2824
|
// src/index.ts
|
|
2247
|
-
var VERSION =
|
|
2825
|
+
var VERSION = chunk2XCJ3HT5_cjs.package_default.version;
|
|
2248
2826
|
|
|
2249
2827
|
Object.defineProperty(exports, "ROUTES_INFO", {
|
|
2250
2828
|
enumerable: true,
|
|
2251
|
-
get: function () { return
|
|
2829
|
+
get: function () { return chunk74DP754U_cjs.ROUTES_INFO; }
|
|
2252
2830
|
});
|
|
2253
2831
|
Object.defineProperty(exports, "adminApiRoutes", {
|
|
2254
2832
|
enumerable: true,
|
|
2255
|
-
get: function () { return
|
|
2833
|
+
get: function () { return chunk74DP754U_cjs.admin_api_default; }
|
|
2256
2834
|
});
|
|
2257
2835
|
Object.defineProperty(exports, "adminCheckboxRoutes", {
|
|
2258
2836
|
enumerable: true,
|
|
2259
|
-
get: function () { return
|
|
2837
|
+
get: function () { return chunk74DP754U_cjs.adminCheckboxRoutes; }
|
|
2260
2838
|
});
|
|
2261
2839
|
Object.defineProperty(exports, "adminCodeExamplesRoutes", {
|
|
2262
2840
|
enumerable: true,
|
|
2263
|
-
get: function () { return
|
|
2841
|
+
get: function () { return chunk74DP754U_cjs.admin_code_examples_default; }
|
|
2264
2842
|
});
|
|
2265
2843
|
Object.defineProperty(exports, "adminCollectionsRoutes", {
|
|
2266
2844
|
enumerable: true,
|
|
2267
|
-
get: function () { return
|
|
2845
|
+
get: function () { return chunk74DP754U_cjs.adminCollectionsRoutes; }
|
|
2268
2846
|
});
|
|
2269
2847
|
Object.defineProperty(exports, "adminContentRoutes", {
|
|
2270
2848
|
enumerable: true,
|
|
2271
|
-
get: function () { return
|
|
2849
|
+
get: function () { return chunk74DP754U_cjs.admin_content_default; }
|
|
2272
2850
|
});
|
|
2273
2851
|
Object.defineProperty(exports, "adminDashboardRoutes", {
|
|
2274
2852
|
enumerable: true,
|
|
2275
|
-
get: function () { return
|
|
2853
|
+
get: function () { return chunk74DP754U_cjs.router; }
|
|
2276
2854
|
});
|
|
2277
2855
|
Object.defineProperty(exports, "adminDesignRoutes", {
|
|
2278
2856
|
enumerable: true,
|
|
2279
|
-
get: function () { return
|
|
2857
|
+
get: function () { return chunk74DP754U_cjs.adminDesignRoutes; }
|
|
2280
2858
|
});
|
|
2281
2859
|
Object.defineProperty(exports, "adminLogsRoutes", {
|
|
2282
2860
|
enumerable: true,
|
|
2283
|
-
get: function () { return
|
|
2861
|
+
get: function () { return chunk74DP754U_cjs.adminLogsRoutes; }
|
|
2284
2862
|
});
|
|
2285
2863
|
Object.defineProperty(exports, "adminMediaRoutes", {
|
|
2286
2864
|
enumerable: true,
|
|
2287
|
-
get: function () { return
|
|
2865
|
+
get: function () { return chunk74DP754U_cjs.adminMediaRoutes; }
|
|
2288
2866
|
});
|
|
2289
2867
|
Object.defineProperty(exports, "adminPluginRoutes", {
|
|
2290
2868
|
enumerable: true,
|
|
2291
|
-
get: function () { return
|
|
2869
|
+
get: function () { return chunk74DP754U_cjs.adminPluginRoutes; }
|
|
2292
2870
|
});
|
|
2293
2871
|
Object.defineProperty(exports, "adminSettingsRoutes", {
|
|
2294
2872
|
enumerable: true,
|
|
2295
|
-
get: function () { return
|
|
2873
|
+
get: function () { return chunk74DP754U_cjs.adminSettingsRoutes; }
|
|
2296
2874
|
});
|
|
2297
2875
|
Object.defineProperty(exports, "adminTestimonialsRoutes", {
|
|
2298
2876
|
enumerable: true,
|
|
2299
|
-
get: function () { return
|
|
2877
|
+
get: function () { return chunk74DP754U_cjs.admin_testimonials_default; }
|
|
2300
2878
|
});
|
|
2301
2879
|
Object.defineProperty(exports, "adminUsersRoutes", {
|
|
2302
2880
|
enumerable: true,
|
|
2303
|
-
get: function () { return
|
|
2881
|
+
get: function () { return chunk74DP754U_cjs.userRoutes; }
|
|
2304
2882
|
});
|
|
2305
2883
|
Object.defineProperty(exports, "apiContentCrudRoutes", {
|
|
2306
2884
|
enumerable: true,
|
|
2307
|
-
get: function () { return
|
|
2885
|
+
get: function () { return chunk74DP754U_cjs.api_content_crud_default; }
|
|
2308
2886
|
});
|
|
2309
2887
|
Object.defineProperty(exports, "apiMediaRoutes", {
|
|
2310
2888
|
enumerable: true,
|
|
2311
|
-
get: function () { return
|
|
2889
|
+
get: function () { return chunk74DP754U_cjs.api_media_default; }
|
|
2312
2890
|
});
|
|
2313
2891
|
Object.defineProperty(exports, "apiRoutes", {
|
|
2314
2892
|
enumerable: true,
|
|
2315
|
-
get: function () { return
|
|
2893
|
+
get: function () { return chunk74DP754U_cjs.api_default; }
|
|
2316
2894
|
});
|
|
2317
2895
|
Object.defineProperty(exports, "apiSystemRoutes", {
|
|
2318
2896
|
enumerable: true,
|
|
2319
|
-
get: function () { return
|
|
2897
|
+
get: function () { return chunk74DP754U_cjs.api_system_default; }
|
|
2320
2898
|
});
|
|
2321
2899
|
Object.defineProperty(exports, "authRoutes", {
|
|
2322
2900
|
enumerable: true,
|
|
2323
|
-
get: function () { return
|
|
2901
|
+
get: function () { return chunk74DP754U_cjs.auth_default; }
|
|
2324
2902
|
});
|
|
2325
2903
|
Object.defineProperty(exports, "Logger", {
|
|
2326
2904
|
enumerable: true,
|
|
@@ -2488,83 +3066,83 @@ Object.defineProperty(exports, "workflowHistory", {
|
|
|
2488
3066
|
});
|
|
2489
3067
|
Object.defineProperty(exports, "AuthManager", {
|
|
2490
3068
|
enumerable: true,
|
|
2491
|
-
get: function () { return
|
|
3069
|
+
get: function () { return chunkYHJB26RJ_cjs.AuthManager; }
|
|
2492
3070
|
});
|
|
2493
3071
|
Object.defineProperty(exports, "PermissionManager", {
|
|
2494
3072
|
enumerable: true,
|
|
2495
|
-
get: function () { return
|
|
3073
|
+
get: function () { return chunkYHJB26RJ_cjs.PermissionManager; }
|
|
2496
3074
|
});
|
|
2497
3075
|
Object.defineProperty(exports, "bootstrapMiddleware", {
|
|
2498
3076
|
enumerable: true,
|
|
2499
|
-
get: function () { return
|
|
3077
|
+
get: function () { return chunkYHJB26RJ_cjs.bootstrapMiddleware; }
|
|
2500
3078
|
});
|
|
2501
3079
|
Object.defineProperty(exports, "cacheHeaders", {
|
|
2502
3080
|
enumerable: true,
|
|
2503
|
-
get: function () { return
|
|
3081
|
+
get: function () { return chunkYHJB26RJ_cjs.cacheHeaders; }
|
|
2504
3082
|
});
|
|
2505
3083
|
Object.defineProperty(exports, "compressionMiddleware", {
|
|
2506
3084
|
enumerable: true,
|
|
2507
|
-
get: function () { return
|
|
3085
|
+
get: function () { return chunkYHJB26RJ_cjs.compressionMiddleware; }
|
|
2508
3086
|
});
|
|
2509
3087
|
Object.defineProperty(exports, "detailedLoggingMiddleware", {
|
|
2510
3088
|
enumerable: true,
|
|
2511
|
-
get: function () { return
|
|
3089
|
+
get: function () { return chunkYHJB26RJ_cjs.detailedLoggingMiddleware; }
|
|
2512
3090
|
});
|
|
2513
3091
|
Object.defineProperty(exports, "getActivePlugins", {
|
|
2514
3092
|
enumerable: true,
|
|
2515
|
-
get: function () { return
|
|
3093
|
+
get: function () { return chunkYHJB26RJ_cjs.getActivePlugins; }
|
|
2516
3094
|
});
|
|
2517
3095
|
Object.defineProperty(exports, "isPluginActive", {
|
|
2518
3096
|
enumerable: true,
|
|
2519
|
-
get: function () { return
|
|
3097
|
+
get: function () { return chunkYHJB26RJ_cjs.isPluginActive; }
|
|
2520
3098
|
});
|
|
2521
3099
|
Object.defineProperty(exports, "logActivity", {
|
|
2522
3100
|
enumerable: true,
|
|
2523
|
-
get: function () { return
|
|
3101
|
+
get: function () { return chunkYHJB26RJ_cjs.logActivity; }
|
|
2524
3102
|
});
|
|
2525
3103
|
Object.defineProperty(exports, "loggingMiddleware", {
|
|
2526
3104
|
enumerable: true,
|
|
2527
|
-
get: function () { return
|
|
3105
|
+
get: function () { return chunkYHJB26RJ_cjs.loggingMiddleware; }
|
|
2528
3106
|
});
|
|
2529
3107
|
Object.defineProperty(exports, "optionalAuth", {
|
|
2530
3108
|
enumerable: true,
|
|
2531
|
-
get: function () { return
|
|
3109
|
+
get: function () { return chunkYHJB26RJ_cjs.optionalAuth; }
|
|
2532
3110
|
});
|
|
2533
3111
|
Object.defineProperty(exports, "performanceLoggingMiddleware", {
|
|
2534
3112
|
enumerable: true,
|
|
2535
|
-
get: function () { return
|
|
3113
|
+
get: function () { return chunkYHJB26RJ_cjs.performanceLoggingMiddleware; }
|
|
2536
3114
|
});
|
|
2537
3115
|
Object.defineProperty(exports, "requireActivePlugin", {
|
|
2538
3116
|
enumerable: true,
|
|
2539
|
-
get: function () { return
|
|
3117
|
+
get: function () { return chunkYHJB26RJ_cjs.requireActivePlugin; }
|
|
2540
3118
|
});
|
|
2541
3119
|
Object.defineProperty(exports, "requireActivePlugins", {
|
|
2542
3120
|
enumerable: true,
|
|
2543
|
-
get: function () { return
|
|
3121
|
+
get: function () { return chunkYHJB26RJ_cjs.requireActivePlugins; }
|
|
2544
3122
|
});
|
|
2545
3123
|
Object.defineProperty(exports, "requireAnyPermission", {
|
|
2546
3124
|
enumerable: true,
|
|
2547
|
-
get: function () { return
|
|
3125
|
+
get: function () { return chunkYHJB26RJ_cjs.requireAnyPermission; }
|
|
2548
3126
|
});
|
|
2549
3127
|
Object.defineProperty(exports, "requireAuth", {
|
|
2550
3128
|
enumerable: true,
|
|
2551
|
-
get: function () { return
|
|
3129
|
+
get: function () { return chunkYHJB26RJ_cjs.requireAuth; }
|
|
2552
3130
|
});
|
|
2553
3131
|
Object.defineProperty(exports, "requirePermission", {
|
|
2554
3132
|
enumerable: true,
|
|
2555
|
-
get: function () { return
|
|
3133
|
+
get: function () { return chunkYHJB26RJ_cjs.requirePermission; }
|
|
2556
3134
|
});
|
|
2557
3135
|
Object.defineProperty(exports, "requireRole", {
|
|
2558
3136
|
enumerable: true,
|
|
2559
|
-
get: function () { return
|
|
3137
|
+
get: function () { return chunkYHJB26RJ_cjs.requireRole; }
|
|
2560
3138
|
});
|
|
2561
3139
|
Object.defineProperty(exports, "securityHeaders", {
|
|
2562
3140
|
enumerable: true,
|
|
2563
|
-
get: function () { return
|
|
3141
|
+
get: function () { return chunkYHJB26RJ_cjs.securityHeaders; }
|
|
2564
3142
|
});
|
|
2565
3143
|
Object.defineProperty(exports, "securityLoggingMiddleware", {
|
|
2566
3144
|
enumerable: true,
|
|
2567
|
-
get: function () { return
|
|
3145
|
+
get: function () { return chunkYHJB26RJ_cjs.securityLoggingMiddleware; }
|
|
2568
3146
|
});
|
|
2569
3147
|
Object.defineProperty(exports, "PluginBootstrapService", {
|
|
2570
3148
|
enumerable: true,
|
|
@@ -2620,7 +3198,7 @@ Object.defineProperty(exports, "validateCollectionConfig", {
|
|
|
2620
3198
|
});
|
|
2621
3199
|
Object.defineProperty(exports, "MigrationService", {
|
|
2622
3200
|
enumerable: true,
|
|
2623
|
-
get: function () { return
|
|
3201
|
+
get: function () { return chunkIEWLOVP3_cjs.MigrationService; }
|
|
2624
3202
|
});
|
|
2625
3203
|
Object.defineProperty(exports, "renderFilterBar", {
|
|
2626
3204
|
enumerable: true,
|
|
@@ -2680,43 +3258,43 @@ Object.defineProperty(exports, "ScopedHookSystemClass", {
|
|
|
2680
3258
|
});
|
|
2681
3259
|
Object.defineProperty(exports, "QueryFilterBuilder", {
|
|
2682
3260
|
enumerable: true,
|
|
2683
|
-
get: function () { return
|
|
3261
|
+
get: function () { return chunk2XCJ3HT5_cjs.QueryFilterBuilder; }
|
|
2684
3262
|
});
|
|
2685
3263
|
Object.defineProperty(exports, "SONICJS_VERSION", {
|
|
2686
3264
|
enumerable: true,
|
|
2687
|
-
get: function () { return
|
|
3265
|
+
get: function () { return chunk2XCJ3HT5_cjs.SONICJS_VERSION; }
|
|
2688
3266
|
});
|
|
2689
3267
|
Object.defineProperty(exports, "TemplateRenderer", {
|
|
2690
3268
|
enumerable: true,
|
|
2691
|
-
get: function () { return
|
|
3269
|
+
get: function () { return chunk2XCJ3HT5_cjs.TemplateRenderer; }
|
|
2692
3270
|
});
|
|
2693
3271
|
Object.defineProperty(exports, "buildQuery", {
|
|
2694
3272
|
enumerable: true,
|
|
2695
|
-
get: function () { return
|
|
3273
|
+
get: function () { return chunk2XCJ3HT5_cjs.buildQuery; }
|
|
2696
3274
|
});
|
|
2697
3275
|
Object.defineProperty(exports, "escapeHtml", {
|
|
2698
3276
|
enumerable: true,
|
|
2699
|
-
get: function () { return
|
|
3277
|
+
get: function () { return chunk2XCJ3HT5_cjs.escapeHtml; }
|
|
2700
3278
|
});
|
|
2701
3279
|
Object.defineProperty(exports, "getCoreVersion", {
|
|
2702
3280
|
enumerable: true,
|
|
2703
|
-
get: function () { return
|
|
3281
|
+
get: function () { return chunk2XCJ3HT5_cjs.getCoreVersion; }
|
|
2704
3282
|
});
|
|
2705
3283
|
Object.defineProperty(exports, "renderTemplate", {
|
|
2706
3284
|
enumerable: true,
|
|
2707
|
-
get: function () { return
|
|
3285
|
+
get: function () { return chunk2XCJ3HT5_cjs.renderTemplate; }
|
|
2708
3286
|
});
|
|
2709
3287
|
Object.defineProperty(exports, "sanitizeInput", {
|
|
2710
3288
|
enumerable: true,
|
|
2711
|
-
get: function () { return
|
|
3289
|
+
get: function () { return chunk2XCJ3HT5_cjs.sanitizeInput; }
|
|
2712
3290
|
});
|
|
2713
3291
|
Object.defineProperty(exports, "sanitizeObject", {
|
|
2714
3292
|
enumerable: true,
|
|
2715
|
-
get: function () { return
|
|
3293
|
+
get: function () { return chunk2XCJ3HT5_cjs.sanitizeObject; }
|
|
2716
3294
|
});
|
|
2717
3295
|
Object.defineProperty(exports, "templateRenderer", {
|
|
2718
3296
|
enumerable: true,
|
|
2719
|
-
get: function () { return
|
|
3297
|
+
get: function () { return chunk2XCJ3HT5_cjs.templateRenderer; }
|
|
2720
3298
|
});
|
|
2721
3299
|
Object.defineProperty(exports, "metricsTracker", {
|
|
2722
3300
|
enumerable: true,
|