@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
package/dist/integration.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkQUW2RZTM_cjs = require('./chunk-QUW2RZTM.cjs');
|
|
4
4
|
require('./chunk-G7VZBCD6.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
module.exports =
|
|
8
|
+
module.exports = chunkQUW2RZTM_cjs.kyro;
|
|
9
9
|
//# sourceMappingURL=integration.cjs.map
|
|
10
10
|
//# sourceMappingURL=integration.cjs.map
|
package/dist/integration.d.cts
CHANGED
|
@@ -1,26 +1,13 @@
|
|
|
1
1
|
import { AstroIntegration } from 'astro';
|
|
2
2
|
|
|
3
3
|
interface KyroIntegrationOptions {
|
|
4
|
-
/**
|
|
5
|
-
* Path to the kyro configuration file relative to the project root.
|
|
6
|
-
* Default: './kyro.config.ts'
|
|
7
|
-
*/
|
|
8
4
|
configPath?: string;
|
|
9
|
-
/**
|
|
10
|
-
* Base path where the API should be mounted.
|
|
11
|
-
* Default: '/api/kyro'
|
|
12
|
-
*/
|
|
13
5
|
apiPath?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Base path where the admin UI should be mounted.
|
|
16
|
-
* Default: '/admin'
|
|
17
|
-
*/
|
|
18
6
|
adminPath?: string;
|
|
19
|
-
/**
|
|
20
|
-
* Whether to mount the admin UI.
|
|
21
|
-
* Default: true
|
|
22
|
-
*/
|
|
23
7
|
admin?: boolean;
|
|
8
|
+
enableGraphQL?: boolean;
|
|
9
|
+
enableTRPC?: boolean;
|
|
10
|
+
enableWebSocket?: boolean;
|
|
24
11
|
}
|
|
25
12
|
declare function kyro(options?: KyroIntegrationOptions): AstroIntegration;
|
|
26
13
|
|
package/dist/integration.d.ts
CHANGED
|
@@ -1,26 +1,13 @@
|
|
|
1
1
|
import { AstroIntegration } from 'astro';
|
|
2
2
|
|
|
3
3
|
interface KyroIntegrationOptions {
|
|
4
|
-
/**
|
|
5
|
-
* Path to the kyro configuration file relative to the project root.
|
|
6
|
-
* Default: './kyro.config.ts'
|
|
7
|
-
*/
|
|
8
4
|
configPath?: string;
|
|
9
|
-
/**
|
|
10
|
-
* Base path where the API should be mounted.
|
|
11
|
-
* Default: '/api/kyro'
|
|
12
|
-
*/
|
|
13
5
|
apiPath?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Base path where the admin UI should be mounted.
|
|
16
|
-
* Default: '/admin'
|
|
17
|
-
*/
|
|
18
6
|
adminPath?: string;
|
|
19
|
-
/**
|
|
20
|
-
* Whether to mount the admin UI.
|
|
21
|
-
* Default: true
|
|
22
|
-
*/
|
|
23
7
|
admin?: boolean;
|
|
8
|
+
enableGraphQL?: boolean;
|
|
9
|
+
enableTRPC?: boolean;
|
|
10
|
+
enableWebSocket?: boolean;
|
|
24
11
|
}
|
|
25
12
|
declare function kyro(options?: KyroIntegrationOptions): AstroIntegration;
|
|
26
13
|
|
package/dist/integration.js
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk4DA7QPLA_cjs = require('./chunk-4DA7QPLA.cjs');
|
|
4
|
+
require('./chunk-G7VZBCD6.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "MongoDBAuthAdapter", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunk4DA7QPLA_cjs.MongoDBAuthAdapter; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "createMongoDBAuthAdapter", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunk4DA7QPLA_cjs.createMongoDBAuthAdapter; }
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=mongo-auth-adapter-NHHUJHVH.cjs.map
|
|
17
|
+
//# sourceMappingURL=mongo-auth-adapter-NHHUJHVH.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"mongo-auth-adapter-NHHUJHVH.cjs"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"mongo-auth-adapter-NJQUUCTP.js"}
|
package/dist/mongodb/index.cjs
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('../chunk-MTIRYI7F.cjs');
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
4
|
+
var chunkPDYFVNUX_cjs = require('../chunk-PDYFVNUX.cjs');
|
|
5
|
+
var chunk4DA7QPLA_cjs = require('../chunk-4DA7QPLA.cjs');
|
|
6
|
+
require('../chunk-SA7NSSIQ.cjs');
|
|
6
7
|
require('../chunk-G7VZBCD6.cjs');
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
Object.defineProperty(exports, "MongoDBAdapter", {
|
|
11
12
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkPDYFVNUX_cjs.MongoDBAdapter; }
|
|
13
14
|
});
|
|
14
|
-
Object.defineProperty(exports, "
|
|
15
|
+
Object.defineProperty(exports, "createMongoDBAdapter", {
|
|
15
16
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkPDYFVNUX_cjs.createMongoDBAdapter; }
|
|
17
18
|
});
|
|
18
|
-
Object.defineProperty(exports, "
|
|
19
|
+
Object.defineProperty(exports, "MongoDBAuthAdapter", {
|
|
19
20
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunk4DA7QPLA_cjs.MongoDBAuthAdapter; }
|
|
21
22
|
});
|
|
22
23
|
Object.defineProperty(exports, "createMongoDBAuthAdapter", {
|
|
23
24
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunk4DA7QPLA_cjs.createMongoDBAuthAdapter; }
|
|
25
26
|
});
|
|
26
27
|
//# sourceMappingURL=index.cjs.map
|
|
27
28
|
//# sourceMappingURL=index.cjs.map
|
package/dist/mongodb/index.d.cts
CHANGED
|
@@ -1,9 +1,72 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import '../
|
|
4
|
-
import '../types-J3R9nVsZ.cjs';
|
|
1
|
+
import { A as AbstractBaseAdapter, T as TenantContext } from '../tenant-Cpeveji6.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
|
+
import { A as AuthAdapter, U as UserRole, c as AuthUser, S as Session, e as AuditLogFilter, d as AuditLog } from '../types-D6ZLRGbH.cjs';
|
|
5
4
|
import '../types-VtjUxIMp.cjs';
|
|
6
5
|
|
|
6
|
+
declare class MongoDBAdapter extends AbstractBaseAdapter {
|
|
7
|
+
client: any;
|
|
8
|
+
db: any;
|
|
9
|
+
private database;
|
|
10
|
+
private connectionString?;
|
|
11
|
+
private readonly draftsCollectionName;
|
|
12
|
+
private tenantContext?;
|
|
13
|
+
setTenantContext(context: TenantContext | undefined): void;
|
|
14
|
+
getTenantContext(): TenantContext | undefined;
|
|
15
|
+
constructor(options: {
|
|
16
|
+
client?: any;
|
|
17
|
+
database?: string;
|
|
18
|
+
connectionString?: string;
|
|
19
|
+
});
|
|
20
|
+
connect(): Promise<void>;
|
|
21
|
+
disconnect(): Promise<void>;
|
|
22
|
+
private getMongoCollection;
|
|
23
|
+
find<T>(args: FindArgs): Promise<FindResult<T>>;
|
|
24
|
+
findByID<T>(args: FindByIDArgs): Promise<T | null>;
|
|
25
|
+
create<T>(args: CreateArgs): Promise<T>;
|
|
26
|
+
update<T>(args: UpdateArgs): Promise<T>;
|
|
27
|
+
delete<T>(args: DeleteArgs): Promise<T>;
|
|
28
|
+
count(args: {
|
|
29
|
+
collection: string;
|
|
30
|
+
where?: Record<string, any>;
|
|
31
|
+
tenantID?: string;
|
|
32
|
+
}): Promise<number>;
|
|
33
|
+
findOne(args: {
|
|
34
|
+
collection: string;
|
|
35
|
+
where: Record<string, any>;
|
|
36
|
+
tenantID?: string;
|
|
37
|
+
draft?: boolean;
|
|
38
|
+
}): Promise<any>;
|
|
39
|
+
findVersions(args: FindVersionsArgs): Promise<FindResult<VersionRecord>>;
|
|
40
|
+
findVersionByID(args: {
|
|
41
|
+
collection: string;
|
|
42
|
+
versionId: string;
|
|
43
|
+
tenantID?: string;
|
|
44
|
+
}): Promise<VersionRecord | null>;
|
|
45
|
+
createVersion<T = Record<string, any>>(args: CreateVersionArgs<T>): Promise<VersionRecord<T>>;
|
|
46
|
+
deleteVersions(args: {
|
|
47
|
+
collection: string;
|
|
48
|
+
documentId: string;
|
|
49
|
+
keepLatest?: number;
|
|
50
|
+
tenantID?: string;
|
|
51
|
+
}): Promise<void>;
|
|
52
|
+
findDraft<T>(args: DraftFindArgs): Promise<DraftSnapshot<T> | null>;
|
|
53
|
+
upsertDraft<T>(args: DraftUpsertArgs<T>): Promise<DraftSnapshot<T>>;
|
|
54
|
+
deleteDraft(args: DraftDeleteArgs): Promise<void>;
|
|
55
|
+
migrate?(): Promise<void>;
|
|
56
|
+
private getCollectionConfig;
|
|
57
|
+
private buildFilter;
|
|
58
|
+
private getDraftId;
|
|
59
|
+
private docToDraft;
|
|
60
|
+
private buildProjection;
|
|
61
|
+
private processResult;
|
|
62
|
+
private generateId;
|
|
63
|
+
}
|
|
64
|
+
declare function createMongoDBAdapter(options: {
|
|
65
|
+
client?: any;
|
|
66
|
+
database?: string;
|
|
67
|
+
connectionString?: string;
|
|
68
|
+
}): MongoDBAdapter;
|
|
69
|
+
|
|
7
70
|
interface MongoDBAuthAdapterOptions {
|
|
8
71
|
db: any;
|
|
9
72
|
collectionPrefix?: string;
|
|
@@ -53,7 +116,25 @@ declare class MongoDBAuthAdapter implements AuthAdapter {
|
|
|
53
116
|
createAuditLog(data: Omit<AuditLog, "id" | "timestamp">): Promise<AuditLog>;
|
|
54
117
|
private docToAuthUser;
|
|
55
118
|
private docToSession;
|
|
119
|
+
createEmailVerificationToken(userId: string): Promise<{
|
|
120
|
+
token: string;
|
|
121
|
+
expiresAt: Date;
|
|
122
|
+
}>;
|
|
123
|
+
verifyEmailToken(token: string): Promise<{
|
|
124
|
+
success: boolean;
|
|
125
|
+
userId?: string;
|
|
126
|
+
error?: string;
|
|
127
|
+
}>;
|
|
128
|
+
createPasswordResetToken(email: string): Promise<{
|
|
129
|
+
token: string;
|
|
130
|
+
expiresAt: Date;
|
|
131
|
+
error?: string;
|
|
132
|
+
}>;
|
|
133
|
+
resetPasswordWithToken(token: string, newPassword: string): Promise<{
|
|
134
|
+
success: boolean;
|
|
135
|
+
error?: string;
|
|
136
|
+
}>;
|
|
56
137
|
}
|
|
57
138
|
declare function createMongoDBAuthAdapter(options: MongoDBAuthAdapterOptions): MongoDBAuthAdapter;
|
|
58
139
|
|
|
59
|
-
export { MongoDBAuthAdapter, createMongoDBAuthAdapter };
|
|
140
|
+
export { MongoDBAdapter, MongoDBAuthAdapter, createMongoDBAdapter, createMongoDBAuthAdapter };
|
package/dist/mongodb/index.d.ts
CHANGED
|
@@ -1,9 +1,72 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import '../
|
|
4
|
-
import '../types-Bs1up4yP.js';
|
|
1
|
+
import { A as AbstractBaseAdapter, T as TenantContext } from '../tenant-B1YB0Jy8.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
|
+
import { A as AuthAdapter, U as UserRole, c as AuthUser, S as Session, e as AuditLogFilter, d as AuditLog } from '../types-D6ZLRGbH.js';
|
|
5
4
|
import '../types-VtjUxIMp.js';
|
|
6
5
|
|
|
6
|
+
declare class MongoDBAdapter extends AbstractBaseAdapter {
|
|
7
|
+
client: any;
|
|
8
|
+
db: any;
|
|
9
|
+
private database;
|
|
10
|
+
private connectionString?;
|
|
11
|
+
private readonly draftsCollectionName;
|
|
12
|
+
private tenantContext?;
|
|
13
|
+
setTenantContext(context: TenantContext | undefined): void;
|
|
14
|
+
getTenantContext(): TenantContext | undefined;
|
|
15
|
+
constructor(options: {
|
|
16
|
+
client?: any;
|
|
17
|
+
database?: string;
|
|
18
|
+
connectionString?: string;
|
|
19
|
+
});
|
|
20
|
+
connect(): Promise<void>;
|
|
21
|
+
disconnect(): Promise<void>;
|
|
22
|
+
private getMongoCollection;
|
|
23
|
+
find<T>(args: FindArgs): Promise<FindResult<T>>;
|
|
24
|
+
findByID<T>(args: FindByIDArgs): Promise<T | null>;
|
|
25
|
+
create<T>(args: CreateArgs): Promise<T>;
|
|
26
|
+
update<T>(args: UpdateArgs): Promise<T>;
|
|
27
|
+
delete<T>(args: DeleteArgs): Promise<T>;
|
|
28
|
+
count(args: {
|
|
29
|
+
collection: string;
|
|
30
|
+
where?: Record<string, any>;
|
|
31
|
+
tenantID?: string;
|
|
32
|
+
}): Promise<number>;
|
|
33
|
+
findOne(args: {
|
|
34
|
+
collection: string;
|
|
35
|
+
where: Record<string, any>;
|
|
36
|
+
tenantID?: string;
|
|
37
|
+
draft?: boolean;
|
|
38
|
+
}): Promise<any>;
|
|
39
|
+
findVersions(args: FindVersionsArgs): Promise<FindResult<VersionRecord>>;
|
|
40
|
+
findVersionByID(args: {
|
|
41
|
+
collection: string;
|
|
42
|
+
versionId: string;
|
|
43
|
+
tenantID?: string;
|
|
44
|
+
}): Promise<VersionRecord | null>;
|
|
45
|
+
createVersion<T = Record<string, any>>(args: CreateVersionArgs<T>): Promise<VersionRecord<T>>;
|
|
46
|
+
deleteVersions(args: {
|
|
47
|
+
collection: string;
|
|
48
|
+
documentId: string;
|
|
49
|
+
keepLatest?: number;
|
|
50
|
+
tenantID?: string;
|
|
51
|
+
}): Promise<void>;
|
|
52
|
+
findDraft<T>(args: DraftFindArgs): Promise<DraftSnapshot<T> | null>;
|
|
53
|
+
upsertDraft<T>(args: DraftUpsertArgs<T>): Promise<DraftSnapshot<T>>;
|
|
54
|
+
deleteDraft(args: DraftDeleteArgs): Promise<void>;
|
|
55
|
+
migrate?(): Promise<void>;
|
|
56
|
+
private getCollectionConfig;
|
|
57
|
+
private buildFilter;
|
|
58
|
+
private getDraftId;
|
|
59
|
+
private docToDraft;
|
|
60
|
+
private buildProjection;
|
|
61
|
+
private processResult;
|
|
62
|
+
private generateId;
|
|
63
|
+
}
|
|
64
|
+
declare function createMongoDBAdapter(options: {
|
|
65
|
+
client?: any;
|
|
66
|
+
database?: string;
|
|
67
|
+
connectionString?: string;
|
|
68
|
+
}): MongoDBAdapter;
|
|
69
|
+
|
|
7
70
|
interface MongoDBAuthAdapterOptions {
|
|
8
71
|
db: any;
|
|
9
72
|
collectionPrefix?: string;
|
|
@@ -53,7 +116,25 @@ declare class MongoDBAuthAdapter implements AuthAdapter {
|
|
|
53
116
|
createAuditLog(data: Omit<AuditLog, "id" | "timestamp">): Promise<AuditLog>;
|
|
54
117
|
private docToAuthUser;
|
|
55
118
|
private docToSession;
|
|
119
|
+
createEmailVerificationToken(userId: string): Promise<{
|
|
120
|
+
token: string;
|
|
121
|
+
expiresAt: Date;
|
|
122
|
+
}>;
|
|
123
|
+
verifyEmailToken(token: string): Promise<{
|
|
124
|
+
success: boolean;
|
|
125
|
+
userId?: string;
|
|
126
|
+
error?: string;
|
|
127
|
+
}>;
|
|
128
|
+
createPasswordResetToken(email: string): Promise<{
|
|
129
|
+
token: string;
|
|
130
|
+
expiresAt: Date;
|
|
131
|
+
error?: string;
|
|
132
|
+
}>;
|
|
133
|
+
resetPasswordWithToken(token: string, newPassword: string): Promise<{
|
|
134
|
+
success: boolean;
|
|
135
|
+
error?: string;
|
|
136
|
+
}>;
|
|
56
137
|
}
|
|
57
138
|
declare function createMongoDBAuthAdapter(options: MongoDBAuthAdapterOptions): MongoDBAuthAdapter;
|
|
58
139
|
|
|
59
|
-
export { MongoDBAuthAdapter, createMongoDBAuthAdapter };
|
|
140
|
+
export { MongoDBAdapter, MongoDBAuthAdapter, createMongoDBAdapter, createMongoDBAuthAdapter };
|
package/dist/mongodb/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import '../chunk-GTGRLD4Y.js';
|
|
2
|
-
export { MongoDBAdapter,
|
|
3
|
-
|
|
2
|
+
export { MongoDBAdapter, createMongoDBAdapter } from '../chunk-DXHRBMGB.js';
|
|
3
|
+
export { MongoDBAuthAdapter, createMongoDBAuthAdapter } from '../chunk-Y3N7UUDO.js';
|
|
4
|
+
import '../chunk-3ZFYL34R.js';
|
|
4
5
|
import '../chunk-Z6ZWNWWR.js';
|
|
5
6
|
//# sourceMappingURL=index.js.map
|
|
6
7
|
//# sourceMappingURL=index.js.map
|
package/dist/{postgres-auth-adapter-B65BULNS.js.map → postgres-auth-adapter-3T2NKTSE.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"postgres-auth-adapter-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"postgres-auth-adapter-3T2NKTSE.js"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk2OL4O2TH_cjs = require('./chunk-2OL4O2TH.cjs');
|
|
4
|
+
require('./chunk-WQBRWOQT.cjs');
|
|
5
|
+
require('./chunk-G7VZBCD6.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "PostgresAuthAdapter", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunk2OL4O2TH_cjs.PostgresAuthAdapter; }
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=postgres-auth-adapter-7IEENCKQ.cjs.map
|
|
14
|
+
//# sourceMappingURL=postgres-auth-adapter-7IEENCKQ.cjs.map
|
package/dist/{postgres-auth-adapter-6742WDCF.cjs.map → postgres-auth-adapter-7IEENCKQ.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"postgres-auth-adapter-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"postgres-auth-adapter-7IEENCKQ.cjs"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkV3LKPM3O_cjs = require('./chunk-V3LKPM3O.cjs');
|
|
4
|
+
require('./chunk-G7VZBCD6.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "RedisAuthAdapter", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkV3LKPM3O_cjs.RedisAuthAdapter; }
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=redis-adapter-D2E2S3GB.cjs.map
|
|
13
|
+
//# sourceMappingURL=redis-adapter-D2E2S3GB.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"redis-adapter-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"redis-adapter-D2E2S3GB.cjs"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"redis-adapter-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"redis-adapter-VQXD7ESY.js"}
|
package/dist/rest/index.cjs
CHANGED
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunk5KVM3WEY_cjs = require('../chunk-5KVM3WEY.cjs');
|
|
4
|
+
require('../chunk-IA6AU5PI.cjs');
|
|
5
5
|
require('../chunk-4PWRCMTQ.cjs');
|
|
6
|
+
require('../chunk-I7HHI6QV.cjs');
|
|
6
7
|
require('../chunk-ADLJSJSN.cjs');
|
|
7
8
|
require('../chunk-IBG6V56E.cjs');
|
|
8
9
|
require('../chunk-VJT6P4N6.cjs');
|
|
9
10
|
require('../chunk-R3XIBBAW.cjs');
|
|
10
|
-
require('../chunk-
|
|
11
|
-
require('../chunk-
|
|
11
|
+
require('../chunk-2KVHZE6O.cjs');
|
|
12
|
+
require('../chunk-2OL4O2TH.cjs');
|
|
12
13
|
require('../chunk-WQBRWOQT.cjs');
|
|
13
|
-
require('../chunk-
|
|
14
|
-
require('../chunk-
|
|
14
|
+
require('../chunk-PDYFVNUX.cjs');
|
|
15
|
+
require('../chunk-4DA7QPLA.cjs');
|
|
16
|
+
require('../chunk-SA7NSSIQ.cjs');
|
|
15
17
|
require('../chunk-G7VZBCD6.cjs');
|
|
16
18
|
|
|
17
19
|
|
|
18
20
|
|
|
19
21
|
Object.defineProperty(exports, "createHonoApp", {
|
|
20
22
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunk5KVM3WEY_cjs.createHonoApp; }
|
|
22
24
|
});
|
|
23
25
|
Object.defineProperty(exports, "createRESTAPI", {
|
|
24
26
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunk5KVM3WEY_cjs.createRESTAPI; }
|
|
26
28
|
});
|
|
27
29
|
//# sourceMappingURL=index.cjs.map
|
|
28
30
|
//# sourceMappingURL=index.cjs.map
|
package/dist/rest/index.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
export { createHonoApp, createRESTAPI } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { createHonoApp, createRESTAPI } from '../chunk-HXRD4B37.js';
|
|
2
|
+
import '../chunk-57P6MJKC.js';
|
|
3
3
|
import '../chunk-YT7HXXVN.js';
|
|
4
|
+
import '../chunk-H727JIG7.js';
|
|
4
5
|
import '../chunk-P2YW545G.js';
|
|
5
6
|
import '../chunk-QXIQWPAP.js';
|
|
6
7
|
import '../chunk-REK7AYOC.js';
|
|
7
8
|
import '../chunk-SDMNUYVU.js';
|
|
8
|
-
import '../chunk-
|
|
9
|
-
import '../chunk-
|
|
9
|
+
import '../chunk-QPPDLRNR.js';
|
|
10
|
+
import '../chunk-OHVB4AJ7.js';
|
|
10
11
|
import '../chunk-WOWUL7ZY.js';
|
|
11
|
-
import '../chunk-
|
|
12
|
-
import '../chunk-
|
|
12
|
+
import '../chunk-DXHRBMGB.js';
|
|
13
|
+
import '../chunk-Y3N7UUDO.js';
|
|
14
|
+
import '../chunk-3ZFYL34R.js';
|
|
13
15
|
import '../chunk-Z6ZWNWWR.js';
|
|
14
16
|
//# sourceMappingURL=index.js.map
|
|
15
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkI7HHI6QV_cjs = require('./chunk-I7HHI6QV.cjs');
|
|
4
|
+
require('./chunk-G7VZBCD6.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "SQLiteAuthAdapter", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkI7HHI6QV_cjs.SQLiteAuthAdapter; }
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=sqlite-adapter-LVK5PS4T.cjs.map
|
|
13
|
+
//# sourceMappingURL=sqlite-adapter-LVK5PS4T.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"sqlite-adapter-LVK5PS4T.cjs"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"sqlite-adapter-TR3U3W6Q.js"}
|
package/dist/templates/index.cjs
CHANGED
|
@@ -1,101 +1,105 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk6IMPH6WV_cjs = require('../chunk-6IMPH6WV.cjs');
|
|
4
4
|
require('../chunk-G7VZBCD6.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "accessSettingsGlobal", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunk6IMPH6WV_cjs.accessSettingsGlobal; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "allSettingsGlobals", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunk6IMPH6WV_cjs.allSettingsGlobals; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "authCollections", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunk6IMPH6WV_cjs.authCollections; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "blogCollections", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunk6IMPH6WV_cjs.blogCollections; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "blogGlobals", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunk6IMPH6WV_cjs.blogGlobals; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "coreSettingsGlobals", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunk6IMPH6WV_cjs.coreSettingsGlobals; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "createTemplateConfig", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunk6IMPH6WV_cjs.createTemplateConfig; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "ecommerceCollections", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunk6IMPH6WV_cjs.ecommerceCollections; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "ecommerceGlobals", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
43
|
-
});
|
|
44
|
-
Object.defineProperty(exports, "ecommerceSettingsGlobals", {
|
|
45
|
-
enumerable: true,
|
|
46
|
-
get: function () { return chunkZ2OVHWHB_cjs.ecommerceSettingsGlobals; }
|
|
42
|
+
get: function () { return chunk6IMPH6WV_cjs.ecommerceGlobals; }
|
|
47
43
|
});
|
|
48
44
|
Object.defineProperty(exports, "emailSettingsGlobal", {
|
|
49
45
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunk6IMPH6WV_cjs.emailSettingsGlobal; }
|
|
51
47
|
});
|
|
52
48
|
Object.defineProperty(exports, "getSettingsForTemplate", {
|
|
53
49
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunk6IMPH6WV_cjs.getSettingsForTemplate; }
|
|
55
51
|
});
|
|
56
52
|
Object.defineProperty(exports, "kitchenSinkCollections", {
|
|
57
53
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunk6IMPH6WV_cjs.kitchenSinkCollections; }
|
|
59
55
|
});
|
|
60
56
|
Object.defineProperty(exports, "mediaCollection", {
|
|
61
57
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunk6IMPH6WV_cjs.mediaCollection; }
|
|
63
59
|
});
|
|
64
60
|
Object.defineProperty(exports, "mediaCollections", {
|
|
65
61
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunk6IMPH6WV_cjs.mediaCollections; }
|
|
67
63
|
});
|
|
68
64
|
Object.defineProperty(exports, "minimalCollections", {
|
|
69
65
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunk6IMPH6WV_cjs.minimalCollections; }
|
|
71
67
|
});
|
|
72
68
|
Object.defineProperty(exports, "paymentSettingsGlobal", {
|
|
73
69
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunk6IMPH6WV_cjs.paymentSettingsGlobal; }
|
|
75
71
|
});
|
|
76
72
|
Object.defineProperty(exports, "seoSettingsGlobal", {
|
|
77
73
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunk6IMPH6WV_cjs.seoSettingsGlobal; }
|
|
79
75
|
});
|
|
80
76
|
Object.defineProperty(exports, "settingsBySlug", {
|
|
81
77
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunk6IMPH6WV_cjs.settingsBySlug; }
|
|
83
79
|
});
|
|
84
80
|
Object.defineProperty(exports, "siteSettingsGlobal", {
|
|
85
81
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunk6IMPH6WV_cjs.siteSettingsGlobal; }
|
|
87
83
|
});
|
|
88
84
|
Object.defineProperty(exports, "socialSettingsGlobal", {
|
|
89
85
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunk6IMPH6WV_cjs.socialSettingsGlobal; }
|
|
87
|
+
});
|
|
88
|
+
Object.defineProperty(exports, "starterCollections", {
|
|
89
|
+
enumerable: true,
|
|
90
|
+
get: function () { return chunk6IMPH6WV_cjs.starterCollections; }
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(exports, "storageSettingsGlobal", {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunk6IMPH6WV_cjs.storageSettingsGlobal; }
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, "storeSettingsGlobal", {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunk6IMPH6WV_cjs.storeSettingsGlobal; }
|
|
99
|
+
});
|
|
100
|
+
Object.defineProperty(exports, "systemSettingsGlobal", {
|
|
101
|
+
enumerable: true,
|
|
102
|
+
get: function () { return chunk6IMPH6WV_cjs.systemSettingsGlobal; }
|
|
99
103
|
});
|
|
100
104
|
//# sourceMappingURL=index.cjs.map
|
|
101
105
|
//# sourceMappingURL=index.cjs.map
|