@teambit/snapping 1.0.178 → 1.0.180
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/artifacts/__bit_junit.xml +4 -4
- package/artifacts/schema.json +1407 -1516
- package/dist/snap-cmd.d.ts +1 -1
- package/dist/snap-cmd.js +4 -1
- package/dist/snap-cmd.js.map +1 -1
- package/dist/snapping.main.runtime.d.ts +4 -8
- package/dist/snapping.main.runtime.js +5 -1
- package/dist/snapping.main.runtime.js.map +1 -1
- package/dist/tag-cmd.d.ts +1 -1
- package/dist/tag-cmd.js +4 -1
- package/dist/tag-cmd.js.map +1 -1
- package/dist/tag-from-scope.cmd.d.ts +2 -2
- package/dist/tag-from-scope.cmd.js +4 -8
- package/dist/tag-from-scope.cmd.js.map +1 -1
- package/dist/tag-model-component.d.ts +2 -1
- package/dist/tag-model-component.js +4 -1
- package/dist/tag-model-component.js.map +1 -1
- package/package.json +14 -14
- /package/dist/{preview-1709263126667.js → preview-1709465210037.js} +0 -0
package/dist/snap-cmd.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare class SnapCmd implements Command {
|
|
|
20
20
|
options: CommandOptions;
|
|
21
21
|
loader: boolean;
|
|
22
22
|
constructor(snapping: SnappingMain, logger: Logger, globalConfig: GlobalConfigMain);
|
|
23
|
-
report([pattern]: string[], { message, unmerged, editor, ignoreIssues, build, skipTests, skipAutoSnap, disableSnapPipeline, ignoreBuildErrors, rebuildDepsGraph, unmodified, failFast, }: {
|
|
23
|
+
report([pattern]: string[], { message, unmerged, editor, ignoreIssues, build, skipTests, skipTasks, skipAutoSnap, disableSnapPipeline, ignoreBuildErrors, rebuildDepsGraph, unmodified, failFast, }: {
|
|
24
24
|
unmerged?: boolean;
|
|
25
25
|
editor?: string;
|
|
26
26
|
ignoreIssues?: string;
|
package/dist/snap-cmd.js
CHANGED
|
@@ -51,7 +51,8 @@ class SnapCmd {
|
|
|
51
51
|
}]);
|
|
52
52
|
_defineProperty(this, "helpUrl", 'reference/components/snaps');
|
|
53
53
|
_defineProperty(this, "alias", '');
|
|
54
|
-
_defineProperty(this, "options", [['m', 'message <message>', 'snap message describing the latest changes - will appear in component history log'], ['u', 'unmodified', 'include unmodified components (by default, only new and modified components are snapped)'], ['', 'unmerged', 'complete a merge process by snapping the unmerged components'], ['b', 'build', 'locally run the build pipeline (i.e. not via rippleCI) and complete the snap'], ['', 'editor [editor]', 'open an editor to write a snap message per component. optionally specify the editor-name (defaults to vim).'], ['', 'skip-tests', 'skip running component tests during snap process'], ['', 'skip-
|
|
54
|
+
_defineProperty(this, "options", [['m', 'message <message>', 'snap message describing the latest changes - will appear in component history log'], ['u', 'unmodified', 'include unmodified components (by default, only new and modified components are snapped)'], ['', 'unmerged', 'complete a merge process by snapping the unmerged components'], ['b', 'build', 'locally run the build pipeline (i.e. not via rippleCI) and complete the snap'], ['', 'editor [editor]', 'open an editor to write a snap message per component. optionally specify the editor-name (defaults to vim).'], ['', 'skip-tests', 'skip running component tests during snap process'], ['', 'skip-tasks <string>', `skip the given tasks. for multiple tasks, separate by a comma and wrap with quotes.
|
|
55
|
+
specify the task-name (e.g. "TypescriptCompiler") or the task-aspect-id (e.g. teambit.compilation/compiler)`], ['', 'skip-auto-snap', 'skip auto snapping dependents'], ['', 'disable-snap-pipeline', 'skip the snap pipeline. this will for instance skip packing and publishing component version for install, and app deployment'], ['', 'ignore-build-errors', 'proceed to snap pipeline even when build pipeline fails'], ['', 'rebuild-deps-graph', 'do not reuse the saved dependencies graph, instead build it from scratch'], ['i', 'ignore-issues <issues>', `ignore component issues (shown in "bit status" as "issues found"), issues to ignore:
|
|
55
56
|
[${Object.keys(_componentIssues().IssuesClasses).join(', ')}]
|
|
56
57
|
to ignore multiple issues, separate them by a comma and wrap with quotes. to ignore all issues, specify "*".`], ['', 'fail-fast', 'stop pipeline execution on the first failed task (by default a task is skipped only when its dependency failed)']]);
|
|
57
58
|
_defineProperty(this, "loader", true);
|
|
@@ -63,6 +64,7 @@ to ignore multiple issues, separate them by a comma and wrap with quotes. to ign
|
|
|
63
64
|
ignoreIssues,
|
|
64
65
|
build,
|
|
65
66
|
skipTests = false,
|
|
67
|
+
skipTasks,
|
|
66
68
|
skipAutoSnap = false,
|
|
67
69
|
disableSnapPipeline = false,
|
|
68
70
|
ignoreBuildErrors = false,
|
|
@@ -83,6 +85,7 @@ to ignore multiple issues, separate them by a comma and wrap with quotes. to ign
|
|
|
83
85
|
ignoreIssues,
|
|
84
86
|
build,
|
|
85
87
|
skipTests,
|
|
88
|
+
skipTasks,
|
|
86
89
|
skipAutoSnap,
|
|
87
90
|
disableTagAndSnapPipelines,
|
|
88
91
|
ignoreBuildErrors,
|
package/dist/snap-cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_componentIssues","_constants","_tagCmd","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","SnapCmd","constructor","snapping","logger","globalConfig","name","description","COMPONENT_PATTERN_HELP","keys","IssuesClasses","join","report","pattern","message","unmerged","editor","ignoreIssues","build","skipTests","skipAutoSnap","disableSnapPipeline","ignoreBuildErrors","rebuildDepsGraph","unmodified","failFast","getBool","CFG_FORCE_LOCAL_BUILD","Boolean","disableTagAndSnapPipelines","consoleWarning","results","snap","exitOnFirstFailedTask","chalk","yellow","NOTHING_TO_SNAP_MSG","snappedComponents","autoSnappedResults","warnings","newComponents","laneName","removedComponents","changedComponents","filter","component","searchWithoutVersion","id","addedComponents","autoTaggedCount","length","warningsOutput","snapExplanation","compInBold","version","hasVersion","bold","toStringWithoutVersion","outputComponents","comps","map","componentOutput","autoTag","result","triggeredBy","autoTagComp","a","AUTO_SNAPPED_MSG","outputIfExists","label","explanation","components","underline","laneStr","outputIdsIfExists","green","exports"],"sources":["snap-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { ComponentID } from '@teambit/component-id';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport { GlobalConfigMain } from '@teambit/global-config';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport {\n NOTHING_TO_SNAP_MSG,\n AUTO_SNAPPED_MSG,\n COMPONENT_PATTERN_HELP,\n CFG_FORCE_LOCAL_BUILD,\n} from '@teambit/legacy/dist/constants';\nimport { Logger } from '@teambit/logger';\nimport { SnappingMain, SnapResults } from './snapping.main.runtime';\nimport { outputIdsIfExists } from './tag-cmd';\nimport { BasicTagSnapParams } from './tag-model-component';\n\nexport class SnapCmd implements Command {\n name = 'snap [component-pattern]';\n description = 'create an immutable and exportable component snapshot (non-release version)';\n extendedDescription: string;\n group = 'development';\n arguments = [\n {\n name: 'component-pattern',\n description: `${COMPONENT_PATTERN_HELP}. By default, only new and modified components are snapped (add --unmodified to snap all components in the workspace).`,\n },\n ];\n helpUrl = 'reference/components/snaps';\n alias = '';\n options = [\n ['m', 'message <message>', 'snap message describing the latest changes - will appear in component history log'],\n ['u', 'unmodified', 'include unmodified components (by default, only new and modified components are snapped)'],\n ['', 'unmerged', 'complete a merge process by snapping the unmerged components'],\n ['b', 'build', 'locally run the build pipeline (i.e. not via rippleCI) and complete the snap'],\n [\n '',\n 'editor [editor]',\n 'open an editor to write a snap message per component. optionally specify the editor-name (defaults to vim).',\n ],\n ['', 'skip-tests', 'skip running component tests during snap process'],\n ['', 'skip-auto-snap', 'skip auto snapping dependents'],\n [\n '',\n 'disable-snap-pipeline',\n 'skip the snap pipeline. this will for instance skip packing and publishing component version for install, and app deployment',\n ],\n ['', 'ignore-build-errors', 'proceed to snap pipeline even when build pipeline fails'],\n ['', 'rebuild-deps-graph', 'do not reuse the saved dependencies graph, instead build it from scratch'],\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 '',\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 ] as CommandOptions;\n loader = true;\n\n constructor(private snapping: SnappingMain, private logger: Logger, private globalConfig: GlobalConfigMain) {}\n\n async report(\n [pattern]: string[],\n {\n message = '',\n unmerged = false,\n editor = '',\n ignoreIssues,\n build,\n skipTests = false,\n skipAutoSnap = false,\n disableSnapPipeline = false,\n ignoreBuildErrors = false,\n rebuildDepsGraph,\n unmodified = false,\n failFast = false,\n }: {\n unmerged?: boolean;\n editor?: string;\n ignoreIssues?: string;\n skipAutoSnap?: boolean;\n disableSnapPipeline?: boolean;\n unmodified?: boolean;\n failFast?: boolean;\n } & BasicTagSnapParams\n ) {\n build = (await this.globalConfig.getBool(CFG_FORCE_LOCAL_BUILD)) || Boolean(build);\n const disableTagAndSnapPipelines = disableSnapPipeline;\n if (!message && !editor) {\n this.logger.consoleWarning(\n `--message will be mandatory in the next few releases. make sure to add a message with your snap, will be displayed in the version history`\n );\n }\n\n const results = await this.snapping.snap({\n pattern,\n message,\n unmerged,\n editor,\n ignoreIssues,\n build,\n skipTests,\n skipAutoSnap,\n disableTagAndSnapPipelines,\n ignoreBuildErrors,\n rebuildDepsGraph,\n unmodified,\n exitOnFirstFailedTask: failFast,\n });\n\n if (!results) return chalk.yellow(NOTHING_TO_SNAP_MSG);\n const { snappedComponents, autoSnappedResults, warnings, newComponents, laneName, removedComponents }: SnapResults =\n results;\n const changedComponents = snappedComponents.filter((component) => {\n return (\n !newComponents.searchWithoutVersion(component.id) && !removedComponents?.searchWithoutVersion(component.id)\n );\n });\n const addedComponents = snappedComponents.filter((component) => newComponents.searchWithoutVersion(component.id));\n const autoTaggedCount = autoSnappedResults ? autoSnappedResults.length : 0;\n\n const warningsOutput = warnings && warnings.length ? `${chalk.yellow(warnings.join('\\n'))}\\n\\n` : '';\n const snapExplanation = `\\n(use \"bit export\" to push these components to a remote\")\n(use \"bit reset\" to unstage all local versions, or \"bit reset --head\" to only unstage the latest local snap)`;\n\n const compInBold = (id: ComponentID) => {\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 = autoSnappedResults.filter((result) => result.triggeredBy.searchWithoutVersion(component.id));\n if (autoTag.length) {\n const autoTagComp = autoTag.map((a) => compInBold(a.component.id));\n componentOutput += `\\n ${AUTO_SNAPPED_MSG} (${autoTagComp.length} total):\n ${autoTagComp.join('\\n ')}`;\n }\n return componentOutput;\n })\n .join('\\n');\n };\n\n const outputIfExists = (label, explanation, components) => {\n if (!components.length) return '';\n return `\\n${chalk.underline(label)}\\n(${explanation})\\n${outputComponents(components)}\\n`;\n };\n const laneStr = laneName ? ` on \"${laneName}\" lane` : '';\n\n return (\n outputIfExists('new components', 'first version for components', addedComponents) +\n outputIfExists('changed components', 'components that got a version bump', changedComponents) +\n outputIdsIfExists('removed components', removedComponents) +\n warningsOutput +\n chalk.green(`\\n${snappedComponents.length + autoTaggedCount} component(s) snapped${laneStr}`) +\n snapExplanation\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;AAGA,SAAAG,iBAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,gBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAI,WAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AA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EAAE;MACjC,OAAQ,KAAIhB,gBAAK,CAACsC,SAAS,CAACH,KAAK,CAAE,MAAKC,WAAY,MAAKZ,gBAAgB,CAACa,UAAU,CAAE,IAAG;IAC3F,CAAC;IACD,MAAME,OAAO,GAAGhC,QAAQ,GAAI,QAAOA,QAAS,QAAO,GAAG,EAAE;IAExD,OACE2B,cAAc,CAAC,gBAAgB,EAAE,8BAA8B,EAAEpB,eAAe,CAAC,GACjFoB,cAAc,CAAC,oBAAoB,EAAE,oCAAoC,EAAEzB,iBAAiB,CAAC,GAC7F,IAAA+B,2BAAiB,EAAC,oBAAoB,EAAEhC,iBAAiB,CAAC,GAC1DS,cAAc,GACdjB,gBAAK,CAACyC,KAAK,CAAE,KAAItC,iBAAiB,CAACa,MAAM,GAAGD,eAAgB,wBAAuBwB,OAAQ,EAAC,CAAC,GAC7FrB,eAAe;EAEnB;AACF;AAACwB,OAAA,CAAA3E,OAAA,GAAAA,OAAA"}
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_componentIssues","_constants","_tagCmd","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","SnapCmd","constructor","snapping","logger","globalConfig","name","description","COMPONENT_PATTERN_HELP","keys","IssuesClasses","join","report","pattern","message","unmerged","editor","ignoreIssues","build","skipTests","skipTasks","skipAutoSnap","disableSnapPipeline","ignoreBuildErrors","rebuildDepsGraph","unmodified","failFast","getBool","CFG_FORCE_LOCAL_BUILD","Boolean","disableTagAndSnapPipelines","consoleWarning","results","snap","exitOnFirstFailedTask","chalk","yellow","NOTHING_TO_SNAP_MSG","snappedComponents","autoSnappedResults","warnings","newComponents","laneName","removedComponents","changedComponents","filter","component","searchWithoutVersion","id","addedComponents","autoTaggedCount","length","warningsOutput","snapExplanation","compInBold","version","hasVersion","bold","toStringWithoutVersion","outputComponents","comps","map","componentOutput","autoTag","result","triggeredBy","autoTagComp","a","AUTO_SNAPPED_MSG","outputIfExists","label","explanation","components","underline","laneStr","outputIdsIfExists","green","exports"],"sources":["snap-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { ComponentID } from '@teambit/component-id';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport { GlobalConfigMain } from '@teambit/global-config';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport {\n NOTHING_TO_SNAP_MSG,\n AUTO_SNAPPED_MSG,\n COMPONENT_PATTERN_HELP,\n CFG_FORCE_LOCAL_BUILD,\n} from '@teambit/legacy/dist/constants';\nimport { Logger } from '@teambit/logger';\nimport { SnappingMain, SnapResults } from './snapping.main.runtime';\nimport { outputIdsIfExists } from './tag-cmd';\nimport { BasicTagSnapParams } from './tag-model-component';\n\nexport class SnapCmd implements Command {\n name = 'snap [component-pattern]';\n description = 'create an immutable and exportable component snapshot (non-release version)';\n extendedDescription: string;\n group = 'development';\n arguments = [\n {\n name: 'component-pattern',\n description: `${COMPONENT_PATTERN_HELP}. By default, only new and modified components are snapped (add --unmodified to snap all components in the workspace).`,\n },\n ];\n helpUrl = 'reference/components/snaps';\n alias = '';\n options = [\n ['m', 'message <message>', 'snap message describing the latest changes - will appear in component history log'],\n ['u', 'unmodified', 'include unmodified components (by default, only new and modified components are snapped)'],\n ['', 'unmerged', 'complete a merge process by snapping the unmerged components'],\n ['b', 'build', 'locally run the build pipeline (i.e. not via rippleCI) and complete the snap'],\n [\n '',\n 'editor [editor]',\n 'open an editor to write a snap message per component. optionally specify the editor-name (defaults to vim).',\n ],\n ['', 'skip-tests', 'skip running component tests during snap process'],\n [\n '',\n 'skip-tasks <string>',\n `skip the given tasks. for multiple tasks, separate by a comma and wrap with quotes.\nspecify the task-name (e.g. \"TypescriptCompiler\") or the task-aspect-id (e.g. teambit.compilation/compiler)`,\n ],\n ['', 'skip-auto-snap', 'skip auto snapping dependents'],\n [\n '',\n 'disable-snap-pipeline',\n 'skip the snap pipeline. this will for instance skip packing and publishing component version for install, and app deployment',\n ],\n ['', 'ignore-build-errors', 'proceed to snap pipeline even when build pipeline fails'],\n ['', 'rebuild-deps-graph', 'do not reuse the saved dependencies graph, instead build it from scratch'],\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 '',\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 ] as CommandOptions;\n loader = true;\n\n constructor(private snapping: SnappingMain, private logger: Logger, private globalConfig: GlobalConfigMain) {}\n\n async report(\n [pattern]: string[],\n {\n message = '',\n unmerged = false,\n editor = '',\n ignoreIssues,\n build,\n skipTests = false,\n skipTasks,\n skipAutoSnap = false,\n disableSnapPipeline = false,\n ignoreBuildErrors = false,\n rebuildDepsGraph,\n unmodified = false,\n failFast = false,\n }: {\n unmerged?: boolean;\n editor?: string;\n ignoreIssues?: string;\n skipAutoSnap?: boolean;\n disableSnapPipeline?: boolean;\n unmodified?: boolean;\n failFast?: boolean;\n } & BasicTagSnapParams\n ) {\n build = (await this.globalConfig.getBool(CFG_FORCE_LOCAL_BUILD)) || Boolean(build);\n const disableTagAndSnapPipelines = disableSnapPipeline;\n if (!message && !editor) {\n this.logger.consoleWarning(\n `--message will be mandatory in the next few releases. make sure to add a message with your snap, will be displayed in the version history`\n );\n }\n\n const results = await this.snapping.snap({\n pattern,\n message,\n unmerged,\n editor,\n ignoreIssues,\n build,\n skipTests,\n skipTasks,\n skipAutoSnap,\n disableTagAndSnapPipelines,\n ignoreBuildErrors,\n rebuildDepsGraph,\n unmodified,\n exitOnFirstFailedTask: failFast,\n });\n\n if (!results) return chalk.yellow(NOTHING_TO_SNAP_MSG);\n const { snappedComponents, autoSnappedResults, warnings, newComponents, laneName, removedComponents }: SnapResults =\n results;\n const changedComponents = snappedComponents.filter((component) => {\n return (\n !newComponents.searchWithoutVersion(component.id) && !removedComponents?.searchWithoutVersion(component.id)\n );\n });\n const addedComponents = snappedComponents.filter((component) => newComponents.searchWithoutVersion(component.id));\n const autoTaggedCount = autoSnappedResults ? autoSnappedResults.length : 0;\n\n const warningsOutput = warnings && warnings.length ? `${chalk.yellow(warnings.join('\\n'))}\\n\\n` : '';\n const snapExplanation = `\\n(use \"bit export\" to push these components to a remote\")\n(use \"bit reset\" to unstage all local versions, or \"bit reset --head\" to only unstage the latest local snap)`;\n\n const compInBold = (id: ComponentID) => {\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 = autoSnappedResults.filter((result) => result.triggeredBy.searchWithoutVersion(component.id));\n if (autoTag.length) {\n const autoTagComp = autoTag.map((a) => compInBold(a.component.id));\n componentOutput += `\\n ${AUTO_SNAPPED_MSG} (${autoTagComp.length} total):\n ${autoTagComp.join('\\n ')}`;\n }\n return componentOutput;\n })\n .join('\\n');\n };\n\n const outputIfExists = (label, explanation, components) => {\n if (!components.length) return '';\n return `\\n${chalk.underline(label)}\\n(${explanation})\\n${outputComponents(components)}\\n`;\n };\n const laneStr = laneName ? ` on \"${laneName}\" lane` : '';\n\n return (\n outputIfExists('new components', 'first version for components', addedComponents) +\n outputIfExists('changed components', 'components that got a version bump', changedComponents) +\n outputIdsIfExists('removed components', removedComponents) +\n warningsOutput +\n chalk.green(`\\n${snappedComponents.length + autoTaggedCount} component(s) snapped${laneStr}`) +\n snapExplanation\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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,SAAS,CAACE,EAAE,CAAC,CAAC;UAClEc,eAAe,IAAK,YAAWM,6BAAiB,KAAIF,WAAW,CAACf,MAAO;AACnF,cAAce,WAAW,CAACvD,IAAI,CAAC,gBAAgB,CAAE,EAAC;QACxC;QACA,OAAOmD,eAAe;MACxB,CAAC,CAAC,CACDnD,IAAI,CAAC,IAAI,CAAC;IACf,CAAC;IAED,MAAM0D,cAAc,GAAGA,CAACC,KAAK,EAAEC,WAAW,EAAEC,UAAU,KAAK;MACzD,IAAI,CAACA,UAAU,CAACrB,MAAM,EAAE,OAAO,EAAE;MACjC,OAAQ,KAAIhB,gBAAK,CAACsC,SAAS,CAACH,KAAK,CAAE,MAAKC,WAAY,MAAKZ,gBAAgB,CAACa,UAAU,CAAE,IAAG;IAC3F,CAAC;IACD,MAAME,OAAO,GAAGhC,QAAQ,GAAI,QAAOA,QAAS,QAAO,GAAG,EAAE;IAExD,OACE2B,cAAc,CAAC,gBAAgB,EAAE,8BAA8B,EAAEpB,eAAe,CAAC,GACjFoB,cAAc,CAAC,oBAAoB,EAAE,oCAAoC,EAAEzB,iBAAiB,CAAC,GAC7F,IAAA+B,2BAAiB,EAAC,oBAAoB,EAAEhC,iBAAiB,CAAC,GAC1DS,cAAc,GACdjB,gBAAK,CAACyC,KAAK,CAAE,KAAItC,iBAAiB,CAACa,MAAM,GAAGD,eAAgB,wBAAuBwB,OAAQ,EAAC,CAAC,GAC7FrB,eAAe;EAEnB;AACF;AAACwB,OAAA,CAAA5E,OAAA,GAAAA,OAAA"}
|
|
@@ -19,7 +19,7 @@ import { GlobalConfigMain } from '@teambit/global-config';
|
|
|
19
19
|
import { AutoTagResult } from '@teambit/legacy/dist/scope/component-ops/auto-tag';
|
|
20
20
|
import { DependenciesMain } from '@teambit/dependencies';
|
|
21
21
|
import Version, { Log } from '@teambit/legacy/dist/scope/models/version';
|
|
22
|
-
import { BasicTagParams } from './tag-model-component';
|
|
22
|
+
import { BasicTagParams, BasicTagSnapParams } from './tag-model-component';
|
|
23
23
|
import { TagDataPerCompRaw } from './tag-from-scope.cmd';
|
|
24
24
|
import { SnapDataPerCompRaw, FileData } from './snap-from-scope.cmd';
|
|
25
25
|
import { untagResult } from './reset-component';
|
|
@@ -86,7 +86,7 @@ export declare class SnappingMain {
|
|
|
86
86
|
* with a valid semver to that version.
|
|
87
87
|
* tag can be done only on main, not on a lane.
|
|
88
88
|
*/
|
|
89
|
-
tag({ ids, message, version, editor, snapped, unmerged, releaseType, preReleaseId, ignoreIssues, ignoreNewestVersion, skipTests, skipAutoTag, build, unmodified, soft, persist, ignoreBuildErrors, rebuildDepsGraph, incrementBy, disableTagAndSnapPipelines, failFast, }: {
|
|
89
|
+
tag({ ids, message, version, editor, snapped, unmerged, releaseType, preReleaseId, ignoreIssues, ignoreNewestVersion, skipTests, skipTasks, skipAutoTag, build, unmodified, soft, persist, ignoreBuildErrors, rebuildDepsGraph, incrementBy, disableTagAndSnapPipelines, failFast, }: {
|
|
90
90
|
ids?: string[];
|
|
91
91
|
all?: boolean | string;
|
|
92
92
|
snapped?: boolean;
|
|
@@ -104,6 +104,7 @@ export declare class SnappingMain {
|
|
|
104
104
|
releaseType?: ReleaseType;
|
|
105
105
|
ignoreIssues?: string;
|
|
106
106
|
incrementBy?: number;
|
|
107
|
+
rebuildArtifacts?: boolean;
|
|
107
108
|
} & Partial<BasicTagParams>): Promise<TagResults | null>;
|
|
108
109
|
snapFromScope(snapDataPerCompRaw: SnapDataPerCompRaw[], params: {
|
|
109
110
|
push?: boolean;
|
|
@@ -116,19 +117,14 @@ export declare class SnappingMain {
|
|
|
116
117
|
* once a component is snapped on a lane, it becomes part of it.
|
|
117
118
|
*/
|
|
118
119
|
snap({ pattern, legacyBitIds, // @todo: change to ComponentID[]. pass only if have the ids already parsed.
|
|
119
|
-
unmerged, editor, message, ignoreIssues, skipTests, skipAutoSnap, build, disableTagAndSnapPipelines, ignoreBuildErrors, rebuildDepsGraph, unmodified, exitOnFirstFailedTask, }: {
|
|
120
|
+
unmerged, editor, message, ignoreIssues, skipTests, skipTasks, skipAutoSnap, build, disableTagAndSnapPipelines, ignoreBuildErrors, rebuildDepsGraph, unmodified, exitOnFirstFailedTask, }: Partial<BasicTagSnapParams> & {
|
|
120
121
|
pattern?: string;
|
|
121
122
|
legacyBitIds?: ComponentIdList;
|
|
122
123
|
unmerged?: boolean;
|
|
123
124
|
editor?: string;
|
|
124
|
-
message?: string;
|
|
125
125
|
ignoreIssues?: string;
|
|
126
|
-
build: boolean;
|
|
127
|
-
skipTests?: boolean;
|
|
128
126
|
skipAutoSnap?: boolean;
|
|
129
127
|
disableTagAndSnapPipelines?: boolean;
|
|
130
|
-
ignoreBuildErrors?: boolean;
|
|
131
|
-
rebuildDepsGraph?: boolean;
|
|
132
128
|
unmodified?: boolean;
|
|
133
129
|
exitOnFirstFailedTask?: boolean;
|
|
134
130
|
}): Promise<SnapResults | null>;
|
|
@@ -375,6 +375,7 @@ class SnappingMain {
|
|
|
375
375
|
ignoreIssues,
|
|
376
376
|
ignoreNewestVersion = false,
|
|
377
377
|
skipTests = false,
|
|
378
|
+
skipTasks,
|
|
378
379
|
skipAutoTag = false,
|
|
379
380
|
build,
|
|
380
381
|
unmodified = false,
|
|
@@ -432,6 +433,7 @@ class SnappingMain {
|
|
|
432
433
|
preReleaseId,
|
|
433
434
|
ignoreNewestVersion,
|
|
434
435
|
skipTests,
|
|
436
|
+
skipTasks,
|
|
435
437
|
skipAutoTag,
|
|
436
438
|
soft,
|
|
437
439
|
build,
|
|
@@ -518,7 +520,7 @@ if you're willing to lose the history from the head to the specified version, us
|
|
|
518
520
|
const consumerComponents = components.map(c => c.state._consumer);
|
|
519
521
|
const shouldUsePopulateArtifactsFrom = components.every(comp => {
|
|
520
522
|
if (!comp.buildStatus) throw new Error(`tag-from-scope expect ${comp.id.toString()} to have buildStatus`);
|
|
521
|
-
return comp.buildStatus === _constants().BuildStatus.Succeed;
|
|
523
|
+
return comp.buildStatus === _constants().BuildStatus.Succeed && !params.rebuildArtifacts;
|
|
522
524
|
});
|
|
523
525
|
const legacyIds = _componentId().ComponentIdList.fromArray(componentIds.map(id => id));
|
|
524
526
|
const results = await (0, _tagModelComponent().tagModelComponent)(_objectSpread(_objectSpread({}, params), {}, {
|
|
@@ -716,6 +718,7 @@ if you're willing to lose the history from the head to the specified version, us
|
|
|
716
718
|
message = '',
|
|
717
719
|
ignoreIssues,
|
|
718
720
|
skipTests = false,
|
|
721
|
+
skipTasks,
|
|
719
722
|
skipAutoSnap = false,
|
|
720
723
|
build,
|
|
721
724
|
disableTagAndSnapPipelines = false,
|
|
@@ -751,6 +754,7 @@ if you're willing to lose the history from the head to the specified version, us
|
|
|
751
754
|
ignoreNewestVersion: false,
|
|
752
755
|
message,
|
|
753
756
|
skipTests,
|
|
757
|
+
skipTasks,
|
|
754
758
|
skipAutoTag: skipAutoSnap,
|
|
755
759
|
persist: true,
|
|
756
760
|
soft: false,
|