@webiny/cli 5.30.0-beta.0 → 5.31.0-beta.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/CHANGELOG.md +33 -0
- package/commands/index.js +8 -2
- package/commands/run/index.js +9 -1
- package/index.d.ts +3 -0
- package/index.js +3 -0
- package/package.json +5 -7
- package/types.d.ts +0 -36
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,39 @@
|
|
|
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.31.0-beta.0](https://github.com/webiny/webiny-js/compare/v5.30.0...v5.31.0-beta.0) (2022-08-16)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* improve setup-project script ([#2571](https://github.com/webiny/webiny-js/issues/2571)) ([6c010d9](https://github.com/webiny/webiny-js/commit/6c010d99a58e3974d0d7efaefc5ac9cea2abc113))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **handler-fastify:** add fastify as handler into the system ([#2546](https://github.com/webiny/webiny-js/issues/2546)) ([8d258aa](https://github.com/webiny/webiny-js/commit/8d258aa2ebd8562b79e395d7aeea6316405f7f4e))
|
|
17
|
+
* add support for custom React apps ([#2569](https://github.com/webiny/webiny-js/issues/2569)) ([f7af516](https://github.com/webiny/webiny-js/commit/f7af516d745b2da74da9497658f3fd9702d5a639))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
# [5.30.0](https://github.com/webiny/webiny-js/compare/v5.30.0-beta.1...v5.30.0) (2022-07-27)
|
|
24
|
+
|
|
25
|
+
**Note:** Version bump only for package @webiny/cli
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# [5.30.0-beta.1](https://github.com/webiny/webiny-js/compare/v5.30.0-beta.0...v5.30.0-beta.1) (2022-07-26)
|
|
32
|
+
|
|
33
|
+
**Note:** Version bump only for package @webiny/cli
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
6
39
|
# [5.30.0-beta.0](https://github.com/webiny/webiny-js/compare/v5.29.0...v5.30.0-beta.0) (2022-07-25)
|
|
7
40
|
|
|
8
41
|
|
package/commands/index.js
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
const run = require("./run");
|
|
2
2
|
const telemetry = require("./telemetry");
|
|
3
|
-
const wcp = require("./wcp");
|
|
4
3
|
const upgrade = require("./upgrade");
|
|
5
4
|
|
|
6
5
|
module.exports.createCommands = async (yargs, context) => {
|
|
7
|
-
context.plugins.register(run, telemetry, upgrade
|
|
6
|
+
context.plugins.register(run, telemetry, upgrade);
|
|
7
|
+
|
|
8
|
+
try {
|
|
9
|
+
const wcp = require("./wcp");
|
|
10
|
+
context.plugins.register(wcp);
|
|
11
|
+
} catch {
|
|
12
|
+
// Skip WCP command
|
|
13
|
+
}
|
|
8
14
|
|
|
9
15
|
await context.loadUserPlugins();
|
|
10
16
|
|
package/commands/run/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const camelCase = require("camelcase");
|
|
2
2
|
const findUp = require("find-up");
|
|
3
|
+
const path = require("path");
|
|
3
4
|
|
|
4
5
|
module.exports = {
|
|
5
6
|
type: "cli-command",
|
|
@@ -16,9 +17,16 @@ module.exports = {
|
|
|
16
17
|
},
|
|
17
18
|
async argv => {
|
|
18
19
|
const configFile = findUp.sync(["webiny.config.ts", "webiny.config.js"]);
|
|
19
|
-
|
|
20
|
+
let config = context.import(configFile);
|
|
20
21
|
|
|
21
22
|
const command = camelCase(argv.command);
|
|
23
|
+
if (typeof config === "function") {
|
|
24
|
+
config = config({
|
|
25
|
+
options: { ...argv, cwd: path.dirname(configFile) },
|
|
26
|
+
context
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
22
30
|
if (config.commands && typeof config.commands[command] === "function") {
|
|
23
31
|
return await config.commands[command]({ ...argv }, context);
|
|
24
32
|
}
|
package/index.d.ts
ADDED
package/index.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/cli",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.31.0-beta.0",
|
|
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.
|
|
17
|
-
"@webiny/wcp": "5.
|
|
16
|
+
"@webiny/telemetry": "5.31.0-beta.0",
|
|
17
|
+
"@webiny/wcp": "5.31.0-beta.0",
|
|
18
18
|
"boolean": "3.1.4",
|
|
19
19
|
"camelcase": "5.3.1",
|
|
20
20
|
"chalk": "4.1.2",
|
|
@@ -50,9 +50,7 @@
|
|
|
50
50
|
"@webiny/project-utils",
|
|
51
51
|
"@webiny/api-file-manager",
|
|
52
52
|
"@webiny/cli-plugin-deploy-pulumi",
|
|
53
|
-
"@webiny/
|
|
54
|
-
"@webiny/handler-http",
|
|
55
|
-
"@webiny/handler-args",
|
|
53
|
+
"@webiny/api",
|
|
56
54
|
"@webiny/handler-client",
|
|
57
55
|
"@webiny/api-elasticsearch",
|
|
58
56
|
"@webiny/api-tenancy",
|
|
@@ -66,5 +64,5 @@
|
|
|
66
64
|
]
|
|
67
65
|
}
|
|
68
66
|
},
|
|
69
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "dea7c56325ff140ef0e2d761f3e65708d46d401e"
|
|
70
68
|
}
|
package/types.d.ts
CHANGED
|
@@ -111,39 +111,3 @@ export interface CliContext {
|
|
|
111
111
|
get: (key: string) => any;
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Args received from the CLI.
|
|
117
|
-
*/
|
|
118
|
-
interface CliUpgradePluginOptions {
|
|
119
|
-
/**
|
|
120
|
-
* Targeted version of the upgrade.
|
|
121
|
-
*/
|
|
122
|
-
targetVersion: string;
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
*
|
|
126
|
-
*/
|
|
127
|
-
export interface CliUpgradePlugin extends Plugin {
|
|
128
|
-
/**
|
|
129
|
-
* Name of the plugin to differentiate from others.
|
|
130
|
-
* Something like: cli-upgrade-5.0.0
|
|
131
|
-
*/
|
|
132
|
-
name: string;
|
|
133
|
-
/**
|
|
134
|
-
* Type of the plugin.
|
|
135
|
-
*/
|
|
136
|
-
type: "cli-upgrade";
|
|
137
|
-
/**
|
|
138
|
-
* Version the plugin is for.
|
|
139
|
-
*/
|
|
140
|
-
version: string;
|
|
141
|
-
/**
|
|
142
|
-
* Is this plugin usable for the upgrade?
|
|
143
|
-
*/
|
|
144
|
-
canUpgrade?: (options: CliUpgradePluginOptions, context: CliContext) => Promise<boolean>;
|
|
145
|
-
/**
|
|
146
|
-
* Apply the upgrade.
|
|
147
|
-
*/
|
|
148
|
-
upgrade: (options: CliUpgradePluginOptions, context: CliContext) => Promise<void>;
|
|
149
|
-
}
|