@xylabs/ts-scripts-yarn3 6.3.5 → 6.4.1
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/dist/actions/build.mjs +39 -87
- package/dist/actions/build.mjs.map +1 -1
- package/dist/actions/clean-docs.mjs +8 -22
- package/dist/actions/clean-docs.mjs.map +1 -1
- package/dist/actions/clean-eslint.mjs +5 -11
- package/dist/actions/clean-eslint.mjs.map +1 -1
- package/dist/actions/clean-jest.mjs +16 -29
- package/dist/actions/clean-jest.mjs.map +1 -1
- package/dist/actions/clean.mjs +32 -63
- package/dist/actions/clean.mjs.map +1 -1
- package/dist/actions/compile-types.mjs +45 -68
- package/dist/actions/compile-types.mjs.map +1 -1
- package/dist/actions/compile.mjs +50 -76
- package/dist/actions/compile.mjs.map +1 -1
- package/dist/actions/copy-assets.mjs +23 -38
- package/dist/actions/copy-assets.mjs.map +1 -1
- package/dist/actions/cycle.mjs +28 -57
- package/dist/actions/cycle.mjs.map +1 -1
- package/dist/actions/dead.mjs +16 -31
- package/dist/actions/dead.mjs.map +1 -1
- package/dist/actions/deplint.mjs +195 -0
- package/dist/actions/deplint.mjs.map +1 -0
- package/dist/actions/deploy-major.mjs +20 -41
- package/dist/actions/deploy-major.mjs.map +1 -1
- package/dist/actions/deploy-minor.mjs +20 -41
- package/dist/actions/deploy-minor.mjs.map +1 -1
- package/dist/actions/deploy-next.mjs +20 -41
- package/dist/actions/deploy-next.mjs.map +1 -1
- package/dist/actions/deploy.mjs +20 -41
- package/dist/actions/deploy.mjs.map +1 -1
- package/dist/actions/dupdeps.mjs +26 -37
- package/dist/actions/dupdeps.mjs.map +1 -1
- package/dist/actions/fix.mjs +36 -54
- package/dist/actions/fix.mjs.map +1 -1
- package/dist/actions/gen-docs.mjs +25 -65
- package/dist/actions/gen-docs.mjs.map +1 -1
- package/dist/actions/gitignore-gen.mjs +28 -44
- package/dist/actions/gitignore-gen.mjs.map +1 -1
- package/dist/actions/gitlint-fix.mjs +5 -14
- package/dist/actions/gitlint-fix.mjs.map +1 -1
- package/dist/actions/gitlint.mjs +4 -7
- package/dist/actions/gitlint.mjs.map +1 -1
- package/dist/actions/index.mjs +864 -1241
- package/dist/actions/index.mjs.map +1 -1
- package/dist/actions/knip.mjs +16 -31
- package/dist/actions/knip.mjs.map +1 -1
- package/dist/actions/license.mjs +37 -51
- package/dist/actions/license.mjs.map +1 -1
- package/dist/actions/lint.mjs +33 -48
- package/dist/actions/lint.mjs.map +1 -1
- package/dist/actions/npmignore-gen.mjs +28 -44
- package/dist/actions/npmignore-gen.mjs.map +1 -1
- package/dist/actions/package/clean-outputs.mjs +6 -16
- package/dist/actions/package/clean-outputs.mjs.map +1 -1
- package/dist/actions/package/clean-typescript.mjs +6 -16
- package/dist/actions/package/clean-typescript.mjs.map +1 -1
- package/dist/actions/package/clean.mjs +12 -29
- package/dist/actions/package/clean.mjs.map +1 -1
- package/dist/actions/package/compile/buildEntries.mjs +7 -17
- package/dist/actions/package/compile/buildEntries.mjs.map +1 -1
- package/dist/actions/package/compile/compile.mjs +133 -169
- package/dist/actions/package/compile/compile.mjs.map +1 -1
- package/dist/actions/package/compile/compileTypes.mjs +43 -59
- package/dist/actions/package/compile/compileTypes.mjs.map +1 -1
- package/dist/actions/package/compile/copyTypeFiles.mjs +20 -23
- package/dist/actions/package/compile/copyTypeFiles.mjs.map +1 -1
- package/dist/actions/package/compile/deepMerge.mjs +0 -5
- package/dist/actions/package/compile/deepMerge.mjs.map +1 -1
- package/dist/actions/package/compile/getCompilerOptions.mjs +11 -10
- package/dist/actions/package/compile/getCompilerOptions.mjs.map +1 -1
- package/dist/actions/package/compile/index.mjs +133 -169
- package/dist/actions/package/compile/index.mjs.map +1 -1
- package/dist/actions/package/compile/inputs.mjs +3 -8
- package/dist/actions/package/compile/inputs.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTsc.mjs +37 -52
- package/dist/actions/package/compile/packageCompileTsc.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTscTypes.mjs +37 -52
- package/dist/actions/package/compile/packageCompileTscTypes.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTsup.mjs +127 -163
- package/dist/actions/package/compile/packageCompileTsup.mjs.map +1 -1
- package/dist/actions/package/copy-assets.mjs +12 -21
- package/dist/actions/package/copy-assets.mjs.map +1 -1
- package/dist/actions/package/cycle.mjs +5 -14
- package/dist/actions/package/cycle.mjs.map +1 -1
- package/dist/actions/package/gen-docs.mjs +11 -12
- package/dist/actions/package/gen-docs.mjs.map +1 -1
- package/dist/actions/package/index.mjs +191 -271
- package/dist/actions/package/index.mjs.map +1 -1
- package/dist/actions/package/lint.mjs +16 -39
- package/dist/actions/package/lint.mjs.map +1 -1
- package/dist/actions/package/publint.mjs +4 -7
- package/dist/actions/package/publint.mjs.map +1 -1
- package/dist/actions/package/recompile.mjs +147 -197
- package/dist/actions/package/recompile.mjs.map +1 -1
- package/dist/actions/publint.mjs +37 -71
- package/dist/actions/publint.mjs.map +1 -1
- package/dist/actions/rebuild.mjs +17 -29
- package/dist/actions/rebuild.mjs.map +1 -1
- package/dist/actions/recompile.mjs +50 -67
- package/dist/actions/recompile.mjs.map +1 -1
- package/dist/actions/reinstall.mjs +25 -43
- package/dist/actions/reinstall.mjs.map +1 -1
- package/dist/actions/relint.mjs +40 -63
- package/dist/actions/relint.mjs.map +1 -1
- package/dist/actions/retest.mjs +17 -35
- package/dist/actions/retest.mjs.map +1 -1
- package/dist/actions/sonar.mjs +16 -32
- package/dist/actions/sonar.mjs.map +1 -1
- package/dist/actions/statics.mjs +27 -46
- package/dist/actions/statics.mjs.map +1 -1
- package/dist/actions/test.mjs +16 -30
- package/dist/actions/test.mjs.map +1 -1
- package/dist/actions/up.mjs +16 -27
- package/dist/actions/up.mjs.map +1 -1
- package/dist/actions/updo.mjs +18 -33
- package/dist/actions/updo.mjs.map +1 -1
- package/dist/actions/upplug.mjs +19 -53
- package/dist/actions/upplug.mjs.map +1 -1
- package/dist/actions/upyarn.mjs +16 -31
- package/dist/actions/upyarn.mjs.map +1 -1
- package/dist/actions/yarn3only.mjs +12 -23
- package/dist/actions/yarn3only.mjs.map +1 -1
- package/dist/bin/package/build-only.mjs +134 -172
- package/dist/bin/package/build-only.mjs.map +1 -1
- package/dist/bin/package/build.mjs +134 -172
- package/dist/bin/package/build.mjs.map +1 -1
- package/dist/bin/package/clean-outputs.mjs +6 -15
- package/dist/bin/package/clean-outputs.mjs.map +1 -1
- package/dist/bin/package/clean-typescript.mjs +6 -15
- package/dist/bin/package/clean-typescript.mjs.map +1 -1
- package/dist/bin/package/clean.mjs +12 -28
- package/dist/bin/package/clean.mjs.map +1 -1
- package/dist/bin/package/compile-only.mjs +134 -172
- package/dist/bin/package/compile-only.mjs.map +1 -1
- package/dist/bin/package/compile-tsup.mjs +128 -165
- package/dist/bin/package/compile-tsup.mjs.map +1 -1
- package/dist/bin/package/compile-types.mjs +44 -61
- package/dist/bin/package/compile-types.mjs.map +1 -1
- package/dist/bin/package/compile.mjs +134 -171
- package/dist/bin/package/compile.mjs.map +1 -1
- package/dist/bin/package/copy-assets-cjs.mjs +13 -23
- package/dist/bin/package/copy-assets-cjs.mjs.map +1 -1
- package/dist/bin/package/copy-assets-esm.mjs +13 -23
- package/dist/bin/package/copy-assets-esm.mjs.map +1 -1
- package/dist/bin/package/cycle.mjs +6 -16
- package/dist/bin/package/cycle.mjs.map +1 -1
- package/dist/bin/package/fix.mjs +16 -38
- package/dist/bin/package/fix.mjs.map +1 -1
- package/dist/bin/package/gen-docs.mjs +11 -11
- package/dist/bin/package/gen-docs.mjs.map +1 -1
- package/dist/bin/package/lint.mjs +16 -38
- package/dist/bin/package/lint.mjs.map +1 -1
- package/dist/bin/package/publint.mjs +4 -6
- package/dist/bin/package/publint.mjs.map +1 -1
- package/dist/bin/package/recompile.mjs +147 -196
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/bin/package/relint.mjs +16 -38
- package/dist/bin/package/relint.mjs.map +1 -1
- package/dist/bin/xy.mjs +1086 -1237
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.mjs +1338 -1583
- package/dist/index.mjs.map +1 -1
- package/dist/lib/checkResult.mjs +2 -5
- package/dist/lib/checkResult.mjs.map +1 -1
- package/dist/lib/createBuildConfig.mjs +9 -24
- package/dist/lib/createBuildConfig.mjs.map +1 -1
- package/dist/lib/defaultBuildConfig.mjs +2 -6
- package/dist/lib/defaultBuildConfig.mjs.map +1 -1
- package/dist/lib/deleteGlob.mjs +3 -9
- package/dist/lib/deleteGlob.mjs.map +1 -1
- package/dist/lib/dependencies/DuplicateDetector.mjs +12 -23
- package/dist/lib/dependencies/DuplicateDetector.mjs.map +1 -1
- package/dist/lib/dependencies/detectDuplicateDependencies.mjs +22 -33
- package/dist/lib/dependencies/detectDuplicateDependencies.mjs.map +1 -1
- package/dist/lib/dependencies/index.mjs +22 -33
- package/dist/lib/dependencies/index.mjs.map +1 -1
- package/dist/lib/file/ReadFileSyncOptions.mjs +1 -3
- package/dist/lib/file/ReadFileSyncOptions.mjs.map +1 -1
- package/dist/lib/file/constants.mjs.map +1 -1
- package/dist/lib/file/fileLines.mjs +12 -13
- package/dist/lib/file/fileLines.mjs.map +1 -1
- package/dist/lib/file/index.mjs +14 -15
- package/dist/lib/file/index.mjs.map +1 -1
- package/dist/lib/file/tryReadFileSync.mjs +3 -8
- package/dist/lib/file/tryReadFileSync.mjs.map +1 -1
- package/dist/lib/generateIgnoreFiles.mjs +27 -43
- package/dist/lib/generateIgnoreFiles.mjs.map +1 -1
- package/dist/lib/index.mjs +100 -154
- package/dist/lib/index.mjs.map +1 -1
- package/dist/lib/jsonFormatters.mjs +2 -5
- package/dist/lib/jsonFormatters.mjs.map +1 -1
- package/dist/lib/loadConfig.mjs +4 -8
- package/dist/lib/loadConfig.mjs.map +1 -1
- package/dist/lib/parsedPackageJSON.mjs +2 -5
- package/dist/lib/parsedPackageJSON.mjs.map +1 -1
- package/dist/lib/processEx.mjs +6 -9
- package/dist/lib/processEx.mjs.map +1 -1
- package/dist/lib/runSteps.mjs +13 -19
- package/dist/lib/runSteps.mjs.map +1 -1
- package/dist/lib/runStepsAsync.mjs +22 -22
- package/dist/lib/runStepsAsync.mjs.map +1 -1
- package/dist/lib/runXy.mjs +19 -31
- package/dist/lib/runXy.mjs.map +1 -1
- package/dist/lib/runXyWithWarning.mjs +2 -5
- package/dist/lib/runXyWithWarning.mjs.map +1 -1
- package/dist/lib/safeExit.mjs +10 -13
- package/dist/lib/safeExit.mjs.map +1 -1
- package/dist/lib/string/empty.mjs +2 -5
- package/dist/lib/string/empty.mjs.map +1 -1
- package/dist/lib/string/index.mjs +3 -9
- package/dist/lib/string/index.mjs.map +1 -1
- package/dist/lib/string/union.mjs +1 -7
- package/dist/lib/string/union.mjs.map +1 -1
- package/dist/lib/withErrnoException.mjs +4 -7
- package/dist/lib/withErrnoException.mjs.map +1 -1
- package/dist/lib/withError.mjs +2 -5
- package/dist/lib/withError.mjs.map +1 -1
- package/dist/lib/yarn/index.mjs +11 -30
- package/dist/lib/yarn/index.mjs.map +1 -1
- package/dist/lib/yarn/isYarnVersionOrGreater.mjs +4 -15
- package/dist/lib/yarn/isYarnVersionOrGreater.mjs.map +1 -1
- package/dist/lib/yarn/workspace/index.mjs +5 -16
- package/dist/lib/yarn/workspace/index.mjs.map +1 -1
- package/dist/lib/yarn/workspace/yarnWorkspace.mjs +5 -16
- package/dist/lib/yarn/workspace/yarnWorkspace.mjs.map +1 -1
- package/dist/lib/yarn/workspace/yarnWorkspaces.mjs +3 -14
- package/dist/lib/yarn/workspace/yarnWorkspaces.mjs.map +1 -1
- package/dist/lib/yarn/yarnInitCwd.mjs +2 -5
- package/dist/lib/yarn/yarnInitCwd.mjs.map +1 -1
- package/dist/loadPackageConfig.mjs +3 -8
- package/dist/loadPackageConfig.mjs.map +1 -1
- package/dist/xy/index.mjs +1086 -1238
- package/dist/xy/index.mjs.map +1 -1
- package/dist/xy/param.mjs +3 -8
- package/dist/xy/param.mjs.map +1 -1
- package/dist/xy/xy.mjs +1086 -1238
- package/dist/xy/xy.mjs.map +1 -1
- package/dist/xy/xyBuildCommands.mjs +276 -382
- package/dist/xy/xyBuildCommands.mjs.map +1 -1
- package/dist/xy/xyCommonCommands.mjs +251 -335
- package/dist/xy/xyCommonCommands.mjs.map +1 -1
- package/dist/xy/xyDeployCommands.mjs +84 -130
- package/dist/xy/xyDeployCommands.mjs.map +1 -1
- package/dist/xy/xyInstallCommands.mjs +145 -193
- package/dist/xy/xyInstallCommands.mjs.map +1 -1
- package/dist/xy/xyLintCommands.mjs +413 -292
- package/dist/xy/xyLintCommands.mjs.map +1 -1
- package/dist/xy/xyParseOptions.mjs +4 -13
- package/dist/xy/xyParseOptions.mjs.map +1 -1
- package/package.json +3 -22
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
1
|
// src/actions/build.ts
|
|
5
2
|
import chalk5 from "chalk";
|
|
6
3
|
|
|
7
4
|
// src/lib/checkResult.ts
|
|
8
5
|
import chalk from "chalk";
|
|
9
|
-
var checkResult =
|
|
6
|
+
var checkResult = (name, result, level = "error", exitOnFail = false) => {
|
|
10
7
|
if (result) {
|
|
11
8
|
const exiting = exitOnFail ? "[Exiting Process]" : "[Continuing]";
|
|
12
9
|
const chalkFunc = level === "error" ? chalk.red : chalk.yellow;
|
|
@@ -15,23 +12,23 @@ var checkResult = /* @__PURE__ */ __name((name, result, level = "error", exitOnF
|
|
|
15
12
|
process.exit(result);
|
|
16
13
|
}
|
|
17
14
|
}
|
|
18
|
-
}
|
|
15
|
+
};
|
|
19
16
|
|
|
20
17
|
// src/lib/processEx.ts
|
|
21
18
|
import chalk2 from "chalk";
|
|
22
19
|
|
|
23
20
|
// src/lib/withError.ts
|
|
24
|
-
var withError =
|
|
21
|
+
var withError = (ex, closure, predicate = (ex2) => !!ex2.name && !!ex2.message) => {
|
|
25
22
|
return predicate(ex) ? closure(ex) : void 0;
|
|
26
|
-
}
|
|
23
|
+
};
|
|
27
24
|
|
|
28
25
|
// src/lib/withErrnoException.ts
|
|
29
|
-
var withErrnoException =
|
|
26
|
+
var withErrnoException = (ex, closure) => {
|
|
30
27
|
return withError(ex, closure, (ex2) => ex2.errno !== void 0);
|
|
31
|
-
}
|
|
28
|
+
};
|
|
32
29
|
|
|
33
30
|
// src/lib/processEx.ts
|
|
34
|
-
var processEx =
|
|
31
|
+
var processEx = (ex) => {
|
|
35
32
|
const error = typeof ex === "string" ? new Error(ex) : ex;
|
|
36
33
|
const exitCode = withErrnoException(error, (error2) => {
|
|
37
34
|
if (error2.code === "ENOENT") {
|
|
@@ -48,10 +45,10 @@ var processEx = /* @__PURE__ */ __name((ex) => {
|
|
|
48
45
|
return -1;
|
|
49
46
|
})();
|
|
50
47
|
process.exit(process.exitCode ?? exitCode);
|
|
51
|
-
}
|
|
48
|
+
};
|
|
52
49
|
|
|
53
50
|
// src/lib/safeExit.ts
|
|
54
|
-
var safeExit =
|
|
51
|
+
var safeExit = (func, exitOnFail = true) => {
|
|
55
52
|
try {
|
|
56
53
|
const result = func();
|
|
57
54
|
if (result && exitOnFail) {
|
|
@@ -61,8 +58,8 @@ var safeExit = /* @__PURE__ */ __name((func, exitOnFail = true) => {
|
|
|
61
58
|
} catch (ex) {
|
|
62
59
|
return processEx(ex);
|
|
63
60
|
}
|
|
64
|
-
}
|
|
65
|
-
var safeExitAsync =
|
|
61
|
+
};
|
|
62
|
+
var safeExitAsync = async (func, exitOnFail = true) => {
|
|
66
63
|
try {
|
|
67
64
|
const result = await func();
|
|
68
65
|
if (result && exitOnFail) {
|
|
@@ -72,33 +69,25 @@ var safeExitAsync = /* @__PURE__ */ __name(async (func, exitOnFail = true) => {
|
|
|
72
69
|
} catch (ex) {
|
|
73
70
|
return processEx(ex);
|
|
74
71
|
}
|
|
75
|
-
}
|
|
72
|
+
};
|
|
76
73
|
|
|
77
74
|
// src/lib/yarn/workspace/yarnWorkspaces.ts
|
|
78
75
|
import { spawnSync } from "node:child_process";
|
|
79
|
-
var yarnWorkspaces =
|
|
80
|
-
const result = spawnSync("yarn", [
|
|
81
|
-
"workspaces",
|
|
82
|
-
"list",
|
|
83
|
-
"--json",
|
|
84
|
-
"--recursive"
|
|
85
|
-
], {
|
|
86
|
-
encoding: "utf8",
|
|
87
|
-
shell: true
|
|
88
|
-
});
|
|
76
|
+
var yarnWorkspaces = () => {
|
|
77
|
+
const result = spawnSync("yarn", ["workspaces", "list", "--json", "--recursive"], { encoding: "utf8", shell: true });
|
|
89
78
|
if (result.error) {
|
|
90
79
|
throw result.error;
|
|
91
80
|
}
|
|
92
81
|
return result.stdout.toString().split("\n").slice(0, -1).map((item) => {
|
|
93
82
|
return JSON.parse(item);
|
|
94
83
|
});
|
|
95
|
-
}
|
|
84
|
+
};
|
|
96
85
|
|
|
97
86
|
// src/lib/runSteps.ts
|
|
98
87
|
import { spawnSync as spawnSync2 } from "node:child_process";
|
|
99
88
|
import { existsSync } from "node:fs";
|
|
100
89
|
import chalk3 from "chalk";
|
|
101
|
-
var runSteps =
|
|
90
|
+
var runSteps = (name, steps, exitOnFail = true, messages) => {
|
|
102
91
|
return safeExit(() => {
|
|
103
92
|
const pkgName = process.env.npm_package_name;
|
|
104
93
|
console.log(chalk3.green(`${name} [${pkgName}]`));
|
|
@@ -114,10 +103,7 @@ var runSteps = /* @__PURE__ */ __name((name, steps, exitOnFail = true, messages)
|
|
|
114
103
|
const status = spawnSync2(command, Array.isArray(args) ? args : args.split(" "), {
|
|
115
104
|
...config,
|
|
116
105
|
encoding: "utf8",
|
|
117
|
-
env: {
|
|
118
|
-
FORCE_COLOR: "3",
|
|
119
|
-
...process.env
|
|
120
|
-
},
|
|
106
|
+
env: { FORCE_COLOR: "3", ...process.env },
|
|
121
107
|
shell: true,
|
|
122
108
|
stdio: "inherit"
|
|
123
109
|
}).status ?? 0;
|
|
@@ -126,13 +112,13 @@ var runSteps = /* @__PURE__ */ __name((name, steps, exitOnFail = true, messages)
|
|
|
126
112
|
}
|
|
127
113
|
return totalStatus;
|
|
128
114
|
}, !!exitOnFail);
|
|
129
|
-
}
|
|
115
|
+
};
|
|
130
116
|
|
|
131
117
|
// src/lib/runStepsAsync.ts
|
|
132
118
|
import { spawn } from "node:child_process";
|
|
133
119
|
import { existsSync as existsSync2 } from "node:fs";
|
|
134
120
|
import chalk4 from "chalk";
|
|
135
|
-
var runStepAsync =
|
|
121
|
+
var runStepAsync = (name, step, exitOnFail = true, message) => {
|
|
136
122
|
return new Promise((resolve) => {
|
|
137
123
|
const [command, args, config] = step;
|
|
138
124
|
if (message) {
|
|
@@ -144,15 +130,18 @@ var runStepAsync = /* @__PURE__ */ __name((name, step, exitOnFail = true, messag
|
|
|
144
130
|
}
|
|
145
131
|
spawn(command, Array.isArray(args) ? args : args.split(" "), {
|
|
146
132
|
...config,
|
|
147
|
-
env: {
|
|
148
|
-
FORCE_COLOR: "3",
|
|
149
|
-
...process.env
|
|
150
|
-
},
|
|
133
|
+
env: { FORCE_COLOR: "3", ...process.env },
|
|
151
134
|
shell: true,
|
|
152
135
|
stdio: "inherit"
|
|
153
136
|
}).on("close", (code) => {
|
|
154
137
|
if (code) {
|
|
155
|
-
console.error(
|
|
138
|
+
console.error(
|
|
139
|
+
chalk4.red(
|
|
140
|
+
`Command Exited With Non-Zero Result [${chalk4.gray(code)}] | ${chalk4.yellow(command)} ${chalk4.white(
|
|
141
|
+
Array.isArray(args) ? args.join(" ") : args
|
|
142
|
+
)}`
|
|
143
|
+
)
|
|
144
|
+
);
|
|
156
145
|
checkResult(name, code, "error", exitOnFail);
|
|
157
146
|
resolve(code);
|
|
158
147
|
} else {
|
|
@@ -160,8 +149,8 @@ var runStepAsync = /* @__PURE__ */ __name((name, step, exitOnFail = true, messag
|
|
|
160
149
|
}
|
|
161
150
|
});
|
|
162
151
|
});
|
|
163
|
-
}
|
|
164
|
-
var runStepsAsync =
|
|
152
|
+
};
|
|
153
|
+
var runStepsAsync = async (name, steps, exitOnFail = true, messages) => {
|
|
165
154
|
return await safeExitAsync(async () => {
|
|
166
155
|
const pkgName = process.env.npm_package_name;
|
|
167
156
|
console.log(chalk4.green(`${name} [${pkgName}]`));
|
|
@@ -171,86 +160,45 @@ var runStepsAsync = /* @__PURE__ */ __name(async (name, steps, exitOnFail = true
|
|
|
171
160
|
}
|
|
172
161
|
return result;
|
|
173
162
|
});
|
|
174
|
-
}
|
|
163
|
+
};
|
|
175
164
|
|
|
176
165
|
// src/actions/build.ts
|
|
177
|
-
var build =
|
|
166
|
+
var build = async ({
|
|
167
|
+
incremental,
|
|
168
|
+
jobs,
|
|
169
|
+
target,
|
|
170
|
+
verbose,
|
|
171
|
+
pkg
|
|
172
|
+
}) => {
|
|
178
173
|
const start = Date.now();
|
|
179
|
-
const pkgOptions = pkg ? [
|
|
180
|
-
|
|
181
|
-
] : [];
|
|
182
|
-
const
|
|
183
|
-
|
|
184
|
-
] : [];
|
|
185
|
-
const verboseOptions = verbose ? [
|
|
186
|
-
"-v"
|
|
187
|
-
] : [];
|
|
188
|
-
const targetOptions = target ? [
|
|
189
|
-
"-t",
|
|
190
|
-
target
|
|
191
|
-
] : [];
|
|
192
|
-
const jobsOptions = jobs ? [
|
|
193
|
-
"-j",
|
|
194
|
-
`${jobs}`
|
|
195
|
-
] : [];
|
|
174
|
+
const pkgOptions = pkg ? [pkg] : [];
|
|
175
|
+
const incrementalOptions = incremental ? ["-i"] : [];
|
|
176
|
+
const verboseOptions = verbose ? ["-v"] : [];
|
|
177
|
+
const targetOptions = target ? ["-t", target] : [];
|
|
178
|
+
const jobsOptions = jobs ? ["-j", `${jobs}`] : [];
|
|
196
179
|
if (jobs) {
|
|
197
180
|
console.log(chalk5.blue(`Jobs set to [${jobs}]`));
|
|
198
181
|
}
|
|
199
182
|
const result = await runStepsAsync(`Build${incremental ? "-Incremental" : ""} [${pkg ?? "All"}]`, [
|
|
200
|
-
[
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
"compile",
|
|
205
|
-
...pkgOptions,
|
|
206
|
-
...targetOptions,
|
|
207
|
-
...verboseOptions,
|
|
208
|
-
...jobsOptions,
|
|
209
|
-
...incrementalOptions,
|
|
210
|
-
"--types",
|
|
211
|
-
"tsup"
|
|
212
|
-
]
|
|
213
|
-
],
|
|
214
|
-
[
|
|
215
|
-
"yarn",
|
|
216
|
-
[
|
|
217
|
-
"xy",
|
|
218
|
-
"publint",
|
|
219
|
-
...pkgOptions,
|
|
220
|
-
...verboseOptions,
|
|
221
|
-
...jobsOptions,
|
|
222
|
-
...incrementalOptions
|
|
223
|
-
]
|
|
224
|
-
],
|
|
225
|
-
[
|
|
226
|
-
"yarn",
|
|
227
|
-
[
|
|
228
|
-
"xy",
|
|
229
|
-
"knip",
|
|
230
|
-
...pkgOptions,
|
|
231
|
-
...verboseOptions,
|
|
232
|
-
...jobsOptions,
|
|
233
|
-
...incrementalOptions
|
|
234
|
-
]
|
|
235
|
-
],
|
|
236
|
-
[
|
|
237
|
-
"yarn",
|
|
238
|
-
[
|
|
239
|
-
"xy",
|
|
240
|
-
"lint",
|
|
241
|
-
...pkgOptions,
|
|
242
|
-
...verboseOptions,
|
|
243
|
-
...incrementalOptions
|
|
244
|
-
]
|
|
245
|
-
]
|
|
183
|
+
["yarn", ["xy", "compile", ...pkgOptions, ...targetOptions, ...verboseOptions, ...jobsOptions, ...incrementalOptions, "--types", "tsup"]],
|
|
184
|
+
["yarn", ["xy", "publint", ...pkgOptions, ...verboseOptions, ...jobsOptions, ...incrementalOptions]],
|
|
185
|
+
["yarn", ["xy", "knip", ...pkgOptions, ...verboseOptions, ...jobsOptions, ...incrementalOptions]],
|
|
186
|
+
["yarn", ["xy", "lint", ...pkgOptions, ...verboseOptions, ...incrementalOptions]]
|
|
246
187
|
]);
|
|
247
188
|
console.log(`${chalk5.gray("Built in")} [${chalk5.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk5.gray("seconds")}`);
|
|
248
189
|
return result;
|
|
249
|
-
}
|
|
190
|
+
};
|
|
250
191
|
|
|
251
192
|
// src/actions/compile.ts
|
|
252
193
|
import chalk6 from "chalk";
|
|
253
|
-
var compile =
|
|
194
|
+
var compile = ({
|
|
195
|
+
verbose,
|
|
196
|
+
target,
|
|
197
|
+
pkg,
|
|
198
|
+
incremental,
|
|
199
|
+
publint,
|
|
200
|
+
jobs
|
|
201
|
+
}) => {
|
|
254
202
|
return pkg ? compilePackage({
|
|
255
203
|
pkg,
|
|
256
204
|
publint,
|
|
@@ -263,164 +211,114 @@ var compile = /* @__PURE__ */ __name(({ verbose, target, pkg, incremental, publi
|
|
|
263
211
|
verbose,
|
|
264
212
|
jobs
|
|
265
213
|
});
|
|
266
|
-
}
|
|
267
|
-
var compilePackage =
|
|
268
|
-
const targetOptions = target ? [
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
...targetOptions
|
|
281
|
-
]
|
|
282
|
-
]
|
|
283
|
-
]);
|
|
284
|
-
}, "compilePackage");
|
|
285
|
-
var compileAll = /* @__PURE__ */ __name(({ jobs, verbose, target, incremental }) => {
|
|
214
|
+
};
|
|
215
|
+
var compilePackage = ({ target, pkg }) => {
|
|
216
|
+
const targetOptions = target ? ["-t", target] : [];
|
|
217
|
+
return runSteps(
|
|
218
|
+
`Compile [${pkg}]`,
|
|
219
|
+
[["yarn", ["workspace", pkg, "run", "package-compile", ...targetOptions]]]
|
|
220
|
+
);
|
|
221
|
+
};
|
|
222
|
+
var compileAll = ({
|
|
223
|
+
jobs,
|
|
224
|
+
verbose,
|
|
225
|
+
target,
|
|
226
|
+
incremental
|
|
227
|
+
}) => {
|
|
286
228
|
const start = Date.now();
|
|
287
|
-
const verboseOptions = verbose ? [
|
|
288
|
-
|
|
289
|
-
] : [
|
|
290
|
-
|
|
291
|
-
];
|
|
292
|
-
const targetOptions = target ? [
|
|
293
|
-
"-t",
|
|
294
|
-
target
|
|
295
|
-
] : [];
|
|
296
|
-
const incrementalOptions = incremental ? [
|
|
297
|
-
"--since",
|
|
298
|
-
"-Apt",
|
|
299
|
-
"--topological-dev"
|
|
300
|
-
] : [
|
|
301
|
-
"--parallel",
|
|
302
|
-
"-Apt",
|
|
303
|
-
"--topological-dev"
|
|
304
|
-
];
|
|
305
|
-
const jobsOptions = jobs ? [
|
|
306
|
-
"-j",
|
|
307
|
-
`${jobs}`
|
|
308
|
-
] : [];
|
|
229
|
+
const verboseOptions = verbose ? ["--verbose"] : ["--no-verbose"];
|
|
230
|
+
const targetOptions = target ? ["-t", target] : [];
|
|
231
|
+
const incrementalOptions = incremental ? ["--since", "-Apt", "--topological-dev"] : ["--parallel", "-Apt", "--topological-dev"];
|
|
232
|
+
const jobsOptions = jobs ? ["-j", `${jobs}`] : [];
|
|
309
233
|
if (jobs) {
|
|
310
234
|
console.log(chalk6.blue(`Jobs set to [${jobs}]`));
|
|
311
235
|
}
|
|
312
236
|
const result = runSteps(`Compile${incremental ? "-Incremental" : ""} [All]`, [
|
|
313
|
-
[
|
|
314
|
-
"
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
...targetOptions
|
|
324
|
-
]
|
|
325
|
-
]
|
|
237
|
+
["yarn", [
|
|
238
|
+
"workspaces",
|
|
239
|
+
"foreach",
|
|
240
|
+
...incrementalOptions,
|
|
241
|
+
...jobsOptions,
|
|
242
|
+
...verboseOptions,
|
|
243
|
+
"run",
|
|
244
|
+
"package-compile",
|
|
245
|
+
...targetOptions
|
|
246
|
+
]]
|
|
326
247
|
]);
|
|
327
248
|
console.log(`${chalk6.gray("Compiled in")} [${chalk6.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk6.gray("seconds")}`);
|
|
328
249
|
return result;
|
|
329
|
-
}
|
|
250
|
+
};
|
|
330
251
|
|
|
331
252
|
// src/actions/compile-types.ts
|
|
332
253
|
import chalk7 from "chalk";
|
|
333
|
-
var compileTypes =
|
|
254
|
+
var compileTypes = ({
|
|
255
|
+
verbose,
|
|
256
|
+
pkg,
|
|
257
|
+
incremental,
|
|
258
|
+
jobs
|
|
259
|
+
}) => {
|
|
334
260
|
if (verbose) {
|
|
335
261
|
console.log(chalk7.gray("Compiling Types"));
|
|
336
262
|
}
|
|
337
|
-
return pkg ? compileTypesPackage({
|
|
338
|
-
pkg,
|
|
339
|
-
verbose
|
|
340
|
-
}) : compileTypesAll({
|
|
263
|
+
return pkg ? compileTypesPackage({ pkg, verbose }) : compileTypesAll({
|
|
341
264
|
incremental,
|
|
342
265
|
verbose,
|
|
343
266
|
jobs
|
|
344
267
|
});
|
|
345
|
-
}
|
|
346
|
-
var compileTypesPackage =
|
|
268
|
+
};
|
|
269
|
+
var compileTypesPackage = ({ verbose, pkg }) => {
|
|
347
270
|
if (verbose) {
|
|
348
271
|
console.log(chalk7.gray("Compiling Types [Package]"));
|
|
349
272
|
}
|
|
350
|
-
return runSteps(
|
|
351
|
-
[
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
]);
|
|
361
|
-
}, "compileTypesPackage");
|
|
362
|
-
var compileTypesAll = /* @__PURE__ */ __name(({ jobs, verbose, incremental }) => {
|
|
273
|
+
return runSteps(
|
|
274
|
+
`Compile [${pkg}]`,
|
|
275
|
+
[["yarn", ["workspace", pkg, "run", "package-compile-types"]]]
|
|
276
|
+
);
|
|
277
|
+
};
|
|
278
|
+
var compileTypesAll = ({
|
|
279
|
+
jobs,
|
|
280
|
+
verbose,
|
|
281
|
+
incremental
|
|
282
|
+
}) => {
|
|
363
283
|
if (verbose) {
|
|
364
284
|
console.log(chalk7.gray("Compiling Types [All]"));
|
|
365
285
|
}
|
|
366
286
|
const start = Date.now();
|
|
367
|
-
const verboseOptions = verbose ? [
|
|
368
|
-
|
|
369
|
-
] : [
|
|
370
|
-
"--no-verbose"
|
|
371
|
-
];
|
|
372
|
-
const incrementalOptions = incremental ? [
|
|
373
|
-
"--since",
|
|
374
|
-
"-Apt"
|
|
375
|
-
] : [
|
|
376
|
-
"--parallel",
|
|
377
|
-
"-Apt"
|
|
378
|
-
];
|
|
379
|
-
const jobsOptions = jobs ? [
|
|
380
|
-
"-j",
|
|
381
|
-
`${jobs}`
|
|
382
|
-
] : [];
|
|
287
|
+
const verboseOptions = verbose ? ["--verbose"] : ["--no-verbose"];
|
|
288
|
+
const incrementalOptions = incremental ? ["--since", "-Apt"] : ["--parallel", "-Apt"];
|
|
289
|
+
const jobsOptions = jobs ? ["-j", `${jobs}`] : [];
|
|
383
290
|
if (jobs) {
|
|
384
291
|
console.log(chalk7.blue(`Jobs set to [${jobs}]`));
|
|
385
292
|
}
|
|
386
293
|
const result = runSteps(`Compile Types ${incremental ? "[Incremental]" : ""} [All]`, [
|
|
387
|
-
[
|
|
388
|
-
"
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
"package-compile-types"
|
|
397
|
-
]
|
|
398
|
-
]
|
|
294
|
+
["yarn", [
|
|
295
|
+
"workspaces",
|
|
296
|
+
"foreach",
|
|
297
|
+
...incrementalOptions,
|
|
298
|
+
...jobsOptions,
|
|
299
|
+
...verboseOptions,
|
|
300
|
+
"run",
|
|
301
|
+
"package-compile-types"
|
|
302
|
+
]]
|
|
399
303
|
]);
|
|
400
304
|
console.log(`${chalk7.gray("Types Compiled in")} [${chalk7.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk7.gray("seconds")}`);
|
|
401
305
|
return result;
|
|
402
|
-
}
|
|
306
|
+
};
|
|
403
307
|
|
|
404
308
|
// src/actions/copy-assets.ts
|
|
405
309
|
import path from "node:path/posix";
|
|
406
310
|
import chalk8 from "chalk";
|
|
407
311
|
import cpy from "cpy";
|
|
408
|
-
var copyPackageTargetAssets =
|
|
312
|
+
var copyPackageTargetAssets = async (target, name, location) => {
|
|
409
313
|
try {
|
|
410
|
-
const values = await cpy(
|
|
411
|
-
"**/*.jpg",
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
"**/*.gif",
|
|
419
|
-
"**/*.css"
|
|
420
|
-
], `../dist/${target}`, {
|
|
421
|
-
cwd: path.join(process.cwd(), location, "src"),
|
|
422
|
-
flat: false
|
|
423
|
-
});
|
|
314
|
+
const values = await cpy(
|
|
315
|
+
["**/*.jpg", "**/*.png", "**/*.gif", "**/*.svg", "**/*.webp", "**/*.sass", "**/*.scss", "**/*.gif", "**/*.css"],
|
|
316
|
+
`../dist/${target}`,
|
|
317
|
+
{
|
|
318
|
+
cwd: path.join(process.cwd(), location, "src"),
|
|
319
|
+
flat: false
|
|
320
|
+
}
|
|
321
|
+
);
|
|
424
322
|
for (const value of values) {
|
|
425
323
|
console.log(`${value.split("/").pop()} => ./dist/${target}`);
|
|
426
324
|
}
|
|
@@ -429,8 +327,8 @@ var copyPackageTargetAssets = /* @__PURE__ */ __name(async (target, name, locati
|
|
|
429
327
|
console.log(`Copy Failed: ${name}: ${reason}`);
|
|
430
328
|
return 1;
|
|
431
329
|
}
|
|
432
|
-
}
|
|
433
|
-
var copyTargetAssets =
|
|
330
|
+
};
|
|
331
|
+
var copyTargetAssets = async (target, pkg) => {
|
|
434
332
|
const workspaces = yarnWorkspaces();
|
|
435
333
|
console.log(chalk8.green(`Copying Assets [${target.toUpperCase()}]`));
|
|
436
334
|
const workspaceList = workspaces.filter(({ name }) => {
|
|
@@ -439,15 +337,17 @@ var copyTargetAssets = /* @__PURE__ */ __name(async (target, pkg) => {
|
|
|
439
337
|
if (workspaceList.length === 0) {
|
|
440
338
|
console.error(`Package not found [${pkg}]`);
|
|
441
339
|
} else {
|
|
442
|
-
const results = await Promise.all(
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
340
|
+
const results = await Promise.all(
|
|
341
|
+
workspaceList.map(async (workspace) => {
|
|
342
|
+
const { location, name } = workspace;
|
|
343
|
+
return await copyPackageTargetAssets(target, name, location);
|
|
344
|
+
})
|
|
345
|
+
);
|
|
446
346
|
return results.reduce((prev, result) => prev || result, 0);
|
|
447
347
|
}
|
|
448
348
|
return 0;
|
|
449
|
-
}
|
|
450
|
-
var copyAssets =
|
|
349
|
+
};
|
|
350
|
+
var copyAssets = async ({ target, pkg }) => {
|
|
451
351
|
switch (target) {
|
|
452
352
|
case "esm": {
|
|
453
353
|
return await copyTargetAssets("esm", pkg);
|
|
@@ -459,25 +359,24 @@ var copyAssets = /* @__PURE__ */ __name(async ({ target, pkg }) => {
|
|
|
459
359
|
return await copyTargetAssets("esm", pkg) || await copyTargetAssets("cjs", pkg);
|
|
460
360
|
}
|
|
461
361
|
}
|
|
462
|
-
}
|
|
362
|
+
};
|
|
463
363
|
|
|
464
364
|
// src/actions/rebuild.ts
|
|
465
|
-
var rebuild =
|
|
365
|
+
var rebuild = ({ target }) => {
|
|
466
366
|
return runSteps("Rebuild", [
|
|
467
|
-
[
|
|
468
|
-
|
|
469
|
-
"xy clean"
|
|
470
|
-
],
|
|
471
|
-
[
|
|
472
|
-
"yarn",
|
|
473
|
-
target ? `xy build -t ${target}` : "xy build"
|
|
474
|
-
]
|
|
367
|
+
["yarn", "xy clean"],
|
|
368
|
+
["yarn", target ? `xy build -t ${target}` : "xy build"]
|
|
475
369
|
]);
|
|
476
|
-
}
|
|
370
|
+
};
|
|
477
371
|
|
|
478
372
|
// src/actions/recompile.ts
|
|
479
373
|
import chalk9 from "chalk";
|
|
480
|
-
var recompile =
|
|
374
|
+
var recompile = async ({
|
|
375
|
+
verbose,
|
|
376
|
+
target,
|
|
377
|
+
pkg,
|
|
378
|
+
incremental
|
|
379
|
+
}) => {
|
|
481
380
|
return pkg ? await recompilePackage({
|
|
482
381
|
pkg,
|
|
483
382
|
target,
|
|
@@ -487,49 +386,25 @@ var recompile = /* @__PURE__ */ __name(async ({ verbose, target, pkg, incrementa
|
|
|
487
386
|
target,
|
|
488
387
|
verbose
|
|
489
388
|
});
|
|
490
|
-
}
|
|
491
|
-
var recompilePackage =
|
|
492
|
-
const targetOptions = target ? [
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
...targetOptions
|
|
505
|
-
]
|
|
506
|
-
]
|
|
507
|
-
]);
|
|
508
|
-
}, "recompilePackage");
|
|
509
|
-
var recompileAll = /* @__PURE__ */ __name(async ({ jobs, verbose, target, incremental }) => {
|
|
389
|
+
};
|
|
390
|
+
var recompilePackage = ({ target, pkg }) => {
|
|
391
|
+
const targetOptions = target ? ["-t", target] : [];
|
|
392
|
+
return runStepsAsync(
|
|
393
|
+
`Recompile [${pkg}]`,
|
|
394
|
+
[["yarn", ["workspace", pkg, "run", "package-recompile", ...targetOptions]]]
|
|
395
|
+
);
|
|
396
|
+
};
|
|
397
|
+
var recompileAll = async ({
|
|
398
|
+
jobs,
|
|
399
|
+
verbose,
|
|
400
|
+
target,
|
|
401
|
+
incremental
|
|
402
|
+
}) => {
|
|
510
403
|
const start = Date.now();
|
|
511
|
-
const verboseOptions = verbose ? [
|
|
512
|
-
|
|
513
|
-
] : [
|
|
514
|
-
|
|
515
|
-
];
|
|
516
|
-
const targetOptions = target ? [
|
|
517
|
-
"-t",
|
|
518
|
-
target
|
|
519
|
-
] : [];
|
|
520
|
-
const incrementalOptions = incremental ? [
|
|
521
|
-
"--since",
|
|
522
|
-
"-Apt",
|
|
523
|
-
"--topological-dev"
|
|
524
|
-
] : [
|
|
525
|
-
"--parallel",
|
|
526
|
-
"-Apt",
|
|
527
|
-
"--topological-dev"
|
|
528
|
-
];
|
|
529
|
-
const jobsOptions = jobs ? [
|
|
530
|
-
"-j",
|
|
531
|
-
`${jobs}`
|
|
532
|
-
] : [];
|
|
404
|
+
const verboseOptions = verbose ? ["--verbose"] : ["--no-verbose"];
|
|
405
|
+
const targetOptions = target ? ["-t", target] : [];
|
|
406
|
+
const incrementalOptions = incremental ? ["--since", "-Apt", "--topological-dev"] : ["--parallel", "-Apt", "--topological-dev"];
|
|
407
|
+
const jobsOptions = jobs ? ["-j", `${jobs}`] : [];
|
|
533
408
|
if (jobs) {
|
|
534
409
|
console.log(chalk9.blue(`Jobs set to [${jobs}]`));
|
|
535
410
|
}
|
|
@@ -561,107 +436,126 @@ var recompileAll = /* @__PURE__ */ __name(async ({ jobs, verbose, target, increm
|
|
|
561
436
|
]
|
|
562
437
|
]
|
|
563
438
|
]);
|
|
564
|
-
console.log(
|
|
439
|
+
console.log(
|
|
440
|
+
`${chalk9.gray("Recompiled in")} [${chalk9.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk9.gray("seconds")}`
|
|
441
|
+
);
|
|
565
442
|
return result;
|
|
566
|
-
}
|
|
443
|
+
};
|
|
567
444
|
|
|
568
445
|
// src/xy/xyBuildCommands.ts
|
|
569
|
-
var xyBuildCommands =
|
|
570
|
-
return args.command(
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
446
|
+
var xyBuildCommands = (args) => {
|
|
447
|
+
return args.command(
|
|
448
|
+
"build [package]",
|
|
449
|
+
"Build - Compile & Lint",
|
|
450
|
+
(yargs) => {
|
|
451
|
+
return yargs.positional("package", { describe: "Specific package to build" });
|
|
452
|
+
},
|
|
453
|
+
async (argv) => {
|
|
454
|
+
if (argv.verbose) {
|
|
455
|
+
console.log(`Building: ${argv.package ?? "all"}`);
|
|
456
|
+
}
|
|
457
|
+
process.exitCode = await build({
|
|
458
|
+
incremental: !!argv.incremental,
|
|
459
|
+
jobs: argv.jobs,
|
|
460
|
+
pkg: argv.package,
|
|
461
|
+
target: argv.target,
|
|
462
|
+
verbose: !!argv.verbose
|
|
463
|
+
});
|
|
577
464
|
}
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
465
|
+
).command(
|
|
466
|
+
"compile [package]",
|
|
467
|
+
"Compile with Typescript & Copy Images",
|
|
468
|
+
(yargs) => {
|
|
469
|
+
return yargs.positional("package", { describe: "Specific package to compile" });
|
|
470
|
+
},
|
|
471
|
+
(argv) => {
|
|
472
|
+
if (argv.verbose) {
|
|
473
|
+
console.log(`Compiling: ${argv.package ?? "all"}`);
|
|
474
|
+
}
|
|
475
|
+
process.exitCode = compile({
|
|
476
|
+
incremental: !!argv.incremental,
|
|
477
|
+
jobs: argv.jobs,
|
|
478
|
+
pkg: argv.package,
|
|
479
|
+
target: argv.target,
|
|
480
|
+
verbose: !!argv.verbose
|
|
481
|
+
});
|
|
592
482
|
}
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
483
|
+
).command(
|
|
484
|
+
"compile-types [package]",
|
|
485
|
+
"Compile types with Typescript",
|
|
486
|
+
(yargs) => {
|
|
487
|
+
return yargs.positional("package", { describe: "Specific package to compile" });
|
|
488
|
+
},
|
|
489
|
+
(argv) => {
|
|
490
|
+
if (argv.verbose) {
|
|
491
|
+
console.log(`Compiling: ${argv.package ?? "all"}`);
|
|
492
|
+
}
|
|
493
|
+
process.exitCode = compileTypes({
|
|
494
|
+
incremental: !!argv.incremental,
|
|
495
|
+
jobs: argv.jobs,
|
|
496
|
+
pkg: argv.package,
|
|
497
|
+
verbose: !!argv.verbose
|
|
498
|
+
});
|
|
607
499
|
}
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
500
|
+
).command(
|
|
501
|
+
"compile-only [package]",
|
|
502
|
+
"Compile with Typescript & Copy Images (No Publint)",
|
|
503
|
+
(yargs) => {
|
|
504
|
+
return yargs.positional("package", { describe: "Specific package to compile" });
|
|
505
|
+
},
|
|
506
|
+
(argv) => {
|
|
507
|
+
if (argv.verbose) {
|
|
508
|
+
console.log(`Compiling: ${argv.package ?? "all"}`);
|
|
509
|
+
}
|
|
510
|
+
process.exitCode = compile({
|
|
511
|
+
incremental: !!argv.incremental,
|
|
512
|
+
jobs: argv.jobs,
|
|
513
|
+
pkg: argv.package,
|
|
514
|
+
publint: false,
|
|
515
|
+
target: argv.target,
|
|
516
|
+
verbose: !!argv.verbose
|
|
517
|
+
});
|
|
621
518
|
}
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
519
|
+
).command(
|
|
520
|
+
"recompile [package]",
|
|
521
|
+
"Re-compile with Typescript & Copy Images",
|
|
522
|
+
(yargs) => {
|
|
523
|
+
return yargs.positional("package", { describe: "Specific package to re-compile" });
|
|
524
|
+
},
|
|
525
|
+
async (argv) => {
|
|
526
|
+
if (argv.verbose) {
|
|
527
|
+
console.log(`Re-compiling: ${argv.package ?? "all"}`);
|
|
528
|
+
}
|
|
529
|
+
process.exitCode = await recompile({
|
|
530
|
+
incremental: !!argv.incremental,
|
|
531
|
+
jobs: argv.jobs,
|
|
532
|
+
pkg: argv.package,
|
|
533
|
+
target: argv.target,
|
|
534
|
+
verbose: !!argv.verbose
|
|
535
|
+
});
|
|
637
536
|
}
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
process.exitCode = await copyAssets({
|
|
661
|
-
target: argv.target
|
|
662
|
-
});
|
|
663
|
-
});
|
|
664
|
-
}, "xyBuildCommands");
|
|
537
|
+
).command(
|
|
538
|
+
"rebuild [package]",
|
|
539
|
+
"Rebuild - Clean, Compile & Lint",
|
|
540
|
+
(yargs) => {
|
|
541
|
+
return yargs.positional("package", { describe: "Specific package to rebuild" });
|
|
542
|
+
},
|
|
543
|
+
(argv) => {
|
|
544
|
+
if (argv.verbose) console.log(`Rebuilding: ${argv.package ?? "all"}`);
|
|
545
|
+
process.exitCode = rebuild({ target: argv.target });
|
|
546
|
+
}
|
|
547
|
+
).command(
|
|
548
|
+
"copy-assets [package]",
|
|
549
|
+
"Copy Assets - Copy the assets from src to dist",
|
|
550
|
+
(yargs) => {
|
|
551
|
+
return yargs.positional("package", { describe: "Specific package to copy assets" });
|
|
552
|
+
},
|
|
553
|
+
async (argv) => {
|
|
554
|
+
if (argv.verbose) console.log(`Copying Assets: ${argv.package ?? "all"}`);
|
|
555
|
+
process.exitCode = await copyAssets({ target: argv.target });
|
|
556
|
+
}
|
|
557
|
+
);
|
|
558
|
+
};
|
|
665
559
|
export {
|
|
666
560
|
xyBuildCommands
|
|
667
561
|
};
|