@takeshape/cli 8.250.2 → 8.251.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../../src/commands/branch/commands/create.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../../src/commands/branch/commands/create.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,YAAY,kCAqBvB,CAAC"}
|
|
@@ -43,21 +43,25 @@ const createBranch = (0, _linkedCommand.loggedInAndLinkedCommand)(async (cli, pa
|
|
|
43
43
|
return (0, _fatalError.fatalError)('There is only one production branch and it already exists');
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
46
|
+
try {
|
|
47
|
+
const client = (0, _graphql.createAdminConnector)(params, params.authToken, params.projectId);
|
|
48
|
+
const res = await createBranchMutation(client, {
|
|
49
|
+
input: {
|
|
50
|
+
environment,
|
|
51
|
+
branchName: branch
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
const {
|
|
55
|
+
graphqlUrl,
|
|
56
|
+
latestVersion
|
|
57
|
+
} = res.branch;
|
|
58
|
+
(0, _log.default)(_chalk.default.green('Branch created!'));
|
|
59
|
+
(0, _log.default)(_prettyjson.default.render({
|
|
60
|
+
URL: graphqlUrl,
|
|
61
|
+
'Version URL': latestVersion.graphqlUrl
|
|
62
|
+
}));
|
|
63
|
+
} catch (e) {
|
|
64
|
+
(0, _fatalError.fatalError)(e.message);
|
|
65
|
+
}
|
|
62
66
|
});
|
|
63
67
|
exports.createBranch = createBranch;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../../../src/commands/branch/commands/delete.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../../../src/commands/branch/commands/delete.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,YAAY,kCAgBvB,CAAC"}
|
|
@@ -39,12 +39,20 @@ const deleteBranch = (0, _linkedCommand.loggedInAndLinkedCommand)(async (cli, pa
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
const client = (0, _graphql.createAdminConnector)(params, params.authToken, params.projectId);
|
|
42
|
-
|
|
42
|
+
const {
|
|
43
|
+
deletedBranch
|
|
44
|
+
} = await deleteBranchMutation(client, {
|
|
43
45
|
input: {
|
|
44
46
|
environment,
|
|
45
47
|
branchName: branch
|
|
46
48
|
}
|
|
47
49
|
});
|
|
48
|
-
|
|
50
|
+
const branchName = branch ?? environment.toLowerCase();
|
|
51
|
+
|
|
52
|
+
if (deletedBranch) {
|
|
53
|
+
(0, _log.default)(_chalk.default.green(`Branch "${branchName}" was deleted!`));
|
|
54
|
+
} else {
|
|
55
|
+
(0, _log.default)(_chalk.default.green(`Branch "${branchName}" not found, no action taken`));
|
|
56
|
+
}
|
|
49
57
|
});
|
|
50
58
|
exports.deleteBranch = deleteBranch;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takeshape/cli",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.251.0",
|
|
4
4
|
"description": "TakeShape CLI",
|
|
5
5
|
"homepage": "https://www.takeshape.io",
|
|
6
6
|
"repository": {
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"@graphql-codegen/typescript": "^2.4.5",
|
|
26
26
|
"@graphql-tools/graphql-file-loader": "^7.3.3",
|
|
27
27
|
"@graphql-tools/load": "^7.5.1",
|
|
28
|
-
"@takeshape/schema": "8.
|
|
29
|
-
"@takeshape/ssg": "8.
|
|
30
|
-
"@takeshape/streams": "8.
|
|
31
|
-
"@takeshape/util": "8.
|
|
28
|
+
"@takeshape/schema": "8.251.0",
|
|
29
|
+
"@takeshape/ssg": "8.251.0",
|
|
30
|
+
"@takeshape/streams": "8.251.0",
|
|
31
|
+
"@takeshape/util": "8.251.0",
|
|
32
32
|
"archiver": "^1.3.0",
|
|
33
33
|
"async-retry": "^1.2.1",
|
|
34
34
|
"bluebird": "^3.4.6",
|