@teambit/component.testing.mock-components 0.0.285 → 0.0.287
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/index.js +24 -5
- package/dist/index.js.map +1 -1
- package/dist/mock-components.d.ts +3 -3
- package/dist/mock-components.js +115 -57
- package/dist/mock-components.js.map +1 -1
- package/package.json +5 -5
- package/types/asset.d.ts +15 -3
- package/dist/preview-1738120666692.js +0 -7
package/dist/index.js
CHANGED
|
@@ -1,7 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Object.defineProperty(exports, "
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "mockComponents", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _mockComponents().mockComponents;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "modifyMockedComponents", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _mockComponents().modifyMockedComponents;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
function _mockComponents() {
|
|
19
|
+
const data = require("./mock-components");
|
|
20
|
+
_mockComponents = function () {
|
|
21
|
+
return data;
|
|
22
|
+
};
|
|
23
|
+
return data;
|
|
24
|
+
}
|
|
25
|
+
|
|
7
26
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_mockComponents","data","require"],"sources":["index.ts"],"sourcesContent":["export { mockComponents, modifyMockedComponents } from './mock-components';\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAAA,gBAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,eAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA","ignoreList":[]}
|
|
@@ -11,13 +11,13 @@ type CompDirs = {
|
|
|
11
11
|
* if `numOfComponents` is more than one, the components will depend on each other. by default, it's one.
|
|
12
12
|
*/
|
|
13
13
|
export declare function mockComponents(workspacePath: string, { numOfComponents, additionalStr }?: {
|
|
14
|
-
numOfComponents?: number;
|
|
15
|
-
additionalStr?: string;
|
|
14
|
+
numOfComponents?: number | undefined;
|
|
15
|
+
additionalStr?: string | undefined;
|
|
16
16
|
}): Promise<CompDirs[]>;
|
|
17
17
|
/**
|
|
18
18
|
* make the mocked components modified by appending the `additionalStr` to the component files
|
|
19
19
|
*/
|
|
20
20
|
export declare function modifyMockedComponents(workspacePath: string, additionalStr?: string, { numOfComponents }?: {
|
|
21
|
-
numOfComponents?: number;
|
|
21
|
+
numOfComponents?: number | undefined;
|
|
22
22
|
}): Promise<void>;
|
|
23
23
|
export {};
|
package/dist/mock-components.js
CHANGED
|
@@ -1,73 +1,131 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
15
6
|
exports.mockComponents = mockComponents;
|
|
16
7
|
exports.modifyMockedComponents = modifyMockedComponents;
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
8
|
+
function _compiler() {
|
|
9
|
+
const data = require("@teambit/compiler");
|
|
10
|
+
_compiler = function () {
|
|
11
|
+
return data;
|
|
12
|
+
};
|
|
13
|
+
return data;
|
|
14
|
+
}
|
|
15
|
+
function _harmonyTesting() {
|
|
16
|
+
const data = require("@teambit/harmony.testing.load-aspect");
|
|
17
|
+
_harmonyTesting = function () {
|
|
18
|
+
return data;
|
|
19
|
+
};
|
|
20
|
+
return data;
|
|
21
|
+
}
|
|
22
|
+
function _workspace() {
|
|
23
|
+
const data = require("@teambit/workspace");
|
|
24
|
+
_workspace = function () {
|
|
25
|
+
return data;
|
|
26
|
+
};
|
|
27
|
+
return data;
|
|
28
|
+
}
|
|
29
|
+
function _install() {
|
|
30
|
+
const data = require("@teambit/install");
|
|
31
|
+
_install = function () {
|
|
32
|
+
return data;
|
|
33
|
+
};
|
|
34
|
+
return data;
|
|
35
|
+
}
|
|
36
|
+
function _fsExtra() {
|
|
37
|
+
const data = _interopRequireDefault(require("fs-extra"));
|
|
38
|
+
_fsExtra = function () {
|
|
39
|
+
return data;
|
|
40
|
+
};
|
|
41
|
+
return data;
|
|
42
|
+
}
|
|
43
|
+
function _pMapSeries() {
|
|
44
|
+
const data = _interopRequireDefault(require("p-map-series"));
|
|
45
|
+
_pMapSeries = function () {
|
|
46
|
+
return data;
|
|
47
|
+
};
|
|
48
|
+
return data;
|
|
49
|
+
}
|
|
50
|
+
function _path() {
|
|
51
|
+
const data = _interopRequireDefault(require("path"));
|
|
52
|
+
_path = function () {
|
|
53
|
+
return data;
|
|
54
|
+
};
|
|
55
|
+
return data;
|
|
56
|
+
}
|
|
57
|
+
function _tracker() {
|
|
58
|
+
const data = require("@teambit/tracker");
|
|
59
|
+
_tracker = function () {
|
|
60
|
+
return data;
|
|
61
|
+
};
|
|
62
|
+
return data;
|
|
63
|
+
}
|
|
64
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
25
65
|
/**
|
|
26
66
|
* create dummy components, add, link and compile them.
|
|
27
67
|
* if `numOfComponents` is more than one, the components will depend on each other. by default, it's one.
|
|
28
68
|
*/
|
|
29
|
-
function mockComponents(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
69
|
+
async function mockComponents(workspacePath, {
|
|
70
|
+
numOfComponents = 1,
|
|
71
|
+
additionalStr = ''
|
|
72
|
+
} = {}) {
|
|
73
|
+
const compsDirs = await createComponents(workspacePath, {
|
|
74
|
+
numOfComponents,
|
|
75
|
+
additionalStr
|
|
76
|
+
});
|
|
77
|
+
const harmony = await (0, _harmonyTesting().loadManyAspects)([_workspace().WorkspaceAspect, _tracker().TrackerAspect, _install().InstallAspect, _compiler().CompilerAspect], workspacePath);
|
|
78
|
+
const workspace = harmony.get(_workspace().WorkspaceAspect.id);
|
|
79
|
+
const tracker = harmony.get(_tracker().TrackerAspect.id);
|
|
80
|
+
const results = await (0, _pMapSeries().default)(compsDirs, async compDir => {
|
|
81
|
+
const {
|
|
82
|
+
componentId
|
|
83
|
+
} = await tracker.track({
|
|
84
|
+
rootDir: compDir
|
|
45
85
|
});
|
|
86
|
+
return {
|
|
87
|
+
id: componentId,
|
|
88
|
+
dir: compDir
|
|
89
|
+
};
|
|
90
|
+
});
|
|
91
|
+
await workspace.bitMap.write();
|
|
92
|
+
const install = harmony.get(_install().InstallAspect.id);
|
|
93
|
+
await install.link({
|
|
94
|
+
rewire: true
|
|
95
|
+
});
|
|
96
|
+
const compiler = harmony.get(_compiler().CompilerAspect.id);
|
|
97
|
+
await compiler.compileOnWorkspace();
|
|
98
|
+
return results;
|
|
46
99
|
}
|
|
100
|
+
|
|
47
101
|
/**
|
|
48
102
|
* make the mocked components modified by appending the `additionalStr` to the component files
|
|
49
103
|
*/
|
|
50
|
-
function modifyMockedComponents(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
104
|
+
async function modifyMockedComponents(workspacePath, additionalStr = ' ', {
|
|
105
|
+
numOfComponents = 1
|
|
106
|
+
} = {}) {
|
|
107
|
+
await createComponents(workspacePath, {
|
|
108
|
+
numOfComponents,
|
|
109
|
+
additionalStr
|
|
110
|
+
});
|
|
54
111
|
}
|
|
55
|
-
function createComponents(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
112
|
+
async function createComponents(workspacePath, {
|
|
113
|
+
numOfComponents = 1,
|
|
114
|
+
additionalStr = ''
|
|
115
|
+
} = {}) {
|
|
116
|
+
const getImp = index => {
|
|
117
|
+
if (index === numOfComponents) return `module.exports = () => 'comp${index}${additionalStr}';`;
|
|
118
|
+
const nextComp = `comp${index + 1}`;
|
|
119
|
+
return `const ${nextComp} = require('../${nextComp}');
|
|
62
120
|
module.exports = () => 'comp${index}${additionalStr} and ' + ${nextComp}();`;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
});
|
|
121
|
+
};
|
|
122
|
+
const numOfComponentsArr = Array(numOfComponents).fill(null);
|
|
123
|
+
return (0, _pMapSeries().default)(numOfComponentsArr, async (val, key) => {
|
|
124
|
+
const i = key + 1;
|
|
125
|
+
const compDir = _path().default.join(workspacePath, `comp${i}`);
|
|
126
|
+
await _fsExtra().default.outputFile(_path().default.join(compDir, `index.js`), getImp(i));
|
|
127
|
+
return compDir;
|
|
128
|
+
});
|
|
72
129
|
}
|
|
130
|
+
|
|
73
131
|
//# sourceMappingURL=mock-components.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_compiler","data","require","_harmonyTesting","_workspace","_install","_fsExtra","_interopRequireDefault","_pMapSeries","_path","_tracker","e","__esModule","default","mockComponents","workspacePath","numOfComponents","additionalStr","compsDirs","createComponents","harmony","loadManyAspects","WorkspaceAspect","TrackerAspect","InstallAspect","CompilerAspect","workspace","get","id","tracker","results","pMapSeries","compDir","componentId","track","rootDir","dir","bitMap","write","install","link","rewire","compiler","compileOnWorkspace","modifyMockedComponents","getImp","index","nextComp","numOfComponentsArr","Array","fill","val","key","i","path","join","fs","outputFile"],"sources":["mock-components.ts"],"sourcesContent":["import { CompilerAspect, CompilerMain } from '@teambit/compiler';\nimport { loadManyAspects } from '@teambit/harmony.testing.load-aspect';\nimport { WorkspaceAspect, Workspace } from '@teambit/workspace';\nimport { InstallAspect } from '@teambit/install';\nimport type { InstallMain } from '@teambit/install';\nimport fs from 'fs-extra';\nimport pMapSeries from 'p-map-series';\nimport path from 'path';\nimport { TrackerAspect, TrackerMain } from '@teambit/tracker';\nimport { ComponentID } from '@teambit/component-id';\n\ntype CompDirs = {\n id: ComponentID;\n /**\n * absolute path to the component dir\n */\n dir: string;\n};\n\n/**\n * create dummy components, add, link and compile them.\n * if `numOfComponents` is more than one, the components will depend on each other. by default, it's one.\n */\nexport async function mockComponents(\n workspacePath: string,\n { numOfComponents = 1, additionalStr = '' } = {}\n): Promise<CompDirs[]> {\n const compsDirs = await createComponents(workspacePath, { numOfComponents, additionalStr });\n const harmony = await loadManyAspects([WorkspaceAspect, TrackerAspect, InstallAspect, CompilerAspect], workspacePath);\n const workspace = harmony.get<Workspace>(WorkspaceAspect.id);\n const tracker = harmony.get<TrackerMain>(TrackerAspect.id);\n const results: CompDirs[] = await pMapSeries(compsDirs, async (compDir) => {\n const { componentId } = await tracker.track({ rootDir: compDir });\n return { id: componentId, dir: compDir };\n });\n await workspace.bitMap.write();\n const install = harmony.get<InstallMain>(InstallAspect.id);\n await install.link({ rewire: true });\n\n const compiler = harmony.get<CompilerMain>(CompilerAspect.id);\n await compiler.compileOnWorkspace();\n\n return results;\n}\n\n/**\n * make the mocked components modified by appending the `additionalStr` to the component files\n */\nexport async function modifyMockedComponents(workspacePath: string, additionalStr = ' ', { numOfComponents = 1 } = {}) {\n await createComponents(workspacePath, { numOfComponents, additionalStr });\n}\n\nasync function createComponents(\n workspacePath: string,\n { numOfComponents = 1, additionalStr = '' } = {}\n): Promise<string[]> {\n const getImp = (index) => {\n if (index === numOfComponents) return `module.exports = () => 'comp${index}${additionalStr}';`;\n const nextComp = `comp${index + 1}`;\n return `const ${nextComp} = require('../${nextComp}');\nmodule.exports = () => 'comp${index}${additionalStr} and ' + ${nextComp}();`;\n };\n\n const numOfComponentsArr = Array(numOfComponents).fill(null);\n return pMapSeries(numOfComponentsArr, async (val, key) => {\n const i = key + 1;\n const compDir = path.join(workspacePath, `comp${i}`);\n await fs.outputFile(path.join(compDir, `index.js`), getImp(i));\n return compDir;\n });\n}\n"],"mappings":";;;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,gBAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,eAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,WAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,UAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,SAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,QAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,SAAA;EAAA,MAAAL,IAAA,GAAAM,sBAAA,CAAAL,OAAA;EAAAI,QAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;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nB,qBAAU,EAACiB,kBAAkB,EAAE,OAAOG,GAAG,EAAEC,GAAG,KAAK;IACxD,MAAMC,CAAC,GAAGD,GAAG,GAAG,CAAC;IACjB,MAAMpB,OAAO,GAAGsB,eAAI,CAACC,IAAI,CAACxC,aAAa,EAAE,OAAOsC,CAAC,EAAE,CAAC;IACpD,MAAMG,kBAAE,CAACC,UAAU,CAACH,eAAI,CAACC,IAAI,CAACvB,OAAO,EAAE,UAAU,CAAC,EAAEa,MAAM,CAACQ,CAAC,CAAC,CAAC;IAC9D,OAAOrB,OAAO;EAChB,CAAC,CAAC;AACJ","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/component.testing.mock-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.287",
|
|
4
4
|
"homepage": "https://bit.cloud/teambit/component/testing/mock-components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.component",
|
|
8
8
|
"name": "testing/mock-components",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.287"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"fs-extra": "10.0.0",
|
|
13
13
|
"p-map-series": "2.1.0",
|
|
14
14
|
"@teambit/component-id": "1.2.2",
|
|
15
|
-
"@teambit/harmony.testing.load-aspect": "0.0.
|
|
15
|
+
"@teambit/harmony.testing.load-aspect": "0.0.282"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/fs-extra": "9.0.7",
|
|
19
19
|
"@types/mocha": "9.1.0",
|
|
20
|
-
"
|
|
21
|
-
"@
|
|
20
|
+
"chai": "4.3.0",
|
|
21
|
+
"@teambit/node.envs.node-babel-mocha": "0.1.4"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {},
|
|
24
24
|
"license": "Apache-2.0",
|
package/types/asset.d.ts
CHANGED
|
@@ -5,12 +5,12 @@ declare module '*.png' {
|
|
|
5
5
|
declare module '*.svg' {
|
|
6
6
|
import type { FunctionComponent, SVGProps } from 'react';
|
|
7
7
|
|
|
8
|
-
export const ReactComponent: FunctionComponent<
|
|
8
|
+
export const ReactComponent: FunctionComponent<
|
|
9
|
+
SVGProps<SVGSVGElement> & { title?: string }
|
|
10
|
+
>;
|
|
9
11
|
const src: string;
|
|
10
12
|
export default src;
|
|
11
13
|
}
|
|
12
|
-
|
|
13
|
-
// @TODO Gilad
|
|
14
14
|
declare module '*.jpg' {
|
|
15
15
|
const value: any;
|
|
16
16
|
export = value;
|
|
@@ -27,3 +27,15 @@ declare module '*.bmp' {
|
|
|
27
27
|
const value: any;
|
|
28
28
|
export = value;
|
|
29
29
|
}
|
|
30
|
+
declare module '*.otf' {
|
|
31
|
+
const value: any;
|
|
32
|
+
export = value;
|
|
33
|
+
}
|
|
34
|
+
declare module '*.woff' {
|
|
35
|
+
const value: any;
|
|
36
|
+
export = value;
|
|
37
|
+
}
|
|
38
|
+
declare module '*.woff2' {
|
|
39
|
+
const value: any;
|
|
40
|
+
export = value;
|
|
41
|
+
}
|