@teambit/importer 1.0.219 → 1.0.221

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.219" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.scope/importer@1.0.221" 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={61005:(e,t,o)=>{var r={id:"teambit.scope/importer@1.0.219",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(61005);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})()));
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={43966:(e,t,o)=>{var r={id:"teambit.scope/importer@1.0.221",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(43966);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})()));
@@ -525,7 +525,7 @@
525
525
  "_legacy": {
526
526
  "scope": "teambit.scope",
527
527
  "name": "importer",
528
- "version": "1.0.219"
528
+ "version": "1.0.221"
529
529
  },
530
530
  "_scope": "teambit.scope"
531
531
  }
@@ -540,7 +540,7 @@
540
540
  "line": 38,
541
541
  "character": 1
542
542
  },
543
- "signature": "type ImportOptions = {\n ids: string[];\n verbose?: boolean | undefined;\n merge?: boolean | undefined;\n mergeStrategy?: \"manual\" | \"theirs\" | \"ours\" | undefined;\n filterEnvs?: string[] | undefined;\n writeToPath?: string | undefined;\n ... 17 more ...;\n isLaneFromRemote?: boolean | undefined;\n}",
543
+ "signature": "type ImportOptions = {\n ids: string[];\n verbose?: boolean | undefined;\n merge?: boolean | undefined;\n mergeStrategy?: \"theirs\" | \"ours\" | \"manual\" | undefined;\n filterEnvs?: string[] | undefined;\n writeToPath?: string | undefined;\n ... 17 more ...;\n isLaneFromRemote?: boolean | undefined;\n}",
544
544
  "name": "ImportOptions",
545
545
  "type": {
546
546
  "__schema": "TypeLiteralSchema",
@@ -625,7 +625,7 @@
625
625
  "line": 42,
626
626
  "character": 3
627
627
  },
628
- "signature": "(property) mergeStrategy?: \"manual\" | \"theirs\" | \"ours\" | undefined",
628
+ "signature": "(property) mergeStrategy?: \"theirs\" | \"ours\" | \"manual\" | undefined",
629
629
  "name": "mergeStrategy",
630
630
  "type": {
631
631
  "__schema": "TypeRefSchema",
@@ -2972,7 +2972,7 @@
2972
2972
  "_legacy": {
2973
2973
  "scope": "teambit.scope",
2974
2974
  "name": "importer",
2975
- "version": "1.0.219"
2975
+ "version": "1.0.221"
2976
2976
  },
2977
2977
  "_scope": "teambit.scope"
2978
2978
  }
@@ -3068,7 +3068,7 @@
3068
3068
  "line": 38,
3069
3069
  "character": 1
3070
3070
  },
3071
- "signature": "type ImportOptions = {\n ids: string[];\n verbose?: boolean | undefined;\n merge?: boolean | undefined;\n mergeStrategy?: \"manual\" | \"theirs\" | \"ours\" | undefined;\n filterEnvs?: string[] | undefined;\n writeToPath?: string | undefined;\n ... 17 more ...;\n isLaneFromRemote?: boolean | undefined;\n}",
3071
+ "signature": "type ImportOptions = {\n ids: string[];\n verbose?: boolean | undefined;\n merge?: boolean | undefined;\n mergeStrategy?: \"theirs\" | \"ours\" | \"manual\" | undefined;\n filterEnvs?: string[] | undefined;\n writeToPath?: string | undefined;\n ... 17 more ...;\n isLaneFromRemote?: boolean | undefined;\n}",
3072
3072
  "name": "ImportOptions",
3073
3073
  "type": {
3074
3074
  "__schema": "TypeLiteralSchema",
@@ -3153,7 +3153,7 @@
3153
3153
  "line": 42,
3154
3154
  "character": 3
3155
3155
  },
3156
- "signature": "(property) mergeStrategy?: \"manual\" | \"theirs\" | \"ours\" | undefined",
3156
+ "signature": "(property) mergeStrategy?: \"theirs\" | \"ours\" | \"manual\" | undefined",
3157
3157
  "name": "mergeStrategy",
3158
3158
  "type": {
3159
3159
  "__schema": "TypeRefSchema",
@@ -3632,7 +3632,7 @@
3632
3632
  "line": 72,
3633
3633
  "character": 1
3634
3634
  },
3635
- "signature": "type ImportStatus = \"added\" | \"updated\" | \"up to date\"",
3635
+ "signature": "type ImportStatus = \"updated\" | \"added\" | \"up to date\"",
3636
3636
  "name": "ImportStatus",
3637
3637
  "type": {
3638
3638
  "__schema": "TypeUnionSchema",
@@ -6952,7 +6952,7 @@
6952
6952
  "componentId": {
6953
6953
  "scope": "teambit.scope",
6954
6954
  "name": "importer",
6955
- "version": "1.0.219"
6955
+ "version": "1.0.221"
6956
6956
  },
6957
6957
  "taggedModuleExports": []
6958
6958
  }
@@ -233,7 +233,7 @@ function formatPlainComponentItemWithVersions(bitId, importDetails) {
233
233
  if (importDetails.latestVersion) {
234
234
  return `${importDetails.versions.length} new version(s) available, latest ${importDetails.latestVersion}`;
235
235
  }
236
- return `new versions: ${importDetails.versions.join(', ')}`;
236
+ return importDetails.versions.length > 5 ? `${importDetails.versions.length} new versions` : `new versions: ${importDetails.versions.join(', ')}`;
237
237
  };
238
238
  const versions = getVersionsOutput();
239
239
  const usedVersion = status === 'added' ? `, currently used version ${bitId.version}` : '';
@@ -1 +1 @@
1
- {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_lodash","_merging","_mergeVersion","_componentId","_bitError","_utils","_chalkBox","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","ImportCmd","constructor","importer","name","description","report","ids","importFlags","importDetails","importedIds","importedDeps","installationError","compilationError","workspaceConfigUpdateResult","missingIds","cancellationMessage","lane","getImportResults","length","chalk","yellow","importedIdsUniqNoVersion","ComponentIdList","fromArray","toVersionLatest","summaryPrefix","upToDateCount","importedComponents","map","bitId","details","find","c","id","toStringWithoutVersion","Error","toString","status","formatPlainComponentItemWithVersions","getWsConfigUpdateLogs","logs","logsStr","join","underline","upToDateSuffix","upToDateStr","summary","importOutput","compact","importedDepsOutput","displayDependencies","immutableUnshift","uniq","formatPlainComponentItem","green","output","formatMissingComponents","getWorkspaceConfigUpdateOutput","installationErrorOutput","compilationErrorOutput","json","path","objects","override","verbose","conf","skipDependencyInstallation","skipWriteConfigFiles","merge","filterEnvs","saveInLane","dependencies","dependents","dependentsDryRun","silent","dependentsVia","dependentsAll","allHistory","fetchDeps","trackOnly","includeDeprecated","logger","warn","BitError","mergeStrategy","options","keys","MergeOptions","includes","envsToFilter","split","p","trim","undefined","importOptions","Boolean","writeToPath","objectsOnly","writeConfig","installNpmPackages","writeConfigFiles","importDependenciesDirectly","importDependents","import","_packageManagerArgs","exports","missing","title","subTitle","body","red","getVersionsOutput","versions","latestVersion","usedVersion","version","getConflictMessage","filesStatus","conflictedFiles","filter","file","FileStatus","manual","bold","conflictMessage","deprecated","removed","missingDeps","d","dim","cyan"],"sources":["import.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { compact, uniq } from 'lodash';\nimport { installationErrorOutput, compilationErrorOutput, getWorkspaceConfigUpdateOutput } from '@teambit/merging';\nimport {\n FileStatus,\n MergeOptions,\n MergeStrategy,\n} from '@teambit/legacy/dist/consumer/versions-ops/merge-version/merge-version';\nimport { ComponentIdList, ComponentID } from '@teambit/component-id';\nimport { BitError } from '@teambit/bit-error';\nimport { immutableUnshift } from '@teambit/legacy/dist/utils';\nimport { formatPlainComponentItem } from '@teambit/legacy/dist/cli/chalk-box';\nimport { ImporterMain } from './importer.main.runtime';\nimport { ImportOptions, ImportDetails, ImportStatus, ImportResult } from './import-components';\n\ntype ImportFlags = {\n path?: string;\n objects?: boolean;\n displayDependencies?: boolean;\n override?: boolean;\n verbose?: boolean;\n json?: boolean;\n conf?: string;\n skipDependencyInstallation?: boolean;\n skipWriteConfigFiles?: boolean;\n merge?: MergeStrategy;\n filterEnvs?: string;\n saveInLane?: boolean;\n dependencies?: boolean;\n dependents?: boolean;\n dependentsDryRun?: boolean;\n dependentsVia?: string;\n dependentsAll?: boolean;\n silent?: boolean;\n allHistory?: boolean;\n fetchDeps?: boolean;\n trackOnly?: boolean;\n includeDeprecated?: boolean;\n};\n\nexport class ImportCmd implements Command {\n name = 'import [component-patterns...]';\n description = 'import components from their remote scopes to the local workspace';\n helpUrl = 'reference/components/importing-components';\n arguments = [\n {\n name: 'component-patterns...',\n description:\n 'component IDs or component patterns (separated by space). Use patterns to import groups of components using a common scope or namespace. E.g., \"utils/*\" (wrap with double quotes)',\n },\n ];\n extendedDescription: string;\n group = 'collaborate';\n alias = '';\n options = [\n ['p', 'path <path>', 'import components into a specific directory (a relative path in the workspace)'],\n [\n 'o',\n 'objects',\n 'import components objects to the local scope without checkout (without writing them to the file system). This is the default behavior for import with no id argument',\n ],\n ['O', 'override', 'override local changes'],\n ['v', 'verbose', 'show verbose output for inspection'],\n ['j', 'json', 'return the output as JSON'],\n // ['', 'conf', 'write the configuration file (component.json) of the component'], // not working. need to fix once ComponentWriter is moved to Harmony\n ['x', 'skip-dependency-installation', 'do not auto-install dependencies of the imported components'],\n ['', 'skip-write-config-files', 'do not write config files (such as eslint, tsconfig, prettier, etc...)'],\n [\n 'm',\n 'merge [strategy]',\n 'merge local changes with the imported version. strategy should be \"theirs\", \"ours\" or \"manual\"',\n ],\n [\n '',\n 'dependencies',\n 'import all dependencies (bit components only) of imported components and write them to the workspace',\n ],\n [\n '',\n 'dependents',\n 'import components found while traversing from the imported components upwards to the workspace components',\n ],\n [\n '',\n 'dependents-via <string>',\n 'same as --dependents except the traversal must go through the specified component. to specify multiple components, wrap with quotes and separate by a comma',\n ],\n [\n '',\n 'dependents-all',\n 'same as --dependents except not prompting for selecting paths but rather selecting all paths and showing final confirmation before importing',\n ],\n [\n '',\n 'dependents-dry-run',\n 'DEPRECATED. (this is the default now). same as --dependents, except it prints the found dependents and wait for confirmation before importing them',\n ],\n ['', 'silent', 'no prompt for --dependents/--dependents-via flags'],\n [\n '',\n 'filter-envs <envs>',\n 'only import components that have the specified environment (e.g., \"teambit.react/react-env\")',\n ],\n [\n '',\n 'save-in-lane',\n 'when checked out to a lane and the component is not on the remote-lane, save it in the lane (defaults to save on main)',\n ],\n [\n '',\n 'all-history',\n 'relevant for fetching all components objects. avoid optimizations, fetch all history versions, always',\n ],\n [\n '',\n 'fetch-deps',\n 'fetch dependencies (bit components) objects to the local scope, but dont add to the workspace. Useful to resolve errors about missing dependency data',\n ],\n [\n '',\n 'track-only',\n 'do not write any component files, just create .bitmap entries of the imported components. Useful when the files already exist and just want to re-add the component to the bitmap',\n ],\n ['', 'include-deprecated', 'when importing with patterns, include deprecated components (default to exclude them)'],\n ] as CommandOptions;\n loader = true;\n remoteOp = true;\n _packageManagerArgs: string[]; // gets populated by yargs-adapter.handler().\n\n constructor(private importer: ImporterMain) {}\n\n async report([ids = []]: [string[]], importFlags: ImportFlags): Promise<any> {\n const {\n importDetails,\n importedIds,\n importedDeps,\n installationError,\n compilationError,\n workspaceConfigUpdateResult,\n missingIds,\n cancellationMessage,\n lane,\n } = await this.getImportResults(ids, importFlags);\n if (!importedIds.length && !missingIds?.length) {\n return chalk.yellow(cancellationMessage || 'nothing to import');\n }\n const importedIdsUniqNoVersion = ComponentIdList.fromArray(importedIds).toVersionLatest();\n const summaryPrefix =\n importedIdsUniqNoVersion.length === 1\n ? 'successfully imported one component'\n : `successfully imported ${importedIdsUniqNoVersion.length} components`;\n\n let upToDateCount = 0;\n const importedComponents = importedIds.map((bitId) => {\n const details = importDetails.find((c) => c.id === bitId.toStringWithoutVersion());\n if (!details) throw new Error(`missing details for component ${bitId.toString()}`);\n if (details.status === 'up to date') {\n upToDateCount += 1;\n }\n return formatPlainComponentItemWithVersions(bitId, details);\n });\n const getWsConfigUpdateLogs = () => {\n const logs = workspaceConfigUpdateResult?.logs;\n if (!logs || !logs.length) return '';\n const logsStr = logs.join('\\n');\n return `${chalk.underline('verbose logs of workspace config update')}\\n${logsStr}`;\n };\n const upToDateSuffix = lane ? ' on the lane' : '';\n const upToDateStr = upToDateCount === 0 ? '' : `, ${upToDateCount} components are up to date${upToDateSuffix}`;\n const summary = `${summaryPrefix}${upToDateStr}`;\n const importOutput = compact(importedComponents).join('\\n');\n const importedDepsOutput =\n importFlags.displayDependencies && importedDeps.length\n ? immutableUnshift(\n uniq(importedDeps.map(formatPlainComponentItem)),\n chalk.green(`\\n\\nsuccessfully imported ${importedDeps.length} component dependencies`)\n ).join('\\n')\n : '';\n\n const output = compact([\n getWsConfigUpdateLogs(),\n importOutput,\n importedDepsOutput,\n formatMissingComponents(missingIds),\n getWorkspaceConfigUpdateOutput(workspaceConfigUpdateResult),\n installationErrorOutput(installationError),\n compilationErrorOutput(compilationError),\n chalk.green(summary),\n ]).join('\\n\\n');\n\n return output;\n }\n\n async json([ids]: [string[]], importFlags: ImportFlags) {\n const { importDetails, installationError, missingIds } = await this.getImportResults(ids, importFlags);\n\n return { importDetails, installationError, missingIds };\n }\n\n private async getImportResults(\n ids: string[],\n {\n path,\n objects = false,\n override = false,\n verbose = false,\n conf,\n skipDependencyInstallation = false,\n skipWriteConfigFiles = false,\n merge,\n filterEnvs,\n saveInLane = false,\n dependencies = false,\n dependents = false,\n dependentsDryRun = false,\n silent,\n dependentsVia,\n dependentsAll,\n allHistory = false,\n fetchDeps = false,\n trackOnly = false,\n includeDeprecated = false,\n }: ImportFlags\n ): Promise<ImportResult> {\n if (dependentsDryRun) {\n this.importer.logger.warn(`the \"--dependents-dry-run\" flag is deprecated and is now the default behavior`);\n }\n if (objects && merge) {\n throw new BitError(' --objects and --merge flags cannot be used together');\n }\n if (override && merge) {\n throw new BitError('--override and --merge cannot be used together');\n }\n if (!ids.length && dependencies) {\n throw new BitError('you have to specify ids to use \"--dependencies\" flag');\n }\n if (!ids.length && dependents) {\n throw new BitError('you have to specify ids to use \"--dependents\" flag');\n }\n if (!ids.length && dependentsVia) {\n throw new BitError('you have to specify ids to use \"--dependents-via\" flag');\n }\n if (!ids.length && trackOnly) {\n throw new BitError('you have to specify ids to use \"--track-only\" flag');\n }\n let mergeStrategy;\n if (merge && typeof merge === 'string') {\n const options = Object.keys(MergeOptions);\n if (!options.includes(merge)) {\n throw new BitError(`merge must be one of the following: ${options.join(', ')}`);\n }\n mergeStrategy = merge;\n }\n\n const envsToFilter = filterEnvs ? filterEnvs.split(',').map((p) => p.trim()) : undefined;\n\n const importOptions: ImportOptions = {\n ids,\n verbose,\n merge: Boolean(merge),\n filterEnvs: envsToFilter,\n mergeStrategy,\n writeToPath: path,\n objectsOnly: objects,\n override,\n writeConfig: Boolean(conf),\n installNpmPackages: !skipDependencyInstallation,\n writeConfigFiles: !skipWriteConfigFiles,\n saveInLane,\n importDependenciesDirectly: dependencies,\n importDependents: dependents,\n dependentsVia,\n dependentsAll,\n silent,\n allHistory,\n fetchDeps,\n trackOnly,\n includeDeprecated,\n };\n return this.importer.import(importOptions, this._packageManagerArgs);\n }\n}\n\nfunction formatMissingComponents(missing?: string[]) {\n if (!missing?.length) return '';\n const title = chalk.underline('Missing Components');\n const subTitle = `The following components are missing from the remote in the requested version, try running \"bit status\" to re-sync your .bitmap file\nAlso, check that the requested version exists on main or the checked out lane`;\n const body = chalk.red(missing.join('\\n'));\n return `${title}\\n${subTitle}\\n${body}`;\n}\n\nfunction formatPlainComponentItemWithVersions(bitId: ComponentID, importDetails: ImportDetails) {\n const status: ImportStatus = importDetails.status;\n const id = bitId.toStringWithoutVersion();\n const getVersionsOutput = () => {\n if (!importDetails.versions.length) return '';\n if (importDetails.latestVersion) {\n return `${importDetails.versions.length} new version(s) available, latest ${importDetails.latestVersion}`;\n }\n return `new versions: ${importDetails.versions.join(', ')}`;\n };\n const versions = getVersionsOutput();\n const usedVersion = status === 'added' ? `, currently used version ${bitId.version}` : '';\n const getConflictMessage = () => {\n if (!importDetails.filesStatus) return '';\n const conflictedFiles = Object.keys(importDetails.filesStatus)\n // @ts-ignore file is set\n .filter((file) => importDetails.filesStatus[file] === FileStatus.manual);\n if (!conflictedFiles.length) return '';\n return `(the following files were saved with conflicts ${conflictedFiles\n .map((file) => chalk.bold(file))\n .join(', ')}) `;\n };\n const conflictMessage = getConflictMessage();\n const deprecated = importDetails.deprecated && !importDetails.removed ? chalk.yellow('deprecated') : '';\n const removed = importDetails.removed ? chalk.red('removed') : '';\n const missingDeps = importDetails.missingDeps.length\n ? chalk.red(`missing dependencies: ${importDetails.missingDeps.map((d) => d.toString()).join(', ')}`)\n : '';\n if (status === 'up to date' && !missingDeps && !deprecated && !conflictMessage && !removed) {\n return undefined;\n }\n return chalk.dim(\n `- ${chalk.green(status)} ${chalk.cyan(\n id\n )} ${versions}${usedVersion} ${conflictMessage}${deprecated}${removed} ${missingDeps}`\n );\n}\n"],"mappings":";;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,SAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,QAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,cAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,aAAA,YAAAA,CAA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ChDC,gBAAK,CAAC2F,GAAG,CAAE,yBAAwBtG,aAAa,CAACuH,WAAW,CAACnG,GAAG,CAAEoG,CAAC,IAAKA,CAAC,CAAC5F,QAAQ,CAAC,CAAC,CAAC,CAACM,IAAI,CAAC,IAAI,CAAE,EAAC,CAAC,GACnG,EAAE;EACN,IAAIL,MAAM,KAAK,YAAY,IAAI,CAAC0F,WAAW,IAAI,CAACF,UAAU,IAAI,CAACD,eAAe,IAAI,CAACE,OAAO,EAAE;IAC1F,OAAOjC,SAAS;EAClB;EACA,OAAO1E,gBAAK,CAAC8G,GAAG,CACb,KAAI9G,gBAAK,CAACmC,KAAK,CAACjB,MAAM,CAAE,IAAGlB,gBAAK,CAAC+G,IAAI,CACpCjG,EACF,CAAE,IAAG+E,QAAS,GAAEE,WAAY,IAAGU,eAAgB,GAAEC,UAAW,GAAEC,OAAQ,IAAGC,WAAY,EACvF,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["_chalk","data","_interopRequireDefault","require","_lodash","_merging","_mergeVersion","_componentId","_bitError","_utils","_chalkBox","obj","__esModule","default","_defineProperty","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","r","e","Symbol","toPrimitive","call","TypeError","String","Number","ImportCmd","constructor","importer","name","description","report","ids","importFlags","importDetails","importedIds","importedDeps","installationError","compilationError","workspaceConfigUpdateResult","missingIds","cancellationMessage","lane","getImportResults","length","chalk","yellow","importedIdsUniqNoVersion","ComponentIdList","fromArray","toVersionLatest","summaryPrefix","upToDateCount","importedComponents","map","bitId","details","find","c","id","toStringWithoutVersion","Error","toString","status","formatPlainComponentItemWithVersions","getWsConfigUpdateLogs","logs","logsStr","join","underline","upToDateSuffix","upToDateStr","summary","importOutput","compact","importedDepsOutput","displayDependencies","immutableUnshift","uniq","formatPlainComponentItem","green","output","formatMissingComponents","getWorkspaceConfigUpdateOutput","installationErrorOutput","compilationErrorOutput","json","path","objects","override","verbose","conf","skipDependencyInstallation","skipWriteConfigFiles","merge","filterEnvs","saveInLane","dependencies","dependents","dependentsDryRun","silent","dependentsVia","dependentsAll","allHistory","fetchDeps","trackOnly","includeDeprecated","logger","warn","BitError","mergeStrategy","options","keys","MergeOptions","includes","envsToFilter","split","p","trim","undefined","importOptions","Boolean","writeToPath","objectsOnly","writeConfig","installNpmPackages","writeConfigFiles","importDependenciesDirectly","importDependents","import","_packageManagerArgs","exports","missing","title","subTitle","body","red","getVersionsOutput","versions","latestVersion","usedVersion","version","getConflictMessage","filesStatus","conflictedFiles","filter","file","FileStatus","manual","bold","conflictMessage","deprecated","removed","missingDeps","d","dim","cyan"],"sources":["import.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { compact, uniq } from 'lodash';\nimport { installationErrorOutput, compilationErrorOutput, getWorkspaceConfigUpdateOutput } from '@teambit/merging';\nimport {\n FileStatus,\n MergeOptions,\n MergeStrategy,\n} from '@teambit/legacy/dist/consumer/versions-ops/merge-version/merge-version';\nimport { ComponentIdList, ComponentID } from '@teambit/component-id';\nimport { BitError } from '@teambit/bit-error';\nimport { immutableUnshift } from '@teambit/legacy/dist/utils';\nimport { formatPlainComponentItem } from '@teambit/legacy/dist/cli/chalk-box';\nimport { ImporterMain } from './importer.main.runtime';\nimport { ImportOptions, ImportDetails, ImportStatus, ImportResult } from './import-components';\n\ntype ImportFlags = {\n path?: string;\n objects?: boolean;\n displayDependencies?: boolean;\n override?: boolean;\n verbose?: boolean;\n json?: boolean;\n conf?: string;\n skipDependencyInstallation?: boolean;\n skipWriteConfigFiles?: boolean;\n merge?: MergeStrategy;\n filterEnvs?: string;\n saveInLane?: boolean;\n dependencies?: boolean;\n dependents?: boolean;\n dependentsDryRun?: boolean;\n dependentsVia?: string;\n dependentsAll?: boolean;\n silent?: boolean;\n allHistory?: boolean;\n fetchDeps?: boolean;\n trackOnly?: boolean;\n includeDeprecated?: boolean;\n};\n\nexport class ImportCmd implements Command {\n name = 'import [component-patterns...]';\n description = 'import components from their remote scopes to the local workspace';\n helpUrl = 'reference/components/importing-components';\n arguments = [\n {\n name: 'component-patterns...',\n description:\n 'component IDs or component patterns (separated by space). Use patterns to import groups of components using a common scope or namespace. E.g., \"utils/*\" (wrap with double quotes)',\n },\n ];\n extendedDescription: string;\n group = 'collaborate';\n alias = '';\n options = [\n ['p', 'path <path>', 'import components into a specific directory (a relative path in the workspace)'],\n [\n 'o',\n 'objects',\n 'import components objects to the local scope without checkout (without writing them to the file system). This is the default behavior for import with no id argument',\n ],\n ['O', 'override', 'override local changes'],\n ['v', 'verbose', 'show verbose output for inspection'],\n ['j', 'json', 'return the output as JSON'],\n // ['', 'conf', 'write the configuration file (component.json) of the component'], // not working. need to fix once ComponentWriter is moved to Harmony\n ['x', 'skip-dependency-installation', 'do not auto-install dependencies of the imported components'],\n ['', 'skip-write-config-files', 'do not write config files (such as eslint, tsconfig, prettier, etc...)'],\n [\n 'm',\n 'merge [strategy]',\n 'merge local changes with the imported version. strategy should be \"theirs\", \"ours\" or \"manual\"',\n ],\n [\n '',\n 'dependencies',\n 'import all dependencies (bit components only) of imported components and write them to the workspace',\n ],\n [\n '',\n 'dependents',\n 'import components found while traversing from the imported components upwards to the workspace components',\n ],\n [\n '',\n 'dependents-via <string>',\n 'same as --dependents except the traversal must go through the specified component. to specify multiple components, wrap with quotes and separate by a comma',\n ],\n [\n '',\n 'dependents-all',\n 'same as --dependents except not prompting for selecting paths but rather selecting all paths and showing final confirmation before importing',\n ],\n [\n '',\n 'dependents-dry-run',\n 'DEPRECATED. (this is the default now). same as --dependents, except it prints the found dependents and wait for confirmation before importing them',\n ],\n ['', 'silent', 'no prompt for --dependents/--dependents-via flags'],\n [\n '',\n 'filter-envs <envs>',\n 'only import components that have the specified environment (e.g., \"teambit.react/react-env\")',\n ],\n [\n '',\n 'save-in-lane',\n 'when checked out to a lane and the component is not on the remote-lane, save it in the lane (defaults to save on main)',\n ],\n [\n '',\n 'all-history',\n 'relevant for fetching all components objects. avoid optimizations, fetch all history versions, always',\n ],\n [\n '',\n 'fetch-deps',\n 'fetch dependencies (bit components) objects to the local scope, but dont add to the workspace. Useful to resolve errors about missing dependency data',\n ],\n [\n '',\n 'track-only',\n 'do not write any component files, just create .bitmap entries of the imported components. Useful when the files already exist and just want to re-add the component to the bitmap',\n ],\n ['', 'include-deprecated', 'when importing with patterns, include deprecated components (default to exclude them)'],\n ] as CommandOptions;\n loader = true;\n remoteOp = true;\n _packageManagerArgs: string[]; // gets populated by yargs-adapter.handler().\n\n constructor(private importer: ImporterMain) {}\n\n async report([ids = []]: [string[]], importFlags: ImportFlags): Promise<any> {\n const {\n importDetails,\n importedIds,\n importedDeps,\n installationError,\n compilationError,\n workspaceConfigUpdateResult,\n missingIds,\n cancellationMessage,\n lane,\n } = await this.getImportResults(ids, importFlags);\n if (!importedIds.length && !missingIds?.length) {\n return chalk.yellow(cancellationMessage || 'nothing to import');\n }\n const importedIdsUniqNoVersion = ComponentIdList.fromArray(importedIds).toVersionLatest();\n const summaryPrefix =\n importedIdsUniqNoVersion.length === 1\n ? 'successfully imported one component'\n : `successfully imported ${importedIdsUniqNoVersion.length} components`;\n\n let upToDateCount = 0;\n const importedComponents = importedIds.map((bitId) => {\n const details = importDetails.find((c) => c.id === bitId.toStringWithoutVersion());\n if (!details) throw new Error(`missing details for component ${bitId.toString()}`);\n if (details.status === 'up to date') {\n upToDateCount += 1;\n }\n return formatPlainComponentItemWithVersions(bitId, details);\n });\n const getWsConfigUpdateLogs = () => {\n const logs = workspaceConfigUpdateResult?.logs;\n if (!logs || !logs.length) return '';\n const logsStr = logs.join('\\n');\n return `${chalk.underline('verbose logs of workspace config update')}\\n${logsStr}`;\n };\n const upToDateSuffix = lane ? ' on the lane' : '';\n const upToDateStr = upToDateCount === 0 ? '' : `, ${upToDateCount} components are up to date${upToDateSuffix}`;\n const summary = `${summaryPrefix}${upToDateStr}`;\n const importOutput = compact(importedComponents).join('\\n');\n const importedDepsOutput =\n importFlags.displayDependencies && importedDeps.length\n ? immutableUnshift(\n uniq(importedDeps.map(formatPlainComponentItem)),\n chalk.green(`\\n\\nsuccessfully imported ${importedDeps.length} component dependencies`)\n ).join('\\n')\n : '';\n\n const output = compact([\n getWsConfigUpdateLogs(),\n importOutput,\n importedDepsOutput,\n formatMissingComponents(missingIds),\n getWorkspaceConfigUpdateOutput(workspaceConfigUpdateResult),\n installationErrorOutput(installationError),\n compilationErrorOutput(compilationError),\n chalk.green(summary),\n ]).join('\\n\\n');\n\n return output;\n }\n\n async json([ids]: [string[]], importFlags: ImportFlags) {\n const { importDetails, installationError, missingIds } = await this.getImportResults(ids, importFlags);\n\n return { importDetails, installationError, missingIds };\n }\n\n private async getImportResults(\n ids: string[],\n {\n path,\n objects = false,\n override = false,\n verbose = false,\n conf,\n skipDependencyInstallation = false,\n skipWriteConfigFiles = false,\n merge,\n filterEnvs,\n saveInLane = false,\n dependencies = false,\n dependents = false,\n dependentsDryRun = false,\n silent,\n dependentsVia,\n dependentsAll,\n allHistory = false,\n fetchDeps = false,\n trackOnly = false,\n includeDeprecated = false,\n }: ImportFlags\n ): Promise<ImportResult> {\n if (dependentsDryRun) {\n this.importer.logger.warn(`the \"--dependents-dry-run\" flag is deprecated and is now the default behavior`);\n }\n if (objects && merge) {\n throw new BitError(' --objects and --merge flags cannot be used together');\n }\n if (override && merge) {\n throw new BitError('--override and --merge cannot be used together');\n }\n if (!ids.length && dependencies) {\n throw new BitError('you have to specify ids to use \"--dependencies\" flag');\n }\n if (!ids.length && dependents) {\n throw new BitError('you have to specify ids to use \"--dependents\" flag');\n }\n if (!ids.length && dependentsVia) {\n throw new BitError('you have to specify ids to use \"--dependents-via\" flag');\n }\n if (!ids.length && trackOnly) {\n throw new BitError('you have to specify ids to use \"--track-only\" flag');\n }\n let mergeStrategy;\n if (merge && typeof merge === 'string') {\n const options = Object.keys(MergeOptions);\n if (!options.includes(merge)) {\n throw new BitError(`merge must be one of the following: ${options.join(', ')}`);\n }\n mergeStrategy = merge;\n }\n\n const envsToFilter = filterEnvs ? filterEnvs.split(',').map((p) => p.trim()) : undefined;\n\n const importOptions: ImportOptions = {\n ids,\n verbose,\n merge: Boolean(merge),\n filterEnvs: envsToFilter,\n mergeStrategy,\n writeToPath: path,\n objectsOnly: objects,\n override,\n writeConfig: Boolean(conf),\n installNpmPackages: !skipDependencyInstallation,\n writeConfigFiles: !skipWriteConfigFiles,\n saveInLane,\n importDependenciesDirectly: dependencies,\n importDependents: dependents,\n dependentsVia,\n dependentsAll,\n silent,\n allHistory,\n fetchDeps,\n trackOnly,\n includeDeprecated,\n };\n return this.importer.import(importOptions, this._packageManagerArgs);\n }\n}\n\nfunction formatMissingComponents(missing?: string[]) {\n if (!missing?.length) return '';\n const title = chalk.underline('Missing Components');\n const subTitle = `The following components are missing from the remote in the requested version, try running \"bit status\" to re-sync your .bitmap file\nAlso, check that the requested version exists on main or the checked out lane`;\n const body = chalk.red(missing.join('\\n'));\n return `${title}\\n${subTitle}\\n${body}`;\n}\n\nfunction formatPlainComponentItemWithVersions(bitId: ComponentID, importDetails: ImportDetails) {\n const status: ImportStatus = importDetails.status;\n const id = bitId.toStringWithoutVersion();\n const getVersionsOutput = () => {\n if (!importDetails.versions.length) return '';\n if (importDetails.latestVersion) {\n return `${importDetails.versions.length} new version(s) available, latest ${importDetails.latestVersion}`;\n }\n return importDetails.versions.length > 5\n ? `${importDetails.versions.length} new versions`\n : `new versions: ${importDetails.versions.join(', ')}`;\n };\n const versions = getVersionsOutput();\n const usedVersion = status === 'added' ? `, currently used version ${bitId.version}` : '';\n const getConflictMessage = () => {\n if (!importDetails.filesStatus) return '';\n const conflictedFiles = Object.keys(importDetails.filesStatus)\n // @ts-ignore file is set\n .filter((file) => importDetails.filesStatus[file] === FileStatus.manual);\n if (!conflictedFiles.length) return '';\n return `(the following files were saved with conflicts ${conflictedFiles\n .map((file) => chalk.bold(file))\n .join(', ')}) `;\n };\n const conflictMessage = getConflictMessage();\n const deprecated = importDetails.deprecated && !importDetails.removed ? chalk.yellow('deprecated') : '';\n const removed = importDetails.removed ? chalk.red('removed') : '';\n const missingDeps = importDetails.missingDeps.length\n ? chalk.red(`missing dependencies: ${importDetails.missingDeps.map((d) => d.toString()).join(', ')}`)\n : '';\n if (status === 'up to date' && !missingDeps && !deprecated && !conflictMessage && !removed) {\n return undefined;\n }\n return chalk.dim(\n `- ${chalk.green(status)} ${chalk.cyan(\n id\n )} ${versions}${usedVersion} ${conflictMessage}${deprecated}${removed} ${missingDeps}`\n );\n}\n"],"mappings":";;;;;;AACA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,SAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,QAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,cAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,aAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAKA,SAAAM,aAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,YAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,UAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,SAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,OAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,MAAA,YAAAA,CAAA;IAAA,OAAAR,IAAA;EAAA;EAAA,OAAAA,IAAA;AA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ClB;EACA,OAAO1E,gBAAK,CAAC8G,GAAG,CACb,KAAI9G,gBAAK,CAACmC,KAAK,CAACjB,MAAM,CAAE,IAAGlB,gBAAK,CAAC+G,IAAI,CACpCjG,EACF,CAAE,IAAG+E,QAAS,GAAEE,WAAY,IAAGU,eAAgB,GAAEC,UAAW,GAAEC,OAAQ,IAAGC,WAAY,EACvF,CAAC;AACH","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_importer@1.0.219/dist/importer.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_importer@1.0.219/dist/importer.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_importer@1.0.221/dist/importer.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.scope_importer@1.0.221/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.219",
3
+ "version": "1.0.221",
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.219"
9
+ "version": "1.0.221"
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.219",
24
- "@teambit/logger": "0.0.951",
25
- "@teambit/workspace": "1.0.219",
26
- "@teambit/cli": "0.0.858",
27
- "@teambit/checkout": "1.0.219",
28
- "@teambit/component-writer": "1.0.219",
29
- "@teambit/config-merger": "0.0.86",
30
- "@teambit/envs": "1.0.219",
31
- "@teambit/merging": "1.0.219",
32
- "@teambit/dependency-resolver": "1.0.219",
33
- "@teambit/install": "1.0.219",
34
- "@teambit/scope": "1.0.219"
23
+ "@teambit/graph": "1.0.221",
24
+ "@teambit/logger": "0.0.952",
25
+ "@teambit/workspace": "1.0.221",
26
+ "@teambit/cli": "0.0.859",
27
+ "@teambit/checkout": "1.0.221",
28
+ "@teambit/component-writer": "1.0.221",
29
+ "@teambit/config-merger": "0.0.88",
30
+ "@teambit/envs": "1.0.221",
31
+ "@teambit/merging": "1.0.221",
32
+ "@teambit/dependency-resolver": "1.0.221",
33
+ "@teambit/install": "1.0.221",
34
+ "@teambit/scope": "1.0.221"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/lodash": "4.14.165",