@decohere/forge 0.0.1-dev.118 → 0.0.1-dev.119
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/commonjs/src/actions/build.action.js +2 -2
- package/commonjs/src/actions/clean.action.js +1 -1
- package/commonjs/src/actions/commit.action.js +2 -2
- package/commonjs/src/actions/copy.action.js +4 -3
- package/commonjs/src/actions/dependency-report.action.js +1 -1
- package/commonjs/src/actions/dependency-sync.action.js +1 -1
- package/commonjs/src/actions/docker.action.js +2 -2
- package/commonjs/src/actions/link.action.js +1 -1
- package/commonjs/src/actions/package.action.js +2 -2
- package/commonjs/src/actions/paths.action.js +1 -1
- package/commonjs/src/actions/publish.action.js +2 -2
- package/commonjs/src/actions/sync-lock-file.action.js +2 -2
- package/commonjs/src/actions/tag.action.js +2 -2
- package/commonjs/src/actions/typecheck.action.js +2 -2
- package/commonjs/src/actions/unlink.action.js +1 -1
- package/commonjs/src/actions/version.action.js +7 -7
- package/commonjs/src/actions/watch.action.js +1 -1
- 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/factories/swc-config.factory.js +1 -1
- package/commonjs/src/forge.module.js +1 -1
- package/commonjs/src/semver/index.js +18 -0
- package/commonjs/src/semver/semver.js +92 -0
- package/commonjs/src/services/file-writer.service.js +1 -1
- package/commonjs/src/services/swc-transpiler.js +3 -3
- package/commonjs/src/services/ts-program-host.js +1 -1
- package/commonjs/src/services/type-emission-program.js +1 -1
- package/commonjs/src/services/type-emitter.js +4 -4
- package/es6/src/actions/build.action.js +2 -2
- package/es6/src/actions/clean.action.js +1 -1
- package/es6/src/actions/commit.action.js +2 -2
- package/es6/src/actions/copy.action.js +4 -3
- package/es6/src/actions/dependency-report.action.js +1 -1
- package/es6/src/actions/dependency-sync.action.js +1 -1
- package/es6/src/actions/docker.action.js +2 -2
- package/es6/src/actions/link.action.js +1 -1
- package/es6/src/actions/package.action.js +2 -2
- package/es6/src/actions/paths.action.js +1 -1
- package/es6/src/actions/publish.action.js +2 -2
- package/es6/src/actions/sync-lock-file.action.js +2 -2
- package/es6/src/actions/tag.action.js +2 -2
- package/es6/src/actions/typecheck.action.js +2 -2
- package/es6/src/actions/unlink.action.js +1 -1
- package/es6/src/actions/version.action.js +3 -3
- package/es6/src/actions/watch.action.js +1 -1
- 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/factories/swc-config.factory.js +1 -1
- package/es6/src/forge.module.js +1 -1
- package/es6/src/semver/index.js +1 -0
- package/es6/src/semver/semver.js +71 -0
- package/es6/src/services/file-writer.service.js +1 -1
- package/es6/src/services/swc-transpiler.js +3 -3
- package/es6/src/services/ts-program-host.js +1 -1
- package/es6/src/services/type-emission-program.js +1 -1
- package/es6/src/services/type-emitter.js +4 -4
- package/package.json +6 -5
- package/types/src/actions/build.action.d.ts +2 -2
- package/types/src/actions/clean.action.d.ts +2 -2
- package/types/src/actions/commit.action.d.ts +2 -2
- package/types/src/actions/copy.action.d.ts +2 -2
- package/types/src/actions/dependency-report.action.d.ts +2 -2
- package/types/src/actions/dependency-sync.action.d.ts +2 -2
- package/types/src/actions/docker.action.d.ts +2 -2
- package/types/src/actions/link.action.d.ts +2 -2
- package/types/src/actions/package.action.d.ts +2 -2
- package/types/src/actions/paths.action.d.ts +2 -2
- package/types/src/actions/publish.action.d.ts +2 -2
- package/types/src/actions/sync-lock-file.action.d.ts +2 -2
- package/types/src/actions/tag.action.d.ts +2 -2
- package/types/src/actions/typecheck.action.d.ts +2 -2
- package/types/src/actions/unlink.action.d.ts +2 -2
- package/types/src/actions/version.action.d.ts +3 -3
- package/types/src/actions/watch.action.d.ts +2 -2
- 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 +1 -1
- package/types/src/forge.module.d.ts +2 -2
- package/types/src/semver/index.d.ts +1 -0
- package/types/src/semver/semver.d.ts +18 -0
- package/types/src/types/dependency.types.d.ts +1 -1
- package/types/src/types/workspace-config.type.d.ts +1 -1
|
@@ -10,8 +10,8 @@ Object.defineProperty(exports, "Build", {
|
|
|
10
10
|
});
|
|
11
11
|
const _decorators = require("@decohere/crucible/decorators");
|
|
12
12
|
const _workspace = require("@decohere/workspace");
|
|
13
|
-
const _cli = require("@decohere/
|
|
14
|
-
const _diagnostics = require("@decohere/
|
|
13
|
+
const _cli = require("@decohere/devkit/cli");
|
|
14
|
+
const _diagnostics = require("@decohere/devkit/diagnostics");
|
|
15
15
|
const _scribe = require("@decohere/scribe");
|
|
16
16
|
const _errors = require("../errors.js");
|
|
17
17
|
const _filewriterservice = require("../services/file-writer.service.js");
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "Clean", {
|
|
|
10
10
|
});
|
|
11
11
|
const _decorators = require("@decohere/crucible/decorators");
|
|
12
12
|
const _workspace = require("@decohere/workspace");
|
|
13
|
-
const _cli = require("@decohere/
|
|
13
|
+
const _cli = require("@decohere/devkit/cli");
|
|
14
14
|
const _io = require("@decohere/core/io");
|
|
15
15
|
const _scribe = require("@decohere/scribe");
|
|
16
16
|
function _ts_decorate(decorators, target, key, desc) {
|
|
@@ -11,8 +11,8 @@ Object.defineProperty(exports, "CommitFiles", {
|
|
|
11
11
|
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
12
12
|
const _decorators = require("@decohere/crucible/decorators");
|
|
13
13
|
const _workspace = require("@decohere/workspace");
|
|
14
|
-
const _cli = require("@decohere/
|
|
15
|
-
const _interop = require("@decohere/
|
|
14
|
+
const _cli = require("@decohere/devkit/cli");
|
|
15
|
+
const _interop = require("@decohere/devkit/interop");
|
|
16
16
|
const _scribe = require("@decohere/scribe");
|
|
17
17
|
const _errors = require("../errors.js");
|
|
18
18
|
const _workspaceconfig = require("../workspace.config.js");
|
|
@@ -11,8 +11,9 @@ Object.defineProperty(exports, "Copy", {
|
|
|
11
11
|
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
12
12
|
const _decorators = require("@decohere/crucible/decorators");
|
|
13
13
|
const _workspace = require("@decohere/workspace");
|
|
14
|
-
const _cli = require("@decohere/
|
|
14
|
+
const _cli = require("@decohere/devkit/cli");
|
|
15
15
|
const _io = require("@decohere/core/io");
|
|
16
|
+
const _io1 = require("@decohere/devkit/io");
|
|
16
17
|
const _system = require("@decohere/core/system");
|
|
17
18
|
const _scribe = require("@decohere/scribe");
|
|
18
19
|
function _interop_require_default(obj) {
|
|
@@ -46,7 +47,7 @@ class Copy {
|
|
|
46
47
|
const cwd = proj.projectDirectory;
|
|
47
48
|
const root = proj.getOutDir();
|
|
48
49
|
// Workspace + configuration copyFiles → package root (historic behaviour).
|
|
49
|
-
const rootFiles = await
|
|
50
|
+
const rootFiles = await (0, _io1.findFiles)(proj.copyFiles, {
|
|
50
51
|
cwd
|
|
51
52
|
});
|
|
52
53
|
await Promise.all(rootFiles.map((file)=>this.copyFileToOut(file, root)));
|
|
@@ -76,7 +77,7 @@ class Copy {
|
|
|
76
77
|
if (targets.length === 0) {
|
|
77
78
|
return;
|
|
78
79
|
}
|
|
79
|
-
const files = await
|
|
80
|
+
const files = await (0, _io1.findFiles)(colocatedPatterns, {
|
|
80
81
|
cwd
|
|
81
82
|
});
|
|
82
83
|
const targetDirs = [
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "ReportDependencies", {
|
|
|
10
10
|
});
|
|
11
11
|
const _decorators = require("@decohere/crucible/decorators");
|
|
12
12
|
const _workspace = require("@decohere/workspace");
|
|
13
|
-
const _cli = require("@decohere/
|
|
13
|
+
const _cli = require("@decohere/devkit/cli");
|
|
14
14
|
const _io = require("@decohere/core/io");
|
|
15
15
|
const _scribe = require("@decohere/scribe");
|
|
16
16
|
const _errors = require("../errors.js");
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "SyncDependencies", {
|
|
|
10
10
|
});
|
|
11
11
|
const _decorators = require("@decohere/crucible/decorators");
|
|
12
12
|
const _workspace = require("@decohere/workspace");
|
|
13
|
-
const _cli = require("@decohere/
|
|
13
|
+
const _cli = require("@decohere/devkit/cli");
|
|
14
14
|
const _scribe = require("@decohere/scribe");
|
|
15
15
|
const _errors = require("../errors.js");
|
|
16
16
|
const _dependencyresolverservice = require("../services/dependency-resolver.service.js");
|
|
@@ -11,8 +11,8 @@ Object.defineProperty(exports, "Docker", {
|
|
|
11
11
|
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
12
12
|
const _decorators = require("@decohere/crucible/decorators");
|
|
13
13
|
const _workspace = require("@decohere/workspace");
|
|
14
|
-
const _cli = require("@decohere/
|
|
15
|
-
const _interop = require("@decohere/
|
|
14
|
+
const _cli = require("@decohere/devkit/cli");
|
|
15
|
+
const _interop = require("@decohere/devkit/interop");
|
|
16
16
|
const _io = require("@decohere/core/io");
|
|
17
17
|
const _scribe = require("@decohere/scribe");
|
|
18
18
|
const _errors = require("../errors.js");
|
|
@@ -23,7 +23,7 @@ const _promises = /*#__PURE__*/ _interop_require_default(require("node:fs/promis
|
|
|
23
23
|
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
24
24
|
const _decorators = require("@decohere/crucible/decorators");
|
|
25
25
|
const _workspace = require("@decohere/workspace");
|
|
26
|
-
const _cli = require("@decohere/
|
|
26
|
+
const _cli = require("@decohere/devkit/cli");
|
|
27
27
|
const _scribe = require("@decohere/scribe");
|
|
28
28
|
require("../extensions/project.extensions.js");
|
|
29
29
|
const _errors = require("../errors.js");
|
|
@@ -12,8 +12,8 @@ const _promises = /*#__PURE__*/ _interop_require_default(require("node:fs/promis
|
|
|
12
12
|
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
13
13
|
const _decorators = require("@decohere/crucible/decorators");
|
|
14
14
|
const _workspace = require("@decohere/workspace");
|
|
15
|
-
const _cli = require("@decohere/
|
|
16
|
-
const _interop = require("@decohere/
|
|
15
|
+
const _cli = require("@decohere/devkit/cli");
|
|
16
|
+
const _interop = require("@decohere/devkit/interop");
|
|
17
17
|
const _io = require("@decohere/core/io");
|
|
18
18
|
const _scribe = require("@decohere/scribe");
|
|
19
19
|
const _errors = require("../errors.js");
|
|
@@ -21,7 +21,7 @@ const _promises = require("node:fs/promises");
|
|
|
21
21
|
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
22
22
|
const _decorators = require("@decohere/crucible/decorators");
|
|
23
23
|
const _workspace = require("@decohere/workspace");
|
|
24
|
-
const _cli = require("@decohere/
|
|
24
|
+
const _cli = require("@decohere/devkit/cli");
|
|
25
25
|
const _scribe = require("@decohere/scribe");
|
|
26
26
|
function _interop_require_default(obj) {
|
|
27
27
|
return obj && obj.__esModule ? obj : {
|
|
@@ -10,8 +10,8 @@ Object.defineProperty(exports, "Publish", {
|
|
|
10
10
|
});
|
|
11
11
|
const _decorators = require("@decohere/crucible/decorators");
|
|
12
12
|
const _workspace = require("@decohere/workspace");
|
|
13
|
-
const _cli = require("@decohere/
|
|
14
|
-
const _interop = require("@decohere/
|
|
13
|
+
const _cli = require("@decohere/devkit/cli");
|
|
14
|
+
const _interop = require("@decohere/devkit/interop");
|
|
15
15
|
const _scribe = require("@decohere/scribe");
|
|
16
16
|
const _errors = require("../errors.js");
|
|
17
17
|
function _ts_decorate(decorators, target, key, desc) {
|
|
@@ -9,8 +9,8 @@ Object.defineProperty(exports, "SyncLockFile", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _decorators = require("@decohere/crucible/decorators");
|
|
12
|
-
const _cli = require("@decohere/
|
|
13
|
-
const _interop = require("@decohere/
|
|
12
|
+
const _cli = require("@decohere/devkit/cli");
|
|
13
|
+
const _interop = require("@decohere/devkit/interop");
|
|
14
14
|
const _scribe = require("@decohere/scribe");
|
|
15
15
|
const _errors = require("../errors.js");
|
|
16
16
|
function _ts_decorate(decorators, target, key, desc) {
|
|
@@ -10,8 +10,8 @@ Object.defineProperty(exports, "Tag", {
|
|
|
10
10
|
});
|
|
11
11
|
const _decorators = require("@decohere/crucible/decorators");
|
|
12
12
|
const _workspace = require("@decohere/workspace");
|
|
13
|
-
const _cli = require("@decohere/
|
|
14
|
-
const _interop = require("@decohere/
|
|
13
|
+
const _cli = require("@decohere/devkit/cli");
|
|
14
|
+
const _interop = require("@decohere/devkit/interop");
|
|
15
15
|
const _scribe = require("@decohere/scribe");
|
|
16
16
|
const _errors = require("../errors.js");
|
|
17
17
|
function _ts_decorate(decorators, target, key, desc) {
|
|
@@ -10,8 +10,8 @@ Object.defineProperty(exports, "TypeCheck", {
|
|
|
10
10
|
});
|
|
11
11
|
const _decorators = require("@decohere/crucible/decorators");
|
|
12
12
|
const _workspace = require("@decohere/workspace");
|
|
13
|
-
const _cli = require("@decohere/
|
|
14
|
-
const _diagnostics = require("@decohere/
|
|
13
|
+
const _cli = require("@decohere/devkit/cli");
|
|
14
|
+
const _diagnostics = require("@decohere/devkit/diagnostics");
|
|
15
15
|
const _scribe = require("@decohere/scribe");
|
|
16
16
|
const _typescript = /*#__PURE__*/ _interop_require_default(require("typescript"));
|
|
17
17
|
const _errors = require("../errors.js");
|
|
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "Unlink", {
|
|
|
11
11
|
const _promises = /*#__PURE__*/ _interop_require_default(require("node:fs/promises"));
|
|
12
12
|
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
13
13
|
const _decorators = require("@decohere/crucible/decorators");
|
|
14
|
-
const _cli = require("@decohere/
|
|
14
|
+
const _cli = require("@decohere/devkit/cli");
|
|
15
15
|
const _scribe = require("@decohere/scribe");
|
|
16
16
|
const _errors = require("../errors.js");
|
|
17
17
|
const _linkaction = require("./link.action.js");
|
|
@@ -24,9 +24,9 @@ const _promises = require("node:fs/promises");
|
|
|
24
24
|
const _nodepath = require("node:path");
|
|
25
25
|
const _decorators = require("@decohere/crucible/decorators");
|
|
26
26
|
const _workspace = require("@decohere/workspace");
|
|
27
|
-
const _cli = require("@decohere/
|
|
28
|
-
const _interop = require("@decohere/
|
|
29
|
-
const
|
|
27
|
+
const _cli = require("@decohere/devkit/cli");
|
|
28
|
+
const _interop = require("@decohere/devkit/interop");
|
|
29
|
+
const _index = require("../semver/index.js");
|
|
30
30
|
const _scribe = require("@decohere/scribe");
|
|
31
31
|
const _errors = require("../errors.js");
|
|
32
32
|
function _ts_decorate(decorators, target, key, desc) {
|
|
@@ -39,7 +39,7 @@ function _ts_metadata(k, v) {
|
|
|
39
39
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
40
40
|
}
|
|
41
41
|
const DefaultChannel = "beta";
|
|
42
|
-
const DefaultReleaseType =
|
|
42
|
+
const DefaultReleaseType = _index.VersionTypes.prerelease;
|
|
43
43
|
const DefaultVersionOptions = {
|
|
44
44
|
releaseType: DefaultReleaseType,
|
|
45
45
|
channel: DefaultChannel,
|
|
@@ -150,7 +150,7 @@ class Version {
|
|
|
150
150
|
patch: 1,
|
|
151
151
|
prerelease: 0
|
|
152
152
|
};
|
|
153
|
-
let maxType =
|
|
153
|
+
let maxType = _index.VersionTypes.patch;
|
|
154
154
|
let maxPrecedence = 0;
|
|
155
155
|
for (const file of files){
|
|
156
156
|
const content = await (0, _promises.readFile)((0, _nodepath.join)(changesetDir, file), "utf8");
|
|
@@ -170,9 +170,9 @@ class Version {
|
|
|
170
170
|
}
|
|
171
171
|
getNextVersion(currentVersion, versionType, preid) {
|
|
172
172
|
try {
|
|
173
|
-
return new
|
|
173
|
+
return new _index.Semver(currentVersion).increment(versionType, preid);
|
|
174
174
|
} catch (error) {
|
|
175
|
-
if (error instanceof
|
|
175
|
+
if (error instanceof _index.SemverError) {
|
|
176
176
|
throw new _errors.ForgeError(error.message);
|
|
177
177
|
}
|
|
178
178
|
throw error;
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "Watch", {
|
|
|
10
10
|
});
|
|
11
11
|
const _decorators = require("@decohere/crucible/decorators");
|
|
12
12
|
const _workspace = require("@decohere/workspace");
|
|
13
|
-
const _cli = require("@decohere/
|
|
13
|
+
const _cli = require("@decohere/devkit/cli");
|
|
14
14
|
const _scribe = require("@decohere/scribe");
|
|
15
15
|
function _ts_decorate(decorators, target, key, desc) {
|
|
16
16
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "BuildCommand", {
|
|
|
8
8
|
return BuildCommand;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _cli = require("@decohere/
|
|
11
|
+
const _cli = require("@decohere/devkit/cli");
|
|
12
12
|
const _auto = /*#__PURE__*/ _interop_require_default(require("async/auto.js"));
|
|
13
13
|
function _interop_require_default(obj) {
|
|
14
14
|
return obj && obj.__esModule ? obj : {
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "DependencyCommand", {
|
|
|
8
8
|
return DependencyCommand;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _cli = require("@decohere/
|
|
11
|
+
const _cli = require("@decohere/devkit/cli");
|
|
12
12
|
const _commitaction = require("../actions/commit.action.js");
|
|
13
13
|
const _dependencyreportaction = require("../actions/dependency-report.action.js");
|
|
14
14
|
const _dependencysyncaction = require("../actions/dependency-sync.action.js");
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "DockerCommand", {
|
|
|
8
8
|
return DockerCommand;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _cli = require("@decohere/
|
|
11
|
+
const _cli = require("@decohere/devkit/cli");
|
|
12
12
|
const _dockeraction = require("../actions/docker.action.js");
|
|
13
13
|
class DockerCommand extends _cli.DecohereCommand {
|
|
14
14
|
get actions() {
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "ForgeCommand", {
|
|
|
8
8
|
return ForgeCommand;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _cli = require("@decohere/
|
|
11
|
+
const _cli = require("@decohere/devkit/cli");
|
|
12
12
|
class ForgeCommand extends _cli.DecohereCommand {
|
|
13
13
|
constructor(commands, handler){
|
|
14
14
|
super(ForgeCommand);
|
|
@@ -16,7 +16,7 @@ _export(exports, {
|
|
|
16
16
|
return UnlinkCommand;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
const _cli = require("@decohere/
|
|
19
|
+
const _cli = require("@decohere/devkit/cli");
|
|
20
20
|
const _auto = /*#__PURE__*/ _interop_require_default(require("async/auto.js"));
|
|
21
21
|
const _buildaction = require("../actions/build.action.js");
|
|
22
22
|
const _cleanaction = require("../actions/clean.action.js");
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "PackageCommand", {
|
|
|
8
8
|
return PackageCommand;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _cli = require("@decohere/
|
|
11
|
+
const _cli = require("@decohere/devkit/cli");
|
|
12
12
|
const _packageaction = require("../actions/package.action.js");
|
|
13
13
|
class PackageCommand extends _cli.DecohereCommand {
|
|
14
14
|
get actions() {
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "PathsCommand", {
|
|
|
8
8
|
return PathsCommand;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _cli = require("@decohere/
|
|
11
|
+
const _cli = require("@decohere/devkit/cli");
|
|
12
12
|
const _pathsaction = require("../actions/paths.action.js");
|
|
13
13
|
class PathsCommand extends _cli.DecohereCommand {
|
|
14
14
|
get actions() {
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "PublishCommand", {
|
|
|
8
8
|
return PublishCommand;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _cli = require("@decohere/
|
|
11
|
+
const _cli = require("@decohere/devkit/cli");
|
|
12
12
|
const _publishaction = require("../actions/publish.action.js");
|
|
13
13
|
class PublishCommand extends _cli.DecohereCommand {
|
|
14
14
|
get actions() {
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "TagCommand", {
|
|
|
8
8
|
return TagCommand;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _cli = require("@decohere/
|
|
11
|
+
const _cli = require("@decohere/devkit/cli");
|
|
12
12
|
const _tagaction = require("../actions/tag.action.js");
|
|
13
13
|
class TagCommand extends _cli.DecohereCommand {
|
|
14
14
|
get actions() {
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "TypeCheckCommand", {
|
|
|
8
8
|
return TypeCheckCommand;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _cli = require("@decohere/
|
|
11
|
+
const _cli = require("@decohere/devkit/cli");
|
|
12
12
|
const _typecheckaction = require("../actions/typecheck.action.js");
|
|
13
13
|
class TypeCheckCommand extends _cli.DecohereCommand {
|
|
14
14
|
get actions() {
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "VersionCommand", {
|
|
|
8
8
|
return VersionCommand;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
const _cli = require("@decohere/
|
|
11
|
+
const _cli = require("@decohere/devkit/cli");
|
|
12
12
|
const _synclockfileaction = require("../actions/sync-lock-file.action.js");
|
|
13
13
|
const _versionaction = require("../actions/version.action.js");
|
|
14
14
|
class VersionCommand extends _cli.DecohereCommand {
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "SwcConfigFactory", {
|
|
|
10
10
|
});
|
|
11
11
|
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
12
12
|
const _workspace = require("@decohere/workspace");
|
|
13
|
-
const _diagnostics = require("@decohere/
|
|
13
|
+
const _diagnostics = require("@decohere/devkit/diagnostics");
|
|
14
14
|
const _objects = require("@decohere/core/objects");
|
|
15
15
|
const _errors = require("../errors.js");
|
|
16
16
|
function _interop_require_default(obj) {
|
|
@@ -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/devkit/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");
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
_export_star(require("./semver.js"), exports);
|
|
6
|
+
function _export_star(from, to) {
|
|
7
|
+
Object.keys(from).forEach(function(k) {
|
|
8
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
|
|
9
|
+
Object.defineProperty(to, k, {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function() {
|
|
12
|
+
return from[k];
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
return from;
|
|
18
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
get Semver () {
|
|
13
|
+
return Semver;
|
|
14
|
+
},
|
|
15
|
+
get SemverError () {
|
|
16
|
+
return SemverError;
|
|
17
|
+
},
|
|
18
|
+
get VersionTypes () {
|
|
19
|
+
return VersionTypes;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
const VersionTypes = {
|
|
23
|
+
major: "major",
|
|
24
|
+
minor: "minor",
|
|
25
|
+
patch: "patch",
|
|
26
|
+
prerelease: "prerelease"
|
|
27
|
+
};
|
|
28
|
+
class SemverError extends Error {
|
|
29
|
+
constructor(message){
|
|
30
|
+
super(message);
|
|
31
|
+
this.name = SemverError.name;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const SEMVER_REGEX = /^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/;
|
|
35
|
+
class Semver {
|
|
36
|
+
version;
|
|
37
|
+
constructor(version){
|
|
38
|
+
this.ensureValid(version);
|
|
39
|
+
this.version = version;
|
|
40
|
+
}
|
|
41
|
+
increment(versionType, preid = "pre") {
|
|
42
|
+
const { major, minor, patch, prerelease } = this.parse(this.version);
|
|
43
|
+
if (versionType === "major") {
|
|
44
|
+
this.version = `${major + 1}.0.0`;
|
|
45
|
+
return this;
|
|
46
|
+
}
|
|
47
|
+
if (versionType === "minor") {
|
|
48
|
+
this.version = `${major}.${minor + 1}.0`;
|
|
49
|
+
return this;
|
|
50
|
+
}
|
|
51
|
+
if (versionType === "patch") {
|
|
52
|
+
this.version = `${major}.${minor}.${patch + 1}`;
|
|
53
|
+
return this;
|
|
54
|
+
}
|
|
55
|
+
if (prerelease == null) {
|
|
56
|
+
this.version = `${major}.${minor}.${patch + 1}-${preid}.0`;
|
|
57
|
+
return this;
|
|
58
|
+
}
|
|
59
|
+
const [identifier, ...rest] = prerelease.split(".");
|
|
60
|
+
const maybeCounter = rest.at(-1);
|
|
61
|
+
const counter = maybeCounter != null ? Number.parseInt(maybeCounter, 10) : Number.NaN;
|
|
62
|
+
if (identifier === preid && Number.isFinite(counter)) {
|
|
63
|
+
const nextCounter = counter + 1;
|
|
64
|
+
const prefix = rest.length > 1 ? `${rest.slice(0, -1).join(".")}.` : "";
|
|
65
|
+
this.version = `${major}.${minor}.${patch}-${preid}.${prefix}${nextCounter}`;
|
|
66
|
+
return this;
|
|
67
|
+
}
|
|
68
|
+
this.version = `${major}.${minor}.${patch}-${preid}.0`;
|
|
69
|
+
return this;
|
|
70
|
+
}
|
|
71
|
+
toString() {
|
|
72
|
+
return this.version;
|
|
73
|
+
}
|
|
74
|
+
ensureValid(version) {
|
|
75
|
+
if (SEMVER_REGEX.test(version)) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
throw new SemverError(`Invalid semantic version: ${version}`);
|
|
79
|
+
}
|
|
80
|
+
parse(version) {
|
|
81
|
+
const match = version.match(SEMVER_REGEX);
|
|
82
|
+
if (match == null) {
|
|
83
|
+
throw new SemverError(`Invalid semantic version: ${version}`);
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
major: Number.parseInt(match[1], 10),
|
|
87
|
+
minor: Number.parseInt(match[2], 10),
|
|
88
|
+
patch: Number.parseInt(match[3], 10),
|
|
89
|
+
prerelease: match[4]
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -10,7 +10,7 @@ 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/
|
|
13
|
+
const _diagnostics = require("@decohere/devkit/diagnostics");
|
|
14
14
|
const _io = require("@decohere/core/io");
|
|
15
15
|
require("../extensions/project.extensions.js");
|
|
16
16
|
function _interop_require_default(obj) {
|
|
@@ -11,8 +11,8 @@ Object.defineProperty(exports, "SwcTranspiler", {
|
|
|
11
11
|
const _nodepath = /*#__PURE__*/ _interop_require_default(require("node:path"));
|
|
12
12
|
const _workspace = require("@decohere/workspace");
|
|
13
13
|
const _caching = require("@decohere/core/caching");
|
|
14
|
-
const _diagnostics = require("@decohere/
|
|
15
|
-
const _io = require("@decohere/
|
|
14
|
+
const _diagnostics = require("@decohere/devkit/diagnostics");
|
|
15
|
+
const _io = require("@decohere/devkit/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");
|
|
@@ -172,7 +172,7 @@ class SwcTranspiler {
|
|
|
172
172
|
}
|
|
173
173
|
async onIncrementalFileEvent(evt) {
|
|
174
174
|
const { file, project } = evt;
|
|
175
|
-
if (evt.eventName === _io.
|
|
175
|
+
if (evt.eventName === _io.WatchEvents.unlink) {
|
|
176
176
|
this.#outputs.delete(file.fullPath);
|
|
177
177
|
return [];
|
|
178
178
|
}
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "TsProgramHost", {
|
|
|
10
10
|
});
|
|
11
11
|
const _nodefs = /*#__PURE__*/ _interop_require_default(require("node:fs"));
|
|
12
12
|
const _caching = require("@decohere/core/caching");
|
|
13
|
-
const _diagnostics = require("@decohere/
|
|
13
|
+
const _diagnostics = require("@decohere/devkit/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/devkit/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) {
|
|
@@ -23,8 +23,8 @@ _export(exports, {
|
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
const _caching = require("@decohere/core/caching");
|
|
26
|
-
const _diagnostics = require("@decohere/
|
|
27
|
-
const _io = require("@decohere/
|
|
26
|
+
const _diagnostics = require("@decohere/devkit/diagnostics");
|
|
27
|
+
const _io = require("@decohere/devkit/io");
|
|
28
28
|
require("../extensions/project.extensions.js");
|
|
29
29
|
const _incrementalwatch = require("./incremental-watch.js");
|
|
30
30
|
const _outputcache = require("./output-cache.js");
|
|
@@ -139,14 +139,14 @@ class TypeEmitter {
|
|
|
139
139
|
}
|
|
140
140
|
async onIncrementalFileEvent(evt) {
|
|
141
141
|
const { file, project } = evt;
|
|
142
|
-
if (evt.eventName === _io.
|
|
142
|
+
if (evt.eventName === _io.WatchEvents.unlink) {
|
|
143
143
|
this.#outputs.delete(file.fullPath);
|
|
144
144
|
return [];
|
|
145
145
|
}
|
|
146
146
|
if (!project.isSourceFile(file)) {
|
|
147
147
|
return [];
|
|
148
148
|
}
|
|
149
|
-
if (evt.eventName === _io.
|
|
149
|
+
if (evt.eventName === _io.WatchEvents.add) {
|
|
150
150
|
this.#programs?.forEach((p)=>{
|
|
151
151
|
p.addFile(file, project);
|
|
152
152
|
});
|
|
@@ -14,8 +14,8 @@ function _ts_param(paramIndex, decorator) {
|
|
|
14
14
|
}
|
|
15
15
|
import { inject, injectable } from "@decohere/crucible/decorators";
|
|
16
16
|
import { Workspace } from "@decohere/workspace";
|
|
17
|
-
import { ActionResponse } from "@decohere/
|
|
18
|
-
import { Trace } from "@decohere/
|
|
17
|
+
import { ActionResponse } from "@decohere/devkit/cli";
|
|
18
|
+
import { Trace } from "@decohere/devkit/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";
|
|
@@ -9,7 +9,7 @@ function _ts_metadata(k, v) {
|
|
|
9
9
|
}
|
|
10
10
|
import { injectable } from "@decohere/crucible/decorators";
|
|
11
11
|
import { Workspace } from "@decohere/workspace";
|
|
12
|
-
import { ActionResponse } from "@decohere/
|
|
12
|
+
import { ActionResponse } from "@decohere/devkit/cli";
|
|
13
13
|
import { io } from "@decohere/core/io";
|
|
14
14
|
import { scribe } from "@decohere/scribe";
|
|
15
15
|
export class Clean {
|
|
@@ -10,8 +10,8 @@ function _ts_metadata(k, v) {
|
|
|
10
10
|
import path from "node:path";
|
|
11
11
|
import { injectable } from "@decohere/crucible/decorators";
|
|
12
12
|
import { Workspace } from "@decohere/workspace";
|
|
13
|
-
import { ActionResponse } from "@decohere/
|
|
14
|
-
import { Git } from "@decohere/
|
|
13
|
+
import { ActionResponse } from "@decohere/devkit/cli";
|
|
14
|
+
import { Git } from "@decohere/devkit/interop";
|
|
15
15
|
import { scribe } from "@decohere/scribe";
|
|
16
16
|
import { formatUnknownError } from "../errors.js";
|
|
17
17
|
import { Release } from "../workspace.config.js";
|
|
@@ -10,8 +10,9 @@ function _ts_metadata(k, v) {
|
|
|
10
10
|
import path from "node:path";
|
|
11
11
|
import { injectable } from "@decohere/crucible/decorators";
|
|
12
12
|
import { Workspace } from "@decohere/workspace";
|
|
13
|
-
import { ActionResponse } from "@decohere/
|
|
13
|
+
import { ActionResponse } from "@decohere/devkit/cli";
|
|
14
14
|
import { io } from "@decohere/core/io";
|
|
15
|
+
import { findFiles } from "@decohere/devkit/io";
|
|
15
16
|
import { retry } from "@decohere/core/system";
|
|
16
17
|
import { scribe } from "@decohere/scribe";
|
|
17
18
|
const COPY_RETRY_ATTEMPTS = 3;
|
|
@@ -31,7 +32,7 @@ export class Copy {
|
|
|
31
32
|
const cwd = proj.projectDirectory;
|
|
32
33
|
const root = proj.getOutDir();
|
|
33
34
|
// Workspace + configuration copyFiles → package root (historic behaviour).
|
|
34
|
-
const rootFiles = await
|
|
35
|
+
const rootFiles = await findFiles(proj.copyFiles, {
|
|
35
36
|
cwd
|
|
36
37
|
});
|
|
37
38
|
await Promise.all(rootFiles.map((file)=>this.copyFileToOut(file, root)));
|
|
@@ -61,7 +62,7 @@ export class Copy {
|
|
|
61
62
|
if (targets.length === 0) {
|
|
62
63
|
return;
|
|
63
64
|
}
|
|
64
|
-
const files = await
|
|
65
|
+
const files = await findFiles(colocatedPatterns, {
|
|
65
66
|
cwd
|
|
66
67
|
});
|
|
67
68
|
const targetDirs = [
|