@webiny/cli 5.33.0-beta.0 → 5.33.0-beta.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/CHANGELOG.md +13 -0
- package/commands/wcp/login.js +5 -5
- package/commands/wcp/project.js +22 -4
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [5.33.0-beta.1](https://github.com/webiny/webiny-js/compare/v5.33.0-beta.0...v5.33.0-beta.1) (2022-10-12)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* deprecate `init` method and introduce `link` ([2fe6bf1](https://github.com/webiny/webiny-js/commit/2fe6bf17fdd0554af6130accb1b88fc0996a0370))
|
|
12
|
+
* replace word `init` with `link` ([8309a57](https://github.com/webiny/webiny-js/commit/8309a57ec98c672382f600c82ca7af2c212caff2))
|
|
13
|
+
* switch the order of commands ([1e37a6a](https://github.com/webiny/webiny-js/commit/1e37a6af290e50366fe625e587c2372f382cb4f5))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
6
19
|
# [5.33.0-beta.0](https://github.com/webiny/webiny-js/compare/v5.32.0...v5.33.0-beta.0) (2022-10-11)
|
|
7
20
|
|
|
8
21
|
|
package/commands/wcp/login.js
CHANGED
|
@@ -183,7 +183,7 @@ module.exports.command = () => ({
|
|
|
183
183
|
context.project.config.id || process.env.WCP_PROJECT_ID
|
|
184
184
|
);
|
|
185
185
|
|
|
186
|
-
// If we have `orgId` and `projectId` in PAT's
|
|
186
|
+
// If we have `orgId` and `projectId` in PAT's metadata, let's immediately link the project.
|
|
187
187
|
if (pat.meta && pat.meta.orgId && pat.meta.projectId) {
|
|
188
188
|
await sleep();
|
|
189
189
|
|
|
@@ -192,7 +192,7 @@ module.exports.command = () => ({
|
|
|
192
192
|
const { orgId, projectId } = pat.meta;
|
|
193
193
|
|
|
194
194
|
const id = `${orgId}/${projectId}`;
|
|
195
|
-
console.log(`Project ${chalk.green(id)} detected.
|
|
195
|
+
console.log(`Project ${chalk.green(id)} detected. Linking...`);
|
|
196
196
|
|
|
197
197
|
await sleep();
|
|
198
198
|
|
|
@@ -202,7 +202,7 @@ module.exports.command = () => ({
|
|
|
202
202
|
projectId
|
|
203
203
|
});
|
|
204
204
|
|
|
205
|
-
console.log(`Project ${context.success.hl(id)}
|
|
205
|
+
console.log(`Project ${context.success.hl(id)} linked successfully.`);
|
|
206
206
|
projectInitialized = true;
|
|
207
207
|
}
|
|
208
208
|
|
|
@@ -213,8 +213,8 @@ module.exports.command = () => ({
|
|
|
213
213
|
|
|
214
214
|
if (!projectInitialized) {
|
|
215
215
|
console.log(
|
|
216
|
-
`‣
|
|
217
|
-
"yarn webiny project
|
|
216
|
+
`‣ link your project via the ${chalk.green(
|
|
217
|
+
"yarn webiny project link"
|
|
218
218
|
)} command`
|
|
219
219
|
);
|
|
220
220
|
}
|
package/commands/wcp/project.js
CHANGED
|
@@ -12,9 +12,27 @@ module.exports.command = () => [
|
|
|
12
12
|
["project <command>"],
|
|
13
13
|
`Webiny project-related commands`,
|
|
14
14
|
projectCommand => {
|
|
15
|
+
projectCommand.command(
|
|
16
|
+
"link",
|
|
17
|
+
`Link a Webiny project with Webiny Control Panel (WCP)`,
|
|
18
|
+
command => {
|
|
19
|
+
yargs.option("debug", {
|
|
20
|
+
describe: `Turn on debug logs`,
|
|
21
|
+
type: "boolean"
|
|
22
|
+
});
|
|
23
|
+
yargs.option("debug-level", {
|
|
24
|
+
default: 1,
|
|
25
|
+
describe: `Set the debug logs verbosity level`,
|
|
26
|
+
type: "number"
|
|
27
|
+
});
|
|
28
|
+
command.example("$0 project link");
|
|
29
|
+
},
|
|
30
|
+
() => handler({ context })
|
|
31
|
+
);
|
|
32
|
+
|
|
15
33
|
projectCommand.command(
|
|
16
34
|
"init",
|
|
17
|
-
`Initialize a Webiny project`,
|
|
35
|
+
`Initialize a Webiny project (deprecated, please use the link command instead)`,
|
|
18
36
|
command => {
|
|
19
37
|
yargs.option("debug", {
|
|
20
38
|
describe: `Turn on debug logs`,
|
|
@@ -39,13 +57,13 @@ const handler = async ({ context }) => {
|
|
|
39
57
|
// Check login.
|
|
40
58
|
const user = await getUser();
|
|
41
59
|
|
|
42
|
-
// User already
|
|
60
|
+
// User already linked a project?
|
|
43
61
|
const { id: orgProjectId } = context.project.config;
|
|
44
62
|
if (orgProjectId) {
|
|
45
63
|
const [, projectId] = orgProjectId.split("/");
|
|
46
64
|
const project = user.projects.find(item => item.id === projectId);
|
|
47
65
|
if (project) {
|
|
48
|
-
console.log(`Your ${chalk.green(orgProjectId)} project has already been
|
|
66
|
+
console.log(`Your ${chalk.green(orgProjectId)} project has already been linked.`);
|
|
49
67
|
|
|
50
68
|
const prompt = inquirer.createPromptModule();
|
|
51
69
|
const { proceed } = await prompt({
|
|
@@ -170,7 +188,7 @@ const handler = async ({ context }) => {
|
|
|
170
188
|
console.log(
|
|
171
189
|
`${chalk.green("✔")} Project ${context.success.hl(
|
|
172
190
|
selectedProject.name
|
|
173
|
-
)}
|
|
191
|
+
)} linked successfully.`
|
|
174
192
|
);
|
|
175
193
|
|
|
176
194
|
await sleep();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/cli",
|
|
3
|
-
"version": "5.33.0-beta.
|
|
3
|
+
"version": "5.33.0-beta.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"bin": {
|
|
6
6
|
"webiny": "./bin.js"
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"author": "Pavel Denisjuk <pavel@webiny.com>",
|
|
14
14
|
"description": "A tool to bootstrap a Webiny project.",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@webiny/telemetry": "5.33.0-beta.
|
|
17
|
-
"@webiny/wcp": "5.33.0-beta.
|
|
16
|
+
"@webiny/telemetry": "5.33.0-beta.1",
|
|
17
|
+
"@webiny/wcp": "5.33.0-beta.1",
|
|
18
18
|
"boolean": "3.1.4",
|
|
19
19
|
"camelcase": "5.3.1",
|
|
20
20
|
"chalk": "4.1.2",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
]
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "537fe39e2309315f01aa41b1e4cacddccee9a10b"
|
|
68
68
|
}
|