@warlock.js/core 5.32.0 → 5.33.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.
Files changed (125) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/esm/application/application-config-types.d.mts +8 -0
  3. package/esm/application/application-config-types.d.mts.map +1 -1
  4. package/esm/application/boot-signal.d.mts +8 -8
  5. package/esm/application/boot-signal.d.mts.map +1 -1
  6. package/esm/application/boot-signal.mjs +15 -9
  7. package/esm/application/boot-signal.mjs.map +1 -1
  8. package/esm/cli/commands/ai/ai-command.action.mjs +140 -0
  9. package/esm/cli/commands/ai/ai-command.action.mjs.map +1 -0
  10. package/esm/cli/commands/ai.command.mjs +50 -0
  11. package/esm/cli/commands/ai.command.mjs.map +1 -0
  12. package/esm/cli/commands/check/check-command.action.mjs +3 -0
  13. package/esm/cli/commands/check/check-command.action.mjs.map +1 -1
  14. package/esm/cli/commands/check.command.mjs +6 -1
  15. package/esm/cli/commands/check.command.mjs.map +1 -1
  16. package/esm/cli/commands/pm2/pm2-command.action.mjs +91 -0
  17. package/esm/cli/commands/pm2/pm2-command.action.mjs.map +1 -0
  18. package/esm/cli/commands/pm2/pm2-config.mjs +115 -0
  19. package/esm/cli/commands/pm2/pm2-config.mjs.map +1 -0
  20. package/esm/cli/commands/pm2.command.mjs +53 -0
  21. package/esm/cli/commands/pm2.command.mjs.map +1 -0
  22. package/esm/cli/framework-cli-commands.mjs +4 -0
  23. package/esm/cli/framework-cli-commands.mjs.map +1 -1
  24. package/esm/connectors/connectors-manager.d.mts.map +1 -1
  25. package/esm/connectors/connectors-manager.mjs +1 -4
  26. package/esm/connectors/connectors-manager.mjs.map +1 -1
  27. package/esm/connectors/shutdown-timeout.mjs +7 -0
  28. package/esm/connectors/shutdown-timeout.mjs.map +1 -0
  29. package/esm/connectors/socket-connector.d.mts.map +1 -1
  30. package/esm/connectors/socket-connector.mjs +8 -1
  31. package/esm/connectors/socket-connector.mjs.map +1 -1
  32. package/esm/dev-server/health-checker/checkers/eslint-health-checker.mjs +6 -8
  33. package/esm/dev-server/health-checker/checkers/eslint-health-checker.mjs.map +1 -1
  34. package/esm/dev-server/health-checker/default-health-checkers.mjs +6 -15
  35. package/esm/dev-server/health-checker/default-health-checkers.mjs.map +1 -1
  36. package/esm/dev-server/health-checker/eslint-support.mjs +27 -0
  37. package/esm/dev-server/health-checker/eslint-support.mjs.map +1 -0
  38. package/esm/dev-server/health-checker/file-health-checker.contract.d.mts +2 -1
  39. package/esm/dev-server/health-checker/file-health-checker.contract.d.mts.map +1 -1
  40. package/esm/dev-server/health-checker/workers/eslint-health.worker.mjs +2 -11
  41. package/esm/dev-server/health-checker/workers/eslint-health.worker.mjs.map +1 -1
  42. package/esm/generations/features/index.mjs +2 -0
  43. package/esm/generations/features/index.mjs.map +1 -1
  44. package/esm/generations/features/process.feature.mjs +65 -0
  45. package/esm/generations/features/process.feature.mjs.map +1 -0
  46. package/esm/http/port-preflight.d.mts.map +1 -1
  47. package/esm/http/port-preflight.mjs +2 -0
  48. package/esm/http/port-preflight.mjs.map +1 -1
  49. package/esm/index.d.mts +7 -2
  50. package/esm/index.mjs +7 -2
  51. package/esm/secrets/errors.d.mts +9 -0
  52. package/esm/secrets/errors.d.mts.map +1 -0
  53. package/esm/secrets/errors.mjs +22 -0
  54. package/esm/secrets/errors.mjs.map +1 -0
  55. package/esm/secrets/file-backend.mjs +167 -0
  56. package/esm/secrets/file-backend.mjs.map +1 -0
  57. package/esm/secrets/index.d.mts +6 -0
  58. package/esm/secrets/index.mjs +6 -0
  59. package/esm/secrets/keyring-backend.mjs +50 -0
  60. package/esm/secrets/keyring-backend.mjs.map +1 -0
  61. package/esm/secrets/memory-backend.d.mts +12 -0
  62. package/esm/secrets/memory-backend.d.mts.map +1 -0
  63. package/esm/secrets/memory-backend.mjs +28 -0
  64. package/esm/secrets/memory-backend.mjs.map +1 -0
  65. package/esm/secrets/secret-store.d.mts +25 -0
  66. package/esm/secrets/secret-store.d.mts.map +1 -0
  67. package/esm/secrets/secret-store.mjs +117 -0
  68. package/esm/secrets/secret-store.mjs.map +1 -0
  69. package/esm/secrets/secrets.d.mts +11 -0
  70. package/esm/secrets/secrets.d.mts.map +1 -0
  71. package/esm/secrets/secrets.mjs +63 -0
  72. package/esm/secrets/secrets.mjs.map +1 -0
  73. package/esm/secrets/types.d.mts +22 -0
  74. package/esm/secrets/types.d.mts.map +1 -0
  75. package/esm/socket/index.d.mts +2 -2
  76. package/esm/socket/index.mjs +2 -2
  77. package/esm/socket/utils.d.mts +7 -0
  78. package/esm/socket/utils.d.mts.map +1 -1
  79. package/esm/socket/utils.mjs +12 -1
  80. package/esm/socket/utils.mjs.map +1 -1
  81. package/esm/tests/fakes/index.d.mts +2 -1
  82. package/esm/tests/fakes/index.mjs +2 -1
  83. package/esm/tests/fakes/secrets-fake.d.mts +13 -0
  84. package/esm/tests/fakes/secrets-fake.d.mts.map +1 -0
  85. package/esm/tests/fakes/secrets-fake.mjs +50 -0
  86. package/esm/tests/fakes/secrets-fake.mjs.map +1 -0
  87. package/esm/tests/fakes/test-fakes.d.mts +2 -2
  88. package/esm/tests/fakes/test-fakes.d.mts.map +1 -1
  89. package/esm/tests/fakes/test-fakes.mjs +5 -2
  90. package/esm/tests/fakes/test-fakes.mjs.map +1 -1
  91. package/esm/tests/index.d.mts +2 -1
  92. package/esm/tests/index.mjs +2 -1
  93. package/esm/tests/vitest-setup.d.mts +1 -1
  94. package/esm/tests/vitest-setup.mjs.map +1 -1
  95. package/esm/tooling/check/lint-step.d.mts +2 -8
  96. package/esm/tooling/check/lint-step.d.mts.map +1 -1
  97. package/esm/tooling/check/lint-step.mjs +14 -11
  98. package/esm/tooling/check/lint-step.mjs.map +1 -1
  99. package/esm/tooling/check/run-check.d.mts +2 -0
  100. package/esm/tooling/check/run-check.d.mts.map +1 -1
  101. package/esm/tooling/check/run-check.mjs +2 -2
  102. package/esm/tooling/check/run-check.mjs.map +1 -1
  103. package/esm/upgrade/codemods/index.mjs +2 -0
  104. package/esm/upgrade/codemods/index.mjs.map +1 -1
  105. package/esm/upgrade/codemods/oxc-toolchain.mjs +142 -0
  106. package/esm/upgrade/codemods/oxc-toolchain.mjs.map +1 -0
  107. package/esm/upgrade/codemods/toolchain-templates.mjs +244 -0
  108. package/esm/upgrade/codemods/toolchain-templates.mjs.map +1 -0
  109. package/esm/upgrade/run-upgrade.mjs +25 -6
  110. package/esm/upgrade/run-upgrade.mjs.map +1 -1
  111. package/esm/warlock-config/types.d.mts +2 -1
  112. package/esm/warlock-config/types.d.mts.map +1 -1
  113. package/llms-full.txt +326 -19
  114. package/llms.txt +3 -2
  115. package/package.json +23 -13
  116. package/skills/README.md +2 -1
  117. package/skills/index.md +1 -1
  118. package/skills/run-app/SKILL.md +114 -5
  119. package/skills/store-secrets/SKILL.md +102 -0
  120. package/skills/test-fakes/SKILL.md +13 -11
  121. package/skills/upgrade-from-5-29/SKILL.md +39 -2
  122. package/skills/warlock-check/SKILL.md +5 -1
  123. package/skills/warlock-doctor/SKILL.md +9 -0
  124. package/skills/wire-socket/SKILL.md +19 -0
  125. package/skills/write-cli-command/SKILL.md +21 -0
@@ -0,0 +1,27 @@
1
+ import path from "node:path";
2
+ import { existsSync } from "node:fs";
3
+
4
+ //#region ../../packages/core/src/dev-server/health-checker/eslint-support.ts
5
+ /** Whether the app has an ESLint flat config at its root. */
6
+ function hasEslint(cwd) {
7
+ return [
8
+ "js",
9
+ "mjs",
10
+ "cjs",
11
+ "ts",
12
+ "mts",
13
+ "cts"
14
+ ].some((extension) => existsSync(path.join(cwd, `eslint.config.${extension}`)));
15
+ }
16
+ const ESLINT_DEPRECATION = "Deprecated: ESLint + Prettier support will be removed in 5.34.0. Migrate to Oxlint + Oxfmt with npx warlock upgrade --from 5.32 --to 5.33.0; remove the ESLint opt-in afterwards.";
17
+ let warned = false;
18
+ /** One warning per process, on stderr so JSON reports stay parseable. */
19
+ function warnEslintDeprecation() {
20
+ if (warned) return;
21
+ warned = true;
22
+ console.warn(ESLINT_DEPRECATION);
23
+ }
24
+
25
+ //#endregion
26
+ export { ESLINT_DEPRECATION, hasEslint, warnEslintDeprecation };
27
+ //# sourceMappingURL=eslint-support.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eslint-support.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/dev-server/health-checker/eslint-support.ts"],"sourcesContent":["import { existsSync } from \"node:fs\";\nimport path from \"node:path\";\n\n/** Whether the app has an ESLint flat config at its root. */\nexport function hasEslint(cwd: string): boolean {\n return [\"js\", \"mjs\", \"cjs\", \"ts\", \"mts\", \"cts\"].some((extension) =>\n existsSync(path.join(cwd, `eslint.config.${extension}`)),\n );\n}\n\nexport const ESLINT_DEPRECATION =\n \"Deprecated: ESLint + Prettier support will be removed in 5.34.0. Migrate to Oxlint + Oxfmt with npx warlock upgrade --from 5.32 --to 5.33.0; remove the ESLint opt-in afterwards.\";\n\nlet warned = false;\n\n/** One warning per process, on stderr so JSON reports stay parseable. */\nexport function warnEslintDeprecation(): void {\n if (warned) return;\n warned = true;\n console.warn(ESLINT_DEPRECATION);\n}\n"],"mappings":";;;;;AAIA,SAAgB,UAAU,KAAsB;CAC9C,OAAO;EAAC;EAAM;EAAO;EAAO;EAAM;EAAO;CAAK,CAAC,CAAC,MAAM,cACpD,WAAW,KAAK,KAAK,KAAK,iBAAiB,WAAW,CAAC,CACzD;AACF;AAEA,MAAa,qBACX;AAEF,IAAI,SAAS;;AAGb,SAAgB,wBAA8B;CAC5C,IAAI,QAAQ;CACZ,SAAS;CACT,QAAQ,KAAK,kBAAkB;AACjC"}
@@ -59,9 +59,10 @@ export interface FileHealthCheckerContract {
59
59
  */
60
60
  stats(): Promise<HealthCheckerFilesStats>;
61
61
  }
62
- /** Select built-in background checks; installed/configured linters run by default. */
62
+ /** Select background checks; TypeScript and configured Oxlint run by default. */
63
63
  export type BuiltInHealthCheckerOptions = {
64
64
  typescript?: boolean;
65
+ /** @deprecated Removed in 5.34.0. Explicit opt-in only; default false. */
65
66
  eslint?: boolean;
66
67
  oxlint?: boolean;
67
68
  };
@@ -1 +1 @@
1
- {"version":3,"file":"file-health-checker.contract.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/dev-server/health-checker/file-health-checker.contract.ts"],"mappings":";;;YAGY;EACV;EACA;IACE;IACA;;EAEF;IACE;IACA;;EAEF;IACE;IACA;;;iBAIa;;;;EAIf;;;;;;;;;;;;;;EAeA;;;;;EAMA;;EAGA,oBAAoB;;;;EAKpB,cAAc,OAAO,gBAAgB;;;;EAKrC,WAAW,MAAM;;;;EAKjB,MAAM,MAAM,cAAc,QAAQ;;;;EAKlC,SAAS,QAAQ;;;YAIP;EACV;EACA;EACA"}
1
+ {"version":3,"file":"file-health-checker.contract.d.mts","names":[],"sources":["../../../../../../../../../packages/core/src/dev-server/health-checker/file-health-checker.contract.ts"],"mappings":";;;YAGY;EACV;EACA;IACE;IACA;;EAEF;IACE;IACA;;EAEF;IACE;IACA;;;iBAIa;;;;EAIf;;;;;;;;;;;;;;EAeA;;;;;EAMA;;EAGA,oBAAoB;;;;EAKpB,cAAc,OAAO,gBAAgB;;;;EAKrC,WAAW,MAAM;;;;EAKjB,MAAM,MAAM,cAAc,QAAQ;;;;EAKlC,SAAS,QAAQ;;;YAIP;EACV;;EAEA;EACA"}
@@ -1,5 +1,4 @@
1
- import path from "path";
2
- import fs from "fs";
1
+ import { hasEslint } from "../eslint-support.mjs";
3
2
  import { ESLint } from "eslint";
4
3
  import { parentPort, workerData } from "worker_threads";
5
4
 
@@ -32,15 +31,7 @@ var ESLintHealthWorker = class {
32
31
  initialize(config) {
33
32
  try {
34
33
  this.cwd = config.cwd || process.cwd();
35
- const flatConfigExtensions = [
36
- "js",
37
- "mjs",
38
- "cjs",
39
- "ts",
40
- "mts",
41
- "cts"
42
- ];
43
- this.hasConfig = flatConfigExtensions.some((extension) => fs.existsSync(path.join(this.cwd, `eslint.config.${extension}`)));
34
+ this.hasConfig = hasEslint(this.cwd);
44
35
  if (!this.hasConfig) {
45
36
  this.initialized = true;
46
37
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"eslint-health.worker.mjs","names":[],"sources":["../../../../../../../../../../packages/core/src/dev-server/health-checker/workers/eslint-health.worker.ts"],"sourcesContent":["/**\n * ESLint Health Check Worker\n *\n * This worker runs in a dedicated thread to perform ESLint linting\n * without blocking the main dev server thread. It maintains a persistent\n * ESLint instance for efficient linting.\n *\n * Communication:\n * - Receives: { type: 'init' | 'check' | 'shutdown', ... }\n * - Sends: { type: 'results' | 'initialized' | 'error', ... }\n */\nimport { ESLint } from \"eslint\";\nimport fs from \"fs\";\nimport path from \"path\";\nimport { parentPort, workerData } from \"worker_threads\";\n\n/**\n * Serialized file data received from main thread\n */\ntype SerializedFile = {\n /** Absolute file path */\n path: string;\n /** File content (source code) */\n content: string;\n /** Relative path for display */\n relativePath: string;\n};\n\n/**\n * Lint message sent back to main thread\n */\ntype LintMessage = {\n type: \"error\" | \"warning\";\n message: string;\n lineNumber: number;\n columnNumber: number;\n length: number;\n filePath: string;\n relativePath: string;\n ruleId?: string;\n};\n\n/**\n * Health check result for a single file\n */\ntype FileCheckResult = {\n path: string;\n relativePath: string;\n healthy: boolean;\n errors: LintMessage[];\n warnings: LintMessage[];\n};\n\n/**\n * Messages received from main thread\n */\n/**\n * Deleted file info\n */\ntype DeletedFile = {\n path: string;\n relativePath: string;\n};\n\n/**\n * Messages received from main thread\n */\ntype WorkerMessage =\n | { type: \"init\"; config: { cwd: string } }\n | { type: \"check\"; files: SerializedFile[] }\n | { type: \"filesDeleted\"; files: DeletedFile[] }\n | { type: \"shutdown\" };\n\n/**\n * Messages sent to main thread\n */\ntype WorkerResponse =\n | { type: \"initialized\"; success: boolean; hasConfig: boolean; error?: string }\n | { type: \"results\"; results: FileCheckResult[] }\n | { type: \"error\"; message: string };\n\n/**\n * ESLint Health Worker class\n * Maintains persistent ESLint instance for efficient linting\n */\nclass ESLintHealthWorker {\n /**\n * ESLint instance\n */\n private eslint: ESLint | null = null;\n\n /**\n * Whether the worker is initialized\n */\n private initialized = false;\n\n /**\n * Whether ESLint config was found\n */\n private hasConfig = false;\n\n /**\n * Current working directory\n */\n private cwd: string = process.cwd();\n\n /**\n * Initialize the worker with ESLint configuration\n */\n public initialize(config: { cwd: string }): { success: boolean; hasConfig: boolean } {\n try {\n this.cwd = config.cwd || process.cwd();\n\n // Check if ESLint flat config exists\n // (.ts/.mts/.cts are supported since ESLint 9.18)\n const flatConfigExtensions = [\"js\", \"mjs\", \"cjs\", \"ts\", \"mts\", \"cts\"];\n\n this.hasConfig = flatConfigExtensions.some((extension) =>\n fs.existsSync(path.join(this.cwd, `eslint.config.${extension}`)),\n );\n\n if (!this.hasConfig) {\n this.initialized = true;\n return { success: true, hasConfig: false };\n }\n\n // Create ESLint instance with flat config\n this.eslint = new ESLint({\n cwd: this.cwd,\n });\n\n this.initialized = true;\n return { success: true, hasConfig: true };\n } catch (error) {\n console.error(\"ESLint Worker: Failed to initialize:\", error);\n this.initialized = true;\n return { success: false, hasConfig: false };\n }\n }\n\n /**\n * Check files for ESLint errors\n */\n public async checkFiles(files: SerializedFile[]): Promise<FileCheckResult[]> {\n if (!this.eslint || !this.hasConfig) {\n // No ESLint config, return all files as healthy\n return files.map((file) => ({\n path: file.path,\n relativePath: file.relativePath,\n healthy: true,\n errors: [],\n warnings: [],\n }));\n }\n\n const results: FileCheckResult[] = [];\n\n for (const file of files) {\n // Only lint lintable files\n if (!this.isLintableFile(file.path)) {\n results.push({\n path: file.path,\n relativePath: file.relativePath,\n healthy: true,\n errors: [],\n warnings: [],\n });\n continue;\n }\n\n try {\n const result = await this.checkSingleFile(file);\n results.push(result);\n } catch (error) {\n // On error, mark as healthy to avoid blocking\n results.push({\n path: file.path,\n relativePath: file.relativePath,\n healthy: true,\n errors: [],\n warnings: [],\n });\n }\n }\n\n return results;\n }\n\n /**\n * Check a single file for lint issues\n */\n private async checkSingleFile(file: SerializedFile): Promise<FileCheckResult> {\n if (!this.eslint) {\n return {\n path: file.path,\n relativePath: file.relativePath,\n healthy: true,\n errors: [],\n warnings: [],\n };\n }\n\n // Use lintText to lint from memory (not disk)\n const lintResults = await this.eslint.lintText(file.content, {\n filePath: file.path,\n });\n\n const lintResult = lintResults[0];\n\n if (!lintResult) {\n return {\n path: file.path,\n relativePath: file.relativePath,\n healthy: true,\n errors: [],\n warnings: [],\n };\n }\n\n const errors: LintMessage[] = [];\n const warnings: LintMessage[] = [];\n\n for (const message of lintResult.messages) {\n const lintMessage: LintMessage = {\n type: message.severity === 2 ? \"error\" : \"warning\",\n message: message.message,\n lineNumber: message.line || 1,\n columnNumber: message.column || 1,\n length: message.endColumn && message.column ? message.endColumn - message.column : 1,\n filePath: file.path,\n relativePath: file.relativePath,\n ruleId: message.ruleId || undefined,\n };\n\n if (message.severity === 2) {\n errors.push(lintMessage);\n } else if (message.severity === 1) {\n warnings.push(lintMessage);\n }\n }\n\n return {\n path: file.path,\n relativePath: file.relativePath,\n healthy: errors.length === 0 && warnings.length === 0,\n errors,\n warnings,\n };\n }\n\n /**\n * Check if file is a lintable file\n */\n private isLintableFile(filePath: string): boolean {\n const ext = filePath.toLowerCase();\n return (\n ext.endsWith(\".ts\") || ext.endsWith(\".tsx\") || ext.endsWith(\".js\") || ext.endsWith(\".jsx\")\n );\n }\n}\n\n// Create worker instance\nconst worker = new ESLintHealthWorker();\n\n// Handle messages from main thread\nparentPort?.on(\"message\", async (message: WorkerMessage) => {\n try {\n switch (message.type) {\n case \"init\": {\n const initResult = worker.initialize(message.config);\n const response: WorkerResponse = {\n type: \"initialized\",\n success: initResult.success,\n hasConfig: initResult.hasConfig,\n };\n parentPort?.postMessage(response);\n break;\n }\n\n case \"check\": {\n const results = await worker.checkFiles(message.files);\n const response: WorkerResponse = { type: \"results\", results };\n parentPort?.postMessage(response);\n break;\n }\n\n case \"filesDeleted\": {\n // ESLint doesn't maintain internal file cache (lints from memory)\n // No cleanup needed, just acknowledge\n break;\n }\n\n case \"shutdown\": {\n process.exit(0);\n }\n }\n } catch (error) {\n const response: WorkerResponse = {\n type: \"error\",\n message: error instanceof Error ? error.message : String(error),\n };\n parentPort?.postMessage(response);\n }\n});\n\n// Handle initialization from workerData if provided\nif (workerData?.autoInit) {\n worker.initialize({ cwd: workerData.cwd || process.cwd() });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqFA,IAAM,qBAAN,MAAyB;;gBAIS;qBAKV;mBAKF;aAKE,QAAQ,IAAI;;;;;CAKlC,AAAO,WAAW,QAAmE;EACnF,IAAI;GACF,KAAK,MAAM,OAAO,OAAO,QAAQ,IAAI;GAIrC,MAAM,uBAAuB;IAAC;IAAM;IAAO;IAAO;IAAM;IAAO;GAAK;GAEpE,KAAK,YAAY,qBAAqB,MAAM,cAC1C,GAAG,WAAW,KAAK,KAAK,KAAK,KAAK,iBAAiB,WAAW,CAAC,CACjE;GAEA,IAAI,CAAC,KAAK,WAAW;IACnB,KAAK,cAAc;IACnB,OAAO;KAAE,SAAS;KAAM,WAAW;IAAM;GAC3C;GAGA,KAAK,SAAS,IAAI,OAAO,EACvB,KAAK,KAAK,IACZ,CAAC;GAED,KAAK,cAAc;GACnB,OAAO;IAAE,SAAS;IAAM,WAAW;GAAK;EAC1C,SAAS,OAAO;GACd,QAAQ,MAAM,wCAAwC,KAAK;GAC3D,KAAK,cAAc;GACnB,OAAO;IAAE,SAAS;IAAO,WAAW;GAAM;EAC5C;CACF;;;;CAKA,MAAa,WAAW,OAAqD;EAC3E,IAAI,CAAC,KAAK,UAAU,CAAC,KAAK,WAExB,OAAO,MAAM,KAAK,UAAU;GAC1B,MAAM,KAAK;GACX,cAAc,KAAK;GACnB,SAAS;GACT,QAAQ,CAAC;GACT,UAAU,CAAC;EACb,EAAE;EAGJ,MAAM,UAA6B,CAAC;EAEpC,KAAK,MAAM,QAAQ,OAAO;GAExB,IAAI,CAAC,KAAK,eAAe,KAAK,IAAI,GAAG;IACnC,QAAQ,KAAK;KACX,MAAM,KAAK;KACX,cAAc,KAAK;KACnB,SAAS;KACT,QAAQ,CAAC;KACT,UAAU,CAAC;IACb,CAAC;IACD;GACF;GAEA,IAAI;IACF,MAAM,SAAS,MAAM,KAAK,gBAAgB,IAAI;IAC9C,QAAQ,KAAK,MAAM;GACrB,SAAS,OAAO;IAEd,QAAQ,KAAK;KACX,MAAM,KAAK;KACX,cAAc,KAAK;KACnB,SAAS;KACT,QAAQ,CAAC;KACT,UAAU,CAAC;IACb,CAAC;GACH;EACF;EAEA,OAAO;CACT;;;;CAKA,MAAc,gBAAgB,MAAgD;EAC5E,IAAI,CAAC,KAAK,QACR,OAAO;GACL,MAAM,KAAK;GACX,cAAc,KAAK;GACnB,SAAS;GACT,QAAQ,CAAC;GACT,UAAU,CAAC;EACb;EAQF,MAAM,cAAa,MAJO,KAAK,OAAO,SAAS,KAAK,SAAS,EAC3D,UAAU,KAAK,KACjB,CAAC,EAE6B,CAAC;EAE/B,IAAI,CAAC,YACH,OAAO;GACL,MAAM,KAAK;GACX,cAAc,KAAK;GACnB,SAAS;GACT,QAAQ,CAAC;GACT,UAAU,CAAC;EACb;EAGF,MAAM,SAAwB,CAAC;EAC/B,MAAM,WAA0B,CAAC;EAEjC,KAAK,MAAM,WAAW,WAAW,UAAU;GACzC,MAAM,cAA2B;IAC/B,MAAM,QAAQ,aAAa,IAAI,UAAU;IACzC,SAAS,QAAQ;IACjB,YAAY,QAAQ,QAAQ;IAC5B,cAAc,QAAQ,UAAU;IAChC,QAAQ,QAAQ,aAAa,QAAQ,SAAS,QAAQ,YAAY,QAAQ,SAAS;IACnF,UAAU,KAAK;IACf,cAAc,KAAK;IACnB,QAAQ,QAAQ,UAAU;GAC5B;GAEA,IAAI,QAAQ,aAAa,GACvB,OAAO,KAAK,WAAW;QAClB,IAAI,QAAQ,aAAa,GAC9B,SAAS,KAAK,WAAW;EAE7B;EAEA,OAAO;GACL,MAAM,KAAK;GACX,cAAc,KAAK;GACnB,SAAS,OAAO,WAAW,KAAK,SAAS,WAAW;GACpD;GACA;EACF;CACF;;;;CAKA,AAAQ,eAAe,UAA2B;EAChD,MAAM,MAAM,SAAS,YAAY;EACjC,OACE,IAAI,SAAS,KAAK,KAAK,IAAI,SAAS,MAAM,KAAK,IAAI,SAAS,KAAK,KAAK,IAAI,SAAS,MAAM;CAE7F;AACF;AAGA,MAAM,SAAS,IAAI,mBAAmB;AAGtC,YAAY,GAAG,WAAW,OAAO,YAA2B;CAC1D,IAAI;EACF,QAAQ,QAAQ,MAAhB;GACE,KAAK,QAAQ;IACX,MAAM,aAAa,OAAO,WAAW,QAAQ,MAAM;IACnD,MAAM,WAA2B;KAC/B,MAAM;KACN,SAAS,WAAW;KACpB,WAAW,WAAW;IACxB;IACA,YAAY,YAAY,QAAQ;IAChC;GACF;GAEA,KAAK,SAAS;IAEZ,MAAM,WAA2B;KAAE,MAAM;KAAW,eAD9B,OAAO,WAAW,QAAQ,KAAK;IACO;IAC5D,YAAY,YAAY,QAAQ;IAChC;GACF;GAEA,KAAK,gBAGH;GAGF,KAAK,YACH,QAAQ,KAAK,CAAC;EAElB;CACF,SAAS,OAAO;EACd,MAAM,WAA2B;GAC/B,MAAM;GACN,SAAS,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;EAChE;EACA,YAAY,YAAY,QAAQ;CAClC;AACF,CAAC;AAGD,IAAI,YAAY,UACd,OAAO,WAAW,EAAE,KAAK,WAAW,OAAO,QAAQ,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"eslint-health.worker.mjs","names":[],"sources":["../../../../../../../../../../packages/core/src/dev-server/health-checker/workers/eslint-health.worker.ts"],"sourcesContent":["/**\n * ESLint Health Check Worker\n *\n * This worker runs in a dedicated thread to perform ESLint linting\n * without blocking the main dev server thread. It maintains a persistent\n * ESLint instance for efficient linting.\n *\n * Communication:\n * - Receives: { type: 'init' | 'check' | 'shutdown', ... }\n * - Sends: { type: 'results' | 'initialized' | 'error', ... }\n */\nimport { ESLint } from \"eslint\";\nimport { parentPort, workerData } from \"worker_threads\";\nimport { hasEslint } from \"../eslint-support\";\n\n/**\n * Serialized file data received from main thread\n */\ntype SerializedFile = {\n /** Absolute file path */\n path: string;\n /** File content (source code) */\n content: string;\n /** Relative path for display */\n relativePath: string;\n};\n\n/**\n * Lint message sent back to main thread\n */\ntype LintMessage = {\n type: \"error\" | \"warning\";\n message: string;\n lineNumber: number;\n columnNumber: number;\n length: number;\n filePath: string;\n relativePath: string;\n ruleId?: string;\n};\n\n/**\n * Health check result for a single file\n */\ntype FileCheckResult = {\n path: string;\n relativePath: string;\n healthy: boolean;\n errors: LintMessage[];\n warnings: LintMessage[];\n};\n\n/**\n * Messages received from main thread\n */\n/**\n * Deleted file info\n */\ntype DeletedFile = {\n path: string;\n relativePath: string;\n};\n\n/**\n * Messages received from main thread\n */\ntype WorkerMessage =\n | { type: \"init\"; config: { cwd: string } }\n | { type: \"check\"; files: SerializedFile[] }\n | { type: \"filesDeleted\"; files: DeletedFile[] }\n | { type: \"shutdown\" };\n\n/**\n * Messages sent to main thread\n */\ntype WorkerResponse =\n | { type: \"initialized\"; success: boolean; hasConfig: boolean; error?: string }\n | { type: \"results\"; results: FileCheckResult[] }\n | { type: \"error\"; message: string };\n\n/**\n * ESLint Health Worker class\n * Maintains persistent ESLint instance for efficient linting\n */\nclass ESLintHealthWorker {\n /**\n * ESLint instance\n */\n private eslint: ESLint | null = null;\n\n /**\n * Whether the worker is initialized\n */\n private initialized = false;\n\n /**\n * Whether ESLint config was found\n */\n private hasConfig = false;\n\n /**\n * Current working directory\n */\n private cwd: string = process.cwd();\n\n /**\n * Initialize the worker with ESLint configuration\n */\n public initialize(config: { cwd: string }): { success: boolean; hasConfig: boolean } {\n try {\n this.cwd = config.cwd || process.cwd();\n\n // The main-thread checker emits the one-time deprecation warning.\n this.hasConfig = hasEslint(this.cwd);\n\n if (!this.hasConfig) {\n this.initialized = true;\n return { success: true, hasConfig: false };\n }\n\n // Create ESLint instance with flat config\n this.eslint = new ESLint({\n cwd: this.cwd,\n });\n\n this.initialized = true;\n return { success: true, hasConfig: true };\n } catch (error) {\n console.error(\"ESLint Worker: Failed to initialize:\", error);\n this.initialized = true;\n return { success: false, hasConfig: false };\n }\n }\n\n /**\n * Check files for ESLint errors\n */\n public async checkFiles(files: SerializedFile[]): Promise<FileCheckResult[]> {\n if (!this.eslint || !this.hasConfig) {\n // No ESLint config, return all files as healthy\n return files.map((file) => ({\n path: file.path,\n relativePath: file.relativePath,\n healthy: true,\n errors: [],\n warnings: [],\n }));\n }\n\n const results: FileCheckResult[] = [];\n\n for (const file of files) {\n // Only lint lintable files\n if (!this.isLintableFile(file.path)) {\n results.push({\n path: file.path,\n relativePath: file.relativePath,\n healthy: true,\n errors: [],\n warnings: [],\n });\n continue;\n }\n\n try {\n const result = await this.checkSingleFile(file);\n results.push(result);\n } catch (error) {\n // On error, mark as healthy to avoid blocking\n results.push({\n path: file.path,\n relativePath: file.relativePath,\n healthy: true,\n errors: [],\n warnings: [],\n });\n }\n }\n\n return results;\n }\n\n /**\n * Check a single file for lint issues\n */\n private async checkSingleFile(file: SerializedFile): Promise<FileCheckResult> {\n if (!this.eslint) {\n return {\n path: file.path,\n relativePath: file.relativePath,\n healthy: true,\n errors: [],\n warnings: [],\n };\n }\n\n // Use lintText to lint from memory (not disk)\n const lintResults = await this.eslint.lintText(file.content, {\n filePath: file.path,\n });\n\n const lintResult = lintResults[0];\n\n if (!lintResult) {\n return {\n path: file.path,\n relativePath: file.relativePath,\n healthy: true,\n errors: [],\n warnings: [],\n };\n }\n\n const errors: LintMessage[] = [];\n const warnings: LintMessage[] = [];\n\n for (const message of lintResult.messages) {\n const lintMessage: LintMessage = {\n type: message.severity === 2 ? \"error\" : \"warning\",\n message: message.message,\n lineNumber: message.line || 1,\n columnNumber: message.column || 1,\n length: message.endColumn && message.column ? message.endColumn - message.column : 1,\n filePath: file.path,\n relativePath: file.relativePath,\n ruleId: message.ruleId || undefined,\n };\n\n if (message.severity === 2) {\n errors.push(lintMessage);\n } else if (message.severity === 1) {\n warnings.push(lintMessage);\n }\n }\n\n return {\n path: file.path,\n relativePath: file.relativePath,\n healthy: errors.length === 0 && warnings.length === 0,\n errors,\n warnings,\n };\n }\n\n /**\n * Check if file is a lintable file\n */\n private isLintableFile(filePath: string): boolean {\n const ext = filePath.toLowerCase();\n return (\n ext.endsWith(\".ts\") || ext.endsWith(\".tsx\") || ext.endsWith(\".js\") || ext.endsWith(\".jsx\")\n );\n }\n}\n\n// Create worker instance\nconst worker = new ESLintHealthWorker();\n\n// Handle messages from main thread\nparentPort?.on(\"message\", async (message: WorkerMessage) => {\n try {\n switch (message.type) {\n case \"init\": {\n const initResult = worker.initialize(message.config);\n const response: WorkerResponse = {\n type: \"initialized\",\n success: initResult.success,\n hasConfig: initResult.hasConfig,\n };\n parentPort?.postMessage(response);\n break;\n }\n\n case \"check\": {\n const results = await worker.checkFiles(message.files);\n const response: WorkerResponse = { type: \"results\", results };\n parentPort?.postMessage(response);\n break;\n }\n\n case \"filesDeleted\": {\n // ESLint doesn't maintain internal file cache (lints from memory)\n // No cleanup needed, just acknowledge\n break;\n }\n\n case \"shutdown\": {\n process.exit(0);\n }\n }\n } catch (error) {\n const response: WorkerResponse = {\n type: \"error\",\n message: error instanceof Error ? error.message : String(error),\n };\n parentPort?.postMessage(response);\n }\n});\n\n// Handle initialization from workerData if provided\nif (workerData?.autoInit) {\n worker.initialize({ cwd: workerData.cwd || process.cwd() });\n}\n"],"mappings":"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"}
@@ -19,6 +19,7 @@ import { mongodbFeature } from "./mongodb.feature.mjs";
19
19
  import { mysqlFeature } from "./mysql.feature.mjs";
20
20
  import { notificationsFeature } from "./notifications.feature.mjs";
21
21
  import { postgresFeature } from "./postgres.feature.mjs";
22
+ import { processFeature } from "./process.feature.mjs";
22
23
  import { queueFeature } from "./queue.feature.mjs";
23
24
  import { reactEmailFeature } from "./react-email.feature.mjs";
24
25
  import { reactFeature } from "./react.feature.mjs";
@@ -60,6 +61,7 @@ const featuresMap = {
60
61
  shadcn: shadcnFeature,
61
62
  sitemap: sitemapFeature,
62
63
  devtools: devtoolsFeature,
64
+ process: processFeature,
63
65
  herald: heraldFeature,
64
66
  queue: queueFeature,
65
67
  "bull-board": bullBoardFeature,
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/generations/features/index.ts"],"sourcesContent":["import { accessFeature } from \"./access.feature\";\nimport { aiAnthropicFeature } from \"./ai-anthropic.feature\";\nimport { aiBedrockFeature } from \"./ai-bedrock.feature\";\nimport { aiGoogleFeature } from \"./ai-google.feature\";\nimport { aiOllamaFeature } from \"./ai-ollama.feature\";\nimport { aiOpenaiFeature } from \"./ai-openai.feature\";\nimport { aiPanopticFeature } from \"./ai-panoptic.feature\";\nimport { aiToolsFeature } from \"./ai-tools.feature\";\nimport { aiWorkspaceFeature } from \"./ai-workspace.feature\";\nimport { aiFeature } from \"./ai.feature\";\nimport { authGoogleFeature } from \"./auth-google.feature\";\nimport { authPasskeysFeature } from \"./auth-passkeys.feature\";\nimport { bullBoardFeature } from \"./bull-board.feature\";\nimport { devtoolsFeature } from \"./devtools.feature\";\nimport { heraldFeature } from \"./herald.feature\";\nimport { imageFeature } from \"./image.feature\";\nimport { mailFeature } from \"./mail.feature\";\nimport { mongodbFeature } from \"./mongodb.feature\";\nimport { mysqlFeature } from \"./mysql.feature\";\nimport { notificationsFeature } from \"./notifications.feature\";\nimport { postgresFeature } from \"./postgres.feature\";\nimport { queueFeature } from \"./queue.feature\";\nimport { reactEmailFeature } from \"./react-email.feature\";\nimport { reactFeature } from \"./react.feature\";\nimport { redisFeature } from \"./redis.feature\";\nimport { s3Feature } from \"./s3.feature\";\nimport { schedulerFeature } from \"./scheduler.feature\";\nimport { sesFeature } from \"./ses.feature\";\nimport { shadcnFeature } from \"./shadcn.feature\";\nimport { sitemapFeature } from \"./sitemap.feature\";\nimport { socketFeature } from \"./socket.feature\";\nimport { tailwindFeature } from \"./tailwind.feature\";\nimport { testFeature } from \"./test.feature\";\nimport type { FeatureDefinition } from \"./types\";\nimport { webFeature } from \"./web.feature\";\n\nexport type { FeatureDefinition } from \"./types\";\n\n/**\n * The feature registry `warlock add` dispatches against.\n *\n * This file is an INDEX, nothing more: every entry lives in its own module\n * alongside the `onExecuting` body it runs. Key order is load-bearing — it is\n * the order `--list` prints and the order the \"not allowed\" error lists — so\n * add new features in the place they should appear, not alphabetically.\n */\nexport const featuresMap: Record<string, FeatureDefinition> = {\n \"react-email\": reactEmailFeature,\n react: reactFeature,\n image: imageFeature,\n mail: mailFeature,\n ses: sesFeature,\n mongodb: mongodbFeature,\n scheduler: schedulerFeature,\n // swagger / postman intentionally omitted — those packages do not exist yet;\n // they will ship together in the unified @warlock.js/api-docs package.\n postgres: postgresFeature,\n mysql: mysqlFeature,\n redis: redisFeature,\n s3: s3Feature,\n test: testFeature,\n web: webFeature,\n // Directly after `web`, and only there: it `requires` it, it is useless\n // without it, and a reader scanning `--list` for the page stack should meet\n // the two together rather than find styling filed between queues and sockets.\n tailwind: tailwindFeature,\n // Immediately after `tailwind`, for the same reason `tailwind` follows `web`:\n // it `requires` it, it appends to the stylesheet that feature creates, and the\n // three of them are one stack a reader should meet in build order.\n shadcn: shadcnFeature,\n // Directly after the web/tailwind/shadcn stack, for the same reason: it\n // `requires` web (it reads the page registry `listRoutablePages()`\n // exposes) and a reader scanning `--list` for the page stack should meet it\n // there rather than filed between queues and sockets.\n sitemap: sitemapFeature,\n devtools: devtoolsFeature,\n herald: heraldFeature,\n queue: queueFeature,\n // Directly after `queue`, for the same reason `tailwind` follows `web`: it\n // needs queue already installed and configured, and a reader scanning\n // `--list` for job-queue features should meet the two together.\n \"bull-board\": bullBoardFeature,\n socket: socketFeature,\n notifications: notificationsFeature,\n access: accessFeature,\n // Login methods for @warlock.js/auth — \"<package>-<vendor>\" like the ai-* entries.\n \"auth-google\": authGoogleFeature,\n \"auth-passkeys\": authPasskeysFeature,\n ai: aiFeature,\n \"ai-openai\": aiOpenaiFeature,\n \"ai-google\": aiGoogleFeature,\n \"ai-anthropic\": aiAnthropicFeature,\n \"ai-bedrock\": aiBedrockFeature,\n \"ai-ollama\": aiOllamaFeature,\n \"ai-tools\": aiToolsFeature,\n \"ai-panoptic\": aiPanopticFeature,\n \"ai-workspace\": aiWorkspaceFeature,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,MAAa,cAAiD;CAC5D,eAAe;CACf,OAAO;CACP,OAAO;CACP,MAAM;CACN,KAAK;CACL,SAAS;CACT,WAAW;CAGX,UAAU;CACV,OAAO;CACP,OAAO;CACP,IAAI;CACJ,MAAM;CACN,KAAK;CAIL,UAAU;CAIV,QAAQ;CAKR,SAAS;CACT,UAAU;CACV,QAAQ;CACR,OAAO;CAIP,cAAc;CACd,QAAQ;CACR,eAAe;CACf,QAAQ;CAER,eAAe;CACf,iBAAiB;CACjB,IAAI;CACJ,aAAa;CACb,aAAa;CACb,gBAAgB;CAChB,cAAc;CACd,aAAa;CACb,YAAY;CACZ,eAAe;CACf,gBAAgB;AAClB"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/generations/features/index.ts"],"sourcesContent":["import { accessFeature } from \"./access.feature\";\nimport { aiAnthropicFeature } from \"./ai-anthropic.feature\";\nimport { aiBedrockFeature } from \"./ai-bedrock.feature\";\nimport { aiGoogleFeature } from \"./ai-google.feature\";\nimport { aiOllamaFeature } from \"./ai-ollama.feature\";\nimport { aiOpenaiFeature } from \"./ai-openai.feature\";\nimport { aiPanopticFeature } from \"./ai-panoptic.feature\";\nimport { aiToolsFeature } from \"./ai-tools.feature\";\nimport { aiWorkspaceFeature } from \"./ai-workspace.feature\";\nimport { aiFeature } from \"./ai.feature\";\nimport { authGoogleFeature } from \"./auth-google.feature\";\nimport { authPasskeysFeature } from \"./auth-passkeys.feature\";\nimport { bullBoardFeature } from \"./bull-board.feature\";\nimport { devtoolsFeature } from \"./devtools.feature\";\nimport { heraldFeature } from \"./herald.feature\";\nimport { imageFeature } from \"./image.feature\";\nimport { mailFeature } from \"./mail.feature\";\nimport { mongodbFeature } from \"./mongodb.feature\";\nimport { mysqlFeature } from \"./mysql.feature\";\nimport { notificationsFeature } from \"./notifications.feature\";\nimport { postgresFeature } from \"./postgres.feature\";\nimport { processFeature } from \"./process.feature\";\nimport { queueFeature } from \"./queue.feature\";\nimport { reactEmailFeature } from \"./react-email.feature\";\nimport { reactFeature } from \"./react.feature\";\nimport { redisFeature } from \"./redis.feature\";\nimport { s3Feature } from \"./s3.feature\";\nimport { schedulerFeature } from \"./scheduler.feature\";\nimport { sesFeature } from \"./ses.feature\";\nimport { shadcnFeature } from \"./shadcn.feature\";\nimport { sitemapFeature } from \"./sitemap.feature\";\nimport { socketFeature } from \"./socket.feature\";\nimport { tailwindFeature } from \"./tailwind.feature\";\nimport { testFeature } from \"./test.feature\";\nimport type { FeatureDefinition } from \"./types\";\nimport { webFeature } from \"./web.feature\";\n\nexport type { FeatureDefinition } from \"./types\";\n\n/**\n * The feature registry `warlock add` dispatches against.\n *\n * This file is an INDEX, nothing more: every entry lives in its own module\n * alongside the `onExecuting` body it runs. Key order is load-bearing — it is\n * the order `--list` prints and the order the \"not allowed\" error lists — so\n * add new features in the place they should appear, not alphabetically.\n */\nexport const featuresMap: Record<string, FeatureDefinition> = {\n \"react-email\": reactEmailFeature,\n react: reactFeature,\n image: imageFeature,\n mail: mailFeature,\n ses: sesFeature,\n mongodb: mongodbFeature,\n scheduler: schedulerFeature,\n // swagger / postman intentionally omitted — those packages do not exist yet;\n // they will ship together in the unified @warlock.js/api-docs package.\n postgres: postgresFeature,\n mysql: mysqlFeature,\n redis: redisFeature,\n s3: s3Feature,\n test: testFeature,\n web: webFeature,\n // Directly after `web`, and only there: it `requires` it, it is useless\n // without it, and a reader scanning `--list` for the page stack should meet\n // the two together rather than find styling filed between queues and sockets.\n tailwind: tailwindFeature,\n // Immediately after `tailwind`, for the same reason `tailwind` follows `web`:\n // it `requires` it, it appends to the stylesheet that feature creates, and the\n // three of them are one stack a reader should meet in build order.\n shadcn: shadcnFeature,\n // Directly after the web/tailwind/shadcn stack, for the same reason: it\n // `requires` web (it reads the page registry `listRoutablePages()`\n // exposes) and a reader scanning `--list` for the page stack should meet it\n // there rather than filed between queues and sockets.\n sitemap: sitemapFeature,\n devtools: devtoolsFeature,\n process: processFeature,\n herald: heraldFeature,\n queue: queueFeature,\n // Directly after `queue`, for the same reason `tailwind` follows `web`: it\n // needs queue already installed and configured, and a reader scanning\n // `--list` for job-queue features should meet the two together.\n \"bull-board\": bullBoardFeature,\n socket: socketFeature,\n notifications: notificationsFeature,\n access: accessFeature,\n // Login methods for @warlock.js/auth — \"<package>-<vendor>\" like the ai-* entries.\n \"auth-google\": authGoogleFeature,\n \"auth-passkeys\": authPasskeysFeature,\n ai: aiFeature,\n \"ai-openai\": aiOpenaiFeature,\n \"ai-google\": aiGoogleFeature,\n \"ai-anthropic\": aiAnthropicFeature,\n \"ai-bedrock\": aiBedrockFeature,\n \"ai-ollama\": aiOllamaFeature,\n \"ai-tools\": aiToolsFeature,\n \"ai-panoptic\": aiPanopticFeature,\n \"ai-workspace\": aiWorkspaceFeature,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,MAAa,cAAiD;CAC5D,eAAe;CACf,OAAO;CACP,OAAO;CACP,MAAM;CACN,KAAK;CACL,SAAS;CACT,WAAW;CAGX,UAAU;CACV,OAAO;CACP,OAAO;CACP,IAAI;CACJ,MAAM;CACN,KAAK;CAIL,UAAU;CAIV,QAAQ;CAKR,SAAS;CACT,UAAU;CACV,SAAS;CACT,QAAQ;CACR,OAAO;CAIP,cAAc;CACd,QAAQ;CACR,eAAe;CACf,QAAQ;CAER,eAAe;CACf,iBAAiB;CACjB,IAAI;CACJ,aAAa;CACb,aAAa;CACb,gBAAgB;CAChB,cAAc;CACd,aAAa;CACb,YAAY;CACZ,eAAe;CACf,gBAAgB;AAClB"}
@@ -0,0 +1,65 @@
1
+ import { srcPath } from "../../utils/paths.mjs";
2
+ import "../../utils/index.mjs";
3
+ import { recordSkippedFile } from "../generation-run.mjs";
4
+ import { fileExistsAsync, getFileAsync, putFileAsync } from "../generation-fs.mjs";
5
+ import { INSTALLED_WARLOCK_VERSION } from "./types.mjs";
6
+
7
+ //#region ../../packages/core/src/generations/features/process.feature.ts
8
+ const processConfig = `import { rootPath } from "@warlock.js/core";
9
+ import type { SupervisorOptions } from "@warlock.js/process";
10
+
11
+ const processConfig = {
12
+ owner: "app",
13
+ registry: rootPath("storage/processes/registry.json"),
14
+ defaults: { timeoutMs: 300_000, memoryBytes: 512 * 1024 * 1024 },
15
+ } satisfies SupervisorOptions;
16
+
17
+ export default processConfig;
18
+ `;
19
+ const processes = `import { supervisor } from "@warlock.js/process";
20
+ import processConfig from "../../config/process";
21
+
22
+ export const processes = supervisor(processConfig);
23
+ `;
24
+ const lifecycle = `import { Application } from "@warlock.js/core";
25
+ import { processes } from "./index";
26
+
27
+ Application.onValidateBoot(async () => {
28
+ await processes.recover();
29
+ });
30
+ Application.onShutdown(async () => {
31
+ await processes.stopAll();
32
+ });
33
+ `;
34
+ async function createOnce(file, content) {
35
+ if (await fileExistsAsync(file)) {
36
+ recordSkippedFile(file, "exists");
37
+ return;
38
+ }
39
+ await putFileAsync(file, content);
40
+ }
41
+ const processFeature = {
42
+ description: "App-owned processes and terminals; creates typed config, recovery and graceful shutdown hooks, and a development process panel.",
43
+ dependencies: { "@warlock.js/process": INSTALLED_WARLOCK_VERSION },
44
+ ejectConfig: {
45
+ name: "process",
46
+ content: processConfig
47
+ },
48
+ async onExecuting() {
49
+ await createOnce(srcPath("app/processes/index.ts"), processes);
50
+ await createOnce(srcPath("app/processes/lifecycle.ts"), lifecycle);
51
+ const main = srcPath("app/main.ts");
52
+ const content = await fileExistsAsync(main) ? await getFileAsync(main) : "";
53
+ if (!/import\s*["']\.\/processes\/lifecycle["']/.test(content)) await putFileAsync(main, `import "./processes/lifecycle";\n${content}`);
54
+ else recordSkippedFile(main, "exists");
55
+ await createOnce(srcPath("app/processes/devtools.ts"), `import { processes } from "./index";
56
+
57
+ export const processPanel = { list: () => processes.list() };
58
+ `);
59
+ console.log("Process supervision configured. Next: set a unique owner and registry per app instance in src/config/process.ts, then import { processes } from your app/processes module and await processes.spawn(...). Install devtools with warlock add devtools to view the Processes panel. Install node-pty separately for spawnPty(). macOS also needs the shipped identity helper compiled and WARLOCK_PROCESS_IDENTITY_HELPER configured; see the process package README.");
60
+ }
61
+ };
62
+
63
+ //#endregion
64
+ export { processFeature };
65
+ //# sourceMappingURL=process.feature.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"process.feature.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/generations/features/process.feature.ts"],"sourcesContent":["import { srcPath } from \"../../utils\";\nimport { fileExistsAsync, getFileAsync, putFileAsync, recordSkippedFile } from \"../generation-fs\";\nimport { type FeatureDefinition, INSTALLED_WARLOCK_VERSION } from \"./types\";\n\nconst processConfig = `import { rootPath } from \"@warlock.js/core\";\nimport type { SupervisorOptions } from \"@warlock.js/process\";\n\nconst processConfig = {\n owner: \"app\",\n registry: rootPath(\"storage/processes/registry.json\"),\n defaults: { timeoutMs: 300_000, memoryBytes: 512 * 1024 * 1024 },\n} satisfies SupervisorOptions;\n\nexport default processConfig;\n`;\n\nconst processes = `import { supervisor } from \"@warlock.js/process\";\nimport processConfig from \"../../config/process\";\n\nexport const processes = supervisor(processConfig);\n`;\n\nconst lifecycle = `import { Application } from \"@warlock.js/core\";\nimport { processes } from \"./index\";\n\nApplication.onValidateBoot(async () => {\n await processes.recover();\n});\nApplication.onShutdown(async () => {\n await processes.stopAll();\n});\n`;\n\nasync function createOnce(file: string, content: string): Promise<void> {\n if (await fileExistsAsync(file)) {\n recordSkippedFile(file, \"exists\");\n return;\n }\n await putFileAsync(file, content);\n}\n\nexport const processFeature: FeatureDefinition = {\n description:\n \"App-owned processes and terminals; creates typed config, recovery and graceful shutdown hooks, and a development process panel.\",\n dependencies: { \"@warlock.js/process\": INSTALLED_WARLOCK_VERSION },\n ejectConfig: { name: \"process\", content: processConfig },\n async onExecuting() {\n await createOnce(srcPath(\"app/processes/index.ts\"), processes);\n await createOnce(srcPath(\"app/processes/lifecycle.ts\"), lifecycle);\n const main = srcPath(\"app/main.ts\");\n const content = (await fileExistsAsync(main)) ? await getFileAsync(main) : \"\";\n if (!/import\\s*[\"']\\.\\/processes\\/lifecycle[\"']/.test(content)) {\n await putFileAsync(main, `import \"./processes/lifecycle\";\\n${content}`);\n } else recordSkippedFile(main, \"exists\");\n // Devtools discovers this source only in development and only when installed.\n await createOnce(\n srcPath(\"app/processes/devtools.ts\"),\n `import { processes } from \"./index\";\n\nexport const processPanel = { list: () => processes.list() };\n`,\n );\n console.log(\n \"Process supervision configured. Next: set a unique owner and registry per app instance in src/config/process.ts, then import { processes } from your app/processes module and await processes.spawn(...). Install devtools with warlock add devtools to view the Processes panel. Install node-pty separately for spawnPty(). macOS also needs the shipped identity helper compiled and WARLOCK_PROCESS_IDENTITY_HELPER configured; see the process package README.\",\n );\n },\n};\n"],"mappings":";;;;;;;AAIA,MAAM,gBAAgB;;;;;;;;;;;AAYtB,MAAM,YAAY;;;;;AAMlB,MAAM,YAAY;;;;;;;;;;AAWlB,eAAe,WAAW,MAAc,SAAgC;CACtE,IAAI,MAAM,gBAAgB,IAAI,GAAG;EAC/B,kBAAkB,MAAM,QAAQ;EAChC;CACF;CACA,MAAM,aAAa,MAAM,OAAO;AAClC;AAEA,MAAa,iBAAoC;CAC/C,aACE;CACF,cAAc,EAAE,uBAAuB,0BAA0B;CACjE,aAAa;EAAE,MAAM;EAAW,SAAS;CAAc;CACvD,MAAM,cAAc;EAClB,MAAM,WAAW,QAAQ,wBAAwB,GAAG,SAAS;EAC7D,MAAM,WAAW,QAAQ,4BAA4B,GAAG,SAAS;EACjE,MAAM,OAAO,QAAQ,aAAa;EAClC,MAAM,UAAW,MAAM,gBAAgB,IAAI,IAAK,MAAM,aAAa,IAAI,IAAI;EAC3E,IAAI,CAAC,4CAA4C,KAAK,OAAO,GAC3D,MAAM,aAAa,MAAM,oCAAoC,SAAS;OACjE,kBAAkB,MAAM,QAAQ;EAEvC,MAAM,WACJ,QAAQ,2BAA2B,GACnC;;;CAIF;EACA,QAAQ,IACN,qcACF;CACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"port-preflight.d.mts","names":[],"sources":["../../../../../../../../packages/core/src/http/port-preflight.ts"],"mappings":";;;;;;;;;;;;;;qBAoBa,uBAAuB;WAKhB;WACA;;WAJF;EAEhB,YACkB,cACA;;;;;;;;;wBAiBJ,gBAAgB,cAAc,gBAAoC;;;;;;;;;;wBAmC5D,sBACpB,cACA,gBACC"}
1
+ {"version":3,"file":"port-preflight.d.mts","names":[],"sources":["../../../../../../../../packages/core/src/http/port-preflight.ts"],"mappings":";;;;;;;;;;;;;;qBAqBa,uBAAuB;WAKhB;WACA;;WAJF;EAEhB,YACkB,cACA;;;;;;;;;wBAiBJ,gBAAgB,cAAc,gBAAoC;;;;;;;;;;wBAmC5D,sBACpB,cACA,gBACC"}
@@ -1,4 +1,5 @@
1
1
  import { createServer } from "node:net";
2
+ import cluster from "node:cluster";
2
3
 
3
4
  //#region ../../packages/core/src/http/port-preflight.ts
4
5
  /**
@@ -65,6 +66,7 @@ function isPortAvailable(port, host = DEFAULT_PROBE_HOST) {
65
66
  * @throws {PortInUseError} when the port is taken.
66
67
  */
67
68
  async function assertPortIsAvailable(port, host = DEFAULT_PROBE_HOST) {
69
+ if (cluster.isWorker) return;
68
70
  if (!await isPortAvailable(port, host)) throw new PortInUseError(port, host);
69
71
  }
70
72
 
@@ -1 +1 @@
1
- {"version":3,"file":"port-preflight.mjs","names":[],"sources":["../../../../../../../../packages/core/src/http/port-preflight.ts"],"sourcesContent":["import { createServer } from \"node:net\";\n\n/**\n * Host used when the caller has no configured bind host.\n */\nconst DEFAULT_PROBE_HOST = \"localhost\";\n\n/**\n * Raised when a port the framework is about to bind is already taken.\n *\n * Carries the port and host so a caller can report them without parsing the\n * message, and its message is the developer-facing instruction — the whole\n * point of preflighting is that nobody has to decode a raw `EADDRINUSE`.\n *\n * The message leads with `EADDRINUSE` on purpose: it is the string a\n * developer greps their terminal for, and the one every other Node tool\n * already trained them to recognize as \"something else is on this port\".\n * `code` mirrors it as a property so a caller can branch on it without\n * parsing text, the same way `NodeJS.ErrnoException.code` works.\n */\nexport class PortInUseError extends Error {\n /** Mirrors Node's own `ErrnoException.code` for this failure. */\n public readonly code = \"EADDRINUSE\";\n\n public constructor(\n public readonly port: number,\n public readonly host: string,\n ) {\n super(\n `EADDRINUSE: Port ${port} is already in use on ${host}. Stop the dev server (or whatever else is listening on port ${port}) and run again, or start on a free port — e.g. startHttpTestServer({ port: ${port + 1} }).`,\n );\n\n this.name = \"PortInUseError\";\n }\n}\n\n/**\n * Probe a TCP port by attempting a bind and immediately releasing it.\n *\n * @returns `true` when the port is free, `false` when it is taken or the\n * process is not allowed to bind it. Any other bind failure is re-thrown —\n * an unreadable network error must not be reported as \"port in use\".\n */\nexport function isPortAvailable(port: number, host: string = DEFAULT_PROBE_HOST): Promise<boolean> {\n return new Promise((resolve, reject) => {\n const probe = createServer();\n\n probe.unref();\n\n probe.once(\"error\", (error: NodeJS.ErrnoException) => {\n if (error.code === \"EADDRINUSE\" || error.code === \"EACCES\") {\n resolve(false);\n\n return;\n }\n\n reject(error);\n });\n\n probe.once(\"listening\", () => {\n probe.close(() => resolve(true));\n });\n\n // `exclusive` refuses a shared bind, which is what makes the probe honest:\n // with load balancing enabled a second bind on a served port can succeed.\n probe.listen({ port, host, exclusive: true });\n });\n}\n\n/**\n * Assert a port is free before something binds it.\n *\n * Run this ahead of the actual `listen()` so a collision surfaces as an\n * instruction the developer can act on, instead of a raw `EADDRINUSE` thrown\n * from deep inside the HTTP stack.\n *\n * @throws {PortInUseError} when the port is taken.\n */\nexport async function assertPortIsAvailable(\n port: number,\n host: string = DEFAULT_PROBE_HOST,\n): Promise<void> {\n const available = await isPortAvailable(port, host);\n\n if (!available) {\n throw new PortInUseError(port, host);\n }\n}\n"],"mappings":";;;;;;AAKA,MAAM,qBAAqB;;;;;;;;;;;;;;AAe3B,IAAa,iBAAb,cAAoC,MAAM;CAIxC,AAAO,YACL,AAAgB,MAChB,AAAgB,MAChB;EACA,MACE,oBAAoB,KAAK,wBAAwB,KAAK,+DAA+D,KAAK,8EAA8E,OAAO,EAAE,KACnN;EALgB;EACA;cAJK;EAUrB,KAAK,OAAO;CACd;AACF;;;;;;;;AASA,SAAgB,gBAAgB,MAAc,OAAe,oBAAsC;CACjG,OAAO,IAAI,SAAS,SAAS,WAAW;EACtC,MAAM,QAAQ,aAAa;EAE3B,MAAM,MAAM;EAEZ,MAAM,KAAK,UAAU,UAAiC;GACpD,IAAI,MAAM,SAAS,gBAAgB,MAAM,SAAS,UAAU;IAC1D,QAAQ,KAAK;IAEb;GACF;GAEA,OAAO,KAAK;EACd,CAAC;EAED,MAAM,KAAK,mBAAmB;GAC5B,MAAM,YAAY,QAAQ,IAAI,CAAC;EACjC,CAAC;EAID,MAAM,OAAO;GAAE;GAAM;GAAM,WAAW;EAAK,CAAC;CAC9C,CAAC;AACH;;;;;;;;;;AAWA,eAAsB,sBACpB,MACA,OAAe,oBACA;CAGf,IAAI,CAAC,MAFmB,gBAAgB,MAAM,IAAI,GAGhD,MAAM,IAAI,eAAe,MAAM,IAAI;AAEvC"}
1
+ {"version":3,"file":"port-preflight.mjs","names":[],"sources":["../../../../../../../../packages/core/src/http/port-preflight.ts"],"sourcesContent":["import { createServer } from \"node:net\";\nimport cluster from \"node:cluster\";\n\n/**\n * Host used when the caller has no configured bind host.\n */\nconst DEFAULT_PROBE_HOST = \"localhost\";\n\n/**\n * Raised when a port the framework is about to bind is already taken.\n *\n * Carries the port and host so a caller can report them without parsing the\n * message, and its message is the developer-facing instruction — the whole\n * point of preflighting is that nobody has to decode a raw `EADDRINUSE`.\n *\n * The message leads with `EADDRINUSE` on purpose: it is the string a\n * developer greps their terminal for, and the one every other Node tool\n * already trained them to recognize as \"something else is on this port\".\n * `code` mirrors it as a property so a caller can branch on it without\n * parsing text, the same way `NodeJS.ErrnoException.code` works.\n */\nexport class PortInUseError extends Error {\n /** Mirrors Node's own `ErrnoException.code` for this failure. */\n public readonly code = \"EADDRINUSE\";\n\n public constructor(\n public readonly port: number,\n public readonly host: string,\n ) {\n super(\n `EADDRINUSE: Port ${port} is already in use on ${host}. Stop the dev server (or whatever else is listening on port ${port}) and run again, or start on a free port — e.g. startHttpTestServer({ port: ${port + 1} }).`,\n );\n\n this.name = \"PortInUseError\";\n }\n}\n\n/**\n * Probe a TCP port by attempting a bind and immediately releasing it.\n *\n * @returns `true` when the port is free, `false` when it is taken or the\n * process is not allowed to bind it. Any other bind failure is re-thrown —\n * an unreadable network error must not be reported as \"port in use\".\n */\nexport function isPortAvailable(port: number, host: string = DEFAULT_PROBE_HOST): Promise<boolean> {\n return new Promise((resolve, reject) => {\n const probe = createServer();\n\n probe.unref();\n\n probe.once(\"error\", (error: NodeJS.ErrnoException) => {\n if (error.code === \"EADDRINUSE\" || error.code === \"EACCES\") {\n resolve(false);\n\n return;\n }\n\n reject(error);\n });\n\n probe.once(\"listening\", () => {\n probe.close(() => resolve(true));\n });\n\n // `exclusive` refuses a shared bind, which is what makes the probe honest:\n // with load balancing enabled a second bind on a served port can succeed.\n probe.listen({ port, host, exclusive: true });\n });\n}\n\n/**\n * Assert a port is free before something binds it.\n *\n * Run this ahead of the actual `listen()` so a collision surfaces as an\n * instruction the developer can act on, instead of a raw `EADDRINUSE` thrown\n * from deep inside the HTTP stack.\n *\n * @throws {PortInUseError} when the port is taken.\n */\nexport async function assertPortIsAvailable(\n port: number,\n host: string = DEFAULT_PROBE_HOST,\n): Promise<void> {\n // Node cluster workers intentionally share the primary's listener. An\n // exclusive probe rejects that occupied port, blocking rolling reloads.\n // Let the real server.listen() report bind failures in workers instead.\n // https://nodejs.org/api/cluster.html#how-it-works\n if (cluster.isWorker) return;\n\n const available = await isPortAvailable(port, host);\n\n if (!available) {\n throw new PortInUseError(port, host);\n }\n}\n"],"mappings":";;;;;;;AAMA,MAAM,qBAAqB;;;;;;;;;;;;;;AAe3B,IAAa,iBAAb,cAAoC,MAAM;CAIxC,AAAO,YACL,AAAgB,MAChB,AAAgB,MAChB;EACA,MACE,oBAAoB,KAAK,wBAAwB,KAAK,+DAA+D,KAAK,8EAA8E,OAAO,EAAE,KACnN;EALgB;EACA;cAJK;EAUrB,KAAK,OAAO;CACd;AACF;;;;;;;;AASA,SAAgB,gBAAgB,MAAc,OAAe,oBAAsC;CACjG,OAAO,IAAI,SAAS,SAAS,WAAW;EACtC,MAAM,QAAQ,aAAa;EAE3B,MAAM,MAAM;EAEZ,MAAM,KAAK,UAAU,UAAiC;GACpD,IAAI,MAAM,SAAS,gBAAgB,MAAM,SAAS,UAAU;IAC1D,QAAQ,KAAK;IAEb;GACF;GAEA,OAAO,KAAK;EACd,CAAC;EAED,MAAM,KAAK,mBAAmB;GAC5B,MAAM,YAAY,QAAQ,IAAI,CAAC;EACjC,CAAC;EAID,MAAM,OAAO;GAAE;GAAM;GAAM,WAAW;EAAK,CAAC;CAC9C,CAAC;AACH;;;;;;;;;;AAWA,eAAsB,sBACpB,MACA,OAAe,oBACA;CAKf,IAAI,QAAQ,UAAU;CAItB,IAAI,CAAC,MAFmB,gBAAgB,MAAM,IAAI,GAGhD,MAAM,IAAI,eAAe,MAAM,IAAI;AAEvC"}
package/esm/index.d.mts CHANGED
@@ -150,6 +150,11 @@ import { decrypt, encrypt } from "./encryption/encrypt.mjs";
150
150
  import { hmacHash } from "./encryption/hash.mjs";
151
151
  import { hashPassword, verifyPassword } from "./encryption/password.mjs";
152
152
  import { EncryptionConfigurations, EncryptionPasswordConfigurations } from "./encryption/types.mjs";
153
+ import { SecretStoreError, SecretStoreErrorCode } from "./secrets/errors.mjs";
154
+ import { SecretBackend, SecretStoreOptions, SecretsConfigurations } from "./secrets/types.mjs";
155
+ import { MemorySecretBackend } from "./secrets/memory-backend.mjs";
156
+ import { SecretStore } from "./secrets/secret-store.mjs";
157
+ import { secrets } from "./secrets/secrets.mjs";
153
158
  import { ensureFatalIsVisible } from "./logger/fatal-visibility.mjs";
154
159
  import { LogConfigurations } from "./logger/types.mjs";
155
160
  import { setLogConfigurations } from "./logger/logger.mjs";
@@ -186,7 +191,7 @@ import "./resource/index.mjs";
186
191
  import { Restful } from "./restful/restful.mjs";
187
192
  import "./restful/index.mjs";
188
193
  import { SocketAdapterFactory, SocketOptions } from "./socket/types.mjs";
189
- import { getSocketServer } from "./socket/utils.mjs";
194
+ import { broadcastSocketEvent, getSocketServer } from "./socket/utils.mjs";
190
195
  import "./socket/index.mjs";
191
196
  import { RegisteredUseCase, UseCase, UseCaseAfterMiddleware, UseCaseBeforeMiddleware, UseCaseBroadcastChannel, UseCaseBroadcastEvent, UseCaseBroadcastOption, UseCaseConfigurations, UseCaseContext, UseCaseErrorResult, UseCaseEventsCallbacksMap, UseCaseGuard, UseCaseHandler, UseCaseOnExecutingContext, UseCaseResult, UseCaseRuntimeOptions, UseCaseWithSchema } from "./use-cases/types.mjs";
192
197
  import { useCase } from "./use-cases/use-case.mjs";
@@ -227,7 +232,7 @@ import "./warlock-config/index.mjs";
227
232
  import { env } from "@mongez/dotenv";
228
233
  import { colors } from "@mongez/copper";
229
234
  export * from "@mongez/localization";
230
- export { $registerUseCase, $unregisterUseCase, APP_ROLES, AUTH_GUARD_MARKER, AccessConnector, AggregateExpressionInput, AggregateExpressions, AiConnector, AllRepositoryOptions, AppConfigurations, AppRole, Application, AuthDescriptor, BOOT_SIGNAL_ENV_KEY, BOOT_SIGNAL_VERSION, BadRequestError, BadSchemaUseCaseError, BaseCastOutput, BaseConnector, type BenchmarkChannel, type BenchmarkConfigurations, type BenchmarkErrorResult, type BenchmarkOptions, BenchmarkProfiler, type BenchmarkProfilerOptions, type BenchmarkResult, BenchmarkSnapshots, type BenchmarkSnapshotsOptions, type BenchmarkStats, type BenchmarkSuccessResult, BootContext, BootListener, BootSignal, BootSignalType, BootValidator, CLICommand, type CLICommandAction, type CLICommandOption, type CLICommandOptions, type CLICommandPreload, type CLICommandSource, CacheConnector, type CacheMiddlewareOptions, CachedRepositoryOptions, type CapturedMail, CascadeAdapter, CascadeQueryBuilder, CastOutput, ChunkCallback, ClockSource, ClosableServer, CloudDriver, CloudStorageDriverContract, CloudStorageDriverOptions, CloudStorageFileData, type CommandActionData, type ConcurrencyLimitOptions, ConditionalRequestInput, ConditionalRequestOutcome, ConfigIssue, ConfigKey, ConfigKeyRegistry, ConfigModuleEntry, ConfigName, ConfigOf, ConfigRegistry, ConfigSchema, ConfigSchemaOptions, ConfigSpecialHandlers, ConflictError, Connector, ConnectorBuildContext, ConnectorBuildContribution, ConnectorBuildGenerateResult, ConnectorEsbuildPatch, ConnectorLifecyclePhase, ConnectorName, ConnectorPriority, ConnectorsManager, ConsoleChannel, ContainerTypes, CookieJarUnavailableError, CookieOptions, CspConfig, CsrfOriginCheckReason, CsrfOriginVerdict, CursorPaginationOptions, CursorPaginationResult, DEFAULT_CSP_DIRECTIVES, DEFAULT_POSTMAN_BASE_URL, DOSpacesDriver, DatabaseCacheDriver, type DatabaseCacheOptions, DatabaseConnector, DatabaseLog, DatabaseLogModel, DatabaseLogOptions, DecodedAccessToken, DefineResourceOptions, DeleteManyResult, DetectedImageFormat, type DevelopmentAppModuleEntry, type DevelopmentAppModules, type DevelopmentModelModuleEntry, type DevelopmentModelModuleState, type DevelopmentModelModules, DevelopmentPostmanResult, ERROR_CODES, ERROR_CODES_DOCS_URL, EncryptionConfigurations, EncryptionPasswordConfigurations, EntityTag, Environment, ErrorCodeArea, ErrorCodeCategory, ErrorCodeDefinition, EventSubscription, ExistsExceptCurrentIdRuleOptions, ExistsExceptCurrentUserRuleOptions, FastifyInstance, FieldOutput, FileNamingStrategy, FileValidationOptions, FileValidator, FileVisibility, FilterFunction, FilterOperator, FilterOptions, FilterRule, FilterRules, ForbiddenError, GenerateImageVariantsOptions, GeneratedImageDescriptor, GeneratedImageVariant, GroupByFields, GroupedRoutesOptions, HealthCheck, HealthStatus, HeraldConnector, HttpConfigurations, HttpConnector, HttpContext, HttpError, HttpErrorCodes, type HttpErrorMapper, type HttpErrorMapping, HttpLoggingConfig, HttpReadyReport, HttpServerOptions, HttpServerRebuiltListener, HttpTracingConfig, type IdempotencyOptions, IdsSource, Image, ImageFormat, ImageInput, ImageTransformCallback, ImageTransformConfig, ImageTransformOptions, ImageVariantDefinition, ImageVariantFit, ImageVariantOutputFormat, ImageVariantsConfigError, InvalidConfigError, InvalidCspDirectiveError, type IpFilterOptions, JavaScriptRuntime, JavaScriptRuntimeName, ListOptions, LocalDriver, LocalStorageDriverOptions, LocaleDictionaryEntries, LocaleDictionaryError, LocalizedObject, LogConfigurations, LoggerConnector, MAIL_EVENTS, Mail, type MailAddress, type MailAttachment, type MailConfigurations, MailError, type MailErrorCode, type MailEvents, type MailMode, type MailOptions, type MailPriority, type MailResult, MailerConnector, type MailersConfig, type MaintenanceOptions, Middleware, MiddlewareResponse, MimeTypes, ModelResourceRegistry, NULLABLE_RESOURCE, NamedApiRoute, NamedApiRoutesOptions, NoopChannel, type NormalizedMail, NotAcceptableError, NotAllowedError, NotificationsConnector, NullableResource, NullableResourceTarget, OPENAPI_JSON_SCHEMA_DIALECT, OpenApiBuildResult, OpenApiComponents, OpenApiContext, OpenApiDocument, OpenApiOperation, OpenApiParameter, OpenApiRequestBody, OpenApiResponse, OpenApiRouteInput, OpenApiSchema, OpenApiSecurityRequirement, OpenApiSecurityScheme, OpenApiValidationResponseConfig, POSTMAN_COLLECTION_SCHEMA, PaginationMode, PaginationResult, ParsedLocaleDictionary, PartialMiddleware, PartialPick, Path, PipeableReactStream, PipelineOptions, PortInUseError, PositionalHandlerSuspect, PostmanAuth, PostmanAuthEntry, PostmanBody, PostmanCollection, PostmanCollectionOptions, PostmanFolder, PostmanFormParam, PostmanHeader, PostmanItem, PostmanOriginalRequest, PostmanQueryParam, PostmanRequest, PostmanRequestItem, PostmanResponse, PostmanUrl, PostmanVariable, PrefixConfig, PrefixOptions, PresignedOptions, PresignedUploadOptions, PrivateRequestLoggingRule, PurgeImageVariantsOptions, PutDirectoryOptions, PutDirectoryResult, PutFromUrlOptions, PutOptions, QueryBuilderContract, Queue, R2Driver, R2StorageDriverOptions, type RateLimitOptions, RegisterConfiguredConnectorsOptions, RegisterResource, RegisteredUseCase, RepositoryAdapterContract, RepositoryConfigurations, RepositoryEvent, RepositoryManager, RepositoryOptions, RepositoryOptionsWithCursor, RepositoryOptionsWithPages, Request, RequestContextStore, RequestController, RequestControllerContract, RequestEvent, RequestHandler, RequestHandlerType, RequestHandlerValidation, RequestLocals, RequestLog, RequestLogSnapshot, RequestLogSource, RequestLoggingOptions, RequestMethod, RequestTranslator, ResolveImageVariantInput, type ResolvedCLICommandOption, ResolvedImageVariant, ResolvedImageVariantsConfig, Resource, ResourceArraySchema, ResourceCastType, ResourceConstructor, ResourceContract, ResourceFieldBuilder, ResourceFieldBuilderDateOutputOptions, ResourceFieldConfig, ResourceMethod, ResourceNotFoundError, ResourceOutput, ResourceOutputOf, ResourceOutputValueCastType, ResourceSchema, ResourceSelfReference, Response, ResponseBodyOutput, ResponseBodyValue, ResponseEvent, ResponseSSEController, ResponseSSEMessageOptions, ResponseSSEOptions, ResponseSchema, ResponseSchemaOutput, ResponseStatus, ResponseStreamController, ResponseStreamOptions, Restful, RestfulMiddleware, ReturnedResponse, Route, RouteNameTakenError, RouteOptions, RouteRateLimitOptions, RouteRegistry, RouteResource, Router, RouterGroupCallback, RouterStacks, RuntimeStrategy, S3Driver, type SESConfigurations, type SMTPConfigurations, SUPPORTED_RUNTIMES_DOCS_URL, SafeFetchOptions, SafeFetchResult, SafeRedirectOptions, SaveAsOptions, SaveMode, SaveOptions, ScopedStorage, ScopedStorageContract, SeedClock, SeedContext, SeedRecordRef, SeedResult, Seeder, SeederDependencyCycleError, SeederMetadata, SendBufferOptions, SendFileOptions, Serialized, SerializedWire, ServerError, ShutdownListener, SocketAdapterFactory, SocketConnector, SocketOptions, StaticMountOptions, Storage, StorageCapabilityError, StorageConfigurations, StorageConnector, StorageCopyEventPayload, StorageDriverConfig, StorageDriverContextStore, StorageDriverContract, StorageDriverName, StorageDriverRegistry, StorageDriverType, StorageError, StorageErrorOptions, StorageEventHandler, StorageEventPayload, StorageEventType, StorageFile, StorageFileData, StorageFileInfo, StorageManagerContract, StorageNotInitializedError, StoragePutEventPayload, StreamReactResponseOptions, TemporaryTokenError, TemporaryTokenPayload, TemporaryTokenValidation, TracingContext, TracingContextSource, TracingHooks, TracingPhaseInfo, TracingRequestEndInfo, Track, TrackableModel, TypedAllRepositoryOptions, TypedRepositoryOptions, TypedRepositoryOptionsWithCursor, TypedRepositoryOptionsWithPages, UPDATE_MANY_BATCH_SIZE, UPLOADS_DEFAULTS, URL_CREDENTIAL_PARAMS, UnAuthorizedError, UniqueExceptCurrentIdRuleOptions, UniqueExceptCurrentUserRuleOptions, UnknownSeederDependencyError, UploadedFile, UploadedFileControllerOptions, UploadedFileImageOptions, UploadedFileJson, UploadedFileQuery, UploadsConfigurations, UploadsImagesConfigurations, UseCase, UseCaseAfterMiddleware, UseCaseBeforeMiddleware, UseCaseBroadcastChannel, UseCaseBroadcastEvent, UseCaseBroadcastOption, UseCaseConfigurations, UseCaseContext, UseCaseErrorResult, UseCaseEventsCallbacksMap, UseCaseGuard, UseCaseHandler, UseCaseOnExecutingContext, UseCaseResult, UseCaseRuntimeOptions, UseCaseWithSchema, ValidationConfiguration, ValidationFailureContext, ValidationFailureHandler, ValidationFailureResponse, ValidationResponseConfiguration, VariantOutputFormat, VariantSourceFormat, WarlockConfig, WarlockConfigManager, WarlockError, WarlockErrorCode, WarningSink, WatermarkConfig, WhereOperator, XMLable, addUseCaseHistory, anyMatch, app, appLog, appPath, applyCspHeader, assertConfiguredHttpPortIsFree, assertMailCount, assertMailSent, assertNoReservedConnectorNames, assertNodeOnlyCommand, assertPortIsAvailable, assertSitesRequireWebRole, assertUniqueConnectorNames, assertValidConfigModules, assetsUrl, beginHttpDrain, bootstrap, broadcastUseCaseResult, buildCspHeaderValue, buildIdempotencyCacheKey, buildOpenApiDocument, buildRequestLogSnapshot, buildTracingContext, cachePath, captureMail, clearPositionalHandlerSuspects, clearTestMailbox, clock, closeAllMailers, closeMailer, closeServerWithTimeout, colors, command, config, configPath, configSpecialHandlers, connectorsManager, container, createHttpApplication, createRequestStore, createUploadedFileController, decrypt, defaultHttpConfigurations, defineConfig, defineConfigSchema, defineResource, deriveTraceId, describeJavaScriptRuntime, describePositionalHandlerSuspect, detectJavaScriptRuntime, dispatchPhase, dispatchRequestEnd, dispatchRequestStart, displayEnvironmentMode, encrypt, ensureFatalIsVisible, env, environment, errorCodeDocsUrl, errorCodeOf, escapeHeaderValue, evaluateConditionalRequest, exampleFromSchema, existsExceptCurrentIdRule, existsExceptCurrentUserRule, explainErrorCode, fetchLatestVersion, fileExtensionRule, fileRule, fileTypeRule, findMailsBySubject, findMailsTo, fireLifecycleEvent, forgetPositionalHandlerSuspects, formatConfigIssues, generateImageVariants, generateMailId, getDefaultMailConfig, getDevelopmentOpenApiDocument, getDevelopmentPostmanCollection, getExplicitMailMode, getHttpReadyReport, getHttpServer, getLastMail, getLocalized, getMailEventName, getMailMode, getMailboxSize, getMailer, getMailerConfig, getMimeType, getPoolStats, getPublicUrl, getRoles, getSites, getSocketServer, getTestMailbox, getUseCase, getUseCaseHistory, getUseCases, globalEventsCallbacksMap, globalUseCasesEvents, hasRole, hashBody, hashPassword, health, hmacHash, httpConfig, ids, imageRule, increaseUseCaseFailedCalls, increaseUseCaseSuccessCalls, inspectHandlerSignature, ipMatches, isAllowedCsrfOrigin, isAuthGuardMiddleware, isBootSignal, isConfigSchema, isDevelopmentMode, isNewerVersion, isNullableResource, isPortAvailable, isPrivateOrReservedIp, isProductionMode, isSafeRedirect, isTestMode, isTracingEnabled, isUnguardedMutatingRoute, isUnknownTsExtensionError, isUnresolvedConfigImportError, isUnsupportedTypeStrippingError, isValidIdempotencyKey, isWarlockErrorCode, listPositionalHandlerSuspects, loadS3, logResponse, logsPath, looksLikePositionalHandler, mailEvents, markAuthGuard, matchesDerivedRouteName, matchesIfMatch, matchesIfNoneMatch, measure, mergeCspDirectives, middleware, nodeOnlyCommandError, normalizeOrigin, normalizeRequestPath, normalizeRoutePath, notifyHttpServerRebuilt, nullable, onHttpServerRebuilt, openApiToPostmanCollection, originOf, ownOrigin, parseEntityTag, parseEntityTagList, parseLocaleDictionary, parseRoles, parseSites, parseSize, parseTraceparentTraceId, paths, preflightConfiguredHttpPort, promiseAllObject, publicPath, publicUrl, purgeImageVariants, redactQueryCredentials, redactUrlCredentials, registerAppConfig, registerConfiguredConnectors, registerDevelopmentOpenApiProvider, registerGroupedTranslationKeys, registerHttpPlugins, registerLocaleDictionary, registerTracingHooks, remedyLines, renderReact, renderReactMail, reportPositionalHandlerSuspects, reportUnguardedMutatingRoutes, requestContext, requestMemo, requiresDefaultCsrfGuard, resetHttpReadyReport, resetMailConfig, resetMailMode, resetRolesCacheForTests, resetTracingConfigForTests, resetUnguardedRouteReports, resolveCspConfig, resolveCsrfOriginVerdict, resolveImageVariant, resolveMailConfig, resolvePublicRoot, resolveRequestLoggingOptions, resolveTracingConfig, resolveWithinRoot, rootPath, routeNameMethodSuffix, router, runDefaultCsrfGuard, runPipeline, safeFetchToBuffer, safeRedirect, sanitizePath, seeder, sendBootSignal, sendMail, serializeCspDirectives, servesHttp, setBaseUrl, setClockSource, setConfig, setEnvironment, setHttpReadyReport, setIdsSource, setLogConfigurations, setMailConfigurations, setMailMode, shouldPreflightHttpPort, sleep, sluggable, srcPath, startHttpServer, stopHttpApplication, storage, storageConfig, storageConfigurations, storageDriverContext, storagePath, streamReactResponse, strongEntityTagMatch, t, tempPath, toJson, toSingleLineSseField, trackConnectionsForDrain, uniqueExceptCurrentIdRule, uniqueExceptCurrentUserRule, unregisterLocaleDictionary, unverifiedBuildRuntimeNotice, uploadedFileController, uploadedFileMetadataSchema, uploadsConfig, uploadsPath, uploadsUrl, url, useCase, useComputedModel, useComputedSlug, useCurrentUser, useHashedPassword, useRequest, useRequestStore, validateConfigValue, validateCspConfigAtBoot, validateCspDirectives, verifyMailer, verifyPassword, warlockConfigManager, warlockPath, wasMailSentTo, wasMailSentWithSubject, weakEntityTagMatch, wrapResponseInDataKey };
235
+ export { $registerUseCase, $unregisterUseCase, APP_ROLES, AUTH_GUARD_MARKER, AccessConnector, AggregateExpressionInput, AggregateExpressions, AiConnector, AllRepositoryOptions, AppConfigurations, AppRole, Application, AuthDescriptor, BOOT_SIGNAL_ENV_KEY, BOOT_SIGNAL_VERSION, BadRequestError, BadSchemaUseCaseError, BaseCastOutput, BaseConnector, type BenchmarkChannel, type BenchmarkConfigurations, type BenchmarkErrorResult, type BenchmarkOptions, BenchmarkProfiler, type BenchmarkProfilerOptions, type BenchmarkResult, BenchmarkSnapshots, type BenchmarkSnapshotsOptions, type BenchmarkStats, type BenchmarkSuccessResult, BootContext, BootListener, BootSignal, BootSignalType, BootValidator, CLICommand, type CLICommandAction, type CLICommandOption, type CLICommandOptions, type CLICommandPreload, type CLICommandSource, CacheConnector, type CacheMiddlewareOptions, CachedRepositoryOptions, type CapturedMail, CascadeAdapter, CascadeQueryBuilder, CastOutput, ChunkCallback, ClockSource, ClosableServer, CloudDriver, CloudStorageDriverContract, CloudStorageDriverOptions, CloudStorageFileData, type CommandActionData, type ConcurrencyLimitOptions, ConditionalRequestInput, ConditionalRequestOutcome, ConfigIssue, ConfigKey, ConfigKeyRegistry, ConfigModuleEntry, ConfigName, ConfigOf, ConfigRegistry, ConfigSchema, ConfigSchemaOptions, ConfigSpecialHandlers, ConflictError, Connector, ConnectorBuildContext, ConnectorBuildContribution, ConnectorBuildGenerateResult, ConnectorEsbuildPatch, ConnectorLifecyclePhase, ConnectorName, ConnectorPriority, ConnectorsManager, ConsoleChannel, ContainerTypes, CookieJarUnavailableError, CookieOptions, CspConfig, CsrfOriginCheckReason, CsrfOriginVerdict, CursorPaginationOptions, CursorPaginationResult, DEFAULT_CSP_DIRECTIVES, DEFAULT_POSTMAN_BASE_URL, DOSpacesDriver, DatabaseCacheDriver, type DatabaseCacheOptions, DatabaseConnector, DatabaseLog, DatabaseLogModel, DatabaseLogOptions, DecodedAccessToken, DefineResourceOptions, DeleteManyResult, DetectedImageFormat, type DevelopmentAppModuleEntry, type DevelopmentAppModules, type DevelopmentModelModuleEntry, type DevelopmentModelModuleState, type DevelopmentModelModules, DevelopmentPostmanResult, ERROR_CODES, ERROR_CODES_DOCS_URL, EncryptionConfigurations, EncryptionPasswordConfigurations, EntityTag, Environment, ErrorCodeArea, ErrorCodeCategory, ErrorCodeDefinition, EventSubscription, ExistsExceptCurrentIdRuleOptions, ExistsExceptCurrentUserRuleOptions, FastifyInstance, FieldOutput, FileNamingStrategy, FileValidationOptions, FileValidator, FileVisibility, FilterFunction, FilterOperator, FilterOptions, FilterRule, FilterRules, ForbiddenError, GenerateImageVariantsOptions, GeneratedImageDescriptor, GeneratedImageVariant, GroupByFields, GroupedRoutesOptions, HealthCheck, HealthStatus, HeraldConnector, HttpConfigurations, HttpConnector, HttpContext, HttpError, HttpErrorCodes, type HttpErrorMapper, type HttpErrorMapping, HttpLoggingConfig, HttpReadyReport, HttpServerOptions, HttpServerRebuiltListener, HttpTracingConfig, type IdempotencyOptions, IdsSource, Image, ImageFormat, ImageInput, ImageTransformCallback, ImageTransformConfig, ImageTransformOptions, ImageVariantDefinition, ImageVariantFit, ImageVariantOutputFormat, ImageVariantsConfigError, InvalidConfigError, InvalidCspDirectiveError, type IpFilterOptions, JavaScriptRuntime, JavaScriptRuntimeName, ListOptions, LocalDriver, LocalStorageDriverOptions, LocaleDictionaryEntries, LocaleDictionaryError, LocalizedObject, LogConfigurations, LoggerConnector, MAIL_EVENTS, Mail, type MailAddress, type MailAttachment, type MailConfigurations, MailError, type MailErrorCode, type MailEvents, type MailMode, type MailOptions, type MailPriority, type MailResult, MailerConnector, type MailersConfig, type MaintenanceOptions, MemorySecretBackend, Middleware, MiddlewareResponse, MimeTypes, ModelResourceRegistry, NULLABLE_RESOURCE, NamedApiRoute, NamedApiRoutesOptions, NoopChannel, type NormalizedMail, NotAcceptableError, NotAllowedError, NotificationsConnector, NullableResource, NullableResourceTarget, OPENAPI_JSON_SCHEMA_DIALECT, OpenApiBuildResult, OpenApiComponents, OpenApiContext, OpenApiDocument, OpenApiOperation, OpenApiParameter, OpenApiRequestBody, OpenApiResponse, OpenApiRouteInput, OpenApiSchema, OpenApiSecurityRequirement, OpenApiSecurityScheme, OpenApiValidationResponseConfig, POSTMAN_COLLECTION_SCHEMA, PaginationMode, PaginationResult, ParsedLocaleDictionary, PartialMiddleware, PartialPick, Path, PipeableReactStream, PipelineOptions, PortInUseError, PositionalHandlerSuspect, PostmanAuth, PostmanAuthEntry, PostmanBody, PostmanCollection, PostmanCollectionOptions, PostmanFolder, PostmanFormParam, PostmanHeader, PostmanItem, PostmanOriginalRequest, PostmanQueryParam, PostmanRequest, PostmanRequestItem, PostmanResponse, PostmanUrl, PostmanVariable, PrefixConfig, PrefixOptions, PresignedOptions, PresignedUploadOptions, PrivateRequestLoggingRule, PurgeImageVariantsOptions, PutDirectoryOptions, PutDirectoryResult, PutFromUrlOptions, PutOptions, QueryBuilderContract, Queue, R2Driver, R2StorageDriverOptions, type RateLimitOptions, RegisterConfiguredConnectorsOptions, RegisterResource, RegisteredUseCase, RepositoryAdapterContract, RepositoryConfigurations, RepositoryEvent, RepositoryManager, RepositoryOptions, RepositoryOptionsWithCursor, RepositoryOptionsWithPages, Request, RequestContextStore, RequestController, RequestControllerContract, RequestEvent, RequestHandler, RequestHandlerType, RequestHandlerValidation, RequestLocals, RequestLog, RequestLogSnapshot, RequestLogSource, RequestLoggingOptions, RequestMethod, RequestTranslator, ResolveImageVariantInput, type ResolvedCLICommandOption, ResolvedImageVariant, ResolvedImageVariantsConfig, Resource, ResourceArraySchema, ResourceCastType, ResourceConstructor, ResourceContract, ResourceFieldBuilder, ResourceFieldBuilderDateOutputOptions, ResourceFieldConfig, ResourceMethod, ResourceNotFoundError, ResourceOutput, ResourceOutputOf, ResourceOutputValueCastType, ResourceSchema, ResourceSelfReference, Response, ResponseBodyOutput, ResponseBodyValue, ResponseEvent, ResponseSSEController, ResponseSSEMessageOptions, ResponseSSEOptions, ResponseSchema, ResponseSchemaOutput, ResponseStatus, ResponseStreamController, ResponseStreamOptions, Restful, RestfulMiddleware, ReturnedResponse, Route, RouteNameTakenError, RouteOptions, RouteRateLimitOptions, RouteRegistry, RouteResource, Router, RouterGroupCallback, RouterStacks, RuntimeStrategy, S3Driver, type SESConfigurations, type SMTPConfigurations, SUPPORTED_RUNTIMES_DOCS_URL, SafeFetchOptions, SafeFetchResult, SafeRedirectOptions, SaveAsOptions, SaveMode, SaveOptions, ScopedStorage, ScopedStorageContract, type SecretBackend, SecretStore, SecretStoreError, SecretStoreErrorCode, type SecretStoreOptions, type SecretsConfigurations, SeedClock, SeedContext, SeedRecordRef, SeedResult, Seeder, SeederDependencyCycleError, SeederMetadata, SendBufferOptions, SendFileOptions, Serialized, SerializedWire, ServerError, ShutdownListener, SocketAdapterFactory, SocketConnector, SocketOptions, StaticMountOptions, Storage, StorageCapabilityError, StorageConfigurations, StorageConnector, StorageCopyEventPayload, StorageDriverConfig, StorageDriverContextStore, StorageDriverContract, StorageDriverName, StorageDriverRegistry, StorageDriverType, StorageError, StorageErrorOptions, StorageEventHandler, StorageEventPayload, StorageEventType, StorageFile, StorageFileData, StorageFileInfo, StorageManagerContract, StorageNotInitializedError, StoragePutEventPayload, StreamReactResponseOptions, TemporaryTokenError, TemporaryTokenPayload, TemporaryTokenValidation, TracingContext, TracingContextSource, TracingHooks, TracingPhaseInfo, TracingRequestEndInfo, Track, TrackableModel, TypedAllRepositoryOptions, TypedRepositoryOptions, TypedRepositoryOptionsWithCursor, TypedRepositoryOptionsWithPages, UPDATE_MANY_BATCH_SIZE, UPLOADS_DEFAULTS, URL_CREDENTIAL_PARAMS, UnAuthorizedError, UniqueExceptCurrentIdRuleOptions, UniqueExceptCurrentUserRuleOptions, UnknownSeederDependencyError, UploadedFile, UploadedFileControllerOptions, UploadedFileImageOptions, UploadedFileJson, UploadedFileQuery, UploadsConfigurations, UploadsImagesConfigurations, UseCase, UseCaseAfterMiddleware, UseCaseBeforeMiddleware, UseCaseBroadcastChannel, UseCaseBroadcastEvent, UseCaseBroadcastOption, UseCaseConfigurations, UseCaseContext, UseCaseErrorResult, UseCaseEventsCallbacksMap, UseCaseGuard, UseCaseHandler, UseCaseOnExecutingContext, UseCaseResult, UseCaseRuntimeOptions, UseCaseWithSchema, ValidationConfiguration, ValidationFailureContext, ValidationFailureHandler, ValidationFailureResponse, ValidationResponseConfiguration, VariantOutputFormat, VariantSourceFormat, WarlockConfig, WarlockConfigManager, WarlockError, WarlockErrorCode, WarningSink, WatermarkConfig, WhereOperator, XMLable, addUseCaseHistory, anyMatch, app, appLog, appPath, applyCspHeader, assertConfiguredHttpPortIsFree, assertMailCount, assertMailSent, assertNoReservedConnectorNames, assertNodeOnlyCommand, assertPortIsAvailable, assertSitesRequireWebRole, assertUniqueConnectorNames, assertValidConfigModules, assetsUrl, beginHttpDrain, bootstrap, broadcastSocketEvent, broadcastUseCaseResult, buildCspHeaderValue, buildIdempotencyCacheKey, buildOpenApiDocument, buildRequestLogSnapshot, buildTracingContext, cachePath, captureMail, clearPositionalHandlerSuspects, clearTestMailbox, clock, closeAllMailers, closeMailer, closeServerWithTimeout, colors, command, config, configPath, configSpecialHandlers, connectorsManager, container, createHttpApplication, createRequestStore, createUploadedFileController, decrypt, defaultHttpConfigurations, defineConfig, defineConfigSchema, defineResource, deriveTraceId, describeJavaScriptRuntime, describePositionalHandlerSuspect, detectJavaScriptRuntime, dispatchPhase, dispatchRequestEnd, dispatchRequestStart, displayEnvironmentMode, encrypt, ensureFatalIsVisible, env, environment, errorCodeDocsUrl, errorCodeOf, escapeHeaderValue, evaluateConditionalRequest, exampleFromSchema, existsExceptCurrentIdRule, existsExceptCurrentUserRule, explainErrorCode, fetchLatestVersion, fileExtensionRule, fileRule, fileTypeRule, findMailsBySubject, findMailsTo, fireLifecycleEvent, forgetPositionalHandlerSuspects, formatConfigIssues, generateImageVariants, generateMailId, getDefaultMailConfig, getDevelopmentOpenApiDocument, getDevelopmentPostmanCollection, getExplicitMailMode, getHttpReadyReport, getHttpServer, getLastMail, getLocalized, getMailEventName, getMailMode, getMailboxSize, getMailer, getMailerConfig, getMimeType, getPoolStats, getPublicUrl, getRoles, getSites, getSocketServer, getTestMailbox, getUseCase, getUseCaseHistory, getUseCases, globalEventsCallbacksMap, globalUseCasesEvents, hasRole, hashBody, hashPassword, health, hmacHash, httpConfig, ids, imageRule, increaseUseCaseFailedCalls, increaseUseCaseSuccessCalls, inspectHandlerSignature, ipMatches, isAllowedCsrfOrigin, isAuthGuardMiddleware, isBootSignal, isConfigSchema, isDevelopmentMode, isNewerVersion, isNullableResource, isPortAvailable, isPrivateOrReservedIp, isProductionMode, isSafeRedirect, isTestMode, isTracingEnabled, isUnguardedMutatingRoute, isUnknownTsExtensionError, isUnresolvedConfigImportError, isUnsupportedTypeStrippingError, isValidIdempotencyKey, isWarlockErrorCode, listPositionalHandlerSuspects, loadS3, logResponse, logsPath, looksLikePositionalHandler, mailEvents, markAuthGuard, matchesDerivedRouteName, matchesIfMatch, matchesIfNoneMatch, measure, mergeCspDirectives, middleware, nodeOnlyCommandError, normalizeOrigin, normalizeRequestPath, normalizeRoutePath, notifyHttpServerRebuilt, nullable, onHttpServerRebuilt, openApiToPostmanCollection, originOf, ownOrigin, parseEntityTag, parseEntityTagList, parseLocaleDictionary, parseRoles, parseSites, parseSize, parseTraceparentTraceId, paths, preflightConfiguredHttpPort, promiseAllObject, publicPath, publicUrl, purgeImageVariants, redactQueryCredentials, redactUrlCredentials, registerAppConfig, registerConfiguredConnectors, registerDevelopmentOpenApiProvider, registerGroupedTranslationKeys, registerHttpPlugins, registerLocaleDictionary, registerTracingHooks, remedyLines, renderReact, renderReactMail, reportPositionalHandlerSuspects, reportUnguardedMutatingRoutes, requestContext, requestMemo, requiresDefaultCsrfGuard, resetHttpReadyReport, resetMailConfig, resetMailMode, resetRolesCacheForTests, resetTracingConfigForTests, resetUnguardedRouteReports, resolveCspConfig, resolveCsrfOriginVerdict, resolveImageVariant, resolveMailConfig, resolvePublicRoot, resolveRequestLoggingOptions, resolveTracingConfig, resolveWithinRoot, rootPath, routeNameMethodSuffix, router, runDefaultCsrfGuard, runPipeline, safeFetchToBuffer, safeRedirect, sanitizePath, secrets, seeder, sendBootSignal, sendMail, serializeCspDirectives, servesHttp, setBaseUrl, setClockSource, setConfig, setEnvironment, setHttpReadyReport, setIdsSource, setLogConfigurations, setMailConfigurations, setMailMode, shouldPreflightHttpPort, sleep, sluggable, srcPath, startHttpServer, stopHttpApplication, storage, storageConfig, storageConfigurations, storageDriverContext, storagePath, streamReactResponse, strongEntityTagMatch, t, tempPath, toJson, toSingleLineSseField, trackConnectionsForDrain, uniqueExceptCurrentIdRule, uniqueExceptCurrentUserRule, unregisterLocaleDictionary, unverifiedBuildRuntimeNotice, uploadedFileController, uploadedFileMetadataSchema, uploadsConfig, uploadsPath, uploadsUrl, url, useCase, useComputedModel, useComputedSlug, useCurrentUser, useHashedPassword, useRequest, useRequestStore, validateConfigValue, validateCspConfigAtBoot, validateCspDirectives, verifyMailer, verifyPassword, warlockConfigManager, warlockPath, wasMailSentTo, wasMailSentWithSubject, weakEntityTagMatch, wrapResponseInDataKey };
231
236
  import "./config/types.mjs";
232
237
  import "./http/request.mjs";
233
238
  import "./http/serialized.mjs";
package/esm/index.mjs CHANGED
@@ -160,6 +160,11 @@ import "./database/index.mjs";
160
160
  import { decrypt, encrypt } from "./encryption/encrypt.mjs";
161
161
  import { hmacHash } from "./encryption/hash.mjs";
162
162
  import "./encryption/index.mjs";
163
+ import { SecretStoreError } from "./secrets/errors.mjs";
164
+ import { MemorySecretBackend } from "./secrets/memory-backend.mjs";
165
+ import { SecretStore } from "./secrets/secret-store.mjs";
166
+ import { secrets } from "./secrets/secrets.mjs";
167
+ import "./secrets/index.mjs";
163
168
  import { ERROR_CODES, ERROR_CODES_DOCS_URL, errorCodeDocsUrl, errorCodeOf, explainErrorCode, isWarlockErrorCode } from "./errors/error-codes.mjs";
164
169
  import { LocaleDictionaryError, parseLocaleDictionary } from "./localization/parse-locale-dictionary.mjs";
165
170
  import { registerGroupedTranslationKeys, registerLocaleDictionary, unregisterLocaleDictionary } from "./localization/register-locale-dictionary.mjs";
@@ -181,7 +186,7 @@ import { RegisterResource } from "./resource/register-resource.mjs";
181
186
  import "./resource/index.mjs";
182
187
  import { Restful } from "./restful/restful.mjs";
183
188
  import "./restful/index.mjs";
184
- import { getSocketServer } from "./socket/utils.mjs";
189
+ import { broadcastSocketEvent, getSocketServer } from "./socket/utils.mjs";
185
190
  import "./socket/index.mjs";
186
191
  import { broadcastUseCaseResult } from "./use-cases/use-case-broadcast.mjs";
187
192
  import { fireLifecycleEvent, globalEventsCallbacksMap, globalUseCasesEvents } from "./use-cases/use-case-events.mjs";
@@ -198,4 +203,4 @@ import { colors } from "@mongez/copper";
198
203
 
199
204
  export * from "@mongez/localization"
200
205
 
201
- export { $registerUseCase, $unregisterUseCase, APP_ROLES, AUTH_GUARD_MARKER, AccessConnector, AiConnector, Application, BOOT_SIGNAL_ENV_KEY, BOOT_SIGNAL_VERSION, BadRequestError, BadSchemaUseCaseError, BaseConnector, BenchmarkProfiler, BenchmarkSnapshots, CLICommand, CacheConnector, CascadeAdapter, CascadeQueryBuilder, CloudDriver, ConfigSpecialHandlers, ConflictError, ConnectorLifecyclePhase, ConnectorPriority, ConnectorsManager, ConsoleChannel, CookieJarUnavailableError, DEFAULT_CSP_DIRECTIVES, DEFAULT_POSTMAN_BASE_URL, DOSpacesDriver, DatabaseCacheDriver, DatabaseConnector, DatabaseLog, DatabaseLogModel, ERROR_CODES, ERROR_CODES_DOCS_URL, FileValidator, ForbiddenError, HeraldConnector, HttpConnector, HttpError, HttpErrorCodes, Image, ImageVariantsConfigError, InvalidConfigError, InvalidCspDirectiveError, LocalDriver, LocaleDictionaryError, LoggerConnector, MAIL_EVENTS, Mail, MailError, MailerConnector, MimeTypes, NULLABLE_RESOURCE, NoopChannel, NotAcceptableError, NotAllowedError, NotificationsConnector, OPENAPI_JSON_SCHEMA_DIALECT, POSTMAN_COLLECTION_SCHEMA, Path, PortInUseError, Queue, R2Driver, RegisterResource, RepositoryManager, Request, RequestController, RequestLog, Resource, ResourceFieldBuilder, ResourceNotFoundError, Response, ResponseStatus, Restful, RouteNameTakenError, RouteRegistry, Router, S3Driver, SUPPORTED_RUNTIMES_DOCS_URL, ScopedStorage, SeederDependencyCycleError, ServerError, SocketConnector, Storage, StorageCapabilityError, StorageConnector, StorageError, StorageFile, StorageNotInitializedError, UPDATE_MANY_BATCH_SIZE, UPLOADS_DEFAULTS, URL_CREDENTIAL_PARAMS, UnAuthorizedError, UnknownSeederDependencyError, UploadedFile, WarlockConfigManager, WarlockError, addUseCaseHistory, anyMatch, app, appLog, appPath, applyCspHeader, assertConfiguredHttpPortIsFree, assertMailCount, assertMailSent, assertNoReservedConnectorNames, assertNodeOnlyCommand, assertPortIsAvailable, assertSitesRequireWebRole, assertUniqueConnectorNames, assertValidConfigModules, assetsUrl, beginHttpDrain, bootstrap, broadcastUseCaseResult, buildCspHeaderValue, buildIdempotencyCacheKey, buildOpenApiDocument, buildRequestLogSnapshot, buildTracingContext, cachePath, captureMail, clearPositionalHandlerSuspects, clearTestMailbox, clock, closeAllMailers, closeMailer, closeServerWithTimeout, colors, command, config, configPath, configSpecialHandlers, connectorsManager, container, createHttpApplication, createRequestStore, createUploadedFileController, decrypt, defaultHttpConfigurations, defineConfig, defineConfigSchema, defineResource, deriveTraceId, describeJavaScriptRuntime, describePositionalHandlerSuspect, detectJavaScriptRuntime, dispatchPhase, dispatchRequestEnd, dispatchRequestStart, displayEnvironmentMode, encrypt, ensureFatalIsVisible, env, environment, errorCodeDocsUrl, errorCodeOf, escapeHeaderValue, evaluateConditionalRequest, exampleFromSchema, existsExceptCurrentIdRule, existsExceptCurrentUserRule, explainErrorCode, fetchLatestVersion, fileExtensionRule, fileRule, fileTypeRule, findMailsBySubject, findMailsTo, fireLifecycleEvent, forgetPositionalHandlerSuspects, formatConfigIssues, generateImageVariants, generateMailId, getDefaultMailConfig, getDevelopmentOpenApiDocument, getDevelopmentPostmanCollection, getExplicitMailMode, getHttpReadyReport, getHttpServer, getLastMail, getLocalized, getMailEventName, getMailMode, getMailboxSize, getMailer, getMailerConfig, getMimeType, getPoolStats, getPublicUrl, getRoles, getSites, getSocketServer, getTestMailbox, getUseCase, getUseCaseHistory, getUseCases, globalEventsCallbacksMap, globalUseCasesEvents, hasRole, hashBody, hashPassword, health, hmacHash, httpConfig, ids, imageRule, increaseUseCaseFailedCalls, increaseUseCaseSuccessCalls, inspectHandlerSignature, ipMatches, isAllowedCsrfOrigin, isAuthGuardMiddleware, isBootSignal, isConfigSchema, isDevelopmentMode, isNewerVersion, isNullableResource, isPortAvailable, isPrivateOrReservedIp, isProductionMode, isSafeRedirect, isTestMode, isTracingEnabled, isUnguardedMutatingRoute, isUnknownTsExtensionError, isUnresolvedConfigImportError, isUnsupportedTypeStrippingError, isValidIdempotencyKey, isWarlockErrorCode, listPositionalHandlerSuspects, loadS3, logResponse, logsPath, looksLikePositionalHandler, mailEvents, markAuthGuard, matchesDerivedRouteName, matchesIfMatch, matchesIfNoneMatch, measure, mergeCspDirectives, middleware, nodeOnlyCommandError, normalizeOrigin, normalizeRequestPath, normalizeRoutePath, notifyHttpServerRebuilt, nullable, onHttpServerRebuilt, openApiToPostmanCollection, originOf, ownOrigin, parseEntityTag, parseEntityTagList, parseLocaleDictionary, parseRoles, parseSites, parseSize, parseTraceparentTraceId, paths, preflightConfiguredHttpPort, promiseAllObject, publicPath, publicUrl, purgeImageVariants, redactQueryCredentials, redactUrlCredentials, registerAppConfig, registerConfiguredConnectors, registerDevelopmentOpenApiProvider, registerGroupedTranslationKeys, registerHttpPlugins, registerLocaleDictionary, registerTracingHooks, remedyLines, renderReact, renderReactMail, reportPositionalHandlerSuspects, reportUnguardedMutatingRoutes, requestContext, requestMemo, requiresDefaultCsrfGuard, resetHttpReadyReport, resetMailConfig, resetMailMode, resetRolesCacheForTests, resetTracingConfigForTests, resetUnguardedRouteReports, resolveCspConfig, resolveCsrfOriginVerdict, resolveImageVariant, resolveMailConfig, resolvePublicRoot, resolveRequestLoggingOptions, resolveTracingConfig, resolveWithinRoot, rootPath, routeNameMethodSuffix, router, runDefaultCsrfGuard, runPipeline, safeFetchToBuffer, safeRedirect, sanitizePath, seeder, sendBootSignal, sendMail, serializeCspDirectives, servesHttp, setBaseUrl, setClockSource, setConfig, setEnvironment, setHttpReadyReport, setIdsSource, setLogConfigurations, setMailConfigurations, setMailMode, shouldPreflightHttpPort, sleep, sluggable, srcPath, startHttpServer, stopHttpApplication, storage, storageConfig, storageConfigurations, storageDriverContext, storagePath, streamReactResponse, strongEntityTagMatch, t, tempPath, toJson, toSingleLineSseField, trackConnectionsForDrain, uniqueExceptCurrentIdRule, uniqueExceptCurrentUserRule, unregisterLocaleDictionary, unverifiedBuildRuntimeNotice, uploadedFileController, uploadedFileMetadataSchema, uploadsConfig, uploadsPath, uploadsUrl, url, useCase, useComputedModel, useComputedSlug, useCurrentUser, useHashedPassword, useRequest, useRequestStore, validateConfigValue, validateCspConfigAtBoot, validateCspDirectives, verifyMailer, verifyPassword, warlockConfigManager, warlockPath, wasMailSentTo, wasMailSentWithSubject, weakEntityTagMatch, wrapResponseInDataKey };
206
+ export { $registerUseCase, $unregisterUseCase, APP_ROLES, AUTH_GUARD_MARKER, AccessConnector, AiConnector, Application, BOOT_SIGNAL_ENV_KEY, BOOT_SIGNAL_VERSION, BadRequestError, BadSchemaUseCaseError, BaseConnector, BenchmarkProfiler, BenchmarkSnapshots, CLICommand, CacheConnector, CascadeAdapter, CascadeQueryBuilder, CloudDriver, ConfigSpecialHandlers, ConflictError, ConnectorLifecyclePhase, ConnectorPriority, ConnectorsManager, ConsoleChannel, CookieJarUnavailableError, DEFAULT_CSP_DIRECTIVES, DEFAULT_POSTMAN_BASE_URL, DOSpacesDriver, DatabaseCacheDriver, DatabaseConnector, DatabaseLog, DatabaseLogModel, ERROR_CODES, ERROR_CODES_DOCS_URL, FileValidator, ForbiddenError, HeraldConnector, HttpConnector, HttpError, HttpErrorCodes, Image, ImageVariantsConfigError, InvalidConfigError, InvalidCspDirectiveError, LocalDriver, LocaleDictionaryError, LoggerConnector, MAIL_EVENTS, Mail, MailError, MailerConnector, MemorySecretBackend, MimeTypes, NULLABLE_RESOURCE, NoopChannel, NotAcceptableError, NotAllowedError, NotificationsConnector, OPENAPI_JSON_SCHEMA_DIALECT, POSTMAN_COLLECTION_SCHEMA, Path, PortInUseError, Queue, R2Driver, RegisterResource, RepositoryManager, Request, RequestController, RequestLog, Resource, ResourceFieldBuilder, ResourceNotFoundError, Response, ResponseStatus, Restful, RouteNameTakenError, RouteRegistry, Router, S3Driver, SUPPORTED_RUNTIMES_DOCS_URL, ScopedStorage, SecretStore, SecretStoreError, SeederDependencyCycleError, ServerError, SocketConnector, Storage, StorageCapabilityError, StorageConnector, StorageError, StorageFile, StorageNotInitializedError, UPDATE_MANY_BATCH_SIZE, UPLOADS_DEFAULTS, URL_CREDENTIAL_PARAMS, UnAuthorizedError, UnknownSeederDependencyError, UploadedFile, WarlockConfigManager, WarlockError, addUseCaseHistory, anyMatch, app, appLog, appPath, applyCspHeader, assertConfiguredHttpPortIsFree, assertMailCount, assertMailSent, assertNoReservedConnectorNames, assertNodeOnlyCommand, assertPortIsAvailable, assertSitesRequireWebRole, assertUniqueConnectorNames, assertValidConfigModules, assetsUrl, beginHttpDrain, bootstrap, broadcastSocketEvent, broadcastUseCaseResult, buildCspHeaderValue, buildIdempotencyCacheKey, buildOpenApiDocument, buildRequestLogSnapshot, buildTracingContext, cachePath, captureMail, clearPositionalHandlerSuspects, clearTestMailbox, clock, closeAllMailers, closeMailer, closeServerWithTimeout, colors, command, config, configPath, configSpecialHandlers, connectorsManager, container, createHttpApplication, createRequestStore, createUploadedFileController, decrypt, defaultHttpConfigurations, defineConfig, defineConfigSchema, defineResource, deriveTraceId, describeJavaScriptRuntime, describePositionalHandlerSuspect, detectJavaScriptRuntime, dispatchPhase, dispatchRequestEnd, dispatchRequestStart, displayEnvironmentMode, encrypt, ensureFatalIsVisible, env, environment, errorCodeDocsUrl, errorCodeOf, escapeHeaderValue, evaluateConditionalRequest, exampleFromSchema, existsExceptCurrentIdRule, existsExceptCurrentUserRule, explainErrorCode, fetchLatestVersion, fileExtensionRule, fileRule, fileTypeRule, findMailsBySubject, findMailsTo, fireLifecycleEvent, forgetPositionalHandlerSuspects, formatConfigIssues, generateImageVariants, generateMailId, getDefaultMailConfig, getDevelopmentOpenApiDocument, getDevelopmentPostmanCollection, getExplicitMailMode, getHttpReadyReport, getHttpServer, getLastMail, getLocalized, getMailEventName, getMailMode, getMailboxSize, getMailer, getMailerConfig, getMimeType, getPoolStats, getPublicUrl, getRoles, getSites, getSocketServer, getTestMailbox, getUseCase, getUseCaseHistory, getUseCases, globalEventsCallbacksMap, globalUseCasesEvents, hasRole, hashBody, hashPassword, health, hmacHash, httpConfig, ids, imageRule, increaseUseCaseFailedCalls, increaseUseCaseSuccessCalls, inspectHandlerSignature, ipMatches, isAllowedCsrfOrigin, isAuthGuardMiddleware, isBootSignal, isConfigSchema, isDevelopmentMode, isNewerVersion, isNullableResource, isPortAvailable, isPrivateOrReservedIp, isProductionMode, isSafeRedirect, isTestMode, isTracingEnabled, isUnguardedMutatingRoute, isUnknownTsExtensionError, isUnresolvedConfigImportError, isUnsupportedTypeStrippingError, isValidIdempotencyKey, isWarlockErrorCode, listPositionalHandlerSuspects, loadS3, logResponse, logsPath, looksLikePositionalHandler, mailEvents, markAuthGuard, matchesDerivedRouteName, matchesIfMatch, matchesIfNoneMatch, measure, mergeCspDirectives, middleware, nodeOnlyCommandError, normalizeOrigin, normalizeRequestPath, normalizeRoutePath, notifyHttpServerRebuilt, nullable, onHttpServerRebuilt, openApiToPostmanCollection, originOf, ownOrigin, parseEntityTag, parseEntityTagList, parseLocaleDictionary, parseRoles, parseSites, parseSize, parseTraceparentTraceId, paths, preflightConfiguredHttpPort, promiseAllObject, publicPath, publicUrl, purgeImageVariants, redactQueryCredentials, redactUrlCredentials, registerAppConfig, registerConfiguredConnectors, registerDevelopmentOpenApiProvider, registerGroupedTranslationKeys, registerHttpPlugins, registerLocaleDictionary, registerTracingHooks, remedyLines, renderReact, renderReactMail, reportPositionalHandlerSuspects, reportUnguardedMutatingRoutes, requestContext, requestMemo, requiresDefaultCsrfGuard, resetHttpReadyReport, resetMailConfig, resetMailMode, resetRolesCacheForTests, resetTracingConfigForTests, resetUnguardedRouteReports, resolveCspConfig, resolveCsrfOriginVerdict, resolveImageVariant, resolveMailConfig, resolvePublicRoot, resolveRequestLoggingOptions, resolveTracingConfig, resolveWithinRoot, rootPath, routeNameMethodSuffix, router, runDefaultCsrfGuard, runPipeline, safeFetchToBuffer, safeRedirect, sanitizePath, secrets, seeder, sendBootSignal, sendMail, serializeCspDirectives, servesHttp, setBaseUrl, setClockSource, setConfig, setEnvironment, setHttpReadyReport, setIdsSource, setLogConfigurations, setMailConfigurations, setMailMode, shouldPreflightHttpPort, sleep, sluggable, srcPath, startHttpServer, stopHttpApplication, storage, storageConfig, storageConfigurations, storageDriverContext, storagePath, streamReactResponse, strongEntityTagMatch, t, tempPath, toJson, toSingleLineSseField, trackConnectionsForDrain, uniqueExceptCurrentIdRule, uniqueExceptCurrentUserRule, unregisterLocaleDictionary, unverifiedBuildRuntimeNotice, uploadedFileController, uploadedFileMetadataSchema, uploadsConfig, uploadsPath, uploadsUrl, url, useCase, useComputedModel, useComputedSlug, useCurrentUser, useHashedPassword, useRequest, useRequestStore, validateConfigValue, validateCspConfigAtBoot, validateCspDirectives, verifyMailer, verifyPassword, warlockConfigManager, warlockPath, wasMailSentTo, wasMailSentWithSubject, weakEntityTagMatch, wrapResponseInDataKey };
@@ -0,0 +1,9 @@
1
+ //#region ../../packages/core/src/secrets/errors.d.ts
2
+ export type SecretStoreErrorCode = "INVALID_NAME" | "INVALID_VALUE" | "INVALID_NAMESPACE" | "READ_ONLY" | "KEY_REQUIRED" | "UNAVAILABLE" | "UNSAFE_FILE" | "CORRUPT_FILE";
3
+ /** Safe to log: never carries names, values, paths, or vendor error causes. */
4
+ export declare class SecretStoreError extends Error {
5
+ readonly code: SecretStoreErrorCode;
6
+ constructor(code: SecretStoreErrorCode);
7
+ }
8
+ //#endregion
9
+ //# sourceMappingURL=errors.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.mts","names":[],"sources":["../../../../../../../../packages/core/src/secrets/errors.ts"],"mappings":";YAAY;;qBAWC,yBAAyB;WACD,MAAM;EAAzC,YAAmC,MAAM"}
@@ -0,0 +1,22 @@
1
+ //#region ../../packages/core/src/secrets/errors.ts
2
+ /** Safe to log: never carries names, values, paths, or vendor error causes. */
3
+ var SecretStoreError = class extends Error {
4
+ constructor(code) {
5
+ super({
6
+ INVALID_NAME: "Secret names must be valid Unicode strings of 1 to 256 UTF-16 code units.",
7
+ INVALID_VALUE: "Secret values must be strings.",
8
+ INVALID_NAMESPACE: "A nonempty secret store namespace is required.",
9
+ READ_ONLY: "This secret is supplied by a read-only environment variable.",
10
+ KEY_REQUIRED: "File secrets require encryption.key: exactly 64 hexadecimal characters.",
11
+ UNAVAILABLE: "The selected secret backend is unavailable. No unsafe write was attempted.",
12
+ UNSAFE_FILE: "Secret storage must use an owned, private directory and regular files.",
13
+ CORRUPT_FILE: "A secret file could not be authenticated. Check the app key and restore a backup."
14
+ }[code]);
15
+ this.code = code;
16
+ this.name = "SecretStoreError";
17
+ }
18
+ };
19
+
20
+ //#endregion
21
+ export { SecretStoreError };
22
+ //# sourceMappingURL=errors.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.mjs","names":[],"sources":["../../../../../../../../packages/core/src/secrets/errors.ts"],"sourcesContent":["export type SecretStoreErrorCode =\n | \"INVALID_NAME\"\n | \"INVALID_VALUE\"\n | \"INVALID_NAMESPACE\"\n | \"READ_ONLY\"\n | \"KEY_REQUIRED\"\n | \"UNAVAILABLE\"\n | \"UNSAFE_FILE\"\n | \"CORRUPT_FILE\";\n\n/** Safe to log: never carries names, values, paths, or vendor error causes. */\nexport class SecretStoreError extends Error {\n public constructor(public readonly code: SecretStoreErrorCode) {\n super(\n {\n INVALID_NAME: \"Secret names must be valid Unicode strings of 1 to 256 UTF-16 code units.\",\n INVALID_VALUE: \"Secret values must be strings.\",\n INVALID_NAMESPACE: \"A nonempty secret store namespace is required.\",\n READ_ONLY: \"This secret is supplied by a read-only environment variable.\",\n KEY_REQUIRED: \"File secrets require encryption.key: exactly 64 hexadecimal characters.\",\n UNAVAILABLE: \"The selected secret backend is unavailable. No unsafe write was attempted.\",\n UNSAFE_FILE: \"Secret storage must use an owned, private directory and regular files.\",\n CORRUPT_FILE:\n \"A secret file could not be authenticated. Check the app key and restore a backup.\",\n }[code],\n );\n this.name = \"SecretStoreError\";\n }\n}\n"],"mappings":";;AAWA,IAAa,mBAAb,cAAsC,MAAM;CAC1C,AAAO,YAAY,AAAgB,MAA4B;EAC7D,MACE;GACE,cAAc;GACd,eAAe;GACf,mBAAmB;GACnB,WAAW;GACX,cAAc;GACd,aAAa;GACb,aAAa;GACb,cACE;EACJ,EAAE,KACJ;EAbiC;EAcjC,KAAK,OAAO;CACd;AACF"}