@webiny/cli 6.0.0-beta.0 β†’ 6.0.0-rc.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.
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/README.md CHANGED
@@ -1,7 +1,11 @@
1
- # webiny-cli
2
- [![](https://img.shields.io/npm/dw/webiny-cli.svg)](https://www.npmjs.com/package/webiny-cli)
3
- [![](https://img.shields.io/npm/v/webiny-cli.svg)](https://www.npmjs.com/package/webiny-cli)
4
- [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
5
- [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
1
+ # @webiny/cli
6
2
 
7
- A pluggable tool to run commands within a Webiny project.
3
+ > [!NOTE]
4
+ > This package is part of the [Webiny](https://www.webiny.com) monorepo.
5
+ > It’s **included in every Webiny project by default** and is not meant to be used as a standalone package.
6
+
7
+ πŸ“˜ **Documentation:** [https://www.webiny.com/docs](https://www.webiny.com/docs)
8
+
9
+ ---
10
+
11
+ _This README file is automatically generated during the publish process._
package/bin.js CHANGED
@@ -1,38 +1,15 @@
1
1
  #!/usr/bin/env node
2
- "use strict";
2
+ import "tsx/esm";
3
3
 
4
- const chalk = require("chalk");
5
- const execa = require("execa");
6
- const semver = require("semver");
7
- const currentNodeVersion = process.versions.node;
4
+ // Suppress punycode warnings. This is a known issue we can't fix.
5
+ import "./utils/suppressPunycodeWarnings.js";
8
6
 
9
- (async () => {
10
- if (!semver.satisfies(currentNodeVersion, ">=14")) {
11
- console.error(
12
- chalk.red(
13
- [
14
- `You are running Node.js ${currentNodeVersion}, but Webiny requires version 14 or higher.`,
15
- `Please switch to one of the required versions and try again.`,
16
- `For more information, please visit https://www.webiny.com/docs/get-started/install-webiny#prerequisites.`
17
- ].join(" ")
18
- )
19
- );
20
- process.exit(1);
21
- }
7
+ import { Cli } from "@webiny/cli-core";
8
+ import { ensureSystemRequirements } from "@webiny/system-requirements";
22
9
 
23
- try {
24
- const { stdout } = await execa("yarn", ["--version"]);
25
- if (!semver.satisfies(stdout, ">=3")) {
26
- console.error(chalk.red(`"@webiny/cli" requires yarn 3 or 4!`));
27
- process.exit(1);
28
- }
29
- } catch (err) {
30
- console.error(chalk.red(`"@webiny/cli" requires yarn 3 or 4!`));
31
- console.log(
32
- `Run ${chalk.blue("yarn set version berry")} to install a compatible version of yarn.`
33
- );
34
- process.exit(1);
35
- }
10
+ // Ensure system requirements are met.
11
+ ensureSystemRequirements();
36
12
 
37
- require("./cli");
38
- })();
13
+ const cli = await Cli.init();
14
+
15
+ await cli.run();
@@ -0,0 +1 @@
1
+ []