@uniformdev/cli 19.38.3-alpha.70 → 19.39.1-alpha.10
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.d.mts +2 -2
- package/dist/index.mjs +32 -12
- package/package.json +7 -7
package/dist/index.d.mts
CHANGED
|
@@ -4,7 +4,7 @@ type EntityTypes = 'category' | 'dataType' | 'quirk' | 'test' | 'signal' | 'enri
|
|
|
4
4
|
type SyncFileFormat = 'yaml' | 'json';
|
|
5
5
|
type EntityConfiguration = {
|
|
6
6
|
mode?: SyncMode;
|
|
7
|
-
|
|
7
|
+
directory?: string;
|
|
8
8
|
format?: SyncFileFormat;
|
|
9
9
|
disabled?: true;
|
|
10
10
|
};
|
|
@@ -19,7 +19,7 @@ type SerializationConfiguration = {
|
|
|
19
19
|
composition?: CompositionAndPatternConfiguration;
|
|
20
20
|
pattern?: CompositionAndPatternConfiguration;
|
|
21
21
|
}>;
|
|
22
|
-
|
|
22
|
+
directory: string;
|
|
23
23
|
mode: SyncMode;
|
|
24
24
|
format: SyncFileFormat;
|
|
25
25
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -228,7 +228,7 @@ async function* paginateAsync(fetchPage, options) {
|
|
|
228
228
|
}
|
|
229
229
|
var defaultSyncConfiguration = {
|
|
230
230
|
entitiesConfig: {},
|
|
231
|
-
|
|
231
|
+
directory: "uniform-data",
|
|
232
232
|
format: "yaml",
|
|
233
233
|
mode: "mirror"
|
|
234
234
|
};
|
|
@@ -248,8 +248,10 @@ var applyDefaultSyncConfiguration = (config2) => {
|
|
|
248
248
|
const entityTypeCasted = entityType;
|
|
249
249
|
const entityConfig = mergedConfig.serialization.entitiesConfig[entityTypeCasted];
|
|
250
250
|
if (Object.keys(entityConfig).length === 0) {
|
|
251
|
-
const separator = mergedConfig.serialization.
|
|
252
|
-
mergedConfig.serialization.entitiesConfig[entityTypeCasted].
|
|
251
|
+
const separator = mergedConfig.serialization.directory[mergedConfig.serialization.directory.length - 1] === "/" ? "" : "/";
|
|
252
|
+
mergedConfig.serialization.entitiesConfig[entityTypeCasted].directory = isPathAPackageFile(
|
|
253
|
+
mergedConfig.serialization.directory
|
|
254
|
+
) ? mergedConfig.serialization.directory : `${mergedConfig.serialization.directory}${separator}${entityTypeCasted}`;
|
|
253
255
|
}
|
|
254
256
|
}
|
|
255
257
|
return mergedConfig;
|
|
@@ -278,17 +280,17 @@ var getDirectoryOrFilename = ({
|
|
|
278
280
|
operation
|
|
279
281
|
}) => {
|
|
280
282
|
var _a, _b, _c, _d, _e, _f;
|
|
281
|
-
if ((_b = (_a = config2.entitiesConfig[entityType]) == null ? void 0 : _a[operation]) == null ? void 0 : _b.
|
|
282
|
-
return (_d = (_c = config2.entitiesConfig[entityType]) == null ? void 0 : _c[operation]) == null ? void 0 : _d.
|
|
283
|
+
if ((_b = (_a = config2.entitiesConfig[entityType]) == null ? void 0 : _a[operation]) == null ? void 0 : _b.directory) {
|
|
284
|
+
return (_d = (_c = config2.entitiesConfig[entityType]) == null ? void 0 : _c[operation]) == null ? void 0 : _d.directory;
|
|
283
285
|
}
|
|
284
|
-
if ((_e = config2.entitiesConfig[entityType]) == null ? void 0 : _e.
|
|
285
|
-
return (_f = config2.entitiesConfig[entityType]) == null ? void 0 : _f.
|
|
286
|
+
if ((_e = config2.entitiesConfig[entityType]) == null ? void 0 : _e.directory) {
|
|
287
|
+
return (_f = config2.entitiesConfig[entityType]) == null ? void 0 : _f.directory;
|
|
286
288
|
}
|
|
287
|
-
const isPackage = isPathAPackageFile(config2.
|
|
289
|
+
const isPackage = isPathAPackageFile(config2.directory);
|
|
288
290
|
if (isPackage) {
|
|
289
|
-
return config2.
|
|
291
|
+
return config2.directory;
|
|
290
292
|
}
|
|
291
|
-
return `${config2.
|
|
293
|
+
return `${config2.directory}/${entityType}`;
|
|
292
294
|
};
|
|
293
295
|
|
|
294
296
|
// src/sync/fileSyncEngineDataSource.ts
|
|
@@ -3749,7 +3751,7 @@ import { PostHog } from "posthog-node";
|
|
|
3749
3751
|
// package.json
|
|
3750
3752
|
var package_default = {
|
|
3751
3753
|
name: "@uniformdev/cli",
|
|
3752
|
-
version: "19.
|
|
3754
|
+
version: "19.39.0",
|
|
3753
3755
|
description: "Uniform command line interface tool",
|
|
3754
3756
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
3755
3757
|
main: "./cli.js",
|
|
@@ -3757,7 +3759,7 @@ var package_default = {
|
|
|
3757
3759
|
sideEffects: false,
|
|
3758
3760
|
scripts: {
|
|
3759
3761
|
uniform: "node ./cli.js",
|
|
3760
|
-
build: "tsup",
|
|
3762
|
+
build: "tsc --noEmit && tsup",
|
|
3761
3763
|
dev: "tsup --watch",
|
|
3762
3764
|
clean: "rimraf dist",
|
|
3763
3765
|
test: "jest --maxWorkers=1 --passWithNoTests",
|
|
@@ -5894,6 +5896,7 @@ var SyncPullModule = {
|
|
|
5894
5896
|
await module3.handler({
|
|
5895
5897
|
...otherParams,
|
|
5896
5898
|
state: 0,
|
|
5899
|
+
format: getFormat(entityType, config2),
|
|
5897
5900
|
onlyCompositions: entityType === "composition" ? true : void 0,
|
|
5898
5901
|
onlyPatterns: entityType === "pattern" ? true : void 0,
|
|
5899
5902
|
mode: getPullMode(entityType, config2),
|
|
@@ -5917,6 +5920,14 @@ var getPullFilename = (entityType, config2) => {
|
|
|
5917
5920
|
entityType
|
|
5918
5921
|
});
|
|
5919
5922
|
};
|
|
5923
|
+
var getFormat = (entityType, config2) => {
|
|
5924
|
+
return getEntityOption({
|
|
5925
|
+
optionName: "format",
|
|
5926
|
+
operation: "pull",
|
|
5927
|
+
config: config2,
|
|
5928
|
+
entityType
|
|
5929
|
+
});
|
|
5930
|
+
};
|
|
5920
5931
|
|
|
5921
5932
|
// src/commands/sync/commands/push.ts
|
|
5922
5933
|
var SyncPushModule = {
|
|
@@ -5961,6 +5972,7 @@ var SyncPushModule = {
|
|
|
5961
5972
|
await module3.handler({
|
|
5962
5973
|
...otherParams,
|
|
5963
5974
|
state: 0,
|
|
5975
|
+
format: getFormat2(entityType, config2),
|
|
5964
5976
|
onlyCompositions: entityType === "composition" ? true : void 0,
|
|
5965
5977
|
onlyPatterns: entityType === "pattern" ? true : void 0,
|
|
5966
5978
|
mode: getPushMode(entityType, config2),
|
|
@@ -5990,6 +6002,14 @@ var getPushFilename = (entityType, config2) => {
|
|
|
5990
6002
|
entityType
|
|
5991
6003
|
});
|
|
5992
6004
|
};
|
|
6005
|
+
var getFormat2 = (entityType, config2) => {
|
|
6006
|
+
return getEntityOption({
|
|
6007
|
+
optionName: "format",
|
|
6008
|
+
operation: "push",
|
|
6009
|
+
config: config2,
|
|
6010
|
+
entityType
|
|
6011
|
+
});
|
|
6012
|
+
};
|
|
5993
6013
|
|
|
5994
6014
|
// src/commands/sync/index.ts
|
|
5995
6015
|
var SyncCommand = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/cli",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.39.1-alpha.10+3cadc0bda",
|
|
4
4
|
"description": "Uniform command line interface tool",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./cli.js",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"scripts": {
|
|
10
10
|
"uniform": "node ./cli.js",
|
|
11
|
-
"build": "tsup",
|
|
11
|
+
"build": "tsc --noEmit && tsup",
|
|
12
12
|
"dev": "tsup --watch",
|
|
13
13
|
"clean": "rimraf dist",
|
|
14
14
|
"test": "jest --maxWorkers=1 --passWithNoTests",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"format": "prettier --write \"src/**/*.{js,ts,tsx}\""
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@uniformdev/canvas": "19.
|
|
20
|
-
"@uniformdev/context": "19.
|
|
21
|
-
"@uniformdev/project-map": "19.
|
|
22
|
-
"@uniformdev/redirect": "19.
|
|
19
|
+
"@uniformdev/canvas": "19.39.1-alpha.10+3cadc0bda",
|
|
20
|
+
"@uniformdev/context": "19.39.1-alpha.10+3cadc0bda",
|
|
21
|
+
"@uniformdev/project-map": "19.39.1-alpha.10+3cadc0bda",
|
|
22
|
+
"@uniformdev/redirect": "19.39.1-alpha.10+3cadc0bda",
|
|
23
23
|
"colorette": "2.0.20",
|
|
24
24
|
"cosmiconfig": "8.2.0",
|
|
25
25
|
"cosmiconfig-typescript-loader": "5.0.0",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"publishConfig": {
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "3cadc0bda1f144a292c62abf0b90c680d44e4454"
|
|
66
66
|
}
|