@webiny/cli 6.0.0-beta.0 → 6.0.0-rc.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.
Files changed (48) hide show
  1. package/README.md +10 -6
  2. package/bin.js +10 -33
  3. package/files/duplicates.json +1 -0
  4. package/files/references.json +1 -0
  5. package/index.js +2 -2
  6. package/package.json +16 -55
  7. package/utils/ensureSameWebinyPackageVersions.js +99 -0
  8. package/utils/suppressPunycodeWarnings.js +7 -0
  9. package/cli.js +0 -93
  10. package/commands/about/getDatabaseSetup.js +0 -45
  11. package/commands/about/getNpmVersion.js +0 -10
  12. package/commands/about/getNpxVersion.js +0 -10
  13. package/commands/about/getPulumiVersions.js +0 -43
  14. package/commands/about/getYarnVersion.js +0 -10
  15. package/commands/about/index.js +0 -97
  16. package/commands/index.js +0 -21
  17. package/commands/run/index.js +0 -38
  18. package/commands/telemetry/index.js +0 -31
  19. package/commands/upgrade/index.js +0 -108
  20. package/commands/wcp/hooks.js +0 -133
  21. package/commands/wcp/index.js +0 -8
  22. package/commands/wcp/login.js +0 -227
  23. package/commands/wcp/logout.js +0 -28
  24. package/commands/wcp/project.js +0 -202
  25. package/commands/wcp/utils/getProjectEnvironment.js +0 -120
  26. package/commands/wcp/utils/getUser.js +0 -100
  27. package/commands/wcp/utils/getWcpOrgProjectId.js +0 -9
  28. package/commands/wcp/utils/getWcpPat.js +0 -5
  29. package/commands/wcp/utils/getWcpProjectId.js +0 -3
  30. package/commands/wcp/utils/index.js +0 -21
  31. package/commands/wcp/utils/setProjectId.js +0 -44
  32. package/commands/wcp/utils/setWcpPat.js +0 -5
  33. package/commands/wcp/utils/sleep.js +0 -1
  34. package/commands/wcp/utils/updateUserLastActiveOn.js +0 -28
  35. package/commands/wcp/whoami.js +0 -43
  36. package/context.js +0 -137
  37. package/index.d.ts +0 -3
  38. package/types.d.ts +0 -172
  39. package/utils/PluginsContainer.js +0 -49
  40. package/utils/createProjectApplicationWorkspace.js +0 -16
  41. package/utils/getProject.js +0 -48
  42. package/utils/getProjectApplication.js +0 -83
  43. package/utils/importModule.js +0 -43
  44. package/utils/index.js +0 -24
  45. package/utils/loadEnvVariables.js +0 -63
  46. package/utils/localStorage.js +0 -44
  47. package/utils/log.js +0 -67
  48. package/utils/sendEvent.js +0 -11
package/utils/log.js DELETED
@@ -1,67 +0,0 @@
1
- const chalk = require("chalk");
2
-
3
- const logColors = {
4
- log: v => v,
5
- info: chalk.blueBright,
6
- error: chalk.red,
7
- warning: chalk.yellow,
8
- debug: chalk.gray,
9
- success: chalk.green
10
- };
11
-
12
- const colorizePlaceholders = (type, string) => {
13
- return string.replace(/\%[a-zA-Z]/g, match => {
14
- return logColors[type](match);
15
- });
16
- };
17
-
18
- const webinyLog = (type, ...args) => {
19
- const prefix = `webiny ${logColors[type](type)}: `;
20
-
21
- const [first, ...rest] = args;
22
- if (typeof first === "string") {
23
- return console.log(prefix + colorizePlaceholders(type, first), ...rest);
24
- }
25
- return console.log(prefix, first, ...rest);
26
- };
27
-
28
- const functions = {
29
- log(...args) {
30
- webinyLog("log", ...args);
31
- },
32
-
33
- info(...args) {
34
- webinyLog("info", ...args);
35
- },
36
-
37
- success(...args) {
38
- webinyLog("success", ...args);
39
- },
40
-
41
- debug(...args) {
42
- webinyLog("debug", ...args);
43
- },
44
-
45
- warning(...args) {
46
- webinyLog("warning", ...args);
47
- },
48
-
49
- error(...args) {
50
- webinyLog("error", ...args);
51
- }
52
- };
53
-
54
- functions.log.highlight = chalk.highlight;
55
- functions.log.hl = chalk.highlight;
56
- functions.info.highlight = chalk.blue;
57
- functions.info.hl = chalk.blueBright;
58
- functions.success.highlight = chalk.green;
59
- functions.success.hl = chalk.green;
60
- functions.debug.highlight = chalk.gray;
61
- functions.debug.hl = chalk.gray;
62
- functions.warning.highlight = chalk.yellow;
63
- functions.warning.hl = chalk.yellow;
64
- functions.error.highlight = chalk.red;
65
- functions.error.hl = chalk.red;
66
-
67
- module.exports = functions;
@@ -1,11 +0,0 @@
1
- const { sendEvent } = require("@webiny/telemetry/cli");
2
- const getProject = require("./getProject");
3
-
4
- module.exports = (event, properties) => {
5
- const project = getProject();
6
- if (project.config.cli && project.config.cli.telemetry === false) {
7
- return;
8
- }
9
-
10
- return sendEvent({ event, properties });
11
- };