@constructor-io/constructorio-connect-cli 1.15.1 → 1.15.2
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.
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @param type string The type of fixture
|
|
8
8
|
* @param name string The name/path of the fixture
|
|
9
9
|
* @param dataOverride string The data to override in the fixture
|
|
10
|
-
* @returns Record<string, unknown> The fixture data
|
|
10
|
+
* @returns Record<string, unknown> or Array<Record<string, unknown>> The fixture data
|
|
11
11
|
*/
|
|
12
|
-
export declare const buildFixture: (type: string, name: string, dataOverride?: Record<string, unknown>) => never;
|
|
12
|
+
export declare const buildFixture: (type: string, name: string, dataOverride?: Record<string, unknown>) => never[];
|
|
13
13
|
//# sourceMappingURL=build-fixture.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-fixture.d.ts","sourceRoot":"","sources":["../../src/functions/build-fixture.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,GACvB,MAAM,MAAM,EACZ,MAAM,MAAM,EACZ,eAAc,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,
|
|
1
|
+
{"version":3,"file":"build-fixture.d.ts","sourceRoot":"","sources":["../../src/functions/build-fixture.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,GACvB,MAAM,MAAM,EACZ,MAAM,MAAM,EACZ,eAAc,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,YAW3C,CAAC"}
|
|
@@ -16,10 +16,15 @@ const file_loaders_1 = require("../helpers/file-loaders");
|
|
|
16
16
|
* @param type string The type of fixture
|
|
17
17
|
* @param name string The name/path of the fixture
|
|
18
18
|
* @param dataOverride string The data to override in the fixture
|
|
19
|
-
* @returns Record<string, unknown> The fixture data
|
|
19
|
+
* @returns Record<string, unknown> or Array<Record<string, unknown>> The fixture data
|
|
20
20
|
*/
|
|
21
21
|
const buildFixture = (type, name, dataOverride = {}) => {
|
|
22
22
|
const data = (0, file_loaders_1.getCatalogFixture)(path_1.default.join(type, name));
|
|
23
|
+
if (Array.isArray(data)) {
|
|
24
|
+
return data.map((item) => {
|
|
25
|
+
return (0, remeda_1.mergeDeep)(item, dataOverride);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
23
28
|
return (0, remeda_1.mergeDeep)(data, dataOverride);
|
|
24
29
|
};
|
|
25
30
|
exports.buildFixture = buildFixture;
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED