@kyro-cms/core 0.5.5 → 0.7.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/api-handler.cjs +75 -35
- package/dist/api-handler.cjs.map +1 -1
- package/dist/api-handler.d.cts +2 -5
- package/dist/api-handler.d.ts +2 -5
- package/dist/api-handler.js +75 -36
- package/dist/api-handler.js.map +1 -1
- package/dist/bootstrap-AKAUP6F6.cjs +32 -0
- package/dist/{bootstrap-EE6BJZWL.cjs.map → bootstrap-AKAUP6F6.cjs.map} +1 -1
- package/dist/bootstrap-JCML6NFO.js +7 -0
- package/dist/{bootstrap-4MH44YKG.js.map → bootstrap-JCML6NFO.js.map} +1 -1
- package/dist/{chunk-WVPOPOEQ.cjs → chunk-2KVHZE6O.cjs} +286 -126
- package/dist/chunk-2KVHZE6O.cjs.map +1 -0
- package/dist/{chunk-RALQO47U.cjs → chunk-2OL4O2TH.cjs} +55 -2
- package/dist/chunk-2OL4O2TH.cjs.map +1 -0
- package/dist/{chunk-XU7AFF6V.js → chunk-35U3FROB.js} +982 -4
- package/dist/chunk-35U3FROB.js.map +1 -0
- package/dist/{chunk-WSCJQI2B.js → chunk-3J4MFTI3.js} +27 -11
- package/dist/chunk-3J4MFTI3.js.map +1 -0
- package/dist/chunk-3ZFYL34R.js +391 -0
- package/dist/chunk-3ZFYL34R.js.map +1 -0
- package/dist/chunk-4DA7QPLA.cjs +356 -0
- package/dist/chunk-4DA7QPLA.cjs.map +1 -0
- package/dist/{chunk-TP5YQFIX.js → chunk-57P6MJKC.js} +3 -715
- package/dist/chunk-57P6MJKC.js.map +1 -0
- package/dist/{chunk-R2YHJN6W.cjs → chunk-5KVM3WEY.cjs} +34 -208
- package/dist/chunk-5KVM3WEY.cjs.map +1 -0
- package/dist/{chunk-Z2OVHWHB.cjs → chunk-6IMPH6WV.cjs} +28 -11
- package/dist/chunk-6IMPH6WV.cjs.map +1 -0
- package/dist/{chunk-QKVA2SOG.js → chunk-DXHRBMGB.js} +27 -284
- package/dist/chunk-DXHRBMGB.js.map +1 -0
- package/dist/{chunk-E3BZLMX6.js → chunk-ES5HNFFT.js} +43 -2
- package/dist/chunk-ES5HNFFT.js.map +1 -0
- package/dist/{chunk-QYZKIPSD.js → chunk-FXYP2HA6.js} +34 -3
- package/dist/chunk-FXYP2HA6.js.map +1 -0
- package/dist/chunk-H727JIG7.js +809 -0
- package/dist/chunk-H727JIG7.js.map +1 -0
- package/dist/{chunk-AM4JKIPP.js → chunk-HXRD4B37.js} +9 -183
- package/dist/chunk-HXRD4B37.js.map +1 -0
- package/dist/chunk-I7HHI6QV.cjs +816 -0
- package/dist/chunk-I7HHI6QV.cjs.map +1 -0
- package/dist/{chunk-RDRJVCL5.cjs → chunk-IA6AU5PI.cjs} +2 -720
- package/dist/chunk-IA6AU5PI.cjs.map +1 -0
- package/dist/{chunk-55BNRTLW.cjs → chunk-LINKCEG4.cjs} +985 -4
- package/dist/chunk-LINKCEG4.cjs.map +1 -0
- package/dist/{chunk-TVVYZ2TH.js → chunk-OHVB4AJ7.js} +56 -3
- package/dist/chunk-OHVB4AJ7.js.map +1 -0
- package/dist/{chunk-XAEBVZTI.cjs → chunk-PDYFVNUX.cjs} +26 -289
- package/dist/chunk-PDYFVNUX.cjs.map +1 -0
- package/dist/{chunk-6WXQRYTW.js → chunk-QPPDLRNR.js} +286 -126
- package/dist/chunk-QPPDLRNR.js.map +1 -0
- package/dist/{chunk-WBCIEYHC.cjs → chunk-QUW2RZTM.cjs} +35 -4
- package/dist/chunk-QUW2RZTM.cjs.map +1 -0
- package/dist/chunk-SA7NSSIQ.cjs +397 -0
- package/dist/chunk-SA7NSSIQ.cjs.map +1 -0
- package/dist/{chunk-H4XCAPA6.cjs → chunk-V3LKPM3O.cjs} +43 -2
- package/dist/chunk-V3LKPM3O.cjs.map +1 -0
- package/dist/chunk-Y3N7UUDO.js +349 -0
- package/dist/chunk-Y3N7UUDO.js.map +1 -0
- package/dist/{chunk-S3FG2NY7.js → chunk-Y3QQN7PN.js} +4 -3
- package/dist/chunk-Y3QQN7PN.js.map +1 -0
- package/dist/{chunk-5HA5OMFH.cjs → chunk-YVUJBEXE.cjs} +7 -6
- package/dist/chunk-YVUJBEXE.cjs.map +1 -0
- package/dist/cli/index.cjs +103 -20
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +103 -20
- package/dist/cli/index.js.map +1 -1
- package/dist/client.d.cts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/drizzle/index.cjs +12 -12
- package/dist/drizzle/index.d.cts +23 -2
- package/dist/drizzle/index.d.ts +23 -2
- package/dist/drizzle/index.js +3 -3
- package/dist/index.cjs +174 -1054
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +85 -7
- package/dist/index.d.ts +85 -7
- package/dist/index.js +91 -980
- package/dist/index.js.map +1 -1
- package/dist/integration.cjs +2 -2
- package/dist/integration.d.cts +3 -16
- package/dist/integration.d.ts +3 -16
- package/dist/integration.js +1 -1
- package/dist/mongo-auth-adapter-NHHUJHVH.cjs +17 -0
- package/dist/mongo-auth-adapter-NHHUJHVH.cjs.map +1 -0
- package/dist/mongo-auth-adapter-NJQUUCTP.js +4 -0
- package/dist/mongo-auth-adapter-NJQUUCTP.js.map +1 -0
- package/dist/mongodb/index.cjs +9 -8
- package/dist/mongodb/index.d.cts +86 -5
- package/dist/mongodb/index.d.ts +86 -5
- package/dist/mongodb/index.js +3 -2
- package/dist/postgres-auth-adapter-3T2NKTSE.js +5 -0
- package/dist/{postgres-auth-adapter-B65BULNS.js.map → postgres-auth-adapter-3T2NKTSE.js.map} +1 -1
- package/dist/postgres-auth-adapter-7IEENCKQ.cjs +14 -0
- package/dist/{postgres-auth-adapter-6742WDCF.cjs.map → postgres-auth-adapter-7IEENCKQ.cjs.map} +1 -1
- package/dist/redis-adapter-D2E2S3GB.cjs +13 -0
- package/dist/{redis-adapter-LPUWLE4Y.cjs.map → redis-adapter-D2E2S3GB.cjs.map} +1 -1
- package/dist/redis-adapter-VQXD7ESY.js +4 -0
- package/dist/{redis-adapter-THYDCGQR.js.map → redis-adapter-VQXD7ESY.js.map} +1 -1
- package/dist/rest/index.cjs +10 -8
- package/dist/rest/index.js +8 -6
- package/dist/sqlite-adapter-LVK5PS4T.cjs +13 -0
- package/dist/sqlite-adapter-LVK5PS4T.cjs.map +1 -0
- package/dist/sqlite-adapter-TR3U3W6Q.js +4 -0
- package/dist/sqlite-adapter-TR3U3W6Q.js.map +1 -0
- package/dist/templates/index.cjs +31 -27
- package/dist/templates/index.d.cts +8 -5
- package/dist/templates/index.d.ts +8 -5
- package/dist/templates/index.js +1 -1
- package/dist/{base-eVegJ_Pr.d.ts → tenant-B1YB0Jy8.d.ts} +10 -1
- package/dist/{base-DvvNqnM-.d.cts → tenant-Cpeveji6.d.cts} +10 -1
- package/dist/{types-DqN4ckOC.d.cts → types-D6ZLRGbH.d.cts} +19 -1
- package/dist/{types-DqN4ckOC.d.ts → types-D6ZLRGbH.d.ts} +19 -1
- package/package.json +56 -9
- package/dist/adapter-BSvBudTG.d.cts +0 -65
- package/dist/adapter-CXGB2Elb.d.ts +0 -65
- package/dist/bootstrap-4MH44YKG.js +0 -6
- package/dist/bootstrap-EE6BJZWL.cjs +0 -31
- package/dist/chunk-55BNRTLW.cjs.map +0 -1
- package/dist/chunk-5HA5OMFH.cjs.map +0 -1
- package/dist/chunk-6WXQRYTW.js.map +0 -1
- package/dist/chunk-A4USRVTQ.js +0 -115
- package/dist/chunk-A4USRVTQ.js.map +0 -1
- package/dist/chunk-AM4JKIPP.js.map +0 -1
- package/dist/chunk-E3BZLMX6.js.map +0 -1
- package/dist/chunk-H4XCAPA6.cjs.map +0 -1
- package/dist/chunk-KOCTZKPV.cjs +0 -117
- package/dist/chunk-KOCTZKPV.cjs.map +0 -1
- package/dist/chunk-QKVA2SOG.js.map +0 -1
- package/dist/chunk-QYZKIPSD.js.map +0 -1
- package/dist/chunk-R2YHJN6W.cjs.map +0 -1
- package/dist/chunk-RALQO47U.cjs.map +0 -1
- package/dist/chunk-RDRJVCL5.cjs.map +0 -1
- package/dist/chunk-S3FG2NY7.js.map +0 -1
- package/dist/chunk-TP5YQFIX.js.map +0 -1
- package/dist/chunk-TVVYZ2TH.js.map +0 -1
- package/dist/chunk-WBCIEYHC.cjs.map +0 -1
- package/dist/chunk-WSCJQI2B.js.map +0 -1
- package/dist/chunk-WVPOPOEQ.cjs.map +0 -1
- package/dist/chunk-XAEBVZTI.cjs.map +0 -1
- package/dist/chunk-XU7AFF6V.js.map +0 -1
- package/dist/chunk-Z2OVHWHB.cjs.map +0 -1
- package/dist/postgres-auth-adapter-6742WDCF.cjs +0 -14
- package/dist/postgres-auth-adapter-B65BULNS.js +0 -5
- package/dist/redis-adapter-LPUWLE4Y.cjs +0 -13
- package/dist/redis-adapter-THYDCGQR.js +0 -4
|
@@ -3,6 +3,8 @@ import '../types-VtjUxIMp.cjs';
|
|
|
3
3
|
|
|
4
4
|
declare const minimalCollections: Record<string, CollectionConfig>;
|
|
5
5
|
|
|
6
|
+
declare const starterCollections: Record<string, CollectionConfig>;
|
|
7
|
+
|
|
6
8
|
declare const blogCollections: Record<string, CollectionConfig>;
|
|
7
9
|
declare const blogGlobals: GlobalConfig[];
|
|
8
10
|
|
|
@@ -35,25 +37,26 @@ declare const storeSettingsGlobal: GlobalConfig;
|
|
|
35
37
|
|
|
36
38
|
declare const paymentSettingsGlobal: GlobalConfig;
|
|
37
39
|
|
|
40
|
+
declare const systemSettingsGlobal: GlobalConfig;
|
|
41
|
+
|
|
38
42
|
declare const allSettingsGlobals: GlobalConfig[];
|
|
39
43
|
declare const coreSettingsGlobals: GlobalConfig[];
|
|
40
|
-
declare const ecommerceSettingsGlobals: GlobalConfig[];
|
|
41
44
|
declare const settingsBySlug: Record<string, GlobalConfig>;
|
|
42
|
-
declare function getSettingsForTemplate(template: "minimal" | "blog" | "ecommerce" | "kitchen-sink"): GlobalConfig[];
|
|
45
|
+
declare function getSettingsForTemplate(template: "minimal" | "starter" | "blog" | "ecommerce" | "kitchen-sink"): GlobalConfig[];
|
|
43
46
|
|
|
44
47
|
interface TemplateConfig {
|
|
45
48
|
collections?: CollectionConfig[];
|
|
46
49
|
globals?: GlobalConfig[];
|
|
47
50
|
}
|
|
48
|
-
type TemplateType = "minimal" | "blog" | "ecommerce" | "kitchen-sink";
|
|
51
|
+
type TemplateType = "minimal" | "starter" | "blog" | "ecommerce" | "kitchen-sink";
|
|
49
52
|
interface CreateTemplateConfigOptions extends TemplateConfig {
|
|
50
53
|
template?: TemplateType;
|
|
51
54
|
collections?: CollectionConfig[];
|
|
52
55
|
globals?: GlobalConfig[];
|
|
53
56
|
includeMedia?: boolean;
|
|
54
|
-
includeSettings?: "all" | "core" | "
|
|
57
|
+
includeSettings?: "all" | "core" | "site" | "seo" | "social" | "email" | "storage" | "access" | "store" | "payments" | "system" | string[];
|
|
55
58
|
excludeSettings?: string[];
|
|
56
59
|
}
|
|
57
60
|
declare function createTemplateConfig(options: CreateTemplateConfigOptions): TemplateConfig;
|
|
58
61
|
|
|
59
|
-
export { type CreateTemplateConfigOptions, type TemplateConfig, type TemplateType, accessSettingsGlobal, allSettingsGlobals, authCollections, blogCollections, blogGlobals, coreSettingsGlobals, createTemplateConfig, ecommerceCollections, ecommerceGlobals,
|
|
62
|
+
export { type CreateTemplateConfigOptions, type TemplateConfig, type TemplateType, accessSettingsGlobal, allSettingsGlobals, authCollections, blogCollections, blogGlobals, coreSettingsGlobals, createTemplateConfig, ecommerceCollections, ecommerceGlobals, emailSettingsGlobal, getSettingsForTemplate, kitchenSinkCollections, mediaCollection, mediaCollections, minimalCollections, paymentSettingsGlobal, seoSettingsGlobal, settingsBySlug, siteSettingsGlobal, socialSettingsGlobal, starterCollections, storageSettingsGlobal, storeSettingsGlobal, systemSettingsGlobal };
|
|
@@ -3,6 +3,8 @@ import '../types-VtjUxIMp.js';
|
|
|
3
3
|
|
|
4
4
|
declare const minimalCollections: Record<string, CollectionConfig>;
|
|
5
5
|
|
|
6
|
+
declare const starterCollections: Record<string, CollectionConfig>;
|
|
7
|
+
|
|
6
8
|
declare const blogCollections: Record<string, CollectionConfig>;
|
|
7
9
|
declare const blogGlobals: GlobalConfig[];
|
|
8
10
|
|
|
@@ -35,25 +37,26 @@ declare const storeSettingsGlobal: GlobalConfig;
|
|
|
35
37
|
|
|
36
38
|
declare const paymentSettingsGlobal: GlobalConfig;
|
|
37
39
|
|
|
40
|
+
declare const systemSettingsGlobal: GlobalConfig;
|
|
41
|
+
|
|
38
42
|
declare const allSettingsGlobals: GlobalConfig[];
|
|
39
43
|
declare const coreSettingsGlobals: GlobalConfig[];
|
|
40
|
-
declare const ecommerceSettingsGlobals: GlobalConfig[];
|
|
41
44
|
declare const settingsBySlug: Record<string, GlobalConfig>;
|
|
42
|
-
declare function getSettingsForTemplate(template: "minimal" | "blog" | "ecommerce" | "kitchen-sink"): GlobalConfig[];
|
|
45
|
+
declare function getSettingsForTemplate(template: "minimal" | "starter" | "blog" | "ecommerce" | "kitchen-sink"): GlobalConfig[];
|
|
43
46
|
|
|
44
47
|
interface TemplateConfig {
|
|
45
48
|
collections?: CollectionConfig[];
|
|
46
49
|
globals?: GlobalConfig[];
|
|
47
50
|
}
|
|
48
|
-
type TemplateType = "minimal" | "blog" | "ecommerce" | "kitchen-sink";
|
|
51
|
+
type TemplateType = "minimal" | "starter" | "blog" | "ecommerce" | "kitchen-sink";
|
|
49
52
|
interface CreateTemplateConfigOptions extends TemplateConfig {
|
|
50
53
|
template?: TemplateType;
|
|
51
54
|
collections?: CollectionConfig[];
|
|
52
55
|
globals?: GlobalConfig[];
|
|
53
56
|
includeMedia?: boolean;
|
|
54
|
-
includeSettings?: "all" | "core" | "
|
|
57
|
+
includeSettings?: "all" | "core" | "site" | "seo" | "social" | "email" | "storage" | "access" | "store" | "payments" | "system" | string[];
|
|
55
58
|
excludeSettings?: string[];
|
|
56
59
|
}
|
|
57
60
|
declare function createTemplateConfig(options: CreateTemplateConfigOptions): TemplateConfig;
|
|
58
61
|
|
|
59
|
-
export { type CreateTemplateConfigOptions, type TemplateConfig, type TemplateType, accessSettingsGlobal, allSettingsGlobals, authCollections, blogCollections, blogGlobals, coreSettingsGlobals, createTemplateConfig, ecommerceCollections, ecommerceGlobals,
|
|
62
|
+
export { type CreateTemplateConfigOptions, type TemplateConfig, type TemplateType, accessSettingsGlobal, allSettingsGlobals, authCollections, blogCollections, blogGlobals, coreSettingsGlobals, createTemplateConfig, ecommerceCollections, ecommerceGlobals, emailSettingsGlobal, getSettingsForTemplate, kitchenSinkCollections, mediaCollection, mediaCollections, minimalCollections, paymentSettingsGlobal, seoSettingsGlobal, settingsBySlug, siteSettingsGlobal, socialSettingsGlobal, starterCollections, storageSettingsGlobal, storeSettingsGlobal, systemSettingsGlobal };
|
package/dist/templates/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { accessSettingsGlobal, allSettingsGlobals, authCollections, blogCollections, blogGlobals, coreSettingsGlobals, createTemplateConfig, ecommerceCollections, ecommerceGlobals,
|
|
1
|
+
export { accessSettingsGlobal, allSettingsGlobals, authCollections, blogCollections, blogGlobals, coreSettingsGlobals, createTemplateConfig, ecommerceCollections, ecommerceGlobals, emailSettingsGlobal, getSettingsForTemplate, kitchenSinkCollections, mediaCollection, mediaCollections, minimalCollections, paymentSettingsGlobal, seoSettingsGlobal, settingsBySlug, siteSettingsGlobal, socialSettingsGlobal, starterCollections, storageSettingsGlobal, storeSettingsGlobal, systemSettingsGlobal } from '../chunk-3J4MFTI3.js';
|
|
2
2
|
import '../chunk-Z6ZWNWWR.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -70,4 +70,13 @@ declare abstract class AbstractBaseAdapter implements BaseAdapter {
|
|
|
70
70
|
protected getUploadFields(fields: Field[]): UploadField[];
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
interface TenantContext {
|
|
74
|
+
tenantId: string;
|
|
75
|
+
userId: string;
|
|
76
|
+
role: string;
|
|
77
|
+
roles: string[];
|
|
78
|
+
permissions: string[];
|
|
79
|
+
isSuperAdmin: boolean;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export { AbstractBaseAdapter as A, type TenantContext as T };
|
|
@@ -70,4 +70,13 @@ declare abstract class AbstractBaseAdapter implements BaseAdapter {
|
|
|
70
70
|
protected getUploadFields(fields: Field[]): UploadField[];
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
interface TenantContext {
|
|
74
|
+
tenantId: string;
|
|
75
|
+
userId: string;
|
|
76
|
+
role: string;
|
|
77
|
+
roles: string[];
|
|
78
|
+
permissions: string[];
|
|
79
|
+
isSuperAdmin: boolean;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export { AbstractBaseAdapter as A, type TenantContext as T };
|
|
@@ -114,6 +114,24 @@ interface AuthAdapter {
|
|
|
114
114
|
findSessionByRefreshToken(refreshToken: string): Promise<Session | null>;
|
|
115
115
|
deleteSession(sessionId: string): Promise<boolean>;
|
|
116
116
|
deleteUserSessions(userId: string): Promise<number>;
|
|
117
|
+
createEmailVerificationToken(userId: string): Promise<{
|
|
118
|
+
token: string;
|
|
119
|
+
expiresAt: Date;
|
|
120
|
+
}>;
|
|
121
|
+
verifyEmailToken(token: string): Promise<{
|
|
122
|
+
success: boolean;
|
|
123
|
+
userId?: string;
|
|
124
|
+
error?: string;
|
|
125
|
+
}>;
|
|
126
|
+
createPasswordResetToken(email: string): Promise<{
|
|
127
|
+
token: string;
|
|
128
|
+
expiresAt: Date;
|
|
129
|
+
error?: string;
|
|
130
|
+
}>;
|
|
131
|
+
resetPasswordWithToken(token: string, newPassword: string): Promise<{
|
|
132
|
+
success: boolean;
|
|
133
|
+
error?: string;
|
|
134
|
+
}>;
|
|
117
135
|
hasAnyUsers?(): Promise<boolean>;
|
|
118
136
|
connect?(): Promise<void>;
|
|
119
137
|
disconnect?(): Promise<void>;
|
|
@@ -127,4 +145,4 @@ interface AuthAdapter {
|
|
|
127
145
|
createAuditLog(data: Omit<AuditLog, "id" | "timestamp">): Promise<AuditLog>;
|
|
128
146
|
}
|
|
129
147
|
|
|
130
|
-
export type { AuthAdapter as A, JWTPayload as J, LoginCredentials as L, RegisterData as R, Session as S, UserRole as U, AuthResult as a, AuthTokenConfig as b, AuthUser as c,
|
|
148
|
+
export type { AuthAdapter as A, JWTPayload as J, LoginCredentials as L, RegisterData as R, Session as S, UserRole as U, AuthResult as a, AuthTokenConfig as b, AuthUser as c, AuditLog as d, AuditLogFilter as e, AuditAction as f };
|
|
@@ -114,6 +114,24 @@ interface AuthAdapter {
|
|
|
114
114
|
findSessionByRefreshToken(refreshToken: string): Promise<Session | null>;
|
|
115
115
|
deleteSession(sessionId: string): Promise<boolean>;
|
|
116
116
|
deleteUserSessions(userId: string): Promise<number>;
|
|
117
|
+
createEmailVerificationToken(userId: string): Promise<{
|
|
118
|
+
token: string;
|
|
119
|
+
expiresAt: Date;
|
|
120
|
+
}>;
|
|
121
|
+
verifyEmailToken(token: string): Promise<{
|
|
122
|
+
success: boolean;
|
|
123
|
+
userId?: string;
|
|
124
|
+
error?: string;
|
|
125
|
+
}>;
|
|
126
|
+
createPasswordResetToken(email: string): Promise<{
|
|
127
|
+
token: string;
|
|
128
|
+
expiresAt: Date;
|
|
129
|
+
error?: string;
|
|
130
|
+
}>;
|
|
131
|
+
resetPasswordWithToken(token: string, newPassword: string): Promise<{
|
|
132
|
+
success: boolean;
|
|
133
|
+
error?: string;
|
|
134
|
+
}>;
|
|
117
135
|
hasAnyUsers?(): Promise<boolean>;
|
|
118
136
|
connect?(): Promise<void>;
|
|
119
137
|
disconnect?(): Promise<void>;
|
|
@@ -127,4 +145,4 @@ interface AuthAdapter {
|
|
|
127
145
|
createAuditLog(data: Omit<AuditLog, "id" | "timestamp">): Promise<AuditLog>;
|
|
128
146
|
}
|
|
129
147
|
|
|
130
|
-
export type { AuthAdapter as A, JWTPayload as J, LoginCredentials as L, RegisterData as R, Session as S, UserRole as U, AuthResult as a, AuthTokenConfig as b, AuthUser as c,
|
|
148
|
+
export type { AuthAdapter as A, JWTPayload as J, LoginCredentials as L, RegisterData as R, Session as S, UserRole as U, AuthResult as a, AuthTokenConfig as b, AuthUser as c, AuditLog as d, AuditLogFilter as e, AuditAction as f };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kyro-cms/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Astro-native headless CMS with multi-database adapters, multi-protocol APIs, and multi-vendor support",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22"
|
|
@@ -28,29 +28,74 @@
|
|
|
28
28
|
"import": "./dist/client.js",
|
|
29
29
|
"require": "./dist/client.cjs"
|
|
30
30
|
},
|
|
31
|
+
"./cli": {
|
|
32
|
+
"types": "./dist/cli/index.d.ts",
|
|
33
|
+
"import": "./dist/cli/index.js",
|
|
34
|
+
"require": "./dist/cli/index.cjs"
|
|
35
|
+
},
|
|
36
|
+
"./auth": {
|
|
37
|
+
"types": "./dist/auth/index.d.ts",
|
|
38
|
+
"import": "./dist/auth/index.js",
|
|
39
|
+
"require": "./dist/auth/index.cjs"
|
|
40
|
+
},
|
|
41
|
+
"./middleware": {
|
|
42
|
+
"types": "./dist/middleware/index.d.ts",
|
|
43
|
+
"import": "./dist/middleware.js"
|
|
44
|
+
},
|
|
45
|
+
"./storage": {
|
|
46
|
+
"types": "./dist/storage/index.d.ts",
|
|
47
|
+
"import": "./dist/storage/index.js",
|
|
48
|
+
"require": "./dist/storage/index.cjs"
|
|
49
|
+
},
|
|
50
|
+
"./webhooks": {
|
|
51
|
+
"types": "./dist/webhooks/index.d.ts",
|
|
52
|
+
"import": "./dist/webhooks/index.js",
|
|
53
|
+
"require": "./dist/webhooks/index.cjs"
|
|
54
|
+
},
|
|
55
|
+
"./versions": {
|
|
56
|
+
"types": "./dist/versions/index.d.ts",
|
|
57
|
+
"import": "./dist/versions/index.js",
|
|
58
|
+
"require": "./dist/versions/index.cjs"
|
|
59
|
+
},
|
|
60
|
+
"./plugins": {
|
|
61
|
+
"types": "./dist/plugins/index.d.ts",
|
|
62
|
+
"import": "./dist/plugins/index.js",
|
|
63
|
+
"require": "./dist/plugins/index.cjs"
|
|
64
|
+
},
|
|
65
|
+
"./access": {
|
|
66
|
+
"types": "./dist/access/index.d.ts",
|
|
67
|
+
"import": "./dist/access/index.js",
|
|
68
|
+
"require": "./dist/access/index.cjs"
|
|
69
|
+
},
|
|
31
70
|
"./trpc": {
|
|
32
71
|
"types": "./dist/trpc/index.d.ts",
|
|
33
|
-
"import": "./dist/trpc/index.js"
|
|
72
|
+
"import": "./dist/trpc/index.js",
|
|
73
|
+
"require": "./dist/trpc/index.cjs"
|
|
34
74
|
},
|
|
35
75
|
"./graphql": {
|
|
36
76
|
"types": "./dist/graphql/index.d.ts",
|
|
37
|
-
"import": "./dist/graphql/index.js"
|
|
77
|
+
"import": "./dist/graphql/index.js",
|
|
78
|
+
"require": "./dist/graphql/index.cjs"
|
|
38
79
|
},
|
|
39
80
|
"./rest": {
|
|
40
81
|
"types": "./dist/rest/index.d.ts",
|
|
41
|
-
"import": "./dist/rest/index.js"
|
|
82
|
+
"import": "./dist/rest/index.js",
|
|
83
|
+
"require": "./dist/rest/index.cjs"
|
|
42
84
|
},
|
|
43
85
|
"./ws": {
|
|
44
86
|
"types": "./dist/ws/index.d.ts",
|
|
45
|
-
"import": "./dist/ws/index.js"
|
|
87
|
+
"import": "./dist/ws/index.js",
|
|
88
|
+
"require": "./dist/ws/index.cjs"
|
|
46
89
|
},
|
|
47
90
|
"./drizzle": {
|
|
48
91
|
"types": "./dist/drizzle/index.d.ts",
|
|
49
|
-
"import": "./dist/drizzle/index.js"
|
|
92
|
+
"import": "./dist/drizzle/index.js",
|
|
93
|
+
"require": "./dist/drizzle/index.cjs"
|
|
50
94
|
},
|
|
51
95
|
"./mongodb": {
|
|
52
96
|
"types": "./dist/mongodb/index.d.ts",
|
|
53
|
-
"import": "./dist/mongodb/index.js"
|
|
97
|
+
"import": "./dist/mongodb/index.js",
|
|
98
|
+
"require": "./dist/mongodb/index.cjs"
|
|
54
99
|
},
|
|
55
100
|
"./templates": {
|
|
56
101
|
"types": "./dist/templates/index.d.ts",
|
|
@@ -64,11 +109,13 @@
|
|
|
64
109
|
},
|
|
65
110
|
"./integration": {
|
|
66
111
|
"types": "./dist/integration.d.ts",
|
|
67
|
-
"import": "./dist/integration.js"
|
|
112
|
+
"import": "./dist/integration.js",
|
|
113
|
+
"require": "./dist/integration.cjs"
|
|
68
114
|
},
|
|
69
115
|
"./api-handler": {
|
|
70
116
|
"types": "./dist/api-handler.d.ts",
|
|
71
|
-
"import": "./dist/api-handler.js"
|
|
117
|
+
"import": "./dist/api-handler.js",
|
|
118
|
+
"require": "./dist/api-handler.cjs"
|
|
72
119
|
}
|
|
73
120
|
},
|
|
74
121
|
"files": [
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { A as AbstractBaseAdapter } from './base-DvvNqnM-.cjs';
|
|
2
|
-
import { F as FindArgs, b as FindResult, c as FindByIDArgs, d as CreateArgs, e as UpdateArgs, D as DeleteArgs, f as FindVersionsArgs, g as VersionRecord, h as CreateVersionArgs, i as DraftFindArgs, j as DraftSnapshot, k as DraftUpsertArgs, l as DraftDeleteArgs } from './types-J3R9nVsZ.cjs';
|
|
3
|
-
|
|
4
|
-
declare class MongoDBAdapter extends AbstractBaseAdapter {
|
|
5
|
-
client: any;
|
|
6
|
-
db: any;
|
|
7
|
-
private database;
|
|
8
|
-
private connectionString?;
|
|
9
|
-
private readonly draftsCollectionName;
|
|
10
|
-
constructor(options: {
|
|
11
|
-
client?: any;
|
|
12
|
-
database?: string;
|
|
13
|
-
connectionString?: string;
|
|
14
|
-
});
|
|
15
|
-
connect(): Promise<void>;
|
|
16
|
-
disconnect(): Promise<void>;
|
|
17
|
-
private getMongoCollection;
|
|
18
|
-
find<T>(args: FindArgs): Promise<FindResult<T>>;
|
|
19
|
-
findByID<T>(args: FindByIDArgs): Promise<T | null>;
|
|
20
|
-
create<T>(args: CreateArgs): Promise<T>;
|
|
21
|
-
update<T>(args: UpdateArgs): Promise<T>;
|
|
22
|
-
delete<T>(args: DeleteArgs): Promise<T>;
|
|
23
|
-
count(args: {
|
|
24
|
-
collection: string;
|
|
25
|
-
where?: Record<string, any>;
|
|
26
|
-
tenantID?: string;
|
|
27
|
-
}): Promise<number>;
|
|
28
|
-
findOne(args: {
|
|
29
|
-
collection: string;
|
|
30
|
-
where: Record<string, any>;
|
|
31
|
-
tenantID?: string;
|
|
32
|
-
draft?: boolean;
|
|
33
|
-
}): Promise<any>;
|
|
34
|
-
findVersions(args: FindVersionsArgs): Promise<FindResult<VersionRecord>>;
|
|
35
|
-
findVersionByID(args: {
|
|
36
|
-
collection: string;
|
|
37
|
-
versionId: string;
|
|
38
|
-
tenantID?: string;
|
|
39
|
-
}): Promise<VersionRecord | null>;
|
|
40
|
-
createVersion<T = Record<string, any>>(args: CreateVersionArgs<T>): Promise<VersionRecord<T>>;
|
|
41
|
-
deleteVersions(args: {
|
|
42
|
-
collection: string;
|
|
43
|
-
documentId: string;
|
|
44
|
-
keepLatest?: number;
|
|
45
|
-
tenantID?: string;
|
|
46
|
-
}): Promise<void>;
|
|
47
|
-
findDraft<T>(args: DraftFindArgs): Promise<DraftSnapshot<T> | null>;
|
|
48
|
-
upsertDraft<T>(args: DraftUpsertArgs<T>): Promise<DraftSnapshot<T>>;
|
|
49
|
-
deleteDraft(args: DraftDeleteArgs): Promise<void>;
|
|
50
|
-
migrate?(): Promise<void>;
|
|
51
|
-
private getCollectionConfig;
|
|
52
|
-
private buildFilter;
|
|
53
|
-
private getDraftId;
|
|
54
|
-
private docToDraft;
|
|
55
|
-
private buildProjection;
|
|
56
|
-
private processResult;
|
|
57
|
-
private generateId;
|
|
58
|
-
}
|
|
59
|
-
declare function createMongoDBAdapter(options: {
|
|
60
|
-
client?: any;
|
|
61
|
-
database?: string;
|
|
62
|
-
connectionString?: string;
|
|
63
|
-
}): MongoDBAdapter;
|
|
64
|
-
|
|
65
|
-
export { MongoDBAdapter as M, createMongoDBAdapter as c };
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { A as AbstractBaseAdapter } from './base-eVegJ_Pr.js';
|
|
2
|
-
import { F as FindArgs, b as FindResult, c as FindByIDArgs, d as CreateArgs, e as UpdateArgs, D as DeleteArgs, f as FindVersionsArgs, g as VersionRecord, h as CreateVersionArgs, i as DraftFindArgs, j as DraftSnapshot, k as DraftUpsertArgs, l as DraftDeleteArgs } from './types-Bs1up4yP.js';
|
|
3
|
-
|
|
4
|
-
declare class MongoDBAdapter extends AbstractBaseAdapter {
|
|
5
|
-
client: any;
|
|
6
|
-
db: any;
|
|
7
|
-
private database;
|
|
8
|
-
private connectionString?;
|
|
9
|
-
private readonly draftsCollectionName;
|
|
10
|
-
constructor(options: {
|
|
11
|
-
client?: any;
|
|
12
|
-
database?: string;
|
|
13
|
-
connectionString?: string;
|
|
14
|
-
});
|
|
15
|
-
connect(): Promise<void>;
|
|
16
|
-
disconnect(): Promise<void>;
|
|
17
|
-
private getMongoCollection;
|
|
18
|
-
find<T>(args: FindArgs): Promise<FindResult<T>>;
|
|
19
|
-
findByID<T>(args: FindByIDArgs): Promise<T | null>;
|
|
20
|
-
create<T>(args: CreateArgs): Promise<T>;
|
|
21
|
-
update<T>(args: UpdateArgs): Promise<T>;
|
|
22
|
-
delete<T>(args: DeleteArgs): Promise<T>;
|
|
23
|
-
count(args: {
|
|
24
|
-
collection: string;
|
|
25
|
-
where?: Record<string, any>;
|
|
26
|
-
tenantID?: string;
|
|
27
|
-
}): Promise<number>;
|
|
28
|
-
findOne(args: {
|
|
29
|
-
collection: string;
|
|
30
|
-
where: Record<string, any>;
|
|
31
|
-
tenantID?: string;
|
|
32
|
-
draft?: boolean;
|
|
33
|
-
}): Promise<any>;
|
|
34
|
-
findVersions(args: FindVersionsArgs): Promise<FindResult<VersionRecord>>;
|
|
35
|
-
findVersionByID(args: {
|
|
36
|
-
collection: string;
|
|
37
|
-
versionId: string;
|
|
38
|
-
tenantID?: string;
|
|
39
|
-
}): Promise<VersionRecord | null>;
|
|
40
|
-
createVersion<T = Record<string, any>>(args: CreateVersionArgs<T>): Promise<VersionRecord<T>>;
|
|
41
|
-
deleteVersions(args: {
|
|
42
|
-
collection: string;
|
|
43
|
-
documentId: string;
|
|
44
|
-
keepLatest?: number;
|
|
45
|
-
tenantID?: string;
|
|
46
|
-
}): Promise<void>;
|
|
47
|
-
findDraft<T>(args: DraftFindArgs): Promise<DraftSnapshot<T> | null>;
|
|
48
|
-
upsertDraft<T>(args: DraftUpsertArgs<T>): Promise<DraftSnapshot<T>>;
|
|
49
|
-
deleteDraft(args: DraftDeleteArgs): Promise<void>;
|
|
50
|
-
migrate?(): Promise<void>;
|
|
51
|
-
private getCollectionConfig;
|
|
52
|
-
private buildFilter;
|
|
53
|
-
private getDraftId;
|
|
54
|
-
private docToDraft;
|
|
55
|
-
private buildProjection;
|
|
56
|
-
private processResult;
|
|
57
|
-
private generateId;
|
|
58
|
-
}
|
|
59
|
-
declare function createMongoDBAdapter(options: {
|
|
60
|
-
client?: any;
|
|
61
|
-
database?: string;
|
|
62
|
-
connectionString?: string;
|
|
63
|
-
}): MongoDBAdapter;
|
|
64
|
-
|
|
65
|
-
export { MongoDBAdapter as M, createMongoDBAdapter as c };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { autoBootstrap, bootstrapAdmin, bootstrapWithRetry, checkBootstrapRequired, getBootstrapFromEnv } from './chunk-S3FG2NY7.js';
|
|
2
|
-
import './chunk-TP5YQFIX.js';
|
|
3
|
-
import './chunk-YT7HXXVN.js';
|
|
4
|
-
import './chunk-Z6ZWNWWR.js';
|
|
5
|
-
//# sourceMappingURL=bootstrap-4MH44YKG.js.map
|
|
6
|
-
//# sourceMappingURL=bootstrap-4MH44YKG.js.map
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunk5HA5OMFH_cjs = require('./chunk-5HA5OMFH.cjs');
|
|
4
|
-
require('./chunk-RDRJVCL5.cjs');
|
|
5
|
-
require('./chunk-4PWRCMTQ.cjs');
|
|
6
|
-
require('./chunk-G7VZBCD6.cjs');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Object.defineProperty(exports, "autoBootstrap", {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () { return chunk5HA5OMFH_cjs.autoBootstrap; }
|
|
13
|
-
});
|
|
14
|
-
Object.defineProperty(exports, "bootstrapAdmin", {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () { return chunk5HA5OMFH_cjs.bootstrapAdmin; }
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "bootstrapWithRetry", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () { return chunk5HA5OMFH_cjs.bootstrapWithRetry; }
|
|
21
|
-
});
|
|
22
|
-
Object.defineProperty(exports, "checkBootstrapRequired", {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: function () { return chunk5HA5OMFH_cjs.checkBootstrapRequired; }
|
|
25
|
-
});
|
|
26
|
-
Object.defineProperty(exports, "getBootstrapFromEnv", {
|
|
27
|
-
enumerable: true,
|
|
28
|
-
get: function () { return chunk5HA5OMFH_cjs.getBootstrapFromEnv; }
|
|
29
|
-
});
|
|
30
|
-
//# sourceMappingURL=bootstrap-EE6BJZWL.cjs.map
|
|
31
|
-
//# sourceMappingURL=bootstrap-EE6BJZWL.cjs.map
|