@gluhar/cli 3.0.2 → 3.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +46 -46
- package/src/GlobalOptions.d.ts +8 -0
- package/src/GlobalOptions.d.ts.map +1 -0
- package/src/GlobalOptions.js +2 -0
- package/src/commands/blank/BlankOptions.d.ts +4 -0
- package/src/commands/blank/BlankOptions.d.ts.map +1 -0
- package/src/commands/blank/BlankOptions.js +2 -0
- package/src/commands/blank/blank.d.ts +3 -0
- package/src/commands/blank/blank.d.ts.map +1 -0
- package/src/commands/blank/blank.js +8 -0
- package/src/commands/blank/index.d.ts +4 -0
- package/src/commands/blank/index.d.ts.map +1 -0
- package/src/commands/blank/index.js +9 -0
- package/src/commands/blank/log.d.ts +2 -0
- package/src/commands/blank/log.d.ts.map +1 -0
- package/src/commands/blank/log.js +5 -0
- package/src/commands/build/BuildOptions.d.ts +4 -0
- package/src/commands/build/BuildOptions.d.ts.map +1 -0
- package/src/commands/build/BuildOptions.js +2 -0
- package/src/commands/build/build.d.ts +3 -0
- package/src/commands/build/build.d.ts.map +1 -0
- package/src/commands/build/build.js +22 -0
- package/src/commands/build/index.d.ts +4 -0
- package/src/commands/build/index.d.ts.map +1 -0
- package/src/commands/build/index.js +9 -0
- package/src/commands/build/log.d.ts +2 -0
- package/src/commands/build/log.d.ts.map +1 -0
- package/src/commands/build/log.js +5 -0
- package/src/commands/deinstall/DeinstallOptions.d.ts +4 -0
- package/src/commands/deinstall/DeinstallOptions.d.ts.map +1 -0
- package/src/commands/deinstall/DeinstallOptions.js +2 -0
- package/src/commands/deinstall/deinstall.d.ts +3 -0
- package/src/commands/deinstall/deinstall.d.ts.map +1 -0
- package/src/commands/deinstall/deinstall.js +21 -0
- package/src/commands/deinstall/index.d.ts +4 -0
- package/src/commands/deinstall/index.d.ts.map +1 -0
- package/src/commands/deinstall/index.js +9 -0
- package/src/commands/deinstall/log.d.ts +2 -0
- package/src/commands/deinstall/log.d.ts.map +1 -0
- package/src/commands/deinstall/log.js +5 -0
- package/src/commands/deploy/DeployOptions.d.ts +7 -0
- package/src/commands/deploy/DeployOptions.d.ts.map +1 -0
- package/src/commands/deploy/DeployOptions.js +2 -0
- package/src/commands/deploy/deploy.d.ts +3 -0
- package/src/commands/deploy/deploy.d.ts.map +1 -0
- package/src/commands/deploy/deploy.js +33 -0
- package/src/commands/deploy/deployIos.d.ts +2 -0
- package/src/commands/deploy/deployIos.d.ts.map +1 -0
- package/src/commands/deploy/deployIos.js +44 -0
- package/src/commands/deploy/index.d.ts +4 -0
- package/src/commands/deploy/index.d.ts.map +1 -0
- package/src/commands/deploy/index.js +12 -0
- package/src/commands/deploy/log.d.ts +2 -0
- package/src/commands/deploy/log.d.ts.map +1 -0
- package/src/commands/deploy/log.js +5 -0
- package/src/commands/deploy/setSsr.d.ts +2 -0
- package/src/commands/deploy/setSsr.d.ts.map +1 -0
- package/src/commands/deploy/setSsr.js +25 -0
- package/src/commands/dev/DevOptions.d.ts +5 -0
- package/src/commands/dev/DevOptions.d.ts.map +1 -0
- package/src/commands/dev/DevOptions.js +2 -0
- package/src/commands/dev/dev.d.ts +3 -0
- package/src/commands/dev/dev.d.ts.map +1 -0
- package/src/commands/dev/dev.js +16 -0
- package/src/commands/dev/devIos.d.ts +3 -0
- package/src/commands/dev/devIos.d.ts.map +1 -0
- package/src/commands/dev/devIos.js +26 -0
- package/src/commands/dev/index.d.ts +4 -0
- package/src/commands/dev/index.d.ts.map +1 -0
- package/src/commands/dev/index.js +10 -0
- package/src/commands/dev/log.d.ts +2 -0
- package/src/commands/dev/log.d.ts.map +1 -0
- package/src/commands/dev/log.js +5 -0
- package/src/commands/generate/GenerateOptions.d.ts +9 -0
- package/src/commands/generate/GenerateOptions.d.ts.map +1 -0
- package/src/commands/generate/GenerateOptions.js +4 -0
- package/src/commands/generate/generate.d.ts +3 -0
- package/src/commands/generate/generate.d.ts.map +1 -0
- package/src/commands/generate/generate.js +22 -0
- package/src/commands/generate/generateCommand.d.ts +2 -0
- package/src/commands/generate/generateCommand.d.ts.map +1 -0
- package/src/commands/generate/generateCommand.js +36 -0
- package/src/commands/generate/generateProject.d.ts +3 -0
- package/src/commands/generate/generateProject.d.ts.map +1 -0
- package/src/commands/generate/generateProject.js +85 -0
- package/src/commands/generate/index.d.ts +4 -0
- package/src/commands/generate/index.d.ts.map +1 -0
- package/src/commands/generate/index.js +14 -0
- package/src/commands/generate/log.d.ts +2 -0
- package/src/commands/generate/log.d.ts.map +1 -0
- package/src/commands/generate/log.js +5 -0
- package/src/commands/index.d.ts +3 -0
- package/src/commands/index.d.ts.map +1 -0
- package/src/commands/index.js +25 -0
- package/src/commands/reinstall/ReinstallOptions.d.ts +4 -0
- package/src/commands/reinstall/ReinstallOptions.d.ts.map +1 -0
- package/src/commands/reinstall/ReinstallOptions.js +2 -0
- package/src/commands/reinstall/index.d.ts +4 -0
- package/src/commands/reinstall/index.d.ts.map +1 -0
- package/src/commands/reinstall/index.js +9 -0
- package/src/commands/reinstall/log.d.ts +2 -0
- package/src/commands/reinstall/log.d.ts.map +1 -0
- package/src/commands/reinstall/log.js +5 -0
- package/src/commands/reinstall/reinstall.d.ts +3 -0
- package/src/commands/reinstall/reinstall.d.ts.map +1 -0
- package/src/commands/reinstall/reinstall.js +14 -0
- package/src/commands/release/ReleaseOptions.d.ts +9 -0
- package/src/commands/release/ReleaseOptions.d.ts.map +1 -0
- package/src/commands/release/ReleaseOptions.js +2 -0
- package/src/commands/release/index.d.ts +4 -0
- package/src/commands/release/index.d.ts.map +1 -0
- package/src/commands/release/index.js +22 -0
- package/src/commands/release/log.d.ts +2 -0
- package/src/commands/release/log.d.ts.map +1 -0
- package/src/commands/release/log.js +5 -0
- package/src/commands/release/publish.d.ts +3 -0
- package/src/commands/release/publish.d.ts.map +1 -0
- package/src/commands/release/publish.js +18 -0
- package/src/commands/release/release.d.ts +3 -0
- package/src/commands/release/release.d.ts.map +1 -0
- package/src/commands/release/release.js +24 -0
- package/src/commands/release/tag.d.ts +23 -0
- package/src/commands/release/tag.d.ts.map +1 -0
- package/src/commands/release/tag.js +90 -0
- package/src/commands/upgrade/UpgradeOptions.d.ts +4 -0
- package/src/commands/upgrade/UpgradeOptions.d.ts.map +1 -0
- package/src/commands/upgrade/UpgradeOptions.js +2 -0
- package/src/commands/upgrade/index.d.ts +4 -0
- package/src/commands/upgrade/index.d.ts.map +1 -0
- package/src/commands/upgrade/index.js +9 -0
- package/src/commands/upgrade/log.d.ts +2 -0
- package/src/commands/upgrade/log.d.ts.map +1 -0
- package/src/commands/upgrade/log.js +5 -0
- package/src/commands/upgrade/upgrade.d.ts +3 -0
- package/src/commands/upgrade/upgrade.d.ts.map +1 -0
- package/src/commands/upgrade/upgrade.js +11 -0
- package/src/commands/version/VersionOptions.d.ts +8 -0
- package/src/commands/version/VersionOptions.d.ts.map +1 -0
- package/src/commands/version/VersionOptions.js +2 -0
- package/src/commands/version/getPreid.d.ts +2 -0
- package/src/commands/version/getPreid.d.ts.map +1 -0
- package/src/commands/version/getPreid.js +10 -0
- package/src/commands/version/index.d.ts +4 -0
- package/src/commands/version/index.d.ts.map +1 -0
- package/src/commands/version/index.js +12 -0
- package/src/commands/version/log.d.ts +2 -0
- package/src/commands/version/log.d.ts.map +1 -0
- package/src/commands/version/log.js +5 -0
- package/src/commands/version/pimpChangelogs.d.ts +2 -0
- package/src/commands/version/pimpChangelogs.d.ts.map +1 -0
- package/src/commands/version/pimpChangelogs.js +37 -0
- package/src/commands/version/version.d.ts +3 -0
- package/src/commands/version/version.d.ts.map +1 -0
- package/src/commands/version/version.js +33 -0
- package/src/constants.d.ts +4 -0
- package/src/constants.d.ts.map +1 -0
- package/src/constants.js +7 -0
- package/src/index.d.ts +3 -0
- package/src/index.d.ts.map +1 -0
- package/src/index.js +24 -0
- package/src/preAction.d.ts +3 -0
- package/src/preAction.d.ts.map +1 -0
- package/src/preAction.js +81 -0
- package/src/scripts/cmd/cd.d.ts +2 -0
- package/src/scripts/cmd/cd.d.ts.map +1 -0
- package/src/scripts/cmd/cd.js +15 -0
- package/src/scripts/cmd/{executeBash.ts → executeBash.d.ts} +10 -20
- package/src/scripts/cmd/executeBash.d.ts.map +1 -0
- package/src/scripts/cmd/executeBash.js +21 -0
- package/src/scripts/cmd/executeCmd.d.ts +9 -0
- package/src/scripts/cmd/executeCmd.d.ts.map +1 -0
- package/src/scripts/cmd/executeCmd.js +23 -0
- package/src/scripts/cmd/{getBashOutput.ts → getBashOutput.d.ts} +10 -23
- package/src/scripts/cmd/getBashOutput.d.ts.map +1 -0
- package/src/scripts/cmd/getBashOutput.js +19 -0
- package/src/scripts/cmd/getCmdOutput.d.ts +10 -0
- package/src/scripts/cmd/getCmdOutput.d.ts.map +1 -0
- package/src/scripts/cmd/getCmdOutput.js +26 -0
- package/src/scripts/cmd/{index.ts → index.d.ts} +8 -10
- package/src/scripts/cmd/index.d.ts.map +1 -0
- package/src/scripts/cmd/index.js +25 -0
- package/src/scripts/cmd/log.d.ts +2 -0
- package/src/scripts/cmd/log.d.ts.map +1 -0
- package/src/scripts/cmd/log.js +5 -0
- package/src/scripts/cmd/parseArgs.d.ts +3 -0
- package/src/scripts/cmd/parseArgs.d.ts.map +1 -0
- package/src/scripts/cmd/parseArgs.js +41 -0
- package/src/scripts/cmd/parseBashArgs.d.ts +3 -0
- package/src/scripts/cmd/parseBashArgs.d.ts.map +1 -0
- package/src/scripts/cmd/parseBashArgs.js +16 -0
- package/src/scripts/cmd/types.d.ts +12 -0
- package/src/scripts/cmd/types.d.ts.map +1 -0
- package/src/scripts/cmd/types.js +2 -0
- package/src/scripts/filesystem/copyDir.d.ts +9 -0
- package/src/scripts/filesystem/copyDir.d.ts.map +1 -0
- package/src/scripts/filesystem/copyDir.js +26 -0
- package/src/scripts/filesystem/copyFiles.d.ts +11 -0
- package/src/scripts/filesystem/copyFiles.d.ts.map +1 -0
- package/src/scripts/filesystem/copyFiles.js +59 -0
- package/src/scripts/filesystem/findFile.d.ts +2 -0
- package/src/scripts/filesystem/findFile.d.ts.map +1 -0
- package/src/scripts/filesystem/findFile.js +24 -0
- package/src/scripts/filesystem/index.d.ts +10 -0
- package/src/scripts/filesystem/index.d.ts.map +1 -0
- package/src/scripts/filesystem/index.js +17 -0
- package/src/scripts/filesystem/loadJsonFile.d.ts +2 -0
- package/src/scripts/filesystem/loadJsonFile.d.ts.map +1 -0
- package/src/scripts/filesystem/loadJsonFile.js +18 -0
- package/src/scripts/filesystem/log.d.ts +2 -0
- package/src/scripts/filesystem/log.d.ts.map +1 -0
- package/src/scripts/filesystem/log.js +5 -0
- package/src/scripts/filesystem/readDirRecursive.d.ts +2 -0
- package/src/scripts/filesystem/readDirRecursive.d.ts.map +1 -0
- package/src/scripts/filesystem/readDirRecursive.js +16 -0
- package/src/scripts/git/branch/branchDelete.d.ts +6 -0
- package/src/scripts/git/branch/branchDelete.d.ts.map +1 -0
- package/src/scripts/git/branch/branchDelete.js +24 -0
- package/src/scripts/git/branch/branchExists.d.ts +5 -0
- package/src/scripts/git/branch/branchExists.d.ts.map +1 -0
- package/src/scripts/git/branch/branchExists.js +15 -0
- package/src/scripts/git/branch/checkout.d.ts +5 -0
- package/src/scripts/git/branch/checkout.d.ts.map +1 -0
- package/src/scripts/git/branch/checkout.js +15 -0
- package/src/scripts/git/branch/getCurrentBranch.d.ts +11 -0
- package/src/scripts/git/branch/getCurrentBranch.d.ts.map +1 -0
- package/src/scripts/git/branch/getCurrentBranch.js +28 -0
- package/src/scripts/git/clone.d.ts +10 -0
- package/src/scripts/git/clone.d.ts.map +1 -0
- package/src/scripts/git/clone.js +14 -0
- package/src/scripts/git/commit.sh +0 -0
- package/src/scripts/git/getRepo.d.ts +2 -0
- package/src/scripts/git/getRepo.d.ts.map +1 -0
- package/src/scripts/git/getRepo.js +13 -0
- package/src/scripts/git/index.d.ts +29 -0
- package/src/scripts/git/index.d.ts.map +1 -0
- package/src/scripts/git/index.js +40 -0
- package/src/scripts/git/log.d.ts +2 -0
- package/src/scripts/git/log.d.ts.map +1 -0
- package/src/scripts/git/log.js +5 -0
- package/src/scripts/git/openPr.d.ts +2 -0
- package/src/scripts/git/openPr.d.ts.map +1 -0
- package/src/scripts/git/openPr.js +20 -0
- package/src/scripts/git/remoteStatus.d.ts +3 -0
- package/src/scripts/git/remoteStatus.d.ts.map +1 -0
- package/src/scripts/git/remoteStatus.js +22 -0
- package/src/scripts/git/tag/createTag.d.ts +18 -0
- package/src/scripts/git/tag/createTag.d.ts.map +1 -0
- package/src/scripts/git/tag/createTag.js +18 -0
- package/src/scripts/git/tag/deleteTag.d.ts +2 -0
- package/src/scripts/git/tag/deleteTag.d.ts.map +1 -0
- package/src/scripts/git/tag/deleteTag.js +13 -0
- package/src/scripts/git/tag/getTags.d.ts +2 -0
- package/src/scripts/git/tag/getTags.d.ts.map +1 -0
- package/src/scripts/git/tag/getTags.js +8 -0
- package/src/scripts/git/tag/pushAllTags.d.ts +2 -0
- package/src/scripts/git/tag/pushAllTags.d.ts.map +1 -0
- package/src/scripts/git/tag/pushAllTags.js +8 -0
- package/src/scripts/git/tag/renameTag.d.ts +2 -0
- package/src/scripts/git/tag/renameTag.d.ts.map +1 -0
- package/src/scripts/git/tag/renameTag.js +14 -0
- package/src/scripts/lerna/changed.d.ts +3 -0
- package/src/scripts/lerna/changed.d.ts.map +1 -0
- package/src/scripts/lerna/changed.js +13 -0
- package/src/scripts/lerna/constants.d.ts +5 -0
- package/src/scripts/lerna/constants.d.ts.map +1 -0
- package/src/scripts/lerna/constants.js +7 -0
- package/src/scripts/lerna/filterByDependency.d.ts +7 -0
- package/src/scripts/lerna/filterByDependency.d.ts.map +1 -0
- package/src/scripts/lerna/filterByDependency.js +18 -0
- package/src/scripts/lerna/getConfig.d.ts +3 -0
- package/src/scripts/lerna/getConfig.d.ts.map +1 -0
- package/src/scripts/lerna/getConfig.js +13 -0
- package/src/scripts/lerna/getDependencies.d.ts +9 -0
- package/src/scripts/lerna/getDependencies.d.ts.map +1 -0
- package/src/scripts/lerna/getDependencies.js +23 -0
- package/src/scripts/lerna/getDetails.d.ts +3 -0
- package/src/scripts/lerna/getDetails.d.ts.map +1 -0
- package/src/scripts/lerna/getDetails.js +38 -0
- package/src/scripts/lerna/index.d.ts +14 -0
- package/src/scripts/lerna/index.d.ts.map +1 -0
- package/src/scripts/lerna/index.js +19 -0
- package/src/scripts/lerna/log.d.ts +2 -0
- package/src/scripts/lerna/log.d.ts.map +1 -0
- package/src/scripts/lerna/log.js +5 -0
- package/src/scripts/lerna/publish.sh +0 -0
- package/src/scripts/lerna/types.d.ts +62 -0
- package/src/scripts/lerna/types.d.ts.map +1 -0
- package/src/scripts/lerna/types.js +2 -0
- package/src/scripts/lerna/version.sh +1 -1
- package/src/utils/chalk.d.ts +4 -0
- package/src/utils/chalk.d.ts.map +1 -0
- package/src/utils/chalk.js +9 -0
- package/src/utils/common.d.ts +8 -0
- package/src/utils/common.d.ts.map +1 -0
- package/src/utils/common.js +21 -0
- package/src/utils/{index.ts → index.d.ts} +4 -3
- package/src/utils/index.d.ts.map +1 -0
- package/src/utils/index.js +19 -0
- package/src/utils/inquirer.d.ts +5 -0
- package/src/utils/inquirer.d.ts.map +1 -0
- package/src/utils/inquirer.js +21 -0
- package/src/utils/logger.d.ts +9 -0
- package/src/utils/logger.d.ts.map +1 -0
- package/src/utils/logger.js +36 -0
- package/CHANGELOG.md +0 -628
- package/README.md +0 -11
- package/src/GlobalOptions.ts +0 -8
- package/src/commands/blank/BlankOptions.ts +0 -3
- package/src/commands/blank/blank.ts +0 -6
- package/src/commands/blank/index.ts +0 -8
- package/src/commands/blank/log.ts +0 -3
- package/src/commands/build/BuildOptions.ts +0 -3
- package/src/commands/build/build.ts +0 -24
- package/src/commands/build/index.ts +0 -8
- package/src/commands/build/log.ts +0 -3
- package/src/commands/deinstall/DeinstallOptions.ts +0 -3
- package/src/commands/deinstall/deinstall.ts +0 -19
- package/src/commands/deinstall/index.ts +0 -11
- package/src/commands/deinstall/log.ts +0 -3
- package/src/commands/deploy/DeployOptions.ts +0 -6
- package/src/commands/deploy/deploy.ts +0 -39
- package/src/commands/deploy/deployIos.ts +0 -48
- package/src/commands/deploy/index.ts +0 -20
- package/src/commands/deploy/log.ts +0 -3
- package/src/commands/deploy/setSsr.ts +0 -25
- package/src/commands/dev/DevOptions.ts +0 -4
- package/src/commands/dev/dev.ts +0 -15
- package/src/commands/dev/devIos.ts +0 -23
- package/src/commands/dev/index.ts +0 -12
- package/src/commands/dev/log.ts +0 -3
- package/src/commands/generate/GenerateOptions.ts +0 -9
- package/src/commands/generate/generate.ts +0 -29
- package/src/commands/generate/generateCommand.ts +0 -46
- package/src/commands/generate/generateProject.ts +0 -115
- package/src/commands/generate/index.ts +0 -19
- package/src/commands/generate/log.ts +0 -3
- package/src/commands/index.ts +0 -21
- package/src/commands/reinstall/ReinstallOptions.ts +0 -3
- package/src/commands/reinstall/index.ts +0 -11
- package/src/commands/reinstall/log.ts +0 -3
- package/src/commands/reinstall/reinstall.ts +0 -13
- package/src/commands/release/ReleaseOptions.ts +0 -8
- package/src/commands/release/index.ts +0 -40
- package/src/commands/release/log.ts +0 -3
- package/src/commands/release/publish.ts +0 -18
- package/src/commands/release/release.ts +0 -24
- package/src/commands/release/tag.ts +0 -119
- package/src/commands/upgrade/UpgradeOptions.ts +0 -3
- package/src/commands/upgrade/index.ts +0 -10
- package/src/commands/upgrade/log.ts +0 -3
- package/src/commands/upgrade/upgrade.ts +0 -10
- package/src/commands/version/VersionOptions.ts +0 -7
- package/src/commands/version/getPreid.ts +0 -7
- package/src/commands/version/index.ts +0 -18
- package/src/commands/version/log.ts +0 -3
- package/src/commands/version/pimpChangelogs.ts +0 -43
- package/src/commands/version/version.ts +0 -33
- package/src/constants.ts +0 -5
- package/src/index.ts +0 -24
- package/src/preAction.ts +0 -93
- package/src/scripts/cmd/cd.ts +0 -9
- package/src/scripts/cmd/executeCmd.ts +0 -23
- package/src/scripts/cmd/getCmdOutput.ts +0 -26
- package/src/scripts/cmd/log.ts +0 -3
- package/src/scripts/cmd/parseArgs.ts +0 -44
- package/src/scripts/cmd/parseBashArgs.ts +0 -21
- package/src/scripts/cmd/types.ts +0 -13
- package/src/scripts/filesystem/copyDir.ts +0 -29
- package/src/scripts/filesystem/copyFiles.ts +0 -75
- package/src/scripts/filesystem/findFile.ts +0 -29
- package/src/scripts/filesystem/index.ts +0 -15
- package/src/scripts/filesystem/loadJsonFile.ts +0 -17
- package/src/scripts/filesystem/log.ts +0 -3
- package/src/scripts/filesystem/readDirRecursive.ts +0 -21
- package/src/scripts/git/branch/branchDelete.ts +0 -32
- package/src/scripts/git/branch/branchExists.ts +0 -14
- package/src/scripts/git/branch/checkout.ts +0 -19
- package/src/scripts/git/branch/getCurrentBranch.ts +0 -37
- package/src/scripts/git/clone.ts +0 -20
- package/src/scripts/git/getRepo.ts +0 -11
- package/src/scripts/git/index.ts +0 -44
- package/src/scripts/git/log.ts +0 -3
- package/src/scripts/git/openPr.ts +0 -21
- package/src/scripts/git/remoteStatus.ts +0 -28
- package/src/scripts/git/tag/createTag.ts +0 -28
- package/src/scripts/git/tag/deleteTag.ts +0 -11
- package/src/scripts/git/tag/getTags.ts +0 -6
- package/src/scripts/git/tag/pushAllTags.ts +0 -6
- package/src/scripts/git/tag/renameTag.ts +0 -12
- package/src/scripts/lerna/changed.ts +0 -11
- package/src/scripts/lerna/constants.ts +0 -6
- package/src/scripts/lerna/filterByDependency.ts +0 -21
- package/src/scripts/lerna/getConfig.ts +0 -12
- package/src/scripts/lerna/getDependencies.ts +0 -25
- package/src/scripts/lerna/getDetails.ts +0 -44
- package/src/scripts/lerna/index.ts +0 -18
- package/src/scripts/lerna/log.ts +0 -3
- package/src/scripts/lerna/types.ts +0 -64
- package/src/utils/chalk.ts +0 -4
- package/src/utils/common.ts +0 -16
- package/src/utils/inquirer.ts +0 -20
- package/src/utils/logger.ts +0 -51
- package/tsconfig.json +0 -28
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const commander_1 = require("commander");
|
|
4
|
+
const dev_1 = require("./dev");
|
|
5
|
+
exports.default = new commander_1.Command()
|
|
6
|
+
.name("dev")
|
|
7
|
+
.description("Description of command.")
|
|
8
|
+
.option("-h, --host", "Run nuxt dev server exposed to the local network.")
|
|
9
|
+
.option("--ios", "Run dev for ios. Runs nuxt dev host and deploys to ios device with server url.")
|
|
10
|
+
.action(dev_1.dev);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../../src/commands/dev/log.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG,4BAAgB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const generateTypes: readonly ["project", "package", "command"];
|
|
2
|
+
export type GenerateType = (typeof generateTypes)[number];
|
|
3
|
+
export interface GenerateOptions {
|
|
4
|
+
starter?: string;
|
|
5
|
+
noRepo?: boolean;
|
|
6
|
+
keepHistory?: boolean;
|
|
7
|
+
yes: boolean;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=GenerateOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GenerateOptions.d.ts","sourceRoot":"","sources":["../../../../src/commands/generate/GenerateOptions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,4CAA6C,CAAC;AACxE,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,GAAG,EAAE,OAAO,CAAC;CACd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../../src/commands/generate/generate.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,YAAY,EAEb,MAAM,mBAAmB,CAAC;AAO3B,eAAO,MAAM,QAAQ,GACnB,MAAM,YAAY,EAClB,MAAM,MAAM,EACZ,SAAS,eAAe,kBAczB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generate = void 0;
|
|
4
|
+
const GenerateOptions_1 = require("./GenerateOptions");
|
|
5
|
+
const log_1 = require("./log");
|
|
6
|
+
const generateCommand_1 = require("./generateCommand");
|
|
7
|
+
const generateProject_1 = require("./generateProject");
|
|
8
|
+
const cwd = process.cwd();
|
|
9
|
+
const generate = async (type, name, options) => {
|
|
10
|
+
if (!GenerateOptions_1.generateTypes.includes(type)) {
|
|
11
|
+
log_1.log.error("Invalid type. Nothing to generate.");
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
log_1.log.info("Generating", type, name);
|
|
15
|
+
if (type === "command") {
|
|
16
|
+
await (0, generateCommand_1.generateCommand)(name, cwd);
|
|
17
|
+
}
|
|
18
|
+
else if (type === "project") {
|
|
19
|
+
await (0, generateProject_1.generateProject)(name, cwd, options);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.generate = generate;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateCommand.d.ts","sourceRoot":"","sources":["../../../../src/commands/generate/generateCommand.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe,GAAU,MAAM,MAAM,EAAE,KAAK,MAAM,kBAwC9D,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateCommand = void 0;
|
|
4
|
+
const filesystem_1 = require("../../scripts/filesystem");
|
|
5
|
+
const log_1 = require("./log");
|
|
6
|
+
const path_1 = require("path");
|
|
7
|
+
const common_1 = require("../../utils/common");
|
|
8
|
+
const generateCommand = async (name, cwd) => {
|
|
9
|
+
if (!cwd.includes("packages/cli")) {
|
|
10
|
+
log_1.log.error("You must be in the packages/cli directory to generate a command.");
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
filesystem_1.filesystem.copyDir((0, path_1.join)(cwd, "src/commands/blank"), (0, path_1.join)(cwd, `src/commands/${name}`), (file) => {
|
|
14
|
+
const content = file.content
|
|
15
|
+
.replaceAll("blank", name)
|
|
16
|
+
.replaceAll("Blank", (0, common_1.capitalize)(name));
|
|
17
|
+
const base = file.base
|
|
18
|
+
.replaceAll("blank", name)
|
|
19
|
+
.replaceAll("Blank", (0, common_1.capitalize)(name));
|
|
20
|
+
return {
|
|
21
|
+
...file,
|
|
22
|
+
content,
|
|
23
|
+
base,
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
await filesystem_1.filesystem.copyFiles([(0, path_1.join)(cwd, "src/commands/index.ts")], (file) => {
|
|
27
|
+
const content = file.content
|
|
28
|
+
.replace("\n\nexport default", `\nimport ${name} from "./${name}";\n\nexport default`)
|
|
29
|
+
.replace("];\n", ` ${name},\n];\n`);
|
|
30
|
+
return {
|
|
31
|
+
...file,
|
|
32
|
+
content,
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
exports.generateCommand = generateCommand;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateProject.d.ts","sourceRoot":"","sources":["../../../../src/commands/generate/generateProject.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,eAAO,MAAM,eAAe,GAC1B,MAAM,MAAM,EACZ,KAAK,MAAM,EACX,SAAS,eAAe,kBAuGzB,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateProject = void 0;
|
|
4
|
+
const filesystem_1 = require("../../scripts/filesystem");
|
|
5
|
+
const git_1 = require("../../scripts/git");
|
|
6
|
+
const log_1 = require("./log");
|
|
7
|
+
const common_1 = require("../../utils/common");
|
|
8
|
+
const cmd_1 = require("../../scripts/cmd");
|
|
9
|
+
const utils_1 = require("../../utils");
|
|
10
|
+
const generateProject = async (name, cwd, options) => {
|
|
11
|
+
const { starter = "base", noRepo, keepHistory, yes } = options;
|
|
12
|
+
log_1.log.verbose("Check if project name is valid");
|
|
13
|
+
if (!name.match(/^[a-z0-9-]+$/)) {
|
|
14
|
+
log_1.log.error("Project name must be lowercase, alphanumeric, and contain hyphens only.");
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
if (!noRepo) {
|
|
18
|
+
// Check if gh is installed
|
|
19
|
+
if ((0, cmd_1.executeCmd)("gh --version").status !== 0) {
|
|
20
|
+
const installGh = await (0, utils_1.confirmQuestion)("GitHub cli is not installed. Do you want to install it now? (brew install gh)", yes);
|
|
21
|
+
if (installGh) {
|
|
22
|
+
(0, cmd_1.executeCmd)("brew install gh");
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
log_1.log.error("You must have GitHub cli installed to generate a project and create a repo.");
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
// Check if gh user is authenticated
|
|
30
|
+
if ((0, cmd_1.executeCmd)("gh auth status").status !== 0) {
|
|
31
|
+
const authenticateGh = await (0, utils_1.confirmQuestion)("GitHub cli is not authenticated. Do you want to authenticate now? (gh auth login)", yes);
|
|
32
|
+
if (authenticateGh) {
|
|
33
|
+
(0, cmd_1.executeCmd)("gh auth login");
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
log_1.log.error("You must authenticate with GitHub cli before generating a project in order to create the repo.");
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
log_1.log.verbose("Skipping gh verification");
|
|
43
|
+
}
|
|
44
|
+
log_1.log.verbose("Cloning gluhar project template");
|
|
45
|
+
git_1.git.clone("gluharry/starters", name, { branch: starter });
|
|
46
|
+
cmd_1.cmd.cd(name);
|
|
47
|
+
log_1.log.verbose("Replacing gluhar-app with project's name");
|
|
48
|
+
await filesystem_1.filesystem.copyFiles([
|
|
49
|
+
"./package.json",
|
|
50
|
+
"./README.md",
|
|
51
|
+
"./nuxt.config.ts",
|
|
52
|
+
"./sanity/sanity.config.ts",
|
|
53
|
+
"./sanity/structure.ts",
|
|
54
|
+
], (file) => {
|
|
55
|
+
const content = file.content.replaceAll("gluhar-app", name);
|
|
56
|
+
return {
|
|
57
|
+
...file,
|
|
58
|
+
content,
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
if (!keepHistory) {
|
|
62
|
+
log_1.log.verbose("Removing git history");
|
|
63
|
+
(0, cmd_1.executeCmd)("rm -rf .git");
|
|
64
|
+
log_1.log.verbose("Initializing empty git repo with initial flat commit");
|
|
65
|
+
(0, cmd_1.executeCmd)("git init --initial-branch=dev && git add . && git commit -m 'Initial commit'");
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
log_1.log.verbose("Keeping git history and removing remote origin");
|
|
69
|
+
(0, cmd_1.executeCmd)("git remote remove origin && git branch -m dev");
|
|
70
|
+
}
|
|
71
|
+
if (!noRepo) {
|
|
72
|
+
log_1.log.verbose("Creating new github remote repo");
|
|
73
|
+
(0, cmd_1.executeCmd)(`gh repo create ${name} --private --source=. --push`);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
log_1.log.verbose("Skipping repo creation and deleting .git. You are on your own.");
|
|
77
|
+
(0, cmd_1.executeCmd)("rm -rf .git");
|
|
78
|
+
}
|
|
79
|
+
const openCode = await (0, utils_1.confirmQuestion)(`Project '${name}' was created successfully! Do you want to open it in VSCode/Cursor?`, yes);
|
|
80
|
+
if (openCode) {
|
|
81
|
+
const editorCommand = (0, common_1.commandExists)("cursor") ? "cursor" : "code";
|
|
82
|
+
(0, cmd_1.executeCmd)(`${editorCommand} . -g README.md`);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
exports.generateProject = generateProject;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/generate/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;;AAIpC,wBAcoB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const commander_1 = require("commander");
|
|
4
|
+
const generate_1 = require("./generate");
|
|
5
|
+
const GenerateOptions_1 = require("./GenerateOptions");
|
|
6
|
+
exports.default = new commander_1.Command()
|
|
7
|
+
.name("generate")
|
|
8
|
+
.argument("<type>", "What to generate.")
|
|
9
|
+
.argument("<name>", "Name of generated thing.")
|
|
10
|
+
.description(`Generate a ${GenerateOptions_1.generateTypes.join(", ")}.`)
|
|
11
|
+
.option("--starter <branchName>", "When generating a project, which starter template to use: base, mobile.")
|
|
12
|
+
.option("-nr, --no-repo", "Do not create a github repo automatically.")
|
|
13
|
+
.option("-kh, --keep-history", "Keep commit history from the starter template.")
|
|
14
|
+
.action(generate_1.generate);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../../src/commands/generate/log.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG,4BAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":";AAUA,wBAUE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const build_1 = __importDefault(require("./build"));
|
|
7
|
+
const deinstall_1 = __importDefault(require("./deinstall"));
|
|
8
|
+
const deploy_1 = __importDefault(require("./deploy"));
|
|
9
|
+
const generate_1 = __importDefault(require("./generate"));
|
|
10
|
+
const reinstall_1 = __importDefault(require("./reinstall"));
|
|
11
|
+
const release_1 = __importDefault(require("./release"));
|
|
12
|
+
const version_1 = __importDefault(require("./version"));
|
|
13
|
+
const upgrade_1 = __importDefault(require("./upgrade"));
|
|
14
|
+
const dev_1 = __importDefault(require("./dev"));
|
|
15
|
+
exports.default = [
|
|
16
|
+
deploy_1.default,
|
|
17
|
+
version_1.default,
|
|
18
|
+
release_1.default,
|
|
19
|
+
build_1.default,
|
|
20
|
+
deinstall_1.default,
|
|
21
|
+
reinstall_1.default,
|
|
22
|
+
generate_1.default,
|
|
23
|
+
upgrade_1.default,
|
|
24
|
+
dev_1.default,
|
|
25
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReinstallOptions.d.ts","sourceRoot":"","sources":["../../../../src/commands/reinstall/ReinstallOptions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/reinstall/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;;AAGpC,wBAOqB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const commander_1 = require("commander");
|
|
4
|
+
const reinstall_1 = require("./reinstall");
|
|
5
|
+
exports.default = new commander_1.Command()
|
|
6
|
+
.name("reinstall")
|
|
7
|
+
.description("Reinstall npm dependencies with a fresh package-lock.json.")
|
|
8
|
+
.option("-p, --packages", "Reinstall dependencies in when using multiple packages (monorepo).")
|
|
9
|
+
.action(reinstall_1.reinstall);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../../src/commands/reinstall/log.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG,4BAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reinstall.d.ts","sourceRoot":"","sources":["../../../../src/commands/reinstall/reinstall.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAItD,eAAO,MAAM,SAAS,GAAI,SAAS,gBAAgB,SAOlD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.reinstall = void 0;
|
|
4
|
+
const cmd_1 = require("../../scripts/cmd");
|
|
5
|
+
const log_1 = require("./log");
|
|
6
|
+
const deinstall_1 = require("../deinstall/deinstall");
|
|
7
|
+
const reinstall = (options) => {
|
|
8
|
+
// Run deinstall first
|
|
9
|
+
(0, deinstall_1.deinstall)(options);
|
|
10
|
+
// Install dependencies
|
|
11
|
+
log_1.log.info("Reinstalling packages.");
|
|
12
|
+
(0, cmd_1.executeCmd)("npm install");
|
|
13
|
+
};
|
|
14
|
+
exports.reinstall = reinstall;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReleaseOptions.d.ts","sourceRoot":"","sources":["../../../../src/commands/release/ReleaseOptions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,OAAO,GAAG,MAAM,CAAC;IACtB,GAAG,EAAE,OAAO,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/release/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;;AAIpC,wBAmCmB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const commander_1 = require("commander");
|
|
4
|
+
const release_1 = require("./release");
|
|
5
|
+
const tag_1 = require("./tag");
|
|
6
|
+
exports.default = new commander_1.Command()
|
|
7
|
+
.name("release")
|
|
8
|
+
.description("Release and publish packages to the npm registry.")
|
|
9
|
+
.option("-y, --yes", "When run with this flag, we will skip all confirmation prompts. NOTE does not currently work.", false)
|
|
10
|
+
.option("--pre [id]", "Prerelease identifier. Use this when releasing a prerelease version.", false)
|
|
11
|
+
.option("-d, --dev", "Release a dev version. This is a shorthand for a prerelease with a 'dev' identifier.", false)
|
|
12
|
+
.option("--dir, --directory <path>", "Subdirectory to publish. Must apply to ALL packages, and MUST contain a package.json file.", "dist")
|
|
13
|
+
.option("--no-version", "Disable versioning and changelog gen.")
|
|
14
|
+
.option("--git-tag [tag]", [
|
|
15
|
+
"Create and push git tag(s). Optionally provide a template.",
|
|
16
|
+
"Template placeholders:",
|
|
17
|
+
`"${tag_1.pattern.fullPackageName}" (full package name, e.g. "@gluhar/cli"),`,
|
|
18
|
+
`"${tag_1.pattern.shortPackageName}" (short package name, e.g. "cli"),`,
|
|
19
|
+
`"${tag_1.pattern.version}" (released package version, e.g. "1.2.3").`,
|
|
20
|
+
`When set to "true" defaults to: "${tag_1.pattern.default.independent}" for independent versioning and "${tag_1.pattern.default.fixed}" for fixed.`,
|
|
21
|
+
].join("\n"))
|
|
22
|
+
.action(release_1.release);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../../src/commands/release/log.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG,4BAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../../../src/commands/release/publish.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIvD,eAAO,MAAM,OAAO,GAAI,SAAS,cAAc,SAY9C,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.publish = void 0;
|
|
4
|
+
const lerna_1 = require("../../scripts/lerna");
|
|
5
|
+
const log_1 = require("./log");
|
|
6
|
+
const getPreid_1 = require("../version/getPreid");
|
|
7
|
+
const publish = (options) => {
|
|
8
|
+
const { yes, pre, dev, directory } = options;
|
|
9
|
+
const distTag = dev ? "dev" : (0, getPreid_1.getPreid)(pre) ?? "latest";
|
|
10
|
+
log_1.log.info("Dist tag:", distTag);
|
|
11
|
+
log_1.log.info("Directory:", directory);
|
|
12
|
+
lerna_1.lerna.publish({
|
|
13
|
+
distTag,
|
|
14
|
+
contents: directory,
|
|
15
|
+
yes,
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
exports.publish = publish;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../../src/commands/release/release.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKvD,eAAO,MAAM,OAAO,GAAU,SAAS,cAAc,kBAiBpD,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.release = void 0;
|
|
4
|
+
const version_1 = require("../version/version");
|
|
5
|
+
const log_1 = require("./log");
|
|
6
|
+
const publish_1 = require("./publish");
|
|
7
|
+
const tag_1 = require("./tag");
|
|
8
|
+
const release = async (options) => {
|
|
9
|
+
log_1.log.info("Initiating release...");
|
|
10
|
+
const { pre, dev, yes } = options;
|
|
11
|
+
if (yes)
|
|
12
|
+
log_1.log.info("and saying yes to all prompts.");
|
|
13
|
+
if (options.version)
|
|
14
|
+
await (0, version_1.version)({
|
|
15
|
+
pre,
|
|
16
|
+
dev,
|
|
17
|
+
yes,
|
|
18
|
+
changelog: !dev,
|
|
19
|
+
commit: "chore: Releasing gluhar packages.",
|
|
20
|
+
});
|
|
21
|
+
(0, publish_1.publish)(options);
|
|
22
|
+
await (0, tag_1.tag)(options);
|
|
23
|
+
};
|
|
24
|
+
exports.release = release;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ReleaseOptions } from "./ReleaseOptions";
|
|
2
|
+
export declare const pattern: {
|
|
3
|
+
/** e.g. `@gluhar/cli` */
|
|
4
|
+
fullPackageName: string;
|
|
5
|
+
/** e.g. `cli` */
|
|
6
|
+
shortPackageName: string;
|
|
7
|
+
/** e.g. `1.2.3` */
|
|
8
|
+
version: string;
|
|
9
|
+
default: {
|
|
10
|
+
/** e.g. `cli/v1.2.3` */
|
|
11
|
+
independent: string;
|
|
12
|
+
/** e.g. `v1.2.3` */
|
|
13
|
+
fixed: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export interface PackageInfo {
|
|
17
|
+
/** Required for independent versioning. */
|
|
18
|
+
name?: string;
|
|
19
|
+
version: string;
|
|
20
|
+
}
|
|
21
|
+
export declare const parsePattern: (tagPattern: string, pkg: PackageInfo) => string;
|
|
22
|
+
export declare const tag: (options: ReleaseOptions) => Promise<void>;
|
|
23
|
+
//# sourceMappingURL=tag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../../../src/commands/release/tag.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGvD,eAAO,MAAM,OAAO;IAClB,yBAAyB;;IAEzB,iBAAiB;;IAEjB,mBAAmB;;;QAGjB,wBAAwB;;QAExB,oBAAoB;;;CAGvB,CAAC;AAiBF,MAAM,WAAW,WAAW;IAC1B,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,YAAY,GAAI,YAAY,MAAM,EAAE,KAAK,WAAW,KAAG,MAyBnE,CAAC;AAEF,eAAO,MAAM,GAAG,GAAU,SAAS,cAAc,kBAgDhD,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.tag = exports.parsePattern = exports.pattern = void 0;
|
|
4
|
+
const lerna_1 = require("../../scripts/lerna");
|
|
5
|
+
const constants_1 = require("../../scripts/lerna/constants");
|
|
6
|
+
const git_1 = require("../../scripts/git");
|
|
7
|
+
const utils_1 = require("../../utils");
|
|
8
|
+
const log_1 = require("./log");
|
|
9
|
+
exports.pattern = {
|
|
10
|
+
/** e.g. `@gluhar/cli` */
|
|
11
|
+
fullPackageName: "%f",
|
|
12
|
+
/** e.g. `cli` */
|
|
13
|
+
shortPackageName: "%s",
|
|
14
|
+
/** e.g. `1.2.3` */
|
|
15
|
+
version: "%v",
|
|
16
|
+
default: {
|
|
17
|
+
/** e.g. `cli/v1.2.3` */
|
|
18
|
+
independent: "%f@%v",
|
|
19
|
+
/** e.g. `v1.2.3` */
|
|
20
|
+
fixed: "v%v",
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
const getGitTagPattern = (gitTag, isIndependent) => {
|
|
24
|
+
if (typeof gitTag === "string") {
|
|
25
|
+
return gitTag;
|
|
26
|
+
}
|
|
27
|
+
if (!gitTag) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
return isIndependent ? exports.pattern.default.independent : exports.pattern.default.fixed;
|
|
31
|
+
};
|
|
32
|
+
const parsePattern = (tagPattern, pkg) => {
|
|
33
|
+
const { name: fullName, version } = pkg;
|
|
34
|
+
const placeholders = [
|
|
35
|
+
{
|
|
36
|
+
pattern: exports.pattern.version,
|
|
37
|
+
value: version,
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
if (fullName) {
|
|
41
|
+
const shortName = fullName.substring(fullName.indexOf("/") + 1);
|
|
42
|
+
placeholders.push({
|
|
43
|
+
pattern: exports.pattern.fullPackageName,
|
|
44
|
+
value: fullName,
|
|
45
|
+
});
|
|
46
|
+
placeholders.push({
|
|
47
|
+
pattern: exports.pattern.shortPackageName,
|
|
48
|
+
value: shortName,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
return placeholders.reduce((t, ph) => t.replaceAll(ph.pattern, ph.value), tagPattern);
|
|
52
|
+
};
|
|
53
|
+
exports.parsePattern = parsePattern;
|
|
54
|
+
const tag = async (options) => {
|
|
55
|
+
const { gitTag, yes } = options;
|
|
56
|
+
if (!gitTag) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const lernaConfig = lerna_1.lerna.getConfig();
|
|
60
|
+
const isIndependent = !!lernaConfig && lernaConfig.version === constants_1.INDEPENDENT_VERSION;
|
|
61
|
+
const tagPattern = getGitTagPattern(gitTag, isIndependent);
|
|
62
|
+
if (!tagPattern) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const tags = new Set();
|
|
66
|
+
if (!lernaConfig ||
|
|
67
|
+
isIndependent ||
|
|
68
|
+
tagPattern.includes(exports.pattern.fullPackageName) ||
|
|
69
|
+
tagPattern.includes(exports.pattern.shortPackageName)) {
|
|
70
|
+
lerna_1.lerna
|
|
71
|
+
.changed()
|
|
72
|
+
.filter((pkg) => !pkg.private)
|
|
73
|
+
.map((pkg) => (0, exports.parsePattern)(tagPattern, pkg))
|
|
74
|
+
.forEach((t) => tags.add(t));
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
const t = (0, exports.parsePattern)(tagPattern, { version: lernaConfig.version });
|
|
78
|
+
tags.add(t);
|
|
79
|
+
}
|
|
80
|
+
const tagList = [...tags].map((t) => `\n - ${t}`).join("");
|
|
81
|
+
log_1.log.verbose("Tags to create:", tagList);
|
|
82
|
+
const confirm = await (0, utils_1.confirmQuestion)(`Create and push tag(s): ${tagList}. Confirm?`, yes);
|
|
83
|
+
if (confirm) {
|
|
84
|
+
tags.forEach((t) => {
|
|
85
|
+
git_1.git.tag.create(t);
|
|
86
|
+
});
|
|
87
|
+
git_1.git.tag.pushAll();
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
exports.tag = tag;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UpgradeOptions.d.ts","sourceRoot":"","sources":["../../../../src/commands/upgrade/UpgradeOptions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;CAClB"}
|