@xylabs/ts-scripts-yarn3 7.0.2 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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.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/checkPackage/checkPackage.mjs +48 -71
- package/dist/actions/deplint/checkPackage/checkPackage.mjs.map +1 -1
- package/dist/actions/deplint/checkPackage/getUnlistedDependencies.mjs +5 -5
- package/dist/actions/deplint/checkPackage/getUnlistedDependencies.mjs.map +1 -1
- package/dist/actions/deplint/checkPackage/getUnlistedDevDependencies.mjs +9 -5
- package/dist/actions/deplint/checkPackage/getUnlistedDevDependencies.mjs.map +1 -1
- package/dist/actions/deplint/checkPackage/getUnusedDependencies.mjs +5 -5
- package/dist/actions/deplint/checkPackage/getUnusedDependencies.mjs.map +1 -1
- package/dist/actions/deplint/checkPackage/getUnusedPeerDependencies.mjs +0 -4
- package/dist/actions/deplint/checkPackage/getUnusedPeerDependencies.mjs.map +1 -1
- package/dist/actions/deplint/checkPackage/index.mjs +48 -71
- package/dist/actions/deplint/checkPackage/index.mjs.map +1 -1
- package/dist/actions/deplint/deplint.mjs +61 -86
- package/dist/actions/deplint/deplint.mjs.map +1 -1
- package/dist/actions/deplint/findFiles.mjs +4 -20
- package/dist/actions/deplint/findFiles.mjs.map +1 -1
- package/dist/actions/deplint/findFilesByGlob.mjs +1 -8
- package/dist/actions/deplint/findFilesByGlob.mjs.map +1 -1
- package/dist/actions/deplint/getBasePackageName.mjs +0 -4
- package/dist/actions/deplint/getBasePackageName.mjs.map +1 -1
- package/dist/actions/deplint/getDependenciesFromPackageJson.mjs +0 -4
- package/dist/actions/deplint/getDependenciesFromPackageJson.mjs.map +1 -1
- package/dist/actions/deplint/getExternalImportsFromFiles.mjs +12 -24
- package/dist/actions/deplint/getExternalImportsFromFiles.mjs.map +1 -1
- package/dist/actions/deplint/getImportsFromFile.mjs +9 -16
- package/dist/actions/deplint/getImportsFromFile.mjs.map +1 -1
- package/dist/actions/deplint/index.mjs +61 -86
- package/dist/actions/deplint/index.mjs.map +1 -1
- package/dist/actions/deploy-major.mjs +26 -57
- package/dist/actions/deploy-major.mjs.map +1 -1
- package/dist/actions/deploy-minor.mjs +26 -57
- package/dist/actions/deploy-minor.mjs.map +1 -1
- package/dist/actions/deploy-next.mjs +26 -57
- package/dist/actions/deploy-next.mjs.map +1 -1
- package/dist/actions/deploy.mjs +26 -57
- 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 +705 -1251
- 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 +19 -34
- package/dist/actions/package/compile/buildEntries.mjs.map +1 -1
- package/dist/actions/package/compile/compile.mjs +165 -195
- package/dist/actions/package/compile/compile.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 +2 -5
- package/dist/actions/package/compile/getCompilerOptions.mjs.map +1 -1
- package/dist/actions/package/compile/index.mjs +165 -195
- package/dist/actions/package/compile/index.mjs.map +1 -1
- package/dist/actions/package/compile/inputs.mjs +15 -25
- package/dist/actions/package/compile/inputs.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTsc.mjs +25 -17
- package/dist/actions/package/compile/packageCompileTsc.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTscTypes.mjs +19 -36
- package/dist/actions/package/compile/packageCompileTscTypes.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTsup.mjs +160 -185
- 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 +236 -308
- 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 +13 -14
- package/dist/actions/package/publint.mjs.map +1 -1
- package/dist/actions/package/recompile.mjs +179 -223
- 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 +165 -194
- package/dist/bin/package/build-only.mjs.map +1 -1
- package/dist/bin/package/build.mjs +166 -197
- 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 +165 -194
- package/dist/bin/package/compile-only.mjs.map +1 -1
- package/dist/bin/package/compile-tsup.mjs +160 -184
- package/dist/bin/package/compile-tsup.mjs.map +1 -1
- package/dist/bin/package/compile.mjs +165 -194
- 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 +5 -13
- 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 +13 -13
- package/dist/bin/package/publint.mjs.map +1 -1
- package/dist/bin/package/recompile.mjs +179 -222
- 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 +932 -1266
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/index.mjs +1191 -1612
- 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 +99 -157
- 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 +3 -11
- 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 +932 -1267
- package/dist/xy/index.mjs.map +1 -1
- package/dist/xy/param.mjs +3 -9
- package/dist/xy/param.mjs.map +1 -1
- package/dist/xy/xy.mjs +932 -1267
- package/dist/xy/xy.mjs.map +1 -1
- package/dist/xy/xyBuildCommands.mjs +228 -320
- package/dist/xy/xyBuildCommands.mjs.map +1 -1
- package/dist/xy/xyCommonCommands.mjs +251 -336
- package/dist/xy/xyCommonCommands.mjs.map +1 -1
- package/dist/xy/xyDeployCommands.mjs +99 -161
- 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 +302 -403
- package/dist/xy/xyLintCommands.mjs.map +1 -1
- package/dist/xy/xyParseOptions.mjs +2 -5
- package/dist/xy/xyParseOptions.mjs.map +1 -1
- package/package.json +8 -9
|
@@ -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 "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 "child_process";
|
|
99
88
|
import { existsSync } from "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 "child_process";
|
|
133
119
|
import { existsSync as existsSync2 } from "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 === void 0 ? [] : [
|
|
180
|
-
|
|
181
|
-
];
|
|
182
|
-
const
|
|
183
|
-
|
|
184
|
-
] : [];
|
|
185
|
-
const verboseOptions = verbose ? [
|
|
186
|
-
"-v"
|
|
187
|
-
] : [];
|
|
188
|
-
const targetOptions = target === void 0 ? [] : [
|
|
189
|
-
"-t",
|
|
190
|
-
target
|
|
191
|
-
];
|
|
192
|
-
const jobsOptions = jobs === void 0 ? [] : [
|
|
193
|
-
"-j",
|
|
194
|
-
`${jobs}`
|
|
195
|
-
];
|
|
174
|
+
const pkgOptions = pkg === void 0 ? [] : [pkg];
|
|
175
|
+
const incrementalOptions = incremental ? ["-i"] : [];
|
|
176
|
+
const verboseOptions = verbose ? ["-v"] : [];
|
|
177
|
+
const targetOptions = target === void 0 ? [] : ["-t", target];
|
|
178
|
+
const jobsOptions = jobs === void 0 ? [] : ["-j", `${jobs}`];
|
|
196
179
|
if (jobs !== void 0) {
|
|
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
|
-
"deplint",
|
|
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", "deplint", ...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,91 +211,58 @@ 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/copy-assets.ts
|
|
332
253
|
import path from "path/posix";
|
|
333
254
|
import chalk7 from "chalk";
|
|
334
255
|
import cpy from "cpy";
|
|
335
|
-
var copyPackageTargetAssets =
|
|
256
|
+
var copyPackageTargetAssets = async (target, name, location) => {
|
|
336
257
|
try {
|
|
337
|
-
const values = await cpy(
|
|
338
|
-
"**/*.jpg",
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
"**/*.gif",
|
|
346
|
-
"**/*.css"
|
|
347
|
-
], `../dist/${target}`, {
|
|
348
|
-
cwd: path.join(process.cwd(), location, "src"),
|
|
349
|
-
flat: false
|
|
350
|
-
});
|
|
258
|
+
const values = await cpy(
|
|
259
|
+
["**/*.jpg", "**/*.png", "**/*.gif", "**/*.svg", "**/*.webp", "**/*.sass", "**/*.scss", "**/*.gif", "**/*.css"],
|
|
260
|
+
`../dist/${target}`,
|
|
261
|
+
{
|
|
262
|
+
cwd: path.join(process.cwd(), location, "src"),
|
|
263
|
+
flat: false
|
|
264
|
+
}
|
|
265
|
+
);
|
|
351
266
|
for (const value of values) {
|
|
352
267
|
console.log(`${value.split("/").pop()} => ./dist/${target}`);
|
|
353
268
|
}
|
|
@@ -356,8 +271,8 @@ var copyPackageTargetAssets = /* @__PURE__ */ __name(async (target, name, locati
|
|
|
356
271
|
console.log(`Copy Failed: ${name}: ${reason}`);
|
|
357
272
|
return 1;
|
|
358
273
|
}
|
|
359
|
-
}
|
|
360
|
-
var copyTargetAssets =
|
|
274
|
+
};
|
|
275
|
+
var copyTargetAssets = async (target, pkg) => {
|
|
361
276
|
const workspaces = yarnWorkspaces();
|
|
362
277
|
console.log(chalk7.green(`Copying Assets [${target.toUpperCase()}]`));
|
|
363
278
|
const workspaceList = workspaces.filter(({ name }) => {
|
|
@@ -366,15 +281,17 @@ var copyTargetAssets = /* @__PURE__ */ __name(async (target, pkg) => {
|
|
|
366
281
|
if (workspaceList.length === 0) {
|
|
367
282
|
console.error(`Package not found [${pkg}]`);
|
|
368
283
|
} else {
|
|
369
|
-
const results = await Promise.all(
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
284
|
+
const results = await Promise.all(
|
|
285
|
+
workspaceList.map(async (workspace) => {
|
|
286
|
+
const { location, name } = workspace;
|
|
287
|
+
return await copyPackageTargetAssets(target, name, location);
|
|
288
|
+
})
|
|
289
|
+
);
|
|
373
290
|
return results.reduce((prev, result) => prev || result, 0);
|
|
374
291
|
}
|
|
375
292
|
return 0;
|
|
376
|
-
}
|
|
377
|
-
var copyAssets =
|
|
293
|
+
};
|
|
294
|
+
var copyAssets = async ({ target, pkg }) => {
|
|
378
295
|
switch (target) {
|
|
379
296
|
case "esm": {
|
|
380
297
|
return await copyTargetAssets("esm", pkg);
|
|
@@ -386,25 +303,24 @@ var copyAssets = /* @__PURE__ */ __name(async ({ target, pkg }) => {
|
|
|
386
303
|
return await copyTargetAssets("esm", pkg) || await copyTargetAssets("cjs", pkg);
|
|
387
304
|
}
|
|
388
305
|
}
|
|
389
|
-
}
|
|
306
|
+
};
|
|
390
307
|
|
|
391
308
|
// src/actions/rebuild.ts
|
|
392
|
-
var rebuild =
|
|
309
|
+
var rebuild = ({ target }) => {
|
|
393
310
|
return runSteps("Rebuild", [
|
|
394
|
-
[
|
|
395
|
-
|
|
396
|
-
"xy clean"
|
|
397
|
-
],
|
|
398
|
-
[
|
|
399
|
-
"yarn",
|
|
400
|
-
target ? `xy build -t ${target}` : "xy build"
|
|
401
|
-
]
|
|
311
|
+
["yarn", "xy clean"],
|
|
312
|
+
["yarn", target ? `xy build -t ${target}` : "xy build"]
|
|
402
313
|
]);
|
|
403
|
-
}
|
|
314
|
+
};
|
|
404
315
|
|
|
405
316
|
// src/actions/recompile.ts
|
|
406
317
|
import chalk8 from "chalk";
|
|
407
|
-
var recompile =
|
|
318
|
+
var recompile = async ({
|
|
319
|
+
verbose,
|
|
320
|
+
target,
|
|
321
|
+
pkg,
|
|
322
|
+
incremental
|
|
323
|
+
}) => {
|
|
408
324
|
return pkg ? await recompilePackage({
|
|
409
325
|
pkg,
|
|
410
326
|
target,
|
|
@@ -414,49 +330,25 @@ var recompile = /* @__PURE__ */ __name(async ({ verbose, target, pkg, incrementa
|
|
|
414
330
|
target,
|
|
415
331
|
verbose
|
|
416
332
|
});
|
|
417
|
-
}
|
|
418
|
-
var recompilePackage =
|
|
419
|
-
const targetOptions = target ? [
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
...targetOptions
|
|
432
|
-
]
|
|
433
|
-
]
|
|
434
|
-
]);
|
|
435
|
-
}, "recompilePackage");
|
|
436
|
-
var recompileAll = /* @__PURE__ */ __name(async ({ jobs, verbose, target, incremental }) => {
|
|
333
|
+
};
|
|
334
|
+
var recompilePackage = ({ target, pkg }) => {
|
|
335
|
+
const targetOptions = target ? ["-t", target] : [];
|
|
336
|
+
return runStepsAsync(
|
|
337
|
+
`Recompile [${pkg}]`,
|
|
338
|
+
[["yarn", ["workspace", pkg, "run", "package-recompile", ...targetOptions]]]
|
|
339
|
+
);
|
|
340
|
+
};
|
|
341
|
+
var recompileAll = async ({
|
|
342
|
+
jobs,
|
|
343
|
+
verbose,
|
|
344
|
+
target,
|
|
345
|
+
incremental
|
|
346
|
+
}) => {
|
|
437
347
|
const start = Date.now();
|
|
438
|
-
const verboseOptions = verbose ? [
|
|
439
|
-
|
|
440
|
-
] : [
|
|
441
|
-
|
|
442
|
-
];
|
|
443
|
-
const targetOptions = target ? [
|
|
444
|
-
"-t",
|
|
445
|
-
target
|
|
446
|
-
] : [];
|
|
447
|
-
const incrementalOptions = incremental ? [
|
|
448
|
-
"--since",
|
|
449
|
-
"-Apt",
|
|
450
|
-
"--topological-dev"
|
|
451
|
-
] : [
|
|
452
|
-
"--parallel",
|
|
453
|
-
"-Apt",
|
|
454
|
-
"--topological-dev"
|
|
455
|
-
];
|
|
456
|
-
const jobsOptions = jobs ? [
|
|
457
|
-
"-j",
|
|
458
|
-
`${jobs}`
|
|
459
|
-
] : [];
|
|
348
|
+
const verboseOptions = verbose ? ["--verbose"] : ["--no-verbose"];
|
|
349
|
+
const targetOptions = target ? ["-t", target] : [];
|
|
350
|
+
const incrementalOptions = incremental ? ["--since", "-Apt", "--topological-dev"] : ["--parallel", "-Apt", "--topological-dev"];
|
|
351
|
+
const jobsOptions = jobs ? ["-j", `${jobs}`] : [];
|
|
460
352
|
if (jobs) {
|
|
461
353
|
console.log(chalk8.blue(`Jobs set to [${jobs}]`));
|
|
462
354
|
}
|
|
@@ -488,93 +380,109 @@ var recompileAll = /* @__PURE__ */ __name(async ({ jobs, verbose, target, increm
|
|
|
488
380
|
]
|
|
489
381
|
]
|
|
490
382
|
]);
|
|
491
|
-
console.log(
|
|
383
|
+
console.log(
|
|
384
|
+
`${chalk8.gray("Recompiled in")} [${chalk8.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk8.gray("seconds")}`
|
|
385
|
+
);
|
|
492
386
|
return result;
|
|
493
|
-
}
|
|
387
|
+
};
|
|
494
388
|
|
|
495
389
|
// src/xy/xyBuildCommands.ts
|
|
496
|
-
var xyBuildCommands =
|
|
497
|
-
return args.command(
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
390
|
+
var xyBuildCommands = (args) => {
|
|
391
|
+
return args.command(
|
|
392
|
+
"build [package]",
|
|
393
|
+
"Build - Compile & Lint",
|
|
394
|
+
(yargs) => {
|
|
395
|
+
return yargs.positional("package", { describe: "Specific package to build" });
|
|
396
|
+
},
|
|
397
|
+
async (argv) => {
|
|
398
|
+
if (argv.verbose) {
|
|
399
|
+
console.log(`Building: ${argv.package ?? "all"}`);
|
|
400
|
+
}
|
|
401
|
+
process.exitCode = await build({
|
|
402
|
+
incremental: !!argv.incremental,
|
|
403
|
+
jobs: argv.jobs,
|
|
404
|
+
pkg: argv.package,
|
|
405
|
+
target: argv.target,
|
|
406
|
+
verbose: !!argv.verbose
|
|
407
|
+
});
|
|
504
408
|
}
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
409
|
+
).command(
|
|
410
|
+
"compile [package]",
|
|
411
|
+
"Compile with Typescript & Copy Images",
|
|
412
|
+
(yargs) => {
|
|
413
|
+
return yargs.positional("package", { describe: "Specific package to compile" });
|
|
414
|
+
},
|
|
415
|
+
(argv) => {
|
|
416
|
+
if (argv.verbose) {
|
|
417
|
+
console.log(`Compiling: ${argv.package ?? "all"}`);
|
|
418
|
+
}
|
|
419
|
+
process.exitCode = compile({
|
|
420
|
+
incremental: !!argv.incremental,
|
|
421
|
+
jobs: argv.jobs,
|
|
422
|
+
pkg: argv.package,
|
|
423
|
+
target: argv.target,
|
|
424
|
+
verbose: !!argv.verbose
|
|
425
|
+
});
|
|
519
426
|
}
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
427
|
+
).command(
|
|
428
|
+
"compile-only [package]",
|
|
429
|
+
"Compile with Typescript & Copy Images (No Publint)",
|
|
430
|
+
(yargs) => {
|
|
431
|
+
return yargs.positional("package", { describe: "Specific package to compile" });
|
|
432
|
+
},
|
|
433
|
+
(argv) => {
|
|
434
|
+
if (argv.verbose) {
|
|
435
|
+
console.log(`Compiling: ${argv.package ?? "all"}`);
|
|
436
|
+
}
|
|
437
|
+
process.exitCode = compile({
|
|
438
|
+
incremental: !!argv.incremental,
|
|
439
|
+
jobs: argv.jobs,
|
|
440
|
+
pkg: argv.package,
|
|
441
|
+
publint: false,
|
|
442
|
+
target: argv.target,
|
|
443
|
+
verbose: !!argv.verbose
|
|
444
|
+
});
|
|
534
445
|
}
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
446
|
+
).command(
|
|
447
|
+
"recompile [package]",
|
|
448
|
+
"Re-compile with Typescript & Copy Images",
|
|
449
|
+
(yargs) => {
|
|
450
|
+
return yargs.positional("package", { describe: "Specific package to re-compile" });
|
|
451
|
+
},
|
|
452
|
+
async (argv) => {
|
|
453
|
+
if (argv.verbose) {
|
|
454
|
+
console.log(`Re-compiling: ${argv.package ?? "all"}`);
|
|
455
|
+
}
|
|
456
|
+
process.exitCode = await recompile({
|
|
457
|
+
incremental: !!argv.incremental,
|
|
458
|
+
jobs: argv.jobs,
|
|
459
|
+
pkg: argv.package,
|
|
460
|
+
target: argv.target,
|
|
461
|
+
verbose: !!argv.verbose
|
|
462
|
+
});
|
|
550
463
|
}
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
process.exitCode = await copyAssets({
|
|
574
|
-
target: argv.target
|
|
575
|
-
});
|
|
576
|
-
});
|
|
577
|
-
}, "xyBuildCommands");
|
|
464
|
+
).command(
|
|
465
|
+
"rebuild [package]",
|
|
466
|
+
"Rebuild - Clean, Compile & Lint",
|
|
467
|
+
(yargs) => {
|
|
468
|
+
return yargs.positional("package", { describe: "Specific package to rebuild" });
|
|
469
|
+
},
|
|
470
|
+
(argv) => {
|
|
471
|
+
if (argv.verbose) console.log(`Rebuilding: ${argv.package ?? "all"}`);
|
|
472
|
+
process.exitCode = rebuild({ target: argv.target });
|
|
473
|
+
}
|
|
474
|
+
).command(
|
|
475
|
+
"copy-assets [package]",
|
|
476
|
+
"Copy Assets - Copy the assets from src to dist",
|
|
477
|
+
(yargs) => {
|
|
478
|
+
return yargs.positional("package", { describe: "Specific package to copy assets" });
|
|
479
|
+
},
|
|
480
|
+
async (argv) => {
|
|
481
|
+
if (argv.verbose) console.log(`Copying Assets: ${argv.package ?? "all"}`);
|
|
482
|
+
process.exitCode = await copyAssets({ target: argv.target });
|
|
483
|
+
}
|
|
484
|
+
);
|
|
485
|
+
};
|
|
578
486
|
export {
|
|
579
487
|
xyBuildCommands
|
|
580
488
|
};
|