@decohere/forge 0.0.1-dev.20 → 0.0.1-dev.20261105.46
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/LICENSE +15 -0
- package/README.md +152 -0
- package/commonjs/src/actions/build.action.js +4 -6
- package/commonjs/src/actions/clean.action.js +4 -6
- package/commonjs/src/actions/commit.action.js +4 -6
- package/commonjs/src/actions/copy.action.js +62 -12
- package/commonjs/src/actions/dependency-report.action.js +8 -6
- package/commonjs/src/actions/dependency-sync.action.js +9 -5
- package/commonjs/src/actions/docker.action.js +83 -36
- package/commonjs/src/actions/index.js +3 -2
- package/commonjs/src/actions/link.action.js +3 -5
- package/commonjs/src/actions/package.action.js +234 -0
- package/commonjs/src/actions/paths.action.js +120 -0
- package/commonjs/src/actions/publish.action.js +4 -6
- package/commonjs/src/actions/sync-lock-file.action.js +2 -4
- package/commonjs/src/actions/tag.action.js +6 -9
- package/commonjs/src/actions/typecheck.action.js +67 -0
- package/commonjs/src/actions/unlink.action.js +1 -3
- package/commonjs/src/actions/version.action.js +74 -21
- package/commonjs/src/actions/watch.action.js +3 -5
- package/commonjs/src/commands/build.command.js +4 -3
- package/commonjs/src/commands/dependency.command.js +1 -3
- package/commonjs/src/commands/docker.command.js +2 -4
- package/commonjs/src/commands/forge.command.js +1 -3
- package/commonjs/src/commands/index.js +3 -2
- package/commonjs/src/commands/link.command.js +4 -3
- package/commonjs/src/commands/package.command.js +36 -0
- package/commonjs/src/commands/paths.command.js +24 -0
- package/commonjs/src/commands/publish.command.js +1 -3
- package/commonjs/src/commands/tag.command.js +1 -3
- package/commonjs/src/commands/typecheck.command.js +24 -0
- package/commonjs/src/commands/version.command.js +3 -3
- package/commonjs/src/const.js +0 -2
- package/commonjs/src/create-workspace.js +38 -0
- package/commonjs/src/errors.js +2 -4
- package/commonjs/src/extensions/project.extensions.js +11 -13
- package/commonjs/src/factories/swc-config.factory.js +29 -9
- package/commonjs/src/forge.module.js +15 -20
- package/commonjs/src/index.js +8 -2
- package/commonjs/src/packaging/dependency-pinner.service.js +118 -0
- package/commonjs/src/packaging/deployable.js +44 -0
- package/commonjs/src/packaging/import-graph.service.js +137 -0
- package/commonjs/src/packaging/release-exports.js +90 -0
- package/commonjs/src/packaging/ui-assets.js +75 -0
- package/commonjs/src/semver/index.js +18 -0
- package/commonjs/src/semver/semver.js +96 -0
- package/commonjs/src/services/dependency-resolver.service.js +70 -26
- package/commonjs/src/services/file-writer.service.js +2 -11
- package/commonjs/src/services/incremental-watch.js +24 -0
- package/commonjs/src/services/output-cache.js +39 -0
- package/commonjs/src/services/swc-transpiler.js +85 -99
- package/commonjs/src/services/transpile-cache.js +44 -0
- package/commonjs/src/services/ts-compiler-options.js +50 -0
- package/commonjs/src/services/ts-program-host.js +4 -6
- package/commonjs/src/services/type-emission-program.js +25 -10
- package/commonjs/src/services/type-emitter.js +60 -20
- package/commonjs/src/transpile/index.js +30 -0
- package/commonjs/src/types/build-target.type.js +0 -2
- package/commonjs/src/types/configuration.type.js +0 -2
- package/commonjs/src/types/dependency.types.js +0 -2
- package/commonjs/src/types/swc-config.type.js +0 -2
- package/commonjs/src/types/transform-response.model.js +3 -18
- package/commonjs/src/types/transformer.type.js +0 -2
- package/commonjs/src/types/workspace-config.type.js +0 -2
- package/commonjs/src/vitest/forge-build.plugin.js +28 -44
- package/commonjs/src/vitest/index.js +0 -2
- package/commonjs/src/workspace.config.js +27 -6
- package/es6/src/actions/build.action.js +3 -7
- package/es6/src/actions/clean.action.js +3 -6
- package/es6/src/actions/commit.action.js +3 -6
- package/es6/src/actions/copy.action.js +61 -12
- package/es6/src/actions/dependency-report.action.js +7 -7
- package/es6/src/actions/dependency-sync.action.js +8 -6
- package/es6/src/actions/docker.action.js +82 -36
- package/es6/src/actions/index.js +3 -2
- package/es6/src/actions/link.action.js +2 -5
- package/es6/src/actions/package.action.js +219 -0
- package/es6/src/actions/paths.action.js +97 -0
- package/es6/src/actions/publish.action.js +3 -6
- package/es6/src/actions/sync-lock-file.action.js +2 -4
- package/es6/src/actions/tag.action.js +5 -9
- package/es6/src/actions/typecheck.action.js +52 -0
- package/es6/src/actions/unlink.action.js +1 -3
- package/es6/src/actions/version.action.js +69 -17
- package/es6/src/actions/watch.action.js +2 -5
- package/es6/src/commands/build.command.js +4 -3
- package/es6/src/commands/dependency.command.js +1 -3
- package/es6/src/commands/docker.command.js +2 -4
- package/es6/src/commands/forge.command.js +1 -3
- package/es6/src/commands/index.js +3 -2
- package/es6/src/commands/link.command.js +4 -3
- package/es6/src/commands/package.command.js +26 -0
- package/es6/src/commands/paths.command.js +14 -0
- package/es6/src/commands/publish.command.js +1 -3
- package/es6/src/commands/tag.command.js +1 -3
- package/es6/src/commands/typecheck.command.js +14 -0
- package/es6/src/commands/version.command.js +3 -3
- package/es6/src/const.js +0 -2
- package/es6/src/create-workspace.js +26 -0
- package/es6/src/errors.js +1 -3
- package/es6/src/extensions/project.extensions.js +5 -7
- package/es6/src/factories/swc-config.factory.js +29 -9
- package/es6/src/forge.module.js +15 -20
- package/es6/src/index.js +2 -2
- package/es6/src/packaging/dependency-pinner.service.js +103 -0
- package/es6/src/packaging/deployable.js +21 -0
- package/es6/src/packaging/import-graph.service.js +122 -0
- package/es6/src/packaging/release-exports.js +80 -0
- package/es6/src/packaging/ui-assets.js +49 -0
- package/es6/src/semver/index.js +1 -0
- package/es6/src/semver/semver.js +75 -0
- package/es6/src/services/dependency-resolver.service.js +70 -26
- package/es6/src/services/file-writer.service.js +2 -11
- package/es6/src/services/incremental-watch.js +18 -0
- package/es6/src/services/output-cache.js +29 -0
- package/es6/src/services/swc-transpiler.js +85 -99
- package/es6/src/services/transpile-cache.js +29 -0
- package/es6/src/services/ts-compiler-options.js +39 -0
- package/es6/src/services/ts-program-host.js +4 -6
- package/es6/src/services/type-emission-program.js +25 -10
- package/es6/src/services/type-emitter.js +57 -20
- package/es6/src/transpile/index.js +6 -0
- package/es6/src/types/build-target.type.js +0 -2
- package/es6/src/types/configuration.type.js +0 -2
- package/es6/src/types/dependency.types.js +0 -2
- package/es6/src/types/swc-config.type.js +0 -2
- package/es6/src/types/transform-response.model.js +0 -7
- package/es6/src/types/transformer.type.js +0 -2
- package/es6/src/types/workspace-config.type.js +0 -2
- package/es6/src/vitest/forge-build.plugin.js +27 -43
- package/es6/src/vitest/index.js +0 -2
- package/es6/src/workspace.config.js +26 -5
- package/package.json +20 -6
- package/types/src/actions/build.action.d.ts +4 -4
- package/types/src/actions/clean.action.d.ts +3 -3
- package/types/src/actions/commit.action.d.ts +3 -3
- package/types/src/actions/copy.action.d.ts +18 -3
- package/types/src/actions/dependency-report.action.d.ts +3 -3
- package/types/src/actions/dependency-sync.action.d.ts +3 -3
- package/types/src/actions/docker.action.d.ts +14 -3
- package/types/src/actions/index.d.ts +3 -0
- package/types/src/actions/link.action.d.ts +3 -3
- package/types/src/actions/package.action.d.ts +38 -0
- package/types/src/actions/paths.action.d.ts +28 -0
- package/types/src/actions/publish.action.d.ts +4 -4
- package/types/src/actions/sync-lock-file.action.d.ts +2 -2
- package/types/src/actions/tag.action.d.ts +3 -3
- package/types/src/actions/typecheck.action.d.ts +14 -0
- package/types/src/actions/unlink.action.d.ts +2 -2
- package/types/src/actions/version.action.d.ts +14 -4
- package/types/src/actions/watch.action.d.ts +3 -3
- package/types/src/commands/build.command.d.ts +3 -2
- package/types/src/commands/dependency.command.d.ts +2 -2
- package/types/src/commands/docker.command.d.ts +1 -1
- package/types/src/commands/forge.command.d.ts +2 -2
- package/types/src/commands/index.d.ts +3 -0
- package/types/src/commands/link.command.d.ts +3 -2
- package/types/src/commands/package.command.d.ts +11 -0
- package/types/src/commands/paths.command.d.ts +6 -0
- package/types/src/commands/publish.command.d.ts +1 -1
- package/types/src/commands/tag.command.d.ts +1 -1
- package/types/src/commands/typecheck.command.d.ts +6 -0
- package/types/src/commands/version.command.d.ts +1 -1
- package/types/src/create-workspace.d.ts +7 -0
- package/types/src/errors.d.ts +1 -1
- package/types/src/extensions/project.extensions.d.ts +2 -2
- package/types/src/factories/swc-config.factory.d.ts +3 -2
- package/types/src/forge.module.d.ts +10 -4
- package/types/src/index.d.ts +2 -0
- package/types/src/packaging/dependency-pinner.service.d.ts +20 -0
- package/types/src/packaging/deployable.d.ts +17 -0
- package/types/src/packaging/import-graph.service.d.ts +33 -0
- package/types/src/packaging/release-exports.d.ts +18 -0
- package/types/src/packaging/ui-assets.d.ts +21 -0
- package/types/src/semver/index.d.ts +1 -0
- package/types/src/semver/semver.d.ts +20 -0
- package/types/src/services/dependency-resolver.service.d.ts +8 -1
- package/types/src/services/file-writer.service.d.ts +1 -2
- package/types/src/services/incremental-watch.d.ts +13 -0
- package/types/src/services/output-cache.d.ts +10 -0
- package/types/src/services/swc-transpiler.d.ts +28 -15
- package/types/src/services/transpile-cache.d.ts +17 -0
- package/types/src/services/ts-compiler-options.d.ts +8 -0
- package/types/src/services/ts-program-host.d.ts +2 -2
- package/types/src/services/type-emission-program.d.ts +10 -3
- package/types/src/services/type-emitter.d.ts +21 -8
- package/types/src/transpile/index.d.ts +6 -0
- package/types/src/types/configuration.type.d.ts +6 -1
- package/types/src/types/dependency.types.d.ts +8 -9
- package/types/src/types/swc-config.type.d.ts +7 -1
- package/types/src/types/transform-response.model.d.ts +2 -7
- package/types/src/types/transformer.type.d.ts +3 -12
- package/types/src/types/workspace-config.type.d.ts +3 -3
- package/types/src/vitest/forge-build.plugin.d.ts +0 -2
- package/commonjs/src/mixins/caches-outputs.mixin.js +0 -44
- package/commonjs/src/mixins/incremental-transform.mixin.js +0 -36
- package/es6/src/mixins/caches-outputs.mixin.js +0 -34
- package/es6/src/mixins/incremental-transform.mixin.js +0 -26
- package/types/src/mixins/caches-outputs.mixin.d.ts +0 -7
- package/types/src/mixins/incremental-transform.mixin.d.ts +0 -13
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
import { WorkspaceDefaults as BaseDefaults } from "@decohere/
|
|
1
|
+
import { WorkspaceDefaults as BaseDefaults } from "@decohere/workspace";
|
|
2
2
|
import { BuildTargets } from "./types/build-target.type.js";
|
|
3
3
|
export const Debug = {
|
|
4
4
|
name: "debug",
|
|
5
5
|
targets: [
|
|
6
6
|
BuildTargets.es6
|
|
7
7
|
],
|
|
8
|
-
aliasPaths: true
|
|
8
|
+
aliasPaths: true,
|
|
9
|
+
// Fixtures are runtime inputs (often raw .ts / configs), not library sources.
|
|
10
|
+
ignore: [
|
|
11
|
+
"**/__fixtures__/**"
|
|
12
|
+
],
|
|
13
|
+
copyFiles: [
|
|
14
|
+
"**/__fixtures__/**",
|
|
15
|
+
"**/.decohere.js",
|
|
16
|
+
"**/.decohere.*.js"
|
|
17
|
+
]
|
|
9
18
|
};
|
|
10
19
|
export const Release = {
|
|
11
20
|
name: "release",
|
|
@@ -15,11 +24,22 @@ export const Release = {
|
|
|
15
24
|
BuildTargets.es6,
|
|
16
25
|
BuildTargets.types
|
|
17
26
|
],
|
|
27
|
+
// Published output: no inline maps (they carry full source and build-machine paths).
|
|
28
|
+
sourceMaps: false,
|
|
29
|
+
// Tests and benchmarks are not shipped: they import dev-only packages (vitest, @swc/core).
|
|
18
30
|
ignore: [
|
|
19
31
|
"**/*.spec.ts",
|
|
20
32
|
"**/*.test.ts",
|
|
33
|
+
"**/*.bench.ts",
|
|
21
34
|
"tests/**",
|
|
22
|
-
"e2e/**"
|
|
35
|
+
"e2e/**",
|
|
36
|
+
"bench/**"
|
|
37
|
+
],
|
|
38
|
+
// Sit next to emitted JS under es6/commonjs/types (import.meta.url).
|
|
39
|
+
// Do not put package.json here — that stays on workspace copyFiles (root only).
|
|
40
|
+
copyFiles: [
|
|
41
|
+
"**/webapi/devcontainer/templates/**",
|
|
42
|
+
"**/webapi/devcontainer/codebase-rag-mcp.ts"
|
|
23
43
|
]
|
|
24
44
|
};
|
|
25
45
|
/**
|
|
@@ -41,12 +61,13 @@ export const DefaultConfigurations = [
|
|
|
41
61
|
];
|
|
42
62
|
export const WorkspaceDefaults = {
|
|
43
63
|
...BaseDefaults,
|
|
64
|
+
// Root-only files npm ships with the package. Globs that match nothing are fine.
|
|
44
65
|
copyFiles: [
|
|
45
66
|
"package.json",
|
|
67
|
+
"README.md",
|
|
68
|
+
"LICENSE*",
|
|
46
69
|
"**/*.mjs"
|
|
47
70
|
],
|
|
48
71
|
configurations: DefaultConfigurations,
|
|
49
72
|
projects: undefined
|
|
50
73
|
};
|
|
51
|
-
|
|
52
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL2RlY29oZXJlL2RlY29oZXJlL3Byb2plY3RzL2ZvcmdlL3NyYy93b3Jrc3BhY2UuY29uZmlnLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFdvcmtzcGFjZURlZmF1bHRzIGFzIEJhc2VEZWZhdWx0cyB9IGZyb20gXCJAZGVjb2hlcmUvbWVzaFwiO1xuaW1wb3J0IHsgQnVpbGRUYXJnZXRzIH0gZnJvbSBcIi4vdHlwZXMvYnVpbGQtdGFyZ2V0LnR5cGUuanNcIjtcbmltcG9ydCB0eXBlIHsgRm9yZ2VDb25maWd1cmF0aW9uIH0gZnJvbSBcIi4vdHlwZXMvY29uZmlndXJhdGlvbi50eXBlLmpzXCI7XG5pbXBvcnQgdHlwZSB7IFdvcmtzcGFjZU9wdGlvbnMgfSBmcm9tIFwiLi90eXBlcy93b3Jrc3BhY2UtY29uZmlnLnR5cGUuanNcIjtcblxuZXhwb3J0IGNvbnN0IERlYnVnOiBGb3JnZUNvbmZpZ3VyYXRpb24gPSB7XG5cdG5hbWU6IFwiZGVidWdcIixcblx0dGFyZ2V0czogW0J1aWxkVGFyZ2V0cy5lczZdLFxuXHRhbGlhc1BhdGhzOiB0cnVlLFxufTtcblxuZXhwb3J0IGNvbnN0IFJlbGVhc2U6IEZvcmdlQ29uZmlndXJhdGlvbiA9IHtcblx0bmFtZTogXCJyZWxlYXNlXCIsXG5cdHBhY2s6IHRydWUsXG5cdHRhcmdldHM6IFtCdWlsZFRhcmdldHMuY29tbW9uanMsIEJ1aWxkVGFyZ2V0cy5lczYsIEJ1aWxkVGFyZ2V0cy50eXBlc10sXG5cdGlnbm9yZTogW1wiKiovKi5zcGVjLnRzXCIsIFwiKiovKi50ZXN0LnRzXCIsIFwidGVzdHMvKipcIiwgXCJlMmUvKipcIl0sXG59O1xuXG4vKipcbiAqIExpbmsgY29uZmlndXJhdGlvbjogdW5wYWNrZWQgSlMgKyBjby1sb2NhdGVkIHR5cGUgZGVjbGFyYXRpb25zLlxuICogSW50ZW5kZWQgZm9yIGBmb3JnZSBsaW5rYCDigJQgc3ltbGlua2VkIGludG8gYSBjb25zdW1lcidzIG5vZGVfbW9kdWxlcyBzbyB0aGF0XG4gKiBib3RoIHJ1bnRpbWUgcmVzb2x1dGlvbiBhbmQgVHlwZVNjcmlwdCBmaW5kIHRoZSBzYW1lIG91dHB1dCBkaXJlY3RvcnkuXG4gKi9cbmV4cG9ydCBjb25zdCBMaW5rOiBGb3JnZUNvbmZpZ3VyYXRpb24gPSB7XG5cdG5hbWU6IFwibGlua1wiLFxuXHRwYWNrOiB0cnVlLFxuXHR0YXJnZXRzOiBbQnVpbGRUYXJnZXRzLmVzNiwgQnVpbGRUYXJnZXRzLnR5cGVzXSxcbn07XG5cbmV4cG9ydCBjb25zdCBEZWZhdWx0Q29uZmlndXJhdGlvbnMgPSBbRGVidWcsIExpbmssIFJlbGVhc2VdO1xuXG5leHBvcnQgY29uc3QgV29ya3NwYWNlRGVmYXVsdHM6IFdvcmtzcGFjZU9wdGlvbnMgPSB7XG5cdC4uLkJhc2VEZWZhdWx0cyxcblx0Y29weUZpbGVzOiBbXCJwYWNrYWdlLmpzb25cIiwgXCIqKi8qLm1qc1wiXSxcblx0Y29uZmlndXJhdGlvbnM6IERlZmF1bHRDb25maWd1cmF0aW9ucyxcblx0cHJvamVjdHM6IHVuZGVmaW5lZCxcbn07XG4iXSwibmFtZXMiOlsiV29ya3NwYWNlRGVmYXVsdHMiLCJCYXNlRGVmYXVsdHMiLCJCdWlsZFRhcmdldHMiLCJEZWJ1ZyIsIm5hbWUiLCJ0YXJnZXRzIiwiZXM2IiwiYWxpYXNQYXRocyIsIlJlbGVhc2UiLCJwYWNrIiwiY29tbW9uanMiLCJ0eXBlcyIsImlnbm9yZSIsIkxpbmsiLCJEZWZhdWx0Q29uZmlndXJhdGlvbnMiLCJjb3B5RmlsZXMiLCJjb25maWd1cmF0aW9ucyIsInByb2plY3RzIiwidW5kZWZpbmVkIl0sIm1hcHBpbmdzIjoiQUFBQSxTQUFTQSxxQkFBcUJDLFlBQVksUUFBUSxpQkFBaUI7QUFDbkUsU0FBU0MsWUFBWSxRQUFRLCtCQUErQjtBQUk1RCxPQUFPLE1BQU1DLFFBQTRCO0lBQ3hDQyxNQUFNO0lBQ05DLFNBQVM7UUFBQ0gsYUFBYUksR0FBRztLQUFDO0lBQzNCQyxZQUFZO0FBQ2IsRUFBRTtBQUVGLE9BQU8sTUFBTUMsVUFBOEI7SUFDMUNKLE1BQU07SUFDTkssTUFBTTtJQUNOSixTQUFTO1FBQUNILGFBQWFRLFFBQVE7UUFBRVIsYUFBYUksR0FBRztRQUFFSixhQUFhUyxLQUFLO0tBQUM7SUFDdEVDLFFBQVE7UUFBQztRQUFnQjtRQUFnQjtRQUFZO0tBQVM7QUFDL0QsRUFBRTtBQUVGOzs7O0NBSUMsR0FDRCxPQUFPLE1BQU1DLE9BQTJCO0lBQ3ZDVCxNQUFNO0lBQ05LLE1BQU07SUFDTkosU0FBUztRQUFDSCxhQUFhSSxHQUFHO1FBQUVKLGFBQWFTLEtBQUs7S0FBQztBQUNoRCxFQUFFO0FBRUYsT0FBTyxNQUFNRyx3QkFBd0I7SUFBQ1g7SUFBT1U7SUFBTUw7Q0FBUSxDQUFDO0FBRTVELE9BQU8sTUFBTVIsb0JBQXNDO0lBQ2xELEdBQUdDLFlBQVk7SUFDZmMsV0FBVztRQUFDO1FBQWdCO0tBQVc7SUFDdkNDLGdCQUFnQkY7SUFDaEJHLFVBQVVDO0FBQ1gsRUFBRSJ9
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decohere/forge",
|
|
3
|
-
"version": "0.0.1-dev.
|
|
3
|
+
"version": "0.0.1-dev.20261105.46",
|
|
4
4
|
"description": "TypeScript monorepo build system — zero config, fast compilation, streamlined developer workflow",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -10,6 +10,15 @@
|
|
|
10
10
|
"swc",
|
|
11
11
|
"decohere"
|
|
12
12
|
],
|
|
13
|
+
"homepage": "https://github.com/typesmiths/decohere/tree/main/projects/forge#readme",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/typesmiths/decohere/issues"
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/typesmiths/decohere.git",
|
|
20
|
+
"directory": "projects/forge"
|
|
21
|
+
},
|
|
13
22
|
"license": "ISC",
|
|
14
23
|
"author": "Typesmiths",
|
|
15
24
|
"type": "module",
|
|
@@ -19,6 +28,11 @@
|
|
|
19
28
|
"import": "./es6/src/index.js",
|
|
20
29
|
"require": "./commonjs/src/index.js"
|
|
21
30
|
},
|
|
31
|
+
"./transpile": {
|
|
32
|
+
"types": "./types/src/transpile/index.d.ts",
|
|
33
|
+
"import": "./es6/src/transpile/index.js",
|
|
34
|
+
"require": "./commonjs/src/transpile/index.js"
|
|
35
|
+
},
|
|
22
36
|
"./vitest": {
|
|
23
37
|
"types": "./types/src/vitest/index.d.ts",
|
|
24
38
|
"import": "./es6/src/vitest/index.js",
|
|
@@ -29,14 +43,14 @@
|
|
|
29
43
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
30
44
|
},
|
|
31
45
|
"dependencies": {
|
|
32
|
-
"@decohere/
|
|
33
|
-
"@decohere/
|
|
34
|
-
"@decohere/
|
|
35
|
-
"@decohere/scribe": "0.0.1-dev.
|
|
46
|
+
"@decohere/core": "0.0.1-dev.20261105.46",
|
|
47
|
+
"@decohere/crucible": "0.0.1-dev.20261105.46",
|
|
48
|
+
"@decohere/devkit": "0.0.1-dev.20261105.46",
|
|
49
|
+
"@decohere/scribe": "0.0.1-dev.20261105.46",
|
|
50
|
+
"@decohere/workspace": "0.0.1-dev.20261105.46",
|
|
36
51
|
"@swc/core": "^1.11.11",
|
|
37
52
|
"async": "^3.2.6",
|
|
38
53
|
"parse-imports": "^2.2.1",
|
|
39
|
-
"rxjs": "^7.8.2",
|
|
40
54
|
"typescript": "^6.0.3"
|
|
41
55
|
},
|
|
42
56
|
"devDependencies": {}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Project } from "@decohere/
|
|
2
|
-
import { Workspace } from "@decohere/
|
|
3
|
-
import type { Action } from "@decohere/
|
|
4
|
-
import { ActionResponse } from "@decohere/
|
|
1
|
+
import type { Project } from "@decohere/workspace";
|
|
2
|
+
import { Workspace } from "@decohere/workspace";
|
|
3
|
+
import type { Action } from "@decohere/devkit/cli";
|
|
4
|
+
import { ActionResponse } from "@decohere/devkit/cli";
|
|
5
5
|
import { FileWriterService } from "../services/file-writer.service.js";
|
|
6
6
|
import type { TransformResponse } from "../types/transform-response.model.js";
|
|
7
7
|
import { type Transformer } from "../types/transformer.type.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Workspace } from "@decohere/
|
|
2
|
-
import type { Action } from "@decohere/
|
|
3
|
-
import { ActionResponse } from "@decohere/
|
|
1
|
+
import { Workspace } from "@decohere/workspace";
|
|
2
|
+
import type { Action } from "@decohere/devkit/cli";
|
|
3
|
+
import { ActionResponse } from "@decohere/devkit/cli";
|
|
4
4
|
export type CleanOptions = {
|
|
5
5
|
clean: boolean;
|
|
6
6
|
configuration: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Workspace } from "@decohere/
|
|
2
|
-
import type { Action } from "@decohere/
|
|
3
|
-
import { ActionResponse } from "@decohere/
|
|
1
|
+
import { Workspace } from "@decohere/workspace";
|
|
2
|
+
import type { Action } from "@decohere/devkit/cli";
|
|
3
|
+
import { ActionResponse } from "@decohere/devkit/cli";
|
|
4
4
|
export type CommitFilesOptions = {
|
|
5
5
|
configuration?: string;
|
|
6
6
|
commit?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Workspace } from "@decohere/
|
|
2
|
-
import type { Action } from "@decohere/
|
|
3
|
-
import { ActionResponse } from "@decohere/
|
|
1
|
+
import { Workspace } from "@decohere/workspace";
|
|
2
|
+
import type { Action } from "@decohere/devkit/cli";
|
|
3
|
+
import { ActionResponse } from "@decohere/devkit/cli";
|
|
4
4
|
export type CopyOptions = {
|
|
5
5
|
copy: boolean;
|
|
6
6
|
configuration: string;
|
|
@@ -10,5 +10,20 @@ export declare class Copy implements Action<CopyOptions> {
|
|
|
10
10
|
private readonly workspace;
|
|
11
11
|
constructor(workspace: Workspace);
|
|
12
12
|
run: (options: CopyOptions) => Promise<ActionResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* A package without a LICENSE of its own ships the workspace's, so a monorepo
|
|
15
|
+
* licensed once at the root still puts the license text in every tarball.
|
|
16
|
+
*/
|
|
17
|
+
private copyWorkspaceLicense;
|
|
18
|
+
/**
|
|
19
|
+
* Packed builds emit JS under `<out>/<target>/` (e.g. `es6/`). Assets listed on
|
|
20
|
+
* the *configuration* `copyFiles` (not the workspace defaults) are also copied
|
|
21
|
+
* into each target so `import.meta.url` resolves them beside that JS.
|
|
22
|
+
*
|
|
23
|
+
* Workspace `copyFiles` (e.g. `package.json`) stay root-only — nesting a
|
|
24
|
+
* package manifest under `es6/` makes `npm install --install-links` drop the
|
|
25
|
+
* parent's `es6/` tree when packing `file:` deps.
|
|
26
|
+
*/
|
|
27
|
+
private copyColocatedPackAssets;
|
|
13
28
|
private copyFileToOut;
|
|
14
29
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Workspace } from "@decohere/
|
|
2
|
-
import type { Action } from "@decohere/
|
|
3
|
-
import { ActionResponse } from "@decohere/
|
|
1
|
+
import { Workspace } from "@decohere/workspace";
|
|
2
|
+
import type { Action } from "@decohere/devkit/cli";
|
|
3
|
+
import { ActionResponse } from "@decohere/devkit/cli";
|
|
4
4
|
import { DependencyResolver } from "../services/dependency-resolver.service.js";
|
|
5
5
|
import type { DependencyWarning, DriftEntry } from "../types/dependency.types.js";
|
|
6
6
|
type ReportOptions = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Workspace } from "@decohere/
|
|
2
|
-
import type { Action } from "@decohere/
|
|
3
|
-
import { ActionResponse } from "@decohere/
|
|
1
|
+
import { Workspace } from "@decohere/workspace";
|
|
2
|
+
import type { Action } from "@decohere/devkit/cli";
|
|
3
|
+
import { ActionResponse } from "@decohere/devkit/cli";
|
|
4
4
|
import { DependencyResolver } from "../services/dependency-resolver.service.js";
|
|
5
5
|
import type { SyncprojectResult } from "../types/dependency.types.js";
|
|
6
6
|
export type DependenciesOptions = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Workspace } from "@decohere/
|
|
2
|
-
import type { Action, ResultStatus } from "@decohere/
|
|
3
|
-
import { ActionResponse } from "@decohere/
|
|
1
|
+
import { Workspace } from "@decohere/workspace";
|
|
2
|
+
import type { Action, ResultStatus } from "@decohere/devkit/cli";
|
|
3
|
+
import { ActionResponse } from "@decohere/devkit/cli";
|
|
4
4
|
export type DockerOptions = {
|
|
5
5
|
configuration: string;
|
|
6
6
|
dryRun?: boolean;
|
|
@@ -19,9 +19,20 @@ export declare class Docker implements Action<DockerOptions> {
|
|
|
19
19
|
constructor(workspace: Workspace);
|
|
20
20
|
run(options: DockerOptions): Promise<ActionResponse<DockerResponse>>;
|
|
21
21
|
private getDockerProjects;
|
|
22
|
+
/**
|
|
23
|
+
* A Dockerfile that copies `.package/` needs `forge package` to have run. Fail before the
|
|
24
|
+
* build with that instruction rather than with Docker's "not found" from deep in a layer.
|
|
25
|
+
*/
|
|
26
|
+
private assertPackaged;
|
|
22
27
|
private buildProject;
|
|
23
28
|
private interpolateBuildArgs;
|
|
29
|
+
/**
|
|
30
|
+
* Keep FORGE_DOCKER_EXTRA_TAGS_JSON scoped to this image so multi-image
|
|
31
|
+
* publishes do not stamp create:latest onto the app Dev Container (and vice versa).
|
|
32
|
+
*/
|
|
33
|
+
private extraTagsForImage;
|
|
24
34
|
private defaultImageName;
|
|
25
35
|
private normalizeDockerRepository;
|
|
36
|
+
private normalizeProjectSlug;
|
|
26
37
|
private parseJsonEnv;
|
|
27
38
|
}
|
|
@@ -6,9 +6,12 @@ export * from "./dependency-report.action.js";
|
|
|
6
6
|
export * from "./dependency-sync.action.js";
|
|
7
7
|
export * from "./docker.action.js";
|
|
8
8
|
export * from "./link.action.js";
|
|
9
|
+
export * from "./package.action.js";
|
|
10
|
+
export * from "./paths.action.js";
|
|
9
11
|
export * from "./publish.action.js";
|
|
10
12
|
export * from "./sync-lock-file.action.js";
|
|
11
13
|
export * from "./tag.action.js";
|
|
14
|
+
export * from "./typecheck.action.js";
|
|
12
15
|
export * from "./unlink.action.js";
|
|
13
16
|
export * from "./version.action.js";
|
|
14
17
|
export * from "./watch.action.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Workspace } from "@decohere/
|
|
2
|
-
import type { Action } from "@decohere/
|
|
3
|
-
import { ActionResponse } from "@decohere/
|
|
1
|
+
import { Workspace } from "@decohere/workspace";
|
|
2
|
+
import type { Action } from "@decohere/devkit/cli";
|
|
3
|
+
import { ActionResponse } from "@decohere/devkit/cli";
|
|
4
4
|
import "../extensions/project.extensions.js";
|
|
5
5
|
export declare const LINK_MANIFEST = ".forge-link.json";
|
|
6
6
|
export type LinkOptions = {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Workspace } from "@decohere/workspace";
|
|
2
|
+
import type { Action, ResultStatus } from "@decohere/devkit/cli";
|
|
3
|
+
import { ActionResponse } from "@decohere/devkit/cli";
|
|
4
|
+
import { DependencyPinner } from "../packaging/dependency-pinner.service.js";
|
|
5
|
+
import { ImportGraph } from "../packaging/import-graph.service.js";
|
|
6
|
+
export type PackageOptions = {
|
|
7
|
+
/** Package name of one deployable. Omit to package every project that has a Dockerfile. */
|
|
8
|
+
project?: string;
|
|
9
|
+
};
|
|
10
|
+
export type PackageResponse = ResultStatus & {
|
|
11
|
+
projectName: string;
|
|
12
|
+
outDir: string;
|
|
13
|
+
workspacePackages: string[];
|
|
14
|
+
dependencies: Record<string, string>;
|
|
15
|
+
message: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Turns a deployable's release build into one self-contained folder that plain `node` runs:
|
|
19
|
+
* no symlinks, no workspace tooling. See ADR 0006.
|
|
20
|
+
*/
|
|
21
|
+
export declare class PackageDeployable implements Action<PackageOptions> {
|
|
22
|
+
#private;
|
|
23
|
+
private readonly workspace;
|
|
24
|
+
private readonly importGraph;
|
|
25
|
+
private readonly pinner;
|
|
26
|
+
private readonly npm;
|
|
27
|
+
constructor(workspace: Workspace, importGraph: ImportGraph, pinner: DependencyPinner);
|
|
28
|
+
run(options: PackageOptions): Promise<ActionResponse<PackageResponse>>;
|
|
29
|
+
/** The deployables to package, or the reason a named project cannot be one. */
|
|
30
|
+
private select;
|
|
31
|
+
private releaseProjects;
|
|
32
|
+
private packageProject;
|
|
33
|
+
private write;
|
|
34
|
+
/** Copies file contents, never links: a symlink in the output would break outside the image. */
|
|
35
|
+
private copyTree;
|
|
36
|
+
private writeJson;
|
|
37
|
+
private assertNoSymlinks;
|
|
38
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Workspace } from "@decohere/workspace";
|
|
2
|
+
import type { Action } from "@decohere/devkit/cli";
|
|
3
|
+
import { ActionResponse } from "@decohere/devkit/cli";
|
|
4
|
+
export declare const PATHS_FILE = "tsconfig.paths.json";
|
|
5
|
+
export type PathsOptions = {
|
|
6
|
+
/** Fail if the file is missing or out of date, instead of writing it. */
|
|
7
|
+
check?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type PathsResponse = {
|
|
10
|
+
file: string;
|
|
11
|
+
changed: boolean;
|
|
12
|
+
succeeded: boolean;
|
|
13
|
+
error?: string;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Writes `tsconfig.paths.json`: tsconfig `paths` for every workspace package and the subpaths it
|
|
17
|
+
* exports, from the workspace aliases. Without `node_modules` links, `tsc` finds workspace
|
|
18
|
+
* packages only through `paths`; generating them keeps them in step with what Flux, the Vitest
|
|
19
|
+
* plugin and builds resolve. The root tsconfig extends the file.
|
|
20
|
+
*/
|
|
21
|
+
export declare class Paths implements Action<PathsOptions> {
|
|
22
|
+
#private;
|
|
23
|
+
private readonly workspace;
|
|
24
|
+
constructor(workspace: Workspace);
|
|
25
|
+
run(options: PathsOptions): Promise<ActionResponse<PathsResponse>>;
|
|
26
|
+
/** The file's content: convention and exported subpaths only, never the tsconfig's own paths. */
|
|
27
|
+
static render(workspace: Workspace): string;
|
|
28
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Project } from "@decohere/
|
|
2
|
-
import { Workspace } from "@decohere/
|
|
3
|
-
import type { Action, ResultStatus } from "@decohere/
|
|
4
|
-
import { ActionResponse } from "@decohere/
|
|
1
|
+
import type { Project } from "@decohere/workspace";
|
|
2
|
+
import { Workspace } from "@decohere/workspace";
|
|
3
|
+
import type { Action, ResultStatus } from "@decohere/devkit/cli";
|
|
4
|
+
import { ActionResponse } from "@decohere/devkit/cli";
|
|
5
5
|
export type PublishOptions = {
|
|
6
6
|
configuration: string;
|
|
7
7
|
channel?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Action } from "@decohere/
|
|
2
|
-
import { ActionResponse } from "@decohere/
|
|
1
|
+
import type { Action } from "@decohere/devkit/cli";
|
|
2
|
+
import { ActionResponse } from "@decohere/devkit/cli";
|
|
3
3
|
export type SyncLockFileOptions = {
|
|
4
4
|
sync?: boolean;
|
|
5
5
|
dryRun?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Workspace } from "@decohere/
|
|
2
|
-
import type { Action } from "@decohere/
|
|
3
|
-
import { ActionResponse } from "@decohere/
|
|
1
|
+
import { Workspace } from "@decohere/workspace";
|
|
2
|
+
import type { Action } from "@decohere/devkit/cli";
|
|
3
|
+
import { ActionResponse } from "@decohere/devkit/cli";
|
|
4
4
|
export type TagOptions = {
|
|
5
5
|
prefix?: string;
|
|
6
6
|
dryRun?: boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Workspace } from "@decohere/workspace";
|
|
2
|
+
import type { Action } from "@decohere/devkit/cli";
|
|
3
|
+
import { ActionResponse } from "@decohere/devkit/cli";
|
|
4
|
+
import { TypeEmitter } from "../services/type-emitter.js";
|
|
5
|
+
export type TypeCheckOptions = {
|
|
6
|
+
configuration: string;
|
|
7
|
+
};
|
|
8
|
+
export declare class TypeCheck implements Action<TypeCheckOptions> {
|
|
9
|
+
#private;
|
|
10
|
+
private readonly workspace;
|
|
11
|
+
private readonly typeEmitter;
|
|
12
|
+
constructor(workspace: Workspace, typeEmitter: TypeEmitter);
|
|
13
|
+
run: (options: TypeCheckOptions) => Promise<ActionResponse>;
|
|
14
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Action } from "@decohere/
|
|
2
|
-
import { ActionResponse } from "@decohere/
|
|
1
|
+
import type { Action } from "@decohere/devkit/cli";
|
|
2
|
+
import { ActionResponse } from "@decohere/devkit/cli";
|
|
3
3
|
export type UnlinkOptions = {
|
|
4
4
|
targetDir: string;
|
|
5
5
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Workspace } from "@decohere/
|
|
2
|
-
import type { Action, ResultStatus } from "@decohere/
|
|
3
|
-
import { ActionResponse } from "@decohere/
|
|
4
|
-
import { type VersionType } from "
|
|
1
|
+
import { Workspace } from "@decohere/workspace";
|
|
2
|
+
import type { Action, ResultStatus } from "@decohere/devkit/cli";
|
|
3
|
+
import { ActionResponse } from "@decohere/devkit/cli";
|
|
4
|
+
import { type VersionType } from "../semver/index.js";
|
|
5
5
|
export type VersionResponse = ResultStatus & {
|
|
6
6
|
name: string;
|
|
7
7
|
};
|
|
@@ -11,6 +11,12 @@ export type VersionOptions = {
|
|
|
11
11
|
releaseType?: VersionType;
|
|
12
12
|
channel?: string;
|
|
13
13
|
version?: string;
|
|
14
|
+
/** A CI run number: the version becomes `<base>-<channel>.<commit's UTC date>.<number>`. */
|
|
15
|
+
buildNumber?: string;
|
|
16
|
+
/** Copy the version from the built packages, failing if they don't all match. */
|
|
17
|
+
fromBuild?: boolean;
|
|
18
|
+
/** The build `fromBuild` reads. */
|
|
19
|
+
configuration?: string;
|
|
14
20
|
dryRun?: boolean;
|
|
15
21
|
commit?: boolean;
|
|
16
22
|
message?: string;
|
|
@@ -23,6 +29,10 @@ export declare class Version implements Action<VersionOptions> {
|
|
|
23
29
|
constructor(workspace: Workspace);
|
|
24
30
|
run(options: VersionOptions): Promise<ActionResponse>;
|
|
25
31
|
version(workspace: Workspace, options?: VersionOptions): Promise<ActionResponse<VersionResponse>>;
|
|
32
|
+
private resolveNextVersion;
|
|
33
|
+
private versionFromBuildNumber;
|
|
34
|
+
private versionFromBuild;
|
|
35
|
+
private readBuiltVersion;
|
|
26
36
|
private resolveBaseVersion;
|
|
27
37
|
private resolveVersionFromGitTag;
|
|
28
38
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Workspace } from "@decohere/
|
|
2
|
-
import type { Action } from "@decohere/
|
|
3
|
-
import { ActionResponse } from "@decohere/
|
|
1
|
+
import { Workspace } from "@decohere/workspace";
|
|
2
|
+
import type { Action } from "@decohere/devkit/cli";
|
|
3
|
+
import { ActionResponse } from "@decohere/devkit/cli";
|
|
4
4
|
export type WatchOptions = {
|
|
5
5
|
watch: boolean;
|
|
6
6
|
configuration: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { MergeOptions } from "@decohere/
|
|
2
|
-
import { CommandResponse, DecohereCommand } from "@decohere/
|
|
1
|
+
import type { MergeOptions } from "@decohere/devkit/cli";
|
|
2
|
+
import { CommandResponse, DecohereCommand } from "@decohere/devkit/cli";
|
|
3
3
|
import type { Build } from "../actions/build.action.js";
|
|
4
4
|
import type { Clean } from "../actions/clean.action.js";
|
|
5
5
|
import type { Copy } from "../actions/copy.action.js";
|
|
@@ -12,5 +12,6 @@ export type BuildActions = {
|
|
|
12
12
|
};
|
|
13
13
|
export declare class BuildCommand extends DecohereCommand<BuildActions> {
|
|
14
14
|
constructor(name?: string);
|
|
15
|
+
runsUntilStopped(options: Record<string, unknown>): boolean;
|
|
15
16
|
run: (actions: BuildActions, options: MergeOptions<BuildActions>) => Promise<CommandResponse<BuildActions>>;
|
|
16
17
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CommandHandler } from "@decohere/
|
|
2
|
-
import { DecohereCommand } from "@decohere/
|
|
1
|
+
import type { CommandHandler } from "@decohere/devkit/cli";
|
|
2
|
+
import { DecohereCommand } from "@decohere/devkit/cli";
|
|
3
3
|
export declare class DependencyCommand extends DecohereCommand {
|
|
4
4
|
constructor(name?: string, handler?: CommandHandler);
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Actions } from "@decohere/
|
|
2
|
-
import { type CommandHandler, type CommandResponse, type CommandType, DecohereCommand } from "@decohere/
|
|
1
|
+
import type { Actions } from "@decohere/devkit/cli";
|
|
2
|
+
import { type CommandHandler, type CommandResponse, type CommandType, DecohereCommand } from "@decohere/devkit/cli";
|
|
3
3
|
export declare class ForgeCommand extends DecohereCommand {
|
|
4
4
|
constructor(commands: Record<string, CommandType>, handler: CommandHandler);
|
|
5
5
|
run(_actions: Actions, _options: never): Promise<CommandResponse>;
|
|
@@ -3,6 +3,9 @@ export * from "./dependency.command.js";
|
|
|
3
3
|
export * from "./docker.command.js";
|
|
4
4
|
export * from "./forge.command.js";
|
|
5
5
|
export * from "./link.command.js";
|
|
6
|
+
export * from "./package.command.js";
|
|
7
|
+
export * from "./paths.command.js";
|
|
6
8
|
export * from "./publish.command.js";
|
|
7
9
|
export * from "./tag.command.js";
|
|
10
|
+
export * from "./typecheck.command.js";
|
|
8
11
|
export * from "./version.command.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { CommandHandler, MergeOptions } from "@decohere/
|
|
2
|
-
import { CommandResponse, DecohereCommand } from "@decohere/
|
|
1
|
+
import type { CommandHandler, MergeOptions } from "@decohere/devkit/cli";
|
|
2
|
+
import { CommandResponse, DecohereCommand } from "@decohere/devkit/cli";
|
|
3
3
|
import { Build } from "../actions/build.action.js";
|
|
4
4
|
import { Clean } from "../actions/clean.action.js";
|
|
5
5
|
import { Copy } from "../actions/copy.action.js";
|
|
@@ -19,6 +19,7 @@ type UnlinkActions = {
|
|
|
19
19
|
export declare class LinkCommand extends DecohereCommand<LinkActions> {
|
|
20
20
|
get actions(): (typeof Build | typeof Clean | typeof Copy | typeof Link | typeof Watch)[];
|
|
21
21
|
constructor(name?: string);
|
|
22
|
+
runsUntilStopped(options: Record<string, unknown>): boolean;
|
|
22
23
|
run: (actions: LinkActions, options: MergeOptions<LinkActions>) => Promise<CommandResponse<LinkActions>>;
|
|
23
24
|
}
|
|
24
25
|
export declare class UnlinkCommand extends DecohereCommand<UnlinkActions> {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DecohereCommand } from "@decohere/devkit/cli";
|
|
2
|
+
import { PackageDeployable } from "../actions/package.action.js";
|
|
3
|
+
export declare class PackageCommand extends DecohereCommand {
|
|
4
|
+
get actions(): (typeof PackageDeployable)[];
|
|
5
|
+
constructor(name: string);
|
|
6
|
+
/**
|
|
7
|
+
* Commander passes the positional before the options; the CLI host reads only options,
|
|
8
|
+
* so the project name is stashed on them.
|
|
9
|
+
*/
|
|
10
|
+
action(fn: (...args: any[]) => void | Promise<void>): this;
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Workspace } from "@decohere/workspace";
|
|
2
|
+
import type { WorkspaceFactoryOptions } from "@decohere/devkit/cli";
|
|
3
|
+
/**
|
|
4
|
+
* The workspace every Decohere tool sees (forge, the flux CLI and `flux.run`): forge's
|
|
5
|
+
* defaults, the user's `.decohere.js`, and the root: `--root-dir`, else the current folder.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createWorkspace(options?: WorkspaceFactoryOptions): Promise<Workspace>;
|
package/types/src/errors.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Project } from "@decohere/
|
|
1
|
+
import { Project } from "@decohere/workspace";
|
|
2
2
|
import type { ForgeConfiguration } from "../types/configuration.type.js";
|
|
3
3
|
import { SwcConfig } from "../types/swc-config.type.js";
|
|
4
|
-
declare module "@decohere/
|
|
4
|
+
declare module "@decohere/workspace" {
|
|
5
5
|
interface Project {
|
|
6
6
|
getForgeConfiguration(): ForgeConfiguration;
|
|
7
7
|
getSwcConfig(): Promise<SwcConfig>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FileEx } from "@decohere/
|
|
1
|
+
import type { FileEx } from "@decohere/core/io";
|
|
2
2
|
import type { Options } from "@swc/core";
|
|
3
3
|
import type { TranspileTarget } from "../types/build-target.type.js";
|
|
4
4
|
import type { SwcConfigOptions } from "../types/swc-config.type.js";
|
|
@@ -8,8 +8,9 @@ export declare class SwcConfigFactory {
|
|
|
8
8
|
* Call once per (project, target) and then use createFileConfig() per file.
|
|
9
9
|
*/
|
|
10
10
|
createBaseConfig(buildTarget: TranspileTarget, configOptions: SwcConfigOptions): Options;
|
|
11
|
-
/** Stamps a per-file filename onto a pre-built base config. */
|
|
11
|
+
/** Stamps a per-file filename onto a pre-built base config; `.tsx` also turns on JSX. */
|
|
12
12
|
createFileConfig(file: FileEx, baseConfig: Options): Options;
|
|
13
|
+
private static nonemptyPaths;
|
|
13
14
|
/**
|
|
14
15
|
* Validates SWC options against known causes of Rust/NAPI process crashes.
|
|
15
16
|
* Throws a ForgeError with a descriptive message instead of letting the
|