@takeshape/cli 8.124.0 → 8.126.1
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/config.js +1 -1
- package/dist/util/login.d.ts.map +1 -1
- package/dist/util/login.js +11 -3
- package/dist/util/messages.d.ts +1 -1
- package/dist/util/messages.d.ts.map +1 -1
- package/dist/util/messages.js +4 -4
- package/package.json +5 -5
package/dist/config.js
CHANGED
|
@@ -146,8 +146,8 @@ function deleteLinkedConfig() {
|
|
|
146
146
|
|
|
147
147
|
async function writeHomeConfig(accessToken) {
|
|
148
148
|
const configPath = getHomeConfigPath();
|
|
149
|
-
(0, _messages.writingHomeConfigMsg)(configPath);
|
|
150
149
|
await _fsExtra.default.writeJSON(configPath, accessToken);
|
|
150
|
+
(0, _messages.writingHomeConfigDoneMsg)(configPath);
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
function deleteHomeConfig() {
|
package/dist/util/login.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/util/login.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/util/login.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AAGnC,eAAO,MAAM,gBAAgB;;;;GAM5B,CAAC;AAEF,wBAAsB,YAAY,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAiDrE;AAED,eAAO,MAAM,cAAc;;;;oBAKP,MAAM;;;;;IASzB,CAAC;AAEF,wBAAsB,YAAY,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAGrE;AAED,wBAAsB,yBAAyB,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAKhF;AAED,wBAAsB,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAoBlG"}
|
package/dist/util/login.js
CHANGED
|
@@ -38,7 +38,8 @@ async function loginBrowser(params) {
|
|
|
38
38
|
|
|
39
39
|
await (0, _open.default)(`${params.appUrl}/login?returnToCli=true&cliPort=${port}`, {
|
|
40
40
|
wait: false
|
|
41
|
-
});
|
|
41
|
+
});
|
|
42
|
+
let loginPromptUi; // Spin up an ad-hoc server to recive the auth token from the login page
|
|
42
43
|
|
|
43
44
|
return new Promise((resolve, reject) => {
|
|
44
45
|
const server = _http.default.createServer((req, res) => {
|
|
@@ -65,12 +66,19 @@ async function loginBrowser(params) {
|
|
|
65
66
|
reject(new Error('Did not receive auth token from webapp.'));
|
|
66
67
|
}
|
|
67
68
|
|
|
69
|
+
if (loginPromptUi) {
|
|
70
|
+
// @ts-expect-error `close` is protected but this is the suggested solution from here:
|
|
71
|
+
// https://github.com/SBoudrias/Inquirer.js/issues/941
|
|
72
|
+
loginPromptUi.close();
|
|
73
|
+
}
|
|
74
|
+
|
|
68
75
|
server.close();
|
|
69
|
-
process.exit(0);
|
|
70
76
|
});
|
|
71
77
|
|
|
72
78
|
server.listen(port, '127.0.0.1', async () => {
|
|
73
|
-
const
|
|
79
|
+
const loginPrompt = (0, _prompt.prompt)(waitingQuestions);
|
|
80
|
+
loginPromptUi = loginPrompt.ui;
|
|
81
|
+
const answers = await loginPrompt;
|
|
74
82
|
resolve(answers.token);
|
|
75
83
|
server.close();
|
|
76
84
|
});
|
package/dist/util/messages.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare const loginSuccess: () => void;
|
|
|
6
6
|
export declare const invalidLoginMsg: () => void;
|
|
7
7
|
export declare const missingPasswordMsg: () => void;
|
|
8
8
|
export declare const writingFilesMsg: () => void;
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const writingHomeConfigDoneMsg: (path: string) => void;
|
|
10
10
|
export declare const consoleWarning: () => void;
|
|
11
11
|
export declare function forgotPasswordWarning(params: CliConfig): void;
|
|
12
12
|
export declare function noProjectsError(params: CliConfig): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/util/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AAEnC,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,cAMlC;AAED,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,cAI/B;AAED,eAAO,MAAM,eAAe,YAAiD,CAAC;AAC9E,eAAO,MAAM,YAAY,YAAkC,CAAC;AAE5D,eAAO,MAAM,eAAe,YAA6C,CAAC;AAC1E,eAAO,MAAM,kBAAkB,YAE9B,CAAC;AAEF,eAAO,MAAM,eAAe,YAAgD,CAAC;AAC7E,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/util/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AAEnC,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,cAMlC;AAED,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,cAI/B;AAED,eAAO,MAAM,eAAe,YAAiD,CAAC;AAC9E,eAAO,MAAM,YAAY,YAAkC,CAAC;AAE5D,eAAO,MAAM,eAAe,YAA6C,CAAC;AAC1E,eAAO,MAAM,kBAAkB,YAE9B,CAAC;AAEF,eAAO,MAAM,eAAe,YAAgD,CAAC;AAC7E,eAAO,MAAM,wBAAwB,SAAU,MAAM,SAEpD,CAAC;AAEF,eAAO,MAAM,cAAc,YAM1B,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,QAEtD;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,QAEhD"}
|
package/dist/util/messages.js
CHANGED
|
@@ -10,7 +10,7 @@ exports.missingPasswordMsg = exports.loginSuccess = exports.invalidLoginMsg = vo
|
|
|
10
10
|
exports.noProjectsError = noProjectsError;
|
|
11
11
|
exports.waitingForLogin = void 0;
|
|
12
12
|
exports.warning = warning;
|
|
13
|
-
exports.
|
|
13
|
+
exports.writingHomeConfigDoneMsg = exports.writingFilesMsg = void 0;
|
|
14
14
|
|
|
15
15
|
var _chalk = _interopRequireDefault(require("chalk"));
|
|
16
16
|
|
|
@@ -43,11 +43,11 @@ exports.missingPasswordMsg = missingPasswordMsg;
|
|
|
43
43
|
const writingFilesMsg = info('Writing .takeshaperc, .graphqlconfig.');
|
|
44
44
|
exports.writingFilesMsg = writingFilesMsg;
|
|
45
45
|
|
|
46
|
-
const
|
|
47
|
-
(0, _log.default)(`
|
|
46
|
+
const writingHomeConfigDoneMsg = path => {
|
|
47
|
+
(0, _log.default)(`Personal access token saved to ${path}`);
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
-
exports.
|
|
50
|
+
exports.writingHomeConfigDoneMsg = writingHomeConfigDoneMsg;
|
|
51
51
|
const consoleWarning = warning('**************************************************************************************************\n' + ' Add the following to your vcs ignore file: \n' + ' .takeshaperc \n' + ' .graphqlconfig \n' + '**************************************************************************************************');
|
|
52
52
|
exports.consoleWarning = consoleWarning;
|
|
53
53
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takeshape/cli",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.126.1",
|
|
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.126.1",
|
|
29
|
+
"@takeshape/ssg": "8.126.1",
|
|
30
|
+
"@takeshape/streams": "8.126.1",
|
|
31
|
+
"@takeshape/util": "8.126.1",
|
|
32
32
|
"archiver": "^1.3.0",
|
|
33
33
|
"async-retry": "^1.2.1",
|
|
34
34
|
"bluebird": "^3.4.6",
|