@uniformdev/cli 19.145.0 → 19.146.1-alpha.3
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.mjs +42 -13
- package/package.json +8 -8
package/dist/index.mjs
CHANGED
|
@@ -352,7 +352,8 @@ var getEntityOption = ({
|
|
|
352
352
|
var getDirectoryOrFilename = ({
|
|
353
353
|
config: config2,
|
|
354
354
|
entityType,
|
|
355
|
-
operation
|
|
355
|
+
operation,
|
|
356
|
+
defaultEntityFolderName = entityType
|
|
356
357
|
}) => {
|
|
357
358
|
var _a, _b, _c, _d, _e, _f;
|
|
358
359
|
if ((_b = (_a = config2.entitiesConfig[entityType]) == null ? void 0 : _a[operation]) == null ? void 0 : _b.directory) {
|
|
@@ -365,7 +366,7 @@ var getDirectoryOrFilename = ({
|
|
|
365
366
|
if (isPackage) {
|
|
366
367
|
return config2.directory;
|
|
367
368
|
}
|
|
368
|
-
return `${config2.directory}/${
|
|
369
|
+
return `${config2.directory}/${defaultEntityFolderName}`;
|
|
369
370
|
};
|
|
370
371
|
|
|
371
372
|
// src/sync/fileSyncEngineDataSource.ts
|
|
@@ -2052,6 +2053,7 @@ var CompositionListModule = {
|
|
|
2052
2053
|
yargs33.options({
|
|
2053
2054
|
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
2054
2055
|
limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
|
|
2056
|
+
search: { describe: "Search query", type: "string", default: "" },
|
|
2055
2057
|
resolvePatterns: {
|
|
2056
2058
|
type: "boolean",
|
|
2057
2059
|
default: false,
|
|
@@ -2090,6 +2092,7 @@ var CompositionListModule = {
|
|
|
2090
2092
|
proxy,
|
|
2091
2093
|
limit,
|
|
2092
2094
|
offset,
|
|
2095
|
+
search,
|
|
2093
2096
|
format,
|
|
2094
2097
|
filename,
|
|
2095
2098
|
onlyCompositions,
|
|
@@ -2105,6 +2108,7 @@ var CompositionListModule = {
|
|
|
2105
2108
|
const res = await client.getCompositionList({
|
|
2106
2109
|
limit,
|
|
2107
2110
|
offset,
|
|
2111
|
+
search: search.length > 0 ? search : void 0,
|
|
2108
2112
|
pattern: onlyCompositions ? false : onlyPatterns ? true : void 0,
|
|
2109
2113
|
state: convertStateOption(state),
|
|
2110
2114
|
skipPatternResolution: !resolvePatterns,
|
|
@@ -3551,7 +3555,11 @@ var EntryListModule = {
|
|
|
3551
3555
|
withApiOptions(
|
|
3552
3556
|
withProjectOptions(
|
|
3553
3557
|
withStateOptions(
|
|
3554
|
-
yargs33
|
|
3558
|
+
yargs33.options({
|
|
3559
|
+
offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
|
|
3560
|
+
limit: { describe: "Number of rows to fetch", type: "number", default: 1e3 },
|
|
3561
|
+
search: { describe: "Search query", type: "string", default: "" }
|
|
3562
|
+
}),
|
|
3555
3563
|
// for backwards compatibility, we default to the "published" state, unlike compositions
|
|
3556
3564
|
"published"
|
|
3557
3565
|
)
|
|
@@ -3559,12 +3567,25 @@ var EntryListModule = {
|
|
|
3559
3567
|
)
|
|
3560
3568
|
)
|
|
3561
3569
|
),
|
|
3562
|
-
handler: async ({
|
|
3570
|
+
handler: async ({
|
|
3571
|
+
apiHost,
|
|
3572
|
+
edgeApiHost,
|
|
3573
|
+
apiKey,
|
|
3574
|
+
proxy,
|
|
3575
|
+
format,
|
|
3576
|
+
filename,
|
|
3577
|
+
project: projectId,
|
|
3578
|
+
state,
|
|
3579
|
+
limit,
|
|
3580
|
+
offset,
|
|
3581
|
+
search
|
|
3582
|
+
}) => {
|
|
3563
3583
|
const fetch3 = nodeFetchProxy(proxy);
|
|
3564
3584
|
const client = new ContentClient8({ apiKey, apiHost, edgeApiHost, fetch: fetch3, projectId, bypassCache: true });
|
|
3565
3585
|
const res = await client.getEntries({
|
|
3566
|
-
offset
|
|
3567
|
-
limit
|
|
3586
|
+
offset,
|
|
3587
|
+
limit,
|
|
3588
|
+
search: search.length > 0 ? search : void 0,
|
|
3568
3589
|
state: convertStateOption(state),
|
|
3569
3590
|
skipOverridesResolution: true,
|
|
3570
3591
|
skipPatternResolution: true,
|
|
@@ -6873,7 +6894,7 @@ import { PostHog } from "posthog-node";
|
|
|
6873
6894
|
// package.json
|
|
6874
6895
|
var package_default = {
|
|
6875
6896
|
name: "@uniformdev/cli",
|
|
6876
|
-
version: "19.
|
|
6897
|
+
version: "19.146.2",
|
|
6877
6898
|
description: "Uniform command line interface tool",
|
|
6878
6899
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
6879
6900
|
main: "./cli.js",
|
|
@@ -9009,7 +9030,9 @@ var SyncPullModule = {
|
|
|
9009
9030
|
handler: async ({ serialization, ...otherParams }) => {
|
|
9010
9031
|
var _a, _b;
|
|
9011
9032
|
const config2 = serialization;
|
|
9033
|
+
let isUsingDeprecatedPatternConfig = false;
|
|
9012
9034
|
if (config2.entitiesConfig.pattern) {
|
|
9035
|
+
isUsingDeprecatedPatternConfig = true;
|
|
9013
9036
|
(_a = config2.entitiesConfig).componentPattern ?? (_a.componentPattern = config2.entitiesConfig.pattern);
|
|
9014
9037
|
}
|
|
9015
9038
|
const enabledEntities = Object.entries({
|
|
@@ -9056,7 +9079,7 @@ var SyncPullModule = {
|
|
|
9056
9079
|
onlyCompositions: entityType === "composition" ? true : void 0,
|
|
9057
9080
|
onlyPatterns: entityType === "componentPattern" ? true : void 0,
|
|
9058
9081
|
mode: getPullMode(entityType, config2),
|
|
9059
|
-
directory: getPullFilename(entityType, config2),
|
|
9082
|
+
directory: getPullFilename(entityType, config2, { isUsingDeprecatedPatternConfig }),
|
|
9060
9083
|
allowEmptySource: config2.allowEmptySource
|
|
9061
9084
|
});
|
|
9062
9085
|
spinner.succeed();
|
|
@@ -9075,11 +9098,13 @@ var getPullMode = (entityType, config2) => {
|
|
|
9075
9098
|
entityType
|
|
9076
9099
|
});
|
|
9077
9100
|
};
|
|
9078
|
-
var getPullFilename = (entityType, config2) => {
|
|
9101
|
+
var getPullFilename = (entityType, config2, { isUsingDeprecatedPatternConfig }) => {
|
|
9079
9102
|
return getDirectoryOrFilename({
|
|
9080
9103
|
operation: "pull",
|
|
9081
9104
|
config: config2,
|
|
9082
|
-
entityType
|
|
9105
|
+
entityType,
|
|
9106
|
+
// This fallback can be removed when publishing a major release
|
|
9107
|
+
defaultEntityFolderName: isUsingDeprecatedPatternConfig && entityType === "componentPattern" ? "pattern" : void 0
|
|
9083
9108
|
});
|
|
9084
9109
|
};
|
|
9085
9110
|
var getFormat = (entityType, config2) => {
|
|
@@ -9112,7 +9137,9 @@ var SyncPushModule = {
|
|
|
9112
9137
|
handler: async ({ serialization, ...otherParams }) => {
|
|
9113
9138
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
9114
9139
|
const config2 = serialization;
|
|
9140
|
+
let isUsingDeprecatedPatternConfig = false;
|
|
9115
9141
|
if (config2.entitiesConfig.pattern) {
|
|
9142
|
+
isUsingDeprecatedPatternConfig = true;
|
|
9116
9143
|
(_a = config2.entitiesConfig).componentPattern ?? (_a.componentPattern = config2.entitiesConfig.pattern);
|
|
9117
9144
|
}
|
|
9118
9145
|
const enabledEntities = Object.entries({
|
|
@@ -9155,7 +9182,7 @@ var SyncPushModule = {
|
|
|
9155
9182
|
onlyCompositions: entityType === "composition" ? true : void 0,
|
|
9156
9183
|
onlyPatterns: entityType === "componentPattern" ? true : void 0,
|
|
9157
9184
|
mode: getPushMode(entityType, config2),
|
|
9158
|
-
directory: getPushFilename(entityType, config2),
|
|
9185
|
+
directory: getPushFilename(entityType, config2, { isUsingDeprecatedPatternConfig }),
|
|
9159
9186
|
allowEmptySource: config2.allowEmptySource
|
|
9160
9187
|
});
|
|
9161
9188
|
spinner.succeed();
|
|
@@ -9186,11 +9213,13 @@ var getPushMode = (entityType, config2) => {
|
|
|
9186
9213
|
entityType
|
|
9187
9214
|
});
|
|
9188
9215
|
};
|
|
9189
|
-
var getPushFilename = (entityType, config2) => {
|
|
9216
|
+
var getPushFilename = (entityType, config2, { isUsingDeprecatedPatternConfig }) => {
|
|
9190
9217
|
return getDirectoryOrFilename({
|
|
9191
9218
|
operation: "push",
|
|
9192
9219
|
config: config2,
|
|
9193
|
-
entityType
|
|
9220
|
+
entityType,
|
|
9221
|
+
// This fallback can be removed when publishing a major release
|
|
9222
|
+
defaultEntityFolderName: isUsingDeprecatedPatternConfig && entityType === "componentPattern" ? "pattern" : void 0
|
|
9194
9223
|
});
|
|
9195
9224
|
};
|
|
9196
9225
|
var getFormat2 = (entityType, config2) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/cli",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.146.1-alpha.3+62962ddf19",
|
|
4
4
|
"description": "Uniform command line interface tool",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./cli.js",
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@thi.ng/mime": "^2.2.23",
|
|
20
|
-
"@uniformdev/assets": "19.
|
|
21
|
-
"@uniformdev/canvas": "19.
|
|
22
|
-
"@uniformdev/context": "19.
|
|
23
|
-
"@uniformdev/files": "19.
|
|
24
|
-
"@uniformdev/project-map": "19.
|
|
25
|
-
"@uniformdev/redirect": "19.
|
|
20
|
+
"@uniformdev/assets": "19.146.1-alpha.3+62962ddf19",
|
|
21
|
+
"@uniformdev/canvas": "19.146.1-alpha.3+62962ddf19",
|
|
22
|
+
"@uniformdev/context": "19.146.1-alpha.3+62962ddf19",
|
|
23
|
+
"@uniformdev/files": "19.146.1-alpha.3+62962ddf19",
|
|
24
|
+
"@uniformdev/project-map": "19.146.1-alpha.3+62962ddf19",
|
|
25
|
+
"@uniformdev/redirect": "19.146.1-alpha.3+62962ddf19",
|
|
26
26
|
"call-bind": "^1.0.2",
|
|
27
27
|
"colorette": "2.0.20",
|
|
28
28
|
"cosmiconfig": "8.3.6",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "62962ddf191560b0b15f627e93cf67ebbd4a11af"
|
|
72
72
|
}
|