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