@xylabs/ts-scripts-yarn3 3.14.2 → 3.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/build.cjs +208 -0
- package/dist/actions/build.cjs.map +1 -0
- package/dist/actions/build.mjs +164 -13
- package/dist/actions/build.mjs.map +1 -1
- package/dist/actions/{clean-docs.js → clean-docs.cjs} +33 -7
- package/dist/actions/clean-docs.cjs.map +1 -0
- package/dist/actions/clean-docs.mjs +31 -4
- package/dist/actions/clean-docs.mjs.map +1 -1
- package/dist/actions/{clean-eslint.js → clean-eslint.cjs} +11 -6
- package/dist/actions/clean-eslint.cjs.map +1 -0
- package/dist/actions/clean-eslint.mjs +9 -3
- package/dist/actions/clean-eslint.mjs.map +1 -1
- package/dist/actions/clean-jest.cjs +147 -0
- package/dist/actions/clean-jest.cjs.map +1 -0
- package/dist/actions/clean-jest.mjs +107 -4
- package/dist/actions/clean-jest.mjs.map +1 -1
- package/dist/actions/clean.cjs +192 -0
- package/dist/actions/clean.cjs.map +1 -0
- package/dist/actions/clean.mjs +149 -11
- package/dist/actions/clean.mjs.map +1 -1
- package/dist/actions/compile.cjs +217 -0
- package/dist/actions/compile.cjs.map +1 -0
- package/dist/actions/compile.mjs +169 -17
- package/dist/actions/compile.mjs.map +1 -1
- package/dist/actions/{copy-assets.js → copy-assets.cjs} +54 -26
- package/dist/actions/copy-assets.cjs.map +1 -0
- package/dist/actions/copy-assets.mjs +50 -21
- package/dist/actions/copy-assets.mjs.map +1 -1
- package/dist/actions/cycle.cjs +156 -0
- package/dist/actions/cycle.cjs.map +1 -0
- package/dist/actions/cycle.mjs +117 -5
- package/dist/actions/cycle.mjs.map +1 -1
- package/dist/actions/dead.cjs +148 -0
- package/dist/actions/dead.cjs.map +1 -0
- package/dist/actions/dead.mjs +109 -4
- package/dist/actions/dead.mjs.map +1 -1
- package/dist/actions/deploy-major.cjs +160 -0
- package/dist/actions/deploy-major.cjs.map +1 -0
- package/dist/actions/deploy-major.mjs +119 -8
- package/dist/actions/deploy-major.mjs.map +1 -1
- package/dist/actions/deploy-minor.cjs +160 -0
- package/dist/actions/deploy-minor.cjs.map +1 -0
- package/dist/actions/deploy-minor.mjs +119 -8
- package/dist/actions/deploy-minor.mjs.map +1 -1
- package/dist/actions/deploy-next.cjs +160 -0
- package/dist/actions/deploy-next.cjs.map +1 -0
- package/dist/actions/deploy-next.mjs +119 -8
- package/dist/actions/deploy-next.mjs.map +1 -1
- package/dist/actions/deploy.cjs +160 -0
- package/dist/actions/deploy.cjs.map +1 -0
- package/dist/actions/deploy.mjs +119 -8
- package/dist/actions/deploy.mjs.map +1 -1
- package/dist/actions/deps.cjs +205 -0
- package/dist/actions/deps.cjs.map +1 -0
- package/dist/actions/deps.mjs +158 -17
- package/dist/actions/deps.mjs.map +1 -1
- package/dist/actions/dupdeps.cjs +229 -0
- package/dist/actions/dupdeps.cjs.map +1 -0
- package/dist/actions/dupdeps.mjs +189 -6
- package/dist/actions/dupdeps.mjs.map +1 -1
- package/dist/actions/fix.cjs +149 -0
- package/dist/actions/fix.cjs.map +1 -0
- package/dist/actions/fix.mjs +110 -4
- package/dist/actions/fix.mjs.map +1 -1
- package/dist/actions/gen-docs.cjs +186 -0
- package/dist/actions/gen-docs.cjs.map +1 -0
- package/dist/actions/gen-docs.mjs +143 -13
- package/dist/actions/gen-docs.mjs.map +1 -1
- package/dist/actions/gitignore-gen.cjs +138 -0
- package/dist/actions/gitignore-gen.cjs.map +1 -0
- package/dist/actions/gitignore-gen.mjs +99 -3
- package/dist/actions/gitignore-gen.mjs.map +1 -1
- package/dist/actions/{gitlint-fix.js → gitlint-fix.cjs} +19 -10
- package/dist/actions/gitlint-fix.cjs.map +1 -0
- package/dist/actions/gitlint-fix.mjs +17 -7
- package/dist/actions/gitlint-fix.mjs.map +1 -1
- package/dist/actions/{gitlint.js → gitlint.cjs} +11 -8
- package/dist/actions/gitlint.cjs.map +1 -0
- package/dist/actions/gitlint.mjs +10 -6
- package/dist/actions/gitlint.mjs.map +1 -1
- package/dist/actions/index.cjs +2598 -0
- package/dist/actions/index.cjs.map +1 -0
- package/dist/actions/index.mjs +2499 -38
- package/dist/actions/index.mjs.map +1 -1
- package/dist/actions/license.cjs +133 -0
- package/dist/actions/license.cjs.map +1 -0
- package/dist/actions/license.mjs +65 -37
- package/dist/actions/license.mjs.map +1 -1
- package/dist/actions/lint-clean.cjs +227 -0
- package/dist/actions/lint-clean.cjs.map +1 -0
- package/dist/actions/lint-clean.mjs +176 -5
- package/dist/actions/lint-clean.mjs.map +1 -1
- package/dist/actions/lint-profile.cjs +153 -0
- package/dist/actions/lint-profile.cjs.map +1 -0
- package/dist/actions/lint-profile.mjs +114 -4
- package/dist/actions/lint-profile.mjs.map +1 -1
- package/dist/actions/lint.cjs +217 -0
- package/dist/actions/lint.cjs.map +1 -0
- package/dist/actions/lint.mjs +159 -23
- package/dist/actions/lint.mjs.map +1 -1
- package/dist/actions/npmignore-gen.cjs +138 -0
- package/dist/actions/npmignore-gen.cjs.map +1 -0
- package/dist/actions/npmignore-gen.mjs +99 -3
- package/dist/actions/npmignore-gen.mjs.map +1 -1
- package/dist/actions/package/{clean-outputs.js → clean-outputs.cjs} +13 -6
- package/dist/actions/package/clean-outputs.cjs.map +1 -0
- package/dist/actions/package/clean-outputs.mjs +11 -3
- package/dist/actions/package/clean-outputs.mjs.map +1 -1
- package/dist/actions/package/{clean-typescript.js → clean-typescript.cjs} +13 -6
- package/dist/actions/package/clean-typescript.cjs.map +1 -0
- package/dist/actions/package/clean-typescript.mjs +11 -3
- package/dist/actions/package/clean-typescript.mjs.map +1 -1
- package/dist/actions/package/clean.cjs +83 -0
- package/dist/actions/package/clean.cjs.map +1 -0
- package/dist/actions/package/clean.mjs +44 -5
- package/dist/actions/package/clean.mjs.map +1 -1
- package/dist/actions/package/compile/{XyConfig.js → XyConfig.cjs} +3 -1
- package/dist/actions/package/compile/{XyConfig.js.map → XyConfig.cjs.map} +1 -1
- package/dist/actions/package/compile/{buildEntries.js → buildEntries.cjs} +30 -7
- package/dist/actions/package/compile/buildEntries.cjs.map +1 -0
- package/dist/actions/package/compile/buildEntries.mjs +26 -5
- package/dist/actions/package/compile/buildEntries.mjs.map +1 -1
- package/dist/actions/package/compile/compile.cjs +560 -0
- package/dist/actions/package/compile/compile.cjs.map +1 -0
- package/dist/actions/package/compile/compile.mjs +510 -14
- package/dist/actions/package/compile/compile.mjs.map +1 -1
- package/dist/actions/package/compile/{copyTypeFiles.js → copyTypeFiles.cjs} +26 -23
- package/dist/actions/package/compile/{copyTypeFiles.js.map → copyTypeFiles.cjs.map} +1 -1
- package/dist/actions/package/compile/copyTypeFiles.mjs +25 -21
- package/dist/actions/package/compile/copyTypeFiles.mjs.map +1 -1
- package/dist/actions/package/compile/{getCompilerOptions.js → getCompilerOptions.cjs} +21 -24
- package/dist/actions/package/compile/getCompilerOptions.cjs.map +1 -0
- package/dist/actions/package/compile/getCompilerOptions.mjs +19 -12
- package/dist/actions/package/compile/getCompilerOptions.mjs.map +1 -1
- package/dist/actions/package/compile/index.cjs +566 -0
- package/dist/actions/package/compile/index.cjs.map +1 -0
- package/dist/actions/package/compile/index.mjs +526 -4
- package/dist/actions/package/compile/index.mjs.map +1 -1
- package/dist/actions/package/compile/{inputs.js → inputs.cjs} +29 -17
- package/dist/actions/package/compile/inputs.cjs.map +1 -0
- package/dist/actions/package/compile/inputs.mjs +28 -15
- package/dist/actions/package/compile/inputs.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTsc.cjs +164 -0
- package/dist/actions/package/compile/packageCompileTsc.cjs.map +1 -0
- package/dist/actions/package/compile/packageCompileTsc.mjs +103 -24
- package/dist/actions/package/compile/packageCompileTsc.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTscTypes.cjs +199 -0
- package/dist/actions/package/compile/packageCompileTscTypes.cjs.map +1 -0
- package/dist/actions/package/compile/packageCompileTscTypes.mjs +111 -11
- package/dist/actions/package/compile/packageCompileTscTypes.mjs.map +1 -1
- package/dist/actions/package/compile/packageCompileTsup.cjs +516 -0
- package/dist/actions/package/compile/packageCompileTsup.cjs.map +1 -0
- package/dist/actions/package/compile/packageCompileTsup.mjs +456 -164
- package/dist/actions/package/compile/packageCompileTsup.mjs.map +1 -1
- package/dist/actions/package/{copy-assets.js → copy-assets.cjs} +25 -16
- package/dist/actions/package/{copy-assets.js.map → copy-assets.cjs.map} +1 -1
- package/dist/actions/package/copy-assets.mjs +22 -12
- package/dist/actions/package/copy-assets.mjs.map +1 -1
- package/dist/actions/package/{deps.js → deps.cjs} +103 -38
- package/dist/actions/package/deps.cjs.map +1 -0
- package/dist/actions/package/deps.mjs +99 -33
- package/dist/actions/package/deps.mjs.map +1 -1
- package/dist/actions/package/{gen-docs.js → gen-docs.cjs} +16 -10
- package/dist/actions/package/{gen-docs.js.map → gen-docs.cjs.map} +1 -1
- package/dist/actions/package/gen-docs.mjs +13 -6
- package/dist/actions/package/gen-docs.mjs.map +1 -1
- package/dist/actions/package/index.cjs +963 -0
- package/dist/actions/package/index.cjs.map +1 -0
- package/dist/actions/package/index.mjs +915 -9
- package/dist/actions/package/index.mjs.map +1 -1
- package/dist/actions/package/{publint.js → publint.cjs} +11 -8
- package/dist/actions/package/publint.cjs.map +1 -0
- package/dist/actions/package/publint.mjs +9 -5
- package/dist/actions/package/publint.mjs.map +1 -1
- package/dist/actions/package/recompile.cjs +612 -0
- package/dist/actions/package/recompile.cjs.map +1 -0
- package/dist/actions/package/recompile.mjs +571 -5
- package/dist/actions/package/recompile.mjs.map +1 -1
- package/dist/actions/publint.cjs +237 -0
- package/dist/actions/publint.cjs.map +1 -0
- package/dist/actions/publint.mjs +194 -11
- package/dist/actions/publint.mjs.map +1 -1
- package/dist/actions/rebuild.cjs +148 -0
- package/dist/actions/rebuild.cjs.map +1 -0
- package/dist/actions/rebuild.mjs +107 -5
- package/dist/actions/rebuild.mjs.map +1 -1
- package/dist/actions/recompile.cjs +232 -0
- package/dist/actions/recompile.cjs.map +1 -0
- package/dist/actions/recompile.mjs +184 -18
- package/dist/actions/recompile.mjs.map +1 -1
- package/dist/actions/reinstall.cjs +183 -0
- package/dist/actions/reinstall.cjs.map +1 -0
- package/dist/actions/reinstall.mjs +131 -5
- package/dist/actions/reinstall.mjs.map +1 -1
- package/dist/actions/relint.cjs +185 -0
- package/dist/actions/relint.cjs.map +1 -0
- package/dist/actions/relint.mjs +135 -5
- package/dist/actions/relint.mjs.map +1 -1
- package/dist/actions/retest.cjs +154 -0
- package/dist/actions/retest.cjs.map +1 -0
- package/dist/actions/retest.mjs +113 -5
- package/dist/actions/retest.mjs.map +1 -1
- package/dist/actions/sonar.cjs +149 -0
- package/dist/actions/sonar.cjs.map +1 -0
- package/dist/actions/sonar.mjs +110 -4
- package/dist/actions/sonar.mjs.map +1 -1
- package/dist/actions/statics.cjs +237 -0
- package/dist/actions/statics.cjs.map +1 -0
- package/dist/actions/statics.mjs +198 -7
- package/dist/actions/statics.mjs.map +1 -1
- package/dist/actions/test.cjs +147 -0
- package/dist/actions/test.cjs.map +1 -0
- package/dist/actions/test.mjs +108 -4
- package/dist/actions/test.mjs.map +1 -1
- package/dist/actions/up.cjs +144 -0
- package/dist/actions/up.cjs.map +1 -0
- package/dist/actions/up.mjs +105 -4
- package/dist/actions/up.mjs.map +1 -1
- package/dist/actions/updo.cjs +152 -0
- package/dist/actions/updo.cjs.map +1 -0
- package/dist/actions/updo.mjs +111 -6
- package/dist/actions/updo.mjs.map +1 -1
- package/dist/actions/upplug.cjs +172 -0
- package/dist/actions/upplug.cjs.map +1 -0
- package/dist/actions/upplug.mjs +131 -7
- package/dist/actions/upplug.mjs.map +1 -1
- package/dist/actions/upyarn.cjs +148 -0
- package/dist/actions/upyarn.cjs.map +1 -0
- package/dist/actions/upyarn.mjs +109 -4
- package/dist/actions/upyarn.mjs.map +1 -1
- package/dist/actions/yarn3only.cjs +106 -0
- package/dist/actions/yarn3only.cjs.map +1 -0
- package/dist/actions/yarn3only.mjs +62 -3
- package/dist/actions/yarn3only.mjs.map +1 -1
- package/dist/bin/build.cjs +39 -0
- package/dist/bin/build.cjs.map +1 -0
- package/dist/bin/build.mjs +15 -11
- package/dist/bin/build.mjs.map +1 -1
- package/dist/bin/clean.cjs +39 -0
- package/dist/bin/clean.cjs.map +1 -0
- package/dist/bin/clean.mjs +15 -11
- package/dist/bin/clean.mjs.map +1 -1
- package/dist/bin/compile-only.cjs +39 -0
- package/dist/bin/compile-only.cjs.map +1 -0
- package/dist/bin/compile-only.mjs +15 -11
- package/dist/bin/compile-only.mjs.map +1 -1
- package/dist/bin/compile.cjs +39 -0
- package/dist/bin/compile.cjs.map +1 -0
- package/dist/bin/compile.mjs +15 -11
- package/dist/bin/compile.mjs.map +1 -1
- package/dist/bin/cycle.cjs +39 -0
- package/dist/bin/cycle.cjs.map +1 -0
- package/dist/bin/cycle.mjs +15 -11
- package/dist/bin/cycle.mjs.map +1 -1
- package/dist/bin/{package/copy-assets-cjs.js → dead.cjs} +15 -7
- package/dist/bin/dead.cjs.map +1 -0
- package/dist/bin/dead.mjs +15 -11
- package/dist/bin/dead.mjs.map +1 -1
- package/dist/bin/deploy-major.cjs +39 -0
- package/dist/bin/deploy-major.cjs.map +1 -0
- package/dist/bin/deploy-major.mjs +15 -11
- package/dist/bin/deploy-major.mjs.map +1 -1
- package/dist/bin/deploy-minor.cjs +39 -0
- package/dist/bin/deploy-minor.cjs.map +1 -0
- package/dist/bin/deploy-minor.mjs +15 -11
- package/dist/bin/deploy-minor.mjs.map +1 -1
- package/dist/bin/deploy-next.cjs +39 -0
- package/dist/bin/deploy-next.cjs.map +1 -0
- package/dist/bin/deploy-next.mjs +15 -11
- package/dist/bin/deploy-next.mjs.map +1 -1
- package/dist/bin/deploy.cjs +39 -0
- package/dist/bin/deploy.cjs.map +1 -0
- package/dist/bin/deploy.mjs +15 -11
- package/dist/bin/deploy.mjs.map +1 -1
- package/dist/bin/deps.cjs +39 -0
- package/dist/bin/deps.cjs.map +1 -0
- package/dist/bin/deps.mjs +15 -11
- package/dist/bin/deps.mjs.map +1 -1
- package/dist/bin/{package/compile-tsup.js → fix.cjs} +15 -7
- package/dist/bin/fix.cjs.map +1 -0
- package/dist/bin/fix.mjs +15 -11
- package/dist/bin/fix.mjs.map +1 -1
- package/dist/bin/gen-docs.cjs +39 -0
- package/dist/bin/gen-docs.cjs.map +1 -0
- package/dist/bin/gen-docs.mjs +15 -11
- package/dist/bin/gen-docs.mjs.map +1 -1
- package/dist/bin/gitlint-fix.cjs +39 -0
- package/dist/bin/gitlint-fix.cjs.map +1 -0
- package/dist/bin/gitlint-fix.mjs +15 -11
- package/dist/bin/gitlint-fix.mjs.map +1 -1
- package/dist/bin/gitlint.cjs +39 -0
- package/dist/bin/gitlint.cjs.map +1 -0
- package/dist/bin/gitlint.mjs +15 -11
- package/dist/bin/gitlint.mjs.map +1 -1
- package/dist/bin/license.cjs +39 -0
- package/dist/bin/license.cjs.map +1 -0
- package/dist/bin/license.mjs +15 -11
- package/dist/bin/license.mjs.map +1 -1
- package/dist/bin/lint-clean.cjs +39 -0
- package/dist/bin/lint-clean.cjs.map +1 -0
- package/dist/bin/lint-clean.mjs +15 -11
- package/dist/bin/lint-clean.mjs.map +1 -1
- package/dist/bin/lint-fast.cjs +39 -0
- package/dist/bin/lint-fast.cjs.map +1 -0
- package/dist/bin/lint-fast.mjs +15 -11
- package/dist/bin/lint-fast.mjs.map +1 -1
- package/dist/bin/lint-profile.cjs +39 -0
- package/dist/bin/lint-profile.cjs.map +1 -0
- package/dist/bin/lint-profile.mjs +15 -11
- package/dist/bin/lint-profile.mjs.map +1 -1
- package/dist/bin/lint.cjs +39 -0
- package/dist/bin/lint.cjs.map +1 -0
- package/dist/bin/lint.mjs +15 -11
- package/dist/bin/lint.mjs.map +1 -1
- package/dist/bin/package/clean-outputs.cjs +51 -0
- package/dist/bin/package/clean-outputs.cjs.map +1 -0
- package/dist/bin/package/clean-outputs.mjs +26 -15
- package/dist/bin/package/clean-outputs.mjs.map +1 -1
- package/dist/bin/package/clean-typescript.cjs +51 -0
- package/dist/bin/package/clean-typescript.cjs.map +1 -0
- package/dist/bin/package/clean-typescript.mjs +26 -15
- package/dist/bin/package/clean-typescript.mjs.map +1 -1
- package/dist/bin/package/clean.cjs +76 -0
- package/dist/bin/package/clean.cjs.map +1 -0
- package/dist/bin/package/clean.mjs +51 -15
- package/dist/bin/package/clean.mjs.map +1 -1
- package/dist/bin/package/compile-only.cjs +559 -0
- package/dist/bin/package/compile-only.cjs.map +1 -0
- package/dist/bin/package/compile-only.mjs +530 -12
- package/dist/bin/package/compile-only.mjs.map +1 -1
- package/dist/bin/package/compile-tsup.cjs +514 -0
- package/dist/bin/package/compile-tsup.cjs.map +1 -0
- package/dist/bin/package/compile-tsup.mjs +485 -12
- package/dist/bin/package/compile-tsup.mjs.map +1 -1
- package/dist/bin/package/compile.cjs +562 -0
- package/dist/bin/package/compile.cjs.map +1 -0
- package/dist/bin/package/compile.mjs +532 -15
- package/dist/bin/package/compile.mjs.map +1 -1
- package/dist/bin/package/copy-assets-cjs.cjs +86 -0
- package/dist/bin/package/copy-assets-cjs.cjs.map +1 -0
- package/dist/bin/package/copy-assets-cjs.mjs +58 -11
- package/dist/bin/package/copy-assets-cjs.mjs.map +1 -1
- package/dist/bin/package/copy-assets-esm.cjs +86 -0
- package/dist/bin/package/copy-assets-esm.cjs.map +1 -0
- package/dist/bin/package/copy-assets-esm.mjs +58 -11
- package/dist/bin/package/copy-assets-esm.mjs.map +1 -1
- package/dist/bin/package/deps.cjs +208 -0
- package/dist/bin/package/deps.cjs.map +1 -0
- package/dist/bin/package/deps.mjs +181 -12
- package/dist/bin/package/deps.mjs.map +1 -1
- package/dist/bin/package/gen-docs.cjs +143 -0
- package/dist/bin/package/gen-docs.cjs.map +1 -0
- package/dist/bin/package/gen-docs.mjs +115 -12
- package/dist/bin/package/gen-docs.mjs.map +1 -1
- package/dist/bin/package/publint.cjs +77 -0
- package/dist/bin/package/publint.cjs.map +1 -0
- package/dist/bin/package/publint.mjs +50 -13
- package/dist/bin/package/publint.mjs.map +1 -1
- package/dist/bin/package/recompile.cjs +606 -0
- package/dist/bin/package/recompile.cjs.map +1 -0
- package/dist/bin/package/recompile.mjs +577 -12
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/bin/publint.cjs +39 -0
- package/dist/bin/publint.cjs.map +1 -0
- package/dist/bin/publint.mjs +15 -11
- package/dist/bin/publint.mjs.map +1 -1
- package/dist/bin/rebuild.cjs +39 -0
- package/dist/bin/rebuild.cjs.map +1 -0
- package/dist/bin/rebuild.mjs +15 -11
- package/dist/bin/rebuild.mjs.map +1 -1
- package/dist/bin/recompile.cjs +39 -0
- package/dist/bin/recompile.cjs.map +1 -0
- package/dist/bin/recompile.mjs +15 -11
- package/dist/bin/recompile.mjs.map +1 -1
- package/dist/bin/reinstall.cjs +39 -0
- package/dist/bin/reinstall.cjs.map +1 -0
- package/dist/bin/reinstall.mjs +15 -11
- package/dist/bin/reinstall.mjs.map +1 -1
- package/dist/bin/relint.cjs +39 -0
- package/dist/bin/relint.cjs.map +1 -0
- package/dist/bin/relint.mjs +15 -11
- package/dist/bin/relint.mjs.map +1 -1
- package/dist/bin/sonar.cjs +39 -0
- package/dist/bin/sonar.cjs.map +1 -0
- package/dist/bin/sonar.mjs +15 -11
- package/dist/bin/sonar.mjs.map +1 -1
- package/dist/bin/test.cjs +39 -0
- package/dist/bin/test.cjs.map +1 -0
- package/dist/bin/test.mjs +15 -11
- package/dist/bin/test.mjs.map +1 -1
- package/dist/bin/{package/deps.js → up.cjs} +15 -7
- package/dist/bin/up.cjs.map +1 -0
- package/dist/bin/up.mjs +15 -11
- package/dist/bin/up.mjs.map +1 -1
- package/dist/bin/updo.cjs +39 -0
- package/dist/bin/updo.cjs.map +1 -0
- package/dist/bin/updo.mjs +15 -11
- package/dist/bin/updo.mjs.map +1 -1
- package/dist/bin/upplug.cjs +39 -0
- package/dist/bin/upplug.cjs.map +1 -0
- package/dist/bin/upplug.mjs +15 -11
- package/dist/bin/upplug.mjs.map +1 -1
- package/dist/bin/upyarn.cjs +39 -0
- package/dist/bin/upyarn.cjs.map +1 -0
- package/dist/bin/upyarn.mjs +15 -11
- package/dist/bin/upyarn.mjs.map +1 -1
- package/dist/bin/xy-ts.cjs +1893 -0
- package/dist/bin/xy-ts.cjs.map +1 -0
- package/dist/bin/xy-ts.mjs +1865 -12
- package/dist/bin/xy-ts.mjs.map +1 -1
- package/dist/bin/xy.cjs +1893 -0
- package/dist/bin/xy.cjs.map +1 -0
- package/dist/bin/xy.mjs +1865 -12
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/bin/yarn3only.cjs +39 -0
- package/dist/bin/yarn3only.cjs.map +1 -0
- package/dist/bin/yarn3only.mjs +15 -11
- package/dist/bin/yarn3only.mjs.map +1 -1
- package/dist/index.cjs +3127 -0
- package/dist/index.cjs.map +1 -0
- package/dist/{index.d.mts → index.d.cts} +1 -19
- package/dist/index.d.ts +1 -19
- package/dist/index.mjs +2987 -4
- package/dist/index.mjs.map +1 -1
- package/dist/lib/{checkResult.js → checkResult.cjs} +7 -4
- package/dist/lib/{checkResult.js.map → checkResult.cjs.map} +1 -1
- package/dist/lib/checkResult.mjs +6 -2
- package/dist/lib/checkResult.mjs.map +1 -1
- package/dist/lib/{createBuildConfig.js → createBuildConfig.cjs} +48 -13
- package/dist/lib/createBuildConfig.cjs.map +1 -0
- package/dist/lib/createBuildConfig.mjs +46 -10
- package/dist/lib/createBuildConfig.mjs.map +1 -1
- package/dist/lib/{defaultBuildConfig.js → defaultBuildConfig.cjs} +21 -5
- package/dist/lib/{defaultBuildConfig.js.map → defaultBuildConfig.cjs.map} +1 -1
- package/dist/lib/defaultBuildConfig.mjs +19 -4
- package/dist/lib/defaultBuildConfig.mjs.map +1 -1
- package/dist/lib/dependencies/{DuplicateDetector.js → DuplicateDetector.cjs} +39 -17
- package/dist/lib/dependencies/DuplicateDetector.cjs.map +1 -0
- package/dist/lib/dependencies/DuplicateDetector.mjs +35 -12
- package/dist/lib/dependencies/DuplicateDetector.mjs.map +1 -1
- package/dist/lib/dependencies/detectDuplicateDependencies.cjs +210 -0
- package/dist/lib/dependencies/detectDuplicateDependencies.cjs.map +1 -0
- package/dist/lib/dependencies/detectDuplicateDependencies.mjs +140 -5
- package/dist/lib/dependencies/detectDuplicateDependencies.mjs.map +1 -1
- package/dist/lib/dependencies/index.cjs +214 -0
- package/dist/lib/dependencies/index.cjs.map +1 -0
- package/dist/lib/dependencies/index.mjs +177 -2
- package/dist/lib/dependencies/index.mjs.map +1 -1
- package/dist/lib/file/{ReadFileSyncOptions.js → ReadFileSyncOptions.cjs} +6 -2
- package/dist/lib/file/{ReadFileSyncOptions.js.map → ReadFileSyncOptions.cjs.map} +1 -1
- package/dist/lib/file/ReadFileSyncOptions.mjs +4 -1
- package/dist/lib/file/ReadFileSyncOptions.mjs.map +1 -1
- package/dist/lib/file/{constants.js → constants.cjs} +5 -3
- package/dist/lib/file/{constants.js.map → constants.cjs.map} +1 -1
- package/dist/lib/file/constants.mjs +3 -2
- package/dist/lib/file/constants.mjs.map +1 -1
- package/dist/lib/file/{fileLines.js → fileLines.cjs} +25 -10
- package/dist/lib/file/fileLines.cjs.map +1 -0
- package/dist/lib/file/fileLines.mjs +23 -7
- package/dist/lib/file/fileLines.mjs.map +1 -1
- package/dist/lib/file/index.cjs +74 -0
- package/dist/lib/file/index.cjs.map +1 -0
- package/dist/lib/file/index.mjs +42 -4
- package/dist/lib/file/index.mjs.map +1 -1
- package/dist/lib/file/{tryReadFileSync.js → tryReadFileSync.cjs} +14 -5
- package/dist/lib/file/tryReadFileSync.cjs.map +1 -0
- package/dist/lib/file/tryReadFileSync.mjs +13 -3
- package/dist/lib/file/tryReadFileSync.mjs.map +1 -1
- package/dist/lib/generateIgnoreFiles.cjs +132 -0
- package/dist/lib/generateIgnoreFiles.cjs.map +1 -0
- package/dist/lib/generateIgnoreFiles.mjs +80 -9
- package/dist/lib/generateIgnoreFiles.mjs.map +1 -1
- package/dist/lib/index.cjs +617 -0
- package/dist/lib/index.cjs.map +1 -0
- package/dist/lib/index.mjs +549 -19
- package/dist/lib/index.mjs.map +1 -1
- package/dist/lib/{jsonFormatters.js → jsonFormatters.cjs} +6 -3
- package/dist/lib/jsonFormatters.cjs.map +1 -0
- package/dist/lib/jsonFormatters.mjs +6 -2
- package/dist/lib/jsonFormatters.mjs.map +1 -1
- package/dist/lib/{loadConfig.js → loadConfig.cjs} +16 -11
- package/dist/lib/loadConfig.cjs.map +1 -0
- package/dist/lib/loadConfig.mjs +13 -7
- package/dist/lib/loadConfig.mjs.map +1 -1
- package/dist/lib/{parsedPackageJSON.js → parsedPackageJSON.cjs} +7 -4
- package/dist/lib/{parsedPackageJSON.js.map → parsedPackageJSON.cjs.map} +1 -1
- package/dist/lib/parsedPackageJSON.mjs +6 -2
- package/dist/lib/parsedPackageJSON.mjs.map +1 -1
- package/dist/lib/{processEx.js → processEx.cjs} +21 -8
- package/dist/lib/processEx.cjs.map +1 -0
- package/dist/lib/processEx.mjs +18 -4
- package/dist/lib/processEx.mjs.map +1 -1
- package/dist/lib/runSteps.cjs +134 -0
- package/dist/lib/runSteps.cjs.map +1 -0
- package/dist/lib/runSteps.mjs +74 -8
- package/dist/lib/runSteps.mjs.map +1 -1
- package/dist/lib/runStepsAsync.cjs +147 -0
- package/dist/lib/runStepsAsync.cjs.map +1 -0
- package/dist/lib/runStepsAsync.mjs +77 -17
- package/dist/lib/runStepsAsync.mjs.map +1 -1
- package/dist/lib/runXy.cjs +150 -0
- package/dist/lib/runXy.cjs.map +1 -0
- package/dist/lib/runXy.mjs +111 -4
- package/dist/lib/runXy.mjs.map +1 -1
- package/dist/lib/{runXyWithWarning.js → runXyWithWarning.cjs} +7 -4
- package/dist/lib/runXyWithWarning.cjs.map +1 -0
- package/dist/lib/runXyWithWarning.mjs +6 -2
- package/dist/lib/runXyWithWarning.mjs.map +1 -1
- package/dist/lib/safeExit.cjs +100 -0
- package/dist/lib/safeExit.cjs.map +1 -0
- package/dist/lib/safeExit.mjs +41 -5
- package/dist/lib/safeExit.mjs.map +1 -1
- package/dist/lib/string/{empty.js → empty.cjs} +6 -3
- package/dist/lib/string/{empty.js.map → empty.cjs.map} +1 -1
- package/dist/lib/string/empty.mjs +6 -2
- package/dist/lib/string/empty.mjs.map +1 -1
- package/dist/{actions/up.js → lib/string/index.cjs} +23 -10
- package/dist/lib/string/index.cjs.map +1 -0
- package/dist/lib/string/index.mjs +17 -2
- package/dist/lib/string/index.mjs.map +1 -1
- package/dist/lib/string/{union.js → union.cjs} +8 -2
- package/dist/lib/string/{union.js.map → union.cjs.map} +1 -1
- package/dist/lib/string/union.mjs +8 -1
- package/dist/lib/string/union.mjs.map +1 -1
- package/dist/lib/{withErrnoException.js → withErrnoException.cjs} +14 -5
- package/dist/lib/withErrnoException.cjs.map +1 -0
- package/dist/lib/withErrnoException.mjs +11 -3
- package/dist/lib/withErrnoException.mjs.map +1 -1
- package/dist/lib/{withError.js → withError.cjs} +6 -3
- package/dist/lib/{withError.js.map → withError.cjs.map} +1 -1
- package/dist/lib/withError.mjs +6 -2
- package/dist/lib/withError.mjs.map +1 -1
- package/dist/lib/yarn/index.cjs +93 -0
- package/dist/lib/yarn/index.cjs.map +1 -0
- package/dist/lib/yarn/index.mjs +64 -3
- package/dist/lib/yarn/index.mjs.map +1 -1
- package/dist/lib/yarn/{isYarnVersionOrGreater.js → isYarnVersionOrGreater.cjs} +17 -6
- package/dist/lib/yarn/{isYarnVersionOrGreater.js.map → isYarnVersionOrGreater.cjs.map} +1 -1
- package/dist/lib/yarn/isYarnVersionOrGreater.mjs +16 -4
- package/dist/lib/yarn/isYarnVersionOrGreater.mjs.map +1 -1
- package/dist/lib/yarn/workspace/{Workspace.js → Workspace.cjs} +3 -1
- package/dist/lib/yarn/workspace/{Workspace.js.map → Workspace.cjs.map} +1 -1
- package/dist/lib/yarn/workspace/index.cjs +60 -0
- package/dist/lib/yarn/workspace/index.cjs.map +1 -0
- package/dist/lib/yarn/workspace/index.mjs +33 -3
- package/dist/lib/yarn/workspace/index.mjs.map +1 -1
- package/dist/lib/yarn/workspace/{yarnWorkspace.js → yarnWorkspace.cjs} +29 -5
- package/dist/lib/yarn/workspace/yarnWorkspace.cjs.map +1 -0
- package/dist/lib/yarn/workspace/yarnWorkspace.mjs +26 -3
- package/dist/lib/yarn/workspace/yarnWorkspace.mjs.map +1 -1
- package/dist/lib/yarn/workspace/{yarnWorkspaces.js → yarnWorkspaces.cjs} +16 -5
- package/dist/lib/yarn/workspace/yarnWorkspaces.cjs.map +1 -0
- package/dist/lib/yarn/workspace/yarnWorkspaces.mjs +15 -3
- package/dist/lib/yarn/workspace/yarnWorkspaces.mjs.map +1 -1
- package/dist/lib/yarn/{yarnInitCwd.js → yarnInitCwd.cjs} +6 -3
- package/dist/lib/yarn/yarnInitCwd.cjs.map +1 -0
- package/dist/lib/yarn/yarnInitCwd.mjs +6 -2
- package/dist/lib/yarn/yarnInitCwd.mjs.map +1 -1
- package/dist/{loadPackageConfig.js → loadPackageConfig.cjs} +10 -5
- package/dist/{loadPackageConfig.js.map → loadPackageConfig.cjs.map} +1 -1
- package/dist/loadPackageConfig.mjs +9 -3
- package/dist/loadPackageConfig.mjs.map +1 -1
- package/dist/types.d.cjs +2 -0
- package/dist/types.d.mjs +0 -9
- package/dist/types.d.mjs.map +1 -1
- package/dist/xy/index.cjs +1912 -0
- package/dist/xy/index.cjs.map +1 -0
- package/dist/xy/index.mjs +1870 -7
- package/dist/xy/index.mjs.map +1 -1
- package/dist/xy/{param.js → param.cjs} +6 -3
- package/dist/xy/{param.js.map → param.cjs.map} +1 -1
- package/dist/xy/param.mjs +6 -2
- package/dist/xy/param.mjs.map +1 -1
- package/dist/xy/xy.cjs +1898 -0
- package/dist/xy/xy.cjs.map +1 -0
- package/dist/xy/xy.mjs +1857 -10
- package/dist/xy/xy.mjs.map +1 -1
- package/dist/xy/xyBuildCommands.cjs +595 -0
- package/dist/xy/xyBuildCommands.cjs.map +1 -0
- package/dist/xy/xyBuildCommands.mjs +553 -106
- package/dist/xy/xyBuildCommands.mjs.map +1 -1
- package/dist/xy/xyCommonCommands.cjs +723 -0
- package/dist/xy/xyCommonCommands.cjs.map +1 -0
- package/dist/xy/xyCommonCommands.mjs +679 -143
- package/dist/xy/xyCommonCommands.mjs.map +1 -1
- package/dist/xy/xyDeployCommands.cjs +263 -0
- package/dist/xy/xyDeployCommands.cjs.map +1 -0
- package/dist/xy/xyDeployCommands.mjs +220 -40
- package/dist/xy/xyDeployCommands.mjs.map +1 -1
- package/dist/xy/xyInstallCommands.cjs +511 -0
- package/dist/xy/xyInstallCommands.cjs.map +1 -0
- package/dist/xy/xyInstallCommands.mjs +465 -64
- package/dist/xy/xyInstallCommands.mjs.map +1 -1
- package/dist/xy/xyLintCommands.cjs +466 -0
- package/dist/xy/xyLintCommands.cjs.map +1 -0
- package/dist/xy/xyLintCommands.mjs +422 -71
- package/dist/xy/xyLintCommands.mjs.map +1 -1
- package/dist/xy/{xyParseOptions.js → xyParseOptions.cjs} +11 -5
- package/dist/xy/xyParseOptions.cjs.map +1 -0
- package/dist/xy/xyParseOptions.mjs +10 -3
- package/dist/xy/xyParseOptions.mjs.map +1 -1
- package/package.json +68 -74
- package/src/actions/build.ts +1 -1
- package/src/actions/clean-docs.ts +1 -1
- package/src/actions/clean-jest.ts +1 -1
- package/src/actions/clean.ts +1 -1
- package/src/actions/compile.ts +1 -1
- package/src/actions/copy-assets.ts +1 -1
- package/src/actions/cycle.ts +1 -1
- package/src/actions/dead.ts +1 -1
- package/src/actions/deploy-major.ts +1 -1
- package/src/actions/deploy-minor.ts +1 -1
- package/src/actions/deploy-next.ts +1 -1
- package/src/actions/deploy.ts +1 -1
- package/src/actions/deps.ts +1 -1
- package/src/actions/dupdeps.ts +1 -1
- package/src/actions/fix.ts +1 -1
- package/src/actions/gen-docs.ts +1 -1
- package/src/actions/gitignore-gen.ts +1 -1
- package/src/actions/gitlint-fix.ts +2 -2
- package/src/actions/gitlint.ts +2 -2
- package/src/actions/index.ts +38 -38
- package/src/actions/license.ts +1 -1
- package/src/actions/lint-clean.ts +2 -2
- package/src/actions/lint-profile.ts +1 -1
- package/src/actions/lint.ts +1 -1
- package/src/actions/npmignore-gen.ts +1 -1
- package/src/actions/package/clean.ts +2 -2
- package/src/actions/package/compile/buildEntries.ts +2 -2
- package/src/actions/package/compile/compile.ts +5 -5
- package/src/actions/package/compile/getCompilerOptions.ts +10 -7
- package/src/actions/package/compile/index.ts +4 -4
- package/src/actions/package/compile/packageCompileTsc.ts +5 -5
- package/src/actions/package/compile/packageCompileTscTypes.ts +6 -6
- package/src/actions/package/compile/packageCompileTsup.ts +10 -10
- package/src/actions/package/deps.ts +3 -2
- package/src/actions/package/index.ts +9 -9
- package/src/actions/package/publint.ts +1 -0
- package/src/actions/package/recompile.ts +2 -2
- package/src/actions/publint.ts +1 -1
- package/src/actions/rebuild.ts +1 -1
- package/src/actions/recompile.ts +1 -1
- package/src/actions/reinstall.ts +1 -1
- package/src/actions/relint.ts +1 -1
- package/src/actions/retest.ts +1 -1
- package/src/actions/sonar.ts +1 -1
- package/src/actions/statics.ts +1 -1
- package/src/actions/test.ts +1 -1
- package/src/actions/up.ts +1 -1
- package/src/actions/updo.ts +1 -1
- package/src/actions/upplug.ts +1 -1
- package/src/actions/upyarn.ts +1 -1
- package/src/actions/yarn3only.ts +1 -1
- package/src/bin/build.ts +1 -1
- package/src/bin/clean.ts +1 -1
- package/src/bin/compile-only.ts +1 -1
- package/src/bin/compile.ts +1 -1
- package/src/bin/cycle.ts +1 -1
- package/src/bin/dead.ts +1 -1
- package/src/bin/deploy-major.ts +1 -1
- package/src/bin/deploy-minor.ts +1 -1
- package/src/bin/deploy-next.ts +1 -1
- package/src/bin/deploy.ts +1 -1
- package/src/bin/deps.ts +1 -1
- package/src/bin/fix.ts +1 -1
- package/src/bin/gen-docs.ts +1 -1
- package/src/bin/gitlint-fix.ts +1 -1
- package/src/bin/gitlint.ts +1 -1
- package/src/bin/license.ts +1 -1
- package/src/bin/lint-clean.ts +1 -1
- package/src/bin/lint-fast.ts +1 -1
- package/src/bin/lint-profile.ts +1 -1
- package/src/bin/lint.ts +1 -1
- package/src/bin/package/clean-outputs.ts +1 -1
- package/src/bin/package/clean-typescript.ts +1 -1
- package/src/bin/package/clean.ts +1 -1
- package/src/bin/package/compile-only.ts +1 -1
- package/src/bin/package/compile-tsup.ts +1 -1
- package/src/bin/package/compile.ts +1 -1
- package/src/bin/package/copy-assets-cjs.ts +1 -1
- package/src/bin/package/copy-assets-esm.ts +1 -1
- package/src/bin/package/deps.ts +1 -1
- package/src/bin/package/gen-docs.ts +1 -1
- package/src/bin/package/publint.ts +1 -1
- package/src/bin/package/recompile.ts +1 -1
- package/src/bin/publint.ts +1 -1
- package/src/bin/rebuild.ts +1 -1
- package/src/bin/recompile.ts +1 -1
- package/src/bin/reinstall.ts +1 -1
- package/src/bin/relint.ts +1 -1
- package/src/bin/sonar.ts +1 -1
- package/src/bin/test.ts +1 -1
- package/src/bin/up.ts +1 -1
- package/src/bin/updo.ts +1 -1
- package/src/bin/upplug.ts +1 -1
- package/src/bin/upyarn.ts +1 -1
- package/src/bin/yarn3only.ts +1 -1
- package/src/index.ts +4 -4
- package/src/lib/createBuildConfig.ts +1 -1
- package/src/lib/dependencies/DuplicateDetector.ts +2 -2
- package/src/lib/dependencies/detectDuplicateDependencies.ts +2 -2
- package/src/lib/dependencies/index.ts +2 -2
- package/src/lib/file/fileLines.ts +3 -3
- package/src/lib/file/index.ts +4 -4
- package/src/lib/file/tryReadFileSync.ts +1 -1
- package/src/lib/generateIgnoreFiles.ts +3 -3
- package/src/lib/index.ts +19 -19
- package/src/lib/loadConfig.ts +1 -1
- package/src/lib/processEx.ts +2 -2
- package/src/lib/runSteps.ts +2 -2
- package/src/lib/runStepsAsync.ts +3 -3
- package/src/lib/runXy.ts +1 -1
- package/src/lib/safeExit.ts +1 -1
- package/src/lib/string/index.ts +2 -2
- package/src/lib/withErrnoException.ts +1 -1
- package/src/lib/yarn/index.ts +3 -3
- package/src/lib/yarn/workspace/index.ts +3 -3
- package/src/lib/yarn/workspace/yarnWorkspace.ts +2 -2
- package/src/lib/yarn/workspace/yarnWorkspaces.ts +1 -1
- package/src/xy/index.ts +7 -7
- package/src/xy/xy.ts +6 -6
- package/src/xy/xyBuildCommands.ts +1 -1
- package/src/xy/xyCommonCommands.ts +2 -2
- package/src/xy/xyDeployCommands.ts +1 -1
- package/src/xy/xyInstallCommands.ts +1 -1
- package/src/xy/xyLintCommands.ts +2 -2
- package/src/xy/xyParseOptions.ts +1 -0
- package/tsconfig.build.json +10 -4
- package/tsup.config.ts +12 -2
- package/dist/actions/build.js +0 -58
- package/dist/actions/build.js.map +0 -1
- package/dist/actions/clean-docs.js.map +0 -1
- package/dist/actions/clean-eslint.js.map +0 -1
- package/dist/actions/clean-jest.js +0 -33
- package/dist/actions/clean-jest.js.map +0 -1
- package/dist/actions/clean.js +0 -43
- package/dist/actions/clean.js.map +0 -1
- package/dist/actions/compile.js +0 -66
- package/dist/actions/compile.js.map +0 -1
- package/dist/actions/copy-assets.js.map +0 -1
- package/dist/actions/cycle.js +0 -33
- package/dist/actions/cycle.js.map +0 -1
- package/dist/actions/dead.js +0 -32
- package/dist/actions/dead.js.map +0 -1
- package/dist/actions/deploy-major.js +0 -38
- package/dist/actions/deploy-major.js.map +0 -1
- package/dist/actions/deploy-minor.js +0 -38
- package/dist/actions/deploy-minor.js.map +0 -1
- package/dist/actions/deploy-next.js +0 -38
- package/dist/actions/deploy-next.js.map +0 -1
- package/dist/actions/deploy.js +0 -38
- package/dist/actions/deploy.js.map +0 -1
- package/dist/actions/deps.js +0 -65
- package/dist/actions/deps.js.map +0 -1
- package/dist/actions/dupdeps.js +0 -47
- package/dist/actions/dupdeps.js.map +0 -1
- package/dist/actions/fix.js +0 -32
- package/dist/actions/fix.js.map +0 -1
- package/dist/actions/gen-docs.js +0 -45
- package/dist/actions/gen-docs.js.map +0 -1
- package/dist/actions/gitignore-gen.js +0 -31
- package/dist/actions/gitignore-gen.js.map +0 -1
- package/dist/actions/gitlint-fix.js.map +0 -1
- package/dist/actions/gitlint.js.map +0 -1
- package/dist/actions/index.js +0 -97
- package/dist/actions/index.js.map +0 -1
- package/dist/actions/license.js +0 -106
- package/dist/actions/license.js.map +0 -1
- package/dist/actions/lint-clean.js +0 -47
- package/dist/actions/lint-clean.js.map +0 -1
- package/dist/actions/lint-profile.js +0 -32
- package/dist/actions/lint-profile.js.map +0 -1
- package/dist/actions/lint.js +0 -82
- package/dist/actions/lint.js.map +0 -1
- package/dist/actions/npmignore-gen.js +0 -31
- package/dist/actions/npmignore-gen.js.map +0 -1
- package/dist/actions/package/clean-outputs.js.map +0 -1
- package/dist/actions/package/clean-typescript.js.map +0 -1
- package/dist/actions/package/clean.js +0 -33
- package/dist/actions/package/clean.js.map +0 -1
- package/dist/actions/package/compile/buildEntries.js.map +0 -1
- package/dist/actions/package/compile/compile.js +0 -63
- package/dist/actions/package/compile/compile.js.map +0 -1
- package/dist/actions/package/compile/getCompilerOptions.js.map +0 -1
- package/dist/actions/package/compile/index.js +0 -29
- package/dist/actions/package/compile/index.js.map +0 -1
- package/dist/actions/package/compile/inputs.js.map +0 -1
- package/dist/actions/package/compile/packageCompileTsc.js +0 -80
- package/dist/actions/package/compile/packageCompileTsc.js.map +0 -1
- package/dist/actions/package/compile/packageCompileTscTypes.js +0 -98
- package/dist/actions/package/compile/packageCompileTscTypes.js.map +0 -1
- package/dist/actions/package/compile/packageCompileTsup.js +0 -213
- package/dist/actions/package/compile/packageCompileTsup.js.map +0 -1
- package/dist/actions/package/deps.js.map +0 -1
- package/dist/actions/package/index.js +0 -39
- package/dist/actions/package/index.js.map +0 -1
- package/dist/actions/package/publint.js.map +0 -1
- package/dist/actions/package/recompile.js +0 -33
- package/dist/actions/package/recompile.js.map +0 -1
- package/dist/actions/publint.js +0 -43
- package/dist/actions/publint.js.map +0 -1
- package/dist/actions/rebuild.js +0 -35
- package/dist/actions/rebuild.js.map +0 -1
- package/dist/actions/recompile.js +0 -67
- package/dist/actions/recompile.js.map +0 -1
- package/dist/actions/reinstall.js +0 -48
- package/dist/actions/reinstall.js.map +0 -1
- package/dist/actions/relint.js +0 -46
- package/dist/actions/relint.js.map +0 -1
- package/dist/actions/retest.js +0 -35
- package/dist/actions/retest.js.map +0 -1
- package/dist/actions/sonar.js +0 -32
- package/dist/actions/sonar.js.map +0 -1
- package/dist/actions/statics.js +0 -47
- package/dist/actions/statics.js.map +0 -1
- package/dist/actions/test.js +0 -32
- package/dist/actions/test.js.map +0 -1
- package/dist/actions/up.js.map +0 -1
- package/dist/actions/updo.js +0 -36
- package/dist/actions/updo.js.map +0 -1
- package/dist/actions/upplug.js +0 -37
- package/dist/actions/upplug.js.map +0 -1
- package/dist/actions/upyarn.js +0 -32
- package/dist/actions/upyarn.js.map +0 -1
- package/dist/actions/yarn3only.js +0 -36
- package/dist/actions/yarn3only.js.map +0 -1
- package/dist/bin/build.js +0 -5
- package/dist/bin/build.js.map +0 -1
- package/dist/bin/clean.js +0 -5
- package/dist/bin/clean.js.map +0 -1
- package/dist/bin/compile-only.js +0 -5
- package/dist/bin/compile-only.js.map +0 -1
- package/dist/bin/compile.js +0 -5
- package/dist/bin/compile.js.map +0 -1
- package/dist/bin/cycle.js +0 -5
- package/dist/bin/cycle.js.map +0 -1
- package/dist/bin/dead.js +0 -5
- package/dist/bin/dead.js.map +0 -1
- package/dist/bin/deploy-major.js +0 -5
- package/dist/bin/deploy-major.js.map +0 -1
- package/dist/bin/deploy-minor.js +0 -5
- package/dist/bin/deploy-minor.js.map +0 -1
- package/dist/bin/deploy-next.js +0 -5
- package/dist/bin/deploy-next.js.map +0 -1
- package/dist/bin/deploy.js +0 -5
- package/dist/bin/deploy.js.map +0 -1
- package/dist/bin/deps.js +0 -5
- package/dist/bin/deps.js.map +0 -1
- package/dist/bin/fix.js +0 -5
- package/dist/bin/fix.js.map +0 -1
- package/dist/bin/gen-docs.js +0 -5
- package/dist/bin/gen-docs.js.map +0 -1
- package/dist/bin/gitlint-fix.js +0 -5
- package/dist/bin/gitlint-fix.js.map +0 -1
- package/dist/bin/gitlint.js +0 -5
- package/dist/bin/gitlint.js.map +0 -1
- package/dist/bin/license.js +0 -5
- package/dist/bin/license.js.map +0 -1
- package/dist/bin/lint-clean.js +0 -5
- package/dist/bin/lint-clean.js.map +0 -1
- package/dist/bin/lint-fast.js +0 -5
- package/dist/bin/lint-fast.js.map +0 -1
- package/dist/bin/lint-profile.js +0 -5
- package/dist/bin/lint-profile.js.map +0 -1
- package/dist/bin/lint.js +0 -5
- package/dist/bin/lint.js.map +0 -1
- package/dist/bin/package/clean-outputs.js +0 -10
- package/dist/bin/package/clean-outputs.js.map +0 -1
- package/dist/bin/package/clean-typescript.js +0 -10
- package/dist/bin/package/clean-typescript.js.map +0 -1
- package/dist/bin/package/clean.js +0 -10
- package/dist/bin/package/clean.js.map +0 -1
- package/dist/bin/package/compile-only.js +0 -31
- package/dist/bin/package/compile-only.js.map +0 -1
- package/dist/bin/package/compile-tsup.js.map +0 -1
- package/dist/bin/package/compile.js +0 -35
- package/dist/bin/package/compile.js.map +0 -1
- package/dist/bin/package/copy-assets-cjs.js.map +0 -1
- package/dist/bin/package/copy-assets-esm.js +0 -31
- package/dist/bin/package/copy-assets-esm.js.map +0 -1
- package/dist/bin/package/deps.js.map +0 -1
- package/dist/bin/package/gen-docs.js +0 -10
- package/dist/bin/package/gen-docs.js.map +0 -1
- package/dist/bin/package/publint.js +0 -32
- package/dist/bin/package/publint.js.map +0 -1
- package/dist/bin/package/recompile.js +0 -31
- package/dist/bin/package/recompile.js.map +0 -1
- package/dist/bin/publint.js +0 -5
- package/dist/bin/publint.js.map +0 -1
- package/dist/bin/rebuild.js +0 -5
- package/dist/bin/rebuild.js.map +0 -1
- package/dist/bin/recompile.js +0 -5
- package/dist/bin/recompile.js.map +0 -1
- package/dist/bin/reinstall.js +0 -5
- package/dist/bin/reinstall.js.map +0 -1
- package/dist/bin/relint.js +0 -5
- package/dist/bin/relint.js.map +0 -1
- package/dist/bin/sonar.js +0 -5
- package/dist/bin/sonar.js.map +0 -1
- package/dist/bin/test.js +0 -5
- package/dist/bin/test.js.map +0 -1
- package/dist/bin/up.js +0 -5
- package/dist/bin/up.js.map +0 -1
- package/dist/bin/updo.js +0 -5
- package/dist/bin/updo.js.map +0 -1
- package/dist/bin/upplug.js +0 -5
- package/dist/bin/upplug.js.map +0 -1
- package/dist/bin/upyarn.js +0 -5
- package/dist/bin/upyarn.js.map +0 -1
- package/dist/bin/xy-ts.js +0 -10
- package/dist/bin/xy-ts.js.map +0 -1
- package/dist/bin/xy.js +0 -10
- package/dist/bin/xy.js.map +0 -1
- package/dist/bin/yarn3only.js +0 -5
- package/dist/bin/yarn3only.js.map +0 -1
- package/dist/index.js +0 -29
- package/dist/index.js.map +0 -1
- package/dist/lib/createBuildConfig.js.map +0 -1
- package/dist/lib/dependencies/DuplicateDetector.js.map +0 -1
- package/dist/lib/dependencies/detectDuplicateDependencies.js +0 -66
- package/dist/lib/dependencies/detectDuplicateDependencies.js.map +0 -1
- package/dist/lib/dependencies/index.js +0 -25
- package/dist/lib/dependencies/index.js.map +0 -1
- package/dist/lib/file/fileLines.js.map +0 -1
- package/dist/lib/file/index.js +0 -29
- package/dist/lib/file/index.js.map +0 -1
- package/dist/lib/file/tryReadFileSync.js.map +0 -1
- package/dist/lib/generateIgnoreFiles.js +0 -62
- package/dist/lib/generateIgnoreFiles.js.map +0 -1
- package/dist/lib/index.js +0 -59
- package/dist/lib/index.js.map +0 -1
- package/dist/lib/jsonFormatters.js.map +0 -1
- package/dist/lib/loadConfig.js.map +0 -1
- package/dist/lib/processEx.js.map +0 -1
- package/dist/lib/runSteps.js +0 -69
- package/dist/lib/runSteps.js.map +0 -1
- package/dist/lib/runStepsAsync.js +0 -88
- package/dist/lib/runStepsAsync.js.map +0 -1
- package/dist/lib/runXy.js +0 -32
- package/dist/lib/runXy.js.map +0 -1
- package/dist/lib/runXyWithWarning.js.map +0 -1
- package/dist/lib/safeExit.js +0 -53
- package/dist/lib/safeExit.js.map +0 -1
- package/dist/lib/string/index.js +0 -25
- package/dist/lib/string/index.js.map +0 -1
- package/dist/lib/withErrnoException.js.map +0 -1
- package/dist/lib/yarn/index.js +0 -27
- package/dist/lib/yarn/index.js.map +0 -1
- package/dist/lib/yarn/workspace/index.js +0 -27
- package/dist/lib/yarn/workspace/index.js.map +0 -1
- package/dist/lib/yarn/workspace/yarnWorkspace.js.map +0 -1
- package/dist/lib/yarn/workspace/yarnWorkspaces.js.map +0 -1
- package/dist/lib/yarn/yarnInitCwd.js.map +0 -1
- package/dist/types.d.js +0 -2
- package/dist/xy/index.js +0 -35
- package/dist/xy/index.js.map +0 -1
- package/dist/xy/xy.js +0 -52
- package/dist/xy/xy.js.map +0 -1
- package/dist/xy/xyBuildCommands.js +0 -137
- package/dist/xy/xyBuildCommands.js.map +0 -1
- package/dist/xy/xyCommonCommands.js +0 -161
- package/dist/xy/xyCommonCommands.js.map +0 -1
- package/dist/xy/xyDeployCommands.js +0 -72
- package/dist/xy/xyDeployCommands.js.map +0 -1
- package/dist/xy/xyInstallCommands.js +0 -99
- package/dist/xy/xyInstallCommands.js.map +0 -1
- package/dist/xy/xyLintCommands.js +0 -116
- package/dist/xy/xyLintCommands.js.map +0 -1
- package/dist/xy/xyParseOptions.js.map +0 -1
- /package/dist/{types.d.js.map → types.d.cjs.map} +0 -0
|
@@ -0,0 +1,1912 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
|
|
31
|
+
// src/xy/index.ts
|
|
32
|
+
var xy_exports = {};
|
|
33
|
+
__export(xy_exports, {
|
|
34
|
+
xy: () => xy,
|
|
35
|
+
xyBuildCommands: () => xyBuildCommands,
|
|
36
|
+
xyCommonCommands: () => xyCommonCommands,
|
|
37
|
+
xyDeployCommands: () => xyDeployCommands,
|
|
38
|
+
xyInstallCommands: () => xyInstallCommands,
|
|
39
|
+
xyLintCommands: () => xyLintCommands,
|
|
40
|
+
xyParseOptions: () => xyParseOptions
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(xy_exports);
|
|
43
|
+
|
|
44
|
+
// src/xy/xy.ts
|
|
45
|
+
var import_chalk20 = __toESM(require("chalk"), 1);
|
|
46
|
+
|
|
47
|
+
// src/actions/build.ts
|
|
48
|
+
var import_chalk7 = __toESM(require("chalk"), 1);
|
|
49
|
+
|
|
50
|
+
// src/lib/checkResult.ts
|
|
51
|
+
var import_chalk = __toESM(require("chalk"), 1);
|
|
52
|
+
var checkResult = /* @__PURE__ */ __name((name, result, level = "error", exitOnFail = false) => {
|
|
53
|
+
if (result) {
|
|
54
|
+
const exiting = exitOnFail ? "[Exiting Process]" : "[Continuing]";
|
|
55
|
+
const chalkFunc = level === "error" ? import_chalk.default.red : import_chalk.default.yellow;
|
|
56
|
+
console[level](chalkFunc(`${name} had ${result} failures ${exiting}`));
|
|
57
|
+
if (exitOnFail) {
|
|
58
|
+
process.exit(result);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}, "checkResult");
|
|
62
|
+
|
|
63
|
+
// src/lib/dependencies/detectDuplicateDependencies.ts
|
|
64
|
+
var import_node_child_process = require("child_process");
|
|
65
|
+
|
|
66
|
+
// src/lib/processEx.ts
|
|
67
|
+
var import_chalk2 = __toESM(require("chalk"), 1);
|
|
68
|
+
|
|
69
|
+
// src/lib/withError.ts
|
|
70
|
+
var withError = /* @__PURE__ */ __name((ex, closure, predicate = (ex2) => ex2.name !== void 0 && ex2.message !== void 0) => {
|
|
71
|
+
return predicate(ex) ? closure(ex) : void 0;
|
|
72
|
+
}, "withError");
|
|
73
|
+
|
|
74
|
+
// src/lib/withErrnoException.ts
|
|
75
|
+
var withErrnoException = /* @__PURE__ */ __name((ex, closure) => {
|
|
76
|
+
return withError(ex, closure, (ex2) => ex2.errno !== void 0);
|
|
77
|
+
}, "withErrnoException");
|
|
78
|
+
|
|
79
|
+
// src/lib/processEx.ts
|
|
80
|
+
var processEx = /* @__PURE__ */ __name((ex) => {
|
|
81
|
+
const error = typeof ex === "string" ? new Error(ex) : ex;
|
|
82
|
+
const exitCode = withErrnoException(error, (error2) => {
|
|
83
|
+
if (error2.code === "ENOENT") {
|
|
84
|
+
console.error(import_chalk2.default.red(`'${error2.path}' not found.`));
|
|
85
|
+
} else {
|
|
86
|
+
console.error(import_chalk2.default.red(`Errno: ${error2.code}`));
|
|
87
|
+
}
|
|
88
|
+
return error2.errno ?? -1;
|
|
89
|
+
}) ?? withError(error, (error2) => {
|
|
90
|
+
console.error(import_chalk2.default.red(`${error2.name}: ${error2.message}`));
|
|
91
|
+
return -1;
|
|
92
|
+
}) ?? (() => {
|
|
93
|
+
console.error(import_chalk2.default.red(`Unexpected Error: ${JSON.stringify(ex, null, 2)}`));
|
|
94
|
+
return -1;
|
|
95
|
+
})();
|
|
96
|
+
process.exit(process.exitCode ?? exitCode);
|
|
97
|
+
}, "processEx");
|
|
98
|
+
|
|
99
|
+
// src/lib/safeExit.ts
|
|
100
|
+
var safeExit = /* @__PURE__ */ __name((func, exitOnFail = true) => {
|
|
101
|
+
try {
|
|
102
|
+
const result = func();
|
|
103
|
+
if (result && exitOnFail) {
|
|
104
|
+
process.exit(result);
|
|
105
|
+
}
|
|
106
|
+
return result;
|
|
107
|
+
} catch (ex) {
|
|
108
|
+
return processEx(ex);
|
|
109
|
+
}
|
|
110
|
+
}, "safeExit");
|
|
111
|
+
var safeExitAsync = /* @__PURE__ */ __name(async (func, exitOnFail = true) => {
|
|
112
|
+
try {
|
|
113
|
+
const result = await func();
|
|
114
|
+
if (result && exitOnFail) {
|
|
115
|
+
process.exit(result);
|
|
116
|
+
}
|
|
117
|
+
return result;
|
|
118
|
+
} catch (ex) {
|
|
119
|
+
return processEx(ex);
|
|
120
|
+
}
|
|
121
|
+
}, "safeExitAsync");
|
|
122
|
+
|
|
123
|
+
// src/lib/dependencies/DuplicateDetector.ts
|
|
124
|
+
var import_node_os = require("os");
|
|
125
|
+
var import_chalk3 = __toESM(require("chalk"), 1);
|
|
126
|
+
var import_lodash_es = require("lodash-es");
|
|
127
|
+
|
|
128
|
+
// src/lib/jsonFormatters.ts
|
|
129
|
+
var multiLineToJSONArray = /* @__PURE__ */ __name((output) => {
|
|
130
|
+
const withCommas = output.replaceAll("\r\n", "").replaceAll("\n", ",");
|
|
131
|
+
const cleanCollection = withCommas.slice(0, Math.max(0, withCommas.length - 1));
|
|
132
|
+
const collection = `[${cleanCollection}]`;
|
|
133
|
+
return JSON.parse(collection);
|
|
134
|
+
}, "multiLineToJSONArray");
|
|
135
|
+
|
|
136
|
+
// src/lib/dependencies/DuplicateDetector.ts
|
|
137
|
+
var trimVirtualMeta = /* @__PURE__ */ __name((value) => {
|
|
138
|
+
const virtualParts = value.split("virtual:");
|
|
139
|
+
if (virtualParts.length > 1) {
|
|
140
|
+
const hashParts = virtualParts[1].split("#");
|
|
141
|
+
return virtualParts[0] + hashParts[1];
|
|
142
|
+
} else {
|
|
143
|
+
return value;
|
|
144
|
+
}
|
|
145
|
+
}, "trimVirtualMeta");
|
|
146
|
+
var trimObjectDependencyVirtualMeta = /* @__PURE__ */ __name((obj) => {
|
|
147
|
+
const resultObj = {};
|
|
148
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
149
|
+
resultObj[trimVirtualMeta(key)] = {
|
|
150
|
+
descriptor: trimVirtualMeta(value.descriptor),
|
|
151
|
+
locator: trimVirtualMeta(value.locator)
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
return resultObj;
|
|
155
|
+
}, "trimObjectDependencyVirtualMeta");
|
|
156
|
+
var trimDependencyVirtualMeta = /* @__PURE__ */ __name((dependencies) => {
|
|
157
|
+
return dependencies.map((dependency) => {
|
|
158
|
+
return {
|
|
159
|
+
children: trimObjectDependencyVirtualMeta(dependency.children),
|
|
160
|
+
value: trimVirtualMeta(dependency.value)
|
|
161
|
+
};
|
|
162
|
+
});
|
|
163
|
+
}, "trimDependencyVirtualMeta");
|
|
164
|
+
var DuplicateDetector = class {
|
|
165
|
+
static {
|
|
166
|
+
__name(this, "DuplicateDetector");
|
|
167
|
+
}
|
|
168
|
+
dependency;
|
|
169
|
+
dependencyEntries;
|
|
170
|
+
constructor(output, dependency) {
|
|
171
|
+
this.dependency = dependency;
|
|
172
|
+
this.dependencyEntries = trimDependencyVirtualMeta(multiLineToJSONArray(output));
|
|
173
|
+
}
|
|
174
|
+
detect() {
|
|
175
|
+
const result = this.dependencyEntries.reduce(this.detectReducer, this.resultsFactory(this.dependency));
|
|
176
|
+
if (result.duplicateVersions.length > 0) {
|
|
177
|
+
console.log(import_chalk3.default.yellow(`${import_node_os.EOL}Duplicates found for: ${this.dependency}`));
|
|
178
|
+
const duplicateVersions = result.duplicateVersions.toString().replaceAll(",", `${import_node_os.EOL} `);
|
|
179
|
+
console.log(import_chalk3.default.grey(` ${duplicateVersions}`, import_node_os.EOL));
|
|
180
|
+
return 1;
|
|
181
|
+
} else {
|
|
182
|
+
console.log(`${this.dependency} - OK`);
|
|
183
|
+
return 0;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
detectReducer(acc, entry) {
|
|
187
|
+
const version = Object.entries(entry.children).map(([k]) => k)[0];
|
|
188
|
+
if (!acc.currentVersion) {
|
|
189
|
+
acc.currentVersion = version;
|
|
190
|
+
return acc;
|
|
191
|
+
}
|
|
192
|
+
if (acc.currentVersion && acc.currentVersion !== version && !version.includes("@virtual:")) {
|
|
193
|
+
if (acc.duplicateVersions.length === 0) {
|
|
194
|
+
acc.duplicateVersions.push(acc.currentVersion);
|
|
195
|
+
}
|
|
196
|
+
acc.duplicateVersions.push(version);
|
|
197
|
+
acc.duplicateVersions = (0, import_lodash_es.uniq)(acc.duplicateVersions);
|
|
198
|
+
}
|
|
199
|
+
return acc;
|
|
200
|
+
}
|
|
201
|
+
resultsFactory = /* @__PURE__ */ __name((dependency) => ({
|
|
202
|
+
currentVersion: void 0,
|
|
203
|
+
dependency,
|
|
204
|
+
duplicateVersions: []
|
|
205
|
+
}), "resultsFactory");
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
// src/lib/dependencies/detectDuplicateDependencies.ts
|
|
209
|
+
var detectDuplicateDependencies = /* @__PURE__ */ __name((depsFromPackageJSON, DefaultDependencies2) => {
|
|
210
|
+
let exitCode = 0;
|
|
211
|
+
const dependencies = depsFromPackageJSON?.length ? depsFromPackageJSON : DefaultDependencies2;
|
|
212
|
+
return safeExit(() => {
|
|
213
|
+
if (dependencies) {
|
|
214
|
+
for (const dependency of dependencies) {
|
|
215
|
+
let output;
|
|
216
|
+
try {
|
|
217
|
+
const cmd = `yarn why ${dependency} --json`;
|
|
218
|
+
output = (0, import_node_child_process.execSync)(cmd).toString();
|
|
219
|
+
} catch (e) {
|
|
220
|
+
console.error(`Error running yarn why: ${e}`);
|
|
221
|
+
exitCode = 1;
|
|
222
|
+
exitCode;
|
|
223
|
+
continue;
|
|
224
|
+
}
|
|
225
|
+
if (output) {
|
|
226
|
+
exitCode = new DuplicateDetector(output, dependency).detect();
|
|
227
|
+
exitCode;
|
|
228
|
+
} else {
|
|
229
|
+
console.log(`${dependency} - N/A`);
|
|
230
|
+
if (depsFromPackageJSON) {
|
|
231
|
+
exitCode = 1;
|
|
232
|
+
console.log(`\u{1F6A8} Library ${dependency} was requested in package.json but not found`);
|
|
233
|
+
}
|
|
234
|
+
exitCode;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return exitCode;
|
|
238
|
+
} else {
|
|
239
|
+
console.log("\u{1F6A8} No dependencies where passed");
|
|
240
|
+
return exitCode;
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
}, "detectDuplicateDependencies");
|
|
244
|
+
|
|
245
|
+
// src/lib/file/constants.ts
|
|
246
|
+
var WINDOWS_NEWLINE_REGEX = /\r\n/g;
|
|
247
|
+
var CROSS_PLATFORM_NEWLINE = "\n";
|
|
248
|
+
|
|
249
|
+
// src/lib/file/fileLines.ts
|
|
250
|
+
var import_node_fs = require("fs");
|
|
251
|
+
|
|
252
|
+
// src/lib/string/empty.ts
|
|
253
|
+
var empty = /* @__PURE__ */ __name((value) => value?.trim().length === 0, "empty");
|
|
254
|
+
var notEmpty = /* @__PURE__ */ __name((value) => !empty(value), "notEmpty");
|
|
255
|
+
|
|
256
|
+
// src/lib/string/union.ts
|
|
257
|
+
var union = /* @__PURE__ */ __name((a, b) => /* @__PURE__ */ new Set([
|
|
258
|
+
...new Set(a),
|
|
259
|
+
...new Set(b)
|
|
260
|
+
]), "union");
|
|
261
|
+
|
|
262
|
+
// src/lib/file/ReadFileSyncOptions.ts
|
|
263
|
+
var defaultReadFileSyncOptions = {
|
|
264
|
+
encoding: "utf8"
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
// src/lib/file/fileLines.ts
|
|
268
|
+
var readLines = /* @__PURE__ */ __name((uri, options = defaultReadFileSyncOptions) => (0, import_node_fs.existsSync)(uri) ? (0, import_node_fs.readFileSync)(uri, options).replace(WINDOWS_NEWLINE_REGEX, CROSS_PLATFORM_NEWLINE).split(CROSS_PLATFORM_NEWLINE) : [], "readLines");
|
|
269
|
+
var readNonEmptyLines = /* @__PURE__ */ __name((uri, options = defaultReadFileSyncOptions) => readLines(uri, options).filter(notEmpty), "readNonEmptyLines");
|
|
270
|
+
var writeLines = /* @__PURE__ */ __name((uri, lines, options = defaultReadFileSyncOptions) => {
|
|
271
|
+
const existing = (0, import_node_fs.existsSync)(uri) ? (0, import_node_fs.readFileSync)(uri, options) : void 0;
|
|
272
|
+
const desired = lines.join(CROSS_PLATFORM_NEWLINE);
|
|
273
|
+
if (existing !== desired) (0, import_node_fs.writeFileSync)(uri, desired, options);
|
|
274
|
+
}, "writeLines");
|
|
275
|
+
|
|
276
|
+
// src/lib/generateIgnoreFiles.ts
|
|
277
|
+
var import_chalk4 = __toESM(require("chalk"), 1);
|
|
278
|
+
|
|
279
|
+
// src/lib/yarn/isYarnVersionOrGreater.ts
|
|
280
|
+
var import_node_child_process2 = require("child_process");
|
|
281
|
+
var isYarnVersionOrGreater = /* @__PURE__ */ __name((major, minor, patch) => {
|
|
282
|
+
const result = (0, import_node_child_process2.spawnSync)("yarn", [
|
|
283
|
+
"-v"
|
|
284
|
+
], {
|
|
285
|
+
encoding: "utf8",
|
|
286
|
+
shell: true
|
|
287
|
+
});
|
|
288
|
+
const version = result.stdout.toString().replaceAll("\n", "");
|
|
289
|
+
const versionNumbers = version.split(".").map((ver) => Number.parseInt(ver));
|
|
290
|
+
const majorDelta = versionNumbers[0] - major;
|
|
291
|
+
const minorDelta = versionNumbers[1] - (minor ?? versionNumbers[1]);
|
|
292
|
+
const patchDelta = versionNumbers[2] - (patch ?? versionNumbers[2]);
|
|
293
|
+
const majorOk = majorDelta >= 0;
|
|
294
|
+
const minorOk = majorDelta > 0 || minorDelta >= 0;
|
|
295
|
+
const patchOk = majorDelta > 0 || minorDelta > 0 || patchDelta >= 0;
|
|
296
|
+
return [
|
|
297
|
+
majorOk && minorOk && patchOk,
|
|
298
|
+
version
|
|
299
|
+
];
|
|
300
|
+
}, "isYarnVersionOrGreater");
|
|
301
|
+
|
|
302
|
+
// src/lib/yarn/workspace/yarnWorkspaces.ts
|
|
303
|
+
var import_node_child_process3 = require("child_process");
|
|
304
|
+
var yarnWorkspaces = /* @__PURE__ */ __name(() => {
|
|
305
|
+
const result = (0, import_node_child_process3.spawnSync)("yarn", [
|
|
306
|
+
"workspaces",
|
|
307
|
+
"list",
|
|
308
|
+
"--json",
|
|
309
|
+
"--recursive"
|
|
310
|
+
], {
|
|
311
|
+
encoding: "utf8",
|
|
312
|
+
shell: true
|
|
313
|
+
});
|
|
314
|
+
if (result.error) {
|
|
315
|
+
throw result.error;
|
|
316
|
+
}
|
|
317
|
+
return result.stdout.toString().split("\n").slice(0, -1).map((item) => {
|
|
318
|
+
return JSON.parse(item);
|
|
319
|
+
});
|
|
320
|
+
}, "yarnWorkspaces");
|
|
321
|
+
|
|
322
|
+
// src/lib/yarn/workspace/yarnWorkspace.ts
|
|
323
|
+
var yarnWorkspace = /* @__PURE__ */ __name((pkg) => {
|
|
324
|
+
const workspace = yarnWorkspaces().find(({ name }) => name === pkg);
|
|
325
|
+
if (!workspace) throw new Error(`Workspace ${pkg} not found`);
|
|
326
|
+
return workspace;
|
|
327
|
+
}, "yarnWorkspace");
|
|
328
|
+
|
|
329
|
+
// src/lib/yarn/yarnInitCwd.ts
|
|
330
|
+
var INIT_CWD = /* @__PURE__ */ __name(() => {
|
|
331
|
+
if (!process.env.INIT_CWD) console.error("Missing INIT_CWD");
|
|
332
|
+
return process.env.INIT_CWD;
|
|
333
|
+
}, "INIT_CWD");
|
|
334
|
+
|
|
335
|
+
// src/lib/generateIgnoreFiles.ts
|
|
336
|
+
var mergeEntries = /* @__PURE__ */ __name((a, b) => [
|
|
337
|
+
...union(a, b)
|
|
338
|
+
].sort(), "mergeEntries");
|
|
339
|
+
var generateIgnoreFiles = /* @__PURE__ */ __name((filename3, pkg) => {
|
|
340
|
+
console.log(import_chalk4.default.green(`Generate ${filename3} Files`));
|
|
341
|
+
const cwd = INIT_CWD() ?? ".";
|
|
342
|
+
const workspaces = pkg ? [
|
|
343
|
+
yarnWorkspace(pkg)
|
|
344
|
+
] : yarnWorkspaces();
|
|
345
|
+
const readEntries = /* @__PURE__ */ __name((location) => readNonEmptyLines(`${location}/${filename3}`), "readEntries");
|
|
346
|
+
const writeEntries = /* @__PURE__ */ __name((location, entries) => writeLines(`${location}/${filename3}`, entries), "writeEntries");
|
|
347
|
+
const results = workspaces.map(({ location, name }) => {
|
|
348
|
+
try {
|
|
349
|
+
writeEntries(location, mergeEntries(readEntries(cwd), readEntries(location)));
|
|
350
|
+
return 0;
|
|
351
|
+
} catch (ex) {
|
|
352
|
+
const error = ex;
|
|
353
|
+
console.error(`Generate ${filename3} Files [${name}] [${error.message}]`);
|
|
354
|
+
return 1;
|
|
355
|
+
}
|
|
356
|
+
});
|
|
357
|
+
const succeeded = results.every((result) => result === 0);
|
|
358
|
+
return succeeded ? 0 : 1;
|
|
359
|
+
}, "generateIgnoreFiles");
|
|
360
|
+
|
|
361
|
+
// src/lib/parsedPackageJSON.ts
|
|
362
|
+
var import_node_fs2 = require("fs");
|
|
363
|
+
var parsedPackageJSON = /* @__PURE__ */ __name((path3) => {
|
|
364
|
+
const pathToPackageJSON = path3 ?? process.env.npm_package_json ?? "";
|
|
365
|
+
const packageJSON = (0, import_node_fs2.readFileSync)(pathToPackageJSON).toString();
|
|
366
|
+
return JSON.parse(packageJSON);
|
|
367
|
+
}, "parsedPackageJSON");
|
|
368
|
+
|
|
369
|
+
// src/lib/runSteps.ts
|
|
370
|
+
var import_node_child_process4 = require("child_process");
|
|
371
|
+
var import_node_fs3 = require("fs");
|
|
372
|
+
var import_chalk5 = __toESM(require("chalk"), 1);
|
|
373
|
+
var runSteps = /* @__PURE__ */ __name((name, steps, exitOnFail = true, messages) => {
|
|
374
|
+
return safeExit(() => {
|
|
375
|
+
const pkgName = process.env.npm_package_name;
|
|
376
|
+
console.log(import_chalk5.default.green(`${name} [${pkgName}]`));
|
|
377
|
+
let totalStatus = 0;
|
|
378
|
+
for (const [i, [command, args, config]] of steps.entries()) {
|
|
379
|
+
if (messages?.[i]) {
|
|
380
|
+
console.log(import_chalk5.default.gray(messages?.[i]));
|
|
381
|
+
}
|
|
382
|
+
const argList = Array.isArray(args) ? args : args.split(" ");
|
|
383
|
+
if (command === "node" && !(0, import_node_fs3.existsSync)(argList[0])) {
|
|
384
|
+
throw new Error(`File not found [${argList[0]}]`);
|
|
385
|
+
}
|
|
386
|
+
const status = (0, import_node_child_process4.spawnSync)(command, Array.isArray(args) ? args : args.split(" "), {
|
|
387
|
+
...config,
|
|
388
|
+
encoding: "utf8",
|
|
389
|
+
env: {
|
|
390
|
+
FORCE_COLOR: "3",
|
|
391
|
+
...process.env
|
|
392
|
+
},
|
|
393
|
+
shell: true,
|
|
394
|
+
stdio: "inherit"
|
|
395
|
+
}).status ?? 0;
|
|
396
|
+
checkResult(name, status, "error", exitOnFail);
|
|
397
|
+
totalStatus += status ?? 0;
|
|
398
|
+
}
|
|
399
|
+
return totalStatus;
|
|
400
|
+
}, !!exitOnFail);
|
|
401
|
+
}, "runSteps");
|
|
402
|
+
|
|
403
|
+
// src/lib/runStepsAsync.ts
|
|
404
|
+
var import_node_child_process5 = require("child_process");
|
|
405
|
+
var import_node_fs4 = require("fs");
|
|
406
|
+
var import_chalk6 = __toESM(require("chalk"), 1);
|
|
407
|
+
var runStepAsync = /* @__PURE__ */ __name((name, step, exitOnFail = true, message) => {
|
|
408
|
+
return new Promise((resolve) => {
|
|
409
|
+
const [command, args, config] = step;
|
|
410
|
+
if (message) {
|
|
411
|
+
console.log(import_chalk6.default.gray(message));
|
|
412
|
+
}
|
|
413
|
+
const argList = Array.isArray(args) ? args : args.split(" ");
|
|
414
|
+
if (command === "node" && !(0, import_node_fs4.existsSync)(argList[0])) {
|
|
415
|
+
throw new Error(`File not found [${argList[0]}]`);
|
|
416
|
+
}
|
|
417
|
+
(0, import_node_child_process5.spawn)(command, Array.isArray(args) ? args : args.split(" "), {
|
|
418
|
+
...config,
|
|
419
|
+
env: {
|
|
420
|
+
FORCE_COLOR: "3",
|
|
421
|
+
...process.env
|
|
422
|
+
},
|
|
423
|
+
shell: true,
|
|
424
|
+
stdio: "inherit"
|
|
425
|
+
}).on("close", (code) => {
|
|
426
|
+
if (code) {
|
|
427
|
+
console.error(import_chalk6.default.red(`Command Exited With Non-Zero Result [${import_chalk6.default.gray(code)}] | ${import_chalk6.default.yellow(command)} ${import_chalk6.default.white(Array.isArray(args) ? args.join(" ") : args)}`));
|
|
428
|
+
checkResult(name, code, "error", exitOnFail);
|
|
429
|
+
resolve(code);
|
|
430
|
+
} else {
|
|
431
|
+
resolve(0);
|
|
432
|
+
}
|
|
433
|
+
});
|
|
434
|
+
});
|
|
435
|
+
}, "runStepAsync");
|
|
436
|
+
var runStepsAsync = /* @__PURE__ */ __name(async (name, steps, exitOnFail = true, messages) => {
|
|
437
|
+
return await safeExitAsync(async () => {
|
|
438
|
+
const pkgName = process.env.npm_package_name;
|
|
439
|
+
console.log(import_chalk6.default.green(`${name} [${pkgName}]`));
|
|
440
|
+
let result = 0;
|
|
441
|
+
for (const [i, step] of steps.entries()) {
|
|
442
|
+
result += await runStepAsync(name, step, exitOnFail, messages?.[i]);
|
|
443
|
+
}
|
|
444
|
+
return result;
|
|
445
|
+
});
|
|
446
|
+
}, "runStepsAsync");
|
|
447
|
+
|
|
448
|
+
// src/actions/build.ts
|
|
449
|
+
var build = /* @__PURE__ */ __name(async ({ incremental, jobs, target, verbose, pkg }) => {
|
|
450
|
+
const start = Date.now();
|
|
451
|
+
const pkgOptions = pkg ? [
|
|
452
|
+
pkg
|
|
453
|
+
] : [];
|
|
454
|
+
const incrementalOptions = incremental ? [
|
|
455
|
+
"-i"
|
|
456
|
+
] : [];
|
|
457
|
+
const verboseOptions = verbose ? [
|
|
458
|
+
"-v"
|
|
459
|
+
] : [];
|
|
460
|
+
const targetOptions = target ? [
|
|
461
|
+
"-t",
|
|
462
|
+
target
|
|
463
|
+
] : [];
|
|
464
|
+
const jobsOptions = jobs ? [
|
|
465
|
+
"-j",
|
|
466
|
+
`${jobs}`
|
|
467
|
+
] : [];
|
|
468
|
+
if (jobs) {
|
|
469
|
+
console.log(import_chalk7.default.blue(`Jobs set to [${jobs}]`));
|
|
470
|
+
}
|
|
471
|
+
const result = await runStepsAsync(`Build${incremental ? "-Incremental" : ""} [${pkg ?? "All"}]`, [
|
|
472
|
+
[
|
|
473
|
+
"yarn",
|
|
474
|
+
[
|
|
475
|
+
"xy",
|
|
476
|
+
"compile",
|
|
477
|
+
...pkgOptions,
|
|
478
|
+
...targetOptions,
|
|
479
|
+
...verboseOptions,
|
|
480
|
+
...jobsOptions,
|
|
481
|
+
...incrementalOptions
|
|
482
|
+
]
|
|
483
|
+
],
|
|
484
|
+
[
|
|
485
|
+
"yarn",
|
|
486
|
+
[
|
|
487
|
+
"xy",
|
|
488
|
+
"lint",
|
|
489
|
+
...pkgOptions,
|
|
490
|
+
...verboseOptions,
|
|
491
|
+
...incrementalOptions
|
|
492
|
+
]
|
|
493
|
+
],
|
|
494
|
+
[
|
|
495
|
+
"yarn",
|
|
496
|
+
[
|
|
497
|
+
"xy",
|
|
498
|
+
"deps",
|
|
499
|
+
...pkgOptions,
|
|
500
|
+
...verboseOptions,
|
|
501
|
+
...jobsOptions,
|
|
502
|
+
...incrementalOptions
|
|
503
|
+
]
|
|
504
|
+
]
|
|
505
|
+
]);
|
|
506
|
+
console.log(`${import_chalk7.default.gray("Built in")} [${import_chalk7.default.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${import_chalk7.default.gray("seconds")}`);
|
|
507
|
+
return result;
|
|
508
|
+
}, "build");
|
|
509
|
+
|
|
510
|
+
// src/actions/clean.ts
|
|
511
|
+
var clean = /* @__PURE__ */ __name(async ({ verbose, pkg }) => {
|
|
512
|
+
return pkg ? await cleanPackage({
|
|
513
|
+
pkg,
|
|
514
|
+
verbose
|
|
515
|
+
}) : cleanAll({
|
|
516
|
+
verbose
|
|
517
|
+
});
|
|
518
|
+
}, "clean");
|
|
519
|
+
var cleanPackage = /* @__PURE__ */ __name(({ pkg }) => {
|
|
520
|
+
return runStepsAsync(`Clean [${pkg}]`, [
|
|
521
|
+
[
|
|
522
|
+
"yarn",
|
|
523
|
+
[
|
|
524
|
+
"workspace",
|
|
525
|
+
pkg,
|
|
526
|
+
"run",
|
|
527
|
+
"package-clean"
|
|
528
|
+
]
|
|
529
|
+
]
|
|
530
|
+
]);
|
|
531
|
+
}, "cleanPackage");
|
|
532
|
+
var cleanAll = /* @__PURE__ */ __name(({ verbose }) => {
|
|
533
|
+
const verboseOptions = verbose ? [
|
|
534
|
+
"--verbose"
|
|
535
|
+
] : [
|
|
536
|
+
"--no-verbose"
|
|
537
|
+
];
|
|
538
|
+
return runStepsAsync("Clean", [
|
|
539
|
+
[
|
|
540
|
+
"yarn",
|
|
541
|
+
[
|
|
542
|
+
"workspaces foreach",
|
|
543
|
+
"-pA",
|
|
544
|
+
"--jobs 64",
|
|
545
|
+
...verboseOptions,
|
|
546
|
+
"run",
|
|
547
|
+
"package-clean"
|
|
548
|
+
]
|
|
549
|
+
]
|
|
550
|
+
]);
|
|
551
|
+
}, "cleanAll");
|
|
552
|
+
|
|
553
|
+
// src/actions/clean-docs.ts
|
|
554
|
+
var import_node_path = __toESM(require("path"), 1);
|
|
555
|
+
var import_chalk8 = __toESM(require("chalk"), 1);
|
|
556
|
+
var import_rimraf = require("rimraf");
|
|
557
|
+
var cleanDocs = /* @__PURE__ */ __name(() => {
|
|
558
|
+
const pkgName = process.env.npm_package_name;
|
|
559
|
+
console.log(import_chalk8.default.green(`Cleaning Docs [${pkgName}]`));
|
|
560
|
+
for (const { location } of yarnWorkspaces()) (0, import_rimraf.rimrafSync)(import_node_path.default.join(location, "docs"), {
|
|
561
|
+
glob: true
|
|
562
|
+
});
|
|
563
|
+
return 0;
|
|
564
|
+
}, "cleanDocs");
|
|
565
|
+
|
|
566
|
+
// src/actions/compile.ts
|
|
567
|
+
var import_chalk9 = __toESM(require("chalk"), 1);
|
|
568
|
+
var compile = /* @__PURE__ */ __name(({ verbose, target, pkg, incremental, publint: publint2 }) => {
|
|
569
|
+
return pkg ? compilePackage({
|
|
570
|
+
pkg,
|
|
571
|
+
publint: publint2,
|
|
572
|
+
target,
|
|
573
|
+
verbose
|
|
574
|
+
}) : compileAll({
|
|
575
|
+
incremental,
|
|
576
|
+
publint: publint2,
|
|
577
|
+
target,
|
|
578
|
+
verbose
|
|
579
|
+
});
|
|
580
|
+
}, "compile");
|
|
581
|
+
var compilePackage = /* @__PURE__ */ __name(({ target, pkg }) => {
|
|
582
|
+
const targetOptions = target ? [
|
|
583
|
+
"-t",
|
|
584
|
+
target
|
|
585
|
+
] : [];
|
|
586
|
+
return runSteps(`Compile [${pkg}]`, [
|
|
587
|
+
[
|
|
588
|
+
"yarn",
|
|
589
|
+
[
|
|
590
|
+
"workspace",
|
|
591
|
+
pkg,
|
|
592
|
+
"run",
|
|
593
|
+
"package-compile",
|
|
594
|
+
...targetOptions
|
|
595
|
+
]
|
|
596
|
+
]
|
|
597
|
+
]);
|
|
598
|
+
}, "compilePackage");
|
|
599
|
+
var compileAll = /* @__PURE__ */ __name(({ jobs, verbose, target, incremental }) => {
|
|
600
|
+
const start = Date.now();
|
|
601
|
+
const verboseOptions = verbose ? [
|
|
602
|
+
"--verbose"
|
|
603
|
+
] : [
|
|
604
|
+
"--no-verbose"
|
|
605
|
+
];
|
|
606
|
+
const targetOptions = target ? [
|
|
607
|
+
"-t",
|
|
608
|
+
target
|
|
609
|
+
] : [];
|
|
610
|
+
const incrementalOptions = incremental ? [
|
|
611
|
+
"--since",
|
|
612
|
+
"-Apt",
|
|
613
|
+
"--topological-dev"
|
|
614
|
+
] : [
|
|
615
|
+
"--parallel",
|
|
616
|
+
"-Apt",
|
|
617
|
+
"--topological-dev"
|
|
618
|
+
];
|
|
619
|
+
const jobsOptions = jobs ? [
|
|
620
|
+
"-j",
|
|
621
|
+
`${jobs}`
|
|
622
|
+
] : [];
|
|
623
|
+
if (jobs) {
|
|
624
|
+
console.log(import_chalk9.default.blue(`Jobs set to [${jobs}]`));
|
|
625
|
+
}
|
|
626
|
+
const result = runSteps(`Compile${incremental ? "-Incremental" : ""} [All]`, [
|
|
627
|
+
[
|
|
628
|
+
"yarn",
|
|
629
|
+
[
|
|
630
|
+
"workspaces",
|
|
631
|
+
"foreach",
|
|
632
|
+
...incrementalOptions,
|
|
633
|
+
...jobsOptions,
|
|
634
|
+
...verboseOptions,
|
|
635
|
+
"run",
|
|
636
|
+
"package-compile",
|
|
637
|
+
...targetOptions
|
|
638
|
+
]
|
|
639
|
+
]
|
|
640
|
+
]);
|
|
641
|
+
console.log(`${import_chalk9.default.gray("Compiled in")} [${import_chalk9.default.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${import_chalk9.default.gray("seconds")}`);
|
|
642
|
+
return result;
|
|
643
|
+
}, "compileAll");
|
|
644
|
+
|
|
645
|
+
// src/actions/copy-assets.ts
|
|
646
|
+
var import_posix = __toESM(require("path/posix"), 1);
|
|
647
|
+
var import_chalk10 = __toESM(require("chalk"), 1);
|
|
648
|
+
var import_cpy = __toESM(require("cpy"), 1);
|
|
649
|
+
var copyPackageTargetAssets = /* @__PURE__ */ __name(async (target, name, location) => {
|
|
650
|
+
try {
|
|
651
|
+
const values = await (0, import_cpy.default)([
|
|
652
|
+
"**/*.jpg",
|
|
653
|
+
"**/*.png",
|
|
654
|
+
"**/*.gif",
|
|
655
|
+
"**/*.svg",
|
|
656
|
+
"**/*.webp",
|
|
657
|
+
"**/*.sass",
|
|
658
|
+
"**/*.scss",
|
|
659
|
+
"**/*.gif",
|
|
660
|
+
"**/*.css"
|
|
661
|
+
], `../dist/${target}`, {
|
|
662
|
+
cwd: import_posix.default.join(process.cwd(), location, "src"),
|
|
663
|
+
parents: true
|
|
664
|
+
});
|
|
665
|
+
for (const value of values) {
|
|
666
|
+
console.log(`${value.split("/").pop()} => ./dist/${target}`);
|
|
667
|
+
}
|
|
668
|
+
return 0;
|
|
669
|
+
} catch (reason) {
|
|
670
|
+
console.log(`Copy Failed: ${name}: ${reason}`);
|
|
671
|
+
return 1;
|
|
672
|
+
}
|
|
673
|
+
}, "copyPackageTargetAssets");
|
|
674
|
+
var copyTargetAssets = /* @__PURE__ */ __name(async (target, pkg) => {
|
|
675
|
+
const workspaces = yarnWorkspaces();
|
|
676
|
+
console.log(import_chalk10.default.green(`Copying Assets [${target.toUpperCase()}]`));
|
|
677
|
+
const workspaceList = workspaces.filter(({ name }) => {
|
|
678
|
+
return pkg === void 0 || name === pkg;
|
|
679
|
+
});
|
|
680
|
+
if (workspaceList.length === 0) {
|
|
681
|
+
console.error(`Package not found [${pkg}]`);
|
|
682
|
+
} else {
|
|
683
|
+
const results = await Promise.all(workspaceList.map(async (workspace) => {
|
|
684
|
+
const { location, name } = workspace;
|
|
685
|
+
return await copyPackageTargetAssets(target, name, location);
|
|
686
|
+
}));
|
|
687
|
+
return results.reduce((prev, result) => prev || result, 0);
|
|
688
|
+
}
|
|
689
|
+
return 0;
|
|
690
|
+
}, "copyTargetAssets");
|
|
691
|
+
var copyAssets = /* @__PURE__ */ __name(async ({ target, pkg }) => {
|
|
692
|
+
switch (target) {
|
|
693
|
+
case "esm": {
|
|
694
|
+
return await copyTargetAssets("esm", pkg);
|
|
695
|
+
}
|
|
696
|
+
case "cjs": {
|
|
697
|
+
return await copyTargetAssets("cjs", pkg);
|
|
698
|
+
}
|
|
699
|
+
default: {
|
|
700
|
+
return await copyTargetAssets("esm", pkg) || await copyTargetAssets("cjs", pkg);
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
}, "copyAssets");
|
|
704
|
+
|
|
705
|
+
// src/actions/cycle.ts
|
|
706
|
+
var cycle = /* @__PURE__ */ __name(() => {
|
|
707
|
+
const rules = [
|
|
708
|
+
`"'import/no-cycle': [1, { maxDepth: 6 }]"`,
|
|
709
|
+
`"'import/no-internal-modules': ['off']"`
|
|
710
|
+
];
|
|
711
|
+
return runSteps("Cycle", [
|
|
712
|
+
[
|
|
713
|
+
"yarn",
|
|
714
|
+
[
|
|
715
|
+
"eslint",
|
|
716
|
+
...rules.flatMap((rule) => [
|
|
717
|
+
"--rule",
|
|
718
|
+
rule
|
|
719
|
+
]),
|
|
720
|
+
"--cache",
|
|
721
|
+
"."
|
|
722
|
+
]
|
|
723
|
+
]
|
|
724
|
+
]);
|
|
725
|
+
}, "cycle");
|
|
726
|
+
|
|
727
|
+
// src/actions/dead.ts
|
|
728
|
+
var dead = /* @__PURE__ */ __name(() => {
|
|
729
|
+
return runSteps("Dead", [
|
|
730
|
+
[
|
|
731
|
+
"yarn",
|
|
732
|
+
[
|
|
733
|
+
"ts-prune",
|
|
734
|
+
"-p",
|
|
735
|
+
"tsconfig.json"
|
|
736
|
+
]
|
|
737
|
+
]
|
|
738
|
+
]);
|
|
739
|
+
}, "dead");
|
|
740
|
+
|
|
741
|
+
// src/actions/deploy.ts
|
|
742
|
+
var deploy = /* @__PURE__ */ __name(() => {
|
|
743
|
+
return runSteps("Deploy [Patch]", [
|
|
744
|
+
[
|
|
745
|
+
"yarn",
|
|
746
|
+
"workspaces foreach --all version patch --deferred"
|
|
747
|
+
],
|
|
748
|
+
[
|
|
749
|
+
"yarn",
|
|
750
|
+
"xy clean"
|
|
751
|
+
],
|
|
752
|
+
[
|
|
753
|
+
"yarn",
|
|
754
|
+
"xy build"
|
|
755
|
+
],
|
|
756
|
+
[
|
|
757
|
+
"yarn",
|
|
758
|
+
"version apply --all"
|
|
759
|
+
],
|
|
760
|
+
[
|
|
761
|
+
"yarn",
|
|
762
|
+
"workspaces foreach --all --parallel npm publish"
|
|
763
|
+
]
|
|
764
|
+
]);
|
|
765
|
+
}, "deploy");
|
|
766
|
+
|
|
767
|
+
// src/actions/deploy-major.ts
|
|
768
|
+
var deployMajor = /* @__PURE__ */ __name(() => {
|
|
769
|
+
return runSteps("Deploy [Major]", [
|
|
770
|
+
[
|
|
771
|
+
"yarn",
|
|
772
|
+
"workspaces foreach --all version major --deferred"
|
|
773
|
+
],
|
|
774
|
+
[
|
|
775
|
+
"yarn",
|
|
776
|
+
"xy clean"
|
|
777
|
+
],
|
|
778
|
+
[
|
|
779
|
+
"yarn",
|
|
780
|
+
"xy build"
|
|
781
|
+
],
|
|
782
|
+
[
|
|
783
|
+
"yarn",
|
|
784
|
+
"version apply --all"
|
|
785
|
+
],
|
|
786
|
+
[
|
|
787
|
+
"yarn",
|
|
788
|
+
"workspaces foreach --all --parallel npm publish"
|
|
789
|
+
]
|
|
790
|
+
]);
|
|
791
|
+
}, "deployMajor");
|
|
792
|
+
|
|
793
|
+
// src/actions/deploy-minor.ts
|
|
794
|
+
var deployMinor = /* @__PURE__ */ __name(() => {
|
|
795
|
+
return runSteps("Deploy [Minor]", [
|
|
796
|
+
[
|
|
797
|
+
"yarn",
|
|
798
|
+
"workspaces foreach --all version minor --deferred"
|
|
799
|
+
],
|
|
800
|
+
[
|
|
801
|
+
"yarn",
|
|
802
|
+
"xy clean"
|
|
803
|
+
],
|
|
804
|
+
[
|
|
805
|
+
"yarn",
|
|
806
|
+
"xy build"
|
|
807
|
+
],
|
|
808
|
+
[
|
|
809
|
+
"yarn",
|
|
810
|
+
"version apply --all"
|
|
811
|
+
],
|
|
812
|
+
[
|
|
813
|
+
"yarn",
|
|
814
|
+
"workspaces foreach --all --parallel npm publish"
|
|
815
|
+
]
|
|
816
|
+
]);
|
|
817
|
+
}, "deployMinor");
|
|
818
|
+
|
|
819
|
+
// src/actions/deploy-next.ts
|
|
820
|
+
var deployNext = /* @__PURE__ */ __name(() => {
|
|
821
|
+
return runSteps("Deploy [Next]", [
|
|
822
|
+
[
|
|
823
|
+
"yarn",
|
|
824
|
+
"workspaces foreach --all version minor --deferred"
|
|
825
|
+
],
|
|
826
|
+
[
|
|
827
|
+
"yarn",
|
|
828
|
+
"xy clean"
|
|
829
|
+
],
|
|
830
|
+
[
|
|
831
|
+
"yarn",
|
|
832
|
+
"xy build"
|
|
833
|
+
],
|
|
834
|
+
[
|
|
835
|
+
"yarn",
|
|
836
|
+
"version apply --all --prerelease"
|
|
837
|
+
],
|
|
838
|
+
[
|
|
839
|
+
"yarn",
|
|
840
|
+
"workspaces foreach --all --parallel npm publish --tag next"
|
|
841
|
+
]
|
|
842
|
+
]);
|
|
843
|
+
}, "deployNext");
|
|
844
|
+
|
|
845
|
+
// src/actions/deps.ts
|
|
846
|
+
var import_chalk11 = __toESM(require("chalk"), 1);
|
|
847
|
+
var deps = /* @__PURE__ */ __name(({ pkg, incremental }) => {
|
|
848
|
+
pkg ? depsPackage({
|
|
849
|
+
pkg
|
|
850
|
+
}) : depsAll({
|
|
851
|
+
incremental
|
|
852
|
+
});
|
|
853
|
+
return 0;
|
|
854
|
+
}, "deps");
|
|
855
|
+
var depsPackage = /* @__PURE__ */ __name(({ pkg }) => {
|
|
856
|
+
const steps = [
|
|
857
|
+
[
|
|
858
|
+
"yarn",
|
|
859
|
+
[
|
|
860
|
+
"workspace",
|
|
861
|
+
pkg,
|
|
862
|
+
"run",
|
|
863
|
+
"package-deps"
|
|
864
|
+
]
|
|
865
|
+
]
|
|
866
|
+
];
|
|
867
|
+
return runSteps(`Deps [${pkg}]`, [
|
|
868
|
+
...steps
|
|
869
|
+
]);
|
|
870
|
+
}, "depsPackage");
|
|
871
|
+
var depsAll = /* @__PURE__ */ __name(({ incremental, jobs, verbose }) => {
|
|
872
|
+
const start = Date.now();
|
|
873
|
+
const jobsOptions = jobs ? [
|
|
874
|
+
"-j",
|
|
875
|
+
`${jobs}`
|
|
876
|
+
] : [];
|
|
877
|
+
const verboseOptions = verbose ? [
|
|
878
|
+
"--verbose"
|
|
879
|
+
] : [
|
|
880
|
+
"--no-verbose"
|
|
881
|
+
];
|
|
882
|
+
if (jobs) {
|
|
883
|
+
console.log(import_chalk11.default.blue(`Jobs set to [${jobs}]`));
|
|
884
|
+
}
|
|
885
|
+
const incrementalOptions = incremental ? [
|
|
886
|
+
"--since",
|
|
887
|
+
"-pA"
|
|
888
|
+
] : [
|
|
889
|
+
"-pA"
|
|
890
|
+
];
|
|
891
|
+
const steps = [
|
|
892
|
+
[
|
|
893
|
+
"yarn",
|
|
894
|
+
[
|
|
895
|
+
"workspaces",
|
|
896
|
+
"foreach",
|
|
897
|
+
...jobsOptions,
|
|
898
|
+
...incrementalOptions,
|
|
899
|
+
...verboseOptions,
|
|
900
|
+
"run",
|
|
901
|
+
"package-deps"
|
|
902
|
+
]
|
|
903
|
+
]
|
|
904
|
+
];
|
|
905
|
+
const result = runSteps(`Deps${incremental ? "-Incremental" : ""} [All]`, [
|
|
906
|
+
...steps
|
|
907
|
+
]);
|
|
908
|
+
console.log(`${import_chalk11.default.gray("Dep checked in")} [${import_chalk11.default.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${import_chalk11.default.gray("seconds")}`);
|
|
909
|
+
return result;
|
|
910
|
+
}, "depsAll");
|
|
911
|
+
|
|
912
|
+
// src/actions/dupdeps.ts
|
|
913
|
+
var import_chalk12 = __toESM(require("chalk"), 1);
|
|
914
|
+
var dupdeps = /* @__PURE__ */ __name(() => {
|
|
915
|
+
console.log(import_chalk12.default.green("Checking all Dependencies for Duplicates"));
|
|
916
|
+
const allDependencies = parsedPackageJSON()?.dependencies;
|
|
917
|
+
const dependencies = Object.entries(allDependencies).map(([k]) => k);
|
|
918
|
+
return detectDuplicateDependencies(dependencies);
|
|
919
|
+
}, "dupdeps");
|
|
920
|
+
|
|
921
|
+
// src/actions/fix.ts
|
|
922
|
+
var fix = /* @__PURE__ */ __name(() => {
|
|
923
|
+
return runSteps("Fix", [
|
|
924
|
+
[
|
|
925
|
+
"yarn",
|
|
926
|
+
[
|
|
927
|
+
"eslint",
|
|
928
|
+
".",
|
|
929
|
+
"--fix",
|
|
930
|
+
"--cache"
|
|
931
|
+
]
|
|
932
|
+
]
|
|
933
|
+
]);
|
|
934
|
+
}, "fix");
|
|
935
|
+
|
|
936
|
+
// src/actions/gen-docs.ts
|
|
937
|
+
var genDocs = /* @__PURE__ */ __name(({ pkg, incremental }) => {
|
|
938
|
+
return pkg ? genDocsPackage({
|
|
939
|
+
pkg
|
|
940
|
+
}) : genDocsAll({
|
|
941
|
+
incremental
|
|
942
|
+
});
|
|
943
|
+
}, "genDocs");
|
|
944
|
+
var genDocsPackage = /* @__PURE__ */ __name(({ pkg }) => {
|
|
945
|
+
const steps = [
|
|
946
|
+
[
|
|
947
|
+
"yarn",
|
|
948
|
+
[
|
|
949
|
+
"workspace",
|
|
950
|
+
pkg,
|
|
951
|
+
"run",
|
|
952
|
+
"package-gen-docs"
|
|
953
|
+
]
|
|
954
|
+
]
|
|
955
|
+
];
|
|
956
|
+
return runSteps(`GenDocs [${pkg}]`, [
|
|
957
|
+
...steps
|
|
958
|
+
]);
|
|
959
|
+
}, "genDocsPackage");
|
|
960
|
+
var genDocsAll = /* @__PURE__ */ __name(({ incremental }) => {
|
|
961
|
+
const incrementalOptions = incremental ? [
|
|
962
|
+
"--since",
|
|
963
|
+
"-pA"
|
|
964
|
+
] : [
|
|
965
|
+
"-pA"
|
|
966
|
+
];
|
|
967
|
+
const steps = [
|
|
968
|
+
[
|
|
969
|
+
"yarn",
|
|
970
|
+
[
|
|
971
|
+
"workspaces",
|
|
972
|
+
"foreach",
|
|
973
|
+
...incrementalOptions,
|
|
974
|
+
"run",
|
|
975
|
+
"package-gen-docs"
|
|
976
|
+
]
|
|
977
|
+
]
|
|
978
|
+
];
|
|
979
|
+
return runSteps(`GenDocs [All${incremental ? "-Incremental" : ""}]`, [
|
|
980
|
+
...steps
|
|
981
|
+
]);
|
|
982
|
+
}, "genDocsAll");
|
|
983
|
+
|
|
984
|
+
// src/actions/gitignore-gen.ts
|
|
985
|
+
var filename = ".gitignore";
|
|
986
|
+
var gitignoreGen = /* @__PURE__ */ __name((pkg) => generateIgnoreFiles(filename, pkg), "gitignoreGen");
|
|
987
|
+
|
|
988
|
+
// src/actions/gitlint.ts
|
|
989
|
+
var import_chalk13 = __toESM(require("chalk"), 1);
|
|
990
|
+
var import_parse_git_config = __toESM(require("parse-git-config"), 1);
|
|
991
|
+
var gitlint = /* @__PURE__ */ __name(() => {
|
|
992
|
+
console.log(`
|
|
993
|
+
Gitlint Start [${process.cwd()}]
|
|
994
|
+
`);
|
|
995
|
+
let valid = 0;
|
|
996
|
+
let warnings = 0;
|
|
997
|
+
const errors = 0;
|
|
998
|
+
const gitConfig = import_parse_git_config.default.sync();
|
|
999
|
+
const warn = /* @__PURE__ */ __name((message) => {
|
|
1000
|
+
console.warn(import_chalk13.default.yellow(`Warning: ${message}`));
|
|
1001
|
+
warnings++;
|
|
1002
|
+
}, "warn");
|
|
1003
|
+
if (gitConfig.core.ignorecase) {
|
|
1004
|
+
warn("Please set core.ignorecase to FALSE in .git/config file [run yarn gitlint-fix]");
|
|
1005
|
+
} else {
|
|
1006
|
+
valid++;
|
|
1007
|
+
}
|
|
1008
|
+
if (gitConfig.core.autocrlf === false) {
|
|
1009
|
+
valid++;
|
|
1010
|
+
} else {
|
|
1011
|
+
warn("Please set core.autocrlf to FALSE in .git/config file [run yarn gitlint-fix]");
|
|
1012
|
+
}
|
|
1013
|
+
if (gitConfig.core.eol === "lf") {
|
|
1014
|
+
valid++;
|
|
1015
|
+
} else {
|
|
1016
|
+
warn('Please set core.eol to "lf" in .git/config file [run yarn gitlint-fix]');
|
|
1017
|
+
}
|
|
1018
|
+
const resultMessages = [];
|
|
1019
|
+
if (valid > 0) {
|
|
1020
|
+
resultMessages.push(import_chalk13.default.green(`Passed: ${valid}`));
|
|
1021
|
+
}
|
|
1022
|
+
if (warnings > 0) {
|
|
1023
|
+
resultMessages.push(import_chalk13.default.yellow(`Warnings: ${warnings}`));
|
|
1024
|
+
}
|
|
1025
|
+
if (errors > 0) {
|
|
1026
|
+
resultMessages.push(import_chalk13.default.red(` Errors: ${errors}`));
|
|
1027
|
+
}
|
|
1028
|
+
console.warn(`Gitlint Finish [ ${resultMessages.join(" | ")} ]
|
|
1029
|
+
`);
|
|
1030
|
+
return warnings + errors === 0 ? 1 : 0;
|
|
1031
|
+
}, "gitlint");
|
|
1032
|
+
|
|
1033
|
+
// src/actions/gitlint-fix.ts
|
|
1034
|
+
var import_node_child_process6 = require("child_process");
|
|
1035
|
+
var import_chalk14 = __toESM(require("chalk"), 1);
|
|
1036
|
+
var import_parse_git_config2 = __toESM(require("parse-git-config"), 1);
|
|
1037
|
+
var gitlintFix = /* @__PURE__ */ __name(() => {
|
|
1038
|
+
console.log(`
|
|
1039
|
+
Gitlint Fix Start [${process.cwd()}]
|
|
1040
|
+
`);
|
|
1041
|
+
const gitConfig = import_parse_git_config2.default.sync();
|
|
1042
|
+
if (gitConfig.core.ignorecase) {
|
|
1043
|
+
(0, import_node_child_process6.execSync)("git config core.ignorecase false", {
|
|
1044
|
+
stdio: "inherit"
|
|
1045
|
+
});
|
|
1046
|
+
console.warn(import_chalk14.default.yellow("\nGitlint Fix: Updated core.ignorecase to be false\n"));
|
|
1047
|
+
}
|
|
1048
|
+
if (gitConfig.core.autocrlf !== false) {
|
|
1049
|
+
(0, import_node_child_process6.execSync)("git config core.autocrlf false", {
|
|
1050
|
+
stdio: "inherit"
|
|
1051
|
+
});
|
|
1052
|
+
console.warn(import_chalk14.default.yellow("\nGitlint Fix: Updated core.autocrlf to be false\n"));
|
|
1053
|
+
}
|
|
1054
|
+
if (gitConfig.core.eol !== "lf") {
|
|
1055
|
+
(0, import_node_child_process6.execSync)("git config core.eol lf", {
|
|
1056
|
+
stdio: "inherit"
|
|
1057
|
+
});
|
|
1058
|
+
console.warn(import_chalk14.default.yellow('\nGitlint Fix: Updated core.eol to be "lf"\n'));
|
|
1059
|
+
}
|
|
1060
|
+
return 1;
|
|
1061
|
+
}, "gitlintFix");
|
|
1062
|
+
|
|
1063
|
+
// src/actions/license.ts
|
|
1064
|
+
var import_chalk15 = __toESM(require("chalk"), 1);
|
|
1065
|
+
var import_license_checker = require("license-checker");
|
|
1066
|
+
var license = /* @__PURE__ */ __name(async (pkg) => {
|
|
1067
|
+
const workspaces = yarnWorkspaces();
|
|
1068
|
+
const workspaceList = workspaces.filter(({ name }) => {
|
|
1069
|
+
return pkg === void 0 || name === pkg;
|
|
1070
|
+
});
|
|
1071
|
+
const exclude = /* @__PURE__ */ new Set([
|
|
1072
|
+
"MIT",
|
|
1073
|
+
"MIT*",
|
|
1074
|
+
"ISC",
|
|
1075
|
+
"Apache-2.0",
|
|
1076
|
+
"BSD",
|
|
1077
|
+
"BSD*",
|
|
1078
|
+
"BSD-2-Clause",
|
|
1079
|
+
"BSD-3-Clause",
|
|
1080
|
+
"CC-BY-4.0",
|
|
1081
|
+
"Unlicense",
|
|
1082
|
+
"CC-BY-3.0",
|
|
1083
|
+
"CC0-1.0",
|
|
1084
|
+
"LGPL-3.0-only",
|
|
1085
|
+
"LGPL-3.0",
|
|
1086
|
+
"LGPL-3.0-or-later",
|
|
1087
|
+
"Python-2.0"
|
|
1088
|
+
]);
|
|
1089
|
+
console.log(import_chalk15.default.green("License Checker"));
|
|
1090
|
+
return (await Promise.all(workspaceList.map(({ location, name }) => {
|
|
1091
|
+
return new Promise((resolve) => {
|
|
1092
|
+
(0, import_license_checker.init)({
|
|
1093
|
+
production: true,
|
|
1094
|
+
start: location
|
|
1095
|
+
}, (error, packages) => {
|
|
1096
|
+
if (error) {
|
|
1097
|
+
console.error(import_chalk15.default.red(`License Checker [${name}] Error`));
|
|
1098
|
+
console.error(import_chalk15.default.gray(error));
|
|
1099
|
+
console.log("\n");
|
|
1100
|
+
resolve(1);
|
|
1101
|
+
} else {
|
|
1102
|
+
console.log(import_chalk15.default.green(`License Checker [${name}]`));
|
|
1103
|
+
let count = 0;
|
|
1104
|
+
for (const [name2, info] of Object.entries(packages)) {
|
|
1105
|
+
const licenses = Array.isArray(info.licenses) ? info.licenses : [
|
|
1106
|
+
info.licenses
|
|
1107
|
+
];
|
|
1108
|
+
for (let license2 of licenses) {
|
|
1109
|
+
if (license2) {
|
|
1110
|
+
if (license2[0] === "(" && license2.at(-1) === ")") {
|
|
1111
|
+
license2 = license2.slice(1, -2);
|
|
1112
|
+
}
|
|
1113
|
+
const orLicenses = license2.split(" OR ");
|
|
1114
|
+
let orLicenseFound = false;
|
|
1115
|
+
for (const orLicense of orLicenses) {
|
|
1116
|
+
if (exclude.has(orLicense)) {
|
|
1117
|
+
orLicenseFound = true;
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
if (!orLicenseFound) {
|
|
1121
|
+
count++;
|
|
1122
|
+
console.warn(import_chalk15.default.yellow(`${name2}: Package License not allowed [${license2}]`));
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
console.log("\n");
|
|
1128
|
+
resolve(count);
|
|
1129
|
+
}
|
|
1130
|
+
});
|
|
1131
|
+
});
|
|
1132
|
+
}))).reduce((prev, value) => prev || value, 0);
|
|
1133
|
+
}, "license");
|
|
1134
|
+
|
|
1135
|
+
// src/actions/lint.ts
|
|
1136
|
+
var import_chalk16 = __toESM(require("chalk"), 1);
|
|
1137
|
+
var import_eslint = require("eslint");
|
|
1138
|
+
var dumpMessages = /* @__PURE__ */ __name((lintResults) => {
|
|
1139
|
+
const colors = [
|
|
1140
|
+
"white",
|
|
1141
|
+
"yellow",
|
|
1142
|
+
"red"
|
|
1143
|
+
];
|
|
1144
|
+
const severity = [
|
|
1145
|
+
"none",
|
|
1146
|
+
"warning",
|
|
1147
|
+
"error"
|
|
1148
|
+
];
|
|
1149
|
+
for (const lintResult of lintResults) {
|
|
1150
|
+
if (lintResult.messages.length > 0) {
|
|
1151
|
+
console.log(import_chalk16.default.gray(`${lintResult.filePath}`));
|
|
1152
|
+
for (const message of lintResult.messages) {
|
|
1153
|
+
console.log(import_chalk16.default.gray(` ${message.line}:${message.column}`), import_chalk16.default[colors[message.severity]](` ${severity[message.severity]}`), import_chalk16.default.white(` ${message.message}`), import_chalk16.default.gray(` ${message.ruleId}`));
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
}, "dumpMessages");
|
|
1158
|
+
var lintPackage = /* @__PURE__ */ __name(async ({ pkg }) => {
|
|
1159
|
+
const workspace = yarnWorkspaces().find((workspace2) => workspace2.name === pkg);
|
|
1160
|
+
if (!workspace) {
|
|
1161
|
+
console.error(import_chalk16.default.red(`Unable to locate package [${import_chalk16.default.magenta(pkg)}]`));
|
|
1162
|
+
process.exit(1);
|
|
1163
|
+
}
|
|
1164
|
+
const engine = new import_eslint.ESLint({
|
|
1165
|
+
cache: true
|
|
1166
|
+
});
|
|
1167
|
+
const lintResults = await engine.lintFiles(workspace.location);
|
|
1168
|
+
dumpMessages(lintResults);
|
|
1169
|
+
return lintResults.reduce((prev, lintResult) => prev + lintResult.errorCount, 0);
|
|
1170
|
+
}, "lintPackage");
|
|
1171
|
+
var lint = /* @__PURE__ */ __name(async ({ pkg } = {}) => {
|
|
1172
|
+
return pkg ? await lintPackage({
|
|
1173
|
+
pkg
|
|
1174
|
+
}) : runSteps("Lint-Caching [All]", [
|
|
1175
|
+
[
|
|
1176
|
+
"yarn",
|
|
1177
|
+
[
|
|
1178
|
+
"eslint",
|
|
1179
|
+
".",
|
|
1180
|
+
"--cache"
|
|
1181
|
+
]
|
|
1182
|
+
]
|
|
1183
|
+
]);
|
|
1184
|
+
}, "lint");
|
|
1185
|
+
|
|
1186
|
+
// src/actions/lint-profile.ts
|
|
1187
|
+
var lintProfile = /* @__PURE__ */ __name(() => {
|
|
1188
|
+
return runSteps("Lint Profile", [
|
|
1189
|
+
[
|
|
1190
|
+
"yarn",
|
|
1191
|
+
[
|
|
1192
|
+
"xy",
|
|
1193
|
+
"lint"
|
|
1194
|
+
],
|
|
1195
|
+
{
|
|
1196
|
+
env: {
|
|
1197
|
+
...process.env,
|
|
1198
|
+
TIMING: "1"
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
]
|
|
1202
|
+
]);
|
|
1203
|
+
}, "lintProfile");
|
|
1204
|
+
|
|
1205
|
+
// src/actions/npmignore-gen.ts
|
|
1206
|
+
var filename2 = ".npmignore";
|
|
1207
|
+
var npmignoreGen = /* @__PURE__ */ __name((pkg) => generateIgnoreFiles(filename2, pkg), "npmignoreGen");
|
|
1208
|
+
|
|
1209
|
+
// src/actions/publint.ts
|
|
1210
|
+
var publint = /* @__PURE__ */ __name(async ({ verbose, pkg }) => {
|
|
1211
|
+
return pkg ? await publintPackage({
|
|
1212
|
+
pkg,
|
|
1213
|
+
verbose
|
|
1214
|
+
}) : publintAll({
|
|
1215
|
+
verbose
|
|
1216
|
+
});
|
|
1217
|
+
}, "publint");
|
|
1218
|
+
var publintPackage = /* @__PURE__ */ __name(({ pkg }) => {
|
|
1219
|
+
return runStepsAsync(`Publint [${pkg}]`, [
|
|
1220
|
+
[
|
|
1221
|
+
"yarn",
|
|
1222
|
+
[
|
|
1223
|
+
"workspace",
|
|
1224
|
+
pkg,
|
|
1225
|
+
"run",
|
|
1226
|
+
"package-publint"
|
|
1227
|
+
]
|
|
1228
|
+
]
|
|
1229
|
+
]);
|
|
1230
|
+
}, "publintPackage");
|
|
1231
|
+
var publintAll = /* @__PURE__ */ __name(({ verbose }) => {
|
|
1232
|
+
const verboseOptions = verbose ? [
|
|
1233
|
+
"--verbose"
|
|
1234
|
+
] : [
|
|
1235
|
+
"--no-verbose"
|
|
1236
|
+
];
|
|
1237
|
+
return runSteps("Publint", [
|
|
1238
|
+
[
|
|
1239
|
+
"yarn",
|
|
1240
|
+
[
|
|
1241
|
+
"workspaces",
|
|
1242
|
+
"foreach",
|
|
1243
|
+
"-pA",
|
|
1244
|
+
...verboseOptions,
|
|
1245
|
+
"run",
|
|
1246
|
+
"package-publint"
|
|
1247
|
+
]
|
|
1248
|
+
]
|
|
1249
|
+
]);
|
|
1250
|
+
}, "publintAll");
|
|
1251
|
+
|
|
1252
|
+
// src/actions/rebuild.ts
|
|
1253
|
+
var rebuild = /* @__PURE__ */ __name(({ target }) => {
|
|
1254
|
+
return runSteps("Rebuild", [
|
|
1255
|
+
[
|
|
1256
|
+
"yarn",
|
|
1257
|
+
"xy clean"
|
|
1258
|
+
],
|
|
1259
|
+
[
|
|
1260
|
+
"yarn",
|
|
1261
|
+
target ? `xy build -t ${target}` : "xy build"
|
|
1262
|
+
]
|
|
1263
|
+
]);
|
|
1264
|
+
}, "rebuild");
|
|
1265
|
+
|
|
1266
|
+
// src/actions/recompile.ts
|
|
1267
|
+
var import_chalk17 = __toESM(require("chalk"), 1);
|
|
1268
|
+
var recompile = /* @__PURE__ */ __name(async ({ verbose, target, pkg, incremental }) => {
|
|
1269
|
+
return pkg ? await recompilePackage({
|
|
1270
|
+
pkg,
|
|
1271
|
+
target,
|
|
1272
|
+
verbose
|
|
1273
|
+
}) : await recompileAll({
|
|
1274
|
+
incremental,
|
|
1275
|
+
target,
|
|
1276
|
+
verbose
|
|
1277
|
+
});
|
|
1278
|
+
}, "recompile");
|
|
1279
|
+
var recompilePackage = /* @__PURE__ */ __name(({ verbose, target, pkg }) => {
|
|
1280
|
+
const targetOptions = target ? [
|
|
1281
|
+
"-t",
|
|
1282
|
+
target
|
|
1283
|
+
] : [];
|
|
1284
|
+
const verboseOptions = verbose ? [
|
|
1285
|
+
"--verbose"
|
|
1286
|
+
] : [
|
|
1287
|
+
"--no-verbose"
|
|
1288
|
+
];
|
|
1289
|
+
return runStepsAsync(`Recompile [${pkg}]`, [
|
|
1290
|
+
[
|
|
1291
|
+
"yarn",
|
|
1292
|
+
[
|
|
1293
|
+
"workspace",
|
|
1294
|
+
pkg,
|
|
1295
|
+
...verboseOptions,
|
|
1296
|
+
"run",
|
|
1297
|
+
"package-recompile",
|
|
1298
|
+
...targetOptions
|
|
1299
|
+
]
|
|
1300
|
+
]
|
|
1301
|
+
]);
|
|
1302
|
+
}, "recompilePackage");
|
|
1303
|
+
var recompileAll = /* @__PURE__ */ __name(async ({ jobs, verbose, target, incremental }) => {
|
|
1304
|
+
const start = Date.now();
|
|
1305
|
+
const verboseOptions = verbose ? [
|
|
1306
|
+
"--verbose"
|
|
1307
|
+
] : [
|
|
1308
|
+
"--no-verbose"
|
|
1309
|
+
];
|
|
1310
|
+
const targetOptions = target ? [
|
|
1311
|
+
"-t",
|
|
1312
|
+
target
|
|
1313
|
+
] : [];
|
|
1314
|
+
const incrementalOptions = incremental ? [
|
|
1315
|
+
"--since",
|
|
1316
|
+
"-Apt",
|
|
1317
|
+
"--topological-dev"
|
|
1318
|
+
] : [
|
|
1319
|
+
"--parallel",
|
|
1320
|
+
"-Apt",
|
|
1321
|
+
"--topological-dev"
|
|
1322
|
+
];
|
|
1323
|
+
const jobsOptions = jobs ? [
|
|
1324
|
+
"-j",
|
|
1325
|
+
`${jobs}`
|
|
1326
|
+
] : [];
|
|
1327
|
+
if (jobs) {
|
|
1328
|
+
console.log(import_chalk17.default.blue(`Jobs set to [${jobs}]`));
|
|
1329
|
+
}
|
|
1330
|
+
const result = await runStepsAsync(`Recompile${incremental ? "-Incremental" : ""} [All]`, [
|
|
1331
|
+
[
|
|
1332
|
+
"yarn",
|
|
1333
|
+
[
|
|
1334
|
+
"workspaces",
|
|
1335
|
+
"foreach",
|
|
1336
|
+
...incrementalOptions,
|
|
1337
|
+
...jobsOptions,
|
|
1338
|
+
...verboseOptions,
|
|
1339
|
+
"run",
|
|
1340
|
+
"package-recompile",
|
|
1341
|
+
...targetOptions
|
|
1342
|
+
]
|
|
1343
|
+
]
|
|
1344
|
+
]);
|
|
1345
|
+
console.log(`${import_chalk17.default.gray("Recompiled in")} [${import_chalk17.default.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${import_chalk17.default.gray("seconds")}`);
|
|
1346
|
+
return result;
|
|
1347
|
+
}, "recompileAll");
|
|
1348
|
+
|
|
1349
|
+
// src/actions/reinstall.ts
|
|
1350
|
+
var import_node_fs5 = require("fs");
|
|
1351
|
+
var reinstall = /* @__PURE__ */ __name(() => {
|
|
1352
|
+
console.log("Reinstall [Clear Lock File]");
|
|
1353
|
+
(0, import_node_fs5.closeSync)((0, import_node_fs5.openSync)("./yarn.lock", "w"));
|
|
1354
|
+
console.log("Reinstall [Clear Node Modules]");
|
|
1355
|
+
const workspaces = yarnWorkspaces();
|
|
1356
|
+
const result = workspaces.map(({ location, name }) => {
|
|
1357
|
+
const dist = `${location}/node_modules`;
|
|
1358
|
+
try {
|
|
1359
|
+
(0, import_node_fs5.rmSync)(dist, {
|
|
1360
|
+
force: true,
|
|
1361
|
+
recursive: true
|
|
1362
|
+
});
|
|
1363
|
+
return 0;
|
|
1364
|
+
} catch (ex) {
|
|
1365
|
+
const error = ex;
|
|
1366
|
+
console.error(`Reinstall [Clear Node Modules] Failed [${name}, ${error.message}]`);
|
|
1367
|
+
return 1;
|
|
1368
|
+
}
|
|
1369
|
+
}).reduce((prev, result2) => prev || result2, 0);
|
|
1370
|
+
return result || runSteps("Reinstall", [
|
|
1371
|
+
[
|
|
1372
|
+
"yarn",
|
|
1373
|
+
"install --network-timeout 10000"
|
|
1374
|
+
]
|
|
1375
|
+
]);
|
|
1376
|
+
}, "reinstall");
|
|
1377
|
+
|
|
1378
|
+
// src/actions/relint.ts
|
|
1379
|
+
var import_node_fs6 = require("fs");
|
|
1380
|
+
var relint = /* @__PURE__ */ __name(() => {
|
|
1381
|
+
console.log("Relint - Cleaning [.eslintcache]");
|
|
1382
|
+
const workspaces = yarnWorkspaces();
|
|
1383
|
+
const result = workspaces.map(({ location, name }) => {
|
|
1384
|
+
const dist = `${location}/.eslintcache`;
|
|
1385
|
+
try {
|
|
1386
|
+
(0, import_node_fs6.rmSync)(dist, {
|
|
1387
|
+
force: true,
|
|
1388
|
+
recursive: true
|
|
1389
|
+
});
|
|
1390
|
+
return 0;
|
|
1391
|
+
} catch (ex) {
|
|
1392
|
+
const error = ex;
|
|
1393
|
+
console.error(`Relint - Cleaning [.eslintcache] Failed [${name}, ${error.message}]`);
|
|
1394
|
+
return 1;
|
|
1395
|
+
}
|
|
1396
|
+
}).reduce((prev, result2) => prev || result2, 0);
|
|
1397
|
+
return result || runSteps("Relint", [
|
|
1398
|
+
[
|
|
1399
|
+
"yarn",
|
|
1400
|
+
[
|
|
1401
|
+
"eslint",
|
|
1402
|
+
".",
|
|
1403
|
+
"--cache"
|
|
1404
|
+
]
|
|
1405
|
+
]
|
|
1406
|
+
]);
|
|
1407
|
+
}, "relint");
|
|
1408
|
+
|
|
1409
|
+
// src/actions/retest.ts
|
|
1410
|
+
var retest = /* @__PURE__ */ __name(() => {
|
|
1411
|
+
return runSteps("Test", [
|
|
1412
|
+
[
|
|
1413
|
+
"yarn",
|
|
1414
|
+
[
|
|
1415
|
+
"jest",
|
|
1416
|
+
"--clearCache"
|
|
1417
|
+
]
|
|
1418
|
+
],
|
|
1419
|
+
[
|
|
1420
|
+
"yarn",
|
|
1421
|
+
[
|
|
1422
|
+
"jest",
|
|
1423
|
+
"."
|
|
1424
|
+
]
|
|
1425
|
+
]
|
|
1426
|
+
]);
|
|
1427
|
+
}, "retest");
|
|
1428
|
+
|
|
1429
|
+
// src/actions/sonar.ts
|
|
1430
|
+
var sonar = /* @__PURE__ */ __name(() => {
|
|
1431
|
+
return runSteps("Sonar", [
|
|
1432
|
+
[
|
|
1433
|
+
"yarn",
|
|
1434
|
+
[
|
|
1435
|
+
"eslint",
|
|
1436
|
+
"-c",
|
|
1437
|
+
"sonar.eslintrc",
|
|
1438
|
+
"."
|
|
1439
|
+
]
|
|
1440
|
+
]
|
|
1441
|
+
]);
|
|
1442
|
+
}, "sonar");
|
|
1443
|
+
|
|
1444
|
+
// src/actions/statics.ts
|
|
1445
|
+
var import_chalk18 = __toESM(require("chalk"), 1);
|
|
1446
|
+
var DefaultDependencies = [
|
|
1447
|
+
"axios",
|
|
1448
|
+
"@xylabs/pixel",
|
|
1449
|
+
"react",
|
|
1450
|
+
"graphql",
|
|
1451
|
+
"react-router",
|
|
1452
|
+
"@mui/material",
|
|
1453
|
+
"@mui/system"
|
|
1454
|
+
];
|
|
1455
|
+
var statics = /* @__PURE__ */ __name(() => {
|
|
1456
|
+
console.log(import_chalk18.default.green("Check Required Static Dependencies"));
|
|
1457
|
+
const statics2 = parsedPackageJSON()?.xy?.deps?.statics;
|
|
1458
|
+
return detectDuplicateDependencies(statics2, DefaultDependencies);
|
|
1459
|
+
}, "statics");
|
|
1460
|
+
|
|
1461
|
+
// src/actions/test.ts
|
|
1462
|
+
var test = /* @__PURE__ */ __name(() => {
|
|
1463
|
+
return runSteps("Test", [
|
|
1464
|
+
[
|
|
1465
|
+
"yarn",
|
|
1466
|
+
[
|
|
1467
|
+
"jest",
|
|
1468
|
+
"."
|
|
1469
|
+
]
|
|
1470
|
+
]
|
|
1471
|
+
]);
|
|
1472
|
+
}, "test");
|
|
1473
|
+
|
|
1474
|
+
// src/actions/up.ts
|
|
1475
|
+
var up = /* @__PURE__ */ __name(() => {
|
|
1476
|
+
return runSteps("Up", [
|
|
1477
|
+
[
|
|
1478
|
+
"yarn",
|
|
1479
|
+
"outdated"
|
|
1480
|
+
]
|
|
1481
|
+
]);
|
|
1482
|
+
}, "up");
|
|
1483
|
+
|
|
1484
|
+
// src/actions/updo.ts
|
|
1485
|
+
var updo = /* @__PURE__ */ __name(() => {
|
|
1486
|
+
return runSteps("Updo", [
|
|
1487
|
+
[
|
|
1488
|
+
"yarn",
|
|
1489
|
+
"install"
|
|
1490
|
+
],
|
|
1491
|
+
[
|
|
1492
|
+
"yarn",
|
|
1493
|
+
"upgrade-interactive"
|
|
1494
|
+
],
|
|
1495
|
+
[
|
|
1496
|
+
"yarn",
|
|
1497
|
+
"dedupe"
|
|
1498
|
+
]
|
|
1499
|
+
]);
|
|
1500
|
+
}, "updo");
|
|
1501
|
+
|
|
1502
|
+
// src/actions/upplug.ts
|
|
1503
|
+
var updateYarnPlugins = /* @__PURE__ */ __name(() => {
|
|
1504
|
+
return runSteps("Update Yarn Plugins", [
|
|
1505
|
+
[
|
|
1506
|
+
"yarn",
|
|
1507
|
+
[
|
|
1508
|
+
"plugin",
|
|
1509
|
+
"import",
|
|
1510
|
+
"https://mskelton.dev/yarn-outdated/v3"
|
|
1511
|
+
]
|
|
1512
|
+
],
|
|
1513
|
+
[
|
|
1514
|
+
"yarn",
|
|
1515
|
+
[
|
|
1516
|
+
"plugin",
|
|
1517
|
+
"import",
|
|
1518
|
+
"version"
|
|
1519
|
+
]
|
|
1520
|
+
],
|
|
1521
|
+
[
|
|
1522
|
+
"yarn",
|
|
1523
|
+
[
|
|
1524
|
+
"plugin",
|
|
1525
|
+
"import",
|
|
1526
|
+
"interactive-tools"
|
|
1527
|
+
]
|
|
1528
|
+
],
|
|
1529
|
+
[
|
|
1530
|
+
"yarn",
|
|
1531
|
+
[
|
|
1532
|
+
"plugin",
|
|
1533
|
+
"import",
|
|
1534
|
+
"workspace-tools"
|
|
1535
|
+
]
|
|
1536
|
+
]
|
|
1537
|
+
]);
|
|
1538
|
+
}, "updateYarnPlugins");
|
|
1539
|
+
|
|
1540
|
+
// src/actions/upyarn.ts
|
|
1541
|
+
var updateYarnVersion = /* @__PURE__ */ __name(() => {
|
|
1542
|
+
return runSteps("Update Yarn Version", [
|
|
1543
|
+
[
|
|
1544
|
+
"yarn",
|
|
1545
|
+
[
|
|
1546
|
+
"set",
|
|
1547
|
+
"version",
|
|
1548
|
+
"latest"
|
|
1549
|
+
]
|
|
1550
|
+
]
|
|
1551
|
+
]);
|
|
1552
|
+
}, "updateYarnVersion");
|
|
1553
|
+
|
|
1554
|
+
// src/actions/yarn3only.ts
|
|
1555
|
+
var yarn3Only = /* @__PURE__ */ __name(() => {
|
|
1556
|
+
const [valid, version] = isYarnVersionOrGreater(3);
|
|
1557
|
+
if (!valid) {
|
|
1558
|
+
processEx(`Invalid Yarn version [${version}]`);
|
|
1559
|
+
}
|
|
1560
|
+
return 0;
|
|
1561
|
+
}, "yarn3Only");
|
|
1562
|
+
|
|
1563
|
+
// src/xy/xyBuildCommands.ts
|
|
1564
|
+
var xyBuildCommands = /* @__PURE__ */ __name((args) => {
|
|
1565
|
+
return args.command("build [package]", "Build - Compile & Lint", (yargs2) => {
|
|
1566
|
+
return yargs2.positional("package", {
|
|
1567
|
+
describe: "Specific package to build"
|
|
1568
|
+
});
|
|
1569
|
+
}, async (argv) => {
|
|
1570
|
+
if (argv.verbose) {
|
|
1571
|
+
console.log(`Building: ${argv.package ?? "all"}`);
|
|
1572
|
+
}
|
|
1573
|
+
process.exitCode = await build({
|
|
1574
|
+
incremental: !!argv.incremental,
|
|
1575
|
+
jobs: argv.jobs,
|
|
1576
|
+
pkg: argv.package,
|
|
1577
|
+
target: argv.target,
|
|
1578
|
+
verbose: !!argv.verbose
|
|
1579
|
+
});
|
|
1580
|
+
}).command("compile [package]", "Compile with Typescript & Copy Images", (yargs2) => {
|
|
1581
|
+
return yargs2.positional("package", {
|
|
1582
|
+
describe: "Specific package to compile"
|
|
1583
|
+
});
|
|
1584
|
+
}, async (argv) => {
|
|
1585
|
+
if (argv.verbose) {
|
|
1586
|
+
console.log(`Compiling: ${argv.package ?? "all"}`);
|
|
1587
|
+
}
|
|
1588
|
+
process.exitCode = await compile({
|
|
1589
|
+
incremental: !!argv.incremental,
|
|
1590
|
+
jobs: argv.jobs,
|
|
1591
|
+
pkg: argv.package,
|
|
1592
|
+
target: argv.target,
|
|
1593
|
+
verbose: !!argv.verbose
|
|
1594
|
+
});
|
|
1595
|
+
}).command("compile-only [package]", "Compile with Typescript & Copy Images (No Publint)", (yargs2) => {
|
|
1596
|
+
return yargs2.positional("package", {
|
|
1597
|
+
describe: "Specific package to compile"
|
|
1598
|
+
});
|
|
1599
|
+
}, async (argv) => {
|
|
1600
|
+
if (argv.verbose) {
|
|
1601
|
+
console.log(`Compiling: ${argv.package ?? "all"}`);
|
|
1602
|
+
}
|
|
1603
|
+
process.exitCode = await compile({
|
|
1604
|
+
incremental: !!argv.incremental,
|
|
1605
|
+
jobs: argv.jobs,
|
|
1606
|
+
pkg: argv.package,
|
|
1607
|
+
publint: false,
|
|
1608
|
+
target: argv.target,
|
|
1609
|
+
verbose: !!argv.verbose
|
|
1610
|
+
});
|
|
1611
|
+
}).command("recompile [package]", "Re-compile with Typescript & Copy Images", (yargs2) => {
|
|
1612
|
+
return yargs2.positional("package", {
|
|
1613
|
+
describe: "Specific package to re-compile"
|
|
1614
|
+
});
|
|
1615
|
+
}, async (argv) => {
|
|
1616
|
+
if (argv.verbose) {
|
|
1617
|
+
console.log(`Re-compiling: ${argv.package ?? "all"}`);
|
|
1618
|
+
}
|
|
1619
|
+
process.exitCode = await recompile({
|
|
1620
|
+
incremental: !!argv.incremental,
|
|
1621
|
+
jobs: argv.jobs,
|
|
1622
|
+
pkg: argv.package,
|
|
1623
|
+
target: argv.target,
|
|
1624
|
+
verbose: !!argv.verbose
|
|
1625
|
+
});
|
|
1626
|
+
}).command("rebuild [package]", "Rebuild - Clean, Compile & Lint", (yargs2) => {
|
|
1627
|
+
return yargs2.positional("package", {
|
|
1628
|
+
describe: "Specific package to rebuild"
|
|
1629
|
+
});
|
|
1630
|
+
}, (argv) => {
|
|
1631
|
+
if (argv.verbose) console.log(`Rebuilding: ${argv.package ?? "all"}`);
|
|
1632
|
+
process.exitCode = rebuild({
|
|
1633
|
+
target: argv.target
|
|
1634
|
+
});
|
|
1635
|
+
}).command("copy-assets [package]", "Copy Assets - Copy the assets from src to dist", (yargs2) => {
|
|
1636
|
+
return yargs2.positional("package", {
|
|
1637
|
+
describe: "Specific package to copy assets"
|
|
1638
|
+
});
|
|
1639
|
+
}, async (argv) => {
|
|
1640
|
+
if (argv.verbose) console.log(`Copying Assets: ${argv.package ?? "all"}`);
|
|
1641
|
+
process.exitCode = await copyAssets({
|
|
1642
|
+
target: argv.target
|
|
1643
|
+
});
|
|
1644
|
+
});
|
|
1645
|
+
}, "xyBuildCommands");
|
|
1646
|
+
|
|
1647
|
+
// src/xy/param.ts
|
|
1648
|
+
var packagePositionalParam = /* @__PURE__ */ __name((yargs2) => {
|
|
1649
|
+
return yargs2.positional("package", {
|
|
1650
|
+
describe: "Specific package to target"
|
|
1651
|
+
});
|
|
1652
|
+
}, "packagePositionalParam");
|
|
1653
|
+
|
|
1654
|
+
// src/xy/xyCommonCommands.ts
|
|
1655
|
+
var xyCommonCommands = /* @__PURE__ */ __name((args) => {
|
|
1656
|
+
return args.command("license [package]", "License - Check licenses of dependencies", (yargs2) => {
|
|
1657
|
+
return packagePositionalParam(yargs2);
|
|
1658
|
+
}, async (argv) => {
|
|
1659
|
+
if (argv.verbose) console.log(`License: ${argv.package ?? "all"}`);
|
|
1660
|
+
process.exitCode = await license();
|
|
1661
|
+
}).command("dead [package]", "Dead - Check for dead code", (yargs2) => {
|
|
1662
|
+
return packagePositionalParam(yargs2);
|
|
1663
|
+
}, (argv) => {
|
|
1664
|
+
if (argv.verbose) console.log("Dead");
|
|
1665
|
+
process.exitCode = dead();
|
|
1666
|
+
}).command("deps [package]", "Deps - Check for unused or missing dependencies", (yargs2) => {
|
|
1667
|
+
return packagePositionalParam(yargs2);
|
|
1668
|
+
}, (argv) => {
|
|
1669
|
+
if (argv.verbose) console.log(`Checking Dependencies: ${argv.package ?? "all"}`);
|
|
1670
|
+
process.exitCode = deps({
|
|
1671
|
+
incremental: !!argv.incremental,
|
|
1672
|
+
jobs: argv.jobs,
|
|
1673
|
+
pkg: argv.package
|
|
1674
|
+
});
|
|
1675
|
+
}).command("gen-docs [package]", "GenDocs - Generate TypeDocs", (yargs2) => {
|
|
1676
|
+
return packagePositionalParam(yargs2);
|
|
1677
|
+
}, (argv) => {
|
|
1678
|
+
if (argv.verbose) console.log(`Generating TypeDocs: ${argv.package ?? "all"}`);
|
|
1679
|
+
process.exitCode = genDocs({
|
|
1680
|
+
incremental: !!argv.incremental,
|
|
1681
|
+
pkg: argv.package
|
|
1682
|
+
});
|
|
1683
|
+
}).command("clean-docs", "CleanDocs - Clean TypeDocs", (yargs2) => yargs2, (argv) => {
|
|
1684
|
+
if (argv.verbose) console.log("Cleaning TypeDocs: all");
|
|
1685
|
+
process.exitCode = cleanDocs();
|
|
1686
|
+
}).command("gitlint [package]", "Gitlint - Lint your git config", (yargs2) => {
|
|
1687
|
+
return yargs2;
|
|
1688
|
+
}, (argv) => {
|
|
1689
|
+
if (argv.verbose) console.log("Gitlint");
|
|
1690
|
+
process.exitCode = argv.fix ? gitlintFix() : gitlint();
|
|
1691
|
+
}).command("gitignore-gen", "GitIgnore Gen - Generate .gitignore files", (yargs2) => {
|
|
1692
|
+
return yargs2;
|
|
1693
|
+
}, (argv) => {
|
|
1694
|
+
if (argv.verbose) console.log("GitIgnore Gen");
|
|
1695
|
+
process.exitCode = gitignoreGen();
|
|
1696
|
+
}).command("npmignore-gen", "NpmIgnore Gen - Generate .npmignore files", (yargs2) => {
|
|
1697
|
+
return yargs2;
|
|
1698
|
+
}, (argv) => {
|
|
1699
|
+
if (argv.verbose) console.log("NpmIgnore Gen");
|
|
1700
|
+
process.exitCode = npmignoreGen();
|
|
1701
|
+
}).command("retest", "Re-Test - Run Jest Tests with cleaned cache", (yargs2) => {
|
|
1702
|
+
return yargs2;
|
|
1703
|
+
}, (argv) => {
|
|
1704
|
+
if (argv.verbose) console.log("Re-Testing");
|
|
1705
|
+
process.exitCode = retest();
|
|
1706
|
+
}).command("test", "Test - Run Jest Tests", (yargs2) => {
|
|
1707
|
+
return yargs2;
|
|
1708
|
+
}, (argv) => {
|
|
1709
|
+
if (argv.verbose) console.log("Testing");
|
|
1710
|
+
process.exitCode = test();
|
|
1711
|
+
}).command("upplug", "UpPlug - Update Yarn Plugins", (yargs2) => {
|
|
1712
|
+
return yargs2;
|
|
1713
|
+
}, (argv) => {
|
|
1714
|
+
if (argv.verbose) console.log("UpPlug");
|
|
1715
|
+
process.exitCode = updateYarnPlugins();
|
|
1716
|
+
}).command("upyarn", "UpYarn - Update Yarn Version", (yargs2) => {
|
|
1717
|
+
return yargs2;
|
|
1718
|
+
}, (argv) => {
|
|
1719
|
+
if (argv.verbose) console.log("UpYarn");
|
|
1720
|
+
process.exitCode = updateYarnVersion();
|
|
1721
|
+
}).command("yarn3only", "Yarn3Only - Check if using Yarn v3", (yargs2) => {
|
|
1722
|
+
return yargs2;
|
|
1723
|
+
}, (argv) => {
|
|
1724
|
+
if (argv.verbose) console.log("Yarn 3 Check");
|
|
1725
|
+
process.exitCode = yarn3Only();
|
|
1726
|
+
});
|
|
1727
|
+
}, "xyCommonCommands");
|
|
1728
|
+
|
|
1729
|
+
// src/xy/xyDeployCommands.ts
|
|
1730
|
+
var xyDeployCommands = /* @__PURE__ */ __name((args) => {
|
|
1731
|
+
return args.command("deploy", "Deploy - Deploy patch", (yargs2) => {
|
|
1732
|
+
return yargs2;
|
|
1733
|
+
}, (argv) => {
|
|
1734
|
+
if (argv.verbose) console.log("Deploy patch");
|
|
1735
|
+
process.exitCode = deploy();
|
|
1736
|
+
}).command("deploy-minor", "Deploy - Deploy minor", (yargs2) => {
|
|
1737
|
+
return yargs2;
|
|
1738
|
+
}, (argv) => {
|
|
1739
|
+
if (argv.verbose) console.log("Deploy minor");
|
|
1740
|
+
process.exitCode = deployMinor();
|
|
1741
|
+
}).command("deploy-major", "Deploy - Deploy major", (yargs2) => {
|
|
1742
|
+
return yargs2;
|
|
1743
|
+
}, (argv) => {
|
|
1744
|
+
if (argv.verbose) console.log("Deploy major");
|
|
1745
|
+
process.exitCode = deployMajor();
|
|
1746
|
+
}).command("deploy-next", "Deploy - Deploy next", (yargs2) => {
|
|
1747
|
+
return yargs2;
|
|
1748
|
+
}, (argv) => {
|
|
1749
|
+
if (argv.verbose) console.log("Deploy next");
|
|
1750
|
+
process.exitCode = deployNext();
|
|
1751
|
+
});
|
|
1752
|
+
}, "xyDeployCommands");
|
|
1753
|
+
|
|
1754
|
+
// src/xy/xyInstallCommands.ts
|
|
1755
|
+
var xyInstallCommands = /* @__PURE__ */ __name((args) => {
|
|
1756
|
+
return args.command("clean [package]", "Clean", (yargs2) => {
|
|
1757
|
+
return yargs2.positional("package", {
|
|
1758
|
+
describe: "Specific package to clean"
|
|
1759
|
+
});
|
|
1760
|
+
}, async (argv) => {
|
|
1761
|
+
if (argv.verbose) {
|
|
1762
|
+
console.log(`Cleaning: ${argv.package ?? "all"}`);
|
|
1763
|
+
}
|
|
1764
|
+
process.exitCode = await clean({
|
|
1765
|
+
pkg: argv.package,
|
|
1766
|
+
verbose: !!argv.verbose
|
|
1767
|
+
});
|
|
1768
|
+
}).command("reinstall", "Reinstall - Clean & Install", (yargs2) => {
|
|
1769
|
+
return yargs2;
|
|
1770
|
+
}, (argv) => {
|
|
1771
|
+
if (argv.verbose) console.log("Reinstalling");
|
|
1772
|
+
process.exitCode = reinstall();
|
|
1773
|
+
}).command("up", "Up - Update dependencies", (yargs2) => {
|
|
1774
|
+
return yargs2;
|
|
1775
|
+
}, (argv) => {
|
|
1776
|
+
if (argv.verbose) console.log("Up");
|
|
1777
|
+
process.exitCode = up();
|
|
1778
|
+
}).command("updo", "Updo - Update dependencies [Interactive]", (yargs2) => {
|
|
1779
|
+
return yargs2;
|
|
1780
|
+
}, (argv) => {
|
|
1781
|
+
if (argv.verbose) console.log("Updo");
|
|
1782
|
+
process.exitCode = updo();
|
|
1783
|
+
}).command("statics", "Statics - Confirming Static Packages", (yargs2) => {
|
|
1784
|
+
return yargs2;
|
|
1785
|
+
}, (argv) => {
|
|
1786
|
+
if (argv.verbose) console.log("Statics");
|
|
1787
|
+
process.exitCode = statics();
|
|
1788
|
+
}).command("dupdeps", "Dupdeps - Duplicate Dependencies in package.json", (yargs2) => {
|
|
1789
|
+
return yargs2;
|
|
1790
|
+
}, (argv) => {
|
|
1791
|
+
if (argv.verbose) console.log("Dupdeps");
|
|
1792
|
+
process.exitCode = dupdeps();
|
|
1793
|
+
});
|
|
1794
|
+
}, "xyInstallCommands");
|
|
1795
|
+
|
|
1796
|
+
// src/xy/xyLintCommands.ts
|
|
1797
|
+
var import_chalk19 = __toESM(require("chalk"), 1);
|
|
1798
|
+
var xyLintCommands = /* @__PURE__ */ __name((args) => {
|
|
1799
|
+
return args.command("cycle [package]", "Cycle - Check for dependency cycles", (yargs2) => {
|
|
1800
|
+
return packagePositionalParam(yargs2);
|
|
1801
|
+
}, (argv) => {
|
|
1802
|
+
const start = Date.now();
|
|
1803
|
+
if (argv.verbose) console.log("Cycle");
|
|
1804
|
+
process.exitCode = cycle();
|
|
1805
|
+
console.log(import_chalk19.default.blue(`Finished in ${Date.now() - start}ms`));
|
|
1806
|
+
}).command("lint [package]", "Lint - Run Eslint", (yargs2) => {
|
|
1807
|
+
return packagePositionalParam(yargs2);
|
|
1808
|
+
}, async (argv) => {
|
|
1809
|
+
if (argv.verbose) console.log("Lint");
|
|
1810
|
+
const start = Date.now();
|
|
1811
|
+
process.exitCode = argv.fix ? fix() : argv.profile ? lintProfile() : await lint({
|
|
1812
|
+
pkg: argv.package
|
|
1813
|
+
});
|
|
1814
|
+
console.log(import_chalk19.default.blue(`Finished in ${Date.now() - start}ms`));
|
|
1815
|
+
}).command("fix [package]", "Fix - Run Eslint w/fix", (yargs2) => {
|
|
1816
|
+
return packagePositionalParam(yargs2);
|
|
1817
|
+
}, (argv) => {
|
|
1818
|
+
const start = Date.now();
|
|
1819
|
+
if (argv.verbose) console.log("Fix");
|
|
1820
|
+
process.exitCode = fix();
|
|
1821
|
+
console.log(import_chalk19.default.blue(`Finished in ${Date.now() - start}ms`));
|
|
1822
|
+
}).command("relint [package]", "Relint - Clean & Lint", (yargs2) => {
|
|
1823
|
+
return packagePositionalParam(yargs2);
|
|
1824
|
+
}, (argv) => {
|
|
1825
|
+
if (argv.verbose) console.log("Relinting");
|
|
1826
|
+
const start = Date.now();
|
|
1827
|
+
process.exitCode = relint();
|
|
1828
|
+
console.log(import_chalk19.default.blue(`Finished in ${Date.now() - start}ms`));
|
|
1829
|
+
}).command("publint [package]", "Publint - Run Publint", (yargs2) => {
|
|
1830
|
+
return packagePositionalParam(yargs2);
|
|
1831
|
+
}, async (argv) => {
|
|
1832
|
+
if (argv.verbose) console.log("Publint");
|
|
1833
|
+
const start = Date.now();
|
|
1834
|
+
process.exitCode = await publint({
|
|
1835
|
+
pkg: argv.package,
|
|
1836
|
+
verbose: !!argv.verbose
|
|
1837
|
+
});
|
|
1838
|
+
console.log(import_chalk19.default.blue(`Finished in ${Date.now() - start}ms`));
|
|
1839
|
+
}).command("sonar", "Sonar - Run Sonar Check", (yargs2) => {
|
|
1840
|
+
return packagePositionalParam(yargs2);
|
|
1841
|
+
}, (argv) => {
|
|
1842
|
+
const start = Date.now();
|
|
1843
|
+
if (argv.verbose) console.log("Sonar Check");
|
|
1844
|
+
process.exitCode = sonar();
|
|
1845
|
+
console.log(import_chalk19.default.blue(`Finished in ${Date.now() - start}ms`));
|
|
1846
|
+
});
|
|
1847
|
+
}, "xyLintCommands");
|
|
1848
|
+
|
|
1849
|
+
// src/xy/xyParseOptions.ts
|
|
1850
|
+
var import_yargs = __toESM(require("yargs"), 1);
|
|
1851
|
+
var import_helpers = require("yargs/helpers");
|
|
1852
|
+
var xyParseOptions = /* @__PURE__ */ __name(() => {
|
|
1853
|
+
return (0, import_yargs.default)((0, import_helpers.hideBin)(process.argv)).scriptName("yarn xy").option("jobs", {
|
|
1854
|
+
alias: "j",
|
|
1855
|
+
default: void 0,
|
|
1856
|
+
description: "Max parallel jobs",
|
|
1857
|
+
type: "number"
|
|
1858
|
+
}).option("verbose", {
|
|
1859
|
+
alias: "v",
|
|
1860
|
+
default: false,
|
|
1861
|
+
description: "Run with verbose logging",
|
|
1862
|
+
type: "boolean"
|
|
1863
|
+
}).option("target", {
|
|
1864
|
+
alias: "t",
|
|
1865
|
+
choices: [
|
|
1866
|
+
"esm",
|
|
1867
|
+
"cjs"
|
|
1868
|
+
],
|
|
1869
|
+
description: "Limit output to specific target",
|
|
1870
|
+
type: "string"
|
|
1871
|
+
}).option("incremental", {
|
|
1872
|
+
alias: "i",
|
|
1873
|
+
default: false,
|
|
1874
|
+
description: "Attempt to perform the action only on changed packages",
|
|
1875
|
+
type: "boolean"
|
|
1876
|
+
}).option("fix", {
|
|
1877
|
+
alias: "f",
|
|
1878
|
+
default: false,
|
|
1879
|
+
description: "Try to fix errors",
|
|
1880
|
+
type: "boolean"
|
|
1881
|
+
}).option("cache", {
|
|
1882
|
+
alias: "c",
|
|
1883
|
+
default: false,
|
|
1884
|
+
description: "Use caching for performance",
|
|
1885
|
+
type: "boolean"
|
|
1886
|
+
}).option("profile", {
|
|
1887
|
+
alias: "p",
|
|
1888
|
+
default: false,
|
|
1889
|
+
description: "Profile action",
|
|
1890
|
+
type: "boolean"
|
|
1891
|
+
});
|
|
1892
|
+
}, "xyParseOptions");
|
|
1893
|
+
|
|
1894
|
+
// src/xy/xy.ts
|
|
1895
|
+
var xy = /* @__PURE__ */ __name(async () => {
|
|
1896
|
+
const options = xyParseOptions();
|
|
1897
|
+
return await xyBuildCommands(xyCommonCommands(xyInstallCommands(xyDeployCommands(xyLintCommands(options))))).demandCommand(1).command("*", "", () => {
|
|
1898
|
+
console.error(import_chalk20.default.yellow(`Command not found [${import_chalk20.default.magenta(process.argv[2])}]`));
|
|
1899
|
+
console.log(import_chalk20.default.gray("Try 'yarn xy --help' for list of commands"));
|
|
1900
|
+
}).version().help().argv;
|
|
1901
|
+
}, "xy");
|
|
1902
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1903
|
+
0 && (module.exports = {
|
|
1904
|
+
xy,
|
|
1905
|
+
xyBuildCommands,
|
|
1906
|
+
xyCommonCommands,
|
|
1907
|
+
xyDeployCommands,
|
|
1908
|
+
xyInstallCommands,
|
|
1909
|
+
xyLintCommands,
|
|
1910
|
+
xyParseOptions
|
|
1911
|
+
});
|
|
1912
|
+
//# sourceMappingURL=index.cjs.map
|