@decohere/forge 0.0.1-dev.114 → 0.0.1-dev.116
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/README.md +11 -11
- package/commonjs/src/actions/build.action.js +4 -4
- package/commonjs/src/actions/clean.action.js +4 -4
- package/commonjs/src/actions/commit.action.js +4 -4
- package/commonjs/src/actions/copy.action.js +5 -5
- package/commonjs/src/actions/dependency-report.action.js +4 -4
- package/commonjs/src/actions/dependency-sync.action.js +3 -3
- package/commonjs/src/actions/docker.action.js +5 -5
- package/commonjs/src/actions/link.action.js +3 -3
- package/commonjs/src/actions/package.action.js +5 -5
- package/commonjs/src/actions/paths.action.js +4 -4
- package/commonjs/src/actions/publish.action.js +4 -4
- package/commonjs/src/actions/sync-lock-file.action.js +2 -2
- package/commonjs/src/actions/tag.action.js +4 -4
- package/commonjs/src/actions/typecheck.action.js +4 -4
- package/commonjs/src/actions/unlink.action.js +1 -1
- package/commonjs/src/actions/version.action.js +5 -5
- package/commonjs/src/actions/watch.action.js +3 -3
- package/commonjs/src/commands/build.command.js +1 -1
- package/commonjs/src/commands/dependency.command.js +1 -1
- package/commonjs/src/commands/docker.command.js +1 -1
- package/commonjs/src/commands/forge.command.js +1 -1
- package/commonjs/src/commands/link.command.js +1 -1
- package/commonjs/src/commands/package.command.js +1 -1
- package/commonjs/src/commands/paths.command.js +1 -1
- package/commonjs/src/commands/publish.command.js +1 -1
- package/commonjs/src/commands/tag.command.js +1 -1
- package/commonjs/src/commands/typecheck.command.js +1 -1
- package/commonjs/src/commands/version.command.js +1 -1
- package/commonjs/src/create-workspace.js +5 -5
- package/commonjs/src/errors.js +2 -2
- package/commonjs/src/extensions/project.extensions.js +10 -10
- package/commonjs/src/factories/swc-config.factory.js +4 -4
- package/commonjs/src/forge.module.js +1 -1
- package/commonjs/src/packaging/dependency-pinner.service.js +1 -1
- package/commonjs/src/packaging/deployable.js +1 -1
- package/commonjs/src/packaging/import-graph.service.js +1 -1
- package/commonjs/src/packaging/release-exports.js +2 -2
- package/commonjs/src/packaging/ui-assets.js +1 -1
- package/commonjs/src/services/dependency-resolver.service.js +1 -1
- package/commonjs/src/services/file-writer.service.js +2 -2
- package/commonjs/src/services/output-cache.js +1 -1
- package/commonjs/src/services/swc-transpiler.js +5 -5
- package/commonjs/src/services/ts-program-host.js +2 -2
- package/commonjs/src/services/type-emission-program.js +1 -1
- package/commonjs/src/services/type-emitter.js +4 -4
- package/commonjs/src/vitest/forge-build.plugin.js +4 -4
- package/commonjs/src/workspace.config.js +2 -2
- package/es6/src/actions/build.action.js +3 -3
- package/es6/src/actions/clean.action.js +3 -3
- package/es6/src/actions/commit.action.js +3 -3
- package/es6/src/actions/copy.action.js +4 -4
- package/es6/src/actions/dependency-report.action.js +3 -3
- package/es6/src/actions/dependency-sync.action.js +2 -2
- package/es6/src/actions/docker.action.js +4 -4
- package/es6/src/actions/link.action.js +2 -2
- package/es6/src/actions/package.action.js +4 -4
- package/es6/src/actions/paths.action.js +2 -2
- package/es6/src/actions/publish.action.js +3 -3
- package/es6/src/actions/sync-lock-file.action.js +2 -2
- package/es6/src/actions/tag.action.js +3 -3
- package/es6/src/actions/typecheck.action.js +3 -3
- package/es6/src/actions/unlink.action.js +1 -1
- package/es6/src/actions/version.action.js +4 -4
- package/es6/src/actions/watch.action.js +2 -2
- package/es6/src/commands/build.command.js +1 -1
- package/es6/src/commands/dependency.command.js +1 -1
- package/es6/src/commands/docker.command.js +1 -1
- package/es6/src/commands/forge.command.js +1 -1
- package/es6/src/commands/link.command.js +1 -1
- package/es6/src/commands/package.command.js +1 -1
- package/es6/src/commands/paths.command.js +1 -1
- package/es6/src/commands/publish.command.js +1 -1
- package/es6/src/commands/tag.command.js +1 -1
- package/es6/src/commands/typecheck.command.js +1 -1
- package/es6/src/commands/version.command.js +1 -1
- package/es6/src/create-workspace.js +1 -1
- package/es6/src/errors.js +1 -1
- package/es6/src/extensions/project.extensions.js +4 -4
- package/es6/src/factories/swc-config.factory.js +3 -3
- package/es6/src/forge.module.js +1 -1
- package/es6/src/packaging/dependency-pinner.service.js +1 -1
- package/es6/src/packaging/deployable.js +1 -1
- package/es6/src/packaging/import-graph.service.js +1 -1
- package/es6/src/packaging/release-exports.js +1 -1
- package/es6/src/packaging/ui-assets.js +1 -1
- package/es6/src/services/dependency-resolver.service.js +1 -1
- package/es6/src/services/file-writer.service.js +2 -2
- package/es6/src/services/output-cache.js +1 -1
- package/es6/src/services/swc-transpiler.js +4 -4
- package/es6/src/services/ts-program-host.js +2 -2
- package/es6/src/services/type-emission-program.js +1 -1
- package/es6/src/services/type-emitter.js +4 -4
- package/es6/src/vitest/forge-build.plugin.js +2 -2
- package/es6/src/workspace.config.js +1 -1
- package/package.json +5 -5
- 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 +3 -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 +3 -3
- package/types/src/actions/link.action.d.ts +3 -3
- package/types/src/actions/package.action.d.ts +3 -3
- package/types/src/actions/paths.action.d.ts +4 -4
- 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 +3 -3
- package/types/src/actions/unlink.action.d.ts +2 -2
- package/types/src/actions/version.action.d.ts +4 -4
- package/types/src/actions/watch.action.d.ts +3 -3
- package/types/src/commands/build.command.d.ts +2 -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/link.command.d.ts +2 -2
- package/types/src/commands/package.command.d.ts +1 -1
- package/types/src/commands/paths.command.d.ts +1 -1
- 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 +1 -1
- package/types/src/commands/version.command.d.ts +1 -1
- package/types/src/create-workspace.d.ts +2 -2
- 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 +1 -1
- package/types/src/forge.module.d.ts +4 -4
- package/types/src/packaging/dependency-pinner.service.d.ts +1 -1
- package/types/src/packaging/deployable.d.ts +1 -1
- package/types/src/packaging/import-graph.service.d.ts +1 -1
- package/types/src/packaging/release-exports.d.ts +1 -1
- package/types/src/packaging/ui-assets.d.ts +1 -1
- package/types/src/services/dependency-resolver.service.d.ts +1 -1
- package/types/src/services/file-writer.service.d.ts +1 -1
- package/types/src/services/incremental-watch.d.ts +1 -1
- package/types/src/services/swc-transpiler.d.ts +2 -2
- package/types/src/services/ts-program-host.d.ts +1 -1
- package/types/src/services/type-emission-program.d.ts +2 -2
- package/types/src/services/type-emitter.d.ts +3 -3
- package/types/src/types/configuration.type.d.ts +1 -1
- package/types/src/types/dependency.types.d.ts +1 -1
- package/types/src/types/swc-config.type.d.ts +1 -1
- package/types/src/types/transform-response.model.d.ts +2 -2
- package/types/src/types/transformer.type.d.ts +2 -2
- package/types/src/types/workspace-config.type.d.ts +3 -3
|
@@ -10,10 +10,10 @@ Object.defineProperty(exports, "ProjectExtensions", {
|
|
|
10
10
|
});
|
|
11
11
|
const _nodefs = /*#__PURE__*/ _interop_require_default(require("node:fs"));
|
|
12
12
|
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
13
|
-
const
|
|
14
|
-
const _caching = require("@decohere/
|
|
15
|
-
const _extensibility = require("@decohere/
|
|
16
|
-
const _io = require("@decohere/
|
|
13
|
+
const _workspace = require("@decohere/workspace");
|
|
14
|
+
const _caching = require("@decohere/core/caching");
|
|
15
|
+
const _extensibility = require("@decohere/core/extensibility");
|
|
16
|
+
const _io = require("@decohere/core/io");
|
|
17
17
|
const _const = require("../const.js");
|
|
18
18
|
const _swcconfigtype = require("../types/swc-config.type.js");
|
|
19
19
|
function _interop_require_default(obj) {
|
|
@@ -65,28 +65,28 @@ class ProjectExtensions {
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
_ts_decorate([
|
|
68
|
-
(0, _extensibility.extension)(
|
|
68
|
+
(0, _extensibility.extension)(_workspace.Project),
|
|
69
69
|
_ts_metadata("design:type", Function),
|
|
70
70
|
_ts_metadata("design:paramtypes", [
|
|
71
|
-
typeof
|
|
71
|
+
typeof _workspace.Project === "undefined" ? Object : _workspace.Project
|
|
72
72
|
]),
|
|
73
73
|
_ts_metadata("design:returntype", typeof ForgeConfiguration === "undefined" ? Object : ForgeConfiguration)
|
|
74
74
|
], ProjectExtensions, "getForgeConfiguration", null);
|
|
75
75
|
_ts_decorate([
|
|
76
|
-
(0, _extensibility.extension)(
|
|
76
|
+
(0, _extensibility.extension)(_workspace.Project),
|
|
77
77
|
(0, _caching.memoize)(),
|
|
78
78
|
_ts_metadata("design:type", Function),
|
|
79
79
|
_ts_metadata("design:paramtypes", [
|
|
80
|
-
typeof
|
|
80
|
+
typeof _workspace.Project === "undefined" ? Object : _workspace.Project
|
|
81
81
|
]),
|
|
82
82
|
_ts_metadata("design:returntype", Promise)
|
|
83
83
|
], ProjectExtensions, "getSwcConfig", null);
|
|
84
84
|
_ts_decorate([
|
|
85
|
-
(0, _extensibility.extension)(
|
|
85
|
+
(0, _extensibility.extension)(_workspace.Project),
|
|
86
86
|
(0, _caching.memoize)(),
|
|
87
87
|
_ts_metadata("design:type", Function),
|
|
88
88
|
_ts_metadata("design:paramtypes", [
|
|
89
|
-
typeof
|
|
89
|
+
typeof _workspace.Project === "undefined" ? Object : _workspace.Project
|
|
90
90
|
]),
|
|
91
91
|
_ts_metadata("design:returntype", typeof _swcconfigtype.SwcConfig === "undefined" ? Object : _swcconfigtype.SwcConfig)
|
|
92
92
|
], ProjectExtensions, "getSwcConfigSync", null);
|
|
@@ -9,9 +9,9 @@ Object.defineProperty(exports, "SwcConfigFactory", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
12
|
-
const
|
|
13
|
-
const _diagnostics = require("@decohere/
|
|
14
|
-
const _objects = require("@decohere/
|
|
12
|
+
const _workspace = require("@decohere/workspace");
|
|
13
|
+
const _diagnostics = require("@decohere/core/diagnostics");
|
|
14
|
+
const _objects = require("@decohere/core/objects");
|
|
15
15
|
const _errors = require("../errors.js");
|
|
16
16
|
function _interop_require_default(obj) {
|
|
17
17
|
return obj && obj.__esModule ? obj : {
|
|
@@ -50,7 +50,7 @@ class SwcConfigFactory {
|
|
|
50
50
|
*/ createBaseConfig(buildTarget, configOptions) {
|
|
51
51
|
const { userConfig, tsConfig, aliasPaths, sourceMaps, workspace, projects } = configOptions;
|
|
52
52
|
const { compilerOptions } = tsConfig ?? {};
|
|
53
|
-
const aliases = aliasPaths ? workspace != null ? workspace.getPackageAliases(projects?.[0]?.configuration.name ?? "debug") : projects != null && projects.length > 0 ?
|
|
53
|
+
const aliases = aliasPaths ? workspace != null ? workspace.getPackageAliases(projects?.[0]?.configuration.name ?? "debug") : projects != null && projects.length > 0 ? _workspace.packageAliases.build(projects, {
|
|
54
54
|
baseUrl: SwcConfigFactory.getBaseUrl(tsConfig) ?? _nodepath.default.resolve(projects[0].rootDir),
|
|
55
55
|
tsconfigPaths: compilerOptions?.paths
|
|
56
56
|
}) : undefined : undefined;
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "ForgeModule", {
|
|
|
8
8
|
return ForgeModule;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _cli = require("@decohere/
|
|
11
|
+
const _cli = require("@decohere/core/cli");
|
|
12
12
|
const _index = /*#__PURE__*/ _interop_require_wildcard(require("./actions/index.js"));
|
|
13
13
|
const _index1 = /*#__PURE__*/ _interop_require_wildcard(require("./commands/index.js"));
|
|
14
14
|
const _createworkspace = require("./create-workspace.js");
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "DependencyPinner", {
|
|
|
10
10
|
});
|
|
11
11
|
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
12
12
|
const _decorators = require("@decohere/crucible/decorators");
|
|
13
|
-
const _io = require("@decohere/
|
|
13
|
+
const _io = require("@decohere/core/io");
|
|
14
14
|
const _errors = require("../errors.js");
|
|
15
15
|
function _interop_require_default(obj) {
|
|
16
16
|
return obj && obj.__esModule ? obj : {
|
|
@@ -17,7 +17,7 @@ _export(exports, {
|
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
20
|
-
const _io = require("@decohere/
|
|
20
|
+
const _io = require("@decohere/core/io");
|
|
21
21
|
function _interop_require_default(obj) {
|
|
22
22
|
return obj && obj.__esModule ? obj : {
|
|
23
23
|
default: obj
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "ImportGraph", {
|
|
|
10
10
|
});
|
|
11
11
|
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
12
12
|
const _decorators = require("@decohere/crucible/decorators");
|
|
13
|
-
const _io = require("@decohere/
|
|
13
|
+
const _io = require("@decohere/core/io");
|
|
14
14
|
const _scribe = require("@decohere/scribe");
|
|
15
15
|
const _parseimports = require("parse-imports");
|
|
16
16
|
const _const = require("../const.js");
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "releaseExports", {
|
|
|
8
8
|
return releaseExports;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const
|
|
11
|
+
const _workspace = require("@decohere/workspace");
|
|
12
12
|
const ES6_PREFIX = "./es6/";
|
|
13
13
|
/** Condition names that can point at runnable ESM, most specific first. `types` never does. */ const RUNTIME_CONDITIONS = [
|
|
14
14
|
"import",
|
|
@@ -17,7 +17,7 @@ const ES6_PREFIX = "./es6/";
|
|
|
17
17
|
];
|
|
18
18
|
/** `src/main.ts` becomes `src/main.js` (`.mts` `.mjs`, `.cts` `.cjs`), with any leading `./` dropped. */ function toJs(filePath) {
|
|
19
19
|
const file = filePath.replace(/^\.\//, "");
|
|
20
|
-
return
|
|
20
|
+
return _workspace.sourceExtensions.isSource(file) ? _workspace.sourceExtensions.outputPath(file) : file;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* The `exports` a library needs once only its `es6/` output is shipped: the library's own
|
|
@@ -20,7 +20,7 @@ _export(exports, {
|
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
23
|
-
const _io = require("@decohere/
|
|
23
|
+
const _io = require("@decohere/core/io");
|
|
24
24
|
const _errors = require("../errors.js");
|
|
25
25
|
function _interop_require_default(obj) {
|
|
26
26
|
return obj && obj.__esModule ? obj : {
|
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "DependencyResolver", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _decorators = require("@decohere/crucible/decorators");
|
|
12
|
-
const _io = require("@decohere/
|
|
12
|
+
const _io = require("@decohere/core/io");
|
|
13
13
|
const _parseimports = require("parse-imports");
|
|
14
14
|
const _const = require("../const.js");
|
|
15
15
|
const _errors = require("../errors.js");
|
|
@@ -10,8 +10,8 @@ Object.defineProperty(exports, "FileWriterService", {
|
|
|
10
10
|
});
|
|
11
11
|
const _promises = /*#__PURE__*/ _interop_require_default(require("node:fs/promises"));
|
|
12
12
|
const _decorators = require("@decohere/crucible/decorators");
|
|
13
|
-
const _diagnostics = require("@decohere/
|
|
14
|
-
const _io = require("@decohere/
|
|
13
|
+
const _diagnostics = require("@decohere/core/diagnostics");
|
|
14
|
+
const _io = require("@decohere/core/io");
|
|
15
15
|
require("../extensions/project.extensions.js");
|
|
16
16
|
function _interop_require_default(obj) {
|
|
17
17
|
return obj && obj.__esModule ? obj : {
|
|
@@ -9,10 +9,10 @@ Object.defineProperty(exports, "SwcTranspiler", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
12
|
-
const
|
|
13
|
-
const _caching = require("@decohere/
|
|
14
|
-
const _diagnostics = require("@decohere/
|
|
15
|
-
const _io = require("@decohere/
|
|
12
|
+
const _workspace = require("@decohere/workspace");
|
|
13
|
+
const _caching = require("@decohere/core/caching");
|
|
14
|
+
const _diagnostics = require("@decohere/core/diagnostics");
|
|
15
|
+
const _io = require("@decohere/core/io");
|
|
16
16
|
const _core = require("@swc/core");
|
|
17
17
|
const _buildtargettype = require("../types/build-target.type.js");
|
|
18
18
|
require("../extensions/project.extensions.js");
|
|
@@ -146,7 +146,7 @@ class SwcTranspiler {
|
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
148
|
static succeeded(file, buildTarget, swcOptions, content, code, project) {
|
|
149
|
-
const fileName =
|
|
149
|
+
const fileName = _workspace.sourceExtensions.outputPath(file.relativePath);
|
|
150
150
|
const outBaseDir = project?.getOutDir(buildTarget);
|
|
151
151
|
const outputPath = outBaseDir ? _nodepath.default.join(outBaseDir, fileName) : undefined;
|
|
152
152
|
return _transformresponsemodel.TransformResponse.Success({
|
|
@@ -9,8 +9,8 @@ Object.defineProperty(exports, "TsProgramHost", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _nodefs = /*#__PURE__*/ _interop_require_default(require("node:fs"));
|
|
12
|
-
const _caching = require("@decohere/
|
|
13
|
-
const _diagnostics = require("@decohere/
|
|
12
|
+
const _caching = require("@decohere/core/caching");
|
|
13
|
+
const _diagnostics = require("@decohere/core/diagnostics");
|
|
14
14
|
const _typescript = require("typescript");
|
|
15
15
|
const _typeemitter = require("./type-emitter.js");
|
|
16
16
|
function _interop_require_default(obj) {
|
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "TypeEmissionProgram", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
12
|
-
const _diagnostics = require("@decohere/
|
|
12
|
+
const _diagnostics = require("@decohere/core/diagnostics");
|
|
13
13
|
const _typescript = /*#__PURE__*/ _interop_require_default(require("typescript"));
|
|
14
14
|
const _transformresponsemodel = require("../types/transform-response.model.js");
|
|
15
15
|
function _interop_require_default(obj) {
|
|
@@ -22,9 +22,9 @@ _export(exports, {
|
|
|
22
22
|
return TypeEmitter;
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
|
-
const _caching = require("@decohere/
|
|
26
|
-
const _diagnostics = require("@decohere/
|
|
27
|
-
const _io = require("@decohere/
|
|
25
|
+
const _caching = require("@decohere/core/caching");
|
|
26
|
+
const _diagnostics = require("@decohere/core/diagnostics");
|
|
27
|
+
const _io = require("@decohere/core/io");
|
|
28
28
|
require("../extensions/project.extensions.js");
|
|
29
29
|
const _incrementalwatch = require("./incremental-watch.js");
|
|
30
30
|
const _outputcache = require("./output-cache.js");
|
|
@@ -90,7 +90,7 @@ class TypeEmitter {
|
|
|
90
90
|
return responses;
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
|
-
* Type-check projects without emitting files. Includes every
|
|
93
|
+
* Type-check projects without emitting files. Includes every workspace project, not
|
|
94
94
|
* only those with a `types` build target (debug is es6-only).
|
|
95
95
|
*/ async checkProject(projectArrayLike) {
|
|
96
96
|
const programs = await this.preparePrograms(projectArrayLike, {
|
|
@@ -10,8 +10,8 @@ Object.defineProperty(exports, "forgeBuild", {
|
|
|
10
10
|
});
|
|
11
11
|
const _nodefs = require("node:fs");
|
|
12
12
|
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
13
|
-
const
|
|
14
|
-
const _io = require("@decohere/
|
|
13
|
+
const _workspace = require("@decohere/workspace");
|
|
14
|
+
const _io = require("@decohere/core/io");
|
|
15
15
|
const _scribe = require("@decohere/scribe");
|
|
16
16
|
const _swctranspiler = require("../services/swc-transpiler.js");
|
|
17
17
|
const _buildtargettype = require("../types/build-target.type.js");
|
|
@@ -48,7 +48,7 @@ function forgeBuild(options) {
|
|
|
48
48
|
const initWorkspace = async ()=>{
|
|
49
49
|
if (workspace !== null) return;
|
|
50
50
|
logger.debug(`Loading Forge workspace (buildConfig: ${buildConfig}, workspaceRoot: ${workspaceRoot})`);
|
|
51
|
-
workspace = await
|
|
51
|
+
workspace = await _workspace.WorkspaceFactory.create({
|
|
52
52
|
..._workspaceconfig.WorkspaceDefaults,
|
|
53
53
|
rootDir: workspaceRoot
|
|
54
54
|
});
|
|
@@ -75,7 +75,7 @@ function forgeBuild(options) {
|
|
|
75
75
|
// `./a.js` is `a.ts` or `a.tsx`, `./a.mjs` is `a.mts`, `./a.cjs` is `a.cts` (#518).
|
|
76
76
|
if (importer != null && /\.[mc]?jsx?$/.test(source) && source.startsWith(".")) {
|
|
77
77
|
const written = _nodepath.default.resolve(_nodepath.default.dirname(importer), source);
|
|
78
|
-
return
|
|
78
|
+
return _workspace.sourceExtensions.candidates(written).find((c)=>(0, _nodefs.existsSync)(c)) ?? null;
|
|
79
79
|
}
|
|
80
80
|
return null;
|
|
81
81
|
},
|
|
@@ -25,7 +25,7 @@ _export(exports, {
|
|
|
25
25
|
return WorkspaceDefaults;
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
|
-
const
|
|
28
|
+
const _workspace = require("@decohere/workspace");
|
|
29
29
|
const _buildtargettype = require("./types/build-target.type.js");
|
|
30
30
|
const Debug = {
|
|
31
31
|
name: "debug",
|
|
@@ -83,7 +83,7 @@ const DefaultConfigurations = [
|
|
|
83
83
|
Release
|
|
84
84
|
];
|
|
85
85
|
const WorkspaceDefaults = {
|
|
86
|
-
...
|
|
86
|
+
..._workspace.WorkspaceDefaults,
|
|
87
87
|
// Root-only files npm ships with the package. Globs that match nothing are fine.
|
|
88
88
|
copyFiles: [
|
|
89
89
|
"package.json",
|
|
@@ -13,9 +13,9 @@ function _ts_param(paramIndex, decorator) {
|
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
15
|
import { inject, injectable } from "@decohere/crucible/decorators";
|
|
16
|
-
import { Workspace } from "@decohere/
|
|
17
|
-
import { ActionResponse } from "@decohere/
|
|
18
|
-
import { Trace } from "@decohere/
|
|
16
|
+
import { Workspace } from "@decohere/workspace";
|
|
17
|
+
import { ActionResponse } from "@decohere/core/cli";
|
|
18
|
+
import { Trace } from "@decohere/core/diagnostics";
|
|
19
19
|
import { scribe } from "@decohere/scribe";
|
|
20
20
|
import { ForgeError } from "../errors.js";
|
|
21
21
|
import { FileWriterService } from "../services/file-writer.service.js";
|
|
@@ -8,9 +8,9 @@ function _ts_metadata(k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
}
|
|
10
10
|
import { injectable } from "@decohere/crucible/decorators";
|
|
11
|
-
import { Workspace } from "@decohere/
|
|
12
|
-
import { ActionResponse } from "@decohere/
|
|
13
|
-
import { io } from "@decohere/
|
|
11
|
+
import { Workspace } from "@decohere/workspace";
|
|
12
|
+
import { ActionResponse } from "@decohere/core/cli";
|
|
13
|
+
import { io } from "@decohere/core/io";
|
|
14
14
|
import { scribe } from "@decohere/scribe";
|
|
15
15
|
export class Clean {
|
|
16
16
|
workspace;
|
|
@@ -9,9 +9,9 @@ function _ts_metadata(k, v) {
|
|
|
9
9
|
}
|
|
10
10
|
import path from "node:path";
|
|
11
11
|
import { injectable } from "@decohere/crucible/decorators";
|
|
12
|
-
import { Workspace } from "@decohere/
|
|
13
|
-
import { ActionResponse } from "@decohere/
|
|
14
|
-
import { Git } from "@decohere/
|
|
12
|
+
import { Workspace } from "@decohere/workspace";
|
|
13
|
+
import { ActionResponse } from "@decohere/core/cli";
|
|
14
|
+
import { Git } from "@decohere/core/interop";
|
|
15
15
|
import { scribe } from "@decohere/scribe";
|
|
16
16
|
import { formatUnknownError } from "../errors.js";
|
|
17
17
|
import { Release } from "../workspace.config.js";
|
|
@@ -9,10 +9,10 @@ function _ts_metadata(k, v) {
|
|
|
9
9
|
}
|
|
10
10
|
import path from "node:path";
|
|
11
11
|
import { injectable } from "@decohere/crucible/decorators";
|
|
12
|
-
import { Workspace } from "@decohere/
|
|
13
|
-
import { ActionResponse } from "@decohere/
|
|
14
|
-
import { io } from "@decohere/
|
|
15
|
-
import { retry } from "@decohere/
|
|
12
|
+
import { Workspace } from "@decohere/workspace";
|
|
13
|
+
import { ActionResponse } from "@decohere/core/cli";
|
|
14
|
+
import { io } from "@decohere/core/io";
|
|
15
|
+
import { retry } from "@decohere/core/system";
|
|
16
16
|
import { scribe } from "@decohere/scribe";
|
|
17
17
|
const COPY_RETRY_ATTEMPTS = 3;
|
|
18
18
|
const COPY_RETRY_DELAY_MS = 25;
|
|
@@ -8,9 +8,9 @@ function _ts_metadata(k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
}
|
|
10
10
|
import { injectable } from "@decohere/crucible/decorators";
|
|
11
|
-
import { Workspace } from "@decohere/
|
|
12
|
-
import { ActionResponse } from "@decohere/
|
|
13
|
-
import { io } from "@decohere/
|
|
11
|
+
import { Workspace } from "@decohere/workspace";
|
|
12
|
+
import { ActionResponse } from "@decohere/core/cli";
|
|
13
|
+
import { io } from "@decohere/core/io";
|
|
14
14
|
import { scribe } from "@decohere/scribe";
|
|
15
15
|
import { formatUnknownError } from "../errors.js";
|
|
16
16
|
import { DependencyResolver } from "../services/dependency-resolver.service.js";
|
|
@@ -8,8 +8,8 @@ function _ts_metadata(k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
}
|
|
10
10
|
import { injectable } from "@decohere/crucible/decorators";
|
|
11
|
-
import { Workspace } from "@decohere/
|
|
12
|
-
import { ActionResponse } from "@decohere/
|
|
11
|
+
import { Workspace } from "@decohere/workspace";
|
|
12
|
+
import { ActionResponse } from "@decohere/core/cli";
|
|
13
13
|
import { scribe } from "@decohere/scribe";
|
|
14
14
|
import { formatUnknownError } from "../errors.js";
|
|
15
15
|
import { DependencyResolver } from "../services/dependency-resolver.service.js";
|
|
@@ -9,10 +9,10 @@ function _ts_metadata(k, v) {
|
|
|
9
9
|
}
|
|
10
10
|
import path from "node:path";
|
|
11
11
|
import { injectable } from "@decohere/crucible/decorators";
|
|
12
|
-
import { Workspace } from "@decohere/
|
|
13
|
-
import { ActionResponse } from "@decohere/
|
|
14
|
-
import { Docker as DockerInterop } from "@decohere/
|
|
15
|
-
import { io } from "@decohere/
|
|
12
|
+
import { Workspace } from "@decohere/workspace";
|
|
13
|
+
import { ActionResponse } from "@decohere/core/cli";
|
|
14
|
+
import { Docker as DockerInterop } from "@decohere/core/interop";
|
|
15
|
+
import { io } from "@decohere/core/io";
|
|
16
16
|
import { scribe } from "@decohere/scribe";
|
|
17
17
|
import { ForgeError, formatUnknownError } from "../errors.js";
|
|
18
18
|
import { deployable, PACKAGE_DIR } from "../packaging/deployable.js";
|
|
@@ -10,8 +10,8 @@ function _ts_metadata(k, v) {
|
|
|
10
10
|
import fs from "node:fs/promises";
|
|
11
11
|
import path from "node:path";
|
|
12
12
|
import { injectable } from "@decohere/crucible/decorators";
|
|
13
|
-
import { Workspace } from "@decohere/
|
|
14
|
-
import { ActionResponse } from "@decohere/
|
|
13
|
+
import { Workspace } from "@decohere/workspace";
|
|
14
|
+
import { ActionResponse } from "@decohere/core/cli";
|
|
15
15
|
import { scribe } from "@decohere/scribe";
|
|
16
16
|
import "../extensions/project.extensions.js";
|
|
17
17
|
import { ForgeError } from "../errors.js";
|
|
@@ -10,10 +10,10 @@ function _ts_metadata(k, v) {
|
|
|
10
10
|
import fs from "node:fs/promises";
|
|
11
11
|
import path from "node:path";
|
|
12
12
|
import { injectable } from "@decohere/crucible/decorators";
|
|
13
|
-
import { Workspace } from "@decohere/
|
|
14
|
-
import { ActionResponse } from "@decohere/
|
|
15
|
-
import { Npm } from "@decohere/
|
|
16
|
-
import { io } from "@decohere/
|
|
13
|
+
import { Workspace } from "@decohere/workspace";
|
|
14
|
+
import { ActionResponse } from "@decohere/core/cli";
|
|
15
|
+
import { Npm } from "@decohere/core/interop";
|
|
16
|
+
import { io } from "@decohere/core/io";
|
|
17
17
|
import { scribe } from "@decohere/scribe";
|
|
18
18
|
import { ForgeError, formatUnknownError } from "../errors.js";
|
|
19
19
|
import { DependencyPinner } from "../packaging/dependency-pinner.service.js";
|
|
@@ -11,8 +11,8 @@ import { existsSync } from "node:fs";
|
|
|
11
11
|
import { readFile, writeFile } from "node:fs/promises";
|
|
12
12
|
import path from "node:path";
|
|
13
13
|
import { injectable } from "@decohere/crucible/decorators";
|
|
14
|
-
import { packageAliases, Workspace } from "@decohere/
|
|
15
|
-
import { ActionResponse } from "@decohere/
|
|
14
|
+
import { packageAliases, Workspace } from "@decohere/workspace";
|
|
15
|
+
import { ActionResponse } from "@decohere/core/cli";
|
|
16
16
|
import { scribe } from "@decohere/scribe";
|
|
17
17
|
export const PATHS_FILE = "tsconfig.paths.json";
|
|
18
18
|
export class Paths {
|
|
@@ -8,9 +8,9 @@ function _ts_metadata(k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
}
|
|
10
10
|
import { injectable } from "@decohere/crucible/decorators";
|
|
11
|
-
import { Workspace } from "@decohere/
|
|
12
|
-
import { ActionResponse } from "@decohere/
|
|
13
|
-
import { Npm } from "@decohere/
|
|
11
|
+
import { Workspace } from "@decohere/workspace";
|
|
12
|
+
import { ActionResponse } from "@decohere/core/cli";
|
|
13
|
+
import { Npm } from "@decohere/core/interop";
|
|
14
14
|
import { scribe } from "@decohere/scribe";
|
|
15
15
|
import { ForgeError, formatUnknownError } from "../errors.js";
|
|
16
16
|
export class Publish {
|
|
@@ -5,8 +5,8 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
}
|
|
7
7
|
import { injectable } from "@decohere/crucible/decorators";
|
|
8
|
-
import { ActionResponse } from "@decohere/
|
|
9
|
-
import { Pnpm } from "@decohere/
|
|
8
|
+
import { ActionResponse } from "@decohere/core/cli";
|
|
9
|
+
import { Pnpm } from "@decohere/core/interop";
|
|
10
10
|
import { scribe } from "@decohere/scribe";
|
|
11
11
|
import { formatUnknownError } from "../errors.js";
|
|
12
12
|
export class SyncLockFile {
|
|
@@ -8,9 +8,9 @@ function _ts_metadata(k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
}
|
|
10
10
|
import { injectable } from "@decohere/crucible/decorators";
|
|
11
|
-
import { Workspace } from "@decohere/
|
|
12
|
-
import { ActionResponse } from "@decohere/
|
|
13
|
-
import { Git } from "@decohere/
|
|
11
|
+
import { Workspace } from "@decohere/workspace";
|
|
12
|
+
import { ActionResponse } from "@decohere/core/cli";
|
|
13
|
+
import { Git } from "@decohere/core/interop";
|
|
14
14
|
import { scribe } from "@decohere/scribe";
|
|
15
15
|
import { ForgeError, formatUnknownError } from "../errors.js";
|
|
16
16
|
export class Tag {
|
|
@@ -8,9 +8,9 @@ function _ts_metadata(k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
}
|
|
10
10
|
import { injectable } from "@decohere/crucible/decorators";
|
|
11
|
-
import { Workspace } from "@decohere/
|
|
12
|
-
import { ActionResponse } from "@decohere/
|
|
13
|
-
import { Trace } from "@decohere/
|
|
11
|
+
import { Workspace } from "@decohere/workspace";
|
|
12
|
+
import { ActionResponse } from "@decohere/core/cli";
|
|
13
|
+
import { Trace } from "@decohere/core/diagnostics";
|
|
14
14
|
import { scribe } from "@decohere/scribe";
|
|
15
15
|
import ts from "typescript";
|
|
16
16
|
import { ForgeError } from "../errors.js";
|
|
@@ -7,7 +7,7 @@ function _ts_decorate(decorators, target, key, desc) {
|
|
|
7
7
|
import fs from "node:fs/promises";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import { injectable } from "@decohere/crucible/decorators";
|
|
10
|
-
import { ActionResponse } from "@decohere/
|
|
10
|
+
import { ActionResponse } from "@decohere/core/cli";
|
|
11
11
|
import { scribe } from "@decohere/scribe";
|
|
12
12
|
import { ForgeError } from "../errors.js";
|
|
13
13
|
import { LINK_MANIFEST } from "./link.action.js";
|
|
@@ -11,10 +11,10 @@ import { execSync } from "node:child_process";
|
|
|
11
11
|
import { readdir, readFile } from "node:fs/promises";
|
|
12
12
|
import { join } from "node:path";
|
|
13
13
|
import { injectable } from "@decohere/crucible/decorators";
|
|
14
|
-
import { Workspace } from "@decohere/
|
|
15
|
-
import { ActionResponse } from "@decohere/
|
|
16
|
-
import { Git } from "@decohere/
|
|
17
|
-
import { Semver, SemverError, VersionTypes } from "@decohere/
|
|
14
|
+
import { Workspace } from "@decohere/workspace";
|
|
15
|
+
import { ActionResponse } from "@decohere/core/cli";
|
|
16
|
+
import { Git } from "@decohere/core/interop";
|
|
17
|
+
import { Semver, SemverError, VersionTypes } from "@decohere/core/semver";
|
|
18
18
|
import { scribe } from "@decohere/scribe";
|
|
19
19
|
import { ForgeError, formatUnknownError } from "../errors.js";
|
|
20
20
|
export const DefaultChannel = "beta";
|
|
@@ -8,8 +8,8 @@ function _ts_metadata(k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
}
|
|
10
10
|
import { injectable } from "@decohere/crucible/decorators";
|
|
11
|
-
import { Workspace } from "@decohere/
|
|
12
|
-
import { ActionResponse } from "@decohere/
|
|
11
|
+
import { Workspace } from "@decohere/workspace";
|
|
12
|
+
import { ActionResponse } from "@decohere/core/cli";
|
|
13
13
|
import { scribe } from "@decohere/scribe";
|
|
14
14
|
export class Watch {
|
|
15
15
|
workspace;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommandResponse, ConfigurationOption, DecohereCommand, NoCleanOptions } from "@decohere/
|
|
1
|
+
import { CommandResponse, ConfigurationOption, DecohereCommand, NoCleanOptions } from "@decohere/core/cli";
|
|
2
2
|
import auto from "async/auto.js";
|
|
3
3
|
export class BuildCommand extends DecohereCommand {
|
|
4
4
|
constructor(name){
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommandResponse, ConfigurationOption, DecohereCommand } from "@decohere/
|
|
1
|
+
import { CommandResponse, ConfigurationOption, DecohereCommand } from "@decohere/core/cli";
|
|
2
2
|
import { CommitFiles } from "../actions/commit.action.js";
|
|
3
3
|
import { ReportDependencies } from "../actions/dependency-report.action.js";
|
|
4
4
|
import { SyncDependencies as DependencySync } from "../actions/dependency-sync.action.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConfigurationOption, DecohereCommand, DryRunOption } from "@decohere/
|
|
1
|
+
import { ConfigurationOption, DecohereCommand, DryRunOption } from "@decohere/core/cli";
|
|
2
2
|
import { Docker } from "../actions/docker.action.js";
|
|
3
3
|
export class DockerCommand extends DecohereCommand {
|
|
4
4
|
get actions() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommandResponse, ConfigurationOption, DecohereCommand, NoCleanOptions } from "@decohere/
|
|
1
|
+
import { CommandResponse, ConfigurationOption, DecohereCommand, NoCleanOptions } from "@decohere/core/cli";
|
|
2
2
|
import auto from "async/auto.js";
|
|
3
3
|
import { Build } from "../actions/build.action.js";
|
|
4
4
|
import { Clean } from "../actions/clean.action.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConfigurationOption, DecohereCommand, DryRunOption } from "@decohere/
|
|
1
|
+
import { ConfigurationOption, DecohereCommand, DryRunOption } from "@decohere/core/cli";
|
|
2
2
|
import { Publish } from "../actions/publish.action.js";
|
|
3
3
|
export class PublishCommand extends DecohereCommand {
|
|
4
4
|
get actions() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConfigurationOption, DecohereCommand } from "@decohere/
|
|
1
|
+
import { ConfigurationOption, DecohereCommand } from "@decohere/core/cli";
|
|
2
2
|
import { TypeCheck } from "../actions/typecheck.action.js";
|
|
3
3
|
export class TypeCheckCommand extends DecohereCommand {
|
|
4
4
|
get actions() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConfigurationOption, DecohereCommand, DryRunOption } from "@decohere/
|
|
1
|
+
import { ConfigurationOption, DecohereCommand, DryRunOption } from "@decohere/core/cli";
|
|
2
2
|
import { SyncLockFile } from "../actions/sync-lock-file.action.js";
|
|
3
3
|
import { DefaultChannel, DefaultReleaseType, Version } from "../actions/version.action.js";
|
|
4
4
|
export class VersionCommand extends DecohereCommand {
|