@arch-cadre/core 0.0.16 → 0.0.18

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.
@@ -55,17 +55,17 @@ 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
66
  id: string;
67
- email: string;
68
67
  name: string;
68
+ email: string;
69
69
  password: string | null;
70
70
  image: string | null;
71
71
  recovery_code: Buffer<ArrayBufferLike>;
@@ -83,16 +83,16 @@ 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
93
  id: string;
94
- email: string;
95
94
  name: string;
95
+ email: string;
96
96
  password: string | null;
97
97
  image: string | null;
98
98
  recovery_code: Buffer<ArrayBufferLike>;
@@ -55,17 +55,17 @@ 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
66
  id: string;
67
- email: string;
68
67
  name: string;
68
+ email: string;
69
69
  password: string | null;
70
70
  image: string | null;
71
71
  recovery_code: Buffer<ArrayBufferLike>;
@@ -83,16 +83,16 @@ 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
93
  id: string;
94
- email: string;
95
94
  name: string;
95
+ email: string;
96
96
  password: string | null;
97
97
  image: string | null;
98
98
  recovery_code: Buffer<ArrayBufferLike>;
@@ -1,3 +1,5 @@
1
+ "use server";
2
+
1
3
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
2
4
  const require_config = require('./config.cjs');
3
5
  let node_fs = require("node:fs");
@@ -1 +1 @@
1
- {"version":3,"file":"config.server.d.cts","names":[],"sources":["../../src/core/config.server.ts"],"mappings":";;;;;AAUA;;iBAAsB,aAAA,CAAA,GAAiB,OAAA,CAAQ,UAAA;;;AA4D/C;;iBAAsB,aAAA,CAAA,GAAiB,OAAA"}
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":";;;;;AAUA;;iBAAsB,aAAA,CAAA,GAAiB,OAAA,CAAQ,UAAA;;;AA4D/C;;iBAAsB,aAAA,CAAA,GAAiB,OAAA"}
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,3 +1,5 @@
1
+ "use server";
2
+
1
3
  import { DEFAULT_CONFIG } from "./config.mjs";
2
4
  import fs from "node:fs";
3
5
  import path from "node:path";
@@ -1 +1 @@
1
- {"version":3,"file":"config.server.mjs","names":[],"sources":["../../src/core/config.server.ts"],"sourcesContent":["import 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.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I"}
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"}
@@ -16,10 +16,10 @@ declare function getUserNotifications(): Promise<{
16
16
  }[] | null>;
17
17
  declare function createNotification(data: CreateNotificationPayload): Promise<{
18
18
  id: string;
19
+ type: string | null;
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;
@@ -16,10 +16,10 @@ declare function getUserNotifications(): Promise<{
16
16
  }[] | null>;
17
17
  declare function createNotification(data: CreateNotificationPayload): Promise<{
18
18
  id: string;
19
+ type: string | null;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arch-cadre/core",
3
- "version": "0.0.16",
3
+ "version": "0.0.18",
4
4
  "type": "module",
5
5
  "description": "Core logic for Kryo framework",
6
6
  "exports": {