@teambit/export 1.0.470 → 1.0.471

Sign up to get free protection for your applications and to get access to all the features.
@@ -47,20 +47,6 @@ function _componentId() {
47
47
  };
48
48
  return data;
49
49
  }
50
- function _loader() {
51
- const data = _interopRequireDefault(require("@teambit/legacy/dist/cli/loader"));
52
- _loader = function () {
53
- return data;
54
- };
55
- return data;
56
- }
57
- function _loaderMessages() {
58
- const data = require("@teambit/legacy/dist/cli/loader/loader-messages");
59
- _loaderMessages = function () {
60
- return data;
61
- };
62
- return data;
63
- }
64
50
  function _constants() {
65
51
  const data = require("@teambit/legacy/dist/constants");
66
52
  _constants = function () {
@@ -224,6 +210,9 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
224
210
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
225
211
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
226
212
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
213
+ const BEFORE_EXPORT = 'exporting component';
214
+ const BEFORE_EXPORTS = 'exporting components';
215
+ const BEFORE_LOADING_COMPONENTS = 'loading components';
227
216
  class ExportMain {
228
217
  constructor(workspace, remove, depResolver, logger, eject) {
229
218
  this.workspace = workspace;
@@ -638,7 +627,7 @@ if the export fails with missing objects/versions/components, run "bit fetch --l
638
627
  // await pushToRemotes();
639
628
  await this.pushToRemotesCarefully(manyObjectsPerRemote, resumeExportId);
640
629
  }
641
- _loader().default.start('updating data locally...');
630
+ this.logger.setStatusLine('updating data locally...');
642
631
  const results = await updateLocalObjects(laneObject);
643
632
  process.removeListener('SIGINT', warnCancelExport);
644
633
  return {
@@ -696,7 +685,7 @@ if the export fails with missing objects/versions/components, run "bit fetch --l
696
685
  remote,
697
686
  objectList
698
687
  } = objectsPerRemote;
699
- _loader().default.start(`transferring ${objectList.count()} objects to the remote "${remote.name}"...`);
688
+ this.logger.setStatusLine(`transferring ${objectList.count()} objects to the remote "${remote.name}"...`);
700
689
  try {
701
690
  await remote.pushMany(objectList, pushOptions, {});
702
691
  this.logger.debug('pushRemotesPendingDir, successfully pushed all objects to the pending-dir directory on the remote');
@@ -769,22 +758,22 @@ ${localOnlyExportPending.map(c => c.toString()).join('\n')}`);
769
758
  componentsToExport,
770
759
  laneObject
771
760
  } = await this.getLaneCompIdsToExport(consumer, includeNonStaged);
772
- const loaderMsg = componentsToExport.length > 1 ? _loaderMessages().BEFORE_EXPORTS : _loaderMessages().BEFORE_EXPORT;
773
- _loader().default.start(loaderMsg);
761
+ const loaderMsg = componentsToExport.length > 1 ? BEFORE_EXPORTS : BEFORE_EXPORT;
762
+ this.logger.setStatusLine(loaderMsg);
774
763
  const filtered = await throwForLocalOnlyIfNeeded(componentsToExport);
775
764
  return _objectSpread(_objectSpread({}, filtered), {}, {
776
765
  laneObject
777
766
  });
778
767
  }
779
768
  if (!ids.length || idsHaveWildcard) {
780
- _loader().default.start(_loaderMessages().BEFORE_LOADING_COMPONENTS);
769
+ this.logger.setStatusLine(BEFORE_LOADING_COMPONENTS);
781
770
  const exportPendingComponents = includeNonStaged ? await componentsList.listNonNewComponentsIds() : await componentsList.listExportPendingComponentsIds();
782
771
  const componentsToExport = idsHaveWildcard ? _legacy2().ComponentsList.filterComponentsByWildcard(exportPendingComponents, ids) : exportPendingComponents;
783
- const loaderMsg = componentsToExport.length > 1 ? _loaderMessages().BEFORE_EXPORTS : _loaderMessages().BEFORE_EXPORT;
784
- _loader().default.start(loaderMsg);
772
+ const loaderMsg = componentsToExport.length > 1 ? BEFORE_EXPORTS : BEFORE_EXPORT;
773
+ this.logger.setStatusLine(loaderMsg);
785
774
  return throwForLocalOnlyIfNeeded(componentsToExport);
786
775
  }
787
- _loader().default.start(_loaderMessages().BEFORE_EXPORT); // show single export
776
+ this.logger.setStatusLine(BEFORE_EXPORT); // show single export
788
777
  const parsedIds = await Promise.all(ids.map(id => getParsedId(consumer, id)));
789
778
  // load the components for fixing any out-of-sync issues.
790
779
  await consumer.loadComponents(_componentId().ComponentIdList.fromArray(parsedIds));
@@ -796,7 +785,7 @@ ${localOnlyExportPending.map(c => c.toString()).join('\n')}`);
796
785
  if (!laneObject) {
797
786
  throw new Error(`fatal: unable to load the current lane object (${currentLaneId.toString()})`);
798
787
  }
799
- _loader().default.start(_loaderMessages().BEFORE_LOADING_COMPONENTS);
788
+ this.logger.setStatusLine(BEFORE_LOADING_COMPONENTS);
800
789
  const componentsList = new (_legacy2().ComponentsList)(consumer);
801
790
  const componentsToExportWithoutRemoved = includeNonStaged ? await componentsList.listNonNewComponentsIds() : await componentsList.listExportPendingComponentsIds(laneObject);
802
791
  const removedStagedBitIds = await this.getRemovedStagedBitIds();
@@ -1 +1 @@
1
- {"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_cli","_scope","_bitError","_legacy","_componentId","_loader","_loaderMessages","_constants","_legacy2","_remove","_legacy3","_scope2","_workspace","_logger","_http","_objectList","_lodash","_pMapSeries","_laneId","_eject","_scopeRemotes","_workspaceModules","_dependencyResolver","_exportScopeComponents","_persistFailed","_traverseVersions","_export","_exportCmd","_resumeExportCmd","_excluded","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_objectWithoutProperties","i","_objectWithoutPropertiesLoose","s","includes","propertyIsEnumerable","call","n","hasOwnProperty","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","ExportMain","constructor","workspace","remove","depResolver","logger","eject","export","params","nonExistOnBitMap","newIdsOnRemote","missingScope","exported","removedIds","exportedLanes","rippleJobs","exportComponents","ejectResults","clearCache","ejectExportedComponents","exportResults","componentsIds","Scope","onPostExport","catch","err","error","_ref","ids","includeNonStaged","headOnly","originDirectly","OutsideWorkspaceError","consumer","idsToExport","laneObject","getComponentsToExport","updatedIds","ComponentIdList","forkLaneNewScope","BitError","name","readmeComponent","_throwForUnsnappedLaneReadme","forkedFrom","isNew","scope","id","toString","isOnMain","updatedLocally","exportMany","exportHeadsOnly","filterOutExistingVersions","Boolean","allVersions","updateLanesAfterExport","getRemovedStagedBitIds","workspaceIds","listIds","hasWithoutVersion","_updateIdsOnBitMap","bitMap","linkToNodeModulesByIds","removeFromStagedConfig","legacyScope","stagedSnaps","deleteFile","fs","getLastMergedPath","Analytics","setExtraData","onDestroy","resumeExportId","throwForMissingArtifacts","includeParents","exportOrigin","debug","scopeRemotes","getScopeRemotes","groupByScopeName","idList","reduce","acc","current","scopeName","Error","idsGroupedByScope","validateTargetScopeForLanes","newIds","fromArray","isExported","newIdsGrouped","mapSeries","remote","resolve","list","map","listItem","addMainHeadIfPossible","allHashes","modelComponent","head","find","h","hash","objects","has","getVersionsToExport","getCompHeadIncludeUpdateDependents","toComponentId","headVersion","loadVersion","parents","localTagsOrHashes","getLocalHashes","getAllVersionHashes","repo","groupedByScopeString","join","getUpdatedObjectsToExport","remoteNameStr","bitIds","lane","throwForDuplicationIgnoreVersion","idsToChangeLocally","componentsAndObjects","objectList","ObjectList","objectListPerName","modelComponents","getModelComponent","clearObjectsFromCache","refsToPotentialExportPerComponent","refs","getRefsToExportPerComp","allHashesAsStr","flat","ref","existingOnRemote","scopeImporter","checkWhatHashesExistOnRemote","refsToExportPerComponent","filteredOutRefs","refsToExport","existing","compact","bitObjectToObjectItem","obj","buffer","compress","type","getType","processModelComponent","clearStateData","objectItems","collectVersionsObjects","objectsList","toBitObjects","componentAndObject","component","getAll","convertToCorrectScope","remoteObj","url","host","date","Date","now","addScopeListItem","componentBuffer","componentData","objectsBuffer","Promise","all","allObjectsData","addIfNotExist","laneHistory","lanes","getOrCreateLaneHistory","laneHistoryData","laneData","manyObjectsPerRemote","pushAllToCentralHub","transformToOneObjectListWithScopeData","http","Http","connect","CENTRAL_BIT_HUB_URL","CENTRAL_BIT_HUB_NAME","pushResults","pushToCentralHub","origin","failedScopes","successIds","errors","metadata","PersistFailed","exportedBitIds","ComponentID","fromString","exportedIds","objectPerRemote","idsPerScope","jobs","updateLocalObjects","objectsPerRemote","componentObject","sources","put","add","remoteLanes","syncWithLaneObject","remoteLaneId","LaneId","from","DEFAULT_LANE","loadRemoteLane","addEntry","getHead","persist","idsWithRemoteScope","changeVersion","undefined","idsWithRemoteScopeUniq","uniqFromArray","sort","hasWithoutScopeAndVersion","warnCancelExport","consoleWarning","process","on","centralHubResults","remotes","validateRemotes","persistRemotes","shouldPushToCentralHub","pushToRemotesCarefully","loader","start","results","removeListener","objPerRemote","addScopeName","mergeObjectList","force","ejectErr","c","msg","clientId","pushRemotesPendingDir","pushOptions","pushedRemotes","count","pushMany","warn","removePendingDirs","hubRemotes","m","isHub","componentsObjects","remoteScope","exportingIds","shouldFork","shouldChangeScope","hasComponentChanged","idWithFutureScope","searchWithoutScopeAndVersion","stagedConfig","getStagedConfig","compId","removeComponentConfig","write","componentsList","ComponentsList","idsHaveWildcard","hasWildcard","throwForLocalOnlyIfNeeded","localOnlyComponents","listLocalOnly","localOnlyExportPending","isUserTryingToExportLanes","componentsToExport","getLaneCompIdsToExport","loaderMsg","BEFORE_EXPORTS","BEFORE_EXPORT","filtered","BEFORE_LOADING_COMPONENTS","exportPendingComponents","listNonNewComponentsIds","listExportPendingComponentsIds","filterComponentsByWildcard","parsedIds","getParsedId","loadComponents","currentLaneId","getCurrentLaneId","loadLane","componentsToExportWithoutRemoved","removedStagedBitIds","removedStaged","getRemovedStaged","provider","cli","loggerMain","createLogger","ExportAspect","exportMain","register","ResumeExportCmd","ExportCmd","exports","MainRuntime","CLIAspect","ScopeAspect","WorkspaceAspect","RemoveAspect","DependencyResolverAspect","LoggerAspect","EjectAspect","addRuntime","componentsId","resultId","updateComponentId","hasVersion","isValid","getComponent","getComponentHead","isEqual","currentLane","isCurrentLane","setCurrentLane","toLaneId","scopeJson","removeLaneFromNew","isOnLane","_default"],"sources":["export.main.runtime.ts"],"sourcesContent":["import fs from 'fs-extra';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { ScopeAspect, ScopeMain } from '@teambit/scope';\nimport { BitError } from '@teambit/bit-error';\nimport { Analytics } from '@teambit/legacy.analytics';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport loader from '@teambit/legacy/dist/cli/loader';\nimport {\n BEFORE_EXPORT,\n BEFORE_EXPORTS,\n BEFORE_LOADING_COMPONENTS,\n} from '@teambit/legacy/dist/cli/loader/loader-messages';\nimport { CENTRAL_BIT_HUB_NAME, CENTRAL_BIT_HUB_URL } from '@teambit/legacy/dist/constants';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport { BitMap } from '@teambit/legacy.bit-map';\nimport { ComponentsList } from '@teambit/legacy.component-list';\nimport { RemoveAspect, RemoveMain } from '@teambit/remove';\nimport { Lane, ModelComponent } from '@teambit/legacy/dist/scope/models';\nimport { hasWildcard } from '@teambit/legacy.utils';\nimport { Scope } from '@teambit/legacy/dist/scope';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { LaneReadmeComponent } from '@teambit/legacy/dist/scope/models/lane';\nimport { Http } from '@teambit/legacy/dist/scope/network/http';\nimport { ObjectItem, ObjectList } from '@teambit/legacy/dist/scope/objects/object-list';\nimport { compact } from 'lodash';\nimport mapSeries from 'p-map-series';\nimport { LaneId, DEFAULT_LANE } from '@teambit/lane-id';\nimport { Remote, Remotes } from '@teambit/legacy/dist/remotes';\nimport { EjectAspect, EjectMain, EjectResults } from '@teambit/eject';\nimport { getScopeRemotes } from '@teambit/legacy/dist/scope/scope-remotes';\nimport { ExportOrigin } from '@teambit/legacy/dist/scope/network/http/http';\nimport { linkToNodeModulesByIds } from '@teambit/workspace.modules.node-modules-linker';\nimport { DependencyResolverAspect, DependencyResolverMain } from '@teambit/dependency-resolver';\nimport {\n persistRemotes,\n validateRemotes,\n removePendingDirs,\n} from '@teambit/legacy/dist/scope/component-ops/export-scope-components';\nimport { BitObject, Ref } from '@teambit/legacy/dist/scope/objects';\nimport { PersistFailed } from '@teambit/legacy/dist/scope/exceptions/persist-failed';\nimport { getAllVersionHashes } from '@teambit/legacy/dist/scope/component-ops/traverse-versions';\nimport { ExportAspect } from './export.aspect';\nimport { ExportCmd } from './export-cmd';\nimport { ResumeExportCmd } from './resume-export-cmd';\n\nexport type OnExportIdTransformer = (id: ComponentID) => ComponentID;\n\ntype ModelComponentAndObjects = { component: ModelComponent; objects: BitObject[] };\ntype ObjectListPerName = { [name: string]: ObjectList };\ntype ObjectsPerRemote = {\n remote: Remote;\n objectList: ObjectList;\n exportedIds?: string[];\n};\ntype ObjectsPerRemoteExtended = ObjectsPerRemote & {\n objectListPerName: ObjectListPerName;\n idsToChangeLocally: ComponentIdList;\n componentsAndObjects: ModelComponentAndObjects[];\n};\n\ntype ExportParams = {\n ids?: string[];\n eject?: boolean;\n allVersions?: boolean;\n originDirectly?: boolean;\n includeNonStaged?: boolean;\n resumeExportId?: string | undefined;\n headOnly?: boolean;\n ignoreMissingArtifacts?: boolean;\n forkLaneNewScope?: boolean;\n};\n\nexport interface ExportResult {\n nonExistOnBitMap: ComponentID[];\n newIdsOnRemote: ComponentID[];\n removedIds: ComponentIdList;\n missingScope: ComponentID[];\n componentsIds: ComponentID[];\n exportedLanes: Lane[];\n rippleJobs: string[];\n ejectResults: EjectResults | undefined;\n}\n\nexport class ExportMain {\n constructor(\n private workspace: Workspace,\n private remove: RemoveMain,\n private depResolver: DependencyResolverMain,\n private logger: Logger,\n private eject: EjectMain\n ) {}\n\n async export(params: ExportParams = {}): Promise<ExportResult> {\n const { nonExistOnBitMap, newIdsOnRemote, missingScope, exported, removedIds, exportedLanes, rippleJobs } =\n await this.exportComponents(params);\n let ejectResults: EjectResults | undefined;\n await this.workspace.clearCache(); // needed when one process executes multiple commands, such as in \"bit test\" or \"bit cli\"\n if (params.eject) ejectResults = await this.ejectExportedComponents(exported);\n const exportResults = {\n componentsIds: exported,\n newIdsOnRemote,\n nonExistOnBitMap,\n removedIds,\n missingScope,\n ejectResults,\n exportedLanes,\n rippleJobs,\n };\n if (Scope.onPostExport) {\n await Scope.onPostExport(exported, exportedLanes).catch((err) => {\n this.logger.error('fatal: onPostExport encountered an error (this error does not stop the process)', err);\n });\n }\n return exportResults;\n }\n\n private async exportComponents({\n ids,\n includeNonStaged,\n headOnly,\n originDirectly,\n ...params\n }: ExportParams): Promise<{\n updatedIds: ComponentID[];\n nonExistOnBitMap: ComponentID[];\n removedIds: ComponentIdList;\n missingScope: ComponentID[];\n exported: ComponentID[];\n exportedLanes: Lane[];\n newIdsOnRemote: ComponentID[];\n rippleJobs: string[];\n }> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const consumer: Consumer = this.workspace.consumer;\n const { idsToExport, missingScope, laneObject } = await this.getComponentsToExport(\n ids,\n includeNonStaged || headOnly\n );\n\n if (!idsToExport.length && !laneObject) {\n return {\n updatedIds: [],\n nonExistOnBitMap: [],\n removedIds: new ComponentIdList(),\n missingScope,\n exported: [],\n newIdsOnRemote: [],\n exportedLanes: [],\n rippleJobs: [],\n };\n }\n if (!idsToExport.length && laneObject && params.forkLaneNewScope) {\n throw new BitError(`the forked lane \"${laneObject.name}\" has no changes, to export all its components, please use \"--all\" flag\nif the export fails with missing objects/versions/components, run \"bit fetch --lanes <lane-name> --all-history\", to make sure you have the full history locally`);\n }\n\n // validate lane readme component and ensure it has been snapped\n if (laneObject?.readmeComponent) {\n _throwForUnsnappedLaneReadme(laneObject);\n }\n\n if (\n !params.forkLaneNewScope &&\n laneObject?.forkedFrom &&\n laneObject.isNew &&\n laneObject.forkedFrom.scope !== laneObject.scope\n ) {\n throw new BitError(`error: the current lane ${laneObject\n .id()\n .toString()} was forked from ${laneObject.forkedFrom.toString()}\nand is about to export to a different scope (${laneObject.scope}) than the original lane (${\n laneObject.forkedFrom.scope\n }).\non large lanes with long history graph, it results in exporting lots of objects to the new scope, some of them might be missing locally.\nif you can use the same scope as the original name, change it now by running \"bit lane change-scope ${\n laneObject.name\n } ${laneObject.forkedFrom.scope}\".\notherwise, re-run the export with \"--fork-lane-new-scope\" flag.\nif the export fails with missing objects/versions/components, run \"bit fetch --lanes <lane-name> --all-history\", to make sure you have the full history locally`);\n }\n const isOnMain = consumer.isOnMain();\n const { exported, updatedLocally, newIdsOnRemote, rippleJobs } = await this.exportMany({\n ...params,\n exportHeadsOnly: headOnly,\n scope: consumer.scope,\n ids: idsToExport,\n laneObject,\n originDirectly,\n isOnMain,\n filterOutExistingVersions: Boolean(!params.allVersions && laneObject),\n });\n if (laneObject) await updateLanesAfterExport(consumer, laneObject);\n const removedIds = await this.getRemovedStagedBitIds();\n const workspaceIds = this.workspace.listIds();\n const nonExistOnBitMap = exported.filter(\n (id) => !workspaceIds.hasWithoutVersion(id) && !removedIds.hasWithoutVersion(id)\n );\n // @ts-ignore todo: remove after deleting teambit.legacy\n const updatedIds = _updateIdsOnBitMap(consumer.bitMap, updatedLocally);\n // re-generate the package.json, this way, it has the correct data in the componentId prop.\n await linkToNodeModulesByIds(this.workspace, updatedIds, true);\n await this.removeFromStagedConfig(exported);\n // ideally we should delete the staged-snaps only for the exported snaps. however, it's not easy, and it's ok to\n // delete them all because this file is mainly an optimization for the import process.\n await this.workspace.scope.legacyScope.stagedSnaps.deleteFile();\n await fs.remove(this.workspace.scope.getLastMergedPath());\n Analytics.setExtraData('num_components', exported.length);\n // it is important to have consumer.onDestroy() before running the eject operation, we want the\n // export and eject operations to function independently. we don't want to lose the changes to\n // .bitmap file done by the export action in case the eject action has failed.\n await consumer.onDestroy('export');\n return {\n updatedIds,\n nonExistOnBitMap,\n removedIds,\n missingScope,\n exported,\n newIdsOnRemote,\n exportedLanes: laneObject ? [laneObject] : [],\n rippleJobs,\n };\n }\n\n /**\n * the export process uses four steps. read more about it here: https://github.com/teambit/bit/pull/3371\n */\n async exportMany({\n scope,\n ids, // when exporting a lane, the ids are the lane component ids\n laneObject,\n allVersions,\n originDirectly,\n resumeExportId,\n throwForMissingArtifacts,\n isOnMain = true,\n exportHeadsOnly, // relevant when exporting from bare-scope, especially when re-exporting existing versions, the normal calculation based on getDivergeData won't work\n includeParents, // relevant when exportHeadsOnly is used. sometimes the parents head are needed as well\n filterOutExistingVersions, // go to the remote and check whether the version exists there. if so, don't export it\n exportOrigin = 'export',\n }: {\n scope: Scope;\n ids: ComponentIdList;\n laneObject?: Lane;\n allVersions?: boolean;\n originDirectly?: boolean;\n resumeExportId?: string | undefined;\n throwForMissingArtifacts?: boolean;\n isOnMain?: boolean;\n exportHeadsOnly?: boolean;\n includeParents?: boolean;\n filterOutExistingVersions?: boolean;\n exportOrigin?: ExportOrigin;\n }): Promise<{\n exported: ComponentIdList;\n updatedLocally: ComponentIdList;\n newIdsOnRemote: ComponentID[];\n rippleJobs: string[];\n }> {\n this.logger.debug(`scope.exportMany, ids: ${ids.toString()}`);\n const scopeRemotes: Remotes = await getScopeRemotes(scope);\n\n const groupByScopeName = (idList: ComponentIdList): { [scopeName: string]: ComponentIdList } => {\n return idList.reduce((acc, current) => {\n const scopeName = current.scope;\n if (!scopeName) {\n throw new Error(`toGroupByScopeName() expect ids to have a scope name, got ${current.toString()}`);\n }\n if (acc[scopeName]) acc[scopeName].push(current);\n else acc[scopeName] = new ComponentIdList(current);\n return acc;\n }, {});\n };\n\n const idsGroupedByScope = groupByScopeName(ids);\n\n /**\n * when a component is exported for the first time, and the lane-scope is not the same as the component-scope, it's\n * important to validate that there is no such component in the original scope. otherwise, later, it'll be impossible\n * to merge the lane because these two components don't have any snap in common.\n */\n const validateTargetScopeForLanes = async () => {\n if (!laneObject) {\n return;\n }\n const newIds = ComponentIdList.fromArray(ids.filter((id) => !scope.isExported(id)));\n const newIdsGrouped = groupByScopeName(newIds);\n await mapSeries(Object.keys(newIdsGrouped), async (scopeName) => {\n if (scopeName === laneObject.scope) {\n // this validation is redundant if the lane-component is in the same scope as the lane-object\n return;\n }\n // by getting the remote we also validate that this scope actually exists.\n const remote = await scopeRemotes.resolve(scopeName, scope);\n const list = await remote.list();\n const listIds = ComponentIdList.fromArray(list.map((listItem) => listItem.id));\n newIdsGrouped[scopeName].forEach((id) => {\n if (listIds.hasWithoutVersion(id)) {\n throw new Error(`unable to export a lane with a new component \"${id.toString()}\", which has the default-scope \"${scopeName}\".\n this scope already has a component with the same name. as such, it'll be impossible to merge the lane later because these two components are different`);\n }\n });\n });\n };\n\n /**\n * by default, when exporting a lane, it traverse from the Lane's head and therefore it may skip the main head.\n * later, if for some reason the original component was deleted in its scope, the head object will be missing.\n */\n const addMainHeadIfPossible = async (allHashes: Ref[], modelComponent: ModelComponent) => {\n const head = modelComponent.head;\n if (!head) return;\n if (allHashes.find((h) => h.hash === head.hash)) return; // head is already in the list\n if (!(await scope.objects.has(head))) return; // it should not happen. but if it does, we don't want to block the export\n allHashes.push(head);\n };\n\n const getVersionsToExport = async (modelComponent: ModelComponent): Promise<Ref[]> => {\n if (exportHeadsOnly) {\n const head =\n laneObject?.getCompHeadIncludeUpdateDependents(modelComponent.toComponentId()) || modelComponent.head;\n if (!head) {\n throw new Error(\n `getVersionsToExport should export the head only, but the head of ${modelComponent.id()} is missing`\n );\n }\n if (includeParents) {\n const headVersion = await modelComponent.loadVersion(head.toString(), scope.objects);\n return [head, ...headVersion.parents];\n }\n return [head];\n }\n const localTagsOrHashes = await modelComponent.getLocalHashes(scope.objects);\n if (!allVersions) {\n return localTagsOrHashes;\n }\n\n const allHashes = await getAllVersionHashes({ modelComponent, repo: scope.objects });\n await addMainHeadIfPossible(allHashes, modelComponent);\n return allHashes;\n };\n\n await validateTargetScopeForLanes();\n const groupedByScopeString = Object.keys(idsGroupedByScope)\n .map((scopeName) => `scope \"${scopeName}\": ${idsGroupedByScope[scopeName].toString()}`)\n .join(', ');\n this.logger.debug(`export-scope-components, export to the following scopes ${groupedByScopeString}`);\n\n const getUpdatedObjectsToExport = async (\n remoteNameStr: string,\n bitIds: ComponentIdList,\n lane?: Lane\n ): Promise<ObjectsPerRemoteExtended> => {\n bitIds.throwForDuplicationIgnoreVersion();\n const remote: Remote = await scopeRemotes.resolve(remoteNameStr, scope);\n const idsToChangeLocally = ComponentIdList.fromArray(bitIds.filter((id) => !scope.isExported(id)));\n const componentsAndObjects: ModelComponentAndObjects[] = [];\n const objectList = new ObjectList();\n const objectListPerName: ObjectListPerName = {};\n\n const modelComponents = await mapSeries(bitIds, (id) => scope.getModelComponent(id));\n // super important! otherwise, the processModelComponent() changes objects in memory, while the key remains the same\n scope.objects.clearObjectsFromCache();\n\n const refsToPotentialExportPerComponent = await mapSeries(modelComponents, async (modelComponent) => {\n const refs = await getVersionsToExport(modelComponent);\n return { modelComponent, refs };\n });\n\n const getRefsToExportPerComp = async () => {\n if (!filterOutExistingVersions) {\n return refsToPotentialExportPerComponent;\n }\n const allHashesAsStr = refsToPotentialExportPerComponent\n .map((r) => r.refs)\n .flat()\n .map((ref) => ref.toString());\n const existingOnRemote = await scope.scopeImporter.checkWhatHashesExistOnRemote(remoteNameStr, allHashesAsStr);\n // for lanes, some snaps might be already on the remote, and the reason they're staged is due to a previous merge.\n const refsToExportPerComponent = refsToPotentialExportPerComponent.map(({ modelComponent, refs }) => {\n const filteredOutRefs: string[] = [];\n const refsToExport = refs.filter((ref) => {\n const existing = existingOnRemote.includes(ref.toString());\n if (existing) filteredOutRefs.push(ref.toString());\n return !existing;\n });\n if (filteredOutRefs.length)\n this.logger.debug(\n `export-scope-components, the following refs were filtered out from ${modelComponent\n .id()\n .toString()} because they already exist on the remote:\\n${filteredOutRefs.join('\\n')}`\n );\n\n return refsToExport.length ? { modelComponent, refs: refsToExport } : null;\n });\n\n return compact(refsToExportPerComponent);\n };\n\n const bitObjectToObjectItem = async (obj: BitObject): Promise<ObjectItem> => {\n return {\n ref: obj.hash(),\n buffer: await obj.compress(),\n type: obj.getType(),\n };\n };\n\n const processModelComponent = async ({\n modelComponent,\n refs,\n }: {\n modelComponent: ModelComponent;\n refs: Ref[];\n }) => {\n modelComponent.clearStateData();\n const objectItems = await modelComponent.collectVersionsObjects(\n scope.objects,\n refs.map((ref) => ref.toString()),\n throwForMissingArtifacts\n );\n const objectsList = await new ObjectList(objectItems).toBitObjects();\n const componentAndObject = { component: modelComponent, objects: objectsList.getAll() };\n await this.convertToCorrectScope(scope, componentAndObject, remoteNameStr, bitIds, ids);\n const remoteObj = { url: remote.host, name: remote.name, date: Date.now().toString() };\n modelComponent.addScopeListItem(remoteObj);\n componentsAndObjects.push(componentAndObject);\n const componentBuffer = await modelComponent.compress();\n const componentData = { ref: modelComponent.hash(), buffer: componentBuffer, type: modelComponent.getType() };\n const objectsBuffer = await Promise.all(\n componentAndObject.objects.map(async (obj) => bitObjectToObjectItem(obj))\n );\n const allObjectsData = [componentData, ...objectsBuffer];\n objectListPerName[modelComponent.name] = new ObjectList(allObjectsData);\n objectList.addIfNotExist(allObjectsData);\n };\n\n const refsToExportPerComponent = await getRefsToExportPerComp();\n // don't use Promise.all, otherwise, it'll throw \"JavaScript heap out of memory\" on a large set of data\n await mapSeries(refsToExportPerComponent, processModelComponent);\n if (lane) {\n const laneHistory = await scope.lanes.getOrCreateLaneHistory(lane);\n const laneHistoryData = await bitObjectToObjectItem(laneHistory);\n objectList.addIfNotExist([laneHistoryData]);\n const laneData = await bitObjectToObjectItem(lane);\n objectList.addIfNotExist([laneData]);\n }\n\n return { remote, objectList, objectListPerName, idsToChangeLocally, componentsAndObjects };\n };\n\n const manyObjectsPerRemote = laneObject\n ? [await getUpdatedObjectsToExport(laneObject.scope, ids, laneObject)]\n : await mapSeries(Object.keys(idsGroupedByScope), (scopeName) =>\n getUpdatedObjectsToExport(scopeName, idsGroupedByScope[scopeName], laneObject)\n );\n\n const pushAllToCentralHub = async () => {\n const objectList = this.transformToOneObjectListWithScopeData(manyObjectsPerRemote);\n const http = await Http.connect(CENTRAL_BIT_HUB_URL, CENTRAL_BIT_HUB_NAME);\n const pushResults = await http.pushToCentralHub(objectList, { origin: exportOrigin });\n const { failedScopes, successIds, errors, metadata } = pushResults;\n if (failedScopes.length) {\n throw new PersistFailed(failedScopes, errors);\n }\n const exportedBitIds = successIds.map((id) => ComponentID.fromString(id));\n if (manyObjectsPerRemote.length === 1) {\n // when on a lane, it's always exported to the lane. and the ids can be from different scopes, so having the\n // filter below, will remove these components from the output of bit-export at the end.\n manyObjectsPerRemote[0].exportedIds = exportedBitIds.map((id) => id.toString());\n } else {\n manyObjectsPerRemote.forEach((objectPerRemote) => {\n const idsPerScope = exportedBitIds.filter((id) => id.scope === objectPerRemote.remote.name);\n // it's possible that idsPerScope is an empty array, in case the objects were exported already before\n objectPerRemote.exportedIds = idsPerScope.map((id) => id.toString());\n });\n }\n return { rippleJobs: metadata?.jobs };\n };\n\n const updateLocalObjects = async (\n lane?: Lane\n ): Promise<\n Array<{ exported: ComponentIdList; updatedLocally: ComponentIdList; newIdsOnRemote: ComponentID[] }>\n > => {\n return mapSeries(manyObjectsPerRemote, async (objectsPerRemote: ObjectsPerRemoteExtended) => {\n const { remote, idsToChangeLocally, componentsAndObjects, exportedIds } = objectsPerRemote;\n const remoteNameStr = remote.name;\n\n componentsAndObjects.forEach((componentObject) => scope.sources.put(componentObject));\n\n // update lanes\n if (lane) {\n if (idsToChangeLocally.length) {\n // otherwise, we don't want to update scope-name of components in the lane object\n scope.objects.add(lane);\n }\n await scope.objects.remoteLanes.syncWithLaneObject(remoteNameStr, lane);\n }\n\n if (isOnMain && !lane) {\n // all exported from main\n const remoteLaneId = LaneId.from(DEFAULT_LANE, remoteNameStr);\n await scope.objects.remoteLanes.loadRemoteLane(remoteLaneId);\n await Promise.all(\n componentsAndObjects.map(async ({ component }) => {\n await scope.objects.remoteLanes.addEntry(remoteLaneId, component.toComponentId(), component.getHead());\n })\n );\n }\n\n await scope.objects.persist();\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const newIdsOnRemote = exportedIds!.map((id) => ComponentID.fromString(id));\n // remove version. exported component might have multiple versions exported\n const idsWithRemoteScope: ComponentID[] = newIdsOnRemote.map((id) => id.changeVersion(undefined));\n const idsWithRemoteScopeUniq = ComponentIdList.uniqFromArray(idsWithRemoteScope).sort();\n return {\n newIdsOnRemote,\n exported: idsWithRemoteScopeUniq,\n updatedLocally: ComponentIdList.fromArray(\n idsWithRemoteScopeUniq.filter((id) => idsToChangeLocally.hasWithoutScopeAndVersion(id))\n ),\n };\n });\n };\n\n const warnCancelExport = () => {\n this.logger.consoleWarning(\n `unable to cancel the export process at this point because the communication with the remote already started`\n );\n };\n process.on('SIGINT', warnCancelExport);\n let centralHubResults;\n if (resumeExportId) {\n const remotes = manyObjectsPerRemote.map((o) => o.remote);\n await validateRemotes(remotes, resumeExportId);\n await persistRemotes(manyObjectsPerRemote, resumeExportId);\n } else if (this.shouldPushToCentralHub(manyObjectsPerRemote, scopeRemotes, originDirectly)) {\n centralHubResults = await pushAllToCentralHub();\n } else {\n // await pushToRemotes();\n await this.pushToRemotesCarefully(manyObjectsPerRemote, resumeExportId);\n }\n\n loader.start('updating data locally...');\n const results = await updateLocalObjects(laneObject);\n process.removeListener('SIGINT', warnCancelExport);\n return {\n newIdsOnRemote: results.map((r) => r.newIdsOnRemote).flat(),\n exported: ComponentIdList.uniqFromArray(results.map((r) => r.exported).flat()),\n updatedLocally: ComponentIdList.uniqFromArray(results.map((r) => r.updatedLocally).flat()),\n rippleJobs: centralHubResults?.rippleJobs || [],\n };\n }\n\n private transformToOneObjectListWithScopeData(objectsPerRemote: ObjectsPerRemote[]): ObjectList {\n const objectList = new ObjectList();\n objectsPerRemote.forEach((objPerRemote) => {\n objPerRemote.objectList.addScopeName(objPerRemote.remote.name);\n objectList.mergeObjectList(objPerRemote.objectList);\n });\n return objectList;\n }\n\n private async ejectExportedComponents(componentsIds: ComponentID[]): Promise<EjectResults> {\n const consumer: Consumer = this.workspace.consumer;\n let ejectResults: EjectResults;\n try {\n ejectResults = await this.eject.eject(componentsIds, { force: true });\n } catch (err: any) {\n const ejectErr = `The components ${componentsIds.map((c) => c.toString()).join(', ')} were exported successfully.\n However, the eject operation has failed due to an error: ${err.msg || err}`;\n this.logger.error(ejectErr, err);\n throw new Error(ejectErr);\n }\n // run the consumer.onDestroy() again, to write the changes done by the eject action to .bitmap\n await consumer.onDestroy('export (eject)');\n return ejectResults;\n }\n\n async pushToRemotesCarefully(manyObjectsPerRemote: ObjectsPerRemote[], resumeExportId?: string) {\n const remotes = manyObjectsPerRemote.map((o) => o.remote);\n const clientId = resumeExportId || Date.now().toString();\n await this.pushRemotesPendingDir(clientId, manyObjectsPerRemote, resumeExportId);\n await validateRemotes(remotes, clientId, Boolean(resumeExportId));\n await persistRemotes(manyObjectsPerRemote, clientId);\n }\n\n private async pushRemotesPendingDir(\n clientId: string,\n manyObjectsPerRemote: ObjectsPerRemote[],\n resumeExportId?: string\n ): Promise<void> {\n if (resumeExportId) {\n this.logger.debug('pushRemotesPendingDir - skip as the resumeExportId was passed');\n // no need to transfer the objects, they're already on the server. also, since this clientId\n // exists already on the remote pending-dir, it'll cause a collision.\n return;\n }\n const pushOptions = { clientId };\n const pushedRemotes: Remote[] = [];\n await mapSeries(manyObjectsPerRemote, async (objectsPerRemote: ObjectsPerRemote) => {\n const { remote, objectList } = objectsPerRemote;\n loader.start(`transferring ${objectList.count()} objects to the remote \"${remote.name}\"...`);\n try {\n await remote.pushMany(objectList, pushOptions, {});\n this.logger.debug(\n 'pushRemotesPendingDir, successfully pushed all objects to the pending-dir directory on the remote'\n );\n pushedRemotes.push(remote);\n } catch (err: any) {\n this.logger.warn('exportMany, failed pushing objects to the remote');\n await removePendingDirs(pushedRemotes, clientId);\n throw err;\n }\n });\n }\n\n shouldPushToCentralHub(\n manyObjectsPerRemote: ObjectsPerRemote[],\n scopeRemotes: Remotes,\n originDirectly = false\n ): boolean {\n if (originDirectly) return false;\n const hubRemotes = manyObjectsPerRemote.filter((m) => scopeRemotes.isHub(m.remote.name));\n if (!hubRemotes.length) return false;\n if (hubRemotes.length === manyObjectsPerRemote.length) return true; // all are hub\n // @todo: maybe create a flag \"no-central\" to support this workflow\n throw new BitError(\n `some of your components are configured to be exported to a local scope and some to the bit.cloud hub. this is not supported`\n );\n }\n\n /**\n * Component and dependencies id changes:\n * When exporting components with dependencies to a bare-scope, some of the dependencies may be created locally and as\n * a result their scope-name is null. Before the bare-scope gets the components, convert these scope names\n * to the bare-scope name.\n *\n * This is the Harmony version of \"convertToCorrectScope\". No more codemod and no more hash changes.\n */\n private async convertToCorrectScope(\n scope: Scope,\n componentsObjects: ModelComponentAndObjects,\n remoteScope: string,\n exportingIds: ComponentIdList,\n ids: ComponentIdList,\n shouldFork = false // not in used currently, but might be needed soon\n ): Promise<boolean> {\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n const shouldChangeScope = shouldFork\n ? remoteScope !== componentsObjects.component.scope\n : !componentsObjects.component.scope;\n const hasComponentChanged = shouldChangeScope;\n if (shouldChangeScope) {\n const idWithFutureScope = ids.searchWithoutScopeAndVersion(componentsObjects.component.toComponentId());\n componentsObjects.component.scope = idWithFutureScope?.scope || remoteScope;\n }\n\n // return true if one of the versions has changed or the component itself\n return hasComponentChanged;\n }\n\n private async removeFromStagedConfig(ids: ComponentID[]) {\n this.logger.debug(`removeFromStagedConfig, ${ids.length} ids`);\n const stagedConfig = await this.workspace.scope.getStagedConfig();\n ids.map((compId) => stagedConfig.removeComponentConfig(compId));\n await stagedConfig.write();\n }\n\n private async getComponentsToExport(\n ids: string[] = [],\n includeNonStaged?: boolean\n ): Promise<{\n idsToExport: ComponentIdList;\n missingScope: ComponentID[];\n laneObject?: Lane;\n }> {\n const consumer = this.workspace.consumer;\n const componentsList = new ComponentsList(consumer);\n const idsHaveWildcard = hasWildcard(ids);\n const throwForLocalOnlyIfNeeded = async (\n bitIds: ComponentIdList\n ): Promise<{ idsToExport: ComponentIdList; missingScope: ComponentID[] }> => {\n const localOnlyComponents = this.workspace.listLocalOnly();\n const localOnlyExportPending = bitIds.filter((id) => localOnlyComponents.hasWithoutScopeAndVersion(id));\n if (localOnlyExportPending.length) {\n throw new BitError(`unable to export the following components as they are local only:\n(either bit-reset them or run \"bit local-only unset\" to make them non local only)\n${localOnlyExportPending.map((c) => c.toString()).join('\\n')}`);\n }\n return { idsToExport: ComponentIdList.fromArray(bitIds), missingScope: [] };\n };\n if (isUserTryingToExportLanes(consumer)) {\n if (ids.length) {\n throw new BitError(`when checked out to a lane, all its components are exported. please omit the ids`);\n }\n const { componentsToExport, laneObject } = await this.getLaneCompIdsToExport(consumer, includeNonStaged);\n const loaderMsg = componentsToExport.length > 1 ? BEFORE_EXPORTS : BEFORE_EXPORT;\n loader.start(loaderMsg);\n const filtered = await throwForLocalOnlyIfNeeded(componentsToExport);\n return { ...filtered, laneObject };\n }\n if (!ids.length || idsHaveWildcard) {\n loader.start(BEFORE_LOADING_COMPONENTS);\n const exportPendingComponents: ComponentIdList = includeNonStaged\n ? await componentsList.listNonNewComponentsIds()\n : await componentsList.listExportPendingComponentsIds();\n const componentsToExport = idsHaveWildcard\n ? ComponentsList.filterComponentsByWildcard(exportPendingComponents, ids)\n : exportPendingComponents;\n const loaderMsg = componentsToExport.length > 1 ? BEFORE_EXPORTS : BEFORE_EXPORT;\n loader.start(loaderMsg);\n return throwForLocalOnlyIfNeeded(componentsToExport);\n }\n loader.start(BEFORE_EXPORT); // show single export\n const parsedIds = await Promise.all(ids.map((id) => getParsedId(consumer, id)));\n // load the components for fixing any out-of-sync issues.\n await consumer.loadComponents(ComponentIdList.fromArray(parsedIds));\n\n return throwForLocalOnlyIfNeeded(ComponentIdList.fromArray(parsedIds));\n }\n\n private async getLaneCompIdsToExport(\n consumer: Consumer,\n includeNonStaged?: boolean\n ): Promise<{ componentsToExport: ComponentIdList; laneObject: Lane }> {\n const currentLaneId = consumer.getCurrentLaneId();\n const laneObject = await consumer.scope.loadLane(currentLaneId);\n if (!laneObject) {\n throw new Error(`fatal: unable to load the current lane object (${currentLaneId.toString()})`);\n }\n loader.start(BEFORE_LOADING_COMPONENTS);\n const componentsList = new ComponentsList(consumer);\n const componentsToExportWithoutRemoved = includeNonStaged\n ? await componentsList.listNonNewComponentsIds()\n : await componentsList.listExportPendingComponentsIds(laneObject);\n const removedStagedBitIds = await this.getRemovedStagedBitIds();\n const componentsToExport = ComponentIdList.uniqFromArray([\n ...componentsToExportWithoutRemoved,\n ...removedStagedBitIds,\n ]);\n return { componentsToExport, laneObject };\n }\n\n private async getRemovedStagedBitIds(): Promise<ComponentIdList> {\n const removedStaged = await this.remove.getRemovedStaged();\n return ComponentIdList.fromArray(removedStaged.map((id) => id.changeVersion(undefined)));\n }\n\n static runtime = MainRuntime;\n static dependencies = [\n CLIAspect,\n ScopeAspect,\n WorkspaceAspect,\n RemoveAspect,\n DependencyResolverAspect,\n LoggerAspect,\n EjectAspect,\n ];\n static async provider([cli, scope, workspace, remove, depResolver, loggerMain, eject]: [\n CLIMain,\n ScopeMain,\n Workspace,\n RemoveMain,\n DependencyResolverMain,\n LoggerMain,\n EjectMain,\n ]) {\n const logger = loggerMain.createLogger(ExportAspect.id);\n const exportMain = new ExportMain(workspace, remove, depResolver, logger, eject);\n cli.register(new ResumeExportCmd(scope), new ExportCmd(exportMain));\n return exportMain;\n }\n}\n\nExportAspect.addRuntime(ExportMain);\n\n/**\n * the componentsIds passed here are the ones that didn't have scope-name before, and now they have.\n * so if the bitMap.updateComponentId returns bitId without scope-name is because it couldn't find it there\n */\nfunction _updateIdsOnBitMap(bitMap: BitMap, componentsIds: ComponentIdList): ComponentID[] {\n const updatedIds: ComponentID[] = [];\n componentsIds.forEach((componentsId) => {\n const resultId = bitMap.updateComponentId(componentsId, true);\n if (resultId.hasVersion()) updatedIds.push(resultId);\n });\n return updatedIds;\n}\n\nasync function getParsedId(consumer: Consumer, id: string): Promise<ComponentID> {\n // reason why not calling `consumer.getParsedId()` only is because a component might not be on\n // .bitmap and only in the scope. we support this case and enable to export\n try {\n return consumer.getParsedId(id);\n } catch (err: any) {\n return consumer.scope.getParsedId(id);\n }\n}\n\nfunction _throwForUnsnappedLaneReadme(lane: Lane) {\n const readmeComponent = lane.readmeComponent as LaneReadmeComponent;\n\n const isValid =\n readmeComponent?.head &&\n lane.getComponent(readmeComponent.id) &&\n lane.getComponentHead(readmeComponent.id)?.isEqual(readmeComponent?.head);\n\n if (!isValid) {\n throw new BitError(\n `${lane?.name} has a readme component ${readmeComponent.id} that hasn't been snapped on the lane.\n Please run either snap -a or snap ${readmeComponent.id} to snap the component on the lane before exporting it.`\n );\n }\n}\n\nasync function updateLanesAfterExport(consumer: Consumer, lane: Lane) {\n const currentLane = consumer.getCurrentLaneId();\n const isCurrentLane = lane.name === currentLane.name;\n if (!isCurrentLane) {\n throw new Error(\n `updateLanesAfterExport should get called only with current lane, got ${lane.name}, current ${currentLane.name}`\n );\n }\n consumer.setCurrentLane(lane.toLaneId(), true);\n consumer.scope.scopeJson.removeLaneFromNew(lane.name);\n lane.isNew = false;\n}\n\nexport function isUserTryingToExportLanes(consumer: Consumer) {\n return consumer.isOnLane();\n}\n\nexport default ExportMain;\n"],"mappings":";;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,KAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,OAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,MAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,UAAA;EAAA,MAA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O,yBAAyBA,CAACxP,QAAkB,EAAE;EAC5D,OAAOA,QAAQ,CAAC+S,QAAQ,CAAC,CAAC;AAC5B;AAAC,IAAAC,QAAA,GAAAzB,OAAA,CAAAhW,OAAA,GAEcwC,UAAU","ignoreList":[]}
1
+ {"version":3,"names":["_fsExtra","data","_interopRequireDefault","require","_cli","_scope","_bitError","_legacy","_componentId","_constants","_legacy2","_remove","_legacy3","_scope2","_workspace","_logger","_http","_objectList","_lodash","_pMapSeries","_laneId","_eject","_scopeRemotes","_workspaceModules","_dependencyResolver","_exportScopeComponents","_persistFailed","_traverseVersions","_export","_exportCmd","_resumeExportCmd","_excluded","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_objectWithoutProperties","i","_objectWithoutPropertiesLoose","s","includes","propertyIsEnumerable","call","n","hasOwnProperty","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","BEFORE_EXPORT","BEFORE_EXPORTS","BEFORE_LOADING_COMPONENTS","ExportMain","constructor","workspace","remove","depResolver","logger","eject","export","params","nonExistOnBitMap","newIdsOnRemote","missingScope","exported","removedIds","exportedLanes","rippleJobs","exportComponents","ejectResults","clearCache","ejectExportedComponents","exportResults","componentsIds","Scope","onPostExport","catch","err","error","_ref","ids","includeNonStaged","headOnly","originDirectly","OutsideWorkspaceError","consumer","idsToExport","laneObject","getComponentsToExport","updatedIds","ComponentIdList","forkLaneNewScope","BitError","name","readmeComponent","_throwForUnsnappedLaneReadme","forkedFrom","isNew","scope","id","toString","isOnMain","updatedLocally","exportMany","exportHeadsOnly","filterOutExistingVersions","Boolean","allVersions","updateLanesAfterExport","getRemovedStagedBitIds","workspaceIds","listIds","hasWithoutVersion","_updateIdsOnBitMap","bitMap","linkToNodeModulesByIds","removeFromStagedConfig","legacyScope","stagedSnaps","deleteFile","fs","getLastMergedPath","Analytics","setExtraData","onDestroy","resumeExportId","throwForMissingArtifacts","includeParents","exportOrigin","debug","scopeRemotes","getScopeRemotes","groupByScopeName","idList","reduce","acc","current","scopeName","Error","idsGroupedByScope","validateTargetScopeForLanes","newIds","fromArray","isExported","newIdsGrouped","mapSeries","remote","resolve","list","map","listItem","addMainHeadIfPossible","allHashes","modelComponent","head","find","h","hash","objects","has","getVersionsToExport","getCompHeadIncludeUpdateDependents","toComponentId","headVersion","loadVersion","parents","localTagsOrHashes","getLocalHashes","getAllVersionHashes","repo","groupedByScopeString","join","getUpdatedObjectsToExport","remoteNameStr","bitIds","lane","throwForDuplicationIgnoreVersion","idsToChangeLocally","componentsAndObjects","objectList","ObjectList","objectListPerName","modelComponents","getModelComponent","clearObjectsFromCache","refsToPotentialExportPerComponent","refs","getRefsToExportPerComp","allHashesAsStr","flat","ref","existingOnRemote","scopeImporter","checkWhatHashesExistOnRemote","refsToExportPerComponent","filteredOutRefs","refsToExport","existing","compact","bitObjectToObjectItem","obj","buffer","compress","type","getType","processModelComponent","clearStateData","objectItems","collectVersionsObjects","objectsList","toBitObjects","componentAndObject","component","getAll","convertToCorrectScope","remoteObj","url","host","date","Date","now","addScopeListItem","componentBuffer","componentData","objectsBuffer","Promise","all","allObjectsData","addIfNotExist","laneHistory","lanes","getOrCreateLaneHistory","laneHistoryData","laneData","manyObjectsPerRemote","pushAllToCentralHub","transformToOneObjectListWithScopeData","http","Http","connect","CENTRAL_BIT_HUB_URL","CENTRAL_BIT_HUB_NAME","pushResults","pushToCentralHub","origin","failedScopes","successIds","errors","metadata","PersistFailed","exportedBitIds","ComponentID","fromString","exportedIds","objectPerRemote","idsPerScope","jobs","updateLocalObjects","objectsPerRemote","componentObject","sources","put","add","remoteLanes","syncWithLaneObject","remoteLaneId","LaneId","from","DEFAULT_LANE","loadRemoteLane","addEntry","getHead","persist","idsWithRemoteScope","changeVersion","undefined","idsWithRemoteScopeUniq","uniqFromArray","sort","hasWithoutScopeAndVersion","warnCancelExport","consoleWarning","process","on","centralHubResults","remotes","validateRemotes","persistRemotes","shouldPushToCentralHub","pushToRemotesCarefully","setStatusLine","results","removeListener","objPerRemote","addScopeName","mergeObjectList","force","ejectErr","c","msg","clientId","pushRemotesPendingDir","pushOptions","pushedRemotes","count","pushMany","warn","removePendingDirs","hubRemotes","m","isHub","componentsObjects","remoteScope","exportingIds","shouldFork","shouldChangeScope","hasComponentChanged","idWithFutureScope","searchWithoutScopeAndVersion","stagedConfig","getStagedConfig","compId","removeComponentConfig","write","componentsList","ComponentsList","idsHaveWildcard","hasWildcard","throwForLocalOnlyIfNeeded","localOnlyComponents","listLocalOnly","localOnlyExportPending","isUserTryingToExportLanes","componentsToExport","getLaneCompIdsToExport","loaderMsg","filtered","exportPendingComponents","listNonNewComponentsIds","listExportPendingComponentsIds","filterComponentsByWildcard","parsedIds","getParsedId","loadComponents","currentLaneId","getCurrentLaneId","loadLane","componentsToExportWithoutRemoved","removedStagedBitIds","removedStaged","getRemovedStaged","provider","cli","loggerMain","createLogger","ExportAspect","exportMain","register","ResumeExportCmd","ExportCmd","exports","MainRuntime","CLIAspect","ScopeAspect","WorkspaceAspect","RemoveAspect","DependencyResolverAspect","LoggerAspect","EjectAspect","addRuntime","componentsId","resultId","updateComponentId","hasVersion","isValid","getComponent","getComponentHead","isEqual","currentLane","isCurrentLane","setCurrentLane","toLaneId","scopeJson","removeLaneFromNew","isOnLane","_default"],"sources":["export.main.runtime.ts"],"sourcesContent":["import fs from 'fs-extra';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { ScopeAspect, ScopeMain } from '@teambit/scope';\nimport { BitError } from '@teambit/bit-error';\nimport { Analytics } from '@teambit/legacy.analytics';\nimport { ComponentID, ComponentIdList } from '@teambit/component-id';\nimport { CENTRAL_BIT_HUB_NAME, CENTRAL_BIT_HUB_URL } from '@teambit/legacy/dist/constants';\nimport { Consumer } from '@teambit/legacy/dist/consumer';\nimport { BitMap } from '@teambit/legacy.bit-map';\nimport { ComponentsList } from '@teambit/legacy.component-list';\nimport { RemoveAspect, RemoveMain } from '@teambit/remove';\nimport { Lane, ModelComponent } from '@teambit/legacy/dist/scope/models';\nimport { hasWildcard } from '@teambit/legacy.utils';\nimport { Scope } from '@teambit/legacy/dist/scope';\nimport { WorkspaceAspect, OutsideWorkspaceError, Workspace } from '@teambit/workspace';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { LaneReadmeComponent } from '@teambit/legacy/dist/scope/models/lane';\nimport { Http } from '@teambit/legacy/dist/scope/network/http';\nimport { ObjectItem, ObjectList } from '@teambit/legacy/dist/scope/objects/object-list';\nimport { compact } from 'lodash';\nimport mapSeries from 'p-map-series';\nimport { LaneId, DEFAULT_LANE } from '@teambit/lane-id';\nimport { Remote, Remotes } from '@teambit/legacy/dist/remotes';\nimport { EjectAspect, EjectMain, EjectResults } from '@teambit/eject';\nimport { getScopeRemotes } from '@teambit/legacy/dist/scope/scope-remotes';\nimport { ExportOrigin } from '@teambit/legacy/dist/scope/network/http/http';\nimport { linkToNodeModulesByIds } from '@teambit/workspace.modules.node-modules-linker';\nimport { DependencyResolverAspect, DependencyResolverMain } from '@teambit/dependency-resolver';\nimport {\n persistRemotes,\n validateRemotes,\n removePendingDirs,\n} from '@teambit/legacy/dist/scope/component-ops/export-scope-components';\nimport { BitObject, Ref } from '@teambit/legacy/dist/scope/objects';\nimport { PersistFailed } from '@teambit/legacy/dist/scope/exceptions/persist-failed';\nimport { getAllVersionHashes } from '@teambit/legacy/dist/scope/component-ops/traverse-versions';\nimport { ExportAspect } from './export.aspect';\nimport { ExportCmd } from './export-cmd';\nimport { ResumeExportCmd } from './resume-export-cmd';\n\nexport type OnExportIdTransformer = (id: ComponentID) => ComponentID;\n\nconst BEFORE_EXPORT = 'exporting component';\nconst BEFORE_EXPORTS = 'exporting components';\nconst BEFORE_LOADING_COMPONENTS = 'loading components';\n\ntype ModelComponentAndObjects = { component: ModelComponent; objects: BitObject[] };\ntype ObjectListPerName = { [name: string]: ObjectList };\ntype ObjectsPerRemote = {\n remote: Remote;\n objectList: ObjectList;\n exportedIds?: string[];\n};\ntype ObjectsPerRemoteExtended = ObjectsPerRemote & {\n objectListPerName: ObjectListPerName;\n idsToChangeLocally: ComponentIdList;\n componentsAndObjects: ModelComponentAndObjects[];\n};\n\ntype ExportParams = {\n ids?: string[];\n eject?: boolean;\n allVersions?: boolean;\n originDirectly?: boolean;\n includeNonStaged?: boolean;\n resumeExportId?: string | undefined;\n headOnly?: boolean;\n ignoreMissingArtifacts?: boolean;\n forkLaneNewScope?: boolean;\n};\n\nexport interface ExportResult {\n nonExistOnBitMap: ComponentID[];\n newIdsOnRemote: ComponentID[];\n removedIds: ComponentIdList;\n missingScope: ComponentID[];\n componentsIds: ComponentID[];\n exportedLanes: Lane[];\n rippleJobs: string[];\n ejectResults: EjectResults | undefined;\n}\n\nexport class ExportMain {\n constructor(\n private workspace: Workspace,\n private remove: RemoveMain,\n private depResolver: DependencyResolverMain,\n private logger: Logger,\n private eject: EjectMain\n ) {}\n\n async export(params: ExportParams = {}): Promise<ExportResult> {\n const { nonExistOnBitMap, newIdsOnRemote, missingScope, exported, removedIds, exportedLanes, rippleJobs } =\n await this.exportComponents(params);\n let ejectResults: EjectResults | undefined;\n await this.workspace.clearCache(); // needed when one process executes multiple commands, such as in \"bit test\" or \"bit cli\"\n if (params.eject) ejectResults = await this.ejectExportedComponents(exported);\n const exportResults = {\n componentsIds: exported,\n newIdsOnRemote,\n nonExistOnBitMap,\n removedIds,\n missingScope,\n ejectResults,\n exportedLanes,\n rippleJobs,\n };\n if (Scope.onPostExport) {\n await Scope.onPostExport(exported, exportedLanes).catch((err) => {\n this.logger.error('fatal: onPostExport encountered an error (this error does not stop the process)', err);\n });\n }\n return exportResults;\n }\n\n private async exportComponents({\n ids,\n includeNonStaged,\n headOnly,\n originDirectly,\n ...params\n }: ExportParams): Promise<{\n updatedIds: ComponentID[];\n nonExistOnBitMap: ComponentID[];\n removedIds: ComponentIdList;\n missingScope: ComponentID[];\n exported: ComponentID[];\n exportedLanes: Lane[];\n newIdsOnRemote: ComponentID[];\n rippleJobs: string[];\n }> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const consumer: Consumer = this.workspace.consumer;\n const { idsToExport, missingScope, laneObject } = await this.getComponentsToExport(\n ids,\n includeNonStaged || headOnly\n );\n\n if (!idsToExport.length && !laneObject) {\n return {\n updatedIds: [],\n nonExistOnBitMap: [],\n removedIds: new ComponentIdList(),\n missingScope,\n exported: [],\n newIdsOnRemote: [],\n exportedLanes: [],\n rippleJobs: [],\n };\n }\n if (!idsToExport.length && laneObject && params.forkLaneNewScope) {\n throw new BitError(`the forked lane \"${laneObject.name}\" has no changes, to export all its components, please use \"--all\" flag\nif the export fails with missing objects/versions/components, run \"bit fetch --lanes <lane-name> --all-history\", to make sure you have the full history locally`);\n }\n\n // validate lane readme component and ensure it has been snapped\n if (laneObject?.readmeComponent) {\n _throwForUnsnappedLaneReadme(laneObject);\n }\n\n if (\n !params.forkLaneNewScope &&\n laneObject?.forkedFrom &&\n laneObject.isNew &&\n laneObject.forkedFrom.scope !== laneObject.scope\n ) {\n throw new BitError(`error: the current lane ${laneObject\n .id()\n .toString()} was forked from ${laneObject.forkedFrom.toString()}\nand is about to export to a different scope (${laneObject.scope}) than the original lane (${\n laneObject.forkedFrom.scope\n }).\non large lanes with long history graph, it results in exporting lots of objects to the new scope, some of them might be missing locally.\nif you can use the same scope as the original name, change it now by running \"bit lane change-scope ${\n laneObject.name\n } ${laneObject.forkedFrom.scope}\".\notherwise, re-run the export with \"--fork-lane-new-scope\" flag.\nif the export fails with missing objects/versions/components, run \"bit fetch --lanes <lane-name> --all-history\", to make sure you have the full history locally`);\n }\n const isOnMain = consumer.isOnMain();\n const { exported, updatedLocally, newIdsOnRemote, rippleJobs } = await this.exportMany({\n ...params,\n exportHeadsOnly: headOnly,\n scope: consumer.scope,\n ids: idsToExport,\n laneObject,\n originDirectly,\n isOnMain,\n filterOutExistingVersions: Boolean(!params.allVersions && laneObject),\n });\n if (laneObject) await updateLanesAfterExport(consumer, laneObject);\n const removedIds = await this.getRemovedStagedBitIds();\n const workspaceIds = this.workspace.listIds();\n const nonExistOnBitMap = exported.filter(\n (id) => !workspaceIds.hasWithoutVersion(id) && !removedIds.hasWithoutVersion(id)\n );\n // @ts-ignore todo: remove after deleting teambit.legacy\n const updatedIds = _updateIdsOnBitMap(consumer.bitMap, updatedLocally);\n // re-generate the package.json, this way, it has the correct data in the componentId prop.\n await linkToNodeModulesByIds(this.workspace, updatedIds, true);\n await this.removeFromStagedConfig(exported);\n // ideally we should delete the staged-snaps only for the exported snaps. however, it's not easy, and it's ok to\n // delete them all because this file is mainly an optimization for the import process.\n await this.workspace.scope.legacyScope.stagedSnaps.deleteFile();\n await fs.remove(this.workspace.scope.getLastMergedPath());\n Analytics.setExtraData('num_components', exported.length);\n // it is important to have consumer.onDestroy() before running the eject operation, we want the\n // export and eject operations to function independently. we don't want to lose the changes to\n // .bitmap file done by the export action in case the eject action has failed.\n await consumer.onDestroy('export');\n return {\n updatedIds,\n nonExistOnBitMap,\n removedIds,\n missingScope,\n exported,\n newIdsOnRemote,\n exportedLanes: laneObject ? [laneObject] : [],\n rippleJobs,\n };\n }\n\n /**\n * the export process uses four steps. read more about it here: https://github.com/teambit/bit/pull/3371\n */\n async exportMany({\n scope,\n ids, // when exporting a lane, the ids are the lane component ids\n laneObject,\n allVersions,\n originDirectly,\n resumeExportId,\n throwForMissingArtifacts,\n isOnMain = true,\n exportHeadsOnly, // relevant when exporting from bare-scope, especially when re-exporting existing versions, the normal calculation based on getDivergeData won't work\n includeParents, // relevant when exportHeadsOnly is used. sometimes the parents head are needed as well\n filterOutExistingVersions, // go to the remote and check whether the version exists there. if so, don't export it\n exportOrigin = 'export',\n }: {\n scope: Scope;\n ids: ComponentIdList;\n laneObject?: Lane;\n allVersions?: boolean;\n originDirectly?: boolean;\n resumeExportId?: string | undefined;\n throwForMissingArtifacts?: boolean;\n isOnMain?: boolean;\n exportHeadsOnly?: boolean;\n includeParents?: boolean;\n filterOutExistingVersions?: boolean;\n exportOrigin?: ExportOrigin;\n }): Promise<{\n exported: ComponentIdList;\n updatedLocally: ComponentIdList;\n newIdsOnRemote: ComponentID[];\n rippleJobs: string[];\n }> {\n this.logger.debug(`scope.exportMany, ids: ${ids.toString()}`);\n const scopeRemotes: Remotes = await getScopeRemotes(scope);\n\n const groupByScopeName = (idList: ComponentIdList): { [scopeName: string]: ComponentIdList } => {\n return idList.reduce((acc, current) => {\n const scopeName = current.scope;\n if (!scopeName) {\n throw new Error(`toGroupByScopeName() expect ids to have a scope name, got ${current.toString()}`);\n }\n if (acc[scopeName]) acc[scopeName].push(current);\n else acc[scopeName] = new ComponentIdList(current);\n return acc;\n }, {});\n };\n\n const idsGroupedByScope = groupByScopeName(ids);\n\n /**\n * when a component is exported for the first time, and the lane-scope is not the same as the component-scope, it's\n * important to validate that there is no such component in the original scope. otherwise, later, it'll be impossible\n * to merge the lane because these two components don't have any snap in common.\n */\n const validateTargetScopeForLanes = async () => {\n if (!laneObject) {\n return;\n }\n const newIds = ComponentIdList.fromArray(ids.filter((id) => !scope.isExported(id)));\n const newIdsGrouped = groupByScopeName(newIds);\n await mapSeries(Object.keys(newIdsGrouped), async (scopeName) => {\n if (scopeName === laneObject.scope) {\n // this validation is redundant if the lane-component is in the same scope as the lane-object\n return;\n }\n // by getting the remote we also validate that this scope actually exists.\n const remote = await scopeRemotes.resolve(scopeName, scope);\n const list = await remote.list();\n const listIds = ComponentIdList.fromArray(list.map((listItem) => listItem.id));\n newIdsGrouped[scopeName].forEach((id) => {\n if (listIds.hasWithoutVersion(id)) {\n throw new Error(`unable to export a lane with a new component \"${id.toString()}\", which has the default-scope \"${scopeName}\".\n this scope already has a component with the same name. as such, it'll be impossible to merge the lane later because these two components are different`);\n }\n });\n });\n };\n\n /**\n * by default, when exporting a lane, it traverse from the Lane's head and therefore it may skip the main head.\n * later, if for some reason the original component was deleted in its scope, the head object will be missing.\n */\n const addMainHeadIfPossible = async (allHashes: Ref[], modelComponent: ModelComponent) => {\n const head = modelComponent.head;\n if (!head) return;\n if (allHashes.find((h) => h.hash === head.hash)) return; // head is already in the list\n if (!(await scope.objects.has(head))) return; // it should not happen. but if it does, we don't want to block the export\n allHashes.push(head);\n };\n\n const getVersionsToExport = async (modelComponent: ModelComponent): Promise<Ref[]> => {\n if (exportHeadsOnly) {\n const head =\n laneObject?.getCompHeadIncludeUpdateDependents(modelComponent.toComponentId()) || modelComponent.head;\n if (!head) {\n throw new Error(\n `getVersionsToExport should export the head only, but the head of ${modelComponent.id()} is missing`\n );\n }\n if (includeParents) {\n const headVersion = await modelComponent.loadVersion(head.toString(), scope.objects);\n return [head, ...headVersion.parents];\n }\n return [head];\n }\n const localTagsOrHashes = await modelComponent.getLocalHashes(scope.objects);\n if (!allVersions) {\n return localTagsOrHashes;\n }\n\n const allHashes = await getAllVersionHashes({ modelComponent, repo: scope.objects });\n await addMainHeadIfPossible(allHashes, modelComponent);\n return allHashes;\n };\n\n await validateTargetScopeForLanes();\n const groupedByScopeString = Object.keys(idsGroupedByScope)\n .map((scopeName) => `scope \"${scopeName}\": ${idsGroupedByScope[scopeName].toString()}`)\n .join(', ');\n this.logger.debug(`export-scope-components, export to the following scopes ${groupedByScopeString}`);\n\n const getUpdatedObjectsToExport = async (\n remoteNameStr: string,\n bitIds: ComponentIdList,\n lane?: Lane\n ): Promise<ObjectsPerRemoteExtended> => {\n bitIds.throwForDuplicationIgnoreVersion();\n const remote: Remote = await scopeRemotes.resolve(remoteNameStr, scope);\n const idsToChangeLocally = ComponentIdList.fromArray(bitIds.filter((id) => !scope.isExported(id)));\n const componentsAndObjects: ModelComponentAndObjects[] = [];\n const objectList = new ObjectList();\n const objectListPerName: ObjectListPerName = {};\n\n const modelComponents = await mapSeries(bitIds, (id) => scope.getModelComponent(id));\n // super important! otherwise, the processModelComponent() changes objects in memory, while the key remains the same\n scope.objects.clearObjectsFromCache();\n\n const refsToPotentialExportPerComponent = await mapSeries(modelComponents, async (modelComponent) => {\n const refs = await getVersionsToExport(modelComponent);\n return { modelComponent, refs };\n });\n\n const getRefsToExportPerComp = async () => {\n if (!filterOutExistingVersions) {\n return refsToPotentialExportPerComponent;\n }\n const allHashesAsStr = refsToPotentialExportPerComponent\n .map((r) => r.refs)\n .flat()\n .map((ref) => ref.toString());\n const existingOnRemote = await scope.scopeImporter.checkWhatHashesExistOnRemote(remoteNameStr, allHashesAsStr);\n // for lanes, some snaps might be already on the remote, and the reason they're staged is due to a previous merge.\n const refsToExportPerComponent = refsToPotentialExportPerComponent.map(({ modelComponent, refs }) => {\n const filteredOutRefs: string[] = [];\n const refsToExport = refs.filter((ref) => {\n const existing = existingOnRemote.includes(ref.toString());\n if (existing) filteredOutRefs.push(ref.toString());\n return !existing;\n });\n if (filteredOutRefs.length)\n this.logger.debug(\n `export-scope-components, the following refs were filtered out from ${modelComponent\n .id()\n .toString()} because they already exist on the remote:\\n${filteredOutRefs.join('\\n')}`\n );\n\n return refsToExport.length ? { modelComponent, refs: refsToExport } : null;\n });\n\n return compact(refsToExportPerComponent);\n };\n\n const bitObjectToObjectItem = async (obj: BitObject): Promise<ObjectItem> => {\n return {\n ref: obj.hash(),\n buffer: await obj.compress(),\n type: obj.getType(),\n };\n };\n\n const processModelComponent = async ({\n modelComponent,\n refs,\n }: {\n modelComponent: ModelComponent;\n refs: Ref[];\n }) => {\n modelComponent.clearStateData();\n const objectItems = await modelComponent.collectVersionsObjects(\n scope.objects,\n refs.map((ref) => ref.toString()),\n throwForMissingArtifacts\n );\n const objectsList = await new ObjectList(objectItems).toBitObjects();\n const componentAndObject = { component: modelComponent, objects: objectsList.getAll() };\n await this.convertToCorrectScope(scope, componentAndObject, remoteNameStr, bitIds, ids);\n const remoteObj = { url: remote.host, name: remote.name, date: Date.now().toString() };\n modelComponent.addScopeListItem(remoteObj);\n componentsAndObjects.push(componentAndObject);\n const componentBuffer = await modelComponent.compress();\n const componentData = { ref: modelComponent.hash(), buffer: componentBuffer, type: modelComponent.getType() };\n const objectsBuffer = await Promise.all(\n componentAndObject.objects.map(async (obj) => bitObjectToObjectItem(obj))\n );\n const allObjectsData = [componentData, ...objectsBuffer];\n objectListPerName[modelComponent.name] = new ObjectList(allObjectsData);\n objectList.addIfNotExist(allObjectsData);\n };\n\n const refsToExportPerComponent = await getRefsToExportPerComp();\n // don't use Promise.all, otherwise, it'll throw \"JavaScript heap out of memory\" on a large set of data\n await mapSeries(refsToExportPerComponent, processModelComponent);\n if (lane) {\n const laneHistory = await scope.lanes.getOrCreateLaneHistory(lane);\n const laneHistoryData = await bitObjectToObjectItem(laneHistory);\n objectList.addIfNotExist([laneHistoryData]);\n const laneData = await bitObjectToObjectItem(lane);\n objectList.addIfNotExist([laneData]);\n }\n\n return { remote, objectList, objectListPerName, idsToChangeLocally, componentsAndObjects };\n };\n\n const manyObjectsPerRemote = laneObject\n ? [await getUpdatedObjectsToExport(laneObject.scope, ids, laneObject)]\n : await mapSeries(Object.keys(idsGroupedByScope), (scopeName) =>\n getUpdatedObjectsToExport(scopeName, idsGroupedByScope[scopeName], laneObject)\n );\n\n const pushAllToCentralHub = async () => {\n const objectList = this.transformToOneObjectListWithScopeData(manyObjectsPerRemote);\n const http = await Http.connect(CENTRAL_BIT_HUB_URL, CENTRAL_BIT_HUB_NAME);\n const pushResults = await http.pushToCentralHub(objectList, { origin: exportOrigin });\n const { failedScopes, successIds, errors, metadata } = pushResults;\n if (failedScopes.length) {\n throw new PersistFailed(failedScopes, errors);\n }\n const exportedBitIds = successIds.map((id) => ComponentID.fromString(id));\n if (manyObjectsPerRemote.length === 1) {\n // when on a lane, it's always exported to the lane. and the ids can be from different scopes, so having the\n // filter below, will remove these components from the output of bit-export at the end.\n manyObjectsPerRemote[0].exportedIds = exportedBitIds.map((id) => id.toString());\n } else {\n manyObjectsPerRemote.forEach((objectPerRemote) => {\n const idsPerScope = exportedBitIds.filter((id) => id.scope === objectPerRemote.remote.name);\n // it's possible that idsPerScope is an empty array, in case the objects were exported already before\n objectPerRemote.exportedIds = idsPerScope.map((id) => id.toString());\n });\n }\n return { rippleJobs: metadata?.jobs };\n };\n\n const updateLocalObjects = async (\n lane?: Lane\n ): Promise<\n Array<{ exported: ComponentIdList; updatedLocally: ComponentIdList; newIdsOnRemote: ComponentID[] }>\n > => {\n return mapSeries(manyObjectsPerRemote, async (objectsPerRemote: ObjectsPerRemoteExtended) => {\n const { remote, idsToChangeLocally, componentsAndObjects, exportedIds } = objectsPerRemote;\n const remoteNameStr = remote.name;\n\n componentsAndObjects.forEach((componentObject) => scope.sources.put(componentObject));\n\n // update lanes\n if (lane) {\n if (idsToChangeLocally.length) {\n // otherwise, we don't want to update scope-name of components in the lane object\n scope.objects.add(lane);\n }\n await scope.objects.remoteLanes.syncWithLaneObject(remoteNameStr, lane);\n }\n\n if (isOnMain && !lane) {\n // all exported from main\n const remoteLaneId = LaneId.from(DEFAULT_LANE, remoteNameStr);\n await scope.objects.remoteLanes.loadRemoteLane(remoteLaneId);\n await Promise.all(\n componentsAndObjects.map(async ({ component }) => {\n await scope.objects.remoteLanes.addEntry(remoteLaneId, component.toComponentId(), component.getHead());\n })\n );\n }\n\n await scope.objects.persist();\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const newIdsOnRemote = exportedIds!.map((id) => ComponentID.fromString(id));\n // remove version. exported component might have multiple versions exported\n const idsWithRemoteScope: ComponentID[] = newIdsOnRemote.map((id) => id.changeVersion(undefined));\n const idsWithRemoteScopeUniq = ComponentIdList.uniqFromArray(idsWithRemoteScope).sort();\n return {\n newIdsOnRemote,\n exported: idsWithRemoteScopeUniq,\n updatedLocally: ComponentIdList.fromArray(\n idsWithRemoteScopeUniq.filter((id) => idsToChangeLocally.hasWithoutScopeAndVersion(id))\n ),\n };\n });\n };\n\n const warnCancelExport = () => {\n this.logger.consoleWarning(\n `unable to cancel the export process at this point because the communication with the remote already started`\n );\n };\n process.on('SIGINT', warnCancelExport);\n let centralHubResults;\n if (resumeExportId) {\n const remotes = manyObjectsPerRemote.map((o) => o.remote);\n await validateRemotes(remotes, resumeExportId);\n await persistRemotes(manyObjectsPerRemote, resumeExportId);\n } else if (this.shouldPushToCentralHub(manyObjectsPerRemote, scopeRemotes, originDirectly)) {\n centralHubResults = await pushAllToCentralHub();\n } else {\n // await pushToRemotes();\n await this.pushToRemotesCarefully(manyObjectsPerRemote, resumeExportId);\n }\n\n this.logger.setStatusLine('updating data locally...');\n const results = await updateLocalObjects(laneObject);\n process.removeListener('SIGINT', warnCancelExport);\n return {\n newIdsOnRemote: results.map((r) => r.newIdsOnRemote).flat(),\n exported: ComponentIdList.uniqFromArray(results.map((r) => r.exported).flat()),\n updatedLocally: ComponentIdList.uniqFromArray(results.map((r) => r.updatedLocally).flat()),\n rippleJobs: centralHubResults?.rippleJobs || [],\n };\n }\n\n private transformToOneObjectListWithScopeData(objectsPerRemote: ObjectsPerRemote[]): ObjectList {\n const objectList = new ObjectList();\n objectsPerRemote.forEach((objPerRemote) => {\n objPerRemote.objectList.addScopeName(objPerRemote.remote.name);\n objectList.mergeObjectList(objPerRemote.objectList);\n });\n return objectList;\n }\n\n private async ejectExportedComponents(componentsIds: ComponentID[]): Promise<EjectResults> {\n const consumer: Consumer = this.workspace.consumer;\n let ejectResults: EjectResults;\n try {\n ejectResults = await this.eject.eject(componentsIds, { force: true });\n } catch (err: any) {\n const ejectErr = `The components ${componentsIds.map((c) => c.toString()).join(', ')} were exported successfully.\n However, the eject operation has failed due to an error: ${err.msg || err}`;\n this.logger.error(ejectErr, err);\n throw new Error(ejectErr);\n }\n // run the consumer.onDestroy() again, to write the changes done by the eject action to .bitmap\n await consumer.onDestroy('export (eject)');\n return ejectResults;\n }\n\n async pushToRemotesCarefully(manyObjectsPerRemote: ObjectsPerRemote[], resumeExportId?: string) {\n const remotes = manyObjectsPerRemote.map((o) => o.remote);\n const clientId = resumeExportId || Date.now().toString();\n await this.pushRemotesPendingDir(clientId, manyObjectsPerRemote, resumeExportId);\n await validateRemotes(remotes, clientId, Boolean(resumeExportId));\n await persistRemotes(manyObjectsPerRemote, clientId);\n }\n\n private async pushRemotesPendingDir(\n clientId: string,\n manyObjectsPerRemote: ObjectsPerRemote[],\n resumeExportId?: string\n ): Promise<void> {\n if (resumeExportId) {\n this.logger.debug('pushRemotesPendingDir - skip as the resumeExportId was passed');\n // no need to transfer the objects, they're already on the server. also, since this clientId\n // exists already on the remote pending-dir, it'll cause a collision.\n return;\n }\n const pushOptions = { clientId };\n const pushedRemotes: Remote[] = [];\n await mapSeries(manyObjectsPerRemote, async (objectsPerRemote: ObjectsPerRemote) => {\n const { remote, objectList } = objectsPerRemote;\n this.logger.setStatusLine(`transferring ${objectList.count()} objects to the remote \"${remote.name}\"...`);\n try {\n await remote.pushMany(objectList, pushOptions, {});\n this.logger.debug(\n 'pushRemotesPendingDir, successfully pushed all objects to the pending-dir directory on the remote'\n );\n pushedRemotes.push(remote);\n } catch (err: any) {\n this.logger.warn('exportMany, failed pushing objects to the remote');\n await removePendingDirs(pushedRemotes, clientId);\n throw err;\n }\n });\n }\n\n shouldPushToCentralHub(\n manyObjectsPerRemote: ObjectsPerRemote[],\n scopeRemotes: Remotes,\n originDirectly = false\n ): boolean {\n if (originDirectly) return false;\n const hubRemotes = manyObjectsPerRemote.filter((m) => scopeRemotes.isHub(m.remote.name));\n if (!hubRemotes.length) return false;\n if (hubRemotes.length === manyObjectsPerRemote.length) return true; // all are hub\n // @todo: maybe create a flag \"no-central\" to support this workflow\n throw new BitError(\n `some of your components are configured to be exported to a local scope and some to the bit.cloud hub. this is not supported`\n );\n }\n\n /**\n * Component and dependencies id changes:\n * When exporting components with dependencies to a bare-scope, some of the dependencies may be created locally and as\n * a result their scope-name is null. Before the bare-scope gets the components, convert these scope names\n * to the bare-scope name.\n *\n * This is the Harmony version of \"convertToCorrectScope\". No more codemod and no more hash changes.\n */\n private async convertToCorrectScope(\n scope: Scope,\n componentsObjects: ModelComponentAndObjects,\n remoteScope: string,\n exportingIds: ComponentIdList,\n ids: ComponentIdList,\n shouldFork = false // not in used currently, but might be needed soon\n ): Promise<boolean> {\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n const shouldChangeScope = shouldFork\n ? remoteScope !== componentsObjects.component.scope\n : !componentsObjects.component.scope;\n const hasComponentChanged = shouldChangeScope;\n if (shouldChangeScope) {\n const idWithFutureScope = ids.searchWithoutScopeAndVersion(componentsObjects.component.toComponentId());\n componentsObjects.component.scope = idWithFutureScope?.scope || remoteScope;\n }\n\n // return true if one of the versions has changed or the component itself\n return hasComponentChanged;\n }\n\n private async removeFromStagedConfig(ids: ComponentID[]) {\n this.logger.debug(`removeFromStagedConfig, ${ids.length} ids`);\n const stagedConfig = await this.workspace.scope.getStagedConfig();\n ids.map((compId) => stagedConfig.removeComponentConfig(compId));\n await stagedConfig.write();\n }\n\n private async getComponentsToExport(\n ids: string[] = [],\n includeNonStaged?: boolean\n ): Promise<{\n idsToExport: ComponentIdList;\n missingScope: ComponentID[];\n laneObject?: Lane;\n }> {\n const consumer = this.workspace.consumer;\n const componentsList = new ComponentsList(consumer);\n const idsHaveWildcard = hasWildcard(ids);\n const throwForLocalOnlyIfNeeded = async (\n bitIds: ComponentIdList\n ): Promise<{ idsToExport: ComponentIdList; missingScope: ComponentID[] }> => {\n const localOnlyComponents = this.workspace.listLocalOnly();\n const localOnlyExportPending = bitIds.filter((id) => localOnlyComponents.hasWithoutScopeAndVersion(id));\n if (localOnlyExportPending.length) {\n throw new BitError(`unable to export the following components as they are local only:\n(either bit-reset them or run \"bit local-only unset\" to make them non local only)\n${localOnlyExportPending.map((c) => c.toString()).join('\\n')}`);\n }\n return { idsToExport: ComponentIdList.fromArray(bitIds), missingScope: [] };\n };\n if (isUserTryingToExportLanes(consumer)) {\n if (ids.length) {\n throw new BitError(`when checked out to a lane, all its components are exported. please omit the ids`);\n }\n const { componentsToExport, laneObject } = await this.getLaneCompIdsToExport(consumer, includeNonStaged);\n const loaderMsg = componentsToExport.length > 1 ? BEFORE_EXPORTS : BEFORE_EXPORT;\n this.logger.setStatusLine(loaderMsg);\n const filtered = await throwForLocalOnlyIfNeeded(componentsToExport);\n return { ...filtered, laneObject };\n }\n if (!ids.length || idsHaveWildcard) {\n this.logger.setStatusLine(BEFORE_LOADING_COMPONENTS);\n const exportPendingComponents: ComponentIdList = includeNonStaged\n ? await componentsList.listNonNewComponentsIds()\n : await componentsList.listExportPendingComponentsIds();\n const componentsToExport = idsHaveWildcard\n ? ComponentsList.filterComponentsByWildcard(exportPendingComponents, ids)\n : exportPendingComponents;\n const loaderMsg = componentsToExport.length > 1 ? BEFORE_EXPORTS : BEFORE_EXPORT;\n this.logger.setStatusLine(loaderMsg);\n return throwForLocalOnlyIfNeeded(componentsToExport);\n }\n this.logger.setStatusLine(BEFORE_EXPORT); // show single export\n const parsedIds = await Promise.all(ids.map((id) => getParsedId(consumer, id)));\n // load the components for fixing any out-of-sync issues.\n await consumer.loadComponents(ComponentIdList.fromArray(parsedIds));\n\n return throwForLocalOnlyIfNeeded(ComponentIdList.fromArray(parsedIds));\n }\n\n private async getLaneCompIdsToExport(\n consumer: Consumer,\n includeNonStaged?: boolean\n ): Promise<{ componentsToExport: ComponentIdList; laneObject: Lane }> {\n const currentLaneId = consumer.getCurrentLaneId();\n const laneObject = await consumer.scope.loadLane(currentLaneId);\n if (!laneObject) {\n throw new Error(`fatal: unable to load the current lane object (${currentLaneId.toString()})`);\n }\n this.logger.setStatusLine(BEFORE_LOADING_COMPONENTS);\n const componentsList = new ComponentsList(consumer);\n const componentsToExportWithoutRemoved = includeNonStaged\n ? await componentsList.listNonNewComponentsIds()\n : await componentsList.listExportPendingComponentsIds(laneObject);\n const removedStagedBitIds = await this.getRemovedStagedBitIds();\n const componentsToExport = ComponentIdList.uniqFromArray([\n ...componentsToExportWithoutRemoved,\n ...removedStagedBitIds,\n ]);\n return { componentsToExport, laneObject };\n }\n\n private async getRemovedStagedBitIds(): Promise<ComponentIdList> {\n const removedStaged = await this.remove.getRemovedStaged();\n return ComponentIdList.fromArray(removedStaged.map((id) => id.changeVersion(undefined)));\n }\n\n static runtime = MainRuntime;\n static dependencies = [\n CLIAspect,\n ScopeAspect,\n WorkspaceAspect,\n RemoveAspect,\n DependencyResolverAspect,\n LoggerAspect,\n EjectAspect,\n ];\n static async provider([cli, scope, workspace, remove, depResolver, loggerMain, eject]: [\n CLIMain,\n ScopeMain,\n Workspace,\n RemoveMain,\n DependencyResolverMain,\n LoggerMain,\n EjectMain,\n ]) {\n const logger = loggerMain.createLogger(ExportAspect.id);\n const exportMain = new ExportMain(workspace, remove, depResolver, logger, eject);\n cli.register(new ResumeExportCmd(scope), new ExportCmd(exportMain));\n return exportMain;\n }\n}\n\nExportAspect.addRuntime(ExportMain);\n\n/**\n * the componentsIds passed here are the ones that didn't have scope-name before, and now they have.\n * so if the bitMap.updateComponentId returns bitId without scope-name is because it couldn't find it there\n */\nfunction _updateIdsOnBitMap(bitMap: BitMap, componentsIds: ComponentIdList): ComponentID[] {\n const updatedIds: ComponentID[] = [];\n componentsIds.forEach((componentsId) => {\n const resultId = bitMap.updateComponentId(componentsId, true);\n if (resultId.hasVersion()) updatedIds.push(resultId);\n });\n return updatedIds;\n}\n\nasync function getParsedId(consumer: Consumer, id: string): Promise<ComponentID> {\n // reason why not calling `consumer.getParsedId()` only is because a component might not be on\n // .bitmap and only in the scope. we support this case and enable to export\n try {\n return consumer.getParsedId(id);\n } catch (err: any) {\n return consumer.scope.getParsedId(id);\n }\n}\n\nfunction _throwForUnsnappedLaneReadme(lane: Lane) {\n const readmeComponent = lane.readmeComponent as LaneReadmeComponent;\n\n const isValid =\n readmeComponent?.head &&\n lane.getComponent(readmeComponent.id) &&\n lane.getComponentHead(readmeComponent.id)?.isEqual(readmeComponent?.head);\n\n if (!isValid) {\n throw new BitError(\n `${lane?.name} has a readme component ${readmeComponent.id} that hasn't been snapped on the lane.\n Please run either snap -a or snap ${readmeComponent.id} to snap the component on the lane before exporting it.`\n );\n }\n}\n\nasync function updateLanesAfterExport(consumer: Consumer, lane: Lane) {\n const currentLane = consumer.getCurrentLaneId();\n const isCurrentLane = lane.name === currentLane.name;\n if (!isCurrentLane) {\n throw new Error(\n `updateLanesAfterExport should get called only with current lane, got ${lane.name}, current ${currentLane.name}`\n );\n }\n consumer.setCurrentLane(lane.toLaneId(), true);\n consumer.scope.scopeJson.removeLaneFromNew(lane.name);\n lane.isNew = false;\n}\n\nexport function isUserTryingToExportLanes(consumer: Consumer) {\n return consumer.isOnLane();\n}\n\nexport default ExportMain;\n"],"mappings":";;;;;;;AAAA,SAAAA,SAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,QAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,KAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,IAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,OAAA;EAAA,MAAAJ,IAAA,GAAAE,OAAA;EAAAE,MAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,UAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,SAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,QAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,OAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,aAAA;EAAA,MAAAP,IAAA,GAAAE,OAAA;EAAAK,YAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,WAAA;EAAA,MAAAR,IAAA,GAAAE,OAAA;EAAAM,UAAA,YAAAA,CAAA;I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mF,IAAI,EAAElF,IAAI,2BAA2BC,eAAe,CAACK,EAAE;AAChE,0CAA0CL,eAAe,CAACK,EAAE,yDACxD,CAAC;EACH;AACF;AAEA,eAAeS,sBAAsBA,CAACvB,QAAkB,EAAE0F,IAAU,EAAE;EACpE,MAAM2M,WAAW,GAAGrS,QAAQ,CAACoQ,gBAAgB,CAAC,CAAC;EAC/C,MAAMkC,aAAa,GAAG5M,IAAI,CAAClF,IAAI,KAAK6R,WAAW,CAAC7R,IAAI;EACpD,IAAI,CAAC8R,aAAa,EAAE;IAClB,MAAM,IAAIjP,KAAK,CACb,wEAAwEqC,IAAI,CAAClF,IAAI,aAAa6R,WAAW,CAAC7R,IAAI,EAChH,CAAC;EACH;EACAR,QAAQ,CAACuS,cAAc,CAAC7M,IAAI,CAAC8M,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC;EAC9CxS,QAAQ,CAACa,KAAK,CAAC4R,SAAS,CAACC,iBAAiB,CAAChN,IAAI,CAAClF,IAAI,CAAC;EACrDkF,IAAI,CAAC9E,KAAK,GAAG,KAAK;AACpB;AAEO,SAAS2O,yBAAyBA,CAACvP,QAAkB,EAAE;EAC5D,OAAOA,QAAQ,CAAC2S,QAAQ,CAAC,CAAC;AAC5B;AAAC,IAAAC,QAAA,GAAAzB,OAAA,CAAA/V,OAAA,GAEc2C,UAAU","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.scope_export@1.0.470/dist/export.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.scope_export@1.0.470/dist/export.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.scope_export@1.0.471/dist/export.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.scope_export@1.0.471/dist/export.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/export",
3
- "version": "1.0.470",
3
+ "version": "1.0.471",
4
4
  "homepage": "https://bit.cloud/teambit/scope/export",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.scope",
8
8
  "name": "export",
9
- "version": "1.0.470"
9
+ "version": "1.0.471"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -18,19 +18,19 @@
18
18
  "@teambit/bit-error": "0.0.404",
19
19
  "@teambit/component-id": "1.2.2",
20
20
  "@teambit/lane-id": "0.0.311",
21
- "@teambit/cli": "0.0.1047",
22
- "@teambit/eject": "1.0.470",
23
- "@teambit/dependency-resolver": "1.0.470",
24
- "@teambit/legacy.analytics": "0.0.51",
25
- "@teambit/legacy.bit-map": "0.0.51",
26
- "@teambit/legacy.component-list": "0.0.48",
21
+ "@teambit/cli": "0.0.1048",
22
+ "@teambit/eject": "1.0.471",
23
+ "@teambit/dependency-resolver": "1.0.471",
24
+ "@teambit/legacy.analytics": "0.0.52",
25
+ "@teambit/legacy.bit-map": "0.0.52",
26
+ "@teambit/legacy.component-list": "0.0.49",
27
27
  "@teambit/legacy.utils": "0.0.6",
28
- "@teambit/logger": "0.0.1140",
29
- "@teambit/remove": "1.0.470",
30
- "@teambit/scope": "1.0.470",
31
- "@teambit/workspace.modules.node-modules-linker": "0.0.222",
32
- "@teambit/workspace": "1.0.470",
33
- "@teambit/legacy.scope-api": "0.0.49"
28
+ "@teambit/logger": "0.0.1141",
29
+ "@teambit/remove": "1.0.471",
30
+ "@teambit/scope": "1.0.471",
31
+ "@teambit/workspace.modules.node-modules-linker": "0.0.223",
32
+ "@teambit/workspace": "1.0.471",
33
+ "@teambit/legacy.scope-api": "0.0.50"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/lodash": "4.14.165",