@webiny/cli 0.0.0-unstable.aad28a72ae → 0.0.0-unstable.ac6ebf63c6

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 (43) 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 -54
  7. package/utils/ensureSameWebinyPackageVersions.js +99 -0
  8. package/utils/suppressPunycodeWarnings.js +7 -0
  9. package/CHANGELOG.md +0 -3617
  10. package/cli.js +0 -86
  11. package/commands/index.js +0 -20
  12. package/commands/run/index.js +0 -38
  13. package/commands/telemetry/index.js +0 -31
  14. package/commands/upgrade/index.js +0 -107
  15. package/commands/wcp/hooks.js +0 -133
  16. package/commands/wcp/index.js +0 -8
  17. package/commands/wcp/login.js +0 -228
  18. package/commands/wcp/logout.js +0 -28
  19. package/commands/wcp/project.js +0 -202
  20. package/commands/wcp/utils/getProjectEnvironment.js +0 -120
  21. package/commands/wcp/utils/getUser.js +0 -100
  22. package/commands/wcp/utils/getWcpPat.js +0 -5
  23. package/commands/wcp/utils/index.js +0 -17
  24. package/commands/wcp/utils/setProjectId.js +0 -44
  25. package/commands/wcp/utils/setWcpPat.js +0 -5
  26. package/commands/wcp/utils/sleep.js +0 -1
  27. package/commands/wcp/utils/updateUserLastActiveOn.js +0 -28
  28. package/commands/wcp/whoami.js +0 -43
  29. package/context.js +0 -137
  30. package/index.d.ts +0 -3
  31. package/types.d.ts +0 -113
  32. package/utils/PluginsContainer.js +0 -49
  33. package/utils/createProjectApplicationWorkspace.js +0 -16
  34. package/utils/getApiProjectApplicationFolder.js +0 -12
  35. package/utils/getProject.js +0 -48
  36. package/utils/getProjectApplication.js +0 -87
  37. package/utils/importModule.js +0 -43
  38. package/utils/index.d.ts +0 -1
  39. package/utils/index.js +0 -26
  40. package/utils/loadEnvVariables.js +0 -46
  41. package/utils/localStorage.js +0 -44
  42. package/utils/log.js +0 -67
  43. package/utils/sendEvent.js +0 -15
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,15 +0,0 @@
1
- const { sendEvent } = require("@webiny/telemetry/cli");
2
- const getProject = require("./getProject");
3
-
4
- module.exports = ({ event, properties, extraPayload }) => {
5
- const project = getProject();
6
- if (project.config.cli && project.config.cli.telemetry === false) {
7
- return;
8
- }
9
-
10
- return sendEvent({
11
- event,
12
- properties,
13
- extraPayload
14
- });
15
- };