@warlock.js/core 4.11.0 → 4.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +200 -0
- package/esm/cli/cli-commands.manager.mjs +28 -5
- package/esm/cli/cli-commands.manager.mjs.map +1 -1
- package/esm/cli/commands/add.command.mjs +5 -3
- package/esm/cli/commands/add.command.mjs.map +1 -1
- package/esm/cli/commands/build.command.mjs +1 -1
- package/esm/cli/commands/build.command.mjs.map +1 -1
- package/esm/cli/commands/create-database.command.mjs +1 -1
- package/esm/cli/commands/create-database.command.mjs.map +1 -1
- package/esm/cli/commands/dev-server.command.mjs +1 -1
- package/esm/cli/commands/dev-server.command.mjs.map +1 -1
- package/esm/cli/commands/doctor/doctor-command.action.mjs.map +1 -1
- package/esm/cli/commands/doctor.command.mjs +1 -1
- package/esm/cli/commands/doctor.command.mjs.map +1 -1
- package/esm/cli/commands/drop-tables.command.mjs +1 -1
- package/esm/cli/commands/drop-tables.command.mjs.map +1 -1
- package/esm/cli/commands/generate/generate.command.mjs +43 -22
- package/esm/cli/commands/generate/generate.command.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/controller.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/migration.generator.mjs +1 -1
- package/esm/cli/commands/generate/generators/migration.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/model.generator.mjs +1 -1
- package/esm/cli/commands/generate/generators/model.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/module.generator.mjs +1 -1
- package/esm/cli/commands/generate/generators/module.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/repository.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/resource.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/generators/service.generator.mjs.map +1 -1
- package/esm/cli/commands/generate/utils/path-resolver.mjs +1 -1
- package/esm/cli/commands/generate/utils/writer.mjs +1 -1
- package/esm/cli/commands/migrate.command.mjs +7 -3
- package/esm/cli/commands/migrate.command.mjs.map +1 -1
- package/esm/cli/commands/routes/routes-command.action.mjs.map +1 -1
- package/esm/cli/commands/routes.command.mjs +1 -1
- package/esm/cli/commands/routes.command.mjs.map +1 -1
- package/esm/cli/commands/seed.command.mjs +1 -1
- package/esm/cli/commands/seed.command.mjs.map +1 -1
- package/esm/cli/commands/start-production.command.mjs +1 -1
- package/esm/cli/commands/start-production.command.mjs.map +1 -1
- package/esm/cli/commands/storage-put.action.mjs.map +1 -1
- package/esm/cli/commands/storage-put.command.mjs +1 -1
- package/esm/cli/commands/storage-put.command.mjs.map +1 -1
- package/esm/cli/commands/typings-generator.command.mjs +2 -2
- package/esm/cli/commands/typings-generator.command.mjs.map +1 -1
- package/esm/cli/commands/update.command.mjs +1 -1
- package/esm/cli/commands/update.command.mjs.map +1 -1
- package/esm/cli/commands-loader.mjs +1 -1
- package/esm/cli/commands-loader.mjs.map +1 -1
- package/esm/cli/parse-cli-args.mjs +86 -9
- package/esm/cli/parse-cli-args.mjs.map +1 -1
- package/esm/{cli → commands}/cli-command.d.mts +1 -1
- package/esm/commands/cli-command.d.mts.map +1 -0
- package/esm/{cli → commands}/cli-command.mjs +1 -1
- package/esm/commands/cli-command.mjs.map +1 -0
- package/esm/{cli → commands}/types.d.mts +1 -1
- package/esm/commands/types.d.mts.map +1 -0
- package/esm/config/load-config-files.mjs +1 -1
- package/esm/config/load-config-files.mjs.map +1 -1
- package/esm/connectors/base-connector.mjs +1 -1
- package/esm/connectors/base-connector.mjs.map +1 -1
- package/esm/connectors/connectors-manager.d.mts.map +1 -1
- package/esm/connectors/connectors-manager.mjs +5 -3
- package/esm/connectors/connectors-manager.mjs.map +1 -1
- package/esm/connectors/http-connector.d.mts.map +1 -1
- package/esm/connectors/http-connector.mjs +0 -2
- package/esm/connectors/http-connector.mjs.map +1 -1
- package/esm/database/create-database-action.mjs.map +1 -1
- package/esm/database/drop-tables-action.mjs.map +1 -1
- package/esm/database/migrate-action.mjs +54 -2
- package/esm/database/migrate-action.mjs.map +1 -1
- package/esm/database/pending-exit-code.mjs +39 -0
- package/esm/database/pending-exit-code.mjs.map +1 -0
- package/esm/database/resolve-pending-migrations.mjs +49 -0
- package/esm/database/resolve-pending-migrations.mjs.map +1 -0
- package/esm/database/seed-command-action.mjs +1 -1
- package/esm/database/seed-command-action.mjs.map +1 -1
- package/esm/dev-server/dev-logger.mjs +1 -1
- package/esm/dev-server/dev-logger.mjs.map +1 -1
- package/esm/dev-server/development-server.mjs +2 -2
- package/esm/dev-server/file-event-handler.mjs +1 -1
- package/esm/dev-server/file-event-handler.mjs.map +1 -1
- package/esm/dev-server/file-manager.mjs +1 -1
- package/esm/dev-server/file-manager.mjs.map +1 -1
- package/esm/dev-server/file-operations.mjs +1 -1
- package/esm/dev-server/file-operations.mjs.map +1 -1
- package/esm/dev-server/files-orchestrator.mjs +3 -18
- package/esm/dev-server/files-orchestrator.mjs.map +1 -1
- package/esm/dev-server/files-watcher.mjs +1 -1
- package/esm/dev-server/files-watcher.mjs.map +1 -1
- package/esm/dev-server/health-checker/file-health-checker.contract.d.mts +1 -1
- package/esm/dev-server/layer-executor.mjs +1 -1
- package/esm/dev-server/loader/register-loader.mjs +1 -1
- package/esm/dev-server/package-json-manager.mjs +1 -1
- package/esm/dev-server/package-json-manager.mjs.map +1 -1
- package/esm/dev-server/parse-imports.mjs +2 -2
- package/esm/dev-server/parse-imports.mjs.map +1 -1
- package/esm/dev-server/tsconfig-manager.mjs +1 -1
- package/esm/dev-server/tsconfig-manager.mjs.map +1 -1
- package/esm/dev-server/type-generator.mjs +1 -1
- package/esm/dev-server/type-generator.mjs.map +1 -1
- package/esm/dev-server/utils.mjs +1 -1
- package/esm/dev-server/utils.mjs.map +1 -1
- package/esm/generations/add-command.action.mjs +3 -3
- package/esm/generations/add-command.action.mjs.map +1 -1
- package/esm/http/build-cors-options.mjs +32 -0
- package/esm/http/build-cors-options.mjs.map +1 -0
- package/esm/http/middleware/max-body-size.middleware.d.mts +13 -5
- package/esm/http/middleware/max-body-size.middleware.d.mts.map +1 -1
- package/esm/http/middleware/max-body-size.middleware.mjs +13 -5
- package/esm/http/middleware/max-body-size.middleware.mjs.map +1 -1
- package/esm/http/plugins.d.mts.map +1 -1
- package/esm/http/plugins.mjs +2 -9
- package/esm/http/plugins.mjs.map +1 -1
- package/esm/http/server.d.mts.map +1 -1
- package/esm/http/server.mjs +3 -8
- package/esm/http/server.mjs.map +1 -1
- package/esm/image/image.d.mts +3 -2
- package/esm/image/image.d.mts.map +1 -1
- package/esm/image/image.mjs +63 -17
- package/esm/image/image.mjs.map +1 -1
- package/esm/index.d.mts +9 -17
- package/esm/index.mjs +4 -15
- package/esm/mail/mailer-pool.d.mts.map +1 -1
- package/esm/mail/mailer-pool.mjs.map +1 -1
- package/esm/production/production-builder.mjs +51 -3
- package/esm/production/production-builder.mjs.map +1 -1
- package/esm/production/resolve-build-config.mjs +1 -1
- package/esm/production/resolve-build-config.mjs.map +1 -1
- package/esm/react/index.d.mts +4 -0
- package/esm/react/index.d.mts.map +1 -1
- package/esm/react/index.mjs +88 -14
- package/esm/react/index.mjs.map +1 -1
- package/esm/router/router.d.mts +9 -0
- package/esm/router/router.d.mts.map +1 -1
- package/esm/router/router.mjs +58 -5
- package/esm/router/router.mjs.map +1 -1
- package/esm/router/types.d.mts +24 -1
- package/esm/router/types.d.mts.map +1 -1
- package/esm/tests/index.d.mts +2 -2
- package/esm/tests/index.mjs +1 -2
- package/esm/tests/start-http-development-server.d.mts.map +1 -1
- package/esm/tests/start-http-development-server.mjs +38 -15
- package/esm/tests/start-http-development-server.mjs.map +1 -1
- package/esm/tests/test-helpers.d.mts.map +1 -1
- package/esm/tests/test-helpers.mjs +34 -13
- package/esm/tests/test-helpers.mjs.map +1 -1
- package/esm/tests/vitest-setup.d.mts +1 -1
- package/esm/tests/vitest-setup.d.mts.map +1 -1
- package/esm/tests/vitest-setup.mjs +3 -3
- package/esm/tests/vitest-setup.mjs.map +1 -1
- package/esm/utils/framework-vesion.mjs +1 -1
- package/esm/utils/index.d.mts +1 -0
- package/esm/utils/index.mjs +1 -0
- package/esm/utils/normalized-path.d.mts +55 -0
- package/esm/utils/normalized-path.d.mts.map +1 -0
- package/esm/{dev-server/path.mjs → utils/normalized-path.mjs} +15 -2
- package/esm/utils/normalized-path.mjs.map +1 -0
- package/esm/vite/index.d.mts +2 -0
- package/esm/vite/index.mjs +1 -1
- package/esm/vite/lower-stage3-decorators.d.mts +1 -1
- package/esm/vite/lower-stage3-decorators.mjs +1 -1
- package/esm/vite/lower-stage3-decorators.mjs.map +1 -1
- package/esm/warlock-config/index.mjs +1 -1
- package/esm/warlock-config/types.d.mts +34 -1
- package/esm/warlock-config/types.d.mts.map +1 -1
- package/esm/warlock-config/warlock-config.manager.d.mts.map +1 -1
- package/esm/warlock-config/warlock-config.manager.mjs +1 -2
- package/esm/warlock-config/warlock-config.manager.mjs.map +1 -1
- package/llms-full.txt +78 -23
- package/llms.txt +3 -3
- package/package.json +24 -12
- package/skills/lower-stage3-decorators/SKILL.md +4 -2
- package/skills/process-image/SKILL.md +3 -1
- package/skills/run-app/SKILL.md +6 -0
- package/skills/test-http/SKILL.md +29 -10
- package/skills/test-service/SKILL.md +12 -8
- package/skills/use-middleware/SKILL.md +5 -1
- package/skills/write-cli-command/SKILL.md +19 -1
- package/esm/cli/cli-command.d.mts.map +0 -1
- package/esm/cli/cli-command.mjs.map +0 -1
- package/esm/cli/types.d.mts.map +0 -1
- package/esm/dev-server/files-orchestrator.d.mts +0 -89
- package/esm/dev-server/files-orchestrator.d.mts.map +0 -1
- package/esm/dev-server/files-watcher.d.mts +0 -69
- package/esm/dev-server/files-watcher.d.mts.map +0 -1
- package/esm/dev-server/health-checker/checkers/base-health-checker.d.mts +0 -55
- package/esm/dev-server/health-checker/checkers/base-health-checker.d.mts.map +0 -1
- package/esm/dev-server/health-checker/checkers/eslint-health-checker.d.mts +0 -44
- package/esm/dev-server/health-checker/checkers/eslint-health-checker.d.mts.map +0 -1
- package/esm/dev-server/health-checker/checkers/typescript-health-checker.d.mts +0 -60
- package/esm/dev-server/health-checker/checkers/typescript-health-checker.d.mts.map +0 -1
- package/esm/dev-server/health-checker/files-healthcare.manager.d.mts +0 -119
- package/esm/dev-server/health-checker/files-healthcare.manager.d.mts.map +0 -1
- package/esm/dev-server/health-checker/index.mjs +0 -7
- package/esm/dev-server/module-loader.d.mts +0 -63
- package/esm/dev-server/module-loader.d.mts.map +0 -1
- package/esm/dev-server/path.mjs.map +0 -1
- package/esm/tests/test-server-port-channel.d.mts +0 -27
- package/esm/tests/test-server-port-channel.d.mts.map +0 -1
- /package/esm/{cli → commands}/index.d.mts +0 -0
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { FileManager } from "../../file-manager.mjs";
|
|
2
|
-
import { FileHealthResult } from "../file-health-result.mjs";
|
|
3
|
-
import { FileHealthCheckerContract, HealthCheckerFilesStats } from "../file-health-checker.contract.mjs";
|
|
4
|
-
|
|
5
|
-
//#region ../core/src/dev-server/health-checker/checkers/base-health-checker.d.ts
|
|
6
|
-
type CheckerFile = {
|
|
7
|
-
file: FileManager;
|
|
8
|
-
healthResult: FileHealthResult;
|
|
9
|
-
};
|
|
10
|
-
declare abstract class BaseHealthChecker implements FileHealthCheckerContract {
|
|
11
|
-
/**
|
|
12
|
-
* List of checked files
|
|
13
|
-
*/
|
|
14
|
-
protected files: Map<string, CheckerFile>;
|
|
15
|
-
/**
|
|
16
|
-
* Health checker name (unique identifier)
|
|
17
|
-
*/
|
|
18
|
-
abstract name: string;
|
|
19
|
-
/**
|
|
20
|
-
* Path to worker file (without extension)
|
|
21
|
-
*
|
|
22
|
-
* If provided, the checker runs in a dedicated worker thread.
|
|
23
|
-
* If undefined, the checker runs in the main thread.
|
|
24
|
-
*
|
|
25
|
-
* @see FileHealthCheckerContract.workerPath
|
|
26
|
-
*/
|
|
27
|
-
workerPath?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Initialize the health checker
|
|
30
|
-
*/
|
|
31
|
-
abstract initialize(): void;
|
|
32
|
-
/**
|
|
33
|
-
* Detect when files are changed
|
|
34
|
-
*/
|
|
35
|
-
onFileChanges(files: FileManager[]): Promise<void>;
|
|
36
|
-
/**
|
|
37
|
-
* Remove the given file from the checker
|
|
38
|
-
*/
|
|
39
|
-
removeFile(file: FileManager): BaseHealthChecker;
|
|
40
|
-
/**
|
|
41
|
-
* Validate the health of the file
|
|
42
|
-
*/
|
|
43
|
-
check(file: FileManager): Promise<FileHealthResult>;
|
|
44
|
-
/**
|
|
45
|
-
* Validate the health of the file
|
|
46
|
-
*/
|
|
47
|
-
abstract validate(file: FileManager, result: FileHealthResult): Promise<FileHealthResult>;
|
|
48
|
-
/**
|
|
49
|
-
* Get the stats of the health checker
|
|
50
|
-
*/
|
|
51
|
-
stats(): Promise<HealthCheckerFilesStats>;
|
|
52
|
-
}
|
|
53
|
-
//#endregion
|
|
54
|
-
export { BaseHealthChecker };
|
|
55
|
-
//# sourceMappingURL=base-health-checker.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-health-checker.d.mts","names":[],"sources":["../../../../../../../../../core/src/dev-server/health-checker/checkers/base-health-checker.ts"],"mappings":";;;;;KAOK,WAAA;EACH,IAAA,EAAM,WAAA;EACN,YAAA,EAAc,gBAAgB;AAAA;AAAA,uBAGV,iBAAA,YAA6B,yBAAA;EAHnB;;;EAAA,UAOpB,KAAA,EAAO,GAAA,SAAY,WAAA;EAPf;;AAAgB;EAAhB,SAYE,IAAA;EATsB;;;;;;;;EAmB/B,UAAA;EAyBwC;;;EAAA,SApB/B,UAAA;EAkC+D;;;EA7BlE,aAAA,CAAc,KAAA,EAAO,WAAA,KAAgB,OAAA;EA7BD;;;EAoC1C,UAAA,CAAW,IAAA,EAAM,WAAA,GAAc,iBAAA;EAhC5B;;;EAwCG,KAAA,CAAM,IAAA,EAAM,WAAA,GAAc,OAAA,CAAQ,gBAAA;EAzBxC;;;EAAA,SAuCS,QAAA,CAAS,IAAA,EAAM,WAAA,EAAa,MAAA,EAAQ,gBAAA,GAAmB,OAAA,CAAQ,gBAAA;EA7BpD;;;EAkCd,KAAA,IAAS,OAAA,CAAQ,uBAAA;AAAA"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { FileManager } from "../../file-manager.mjs";
|
|
2
|
-
import { FileHealthResult } from "../file-health-result.mjs";
|
|
3
|
-
import { FileHealthCheckerContract } from "../file-health-checker.contract.mjs";
|
|
4
|
-
import { BaseHealthChecker } from "./base-health-checker.mjs";
|
|
5
|
-
|
|
6
|
-
//#region ../core/src/dev-server/health-checker/checkers/eslint-health-checker.d.ts
|
|
7
|
-
declare class EslintHealthChecker extends BaseHealthChecker implements FileHealthCheckerContract {
|
|
8
|
-
/**
|
|
9
|
-
* ESLint instance (using new ESLint v9 API with flat config)
|
|
10
|
-
*/
|
|
11
|
-
private eslint;
|
|
12
|
-
/**
|
|
13
|
-
* Health checker name
|
|
14
|
-
*/
|
|
15
|
-
name: string;
|
|
16
|
-
/**
|
|
17
|
-
* Path to dedicated worker file for ESLint checking
|
|
18
|
-
* Runs in a separate thread to avoid blocking the main dev server
|
|
19
|
-
*/
|
|
20
|
-
workerPath: string;
|
|
21
|
-
/**
|
|
22
|
-
* Whether checker is initialized
|
|
23
|
-
*/
|
|
24
|
-
private initialized;
|
|
25
|
-
/**
|
|
26
|
-
* Check if file is a lintable file
|
|
27
|
-
*/
|
|
28
|
-
private isLintableFile;
|
|
29
|
-
/**
|
|
30
|
-
* Initialize the health checker
|
|
31
|
-
*/
|
|
32
|
-
initialize(): EslintHealthChecker;
|
|
33
|
-
/**
|
|
34
|
-
* Display health check results in a pretty format
|
|
35
|
-
*/
|
|
36
|
-
private displayResults;
|
|
37
|
-
/**
|
|
38
|
-
* Validate the health of the file
|
|
39
|
-
*/
|
|
40
|
-
validate(file: FileManager, result: FileHealthResult): Promise<FileHealthResult>;
|
|
41
|
-
}
|
|
42
|
-
//#endregion
|
|
43
|
-
export { EslintHealthChecker };
|
|
44
|
-
//# sourceMappingURL=eslint-health-checker.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eslint-health-checker.d.mts","names":[],"sources":["../../../../../../../../../core/src/dev-server/health-checker/checkers/eslint-health-checker.ts"],"mappings":";;;;;;cASa,mBAAA,SAA4B,iBAAA,YAA6B,yBAAA;;AAAtE;;UAIU,MAAA;EA+Ba;;;EA1Bd,IAAA;EA2K6D;;;;EArK7D,UAAA;EAfgC;;;EAAA,QAoB/B,WAAA;EALD;;;EAAA,QAUC,cAAA;EAUa;;;EAAd,UAAA,IAAc,mBAAA;EAiJC;;;EAAA,QA5Gd,cAAA;EA4GoE;;AAAgB;EAA/E,QAAA,CAAS,IAAA,EAAM,WAAA,EAAa,MAAA,EAAQ,gBAAA,GAAmB,OAAA,CAAQ,gBAAA;AAAA"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { FileManager } from "../../file-manager.mjs";
|
|
2
|
-
import { FileHealthResult } from "../file-health-result.mjs";
|
|
3
|
-
import { FileHealthCheckerContract } from "../file-health-checker.contract.mjs";
|
|
4
|
-
import { BaseHealthChecker } from "./base-health-checker.mjs";
|
|
5
|
-
|
|
6
|
-
//#region ../core/src/dev-server/health-checker/checkers/typescript-health-checker.d.ts
|
|
7
|
-
declare class TypescriptHealthChecker extends BaseHealthChecker implements FileHealthCheckerContract {
|
|
8
|
-
/**
|
|
9
|
-
* Cached TypeScript program instance
|
|
10
|
-
*/
|
|
11
|
-
private program;
|
|
12
|
-
/**
|
|
13
|
-
* Cached parsed TypeScript configuration
|
|
14
|
-
*/
|
|
15
|
-
private parsedConfig;
|
|
16
|
-
/**
|
|
17
|
-
* Health checker name
|
|
18
|
-
*/
|
|
19
|
-
name: string;
|
|
20
|
-
/**
|
|
21
|
-
* Path to dedicated worker file for TypeScript checking
|
|
22
|
-
* Runs in a separate thread to avoid blocking the main dev server
|
|
23
|
-
*/
|
|
24
|
-
workerPath: string;
|
|
25
|
-
/**
|
|
26
|
-
* Whether checker is initialized
|
|
27
|
-
*/
|
|
28
|
-
private initialized;
|
|
29
|
-
/**
|
|
30
|
-
* Check if file is a TypeScript file
|
|
31
|
-
*/
|
|
32
|
-
private isTypeScriptFile;
|
|
33
|
-
/**
|
|
34
|
-
* Extract line and column from diagnostic location
|
|
35
|
-
*/
|
|
36
|
-
private getDiagnosticLocation;
|
|
37
|
-
/**
|
|
38
|
-
* Format diagnostic message
|
|
39
|
-
*/
|
|
40
|
-
private formatDiagnosticMessage;
|
|
41
|
-
/**
|
|
42
|
-
* Display health check results in a pretty format
|
|
43
|
-
*/
|
|
44
|
-
private displayResults;
|
|
45
|
-
/**
|
|
46
|
-
* Detect when files are changed
|
|
47
|
-
*/
|
|
48
|
-
onFileChanges(files: FileManager[]): Promise<void>;
|
|
49
|
-
/**
|
|
50
|
-
* Initialize the health checker
|
|
51
|
-
*/
|
|
52
|
-
initialize(): TypescriptHealthChecker;
|
|
53
|
-
/**
|
|
54
|
-
* Validate the health of the file
|
|
55
|
-
*/
|
|
56
|
-
validate(file: FileManager, result: FileHealthResult): Promise<FileHealthResult>;
|
|
57
|
-
}
|
|
58
|
-
//#endregion
|
|
59
|
-
export { TypescriptHealthChecker };
|
|
60
|
-
//# sourceMappingURL=typescript-health-checker.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typescript-health-checker.d.mts","names":[],"sources":["../../../../../../../../../core/src/dev-server/health-checker/checkers/typescript-health-checker.ts"],"mappings":";;;;;;cAQa,uBAAA,SACH,iBAAA,YACG,yBAAA;;AAFb;;UAOU,OAAA;EA6L0B;;;EAAA,QAxL1B,YAAA;EAmPyC;;;EA9O1C,IAAA;EAfI;;;;EAqBJ,UAAA;EAhBC;;;EAAA,QAqBA,WAAA;EAAA;;;EAAA,QAKA,gBAAA;EA0CA;;;EAAA,QAlCA,qBAAA;EA2J0C;;;EAAA,QAvI1C,uBAAA;EAkMoB;;;EAAA,QApLpB,cAAA;EAoL4D;;;EA3DvD,aAAA,CAAc,KAAA,EAAO,WAAA,KAAgB,OAAA;;;;EAoB3C,UAAA,IAAc,uBAAA;;;;EAuCR,QAAA,CAAS,IAAA,EAAM,WAAA,EAAa,MAAA,EAAQ,gBAAA,GAAmB,OAAA,CAAQ,gBAAA;AAAA"}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { FileManager } from "../file-manager.mjs";
|
|
2
|
-
import { FileHealthCheckerContract } from "./file-health-checker.contract.mjs";
|
|
3
|
-
|
|
4
|
-
//#region ../core/src/dev-server/health-checker/files-healthcare.manager.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Files Healthcare Manager
|
|
7
|
-
*
|
|
8
|
-
* Manages health checkers for file validation during development.
|
|
9
|
-
* Supports both main-thread and worker-based checkers.
|
|
10
|
-
*
|
|
11
|
-
* Checkers with `workerPath` run in dedicated worker threads for performance.
|
|
12
|
-
* Checkers without `workerPath` run in the main thread.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```typescript
|
|
16
|
-
* const manager = new FilesHealthcareManager(files);
|
|
17
|
-
*
|
|
18
|
-
* manager.setHealthCheckers([
|
|
19
|
-
* new TypescriptHealthChecker(), // Has workerPath → runs in worker
|
|
20
|
-
* new CustomChecker(), // No workerPath → runs in main thread
|
|
21
|
-
* ]);
|
|
22
|
-
*
|
|
23
|
-
* await manager.initialize();
|
|
24
|
-
* await manager.validateAllFiles();
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
declare class FilesHealthcareManager {
|
|
28
|
-
private readonly files;
|
|
29
|
-
/**
|
|
30
|
-
* Registered health checkers
|
|
31
|
-
*/
|
|
32
|
-
private healthCheckers;
|
|
33
|
-
/**
|
|
34
|
-
* Active worker instances (checkerName → Worker)
|
|
35
|
-
*/
|
|
36
|
-
private workers;
|
|
37
|
-
/**
|
|
38
|
-
* Worker initialization promises (for ensuring workers are ready)
|
|
39
|
-
*/
|
|
40
|
-
private workerInitPromises;
|
|
41
|
-
/**
|
|
42
|
-
* Aggregated stats for each checker
|
|
43
|
-
*/
|
|
44
|
-
private checkerStats;
|
|
45
|
-
/**
|
|
46
|
-
* Constructor
|
|
47
|
-
* @param files - Map of tracked files
|
|
48
|
-
*/
|
|
49
|
-
constructor(files: Map<string, FileManager>);
|
|
50
|
-
/**
|
|
51
|
-
* Add health checkers to the manager
|
|
52
|
-
* @param checkers - Checkers to add
|
|
53
|
-
*/
|
|
54
|
-
addHealthCheckers(...checkers: FileHealthCheckerContract[]): FilesHealthcareManager;
|
|
55
|
-
/**
|
|
56
|
-
* Set (replace) all health checkers
|
|
57
|
-
* @param checkers - New set of checkers
|
|
58
|
-
*/
|
|
59
|
-
setHealthCheckers(checkers: FileHealthCheckerContract[]): FilesHealthcareManager;
|
|
60
|
-
/**
|
|
61
|
-
* Initialize all health checkers
|
|
62
|
-
*
|
|
63
|
-
* For checkers with `workerPath`, spawns dedicated worker threads.
|
|
64
|
-
* For other checkers, calls their `initialize()` method directly.
|
|
65
|
-
*/
|
|
66
|
-
initialize(): Promise<void>;
|
|
67
|
-
/**
|
|
68
|
-
* Spawn a worker for a checker
|
|
69
|
-
*/
|
|
70
|
-
private spawnWorker;
|
|
71
|
-
/**
|
|
72
|
-
* Validate all tracked files
|
|
73
|
-
*/
|
|
74
|
-
validateAllFiles(): Promise<void>;
|
|
75
|
-
/**
|
|
76
|
-
* Check the given files with all registered checkers
|
|
77
|
-
*
|
|
78
|
-
* All checkers run in parallel for performance.
|
|
79
|
-
* Worker-based checkers communicate via postMessage.
|
|
80
|
-
* Main-thread checkers are called directly.
|
|
81
|
-
*/
|
|
82
|
-
checkFiles(files: FileManager[]): Promise<void>;
|
|
83
|
-
/**
|
|
84
|
-
* Run checker in worker thread
|
|
85
|
-
*/
|
|
86
|
-
private runInWorker;
|
|
87
|
-
/**
|
|
88
|
-
* Run checker inline (main thread)
|
|
89
|
-
*/
|
|
90
|
-
private runInline;
|
|
91
|
-
/**
|
|
92
|
-
* Update aggregated stats for a checker
|
|
93
|
-
*/
|
|
94
|
-
private updateStats;
|
|
95
|
-
/**
|
|
96
|
-
* Detect when files are changed
|
|
97
|
-
*/
|
|
98
|
-
onFileChanges(files: FileManager[]): Promise<void>;
|
|
99
|
-
/**
|
|
100
|
-
* Remove files from tracking
|
|
101
|
-
* Notifies both inline checkers and worker-based checkers about removed files
|
|
102
|
-
*/
|
|
103
|
-
removeFiles(files: FileManager[]): void;
|
|
104
|
-
/**
|
|
105
|
-
* Display file results (errors/warnings)
|
|
106
|
-
*/
|
|
107
|
-
private displayFileResults;
|
|
108
|
-
/**
|
|
109
|
-
* Display stats for all health checkers
|
|
110
|
-
*/
|
|
111
|
-
private displayStats;
|
|
112
|
-
/**
|
|
113
|
-
* Shutdown all workers
|
|
114
|
-
*/
|
|
115
|
-
shutdown(): Promise<void>;
|
|
116
|
-
}
|
|
117
|
-
//#endregion
|
|
118
|
-
export { FilesHealthcareManager };
|
|
119
|
-
//# sourceMappingURL=files-healthcare.manager.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"files-healthcare.manager.d.mts","names":[],"sources":["../../../../../../../../core/src/dev-server/health-checker/files-healthcare.manager.ts"],"mappings":";;;;;;AA0EA;;;;;;;;;;;;;;;;;;;;cAAa,sBAAA;EAAA,iBAoCyB,KAAA;EAtB5B;;;EAAA,QAVA,cAAA;EAgC+C;;;EAAA,QA3B/C,OAAA;EAiC8B;;;EAAA,QA5B9B,kBAAA;EAqCiB;;;EAAA,QAhCjB,YAAA;EAuEM;;;;cAtDsB,KAAA,EAAO,GAAA,SAAY,WAAA;EA4G/B;;;;EAtGjB,iBAAA,IAAqB,QAAA,EAAU,yBAAA,KAA8B,sBAAA;EAwQvD;;;;EA/PN,iBAAA,CAAkB,QAAA,EAAU,yBAAA,KAA8B,sBAAA;EAqRvC;;;;;;EA1Qb,UAAA,IAAc,OAAA;EA6YK;;;EAAA,QAjXlB,WAAA;;;;EAuCD,gBAAA,IAAoB,OAAA;;;;;;;;EAepB,UAAA,CAAW,KAAA,EAAO,WAAA,KAAgB,OAAA;;;;UAwBjC,WAAA;;;;UAkEA,SAAA;;;;UAmDN,WAAA;;;;EAqBK,aAAA,CAAc,KAAA,EAAO,WAAA,KAAgB,OAAA;;;;;EAsB3C,WAAA,CAAY,KAAA,EAAO,WAAA;;;;UAsBlB,kBAAA;;;;UAuCM,YAAA;;;;EAsED,QAAA,IAAY,OAAA;AAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { BaseHealthChecker } from "./checkers/base-health-checker.mjs";
|
|
2
|
-
import { EslintHealthChecker } from "./checkers/eslint-health-checker.mjs";
|
|
3
|
-
import { TypescriptHealthChecker } from "./checkers/typescript-health-checker.mjs";
|
|
4
|
-
import "./workers/eslint-health.worker.mjs";
|
|
5
|
-
import "./workers/ts-health.worker.mjs";
|
|
6
|
-
|
|
7
|
-
export { };
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { SpecialFilesCollector } from "./special-files-collector.mjs";
|
|
2
|
-
import { FileManager } from "./file-manager.mjs";
|
|
3
|
-
|
|
4
|
-
//#region ../core/src/dev-server/module-loader.d.ts
|
|
5
|
-
declare global {
|
|
6
|
-
var __currentModuleFile: FileManager | undefined;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Thrown when a special file (route/event/main/locale) fails to import or
|
|
10
|
-
* register. Carries the file that failed and the original cause so a broken
|
|
11
|
-
* module surfaces with its origin instead of vanishing into a 404.
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* Loads application modules through the ESM loader hook. The hook stamps
|
|
15
|
-
* `?v=N` on every import, so each reload is a fresh module without any
|
|
16
|
-
* userland cache-busting plumbing.
|
|
17
|
-
*/
|
|
18
|
-
declare class ModuleLoader {
|
|
19
|
-
private readonly specialFilesCollector;
|
|
20
|
-
private readonly loadedModules;
|
|
21
|
-
constructor(specialFilesCollector: SpecialFilesCollector);
|
|
22
|
-
/**
|
|
23
|
-
* Eagerly load every special file at boot, in the canonical order so
|
|
24
|
-
* later phases (e.g. routes) see state earlier phases registered.
|
|
25
|
-
*
|
|
26
|
-
* A failing module no longer vanishes silently: each failure is collected
|
|
27
|
-
* (so one broken file doesn't hide the others) and, once every file has been
|
|
28
|
-
* attempted, an aggregate error is thrown. The boot callers
|
|
29
|
-
* (`DevelopmentServer.start`, the HTTP test bootstrap) already wrap this in a
|
|
30
|
-
* try/catch that logs and aborts the boot — so a broken route module aborts
|
|
31
|
-
* boot loudly rather than booting into a surface that 404s.
|
|
32
|
-
*/
|
|
33
|
-
loadAll(): Promise<void>;
|
|
34
|
-
/**
|
|
35
|
-
* Import a file through the loader hook. For routes, scopes the import in
|
|
36
|
-
* `router.withSourceFile()` so the added routes carry their origin.
|
|
37
|
-
*/
|
|
38
|
-
loadModule<T = unknown>(file: FileManager, type: string): Promise<T | undefined>;
|
|
39
|
-
/**
|
|
40
|
-
* Reload a previously-loaded special file. The version-bump that makes the
|
|
41
|
-
* import fresh is done by the caller (layer-executor) before invoking this.
|
|
42
|
-
* Routes are removed from the registry first so re-registration is clean.
|
|
43
|
-
*/
|
|
44
|
-
reloadModule(file: FileManager): Promise<void>;
|
|
45
|
-
/**
|
|
46
|
-
* Run every cleanup hook the file registered (or `$cleanup` on its exports)
|
|
47
|
-
* and reset the list. Called once per HMR reload.
|
|
48
|
-
*/
|
|
49
|
-
runCleanup(file: FileManager): void;
|
|
50
|
-
/**
|
|
51
|
-
* Clean up after a file whose source was deleted from disk.
|
|
52
|
-
*/
|
|
53
|
-
cleanupDeletedModule(file: FileManager): void;
|
|
54
|
-
/**
|
|
55
|
-
* Scan a freshly-loaded module for cleanup handlers and register them on
|
|
56
|
-
* the FileManager so they run before the next reload. Priority: explicit
|
|
57
|
-
* `export function cleanup()` → `.$cleanup` on any exported value.
|
|
58
|
-
*/
|
|
59
|
-
private registerCleanup;
|
|
60
|
-
}
|
|
61
|
-
//#endregion
|
|
62
|
-
export { ModuleLoader };
|
|
63
|
-
//# sourceMappingURL=module-loader.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module-loader.d.mts","names":[],"sources":["../../../../../../../core/src/dev-server/module-loader.ts"],"mappings":";;;;QAMQ,MAAA;EAAA,IACF,mBAAA,EAAqB,WAAW;AAAA;;;;;;;;;;;cAgCzB,YAAA;EAAA,iBAGkB,qBAAA;EAAA,iBAFZ,aAAA;cAEY,qBAAA,EAAuB,qBAAA;EAgIlB;;;;;;;;;;;EAnHrB,OAAA,IAAW,OAAA;EA6BhB;;;;EADK,UAAA,cACX,IAAA,EAAM,WAAA,EACN,IAAA,WACC,OAAA,CAAQ,CAAA;EAgDE;;;;;EAAA,YAAA,CAAa,IAAA,EAAM,WAAA,GAAc,OAAA;EAkB5B;;;;EAAX,UAAA,CAAW,IAAA,EAAM,WAAA;EAiCD;AAAA;;EAfhB,oBAAA,CAAqB,IAAA,EAAM,WAAA;;;;;;UAe1B,eAAA;AAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"path.mjs","names":[],"sources":["../../../../../../../core/src/dev-server/path.ts"],"sourcesContent":["import path from \"node:path\";\n\nexport class Path {\n /**\n * Convert the given absolute path to a relative path\n */\n public static toRelative(absolutePath: string) {\n return this.normalize(path.relative(process.cwd(), absolutePath));\n }\n\n /**\n * Get relative path of the given path\n */\n public static relative(relativePath: string) {\n return this.normalize(path.relative(process.cwd(), relativePath));\n }\n\n /**\n * Get normalized absolute path of the given path\n */\n public static toNormalizedAbsolute(relativePath: string) {\n return this.normalize(path.resolve(process.cwd(), relativePath));\n }\n\n /**\n * Get absolute path of the given path\n */\n public static toAbsolute(relativePath: string) {\n return this.normalize(path.resolve(process.cwd(), relativePath));\n }\n\n /**\n * Normalize the given path (convert backslashes to forward slashes)\n */\n public static normalize(filePath: string) {\n return filePath.replace(/\\\\/g, \"/\");\n }\n\n /**\n * Join paths and normalize\n */\n public static join(...paths: string[]) {\n return this.normalize(path.join(...paths));\n }\n\n /**\n * Get directory name of a path\n */\n public static dirname(filePath: string) {\n return this.normalize(path.dirname(filePath));\n }\n\n /**\n * Get base name of a path\n */\n public static basename(filePath: string, ext?: string) {\n return path.basename(filePath, ext);\n }\n\n /**\n * Get extension of a path\n */\n public static extname(filePath: string) {\n return path.extname(filePath);\n }\n}\n"],"mappings":";;;AAEA,IAAa,OAAb,MAAkB;;;;CAIhB,OAAc,WAAW,cAAsB;EAC7C,OAAO,KAAK,UAAU,KAAK,SAAS,QAAQ,IAAI,GAAG,YAAY,CAAC;CAClE;;;;CAKA,OAAc,SAAS,cAAsB;EAC3C,OAAO,KAAK,UAAU,KAAK,SAAS,QAAQ,IAAI,GAAG,YAAY,CAAC;CAClE;;;;CAKA,OAAc,qBAAqB,cAAsB;EACvD,OAAO,KAAK,UAAU,KAAK,QAAQ,QAAQ,IAAI,GAAG,YAAY,CAAC;CACjE;;;;CAKA,OAAc,WAAW,cAAsB;EAC7C,OAAO,KAAK,UAAU,KAAK,QAAQ,QAAQ,IAAI,GAAG,YAAY,CAAC;CACjE;;;;CAKA,OAAc,UAAU,UAAkB;EACxC,OAAO,SAAS,QAAQ,OAAO,GAAG;CACpC;;;;CAKA,OAAc,KAAK,GAAG,OAAiB;EACrC,OAAO,KAAK,UAAU,KAAK,KAAK,GAAG,KAAK,CAAC;CAC3C;;;;CAKA,OAAc,QAAQ,UAAkB;EACtC,OAAO,KAAK,UAAU,KAAK,QAAQ,QAAQ,CAAC;CAC9C;;;;CAKA,OAAc,SAAS,UAAkB,KAAc;EACrD,OAAO,KAAK,SAAS,UAAU,GAAG;CACpC;;;;CAKA,OAAc,QAAQ,UAAkB;EACtC,OAAO,KAAK,QAAQ,QAAQ;CAC9B;AACF"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
//#region ../core/src/tests/test-server-port-channel.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* The channel `startHttpTestServer` uses to tell test workers which port it
|
|
4
|
-
* bound.
|
|
5
|
-
*
|
|
6
|
-
* Vitest runs `globalSetup` in the main process and each test file in its own
|
|
7
|
-
* worker, so the workers do not share the main process's resolved config — they
|
|
8
|
-
* re-resolve `http.port` from `.env`. An environment variable is the one thing a
|
|
9
|
-
* worker inherits from the process that spawned it, which makes it the only
|
|
10
|
-
* channel an explicit port can travel through.
|
|
11
|
-
*
|
|
12
|
-
* This is process plumbing between two of our own processes, not application
|
|
13
|
-
* configuration — app code still reads its port through `config`.
|
|
14
|
-
*/
|
|
15
|
-
declare const TEST_SERVER_PORT_ENV_KEY = "WARLOCK_TEST_SERVER_PORT";
|
|
16
|
-
/**
|
|
17
|
-
* Publish the port the test server bound, for the workers to read.
|
|
18
|
-
*/
|
|
19
|
-
declare function publishTestServerPort(port: number): void;
|
|
20
|
-
/**
|
|
21
|
-
* Withdraw the published port on shutdown, so a later run in the same process
|
|
22
|
-
* can't inherit a stale one.
|
|
23
|
-
*/
|
|
24
|
-
declare function withdrawTestServerPort(): void;
|
|
25
|
-
//#endregion
|
|
26
|
-
export { TEST_SERVER_PORT_ENV_KEY, publishTestServerPort, withdrawTestServerPort };
|
|
27
|
-
//# sourceMappingURL=test-server-port-channel.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-server-port-channel.d.mts","names":[],"sources":["../../../../../../../core/src/tests/test-server-port-channel.ts"],"mappings":";;AAaA;;;;AAAqC;AAKrC;;;;AAAkD;AAQlD;;cAba,wBAAA;;AAayB;;iBARtB,qBAAA,CAAsB,IAAY;;;;;iBAQlC,sBAAA"}
|
|
File without changes
|