@teambit/component.testing.mock-components 0.0.286 → 0.0.288

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 CHANGED
@@ -1,7 +1,26 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.modifyMockedComponents = exports.mockComponents = void 0;
4
- var mock_components_1 = require("./mock-components");
5
- Object.defineProperty(exports, "mockComponents", { enumerable: true, get: function () { return mock_components_1.mockComponents; } });
6
- Object.defineProperty(exports, "modifyMockedComponents", { enumerable: true, get: function () { return mock_components_1.modifyMockedComponents; } });
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,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,qDAA2E;AAAlE,iHAAA,cAAc,OAAA;AAAE,yHAAA,sBAAsB,OAAA"}
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 {};
@@ -1,73 +1,131 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
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
- const compiler_1 = require("@teambit/compiler");
18
- const harmony_testing_load_aspect_1 = require("@teambit/harmony.testing.load-aspect");
19
- const workspace_1 = require("@teambit/workspace");
20
- const install_1 = require("@teambit/install");
21
- const fs_extra_1 = __importDefault(require("fs-extra"));
22
- const p_map_series_1 = __importDefault(require("p-map-series"));
23
- const path_1 = __importDefault(require("path"));
24
- const tracker_1 = require("@teambit/tracker");
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(workspacePath_1) {
30
- return __awaiter(this, arguments, void 0, function* (workspacePath, { numOfComponents = 1, additionalStr = '' } = {}) {
31
- const compsDirs = yield createComponents(workspacePath, { numOfComponents, additionalStr });
32
- const harmony = yield (0, harmony_testing_load_aspect_1.loadManyAspects)([workspace_1.WorkspaceAspect, tracker_1.TrackerAspect, install_1.InstallAspect, compiler_1.CompilerAspect], workspacePath);
33
- const workspace = harmony.get(workspace_1.WorkspaceAspect.id);
34
- const tracker = harmony.get(tracker_1.TrackerAspect.id);
35
- const results = yield (0, p_map_series_1.default)(compsDirs, (compDir) => __awaiter(this, void 0, void 0, function* () {
36
- const { componentId } = yield tracker.track({ rootDir: compDir });
37
- return { id: componentId, dir: compDir };
38
- }));
39
- yield workspace.bitMap.write();
40
- const install = harmony.get(install_1.InstallAspect.id);
41
- yield install.link({ rewire: true });
42
- const compiler = harmony.get(compiler_1.CompilerAspect.id);
43
- yield compiler.compileOnWorkspace();
44
- return results;
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(workspacePath_1) {
51
- return __awaiter(this, arguments, void 0, function* (workspacePath, additionalStr = ' ', { numOfComponents = 1 } = {}) {
52
- yield createComponents(workspacePath, { numOfComponents, additionalStr });
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(workspacePath_1) {
56
- return __awaiter(this, arguments, void 0, function* (workspacePath, { numOfComponents = 1, additionalStr = '' } = {}) {
57
- const getImp = (index) => {
58
- if (index === numOfComponents)
59
- return `module.exports = () => 'comp${index}${additionalStr}';`;
60
- const nextComp = `comp${index + 1}`;
61
- return `const ${nextComp} = require('../${nextComp}');
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
- const numOfComponentsArr = Array(numOfComponents).fill(null);
65
- return (0, p_map_series_1.default)(numOfComponentsArr, (val, key) => __awaiter(this, void 0, void 0, function* () {
66
- const i = key + 1;
67
- const compDir = path_1.default.join(workspacePath, `comp${i}`);
68
- yield fs_extra_1.default.outputFile(path_1.default.join(compDir, `index.js`), getImp(i));
69
- return compDir;
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,"file":"mock-components.js","sourceRoot":"","sources":["../mock-components.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAuBA,wCAoBC;AAKD,wDAEC;AAlDD,gDAAiE;AACjE,sFAAuE;AACvE,kDAAgE;AAChE,8CAAiD;AAEjD,wDAA0B;AAC1B,gEAAsC;AACtC,gDAAwB;AACxB,8CAA8D;AAW9D;;;GAGG;AACH,SAAsB,cAAc;yDAClC,aAAqB,EACrB,EAAE,eAAe,GAAG,CAAC,EAAE,a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nH,MAAM,gBAAgB,CAAC,aAAa,EAAE,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC,CAAC;IAC5E,CAAC;CAAA;AAED,SAAe,gBAAgB;yDAC7B,aAAqB,EACrB,EAAE,eAAe,GAAG,CAAC,EAAE,aAAa,GAAG,EAAE,EAAE,GAAG,EAAE;QAEhD,MAAM,MAAM,GAAG,CAAC,KAAK,EAAE,EAAE;YACvB,IAAI,KAAK,KAAK,eAAe;gBAAE,OAAO,+BAA+B,KAAK,GAAG,aAAa,IAAI,CAAC;YAC/F,MAAM,QAAQ,GAAG,OAAO,KAAK,GAAG,CAAC,EAAE,CAAC;YACpC,OAAO,SAAS,QAAQ,kBAAkB,QAAQ;8BACxB,KAAK,GAAG,aAAa,YAAY,QAAQ,KAAK,CAAC;QAC3E,CAAC,CAAC;QAEF,MAAM,kBAAkB,GAAG,KAAK,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7D,OAAO,IAAA,sBAAU,EAAC,kBAAkB,EAAE,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;YACvD,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;YAClB,MAAM,OAAO,GAAG,cAAI,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;YACrD,MAAM,kBAAE,CAAC,UAAU,CAAC,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YAC/D,OAAO,OAAO,CAAC;QACjB,CAAC,CAAA,CAAC,CAAC;IACL,CAAC;CAAA"}
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;AAAA;AACA,SAAAO,YAAA;EAAA,MAAAP,IAAA,GAAAM,sBAAA,CAAAL,OAAA;EAAAM,WAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,MAAA;EAAA,MAAAR,IAAA,G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C,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.286",
3
+ "version": "0.0.288",
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.286"
9
+ "version": "0.0.288"
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.281"
15
+ "@teambit/harmony.testing.load-aspect": "0.0.283"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/fs-extra": "9.0.7",
19
19
  "@types/mocha": "9.1.0",
20
- "@types/jest": "26.0.20",
21
- "@types/node": "22.10.5"
20
+ "chai": "4.3.0",
21
+ "@teambit/node.envs.node-babel-mocha": "0.1.5"
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<SVGProps<SVGSVGElement> & { title?: string }>;
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
+ }
@@ -1,7 +0,0 @@
1
- ;
2
- ;
3
-
4
- export const compositions = [];
5
- export const overview = [];
6
-
7
- export const compositions_metadata = {"compositions":[]};