@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/index.mjs
CHANGED
|
@@ -362,7 +362,7 @@ var mergeEntries = /* @__PURE__ */ __name((a, b) => [
|
|
|
362
362
|
].sort(), "mergeEntries");
|
|
363
363
|
var generateIgnoreFiles = /* @__PURE__ */ __name((filename3, pkg) => {
|
|
364
364
|
console.log(chalk4.green(`Generate ${filename3} Files`));
|
|
365
|
-
const
|
|
365
|
+
const cwd3 = INIT_CWD() ?? ".";
|
|
366
366
|
const workspaces = pkg ? [
|
|
367
367
|
yarnWorkspace(pkg)
|
|
368
368
|
] : yarnWorkspaces();
|
|
@@ -370,7 +370,7 @@ var generateIgnoreFiles = /* @__PURE__ */ __name((filename3, pkg) => {
|
|
|
370
370
|
const writeEntries = /* @__PURE__ */ __name((location, entries) => writeLines(`${location}/${filename3}`, entries), "writeEntries");
|
|
371
371
|
const results = workspaces.map(({ location, name }) => {
|
|
372
372
|
try {
|
|
373
|
-
writeEntries(location, mergeEntries(readEntries(
|
|
373
|
+
writeEntries(location, mergeEntries(readEntries(cwd3), readEntries(location)));
|
|
374
374
|
return 0;
|
|
375
375
|
} catch (ex) {
|
|
376
376
|
const error = ex;
|
|
@@ -1347,7 +1347,7 @@ var packageClean = /* @__PURE__ */ __name(async () => {
|
|
|
1347
1347
|
}, "packageClean");
|
|
1348
1348
|
|
|
1349
1349
|
// src/actions/package/compile/compile.ts
|
|
1350
|
-
import
|
|
1350
|
+
import chalk23 from "chalk";
|
|
1351
1351
|
|
|
1352
1352
|
// src/actions/package/publint.ts
|
|
1353
1353
|
import { promises as fs } from "node:fs";
|
|
@@ -1435,7 +1435,7 @@ var packageCompileTsc = /* @__PURE__ */ __name(async (noEmit, config2, compilerO
|
|
|
1435
1435
|
console.log(`Compiling with NoEmit TSC [${pkg}]`);
|
|
1436
1436
|
}
|
|
1437
1437
|
const compilerOptions = {
|
|
1438
|
-
...
|
|
1438
|
+
...getCompilerOptions({
|
|
1439
1439
|
outDir: "dist",
|
|
1440
1440
|
removeComments: true,
|
|
1441
1441
|
rootDir: "src"
|
|
@@ -1474,7 +1474,6 @@ var packageCompileTsc = /* @__PURE__ */ __name(async (noEmit, config2, compilerO
|
|
|
1474
1474
|
}, "packageCompileTsc");
|
|
1475
1475
|
|
|
1476
1476
|
// src/actions/package/compile/packageCompileTsup.ts
|
|
1477
|
-
import merge3 from "lodash/merge.js";
|
|
1478
1477
|
import { build as build2, defineConfig } from "tsup";
|
|
1479
1478
|
|
|
1480
1479
|
// src/actions/package/compile/inputs.ts
|
|
@@ -1513,103 +1512,6 @@ var buildEntries = /* @__PURE__ */ __name((folder, entryMode, verbose = false) =
|
|
|
1513
1512
|
}
|
|
1514
1513
|
}, "buildEntries");
|
|
1515
1514
|
|
|
1516
|
-
// src/actions/package/compile/packageCompileTscTypes.ts
|
|
1517
|
-
import { cwd as cwd2 } from "node:process";
|
|
1518
|
-
import chalk23 from "chalk";
|
|
1519
|
-
import { createProgramFromConfig as createProgramFromConfig2 } from "tsc-prog";
|
|
1520
|
-
import { DiagnosticCategory as DiagnosticCategory2 } from "typescript";
|
|
1521
|
-
|
|
1522
|
-
// src/actions/package/compile/copyTypeFiles.ts
|
|
1523
|
-
import { copyFile, readdir } from "node:fs/promises";
|
|
1524
|
-
import { Mutex } from "async-mutex";
|
|
1525
|
-
var copyFileMutex = new Mutex();
|
|
1526
|
-
var getDistTypeFiles = /* @__PURE__ */ __name(async (compilerOptions) => {
|
|
1527
|
-
const outDir = compilerOptions.outDir ?? "dist";
|
|
1528
|
-
return (await readdir(outDir, {
|
|
1529
|
-
recursive: true
|
|
1530
|
-
})).filter((file) => file.endsWith("d.ts")).map((file) => `${outDir}/${file}`);
|
|
1531
|
-
}, "getDistTypeFiles");
|
|
1532
|
-
var getDistTypeMapFiles = /* @__PURE__ */ __name(async (compilerOptions) => {
|
|
1533
|
-
const outDir = compilerOptions.outDir ?? "dist";
|
|
1534
|
-
return (await readdir(outDir, {
|
|
1535
|
-
recursive: true
|
|
1536
|
-
})).filter((file) => file.endsWith("d.ts.map")).map((file) => `${outDir}/${file}`);
|
|
1537
|
-
}, "getDistTypeMapFiles");
|
|
1538
|
-
var copyTypeFiles = /* @__PURE__ */ __name(async (compilerOptions) => {
|
|
1539
|
-
await copyFileMutex.runExclusive(async () => {
|
|
1540
|
-
const distTypeFiles = await getDistTypeFiles(compilerOptions);
|
|
1541
|
-
await Promise.all(distTypeFiles.map(async (file) => {
|
|
1542
|
-
await copyFile(file, file.replace("d.ts", "d.mts"));
|
|
1543
|
-
await copyFile(file, file.replace("d.ts", "d.cts"));
|
|
1544
|
-
}));
|
|
1545
|
-
const distTypeMapFiles = await getDistTypeMapFiles(compilerOptions);
|
|
1546
|
-
await Promise.all(distTypeMapFiles.map(async (file) => {
|
|
1547
|
-
await copyFile(file, file.replace("d.ts.map", "d.mts.map"));
|
|
1548
|
-
await copyFile(file, file.replace("d.ts.map", "d.cts.map"));
|
|
1549
|
-
}));
|
|
1550
|
-
});
|
|
1551
|
-
}, "copyTypeFiles");
|
|
1552
|
-
|
|
1553
|
-
// src/actions/package/compile/packageCompileTscTypes.ts
|
|
1554
|
-
var packageCompileTscTypes = /* @__PURE__ */ __name(async (folder = "src", { verbose } = {}, compilerOptionsParam, generateMts = true) => {
|
|
1555
|
-
const pkg = process.env.INIT_CWD ?? cwd2();
|
|
1556
|
-
if (verbose) {
|
|
1557
|
-
console.log(`Compiling types with TSC [${pkg}]`);
|
|
1558
|
-
}
|
|
1559
|
-
const compilerOptions = {
|
|
1560
|
-
...await getCompilerOptions({
|
|
1561
|
-
declaration: true,
|
|
1562
|
-
emitDeclarationOnly: true,
|
|
1563
|
-
outDir: "dist",
|
|
1564
|
-
removeComments: true,
|
|
1565
|
-
skipDefaultLibCheck: true,
|
|
1566
|
-
skipLibCheck: true,
|
|
1567
|
-
sourceMap: true
|
|
1568
|
-
}),
|
|
1569
|
-
...compilerOptionsParam
|
|
1570
|
-
};
|
|
1571
|
-
const files = buildEntries(folder, "all");
|
|
1572
|
-
const result = createProgramFromConfig2({
|
|
1573
|
-
basePath: pkg ?? cwd2(),
|
|
1574
|
-
compilerOptions,
|
|
1575
|
-
exclude: [
|
|
1576
|
-
"dist",
|
|
1577
|
-
"docs",
|
|
1578
|
-
"**/*.spec.*",
|
|
1579
|
-
"**/*.stories.*",
|
|
1580
|
-
"src/**/spec/**/*"
|
|
1581
|
-
],
|
|
1582
|
-
files
|
|
1583
|
-
}).emit();
|
|
1584
|
-
const diagResults = result.diagnostics.length;
|
|
1585
|
-
for (const diag of result.diagnostics) {
|
|
1586
|
-
switch (diag.category) {
|
|
1587
|
-
case DiagnosticCategory2.Error: {
|
|
1588
|
-
console.error(chalk23.red(diag.messageText));
|
|
1589
|
-
console.error(chalk23.grey(pkg));
|
|
1590
|
-
console.error(chalk23.blue(diag.file?.fileName));
|
|
1591
|
-
break;
|
|
1592
|
-
}
|
|
1593
|
-
case DiagnosticCategory2.Warning: {
|
|
1594
|
-
console.error(chalk23.yellow(diag.messageText));
|
|
1595
|
-
console.error(chalk23.grey(pkg));
|
|
1596
|
-
console.error(chalk23.blue(diag.file?.fileName));
|
|
1597
|
-
break;
|
|
1598
|
-
}
|
|
1599
|
-
case DiagnosticCategory2.Suggestion: {
|
|
1600
|
-
console.error(chalk23.white(diag.messageText));
|
|
1601
|
-
console.error(chalk23.grey(pkg));
|
|
1602
|
-
console.error(chalk23.blue(diag.file?.fileName));
|
|
1603
|
-
break;
|
|
1604
|
-
}
|
|
1605
|
-
}
|
|
1606
|
-
}
|
|
1607
|
-
if (generateMts) {
|
|
1608
|
-
await copyTypeFiles(compilerOptions);
|
|
1609
|
-
}
|
|
1610
|
-
return diagResults;
|
|
1611
|
-
}, "packageCompileTscTypes");
|
|
1612
|
-
|
|
1613
1515
|
// src/actions/package/compile/packageCompileTsup.ts
|
|
1614
1516
|
var compileFolder = /* @__PURE__ */ __name(async (folder, entryMode = "single", options, verbose) => {
|
|
1615
1517
|
const outDir = options?.outDir ?? "dist";
|
|
@@ -1618,18 +1520,15 @@ var compileFolder = /* @__PURE__ */ __name(async (folder, entryMode = "single",
|
|
|
1618
1520
|
bundle: true,
|
|
1619
1521
|
cjsInterop: true,
|
|
1620
1522
|
clean: true,
|
|
1621
|
-
dts:
|
|
1523
|
+
dts: true,
|
|
1622
1524
|
entry,
|
|
1623
1525
|
format: [
|
|
1624
|
-
"cjs",
|
|
1625
1526
|
"esm"
|
|
1626
1527
|
],
|
|
1627
|
-
// minify: true,
|
|
1628
1528
|
outDir,
|
|
1629
1529
|
silent: true,
|
|
1630
1530
|
sourcemap: true,
|
|
1631
1531
|
splitting: false,
|
|
1632
|
-
// terserOptions: { format: { comments: false } },
|
|
1633
1532
|
tsconfig: "tsconfig.json",
|
|
1634
1533
|
...options
|
|
1635
1534
|
});
|
|
@@ -1644,11 +1543,6 @@ var compileFolder = /* @__PURE__ */ __name(async (folder, entryMode = "single",
|
|
|
1644
1543
|
];
|
|
1645
1544
|
}))).flat();
|
|
1646
1545
|
await Promise.all(optionsList.map((options2) => build2(options2)));
|
|
1647
|
-
await packageCompileTscTypes(folder, {
|
|
1648
|
-
verbose
|
|
1649
|
-
}, {
|
|
1650
|
-
outDir
|
|
1651
|
-
});
|
|
1652
1546
|
return 0;
|
|
1653
1547
|
}, "compileFolder");
|
|
1654
1548
|
var packageCompileTsup = /* @__PURE__ */ __name(async (config2) => {
|
|
@@ -1667,172 +1561,79 @@ var packageCompileTsup = /* @__PURE__ */ __name(async (config2) => {
|
|
|
1667
1561
|
const compileForNeutral = compile2?.neutral ?? {
|
|
1668
1562
|
src: {}
|
|
1669
1563
|
};
|
|
1564
|
+
const standardLoaders = {
|
|
1565
|
+
".gif": "copy",
|
|
1566
|
+
".html": "copy",
|
|
1567
|
+
".jpg": "copy",
|
|
1568
|
+
".json": "json",
|
|
1569
|
+
".png": "copy",
|
|
1570
|
+
".svg": "copy",
|
|
1571
|
+
".webp": "copy"
|
|
1572
|
+
};
|
|
1573
|
+
const standardOptions = {
|
|
1574
|
+
bundle: true,
|
|
1575
|
+
format: [
|
|
1576
|
+
"esm"
|
|
1577
|
+
],
|
|
1578
|
+
loader: standardLoaders,
|
|
1579
|
+
outExtension: /* @__PURE__ */ __name(({ format }) => format === "esm" ? {
|
|
1580
|
+
js: ".mjs"
|
|
1581
|
+
} : {
|
|
1582
|
+
js: ".cjs"
|
|
1583
|
+
}, "outExtension"),
|
|
1584
|
+
skipNodeModulesBundle: true,
|
|
1585
|
+
sourcemap: true,
|
|
1586
|
+
target: "esnext"
|
|
1587
|
+
};
|
|
1670
1588
|
return await packageCompileTsc(true, {
|
|
1671
1589
|
publint: false,
|
|
1672
1590
|
verbose
|
|
1673
1591
|
}) || (await Promise.all(Object.entries(compileForNode).map(async ([folder, options]) => {
|
|
1674
1592
|
const inEsBuildOptions = typeof compile2?.node?.esbuildOptions === "object" ? compile2?.node?.esbuildOptions : {};
|
|
1675
1593
|
return folder ? await compileFolder(folder, compile2?.entryMode, {
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
loader: merge3({}, {
|
|
1682
|
-
".gif": "copy",
|
|
1683
|
-
".html": "copy",
|
|
1684
|
-
".jpg": "copy",
|
|
1685
|
-
".json": "json",
|
|
1686
|
-
".png": "copy",
|
|
1687
|
-
".svg": "copy",
|
|
1688
|
-
".webp": "copy"
|
|
1689
|
-
}, inEsBuildOptions?.loader),
|
|
1690
|
-
// minify: true,
|
|
1594
|
+
...standardOptions,
|
|
1595
|
+
loader: {
|
|
1596
|
+
...standardOptions.loader,
|
|
1597
|
+
...inEsBuildOptions?.loader
|
|
1598
|
+
},
|
|
1691
1599
|
outDir: "dist/node",
|
|
1692
|
-
outExtension: /* @__PURE__ */ __name(({ format }) => format === "esm" ? {
|
|
1693
|
-
js: ".mjs"
|
|
1694
|
-
} : {
|
|
1695
|
-
js: ".cjs"
|
|
1696
|
-
}, "outExtension"),
|
|
1697
1600
|
platform: "node",
|
|
1698
|
-
skipNodeModulesBundle: true,
|
|
1699
|
-
sourcemap: true,
|
|
1700
|
-
target: "node16",
|
|
1701
|
-
// terserOptions: { format: { comments: false } },
|
|
1702
1601
|
...compile2?.tsup?.options,
|
|
1703
1602
|
...typeof options === "object" ? options : {}
|
|
1704
1603
|
}, verbose) : 0;
|
|
1705
1604
|
}))).reduce((prev, value) => prev + value, 0) || (await Promise.all(Object.entries(compileForBrowser).map(async ([folder, options]) => {
|
|
1706
1605
|
const inEsBuildOptions = typeof compile2?.browser?.esbuildOptions === "object" ? compile2?.browser?.esbuildOptions : {};
|
|
1707
|
-
return folder ?
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
".png": "copy",
|
|
1719
|
-
".svg": "copy",
|
|
1720
|
-
".webp": "copy"
|
|
1721
|
-
}, inEsBuildOptions?.loader),
|
|
1722
|
-
// minify: true,
|
|
1723
|
-
outDir: "dist/browser",
|
|
1724
|
-
outExtension: /* @__PURE__ */ __name(({ format }) => format === "esm" ? {
|
|
1725
|
-
js: ".mjs"
|
|
1726
|
-
} : {
|
|
1727
|
-
js: ".cjs"
|
|
1728
|
-
}, "outExtension"),
|
|
1729
|
-
platform: "browser",
|
|
1730
|
-
skipNodeModulesBundle: true,
|
|
1731
|
-
sourcemap: true,
|
|
1732
|
-
target: "esnext",
|
|
1733
|
-
// terserOptions: { format: { comments: false } },
|
|
1734
|
-
...compile2?.tsup?.options,
|
|
1735
|
-
...typeof options === "object" ? options : {}
|
|
1736
|
-
}, verbose),
|
|
1737
|
-
compileFolder(folder, compile2?.entryMode, {
|
|
1738
|
-
bundle: true,
|
|
1739
|
-
format: [
|
|
1740
|
-
"esm"
|
|
1741
|
-
],
|
|
1742
|
-
loader: merge3({}, {
|
|
1743
|
-
".gif": "copy",
|
|
1744
|
-
".html": "copy",
|
|
1745
|
-
".jpg": "copy",
|
|
1746
|
-
".json": "json",
|
|
1747
|
-
".png": "copy",
|
|
1748
|
-
".svg": "copy",
|
|
1749
|
-
".webp": "copy"
|
|
1750
|
-
}, inEsBuildOptions?.loader),
|
|
1751
|
-
// minify: true,
|
|
1752
|
-
outDir: "dist/browser",
|
|
1753
|
-
outExtension: /* @__PURE__ */ __name(({ format }) => format === "esm" ? {
|
|
1754
|
-
js: ".mjs"
|
|
1755
|
-
} : {
|
|
1756
|
-
js: ".cjs"
|
|
1757
|
-
}, "outExtension"),
|
|
1758
|
-
platform: "browser",
|
|
1759
|
-
skipNodeModulesBundle: true,
|
|
1760
|
-
sourcemap: true,
|
|
1761
|
-
target: "esnext",
|
|
1762
|
-
// terserOptions: { format: { comments: false } },
|
|
1763
|
-
...compile2?.tsup?.options,
|
|
1764
|
-
...typeof options === "object" ? options : {}
|
|
1765
|
-
}, verbose)
|
|
1766
|
-
])).reduce((prev, value) => prev + value, 0) : 0;
|
|
1606
|
+
return folder ? await compileFolder(folder, compile2?.entryMode, {
|
|
1607
|
+
...standardOptions,
|
|
1608
|
+
loader: {
|
|
1609
|
+
...standardOptions.loader,
|
|
1610
|
+
...inEsBuildOptions?.loader
|
|
1611
|
+
},
|
|
1612
|
+
outDir: "dist/browser",
|
|
1613
|
+
platform: "browser",
|
|
1614
|
+
...compile2?.tsup?.options,
|
|
1615
|
+
...typeof options === "object" ? options : {}
|
|
1616
|
+
}, verbose) : 0;
|
|
1767
1617
|
}))).reduce((prev, value) => prev + value, 0) || (await Promise.all(Object.entries(compileForNeutral).map(async ([folder, options]) => {
|
|
1768
1618
|
const inEsBuildOptions = typeof compile2?.neutral?.esbuildOptions === "object" ? compile2?.neutral?.esbuildOptions : {};
|
|
1769
|
-
return folder ?
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
".png": "copy",
|
|
1781
|
-
".svg": "copy",
|
|
1782
|
-
".webp": "copy"
|
|
1783
|
-
}, inEsBuildOptions?.loader),
|
|
1784
|
-
// minify: true,
|
|
1785
|
-
outDir: "dist/neutral",
|
|
1786
|
-
outExtension: /* @__PURE__ */ __name(({ format }) => format === "esm" ? {
|
|
1787
|
-
js: ".mjs"
|
|
1788
|
-
} : {
|
|
1789
|
-
js: ".cjs"
|
|
1790
|
-
}, "outExtension"),
|
|
1791
|
-
platform: "neutral",
|
|
1792
|
-
skipNodeModulesBundle: true,
|
|
1793
|
-
sourcemap: true,
|
|
1794
|
-
target: "esnext",
|
|
1795
|
-
// terserOptions: { format: { comments: false } },
|
|
1796
|
-
...compile2?.tsup?.options,
|
|
1797
|
-
...typeof options === "object" ? options : {}
|
|
1798
|
-
}, verbose),
|
|
1799
|
-
compileFolder(folder, compile2?.entryMode, {
|
|
1800
|
-
bundle: true,
|
|
1801
|
-
format: [
|
|
1802
|
-
"esm"
|
|
1803
|
-
],
|
|
1804
|
-
loader: merge3({}, {
|
|
1805
|
-
".gif": "copy",
|
|
1806
|
-
".html": "copy",
|
|
1807
|
-
".jpg": "copy",
|
|
1808
|
-
".json": "json",
|
|
1809
|
-
".png": "copy",
|
|
1810
|
-
".svg": "copy",
|
|
1811
|
-
".webp": "copy"
|
|
1812
|
-
}, inEsBuildOptions?.loader),
|
|
1813
|
-
// minify: true,
|
|
1814
|
-
outDir: "dist/neutral",
|
|
1815
|
-
outExtension: /* @__PURE__ */ __name(({ format }) => format === "esm" ? {
|
|
1816
|
-
js: ".mjs"
|
|
1817
|
-
} : {
|
|
1818
|
-
js: ".cjs"
|
|
1819
|
-
}, "outExtension"),
|
|
1820
|
-
platform: "neutral",
|
|
1821
|
-
skipNodeModulesBundle: true,
|
|
1822
|
-
sourcemap: true,
|
|
1823
|
-
target: "esnext",
|
|
1824
|
-
// terserOptions: { format: { comments: false } },
|
|
1825
|
-
...compile2?.tsup?.options,
|
|
1826
|
-
...typeof options === "object" ? options : {}
|
|
1827
|
-
}, verbose)
|
|
1828
|
-
])).reduce((prev, value) => prev + value, 0) : 0;
|
|
1619
|
+
return folder ? await compileFolder(folder, compile2?.entryMode, {
|
|
1620
|
+
...standardOptions,
|
|
1621
|
+
loader: {
|
|
1622
|
+
...standardOptions.loader,
|
|
1623
|
+
...inEsBuildOptions?.loader
|
|
1624
|
+
},
|
|
1625
|
+
outDir: "dist/neutral",
|
|
1626
|
+
platform: "neutral",
|
|
1627
|
+
...compile2?.tsup?.options,
|
|
1628
|
+
...typeof options === "object" ? options : {}
|
|
1629
|
+
}, verbose) : 0;
|
|
1829
1630
|
}))).reduce((prev, value) => prev + value, 0) || (publint2 ? await packagePublint() : 0);
|
|
1830
1631
|
}, "packageCompileTsup");
|
|
1831
1632
|
|
|
1832
1633
|
// src/actions/package/compile/compile.ts
|
|
1833
1634
|
var packageCompile = /* @__PURE__ */ __name(async (inConfig = {}) => {
|
|
1834
1635
|
const pkg = process.env.INIT_CWD;
|
|
1835
|
-
console.log(
|
|
1636
|
+
console.log(chalk23.green(`Compiling ${pkg}`));
|
|
1836
1637
|
const config2 = await loadConfig(inConfig);
|
|
1837
1638
|
const publint2 = config2.publint;
|
|
1838
1639
|
const mode = config2.compile?.mode ?? "tsup";
|
|
@@ -1852,7 +1653,7 @@ var packageCompile = /* @__PURE__ */ __name(async (inConfig = {}) => {
|
|
|
1852
1653
|
|
|
1853
1654
|
// src/actions/package/copy-assets.ts
|
|
1854
1655
|
import path5 from "node:path/posix";
|
|
1855
|
-
import
|
|
1656
|
+
import chalk24 from "chalk";
|
|
1856
1657
|
import cpy2 from "cpy";
|
|
1857
1658
|
var copyTargetAssets2 = /* @__PURE__ */ __name(async (target, name, location) => {
|
|
1858
1659
|
try {
|
|
@@ -1871,7 +1672,7 @@ var copyTargetAssets2 = /* @__PURE__ */ __name(async (target, name, location) =>
|
|
|
1871
1672
|
flat: false
|
|
1872
1673
|
});
|
|
1873
1674
|
if (values.length > 0) {
|
|
1874
|
-
console.log(
|
|
1675
|
+
console.log(chalk24.green(`Copying Assets [${target.toUpperCase()}] - ${name} - ${location}`));
|
|
1875
1676
|
}
|
|
1876
1677
|
for (const value of values) {
|
|
1877
1678
|
console.log(`${value.split("/").pop()} => ./dist/${target}`);
|
|
@@ -1901,8 +1702,8 @@ var packageCopyAssets = /* @__PURE__ */ __name(async ({ target }) => {
|
|
|
1901
1702
|
|
|
1902
1703
|
// src/actions/package/deps.ts
|
|
1903
1704
|
import { existsSync as existsSync5, readFileSync as readFileSync5 } from "node:fs";
|
|
1904
|
-
import { cwd as
|
|
1905
|
-
import
|
|
1705
|
+
import { cwd as cwd2 } from "node:process";
|
|
1706
|
+
import chalk25 from "chalk";
|
|
1906
1707
|
import depcheck from "depcheck";
|
|
1907
1708
|
var special = depcheck.special;
|
|
1908
1709
|
var defaultIgnorePatterns = [
|
|
@@ -1929,21 +1730,21 @@ var defaultIgnoreDevPatterns = [
|
|
|
1929
1730
|
var reportUnused = /* @__PURE__ */ __name((name, unused) => {
|
|
1930
1731
|
if (unused.length > 0) {
|
|
1931
1732
|
const message = [
|
|
1932
|
-
|
|
1733
|
+
chalk25.yellow(`${unused.length} Unused ${name}`)
|
|
1933
1734
|
];
|
|
1934
|
-
for (const value of unused) message.push(
|
|
1735
|
+
for (const value of unused) message.push(chalk25.gray(` ${value}`));
|
|
1935
1736
|
console.log(message.join("\n"));
|
|
1936
1737
|
}
|
|
1937
1738
|
}, "reportUnused");
|
|
1938
1739
|
var reportMissing = /* @__PURE__ */ __name((name, missing) => {
|
|
1939
1740
|
if (Object.keys(missing).length > 0) {
|
|
1940
1741
|
const message = [
|
|
1941
|
-
|
|
1742
|
+
chalk25.yellow(`${Object.entries(missing).length} Missing ${name}`)
|
|
1942
1743
|
];
|
|
1943
1744
|
for (const [key, value] of Object.entries(missing)) {
|
|
1944
|
-
message.push(`${key}`,
|
|
1745
|
+
message.push(`${key}`, chalk25.gray(` ${value.at(0)}`));
|
|
1945
1746
|
}
|
|
1946
|
-
console.log(
|
|
1747
|
+
console.log(chalk25.yellow(message.join("\n")));
|
|
1947
1748
|
}
|
|
1948
1749
|
}, "reportMissing");
|
|
1949
1750
|
var analyzeDeps = /* @__PURE__ */ __name(async (pkg, ignoreMatches) => {
|
|
@@ -1998,7 +1799,7 @@ var analyzeDeps = /* @__PURE__ */ __name(async (pkg, ignoreMatches) => {
|
|
|
1998
1799
|
};
|
|
1999
1800
|
}, "analyzeDeps");
|
|
2000
1801
|
var packageDeps = /* @__PURE__ */ __name(async () => {
|
|
2001
|
-
const pkg = process.env.INIT_CWD ??
|
|
1802
|
+
const pkg = process.env.INIT_CWD ?? cwd2();
|
|
2002
1803
|
const pkgName = process.env.npm_package_name;
|
|
2003
1804
|
const packageContent = existsSync5(`${pkg}/package.json`) ? JSON.parse(readFileSync5(`${pkg}/package.json`, {
|
|
2004
1805
|
encoding: "utf8"
|
|
@@ -2048,10 +1849,10 @@ var packageDeps = /* @__PURE__ */ __name(async () => {
|
|
|
2048
1849
|
reportUnused("dependencies", unusedDeps);
|
|
2049
1850
|
reportUnused("devDependencies", unusedDevDeps);
|
|
2050
1851
|
if (Object.entries(invalidDirs).length > 0) {
|
|
2051
|
-
for (const [key, value] of Object.entries(invalidDirs)) console.warn(
|
|
1852
|
+
for (const [key, value] of Object.entries(invalidDirs)) console.warn(chalk25.gray(`Invalid Dir: ${key}: ${value}`));
|
|
2052
1853
|
}
|
|
2053
1854
|
if (Object.entries(invalidFiles).length > 0) {
|
|
2054
|
-
for (const [key, value] of Object.entries(invalidFiles)) console.warn(
|
|
1855
|
+
for (const [key, value] of Object.entries(invalidFiles)) console.warn(chalk25.gray(`Invalid File: ${key}: ${value}`));
|
|
2055
1856
|
}
|
|
2056
1857
|
reportMissing("dependencies", missingDepsObject);
|
|
2057
1858
|
reportMissing("devDependencies", missingDevDepsObject);
|
|
@@ -2062,7 +1863,7 @@ var packageDeps = /* @__PURE__ */ __name(async () => {
|
|
|
2062
1863
|
// src/actions/package/gen-docs.ts
|
|
2063
1864
|
import { existsSync as existsSync6 } from "node:fs";
|
|
2064
1865
|
import path6 from "node:path";
|
|
2065
|
-
import
|
|
1866
|
+
import chalk26 from "chalk";
|
|
2066
1867
|
import { Application, ArgumentsReader, TSConfigReader, TypeDocReader } from "typedoc";
|
|
2067
1868
|
var ExitCodes = {
|
|
2068
1869
|
CompileError: 3,
|
|
@@ -2164,7 +1965,7 @@ var runTypeDoc = /* @__PURE__ */ __name(async (app) => {
|
|
|
2164
1965
|
return ExitCodes.OutputError;
|
|
2165
1966
|
}
|
|
2166
1967
|
}
|
|
2167
|
-
console.log(
|
|
1968
|
+
console.log(chalk26.green(`${pkgName} - Ok`));
|
|
2168
1969
|
return ExitCodes.Ok;
|
|
2169
1970
|
}, "runTypeDoc");
|
|
2170
1971
|
|
|
@@ -2234,7 +2035,7 @@ var rebuild = /* @__PURE__ */ __name(({ target }) => {
|
|
|
2234
2035
|
}, "rebuild");
|
|
2235
2036
|
|
|
2236
2037
|
// src/actions/recompile.ts
|
|
2237
|
-
import
|
|
2038
|
+
import chalk27 from "chalk";
|
|
2238
2039
|
var recompile = /* @__PURE__ */ __name(async ({ verbose, target, pkg, incremental }) => {
|
|
2239
2040
|
return pkg ? await recompilePackage({
|
|
2240
2041
|
pkg,
|
|
@@ -2295,7 +2096,7 @@ var recompileAll = /* @__PURE__ */ __name(async ({ jobs, verbose, target, increm
|
|
|
2295
2096
|
`${jobs}`
|
|
2296
2097
|
] : [];
|
|
2297
2098
|
if (jobs) {
|
|
2298
|
-
console.log(
|
|
2099
|
+
console.log(chalk27.blue(`Jobs set to [${jobs}]`));
|
|
2299
2100
|
}
|
|
2300
2101
|
const result = await runStepsAsync(`Recompile${incremental ? "-Incremental" : ""} [All]`, [
|
|
2301
2102
|
[
|
|
@@ -2312,7 +2113,7 @@ var recompileAll = /* @__PURE__ */ __name(async ({ jobs, verbose, target, increm
|
|
|
2312
2113
|
]
|
|
2313
2114
|
]
|
|
2314
2115
|
]);
|
|
2315
|
-
console.log(`${
|
|
2116
|
+
console.log(`${chalk27.gray("Recompiled in")} [${chalk27.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${chalk27.gray("seconds")}`);
|
|
2316
2117
|
return result;
|
|
2317
2118
|
}, "recompileAll");
|
|
2318
2119
|
|
|
@@ -2412,7 +2213,7 @@ var sonar = /* @__PURE__ */ __name(() => {
|
|
|
2412
2213
|
}, "sonar");
|
|
2413
2214
|
|
|
2414
2215
|
// src/actions/statics.ts
|
|
2415
|
-
import
|
|
2216
|
+
import chalk28 from "chalk";
|
|
2416
2217
|
var DefaultDependencies = [
|
|
2417
2218
|
"axios",
|
|
2418
2219
|
"@xylabs/pixel",
|
|
@@ -2423,7 +2224,7 @@ var DefaultDependencies = [
|
|
|
2423
2224
|
"@mui/system"
|
|
2424
2225
|
];
|
|
2425
2226
|
var statics = /* @__PURE__ */ __name(() => {
|
|
2426
|
-
console.log(
|
|
2227
|
+
console.log(chalk28.green("Check Required Static Dependencies"));
|
|
2427
2228
|
const statics2 = parsedPackageJSON()?.xy?.deps?.statics;
|
|
2428
2229
|
return detectDuplicateDependencies(statics2, DefaultDependencies);
|
|
2429
2230
|
}, "statics");
|
|
@@ -2541,7 +2342,7 @@ var loadPackageConfig = /* @__PURE__ */ __name(async () => {
|
|
|
2541
2342
|
}, "loadPackageConfig");
|
|
2542
2343
|
|
|
2543
2344
|
// src/xy/xy.ts
|
|
2544
|
-
import
|
|
2345
|
+
import chalk30 from "chalk";
|
|
2545
2346
|
|
|
2546
2347
|
// src/xy/xyBuildCommands.ts
|
|
2547
2348
|
var xyBuildCommands = /* @__PURE__ */ __name((args) => {
|
|
@@ -2777,7 +2578,7 @@ var xyInstallCommands = /* @__PURE__ */ __name((args) => {
|
|
|
2777
2578
|
}, "xyInstallCommands");
|
|
2778
2579
|
|
|
2779
2580
|
// src/xy/xyLintCommands.ts
|
|
2780
|
-
import
|
|
2581
|
+
import chalk29 from "chalk";
|
|
2781
2582
|
var xyLintCommands = /* @__PURE__ */ __name((args) => {
|
|
2782
2583
|
return args.command("cycle [package]", "Cycle - Check for dependency cycles", (yargs2) => {
|
|
2783
2584
|
return packagePositionalParam(yargs2);
|
|
@@ -2785,7 +2586,7 @@ var xyLintCommands = /* @__PURE__ */ __name((args) => {
|
|
|
2785
2586
|
const start = Date.now();
|
|
2786
2587
|
if (argv.verbose) console.log("Cycle");
|
|
2787
2588
|
process.exitCode = cycle();
|
|
2788
|
-
console.log(
|
|
2589
|
+
console.log(chalk29.blue(`Finished in ${Date.now() - start}ms`));
|
|
2789
2590
|
}).command("lint [package]", "Lint - Run Eslint", (yargs2) => {
|
|
2790
2591
|
return packagePositionalParam(yargs2);
|
|
2791
2592
|
}, async (argv) => {
|
|
@@ -2794,21 +2595,21 @@ var xyLintCommands = /* @__PURE__ */ __name((args) => {
|
|
|
2794
2595
|
process.exitCode = argv.fix ? fix() : argv.profile ? lintProfile() : await lint({
|
|
2795
2596
|
pkg: argv.package
|
|
2796
2597
|
});
|
|
2797
|
-
console.log(
|
|
2598
|
+
console.log(chalk29.blue(`Finished in ${Date.now() - start}ms`));
|
|
2798
2599
|
}).command("fix [package]", "Fix - Run Eslint w/fix", (yargs2) => {
|
|
2799
2600
|
return packagePositionalParam(yargs2);
|
|
2800
2601
|
}, (argv) => {
|
|
2801
2602
|
const start = Date.now();
|
|
2802
2603
|
if (argv.verbose) console.log("Fix");
|
|
2803
2604
|
process.exitCode = fix();
|
|
2804
|
-
console.log(
|
|
2605
|
+
console.log(chalk29.blue(`Finished in ${Date.now() - start}ms`));
|
|
2805
2606
|
}).command("relint [package]", "Relint - Clean & Lint", (yargs2) => {
|
|
2806
2607
|
return packagePositionalParam(yargs2);
|
|
2807
2608
|
}, (argv) => {
|
|
2808
2609
|
if (argv.verbose) console.log("Relinting");
|
|
2809
2610
|
const start = Date.now();
|
|
2810
2611
|
process.exitCode = relint();
|
|
2811
|
-
console.log(
|
|
2612
|
+
console.log(chalk29.blue(`Finished in ${Date.now() - start}ms`));
|
|
2812
2613
|
}).command("publint [package]", "Publint - Run Publint", (yargs2) => {
|
|
2813
2614
|
return packagePositionalParam(yargs2);
|
|
2814
2615
|
}, async (argv) => {
|
|
@@ -2818,14 +2619,14 @@ var xyLintCommands = /* @__PURE__ */ __name((args) => {
|
|
|
2818
2619
|
pkg: argv.package,
|
|
2819
2620
|
verbose: !!argv.verbose
|
|
2820
2621
|
});
|
|
2821
|
-
console.log(
|
|
2622
|
+
console.log(chalk29.blue(`Finished in ${Date.now() - start}ms`));
|
|
2822
2623
|
}).command("sonar", "Sonar - Run Sonar Check", (yargs2) => {
|
|
2823
2624
|
return packagePositionalParam(yargs2);
|
|
2824
2625
|
}, (argv) => {
|
|
2825
2626
|
const start = Date.now();
|
|
2826
2627
|
if (argv.verbose) console.log("Sonar Check");
|
|
2827
2628
|
process.exitCode = sonar();
|
|
2828
|
-
console.log(
|
|
2629
|
+
console.log(chalk29.blue(`Finished in ${Date.now() - start}ms`));
|
|
2829
2630
|
});
|
|
2830
2631
|
}, "xyLintCommands");
|
|
2831
2632
|
|
|
@@ -2878,8 +2679,8 @@ var xyParseOptions = /* @__PURE__ */ __name(() => {
|
|
|
2878
2679
|
var xy = /* @__PURE__ */ __name(async () => {
|
|
2879
2680
|
const options = xyParseOptions();
|
|
2880
2681
|
return await xyBuildCommands(xyCommonCommands(xyInstallCommands(xyDeployCommands(xyLintCommands(options))))).demandCommand(1).command("*", "", () => {
|
|
2881
|
-
console.error(
|
|
2882
|
-
console.log(
|
|
2682
|
+
console.error(chalk30.yellow(`Command not found [${chalk30.magenta(process.argv[2])}]`));
|
|
2683
|
+
console.log(chalk30.gray("Try 'yarn xy --help' for list of commands"));
|
|
2883
2684
|
}).version().help().argv;
|
|
2884
2685
|
}, "xy");
|
|
2885
2686
|
export {
|