@vexblocks/cli 1.0.2 → 1.0.4

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 (3) hide show
  1. package/README.md +5 -5
  2. package/dist/index.js +20 -12
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -35,7 +35,7 @@ pnpm dev
35
35
 
36
36
  ## Commands
37
37
 
38
- ### `vexblocks init`
38
+ ### `@vexblocks/cli init`
39
39
 
40
40
  Initialize a new VexBlocks project or add VexBlocks to an existing Turborepo.
41
41
 
@@ -44,7 +44,7 @@ npx @vexblocks/cli init
44
44
  npx @vexblocks/cli init --cwd ./my-project
45
45
  ```
46
46
 
47
- ### `vexblocks add`
47
+ ### `@vexblocks/cli add`
48
48
 
49
49
  Add VexBlocks packages to your project.
50
50
 
@@ -73,7 +73,7 @@ npx @vexblocks/cli add cms --overwrite
73
73
  | `types` | TypeScript type generator | `packages/type-generator` |
74
74
  | `all` | All packages | - |
75
75
 
76
- ### `vexblocks upgrade`
76
+ ### `@vexblocks/cli upgrade`
77
77
 
78
78
  Upgrade VexBlocks packages to the latest version.
79
79
 
@@ -91,7 +91,7 @@ npx @vexblocks/cli upgrade cms
91
91
  npx @vexblocks/cli upgrade --force
92
92
  ```
93
93
 
94
- ### `vexblocks diff`
94
+ ### `@vexblocks/cli diff`
95
95
 
96
96
  Show differences between local files and the latest version.
97
97
 
@@ -102,7 +102,7 @@ npx @vexblocks/cli diff backend
102
102
 
103
103
  ## Project Structure
104
104
 
105
- After running `vexblocks add all`, your project will have:
105
+ After running `npx @vexblocks/cli add all`, your project will have:
106
106
 
107
107
  ```
108
108
  your-project/
package/dist/index.js CHANGED
@@ -303,7 +303,7 @@ async function addCommand(packages, options) {
303
303
  if (!isTurbo) {
304
304
  logger.error("This is not a Turborepo project.");
305
305
  logger.info(
306
- `Run ${pc2.cyan("npx vexblocks init")} first to set up your project.`
306
+ `Run ${pc2.cyan("npx @vexblocks/cli init")} first to set up your project.`
307
307
  );
308
308
  process.exit(1);
309
309
  }
@@ -586,7 +586,9 @@ async function diffCommand(packageArg, options) {
586
586
  logger.title("\u{1F50D} VexBlocks Diff");
587
587
  const manifest = await readManifest(cwd);
588
588
  if (!manifest) {
589
- logger.error("No vexblocks.json found. Run `vexblocks init` first.");
589
+ logger.error(
590
+ "No vexblocks.json found. Run `npx @vexblocks/cli init` first."
591
+ );
590
592
  process.exit(1);
591
593
  }
592
594
  const installedPackages = Object.keys(manifest.packages);
@@ -698,7 +700,7 @@ async function diffCommand(packageArg, options) {
698
700
  logger.log(` ${pc3.red(`-${deletedFiles}`)} files removed in remote`);
699
701
  logger.break();
700
702
  logger.info(
701
- `Run ${pc3.cyan("npx vexblocks upgrade")} to update to the latest version.`
703
+ `Run ${pc3.cyan("npx @vexblocks/cli upgrade")} to update to the latest version.`
702
704
  );
703
705
  }
704
706
  } catch (error) {
@@ -761,7 +763,7 @@ async function initCommand(options) {
761
763
  default: false
762
764
  });
763
765
  if (!continueAnyway) {
764
- logger.info("Run `vexblocks add <package>` to add packages.");
766
+ logger.info("Run `npx @vexblocks/cli add <package>` to add packages.");
765
767
  return;
766
768
  }
767
769
  }
@@ -822,7 +824,7 @@ async function createNewProject(cwd, options) {
822
824
  await fs6.ensureDir(path6.join(projectDir, "packages"));
823
825
  const packageJson = {
824
826
  name: projectName,
825
- version: "0.1.0",
827
+ version: "0.2.0",
826
828
  private: true,
827
829
  packageManager: "pnpm@9.15.0",
828
830
  workspaces: ["apps/*", "packages/*"],
@@ -937,7 +939,7 @@ FRONTEND_URL=http://localhost:3000
937
939
  pc4.bold("Next steps:"),
938
940
  `1. ${pc4.cyan(`cd ${projectName}`)}`,
939
941
  `2. ${pc4.cyan("pnpm install")}`,
940
- `3. ${pc4.cyan("npx vexblocks add all")}`,
942
+ `3. ${pc4.cyan("npx @vexblocks/cli add all")}`,
941
943
  "4. Set up your Convex project",
942
944
  `5. ${pc4.cyan("pnpm dev")}`
943
945
  ]);
@@ -947,7 +949,7 @@ FRONTEND_URL=http://localhost:3000
947
949
  });
948
950
  if (addPackages) {
949
951
  logger.break();
950
- logger.info(`Run: ${pc4.cyan("npx vexblocks add all")}`);
952
+ logger.info(`Run: ${pc4.cyan("npx @vexblocks/cli add all")}`);
951
953
  logger.info("After navigating to your project directory.");
952
954
  }
953
955
  } catch (error) {
@@ -978,10 +980,12 @@ async function initializeExisting(cwd, _options) {
978
980
  `Version: ${pc4.cyan(version)}`,
979
981
  "",
980
982
  pc4.bold("Next steps:"),
981
- `1. ${pc4.cyan("npx vexblocks add all")} - Add all CMS packages`,
983
+ `1. ${pc4.cyan("npx @vexblocks/cli add all")} - Add all CMS packages`,
982
984
  "2. Configure your environment variables",
983
985
  `3. ${pc4.cyan(`${packageManager} install`)}`,
984
- `4. ${pc4.cyan(`${packageManager === "npm" ? "npm run" : packageManager} dev`)}`
986
+ `4. ${pc4.cyan(
987
+ `${packageManager === "npm" ? "npm run" : packageManager} dev`
988
+ )}`
985
989
  ]);
986
990
  } catch (error) {
987
991
  spinner.fail("Failed to initialize");
@@ -1000,7 +1004,9 @@ async function upgradeCommand(packages, options) {
1000
1004
  logger.title("\u2B06\uFE0F Upgrade VexBlocks Packages");
1001
1005
  const manifest = await readManifest(cwd);
1002
1006
  if (!manifest) {
1003
- logger.error("No vexblocks.json found. Run `vexblocks init` first.");
1007
+ logger.error(
1008
+ "No vexblocks.json found. Run `npx @vexblocks/cli init` first."
1009
+ );
1004
1010
  process.exit(1);
1005
1011
  }
1006
1012
  const spinner = ora4("Checking for updates...").start();
@@ -1008,7 +1014,9 @@ async function upgradeCommand(packages, options) {
1008
1014
  spinner.stop();
1009
1015
  const installedPackages = Object.keys(manifest.packages);
1010
1016
  if (installedPackages.length === 0) {
1011
- logger.info("No packages installed. Run `vexblocks add <package>` first.");
1017
+ logger.info(
1018
+ "No packages installed. Run `npx @vexblocks/cli add <package>` first."
1019
+ );
1012
1020
  return;
1013
1021
  }
1014
1022
  let packagesToUpgrade;
@@ -1065,7 +1073,7 @@ async function upgradeCommand(packages, options) {
1065
1073
  if (options.check) {
1066
1074
  logger.break();
1067
1075
  logger.info(
1068
- `Run ${pc5.cyan("npx vexblocks upgrade")} to apply these updates.`
1076
+ `Run ${pc5.cyan("npx @vexblocks/cli upgrade")} to apply these updates.`
1069
1077
  );
1070
1078
  return;
1071
1079
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vexblocks/cli",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "CLI for adding VexBlocks Headless CMS to your Turborepo project",
5
5
  "keywords": [
6
6
  "cms",