UNPKG

@ycmd/commands

Version:

LSK.js CLI Creds is the easiest way to manage GitHub / Gitlab secrets and credentials

17 lines (12 loc) 5.46 kB
'use strict'; var fishbird = require('fishbird'); var p = require('semver'); var ycmd = require('ycmd'); function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; } var p__default = /*#__PURE__*/_interopDefault(p); var a=Object.defineProperty;var n=(e,i)=>a(e,"name",{value:i,configurable:!0});function s(e,i=[]){let t=["major","minor","patch","premajor","preminor","prepatch","prerelease"].concat(i),o=`'${t.slice(0,-1).join("', '")}', or '${t[t.length-1]}'.`;e.positional("bump",{describe:`Increment version(s) by explicit version _or_ semver keyword, ${o}`,type:"string",coerce:r=>{if(!p__default.default.valid(r)&&t.indexOf(r)===-1)throw new Error(`bump must be an explicit version string _or_ one of: ${o}`);return r}});}n(s,"addBumpPositional");var y=ycmd.createCommand({command:"version [-y][-d]",describe:"create new semver version",builder(e,i){let t={"allow-branch":{describe:"Specify which branches to allow versioning from.",type:"array"},amend:{describe:"Amend the existing commit, instead of generating a new one.",type:"boolean"},"build-metadata":{describe:"Apply semver-compatible build metadata to the release",requiresArg:!0,type:"string"},"conventional-commits":{describe:"Use conventional-changelog to determine version bump and generate CHANGELOG.",type:"boolean"},"conventional-graduate":{describe:"Version currently prereleased packages to a non-prerelease version."},"conventional-prerelease":{describe:"Version changed packages as prereleases when using --conventional-commits."},"conventional-bump-prerelease":{describe:"Bumps prerelease versions if conventional commits requires it.",type:"boolean"},"changelog-preset":{describe:"Custom conventional-changelog preset.",type:"string",requiresArg:!0,defaultDescription:"angular"},exact:{describe:"Specify cross-dependency version numbers exactly rather than with a caret (^).",type:"boolean"},"force-publish":{describe:"Always include targeted packages in versioning operations, skipping default logic."},"git-remote":{describe:"Push git changes to the specified remote.",type:"string",requiresArg:!0,defaultDescription:"origin"},"create-release":{describe:"Create an official GitHub or GitLab release for every version.",type:"string",choices:["gitlab","github"]},"ignore-changes":{describe:["Ignore changes in files matched by glob(s) when detecting changed packages.","Pass --no-ignore-changes to completely disable."].join(` `),type:"array"},"ignore-scripts":{describe:"Disable all lifecycle scripts",type:"boolean"},"include-merged-tags":{describe:"Include tags from merged branches when detecting changed packages.",type:"boolean"},m:{describe:"Use a custom commit message when creating the version commit.",alias:"message",type:"string",requiresArg:!0},"no-changelog":{describe:"Do not generate CHANGELOG.md files when using --conventional-commits.",type:"boolean"},changelog:{hidden:!0,type:"boolean"},"no-commit-hooks":{describe:"Do not run git commit hooks when committing version changes.",type:"boolean"},"commit-hooks":{hidden:!0,type:"boolean"},"no-git-tag-version":{describe:"Do not commit or tag version changes.",type:"boolean"},"git-tag-version":{hidden:!0,type:"boolean"},"no-granular-pathspec":{describe:"Do not stage changes file-by-file, but globally.",type:"boolean"},"granular-pathspec":{hidden:!0,type:"boolean"},"no-private":{describe:"Do not version private packages.",type:"boolean"},private:{hidden:!0,type:"boolean"},"no-push":{describe:"Do not push tagged commit to git remote.",type:"boolean"},push:{hidden:!0,type:"boolean"},preid:{describe:"Specify the prerelease identifier when versioning a prerelease",type:"string",requiresArg:!0,defaultDescription:"alpha"},"sign-git-commit":{describe:"Pass the `--gpg-sign` flag to `git commit`.",type:"boolean"},"signoff-git-commit":{describe:"Pass the `--signoff` flag to `git commit`.",type:"boolean"},"sign-git-tag":{describe:"Pass the `--sign` flag to `git tag`.",type:"boolean"},"force-git-tag":{describe:"Pass the `--force` flag to `git tag`.",type:"boolean"},"tag-version-prefix":{describe:"Customize the tag prefix. To remove entirely, pass an empty string.",type:"string",requiresArg:!0,defaultDescription:"v"},"git-tag-command":{describe:"Allows users to specify a custom command to be used when applying git tags. For example, this may be useful for providing a wrapper command in CI/CD pipelines that have no direct write access.",type:"string"},"npm-client-args":{describe:"Additional arguments to pass to the npm client when performing 'npm install'.",type:"array"},y:{describe:"Skip all confirmation prompts.",alias:"yes",type:"boolean"}};return i?(Object.keys(t).forEach(o=>{t[o].hidden=!0;}),e.default("composed",i).hide("composed")):s(e),e.options(t),e.parserConfiguration({"populate--":!0}),i||e.group(Object.keys(t),"Command Options:"),e.option("ignore",{hidden:!0,conflicts:"ignore-changes",type:"array"}).option("cd-version",{hidden:!0,conflicts:"bump",type:"string",requiresArg:!0}).option("repo-version",{hidden:!0,conflicts:"bump",type:"string",requiresArg:!0}).option("skip-git",{hidden:!0,type:"boolean"}).option("github-release",{hidden:!0,type:"boolean"})},addBumpPositional:s,async main({argv:e,isRoot:i}){let{VersionCommand:t}=await import('lerna-version');if(i){await new t(e),await fishbird.delay(1e3);return}await ycmd.shell("npm version prerelease --preid alpha");}}); module.exports = y; //# sourceMappingURL=out.js.map //# sourceMappingURL=version.js.map