@arch-cadre/core 0.0.15 → 0.0.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/core/auth/email-verification.d.cts +2 -2
- package/dist/core/auth/email-verification.d.mts +2 -2
- package/dist/core/auth/logic.d.cts +6 -6
- package/dist/core/auth/logic.d.mts +6 -6
- package/dist/core/auth/rbac.d.cts +2 -2
- package/dist/core/auth/rbac.d.mts +2 -2
- package/dist/core/config.server.cjs +2 -0
- package/dist/core/config.server.d.cts.map +1 -1
- package/dist/core/config.server.d.mts.map +1 -1
- package/dist/core/config.server.mjs +2 -0
- package/dist/core/config.server.mjs.map +1 -1
- package/dist/core/notifications/actions.d.cts +1 -1
- package/dist/core/notifications/actions.d.mts +1 -1
- package/dist/server/database/schema.d.cts +661 -490
- package/dist/server/database/schema.d.cts.map +1 -1
- package/dist/server/database/schema.d.mts +661 -490
- package/dist/server/database/schema.d.mts.map +1 -1
- package/package.json +2 -2
|
@@ -21,13 +21,13 @@ declare function getUserEmailVerificationRequest(userId: string, id: string): Pr
|
|
|
21
21
|
* Creates a new email verification request, deleting any existing one for the user.
|
|
22
22
|
*/
|
|
23
23
|
declare function createEmailVerificationRequest(userId: string, email: string): Promise<{
|
|
24
|
-
id: string;
|
|
25
24
|
email: string;
|
|
25
|
+
code: string;
|
|
26
|
+
id: string;
|
|
26
27
|
createdAt: Date;
|
|
27
28
|
updatedAt: Date | null;
|
|
28
29
|
userId: string;
|
|
29
30
|
expiresAt: Date;
|
|
30
|
-
code: string;
|
|
31
31
|
}>;
|
|
32
32
|
/**
|
|
33
33
|
* Deletes all email verification requests for a user.
|
|
@@ -21,13 +21,13 @@ declare function getUserEmailVerificationRequest(userId: string, id: string): Pr
|
|
|
21
21
|
* Creates a new email verification request, deleting any existing one for the user.
|
|
22
22
|
*/
|
|
23
23
|
declare function createEmailVerificationRequest(userId: string, email: string): Promise<{
|
|
24
|
-
id: string;
|
|
25
24
|
email: string;
|
|
25
|
+
code: string;
|
|
26
|
+
id: string;
|
|
26
27
|
createdAt: Date;
|
|
27
28
|
updatedAt: Date | null;
|
|
28
29
|
userId: string;
|
|
29
30
|
expiresAt: Date;
|
|
30
|
-
code: string;
|
|
31
31
|
}>;
|
|
32
32
|
/**
|
|
33
33
|
* Deletes all email verification requests for a user.
|
|
@@ -55,18 +55,18 @@ declare function signUp(data: RegisterInput): Promise<{
|
|
|
55
55
|
session: {
|
|
56
56
|
[x: string]: any;
|
|
57
57
|
id: string;
|
|
58
|
-
active_organization_id: string | null;
|
|
59
58
|
createdAt: Date;
|
|
60
59
|
updatedAt: Date | null;
|
|
61
60
|
userId: string;
|
|
61
|
+
active_organization_id: string | null;
|
|
62
62
|
expiresAt: Date;
|
|
63
63
|
};
|
|
64
64
|
user: {
|
|
65
65
|
[x: string]: any;
|
|
66
|
-
id: string;
|
|
67
66
|
email: string;
|
|
68
|
-
name: string;
|
|
69
67
|
password: string | null;
|
|
68
|
+
name: string;
|
|
69
|
+
id: string;
|
|
70
70
|
image: string | null;
|
|
71
71
|
recovery_code: Buffer<ArrayBufferLike>;
|
|
72
72
|
emailVerifiedAt: Date | null;
|
|
@@ -83,17 +83,17 @@ declare function finalizeLogin(userId: string, flags: SessionFlags): Promise<{
|
|
|
83
83
|
session: {
|
|
84
84
|
[x: string]: any;
|
|
85
85
|
id: string;
|
|
86
|
-
active_organization_id: string | null;
|
|
87
86
|
createdAt: Date;
|
|
88
87
|
updatedAt: Date | null;
|
|
89
88
|
userId: string;
|
|
89
|
+
active_organization_id: string | null;
|
|
90
90
|
expiresAt: Date;
|
|
91
91
|
} | null;
|
|
92
92
|
user: {
|
|
93
|
-
id: string;
|
|
94
93
|
email: string;
|
|
95
|
-
name: string;
|
|
96
94
|
password: string | null;
|
|
95
|
+
name: string;
|
|
96
|
+
id: string;
|
|
97
97
|
image: string | null;
|
|
98
98
|
recovery_code: Buffer<ArrayBufferLike>;
|
|
99
99
|
emailVerifiedAt: Date | null;
|
|
@@ -55,18 +55,18 @@ declare function signUp(data: RegisterInput): Promise<{
|
|
|
55
55
|
session: {
|
|
56
56
|
[x: string]: any;
|
|
57
57
|
id: string;
|
|
58
|
-
active_organization_id: string | null;
|
|
59
58
|
createdAt: Date;
|
|
60
59
|
updatedAt: Date | null;
|
|
61
60
|
userId: string;
|
|
61
|
+
active_organization_id: string | null;
|
|
62
62
|
expiresAt: Date;
|
|
63
63
|
};
|
|
64
64
|
user: {
|
|
65
65
|
[x: string]: any;
|
|
66
|
-
id: string;
|
|
67
66
|
email: string;
|
|
68
|
-
name: string;
|
|
69
67
|
password: string | null;
|
|
68
|
+
name: string;
|
|
69
|
+
id: string;
|
|
70
70
|
image: string | null;
|
|
71
71
|
recovery_code: Buffer<ArrayBufferLike>;
|
|
72
72
|
emailVerifiedAt: Date | null;
|
|
@@ -83,17 +83,17 @@ declare function finalizeLogin(userId: string, flags: SessionFlags): Promise<{
|
|
|
83
83
|
session: {
|
|
84
84
|
[x: string]: any;
|
|
85
85
|
id: string;
|
|
86
|
-
active_organization_id: string | null;
|
|
87
86
|
createdAt: Date;
|
|
88
87
|
updatedAt: Date | null;
|
|
89
88
|
userId: string;
|
|
89
|
+
active_organization_id: string | null;
|
|
90
90
|
expiresAt: Date;
|
|
91
91
|
} | null;
|
|
92
92
|
user: {
|
|
93
|
-
id: string;
|
|
94
93
|
email: string;
|
|
95
|
-
name: string;
|
|
96
94
|
password: string | null;
|
|
95
|
+
name: string;
|
|
96
|
+
id: string;
|
|
97
97
|
image: string | null;
|
|
98
98
|
recovery_code: Buffer<ArrayBufferLike>;
|
|
99
99
|
emailVerifiedAt: Date | null;
|
|
@@ -16,8 +16,8 @@ declare function getRoleById(roleId: string): Promise<{
|
|
|
16
16
|
description: string | null;
|
|
17
17
|
}>;
|
|
18
18
|
declare function createRole(name: string, description?: string): Promise<{
|
|
19
|
-
id: string;
|
|
20
19
|
name: string;
|
|
20
|
+
id: string;
|
|
21
21
|
description: string | null;
|
|
22
22
|
}[]>;
|
|
23
23
|
declare function deleteRole(roleId: string): Promise<pg.QueryResult<never>>;
|
|
@@ -27,8 +27,8 @@ declare function getPermissions(): Promise<{
|
|
|
27
27
|
description: string | null;
|
|
28
28
|
}[]>;
|
|
29
29
|
declare function createPermission(name: string, description?: string): Promise<{
|
|
30
|
-
id: string;
|
|
31
30
|
name: string;
|
|
31
|
+
id: string;
|
|
32
32
|
description: string | null;
|
|
33
33
|
}[]>;
|
|
34
34
|
declare function deletePermission(permissionId: string): Promise<pg.QueryResult<never>>;
|
|
@@ -16,8 +16,8 @@ declare function getRoleById(roleId: string): Promise<{
|
|
|
16
16
|
description: string | null;
|
|
17
17
|
}>;
|
|
18
18
|
declare function createRole(name: string, description?: string): Promise<{
|
|
19
|
-
id: string;
|
|
20
19
|
name: string;
|
|
20
|
+
id: string;
|
|
21
21
|
description: string | null;
|
|
22
22
|
}[]>;
|
|
23
23
|
declare function deleteRole(roleId: string): Promise<pg.QueryResult<never>>;
|
|
@@ -27,8 +27,8 @@ declare function getPermissions(): Promise<{
|
|
|
27
27
|
description: string | null;
|
|
28
28
|
}[]>;
|
|
29
29
|
declare function createPermission(name: string, description?: string): Promise<{
|
|
30
|
-
id: string;
|
|
31
30
|
name: string;
|
|
31
|
+
id: string;
|
|
32
32
|
description: string | null;
|
|
33
33
|
}[]>;
|
|
34
34
|
declare function deletePermission(permissionId: string): Promise<pg.QueryResult<never>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.server.d.cts","names":[],"sources":["../../src/core/config.server.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"config.server.d.cts","names":[],"sources":["../../src/core/config.server.ts"],"mappings":";;;;;AAYA;;iBAAsB,aAAA,CAAA,GAAiB,OAAA,CAAQ,UAAA;;;AA4D/C;;iBAAsB,aAAA,CAAA,GAAiB,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.server.d.mts","names":[],"sources":["../../src/core/config.server.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"config.server.d.mts","names":[],"sources":["../../src/core/config.server.ts"],"mappings":";;;;;AAYA;;iBAAsB,aAAA,CAAA,GAAiB,OAAA,CAAQ,UAAA;;;AA4D/C;;iBAAsB,aAAA,CAAA,GAAiB,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.server.mjs","names":[],"sources":["../../src/core/config.server.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"config.server.mjs","names":[],"sources":["../../src/core/config.server.ts"],"sourcesContent":["\"use server\";\n\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport { DEFAULT_CONFIG, type KryoConfig } from \"./config\";\n\nlet cachedConfig: KryoConfig | null = null;\n\n/**\n * Loads the Kryo configuration from kryo.config.ts or kryo.config.js in the current working directory.\n * SERVER ONLY.\n */\nexport async function getKryoConfig(): Promise<KryoConfig> {\n // Prevent this from ever running on the client even if imported\n if (typeof window !== \"undefined\") {\n throw new Error(\"getKryoConfig can only be called on the server.\");\n }\n\n // Use memory cache in production\n if (process.env.NODE_ENV === \"production\" && cachedConfig) {\n return cachedConfig;\n }\n\n const cwd = process.cwd();\n const configPathTS = path.join(cwd, \"kryo.config.ts\");\n const configPathJS = path.join(cwd, \"kryo.config.js\");\n const configPathMJS = path.join(cwd, \"kryo.config.mjs\");\n\n let loadedConfig: Partial<KryoConfig> = {};\n\n try {\n // Dynamic import jiti only on server to avoid bundling issues\n const { createJiti } = await import(\"jiti\");\n const jiti = createJiti(cwd, {\n fsCache: false,\n moduleCache: false,\n });\n\n if (fs.existsSync(configPathTS)) {\n const cacheBuster = `?t=${Date.now()}`;\n const imported: any = await jiti.import(\n `file://${configPathTS}${cacheBuster}`,\n { default: true },\n );\n loadedConfig = imported.default || imported;\n } else if (fs.existsSync(configPathMJS)) {\n const imported: any = await jiti.import(configPathMJS, { default: true });\n loadedConfig = imported.default || imported;\n } else if (fs.existsSync(configPathJS)) {\n const imported: any = await jiti.import(configPathJS, { default: true });\n loadedConfig = imported.default || imported;\n }\n } catch (error) {\n console.warn(\n \"[Kryo:Config] Could not load kryo.config.ts, using defaults.\",\n error,\n );\n }\n\n const finalConfig = { ...DEFAULT_CONFIG, ...loadedConfig };\n\n if (process.env.NODE_ENV === \"production\") {\n cachedConfig = finalConfig;\n }\n\n return finalConfig;\n}\n\n/**\n * Helper returning the absolute path to the modules directory.\n * SERVER ONLY.\n */\nexport async function getModulesDir(): Promise<string> {\n const config = await getKryoConfig();\n\n const dir = config.modulesDirectory || \"modules\";\n return path.isAbsolute(dir) ? dir : path.join(process.cwd(), dir);\n}\n"],"mappings":";;;;;;;AAMA,IAAI,eAAkC;;;;;AAMtC,eAAsB,gBAAqC;AAEzD,KAAI,OAAO,WAAW,YACpB,OAAM,IAAI,MAAM,kDAAkD;AAIpE,KAAI,QAAQ,IAAI,aAAa,gBAAgB,aAC3C,QAAO;CAGT,MAAM,MAAM,QAAQ,KAAK;CACzB,MAAM,eAAe,KAAK,KAAK,KAAK,iBAAiB;CACrD,MAAM,eAAe,KAAK,KAAK,KAAK,iBAAiB;CACrD,MAAM,gBAAgB,KAAK,KAAK,KAAK,kBAAkB;CAEvD,IAAI,eAAoC,EAAE;AAE1C,KAAI;EAEF,MAAM,EAAE,eAAe,MAAM,OAAO;EACpC,MAAM,OAAO,WAAW,KAAK;GAC3B,SAAS;GACT,aAAa;GACd,CAAC;AAEF,MAAI,GAAG,WAAW,aAAa,EAAE;GAC/B,MAAM,cAAc,MAAM,KAAK,KAAK;GACpC,MAAM,WAAgB,MAAM,KAAK,OAC/B,UAAU,eAAe,eACzB,EAAE,SAAS,MAAM,CAClB;AACD,kBAAe,SAAS,WAAW;aAC1B,GAAG,WAAW,cAAc,EAAE;GACvC,MAAM,WAAgB,MAAM,KAAK,OAAO,eAAe,EAAE,SAAS,MAAM,CAAC;AACzE,kBAAe,SAAS,WAAW;aAC1B,GAAG,WAAW,aAAa,EAAE;GACtC,MAAM,WAAgB,MAAM,KAAK,OAAO,cAAc,EAAE,SAAS,MAAM,CAAC;AACxE,kBAAe,SAAS,WAAW;;UAE9B,OAAO;AACd,UAAQ,KACN,gEACA,MACD;;CAGH,MAAM,cAAc;EAAE,GAAG;EAAgB,GAAG;EAAc;AAE1D,KAAI,QAAQ,IAAI,aAAa,aAC3B,gBAAe;AAGjB,QAAO;;;;;;AAOT,eAAsB,gBAAiC;CAGrD,MAAM,OAFS,MAAM,eAAe,EAEjB,oBAAoB;AACvC,QAAO,KAAK,WAAW,IAAI,GAAG,MAAM,KAAK,KAAK,QAAQ,KAAK,EAAE,IAAI"}
|
|
@@ -15,11 +15,11 @@ declare function getUserNotifications(): Promise<{
|
|
|
15
15
|
updatedAt: Date | null;
|
|
16
16
|
}[] | null>;
|
|
17
17
|
declare function createNotification(data: CreateNotificationPayload): Promise<{
|
|
18
|
+
type: string | null;
|
|
18
19
|
id: string;
|
|
19
20
|
createdAt: Date;
|
|
20
21
|
updatedAt: Date | null;
|
|
21
22
|
userId: string;
|
|
22
|
-
type: string | null;
|
|
23
23
|
title: string;
|
|
24
24
|
content: string | null;
|
|
25
25
|
target: string | null;
|
|
@@ -15,11 +15,11 @@ declare function getUserNotifications(): Promise<{
|
|
|
15
15
|
updatedAt: Date | null;
|
|
16
16
|
}[] | null>;
|
|
17
17
|
declare function createNotification(data: CreateNotificationPayload): Promise<{
|
|
18
|
+
type: string | null;
|
|
18
19
|
id: string;
|
|
19
20
|
createdAt: Date;
|
|
20
21
|
updatedAt: Date | null;
|
|
21
22
|
userId: string;
|
|
22
|
-
type: string | null;
|
|
23
23
|
title: string;
|
|
24
24
|
content: string | null;
|
|
25
25
|
target: string | null;
|