@takeshape/cli 8.254.0 → 8.255.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../../../src/commands/branch/commands/url.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../../../src/commands/branch/commands/url.ts"],"names":[],"mappings":"AA6BA,eAAO,MAAM,aAAa,kCAqBxB,CAAC;AAEH,eAAO,MAAM,MAAM,kCAcjB,CAAC"}
|
|
@@ -11,7 +11,9 @@ var _graphql = require("../../../graphql");
|
|
|
11
11
|
|
|
12
12
|
var _branches = require("../../../util/branches");
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
var _fatalError = require("../../../util/fatal-error");
|
|
15
|
+
|
|
16
|
+
const getBranchVersionQuery = (0, _graphql.graphQLQuery)(
|
|
15
17
|
/* GraphQL */
|
|
16
18
|
`
|
|
17
19
|
query ($environment: TSSchemaBranchEnvironment!, $branchName: String, $tagName: String, $schemaHash: String) {
|
|
@@ -25,6 +27,15 @@ const getBranchQuery = (0, _graphql.graphQLQuery)(
|
|
|
25
27
|
}
|
|
26
28
|
}
|
|
27
29
|
`);
|
|
30
|
+
const getBranchQuery = (0, _graphql.graphQLQuery)(
|
|
31
|
+
/* GraphQL */
|
|
32
|
+
`
|
|
33
|
+
query ($environment: TSSchemaBranchEnvironment!, $branchName: String) {
|
|
34
|
+
result: tsGetSchemaBranch(environment: $environment, branchName: $branchName) {
|
|
35
|
+
graphqlUrl
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
`);
|
|
28
39
|
const getVersionUrl = (0, _linkedCommand.loggedInAndLinkedCommand)(async (cli, params) => {
|
|
29
40
|
const {
|
|
30
41
|
branch,
|
|
@@ -35,23 +46,39 @@ const getVersionUrl = (0, _linkedCommand.loggedInAndLinkedCommand)(async (cli, p
|
|
|
35
46
|
} = cli;
|
|
36
47
|
|
|
37
48
|
if (flags.tag && flags.hash) {
|
|
38
|
-
|
|
49
|
+
return (0, _fatalError.fatalError)('Can only provide one of: --tag OR --hash');
|
|
39
50
|
}
|
|
40
51
|
|
|
41
52
|
const client = (0, _graphql.createAdminConnector)(params, params.authToken, params.projectId);
|
|
42
|
-
const {
|
|
43
|
-
graphqlUrl
|
|
44
|
-
} = await getBranchQuery(client, {
|
|
53
|
+
const result = await getBranchVersionQuery(client, {
|
|
45
54
|
environment,
|
|
46
55
|
branchName: branch,
|
|
47
56
|
tagName: flags.tag,
|
|
48
57
|
schemaHash: flags.hash
|
|
49
58
|
});
|
|
50
|
-
|
|
59
|
+
|
|
60
|
+
if (!result) {
|
|
61
|
+
return (0, _fatalError.fatalError)('Branch does not exist');
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
process.stdout.write(result.graphqlUrl);
|
|
51
65
|
});
|
|
52
66
|
exports.getVersionUrl = getVersionUrl;
|
|
53
67
|
const getUrl = (0, _linkedCommand.loggedInAndLinkedCommand)(async (cli, params) => {
|
|
54
|
-
const
|
|
55
|
-
|
|
68
|
+
const {
|
|
69
|
+
branch,
|
|
70
|
+
environment
|
|
71
|
+
} = (0, _branches.getBranchParams)(cli, 'name');
|
|
72
|
+
const client = (0, _graphql.createAdminConnector)(params, params.authToken, params.projectId);
|
|
73
|
+
const result = await getBranchQuery(client, {
|
|
74
|
+
environment,
|
|
75
|
+
branchName: branch
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
if (!result) {
|
|
79
|
+
return (0, _fatalError.fatalError)('Branch does not exist');
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
process.stdout.write(result.graphqlUrl);
|
|
56
83
|
});
|
|
57
84
|
exports.getUrl = getUrl;
|
package/dist/files.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export function copyStatic(config: any): Promise<void>;
|
|
2
2
|
export function syncStatic(config: any): (event: any, sourcePath: any) => void;
|
|
3
|
-
export function writePages(outputPath: any): (generated: any) =>
|
|
4
|
-
import BbPromise from "bluebird";
|
|
3
|
+
export function writePages(outputPath: any): (generated: any) => any;
|
|
5
4
|
//# sourceMappingURL=files.d.ts.map
|
package/dist/files.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/files.js"],"names":[],"mappings":"AAKA,uDAIC;AAED,+EAgBC;AAED,
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/files.js"],"names":[],"mappings":"AAKA,uDAIC;AAED,+EAgBC;AAED,qEAOC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takeshape/cli",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.255.10",
|
|
4
4
|
"description": "TakeShape CLI",
|
|
5
5
|
"homepage": "https://www.takeshape.io",
|
|
6
6
|
"repository": {
|
|
@@ -25,10 +25,6 @@
|
|
|
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.254.0",
|
|
29
|
-
"@takeshape/ssg": "8.254.0",
|
|
30
|
-
"@takeshape/streams": "8.254.0",
|
|
31
|
-
"@takeshape/util": "8.254.0",
|
|
32
28
|
"archiver": "^1.3.0",
|
|
33
29
|
"async-retry": "^1.2.1",
|
|
34
30
|
"bluebird": "^3.4.6",
|
|
@@ -60,7 +56,11 @@
|
|
|
60
56
|
"request": "^2.88.0",
|
|
61
57
|
"semver": "^6.3.0",
|
|
62
58
|
"stream-to-promise": "^2.2.0",
|
|
63
|
-
"tmp": "^0.0.33"
|
|
59
|
+
"tmp": "^0.0.33",
|
|
60
|
+
"@takeshape/schema": "8.255.10",
|
|
61
|
+
"@takeshape/util": "8.255.10",
|
|
62
|
+
"@takeshape/streams": "8.255.10",
|
|
63
|
+
"@takeshape/ssg": "8.255.10"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@types/archiver": "^3.1.0",
|
|
@@ -94,8 +94,7 @@
|
|
|
94
94
|
"build:types": "tsc --emitDeclarationOnly --project tsconfig.build.json",
|
|
95
95
|
"build:js": "cross-env BABEL_MODULES=commonjs babel src --out-dir dist --extensions \".js,.ts\" --ignore '**/__tests__'",
|
|
96
96
|
"build:copy": "cp -rf build/src/* dist/",
|
|
97
|
-
"will-it-blend": "pnpm typecheck && pnpm lint --
|
|
97
|
+
"will-it-blend": "pnpm typecheck && pnpm lint --quiet && pnpm test --silent --coverage false",
|
|
98
98
|
"todo": "leasot 'src/**/*.{js,jsx,ts,tsx}'"
|
|
99
|
-
}
|
|
100
|
-
"readme": "# TakeShape CLI\n\n## Summary\n\nThis is the command-line interface for [TakeShape](https://takeshape.io).\n\n## Documentation\n\nhttps://app.takeshape.io/docs/\n"
|
|
99
|
+
}
|
|
101
100
|
}
|