@teambit/importer 0.0.282 → 0.0.283

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,19 @@
1
+ import { Command, CommandOptions } from '@teambit/cli';
2
+ import { ImporterMain } from './importer.main.runtime';
3
+ export declare class FetchCmd implements Command {
4
+ private importer;
5
+ name: string;
6
+ description: string;
7
+ extendedDescription: string;
8
+ alias: string;
9
+ private: boolean;
10
+ options: CommandOptions;
11
+ loader: boolean;
12
+ constructor(importer: ImporterMain);
13
+ report([ids]: [string[]], { lanes, components, json, fromOriginalScope, }: {
14
+ lanes?: boolean;
15
+ components?: boolean;
16
+ json?: boolean;
17
+ fromOriginalScope?: boolean;
18
+ }): Promise<string>;
19
+ }
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ require("core-js/modules/es.array.iterator.js");
6
+
7
+ require("core-js/modules/es.promise.js");
8
+
9
+ Object.defineProperty(exports, "__esModule", {
10
+ value: true
11
+ });
12
+ exports.FetchCmd = void 0;
13
+
14
+ function _defineProperty2() {
15
+ const data = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
+
17
+ _defineProperty2 = function () {
18
+ return data;
19
+ };
20
+
21
+ return data;
22
+ }
23
+
24
+ function _chalk() {
25
+ const data = _interopRequireDefault(require("chalk"));
26
+
27
+ _chalk = function () {
28
+ return data;
29
+ };
30
+
31
+ return data;
32
+ }
33
+
34
+ function _ramda() {
35
+ const data = _interopRequireDefault(require("ramda"));
36
+
37
+ _ramda = function () {
38
+ return data;
39
+ };
40
+
41
+ return data;
42
+ }
43
+
44
+ function _mergeVersion() {
45
+ const data = require("@teambit/legacy/dist/consumer/versions-ops/merge-version/merge-version");
46
+
47
+ _mergeVersion = function () {
48
+ return data;
49
+ };
50
+
51
+ return data;
52
+ }
53
+
54
+ class FetchCmd {
55
+ constructor(importer) {
56
+ this.importer = importer;
57
+ (0, _defineProperty2().default)(this, "name", 'fetch [ids...]');
58
+ (0, _defineProperty2().default)(this, "description", `fetch remote objects and store locally`);
59
+ (0, _defineProperty2().default)(this, "extendedDescription", `for lanes, use "/" as a separator between the remote and the lane name, e.g. teambit.ui/fix-button`);
60
+ (0, _defineProperty2().default)(this, "alias", '');
61
+ (0, _defineProperty2().default)(this, "private", true);
62
+ (0, _defineProperty2().default)(this, "options", [['l', 'lanes', 'EXPERIMENTAL. fetch component objects from lanes. note, it does not save the remote lanes objects locally, only the refs'], ['c', 'components', 'fetch components'], ['j', 'json', 'return the output as JSON'], ['', 'from-original-scopes', 'fetch indirect dependencies from their original scope as opposed to from their dependents']]);
63
+ (0, _defineProperty2().default)(this, "loader", true);
64
+ }
65
+
66
+ async report([ids = []], {
67
+ lanes = false,
68
+ components = false,
69
+ json = false,
70
+ fromOriginalScope = false
71
+ }) {
72
+ const {
73
+ dependencies,
74
+ importDetails
75
+ } = await this.importer.fetch(ids, lanes, components, fromOriginalScope);
76
+
77
+ if (json) {
78
+ return JSON.stringify({
79
+ importDetails
80
+ }, null, 4);
81
+ }
82
+
83
+ if (dependencies && !_ramda().default.isEmpty(dependencies)) {
84
+ const componentsObj = dependencies.map(_ramda().default.prop('component'));
85
+ const title = componentsObj.length === 1 ? 'successfully fetched one component' : `successfully fetched ${componentsObj.length} components`;
86
+ const componentDependencies = componentsObj.map(component => {
87
+ // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
88
+ const details = importDetails.find(c => c.id === component.id.toStringWithoutVersion()); // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
89
+
90
+ if (!details) throw new Error(`missing details of component ${component.id.toString()}`); // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
91
+
92
+ return formatPlainComponentItemWithVersions(component, details);
93
+ });
94
+ const componentDependenciesOutput = [_chalk().default.green(title)].concat(componentDependencies).join('\n');
95
+ return componentDependenciesOutput;
96
+ }
97
+
98
+ return _chalk().default.yellow('nothing to import');
99
+ }
100
+
101
+ }
102
+
103
+ exports.FetchCmd = FetchCmd;
104
+
105
+ function formatPlainComponentItemWithVersions(component, importDetails) {
106
+ const status = importDetails.status;
107
+ const id = component.id.toStringWithoutVersion();
108
+ const versions = importDetails.versions.length ? `new versions: ${importDetails.versions.join(', ')}` : ''; // $FlowFixMe component.version should be set here
109
+
110
+ const usedVersion = status === 'added' ? `, currently used version ${component.version}` : '';
111
+
112
+ const getConflictMessage = () => {
113
+ if (!importDetails.filesStatus) return '';
114
+ const conflictedFiles = Object.keys(importDetails.filesStatus) // $FlowFixMe file is set
115
+ // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!
116
+ .filter(file => importDetails.filesStatus[file] === _mergeVersion().FileStatus.manual);
117
+ if (!conflictedFiles.length) return '';
118
+ return `(the following files were saved with conflicts ${conflictedFiles.map(file => _chalk().default.bold(file)).join(', ')}) `;
119
+ };
120
+
121
+ const deprecated = importDetails.deprecated ? _chalk().default.yellow('deprecated') : '';
122
+ const missingDeps = importDetails.missingDeps.length ? _chalk().default.red(`missing dependencies: ${importDetails.missingDeps.map(d => d.toString()).join(', ')}`) : '';
123
+ return `- ${_chalk().default.green(status)} ${_chalk().default.cyan(id)} ${versions}${usedVersion} ${getConflictMessage()}${deprecated} ${missingDeps}`;
124
+ }
125
+
126
+ //# sourceMappingURL=fetch-cmd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["FetchCmd","constructor","importer","report","ids","lanes","components","json","fromOriginalScope","dependencies","importDetails","fetch","JSON","stringify","R","isEmpty","componentsObj","map","prop","title","length","componentDependencies","component","details","find","c","id","toStringWithoutVersion","Error","toString","formatPlainComponentItemWithVersions","componentDependenciesOutput","chalk","green","concat","join","yellow","status","versions","usedVersion","version","getConflictMessage","filesStatus","conflictedFiles","Object","keys","filter","file","FileStatus","manual","bold","deprecated","missingDeps","red","d","cyan"],"sources":["fetch-cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport R from 'ramda';\nimport { Command, CommandOptions } from '@teambit/cli';\nimport Component from '@teambit/legacy/dist/consumer/component/consumer-component';\nimport { FileStatus } from '@teambit/legacy/dist/consumer/versions-ops/merge-version/merge-version';\nimport { ImporterMain } from './importer.main.runtime';\nimport { ImportDetails, ImportStatus } from './import-components';\n\nexport class FetchCmd implements Command {\n name = 'fetch [ids...]';\n description = `fetch remote objects and store locally`;\n extendedDescription = `for lanes, use \"/\" as a separator between the remote and the lane name, e.g. teambit.ui/fix-button`;\n alias = '';\n private = true;\n options = [\n [\n 'l',\n 'lanes',\n 'EXPERIMENTAL. fetch component objects from lanes. note, it does not save the remote lanes objects locally, only the refs',\n ],\n ['c', 'components', 'fetch components'],\n ['j', 'json', 'return the output as JSON'],\n [\n '',\n 'from-original-scopes',\n 'fetch indirect dependencies from their original scope as opposed to from their dependents',\n ],\n ] as CommandOptions;\n loader = true;\n\n constructor(private importer: ImporterMain) {}\n\n async report(\n [ids = []]: [string[]],\n {\n lanes = false,\n components = false,\n json = false,\n fromOriginalScope = false,\n }: {\n lanes?: boolean;\n components?: boolean;\n json?: boolean;\n fromOriginalScope?: boolean;\n }\n ) {\n const { dependencies, importDetails } = await this.importer.fetch(ids, lanes, components, fromOriginalScope);\n if (json) {\n return JSON.stringify({ importDetails }, null, 4);\n }\n if (dependencies && !R.isEmpty(dependencies)) {\n const componentsObj = dependencies.map(R.prop('component'));\n const title =\n componentsObj.length === 1\n ? 'successfully fetched one component'\n : `successfully fetched ${componentsObj.length} components`;\n const componentDependencies = componentsObj.map((component) => {\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n const details = importDetails.find((c) => c.id === component.id.toStringWithoutVersion());\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n if (!details) throw new Error(`missing details of component ${component.id.toString()}`);\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\n return formatPlainComponentItemWithVersions(component, details);\n });\n const componentDependenciesOutput = [chalk.green(title)].concat(componentDependencies).join('\\n');\n\n return componentDependenciesOutput;\n }\n return chalk.yellow('nothing to import');\n }\n}\n\nfunction formatPlainComponentItemWithVersions(component: Component, importDetails: ImportDetails) {\n const status: ImportStatus = importDetails.status;\n const id = component.id.toStringWithoutVersion();\n const versions = importDetails.versions.length ? `new versions: ${importDetails.versions.join(', ')}` : '';\n // $FlowFixMe component.version should be set here\n const usedVersion = status === 'added' ? `, currently used version ${component.version}` : '';\n const getConflictMessage = () => {\n if (!importDetails.filesStatus) return '';\n const conflictedFiles = Object.keys(importDetails.filesStatus) // $FlowFixMe file is set\n // @ts-ignore AUTO-ADDED-AFTER-MIGRATION-PLEASE-FIX!\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 deprecated = importDetails.deprecated ? chalk.yellow('deprecated') : '';\n const missingDeps = importDetails.missingDeps.length\n ? chalk.red(`missing dependencies: ${importDetails.missingDeps.map((d) => d.toString()).join(', ')}`)\n : '';\n return `- ${chalk.green(status)} ${chalk.cyan(\n id\n )} ${versions}${usedVersion} ${getConflictMessage()}${deprecated} ${missingDeps}`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAIO,MAAMA,QAAN,CAAkC;EAsBvCC,WAAW,CAASC,QAAT,EAAiC;IAAA,KAAxBA,QAAwB,GAAxBA,QAAwB;IAAA,8CArBrC,gBAqBqC;IAAA,qDApB7B,wCAoB6B;IAAA,6DAnBrB,oGAmBqB;IAAA,+CAlBpC,EAkBoC;IAAA,iDAjBlC,IAiBkC;IAAA,iDAhBlC,CACR,CACE,GAD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,eAAe,CACrE1B,GADsD,CACjD8B,IAAD,IAAUf,gBAAA,CAAMkB,IAAN,CAAWH,IAAX,CADwC,EAEtDZ,IAFsD,CAEjD,IAFiD,CAE3C,IAFd;EAGD,CATD;;EAUA,MAAMgB,UAAU,GAAGzC,aAAa,CAACyC,UAAd,GAA2BnB,gBAAA,CAAMI,MAAN,CAAa,YAAb,CAA3B,GAAwD,EAA3E;EACA,MAAMgB,WAAW,GAAG1C,aAAa,CAAC0C,WAAd,CAA0BhC,MAA1B,GAChBY,gBAAA,CAAMqB,GAAN,CAAW,yBAAwB3C,aAAa,CAAC0C,WAAd,CAA0BnC,GAA1B,CAA+BqC,CAAD,IAAOA,CAAC,CAACzB,QAAF,EAArC,EAAmDM,IAAnD,CAAwD,IAAxD,CAA8D,EAAjG,CADgB,GAEhB,EAFJ;EAGA,OAAQ,KAAIH,gBAAA,CAAMC,KAAN,CAAYI,MAAZ,CAAoB,IAAGL,gBAAA,CAAMuB,IAAN,CACjC7B,EADiC,CAEjC,IAAGY,QAAS,GAAEC,WAAY,IAAGE,kBAAkB,EAAG,GAAEU,UAAW,IAAGC,WAAY,EAFhF;AAGD"}
@@ -0,0 +1,136 @@
1
+ import { LaneId } from '@teambit/lane-id';
2
+ import { BitId, BitIds } from '@teambit/legacy/dist/bit-id';
3
+ import { Consumer } from '@teambit/legacy/dist/consumer';
4
+ import { ComponentWithDependencies, Scope } from '@teambit/legacy/dist/scope';
5
+ import DependencyGraph from '@teambit/legacy/dist/scope/graph/scope-graph';
6
+ import { Lane } from '@teambit/legacy/dist/scope/models';
7
+ import Component from '@teambit/legacy/dist/consumer/component';
8
+ import { FilesStatus, MergeStrategy } from '@teambit/legacy/dist/consumer/versions-ops/merge-version/merge-version';
9
+ import { MergeResultsThreeWay } from '@teambit/legacy/dist/consumer/versions-ops/merge-version/three-way-merge';
10
+ export declare type ImportOptions = {
11
+ ids: string[];
12
+ verbose: boolean;
13
+ merge?: boolean;
14
+ mergeStrategy?: MergeStrategy;
15
+ withEnvironments?: boolean;
16
+ writeToPath?: string;
17
+ writePackageJson?: boolean;
18
+ writeConfig: boolean;
19
+ writeDists?: boolean;
20
+ override: boolean;
21
+ installNpmPackages: boolean;
22
+ objectsOnly: boolean;
23
+ saveDependenciesAsComponents?: boolean;
24
+ importDependenciesDirectly?: boolean;
25
+ importDependents?: boolean;
26
+ fromOriginalScope?: boolean;
27
+ saveInLane?: boolean;
28
+ lanes?: {
29
+ laneIds: LaneId[];
30
+ lanes: Lane[];
31
+ };
32
+ allHistory?: boolean;
33
+ };
34
+ declare type ComponentMergeStatus = {
35
+ componentWithDependencies: ComponentWithDependencies;
36
+ mergeResults: MergeResultsThreeWay | null | undefined;
37
+ };
38
+ declare type ImportedVersions = {
39
+ [id: string]: string[];
40
+ };
41
+ export declare type ImportStatus = 'added' | 'updated' | 'up to date';
42
+ export declare type ImportDetails = {
43
+ id: string;
44
+ versions: string[];
45
+ latestVersion: string | null;
46
+ status: ImportStatus;
47
+ filesStatus: FilesStatus | null | undefined;
48
+ missingDeps: BitId[];
49
+ deprecated: boolean;
50
+ removed?: boolean;
51
+ };
52
+ export declare type ImportResult = {
53
+ dependencies: ComponentWithDependencies[];
54
+ envComponents?: Component[];
55
+ importDetails: ImportDetails[];
56
+ cancellationMessage?: string;
57
+ };
58
+ export default class ImportComponents {
59
+ consumer: Consumer;
60
+ scope: Scope;
61
+ options: ImportOptions;
62
+ mergeStatus: {
63
+ [id: string]: FilesStatus;
64
+ };
65
+ private laneObjects;
66
+ private divergeData;
67
+ constructor(consumer: Consumer, options: ImportOptions);
68
+ importComponents(): Promise<ImportResult>;
69
+ importObjectsOnLane(): Promise<ImportResult>;
70
+ importSpecificComponents(): Promise<ImportResult>;
71
+ _fetchDivergeData(componentsWithDependencies: ComponentWithDependencies[]): Promise<void>;
72
+ _throwForDivergedHistory(): void;
73
+ /**
74
+ * it can happen for example when importing a component with `--dependent` flag and the component has
75
+ * the same dependent with different versions. we only want the one with the higher version
76
+ */
77
+ _filterComponentsWithLowerVersions(componentsWithDependencies: ComponentWithDependencies[]): ComponentWithDependencies[];
78
+ /**
79
+ * consider the following use cases:
80
+ * 1) no ids were provided. it should import all the lanes components objects AND main components objects
81
+ * (otherwise, if main components are not imported and are missing, then bit-status complains about it)
82
+ * 2) ids are provided with wildcards. we assume the user wants only the ids that are available on the lane.
83
+ * because a user may entered "bit import scope/*" and this scope has many component on the lane and many not on the lane.
84
+ * we want to bring only the components on the lane.
85
+ * 3) ids are provided without wildcards. here, the user knows exactly what's needed and it's ok to get the ids from
86
+ * main if not found on the lane.
87
+ */
88
+ private getBitIdsForLanes;
89
+ private getBitIdsForNonLanes;
90
+ private getBitIds;
91
+ _getDependenciesFromGraph(bitIds: BitId[], graphs: DependencyGraph[]): BitId[];
92
+ _getDependentsFromGraph(bitIds: BitId[], graphs: DependencyGraph[]): BitId[];
93
+ _getComponentsGraphs(bitIds: BitId[]): Promise<DependencyGraph[]>;
94
+ importAccordingToBitMap(): Promise<ImportResult>;
95
+ private getIdsToImportFromBitmap;
96
+ /**
97
+ * author might require bit-components that were installed via a package-manager. in that case,
98
+ * the objects are not imported until bit build or bit tag was running. this makes sure to get
99
+ * the objects on 'bit import', so then in the UI, they'll be shown nicely.
100
+ */
101
+ getIdsOfDepsInstalledAsPackages(): Promise<BitId[]>;
102
+ _getCurrentVersions(ids: BitIds): Promise<ImportedVersions>;
103
+ /**
104
+ * get import details, includes the diff between the versions array before import and after import
105
+ */
106
+ _getImportDetails(currentVersions: ImportedVersions, components: ComponentWithDependencies[]): Promise<ImportDetails[]>;
107
+ _throwForPotentialIssues(ids: BitIds): Promise<void>;
108
+ _throwForModifiedOrNewComponents(ids: BitIds): Promise<void>;
109
+ /**
110
+ * Model Component id() calculation uses id.toString() for the hash.
111
+ * If an imported component has scopereadonly name equals to a local name, both will have the exact same
112
+ * hash and they'll override each other.
113
+ */
114
+ _throwForDifferentComponentWithSameName(ids: BitIds): void;
115
+ _getMergeStatus(componentWithDependencies: ComponentWithDependencies): Promise<ComponentMergeStatus>;
116
+ /**
117
+ * 1) when there are conflicts and the strategy is "ours", don't write the imported component to
118
+ * the filesystem, only update bitmap.
119
+ *
120
+ * 2) when there are conflicts and the strategy is "theirs", override the local changes by the
121
+ * imported component. (similar to --override)
122
+ *
123
+ * 3) when there is no conflict or there are conflicts and the strategy is manual, write the files
124
+ * according to the merge result. (done by applyModifiedVersion())
125
+ */
126
+ _updateComponentFilesPerMergeStrategy(componentMergeStatus: ComponentMergeStatus): FilesStatus | null | undefined;
127
+ /**
128
+ * update the component files if they are modified and there is a merge strategy.
129
+ * returns only the components that need to be written to the filesystem
130
+ */
131
+ updateAllComponentsAccordingToMergeStrategy(componentsWithDependencies: ComponentWithDependencies[]): Promise<ComponentWithDependencies[]>;
132
+ _shouldSaveLaneData(): boolean;
133
+ _saveLaneDataIfNeeded(componentsWithDependencies: ComponentWithDependencies[]): Promise<void>;
134
+ _writeToFileSystem(componentsWithDependencies: ComponentWithDependencies[]): Promise<void>;
135
+ }
136
+ export {};