@teambit/dependencies 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dependencies-cmd.d.ts +38 -0
- package/dist/dependencies-cmd.js +186 -0
- package/dist/dependencies-cmd.js.map +1 -0
- package/dist/dependencies.aspect.d.ts +2 -0
- package/dist/dependencies.aspect.js +24 -0
- package/dist/dependencies.aspect.js.map +1 -0
- package/dist/dependencies.main.runtime.d.ts +8 -0
- package/dist/dependencies.main.runtime.js +74 -0
- package/dist/dependencies.main.runtime.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/package-tar/teambit-dependencies-0.0.1.tgz +0 -0
- package/package.json +53 -0
- package/preview-1659670139925.js +5 -0
- package/tsconfig.json +40 -0
- package/types/asset.d.ts +29 -0
- package/types/style.d.ts +42 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Command, CommandOptions } from '@teambit/cli';
|
|
2
|
+
declare type DependenciesFlags = {
|
|
3
|
+
tree: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare class DependenciesGet implements Command {
|
|
6
|
+
name: string;
|
|
7
|
+
arguments: {
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
}[];
|
|
11
|
+
group: string;
|
|
12
|
+
description: string;
|
|
13
|
+
alias: string;
|
|
14
|
+
options: CommandOptions;
|
|
15
|
+
report([id]: [string], { tree }: DependenciesFlags): Promise<string>;
|
|
16
|
+
}
|
|
17
|
+
export declare class DependenciesDebug implements Command {
|
|
18
|
+
name: string;
|
|
19
|
+
arguments: {
|
|
20
|
+
name: string;
|
|
21
|
+
description: string;
|
|
22
|
+
}[];
|
|
23
|
+
group: string;
|
|
24
|
+
description: string;
|
|
25
|
+
alias: string;
|
|
26
|
+
options: CommandOptions;
|
|
27
|
+
report([id]: [string]): Promise<string>;
|
|
28
|
+
}
|
|
29
|
+
export declare class DependenciesCmd implements Command {
|
|
30
|
+
name: string;
|
|
31
|
+
alias: string;
|
|
32
|
+
description: string;
|
|
33
|
+
options: never[];
|
|
34
|
+
group: string;
|
|
35
|
+
commands: Command[];
|
|
36
|
+
report([unrecognizedSubcommand]: [string]): Promise<string>;
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,186 @@
|
|
|
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.DependenciesGet = exports.DependenciesDebug = exports.DependenciesCmd = 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 _archy() {
|
|
35
|
+
const data = _interopRequireDefault(require("archy"));
|
|
36
|
+
|
|
37
|
+
_archy = function () {
|
|
38
|
+
return data;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return data;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function _dependencies() {
|
|
45
|
+
const data = require("@teambit/legacy/dist/api/consumer/lib/dependencies");
|
|
46
|
+
|
|
47
|
+
_dependencies = function () {
|
|
48
|
+
return data;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
return data;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function _componentTemplate() {
|
|
55
|
+
const data = require("@teambit/legacy/dist/cli/templates/component-template");
|
|
56
|
+
|
|
57
|
+
_componentTemplate = function () {
|
|
58
|
+
return data;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
return data;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function _idNotFoundInGraph() {
|
|
65
|
+
const data = require("@teambit/legacy/dist/scope/exceptions/id-not-found-in-graph");
|
|
66
|
+
|
|
67
|
+
_idNotFoundInGraph = function () {
|
|
68
|
+
return data;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
return data;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// eslint-disable-next-line max-classes-per-file
|
|
75
|
+
class DependenciesGet {
|
|
76
|
+
constructor() {
|
|
77
|
+
(0, _defineProperty2().default)(this, "name", 'get <component-name>');
|
|
78
|
+
(0, _defineProperty2().default)(this, "arguments", [{
|
|
79
|
+
name: 'component-name',
|
|
80
|
+
description: 'component name or component id'
|
|
81
|
+
}]);
|
|
82
|
+
(0, _defineProperty2().default)(this, "group", 'info');
|
|
83
|
+
(0, _defineProperty2().default)(this, "description", 'show direct and indirect dependencies of the given component');
|
|
84
|
+
(0, _defineProperty2().default)(this, "alias", '');
|
|
85
|
+
(0, _defineProperty2().default)(this, "options", [['t', 'tree', 'EXPERIMENTAL. render dependencies as a tree, similar to "npm ls"']]);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
async report([id], {
|
|
89
|
+
tree = false
|
|
90
|
+
}) {
|
|
91
|
+
const results = await (0, _dependencies().dependencies)(id, false);
|
|
92
|
+
|
|
93
|
+
if (tree) {
|
|
94
|
+
const idWithVersion = results.workspaceGraph._getIdWithLatestVersion(results.id);
|
|
95
|
+
|
|
96
|
+
const getGraphAsTree = graph => {
|
|
97
|
+
try {
|
|
98
|
+
const graphAsTree = graph.getDependenciesAsObjectTree(idWithVersion.toString());
|
|
99
|
+
return (0, _archy().default)(graphAsTree);
|
|
100
|
+
} catch (err) {
|
|
101
|
+
if (err.constructor.name === 'RangeError') {
|
|
102
|
+
return `${_chalk().default.red('unable to generate a tree representation, the graph is too big or has cycles')}`;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
throw err;
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
const workspaceTree = getGraphAsTree(results.workspaceGraph);
|
|
110
|
+
const scopeTree = getGraphAsTree(results.scopeGraph);
|
|
111
|
+
return `${_chalk().default.green('workspace')}:\n${workspaceTree}\n\n${_chalk().default.green('scope')}:\n${scopeTree}`;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const workspaceGraph = results.workspaceGraph.getDependenciesInfo(results.id);
|
|
115
|
+
|
|
116
|
+
const getScopeDependencies = () => {
|
|
117
|
+
try {
|
|
118
|
+
return results.scopeGraph.getDependenciesInfo(results.id);
|
|
119
|
+
} catch (err) {
|
|
120
|
+
if (err instanceof _idNotFoundInGraph().IdNotFoundInGraph) return []; // component might be new
|
|
121
|
+
|
|
122
|
+
throw err;
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
const scopeGraph = getScopeDependencies();
|
|
127
|
+
|
|
128
|
+
if (!scopeGraph.length && !workspaceGraph.length) {
|
|
129
|
+
return `no dependencies found for ${results.id.toString()}.
|
|
130
|
+
try running "bit cat-component ${results.id.toStringWithoutVersion()}" to see whether the component/version exists locally`;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const scopeTable = (0, _componentTemplate().generateDependenciesInfoTable)(scopeGraph, results.id);
|
|
134
|
+
const workspaceTable = (0, _componentTemplate().generateDependenciesInfoTable)(workspaceGraph, results.id);
|
|
135
|
+
return `${_chalk().default.bold('Dependencies originated from workspace')}
|
|
136
|
+
${workspaceTable || '<none>'}
|
|
137
|
+
|
|
138
|
+
${_chalk().default.bold('Dependencies originated from scope')}
|
|
139
|
+
${scopeTable || '<none>'}`;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
exports.DependenciesGet = DependenciesGet;
|
|
145
|
+
|
|
146
|
+
class DependenciesDebug {
|
|
147
|
+
constructor() {
|
|
148
|
+
(0, _defineProperty2().default)(this, "name", 'debug <component-name>');
|
|
149
|
+
(0, _defineProperty2().default)(this, "arguments", [{
|
|
150
|
+
name: 'component-name',
|
|
151
|
+
description: 'component name or component id'
|
|
152
|
+
}]);
|
|
153
|
+
(0, _defineProperty2().default)(this, "group", 'info');
|
|
154
|
+
(0, _defineProperty2().default)(this, "description", 'show the immediate dependencies and how their versions were determined');
|
|
155
|
+
(0, _defineProperty2().default)(this, "alias", '');
|
|
156
|
+
(0, _defineProperty2().default)(this, "options", []);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
async report([id]) {
|
|
160
|
+
const results = await (0, _dependencies().dependencies)(id, true);
|
|
161
|
+
return JSON.stringify(results, undefined, 4);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
exports.DependenciesDebug = DependenciesDebug;
|
|
167
|
+
|
|
168
|
+
class DependenciesCmd {
|
|
169
|
+
constructor() {
|
|
170
|
+
(0, _defineProperty2().default)(this, "name", 'dependencies <sub-command>');
|
|
171
|
+
(0, _defineProperty2().default)(this, "alias", 'deps');
|
|
172
|
+
(0, _defineProperty2().default)(this, "description", 'manage dependencies');
|
|
173
|
+
(0, _defineProperty2().default)(this, "options", []);
|
|
174
|
+
(0, _defineProperty2().default)(this, "group", 'info');
|
|
175
|
+
(0, _defineProperty2().default)(this, "commands", []);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
async report([unrecognizedSubcommand]) {
|
|
179
|
+
return _chalk().default.red(`"${unrecognizedSubcommand}" is not a subcommand of "dependencies", please run "bit dependencies --help" to list the subcommands`);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
exports.DependenciesCmd = DependenciesCmd;
|
|
185
|
+
|
|
186
|
+
//# sourceMappingURL=dependencies-cmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DependenciesGet","name","description","report","id","tree","results","dependencies","idWithVersion","workspaceGraph","_getIdWithLatestVersion","getGraphAsTree","graph","graphAsTree","getDependenciesAsObjectTree","toString","archy","err","constructor","chalk","red","workspaceTree","scopeTree","scopeGraph","green","getDependenciesInfo","getScopeDependencies","IdNotFoundInGraph","length","toStringWithoutVersion","scopeTable","generateDependenciesInfoTable","workspaceTable","bold","DependenciesDebug","JSON","stringify","undefined","DependenciesCmd","unrecognizedSubcommand"],"sources":["dependencies-cmd.ts"],"sourcesContent":["// eslint-disable-next-line max-classes-per-file\nimport { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport archy from 'archy';\nimport {\n dependencies,\n DependenciesResultsDebug,\n DependenciesResults,\n} from '@teambit/legacy/dist/api/consumer/lib/dependencies';\nimport { generateDependenciesInfoTable } from '@teambit/legacy/dist/cli/templates/component-template';\nimport { IdNotFoundInGraph } from '@teambit/legacy/dist/scope/exceptions/id-not-found-in-graph';\nimport DependencyGraph from '@teambit/legacy/dist/scope/graph/scope-graph';\n\ntype DependenciesFlags = {\n tree: boolean;\n};\n\nexport class DependenciesGet implements Command {\n name = 'get <component-name>';\n arguments = [{ name: 'component-name', description: 'component name or component id' }];\n group = 'info';\n description = 'show direct and indirect dependencies of the given component';\n alias = '';\n options = [['t', 'tree', 'EXPERIMENTAL. render dependencies as a tree, similar to \"npm ls\"']] as CommandOptions;\n\n async report([id]: [string], { tree = false }: DependenciesFlags) {\n const results = (await dependencies(id, false)) as DependenciesResults;\n\n if (tree) {\n const idWithVersion = results.workspaceGraph._getIdWithLatestVersion(results.id);\n const getGraphAsTree = (graph: DependencyGraph) => {\n try {\n const graphAsTree = graph.getDependenciesAsObjectTree(idWithVersion.toString());\n return archy(graphAsTree);\n } catch (err: any) {\n if (err.constructor.name === 'RangeError') {\n return `${chalk.red('unable to generate a tree representation, the graph is too big or has cycles')}`;\n }\n throw err;\n }\n };\n const workspaceTree = getGraphAsTree(results.workspaceGraph);\n const scopeTree = getGraphAsTree(results.scopeGraph);\n return `${chalk.green('workspace')}:\\n${workspaceTree}\\n\\n${chalk.green('scope')}:\\n${scopeTree}`;\n }\n const workspaceGraph = results.workspaceGraph.getDependenciesInfo(results.id);\n const getScopeDependencies = () => {\n try {\n return results.scopeGraph.getDependenciesInfo(results.id);\n } catch (err) {\n if (err instanceof IdNotFoundInGraph) return []; // component might be new\n throw err;\n }\n };\n const scopeGraph = getScopeDependencies();\n if (!scopeGraph.length && !workspaceGraph.length) {\n return `no dependencies found for ${results.id.toString()}.\ntry running \"bit cat-component ${results.id.toStringWithoutVersion()}\" to see whether the component/version exists locally`;\n }\n\n const scopeTable = generateDependenciesInfoTable(scopeGraph, results.id);\n const workspaceTable = generateDependenciesInfoTable(workspaceGraph, results.id);\n return `${chalk.bold('Dependencies originated from workspace')}\n${workspaceTable || '<none>'}\n\n${chalk.bold('Dependencies originated from scope')}\n${scopeTable || '<none>'}`;\n }\n}\n\nexport class DependenciesDebug implements Command {\n name = 'debug <component-name>';\n arguments = [{ name: 'component-name', description: 'component name or component id' }];\n group = 'info';\n description = 'show the immediate dependencies and how their versions were determined';\n alias = '';\n options = [] as CommandOptions;\n\n async report([id]: [string]) {\n const results = (await dependencies(id, true)) as DependenciesResultsDebug;\n return JSON.stringify(results, undefined, 4);\n }\n}\n\nexport class DependenciesCmd implements Command {\n name = 'dependencies <sub-command>';\n alias = 'deps';\n description = 'manage dependencies';\n options = [];\n group = 'info';\n commands: Command[] = [];\n\n async report([unrecognizedSubcommand]: [string]) {\n return chalk.red(\n `\"${unrecognizedSubcommand}\" is not a subcommand of \"dependencies\", please run \"bit dependencies --help\" to list the subcommands`\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;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,UAAU,IAAI,QAAS,EAJrB;EAKD;;AAlD6C;;;;AAqDzC,MAAMI,iBAAN,CAA2C;EAAA;IAAA,8CACzC,wBADyC;IAAA,mDAEpC,CAAC;MAAEjC,IAAI,EAAE,gBAAR;MAA0BC,WAAW,EAAE;IAAvC,CAAD,CAFoC;IAAA,+CAGxC,MAHwC;IAAA,qDAIlC,wEAJkC;IAAA,+CAKxC,EALwC;IAAA,iDAMtC,EANsC;EAAA;;EAQpC,MAANC,MAAM,CAAC,CAACC,EAAD,CAAD,EAAiB;IAC3B,MAAME,OAAO,GAAI,MAAM,IAAAC,4BAAA,EAAaH,EAAb,EAAiB,IAAjB,CAAvB;IACA,OAAO+B,IAAI,CAACC,SAAL,CAAe9B,OAAf,EAAwB+B,SAAxB,EAAmC,CAAnC,CAAP;EACD;;AAX+C;;;;AAc3C,MAAMC,eAAN,CAAyC;EAAA;IAAA,8CACvC,4BADuC;IAAA,+CAEtC,MAFsC;IAAA,qDAGhC,qBAHgC;IAAA,iDAIpC,EAJoC;IAAA,+CAKtC,MALsC;IAAA,kDAMxB,EANwB;EAAA;;EAQlC,MAANnC,MAAM,CAAC,CAACoC,sBAAD,CAAD,EAAqC;IAC/C,OAAOpB,gBAAA,CAAMC,GAAN,CACJ,IAAGmB,sBAAuB,uGADtB,CAAP;EAGD;;AAZ6C"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.DependenciesAspect = void 0;
|
|
7
|
+
|
|
8
|
+
function _harmony() {
|
|
9
|
+
const data = require("@teambit/harmony");
|
|
10
|
+
|
|
11
|
+
_harmony = function () {
|
|
12
|
+
return data;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const DependenciesAspect = _harmony().Aspect.create({
|
|
19
|
+
id: 'teambit.dependencies/dependencies'
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
exports.DependenciesAspect = DependenciesAspect;
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=dependencies.aspect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DependenciesAspect","Aspect","create","id"],"sources":["dependencies.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const DependenciesAspect = Aspect.create({\n id: 'teambit.dependencies/dependencies',\n});\n"],"mappings":";;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEO,MAAMA,kBAAkB,GAAGC,iBAAA,CAAOC,MAAP,CAAc;EAC9CC,EAAE,EAAE;AAD0C,CAAd,CAA3B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CLIMain } from '@teambit/cli';
|
|
2
|
+
export declare class DependenciesMain {
|
|
3
|
+
static slots: never[];
|
|
4
|
+
static dependencies: import("@teambit/harmony").Aspect[];
|
|
5
|
+
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
6
|
+
static provider([cli]: [CLIMain]): Promise<DependenciesMain>;
|
|
7
|
+
}
|
|
8
|
+
export default DependenciesMain;
|
|
@@ -0,0 +1,74 @@
|
|
|
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.default = exports.DependenciesMain = 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 _cli() {
|
|
25
|
+
const data = require("@teambit/cli");
|
|
26
|
+
|
|
27
|
+
_cli = function () {
|
|
28
|
+
return data;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
return data;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function _dependenciesCmd() {
|
|
35
|
+
const data = require("./dependencies-cmd");
|
|
36
|
+
|
|
37
|
+
_dependenciesCmd = function () {
|
|
38
|
+
return data;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return data;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function _dependencies() {
|
|
45
|
+
const data = require("./dependencies.aspect");
|
|
46
|
+
|
|
47
|
+
_dependencies = function () {
|
|
48
|
+
return data;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
return data;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
class DependenciesMain {
|
|
55
|
+
static async provider([cli]) {
|
|
56
|
+
const depsCmd = new (_dependenciesCmd().DependenciesCmd)();
|
|
57
|
+
depsCmd.commands = [new (_dependenciesCmd().DependenciesGet)(), new (_dependenciesCmd().DependenciesDebug)()];
|
|
58
|
+
cli.register(depsCmd);
|
|
59
|
+
return new DependenciesMain();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
exports.DependenciesMain = DependenciesMain;
|
|
65
|
+
(0, _defineProperty2().default)(DependenciesMain, "slots", []);
|
|
66
|
+
(0, _defineProperty2().default)(DependenciesMain, "dependencies", [_cli().CLIAspect]);
|
|
67
|
+
(0, _defineProperty2().default)(DependenciesMain, "runtime", _cli().MainRuntime);
|
|
68
|
+
|
|
69
|
+
_dependencies().DependenciesAspect.addRuntime(DependenciesMain);
|
|
70
|
+
|
|
71
|
+
var _default = DependenciesMain;
|
|
72
|
+
exports.default = _default;
|
|
73
|
+
|
|
74
|
+
//# sourceMappingURL=dependencies.main.runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DependenciesMain","provider","cli","depsCmd","DependenciesCmd","commands","DependenciesGet","DependenciesDebug","register","CLIAspect","MainRuntime","DependenciesAspect","addRuntime"],"sources":["dependencies.main.runtime.ts"],"sourcesContent":["import { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { DependenciesCmd, DependenciesDebug, DependenciesGet } from './dependencies-cmd';\nimport { DependenciesAspect } from './dependencies.aspect';\n\nexport class DependenciesMain {\n static slots = [];\n static dependencies = [CLIAspect];\n\n static runtime = MainRuntime;\n\n static async provider([cli]: [CLIMain]) {\n const depsCmd = new DependenciesCmd();\n depsCmd.commands = [new DependenciesGet(), new DependenciesDebug()];\n cli.register(depsCmd);\n return new DependenciesMain();\n }\n}\n\nDependenciesAspect.addRuntime(DependenciesMain);\n\nexport default DependenciesMain;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEO,MAAMA,gBAAN,CAAuB;EAMP,aAARC,QAAQ,CAAC,CAACC,GAAD,CAAD,EAAmB;IACtC,MAAMC,OAAO,GAAG,KAAIC,kCAAJ,GAAhB;IACAD,OAAO,CAACE,QAAR,GAAmB,CAAC,KAAIC,kCAAJ,GAAD,EAAwB,KAAIC,oCAAJ,GAAxB,CAAnB;IACAL,GAAG,CAACM,QAAJ,CAAaL,OAAb;IACA,OAAO,IAAIH,gBAAJ,EAAP;EACD;;AAX2B;;;gCAAjBA,gB,WACI,E;gCADJA,gB,kBAEW,CAACS,gBAAD,C;gCAFXT,gB,aAIMU,kB;;AAUnBC,kCAAA,CAAmBC,UAAnB,CAA8BZ,gBAA9B;;eAEeA,gB"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "DependenciesAspect", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _dependencies().DependenciesAspect;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
exports.default = void 0;
|
|
13
|
+
|
|
14
|
+
function _dependencies() {
|
|
15
|
+
const data = require("./dependencies.aspect");
|
|
16
|
+
|
|
17
|
+
_dependencies = function () {
|
|
18
|
+
return data;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return data;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
var _default = _dependencies().DependenciesAspect;
|
|
25
|
+
|
|
26
|
+
exports.default = _default;
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DependenciesAspect"],"sources":["index.ts"],"sourcesContent":["import { DependenciesAspect } from './dependencies.aspect';\n\nexport type { DependenciesMain } from './dependencies.main.runtime';\nexport default DependenciesAspect;\nexport { DependenciesAspect };\n"],"mappings":";;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;eAGeA,kC"}
|
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@teambit/dependencies",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"componentId": {
|
|
6
|
+
"scope": "teambit.dependencies",
|
|
7
|
+
"name": "dependencies",
|
|
8
|
+
"version": "0.0.1"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"archy": "1.0.0",
|
|
12
|
+
"chalk": "2.4.2",
|
|
13
|
+
"@babel/runtime": "7.12.18",
|
|
14
|
+
"core-js": "^3.0.0",
|
|
15
|
+
"@teambit/harmony": "0.3.3",
|
|
16
|
+
"@teambit/cli": "0.0.539"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@types/mocha": "9.1.0",
|
|
20
|
+
"@types/testing-library__jest-dom": "5.9.5",
|
|
21
|
+
"@types/jest": "^26.0.0",
|
|
22
|
+
"@types/react-dom": "^17.0.5",
|
|
23
|
+
"@types/react": "^17.0.8",
|
|
24
|
+
"@types/node": "12.20.4"
|
|
25
|
+
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"@teambit/legacy": "1.0.322",
|
|
28
|
+
"react-dom": "^16.8.0 || ^17.0.0",
|
|
29
|
+
"react": "^16.8.0 || ^17.0.0"
|
|
30
|
+
},
|
|
31
|
+
"license": "Apache-2.0",
|
|
32
|
+
"private": false,
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=12.22.0"
|
|
35
|
+
},
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "https://github.com/teambit/bit"
|
|
39
|
+
},
|
|
40
|
+
"keywords": [
|
|
41
|
+
"bit",
|
|
42
|
+
"bit-aspect",
|
|
43
|
+
"components",
|
|
44
|
+
"collaboration",
|
|
45
|
+
"web",
|
|
46
|
+
"react",
|
|
47
|
+
"react-components",
|
|
48
|
+
"angular",
|
|
49
|
+
"angular-components",
|
|
50
|
+
"vue",
|
|
51
|
+
"vue-components"
|
|
52
|
+
]
|
|
53
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"lib": [
|
|
4
|
+
"es2019",
|
|
5
|
+
"DOM",
|
|
6
|
+
"ES6",
|
|
7
|
+
"DOM.Iterable",
|
|
8
|
+
"ScriptHost"
|
|
9
|
+
],
|
|
10
|
+
"target": "es2015",
|
|
11
|
+
"module": "commonjs",
|
|
12
|
+
"jsx": "react",
|
|
13
|
+
"allowJs": true,
|
|
14
|
+
"composite": true,
|
|
15
|
+
"declaration": true,
|
|
16
|
+
"sourceMap": true,
|
|
17
|
+
"skipLibCheck": true,
|
|
18
|
+
"experimentalDecorators": true,
|
|
19
|
+
"outDir": "dist",
|
|
20
|
+
"moduleResolution": "node",
|
|
21
|
+
"esModuleInterop": true,
|
|
22
|
+
"rootDir": ".",
|
|
23
|
+
"resolveJsonModule": true,
|
|
24
|
+
"emitDeclarationOnly": true,
|
|
25
|
+
"emitDecoratorMetadata": true,
|
|
26
|
+
"allowSyntheticDefaultImports": true,
|
|
27
|
+
"strictPropertyInitialization": false,
|
|
28
|
+
"strict": true,
|
|
29
|
+
"noImplicitAny": false,
|
|
30
|
+
"preserveConstEnums": true
|
|
31
|
+
},
|
|
32
|
+
"exclude": [
|
|
33
|
+
"dist",
|
|
34
|
+
"package.json"
|
|
35
|
+
],
|
|
36
|
+
"include": [
|
|
37
|
+
"**/*",
|
|
38
|
+
"**/*.json"
|
|
39
|
+
]
|
|
40
|
+
}
|
package/types/asset.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare module '*.png' {
|
|
2
|
+
const value: any;
|
|
3
|
+
export = value;
|
|
4
|
+
}
|
|
5
|
+
declare module '*.svg' {
|
|
6
|
+
import type { FunctionComponent, SVGProps } from 'react';
|
|
7
|
+
|
|
8
|
+
export const ReactComponent: FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>;
|
|
9
|
+
const src: string;
|
|
10
|
+
export default src;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// @TODO Gilad
|
|
14
|
+
declare module '*.jpg' {
|
|
15
|
+
const value: any;
|
|
16
|
+
export = value;
|
|
17
|
+
}
|
|
18
|
+
declare module '*.jpeg' {
|
|
19
|
+
const value: any;
|
|
20
|
+
export = value;
|
|
21
|
+
}
|
|
22
|
+
declare module '*.gif' {
|
|
23
|
+
const value: any;
|
|
24
|
+
export = value;
|
|
25
|
+
}
|
|
26
|
+
declare module '*.bmp' {
|
|
27
|
+
const value: any;
|
|
28
|
+
export = value;
|
|
29
|
+
}
|
package/types/style.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
declare module '*.module.css' {
|
|
2
|
+
const classes: { readonly [key: string]: string };
|
|
3
|
+
export default classes;
|
|
4
|
+
}
|
|
5
|
+
declare module '*.module.scss' {
|
|
6
|
+
const classes: { readonly [key: string]: string };
|
|
7
|
+
export default classes;
|
|
8
|
+
}
|
|
9
|
+
declare module '*.module.sass' {
|
|
10
|
+
const classes: { readonly [key: string]: string };
|
|
11
|
+
export default classes;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare module '*.module.less' {
|
|
15
|
+
const classes: { readonly [key: string]: string };
|
|
16
|
+
export default classes;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare module '*.less' {
|
|
20
|
+
const classes: { readonly [key: string]: string };
|
|
21
|
+
export default classes;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare module '*.css' {
|
|
25
|
+
const classes: { readonly [key: string]: string };
|
|
26
|
+
export default classes;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare module '*.sass' {
|
|
30
|
+
const classes: { readonly [key: string]: string };
|
|
31
|
+
export default classes;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare module '*.scss' {
|
|
35
|
+
const classes: { readonly [key: string]: string };
|
|
36
|
+
export default classes;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
declare module '*.mdx' {
|
|
40
|
+
const component: any;
|
|
41
|
+
export default component;
|
|
42
|
+
}
|