@uniformdev/cli 19.3.0 → 19.6.0
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 +20 -27
- package/package.json +7 -7
package/dist/index.mjs
CHANGED
|
@@ -245,7 +245,7 @@ async function createFileSyncEngineDataSource({
|
|
|
245
245
|
format = "yaml",
|
|
246
246
|
selectIdentifier: selectIdentifier12,
|
|
247
247
|
selectDisplayName: selectDisplayName12 = selectIdentifier12,
|
|
248
|
-
selectFilename:
|
|
248
|
+
selectFilename: selectFilename3,
|
|
249
249
|
selectSchemaUrl: selectSchemaUrl2
|
|
250
250
|
}) {
|
|
251
251
|
const dirExists = existsSync(directory);
|
|
@@ -285,7 +285,7 @@ ${e == null ? void 0 : e.message}`));
|
|
|
285
285
|
await unlink(providerId);
|
|
286
286
|
},
|
|
287
287
|
writeObject: async (object) => {
|
|
288
|
-
const filename =
|
|
288
|
+
const filename = selectFilename3 ? join(directory, `${selectFilename3(object.object)}.${format}`) : getFullFilename(object.id);
|
|
289
289
|
let contents = object.object;
|
|
290
290
|
if (selectSchemaUrl2) {
|
|
291
291
|
contents = {
|
|
@@ -3233,7 +3233,7 @@ import { PostHog } from "posthog-node";
|
|
|
3233
3233
|
// package.json
|
|
3234
3234
|
var package_default = {
|
|
3235
3235
|
name: "@uniformdev/cli",
|
|
3236
|
-
version: "19.
|
|
3236
|
+
version: "19.6.0",
|
|
3237
3237
|
description: "Uniform command line interface tool",
|
|
3238
3238
|
license: "SEE LICENSE IN LICENSE.txt",
|
|
3239
3239
|
main: "./cli.js",
|
|
@@ -3280,7 +3280,7 @@ var package_default = {
|
|
|
3280
3280
|
"@types/js-yaml": "4.0.5",
|
|
3281
3281
|
"@types/jsonwebtoken": "9.0.2",
|
|
3282
3282
|
"@types/lodash.isequalwith": "4.4.7",
|
|
3283
|
-
"@types/node": "18.16.
|
|
3283
|
+
"@types/node": "18.16.3",
|
|
3284
3284
|
"@types/yargs": "17.0.24",
|
|
3285
3285
|
"p-limit": "4.0.0"
|
|
3286
3286
|
},
|
|
@@ -3504,13 +3504,13 @@ var createClient = (baseUrl, authToken) => {
|
|
|
3504
3504
|
const result = await requestJson(
|
|
3505
3505
|
"/api/v1/project",
|
|
3506
3506
|
{
|
|
3507
|
-
method: "
|
|
3507
|
+
method: "PUT",
|
|
3508
3508
|
body: JSON.stringify({
|
|
3509
|
-
|
|
3509
|
+
teamId,
|
|
3510
3510
|
name,
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3511
|
+
projectTypeId: projectTypeBelowLimit.id,
|
|
3512
|
+
uiVersion: 3,
|
|
3513
|
+
previewUrl
|
|
3514
3514
|
})
|
|
3515
3515
|
},
|
|
3516
3516
|
createTeamOrProjectSchema
|
|
@@ -3542,16 +3542,6 @@ var createClient = (baseUrl, authToken) => {
|
|
|
3542
3542
|
return { readApiKey, writeApiKey };
|
|
3543
3543
|
} catch (err) {
|
|
3544
3544
|
throw new Error(`Failed to create API key:
|
|
3545
|
-
${err.message}`);
|
|
3546
|
-
}
|
|
3547
|
-
},
|
|
3548
|
-
installCanvas: async (projectId) => {
|
|
3549
|
-
try {
|
|
3550
|
-
await request2(`/api/v1/integrations?integration=canvas&action=install&site=${projectId}`, {
|
|
3551
|
-
method: "POST"
|
|
3552
|
-
});
|
|
3553
|
-
} catch (err) {
|
|
3554
|
-
throw new Error(`Failed to install Canvas:
|
|
3555
3545
|
${err.message}`);
|
|
3556
3546
|
}
|
|
3557
3547
|
},
|
|
@@ -4024,8 +4014,6 @@ async function newHandler({
|
|
|
4024
4014
|
["UNIFORM_API_HOST", apiHost]
|
|
4025
4015
|
] : []
|
|
4026
4016
|
).map(([name, value]) => `${name}='${value}'`).join("\n") + "\n";
|
|
4027
|
-
done = await spin("Installing Canvas...");
|
|
4028
|
-
await uniformClient.installCanvas(projectId);
|
|
4029
4017
|
await done();
|
|
4030
4018
|
if (githubUri.endsWith("commerce-starter")) {
|
|
4031
4019
|
const stableFakecommerceId = "fakecommerce-d04dcf12-f811-401d-add8-1fb81cfdb8a5";
|
|
@@ -5056,10 +5044,17 @@ function writeContextPackage3(filename, packageContents) {
|
|
|
5056
5044
|
|
|
5057
5045
|
// src/commands/redirect/commands/RedirectDefinition/_util.ts
|
|
5058
5046
|
var selectIdentifier11 = (source) => source.redirect.id;
|
|
5047
|
+
var selectFilename2 = (source) => {
|
|
5048
|
+
const index = source.redirect.sourceUrl.lastIndexOf("/");
|
|
5049
|
+
return source.redirect.sourceUrl.substring(index + 1).replace(/[/<>$+%>!`&*'|{}?"=:\\@]/g, "-") + `_${source.redirect.id}`;
|
|
5050
|
+
};
|
|
5059
5051
|
var selectDisplayName11 = (source) => {
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5052
|
+
let pathName = source.redirect.sourceUrl;
|
|
5053
|
+
if (pathName.length > 30) {
|
|
5054
|
+
const slashIndex = source.redirect.sourceUrl.indexOf("/", source.redirect.sourceUrl.length - 30);
|
|
5055
|
+
pathName = "..." + pathName.substring(slashIndex);
|
|
5056
|
+
}
|
|
5057
|
+
return `${pathName} (id: ${source.redirect.id})`;
|
|
5063
5058
|
};
|
|
5064
5059
|
|
|
5065
5060
|
// src/commands/redirect/RedirectEngineDataSource.ts
|
|
@@ -5150,9 +5145,7 @@ var RedirectDefinitionPullModule = {
|
|
|
5150
5145
|
} else {
|
|
5151
5146
|
target = await createFileSyncEngineDataSource({
|
|
5152
5147
|
directory,
|
|
5153
|
-
selectFilename:
|
|
5154
|
-
return o.redirect.sourceUrl.replace(/[/<>$+%>!`&*'|{}?"=:\\@]/g, "-");
|
|
5155
|
-
},
|
|
5148
|
+
selectFilename: selectFilename2,
|
|
5156
5149
|
selectIdentifier: selectIdentifier11,
|
|
5157
5150
|
selectDisplayName: selectDisplayName11,
|
|
5158
5151
|
format
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/cli",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.6.0",
|
|
4
4
|
"description": "Uniform command line interface tool",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./cli.js",
|
|
@@ -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.6.0",
|
|
20
|
+
"@uniformdev/context": "19.6.0",
|
|
21
|
+
"@uniformdev/project-map": "19.6.0",
|
|
22
|
+
"@uniformdev/redirect": "19.6.0",
|
|
23
23
|
"chalk": "^5.2.0",
|
|
24
24
|
"diff": "^5.0.0",
|
|
25
25
|
"dotenv": "^16.0.3",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@types/js-yaml": "4.0.5",
|
|
48
48
|
"@types/jsonwebtoken": "9.0.2",
|
|
49
49
|
"@types/lodash.isequalwith": "4.4.7",
|
|
50
|
-
"@types/node": "18.16.
|
|
50
|
+
"@types/node": "18.16.3",
|
|
51
51
|
"@types/yargs": "17.0.24",
|
|
52
52
|
"p-limit": "4.0.0"
|
|
53
53
|
},
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"publishConfig": {
|
|
61
61
|
"access": "public"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "a14550dd1caa33fa1310ada642d06ce79bbe4eac"
|
|
64
64
|
}
|