@xylabs/ts-scripts-yarn3 3.15.16 → 4.0.0-rc.11
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/compile.mjs +3 -2
- package/dist/actions/compile.mjs.map +1 -1
- package/dist/actions/cycle.mjs +32 -110
- package/dist/actions/cycle.mjs.map +1 -1
- package/dist/actions/index.mjs +131 -307
- package/dist/actions/index.mjs.map +1 -1
- package/dist/actions/package/compile/compile.mjs +57 -259
- package/dist/actions/package/compile/compile.mjs.map +1 -1
- package/dist/actions/package/compile/index.mjs +57 -259
- 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 +54 -339
- package/dist/actions/package/compile/packageCompileTsup.mjs.map +1 -1
- package/dist/actions/package/index.mjs +72 -277
- package/dist/actions/package/index.mjs.map +1 -1
- package/dist/actions/package/recompile.mjs +58 -263
- package/dist/actions/package/recompile.mjs.map +1 -1
- package/dist/actions/recompile.mjs +14 -1
- package/dist/actions/recompile.mjs.map +1 -1
- package/dist/bin/package/compile-only.mjs +59 -261
- package/dist/bin/package/compile-only.mjs.map +1 -1
- package/dist/bin/package/compile-tsup.mjs +56 -341
- package/dist/bin/package/compile-tsup.mjs.map +1 -1
- package/dist/bin/package/compile.mjs +59 -261
- package/dist/bin/package/compile.mjs.map +1 -1
- package/dist/bin/package/recompile.mjs +60 -265
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/bin/xy-ts.mjs +56 -27
- package/dist/bin/xy-ts.mjs.map +1 -1
- package/dist/bin/xy.mjs +56 -27
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +143 -319
- package/dist/index.mjs.map +1 -1
- package/dist/xy/index.mjs +56 -27
- package/dist/xy/index.mjs.map +1 -1
- package/dist/xy/xy.mjs +56 -27
- package/dist/xy/xy.mjs.map +1 -1
- package/dist/xy/xyBuildCommands.mjs +17 -3
- package/dist/xy/xyBuildCommands.mjs.map +1 -1
- package/dist/xy/xyLintCommands.mjs +37 -22
- package/dist/xy/xyLintCommands.mjs.map +1 -1
- package/package.json +11 -20
- package/src/actions/compile.ts +2 -2
- package/src/actions/cycle.ts +21 -4
- 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 +54 -130
- package/src/actions/package/recompile.ts +1 -1
- package/src/actions/recompile.ts +2 -1
- package/src/types.d.ts +23 -0
- package/src/xy/xyLintCommands.ts +2 -2
- 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/lib/yarn/index.cjs
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
|
|
21
|
-
// src/lib/yarn/index.ts
|
|
22
|
-
var yarn_exports = {};
|
|
23
|
-
__export(yarn_exports, {
|
|
24
|
-
INIT_CWD: () => INIT_CWD,
|
|
25
|
-
isYarnVersionOrGreater: () => isYarnVersionOrGreater,
|
|
26
|
-
yarnWorkspace: () => yarnWorkspace,
|
|
27
|
-
yarnWorkspaces: () => yarnWorkspaces
|
|
28
|
-
});
|
|
29
|
-
module.exports = __toCommonJS(yarn_exports);
|
|
30
|
-
|
|
31
|
-
// src/lib/yarn/isYarnVersionOrGreater.ts
|
|
32
|
-
var import_node_child_process = require("child_process");
|
|
33
|
-
var isYarnVersionOrGreater = /* @__PURE__ */ __name((major, minor, patch) => {
|
|
34
|
-
const result = (0, import_node_child_process.spawnSync)("yarn", [
|
|
35
|
-
"-v"
|
|
36
|
-
], {
|
|
37
|
-
encoding: "utf8",
|
|
38
|
-
shell: true
|
|
39
|
-
});
|
|
40
|
-
const version = result.stdout.toString().replaceAll("\n", "");
|
|
41
|
-
const versionNumbers = version.split(".").map((ver) => Number.parseInt(ver));
|
|
42
|
-
const majorDelta = versionNumbers[0] - major;
|
|
43
|
-
const minorDelta = versionNumbers[1] - (minor ?? versionNumbers[1]);
|
|
44
|
-
const patchDelta = versionNumbers[2] - (patch ?? versionNumbers[2]);
|
|
45
|
-
const majorOk = majorDelta >= 0;
|
|
46
|
-
const minorOk = majorDelta > 0 || minorDelta >= 0;
|
|
47
|
-
const patchOk = majorDelta > 0 || minorDelta > 0 || patchDelta >= 0;
|
|
48
|
-
return [
|
|
49
|
-
majorOk && minorOk && patchOk,
|
|
50
|
-
version
|
|
51
|
-
];
|
|
52
|
-
}, "isYarnVersionOrGreater");
|
|
53
|
-
|
|
54
|
-
// src/lib/yarn/workspace/yarnWorkspaces.ts
|
|
55
|
-
var import_node_child_process2 = require("child_process");
|
|
56
|
-
var yarnWorkspaces = /* @__PURE__ */ __name(() => {
|
|
57
|
-
const result = (0, import_node_child_process2.spawnSync)("yarn", [
|
|
58
|
-
"workspaces",
|
|
59
|
-
"list",
|
|
60
|
-
"--json",
|
|
61
|
-
"--recursive"
|
|
62
|
-
], {
|
|
63
|
-
encoding: "utf8",
|
|
64
|
-
shell: true
|
|
65
|
-
});
|
|
66
|
-
if (result.error) {
|
|
67
|
-
throw result.error;
|
|
68
|
-
}
|
|
69
|
-
return result.stdout.toString().split("\n").slice(0, -1).map((item) => {
|
|
70
|
-
return JSON.parse(item);
|
|
71
|
-
});
|
|
72
|
-
}, "yarnWorkspaces");
|
|
73
|
-
|
|
74
|
-
// src/lib/yarn/workspace/yarnWorkspace.ts
|
|
75
|
-
var yarnWorkspace = /* @__PURE__ */ __name((pkg) => {
|
|
76
|
-
const workspace = yarnWorkspaces().find(({ name }) => name === pkg);
|
|
77
|
-
if (!workspace) throw new Error(`Workspace ${pkg} not found`);
|
|
78
|
-
return workspace;
|
|
79
|
-
}, "yarnWorkspace");
|
|
80
|
-
|
|
81
|
-
// src/lib/yarn/yarnInitCwd.ts
|
|
82
|
-
var INIT_CWD = /* @__PURE__ */ __name(() => {
|
|
83
|
-
if (!process.env.INIT_CWD) console.error("Missing INIT_CWD");
|
|
84
|
-
return process.env.INIT_CWD;
|
|
85
|
-
}, "INIT_CWD");
|
|
86
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
87
|
-
0 && (module.exports = {
|
|
88
|
-
INIT_CWD,
|
|
89
|
-
isYarnVersionOrGreater,
|
|
90
|
-
yarnWorkspace,
|
|
91
|
-
yarnWorkspaces
|
|
92
|
-
});
|
|
93
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/yarn/index.ts","../../../src/lib/yarn/isYarnVersionOrGreater.ts","../../../src/lib/yarn/workspace/yarnWorkspaces.ts","../../../src/lib/yarn/workspace/yarnWorkspace.ts","../../../src/lib/yarn/yarnInitCwd.ts"],"sourcesContent":["export * from './isYarnVersionOrGreater.ts'\nexport * from './workspace/index.ts'\nexport * from './yarnInitCwd.ts'\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","import { spawnSync } from 'node:child_process'\n\nimport { Workspace } from './Workspace.ts'\n\nexport const yarnWorkspaces = (): Workspace[] => {\n const result = spawnSync('yarn', ['workspaces', 'list', '--json', '--recursive'], { encoding: 'utf8', shell: true })\n if (result.error) {\n throw result.error\n }\n return (\n result.stdout\n .toString()\n // NOTE: This probably doesn't work on Windows\n // TODO: Replace /r/n with /n first\n .split('\\n')\n .slice(0, -1)\n .map((item) => {\n return JSON.parse(item)\n })\n )\n}\n","import { Workspace } from './Workspace.ts'\nimport { yarnWorkspaces } from './yarnWorkspaces.ts'\n\nexport const yarnWorkspace = (pkg: string): Workspace => {\n const workspace = yarnWorkspaces().find(({ name }) => name === pkg)\n if (!workspace) throw new Error(`Workspace ${pkg} not found`)\n return workspace\n}\n","export const INIT_CWD = () => {\n if (!process.env.INIT_CWD) console.error('Missing INIT_CWD')\n return process.env.INIT_CWD\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;ACAA,gCAA0B;AAEnB,IAAMA,yBAAyB,wBAACC,OAAeC,OAAgBC,UAAAA;AACpE,QAAMC,aAASC,qCAAU,QAAQ;IAAC;KAAO;IAAEC,UAAU;IAAQC,OAAO;EAAK,CAAA;AACzE,QAAMC,UAAUJ,OAAOK,OAAOC,SAAQ,EAAGC,WAAW,MAAM,EAAA;AAC1D,QAAMC,iBAAiBJ,QAAQK,MAAM,GAAA,EAAKC,IAAIC,CAAAA,QAAOC,OAAOC,SAASF,GAAAA,CAAAA;AACrE,QAAMG,aAAaN,eAAe,CAAA,IAAKX;AACvC,QAAMkB,aAAaP,eAAe,CAAA,KAAMV,SAASU,eAAe,CAAA;AAChE,QAAMQ,aAAaR,eAAe,CAAA,KAAMT,SAASS,eAAe,CAAA;AAEhE,QAAMS,UAAUH,cAAc;AAC9B,QAAMI,UAAUJ,aAAa,KAAKC,cAAc;AAChD,QAAMI,UAAUL,aAAa,KAAKC,aAAa,KAAKC,cAAc;AAElE,SAAO;IAACC,WAAWC,WAAWC;IAASf;;AACzC,GAbsC;;;ACFtC,IAAAgB,6BAA0B;AAInB,IAAMC,iBAAiB,6BAAA;AAC5B,QAAMC,aAASC,sCAAU,QAAQ;IAAC;IAAc;IAAQ;IAAU;KAAgB;IAAEC,UAAU;IAAQC,OAAO;EAAK,CAAA;AAClH,MAAIH,OAAOI,OAAO;AAChB,UAAMJ,OAAOI;EACf;AACA,SACEJ,OAAOK,OACJC,SAAQ,EAGRC,MAAM,IAAA,EACNC,MAAM,GAAG,EAAC,EACVC,IAAI,CAACC,SAAAA;AACJ,WAAOC,KAAKC,MAAMF,IAAAA;EACpB,CAAA;AAEN,GAhB8B;;;ACDvB,IAAMG,gBAAgB,wBAACC,QAAAA;AAC5B,QAAMC,YAAYC,eAAAA,EAAiBC,KAAK,CAAC,EAAEC,KAAI,MAAOA,SAASJ,GAAAA;AAC/D,MAAI,CAACC,UAAW,OAAM,IAAII,MAAM,aAAaL,GAAAA,YAAe;AAC5D,SAAOC;AACT,GAJ6B;;;ACHtB,IAAMK,WAAW,6BAAA;AACtB,MAAI,CAACC,QAAQC,IAAIF,SAAUG,SAAQC,MAAM,kBAAA;AACzC,SAAOH,QAAQC,IAAIF;AACrB,GAHwB;","names":["isYarnVersionOrGreater","major","minor","patch","result","spawnSync","encoding","shell","version","stdout","toString","replaceAll","versionNumbers","split","map","ver","Number","parseInt","majorDelta","minorDelta","patchDelta","majorOk","minorOk","patchOk","import_node_child_process","yarnWorkspaces","result","spawnSync","encoding","shell","error","stdout","toString","split","slice","map","item","JSON","parse","yarnWorkspace","pkg","workspace","yarnWorkspaces","find","name","Error","INIT_CWD","process","env","console","error"]}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
|
|
21
|
-
// src/lib/yarn/isYarnVersionOrGreater.ts
|
|
22
|
-
var isYarnVersionOrGreater_exports = {};
|
|
23
|
-
__export(isYarnVersionOrGreater_exports, {
|
|
24
|
-
isYarnVersionOrGreater: () => isYarnVersionOrGreater
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(isYarnVersionOrGreater_exports);
|
|
27
|
-
var import_node_child_process = require("child_process");
|
|
28
|
-
var isYarnVersionOrGreater = /* @__PURE__ */ __name((major, minor, patch) => {
|
|
29
|
-
const result = (0, import_node_child_process.spawnSync)("yarn", [
|
|
30
|
-
"-v"
|
|
31
|
-
], {
|
|
32
|
-
encoding: "utf8",
|
|
33
|
-
shell: true
|
|
34
|
-
});
|
|
35
|
-
const version = result.stdout.toString().replaceAll("\n", "");
|
|
36
|
-
const versionNumbers = version.split(".").map((ver) => Number.parseInt(ver));
|
|
37
|
-
const majorDelta = versionNumbers[0] - major;
|
|
38
|
-
const minorDelta = versionNumbers[1] - (minor ?? versionNumbers[1]);
|
|
39
|
-
const patchDelta = versionNumbers[2] - (patch ?? versionNumbers[2]);
|
|
40
|
-
const majorOk = majorDelta >= 0;
|
|
41
|
-
const minorOk = majorDelta > 0 || minorDelta >= 0;
|
|
42
|
-
const patchOk = majorDelta > 0 || minorDelta > 0 || patchDelta >= 0;
|
|
43
|
-
return [
|
|
44
|
-
majorOk && minorOk && patchOk,
|
|
45
|
-
version
|
|
46
|
-
];
|
|
47
|
-
}, "isYarnVersionOrGreater");
|
|
48
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
49
|
-
0 && (module.exports = {
|
|
50
|
-
isYarnVersionOrGreater
|
|
51
|
-
});
|
|
52
|
-
//# sourceMappingURL=isYarnVersionOrGreater.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/yarn/isYarnVersionOrGreater.ts"],"sourcesContent":["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;;;;;gCAA0B;AAEnB,IAAMA,yBAAyB,wBAACC,OAAeC,OAAgBC,UAAAA;AACpE,QAAMC,aAASC,qCAAU,QAAQ;IAAC;KAAO;IAAEC,UAAU;IAAQC,OAAO;EAAK,CAAA;AACzE,QAAMC,UAAUJ,OAAOK,OAAOC,SAAQ,EAAGC,WAAW,MAAM,EAAA;AAC1D,QAAMC,iBAAiBJ,QAAQK,MAAM,GAAA,EAAKC,IAAIC,CAAAA,QAAOC,OAAOC,SAASF,GAAAA,CAAAA;AACrE,QAAMG,aAAaN,eAAe,CAAA,IAAKX;AACvC,QAAMkB,aAAaP,eAAe,CAAA,KAAMV,SAASU,eAAe,CAAA;AAChE,QAAMQ,aAAaR,eAAe,CAAA,KAAMT,SAASS,eAAe,CAAA;AAEhE,QAAMS,UAAUH,cAAc;AAC9B,QAAMI,UAAUJ,aAAa,KAAKC,cAAc;AAChD,QAAMI,UAAUL,aAAa,KAAKC,aAAa,KAAKC,cAAc;AAElE,SAAO;IAACC,WAAWC,WAAWC;IAASf;;AACzC,GAbsC;","names":["isYarnVersionOrGreater","major","minor","patch","result","spawnSync","encoding","shell","version","stdout","toString","replaceAll","versionNumbers","split","map","ver","Number","parseInt","majorDelta","minorDelta","patchDelta","majorOk","minorOk","patchOk"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/lib/yarn/workspace/Workspace.ts
|
|
17
|
-
var Workspace_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(Workspace_exports);
|
|
19
|
-
//# sourceMappingURL=Workspace.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/yarn/workspace/Workspace.ts"],"sourcesContent":["export interface Workspace {\n location: string\n name: string\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;;","names":[]}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
|
|
21
|
-
// src/lib/yarn/workspace/index.ts
|
|
22
|
-
var workspace_exports = {};
|
|
23
|
-
__export(workspace_exports, {
|
|
24
|
-
yarnWorkspace: () => yarnWorkspace,
|
|
25
|
-
yarnWorkspaces: () => yarnWorkspaces
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(workspace_exports);
|
|
28
|
-
|
|
29
|
-
// src/lib/yarn/workspace/yarnWorkspaces.ts
|
|
30
|
-
var import_node_child_process = require("child_process");
|
|
31
|
-
var yarnWorkspaces = /* @__PURE__ */ __name(() => {
|
|
32
|
-
const result = (0, import_node_child_process.spawnSync)("yarn", [
|
|
33
|
-
"workspaces",
|
|
34
|
-
"list",
|
|
35
|
-
"--json",
|
|
36
|
-
"--recursive"
|
|
37
|
-
], {
|
|
38
|
-
encoding: "utf8",
|
|
39
|
-
shell: true
|
|
40
|
-
});
|
|
41
|
-
if (result.error) {
|
|
42
|
-
throw result.error;
|
|
43
|
-
}
|
|
44
|
-
return result.stdout.toString().split("\n").slice(0, -1).map((item) => {
|
|
45
|
-
return JSON.parse(item);
|
|
46
|
-
});
|
|
47
|
-
}, "yarnWorkspaces");
|
|
48
|
-
|
|
49
|
-
// src/lib/yarn/workspace/yarnWorkspace.ts
|
|
50
|
-
var yarnWorkspace = /* @__PURE__ */ __name((pkg) => {
|
|
51
|
-
const workspace = yarnWorkspaces().find(({ name }) => name === pkg);
|
|
52
|
-
if (!workspace) throw new Error(`Workspace ${pkg} not found`);
|
|
53
|
-
return workspace;
|
|
54
|
-
}, "yarnWorkspace");
|
|
55
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
56
|
-
0 && (module.exports = {
|
|
57
|
-
yarnWorkspace,
|
|
58
|
-
yarnWorkspaces
|
|
59
|
-
});
|
|
60
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/yarn/workspace/index.ts","../../../../src/lib/yarn/workspace/yarnWorkspaces.ts","../../../../src/lib/yarn/workspace/yarnWorkspace.ts"],"sourcesContent":["export * from './Workspace.ts'\nexport * from './yarnWorkspace.ts'\nexport * from './yarnWorkspaces.ts'\n","import { spawnSync } from 'node:child_process'\n\nimport { Workspace } from './Workspace.ts'\n\nexport const yarnWorkspaces = (): Workspace[] => {\n const result = spawnSync('yarn', ['workspaces', 'list', '--json', '--recursive'], { encoding: 'utf8', shell: true })\n if (result.error) {\n throw result.error\n }\n return (\n result.stdout\n .toString()\n // NOTE: This probably doesn't work on Windows\n // TODO: Replace /r/n with /n first\n .split('\\n')\n .slice(0, -1)\n .map((item) => {\n return JSON.parse(item)\n })\n )\n}\n","import { Workspace } from './Workspace.ts'\nimport { yarnWorkspaces } from './yarnWorkspaces.ts'\n\nexport const yarnWorkspace = (pkg: string): Workspace => {\n const workspace = yarnWorkspaces().find(({ name }) => name === pkg)\n if (!workspace) throw new Error(`Workspace ${pkg} not found`)\n return workspace\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;ACAA,gCAA0B;AAInB,IAAMA,iBAAiB,6BAAA;AAC5B,QAAMC,aAASC,qCAAU,QAAQ;IAAC;IAAc;IAAQ;IAAU;KAAgB;IAAEC,UAAU;IAAQC,OAAO;EAAK,CAAA;AAClH,MAAIH,OAAOI,OAAO;AAChB,UAAMJ,OAAOI;EACf;AACA,SACEJ,OAAOK,OACJC,SAAQ,EAGRC,MAAM,IAAA,EACNC,MAAM,GAAG,EAAC,EACVC,IAAI,CAACC,SAAAA;AACJ,WAAOC,KAAKC,MAAMF,IAAAA;EACpB,CAAA;AAEN,GAhB8B;;;ACDvB,IAAMG,gBAAgB,wBAACC,QAAAA;AAC5B,QAAMC,YAAYC,eAAAA,EAAiBC,KAAK,CAAC,EAAEC,KAAI,MAAOA,SAASJ,GAAAA;AAC/D,MAAI,CAACC,UAAW,OAAM,IAAII,MAAM,aAAaL,GAAAA,YAAe;AAC5D,SAAOC;AACT,GAJ6B;","names":["yarnWorkspaces","result","spawnSync","encoding","shell","error","stdout","toString","split","slice","map","item","JSON","parse","yarnWorkspace","pkg","workspace","yarnWorkspaces","find","name","Error"]}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
|
|
21
|
-
// src/lib/yarn/workspace/yarnWorkspace.ts
|
|
22
|
-
var yarnWorkspace_exports = {};
|
|
23
|
-
__export(yarnWorkspace_exports, {
|
|
24
|
-
yarnWorkspace: () => yarnWorkspace
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(yarnWorkspace_exports);
|
|
27
|
-
|
|
28
|
-
// src/lib/yarn/workspace/yarnWorkspaces.ts
|
|
29
|
-
var import_node_child_process = require("child_process");
|
|
30
|
-
var yarnWorkspaces = /* @__PURE__ */ __name(() => {
|
|
31
|
-
const result = (0, import_node_child_process.spawnSync)("yarn", [
|
|
32
|
-
"workspaces",
|
|
33
|
-
"list",
|
|
34
|
-
"--json",
|
|
35
|
-
"--recursive"
|
|
36
|
-
], {
|
|
37
|
-
encoding: "utf8",
|
|
38
|
-
shell: true
|
|
39
|
-
});
|
|
40
|
-
if (result.error) {
|
|
41
|
-
throw result.error;
|
|
42
|
-
}
|
|
43
|
-
return result.stdout.toString().split("\n").slice(0, -1).map((item) => {
|
|
44
|
-
return JSON.parse(item);
|
|
45
|
-
});
|
|
46
|
-
}, "yarnWorkspaces");
|
|
47
|
-
|
|
48
|
-
// src/lib/yarn/workspace/yarnWorkspace.ts
|
|
49
|
-
var yarnWorkspace = /* @__PURE__ */ __name((pkg) => {
|
|
50
|
-
const workspace = yarnWorkspaces().find(({ name }) => name === pkg);
|
|
51
|
-
if (!workspace) throw new Error(`Workspace ${pkg} not found`);
|
|
52
|
-
return workspace;
|
|
53
|
-
}, "yarnWorkspace");
|
|
54
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
55
|
-
0 && (module.exports = {
|
|
56
|
-
yarnWorkspace
|
|
57
|
-
});
|
|
58
|
-
//# sourceMappingURL=yarnWorkspace.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/yarn/workspace/yarnWorkspace.ts","../../../../src/lib/yarn/workspace/yarnWorkspaces.ts"],"sourcesContent":["import { Workspace } from './Workspace.ts'\nimport { yarnWorkspaces } from './yarnWorkspaces.ts'\n\nexport const yarnWorkspace = (pkg: string): Workspace => {\n const workspace = yarnWorkspaces().find(({ name }) => name === pkg)\n if (!workspace) throw new Error(`Workspace ${pkg} not found`)\n return workspace\n}\n","import { spawnSync } from 'node:child_process'\n\nimport { Workspace } from './Workspace.ts'\n\nexport const yarnWorkspaces = (): Workspace[] => {\n const result = spawnSync('yarn', ['workspaces', 'list', '--json', '--recursive'], { encoding: 'utf8', shell: true })\n if (result.error) {\n throw result.error\n }\n return (\n result.stdout\n .toString()\n // NOTE: This probably doesn't work on Windows\n // TODO: Replace /r/n with /n first\n .split('\\n')\n .slice(0, -1)\n .map((item) => {\n return JSON.parse(item)\n })\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA;;;;;;;ACDA,gCAA0B;AAInB,IAAMA,iBAAiB,6BAAA;AAC5B,QAAMC,aAASC,qCAAU,QAAQ;IAAC;IAAc;IAAQ;IAAU;KAAgB;IAAEC,UAAU;IAAQC,OAAO;EAAK,CAAA;AAClH,MAAIH,OAAOI,OAAO;AAChB,UAAMJ,OAAOI;EACf;AACA,SACEJ,OAAOK,OACJC,SAAQ,EAGRC,MAAM,IAAA,EACNC,MAAM,GAAG,EAAC,EACVC,IAAI,CAACC,SAAAA;AACJ,WAAOC,KAAKC,MAAMF,IAAAA;EACpB,CAAA;AAEN,GAhB8B;;;ADDvB,IAAMG,gBAAgB,wBAACC,QAAAA;AAC5B,QAAMC,YAAYC,eAAAA,EAAiBC,KAAK,CAAC,EAAEC,KAAI,MAAOA,SAASJ,GAAAA;AAC/D,MAAI,CAACC,UAAW,OAAM,IAAII,MAAM,aAAaL,GAAAA,YAAe;AAC5D,SAAOC;AACT,GAJ6B;","names":["yarnWorkspaces","result","spawnSync","encoding","shell","error","stdout","toString","split","slice","map","item","JSON","parse","yarnWorkspace","pkg","workspace","yarnWorkspaces","find","name","Error"]}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
|
|
21
|
-
// src/lib/yarn/workspace/yarnWorkspaces.ts
|
|
22
|
-
var yarnWorkspaces_exports = {};
|
|
23
|
-
__export(yarnWorkspaces_exports, {
|
|
24
|
-
yarnWorkspaces: () => yarnWorkspaces
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(yarnWorkspaces_exports);
|
|
27
|
-
var import_node_child_process = require("child_process");
|
|
28
|
-
var yarnWorkspaces = /* @__PURE__ */ __name(() => {
|
|
29
|
-
const result = (0, import_node_child_process.spawnSync)("yarn", [
|
|
30
|
-
"workspaces",
|
|
31
|
-
"list",
|
|
32
|
-
"--json",
|
|
33
|
-
"--recursive"
|
|
34
|
-
], {
|
|
35
|
-
encoding: "utf8",
|
|
36
|
-
shell: true
|
|
37
|
-
});
|
|
38
|
-
if (result.error) {
|
|
39
|
-
throw result.error;
|
|
40
|
-
}
|
|
41
|
-
return result.stdout.toString().split("\n").slice(0, -1).map((item) => {
|
|
42
|
-
return JSON.parse(item);
|
|
43
|
-
});
|
|
44
|
-
}, "yarnWorkspaces");
|
|
45
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
-
0 && (module.exports = {
|
|
47
|
-
yarnWorkspaces
|
|
48
|
-
});
|
|
49
|
-
//# sourceMappingURL=yarnWorkspaces.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/yarn/workspace/yarnWorkspaces.ts"],"sourcesContent":["import { spawnSync } from 'node:child_process'\n\nimport { Workspace } from './Workspace.ts'\n\nexport const yarnWorkspaces = (): Workspace[] => {\n const result = spawnSync('yarn', ['workspaces', 'list', '--json', '--recursive'], { encoding: 'utf8', shell: true })\n if (result.error) {\n throw result.error\n }\n return (\n result.stdout\n .toString()\n // NOTE: This probably doesn't work on Windows\n // TODO: Replace /r/n with /n first\n .split('\\n')\n .slice(0, -1)\n .map((item) => {\n return JSON.parse(item)\n })\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;gCAA0B;AAInB,IAAMA,iBAAiB,6BAAA;AAC5B,QAAMC,aAASC,qCAAU,QAAQ;IAAC;IAAc;IAAQ;IAAU;KAAgB;IAAEC,UAAU;IAAQC,OAAO;EAAK,CAAA;AAClH,MAAIH,OAAOI,OAAO;AAChB,UAAMJ,OAAOI;EACf;AACA,SACEJ,OAAOK,OACJC,SAAQ,EAGRC,MAAM,IAAA,EACNC,MAAM,GAAG,EAAC,EACVC,IAAI,CAACC,SAAAA;AACJ,WAAOC,KAAKC,MAAMF,IAAAA;EACpB,CAAA;AAEN,GAhB8B;","names":["yarnWorkspaces","result","spawnSync","encoding","shell","error","stdout","toString","split","slice","map","item","JSON","parse"]}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
|
|
21
|
-
// src/lib/yarn/yarnInitCwd.ts
|
|
22
|
-
var yarnInitCwd_exports = {};
|
|
23
|
-
__export(yarnInitCwd_exports, {
|
|
24
|
-
INIT_CWD: () => INIT_CWD
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(yarnInitCwd_exports);
|
|
27
|
-
var INIT_CWD = /* @__PURE__ */ __name(() => {
|
|
28
|
-
if (!process.env.INIT_CWD) console.error("Missing INIT_CWD");
|
|
29
|
-
return process.env.INIT_CWD;
|
|
30
|
-
}, "INIT_CWD");
|
|
31
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
-
0 && (module.exports = {
|
|
33
|
-
INIT_CWD
|
|
34
|
-
});
|
|
35
|
-
//# sourceMappingURL=yarnInitCwd.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/lib/yarn/yarnInitCwd.ts"],"sourcesContent":["export const INIT_CWD = () => {\n if (!process.env.INIT_CWD) console.error('Missing INIT_CWD')\n return process.env.INIT_CWD\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;AAAO,IAAMA,WAAW,6BAAA;AACtB,MAAI,CAACC,QAAQC,IAAIF,SAAUG,SAAQC,MAAM,kBAAA;AACzC,SAAOH,QAAQC,IAAIF;AACrB,GAHwB;","names":["INIT_CWD","process","env","console","error"]}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
|
|
21
|
-
// src/loadPackageConfig.ts
|
|
22
|
-
var loadPackageConfig_exports = {};
|
|
23
|
-
__export(loadPackageConfig_exports, {
|
|
24
|
-
loadPackageConfig: () => loadPackageConfig
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(loadPackageConfig_exports);
|
|
27
|
-
var import_promises = require("fs/promises");
|
|
28
|
-
var loadPackageConfig = /* @__PURE__ */ __name(async () => {
|
|
29
|
-
const pkg = process.env.INIT_CWD;
|
|
30
|
-
const pkgConfig = await (0, import_promises.readFile)(`${pkg}/package.json`, {
|
|
31
|
-
encoding: "utf8"
|
|
32
|
-
});
|
|
33
|
-
return JSON.parse(pkgConfig);
|
|
34
|
-
}, "loadPackageConfig");
|
|
35
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
36
|
-
0 && (module.exports = {
|
|
37
|
-
loadPackageConfig
|
|
38
|
-
});
|
|
39
|
-
//# sourceMappingURL=loadPackageConfig.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/loadPackageConfig.ts"],"sourcesContent":["import { readFile } from 'node:fs/promises'\n\nimport { PackageJson } from 'types-package-json'\n\nexport type PackageJsonEx = PackageJson & { type: 'module' | 'commonjs' }\n\nexport const loadPackageConfig = async () => {\n const pkg = process.env.INIT_CWD\n\n const pkgConfig = await readFile(`${pkg}/package.json`, { encoding: 'utf8' })\n\n return JSON.parse(pkgConfig) as PackageJsonEx\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;sBAAyB;AAMlB,IAAMA,oBAAoB,mCAAA;AAC/B,QAAMC,MAAMC,QAAQC,IAAIC;AAExB,QAAMC,YAAY,UAAMC,0BAAS,GAAGL,GAAAA,iBAAoB;IAAEM,UAAU;EAAO,CAAA;AAE3E,SAAOC,KAAKC,MAAMJ,SAAAA;AACpB,GANiC;","names":["loadPackageConfig","pkg","process","env","INIT_CWD","pkgConfig","readFile","encoding","JSON","parse"]}
|
package/dist/types.d.cjs
DELETED
package/dist/types.d.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|