@webiny/cli 0.0.0-unstable.aa00eecd97 β†’ 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 (42) 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/cli.js +0 -86
  10. package/commands/index.js +0 -20
  11. package/commands/run/index.js +0 -38
  12. package/commands/telemetry/index.js +0 -31
  13. package/commands/upgrade/index.js +0 -107
  14. package/commands/wcp/hooks.js +0 -133
  15. package/commands/wcp/index.js +0 -8
  16. package/commands/wcp/login.js +0 -228
  17. package/commands/wcp/logout.js +0 -28
  18. package/commands/wcp/project.js +0 -202
  19. package/commands/wcp/utils/getProjectEnvironment.js +0 -120
  20. package/commands/wcp/utils/getUser.js +0 -100
  21. package/commands/wcp/utils/getWcpPat.js +0 -5
  22. package/commands/wcp/utils/index.js +0 -17
  23. package/commands/wcp/utils/setProjectId.js +0 -44
  24. package/commands/wcp/utils/setWcpPat.js +0 -5
  25. package/commands/wcp/utils/sleep.js +0 -1
  26. package/commands/wcp/utils/updateUserLastActiveOn.js +0 -28
  27. package/commands/wcp/whoami.js +0 -43
  28. package/context.js +0 -137
  29. package/index.d.ts +0 -3
  30. package/types.d.ts +0 -113
  31. package/utils/PluginsContainer.js +0 -49
  32. package/utils/createProjectApplicationWorkspace.js +0 -16
  33. package/utils/getApiProjectApplicationFolder.js +0 -12
  34. package/utils/getProject.js +0 -48
  35. package/utils/getProjectApplication.js +0 -87
  36. package/utils/importModule.js +0 -43
  37. package/utils/index.d.ts +0 -1
  38. package/utils/index.js +0 -26
  39. package/utils/loadEnvVariables.js +0 -46
  40. package/utils/localStorage.js +0 -44
  41. package/utils/log.js +0 -67
  42. package/utils/sendEvent.js +0 -15
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://docs.webiny.com/docs/tutorials/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, ">=2")) {
26
- console.error(chalk.red(`"@webiny/cli" requires yarn >=2!`));
27
- process.exit(1);
28
- }
29
- } catch (err) {
30
- console.error(chalk.red(`"@webiny/cli" requires yarn >=2!`));
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
+ []