@xylabs/ts-scripts-yarn3 2.19.12 → 3.0.0-rc.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.d.ts +9 -0
- package/dist/actions/build.d.ts.map +1 -0
- package/dist/actions/build.js +21 -163
- package/dist/actions/build.js.map +1 -1
- package/dist/actions/clean-docs.d.ts +2 -0
- package/dist/actions/clean-docs.d.ts.map +1 -0
- package/dist/actions/clean-docs.js +13 -61
- package/dist/actions/clean-docs.js.map +1 -1
- package/dist/actions/clean-eslint.d.ts +2 -0
- package/dist/actions/clean-eslint.d.ts.map +1 -0
- package/dist/actions/clean-eslint.js +13 -47
- package/dist/actions/clean-eslint.js.map +1 -1
- package/dist/actions/clean-jest.d.ts +2 -0
- package/dist/actions/clean-jest.d.ts.map +1 -0
- package/dist/actions/clean-jest.js +6 -133
- package/dist/actions/clean-jest.js.map +1 -1
- package/dist/actions/clean.d.ts +12 -0
- package/dist/actions/clean.d.ts.map +1 -0
- package/dist/actions/clean.js +20 -247
- package/dist/actions/clean.js.map +1 -1
- package/dist/actions/compile.d.ts +16 -0
- package/dist/actions/compile.d.ts.map +1 -0
- package/dist/actions/compile.js +28 -156
- package/dist/actions/compile.js.map +1 -1
- package/dist/actions/copy-assets.d.ts +6 -0
- package/dist/actions/copy-assets.d.ts.map +1 -0
- package/dist/actions/copy-assets.js +48 -99
- package/dist/actions/copy-assets.js.map +1 -1
- package/dist/actions/cycle.d.ts +2 -0
- package/dist/actions/cycle.d.ts.map +1 -0
- package/dist/actions/cycle.js +8 -135
- package/dist/actions/cycle.js.map +1 -1
- package/dist/actions/dead.d.ts +2 -0
- package/dist/actions/dead.d.ts.map +1 -0
- package/dist/actions/dead.js +6 -133
- package/dist/actions/dead.js.map +1 -1
- package/dist/actions/deploy-major.d.ts +2 -0
- package/dist/actions/deploy-major.d.ts.map +1 -0
- package/dist/actions/deploy-major.js +14 -141
- package/dist/actions/deploy-major.js.map +1 -1
- package/dist/actions/deploy-minor.d.ts +2 -0
- package/dist/actions/deploy-minor.d.ts.map +1 -0
- package/dist/actions/deploy-minor.js +14 -141
- package/dist/actions/deploy-minor.js.map +1 -1
- package/dist/actions/deploy-next.d.ts +2 -0
- package/dist/actions/deploy-next.d.ts.map +1 -0
- package/dist/actions/deploy-next.js +14 -141
- package/dist/actions/deploy-next.js.map +1 -1
- package/dist/actions/deploy.d.ts +2 -0
- package/dist/actions/deploy.d.ts.map +1 -0
- package/dist/actions/deploy.js +15 -142
- package/dist/actions/deploy.js.map +1 -1
- package/dist/actions/deps.d.ts +12 -0
- package/dist/actions/deps.d.ts.map +1 -0
- package/dist/actions/deps.js +26 -153
- package/dist/actions/deps.js.map +1 -1
- package/dist/actions/dupdeps.d.ts +2 -0
- package/dist/actions/dupdeps.d.ts.map +1 -0
- package/dist/actions/dupdeps.js +12 -214
- package/dist/actions/dupdeps.js.map +1 -1
- package/dist/actions/fix.d.ts +2 -0
- package/dist/actions/fix.d.ts.map +1 -0
- package/dist/actions/fix.js +6 -133
- package/dist/actions/fix.js.map +1 -1
- package/dist/actions/gen-docs.d.ts +11 -0
- package/dist/actions/gen-docs.d.ts.map +1 -0
- package/dist/actions/gen-docs.js +18 -147
- package/dist/actions/gen-docs.js.map +1 -1
- package/dist/actions/gitignore-gen.d.ts +2 -0
- package/dist/actions/gitignore-gen.d.ts.map +1 -0
- package/dist/actions/gitignore-gen.js +6 -122
- package/dist/actions/gitignore-gen.js.map +1 -1
- package/dist/actions/gitlint-fix.d.ts +2 -0
- package/dist/actions/gitlint-fix.d.ts.map +1 -0
- package/dist/actions/gitlint-fix.js +23 -59
- package/dist/actions/gitlint-fix.js.map +1 -1
- package/dist/actions/gitlint.d.ts +2 -0
- package/dist/actions/gitlint.d.ts.map +1 -0
- package/dist/actions/gitlint.js +46 -80
- package/dist/actions/gitlint.js.map +1 -1
- package/dist/actions/index.d.ts +39 -0
- package/dist/actions/index.d.ts.map +1 -0
- package/dist/actions/index.js +40 -1693
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/index.mjs +118 -303
- package/dist/actions/index.mjs.map +1 -1
- package/dist/actions/license.d.ts +2 -0
- package/dist/actions/license.d.ts.map +1 -0
- package/dist/actions/license.js +69 -116
- package/dist/actions/license.js.map +1 -1
- package/dist/actions/lint-clean.d.ts +2 -0
- package/dist/actions/lint-clean.d.ts.map +1 -0
- package/dist/actions/lint-clean.js +25 -180
- package/dist/actions/lint-clean.js.map +1 -1
- package/dist/actions/lint-profile.d.ts +2 -0
- package/dist/actions/lint-profile.d.ts.map +1 -0
- package/dist/actions/lint-profile.js +6 -133
- package/dist/actions/lint-profile.js.map +1 -1
- package/dist/actions/lint.d.ts +12 -0
- package/dist/actions/lint.d.ts.map +1 -0
- package/dist/actions/lint.js +30 -171
- package/dist/actions/lint.js.map +1 -1
- package/dist/actions/npmignore-gen.d.ts +2 -0
- package/dist/actions/npmignore-gen.d.ts.map +1 -0
- package/dist/actions/npmignore-gen.js +6 -122
- package/dist/actions/npmignore-gen.js.map +1 -1
- package/dist/actions/package/clean-outputs.d.ts +2 -0
- package/dist/actions/package/clean-outputs.d.ts.map +1 -0
- package/dist/actions/package/clean-outputs.js +16 -50
- package/dist/actions/package/clean-outputs.js.map +1 -1
- package/dist/actions/package/clean-typescript.d.ts +2 -0
- package/dist/actions/package/clean-typescript.d.ts.map +1 -0
- package/dist/actions/package/clean-typescript.js +16 -50
- package/dist/actions/package/clean-typescript.js.map +1 -1
- package/dist/actions/package/clean.d.ts +2 -0
- package/dist/actions/package/clean.d.ts.map +1 -0
- package/dist/actions/package/clean.js +8 -73
- package/dist/actions/package/clean.js.map +1 -1
- package/dist/actions/package/compile.d.ts +2 -0
- package/dist/actions/package/compile.d.ts.map +1 -0
- package/dist/actions/package/compile.js +60 -314
- package/dist/actions/package/compile.js.map +1 -1
- package/dist/actions/package/compile.mjs +53 -276
- package/dist/actions/package/compile.mjs.map +1 -1
- package/dist/actions/package/copy-assets.d.ts +5 -0
- package/dist/actions/package/copy-assets.d.ts.map +1 -0
- package/dist/actions/package/copy-assets.js +36 -73
- package/dist/actions/package/copy-assets.js.map +1 -1
- package/dist/actions/package/deps.d.ts +2 -0
- package/dist/actions/package/deps.d.ts.map +1 -0
- package/dist/actions/package/deps.js +89 -127
- package/dist/actions/package/deps.js.map +1 -1
- package/dist/actions/package/gen-docs.d.ts +2 -0
- package/dist/actions/package/gen-docs.d.ts.map +1 -0
- package/dist/actions/package/gen-docs.js +103 -135
- package/dist/actions/package/gen-docs.js.map +1 -1
- package/dist/actions/package/gen-docs.mjs +1 -1
- package/dist/actions/package/gen-docs.mjs.map +1 -1
- package/dist/actions/package/index.d.ts +11 -0
- package/dist/actions/package/index.d.ts.map +1 -0
- package/dist/actions/package/index.js +12 -590
- package/dist/actions/package/index.js.map +1 -1
- package/dist/actions/package/index.mjs +120 -263
- package/dist/actions/package/index.mjs.map +1 -1
- package/dist/actions/package/publint.d.ts +2 -0
- package/dist/actions/package/publint.d.ts.map +1 -0
- package/dist/actions/package/publint.js +41 -52
- package/dist/actions/package/publint.js.map +1 -1
- package/dist/actions/package/publint.mjs +1 -1
- package/dist/actions/package/publint.mjs.map +1 -1
- package/dist/actions/package/recompile.d.ts +2 -0
- package/dist/actions/package/recompile.d.ts.map +1 -0
- package/dist/actions/package/recompile.js +8 -361
- package/dist/actions/package/recompile.js.map +1 -1
- package/dist/actions/package/recompile.mjs +53 -276
- package/dist/actions/package/recompile.mjs.map +1 -1
- package/dist/actions/package/tsup.d.ts +2 -0
- package/dist/actions/package/tsup.d.ts.map +1 -0
- package/dist/actions/package/tsup.js +29 -0
- package/dist/actions/package/tsup.js.map +1 -0
- package/dist/actions/package/tsup.mjs +31 -0
- package/dist/actions/package/tsup.mjs.map +1 -0
- package/dist/actions/package/types.d.js +2 -0
- package/dist/actions/package/types.d.js.map +1 -0
- package/dist/actions/package/types.d.mjs +1 -0
- package/dist/actions/package/types.d.mjs.map +1 -0
- package/dist/actions/publint.d.ts +12 -0
- package/dist/actions/publint.d.ts.map +1 -0
- package/dist/actions/publint.js +17 -205
- package/dist/actions/publint.js.map +1 -1
- package/dist/actions/rebuild.d.ts +6 -0
- package/dist/actions/rebuild.d.ts.map +1 -0
- package/dist/actions/rebuild.js +10 -137
- package/dist/actions/rebuild.js.map +1 -1
- package/dist/actions/recompile.d.ts +16 -0
- package/dist/actions/recompile.d.ts.map +1 -0
- package/dist/actions/recompile.js +28 -172
- package/dist/actions/recompile.js.map +1 -1
- package/dist/actions/reinstall.d.ts +2 -0
- package/dist/actions/reinstall.d.ts.map +1 -0
- package/dist/actions/reinstall.js +26 -163
- package/dist/actions/reinstall.js.map +1 -1
- package/dist/actions/relint.d.ts +2 -0
- package/dist/actions/relint.d.ts.map +1 -0
- package/dist/actions/relint.js +24 -161
- package/dist/actions/relint.js.map +1 -1
- package/dist/actions/retest.d.ts +2 -0
- package/dist/actions/retest.d.ts.map +1 -0
- package/dist/actions/retest.js +10 -137
- package/dist/actions/retest.js.map +1 -1
- package/dist/actions/sonar.d.ts +2 -0
- package/dist/actions/sonar.d.ts.map +1 -0
- package/dist/actions/sonar.js +6 -133
- package/dist/actions/sonar.js.map +1 -1
- package/dist/actions/statics.d.ts +2 -0
- package/dist/actions/statics.d.ts.map +1 -0
- package/dist/actions/statics.js +12 -214
- package/dist/actions/statics.js.map +1 -1
- package/dist/actions/test.d.ts +2 -0
- package/dist/actions/test.d.ts.map +1 -0
- package/dist/actions/test.js +6 -133
- package/dist/actions/test.js.map +1 -1
- package/dist/actions/up.d.ts +2 -0
- package/dist/actions/up.d.ts.map +1 -0
- package/dist/actions/up.js +6 -133
- package/dist/actions/up.js.map +1 -1
- package/dist/actions/updo.d.ts +2 -0
- package/dist/actions/updo.d.ts.map +1 -0
- package/dist/actions/updo.js +11 -138
- package/dist/actions/updo.js.map +1 -1
- package/dist/actions/upplug.d.ts +2 -0
- package/dist/actions/upplug.d.ts.map +1 -0
- package/dist/actions/upplug.js +12 -139
- package/dist/actions/upplug.js.map +1 -1
- package/dist/actions/upyarn.d.ts +2 -0
- package/dist/actions/upyarn.d.ts.map +1 -0
- package/dist/actions/upyarn.js +6 -133
- package/dist/actions/upyarn.js.map +1 -1
- package/dist/actions/yarn3only.d.ts +2 -0
- package/dist/actions/yarn3only.d.ts.map +1 -0
- package/dist/actions/yarn3only.js +9 -93
- package/dist/actions/yarn3only.js.map +1 -1
- package/dist/bin/build.d.ts +3 -0
- package/dist/bin/build.d.ts.map +1 -0
- package/dist/bin/build.js +3 -33
- package/dist/bin/build.js.map +1 -1
- package/dist/bin/clean.d.ts +3 -0
- package/dist/bin/clean.d.ts.map +1 -0
- package/dist/bin/clean.js +3 -33
- package/dist/bin/clean.js.map +1 -1
- package/dist/bin/compile.d.ts +3 -0
- package/dist/bin/compile.d.ts.map +1 -0
- package/dist/bin/compile.js +3 -33
- package/dist/bin/compile.js.map +1 -1
- package/dist/bin/cycle.d.ts +3 -0
- package/dist/bin/cycle.d.ts.map +1 -0
- package/dist/bin/cycle.js +3 -33
- package/dist/bin/cycle.js.map +1 -1
- package/dist/bin/dead.d.ts +3 -0
- package/dist/bin/dead.d.ts.map +1 -0
- package/dist/bin/dead.js +3 -33
- package/dist/bin/dead.js.map +1 -1
- package/dist/bin/deploy-major.d.ts +3 -0
- package/dist/bin/deploy-major.d.ts.map +1 -0
- package/dist/bin/deploy-major.js +3 -33
- package/dist/bin/deploy-major.js.map +1 -1
- package/dist/bin/deploy-minor.d.ts +3 -0
- package/dist/bin/deploy-minor.d.ts.map +1 -0
- package/dist/bin/deploy-minor.js +3 -33
- package/dist/bin/deploy-minor.js.map +1 -1
- package/dist/bin/deploy-next.d.ts +3 -0
- package/dist/bin/deploy-next.d.ts.map +1 -0
- package/dist/bin/deploy-next.js +3 -33
- package/dist/bin/deploy-next.js.map +1 -1
- package/dist/bin/deploy.d.ts +3 -0
- package/dist/bin/deploy.d.ts.map +1 -0
- package/dist/bin/deploy.js +3 -33
- package/dist/bin/deploy.js.map +1 -1
- package/dist/bin/deps.d.ts +3 -0
- package/dist/bin/deps.d.ts.map +1 -0
- package/dist/bin/deps.js +3 -33
- package/dist/bin/deps.js.map +1 -1
- package/dist/bin/fix.d.ts +3 -0
- package/dist/bin/fix.d.ts.map +1 -0
- package/dist/bin/fix.js +3 -33
- package/dist/bin/fix.js.map +1 -1
- package/dist/bin/gen-docs.d.ts +3 -0
- package/dist/bin/gen-docs.d.ts.map +1 -0
- package/dist/bin/gen-docs.js +3 -33
- package/dist/bin/gen-docs.js.map +1 -1
- package/dist/bin/gitlint-fix.d.ts +3 -0
- package/dist/bin/gitlint-fix.d.ts.map +1 -0
- package/dist/bin/gitlint-fix.js +3 -33
- package/dist/bin/gitlint-fix.js.map +1 -1
- package/dist/bin/gitlint.d.ts +3 -0
- package/dist/bin/gitlint.d.ts.map +1 -0
- package/dist/bin/gitlint.js +3 -33
- package/dist/bin/gitlint.js.map +1 -1
- package/dist/bin/license.d.ts +3 -0
- package/dist/bin/license.d.ts.map +1 -0
- package/dist/bin/license.js +3 -33
- package/dist/bin/license.js.map +1 -1
- package/dist/bin/lint-clean.d.ts +3 -0
- package/dist/bin/lint-clean.d.ts.map +1 -0
- package/dist/bin/lint-clean.js +3 -33
- package/dist/bin/lint-clean.js.map +1 -1
- package/dist/bin/lint-fast.d.ts +3 -0
- package/dist/bin/lint-fast.d.ts.map +1 -0
- package/dist/bin/lint-fast.js +3 -33
- package/dist/bin/lint-fast.js.map +1 -1
- package/dist/bin/lint-profile.d.ts +3 -0
- package/dist/bin/lint-profile.d.ts.map +1 -0
- package/dist/bin/lint-profile.js +3 -33
- package/dist/bin/lint-profile.js.map +1 -1
- package/dist/bin/lint.d.ts +3 -0
- package/dist/bin/lint.d.ts.map +1 -0
- package/dist/bin/lint.js +3 -33
- package/dist/bin/lint.js.map +1 -1
- package/dist/bin/package/clean-outputs.d.ts +3 -0
- package/dist/bin/package/clean-outputs.d.ts.map +1 -0
- package/dist/bin/package/clean-outputs.js +3 -40
- package/dist/bin/package/clean-outputs.js.map +1 -1
- package/dist/bin/package/clean-typescript.d.ts +3 -0
- package/dist/bin/package/clean-typescript.d.ts.map +1 -0
- package/dist/bin/package/clean-typescript.js +3 -40
- package/dist/bin/package/clean-typescript.js.map +1 -1
- package/dist/bin/package/clean.d.ts +3 -0
- package/dist/bin/package/clean.d.ts.map +1 -0
- package/dist/bin/package/clean.js +3 -60
- package/dist/bin/package/clean.js.map +1 -1
- package/dist/bin/package/compile.d.ts +3 -0
- package/dist/bin/package/compile.d.ts.map +1 -0
- package/dist/bin/package/compile.js +7 -313
- package/dist/bin/package/compile.js.map +1 -1
- package/dist/bin/package/compile.mjs +55 -278
- package/dist/bin/package/compile.mjs.map +1 -1
- package/dist/bin/package/copy-assets-cjs.d.ts +3 -0
- package/dist/bin/package/copy-assets-cjs.d.ts.map +1 -0
- package/dist/bin/package/copy-assets-cjs.js +7 -70
- package/dist/bin/package/copy-assets-cjs.js.map +1 -1
- package/dist/bin/package/copy-assets-esm.d.ts +3 -0
- package/dist/bin/package/copy-assets-esm.d.ts.map +1 -0
- package/dist/bin/package/copy-assets-esm.js +7 -70
- package/dist/bin/package/copy-assets-esm.js.map +1 -1
- package/dist/bin/package/deps.d.ts +3 -0
- package/dist/bin/package/deps.d.ts.map +1 -0
- package/dist/bin/package/deps.js +7 -121
- package/dist/bin/package/deps.js.map +1 -1
- package/dist/bin/package/gen-docs.d.ts +3 -0
- package/dist/bin/package/gen-docs.d.ts.map +1 -0
- package/dist/bin/package/gen-docs.js +3 -134
- package/dist/bin/package/gen-docs.js.map +1 -1
- package/dist/bin/package/gen-docs.mjs +1 -1
- package/dist/bin/package/gen-docs.mjs.map +1 -1
- package/dist/bin/package/publint.d.ts +3 -0
- package/dist/bin/package/publint.d.ts.map +1 -0
- package/dist/bin/package/publint.js +7 -48
- package/dist/bin/package/publint.js.map +1 -1
- package/dist/bin/package/publint.mjs +2 -2
- package/dist/bin/package/publint.mjs.map +1 -1
- package/dist/bin/package/recompile.d.ts +3 -0
- package/dist/bin/package/recompile.d.ts.map +1 -0
- package/dist/bin/package/recompile.js +7 -353
- package/dist/bin/package/recompile.js.map +1 -1
- package/dist/bin/package/recompile.mjs +60 -283
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/bin/package/tsup.d.ts +3 -0
- package/dist/bin/package/tsup.d.ts.map +1 -0
- package/dist/bin/package/tsup.js +11 -0
- package/dist/bin/package/tsup.js.map +1 -0
- package/dist/bin/package/tsup.mjs +39 -0
- package/dist/bin/package/tsup.mjs.map +1 -0
- package/dist/bin/publint.d.ts +3 -0
- package/dist/bin/publint.d.ts.map +1 -0
- package/dist/bin/publint.js +3 -33
- package/dist/bin/publint.js.map +1 -1
- package/dist/bin/rebuild.d.ts +3 -0
- package/dist/bin/rebuild.d.ts.map +1 -0
- package/dist/bin/rebuild.js +3 -33
- package/dist/bin/rebuild.js.map +1 -1
- package/dist/bin/recompile.d.ts +3 -0
- package/dist/bin/recompile.d.ts.map +1 -0
- package/dist/bin/recompile.js +3 -33
- package/dist/bin/recompile.js.map +1 -1
- package/dist/bin/reinstall.d.ts +3 -0
- package/dist/bin/reinstall.d.ts.map +1 -0
- package/dist/bin/reinstall.js +3 -33
- package/dist/bin/reinstall.js.map +1 -1
- package/dist/bin/relint.d.ts +3 -0
- package/dist/bin/relint.d.ts.map +1 -0
- package/dist/bin/relint.js +3 -33
- package/dist/bin/relint.js.map +1 -1
- package/dist/bin/sonar.d.ts +3 -0
- package/dist/bin/sonar.d.ts.map +1 -0
- package/dist/bin/sonar.js +3 -33
- package/dist/bin/sonar.js.map +1 -1
- package/dist/bin/test.d.ts +3 -0
- package/dist/bin/test.d.ts.map +1 -0
- package/dist/bin/test.js +3 -33
- package/dist/bin/test.js.map +1 -1
- package/dist/bin/tsconfig-gen-clean.d.ts +3 -0
- package/dist/bin/tsconfig-gen-clean.d.ts.map +1 -0
- package/dist/bin/tsconfig-gen-clean.js +3 -33
- package/dist/bin/tsconfig-gen-clean.js.map +1 -1
- package/dist/bin/tsconfig-gen.d.ts +3 -0
- package/dist/bin/tsconfig-gen.d.ts.map +1 -0
- package/dist/bin/tsconfig-gen.js +3 -33
- package/dist/bin/tsconfig-gen.js.map +1 -1
- package/dist/bin/up.d.ts +3 -0
- package/dist/bin/up.d.ts.map +1 -0
- package/dist/bin/up.js +3 -33
- package/dist/bin/up.js.map +1 -1
- package/dist/bin/updo.d.ts +3 -0
- package/dist/bin/updo.d.ts.map +1 -0
- package/dist/bin/updo.js +3 -33
- package/dist/bin/updo.js.map +1 -1
- package/dist/bin/upplug.d.ts +3 -0
- package/dist/bin/upplug.d.ts.map +1 -0
- package/dist/bin/upplug.js +3 -33
- package/dist/bin/upplug.js.map +1 -1
- package/dist/bin/upyarn.d.ts +3 -0
- package/dist/bin/upyarn.d.ts.map +1 -0
- package/dist/bin/upyarn.js +3 -33
- package/dist/bin/upyarn.js.map +1 -1
- package/dist/bin/xy-ts.d.ts +3 -0
- package/dist/bin/xy-ts.d.ts.map +1 -0
- package/dist/bin/xy-ts.js +3 -1680
- package/dist/bin/xy-ts.js.map +1 -1
- package/dist/bin/xy-ts.mjs +15 -210
- package/dist/bin/xy-ts.mjs.map +1 -1
- package/dist/bin/xy.d.ts +3 -0
- package/dist/bin/xy.d.ts.map +1 -0
- package/dist/bin/xy.js +3 -1680
- package/dist/bin/xy.js.map +1 -1
- package/dist/bin/xy.mjs +15 -210
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/bin/yarn3only.d.ts +3 -0
- package/dist/bin/yarn3only.d.ts.map +1 -0
- package/dist/bin/yarn3only.js +3 -33
- package/dist/bin/yarn3only.js.map +1 -1
- package/dist/index.d.mts +2 -22
- package/dist/index.d.ts +3 -319
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -2333
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +113 -280
- package/dist/index.mjs.map +1 -1
- package/dist/lib/checkResult.d.ts +2 -0
- package/dist/lib/checkResult.d.ts.map +1 -0
- package/dist/lib/checkResult.js +13 -47
- package/dist/lib/checkResult.js.map +1 -1
- package/dist/lib/createBuildConfig.d.ts +2 -0
- package/dist/lib/createBuildConfig.d.ts.map +1 -0
- package/dist/lib/createBuildConfig.js +31 -66
- package/dist/lib/createBuildConfig.js.map +1 -1
- package/dist/lib/defaultBuildConfig.d.ts +9 -0
- package/dist/lib/defaultBuildConfig.d.ts.map +1 -0
- package/dist/lib/defaultBuildConfig.js +9 -35
- package/dist/lib/defaultBuildConfig.js.map +1 -1
- package/dist/lib/dependencies/DuplicateDetector.d.ts +9 -0
- package/dist/lib/dependencies/DuplicateDetector.d.ts.map +1 -0
- package/dist/lib/dependencies/DuplicateDetector.js +65 -104
- package/dist/lib/dependencies/DuplicateDetector.js.map +1 -1
- package/dist/lib/dependencies/detectDuplicateDependencies.d.ts +2 -0
- package/dist/lib/dependencies/detectDuplicateDependencies.d.ts.map +1 -0
- package/dist/lib/dependencies/detectDuplicateDependencies.js +40 -192
- package/dist/lib/dependencies/detectDuplicateDependencies.js.map +1 -1
- package/dist/lib/dependencies/index.d.ts +3 -0
- package/dist/lib/dependencies/index.d.ts.map +1 -0
- package/dist/lib/dependencies/index.js +4 -199
- package/dist/lib/dependencies/index.js.map +1 -1
- package/dist/lib/file/ReadFileSyncOptions.d.ts +7 -0
- package/dist/lib/file/ReadFileSyncOptions.d.ts.map +1 -0
- package/dist/lib/file/ReadFileSyncOptions.js +3 -29
- package/dist/lib/file/ReadFileSyncOptions.js.map +1 -1
- package/dist/lib/file/constants.d.ts +3 -0
- package/dist/lib/file/constants.d.ts.map +1 -0
- package/dist/lib/file/constants.js +4 -32
- package/dist/lib/file/constants.js.map +1 -1
- package/dist/lib/file/fileLines.d.ts +6 -0
- package/dist/lib/file/fileLines.d.ts.map +1 -0
- package/dist/lib/file/fileLines.js +17 -53
- package/dist/lib/file/fileLines.js.map +1 -1
- package/dist/lib/file/index.d.ts +5 -0
- package/dist/lib/file/index.d.ts.map +1 -0
- package/dist/lib/file/index.js +6 -70
- package/dist/lib/file/index.js.map +1 -1
- package/dist/lib/file/tryReadFileSync.d.ts +4 -0
- package/dist/lib/file/tryReadFileSync.d.ts.map +1 -0
- package/dist/lib/file/tryReadFileSync.js +7 -36
- package/dist/lib/file/tryReadFileSync.js.map +1 -1
- package/dist/lib/generateIgnoreFiles.d.ts +2 -0
- package/dist/lib/generateIgnoreFiles.d.ts.map +1 -0
- package/dist/lib/generateIgnoreFiles.js +28 -115
- package/dist/lib/generateIgnoreFiles.js.map +1 -1
- package/dist/lib/index.d.ts +20 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +21 -1788
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +10 -163
- package/dist/lib/index.mjs.map +1 -1
- package/dist/lib/jsonFormatters.d.ts +2 -0
- package/dist/lib/jsonFormatters.d.ts.map +1 -0
- package/dist/lib/jsonFormatters.js +8 -33
- package/dist/lib/jsonFormatters.js.map +1 -1
- package/dist/lib/parsedPackageJSON.d.ts +2 -0
- package/dist/lib/parsedPackageJSON.d.ts.map +1 -0
- package/dist/lib/parsedPackageJSON.js +8 -33
- package/dist/lib/parsedPackageJSON.js.map +1 -1
- package/dist/lib/processEx.d.ts +2 -0
- package/dist/lib/processEx.d.ts.map +1 -0
- package/dist/lib/processEx.js +29 -68
- package/dist/lib/processEx.js.map +1 -1
- package/dist/lib/runSteps.d.ts +5 -0
- package/dist/lib/runSteps.d.ts.map +1 -0
- package/dist/lib/runSteps.js +36 -129
- package/dist/lib/runSteps.js.map +1 -1
- package/dist/lib/runStepsAsync.d.ts +4 -0
- package/dist/lib/runStepsAsync.d.ts.map +1 -0
- package/dist/lib/runStepsAsync.js +45 -144
- package/dist/lib/runStepsAsync.js.map +1 -1
- package/dist/lib/runXy.d.ts +2 -0
- package/dist/lib/runXy.d.ts.map +1 -0
- package/dist/lib/runXy.js +6 -135
- package/dist/lib/runXy.js.map +1 -1
- package/dist/lib/runXyWithWarning.d.ts +2 -0
- package/dist/lib/runXyWithWarning.d.ts.map +1 -0
- package/dist/lib/runXyWithWarning.js +9 -43
- package/dist/lib/runXyWithWarning.js.map +1 -1
- package/dist/lib/safeExit.d.ts +5 -0
- package/dist/lib/safeExit.d.ts.map +1 -0
- package/dist/lib/safeExit.js +25 -92
- package/dist/lib/safeExit.js.map +1 -1
- package/dist/lib/string/empty.d.ts +3 -0
- package/dist/lib/string/empty.d.ts.map +1 -0
- package/dist/lib/string/empty.js +6 -32
- package/dist/lib/string/empty.js.map +1 -1
- package/dist/lib/string/index.d.ts +3 -0
- package/dist/lib/string/index.d.ts.map +1 -0
- package/dist/lib/string/index.js +4 -39
- package/dist/lib/string/index.js.map +1 -1
- package/dist/lib/string/union.d.ts +2 -0
- package/dist/lib/string/union.d.ts.map +1 -0
- package/dist/lib/string/union.js +4 -29
- package/dist/lib/string/union.js.map +1 -1
- package/dist/lib/withErrnoException.d.ts +3 -0
- package/dist/lib/withErrnoException.d.ts.map +1 -0
- package/dist/lib/withErrnoException.js +8 -38
- package/dist/lib/withErrnoException.js.map +1 -1
- package/dist/lib/withError.d.ts +2 -0
- package/dist/lib/withError.d.ts.map +1 -0
- package/dist/lib/withError.js +7 -30
- package/dist/lib/withError.js.map +1 -1
- package/dist/lib/xy/index.d.ts +8 -0
- package/dist/lib/xy/index.d.ts.map +1 -0
- package/dist/lib/xy/index.js +9 -1707
- package/dist/lib/xy/index.js.map +1 -1
- package/dist/lib/xy/index.mjs +15 -210
- package/dist/lib/xy/index.mjs.map +1 -1
- package/dist/lib/xy/xy.d.ts +10 -0
- package/dist/lib/xy/xy.d.ts.map +1 -0
- package/dist/lib/xy/xy.js +20 -1691
- package/dist/lib/xy/xy.js.map +1 -1
- package/dist/lib/xy/xy.mjs +8 -203
- package/dist/lib/xy/xy.mjs.map +1 -1
- package/dist/lib/xy/xyBuildCommands.d.ts +3 -0
- package/dist/lib/xy/xyBuildCommands.d.ts.map +1 -0
- package/dist/lib/xy/xyBuildCommands.js +71 -426
- package/dist/lib/xy/xyBuildCommands.js.map +1 -1
- package/dist/lib/xy/xyCommonCommands.d.ts +3 -0
- package/dist/lib/xy/xyCommonCommands.d.ts.map +1 -0
- package/dist/lib/xy/xyCommonCommands.js +102 -807
- package/dist/lib/xy/xyCommonCommands.js.map +1 -1
- package/dist/lib/xy/xyCommonCommands.mjs +3 -198
- package/dist/lib/xy/xyCommonCommands.mjs.map +1 -1
- package/dist/lib/xy/xyDeployCommands.d.ts +3 -0
- package/dist/lib/xy/xyDeployCommands.d.ts.map +1 -0
- package/dist/lib/xy/xyDeployCommands.js +35 -227
- package/dist/lib/xy/xyDeployCommands.js.map +1 -1
- package/dist/lib/xy/xyInstallCommands.d.ts +3 -0
- package/dist/lib/xy/xyInstallCommands.d.ts.map +1 -0
- package/dist/lib/xy/xyInstallCommands.js +52 -491
- package/dist/lib/xy/xyInstallCommands.js.map +1 -1
- package/dist/lib/xy/xyLintCommands.d.ts +3 -0
- package/dist/lib/xy/xyLintCommands.d.ts.map +1 -0
- package/dist/lib/xy/xyLintCommands.js +71 -365
- package/dist/lib/xy/xyLintCommands.js.map +1 -1
- package/dist/lib/xy/xyParseOptions.d.ts +3 -0
- package/dist/lib/xy/xyParseOptions.d.ts.map +1 -0
- package/dist/lib/xy/xyParseOptions.js +52 -77
- package/dist/lib/xy/xyParseOptions.js.map +1 -1
- package/dist/lib/yarn/index.d.ts +4 -0
- package/dist/lib/yarn/index.d.ts.map +1 -0
- package/dist/lib/yarn/index.js +5 -77
- package/dist/lib/yarn/index.js.map +1 -1
- package/dist/lib/yarn/isYarnVersionOrGreater.d.ts +2 -0
- package/dist/lib/yarn/isYarnVersionOrGreater.d.ts.map +1 -0
- package/dist/lib/yarn/isYarnVersionOrGreater.js +15 -40
- package/dist/lib/yarn/isYarnVersionOrGreater.js.map +1 -1
- package/dist/lib/yarn/workspace/Workspace.d.ts +5 -0
- package/dist/lib/yarn/workspace/Workspace.d.ts.map +1 -0
- package/dist/lib/yarn/workspace/Workspace.js +1 -17
- package/dist/lib/yarn/workspace/Workspace.js.map +1 -1
- package/dist/lib/yarn/workspace/index.d.ts +4 -0
- package/dist/lib/yarn/workspace/index.d.ts.map +1 -0
- package/dist/lib/yarn/workspace/index.js +5 -51
- package/dist/lib/yarn/workspace/index.js.map +1 -1
- package/dist/lib/yarn/workspace/yarnWorkspace.d.ts +3 -0
- package/dist/lib/yarn/workspace/yarnWorkspace.d.ts.map +1 -0
- package/dist/lib/yarn/workspace/yarnWorkspace.js +10 -49
- package/dist/lib/yarn/workspace/yarnWorkspace.js.map +1 -1
- package/dist/lib/yarn/workspace/yarnWorkspaces.d.ts +3 -0
- package/dist/lib/yarn/workspace/yarnWorkspaces.d.ts.map +1 -0
- package/dist/lib/yarn/workspace/yarnWorkspaces.js +19 -38
- package/dist/lib/yarn/workspace/yarnWorkspaces.js.map +1 -1
- package/dist/lib/yarn/yarnInitCwd.d.ts +2 -0
- package/dist/lib/yarn/yarnInitCwd.d.ts.map +1 -0
- package/dist/lib/yarn/yarnInitCwd.js +7 -32
- package/dist/lib/yarn/yarnInitCwd.js.map +1 -1
- package/package.json +11 -5
- package/src/actions/index.ts +0 -5
- package/src/actions/package/compile.ts +64 -12
- package/src/actions/package/gen-docs.ts +1 -1
- package/src/actions/package/index.ts +1 -4
- package/src/actions/package/publint.ts +1 -2
- package/src/actions/package/tsup.ts +31 -0
- package/src/actions/package/types.d.ts +3 -0
- package/src/bin/package/publint.ts +1 -1
- package/src/bin/package/tsup.ts +9 -0
- package/src/lib/xy/xyCommonCommands.ts +0 -26
- package/tsconfig.build.json +8 -0
- package/tsconfig.json +4 -1
- package/dist/actions/package/compile-cjs.js +0 -268
- package/dist/actions/package/compile-cjs.js.map +0 -1
- package/dist/actions/package/compile-cjs.mjs +0 -231
- package/dist/actions/package/compile-cjs.mjs.map +0 -1
- package/dist/actions/package/compile-esm.js +0 -270
- package/dist/actions/package/compile-esm.js.map +0 -1
- package/dist/actions/package/compile-esm.mjs +0 -233
- package/dist/actions/package/compile-esm.mjs.map +0 -1
- package/dist/actions/package/tsconfig-gen-cjs.js +0 -111
- package/dist/actions/package/tsconfig-gen-cjs.js.map +0 -1
- package/dist/actions/package/tsconfig-gen-cjs.mjs +0 -76
- package/dist/actions/package/tsconfig-gen-cjs.mjs.map +0 -1
- package/dist/actions/package/tsconfig-gen-esm.js +0 -113
- package/dist/actions/package/tsconfig-gen-esm.js.map +0 -1
- package/dist/actions/package/tsconfig-gen-esm.mjs +0 -78
- package/dist/actions/package/tsconfig-gen-esm.mjs.map +0 -1
- package/dist/actions/tsconfig-gen-cjs.js +0 -134
- package/dist/actions/tsconfig-gen-cjs.js.map +0 -1
- package/dist/actions/tsconfig-gen-cjs.mjs +0 -99
- package/dist/actions/tsconfig-gen-cjs.mjs.map +0 -1
- package/dist/actions/tsconfig-gen-clean.js +0 -80
- package/dist/actions/tsconfig-gen-clean.js.map +0 -1
- package/dist/actions/tsconfig-gen-clean.mjs +0 -45
- package/dist/actions/tsconfig-gen-clean.mjs.map +0 -1
- package/dist/actions/tsconfig-gen-esm.js +0 -134
- package/dist/actions/tsconfig-gen-esm.js.map +0 -1
- package/dist/actions/tsconfig-gen-esm.mjs +0 -99
- package/dist/actions/tsconfig-gen-esm.mjs.map +0 -1
- package/dist/actions/tsconfig-gen-test.js +0 -97
- package/dist/actions/tsconfig-gen-test.js.map +0 -1
- package/dist/actions/tsconfig-gen-test.mjs +0 -62
- package/dist/actions/tsconfig-gen-test.mjs.map +0 -1
- package/dist/actions/tsconfig-gen.js +0 -215
- package/dist/actions/tsconfig-gen.js.map +0 -1
- package/dist/actions/tsconfig-gen.mjs +0 -178
- package/dist/actions/tsconfig-gen.mjs.map +0 -1
- package/dist/bin/package/compile-cjs.js +0 -262
- package/dist/bin/package/compile-cjs.js.map +0 -1
- package/dist/bin/package/compile-cjs.mjs +0 -239
- package/dist/bin/package/compile-cjs.mjs.map +0 -1
- package/dist/bin/package/compile-esm.js +0 -264
- package/dist/bin/package/compile-esm.js.map +0 -1
- package/dist/bin/package/compile-esm.mjs +0 -241
- package/dist/bin/package/compile-esm.mjs.map +0 -1
- package/dist/bin/package/tsconfig-gen-cjs.js +0 -99
- package/dist/bin/package/tsconfig-gen-cjs.js.map +0 -1
- package/dist/bin/package/tsconfig-gen-cjs.mjs +0 -76
- package/dist/bin/package/tsconfig-gen-cjs.mjs.map +0 -1
- package/dist/bin/package/tsconfig-gen-esm.js +0 -101
- package/dist/bin/package/tsconfig-gen-esm.js.map +0 -1
- package/dist/bin/package/tsconfig-gen-esm.mjs +0 -78
- package/dist/bin/package/tsconfig-gen-esm.mjs.map +0 -1
- package/dist/bin/package/tsconfig-gen.js +0 -131
- package/dist/bin/package/tsconfig-gen.js.map +0 -1
- package/dist/bin/package/tsconfig-gen.mjs +0 -108
- package/dist/bin/package/tsconfig-gen.mjs.map +0 -1
- package/src/actions/package/compile-cjs.ts +0 -15
- package/src/actions/package/compile-esm.ts +0 -15
- package/src/actions/package/tsconfig-gen-cjs.ts +0 -32
- package/src/actions/package/tsconfig-gen-esm.ts +0 -34
- package/src/actions/tsconfig-gen-cjs.ts +0 -35
- package/src/actions/tsconfig-gen-clean.ts +0 -22
- package/src/actions/tsconfig-gen-esm.ts +0 -34
- package/src/actions/tsconfig-gen-test.ts +0 -39
- package/src/actions/tsconfig-gen.ts +0 -19
- package/src/bin/package/compile-cjs.ts +0 -9
- package/src/bin/package/compile-esm.ts +0 -9
- package/src/bin/package/tsconfig-gen-cjs.ts +0 -5
- package/src/bin/package/tsconfig-gen-esm.ts +0 -5
- package/src/bin/package/tsconfig-gen.ts +0 -6
- package/tsup.config.ts +0 -16
|
@@ -1,811 +1,106 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/lib/xy/xyCommonCommands.ts
|
|
31
|
-
var xyCommonCommands_exports = {};
|
|
32
|
-
__export(xyCommonCommands_exports, {
|
|
33
|
-
xyCommonCommands: () => xyCommonCommands
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(xyCommonCommands_exports);
|
|
36
|
-
|
|
37
|
-
// src/lib/checkResult.ts
|
|
38
|
-
var import_chalk = __toESM(require("chalk"));
|
|
39
|
-
var checkResult = (name, result, level = "error", exitOnFail = false) => {
|
|
40
|
-
if (result) {
|
|
41
|
-
const exiting = exitOnFail ? "[Exiting Process]" : "[Continuing]";
|
|
42
|
-
const chalkFunc = level === "error" ? import_chalk.default.red : import_chalk.default.yellow;
|
|
43
|
-
console[level](chalkFunc(`${name} had ${result} failures ${exiting}`));
|
|
44
|
-
if (exitOnFail) {
|
|
45
|
-
process.exit(result);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
// src/lib/createBuildConfig.ts
|
|
51
|
-
var import_fs = require("fs");
|
|
52
|
-
|
|
53
|
-
// src/lib/defaultBuildConfig.ts
|
|
54
|
-
var defaultBuildConfig = {
|
|
55
|
-
compilerOptions: {
|
|
56
|
-
rootDir: "src",
|
|
57
|
-
rootDirs: ["package.json"]
|
|
58
|
-
},
|
|
59
|
-
exclude: ["**/build", "**/dist", "**/node_modules", "**/*.spec.*", "**/*.spec", "**/*.stories.*", "**/*.example.*", "**/spec/*", "**/stories/*"],
|
|
60
|
-
include: ["src"]
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
// src/lib/createBuildConfig.ts
|
|
64
|
-
var getGeneralTypescriptConfig = (location) => {
|
|
65
|
-
let generalConfig;
|
|
66
|
-
try {
|
|
67
|
-
generalConfig = (0, import_fs.readFileSync)(`${location}/tsconfig.json`, { encoding: "utf8" });
|
|
68
|
-
} catch (ex) {
|
|
69
|
-
return false;
|
|
70
|
-
}
|
|
71
|
-
return JSON.parse(generalConfig);
|
|
72
|
-
};
|
|
73
|
-
var createBuildConfig = (location, module2, target, outDirSuffix) => {
|
|
74
|
-
const generalConfigObject = getGeneralTypescriptConfig(location);
|
|
75
|
-
if (generalConfigObject === false) {
|
|
76
|
-
return void 0;
|
|
77
|
-
}
|
|
78
|
-
return {
|
|
79
|
-
...generalConfigObject,
|
|
80
|
-
compilerOptions: {
|
|
81
|
-
...defaultBuildConfig.compilerOptions,
|
|
82
|
-
...generalConfigObject.compilerOptions ?? {},
|
|
83
|
-
module: module2,
|
|
84
|
-
outDir: `./${generalConfigObject.compilerOptions?.outDir ?? "dist"}/${outDirSuffix}`,
|
|
85
|
-
target
|
|
86
|
-
},
|
|
87
|
-
exclude: [...generalConfigObject.exclude ?? [], ...defaultBuildConfig.exclude],
|
|
88
|
-
include: [...generalConfigObject.include ?? [], ...defaultBuildConfig.include]
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
// src/lib/processEx.ts
|
|
93
|
-
var import_chalk2 = __toESM(require("chalk"));
|
|
94
|
-
|
|
95
|
-
// src/lib/withError.ts
|
|
96
|
-
var withError = (ex, closure, predicate = (ex2) => ex2.name !== void 0 && ex2.message !== void 0) => {
|
|
97
|
-
return predicate(ex) ? closure(ex) : void 0;
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
// src/lib/withErrnoException.ts
|
|
101
|
-
var withErrnoException = (ex, closure) => {
|
|
102
|
-
return withError(ex, closure, (ex2) => ex2.errno !== void 0);
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
// src/lib/processEx.ts
|
|
106
|
-
var processEx = (ex) => {
|
|
107
|
-
const error = typeof ex === "string" ? Error(ex) : ex;
|
|
108
|
-
const exitCode = withErrnoException(error, (error2) => {
|
|
109
|
-
if (error2.code === "ENOENT") {
|
|
110
|
-
console.error(import_chalk2.default.red(`'${error2.path}' not found.`));
|
|
111
|
-
} else {
|
|
112
|
-
console.error(import_chalk2.default.red(`Errno: ${error2.code}`));
|
|
113
|
-
}
|
|
114
|
-
return error2.errno ?? -1;
|
|
115
|
-
}) ?? withError(error, (error2) => {
|
|
116
|
-
console.error(import_chalk2.default.red(`${error2.name}: ${error2.message}`));
|
|
117
|
-
return -1;
|
|
118
|
-
}) ?? (() => {
|
|
119
|
-
console.error(import_chalk2.default.red(`Unexpected Error: ${JSON.stringify(ex, null, 2)}`));
|
|
120
|
-
return -1;
|
|
121
|
-
})();
|
|
122
|
-
process.exit(process.exitCode ?? exitCode);
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
// src/lib/safeExit.ts
|
|
126
|
-
var safeExit = (func, exitOnFail = true) => {
|
|
127
|
-
try {
|
|
128
|
-
const result = func();
|
|
129
|
-
if (result && exitOnFail) {
|
|
130
|
-
process.exit(result);
|
|
131
|
-
}
|
|
132
|
-
return result;
|
|
133
|
-
} catch (ex) {
|
|
134
|
-
return processEx(ex);
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
// src/lib/file/constants.ts
|
|
139
|
-
var WINDOWS_NEWLINE_REGEX = /\r\n/g;
|
|
140
|
-
var CROSS_PLATFORM_NEWLINE = "\n";
|
|
141
|
-
|
|
142
|
-
// src/lib/file/fileLines.ts
|
|
143
|
-
var import_node_fs = require("fs");
|
|
144
|
-
|
|
145
|
-
// src/lib/string/empty.ts
|
|
146
|
-
var empty = (value) => value?.trim().length === 0;
|
|
147
|
-
var notEmpty = (value) => !empty(value);
|
|
148
|
-
|
|
149
|
-
// src/lib/string/union.ts
|
|
150
|
-
var union = (a, b) => /* @__PURE__ */ new Set([...new Set(a), ...new Set(b)]);
|
|
151
|
-
|
|
152
|
-
// src/lib/file/ReadFileSyncOptions.ts
|
|
153
|
-
var defaultReadFileSyncOptions = { encoding: "utf-8" };
|
|
154
|
-
|
|
155
|
-
// src/lib/file/fileLines.ts
|
|
156
|
-
var readLines = (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) : [];
|
|
157
|
-
var readNonEmptyLines = (uri, options = defaultReadFileSyncOptions) => readLines(uri, options).filter(notEmpty);
|
|
158
|
-
var writeLines = (uri, lines, options = defaultReadFileSyncOptions) => {
|
|
159
|
-
const existing = (0, import_node_fs.existsSync)(uri) ? (0, import_node_fs.readFileSync)(uri, options) : void 0;
|
|
160
|
-
const desired = lines.join(CROSS_PLATFORM_NEWLINE);
|
|
161
|
-
if (existing !== desired)
|
|
162
|
-
(0, import_node_fs.writeFileSync)(uri, desired, options);
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
// src/lib/generateIgnoreFiles.ts
|
|
166
|
-
var import_chalk3 = __toESM(require("chalk"));
|
|
167
|
-
|
|
168
|
-
// src/lib/yarn/isYarnVersionOrGreater.ts
|
|
169
|
-
var import_child_process = require("child_process");
|
|
170
|
-
var isYarnVersionOrGreater = (major, minor, patch) => {
|
|
171
|
-
const result = (0, import_child_process.spawnSync)("yarn", ["-v"], { encoding: "utf8", shell: true });
|
|
172
|
-
const version = result.stdout.toString().replaceAll("\n", "");
|
|
173
|
-
const versionNumbers = version.split(".").map((ver) => parseInt(ver));
|
|
174
|
-
const majorDelta = versionNumbers[0] - major;
|
|
175
|
-
const minorDelta = versionNumbers[1] - (minor ?? versionNumbers[1]);
|
|
176
|
-
const patchDelta = versionNumbers[2] - (patch ?? versionNumbers[2]);
|
|
177
|
-
const majorOk = majorDelta >= 0;
|
|
178
|
-
const minorOk = majorDelta > 0 || minorDelta >= 0;
|
|
179
|
-
const patchOk = majorDelta > 0 || minorDelta > 0 || patchDelta >= 0;
|
|
180
|
-
return [majorOk && minorOk && patchOk, version];
|
|
181
|
-
};
|
|
182
|
-
|
|
183
|
-
// src/lib/yarn/workspace/yarnWorkspaces.ts
|
|
184
|
-
var import_child_process2 = require("child_process");
|
|
185
|
-
var yarnWorkspaces = () => {
|
|
186
|
-
const result = (0, import_child_process2.spawnSync)("yarn", ["workspaces", "list", "--json", "--recursive"], { encoding: "utf8", shell: true });
|
|
187
|
-
if (result.error) {
|
|
188
|
-
throw result.error;
|
|
189
|
-
}
|
|
190
|
-
const list = result.stdout.toString().split("\n").slice(0, -1).map((item) => {
|
|
191
|
-
return JSON.parse(item);
|
|
192
|
-
});
|
|
193
|
-
return list;
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
// src/lib/yarn/workspace/yarnWorkspace.ts
|
|
197
|
-
var yarnWorkspace = (pkg) => {
|
|
198
|
-
const workspace = yarnWorkspaces().find(({ name }) => name === pkg);
|
|
199
|
-
if (!workspace)
|
|
200
|
-
throw new Error(`Workspace ${pkg} not found`);
|
|
201
|
-
return workspace;
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
// src/lib/yarn/yarnInitCwd.ts
|
|
205
|
-
var INIT_CWD = () => {
|
|
206
|
-
if (!process.env.INIT_CWD)
|
|
207
|
-
console.error("Missing INIT_CWD");
|
|
208
|
-
return process.env.INIT_CWD;
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
// src/lib/generateIgnoreFiles.ts
|
|
212
|
-
var mergeEntries = (a, b) => [...union(a, b)].sort();
|
|
213
|
-
var generateIgnoreFiles = (filename3, pkg) => {
|
|
214
|
-
console.log(import_chalk3.default.green(`Generate ${filename3} Files`));
|
|
215
|
-
const cwd = INIT_CWD() ?? ".";
|
|
216
|
-
const workspaces = pkg ? [yarnWorkspace(pkg)] : yarnWorkspaces();
|
|
217
|
-
const readEntries = (location) => readNonEmptyLines(`${location}/${filename3}`);
|
|
218
|
-
const writeEntries = (location, entries) => writeLines(`${location}/${filename3}`, entries);
|
|
219
|
-
const results = workspaces.map(({ location, name }) => {
|
|
220
|
-
try {
|
|
221
|
-
writeEntries(location, mergeEntries(readEntries(cwd), readEntries(location)));
|
|
222
|
-
return 0;
|
|
223
|
-
} catch (ex) {
|
|
224
|
-
const error = ex;
|
|
225
|
-
console.error(`Generate ${filename3} Files [${name}] [${error.message}]`);
|
|
226
|
-
return 1;
|
|
227
|
-
}
|
|
228
|
-
});
|
|
229
|
-
const succeeded = results.every((result) => result === 0);
|
|
230
|
-
return succeeded ? 0 : 1;
|
|
231
|
-
};
|
|
232
|
-
|
|
233
|
-
// src/lib/runSteps.ts
|
|
234
|
-
var import_chalk4 = __toESM(require("chalk"));
|
|
235
|
-
var import_child_process3 = require("child_process");
|
|
236
|
-
var import_fs2 = require("fs");
|
|
237
|
-
var runSteps = (name, steps, exitOnFail = true, messages) => {
|
|
238
|
-
return safeExit(() => {
|
|
239
|
-
const pkgName = process.env.npm_package_name;
|
|
240
|
-
console.log(import_chalk4.default.green(`${name} [${pkgName}]`));
|
|
241
|
-
let totalStatus = 0;
|
|
242
|
-
for (let i = 0; i < steps.length; i++) {
|
|
243
|
-
const [command, args, config] = steps[i];
|
|
244
|
-
if (messages?.[i]) {
|
|
245
|
-
console.log(import_chalk4.default.gray(messages?.[i]));
|
|
246
|
-
}
|
|
247
|
-
const argList = Array.isArray(args) ? args : args.split(" ");
|
|
248
|
-
if (command === "node" && !(0, import_fs2.existsSync)(argList[0])) {
|
|
249
|
-
throw Error(`File not found [${argList[0]}]`);
|
|
250
|
-
}
|
|
251
|
-
const status = (0, import_child_process3.spawnSync)(command, Array.isArray(args) ? args : args.split(" "), {
|
|
252
|
-
...config,
|
|
253
|
-
encoding: "utf8",
|
|
254
|
-
env: { FORCE_COLOR: "3", ...process.env },
|
|
255
|
-
shell: true,
|
|
256
|
-
stdio: "inherit"
|
|
257
|
-
}).status ?? 0;
|
|
258
|
-
checkResult(name, status, "error", exitOnFail);
|
|
259
|
-
totalStatus += status ?? 0;
|
|
260
|
-
}
|
|
261
|
-
return totalStatus;
|
|
262
|
-
}, !!exitOnFail);
|
|
263
|
-
};
|
|
264
|
-
|
|
265
|
-
// src/actions/clean-docs.ts
|
|
266
|
-
var import_chalk5 = __toESM(require("chalk"));
|
|
267
|
-
var import_path = __toESM(require("path"));
|
|
268
|
-
var import_rimraf = require("rimraf");
|
|
269
|
-
var cleanDocs = () => {
|
|
270
|
-
const pkgName = process.env.npm_package_name;
|
|
271
|
-
console.log(import_chalk5.default.green(`Cleaning Docs [${pkgName}]`));
|
|
272
|
-
yarnWorkspaces().map(({ location }) => (0, import_rimraf.rimrafSync)(import_path.default.join(location, "docs"), { glob: true }));
|
|
273
|
-
return 0;
|
|
274
|
-
};
|
|
275
|
-
|
|
276
|
-
// src/actions/dead.ts
|
|
277
|
-
var dead = () => {
|
|
278
|
-
return runSteps("Dead", [["yarn", ["ts-prune", "-p", "tsconfig.json"]]]);
|
|
279
|
-
};
|
|
280
|
-
|
|
281
|
-
// src/actions/deps.ts
|
|
282
|
-
var import_chalk6 = __toESM(require("chalk"));
|
|
283
|
-
var deps = ({ pkg, incremental }) => {
|
|
284
|
-
pkg ? depsPackage({ pkg }) : depsAll({ incremental });
|
|
285
|
-
return 0;
|
|
286
|
-
};
|
|
287
|
-
var depsPackage = ({ pkg }) => {
|
|
288
|
-
const steps = [["yarn", ["workspace", pkg, "run", "package-deps"]]];
|
|
289
|
-
return runSteps(`Deps [${pkg}]`, [...steps]);
|
|
290
|
-
};
|
|
291
|
-
var depsAll = ({ incremental, jobs }) => {
|
|
292
|
-
const start = Date.now();
|
|
293
|
-
const jobsOptions = jobs ? ["-j", `${jobs}`] : [];
|
|
294
|
-
if (jobs) {
|
|
295
|
-
console.log(import_chalk6.default.blue(`Jobs set to [${jobs}]`));
|
|
296
|
-
}
|
|
297
|
-
const incrementalOptions = incremental ? ["--since", "-pA"] : ["-pA"];
|
|
298
|
-
const steps = [["yarn", ["workspaces", "foreach", ...jobsOptions, ...incrementalOptions, "run", "package-deps"]]];
|
|
299
|
-
const result = runSteps(`Deps${incremental ? "-Incremental" : ""} [All]`, [...steps]);
|
|
300
|
-
console.log(`${import_chalk6.default.gray("Dep checked in")} [${import_chalk6.default.magenta(((Date.now() - start) / 1e3).toFixed(2))}] ${import_chalk6.default.gray("seconds")}`);
|
|
301
|
-
return result;
|
|
302
|
-
};
|
|
303
|
-
|
|
304
|
-
// src/actions/gen-docs.ts
|
|
305
|
-
var genDocs = ({ pkg, incremental }) => {
|
|
306
|
-
return pkg ? genDocsPackage({ pkg }) : genDocsAll({ incremental });
|
|
307
|
-
};
|
|
308
|
-
var genDocsPackage = ({ pkg }) => {
|
|
309
|
-
const steps = [["yarn", ["workspace", pkg, "run", "package-gen-docs"]]];
|
|
310
|
-
return runSteps(`GenDocs [${pkg}]`, [...steps]);
|
|
311
|
-
};
|
|
312
|
-
var genDocsAll = ({ incremental }) => {
|
|
313
|
-
const incrementalOptions = incremental ? ["--since", "-pA"] : ["-pA"];
|
|
314
|
-
const steps = [["yarn", ["workspaces", "foreach", ...incrementalOptions, "run", "package-gen-docs"]]];
|
|
315
|
-
return runSteps(`GenDocs [All${incremental ? "-Incremental" : ""}]`, [...steps]);
|
|
316
|
-
};
|
|
317
|
-
|
|
318
|
-
// src/actions/gitignore-gen.ts
|
|
319
|
-
var filename = ".gitignore";
|
|
320
|
-
var gitignoreGen = (pkg) => generateIgnoreFiles(filename, pkg);
|
|
321
|
-
|
|
322
|
-
// src/actions/gitlint.ts
|
|
323
|
-
var import_chalk7 = __toESM(require("chalk"));
|
|
324
|
-
var import_parse_git_config = require("parse-git-config");
|
|
325
|
-
var gitlint = () => {
|
|
326
|
-
console.log(`
|
|
327
|
-
Gitlint Start [${process.cwd()}]
|
|
328
|
-
`);
|
|
329
|
-
let valid = 0;
|
|
330
|
-
let warnings = 0;
|
|
331
|
-
const errors = 0;
|
|
332
|
-
const gitConfig = (0, import_parse_git_config.sync)();
|
|
333
|
-
const warn = (message) => {
|
|
334
|
-
console.warn(import_chalk7.default.yellow(`Warning: ${message}`));
|
|
335
|
-
warnings++;
|
|
336
|
-
};
|
|
337
|
-
if (gitConfig.core.ignorecase) {
|
|
338
|
-
warn("Please set core.ignorecase to FALSE in .git/config file [run yarn gitlint-fix]");
|
|
339
|
-
} else {
|
|
340
|
-
valid++;
|
|
341
|
-
}
|
|
342
|
-
if (gitConfig.core.autocrlf !== false) {
|
|
343
|
-
warn("Please set core.autocrlf to FALSE in .git/config file [run yarn gitlint-fix]");
|
|
344
|
-
} else {
|
|
345
|
-
valid++;
|
|
346
|
-
}
|
|
347
|
-
if (gitConfig.core.eol !== "lf") {
|
|
348
|
-
warn('Please set core.eol to "lf" in .git/config file [run yarn gitlint-fix]');
|
|
349
|
-
} else {
|
|
350
|
-
valid++;
|
|
351
|
-
}
|
|
352
|
-
const resultMessages = [];
|
|
353
|
-
if (valid > 0) {
|
|
354
|
-
resultMessages.push(import_chalk7.default.green(`Passed: ${valid}`));
|
|
355
|
-
}
|
|
356
|
-
if (warnings > 0) {
|
|
357
|
-
resultMessages.push(import_chalk7.default.yellow(`Warnings: ${warnings}`));
|
|
358
|
-
}
|
|
359
|
-
if (errors > 0) {
|
|
360
|
-
resultMessages.push(import_chalk7.default.red(` Errors: ${errors}`));
|
|
361
|
-
}
|
|
362
|
-
console.warn(`Gitlint Finish [ ${resultMessages.join(" | ")} ]
|
|
363
|
-
`);
|
|
364
|
-
return warnings + errors === 0 ? 1 : 0;
|
|
365
|
-
};
|
|
366
|
-
|
|
367
|
-
// src/actions/gitlint-fix.ts
|
|
368
|
-
var import_chalk8 = __toESM(require("chalk"));
|
|
369
|
-
var import_child_process4 = require("child_process");
|
|
370
|
-
var import_parse_git_config2 = require("parse-git-config");
|
|
371
|
-
var gitlintFix = () => {
|
|
372
|
-
console.log(`
|
|
373
|
-
Gitlint Fix Start [${process.cwd()}]
|
|
374
|
-
`);
|
|
375
|
-
const gitConfig = (0, import_parse_git_config2.sync)();
|
|
376
|
-
if (gitConfig.core.ignorecase) {
|
|
377
|
-
(0, import_child_process4.execSync)("git config core.ignorecase false", { stdio: "inherit" });
|
|
378
|
-
console.warn(import_chalk8.default.yellow("\nGitlint Fix: Updated core.ignorecase to be false\n"));
|
|
379
|
-
}
|
|
380
|
-
if (gitConfig.core.autocrlf !== false) {
|
|
381
|
-
(0, import_child_process4.execSync)("git config core.autocrlf false", { stdio: "inherit" });
|
|
382
|
-
console.warn(import_chalk8.default.yellow("\nGitlint Fix: Updated core.autocrlf to be false\n"));
|
|
383
|
-
}
|
|
384
|
-
if (gitConfig.core.eol !== "lf") {
|
|
385
|
-
(0, import_child_process4.execSync)("git config core.eol lf", { stdio: "inherit" });
|
|
386
|
-
console.warn(import_chalk8.default.yellow('\nGitlint Fix: Updated core.eol to be "lf"\n'));
|
|
387
|
-
}
|
|
388
|
-
return 1;
|
|
389
|
-
};
|
|
390
|
-
|
|
391
|
-
// src/actions/license.ts
|
|
392
|
-
var import_chalk9 = __toESM(require("chalk"));
|
|
393
|
-
var import_license_checker = require("license-checker");
|
|
394
|
-
var license = async (pkg) => {
|
|
395
|
-
const workspaces = yarnWorkspaces();
|
|
396
|
-
const workspaceList = workspaces.filter(({ name }) => {
|
|
397
|
-
return pkg === void 0 || name === pkg;
|
|
398
|
-
});
|
|
399
|
-
const exclude = [
|
|
400
|
-
"MIT",
|
|
401
|
-
"MIT*",
|
|
402
|
-
"ISC",
|
|
403
|
-
"Apache-2.0",
|
|
404
|
-
"BSD",
|
|
405
|
-
"BSD*",
|
|
406
|
-
"BSD-2-Clause",
|
|
407
|
-
"BSD-3-Clause",
|
|
408
|
-
"CC-BY-4.0",
|
|
409
|
-
"Unlicense",
|
|
410
|
-
"CC-BY-3.0",
|
|
411
|
-
"CC0-1.0",
|
|
412
|
-
"LGPL-3.0-only",
|
|
413
|
-
"LGPL-3.0",
|
|
414
|
-
"LGPL-3.0-or-later",
|
|
415
|
-
"Python-2.0"
|
|
416
|
-
];
|
|
417
|
-
console.log(import_chalk9.default.green("License Checker"));
|
|
418
|
-
return (await Promise.all(
|
|
419
|
-
workspaceList.map(({ location, name }) => {
|
|
420
|
-
return new Promise((resolve) => {
|
|
421
|
-
(0, import_license_checker.init)({ production: true, start: location }, (error, packages) => {
|
|
422
|
-
if (error) {
|
|
423
|
-
console.error(import_chalk9.default.red(`License Checker [${name}] Error`));
|
|
424
|
-
console.error(import_chalk9.default.gray(error));
|
|
425
|
-
console.log("\n");
|
|
426
|
-
resolve(1);
|
|
427
|
-
} else {
|
|
428
|
-
console.log(import_chalk9.default.green(`License Checker [${name}]`));
|
|
429
|
-
let count = 0;
|
|
430
|
-
Object.entries(packages).forEach(([name2, info]) => {
|
|
431
|
-
const licenses = Array.isArray(info.licenses) ? info.licenses : [info.licenses];
|
|
432
|
-
licenses.forEach((license2) => {
|
|
433
|
-
if (license2) {
|
|
434
|
-
if (license2[0] === "(" && license2[license2.length - 1] === ")") {
|
|
435
|
-
license2 = license2.substring(1, license2.length - 2);
|
|
436
|
-
}
|
|
437
|
-
const orLicenses = license2.split(" OR ");
|
|
438
|
-
let orLicenseFound = false;
|
|
439
|
-
orLicenses.forEach((orLicense) => {
|
|
440
|
-
if (exclude.includes(orLicense)) {
|
|
441
|
-
orLicenseFound = true;
|
|
442
|
-
}
|
|
443
|
-
});
|
|
444
|
-
if (!orLicenseFound) {
|
|
445
|
-
count++;
|
|
446
|
-
console.warn(import_chalk9.default.yellow(`${name2}: Package License not allowed [${license2}]`));
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
});
|
|
450
|
-
});
|
|
451
|
-
console.log("\n");
|
|
452
|
-
resolve(count);
|
|
453
|
-
}
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.xyCommonCommands = void 0;
|
|
4
|
+
const actions_1 = require("../../actions");
|
|
5
|
+
const xyCommonCommands = (args) => {
|
|
6
|
+
return args
|
|
7
|
+
.command('license [package]', 'License - Check licenses of dependencies', (yargs) => {
|
|
8
|
+
return yargs.positional('package', {
|
|
9
|
+
describe: 'Specific package to check',
|
|
454
10
|
});
|
|
455
|
-
|
|
11
|
+
}, async (argv) => {
|
|
12
|
+
if (argv.verbose)
|
|
13
|
+
console.log(`License: ${argv.package ?? 'all'}`);
|
|
14
|
+
process.exitCode = await (0, actions_1.license)();
|
|
456
15
|
})
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
},
|
|
548
|
-
null,
|
|
549
|
-
2
|
|
550
|
-
);
|
|
551
|
-
var tsconfigGenTest = (pkg) => {
|
|
552
|
-
const workspaces = pkg ? [yarnWorkspace(pkg)] : yarnWorkspaces();
|
|
553
|
-
console.log(import_chalk12.default.green("Generate Configs [Test]"));
|
|
554
|
-
return workspaces.map(({ location, name }) => {
|
|
555
|
-
try {
|
|
556
|
-
let currentConfig;
|
|
557
|
-
try {
|
|
558
|
-
currentConfig = (0, import_fs5.readFileSync)(`${location}/${tsconfigName}`, { encoding: "utf8" });
|
|
559
|
-
} catch (ex) {
|
|
560
|
-
currentConfig = void 0;
|
|
561
|
-
}
|
|
562
|
-
if (currentConfig !== tsconfig) {
|
|
563
|
-
console.log(import_chalk12.default.gray(`Updating TEST tsconfig [${name}]`));
|
|
564
|
-
(0, import_fs5.writeFileSync)(`${location}/${tsconfigName}`, tsconfig, { encoding: "utf8" });
|
|
565
|
-
}
|
|
566
|
-
return 0;
|
|
567
|
-
} catch (ex) {
|
|
568
|
-
const error = ex;
|
|
569
|
-
console.error(`tsconfig (TEST) generate failed [${name}] [${error.message}]`);
|
|
570
|
-
return 1;
|
|
571
|
-
}
|
|
572
|
-
}).reduce((prev, value) => prev || value, 0);
|
|
573
|
-
};
|
|
574
|
-
|
|
575
|
-
// src/actions/tsconfig-gen.ts
|
|
576
|
-
var tsconfigGen = ({ target, pkg }) => {
|
|
577
|
-
switch (target) {
|
|
578
|
-
case "esm":
|
|
579
|
-
return tsconfigGenEsm(pkg) || tsconfigGenTest(pkg);
|
|
580
|
-
case "cjs":
|
|
581
|
-
return tsconfigGenCjs(pkg) || tsconfigGenTest(pkg);
|
|
582
|
-
default:
|
|
583
|
-
return tsconfigGenEsm(pkg) || tsconfigGenCjs(pkg) || tsconfigGenTest(pkg);
|
|
584
|
-
}
|
|
585
|
-
};
|
|
586
|
-
|
|
587
|
-
// src/actions/tsconfig-gen-clean.ts
|
|
588
|
-
var import_chalk13 = __toESM(require("chalk"));
|
|
589
|
-
var import_fs6 = require("fs");
|
|
590
|
-
var tsconfigGenClean = (pkg) => {
|
|
591
|
-
const workspaces = pkg ? [yarnWorkspace(pkg)] : yarnWorkspaces();
|
|
592
|
-
console.log(import_chalk13.default.green("Clean TSConfigs"));
|
|
593
|
-
return workspaces.map(({ location, name }) => {
|
|
594
|
-
const dist = `${location}/**/.tsconfig*`;
|
|
595
|
-
try {
|
|
596
|
-
(0, import_fs6.rmSync)(dist, { force: true, recursive: true });
|
|
597
|
-
return 0;
|
|
598
|
-
} catch (ex) {
|
|
599
|
-
const error = ex;
|
|
600
|
-
console.error(`Clean Failed [${name}, ${error.message}]`);
|
|
601
|
-
return 1;
|
|
602
|
-
}
|
|
603
|
-
}).reduce((prev, result) => prev || result, 0);
|
|
604
|
-
};
|
|
605
|
-
|
|
606
|
-
// src/actions/upplug.ts
|
|
607
|
-
var updateYarnPlugins = () => {
|
|
608
|
-
return runSteps("Update Yarn Plugins", [
|
|
609
|
-
["yarn", ["plugin", "import", "https://mskelton.dev/yarn-outdated/v3"]],
|
|
610
|
-
["yarn", ["plugin", "import", "version"]],
|
|
611
|
-
["yarn", ["plugin", "import", "interactive-tools"]],
|
|
612
|
-
["yarn", ["plugin", "import", "workspace-tools"]]
|
|
613
|
-
]);
|
|
614
|
-
};
|
|
615
|
-
|
|
616
|
-
// src/actions/upyarn.ts
|
|
617
|
-
var updateYarnVersion = () => {
|
|
618
|
-
return runSteps("Update Yarn Version", [["yarn", ["set", "version", "latest"]]]);
|
|
619
|
-
};
|
|
620
|
-
|
|
621
|
-
// src/actions/yarn3only.ts
|
|
622
|
-
var yarn3Only = () => {
|
|
623
|
-
const [valid, version] = isYarnVersionOrGreater(3);
|
|
624
|
-
if (!valid) {
|
|
625
|
-
processEx(`Invalid Yarn version [${version}]`);
|
|
626
|
-
}
|
|
627
|
-
return 0;
|
|
628
|
-
};
|
|
629
|
-
|
|
630
|
-
// src/lib/xy/xyCommonCommands.ts
|
|
631
|
-
var xyCommonCommands = (args) => {
|
|
632
|
-
return args.command(
|
|
633
|
-
"license [package]",
|
|
634
|
-
"License - Check licenses of dependencies",
|
|
635
|
-
(yargs) => {
|
|
636
|
-
return yargs.positional("package", {
|
|
637
|
-
describe: "Specific package to check"
|
|
638
|
-
});
|
|
639
|
-
},
|
|
640
|
-
async (argv) => {
|
|
641
|
-
if (argv.verbose)
|
|
642
|
-
console.log(`License: ${argv.package ?? "all"}`);
|
|
643
|
-
process.exitCode = await license();
|
|
644
|
-
}
|
|
645
|
-
).command(
|
|
646
|
-
"dead [package]",
|
|
647
|
-
"Dead - Check for dead code",
|
|
648
|
-
(yargs) => {
|
|
649
|
-
return yargs.positional("package", {
|
|
650
|
-
describe: "Specific package to check"
|
|
651
|
-
});
|
|
652
|
-
},
|
|
653
|
-
(argv) => {
|
|
654
|
-
if (argv.verbose)
|
|
655
|
-
console.log("Dead");
|
|
656
|
-
process.exitCode = dead();
|
|
657
|
-
}
|
|
658
|
-
).command(
|
|
659
|
-
"deps [package]",
|
|
660
|
-
"Deps - Check for unused or missing dependencies",
|
|
661
|
-
(yargs) => {
|
|
662
|
-
return yargs.positional("package", {
|
|
663
|
-
describe: "Specific package to check"
|
|
664
|
-
});
|
|
665
|
-
},
|
|
666
|
-
(argv) => {
|
|
667
|
-
if (argv.verbose)
|
|
668
|
-
console.log(`Checking Dependencies: ${argv.package ?? "all"}`);
|
|
669
|
-
process.exitCode = deps({ incremental: !!argv.incremental, jobs: argv.jobs, pkg: argv.package });
|
|
670
|
-
}
|
|
671
|
-
).command(
|
|
672
|
-
"gen-docs [package]",
|
|
673
|
-
"GenDocs - Generate TypeDocs",
|
|
674
|
-
(yargs) => {
|
|
675
|
-
return yargs.positional("package", {
|
|
676
|
-
describe: "Specific package to generate docs for"
|
|
677
|
-
});
|
|
678
|
-
},
|
|
679
|
-
(argv) => {
|
|
680
|
-
if (argv.verbose)
|
|
681
|
-
console.log(`Generating TypeDocs: ${argv.package ?? "all"}`);
|
|
682
|
-
process.exitCode = genDocs({ incremental: !!argv.incremental, pkg: argv.package });
|
|
683
|
-
}
|
|
684
|
-
).command(
|
|
685
|
-
"clean-docs",
|
|
686
|
-
"CleanDocs - Clean TypeDocs",
|
|
687
|
-
(yargs) => yargs,
|
|
688
|
-
(argv) => {
|
|
689
|
-
if (argv.verbose)
|
|
690
|
-
console.log("Cleaning TypeDocs: all");
|
|
691
|
-
process.exitCode = cleanDocs();
|
|
692
|
-
}
|
|
693
|
-
).command(
|
|
694
|
-
"gitlint [package]",
|
|
695
|
-
"Gitlint - Lint your git config",
|
|
696
|
-
(yargs) => {
|
|
697
|
-
return yargs;
|
|
698
|
-
},
|
|
699
|
-
(argv) => {
|
|
700
|
-
if (argv.verbose)
|
|
701
|
-
console.log("Gitlint");
|
|
702
|
-
process.exitCode = argv.fix ? gitlintFix() : gitlint();
|
|
703
|
-
}
|
|
704
|
-
).command(
|
|
705
|
-
"gitignore-gen",
|
|
706
|
-
"GitIgnore Gen - Generate .gitignore files",
|
|
707
|
-
(yargs) => {
|
|
708
|
-
return yargs;
|
|
709
|
-
},
|
|
710
|
-
(argv) => {
|
|
711
|
-
if (argv.verbose)
|
|
712
|
-
console.log("GitIgnore Gen");
|
|
713
|
-
process.exitCode = gitignoreGen();
|
|
714
|
-
}
|
|
715
|
-
).command(
|
|
716
|
-
"npmignore-gen",
|
|
717
|
-
"NpmIgnore Gen - Generate .npmignore files",
|
|
718
|
-
(yargs) => {
|
|
719
|
-
return yargs;
|
|
720
|
-
},
|
|
721
|
-
(argv) => {
|
|
722
|
-
if (argv.verbose)
|
|
723
|
-
console.log("NpmIgnore Gen");
|
|
724
|
-
process.exitCode = npmignoreGen();
|
|
725
|
-
}
|
|
726
|
-
).command(
|
|
727
|
-
"retest",
|
|
728
|
-
"Re-Test - Run Jest Tests with cleaned cache",
|
|
729
|
-
(yargs) => {
|
|
730
|
-
return yargs;
|
|
731
|
-
},
|
|
732
|
-
(argv) => {
|
|
733
|
-
if (argv.verbose)
|
|
734
|
-
console.log("Re-Testing");
|
|
735
|
-
process.exitCode = retest();
|
|
736
|
-
}
|
|
737
|
-
).command(
|
|
738
|
-
"test",
|
|
739
|
-
"Test - Run Jest Tests",
|
|
740
|
-
(yargs) => {
|
|
741
|
-
return yargs;
|
|
742
|
-
},
|
|
743
|
-
(argv) => {
|
|
744
|
-
if (argv.verbose)
|
|
745
|
-
console.log("Testing");
|
|
746
|
-
process.exitCode = test();
|
|
747
|
-
}
|
|
748
|
-
).command(
|
|
749
|
-
"tsconfig-gen [package]",
|
|
750
|
-
"Tsconfig Gen - Generate tsconfig.json file for building",
|
|
751
|
-
(yargs) => {
|
|
752
|
-
return yargs.positional("package", {
|
|
753
|
-
describe: "Specific package for generation"
|
|
754
|
-
});
|
|
755
|
-
},
|
|
756
|
-
(argv) => {
|
|
757
|
-
if (argv.verbose)
|
|
758
|
-
console.log(`TsconfigGen: ${argv.package ?? "all"}`);
|
|
759
|
-
process.exitCode = tsconfigGen({ pkg: argv.package, target: argv.target });
|
|
760
|
-
}
|
|
761
|
-
).command(
|
|
762
|
-
"tsconfig-clean",
|
|
763
|
-
"Tsconfig Clean - Remove generated tsconfig.json files",
|
|
764
|
-
(yargs) => {
|
|
765
|
-
return yargs;
|
|
766
|
-
},
|
|
767
|
-
(argv) => {
|
|
768
|
-
if (argv.verbose)
|
|
769
|
-
console.log("Tsconfig Clean");
|
|
770
|
-
process.exitCode = tsconfigGenClean();
|
|
771
|
-
}
|
|
772
|
-
).command(
|
|
773
|
-
"upplug",
|
|
774
|
-
"UpPlug - Update Yarn Plugins",
|
|
775
|
-
(yargs) => {
|
|
776
|
-
return yargs;
|
|
777
|
-
},
|
|
778
|
-
(argv) => {
|
|
779
|
-
if (argv.verbose)
|
|
780
|
-
console.log("UpPlug");
|
|
781
|
-
process.exitCode = updateYarnPlugins();
|
|
782
|
-
}
|
|
783
|
-
).command(
|
|
784
|
-
"upyarn",
|
|
785
|
-
"UpYarn - Update Yarn Version",
|
|
786
|
-
(yargs) => {
|
|
787
|
-
return yargs;
|
|
788
|
-
},
|
|
789
|
-
(argv) => {
|
|
790
|
-
if (argv.verbose)
|
|
791
|
-
console.log("UpYarn");
|
|
792
|
-
process.exitCode = updateYarnVersion();
|
|
793
|
-
}
|
|
794
|
-
).command(
|
|
795
|
-
"yarn3only",
|
|
796
|
-
"Yarn3Only - Check if using Yarn v3",
|
|
797
|
-
(yargs) => {
|
|
798
|
-
return yargs;
|
|
799
|
-
},
|
|
800
|
-
(argv) => {
|
|
801
|
-
if (argv.verbose)
|
|
802
|
-
console.log("Yarn 3 Check");
|
|
803
|
-
process.exitCode = yarn3Only();
|
|
804
|
-
}
|
|
805
|
-
);
|
|
806
|
-
};
|
|
807
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
808
|
-
0 && (module.exports = {
|
|
809
|
-
xyCommonCommands
|
|
810
|
-
});
|
|
16
|
+
.command('dead [package]', 'Dead - Check for dead code', (yargs) => {
|
|
17
|
+
return yargs.positional('package', {
|
|
18
|
+
describe: 'Specific package to check',
|
|
19
|
+
});
|
|
20
|
+
}, (argv) => {
|
|
21
|
+
if (argv.verbose)
|
|
22
|
+
console.log('Dead');
|
|
23
|
+
process.exitCode = (0, actions_1.dead)();
|
|
24
|
+
})
|
|
25
|
+
.command('deps [package]', 'Deps - Check for unused or missing dependencies', (yargs) => {
|
|
26
|
+
return yargs.positional('package', {
|
|
27
|
+
describe: 'Specific package to check',
|
|
28
|
+
});
|
|
29
|
+
}, (argv) => {
|
|
30
|
+
if (argv.verbose)
|
|
31
|
+
console.log(`Checking Dependencies: ${argv.package ?? 'all'}`);
|
|
32
|
+
process.exitCode = (0, actions_1.deps)({ incremental: !!argv.incremental, jobs: argv.jobs, pkg: argv.package });
|
|
33
|
+
})
|
|
34
|
+
.command('gen-docs [package]', 'GenDocs - Generate TypeDocs', (yargs) => {
|
|
35
|
+
return yargs.positional('package', {
|
|
36
|
+
describe: 'Specific package to generate docs for',
|
|
37
|
+
});
|
|
38
|
+
}, (argv) => {
|
|
39
|
+
if (argv.verbose)
|
|
40
|
+
console.log(`Generating TypeDocs: ${argv.package ?? 'all'}`);
|
|
41
|
+
process.exitCode = (0, actions_1.genDocs)({ incremental: !!argv.incremental, pkg: argv.package });
|
|
42
|
+
})
|
|
43
|
+
.command('clean-docs', 'CleanDocs - Clean TypeDocs', (yargs) => yargs, (argv) => {
|
|
44
|
+
if (argv.verbose)
|
|
45
|
+
console.log('Cleaning TypeDocs: all');
|
|
46
|
+
process.exitCode = (0, actions_1.cleanDocs)();
|
|
47
|
+
})
|
|
48
|
+
.command('gitlint [package]', 'Gitlint - Lint your git config', (yargs) => {
|
|
49
|
+
return yargs;
|
|
50
|
+
}, (argv) => {
|
|
51
|
+
if (argv.verbose)
|
|
52
|
+
console.log('Gitlint');
|
|
53
|
+
process.exitCode = argv.fix ? (0, actions_1.gitlintFix)() : (0, actions_1.gitlint)();
|
|
54
|
+
})
|
|
55
|
+
.command('gitignore-gen', 'GitIgnore Gen - Generate .gitignore files', (yargs) => {
|
|
56
|
+
return yargs;
|
|
57
|
+
}, (argv) => {
|
|
58
|
+
if (argv.verbose)
|
|
59
|
+
console.log('GitIgnore Gen');
|
|
60
|
+
process.exitCode = (0, actions_1.gitignoreGen)();
|
|
61
|
+
})
|
|
62
|
+
.command('npmignore-gen', 'NpmIgnore Gen - Generate .npmignore files', (yargs) => {
|
|
63
|
+
return yargs;
|
|
64
|
+
}, (argv) => {
|
|
65
|
+
if (argv.verbose)
|
|
66
|
+
console.log('NpmIgnore Gen');
|
|
67
|
+
process.exitCode = (0, actions_1.npmignoreGen)();
|
|
68
|
+
})
|
|
69
|
+
.command('retest', 'Re-Test - Run Jest Tests with cleaned cache', (yargs) => {
|
|
70
|
+
return yargs;
|
|
71
|
+
}, (argv) => {
|
|
72
|
+
if (argv.verbose)
|
|
73
|
+
console.log('Re-Testing');
|
|
74
|
+
process.exitCode = (0, actions_1.retest)();
|
|
75
|
+
})
|
|
76
|
+
.command('test', 'Test - Run Jest Tests', (yargs) => {
|
|
77
|
+
return yargs;
|
|
78
|
+
}, (argv) => {
|
|
79
|
+
if (argv.verbose)
|
|
80
|
+
console.log('Testing');
|
|
81
|
+
process.exitCode = (0, actions_1.test)();
|
|
82
|
+
})
|
|
83
|
+
.command('upplug', 'UpPlug - Update Yarn Plugins', (yargs) => {
|
|
84
|
+
return yargs;
|
|
85
|
+
}, (argv) => {
|
|
86
|
+
if (argv.verbose)
|
|
87
|
+
console.log('UpPlug');
|
|
88
|
+
process.exitCode = (0, actions_1.updateYarnPlugins)();
|
|
89
|
+
})
|
|
90
|
+
.command('upyarn', 'UpYarn - Update Yarn Version', (yargs) => {
|
|
91
|
+
return yargs;
|
|
92
|
+
}, (argv) => {
|
|
93
|
+
if (argv.verbose)
|
|
94
|
+
console.log('UpYarn');
|
|
95
|
+
process.exitCode = (0, actions_1.updateYarnVersion)();
|
|
96
|
+
})
|
|
97
|
+
.command('yarn3only', 'Yarn3Only - Check if using Yarn v3', (yargs) => {
|
|
98
|
+
return yargs;
|
|
99
|
+
}, (argv) => {
|
|
100
|
+
if (argv.verbose)
|
|
101
|
+
console.log('Yarn 3 Check');
|
|
102
|
+
process.exitCode = (0, actions_1.yarn3Only)();
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
exports.xyCommonCommands = xyCommonCommands;
|
|
811
106
|
//# sourceMappingURL=xyCommonCommands.js.map
|