@xylabs/ts-scripts-yarn3 3.15.16 → 4.0.0-rc.5
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/index.mjs +76 -275
- package/dist/actions/index.mjs.map +1 -1
- package/dist/actions/package/compile/compile.mjs +55 -254
- package/dist/actions/package/compile/compile.mjs.map +1 -1
- package/dist/actions/package/compile/index.mjs +55 -254
- package/dist/actions/package/compile/index.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTsc.mjs +1 -1
- package/dist/actions/package/compile/packageCompileTsc.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTscTypes.mjs +2 -36
- package/dist/actions/package/compile/packageCompileTscTypes.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTsup.mjs +53 -252
- package/dist/actions/package/compile/packageCompileTsup.mjs.map +1 -1
- package/dist/actions/package/index.mjs +69 -268
- package/dist/actions/package/index.mjs.map +1 -1
- package/dist/actions/package/recompile.mjs +55 -254
- package/dist/actions/package/recompile.mjs.map +1 -1
- package/dist/bin/package/compile-only.mjs +57 -256
- package/dist/bin/package/compile-only.mjs.map +1 -1
- package/dist/bin/package/compile-tsup.mjs +55 -254
- package/dist/bin/package/compile-tsup.mjs.map +1 -1
- package/dist/bin/package/compile.mjs +57 -256
- package/dist/bin/package/compile.mjs.map +1 -1
- package/dist/bin/package/recompile.mjs +57 -256
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/index.mjs +86 -285
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -19
- package/src/actions/package/compile/XyConfig.ts +2 -2
- package/src/actions/package/compile/packageCompileTsc.ts +1 -1
- package/src/actions/package/compile/packageCompileTscTypes.ts +3 -8
- package/src/actions/package/compile/packageCompileTsup.ts +52 -124
- package/tsup.config.ts +1 -1
- package/dist/actions/build.cjs +0 -208
- package/dist/actions/build.cjs.map +0 -1
- package/dist/actions/clean-docs.cjs +0 -74
- package/dist/actions/clean-docs.cjs.map +0 -1
- package/dist/actions/clean-eslint.cjs +0 -53
- package/dist/actions/clean-eslint.cjs.map +0 -1
- package/dist/actions/clean-jest.cjs +0 -147
- package/dist/actions/clean-jest.cjs.map +0 -1
- package/dist/actions/clean.cjs +0 -192
- package/dist/actions/clean.cjs.map +0 -1
- package/dist/actions/compile.cjs +0 -217
- package/dist/actions/compile.cjs.map +0 -1
- package/dist/actions/copy-assets.cjs +0 -121
- package/dist/actions/copy-assets.cjs.map +0 -1
- package/dist/actions/cycle.cjs +0 -156
- package/dist/actions/cycle.cjs.map +0 -1
- package/dist/actions/dead.cjs +0 -148
- package/dist/actions/dead.cjs.map +0 -1
- package/dist/actions/deploy-major.cjs +0 -160
- package/dist/actions/deploy-major.cjs.map +0 -1
- package/dist/actions/deploy-minor.cjs +0 -160
- package/dist/actions/deploy-minor.cjs.map +0 -1
- package/dist/actions/deploy-next.cjs +0 -160
- package/dist/actions/deploy-next.cjs.map +0 -1
- package/dist/actions/deploy.cjs +0 -160
- package/dist/actions/deploy.cjs.map +0 -1
- package/dist/actions/deps.cjs +0 -205
- package/dist/actions/deps.cjs.map +0 -1
- package/dist/actions/dupdeps.cjs +0 -226
- package/dist/actions/dupdeps.cjs.map +0 -1
- package/dist/actions/fix.cjs +0 -149
- package/dist/actions/fix.cjs.map +0 -1
- package/dist/actions/gen-docs.cjs +0 -186
- package/dist/actions/gen-docs.cjs.map +0 -1
- package/dist/actions/gitignore-gen.cjs +0 -138
- package/dist/actions/gitignore-gen.cjs.map +0 -1
- package/dist/actions/gitlint-fix.cjs +0 -69
- package/dist/actions/gitlint-fix.cjs.map +0 -1
- package/dist/actions/gitlint.cjs +0 -84
- package/dist/actions/gitlint.cjs.map +0 -1
- package/dist/actions/index.cjs +0 -2600
- package/dist/actions/index.cjs.map +0 -1
- package/dist/actions/license.cjs +0 -133
- package/dist/actions/license.cjs.map +0 -1
- package/dist/actions/lint-clean.cjs +0 -227
- package/dist/actions/lint-clean.cjs.map +0 -1
- package/dist/actions/lint-profile.cjs +0 -153
- package/dist/actions/lint-profile.cjs.map +0 -1
- package/dist/actions/lint.cjs +0 -217
- package/dist/actions/lint.cjs.map +0 -1
- package/dist/actions/npmignore-gen.cjs +0 -138
- package/dist/actions/npmignore-gen.cjs.map +0 -1
- package/dist/actions/package/clean-outputs.cjs +0 -56
- package/dist/actions/package/clean-outputs.cjs.map +0 -1
- package/dist/actions/package/clean-typescript.cjs +0 -56
- package/dist/actions/package/clean-typescript.cjs.map +0 -1
- package/dist/actions/package/clean.cjs +0 -83
- package/dist/actions/package/clean.cjs.map +0 -1
- package/dist/actions/package/compile/XyConfig.cjs +0 -19
- package/dist/actions/package/compile/XyConfig.cjs.map +0 -1
- package/dist/actions/package/compile/buildEntries.cjs +0 -68
- package/dist/actions/package/compile/buildEntries.cjs.map +0 -1
- package/dist/actions/package/compile/compile.cjs +0 -565
- package/dist/actions/package/compile/compile.cjs.map +0 -1
- package/dist/actions/package/compile/copyTypeFiles.cjs +0 -60
- package/dist/actions/package/compile/copyTypeFiles.cjs.map +0 -1
- package/dist/actions/package/compile/getCompilerOptions.cjs +0 -67
- package/dist/actions/package/compile/getCompilerOptions.cjs.map +0 -1
- package/dist/actions/package/compile/index.cjs +0 -571
- package/dist/actions/package/compile/index.cjs.map +0 -1
- package/dist/actions/package/compile/inputs.cjs +0 -79
- package/dist/actions/package/compile/inputs.cjs.map +0 -1
- package/dist/actions/package/compile/packageCompileTsc.cjs +0 -164
- package/dist/actions/package/compile/packageCompileTsc.cjs.map +0 -1
- package/dist/actions/package/compile/packageCompileTscTypes.cjs +0 -199
- package/dist/actions/package/compile/packageCompileTscTypes.cjs.map +0 -1
- package/dist/actions/package/compile/packageCompileTsup.cjs +0 -521
- package/dist/actions/package/compile/packageCompileTsup.cjs.map +0 -1
- package/dist/actions/package/copy-assets.cjs +0 -88
- package/dist/actions/package/copy-assets.cjs.map +0 -1
- package/dist/actions/package/deps.cjs +0 -214
- package/dist/actions/package/deps.cjs.map +0 -1
- package/dist/actions/package/gen-docs.cjs +0 -148
- package/dist/actions/package/gen-docs.cjs.map +0 -1
- package/dist/actions/package/index.cjs +0 -968
- package/dist/actions/package/index.cjs.map +0 -1
- package/dist/actions/package/publint.cjs +0 -80
- package/dist/actions/package/publint.cjs.map +0 -1
- package/dist/actions/package/recompile.cjs +0 -617
- package/dist/actions/package/recompile.cjs.map +0 -1
- package/dist/actions/publint.cjs +0 -237
- package/dist/actions/publint.cjs.map +0 -1
- package/dist/actions/rebuild.cjs +0 -148
- package/dist/actions/rebuild.cjs.map +0 -1
- package/dist/actions/recompile.cjs +0 -232
- package/dist/actions/recompile.cjs.map +0 -1
- package/dist/actions/reinstall.cjs +0 -183
- package/dist/actions/reinstall.cjs.map +0 -1
- package/dist/actions/relint.cjs +0 -185
- package/dist/actions/relint.cjs.map +0 -1
- package/dist/actions/retest.cjs +0 -154
- package/dist/actions/retest.cjs.map +0 -1
- package/dist/actions/sonar.cjs +0 -149
- package/dist/actions/sonar.cjs.map +0 -1
- package/dist/actions/statics.cjs +0 -234
- package/dist/actions/statics.cjs.map +0 -1
- package/dist/actions/test.cjs +0 -147
- package/dist/actions/test.cjs.map +0 -1
- package/dist/actions/up.cjs +0 -144
- package/dist/actions/up.cjs.map +0 -1
- package/dist/actions/updo.cjs +0 -152
- package/dist/actions/updo.cjs.map +0 -1
- package/dist/actions/upplug.cjs +0 -172
- package/dist/actions/upplug.cjs.map +0 -1
- package/dist/actions/upyarn.cjs +0 -148
- package/dist/actions/upyarn.cjs.map +0 -1
- package/dist/actions/yarn3only.cjs +0 -106
- package/dist/actions/yarn3only.cjs.map +0 -1
- package/dist/bin/build.cjs +0 -39
- package/dist/bin/build.cjs.map +0 -1
- package/dist/bin/clean.cjs +0 -39
- package/dist/bin/clean.cjs.map +0 -1
- package/dist/bin/compile-only.cjs +0 -39
- package/dist/bin/compile-only.cjs.map +0 -1
- package/dist/bin/compile.cjs +0 -39
- package/dist/bin/compile.cjs.map +0 -1
- package/dist/bin/cycle.cjs +0 -39
- package/dist/bin/cycle.cjs.map +0 -1
- package/dist/bin/dead.cjs +0 -39
- package/dist/bin/dead.cjs.map +0 -1
- package/dist/bin/deploy-major.cjs +0 -39
- package/dist/bin/deploy-major.cjs.map +0 -1
- package/dist/bin/deploy-minor.cjs +0 -39
- package/dist/bin/deploy-minor.cjs.map +0 -1
- package/dist/bin/deploy-next.cjs +0 -39
- package/dist/bin/deploy-next.cjs.map +0 -1
- package/dist/bin/deploy.cjs +0 -39
- package/dist/bin/deploy.cjs.map +0 -1
- package/dist/bin/deps.cjs +0 -39
- package/dist/bin/deps.cjs.map +0 -1
- package/dist/bin/fix.cjs +0 -39
- package/dist/bin/fix.cjs.map +0 -1
- package/dist/bin/gen-docs.cjs +0 -39
- package/dist/bin/gen-docs.cjs.map +0 -1
- package/dist/bin/gitlint-fix.cjs +0 -39
- package/dist/bin/gitlint-fix.cjs.map +0 -1
- package/dist/bin/gitlint.cjs +0 -39
- package/dist/bin/gitlint.cjs.map +0 -1
- package/dist/bin/license.cjs +0 -39
- package/dist/bin/license.cjs.map +0 -1
- package/dist/bin/lint-clean.cjs +0 -39
- package/dist/bin/lint-clean.cjs.map +0 -1
- package/dist/bin/lint-fast.cjs +0 -39
- package/dist/bin/lint-fast.cjs.map +0 -1
- package/dist/bin/lint-profile.cjs +0 -39
- package/dist/bin/lint-profile.cjs.map +0 -1
- package/dist/bin/lint.cjs +0 -39
- package/dist/bin/lint.cjs.map +0 -1
- package/dist/bin/package/clean-outputs.cjs +0 -51
- package/dist/bin/package/clean-outputs.cjs.map +0 -1
- package/dist/bin/package/clean-typescript.cjs +0 -51
- package/dist/bin/package/clean-typescript.cjs.map +0 -1
- package/dist/bin/package/clean.cjs +0 -76
- package/dist/bin/package/clean.cjs.map +0 -1
- package/dist/bin/package/compile-only.cjs +0 -564
- package/dist/bin/package/compile-only.cjs.map +0 -1
- package/dist/bin/package/compile-tsup.cjs +0 -519
- package/dist/bin/package/compile-tsup.cjs.map +0 -1
- package/dist/bin/package/compile.cjs +0 -567
- package/dist/bin/package/compile.cjs.map +0 -1
- package/dist/bin/package/copy-assets-cjs.cjs +0 -86
- package/dist/bin/package/copy-assets-cjs.cjs.map +0 -1
- package/dist/bin/package/copy-assets-esm.cjs +0 -86
- package/dist/bin/package/copy-assets-esm.cjs.map +0 -1
- package/dist/bin/package/deps.cjs +0 -208
- package/dist/bin/package/deps.cjs.map +0 -1
- package/dist/bin/package/gen-docs.cjs +0 -143
- package/dist/bin/package/gen-docs.cjs.map +0 -1
- package/dist/bin/package/publint.cjs +0 -77
- package/dist/bin/package/publint.cjs.map +0 -1
- package/dist/bin/package/recompile.cjs +0 -611
- package/dist/bin/package/recompile.cjs.map +0 -1
- package/dist/bin/publint.cjs +0 -39
- package/dist/bin/publint.cjs.map +0 -1
- package/dist/bin/rebuild.cjs +0 -39
- package/dist/bin/rebuild.cjs.map +0 -1
- package/dist/bin/recompile.cjs +0 -39
- package/dist/bin/recompile.cjs.map +0 -1
- package/dist/bin/reinstall.cjs +0 -39
- package/dist/bin/reinstall.cjs.map +0 -1
- package/dist/bin/relint.cjs +0 -39
- package/dist/bin/relint.cjs.map +0 -1
- package/dist/bin/sonar.cjs +0 -39
- package/dist/bin/sonar.cjs.map +0 -1
- package/dist/bin/test.cjs +0 -39
- package/dist/bin/test.cjs.map +0 -1
- package/dist/bin/up.cjs +0 -39
- package/dist/bin/up.cjs.map +0 -1
- package/dist/bin/updo.cjs +0 -39
- package/dist/bin/updo.cjs.map +0 -1
- package/dist/bin/upplug.cjs +0 -39
- package/dist/bin/upplug.cjs.map +0 -1
- package/dist/bin/upyarn.cjs +0 -39
- package/dist/bin/upyarn.cjs.map +0 -1
- package/dist/bin/xy-ts.cjs +0 -1890
- package/dist/bin/xy-ts.cjs.map +0 -1
- package/dist/bin/xy.cjs +0 -1890
- package/dist/bin/xy.cjs.map +0 -1
- package/dist/bin/yarn3only.cjs +0 -39
- package/dist/bin/yarn3only.cjs.map +0 -1
- package/dist/index.cjs +0 -3129
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -359
- package/dist/lib/checkResult.cjs +0 -52
- package/dist/lib/checkResult.cjs.map +0 -1
- package/dist/lib/createBuildConfig.cjs +0 -93
- package/dist/lib/createBuildConfig.cjs.map +0 -1
- package/dist/lib/defaultBuildConfig.cjs +0 -52
- package/dist/lib/defaultBuildConfig.cjs.map +0 -1
- package/dist/lib/dependencies/DuplicateDetector.cjs +0 -124
- package/dist/lib/dependencies/DuplicateDetector.cjs.map +0 -1
- package/dist/lib/dependencies/detectDuplicateDependencies.cjs +0 -207
- package/dist/lib/dependencies/detectDuplicateDependencies.cjs.map +0 -1
- package/dist/lib/dependencies/index.cjs +0 -211
- package/dist/lib/dependencies/index.cjs.map +0 -1
- package/dist/lib/file/ReadFileSyncOptions.cjs +0 -33
- package/dist/lib/file/ReadFileSyncOptions.cjs.map +0 -1
- package/dist/lib/file/constants.cjs +0 -34
- package/dist/lib/file/constants.cjs.map +0 -1
- package/dist/lib/file/fileLines.cjs +0 -58
- package/dist/lib/file/fileLines.cjs.map +0 -1
- package/dist/lib/file/index.cjs +0 -74
- package/dist/lib/file/index.cjs.map +0 -1
- package/dist/lib/file/tryReadFileSync.cjs +0 -42
- package/dist/lib/file/tryReadFileSync.cjs.map +0 -1
- package/dist/lib/generateIgnoreFiles.cjs +0 -132
- package/dist/lib/generateIgnoreFiles.cjs.map +0 -1
- package/dist/lib/index.cjs +0 -614
- package/dist/lib/index.cjs.map +0 -1
- package/dist/lib/jsonFormatters.cjs +0 -37
- package/dist/lib/jsonFormatters.cjs.map +0 -1
- package/dist/lib/loadConfig.cjs +0 -59
- package/dist/lib/loadConfig.cjs.map +0 -1
- package/dist/lib/parsedPackageJSON.cjs +0 -37
- package/dist/lib/parsedPackageJSON.cjs.map +0 -1
- package/dist/lib/processEx.cjs +0 -72
- package/dist/lib/processEx.cjs.map +0 -1
- package/dist/lib/runSteps.cjs +0 -134
- package/dist/lib/runSteps.cjs.map +0 -1
- package/dist/lib/runStepsAsync.cjs +0 -147
- package/dist/lib/runStepsAsync.cjs.map +0 -1
- package/dist/lib/runXy.cjs +0 -150
- package/dist/lib/runXy.cjs.map +0 -1
- package/dist/lib/runXyWithWarning.cjs +0 -49
- package/dist/lib/runXyWithWarning.cjs.map +0 -1
- package/dist/lib/safeExit.cjs +0 -100
- package/dist/lib/safeExit.cjs.map +0 -1
- package/dist/lib/string/empty.cjs +0 -35
- package/dist/lib/string/empty.cjs.map +0 -1
- package/dist/lib/string/index.cjs +0 -45
- package/dist/lib/string/index.cjs.map +0 -1
- package/dist/lib/string/union.cjs +0 -35
- package/dist/lib/string/union.cjs.map +0 -1
- package/dist/lib/withErrnoException.cjs +0 -41
- package/dist/lib/withErrnoException.cjs.map +0 -1
- package/dist/lib/withError.cjs +0 -34
- package/dist/lib/withError.cjs.map +0 -1
- package/dist/lib/yarn/index.cjs +0 -93
- package/dist/lib/yarn/index.cjs.map +0 -1
- package/dist/lib/yarn/isYarnVersionOrGreater.cjs +0 -52
- package/dist/lib/yarn/isYarnVersionOrGreater.cjs.map +0 -1
- package/dist/lib/yarn/workspace/Workspace.cjs +0 -19
- package/dist/lib/yarn/workspace/Workspace.cjs.map +0 -1
- package/dist/lib/yarn/workspace/index.cjs +0 -60
- package/dist/lib/yarn/workspace/index.cjs.map +0 -1
- package/dist/lib/yarn/workspace/yarnWorkspace.cjs +0 -58
- package/dist/lib/yarn/workspace/yarnWorkspace.cjs.map +0 -1
- package/dist/lib/yarn/workspace/yarnWorkspaces.cjs +0 -49
- package/dist/lib/yarn/workspace/yarnWorkspaces.cjs.map +0 -1
- package/dist/lib/yarn/yarnInitCwd.cjs +0 -35
- package/dist/lib/yarn/yarnInitCwd.cjs.map +0 -1
- package/dist/loadPackageConfig.cjs +0 -39
- package/dist/loadPackageConfig.cjs.map +0 -1
- package/dist/types.d.cjs +0 -2
- package/dist/types.d.cjs.map +0 -1
- package/dist/xy/index.cjs +0 -1909
- package/dist/xy/index.cjs.map +0 -1
- package/dist/xy/param.cjs +0 -36
- package/dist/xy/param.cjs.map +0 -1
- package/dist/xy/xy.cjs +0 -1895
- package/dist/xy/xy.cjs.map +0 -1
- package/dist/xy/xyBuildCommands.cjs +0 -595
- package/dist/xy/xyBuildCommands.cjs.map +0 -1
- package/dist/xy/xyCommonCommands.cjs +0 -723
- package/dist/xy/xyCommonCommands.cjs.map +0 -1
- package/dist/xy/xyDeployCommands.cjs +0 -263
- package/dist/xy/xyDeployCommands.cjs.map +0 -1
- package/dist/xy/xyInstallCommands.cjs +0 -508
- package/dist/xy/xyInstallCommands.cjs.map +0 -1
- package/dist/xy/xyLintCommands.cjs +0 -466
- package/dist/xy/xyLintCommands.cjs.map +0 -1
- package/dist/xy/xyParseOptions.cjs +0 -84
- package/dist/xy/xyParseOptions.cjs.map +0 -1
package/dist/actions/upplug.cjs
DELETED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
|
-
var __export = (target, all) => {
|
|
10
|
-
for (var name in all)
|
|
11
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from))
|
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
-
|
|
31
|
-
// src/actions/upplug.ts
|
|
32
|
-
var upplug_exports = {};
|
|
33
|
-
__export(upplug_exports, {
|
|
34
|
-
updateYarnPlugins: () => updateYarnPlugins
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(upplug_exports);
|
|
37
|
-
|
|
38
|
-
// src/lib/checkResult.ts
|
|
39
|
-
var import_chalk = __toESM(require("chalk"), 1);
|
|
40
|
-
var checkResult = /* @__PURE__ */ __name((name, result, level = "error", exitOnFail = false) => {
|
|
41
|
-
if (result) {
|
|
42
|
-
const exiting = exitOnFail ? "[Exiting Process]" : "[Continuing]";
|
|
43
|
-
const chalkFunc = level === "error" ? import_chalk.default.red : import_chalk.default.yellow;
|
|
44
|
-
console[level](chalkFunc(`${name} had ${result} failures ${exiting}`));
|
|
45
|
-
if (exitOnFail) {
|
|
46
|
-
process.exit(result);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}, "checkResult");
|
|
50
|
-
|
|
51
|
-
// src/lib/processEx.ts
|
|
52
|
-
var import_chalk2 = __toESM(require("chalk"), 1);
|
|
53
|
-
|
|
54
|
-
// src/lib/withError.ts
|
|
55
|
-
var withError = /* @__PURE__ */ __name((ex, closure, predicate = (ex2) => ex2.name !== void 0 && ex2.message !== void 0) => {
|
|
56
|
-
return predicate(ex) ? closure(ex) : void 0;
|
|
57
|
-
}, "withError");
|
|
58
|
-
|
|
59
|
-
// src/lib/withErrnoException.ts
|
|
60
|
-
var withErrnoException = /* @__PURE__ */ __name((ex, closure) => {
|
|
61
|
-
return withError(ex, closure, (ex2) => ex2.errno !== void 0);
|
|
62
|
-
}, "withErrnoException");
|
|
63
|
-
|
|
64
|
-
// src/lib/processEx.ts
|
|
65
|
-
var processEx = /* @__PURE__ */ __name((ex) => {
|
|
66
|
-
const error = typeof ex === "string" ? new Error(ex) : ex;
|
|
67
|
-
const exitCode = withErrnoException(error, (error2) => {
|
|
68
|
-
if (error2.code === "ENOENT") {
|
|
69
|
-
console.error(import_chalk2.default.red(`'${error2.path}' not found.`));
|
|
70
|
-
} else {
|
|
71
|
-
console.error(import_chalk2.default.red(`Errno: ${error2.code}`));
|
|
72
|
-
}
|
|
73
|
-
return error2.errno ?? -1;
|
|
74
|
-
}) ?? withError(error, (error2) => {
|
|
75
|
-
console.error(import_chalk2.default.red(`${error2.name}: ${error2.message}`));
|
|
76
|
-
return -1;
|
|
77
|
-
}) ?? (() => {
|
|
78
|
-
console.error(import_chalk2.default.red(`Unexpected Error: ${JSON.stringify(ex, null, 2)}`));
|
|
79
|
-
return -1;
|
|
80
|
-
})();
|
|
81
|
-
process.exit(process.exitCode ?? exitCode);
|
|
82
|
-
}, "processEx");
|
|
83
|
-
|
|
84
|
-
// src/lib/safeExit.ts
|
|
85
|
-
var safeExit = /* @__PURE__ */ __name((func, exitOnFail = true) => {
|
|
86
|
-
try {
|
|
87
|
-
const result = func();
|
|
88
|
-
if (result && exitOnFail) {
|
|
89
|
-
process.exit(result);
|
|
90
|
-
}
|
|
91
|
-
return result;
|
|
92
|
-
} catch (ex) {
|
|
93
|
-
return processEx(ex);
|
|
94
|
-
}
|
|
95
|
-
}, "safeExit");
|
|
96
|
-
|
|
97
|
-
// src/lib/runSteps.ts
|
|
98
|
-
var import_node_child_process = require("child_process");
|
|
99
|
-
var import_node_fs = require("fs");
|
|
100
|
-
var import_chalk3 = __toESM(require("chalk"), 1);
|
|
101
|
-
var runSteps = /* @__PURE__ */ __name((name, steps, exitOnFail = true, messages) => {
|
|
102
|
-
return safeExit(() => {
|
|
103
|
-
const pkgName = process.env.npm_package_name;
|
|
104
|
-
console.log(import_chalk3.default.green(`${name} [${pkgName}]`));
|
|
105
|
-
let totalStatus = 0;
|
|
106
|
-
for (const [i, [command, args, config]] of steps.entries()) {
|
|
107
|
-
if (messages?.[i]) {
|
|
108
|
-
console.log(import_chalk3.default.gray(messages?.[i]));
|
|
109
|
-
}
|
|
110
|
-
const argList = Array.isArray(args) ? args : args.split(" ");
|
|
111
|
-
if (command === "node" && !(0, import_node_fs.existsSync)(argList[0])) {
|
|
112
|
-
throw new Error(`File not found [${argList[0]}]`);
|
|
113
|
-
}
|
|
114
|
-
const status = (0, import_node_child_process.spawnSync)(command, Array.isArray(args) ? args : args.split(" "), {
|
|
115
|
-
...config,
|
|
116
|
-
encoding: "utf8",
|
|
117
|
-
env: {
|
|
118
|
-
FORCE_COLOR: "3",
|
|
119
|
-
...process.env
|
|
120
|
-
},
|
|
121
|
-
shell: true,
|
|
122
|
-
stdio: "inherit"
|
|
123
|
-
}).status ?? 0;
|
|
124
|
-
checkResult(name, status, "error", exitOnFail);
|
|
125
|
-
totalStatus += status ?? 0;
|
|
126
|
-
}
|
|
127
|
-
return totalStatus;
|
|
128
|
-
}, !!exitOnFail);
|
|
129
|
-
}, "runSteps");
|
|
130
|
-
|
|
131
|
-
// src/actions/upplug.ts
|
|
132
|
-
var updateYarnPlugins = /* @__PURE__ */ __name(() => {
|
|
133
|
-
return runSteps("Update Yarn Plugins", [
|
|
134
|
-
[
|
|
135
|
-
"yarn",
|
|
136
|
-
[
|
|
137
|
-
"plugin",
|
|
138
|
-
"import",
|
|
139
|
-
"https://mskelton.dev/yarn-outdated/v3"
|
|
140
|
-
]
|
|
141
|
-
],
|
|
142
|
-
[
|
|
143
|
-
"yarn",
|
|
144
|
-
[
|
|
145
|
-
"plugin",
|
|
146
|
-
"import",
|
|
147
|
-
"version"
|
|
148
|
-
]
|
|
149
|
-
],
|
|
150
|
-
[
|
|
151
|
-
"yarn",
|
|
152
|
-
[
|
|
153
|
-
"plugin",
|
|
154
|
-
"import",
|
|
155
|
-
"interactive-tools"
|
|
156
|
-
]
|
|
157
|
-
],
|
|
158
|
-
[
|
|
159
|
-
"yarn",
|
|
160
|
-
[
|
|
161
|
-
"plugin",
|
|
162
|
-
"import",
|
|
163
|
-
"workspace-tools"
|
|
164
|
-
]
|
|
165
|
-
]
|
|
166
|
-
]);
|
|
167
|
-
}, "updateYarnPlugins");
|
|
168
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
169
|
-
0 && (module.exports = {
|
|
170
|
-
updateYarnPlugins
|
|
171
|
-
});
|
|
172
|
-
//# sourceMappingURL=upplug.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/actions/upplug.ts","../../src/lib/checkResult.ts","../../src/lib/processEx.ts","../../src/lib/withError.ts","../../src/lib/withErrnoException.ts","../../src/lib/safeExit.ts","../../src/lib/runSteps.ts"],"sourcesContent":["import { runSteps } from '../lib/index.ts'\n\nexport const updateYarnPlugins = () => {\n return runSteps('Update Yarn Plugins', [\n ['yarn', ['plugin', 'import', 'https://mskelton.dev/yarn-outdated/v3']],\n ['yarn', ['plugin', 'import', 'version']],\n ['yarn', ['plugin', 'import', 'interactive-tools']],\n ['yarn', ['plugin', 'import', 'workspace-tools']],\n ])\n}\n","import chalk from 'chalk'\n\nexport const checkResult = (name: string, result: number, level: 'error' | 'warn' = 'error', exitOnFail = false) => {\n if (result) {\n const exiting = exitOnFail ? '[Exiting Process]' : '[Continuing]'\n const chalkFunc = level === 'error' ? chalk.red : chalk.yellow\n console[level](chalkFunc(`${name} had ${result} failures ${exiting}`))\n if (exitOnFail) {\n process.exit(result)\n }\n }\n}\n","import chalk from 'chalk'\n\nimport { withErrnoException } from './withErrnoException.ts'\nimport { withError } from './withError.ts'\n\nexport const processEx = (ex: unknown) => {\n const error = typeof ex === 'string' ? new Error(ex) : ex\n const exitCode\n = withErrnoException(error, (error) => {\n if (error.code === 'ENOENT') {\n console.error(chalk.red(`'${error.path}' not found.`))\n } else {\n console.error(chalk.red(`Errno: ${error.code}`))\n }\n return error.errno ?? -1\n })\n ?? withError(error, (error) => {\n console.error(chalk.red(`${error.name}: ${error.message}`))\n return -1\n })\n ?? (() => {\n console.error(chalk.red(`Unexpected Error: ${JSON.stringify(ex, null, 2)}`))\n return -1\n })()\n // This allows us to use a previously set exit code\n process.exit(process.exitCode ?? exitCode)\n}\n","export const withError = <T extends Error = Error>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ex: any,\n closure: (error: T) => number,\n predicate = (ex: T) => ex.name !== undefined && ex.message !== undefined,\n) => {\n return predicate(ex as T) ? closure(ex as T) : undefined\n}\n","import { withError } from './withError.ts'\n\nexport const withErrnoException = <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(ex: unknown, closure: (error: T) => number) => {\n return withError<T>(ex, closure, (ex: unknown) => (ex as NodeJS.ErrnoException).errno !== undefined)\n}\n","/** Catch child process a crash and returns the code */\n\nimport { processEx } from './processEx.ts'\n\nconst safeExit = (func: () => number, exitOnFail = true): number => {\n try {\n const result = func()\n if (result && exitOnFail) {\n process.exit(result)\n }\n return result\n } catch (ex) {\n return processEx(ex)\n }\n}\n\nconst safeExitAsync = async (func: () => Promise<number>, exitOnFail = true): Promise<number> => {\n try {\n const result = await func()\n if (result && exitOnFail) {\n process.exit(result)\n }\n return result\n } catch (ex) {\n return processEx(ex)\n }\n}\n\nexport { safeExit, safeExitAsync }\n","import { spawnSync, SpawnSyncOptionsWithBufferEncoding } from 'node:child_process'\nimport { existsSync } from 'node:fs'\n\nimport chalk from 'chalk'\n\nimport { checkResult } from './checkResult.ts'\nimport { safeExit } from './safeExit.ts'\n\nexport type ScriptStep =\n | [/* command */ 'yarn' | 'node' | 'ts-node-script' | 'tsc' | 'jest', /* arg */ string | string[]]\n | [/* command */ string, /* arg */ string | string[], /* config */ SpawnSyncOptionsWithBufferEncoding]\n\nexport const runSteps = (name: string, steps: ScriptStep[], exitOnFail = true, messages?: string[]): number => {\n return safeExit(() => {\n const pkgName = process.env.npm_package_name\n console.log(chalk.green(`${name} [${pkgName}]`))\n let totalStatus = 0\n for (const [i, [command, args, config]] of steps.entries()) {\n if (messages?.[i]) {\n console.log(chalk.gray(messages?.[i]))\n }\n const argList = Array.isArray(args) ? args : args.split(' ')\n if (command === 'node' && !existsSync(argList[0])) {\n throw new Error(`File not found [${argList[0]}]`)\n }\n const status\n = spawnSync(command, Array.isArray(args) ? args : args.split(' '), {\n ...config,\n encoding: 'utf8',\n env: { FORCE_COLOR: '3', ...process.env },\n shell: true,\n stdio: 'inherit',\n }).status ?? 0\n checkResult(name, status, 'error', exitOnFail)\n totalStatus += status ?? 0\n }\n return totalStatus\n }, !!exitOnFail)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;ACAA,mBAAkB;AAEX,IAAMA,cAAc,wBAACC,MAAcC,QAAgBC,QAA0B,SAASC,aAAa,UAAK;AAC7G,MAAIF,QAAQ;AACV,UAAMG,UAAUD,aAAa,sBAAsB;AACnD,UAAME,YAAYH,UAAU,UAAUI,aAAAA,QAAMC,MAAMD,aAAAA,QAAME;AACxDC,YAAQP,KAAAA,EAAOG,UAAU,GAAGL,IAAAA,QAAYC,MAAAA,aAAmBG,OAAAA,EAAS,CAAA;AACpE,QAAID,YAAY;AACdO,cAAQC,KAAKV,MAAAA;IACf;EACF;AACF,GAT2B;;;ACF3B,IAAAW,gBAAkB;;;ACAX,IAAMC,YAAY,wBAEvBC,IACAC,SACAC,YAAY,CAACF,QAAUA,IAAGG,SAASC,UAAaJ,IAAGK,YAAYD,WAAS;AAExE,SAAOF,UAAUF,EAAAA,IAAWC,QAAQD,EAAAA,IAAWI;AACjD,GAPyB;;;ACElB,IAAME,qBAAqB,w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QC,IAAIC;AAC5BC,YAAQC,IAAIC,cAAAA,QAAMC,MAAM,GAAGZ,IAAAA,KAASK,OAAAA,GAAU,CAAA;AAC9C,QAAIQ,cAAc;AAClB,eAAW,CAACC,GAAG,CAACC,SAASC,MAAMC,MAAAA,CAAO,KAAKhB,MAAMiB,QAAO,GAAI;AAC1D,UAAIf,WAAWW,CAAAA,GAAI;AACjBL,gBAAQC,IAAIC,cAAAA,QAAMQ,KAAKhB,WAAWW,CAAAA,CAAE,CAAA;MACtC;AACA,YAAMM,UAAUC,MAAMC,QAAQN,IAAAA,IAAQA,OAAOA,KAAKO,MAAM,GAAA;AACxD,UAAIR,YAAY,UAAU,KAACS,2BAAWJ,QAAQ,CAAA,CAAE,GAAG;AACjD,cAAM,IAAIK,MAAM,mBAAmBL,QAAQ,CAAA,CAAE,GAAG;MAClD;AACA,YAAMM,aACFC,qCAAUZ,SAASM,MAAMC,QAAQN,IAAAA,IAAQA,OAAOA,KAAKO,MAAM,GAAA,GAAM;QACjE,GAAGN;QACHW,UAAU;QACVrB,KAAK;UAAEsB,aAAa;UAAK,GAAGvB,QAAQC;QAAI;QACxCuB,OAAO;QACPC,OAAO;MACT,CAAA,EAAGL,UAAU;AACfM,kBAAYhC,MAAM0B,QAAQ,SAASxB,UAAAA;AACnCW,qBAAea,UAAU;IAC3B;AACA,WAAOb;EACT,GAAG,CAAC,CAACX,UAAAA;AACP,GA1BwB;;;ANVjB,IAAM+B,oBAAoB,6BAAA;AAC/B,SAAOC,SAAS,uBAAuB;IACrC;MAAC;MAAQ;QAAC;QAAU;QAAU;;;IAC9B;MAAC;MAAQ;QAAC;QAAU;QAAU;;;IAC9B;MAAC;MAAQ;QAAC;QAAU;QAAU;;;IAC9B;MAAC;MAAQ;QAAC;QAAU;QAAU;;;GAC/B;AACH,GAPiC;","names":["checkResult","name","result","level","exitOnFail","exiting","chalkFunc","chalk","red","yellow","console","process","exit","import_chalk","withError","ex","closure","predicate","name","undefined","message","withErrnoException","ex","closure","withError","errno","undefined","processEx","ex","error","Error","exitCode","withErrnoException","code","console","chalk","red","path","errno","withError","name","message","JSON","stringify","process","exit","safeExit","func","exitOnFail","result","process","exit","ex","processEx","import_chalk","runSteps","name","steps","exitOnFail","messages","safeExit","pkgName","process","env","npm_package_name","console","log","chalk","green","totalStatus","i","command","args","config","entries","gray","argList","Array","isArray","split","existsSync","Error","status","spawnSync","encoding","FORCE_COLOR","shell","stdio","checkResult","updateYarnPlugins","runSteps"]}
|
package/dist/actions/upyarn.cjs
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
|
-
var __export = (target, all) => {
|
|
10
|
-
for (var name in all)
|
|
11
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from))
|
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
-
|
|
31
|
-
// src/actions/upyarn.ts
|
|
32
|
-
var upyarn_exports = {};
|
|
33
|
-
__export(upyarn_exports, {
|
|
34
|
-
updateYarnVersion: () => updateYarnVersion
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(upyarn_exports);
|
|
37
|
-
|
|
38
|
-
// src/lib/checkResult.ts
|
|
39
|
-
var import_chalk = __toESM(require("chalk"), 1);
|
|
40
|
-
var checkResult = /* @__PURE__ */ __name((name, result, level = "error", exitOnFail = false) => {
|
|
41
|
-
if (result) {
|
|
42
|
-
const exiting = exitOnFail ? "[Exiting Process]" : "[Continuing]";
|
|
43
|
-
const chalkFunc = level === "error" ? import_chalk.default.red : import_chalk.default.yellow;
|
|
44
|
-
console[level](chalkFunc(`${name} had ${result} failures ${exiting}`));
|
|
45
|
-
if (exitOnFail) {
|
|
46
|
-
process.exit(result);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}, "checkResult");
|
|
50
|
-
|
|
51
|
-
// src/lib/processEx.ts
|
|
52
|
-
var import_chalk2 = __toESM(require("chalk"), 1);
|
|
53
|
-
|
|
54
|
-
// src/lib/withError.ts
|
|
55
|
-
var withError = /* @__PURE__ */ __name((ex, closure, predicate = (ex2) => ex2.name !== void 0 && ex2.message !== void 0) => {
|
|
56
|
-
return predicate(ex) ? closure(ex) : void 0;
|
|
57
|
-
}, "withError");
|
|
58
|
-
|
|
59
|
-
// src/lib/withErrnoException.ts
|
|
60
|
-
var withErrnoException = /* @__PURE__ */ __name((ex, closure) => {
|
|
61
|
-
return withError(ex, closure, (ex2) => ex2.errno !== void 0);
|
|
62
|
-
}, "withErrnoException");
|
|
63
|
-
|
|
64
|
-
// src/lib/processEx.ts
|
|
65
|
-
var processEx = /* @__PURE__ */ __name((ex) => {
|
|
66
|
-
const error = typeof ex === "string" ? new Error(ex) : ex;
|
|
67
|
-
const exitCode = withErrnoException(error, (error2) => {
|
|
68
|
-
if (error2.code === "ENOENT") {
|
|
69
|
-
console.error(import_chalk2.default.red(`'${error2.path}' not found.`));
|
|
70
|
-
} else {
|
|
71
|
-
console.error(import_chalk2.default.red(`Errno: ${error2.code}`));
|
|
72
|
-
}
|
|
73
|
-
return error2.errno ?? -1;
|
|
74
|
-
}) ?? withError(error, (error2) => {
|
|
75
|
-
console.error(import_chalk2.default.red(`${error2.name}: ${error2.message}`));
|
|
76
|
-
return -1;
|
|
77
|
-
}) ?? (() => {
|
|
78
|
-
console.error(import_chalk2.default.red(`Unexpected Error: ${JSON.stringify(ex, null, 2)}`));
|
|
79
|
-
return -1;
|
|
80
|
-
})();
|
|
81
|
-
process.exit(process.exitCode ?? exitCode);
|
|
82
|
-
}, "processEx");
|
|
83
|
-
|
|
84
|
-
// src/lib/safeExit.ts
|
|
85
|
-
var safeExit = /* @__PURE__ */ __name((func, exitOnFail = true) => {
|
|
86
|
-
try {
|
|
87
|
-
const result = func();
|
|
88
|
-
if (result && exitOnFail) {
|
|
89
|
-
process.exit(result);
|
|
90
|
-
}
|
|
91
|
-
return result;
|
|
92
|
-
} catch (ex) {
|
|
93
|
-
return processEx(ex);
|
|
94
|
-
}
|
|
95
|
-
}, "safeExit");
|
|
96
|
-
|
|
97
|
-
// src/lib/runSteps.ts
|
|
98
|
-
var import_node_child_process = require("child_process");
|
|
99
|
-
var import_node_fs = require("fs");
|
|
100
|
-
var import_chalk3 = __toESM(require("chalk"), 1);
|
|
101
|
-
var runSteps = /* @__PURE__ */ __name((name, steps, exitOnFail = true, messages) => {
|
|
102
|
-
return safeExit(() => {
|
|
103
|
-
const pkgName = process.env.npm_package_name;
|
|
104
|
-
console.log(import_chalk3.default.green(`${name} [${pkgName}]`));
|
|
105
|
-
let totalStatus = 0;
|
|
106
|
-
for (const [i, [command, args, config]] of steps.entries()) {
|
|
107
|
-
if (messages?.[i]) {
|
|
108
|
-
console.log(import_chalk3.default.gray(messages?.[i]));
|
|
109
|
-
}
|
|
110
|
-
const argList = Array.isArray(args) ? args : args.split(" ");
|
|
111
|
-
if (command === "node" && !(0, import_node_fs.existsSync)(argList[0])) {
|
|
112
|
-
throw new Error(`File not found [${argList[0]}]`);
|
|
113
|
-
}
|
|
114
|
-
const status = (0, import_node_child_process.spawnSync)(command, Array.isArray(args) ? args : args.split(" "), {
|
|
115
|
-
...config,
|
|
116
|
-
encoding: "utf8",
|
|
117
|
-
env: {
|
|
118
|
-
FORCE_COLOR: "3",
|
|
119
|
-
...process.env
|
|
120
|
-
},
|
|
121
|
-
shell: true,
|
|
122
|
-
stdio: "inherit"
|
|
123
|
-
}).status ?? 0;
|
|
124
|
-
checkResult(name, status, "error", exitOnFail);
|
|
125
|
-
totalStatus += status ?? 0;
|
|
126
|
-
}
|
|
127
|
-
return totalStatus;
|
|
128
|
-
}, !!exitOnFail);
|
|
129
|
-
}, "runSteps");
|
|
130
|
-
|
|
131
|
-
// src/actions/upyarn.ts
|
|
132
|
-
var updateYarnVersion = /* @__PURE__ */ __name(() => {
|
|
133
|
-
return runSteps("Update Yarn Version", [
|
|
134
|
-
[
|
|
135
|
-
"yarn",
|
|
136
|
-
[
|
|
137
|
-
"set",
|
|
138
|
-
"version",
|
|
139
|
-
"latest"
|
|
140
|
-
]
|
|
141
|
-
]
|
|
142
|
-
]);
|
|
143
|
-
}, "updateYarnVersion");
|
|
144
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
145
|
-
0 && (module.exports = {
|
|
146
|
-
updateYarnVersion
|
|
147
|
-
});
|
|
148
|
-
//# sourceMappingURL=upyarn.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/actions/upyarn.ts","../../src/lib/checkResult.ts","../../src/lib/processEx.ts","../../src/lib/withError.ts","../../src/lib/withErrnoException.ts","../../src/lib/safeExit.ts","../../src/lib/runSteps.ts"],"sourcesContent":["import { runSteps } from '../lib/index.ts'\n\nexport const updateYarnVersion = () => {\n return runSteps('Update Yarn Version', [['yarn', ['set', 'version', 'latest']]])\n}\n","import chalk from 'chalk'\n\nexport const checkResult = (name: string, result: number, level: 'error' | 'warn' = 'error', exitOnFail = false) => {\n if (result) {\n const exiting = exitOnFail ? '[Exiting Process]' : '[Continuing]'\n const chalkFunc = level === 'error' ? chalk.red : chalk.yellow\n console[level](chalkFunc(`${name} had ${result} failures ${exiting}`))\n if (exitOnFail) {\n process.exit(result)\n }\n }\n}\n","import chalk from 'chalk'\n\nimport { withErrnoException } from './withErrnoException.ts'\nimport { withError } from './withError.ts'\n\nexport const processEx = (ex: unknown) => {\n const error = typeof ex === 'string' ? new Error(ex) : ex\n const exitCode\n = withErrnoException(error, (error) => {\n if (error.code === 'ENOENT') {\n console.error(chalk.red(`'${error.path}' not found.`))\n } else {\n console.error(chalk.red(`Errno: ${error.code}`))\n }\n return error.errno ?? -1\n })\n ?? withError(error, (error) => {\n console.error(chalk.red(`${error.name}: ${error.message}`))\n return -1\n })\n ?? (() => {\n console.error(chalk.red(`Unexpected Error: ${JSON.stringify(ex, null, 2)}`))\n return -1\n })()\n // This allows us to use a previously set exit code\n process.exit(process.exitCode ?? exitCode)\n}\n","export const withError = <T extends Error = Error>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ex: any,\n closure: (error: T) => number,\n predicate = (ex: T) => ex.name !== undefined && ex.message !== undefined,\n) => {\n return predicate(ex as T) ? closure(ex as T) : undefined\n}\n","import { withError } from './withError.ts'\n\nexport const withErrnoException = <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(ex: unknown, closure: (error: T) => number) => {\n return withError<T>(ex, closure, (ex: unknown) => (ex as NodeJS.ErrnoException).errno !== undefined)\n}\n","/** Catch child process a crash and returns the code */\n\nimport { processEx } from './processEx.ts'\n\nconst safeExit = (func: () => number, exitOnFail = true): number => {\n try {\n const result = func()\n if (result && exitOnFail) {\n process.exit(result)\n }\n return result\n } catch (ex) {\n return processEx(ex)\n }\n}\n\nconst safeExitAsync = async (func: () => Promise<number>, exitOnFail = true): Promise<number> => {\n try {\n const result = await func()\n if (result && exitOnFail) {\n process.exit(result)\n }\n return result\n } catch (ex) {\n return processEx(ex)\n }\n}\n\nexport { safeExit, safeExitAsync }\n","import { spawnSync, SpawnSyncOptionsWithBufferEncoding } from 'node:child_process'\nimport { existsSync } from 'node:fs'\n\nimport chalk from 'chalk'\n\nimport { checkResult } from './checkResult.ts'\nimport { safeExit } from './safeExit.ts'\n\nexport type ScriptStep =\n | [/* command */ 'yarn' | 'node' | 'ts-node-script' | 'tsc' | 'jest', /* arg */ string | string[]]\n | [/* command */ string, /* arg */ string | string[], /* config */ SpawnSyncOptionsWithBufferEncoding]\n\nexport const runSteps = (name: string, steps: ScriptStep[], exitOnFail = true, messages?: string[]): number => {\n return safeExit(() => {\n const pkgName = process.env.npm_package_name\n console.log(chalk.green(`${name} [${pkgName}]`))\n let totalStatus = 0\n for (const [i, [command, args, config]] of steps.entries()) {\n if (messages?.[i]) {\n console.log(chalk.gray(messages?.[i]))\n }\n const argList = Array.isArray(args) ? args : args.split(' ')\n if (command === 'node' && !existsSync(argList[0])) {\n throw new Error(`File not found [${argList[0]}]`)\n }\n const status\n = spawnSync(command, Array.isArray(args) ? args : args.split(' '), {\n ...config,\n encoding: 'utf8',\n env: { FORCE_COLOR: '3', ...process.env },\n shell: true,\n stdio: 'inherit',\n }).status ?? 0\n checkResult(name, status, 'error', exitOnFail)\n totalStatus += status ?? 0\n }\n return totalStatus\n }, !!exitOnFail)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;ACAA,mBAAkB;AAEX,IAAMA,cAAc,wBAACC,MAAcC,QAAgBC,QAA0B,SAASC,aAAa,UAAK;AAC7G,MAAIF,QAAQ;AACV,UA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kBAAYhC,MAAM0B,QAAQ,SAASxB,UAAAA;AACnCW,qBAAea,UAAU;IAC3B;AACA,WAAOb;EACT,GAAG,CAAC,CAACX,UAAAA;AACP,GA1BwB;;;ANVjB,IAAM+B,oBAAoB,6BAAA;AAC/B,SAAOC,SAAS,uBAAuB;IAAC;MAAC;MAAQ;QAAC;QAAO;QAAW;;;GAAW;AACjF,GAFiC;","names":["checkResult","name","result","level","exitOnFail","exiting","chalkFunc","chalk","red","yellow","console","process","exit","import_chalk","withError","ex","closure","predicate","name","undefined","message","withErrnoException","ex","closure","withError","errno","undefined","processEx","ex","error","Error","exitCode","withErrnoException","code","console","chalk","red","path","errno","withError","name","message","JSON","stringify","process","exit","safeExit","func","exitOnFail","result","process","exit","ex","processEx","import_chalk","runSteps","name","steps","exitOnFail","messages","safeExit","pkgName","process","env","npm_package_name","console","log","chalk","green","totalStatus","i","command","args","config","entries","gray","argList","Array","isArray","split","existsSync","Error","status","spawnSync","encoding","FORCE_COLOR","shell","stdio","checkResult","updateYarnVersion","runSteps"]}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
|
-
var __export = (target, all) => {
|
|
10
|
-
for (var name in all)
|
|
11
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
-
for (let key of __getOwnPropNames(from))
|
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
-
}
|
|
19
|
-
return to;
|
|
20
|
-
};
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
-
mod
|
|
28
|
-
));
|
|
29
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
-
|
|
31
|
-
// src/actions/yarn3only.ts
|
|
32
|
-
var yarn3only_exports = {};
|
|
33
|
-
__export(yarn3only_exports, {
|
|
34
|
-
yarn3Only: () => yarn3Only
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(yarn3only_exports);
|
|
37
|
-
|
|
38
|
-
// src/lib/processEx.ts
|
|
39
|
-
var import_chalk = __toESM(require("chalk"), 1);
|
|
40
|
-
|
|
41
|
-
// src/lib/withError.ts
|
|
42
|
-
var withError = /* @__PURE__ */ __name((ex, closure, predicate = (ex2) => ex2.name !== void 0 && ex2.message !== void 0) => {
|
|
43
|
-
return predicate(ex) ? closure(ex) : void 0;
|
|
44
|
-
}, "withError");
|
|
45
|
-
|
|
46
|
-
// src/lib/withErrnoException.ts
|
|
47
|
-
var withErrnoException = /* @__PURE__ */ __name((ex, closure) => {
|
|
48
|
-
return withError(ex, closure, (ex2) => ex2.errno !== void 0);
|
|
49
|
-
}, "withErrnoException");
|
|
50
|
-
|
|
51
|
-
// src/lib/processEx.ts
|
|
52
|
-
var processEx = /* @__PURE__ */ __name((ex) => {
|
|
53
|
-
const error = typeof ex === "string" ? new Error(ex) : ex;
|
|
54
|
-
const exitCode = withErrnoException(error, (error2) => {
|
|
55
|
-
if (error2.code === "ENOENT") {
|
|
56
|
-
console.error(import_chalk.default.red(`'${error2.path}' not found.`));
|
|
57
|
-
} else {
|
|
58
|
-
console.error(import_chalk.default.red(`Errno: ${error2.code}`));
|
|
59
|
-
}
|
|
60
|
-
return error2.errno ?? -1;
|
|
61
|
-
}) ?? withError(error, (error2) => {
|
|
62
|
-
console.error(import_chalk.default.red(`${error2.name}: ${error2.message}`));
|
|
63
|
-
return -1;
|
|
64
|
-
}) ?? (() => {
|
|
65
|
-
console.error(import_chalk.default.red(`Unexpected Error: ${JSON.stringify(ex, null, 2)}`));
|
|
66
|
-
return -1;
|
|
67
|
-
})();
|
|
68
|
-
process.exit(process.exitCode ?? exitCode);
|
|
69
|
-
}, "processEx");
|
|
70
|
-
|
|
71
|
-
// src/lib/yarn/isYarnVersionOrGreater.ts
|
|
72
|
-
var import_node_child_process = require("child_process");
|
|
73
|
-
var isYarnVersionOrGreater = /* @__PURE__ */ __name((major, minor, patch) => {
|
|
74
|
-
const result = (0, import_node_child_process.spawnSync)("yarn", [
|
|
75
|
-
"-v"
|
|
76
|
-
], {
|
|
77
|
-
encoding: "utf8",
|
|
78
|
-
shell: true
|
|
79
|
-
});
|
|
80
|
-
const version = result.stdout.toString().replaceAll("\n", "");
|
|
81
|
-
const versionNumbers = version.split(".").map((ver) => Number.parseInt(ver));
|
|
82
|
-
const majorDelta = versionNumbers[0] - major;
|
|
83
|
-
const minorDelta = versionNumbers[1] - (minor ?? versionNumbers[1]);
|
|
84
|
-
const patchDelta = versionNumbers[2] - (patch ?? versionNumbers[2]);
|
|
85
|
-
const majorOk = majorDelta >= 0;
|
|
86
|
-
const minorOk = majorDelta > 0 || minorDelta >= 0;
|
|
87
|
-
const patchOk = majorDelta > 0 || minorDelta > 0 || patchDelta >= 0;
|
|
88
|
-
return [
|
|
89
|
-
majorOk && minorOk && patchOk,
|
|
90
|
-
version
|
|
91
|
-
];
|
|
92
|
-
}, "isYarnVersionOrGreater");
|
|
93
|
-
|
|
94
|
-
// src/actions/yarn3only.ts
|
|
95
|
-
var yarn3Only = /* @__PURE__ */ __name(() => {
|
|
96
|
-
const [valid, version] = isYarnVersionOrGreater(3);
|
|
97
|
-
if (!valid) {
|
|
98
|
-
processEx(`Invalid Yarn version [${version}]`);
|
|
99
|
-
}
|
|
100
|
-
return 0;
|
|
101
|
-
}, "yarn3Only");
|
|
102
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
103
|
-
0 && (module.exports = {
|
|
104
|
-
yarn3Only
|
|
105
|
-
});
|
|
106
|
-
//# sourceMappingURL=yarn3only.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/actions/yarn3only.ts","../../src/lib/processEx.ts","../../src/lib/withError.ts","../../src/lib/withErrnoException.ts","../../src/lib/yarn/isYarnVersionOrGreater.ts"],"sourcesContent":["import { isYarnVersionOrGreater, processEx } from '../lib/index.ts'\n\nexport const yarn3Only = () => {\n const [valid, version] = isYarnVersionOrGreater(3)\n if (!valid) {\n processEx(`Invalid Yarn version [${version}]`)\n }\n return 0\n}\n","import chalk from 'chalk'\n\nimport { withErrnoException } from './withErrnoException.ts'\nimport { withError } from './withError.ts'\n\nexport const processEx = (ex: unknown) => {\n const error = typeof ex === 'string' ? new Error(ex) : ex\n const exitCode\n = withErrnoException(error, (error) => {\n if (error.code === 'ENOENT') {\n console.error(chalk.red(`'${error.path}' not found.`))\n } else {\n console.error(chalk.red(`Errno: ${error.code}`))\n }\n return error.errno ?? -1\n })\n ?? withError(error, (error) => {\n console.error(chalk.red(`${error.name}: ${error.message}`))\n return -1\n })\n ?? (() => {\n console.error(chalk.red(`Unexpected Error: ${JSON.stringify(ex, null, 2)}`))\n return -1\n })()\n // This allows us to use a previously set exit code\n process.exit(process.exitCode ?? exitCode)\n}\n","export const withError = <T extends Error = Error>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ex: any,\n closure: (error: T) => number,\n predicate = (ex: T) => ex.name !== undefined && ex.message !== undefined,\n) => {\n return predicate(ex as T) ? closure(ex as T) : undefined\n}\n","import { withError } from './withError.ts'\n\nexport const withErrnoException = <T extends NodeJS.ErrnoException = NodeJS.ErrnoException>(ex: unknown, closure: (error: T) => number) => {\n return withError<T>(ex, closure, (ex: unknown) => (ex as NodeJS.ErrnoException).errno !== undefined)\n}\n","import { spawnSync } from 'node:child_process'\n\nexport const isYarnVersionOrGreater = (major: number, minor?: number, patch?: number): [boolean, string] => {\n const result = spawnSync('yarn', ['-v'], { encoding: 'utf8', shell: true })\n const version = result.stdout.toString().replaceAll('\\n', '')\n const versionNumbers = version.split('.').map(ver => Number.parseInt(ver))\n const majorDelta = versionNumbers[0] - major\n const minorDelta = versionNumbers[1] - (minor ?? versionNumbers[1])\n const patchDelta = versionNumbers[2] - (patch ?? versionNumbers[2])\n\n const majorOk = majorDelta >= 0\n const minorOk = majorDelta > 0 || minorDelta >= 0\n const patchOk = majorDelta > 0 || minorDelta > 0 || patchDelta >= 0\n\n return [majorOk && minorOk && patchOk, version]\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;ACAA,mBAAkB;;;ACAX,IAAMA,YAAY,wBAEvBC,IACAC,SACAC,YAAY,CAACF,QAAUA,IAAGG,SAASC,UAAaJ,IAAGK,YAAYD,WAAS;AAExE,SAAOF,UAAUF,EAAAA,IAAWC,QAAQD,EAAAA,IAAWI;AACjD,GAPyB;;;ACElB,IAAME,qBAAqB,wBAA0DC,IAAaC,YAAAA;AACvG,SAAOC,UAAaF,IAAIC,SAAS,CAACD,QAAiBA,IAA6BG,UAAUC,MAAAA;AAC5F,GAFkC;;;AFG3B,IAAMC,YAAY,wBAACC,OAAAA;AACxB,QAAMC,QAAQ,OAAOD,OAAO,WAAW,IAAIE,MAAMF,EAAAA,IAAMA;AACvD,QAAMG,WACFC,mBAAmBH,OAAO,CAAC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AASf;;AACzC,GAbsC;;;AJA/B,IAAMgB,YAAY,6BAAA;AACvB,QAAM,CAACC,OAAOC,OAAAA,IAAWC,uBAAuB,CAAA;AAChD,MAAI,CAACF,OAAO;AACVG,cAAU,yBAAyBF,OAAAA,GAAU;EAC/C;AACA,SAAO;AACT,GANyB;","names":["withError","ex","closure","predicate","name","undefined","message","withErrnoException","ex","closure","withError","errno","undefined","processEx","ex","error","Error","exitCode","withErrnoException","code","console","chalk","red","path","errno","withError","name","message","JSON","stringify","process","exit","isYarnVersionOrGreater","major","minor","patch","result","spawnSync","encoding","shell","version","stdout","toString","replaceAll","versionNumbers","split","map","ver","Number","parseInt","majorDelta","minorDelta","patchDelta","majorOk","minorOk","patchOk","yarn3Only","valid","version","isYarnVersionOrGreater","processEx"]}
|
package/dist/bin/build.cjs
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
-
mod
|
|
25
|
-
));
|
|
26
|
-
|
|
27
|
-
// src/lib/runXyWithWarning.ts
|
|
28
|
-
var import_chalk = __toESM(require("chalk"), 1);
|
|
29
|
-
var runXyWithWarning = /* @__PURE__ */ __name((command) => {
|
|
30
|
-
const commandString = `yarn ${command}`;
|
|
31
|
-
const commandXyString = `yarn xy ${command}`;
|
|
32
|
-
console.warn(import_chalk.default.yellow(`WARNING: [${import_chalk.default.white(commandString)}] is deprecated for XY Labs Scripts.`));
|
|
33
|
-
console.warn(import_chalk.default.gray(`Did you mean [${import_chalk.default.magenta(commandXyString)}]?`));
|
|
34
|
-
return 1;
|
|
35
|
-
}, "runXyWithWarning");
|
|
36
|
-
|
|
37
|
-
// src/bin/build.ts
|
|
38
|
-
runXyWithWarning("build");
|
|
39
|
-
//# sourceMappingURL=build.cjs.map
|
package/dist/bin/build.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/runXyWithWarning.ts","../../src/bin/build.ts"],"sourcesContent":["import chalk from 'chalk'\n\nexport const runXyWithWarning = (command: string) => {\n const commandString = `yarn ${command}`\n const commandXyString = `yarn xy ${command}`\n console.warn(chalk.yellow(`WARNING: [${chalk.white(commandString)}] is deprecated for XY Labs Scripts.`))\n console.warn(chalk.gray(`Did you mean [${chalk.magenta(commandXyString)}]?`))\n return 1\n}\n","#!/usr/bin/env node\n\nimport { runXyWithWarning } from '../lib/index.ts'\n\nrunXyWithWarning('build')\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mBAAkB;AAEX,IAAMA,mBAAmB,wBAACC,YAAAA;AAC/B,QAAMC,gBAAgB,QAAQD,OAAAA;AAC9B,QAAME,kBAAkB,WAAWF,OAAAA;AACnCG,UAAQC,KAAKC,aAAAA,QAAMC,OAAO,aAAaD,aAAAA,QAAME,MAAMN,aAAAA,CAAAA,sCAAoD,CAAA;AACvGE,UAAQC,KAAKC,aAAAA,QAAMG,KAAK,iBAAiBH,aAAAA,QAAMI,QAAQP,eAAAA,CAAAA,IAAoB,CAAA;AAC3E,SAAO;AACT,GANgC;;;ACEhCQ,iBAAiB,OAAA;","names":["runXyWithWarning","command","commandString","commandXyString","console","warn","chalk","yellow","white","gray","magenta","runXyWithWarning"]}
|
package/dist/bin/clean.cjs
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
-
mod
|
|
25
|
-
));
|
|
26
|
-
|
|
27
|
-
// src/lib/runXyWithWarning.ts
|
|
28
|
-
var import_chalk = __toESM(require("chalk"), 1);
|
|
29
|
-
var runXyWithWarning = /* @__PURE__ */ __name((command) => {
|
|
30
|
-
const commandString = `yarn ${command}`;
|
|
31
|
-
const commandXyString = `yarn xy ${command}`;
|
|
32
|
-
console.warn(import_chalk.default.yellow(`WARNING: [${import_chalk.default.white(commandString)}] is deprecated for XY Labs Scripts.`));
|
|
33
|
-
console.warn(import_chalk.default.gray(`Did you mean [${import_chalk.default.magenta(commandXyString)}]?`));
|
|
34
|
-
return 1;
|
|
35
|
-
}, "runXyWithWarning");
|
|
36
|
-
|
|
37
|
-
// src/bin/clean.ts
|
|
38
|
-
runXyWithWarning("clean");
|
|
39
|
-
//# sourceMappingURL=clean.cjs.map
|
package/dist/bin/clean.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/runXyWithWarning.ts","../../src/bin/clean.ts"],"sourcesContent":["import chalk from 'chalk'\n\nexport const runXyWithWarning = (command: string) => {\n const commandString = `yarn ${command}`\n const commandXyString = `yarn xy ${command}`\n console.warn(chalk.yellow(`WARNING: [${chalk.white(commandString)}] is deprecated for XY Labs Scripts.`))\n console.warn(chalk.gray(`Did you mean [${chalk.magenta(commandXyString)}]?`))\n return 1\n}\n","#!/usr/bin/env node\n\nimport { runXyWithWarning } from '../lib/index.ts'\n\nrunXyWithWarning('clean')\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mBAAkB;AAEX,IAAMA,mBAAmB,wBAACC,YAAAA;AAC/B,QAAMC,gBAAgB,QAAQD,OAAAA;AAC9B,QAAME,kBAAkB,WAAWF,OAAAA;AACnCG,UAAQC,KAAKC,aAAAA,QAAMC,OAAO,aAAaD,aAAAA,QAAME,MAAMN,aAAAA,CAAAA,sCAAoD,CAAA;AACvGE,UAAQC,KAAKC,aAAAA,QAAMG,KAAK,iBAAiBH,aAAAA,QAAMI,QAAQP,eAAAA,CAAAA,IAAoB,CAAA;AAC3E,SAAO;AACT,GANgC;;;ACEhCQ,iBAAiB,OAAA;","names":["runXyWithWarning","command","commandString","commandXyString","console","warn","chalk","yellow","white","gray","magenta","runXyWithWarning"]}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
-
mod
|
|
25
|
-
));
|
|
26
|
-
|
|
27
|
-
// src/lib/runXyWithWarning.ts
|
|
28
|
-
var import_chalk = __toESM(require("chalk"), 1);
|
|
29
|
-
var runXyWithWarning = /* @__PURE__ */ __name((command) => {
|
|
30
|
-
const commandString = `yarn ${command}`;
|
|
31
|
-
const commandXyString = `yarn xy ${command}`;
|
|
32
|
-
console.warn(import_chalk.default.yellow(`WARNING: [${import_chalk.default.white(commandString)}] is deprecated for XY Labs Scripts.`));
|
|
33
|
-
console.warn(import_chalk.default.gray(`Did you mean [${import_chalk.default.magenta(commandXyString)}]?`));
|
|
34
|
-
return 1;
|
|
35
|
-
}, "runXyWithWarning");
|
|
36
|
-
|
|
37
|
-
// src/bin/compile-only.ts
|
|
38
|
-
runXyWithWarning("compile-only");
|
|
39
|
-
//# sourceMappingURL=compile-only.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/lib/runXyWithWarning.ts","../../src/bin/compile-only.ts"],"sourcesContent":["import chalk from 'chalk'\n\nexport const runXyWithWarning = (command: string) => {\n const commandString = `yarn ${command}`\n const commandXyString = `yarn xy ${command}`\n console.warn(chalk.yellow(`WARNING: [${chalk.white(commandString)}] is deprecated for XY Labs Scripts.`))\n console.warn(chalk.gray(`Did you mean [${chalk.magenta(commandXyString)}]?`))\n return 1\n}\n","#!/usr/bin/env node\n\nimport { runXyWithWarning } from '../lib/index.ts'\n\nrunXyWithWarning('compile-only')\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mBAAkB;AAEX,IAAMA,mBAAmB,wBAACC,YAAAA;AAC/B,QAAMC,gBAAgB,QAAQD,OAAAA;AAC9B,QAAME,kBAAkB,WAAWF,OAAAA;AACnCG,UAAQC,KAAKC,aAAAA,QAAMC,OAAO,aAAaD,aAAAA,QAAME,MAAMN,aAAAA,CAAAA,sCAAoD,CAAA;AACvGE,UAAQC,KAAKC,aAAAA,QAAMG,KAAK,iBAAiBH,aAAAA,QAAMI,QAAQP,eAAAA,CAAAA,IAAoB,CAAA;AAC3E,SAAO;AACT,GANgC;;;ACEhCQ,iBAAiB,cAAA;","names":["runXyWithWarning","command","commandString","commandXyString","console","warn","chalk","yellow","white","gray","magenta","runXyWithWarning"]}
|