@teambit/snapping 0.0.473 → 0.0.474

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/tag-cmd.js CHANGED
@@ -1,20 +1,10 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- require("core-js/modules/es.array.iterator.js");
5
- require("core-js/modules/es.promise.js");
6
3
  Object.defineProperty(exports, "__esModule", {
7
4
  value: true
8
5
  });
9
6
  exports.TagCmd = void 0;
10
7
  exports.outputIdsIfExists = outputIdsIfExists;
11
- function _defineProperty2() {
12
- const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
13
- _defineProperty2 = function () {
14
- return data;
15
- };
16
- return data;
17
- }
18
8
  function _chalk() {
19
9
  const data = _interopRequireDefault(require("chalk"));
20
10
  _chalk = function () {
@@ -57,30 +47,34 @@ function _bitError() {
57
47
  };
58
48
  return data;
59
49
  }
50
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
51
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
52
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
53
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
60
54
  const RELEASE_TYPES = ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'];
61
55
  class TagCmd {
62
56
  constructor(snapping, logger) {
63
57
  this.snapping = snapping;
64
58
  this.logger = logger;
65
- (0, _defineProperty2().default)(this, "name", 'tag [component-patterns...]');
66
- (0, _defineProperty2().default)(this, "group", 'development');
67
- (0, _defineProperty2().default)(this, "description", 'create an immutable and exportable component snapshot, tagged with a release version.');
68
- (0, _defineProperty2().default)(this, "extendedDescription", `if no patterns are provided, it will tag all new and modified components.
59
+ _defineProperty(this, "name", 'tag [component-patterns...]');
60
+ _defineProperty(this, "group", 'development');
61
+ _defineProperty(this, "description", 'create an immutable and exportable component snapshot, tagged with a release version.');
62
+ _defineProperty(this, "extendedDescription", `if no patterns are provided, it will tag all new and modified components.
69
63
  if patterns are entered, you can specify a version per pattern using "@" sign, e.g. bit tag foo@1.0.0 bar@minor baz@major`);
70
- (0, _defineProperty2().default)(this, "arguments", [{
64
+ _defineProperty(this, "arguments", [{
71
65
  name: 'component-patterns...',
72
66
  description: `${_constants().COMPONENT_PATTERN_HELP}. By default, all new and modified are tagged.`
73
67
  }]);
74
- (0, _defineProperty2().default)(this, "helpUrl", 'reference/components/snaps#create-a-tag-(release-version)');
75
- (0, _defineProperty2().default)(this, "alias", 't');
76
- (0, _defineProperty2().default)(this, "loader", true);
77
- (0, _defineProperty2().default)(this, "options", [['m', 'message <message>', 'a log message describing latest changes'], ['u', 'unmodified', 'include unmodified components (by default, only new and modified components are tagged)'], ['', 'editor [editor]', 'open an editor to write a tag message for each component. optionally, specify the editor-name (defaults to vim).'], ['v', 'ver <version>', 'tag with the given version'], ['l', 'increment <level>', `options are: [${RELEASE_TYPES.join(', ')}], default to patch`], ['', 'prerelease-id <id>', 'prerelease identifier (e.g. "dev" to get "1.0.0-dev.1")'], ['p', 'patch', 'syntactic sugar for "--increment patch"'], ['', 'minor', 'syntactic sugar for "--increment minor"'], ['', 'major', 'syntactic sugar for "--increment major"'], ['', 'pre-release [identifier]', 'syntactic sugar for "--increment prerelease" and `--prerelease-id <identifier>`'], ['', 'snapped', 'tag only components whose head is a snap (not a tag)'], ['', 'unmerged', 'complete a merge process by tagging the unmerged components'], ['', 'skip-tests', 'skip running component tests during tag process'], ['', 'skip-auto-tag', 'skip auto tagging dependents'], ['', 'soft', 'do not persist. only keep note of the changes to be made'], ['', 'persist', 'persist the changes generated by --soft tag'], ['', 'disable-tag-pipeline', 'skip the tag pipeline to avoid publishing the components'], ['', 'force-deploy', 'DEPRECATED. use --ignore-build-error instead'], ['', 'ignore-build-errors', 'proceed to tag pipeline even when build pipeline fails'], ['', 'increment-by <number>', '(default to 1) increment semver flag (patch/minor/major) by. e.g. incrementing patch by 2: 0.0.1 -> 0.0.3.'], ['i', 'ignore-issues [issues]', `ignore component issues (shown in "bit status" as "issues found"), issues to ignore:
68
+ _defineProperty(this, "helpUrl", 'reference/components/snaps#create-a-tag-(release-version)');
69
+ _defineProperty(this, "alias", 't');
70
+ _defineProperty(this, "loader", true);
71
+ _defineProperty(this, "options", [['m', 'message <message>', 'a log message describing latest changes'], ['u', 'unmodified', 'include unmodified components (by default, only new and modified components are tagged)'], ['', 'editor [editor]', 'open an editor to write a tag message for each component. optionally, specify the editor-name (defaults to vim).'], ['v', 'ver <version>', 'tag with the given version'], ['l', 'increment <level>', `options are: [${RELEASE_TYPES.join(', ')}], default to patch`], ['', 'prerelease-id <id>', 'prerelease identifier (e.g. "dev" to get "1.0.0-dev.1")'], ['p', 'patch', 'syntactic sugar for "--increment patch"'], ['', 'minor', 'syntactic sugar for "--increment minor"'], ['', 'major', 'syntactic sugar for "--increment major"'], ['', 'pre-release [identifier]', 'syntactic sugar for "--increment prerelease" and `--prerelease-id <identifier>`'], ['', 'snapped', 'tag only components whose head is a snap (not a tag)'], ['', 'unmerged', 'complete a merge process by tagging the unmerged components'], ['', 'skip-tests', 'skip running component tests during tag process'], ['', 'skip-auto-tag', 'skip auto tagging dependents'], ['', 'soft', 'do not persist. only keep note of the changes to be made'], ['', 'persist', 'persist the changes generated by --soft tag'], ['', 'disable-tag-pipeline', 'skip the tag pipeline to avoid publishing the components'], ['', 'force-deploy', 'DEPRECATED. use --ignore-build-error instead'], ['', 'ignore-build-errors', 'proceed to tag pipeline even when build pipeline fails'], ['', 'increment-by <number>', '(default to 1) increment semver flag (patch/minor/major) by. e.g. incrementing patch by 2: 0.0.1 -> 0.0.3.'], ['i', 'ignore-issues [issues]', `ignore component issues (shown in "bit status" as "issues found"), issues to ignore:
78
72
  [${Object.keys(_componentIssues().IssuesClasses).join(', ')}]
79
73
  to ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify "*".`], ['I', 'ignore-newest-version', 'allow tagging even when the component has newer versions e.g. for hotfixes (default = false)'], ['', 'fail-fast', 'stop pipeline execution on the first failed task (by default a task is skipped only when its dependency failed)'], ['b', 'build', 'not needed for now. run the pipeline build and complete the tag'], ['a', 'all [version]', 'DEPRECATED (not needed anymore, it is the default now). tag all new and modified components'], ['s', 'scope [version]', 'DEPRECATED (use "--unmodified" instead). tag all components of the local scope'], ['f', 'force', 'DEPRECATED (use "--skip-tests", "--ignore-build-errors" or "--unmodified" instead). force-tag even if tests are failing and even when component has not changed'], ['', 'disable-deploy-pipeline', 'DEPRECATED. use --disable-tag-pipeline instead']]);
80
- (0, _defineProperty2().default)(this, "migration", true);
81
- (0, _defineProperty2().default)(this, "remoteOp", true);
74
+ _defineProperty(this, "migration", true);
75
+ _defineProperty(this, "remoteOp", true);
82
76
  // In case a compiler / tester is not installed
83
- (0, _defineProperty2().default)(this, "examples", [{
77
+ _defineProperty(this, "examples", [{
84
78
  cmd: 'tag --ver 1.0.0',
85
79
  description: 'tag all components to version 1.0.0'
86
80
  }]);
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_featureToggle","_tag","_constants","_componentIssues","_bitError","RELEASE_TYPES","TagCmd","constructor","snapping","logger","_defineProperty2","default","name","description","COMPONENT_PATTERN_HELP","join","Object","keys","IssuesClasses","cmd","report","patterns","message","ver","all","editor","snapped","unmerged","patch","minor","major","preRelease","increment","prereleaseId","force","ignoreUnresolvedDependencies","ignoreIssues","ignoreNewestVersion","skipTests","skipAutoTag","scope","unmodified","build","soft","persist","disableDeployPipeline","disableTagPipeline","forceDeploy","ignoreBuildErrors","failFast","incrementBy","BitError","consoleWarning","length","releaseFlags","filter","x","getReleaseType","includes","DEFAULT_BIT_RELEASE_TYPE","getPreReleaseId","undefined","disableTagAndSnapPipelines","isFeatureEnabled","BUILD_ON_CI","Boolean","params","ids","releaseType","preReleaseId","version","results","tag","chalk","yellow","NOTHING_TO_TAG_MSG","taggedComponents","autoTaggedResults","warnings","newComponents","removedComponents","changedComponents","component","searchWithoutVersion","id","addedComponents","autoTaggedCount","warningsOutput","tagExplanationPersist","tagExplanationSoft","tagExplanation","isSoftTag","compInBold","hasVersion","bold","toStringWithoutVersion","outputComponents","comps","map","componentOutput","autoTag","result","triggeredBy","searchWithoutScopeAndVersion","autoTagComp","a","AUTO_TAGGED_MSG","publishOutput","publishedPackages","successTitle","green","successCompsStr","successOutput","softTagPrefix","outputIfExists","label","explanation","components","underline","newDesc","changedDesc","softTagClarification","outputIdsIfExists","exports"],"sources":["tag-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { BitIds } from '@teambit/legacy/dist/bit-id';\nimport { isFeatureEnabled, BUILD_ON_CI } from '@teambit/legacy/dist/api/consumer/lib/feature-toggle';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { NOTHING_TO_TAG_MSG, AUTO_TAGGED_MSG } from '@teambit/legacy/dist/api/consumer/lib/tag';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport { DEFAULT_BIT_RELEASE_TYPE, COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport { ReleaseType } from 'semver';\nimport { BitError } from '@teambit/bit-error';\nimport { Logger } from '@teambit/logger';\nimport { TagResults, SnappingMain } from './snapping.main.runtime';\nimport { BasicTagParams } from './tag-model-component';\n\nconst RELEASE_TYPES = ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'];\n\nexport class TagCmd implements Command {\n name = 'tag [component-patterns...]';\n group = 'development';\n description = 'create an immutable and exportable component snapshot, tagged with a release version.';\n extendedDescription = `if no patterns are provided, it will tag all new and modified components.\nif patterns are entered, you can specify a version per pattern using \"@\" sign, e.g. bit tag foo@1.0.0 bar@minor baz@major`;\n arguments = [\n {\n name: 'component-patterns...',\n description: `${COMPONENT_PATTERN_HELP}. By default, all new and modified are tagged.`,\n },\n ];\n helpUrl = 'reference/components/snaps#create-a-tag-(release-version)';\n alias = 't';\n loader = true;\n options = [\n ['m', 'message <message>', 'a log message describing latest changes'],\n ['u', 'unmodified', 'include unmodified components (by default, only new and modified components are tagged)'],\n [\n '',\n 'editor [editor]',\n 'open an editor to write a tag message for each component. optionally, specify the editor-name (defaults to vim).',\n ],\n ['v', 'ver <version>', 'tag with the given version'],\n ['l', 'increment <level>', `options are: [${RELEASE_TYPES.join(', ')}], default to patch`],\n ['', 'prerelease-id <id>', 'prerelease identifier (e.g. \"dev\" to get \"1.0.0-dev.1\")'],\n ['p', 'patch', 'syntactic sugar for \"--increment patch\"'],\n ['', 'minor', 'syntactic sugar for \"--increment minor\"'],\n ['', 'major', 'syntactic sugar for \"--increment major\"'],\n ['', 'pre-release [identifier]', 'syntactic sugar for \"--increment prerelease\" and `--prerelease-id <identifier>`'],\n ['', 'snapped', 'tag only components whose head is a snap (not a tag)'],\n ['', 'unmerged', 'complete a merge process by tagging the unmerged components'],\n ['', 'skip-tests', 'skip running component tests during tag process'],\n ['', 'skip-auto-tag', 'skip auto tagging dependents'],\n ['', 'soft', 'do not persist. only keep note of the changes to be made'],\n ['', 'persist', 'persist the changes generated by --soft tag'],\n ['', 'disable-tag-pipeline', 'skip the tag pipeline to avoid publishing the components'],\n ['', 'force-deploy', 'DEPRECATED. use --ignore-build-error instead'],\n ['', 'ignore-build-errors', 'proceed to tag pipeline even when build pipeline fails'],\n [\n '',\n 'increment-by <number>',\n '(default to 1) increment semver flag (patch/minor/major) by. e.g. incrementing patch by 2: 0.0.1 -> 0.0.3.',\n ],\n [\n 'i',\n 'ignore-issues [issues]',\n `ignore component issues (shown in \"bit status\" as \"issues found\"), issues to ignore:\n[${Object.keys(IssuesClasses).join(', ')}]\nto ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify \"*\".`,\n ],\n [\n 'I',\n 'ignore-newest-version',\n 'allow tagging even when the component has newer versions e.g. for hotfixes (default = false)',\n ],\n [\n '',\n 'fail-fast',\n 'stop pipeline execution on the first failed task (by default a task is skipped only when its dependency failed)',\n ],\n ['b', 'build', 'not needed for now. run the pipeline build and complete the tag'],\n [\n 'a',\n 'all [version]',\n 'DEPRECATED (not needed anymore, it is the default now). tag all new and modified components',\n ],\n ['s', 'scope [version]', 'DEPRECATED (use \"--unmodified\" instead). tag all components of the local scope'],\n [\n 'f',\n 'force',\n 'DEPRECATED (use \"--skip-tests\", \"--ignore-build-errors\" or \"--unmodified\" instead). force-tag even if tests are failing and even when component has not changed',\n ],\n ['', 'disable-deploy-pipeline', 'DEPRECATED. use --disable-tag-pipeline instead'],\n ] as CommandOptions;\n migration = true;\n remoteOp = true; // In case a compiler / tester is not installed\n examples = [{ cmd: 'tag --ver 1.0.0', description: 'tag all components to version 1.0.0' }];\n\n constructor(private snapping: SnappingMain, private logger: Logger) {}\n\n // eslint-disable-next-line complexity\n async report(\n [patterns = []]: [string[]],\n {\n message = '',\n ver,\n all = false,\n editor = '',\n snapped = false,\n unmerged = false,\n patch,\n minor,\n major,\n preRelease,\n increment,\n prereleaseId,\n force = false,\n ignoreUnresolvedDependencies,\n ignoreIssues,\n ignoreNewestVersion = false,\n skipTests = false,\n skipAutoTag = false,\n scope,\n unmodified = false,\n build,\n soft = false,\n persist = false,\n disableDeployPipeline = false,\n disableTagPipeline = false,\n forceDeploy = false,\n ignoreBuildErrors = false,\n failFast = false,\n incrementBy = 1,\n }: {\n all?: boolean | string;\n snapped?: boolean;\n unmerged?: boolean;\n ver?: string;\n force?: boolean;\n patch?: boolean;\n minor?: boolean;\n major?: boolean;\n increment?: ReleaseType;\n preRelease?: string;\n prereleaseId?: string;\n ignoreUnresolvedDependencies?: boolean;\n ignoreIssues?: string;\n scope?: string | boolean;\n incrementBy?: number;\n disableDeployPipeline?: boolean;\n failFast?: boolean;\n disableTagPipeline?: boolean;\n forceDeploy?: boolean;\n } & Partial<BasicTagParams>\n ): Promise<string> {\n if (typeof ignoreUnresolvedDependencies === 'boolean') {\n throw new BitError(`--ignore-unresolved-dependencies has been removed, please use --ignore-issues instead`);\n }\n if (ignoreIssues && typeof ignoreIssues === 'boolean') {\n throw new BitError(`--ignore-issues expects issues to be ignored, please run \"bit tag -h\" for the issues list`);\n }\n if (disableDeployPipeline) {\n this.logger.consoleWarning(`--disable-deploy-pipeline is deprecated, please use --disable-tag-pipeline instead`);\n }\n if (!message && !persist && !editor) {\n this.logger.consoleWarning(\n `--message will be mandatory in the next few releases. make sure to add a message with your tag`\n );\n }\n if (all) {\n this.logger.consoleWarning(\n `--all is deprecated, please omit it. \"bit tag\" will by default tag all new and modified components`\n );\n if (typeof all === 'string') {\n ver = all;\n }\n }\n if (scope) {\n this.logger.consoleWarning(`--scope is deprecated, use --unmodified instead`);\n unmodified = true;\n if (typeof scope === 'string') {\n ver = scope;\n }\n }\n if (force) {\n this.logger.consoleWarning(\n `--force is deprecated, use either --skip-tests, --ignore-build-errors or --unmodified depending on the use case`\n );\n if (patterns.length) unmodified = true;\n }\n if (prereleaseId && (!increment || increment === 'major' || increment === 'minor' || increment === 'patch')) {\n throw new BitError(\n `--prerelease-id should be entered along with --increment flag, while --increment must be one of the following: [prepatch, prerelease, preminor, premajor]`\n );\n }\n if (forceDeploy) {\n this.logger.consoleWarning(`--force-deploy is deprecated, use --ignore-build-errors instead`);\n ignoreBuildErrors = true;\n }\n\n const releaseFlags = [patch, minor, major, preRelease].filter((x) => x);\n if (releaseFlags.length > 1) {\n throw new BitError('you can use only one of the following - patch, minor, major, pre-release');\n }\n\n const getReleaseType = (): ReleaseType => {\n if (increment) {\n if (!RELEASE_TYPES.includes(increment)) {\n throw new BitError(`invalid increment-level \"${increment}\".\n semver allows the following options only: ${RELEASE_TYPES.join(', ')}`);\n }\n return increment;\n }\n if (major) return 'major';\n if (minor) return 'minor';\n if (patch) return 'patch';\n if (preRelease) return 'prerelease';\n return DEFAULT_BIT_RELEASE_TYPE;\n };\n const getPreReleaseId = (): string | undefined => {\n if (prereleaseId) {\n return prereleaseId;\n }\n if (preRelease && typeof preRelease === 'string') {\n return preRelease;\n }\n return undefined;\n };\n\n const disableTagAndSnapPipelines = disableTagPipeline || disableDeployPipeline;\n build = isFeatureEnabled(BUILD_ON_CI) ? Boolean(build) : true;\n\n const params = {\n ids: patterns,\n snapped,\n unmerged,\n editor,\n message,\n releaseType: getReleaseType(),\n preReleaseId: getPreReleaseId(),\n ignoreIssues,\n ignoreNewestVersion,\n skipTests,\n skipAutoTag,\n build,\n soft,\n persist,\n unmodified,\n disableTagAndSnapPipelines,\n ignoreBuildErrors,\n incrementBy,\n version: ver,\n failFast,\n };\n\n const results = await this.snapping.tag(params);\n if (!results) return chalk.yellow(NOTHING_TO_TAG_MSG);\n const { taggedComponents, autoTaggedResults, warnings, newComponents, removedComponents }: TagResults = results;\n const changedComponents = taggedComponents.filter((component) => !newComponents.searchWithoutVersion(component.id));\n const addedComponents = taggedComponents.filter((component) => newComponents.searchWithoutVersion(component.id));\n const autoTaggedCount = autoTaggedResults ? autoTaggedResults.length : 0;\n\n const warningsOutput = warnings && warnings.length ? `${chalk.yellow(warnings.join('\\n'))}\\n\\n` : '';\n const tagExplanationPersist = `\\n(use \"bit export\" to push these components to a remote\")\n(use \"bit reset\" to unstage versions)\\n`;\n const tagExplanationSoft = `\\n(use \"bit tag --persist\" to persist the soft-tagged changes as a fully tagged version\")\n(use \"bit reset --soft\" to remove the soft-tags)\\n`;\n\n const tagExplanation = results.isSoftTag ? tagExplanationSoft : tagExplanationPersist;\n\n const compInBold = (id: BitId) => {\n const version = id.hasVersion() ? `@${id.version}` : '';\n return `${chalk.bold(id.toStringWithoutVersion())}${version}`;\n };\n\n const outputComponents = (comps: ConsumerComponent[]) => {\n return comps\n .map((component) => {\n let componentOutput = ` > ${compInBold(component.id)}`;\n const autoTag = autoTaggedResults.filter((result) =>\n result.triggeredBy.searchWithoutScopeAndVersion(component.id)\n );\n if (autoTag.length) {\n const autoTagComp = autoTag.map((a) => compInBold(a.component.id));\n componentOutput += `\\n ${AUTO_TAGGED_MSG}:\n ${autoTagComp.join('\\n ')}`;\n }\n return componentOutput;\n })\n .join('\\n');\n };\n\n const publishOutput = () => {\n const { publishedPackages } = results;\n if (!publishedPackages || !publishedPackages.length) return '';\n const successTitle = `\\n\\n${chalk.green(\n `published the following ${publishedPackages.length} component(s) successfully\\n`\n )}`;\n const successCompsStr = publishedPackages.join('\\n');\n const successOutput = successCompsStr ? successTitle + successCompsStr : '';\n return successOutput;\n };\n\n const softTagPrefix = results.isSoftTag ? 'soft-tagged ' : '';\n const outputIfExists = (label, explanation, components: ConsumerComponent[]) => {\n if (!components.length) return '';\n return `\\n${chalk.underline(softTagPrefix + label)}\\n(${explanation})\\n${outputComponents(components)}\\n`;\n };\n\n const newDesc = results.isSoftTag\n ? 'set to be tagged with first version for components when persisted'\n : 'first version for components';\n const changedDesc = results.isSoftTag\n ? 'components that are set to get a version bump when persisted'\n : 'components that got a version bump';\n const softTagClarification = results.isSoftTag\n ? chalk.bold(\n 'keep in mind that this is a soft-tag (changes recorded to be tagged), to persist the changes use --persist flag'\n )\n : '';\n return (\n warningsOutput +\n chalk.green(\n `${taggedComponents.length + autoTaggedCount} component(s) ${results.isSoftTag ? 'soft-' : ''}tagged`\n ) +\n tagExplanation +\n outputIfExists('new components', newDesc, addedComponents) +\n outputIfExists('changed components', changedDesc, changedComponents) +\n outputIdsIfExists('removed components', removedComponents) +\n publishOutput() +\n softTagClarification\n );\n }\n}\n\nexport function outputIdsIfExists(label: string, ids?: BitIds) {\n if (!ids?.length) return '';\n return `\\n${chalk.underline(label)}\\n${ids.map((id) => id.toStringWithoutVersion()).join('\\n')}\\n`;\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ElC,eAAe,CAAC,GAC1D6B,cAAc,CAAC,oBAAoB,EAAEM,WAAW,EAAEvC,iBAAiB,CAAC,GACpEyC,iBAAiB,CAAC,oBAAoB,EAAE1C,iBAAiB,CAAC,GAC1D2B,aAAa,CAAC,CAAC,GACfc,oBAAoB;EAExB;AACF;AAACE,OAAA,CAAArH,MAAA,GAAAA,MAAA;AAEM,SAASoH,iBAAiBA,CAACP,KAAa,EAAEhD,GAAY,EAAE;EAC7D,IAAI,EAACA,GAAG,aAAHA,GAAG,eAAHA,GAAG,CAAEd,MAAM,GAAE,OAAO,EAAE;EAC3B,OAAQ,KAAIoB,gBAAK,CAAC6C,SAAS,CAACH,KAAK,CAAE,KAAIhD,GAAG,CAAC+B,GAAG,CAAEd,EAAE,IAAKA,EAAE,CAACW,sBAAsB,CAAC,CAAC,CAAC,CAAChF,IAAI,CAAC,IAAI,CAAE,IAAG;AACpG"}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_featureToggle","_tag","_constants","_componentIssues","_bitError","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","RELEASE_TYPES","TagCmd","constructor","snapping","logger","name","description","COMPONENT_PATTERN_HELP","join","keys","IssuesClasses","cmd","report","patterns","message","ver","all","editor","snapped","unmerged","patch","minor","major","preRelease","increment","prereleaseId","force","ignoreUnresolvedDependencies","ignoreIssues","ignoreNewestVersion","skipTests","skipAutoTag","scope","unmodified","build","soft","persist","disableDeployPipeline","disableTagPipeline","forceDeploy","ignoreBuildErrors","failFast","incrementBy","BitError","consoleWarning","length","releaseFlags","filter","x","getReleaseType","includes","DEFAULT_BIT_RELEASE_TYPE","getPreReleaseId","disableTagAndSnapPipelines","isFeatureEnabled","BUILD_ON_CI","Boolean","params","ids","releaseType","preReleaseId","version","results","tag","chalk","yellow","NOTHING_TO_TAG_MSG","taggedComponents","autoTaggedResults","warnings","newComponents","removedComponents","changedComponents","component","searchWithoutVersion","id","addedComponents","autoTaggedCount","warningsOutput","tagExplanationPersist","tagExplanationSoft","tagExplanation","isSoftTag","compInBold","hasVersion","bold","toStringWithoutVersion","outputComponents","comps","map","componentOutput","autoTag","result","triggeredBy","searchWithoutScopeAndVersion","autoTagComp","a","AUTO_TAGGED_MSG","publishOutput","publishedPackages","successTitle","green","successCompsStr","successOutput","softTagPrefix","outputIfExists","label","explanation","components","underline","newDesc","changedDesc","softTagClarification","outputIdsIfExists","exports"],"sources":["tag-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { BitIds } from '@teambit/legacy/dist/bit-id';\nimport { isFeatureEnabled, BUILD_ON_CI } from '@teambit/legacy/dist/api/consumer/lib/feature-toggle';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { NOTHING_TO_TAG_MSG, AUTO_TAGGED_MSG } from '@teambit/legacy/dist/api/consumer/lib/tag';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport { DEFAULT_BIT_RELEASE_TYPE, COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { BitId } from '@teambit/legacy-bit-id';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport { ReleaseType } from 'semver';\nimport { BitError } from '@teambit/bit-error';\nimport { Logger } from '@teambit/logger';\nimport { TagResults, SnappingMain } from './snapping.main.runtime';\nimport { BasicTagParams } from './tag-model-component';\n\nconst RELEASE_TYPES = ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'];\n\nexport class TagCmd implements Command {\n name = 'tag [component-patterns...]';\n group = 'development';\n description = 'create an immutable and exportable component snapshot, tagged with a release version.';\n extendedDescription = `if no patterns are provided, it will tag all new and modified components.\nif patterns are entered, you can specify a version per pattern using \"@\" sign, e.g. bit tag foo@1.0.0 bar@minor baz@major`;\n arguments = [\n {\n name: 'component-patterns...',\n description: `${COMPONENT_PATTERN_HELP}. By default, all new and modified are tagged.`,\n },\n ];\n helpUrl = 'reference/components/snaps#create-a-tag-(release-version)';\n alias = 't';\n loader = true;\n options = [\n ['m', 'message <message>', 'a log message describing latest changes'],\n ['u', 'unmodified', 'include unmodified components (by default, only new and modified components are tagged)'],\n [\n '',\n 'editor [editor]',\n 'open an editor to write a tag message for each component. optionally, specify the editor-name (defaults to vim).',\n ],\n ['v', 'ver <version>', 'tag with the given version'],\n ['l', 'increment <level>', `options are: [${RELEASE_TYPES.join(', ')}], default to patch`],\n ['', 'prerelease-id <id>', 'prerelease identifier (e.g. \"dev\" to get \"1.0.0-dev.1\")'],\n ['p', 'patch', 'syntactic sugar for \"--increment patch\"'],\n ['', 'minor', 'syntactic sugar for \"--increment minor\"'],\n ['', 'major', 'syntactic sugar for \"--increment major\"'],\n ['', 'pre-release [identifier]', 'syntactic sugar for \"--increment prerelease\" and `--prerelease-id <identifier>`'],\n ['', 'snapped', 'tag only components whose head is a snap (not a tag)'],\n ['', 'unmerged', 'complete a merge process by tagging the unmerged components'],\n ['', 'skip-tests', 'skip running component tests during tag process'],\n ['', 'skip-auto-tag', 'skip auto tagging dependents'],\n ['', 'soft', 'do not persist. only keep note of the changes to be made'],\n ['', 'persist', 'persist the changes generated by --soft tag'],\n ['', 'disable-tag-pipeline', 'skip the tag pipeline to avoid publishing the components'],\n ['', 'force-deploy', 'DEPRECATED. use --ignore-build-error instead'],\n ['', 'ignore-build-errors', 'proceed to tag pipeline even when build pipeline fails'],\n [\n '',\n 'increment-by <number>',\n '(default to 1) increment semver flag (patch/minor/major) by. e.g. incrementing patch by 2: 0.0.1 -> 0.0.3.',\n ],\n [\n 'i',\n 'ignore-issues [issues]',\n `ignore component issues (shown in \"bit status\" as \"issues found\"), issues to ignore:\n[${Object.keys(IssuesClasses).join(', ')}]\nto ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify \"*\".`,\n ],\n [\n 'I',\n 'ignore-newest-version',\n 'allow tagging even when the component has newer versions e.g. for hotfixes (default = false)',\n ],\n [\n '',\n 'fail-fast',\n 'stop pipeline execution on the first failed task (by default a task is skipped only when its dependency failed)',\n ],\n ['b', 'build', 'not needed for now. run the pipeline build and complete the tag'],\n [\n 'a',\n 'all [version]',\n 'DEPRECATED (not needed anymore, it is the default now). tag all new and modified components',\n ],\n ['s', 'scope [version]', 'DEPRECATED (use \"--unmodified\" instead). tag all components of the local scope'],\n [\n 'f',\n 'force',\n 'DEPRECATED (use \"--skip-tests\", \"--ignore-build-errors\" or \"--unmodified\" instead). force-tag even if tests are failing and even when component has not changed',\n ],\n ['', 'disable-deploy-pipeline', 'DEPRECATED. use --disable-tag-pipeline instead'],\n ] as CommandOptions;\n migration = true;\n remoteOp = true; // In case a compiler / tester is not installed\n examples = [{ cmd: 'tag --ver 1.0.0', description: 'tag all components to version 1.0.0' }];\n\n constructor(private snapping: SnappingMain, private logger: Logger) {}\n\n // eslint-disable-next-line complexity\n async report(\n [patterns = []]: [string[]],\n {\n message = '',\n ver,\n all = false,\n editor = '',\n snapped = false,\n unmerged = false,\n patch,\n minor,\n major,\n preRelease,\n increment,\n prereleaseId,\n force = false,\n ignoreUnresolvedDependencies,\n ignoreIssues,\n ignoreNewestVersion = false,\n skipTests = false,\n skipAutoTag = false,\n scope,\n unmodified = false,\n build,\n soft = false,\n persist = false,\n disableDeployPipeline = false,\n disableTagPipeline = false,\n forceDeploy = false,\n ignoreBuildErrors = false,\n failFast = false,\n incrementBy = 1,\n }: {\n all?: boolean | string;\n snapped?: boolean;\n unmerged?: boolean;\n ver?: string;\n force?: boolean;\n patch?: boolean;\n minor?: boolean;\n major?: boolean;\n increment?: ReleaseType;\n preRelease?: string;\n prereleaseId?: string;\n ignoreUnresolvedDependencies?: boolean;\n ignoreIssues?: string;\n scope?: string | boolean;\n incrementBy?: number;\n disableDeployPipeline?: boolean;\n failFast?: boolean;\n disableTagPipeline?: boolean;\n forceDeploy?: boolean;\n } & Partial<BasicTagParams>\n ): Promise<string> {\n if (typeof ignoreUnresolvedDependencies === 'boolean') {\n throw new BitError(`--ignore-unresolved-dependencies has been removed, please use --ignore-issues instead`);\n }\n if (ignoreIssues && typeof ignoreIssues === 'boolean') {\n throw new BitError(`--ignore-issues expects issues to be ignored, please run \"bit tag -h\" for the issues list`);\n }\n if (disableDeployPipeline) {\n this.logger.consoleWarning(`--disable-deploy-pipeline is deprecated, please use --disable-tag-pipeline instead`);\n }\n if (!message && !persist && !editor) {\n this.logger.consoleWarning(\n `--message will be mandatory in the next few releases. make sure to add a message with your tag`\n );\n }\n if (all) {\n this.logger.consoleWarning(\n `--all is deprecated, please omit it. \"bit tag\" will by default tag all new and modified components`\n );\n if (typeof all === 'string') {\n ver = all;\n }\n }\n if (scope) {\n this.logger.consoleWarning(`--scope is deprecated, use --unmodified instead`);\n unmodified = true;\n if (typeof scope === 'string') {\n ver = scope;\n }\n }\n if (force) {\n this.logger.consoleWarning(\n `--force is deprecated, use either --skip-tests, --ignore-build-errors or --unmodified depending on the use case`\n );\n if (patterns.length) unmodified = true;\n }\n if (prereleaseId && (!increment || increment === 'major' || increment === 'minor' || increment === 'patch')) {\n throw new BitError(\n `--prerelease-id should be entered along with --increment flag, while --increment must be one of the following: [prepatch, prerelease, preminor, premajor]`\n );\n }\n if (forceDeploy) {\n this.logger.consoleWarning(`--force-deploy is deprecated, use --ignore-build-errors instead`);\n ignoreBuildErrors = true;\n }\n\n const releaseFlags = [patch, minor, major, preRelease].filter((x) => x);\n if (releaseFlags.length > 1) {\n throw new BitError('you can use only one of the following - patch, minor, major, pre-release');\n }\n\n const getReleaseType = (): ReleaseType => {\n if (increment) {\n if (!RELEASE_TYPES.includes(increment)) {\n throw new BitError(`invalid increment-level \"${increment}\".\n semver allows the following options only: ${RELEASE_TYPES.join(', ')}`);\n }\n return increment;\n }\n if (major) return 'major';\n if (minor) return 'minor';\n if (patch) return 'patch';\n if (preRelease) return 'prerelease';\n return DEFAULT_BIT_RELEASE_TYPE;\n };\n const getPreReleaseId = (): string | undefined => {\n if (prereleaseId) {\n return prereleaseId;\n }\n if (preRelease && typeof preRelease === 'string') {\n return preRelease;\n }\n return undefined;\n };\n\n const disableTagAndSnapPipelines = disableTagPipeline || disableDeployPipeline;\n build = isFeatureEnabled(BUILD_ON_CI) ? Boolean(build) : true;\n\n const params = {\n ids: patterns,\n snapped,\n unmerged,\n editor,\n message,\n releaseType: getReleaseType(),\n preReleaseId: getPreReleaseId(),\n ignoreIssues,\n ignoreNewestVersion,\n skipTests,\n skipAutoTag,\n build,\n soft,\n persist,\n unmodified,\n disableTagAndSnapPipelines,\n ignoreBuildErrors,\n incrementBy,\n version: ver,\n failFast,\n };\n\n const results = await this.snapping.tag(params);\n if (!results) return chalk.yellow(NOTHING_TO_TAG_MSG);\n const { taggedComponents, autoTaggedResults, warnings, newComponents, removedComponents }: TagResults = results;\n const changedComponents = taggedComponents.filter((component) => !newComponents.searchWithoutVersion(component.id));\n const addedComponents = taggedComponents.filter((component) => newComponents.searchWithoutVersion(component.id));\n const autoTaggedCount = autoTaggedResults ? autoTaggedResults.length : 0;\n\n const warningsOutput = warnings && warnings.length ? `${chalk.yellow(warnings.join('\\n'))}\\n\\n` : '';\n const tagExplanationPersist = `\\n(use \"bit export\" to push these components to a remote\")\n(use \"bit reset\" to unstage versions)\\n`;\n const tagExplanationSoft = `\\n(use \"bit tag --persist\" to persist the soft-tagged changes as a fully tagged version\")\n(use \"bit reset --soft\" to remove the soft-tags)\\n`;\n\n const tagExplanation = results.isSoftTag ? tagExplanationSoft : tagExplanationPersist;\n\n const compInBold = (id: BitId) => {\n const version = id.hasVersion() ? `@${id.version}` : '';\n return `${chalk.bold(id.toStringWithoutVersion())}${version}`;\n };\n\n const outputComponents = (comps: ConsumerComponent[]) => {\n return comps\n .map((component) => {\n let componentOutput = ` > ${compInBold(component.id)}`;\n const autoTag = autoTaggedResults.filter((result) =>\n result.triggeredBy.searchWithoutScopeAndVersion(component.id)\n );\n if (autoTag.length) {\n const autoTagComp = autoTag.map((a) => compInBold(a.component.id));\n componentOutput += `\\n ${AUTO_TAGGED_MSG}:\n ${autoTagComp.join('\\n ')}`;\n }\n return componentOutput;\n })\n .join('\\n');\n };\n\n const publishOutput = () => {\n const { publishedPackages } = results;\n if (!publishedPackages || !publishedPackages.length) return '';\n const successTitle = `\\n\\n${chalk.green(\n `published the following ${publishedPackages.length} component(s) successfully\\n`\n )}`;\n const successCompsStr = publishedPackages.join('\\n');\n const successOutput = successCompsStr ? successTitle + successCompsStr : '';\n return successOutput;\n };\n\n const softTagPrefix = results.isSoftTag ? 'soft-tagged ' : '';\n const outputIfExists = (label, explanation, components: ConsumerComponent[]) => {\n if (!components.length) return '';\n return `\\n${chalk.underline(softTagPrefix + label)}\\n(${explanation})\\n${outputComponents(components)}\\n`;\n };\n\n const newDesc = results.isSoftTag\n ? 'set to be tagged with first version for components when persisted'\n : 'first version for components';\n const changedDesc = results.isSoftTag\n ? 'components that are set to get a version bump when persisted'\n : 'components that got a version bump';\n const softTagClarification = results.isSoftTag\n ? chalk.bold(\n 'keep in mind that this is a soft-tag (changes recorded to be tagged), to persist the changes use --persist flag'\n )\n : '';\n return (\n warningsOutput +\n chalk.green(\n `${taggedComponents.length + autoTaggedCount} component(s) ${results.isSoftTag ? 'soft-' : ''}tagged`\n ) +\n tagExplanation +\n outputIfExists('new components', newDesc, addedComponents) +\n outputIfExists('changed components', changedDesc, changedComponents) +\n outputIdsIfExists('removed components', removedComponents) +\n publishOutput() +\n softTagClarification\n );\n }\n}\n\nexport function outputIdsIfExists(label: string, ids?: BitIds) {\n if (!ids?.length) return '';\n return `\\n${chalk.underline(label)}\\n${ids.map((id) => id.toStringWithoutVersion()).join('\\n')}\\n`;\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,eAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAA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D,OAAO,CAACoB,SAAS,GACjC,8DAA8D,GAC9D,oCAAoC;IACxC,MAAM8B,oBAAoB,GAAGlD,OAAO,CAACoB,SAAS,GAC1ClB,gBAAK,CAACqB,IAAI,CACR,iHACF,CAAC,GACD,EAAE;IACN,OACEP,cAAc,GACdd,gBAAK,CAACqC,KAAK,CACR,GAAElC,gBAAgB,CAACtB,MAAM,GAAGgC,eAAgB,iBAAgBf,OAAO,CAACoB,SAAS,GAAG,OAAO,GAAG,EAAG,QAChG,CAAC,GACDD,cAAc,GACdwB,cAAc,CAAC,gBAAgB,EAAEK,OAAO,EAAElC,eAAe,CAAC,GAC1D6B,cAAc,CAAC,oBAAoB,EAAEM,WAAW,EAAEvC,iBAAiB,CAAC,GACpEyC,iBAAiB,CAAC,oBAAoB,EAAE1C,iBAAiB,CAAC,GAC1D2B,aAAa,CAAC,CAAC,GACfc,oBAAoB;EAExB;AACF;AAACE,OAAA,CAAAjH,MAAA,GAAAA,MAAA;AAEM,SAASgH,iBAAiBA,CAACP,KAAa,EAAEhD,GAAY,EAAE;EAC7D,IAAI,EAACA,GAAG,aAAHA,GAAG,eAAHA,GAAG,CAAEb,MAAM,GAAE,OAAO,EAAE;EAC3B,OAAQ,KAAImB,gBAAK,CAAC6C,SAAS,CAACH,KAAK,CAAE,KAAIhD,GAAG,CAAC+B,GAAG,CAAEd,EAAE,IAAKA,EAAE,CAACW,sBAAsB,CAAC,CAAC,CAAC,CAAC9E,IAAI,CAAC,IAAI,CAAE,IAAG;AACpG"}
@@ -1,19 +1,9 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- require("core-js/modules/es.array.iterator.js");
5
- require("core-js/modules/es.promise.js");
6
3
  Object.defineProperty(exports, "__esModule", {
7
4
  value: true
8
5
  });
9
6
  exports.TagFromScopeCmd = void 0;
10
- function _defineProperty2() {
11
- const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
12
- _defineProperty2 = function () {
13
- return data;
14
- };
15
- return data;
16
- }
17
7
  function _chalk() {
18
8
  const data = _interopRequireDefault(require("chalk"));
19
9
  _chalk = function () {
@@ -56,6 +46,10 @@ function _bitError() {
56
46
  };
57
47
  return data;
58
48
  }
49
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
50
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
51
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
52
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
59
53
  const RELEASE_TYPES = ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'];
60
54
  class TagFromScopeCmd {
61
55
  // In case a compiler / tester is not installed
@@ -63,11 +57,11 @@ class TagFromScopeCmd {
63
57
  constructor(snapping, logger) {
64
58
  this.snapping = snapping;
65
59
  this.logger = logger;
66
- (0, _defineProperty2().default)(this, "name", '_tag <data>');
67
- (0, _defineProperty2().default)(this, "group", 'development');
68
- (0, _defineProperty2().default)(this, "private", true);
69
- (0, _defineProperty2().default)(this, "description", 'tag components from a bare-scope by using build artifacts from previous snap and running the deploy-pipeline only');
70
- (0, _defineProperty2().default)(this, "extendedDescription", `this command should be running from a new bare scope, it first imports the components it needs and then processes the tag.
60
+ _defineProperty(this, "name", '_tag <data>');
61
+ _defineProperty(this, "group", 'development');
62
+ _defineProperty(this, "private", true);
63
+ _defineProperty(this, "description", 'tag components from a bare-scope by using build artifacts from previous snap and running the deploy-pipeline only');
64
+ _defineProperty(this, "extendedDescription", `this command should be running from a new bare scope, it first imports the components it needs and then processes the tag.
71
65
  the input data is a stringified JSON of an array of the following object.
72
66
  {
73
67
  componentId: string; // ids always have scope, so it's safe to parse them from string
@@ -78,12 +72,12 @@ the input data is a stringified JSON of an array of the following object.
78
72
  }
79
73
  an example of the final data: '[{"componentId":"ci.remote2/comp-b","dependencies":["ci.remote/comp1@0.0.2"]}]'
80
74
  `);
81
- (0, _defineProperty2().default)(this, "alias", '');
82
- (0, _defineProperty2().default)(this, "loader", true);
83
- (0, _defineProperty2().default)(this, "options", [['', 'push', 'export the updated objects to the original scopes once done'], ['m', 'message <message>', 'a log message describing latest changes'], ['v', 'ver <version>', 'tag with the given version'], ['l', 'increment <level>', `options are: [${RELEASE_TYPES.join(', ')}], default to patch`], ['', 'prerelease-id <id>', 'prerelease identifier (e.g. "dev" to get "1.0.0-dev.1")'], ['p', 'patch', 'syntactic sugar for "--increment patch"'], ['', 'minor', 'syntactic sugar for "--increment minor"'], ['', 'major', 'syntactic sugar for "--increment major"'], ['', 'pre-release [identifier]', 'syntactic sugar for "--increment prerelease" and `--prerelease-id <identifier>`'], ['', 'skip-tests', 'skip running component tests during tag process'], ['', 'disable-tag-pipeline', 'skip the tag pipeline to avoid publishing the components'], ['', 'force-deploy', 'DEPRECATED. use --ignore-build-error instead'], ['', 'ignore-build-errors', 'run the tag pipeline although the build pipeline failed'], ['', 'increment-by <number>', '(default to 1) increment semver flag (patch/minor/major) by. e.g. incrementing patch by 2: 0.0.1 -> 0.0.3.'], ['i', 'ignore-issues [issues]', `ignore component issues (shown in "bit status" as "issues found"), issues to ignore:
75
+ _defineProperty(this, "alias", '');
76
+ _defineProperty(this, "loader", true);
77
+ _defineProperty(this, "options", [['', 'push', 'export the updated objects to the original scopes once done'], ['m', 'message <message>', 'a log message describing latest changes'], ['v', 'ver <version>', 'tag with the given version'], ['l', 'increment <level>', `options are: [${RELEASE_TYPES.join(', ')}], default to patch`], ['', 'prerelease-id <id>', 'prerelease identifier (e.g. "dev" to get "1.0.0-dev.1")'], ['p', 'patch', 'syntactic sugar for "--increment patch"'], ['', 'minor', 'syntactic sugar for "--increment minor"'], ['', 'major', 'syntactic sugar for "--increment major"'], ['', 'pre-release [identifier]', 'syntactic sugar for "--increment prerelease" and `--prerelease-id <identifier>`'], ['', 'skip-tests', 'skip running component tests during tag process'], ['', 'disable-tag-pipeline', 'skip the tag pipeline to avoid publishing the components'], ['', 'force-deploy', 'DEPRECATED. use --ignore-build-error instead'], ['', 'ignore-build-errors', 'run the tag pipeline although the build pipeline failed'], ['', 'increment-by <number>', '(default to 1) increment semver flag (patch/minor/major) by. e.g. incrementing patch by 2: 0.0.1 -> 0.0.3.'], ['i', 'ignore-issues [issues]', `ignore component issues (shown in "bit status" as "issues found"), issues to ignore:
84
78
  [${Object.keys(_componentIssues().IssuesClasses).join(', ')}]
85
79
  to ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify "*".`], ['I', 'ignore-newest-version', 'ignore existing of newer versions (default = false)']]);
86
- (0, _defineProperty2().default)(this, "remoteOp", true);
80
+ _defineProperty(this, "remoteOp", true);
87
81
  }
88
82
 
89
83
  // eslint-disable-next-line complexity
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_tag","_constants","_bootstrap","_componentIssues","_bitError","RELEASE_TYPES","TagFromScopeCmd","constructor","snapping","logger","_defineProperty2","default","join","Object","keys","IssuesClasses","report","push","message","ver","patch","minor","major","preRelease","increment","prereleaseId","ignoreIssues","ignoreNewestVersion","skipTests","disableTagPipeline","forceDeploy","ignoreBuildErrors","incrementBy","BitError","releaseFlags","filter","x","length","consoleWarning","getReleaseType","includes","DEFAULT_BIT_RELEASE_TYPE","getPreReleaseId","undefined","params","releaseType","preReleaseId","build","persist","disableTagAndSnapPipelines","version","tagDataPerCompRaw","parseData","console","getHarmonyVersion","results","tagFromScope","chalk","yellow","NOTHING_TO_TAG_MSG","taggedComponents","autoTaggedResults","warnings","newComponents","changedComponents","component","searchWithoutVersion","id","addedComponents","autoTaggedCount","warningsOutput","tagExplanationPersist","tagExplanationSoft","tagExplanation","isSoftTag","outputComponents","comps","map","componentOutput","toString","autoTag","result","triggeredBy","searchWithoutScopeAndVersion","autoTagComp","a","AUTO_TAGGED_MSG","publishOutput","publishedPackages","successTitle","green","successCompsStr","successOutput","softTagPrefix","outputIfExists","label","explanation","components","underline","newDesc","changedDesc","softTagClarification","bold","dataParsed","JSON","parse","err","Error","Array","isArray","forEach","dataItem","componentId","exports"],"sources":["tag-from-scope.cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { NOTHING_TO_TAG_MSG, AUTO_TAGGED_MSG } from '@teambit/legacy/dist/api/consumer/lib/tag';\nimport { DEFAULT_BIT_RELEASE_TYPE } from '@teambit/legacy/dist/constants';\nimport { getHarmonyVersion } from '@teambit/legacy/dist/bootstrap';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport { ReleaseType } from 'semver';\nimport { BitError } from '@teambit/bit-error';\nimport { Logger } from '@teambit/logger';\nimport { SnappingMain, TagResults } from './snapping.main.runtime';\nimport { BasicTagParams } from './tag-model-component';\n\nconst RELEASE_TYPES = ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'];\n\nexport type TagDataPerCompRaw = {\n componentId: string;\n dependencies?: string[];\n versionToTag?: string;\n prereleaseId?: string;\n message?: string;\n};\n\nexport class TagFromScopeCmd implements Command {\n name = '_tag <data>';\n group = 'development';\n private = true;\n description =\n 'tag components from a bare-scope by using build artifacts from previous snap and running the deploy-pipeline only';\n extendedDescription = `this command should be running from a new bare scope, it first imports the components it needs and then processes the tag.\nthe input data is a stringified JSON of an array of the following object.\n{\n componentId: string; // ids always have scope, so it's safe to parse them from string\n dependencies?: string[]; // e.g. [teambit/compiler@1.0.0, teambit/tester@1.0.0]\n versionToTag?: string; // specific version (e.g. '1.0.0') or semver (e.g. 'minor', 'patch')\n prereleaseId?: string; // applicable when versionToTag is a pre-release. (e.g. \"dev\", for 1.0.0-dev.1)\n message?: string; // tag-message.\n}\nan example of the final data: '[{\"componentId\":\"ci.remote2/comp-b\",\"dependencies\":[\"ci.remote/comp1@0.0.2\"]}]'\n`;\n alias = '';\n loader = true;\n options = [\n ['', 'push', 'export the updated objects to the original scopes once done'],\n ['m', 'message <message>', 'a log message describing latest changes'],\n ['v', 'ver <version>', 'tag with the given version'],\n ['l', 'increment <level>', `options are: [${RELEASE_TYPES.join(', ')}], default to patch`],\n ['', 'prerelease-id <id>', 'prerelease identifier (e.g. \"dev\" to get \"1.0.0-dev.1\")'],\n ['p', 'patch', 'syntactic sugar for \"--increment patch\"'],\n ['', 'minor', 'syntactic sugar for \"--increment minor\"'],\n ['', 'major', 'syntactic sugar for \"--increment major\"'],\n ['', 'pre-release [identifier]', 'syntactic sugar for \"--increment prerelease\" and `--prerelease-id <identifier>`'],\n ['', 'skip-tests', 'skip running component tests during tag process'],\n ['', 'disable-tag-pipeline', 'skip the tag pipeline to avoid publishing the components'],\n ['', 'force-deploy', 'DEPRECATED. use --ignore-build-error instead'],\n ['', 'ignore-build-errors', 'run the tag pipeline although the build pipeline failed'],\n [\n '',\n 'increment-by <number>',\n '(default to 1) increment semver flag (patch/minor/major) by. e.g. incrementing patch by 2: 0.0.1 -> 0.0.3.',\n ],\n [\n 'i',\n 'ignore-issues [issues]',\n `ignore component issues (shown in \"bit status\" as \"issues found\"), issues to ignore:\n[${Object.keys(IssuesClasses).join(', ')}]\nto ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify \"*\".`,\n ],\n ['I', 'ignore-newest-version', 'ignore existing of newer versions (default = false)'],\n ] as CommandOptions;\n remoteOp = true; // In case a compiler / tester is not installed\n\n constructor(private snapping: SnappingMain, private logger: Logger) {}\n\n // eslint-disable-next-line complexity\n async report(\n [data]: [string],\n {\n push,\n message = '',\n ver,\n patch,\n minor,\n major,\n preRelease,\n increment,\n prereleaseId,\n ignoreIssues,\n ignoreNewestVersion = false,\n skipTests = false,\n disableTagPipeline = false,\n forceDeploy = false,\n ignoreBuildErrors = false,\n incrementBy = 1,\n }: {\n push?: boolean;\n ver?: string;\n patch?: boolean;\n minor?: boolean;\n major?: boolean;\n increment?: ReleaseType;\n preRelease?: string;\n prereleaseId?: string;\n ignoreIssues?: string;\n incrementBy?: number;\n forceDeploy?: boolean;\n disableTagPipeline?: boolean;\n } & Partial<BasicTagParams>\n ): Promise<string> {\n if (ignoreIssues && typeof ignoreIssues === 'boolean') {\n throw new BitError(`--ignore-issues expects issues to be ignored, please run \"bit tag -h\" for the issues list`);\n }\n if (prereleaseId && (!increment || increment === 'major' || increment === 'minor' || increment === 'patch')) {\n throw new BitError(\n `--prerelease-id should be entered along with --increment flag, while --increment must be one of the following: [prepatch, prerelease, preminor, premajor]`\n );\n }\n\n const releaseFlags = [patch, minor, major, preRelease].filter((x) => x);\n if (releaseFlags.length > 1) {\n throw new BitError('you can use only one of the following - patch, minor, major, pre-release');\n }\n if (forceDeploy) {\n this.logger.consoleWarning(`--force-deploy is deprecated, use --ignore-build-errors instead`);\n ignoreBuildErrors = true;\n }\n\n const getReleaseType = (): ReleaseType => {\n if (increment) {\n if (!RELEASE_TYPES.includes(increment)) {\n throw new BitError(`invalid increment-level \"${increment}\".\n semver allows the following options only: ${RELEASE_TYPES.join(', ')}`);\n }\n return increment;\n }\n if (major) return 'major';\n if (minor) return 'minor';\n if (patch) return 'patch';\n if (preRelease) return 'prerelease';\n return DEFAULT_BIT_RELEASE_TYPE;\n };\n const getPreReleaseId = (): string | undefined => {\n if (prereleaseId) {\n return prereleaseId;\n }\n if (preRelease && typeof preRelease === 'string') {\n return preRelease;\n }\n return undefined;\n };\n\n const params = {\n push,\n message,\n releaseType: getReleaseType(),\n preReleaseId: getPreReleaseId(),\n ignoreIssues,\n ignoreNewestVersion,\n skipTests,\n build: true,\n persist: true,\n disableTagAndSnapPipelines: disableTagPipeline,\n ignoreBuildErrors,\n forceDeploy,\n incrementBy,\n version: ver,\n };\n\n const tagDataPerCompRaw = this.parseData(data);\n this.logger.console(`tagging using ${getHarmonyVersion()} version`);\n const results = await this.snapping.tagFromScope(tagDataPerCompRaw, params);\n if (!results) return chalk.yellow(NOTHING_TO_TAG_MSG);\n const { taggedComponents, autoTaggedResults, warnings, newComponents }: TagResults = results;\n const changedComponents = taggedComponents.filter((component) => !newComponents.searchWithoutVersion(component.id));\n const addedComponents = taggedComponents.filter((component) => newComponents.searchWithoutVersion(component.id));\n const autoTaggedCount = autoTaggedResults ? autoTaggedResults.length : 0;\n\n const warningsOutput = warnings && warnings.length ? `${chalk.yellow(warnings.join('\\n'))}\\n\\n` : '';\n const tagExplanationPersist = `\\n(use \"bit export [collection]\" to push these components to a remote\")\n(use \"bit reset\" to unstage versions)\\n`;\n const tagExplanationSoft = `\\n(use \"bit tag --persist\" to persist the changes\")\n(use \"bit reset --soft\" to remove the soft-tags)\\n`;\n\n const tagExplanation = results.isSoftTag ? tagExplanationSoft : tagExplanationPersist;\n\n const outputComponents = (comps) => {\n return comps\n .map((component) => {\n let componentOutput = ` > ${component.id.toString()}`;\n const autoTag = autoTaggedResults.filter((result) =>\n result.triggeredBy.searchWithoutScopeAndVersion(component.id)\n );\n if (autoTag.length) {\n const autoTagComp = autoTag.map((a) => a.component.id.toString());\n componentOutput += `\\n ${AUTO_TAGGED_MSG}:\n ${autoTagComp.join('\\n ')}`;\n }\n return componentOutput;\n })\n .join('\\n');\n };\n\n const publishOutput = () => {\n const { publishedPackages } = results;\n if (!publishedPackages || !publishedPackages.length) return '';\n const successTitle = `\\n\\n${chalk.green(\n `published the following ${publishedPackages.length} component(s) successfully\\n`\n )}`;\n const successCompsStr = publishedPackages.join('\\n');\n const successOutput = successCompsStr ? successTitle + successCompsStr : '';\n return successOutput;\n };\n\n const softTagPrefix = results.isSoftTag ? 'soft-tagged ' : '';\n const outputIfExists = (label, explanation, components) => {\n if (!components.length) return '';\n return `\\n${chalk.underline(softTagPrefix + label)}\\n(${explanation})\\n${outputComponents(components)}\\n`;\n };\n\n const newDesc = results.isSoftTag\n ? 'set to be tagged first version for components'\n : 'first version for components';\n const changedDesc = results.isSoftTag\n ? 'components that set to get a version bump'\n : 'components that got a version bump';\n const softTagClarification = results.isSoftTag\n ? chalk.bold(\n 'keep in mind that this is a soft-tag (changes recorded to be tagged), to persist the changes use --persist flag'\n )\n : '';\n return (\n warningsOutput +\n chalk.green(\n `${taggedComponents.length + autoTaggedCount} component(s) ${results.isSoftTag ? 'soft-' : ''}tagged`\n ) +\n tagExplanation +\n outputIfExists('new components', newDesc, addedComponents) +\n outputIfExists('changed components', changedDesc, changedComponents) +\n publishOutput() +\n softTagClarification\n );\n }\n private parseData(data: string): TagDataPerCompRaw[] {\n let dataParsed: unknown;\n try {\n dataParsed = JSON.parse(data);\n } catch (err: any) {\n throw new Error(`failed parsing the data entered as JSON. err ${err.message}`);\n }\n if (!Array.isArray(dataParsed)) {\n throw new Error('expect data to be an array');\n }\n dataParsed.forEach((dataItem) => {\n if (!dataItem.componentId) throw new Error('expect data item to have \"componentId\" prop');\n });\n return dataParsed;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,KAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,WAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,iBAAA;EAAA,MAAAN,IAAA,GAAAE,O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AII,KAAK,CAAC,4BAA4B,CAAC;IAC/C;IACAJ,UAAU,CAACO,OAAO,CAAEC,QAAQ,IAAK;MAC/B,IAAI,CAACA,QAAQ,CAACC,WAAW,EAAE,MAAM,IAAIL,KAAK,CAAC,6CAA6C,CAAC;IAC3F,CAAC,CAAC;IACF,OAAOJ,UAAU;EACnB;AACF;AAACU,OAAA,CAAA3G,eAAA,GAAAA,eAAA"}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_tag","_constants","_bootstrap","_componentIssues","_bitError","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","RELEASE_TYPES","TagFromScopeCmd","constructor","snapping","logger","join","keys","IssuesClasses","report","push","message","ver","patch","minor","major","preRelease","increment","prereleaseId","ignoreIssues","ignoreNewestVersion","skipTests","disableTagPipeline","forceDeploy","ignoreBuildErrors","incrementBy","BitError","releaseFlags","filter","x","length","consoleWarning","getReleaseType","includes","DEFAULT_BIT_RELEASE_TYPE","getPreReleaseId","params","releaseType","preReleaseId","build","persist","disableTagAndSnapPipelines","version","tagDataPerCompRaw","parseData","console","getHarmonyVersion","results","tagFromScope","chalk","yellow","NOTHING_TO_TAG_MSG","taggedComponents","autoTaggedResults","warnings","newComponents","changedComponents","component","searchWithoutVersion","id","addedComponents","autoTaggedCount","warningsOutput","tagExplanationPersist","tagExplanationSoft","tagExplanation","isSoftTag","outputComponents","comps","map","componentOutput","toString","autoTag","result","triggeredBy","searchWithoutScopeAndVersion","autoTagComp","a","AUTO_TAGGED_MSG","publishOutput","publishedPackages","successTitle","green","successCompsStr","successOutput","softTagPrefix","outputIfExists","label","explanation","components","underline","newDesc","changedDesc","softTagClarification","bold","dataParsed","JSON","parse","err","Error","Array","isArray","forEach","dataItem","componentId","exports"],"sources":["tag-from-scope.cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport { NOTHING_TO_TAG_MSG, AUTO_TAGGED_MSG } from '@teambit/legacy/dist/api/consumer/lib/tag';\nimport { DEFAULT_BIT_RELEASE_TYPE } from '@teambit/legacy/dist/constants';\nimport { getHarmonyVersion } from '@teambit/legacy/dist/bootstrap';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport { ReleaseType } from 'semver';\nimport { BitError } from '@teambit/bit-error';\nimport { Logger } from '@teambit/logger';\nimport { SnappingMain, TagResults } from './snapping.main.runtime';\nimport { BasicTagParams } from './tag-model-component';\n\nconst RELEASE_TYPES = ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'];\n\nexport type TagDataPerCompRaw = {\n componentId: string;\n dependencies?: string[];\n versionToTag?: string;\n prereleaseId?: string;\n message?: string;\n};\n\nexport class TagFromScopeCmd implements Command {\n name = '_tag <data>';\n group = 'development';\n private = true;\n description =\n 'tag components from a bare-scope by using build artifacts from previous snap and running the deploy-pipeline only';\n extendedDescription = `this command should be running from a new bare scope, it first imports the components it needs and then processes the tag.\nthe input data is a stringified JSON of an array of the following object.\n{\n componentId: string; // ids always have scope, so it's safe to parse them from string\n dependencies?: string[]; // e.g. [teambit/compiler@1.0.0, teambit/tester@1.0.0]\n versionToTag?: string; // specific version (e.g. '1.0.0') or semver (e.g. 'minor', 'patch')\n prereleaseId?: string; // applicable when versionToTag is a pre-release. (e.g. \"dev\", for 1.0.0-dev.1)\n message?: string; // tag-message.\n}\nan example of the final data: '[{\"componentId\":\"ci.remote2/comp-b\",\"dependencies\":[\"ci.remote/comp1@0.0.2\"]}]'\n`;\n alias = '';\n loader = true;\n options = [\n ['', 'push', 'export the updated objects to the original scopes once done'],\n ['m', 'message <message>', 'a log message describing latest changes'],\n ['v', 'ver <version>', 'tag with the given version'],\n ['l', 'increment <level>', `options are: [${RELEASE_TYPES.join(', ')}], default to patch`],\n ['', 'prerelease-id <id>', 'prerelease identifier (e.g. \"dev\" to get \"1.0.0-dev.1\")'],\n ['p', 'patch', 'syntactic sugar for \"--increment patch\"'],\n ['', 'minor', 'syntactic sugar for \"--increment minor\"'],\n ['', 'major', 'syntactic sugar for \"--increment major\"'],\n ['', 'pre-release [identifier]', 'syntactic sugar for \"--increment prerelease\" and `--prerelease-id <identifier>`'],\n ['', 'skip-tests', 'skip running component tests during tag process'],\n ['', 'disable-tag-pipeline', 'skip the tag pipeline to avoid publishing the components'],\n ['', 'force-deploy', 'DEPRECATED. use --ignore-build-error instead'],\n ['', 'ignore-build-errors', 'run the tag pipeline although the build pipeline failed'],\n [\n '',\n 'increment-by <number>',\n '(default to 1) increment semver flag (patch/minor/major) by. e.g. incrementing patch by 2: 0.0.1 -> 0.0.3.',\n ],\n [\n 'i',\n 'ignore-issues [issues]',\n `ignore component issues (shown in \"bit status\" as \"issues found\"), issues to ignore:\n[${Object.keys(IssuesClasses).join(', ')}]\nto ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify \"*\".`,\n ],\n ['I', 'ignore-newest-version', 'ignore existing of newer versions (default = false)'],\n ] as CommandOptions;\n remoteOp = true; // In case a compiler / tester is not installed\n\n constructor(private snapping: SnappingMain, private logger: Logger) {}\n\n // eslint-disable-next-line complexity\n async report(\n [data]: [string],\n {\n push,\n message = '',\n ver,\n patch,\n minor,\n major,\n preRelease,\n increment,\n prereleaseId,\n ignoreIssues,\n ignoreNewestVersion = false,\n skipTests = false,\n disableTagPipeline = false,\n forceDeploy = false,\n ignoreBuildErrors = false,\n incrementBy = 1,\n }: {\n push?: boolean;\n ver?: string;\n patch?: boolean;\n minor?: boolean;\n major?: boolean;\n increment?: ReleaseType;\n preRelease?: string;\n prereleaseId?: string;\n ignoreIssues?: string;\n incrementBy?: number;\n forceDeploy?: boolean;\n disableTagPipeline?: boolean;\n } & Partial<BasicTagParams>\n ): Promise<string> {\n if (ignoreIssues && typeof ignoreIssues === 'boolean') {\n throw new BitError(`--ignore-issues expects issues to be ignored, please run \"bit tag -h\" for the issues list`);\n }\n if (prereleaseId && (!increment || increment === 'major' || increment === 'minor' || increment === 'patch')) {\n throw new BitError(\n `--prerelease-id should be entered along with --increment flag, while --increment must be one of the following: [prepatch, prerelease, preminor, premajor]`\n );\n }\n\n const releaseFlags = [patch, minor, major, preRelease].filter((x) => x);\n if (releaseFlags.length > 1) {\n throw new BitError('you can use only one of the following - patch, minor, major, pre-release');\n }\n if (forceDeploy) {\n this.logger.consoleWarning(`--force-deploy is deprecated, use --ignore-build-errors instead`);\n ignoreBuildErrors = true;\n }\n\n const getReleaseType = (): ReleaseType => {\n if (increment) {\n if (!RELEASE_TYPES.includes(increment)) {\n throw new BitError(`invalid increment-level \"${increment}\".\n semver allows the following options only: ${RELEASE_TYPES.join(', ')}`);\n }\n return increment;\n }\n if (major) return 'major';\n if (minor) return 'minor';\n if (patch) return 'patch';\n if (preRelease) return 'prerelease';\n return DEFAULT_BIT_RELEASE_TYPE;\n };\n const getPreReleaseId = (): string | undefined => {\n if (prereleaseId) {\n return prereleaseId;\n }\n if (preRelease && typeof preRelease === 'string') {\n return preRelease;\n }\n return undefined;\n };\n\n const params = {\n push,\n message,\n releaseType: getReleaseType(),\n preReleaseId: getPreReleaseId(),\n ignoreIssues,\n ignoreNewestVersion,\n skipTests,\n build: true,\n persist: true,\n disableTagAndSnapPipelines: disableTagPipeline,\n ignoreBuildErrors,\n forceDeploy,\n incrementBy,\n version: ver,\n };\n\n const tagDataPerCompRaw = this.parseData(data);\n this.logger.console(`tagging using ${getHarmonyVersion()} version`);\n const results = await this.snapping.tagFromScope(tagDataPerCompRaw, params);\n if (!results) return chalk.yellow(NOTHING_TO_TAG_MSG);\n const { taggedComponents, autoTaggedResults, warnings, newComponents }: TagResults = results;\n const changedComponents = taggedComponents.filter((component) => !newComponents.searchWithoutVersion(component.id));\n const addedComponents = taggedComponents.filter((component) => newComponents.searchWithoutVersion(component.id));\n const autoTaggedCount = autoTaggedResults ? autoTaggedResults.length : 0;\n\n const warningsOutput = warnings && warnings.length ? `${chalk.yellow(warnings.join('\\n'))}\\n\\n` : '';\n const tagExplanationPersist = `\\n(use \"bit export [collection]\" to push these components to a remote\")\n(use \"bit reset\" to unstage versions)\\n`;\n const tagExplanationSoft = `\\n(use \"bit tag --persist\" to persist the changes\")\n(use \"bit reset --soft\" to remove the soft-tags)\\n`;\n\n const tagExplanation = results.isSoftTag ? tagExplanationSoft : tagExplanationPersist;\n\n const outputComponents = (comps) => {\n return comps\n .map((component) => {\n let componentOutput = ` > ${component.id.toString()}`;\n const autoTag = autoTaggedResults.filter((result) =>\n result.triggeredBy.searchWithoutScopeAndVersion(component.id)\n );\n if (autoTag.length) {\n const autoTagComp = autoTag.map((a) => a.component.id.toString());\n componentOutput += `\\n ${AUTO_TAGGED_MSG}:\n ${autoTagComp.join('\\n ')}`;\n }\n return componentOutput;\n })\n .join('\\n');\n };\n\n const publishOutput = () => {\n const { publishedPackages } = results;\n if (!publishedPackages || !publishedPackages.length) return '';\n const successTitle = `\\n\\n${chalk.green(\n `published the following ${publishedPackages.length} component(s) successfully\\n`\n )}`;\n const successCompsStr = publishedPackages.join('\\n');\n const successOutput = successCompsStr ? successTitle + successCompsStr : '';\n return successOutput;\n };\n\n const softTagPrefix = results.isSoftTag ? 'soft-tagged ' : '';\n const outputIfExists = (label, explanation, components) => {\n if (!components.length) return '';\n return `\\n${chalk.underline(softTagPrefix + label)}\\n(${explanation})\\n${outputComponents(components)}\\n`;\n };\n\n const newDesc = results.isSoftTag\n ? 'set to be tagged first version for components'\n : 'first version for components';\n const changedDesc = results.isSoftTag\n ? 'components that set to get a version bump'\n : 'components that got a version bump';\n const softTagClarification = results.isSoftTag\n ? chalk.bold(\n 'keep in mind that this is a soft-tag (changes recorded to be tagged), to persist the changes use --persist flag'\n )\n : '';\n return (\n warningsOutput +\n chalk.green(\n `${taggedComponents.length + autoTaggedCount} component(s) ${results.isSoftTag ? 'soft-' : ''}tagged`\n ) +\n tagExplanation +\n outputIfExists('new components', newDesc, addedComponents) +\n outputIfExists('changed components', changedDesc, changedComponents) +\n publishOutput() +\n softTagClarification\n );\n }\n private parseData(data: string): TagDataPerCompRaw[] {\n let dataParsed: unknown;\n try {\n dataParsed = JSON.parse(data);\n } catch (err: any) {\n throw new Error(`failed parsing the data entered as JSON. err ${err.message}`);\n }\n if (!Array.isArray(dataParsed)) {\n throw new Error('expect data to be an array');\n }\n dataParsed.forEach((dataItem) => {\n if (!dataItem.componentId) throw new Error('expect data item to have \"componentId\" prop');\n });\n return dataParsed;\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,KAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,WAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,iBAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,gBAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAO,UAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,SAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA8C,SAAAC,uBAAAO,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,gBAAAH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oB;EAExB;EACQjD,SAASA,CAAC5E,IAAY,EAAuB;IACnD,IAAI+H,UAAmB;IACvB,IAAI;MACFA,UAAU,GAAGC,IAAI,CAACC,KAAK,CAACjI,IAAI,CAAC;IAC/B,CAAC,CAAC,OAAOkI,GAAQ,EAAE;MACjB,MAAM,IAAIC,KAAK,CAAE,gDAA+CD,GAAG,CAACvF,OAAQ,EAAC,CAAC;IAChF;IACA,IAAI,CAACyF,KAAK,CAACC,OAAO,CAACN,UAAU,CAAC,EAAE;MAC9B,MAAM,IAAII,KAAK,CAAC,4BAA4B,CAAC;IAC/C;IACAJ,UAAU,CAACO,OAAO,CAAEC,QAAQ,IAAK;MAC/B,IAAI,CAACA,QAAQ,CAACC,WAAW,EAAE,MAAM,IAAIL,KAAK,CAAC,6CAA6C,CAAC;IAC3F,CAAC,CAAC;IACF,OAAOJ,UAAU;EACnB;AACF;AAACU,OAAA,CAAAvG,eAAA,GAAAA,eAAA"}
@@ -1,8 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- require("core-js/modules/es.array.iterator.js");
5
- require("core-js/modules/es.promise.js");
6
3
  Object.defineProperty(exports, "__esModule", {
7
4
  value: true
8
5
  });
@@ -11,13 +8,6 @@ exports.getBitCloudUser = getBitCloudUser;
11
8
  exports.getBitCloudUsername = getBitCloudUsername;
12
9
  exports.tagModelComponent = tagModelComponent;
13
10
  exports.updateComponentsVersions = updateComponentsVersions;
14
- function _defineProperty2() {
15
- const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
- _defineProperty2 = function () {
17
- return data;
18
- };
19
- return data;
20
- }
21
11
  function _pMapSeries() {
22
12
  const data = _interopRequireDefault(require("p-map-series"));
23
13
  _pMapSeries = function () {
@@ -153,8 +143,12 @@ function _models() {
153
143
  }
154
144
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
155
145
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
146
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
156
147
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
157
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2().default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
148
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
149
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
150
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
151
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
158
152
  function updateDependenciesVersions(componentsToTag, dependencyResolver) {
159
153
  const getNewDependencyVersion = id => {
160
154
  const foundDependency = componentsToTag.find(component => component.id.isEqualWithoutVersion(id));