@gluhar/cli 3.0.0 → 3.0.2
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/CHANGELOG.md +628 -0
- package/README.md +11 -0
- package/package.json +46 -46
- package/src/GlobalOptions.ts +8 -0
- package/src/commands/blank/BlankOptions.ts +3 -0
- package/src/commands/blank/blank.ts +6 -0
- package/src/commands/blank/index.ts +8 -0
- package/src/commands/blank/log.ts +3 -0
- package/src/commands/build/BuildOptions.ts +3 -0
- package/src/commands/build/build.ts +24 -0
- package/src/commands/build/index.ts +8 -0
- package/src/commands/build/log.ts +3 -0
- package/src/commands/deinstall/DeinstallOptions.ts +3 -0
- package/src/commands/deinstall/deinstall.ts +19 -0
- package/src/commands/deinstall/index.ts +11 -0
- package/src/commands/deinstall/log.ts +3 -0
- package/src/commands/deploy/DeployOptions.ts +6 -0
- package/src/commands/deploy/deploy.ts +39 -0
- package/src/commands/deploy/deployIos.ts +48 -0
- package/src/commands/deploy/index.ts +20 -0
- package/src/commands/deploy/log.ts +3 -0
- package/src/commands/deploy/setSsr.ts +25 -0
- package/src/commands/dev/DevOptions.ts +4 -0
- package/src/commands/dev/dev.ts +15 -0
- package/src/commands/dev/devIos.ts +23 -0
- package/src/commands/dev/index.ts +12 -0
- package/src/commands/dev/log.ts +3 -0
- package/src/commands/generate/GenerateOptions.ts +9 -0
- package/src/commands/generate/generate.ts +29 -0
- package/src/commands/generate/generateCommand.ts +46 -0
- package/src/commands/generate/generateProject.ts +115 -0
- package/src/commands/generate/index.ts +19 -0
- package/src/commands/generate/log.ts +3 -0
- package/src/commands/index.ts +21 -0
- package/src/commands/reinstall/ReinstallOptions.ts +3 -0
- package/src/commands/reinstall/index.ts +11 -0
- package/src/commands/reinstall/log.ts +3 -0
- package/src/commands/reinstall/reinstall.ts +13 -0
- package/src/commands/release/ReleaseOptions.ts +8 -0
- package/src/commands/release/index.ts +40 -0
- package/src/commands/release/log.ts +3 -0
- package/src/commands/release/publish.ts +18 -0
- package/src/commands/release/release.ts +24 -0
- package/src/commands/release/tag.ts +119 -0
- package/src/commands/upgrade/UpgradeOptions.ts +3 -0
- package/src/commands/upgrade/index.ts +10 -0
- package/src/commands/upgrade/log.ts +3 -0
- package/src/commands/upgrade/upgrade.ts +10 -0
- package/src/commands/version/VersionOptions.ts +7 -0
- package/src/commands/version/getPreid.ts +7 -0
- package/src/commands/version/index.ts +18 -0
- package/src/commands/version/log.ts +3 -0
- package/src/commands/version/pimpChangelogs.ts +43 -0
- package/src/commands/version/version.ts +33 -0
- package/src/constants.ts +5 -0
- package/src/index.ts +24 -0
- package/src/preAction.ts +93 -0
- package/src/scripts/cmd/cd.ts +9 -0
- package/src/scripts/cmd/{executeBash.d.ts → executeBash.ts} +20 -10
- package/src/scripts/cmd/executeCmd.ts +23 -0
- package/src/scripts/cmd/{getBashOutput.d.ts → getBashOutput.ts} +23 -10
- package/src/scripts/cmd/getCmdOutput.ts +26 -0
- package/src/scripts/cmd/{index.d.ts → index.ts} +10 -8
- package/src/scripts/cmd/log.ts +3 -0
- package/src/scripts/cmd/parseArgs.ts +44 -0
- package/src/scripts/cmd/parseBashArgs.ts +21 -0
- package/src/scripts/cmd/types.ts +13 -0
- package/src/scripts/filesystem/copyDir.ts +29 -0
- package/src/scripts/filesystem/copyFiles.ts +75 -0
- package/src/scripts/filesystem/findFile.ts +29 -0
- package/src/scripts/filesystem/index.ts +15 -0
- package/src/scripts/filesystem/loadJsonFile.ts +17 -0
- package/src/scripts/filesystem/log.ts +3 -0
- package/src/scripts/filesystem/readDirRecursive.ts +21 -0
- package/src/scripts/git/branch/branchDelete.ts +32 -0
- package/src/scripts/git/branch/branchExists.ts +14 -0
- package/src/scripts/git/branch/checkout.ts +19 -0
- package/src/scripts/git/branch/getCurrentBranch.ts +37 -0
- package/src/scripts/git/clone.ts +20 -0
- package/src/scripts/git/commit.sh +0 -0
- package/src/scripts/git/getRepo.ts +11 -0
- package/src/scripts/git/index.ts +44 -0
- package/src/scripts/git/log.ts +3 -0
- package/src/scripts/git/openPr.ts +21 -0
- package/src/scripts/git/remoteStatus.ts +28 -0
- package/src/scripts/git/tag/createTag.ts +28 -0
- package/src/scripts/git/tag/deleteTag.ts +11 -0
- package/src/scripts/git/tag/getTags.ts +6 -0
- package/src/scripts/git/tag/pushAllTags.ts +6 -0
- package/src/scripts/git/tag/renameTag.ts +12 -0
- package/src/scripts/lerna/changed.ts +11 -0
- package/src/scripts/lerna/constants.ts +6 -0
- package/src/scripts/lerna/filterByDependency.ts +21 -0
- package/src/scripts/lerna/getConfig.ts +12 -0
- package/src/scripts/lerna/getDependencies.ts +25 -0
- package/src/scripts/lerna/getDetails.ts +44 -0
- package/src/scripts/lerna/index.ts +18 -0
- package/src/scripts/lerna/log.ts +3 -0
- package/src/scripts/lerna/publish.sh +0 -0
- package/src/scripts/lerna/types.ts +64 -0
- package/src/scripts/lerna/version.sh +1 -1
- package/src/utils/chalk.ts +4 -0
- package/src/utils/common.ts +16 -0
- package/src/utils/{index.d.ts → index.ts} +3 -4
- package/src/utils/inquirer.ts +20 -0
- package/src/utils/logger.ts +51 -0
- package/tsconfig.json +28 -0
- package/src/GlobalOptions.d.ts +0 -8
- package/src/GlobalOptions.d.ts.map +0 -1
- package/src/GlobalOptions.js +0 -2
- package/src/commands/blank/BlankOptions.d.ts +0 -4
- package/src/commands/blank/BlankOptions.d.ts.map +0 -1
- package/src/commands/blank/BlankOptions.js +0 -2
- package/src/commands/blank/blank.d.ts +0 -3
- package/src/commands/blank/blank.d.ts.map +0 -1
- package/src/commands/blank/blank.js +0 -8
- package/src/commands/blank/index.d.ts +0 -4
- package/src/commands/blank/index.d.ts.map +0 -1
- package/src/commands/blank/index.js +0 -9
- package/src/commands/blank/log.d.ts +0 -2
- package/src/commands/blank/log.d.ts.map +0 -1
- package/src/commands/blank/log.js +0 -5
- package/src/commands/build/BuildOptions.d.ts +0 -4
- package/src/commands/build/BuildOptions.d.ts.map +0 -1
- package/src/commands/build/BuildOptions.js +0 -2
- package/src/commands/build/build.d.ts +0 -3
- package/src/commands/build/build.d.ts.map +0 -1
- package/src/commands/build/build.js +0 -22
- package/src/commands/build/index.d.ts +0 -4
- package/src/commands/build/index.d.ts.map +0 -1
- package/src/commands/build/index.js +0 -9
- package/src/commands/build/log.d.ts +0 -2
- package/src/commands/build/log.d.ts.map +0 -1
- package/src/commands/build/log.js +0 -5
- package/src/commands/danka/DankaOptions.d.ts +0 -4
- package/src/commands/danka/DankaOptions.d.ts.map +0 -1
- package/src/commands/danka/DankaOptions.js +0 -2
- package/src/commands/danka/danka.d.ts +0 -3
- package/src/commands/danka/danka.d.ts.map +0 -1
- package/src/commands/danka/danka.js +0 -8
- package/src/commands/danka/index.d.ts +0 -4
- package/src/commands/danka/index.d.ts.map +0 -1
- package/src/commands/danka/index.js +0 -9
- package/src/commands/danka/log.d.ts +0 -2
- package/src/commands/danka/log.d.ts.map +0 -1
- package/src/commands/danka/log.js +0 -5
- package/src/commands/deinstall/DeinstallOptions.d.ts +0 -4
- package/src/commands/deinstall/DeinstallOptions.d.ts.map +0 -1
- package/src/commands/deinstall/DeinstallOptions.js +0 -2
- package/src/commands/deinstall/deinstall.d.ts +0 -3
- package/src/commands/deinstall/deinstall.d.ts.map +0 -1
- package/src/commands/deinstall/deinstall.js +0 -21
- package/src/commands/deinstall/index.d.ts +0 -4
- package/src/commands/deinstall/index.d.ts.map +0 -1
- package/src/commands/deinstall/index.js +0 -9
- package/src/commands/deinstall/log.d.ts +0 -2
- package/src/commands/deinstall/log.d.ts.map +0 -1
- package/src/commands/deinstall/log.js +0 -5
- package/src/commands/deploy/DeployOptions.d.ts +0 -7
- package/src/commands/deploy/DeployOptions.d.ts.map +0 -1
- package/src/commands/deploy/DeployOptions.js +0 -2
- package/src/commands/deploy/deploy.d.ts +0 -3
- package/src/commands/deploy/deploy.d.ts.map +0 -1
- package/src/commands/deploy/deploy.js +0 -33
- package/src/commands/deploy/deployIos.d.ts +0 -2
- package/src/commands/deploy/deployIos.d.ts.map +0 -1
- package/src/commands/deploy/deployIos.js +0 -44
- package/src/commands/deploy/index.d.ts +0 -4
- package/src/commands/deploy/index.d.ts.map +0 -1
- package/src/commands/deploy/index.js +0 -12
- package/src/commands/deploy/log.d.ts +0 -2
- package/src/commands/deploy/log.d.ts.map +0 -1
- package/src/commands/deploy/log.js +0 -5
- package/src/commands/deploy/setSsr.d.ts +0 -2
- package/src/commands/deploy/setSsr.d.ts.map +0 -1
- package/src/commands/deploy/setSsr.js +0 -25
- package/src/commands/dev/DevOptions.d.ts +0 -5
- package/src/commands/dev/DevOptions.d.ts.map +0 -1
- package/src/commands/dev/DevOptions.js +0 -2
- package/src/commands/dev/dev.d.ts +0 -3
- package/src/commands/dev/dev.d.ts.map +0 -1
- package/src/commands/dev/dev.js +0 -16
- package/src/commands/dev/devIos.d.ts +0 -3
- package/src/commands/dev/devIos.d.ts.map +0 -1
- package/src/commands/dev/devIos.js +0 -26
- package/src/commands/dev/index.d.ts +0 -4
- package/src/commands/dev/index.d.ts.map +0 -1
- package/src/commands/dev/index.js +0 -10
- package/src/commands/dev/log.d.ts +0 -2
- package/src/commands/dev/log.d.ts.map +0 -1
- package/src/commands/dev/log.js +0 -5
- package/src/commands/generate/GenerateOptions.d.ts +0 -9
- package/src/commands/generate/GenerateOptions.d.ts.map +0 -1
- package/src/commands/generate/GenerateOptions.js +0 -4
- package/src/commands/generate/generate.d.ts +0 -3
- package/src/commands/generate/generate.d.ts.map +0 -1
- package/src/commands/generate/generate.js +0 -22
- package/src/commands/generate/generateCommand.d.ts +0 -2
- package/src/commands/generate/generateCommand.d.ts.map +0 -1
- package/src/commands/generate/generateCommand.js +0 -36
- package/src/commands/generate/generateProject.d.ts +0 -3
- package/src/commands/generate/generateProject.d.ts.map +0 -1
- package/src/commands/generate/generateProject.js +0 -83
- package/src/commands/generate/index.d.ts +0 -4
- package/src/commands/generate/index.d.ts.map +0 -1
- package/src/commands/generate/index.js +0 -14
- package/src/commands/generate/log.d.ts +0 -2
- package/src/commands/generate/log.d.ts.map +0 -1
- package/src/commands/generate/log.js +0 -5
- package/src/commands/index.d.ts +0 -3
- package/src/commands/index.d.ts.map +0 -1
- package/src/commands/index.js +0 -25
- package/src/commands/kiss/KissOptions.d.ts +0 -4
- package/src/commands/kiss/KissOptions.d.ts.map +0 -1
- package/src/commands/kiss/KissOptions.js +0 -2
- package/src/commands/kiss/index.d.ts +0 -4
- package/src/commands/kiss/index.d.ts.map +0 -1
- package/src/commands/kiss/index.js +0 -9
- package/src/commands/kiss/kiss.d.ts +0 -3
- package/src/commands/kiss/kiss.d.ts.map +0 -1
- package/src/commands/kiss/kiss.js +0 -8
- package/src/commands/kiss/log.d.ts +0 -2
- package/src/commands/kiss/log.d.ts.map +0 -1
- package/src/commands/kiss/log.js +0 -5
- package/src/commands/reinstall/ReinstallOptions.d.ts +0 -4
- package/src/commands/reinstall/ReinstallOptions.d.ts.map +0 -1
- package/src/commands/reinstall/ReinstallOptions.js +0 -2
- package/src/commands/reinstall/index.d.ts +0 -4
- package/src/commands/reinstall/index.d.ts.map +0 -1
- package/src/commands/reinstall/index.js +0 -9
- package/src/commands/reinstall/log.d.ts +0 -2
- package/src/commands/reinstall/log.d.ts.map +0 -1
- package/src/commands/reinstall/log.js +0 -5
- package/src/commands/reinstall/reinstall.d.ts +0 -3
- package/src/commands/reinstall/reinstall.d.ts.map +0 -1
- package/src/commands/reinstall/reinstall.js +0 -14
- package/src/commands/release/ReleaseOptions.d.ts +0 -9
- package/src/commands/release/ReleaseOptions.d.ts.map +0 -1
- package/src/commands/release/ReleaseOptions.js +0 -2
- package/src/commands/release/index.d.ts +0 -4
- package/src/commands/release/index.d.ts.map +0 -1
- package/src/commands/release/index.js +0 -22
- package/src/commands/release/log.d.ts +0 -2
- package/src/commands/release/log.d.ts.map +0 -1
- package/src/commands/release/log.js +0 -5
- package/src/commands/release/publish.d.ts +0 -3
- package/src/commands/release/publish.d.ts.map +0 -1
- package/src/commands/release/publish.js +0 -18
- package/src/commands/release/release.d.ts +0 -3
- package/src/commands/release/release.d.ts.map +0 -1
- package/src/commands/release/release.js +0 -24
- package/src/commands/release/tag.d.ts +0 -23
- package/src/commands/release/tag.d.ts.map +0 -1
- package/src/commands/release/tag.js +0 -90
- package/src/commands/upgrade/UpgradeOptions.d.ts +0 -4
- package/src/commands/upgrade/UpgradeOptions.d.ts.map +0 -1
- package/src/commands/upgrade/UpgradeOptions.js +0 -2
- package/src/commands/upgrade/index.d.ts +0 -4
- package/src/commands/upgrade/index.d.ts.map +0 -1
- package/src/commands/upgrade/index.js +0 -9
- package/src/commands/upgrade/log.d.ts +0 -2
- package/src/commands/upgrade/log.d.ts.map +0 -1
- package/src/commands/upgrade/log.js +0 -5
- package/src/commands/upgrade/upgrade.d.ts +0 -3
- package/src/commands/upgrade/upgrade.d.ts.map +0 -1
- package/src/commands/upgrade/upgrade.js +0 -11
- package/src/commands/version/VersionOptions.d.ts +0 -8
- package/src/commands/version/VersionOptions.d.ts.map +0 -1
- package/src/commands/version/VersionOptions.js +0 -2
- package/src/commands/version/getPreid.d.ts +0 -2
- package/src/commands/version/getPreid.d.ts.map +0 -1
- package/src/commands/version/getPreid.js +0 -10
- package/src/commands/version/index.d.ts +0 -4
- package/src/commands/version/index.d.ts.map +0 -1
- package/src/commands/version/index.js +0 -12
- package/src/commands/version/log.d.ts +0 -2
- package/src/commands/version/log.d.ts.map +0 -1
- package/src/commands/version/log.js +0 -5
- package/src/commands/version/pimpChangelogs.d.ts +0 -2
- package/src/commands/version/pimpChangelogs.d.ts.map +0 -1
- package/src/commands/version/pimpChangelogs.js +0 -37
- package/src/commands/version/version.d.ts +0 -3
- package/src/commands/version/version.d.ts.map +0 -1
- package/src/commands/version/version.js +0 -33
- package/src/constants.d.ts +0 -4
- package/src/constants.d.ts.map +0 -1
- package/src/constants.js +0 -7
- package/src/index.d.ts +0 -3
- package/src/index.d.ts.map +0 -1
- package/src/index.js +0 -24
- package/src/preAction.d.ts +0 -3
- package/src/preAction.d.ts.map +0 -1
- package/src/preAction.js +0 -76
- package/src/scripts/cmd/cd.d.ts +0 -2
- package/src/scripts/cmd/cd.d.ts.map +0 -1
- package/src/scripts/cmd/cd.js +0 -15
- package/src/scripts/cmd/executeBash.d.ts.map +0 -1
- package/src/scripts/cmd/executeBash.js +0 -21
- package/src/scripts/cmd/executeCmd.d.ts +0 -9
- package/src/scripts/cmd/executeCmd.d.ts.map +0 -1
- package/src/scripts/cmd/executeCmd.js +0 -23
- package/src/scripts/cmd/getBashOutput.d.ts.map +0 -1
- package/src/scripts/cmd/getBashOutput.js +0 -19
- package/src/scripts/cmd/getCmdOutput.d.ts +0 -10
- package/src/scripts/cmd/getCmdOutput.d.ts.map +0 -1
- package/src/scripts/cmd/getCmdOutput.js +0 -26
- package/src/scripts/cmd/index.d.ts.map +0 -1
- package/src/scripts/cmd/index.js +0 -25
- package/src/scripts/cmd/log.d.ts +0 -2
- package/src/scripts/cmd/log.d.ts.map +0 -1
- package/src/scripts/cmd/log.js +0 -5
- package/src/scripts/cmd/parseArgs.d.ts +0 -3
- package/src/scripts/cmd/parseArgs.d.ts.map +0 -1
- package/src/scripts/cmd/parseArgs.js +0 -41
- package/src/scripts/cmd/parseBashArgs.d.ts +0 -3
- package/src/scripts/cmd/parseBashArgs.d.ts.map +0 -1
- package/src/scripts/cmd/parseBashArgs.js +0 -16
- package/src/scripts/cmd/types.d.ts +0 -12
- package/src/scripts/cmd/types.d.ts.map +0 -1
- package/src/scripts/cmd/types.js +0 -2
- package/src/scripts/filesystem/copyDir.d.ts +0 -9
- package/src/scripts/filesystem/copyDir.d.ts.map +0 -1
- package/src/scripts/filesystem/copyDir.js +0 -26
- package/src/scripts/filesystem/copyFiles.d.ts +0 -11
- package/src/scripts/filesystem/copyFiles.d.ts.map +0 -1
- package/src/scripts/filesystem/copyFiles.js +0 -59
- package/src/scripts/filesystem/findFile.d.ts +0 -2
- package/src/scripts/filesystem/findFile.d.ts.map +0 -1
- package/src/scripts/filesystem/findFile.js +0 -24
- package/src/scripts/filesystem/index.d.ts +0 -10
- package/src/scripts/filesystem/index.d.ts.map +0 -1
- package/src/scripts/filesystem/index.js +0 -17
- package/src/scripts/filesystem/loadJsonFile.d.ts +0 -2
- package/src/scripts/filesystem/loadJsonFile.d.ts.map +0 -1
- package/src/scripts/filesystem/loadJsonFile.js +0 -18
- package/src/scripts/filesystem/log.d.ts +0 -2
- package/src/scripts/filesystem/log.d.ts.map +0 -1
- package/src/scripts/filesystem/log.js +0 -5
- package/src/scripts/filesystem/readDirRecursive.d.ts +0 -2
- package/src/scripts/filesystem/readDirRecursive.d.ts.map +0 -1
- package/src/scripts/filesystem/readDirRecursive.js +0 -16
- package/src/scripts/git/branch/branchDelete.d.ts +0 -6
- package/src/scripts/git/branch/branchDelete.d.ts.map +0 -1
- package/src/scripts/git/branch/branchDelete.js +0 -24
- package/src/scripts/git/branch/branchExists.d.ts +0 -5
- package/src/scripts/git/branch/branchExists.d.ts.map +0 -1
- package/src/scripts/git/branch/branchExists.js +0 -15
- package/src/scripts/git/branch/checkout.d.ts +0 -5
- package/src/scripts/git/branch/checkout.d.ts.map +0 -1
- package/src/scripts/git/branch/checkout.js +0 -15
- package/src/scripts/git/branch/getCurrentBranch.d.ts +0 -11
- package/src/scripts/git/branch/getCurrentBranch.d.ts.map +0 -1
- package/src/scripts/git/branch/getCurrentBranch.js +0 -28
- package/src/scripts/git/clone.d.ts +0 -10
- package/src/scripts/git/clone.d.ts.map +0 -1
- package/src/scripts/git/clone.js +0 -14
- package/src/scripts/git/getRepo.d.ts +0 -2
- package/src/scripts/git/getRepo.d.ts.map +0 -1
- package/src/scripts/git/getRepo.js +0 -13
- package/src/scripts/git/index.d.ts +0 -29
- package/src/scripts/git/index.d.ts.map +0 -1
- package/src/scripts/git/index.js +0 -40
- package/src/scripts/git/log.d.ts +0 -2
- package/src/scripts/git/log.d.ts.map +0 -1
- package/src/scripts/git/log.js +0 -5
- package/src/scripts/git/openPr.d.ts +0 -2
- package/src/scripts/git/openPr.d.ts.map +0 -1
- package/src/scripts/git/openPr.js +0 -20
- package/src/scripts/git/remoteStatus.d.ts +0 -3
- package/src/scripts/git/remoteStatus.d.ts.map +0 -1
- package/src/scripts/git/remoteStatus.js +0 -22
- package/src/scripts/git/tag/createTag.d.ts +0 -18
- package/src/scripts/git/tag/createTag.d.ts.map +0 -1
- package/src/scripts/git/tag/createTag.js +0 -18
- package/src/scripts/git/tag/deleteTag.d.ts +0 -2
- package/src/scripts/git/tag/deleteTag.d.ts.map +0 -1
- package/src/scripts/git/tag/deleteTag.js +0 -13
- package/src/scripts/git/tag/getTags.d.ts +0 -2
- package/src/scripts/git/tag/getTags.d.ts.map +0 -1
- package/src/scripts/git/tag/getTags.js +0 -8
- package/src/scripts/git/tag/pushAllTags.d.ts +0 -2
- package/src/scripts/git/tag/pushAllTags.d.ts.map +0 -1
- package/src/scripts/git/tag/pushAllTags.js +0 -8
- package/src/scripts/git/tag/renameTag.d.ts +0 -2
- package/src/scripts/git/tag/renameTag.d.ts.map +0 -1
- package/src/scripts/git/tag/renameTag.js +0 -14
- package/src/scripts/lerna/changed.d.ts +0 -3
- package/src/scripts/lerna/changed.d.ts.map +0 -1
- package/src/scripts/lerna/changed.js +0 -13
- package/src/scripts/lerna/constants.d.ts +0 -5
- package/src/scripts/lerna/constants.d.ts.map +0 -1
- package/src/scripts/lerna/constants.js +0 -7
- package/src/scripts/lerna/filterByDependency.d.ts +0 -7
- package/src/scripts/lerna/filterByDependency.d.ts.map +0 -1
- package/src/scripts/lerna/filterByDependency.js +0 -18
- package/src/scripts/lerna/getConfig.d.ts +0 -3
- package/src/scripts/lerna/getConfig.d.ts.map +0 -1
- package/src/scripts/lerna/getConfig.js +0 -13
- package/src/scripts/lerna/getDependencies.d.ts +0 -9
- package/src/scripts/lerna/getDependencies.d.ts.map +0 -1
- package/src/scripts/lerna/getDependencies.js +0 -23
- package/src/scripts/lerna/getDetails.d.ts +0 -3
- package/src/scripts/lerna/getDetails.d.ts.map +0 -1
- package/src/scripts/lerna/getDetails.js +0 -38
- package/src/scripts/lerna/index.d.ts +0 -14
- package/src/scripts/lerna/index.d.ts.map +0 -1
- package/src/scripts/lerna/index.js +0 -19
- package/src/scripts/lerna/log.d.ts +0 -2
- package/src/scripts/lerna/log.d.ts.map +0 -1
- package/src/scripts/lerna/log.js +0 -5
- package/src/scripts/lerna/types.d.ts +0 -62
- package/src/scripts/lerna/types.d.ts.map +0 -1
- package/src/scripts/lerna/types.js +0 -2
- package/src/utils/chalk.d.ts +0 -4
- package/src/utils/chalk.d.ts.map +0 -1
- package/src/utils/chalk.js +0 -9
- package/src/utils/common.d.ts +0 -2
- package/src/utils/common.d.ts.map +0 -1
- package/src/utils/common.js +0 -5
- package/src/utils/index.d.ts.map +0 -1
- package/src/utils/index.js +0 -19
- package/src/utils/inquirer.d.ts +0 -5
- package/src/utils/inquirer.d.ts.map +0 -1
- package/src/utils/inquirer.js +0 -21
- package/src/utils/logger.d.ts +0 -9
- package/src/utils/logger.d.ts.map +0 -1
- package/src/utils/logger.js +0 -36
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const commander_1 = require("commander");
|
|
4
|
-
const deinstall_1 = require("./deinstall");
|
|
5
|
-
exports.default = new commander_1.Command()
|
|
6
|
-
.name("deinstall")
|
|
7
|
-
.description("Remove node_modules and package-lock.json.")
|
|
8
|
-
.option("-p, --packages", "Deinstall dependencies in /packages (intended for module authors).")
|
|
9
|
-
.action(deinstall_1.deinstall);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../../src/commands/deinstall/log.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG,4BAAsB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeployOptions.d.ts","sourceRoot":"","sources":["../../../../src/commands/deploy/DeployOptions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../../src/commands/deploy/deploy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAMhD,eAAO,MAAM,MAAM,YAAmB,aAAa,kBA+BlD,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deploy = void 0;
|
|
4
|
-
const git_1 = require("../../scripts/git");
|
|
5
|
-
const log_1 = require("./log");
|
|
6
|
-
const deployIos_1 = require("./deployIos");
|
|
7
|
-
const setSsr_1 = require("./setSsr");
|
|
8
|
-
const deploy = async (options) => {
|
|
9
|
-
log_1.log.info("Deploying app...", options);
|
|
10
|
-
// Deploy app to iOS
|
|
11
|
-
if (options.ios) {
|
|
12
|
-
(0, deployIos_1.deployIos)();
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
// Handle ssr
|
|
16
|
-
if (options.ssr !== undefined) {
|
|
17
|
-
log_1.log.info(`Setting ssr to ${options.ssr} and committing to git`);
|
|
18
|
-
(0, setSsr_1.setSsr)(options.ssr);
|
|
19
|
-
git_1.git.commit({ m: `chore: Set SSR to ${options.ssr}` });
|
|
20
|
-
}
|
|
21
|
-
// Default Deploy app to web
|
|
22
|
-
const fromBranch = options.from || "dev";
|
|
23
|
-
const { remote } = git_1.git.branch.exists("deploy");
|
|
24
|
-
git_1.git.branch.checkout("deploy", { newBranch: !remote });
|
|
25
|
-
log_1.log.info("Checked out to deploy branch");
|
|
26
|
-
git_1.git.merge(fromBranch, true);
|
|
27
|
-
log_1.log.info(`Merged with ${fromBranch}`);
|
|
28
|
-
git_1.git.push("deploy");
|
|
29
|
-
log_1.log.info("Pushed to deploy");
|
|
30
|
-
git_1.git.branch.checkout(fromBranch);
|
|
31
|
-
log_1.log.info(`Checked out back to ${fromBranch}`);
|
|
32
|
-
};
|
|
33
|
-
exports.deploy = deploy;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deployIos.d.ts","sourceRoot":"","sources":["../../../../src/commands/deploy/deployIos.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,SAAS,SAAgB,MAAM,kBAwC3C,CAAC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deployIos = void 0;
|
|
4
|
-
const cmd_1 = require("../../scripts/cmd");
|
|
5
|
-
const log_1 = require("./log");
|
|
6
|
-
const ts_morph_1 = require("ts-morph");
|
|
7
|
-
const setSsr_1 = require("./setSsr");
|
|
8
|
-
const project = new ts_morph_1.Project();
|
|
9
|
-
const deployIos = async (url) => {
|
|
10
|
-
log_1.log.info("Deploying iOS app.");
|
|
11
|
-
// Remove server dev url from capacitor config
|
|
12
|
-
const capConfig = project.addSourceFileAtPathIfExists("./capacitor.config.ts");
|
|
13
|
-
if (!capConfig)
|
|
14
|
-
return;
|
|
15
|
-
const capConfigObject = capConfig
|
|
16
|
-
?.getVariableDeclaration("config")
|
|
17
|
-
?.getInitializerIfKind(ts_morph_1.SyntaxKind.ObjectLiteralExpression);
|
|
18
|
-
if (!capConfigObject)
|
|
19
|
-
return;
|
|
20
|
-
const server = capConfigObject.getProperty("server");
|
|
21
|
-
if (!url) {
|
|
22
|
-
server?.remove();
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
if (server) {
|
|
26
|
-
server.set({ initializer: `{ url: '${url}' }` });
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
capConfigObject.addPropertyAssignment({
|
|
30
|
-
name: "server",
|
|
31
|
-
initializer: `{ url: '${url}' }`,
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
capConfig.saveSync();
|
|
36
|
-
// Disable ssr from nuxt.config
|
|
37
|
-
(0, setSsr_1.setSsr)(false);
|
|
38
|
-
// Generate static nuxt app
|
|
39
|
-
(0, cmd_1.executeCmd)("nuxi generate");
|
|
40
|
-
// Sync and open iOS app with Capacitor
|
|
41
|
-
(0, cmd_1.executeCmd)("cap sync ios");
|
|
42
|
-
(0, cmd_1.executeCmd)("cap open ios");
|
|
43
|
-
};
|
|
44
|
-
exports.deployIos = deployIos;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/deploy/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;;AAGpC,wBAgBkB"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const commander_1 = require("commander");
|
|
4
|
-
const deploy_1 = require("./deploy");
|
|
5
|
-
exports.default = new commander_1.Command()
|
|
6
|
-
.name("deploy")
|
|
7
|
-
.description("Deploy a Nuxt app. Check out to deploy branch, merge with dev and check out back to dev.")
|
|
8
|
-
.option("--from <branch>", "From what branch to deploy. Default is 'dev' so this is used in the event we are deploying from a different branch.", "dev")
|
|
9
|
-
.option("--ios", "Deploy app to iOS device using Capacitor.")
|
|
10
|
-
.option("--android", "Deploy app to Android device using Capacitor.")
|
|
11
|
-
.option("--ssr", "Set SSR before deployment. Default is undefined for no change.")
|
|
12
|
-
.action(deploy_1.deploy);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../../src/commands/deploy/log.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG,4BAAmB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setSsr.d.ts","sourceRoot":"","sources":["../../../../src/commands/deploy/setSsr.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,QAAS,OAAO,SAoBlC,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setSsr = void 0;
|
|
4
|
-
const ts_morph_1 = require("ts-morph");
|
|
5
|
-
const project = new ts_morph_1.Project();
|
|
6
|
-
const setSsr = (ssr) => {
|
|
7
|
-
const nuxtConfig = project.addSourceFileAtPath("./nuxt.config.ts");
|
|
8
|
-
if (!nuxtConfig)
|
|
9
|
-
return;
|
|
10
|
-
const nuxtConfigDefault = nuxtConfig?.getFirstDescendantByKind(ts_morph_1.SyntaxKind.ObjectLiteralExpression);
|
|
11
|
-
if (!nuxtConfigDefault)
|
|
12
|
-
return;
|
|
13
|
-
const nuxtConfigSsr = nuxtConfigDefault.getProperty("ssr");
|
|
14
|
-
if (nuxtConfigSsr) {
|
|
15
|
-
nuxtConfigSsr.set({ initializer: `${ssr}` });
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
nuxtConfigDefault.addPropertyAssignment({
|
|
19
|
-
name: "ssr",
|
|
20
|
-
initializer: `${ssr}`,
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
nuxtConfig.saveSync();
|
|
24
|
-
};
|
|
25
|
-
exports.setSsr = setSsr;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DevOptions.d.ts","sourceRoot":"","sources":["../../../../src/commands/dev/DevOptions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;CACf"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../../../src/commands/dev/dev.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C,eAAO,MAAM,GAAG,YAAmB,UAAU,kBAS5C,CAAC"}
|
package/src/commands/dev/dev.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.dev = void 0;
|
|
4
|
-
const cmd_1 = require("../../scripts/cmd");
|
|
5
|
-
const log_1 = require("./log");
|
|
6
|
-
const devIos_1 = require("./devIos");
|
|
7
|
-
const dev = async (options) => {
|
|
8
|
-
log_1.log.info("Running dev...", options);
|
|
9
|
-
if (options.ios) {
|
|
10
|
-
options.host = true;
|
|
11
|
-
await (0, devIos_1.devIos)(options);
|
|
12
|
-
}
|
|
13
|
-
// Run nuxt server
|
|
14
|
-
(0, cmd_1.executeCmd)("nuxt dev", options.host ? { host: "0.0.0.0" } : undefined);
|
|
15
|
-
};
|
|
16
|
-
exports.dev = dev;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"devIos.d.ts","sourceRoot":"","sources":["../../../../src/commands/dev/devIos.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAgB1C,eAAO,MAAM,MAAM,YAAmB,UAAU,kBAK/C,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
exports.devIos = void 0;
|
|
7
|
-
const deployIos_1 = require("../deploy/deployIos");
|
|
8
|
-
const os_1 = __importDefault(require("os"));
|
|
9
|
-
const getLocalIP = () => {
|
|
10
|
-
const interfaces = os_1.default.networkInterfaces();
|
|
11
|
-
for (const iface of Object.values(interfaces)) {
|
|
12
|
-
if (!iface)
|
|
13
|
-
continue;
|
|
14
|
-
for (const config of iface) {
|
|
15
|
-
if (config.family === "IPv4" && !config.internal) {
|
|
16
|
-
return config.address;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
const devIos = async (options) => {
|
|
22
|
-
const ip = getLocalIP();
|
|
23
|
-
const url = `http://${ip}:3000`; // TODO dynamic ssl and port ?
|
|
24
|
-
await (0, deployIos_1.deployIos)(url);
|
|
25
|
-
};
|
|
26
|
-
exports.devIos = devIos;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/dev/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;;AAGpC,wBAQe"}
|
|
@@ -1,10 +0,0 @@
|
|
|
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);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../../src/commands/dev/log.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG,4BAAgB,CAAC"}
|
package/src/commands/dev/log.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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,SACb,YAAY,QACZ,MAAM,WACH,eAAe,kBAczB,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
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;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generateCommand.d.ts","sourceRoot":"","sources":["../../../../src/commands/generate/generateCommand.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe,SAAgB,MAAM,OAAO,MAAM,kBAwC9D,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
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;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generateProject.d.ts","sourceRoot":"","sources":["../../../../src/commands/generate/generateProject.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,eAAO,MAAM,eAAe,SACpB,MAAM,OACP,MAAM,WACF,eAAe,kBAsGzB,CAAC"}
|
|
@@ -1,83 +0,0 @@
|
|
|
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 cmd_1 = require("../../scripts/cmd");
|
|
8
|
-
const utils_1 = require("../../utils");
|
|
9
|
-
const generateProject = async (name, cwd, options) => {
|
|
10
|
-
const { starter = "base", noRepo, keepHistory, yes } = options;
|
|
11
|
-
log_1.log.verbose("Check if project name is valid");
|
|
12
|
-
if (!name.match(/^[a-z0-9-]+$/)) {
|
|
13
|
-
log_1.log.error("Project name must be lowercase, alphanumeric, and contain hyphens only.");
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
if (!noRepo) {
|
|
17
|
-
// Check if gh is installed
|
|
18
|
-
if ((0, cmd_1.executeCmd)("gh --version").status !== 0) {
|
|
19
|
-
const installGh = await (0, utils_1.confirmQuestion)("GitHub cli is not installed. Do you want to install it now? (brew install gh)", yes);
|
|
20
|
-
if (installGh) {
|
|
21
|
-
(0, cmd_1.executeCmd)("brew install gh");
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
log_1.log.error("You must have GitHub cli installed to generate a project and create a repo.");
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
// Check if gh user is authenticated
|
|
29
|
-
if ((0, cmd_1.executeCmd)("gh auth status").status !== 0) {
|
|
30
|
-
const authenticateGh = await (0, utils_1.confirmQuestion)("GitHub cli is not authenticated. Do you want to authenticate now? (gh auth login)", yes);
|
|
31
|
-
if (authenticateGh) {
|
|
32
|
-
(0, cmd_1.executeCmd)("gh auth login");
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
log_1.log.error("You must authenticate with GitHub cli before generating a project in order to create the repo.");
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
log_1.log.verbose("Skipping gh verification");
|
|
42
|
-
}
|
|
43
|
-
log_1.log.verbose("Cloning gluhar project template");
|
|
44
|
-
git_1.git.clone("gluharry/starters", name, { branch: starter });
|
|
45
|
-
cmd_1.cmd.cd(name);
|
|
46
|
-
log_1.log.verbose("Replacing gluhar-app with project's name");
|
|
47
|
-
await filesystem_1.filesystem.copyFiles([
|
|
48
|
-
"./package.json",
|
|
49
|
-
"./README.md",
|
|
50
|
-
"./nuxt.config.ts",
|
|
51
|
-
"./sanity/sanity.config.ts",
|
|
52
|
-
"./sanity/structure.ts",
|
|
53
|
-
], (file) => {
|
|
54
|
-
const content = file.content.replaceAll("gluhar-app", name);
|
|
55
|
-
return {
|
|
56
|
-
...file,
|
|
57
|
-
content,
|
|
58
|
-
};
|
|
59
|
-
});
|
|
60
|
-
if (!keepHistory) {
|
|
61
|
-
log_1.log.verbose("Removing git history");
|
|
62
|
-
(0, cmd_1.executeCmd)("rm -rf .git");
|
|
63
|
-
log_1.log.verbose("Initializing empty git repo with initial flat commit");
|
|
64
|
-
(0, cmd_1.executeCmd)("git init --initial-branch=dev && git add . && git commit -m 'Initial commit'");
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
log_1.log.verbose("Keeping git history and removing remote origin");
|
|
68
|
-
(0, cmd_1.executeCmd)("git remote remove origin && git branch -m dev");
|
|
69
|
-
}
|
|
70
|
-
if (!noRepo) {
|
|
71
|
-
log_1.log.verbose("Creating new github remote repo");
|
|
72
|
-
(0, cmd_1.executeCmd)(`gh repo create ${name} --private --source=. --push`);
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
log_1.log.verbose("Skipping repo creation and deleting .git. You are on your own.");
|
|
76
|
-
(0, cmd_1.executeCmd)("rm -rf .git");
|
|
77
|
-
}
|
|
78
|
-
const openCode = await (0, utils_1.confirmQuestion)(`Project '${name}' was created successfully! Do you want to open it in VSCode?`, yes);
|
|
79
|
-
if (openCode) {
|
|
80
|
-
(0, cmd_1.executeCmd)("code . -g README.md");
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
exports.generateProject = generateProject;
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,14 +0,0 @@
|
|
|
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);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../../src/commands/generate/log.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG,4BAAqB,CAAC"}
|
package/src/commands/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":";AAUA,wBAUE"}
|
package/src/commands/index.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"KissOptions.d.ts","sourceRoot":"","sources":["../../../../src/commands/kiss/KissOptions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,OAAO,CAAC;CACf"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/kiss/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;;AAGpC,wBAIgB"}
|