@teambit/importer 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 +1 -1
- package/artifacts/preview/teambit_scope_importer-preview.js +1 -1
- package/artifacts/schema.json +5 -5
- package/dist/dependents-getter.js +1 -1
- package/dist/dependents-getter.js.map +1 -1
- package/dist/{preview-1709263126667.js → preview-1709465210037.js} +2 -2
- package/package.json +12 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<testsuites tests="0" failures="0" errors="0" skipped="0">
|
|
3
|
-
<testsuite name="teambit.scope/importer@1.0.
|
|
3
|
+
<testsuite name="teambit.scope/importer@1.0.180" tests="0" failures="0" errors="0" skipped="0"/>
|
|
4
4
|
</testsuites>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.scope/importer-preview"]=t():e["teambit.scope/importer-preview"]=t()}(self,(()=>(()=>{"use strict";var e={
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.scope/importer-preview"]=t():e["teambit.scope/importer-preview"]=t()}(self,(()=>(()=>{"use strict";var e={56346:(e,t,o)=>{var r={id:"teambit.scope/importer@1.0.180",homepage:"https://bit.cloud/teambit/scope/importer",exported:!0};function n(){const e=i(o(41594));return n=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,n.__bit_component=r,i.__bit_component=r;const p=()=>n().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},n().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/import.svg"}));p.__bit_component=r,t.Logo=p},41594:e=>{e.exports=React}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,o),i.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{o.r(r),o.d(r,{compositions:()=>u,compositions_metadata:()=>l,overview:()=>f});var e={};o.r(e),o.d(e,{default:()=>d});var t=o(56346);o(41594);const n=MdxJsReact,i=TeambitMdxUiMdxScopeContext;var p=["components"];function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},c.apply(this,arguments)}var s={},a="wrapper";function d(e){var t=e.components,o=function(e,t){if(null==e)return{};var o,r,n=function(e,t){if(null==e)return{};var o,r,n={},i=Object.keys(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||(n[o]=e[o]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)o=i[r],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}(e,p);return(0,n.mdx)(a,c({},s,o,{components:t,mdxType:"MDXLayout"}),(0,n.mdx)(i.MDXScopeProvider,{components:{},mdxType:"MDXScopeProvider"}))}d.isMDXComponent=!0;const u=[t],f=[e],l={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),r})()));
|
package/artifacts/schema.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"line": 39,
|
|
21
21
|
"character": 1
|
|
22
22
|
},
|
|
23
|
-
"signature": "type ImportOptions = {\n ids: string[];\n verbose?: boolean | undefined;\n merge?: boolean | undefined;\n mergeStrategy?: \"manual\" | \"
|
|
23
|
+
"signature": "type ImportOptions = {\n ids: string[];\n verbose?: boolean | undefined;\n merge?: boolean | undefined;\n mergeStrategy?: \"manual\" | \"ours\" | \"theirs\" | undefined;\n filterEnvs?: string[] | undefined;\n writeToPath?: string | undefined;\n ... 16 more ...;\n isLaneFromRemote?: boolean | undefined;\n}",
|
|
24
24
|
"name": "ImportOptions",
|
|
25
25
|
"type": {
|
|
26
26
|
"__schema": "TypeLiteralSchema",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"line": 43,
|
|
106
106
|
"character": 3
|
|
107
107
|
},
|
|
108
|
-
"signature": "(property) mergeStrategy?: \"manual\" | \"
|
|
108
|
+
"signature": "(property) mergeStrategy?: \"manual\" | \"ours\" | \"theirs\" | undefined",
|
|
109
109
|
"name": "mergeStrategy",
|
|
110
110
|
"type": {
|
|
111
111
|
"__schema": "TypeRefSchema",
|
|
@@ -1838,7 +1838,7 @@
|
|
|
1838
1838
|
"line": 39,
|
|
1839
1839
|
"character": 1
|
|
1840
1840
|
},
|
|
1841
|
-
"signature": "type ImportOptions = {\n ids: string[];\n verbose?: boolean | undefined;\n merge?: boolean | undefined;\n mergeStrategy?: \"manual\" | \"
|
|
1841
|
+
"signature": "type ImportOptions = {\n ids: string[];\n verbose?: boolean | undefined;\n merge?: boolean | undefined;\n mergeStrategy?: \"manual\" | \"ours\" | \"theirs\" | undefined;\n filterEnvs?: string[] | undefined;\n writeToPath?: string | undefined;\n ... 16 more ...;\n isLaneFromRemote?: boolean | undefined;\n}",
|
|
1842
1842
|
"name": "ImportOptions",
|
|
1843
1843
|
"type": {
|
|
1844
1844
|
"__schema": "TypeLiteralSchema",
|
|
@@ -1923,7 +1923,7 @@
|
|
|
1923
1923
|
"line": 43,
|
|
1924
1924
|
"character": 3
|
|
1925
1925
|
},
|
|
1926
|
-
"signature": "(property) mergeStrategy?: \"manual\" | \"
|
|
1926
|
+
"signature": "(property) mergeStrategy?: \"manual\" | \"ours\" | \"theirs\" | undefined",
|
|
1927
1927
|
"name": "mergeStrategy",
|
|
1928
1928
|
"type": {
|
|
1929
1929
|
"__schema": "TypeRefSchema",
|
|
@@ -5519,7 +5519,7 @@
|
|
|
5519
5519
|
"componentId": {
|
|
5520
5520
|
"scope": "teambit.scope",
|
|
5521
5521
|
"name": "importer",
|
|
5522
|
-
"version": "1.0.
|
|
5522
|
+
"version": "1.0.180"
|
|
5523
5523
|
},
|
|
5524
5524
|
"taggedModuleExports": []
|
|
5525
5525
|
}
|
|
@@ -64,7 +64,7 @@ class DependentsGetter {
|
|
|
64
64
|
silent
|
|
65
65
|
} = this.options;
|
|
66
66
|
const graph = await this.graph.getGraphIds();
|
|
67
|
-
const sourceIds =
|
|
67
|
+
const sourceIds = this.workspace.listIds();
|
|
68
68
|
const getIdsForThrough = () => {
|
|
69
69
|
if (!this.options.dependentsVia) return undefined;
|
|
70
70
|
return this.options.dependentsVia.split(',').map(idStr => idStr.trim()).map(id => _componentId().ComponentID.fromString(id));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_yesno","data","_interopRequireDefault","require","_enquirer","_lodash","_chalk","_componentId","_bitError","obj","__esModule","default","SHOW_ALL_PATHS_LIMIT","SCROLL_LIMIT","DependentsGetter","constructor","logger","workspace","graph","options","getDependents","targetCompIds","setStatusLine","silent","getGraphIds","sourceIds","listIds","getIdsForThrough","dependentsVia","undefined","split","map","idStr","trim","id","ComponentID","fromString","allPaths","findAllPathsFromSourcesToTargets","selectedPaths","promptDependents","uniqAsStrings","uniq","flat","ids","idsToFilterOut","ComponentIdList","fromArray","forEach","hasWithoutVersion","sameIds","filter","idString","startsWith","toStringWithoutVersion","idToImport","length","changeVersion","push","idsStr","toString","debug","clearStatusLine","question","join","ok","yesno","BitError","totalToShow","promptLevelByLevel","firstItems","slice","choices","path","name","value","tooManyPathsMsg","chalk","yellow","result","prompt","footer","indicator","state","choice","enabled","message","cyan","pointer","styles","dark","white","em","bgBlack","whiteBright","success","type","validate","j","down","k","up","names","cancel","Object","values","selectDependents","Error","finalPath","console","getPrompt","level","totalPaths","AutoComplete","limit","dim","header","getLevel","withinPaths","compact","sort","processLevel","paths","previousLevel","pathsWithinThisLevel","nextLevel","consoleSuccess","promptNextLevel","resultNextLevel","run","exports"],"sources":["dependents-getter.ts"],"sourcesContent":["import yesno from 'yesno';\n// @ts-ignore AutoComplete is actually there, the d.ts is probably outdated\nimport { prompt, AutoComplete } from 'enquirer';\nimport { compact, uniq } from 'lodash';\nimport chalk from 'chalk';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport { GraphMain } from '@teambit/graph';\nimport { Logger } from '@teambit/logger';\nimport { Workspace } from '@teambit/workspace';\nimport { BitError } from '@teambit/bit-error';\nimport { ImportOptions } from './import-components';\n\nconst SHOW_ALL_PATHS_LIMIT = 10;\nconst SCROLL_LIMIT = 20;\n\nexport class DependentsGetter {\n constructor(\n private logger: Logger,\n private workspace: Workspace,\n private graph: GraphMain,\n private options: ImportOptions\n ) {}\n\n async getDependents(targetCompIds: ComponentID[]): Promise<ComponentID[]> {\n this.logger.setStatusLine('finding dependents');\n const { silent } = this.options;\n const graph = await this.graph.getGraphIds();\n const sourceIds = await this.workspace.listIds();\n const getIdsForThrough = () => {\n if (!this.options.dependentsVia) return undefined;\n return this.options.dependentsVia\n .split(',')\n .map((idStr) => idStr.trim())\n .map((id) => ComponentID.fromString(id));\n };\n const allPaths = graph.findAllPathsFromSourcesToTargets(sourceIds, targetCompIds, getIdsForThrough());\n const selectedPaths = silent ? allPaths : await this.promptDependents(allPaths);\n const uniqAsStrings = uniq(selectedPaths.flat());\n\n const ids: ComponentID[] = [];\n const idsToFilterOut = ComponentIdList.fromArray([...sourceIds, ...targetCompIds]);\n uniqAsStrings.forEach((idStr) => {\n const id = ComponentID.fromString(idStr);\n if (idsToFilterOut.hasWithoutVersion(id)) return;\n const sameIds = uniqAsStrings.filter((idString) => idString.startsWith(`${id.toStringWithoutVersion()}@`));\n const idToImport = sameIds.length === 1 ? id : id.changeVersion(undefined);\n ids.push(idToImport);\n idsToFilterOut.push(idToImport);\n });\n\n const idsStr = ids.map((id) => id.toString());\n\n this.logger.debug(`found ${ids.length} component for --dependents flag`, idsStr);\n if (!this.options.silent) {\n this.logger.clearStatusLine();\n const question = idsStr.length\n ? `found the following ${ids.length} components for --dependents flag:\\n${idsStr.join('\\n')}`\n : 'unable to find dependents for the given component (probably the workspace components using it directly)';\n const ok = await yesno({\n question: `${question}\\nWould you like to continue with the import? [yes(y)/no(n)]`,\n });\n if (!ok) {\n throw new BitError('import was aborted');\n }\n }\n\n return ids;\n }\n\n private async promptDependents(allPaths: string[][]): Promise<string[][]> {\n if (!allPaths.length) return [];\n this.logger.clearStatusLine();\n\n const totalToShow = SHOW_ALL_PATHS_LIMIT;\n if (allPaths.length >= totalToShow) {\n return this.promptLevelByLevel(allPaths);\n }\n const firstItems = allPaths.slice(0, totalToShow);\n const choices = firstItems.map((path) => {\n const name = path.join(' -> ');\n return { name, value: path };\n });\n const tooManyPathsMsg =\n allPaths.length > totalToShow\n ? `${chalk.yellow(\n `\\nfound ${allPaths.length} paths, showing the shortest ${totalToShow}. if the desired path is not shown, use the --dependents-via flag`\n )}`\n : '';\n const result = await prompt<{ selectDependents: Record<string, string[]> }>({\n choices,\n footer: '\\nEnter to start importing. Ctrl+C to cancel.',\n indicator: (state: any, choice: any) => ` ${choice.enabled ? '●' : '○'}`,\n message:\n 'Choose which path to include ' +\n `(Press ${chalk.cyan('<space>')} to select, ` +\n `${chalk.cyan('<a>')} to toggle all, ` +\n `${chalk.cyan('<i>')} to invert selection)${tooManyPathsMsg}`,\n name: 'selectDependents',\n pointer: '❯',\n styles: {\n dark: chalk.white,\n em: chalk.bgBlack.whiteBright,\n success: chalk.white,\n },\n type: 'multiselect',\n validate(value: string[]) {\n if (value.length === 0) {\n return 'You must choose at least one path.';\n }\n return true;\n },\n j() {\n return this.down();\n },\n k() {\n return this.up();\n },\n result(names: string[]) {\n // This is needed in order to have the values of the choices in the answer object.\n // Otherwise, only the names of the selected choices would've been included.\n return this.map(names);\n },\n cancel() {\n // By default, canceling the prompt via Ctrl+c throws an empty string.\n // The custom cancel function prevents that behavior.\n // Otherwise, Bit CLI would print an error and confuse users.\n // See related issue: https://github.com/enquirer/enquirer/issues/225\n },\n } as any);\n\n return Object.values(result.selectDependents);\n }\n\n private async promptLevelByLevel(allPaths: string[][]): Promise<string[][]> {\n if (allPaths.length < SHOW_ALL_PATHS_LIMIT) {\n throw new Error(`expected to have at least ${SHOW_ALL_PATHS_LIMIT} paths`);\n }\n const finalPath: string[] = [];\n this.logger\n .console(`found ${allPaths.length} available paths from the workspace components to the target components.\nthe following prompts will guide you to choose the desired path to import.`);\n\n const getPrompt = (choices: string[], level: number, totalPaths: number) => {\n return new AutoComplete({\n name: 'comp',\n message: `Choose which component to include`,\n limit: SCROLL_LIMIT,\n footer() {\n return choices.length >= SCROLL_LIMIT ? chalk.dim('(Scroll up and down to reveal more choices)') : '';\n },\n header() {\n if (level === 1) return '';\n return `total ${totalPaths} paths left (out of ${allPaths.length})`;\n },\n cancel() {\n // By default, canceling the prompt via Ctrl+c throws an empty string.\n // The custom cancel function prevents that behavior.\n // Otherwise, Bit CLI would print an error and confuse users.\n // See related issue: https://github.com/enquirer/enquirer/issues/225\n },\n choices,\n });\n };\n\n const getLevel = (level: number, withinPaths: string[][]): string[] => {\n return compact(uniq(withinPaths.map((path) => path[level]))).sort();\n };\n\n const processLevel = async (level: number, paths: string[][], previousLevel?: string): Promise<string[]> => {\n const pathsWithinThisLevel = previousLevel ? paths.filter((path) => path[level] === previousLevel) : paths;\n const nextLevel = getLevel(level + 1, pathsWithinThisLevel);\n if (!nextLevel.length) {\n return finalPath;\n }\n if (nextLevel.length === 1) {\n finalPath.push(nextLevel[0]);\n this.logger.consoleSuccess(`${nextLevel[0]} (auto-selected)`);\n return processLevel(level + 1, pathsWithinThisLevel, nextLevel[0]);\n }\n const promptNextLevel = getPrompt(nextLevel, level + 1, pathsWithinThisLevel.length);\n const resultNextLevel = await promptNextLevel.run();\n finalPath.push(resultNextLevel);\n return processLevel(level + 1, pathsWithinThisLevel, resultNextLevel);\n };\n\n const result = await processLevel(0, allPaths);\n\n return [result];\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,UAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,SAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,QAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,OAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,OAAA;EAAA,MAAAL,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAG,MAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,aAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,YAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,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;AAR9C;;AAWA,MAAMG,oBAAoB,GAAG,EAAE;AAC/B,MAAMC,YAAY,GAAG,EAAE;AAEhB,MAAMC,gBAAgB,CAAC;EAC5BC,WAAWA,CACDC,MAAc,EACdC,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,CAAC;QAC7D,OAAOJ,YAAY,CAACV,KAAK,GAAG,CAAC,EAAEa,oBAAoB,EAAEC,SAAS,CAAC,CAAC,CAAC,CAAC;MACpE;MACA,MAAME,eAAe,GAAGjB,SAAS,CAACe,SAAS,EAAEd,KAAK,GAAG,CAAC,EAAEa,oBAAoB,CAACpE,MAAM,CAAC;MACpF,MAAMwE,eAAe,GAAG,MAAMD,eAAe,CAACE,GAAG,CAAC,CAAC;MACnDrB,SAAS,CAAClD,IAAI,CAACsE,eAAe,CAAC;MAC/B,OAAOP,YAAY,CAACV,KAAK,GAAG,CAAC,EAAEa,oBAAoB,EAAEI,eAAe,CAAC;IACvE,CAAC;IAED,MAAMjD,MAAM,GAAG,MAAM0C,YAAY,CAAC,CAAC,EAAEpF,QAAQ,CAAC;IAE9C,OAAO,CAAC0C,MAAM,CAAC;EACjB;AACF;AAACmD,OAAA,CAAApH,gBAAA,GAAAA,gBAAA"}
|
|
1
|
+
{"version":3,"names":["_yesno","data","_interopRequireDefault","require","_enquirer","_lodash","_chalk","_componentId","_bitError","obj","__esModule","default","SHOW_ALL_PATHS_LIMIT","SCROLL_LIMIT","DependentsGetter","constructor","logger","workspace","graph","options","getDependents","targetCompIds","setStatusLine","silent","getGraphIds","sourceIds","listIds","getIdsForThrough","dependentsVia","undefined","split","map","idStr","trim","id","ComponentID","fromString","allPaths","findAllPathsFromSourcesToTargets","selectedPaths","promptDependents","uniqAsStrings","uniq","flat","ids","idsToFilterOut","ComponentIdList","fromArray","forEach","hasWithoutVersion","sameIds","filter","idString","startsWith","toStringWithoutVersion","idToImport","length","changeVersion","push","idsStr","toString","debug","clearStatusLine","question","join","ok","yesno","BitError","totalToShow","promptLevelByLevel","firstItems","slice","choices","path","name","value","tooManyPathsMsg","chalk","yellow","result","prompt","footer","indicator","state","choice","enabled","message","cyan","pointer","styles","dark","white","em","bgBlack","whiteBright","success","type","validate","j","down","k","up","names","cancel","Object","values","selectDependents","Error","finalPath","console","getPrompt","level","totalPaths","AutoComplete","limit","dim","header","getLevel","withinPaths","compact","sort","processLevel","paths","previousLevel","pathsWithinThisLevel","nextLevel","consoleSuccess","promptNextLevel","resultNextLevel","run","exports"],"sources":["dependents-getter.ts"],"sourcesContent":["import yesno from 'yesno';\n// @ts-ignore AutoComplete is actually there, the d.ts is probably outdated\nimport { prompt, AutoComplete } from 'enquirer';\nimport { compact, uniq } from 'lodash';\nimport chalk from 'chalk';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport { GraphMain } from '@teambit/graph';\nimport { Logger } from '@teambit/logger';\nimport { Workspace } from '@teambit/workspace';\nimport { BitError } from '@teambit/bit-error';\nimport { ImportOptions } from './import-components';\n\nconst SHOW_ALL_PATHS_LIMIT = 10;\nconst SCROLL_LIMIT = 20;\n\nexport class DependentsGetter {\n constructor(\n private logger: Logger,\n private workspace: Workspace,\n private graph: GraphMain,\n private options: ImportOptions\n ) {}\n\n async getDependents(targetCompIds: ComponentID[]): Promise<ComponentID[]> {\n this.logger.setStatusLine('finding dependents');\n const { silent } = this.options;\n const graph = await this.graph.getGraphIds();\n const sourceIds = this.workspace.listIds();\n const getIdsForThrough = () => {\n if (!this.options.dependentsVia) return undefined;\n return this.options.dependentsVia\n .split(',')\n .map((idStr) => idStr.trim())\n .map((id) => ComponentID.fromString(id));\n };\n const allPaths = graph.findAllPathsFromSourcesToTargets(sourceIds, targetCompIds, getIdsForThrough());\n const selectedPaths = silent ? allPaths : await this.promptDependents(allPaths);\n const uniqAsStrings = uniq(selectedPaths.flat());\n\n const ids: ComponentID[] = [];\n const idsToFilterOut = ComponentIdList.fromArray([...sourceIds, ...targetCompIds]);\n uniqAsStrings.forEach((idStr) => {\n const id = ComponentID.fromString(idStr);\n if (idsToFilterOut.hasWithoutVersion(id)) return;\n const sameIds = uniqAsStrings.filter((idString) => idString.startsWith(`${id.toStringWithoutVersion()}@`));\n const idToImport = sameIds.length === 1 ? id : id.changeVersion(undefined);\n ids.push(idToImport);\n idsToFilterOut.push(idToImport);\n });\n\n const idsStr = ids.map((id) => id.toString());\n\n this.logger.debug(`found ${ids.length} component for --dependents flag`, idsStr);\n if (!this.options.silent) {\n this.logger.clearStatusLine();\n const question = idsStr.length\n ? `found the following ${ids.length} components for --dependents flag:\\n${idsStr.join('\\n')}`\n : 'unable to find dependents for the given component (probably the workspace components using it directly)';\n const ok = await yesno({\n question: `${question}\\nWould you like to continue with the import? [yes(y)/no(n)]`,\n });\n if (!ok) {\n throw new BitError('import was aborted');\n }\n }\n\n return ids;\n }\n\n private async promptDependents(allPaths: string[][]): Promise<string[][]> {\n if (!allPaths.length) return [];\n this.logger.clearStatusLine();\n\n const totalToShow = SHOW_ALL_PATHS_LIMIT;\n if (allPaths.length >= totalToShow) {\n return this.promptLevelByLevel(allPaths);\n }\n const firstItems = allPaths.slice(0, totalToShow);\n const choices = firstItems.map((path) => {\n const name = path.join(' -> ');\n return { name, value: path };\n });\n const tooManyPathsMsg =\n allPaths.length > totalToShow\n ? `${chalk.yellow(\n `\\nfound ${allPaths.length} paths, showing the shortest ${totalToShow}. if the desired path is not shown, use the --dependents-via flag`\n )}`\n : '';\n const result = await prompt<{ selectDependents: Record<string, string[]> }>({\n choices,\n footer: '\\nEnter to start importing. Ctrl+C to cancel.',\n indicator: (state: any, choice: any) => ` ${choice.enabled ? '●' : '○'}`,\n message:\n 'Choose which path to include ' +\n `(Press ${chalk.cyan('<space>')} to select, ` +\n `${chalk.cyan('<a>')} to toggle all, ` +\n `${chalk.cyan('<i>')} to invert selection)${tooManyPathsMsg}`,\n name: 'selectDependents',\n pointer: '❯',\n styles: {\n dark: chalk.white,\n em: chalk.bgBlack.whiteBright,\n success: chalk.white,\n },\n type: 'multiselect',\n validate(value: string[]) {\n if (value.length === 0) {\n return 'You must choose at least one path.';\n }\n return true;\n },\n j() {\n return this.down();\n },\n k() {\n return this.up();\n },\n result(names: string[]) {\n // This is needed in order to have the values of the choices in the answer object.\n // Otherwise, only the names of the selected choices would've been included.\n return this.map(names);\n },\n cancel() {\n // By default, canceling the prompt via Ctrl+c throws an empty string.\n // The custom cancel function prevents that behavior.\n // Otherwise, Bit CLI would print an error and confuse users.\n // See related issue: https://github.com/enquirer/enquirer/issues/225\n },\n } as any);\n\n return Object.values(result.selectDependents);\n }\n\n private async promptLevelByLevel(allPaths: string[][]): Promise<string[][]> {\n if (allPaths.length < SHOW_ALL_PATHS_LIMIT) {\n throw new Error(`expected to have at least ${SHOW_ALL_PATHS_LIMIT} paths`);\n }\n const finalPath: string[] = [];\n this.logger\n .console(`found ${allPaths.length} available paths from the workspace components to the target components.\nthe following prompts will guide you to choose the desired path to import.`);\n\n const getPrompt = (choices: string[], level: number, totalPaths: number) => {\n return new AutoComplete({\n name: 'comp',\n message: `Choose which component to include`,\n limit: SCROLL_LIMIT,\n footer() {\n return choices.length >= SCROLL_LIMIT ? chalk.dim('(Scroll up and down to reveal more choices)') : '';\n },\n header() {\n if (level === 1) return '';\n return `total ${totalPaths} paths left (out of ${allPaths.length})`;\n },\n cancel() {\n // By default, canceling the prompt via Ctrl+c throws an empty string.\n // The custom cancel function prevents that behavior.\n // Otherwise, Bit CLI would print an error and confuse users.\n // See related issue: https://github.com/enquirer/enquirer/issues/225\n },\n choices,\n });\n };\n\n const getLevel = (level: number, withinPaths: string[][]): string[] => {\n return compact(uniq(withinPaths.map((path) => path[level]))).sort();\n };\n\n const processLevel = async (level: number, paths: string[][], previousLevel?: string): Promise<string[]> => {\n const pathsWithinThisLevel = previousLevel ? paths.filter((path) => path[level] === previousLevel) : paths;\n const nextLevel = getLevel(level + 1, pathsWithinThisLevel);\n if (!nextLevel.length) {\n return finalPath;\n }\n if (nextLevel.length === 1) {\n finalPath.push(nextLevel[0]);\n this.logger.consoleSuccess(`${nextLevel[0]} (auto-selected)`);\n return processLevel(level + 1, pathsWithinThisLevel, nextLevel[0]);\n }\n const promptNextLevel = getPrompt(nextLevel, level + 1, pathsWithinThisLevel.length);\n const resultNextLevel = await promptNextLevel.run();\n finalPath.push(resultNextLevel);\n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C,CAAC,CAAC;MACpE;MACA,MAAME,eAAe,GAAGjB,SAAS,CAACe,SAAS,EAAEd,KAAK,GAAG,CAAC,EAAEa,oBAAoB,CAACpE,MAAM,CAAC;MACpF,MAAMwE,eAAe,GAAG,MAAMD,eAAe,CAACE,GAAG,CAAC,CAAC;MACnDrB,SAAS,CAAClD,IAAI,CAACsE,eAAe,CAAC;MAC/B,OAAOP,YAAY,CAACV,KAAK,GAAG,CAAC,EAAEa,oBAAoB,EAAEI,eAAe,CAAC;IACvE,CAAC;IAED,MAAMjD,MAAM,GAAG,MAAM0C,YAAY,CAAC,CAAC,EAAEpF,QAAQ,CAAC;IAE9C,OAAO,CAAC0C,MAAM,CAAC;EACjB;AACF;AAACmD,OAAA,CAAApH,gBAAA,GAAAA,gBAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_importer@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_importer@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_importer@1.0.180/dist/importer.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_importer@1.0.180/dist/importer.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/importer",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.180",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/scope/importer",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.scope",
|
|
8
8
|
"name": "importer",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.180"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -20,18 +20,18 @@
|
|
|
20
20
|
"@teambit/lane-id": "0.0.311",
|
|
21
21
|
"@teambit/harmony": "0.4.6",
|
|
22
22
|
"@teambit/legacy-bit-id": "1.1.1",
|
|
23
|
-
"@teambit/graph": "1.0.
|
|
23
|
+
"@teambit/graph": "1.0.180",
|
|
24
24
|
"@teambit/logger": "0.0.945",
|
|
25
|
-
"@teambit/workspace": "1.0.
|
|
25
|
+
"@teambit/workspace": "1.0.180",
|
|
26
26
|
"@teambit/cli": "0.0.852",
|
|
27
|
-
"@teambit/checkout": "1.0.
|
|
28
|
-
"@teambit/component-writer": "1.0.
|
|
29
|
-
"@teambit/config-merger": "0.0.
|
|
30
|
-
"@teambit/envs": "1.0.
|
|
31
|
-
"@teambit/merging": "1.0.
|
|
32
|
-
"@teambit/dependency-resolver": "1.0.
|
|
33
|
-
"@teambit/install": "1.0.
|
|
34
|
-
"@teambit/scope": "1.0.
|
|
27
|
+
"@teambit/checkout": "1.0.180",
|
|
28
|
+
"@teambit/component-writer": "1.0.180",
|
|
29
|
+
"@teambit/config-merger": "0.0.47",
|
|
30
|
+
"@teambit/envs": "1.0.180",
|
|
31
|
+
"@teambit/merging": "1.0.180",
|
|
32
|
+
"@teambit/dependency-resolver": "1.0.180",
|
|
33
|
+
"@teambit/install": "1.0.180",
|
|
34
|
+
"@teambit/scope": "1.0.180"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/lodash": "4.14.165",
|