@camox/cli 0.28.4 → 0.28.5

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 (2) hide show
  1. package/dist/index.mjs +10 -0
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -742,6 +742,12 @@ function onCancel() {
742
742
  p.cancel("Cancelled.");
743
743
  process.exit(0);
744
744
  }
745
+ function versionFromSpecifier(specifier, dependency) {
746
+ if (typeof specifier !== "string") throw new Error(`Expected ${dependency} to use a string version specifier.`);
747
+ const match = specifier.match(/\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?/);
748
+ if (match) return match[0];
749
+ throw new Error(`Could not infer a concrete version from ${dependency}@${specifier}.`);
750
+ }
745
751
  function runCommand(bin, args, cwd) {
746
752
  return new Promise((resolve, reject) => {
747
753
  const child = spawn(bin, args, {
@@ -937,6 +943,10 @@ async function init() {
937
943
  delete pkg.version;
938
944
  pkg.dependencies.camox = `^${ownPkg.version}`;
939
945
  pkg.packageManager = packageManagerVersions[pm];
946
+ if (pm === "yarn") {
947
+ const vitePlusVersion = versionFromSpecifier(pkg.devDependencies["vite-plus"], "vite-plus");
948
+ pkg.devDependencies.vite = `npm:@voidzero-dev/vite-plus-core@${vitePlusVersion}`;
949
+ }
940
950
  fs.writeFileSync(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`);
941
951
  if (pm === "pnpm") fs.writeFileSync(path.join(targetDir, "pnpm-workspace.yaml"), PNPM_WORKSPACE);
942
952
  fs.writeFileSync(path.join(targetDir, ".env"), `CAMOX_SYNC_SECRET=${project.syncSecret}\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camox/cli",
3
- "version": "0.28.4",
3
+ "version": "0.28.5",
4
4
  "bin": {
5
5
  "camox": "./dist/index.mjs"
6
6
  },
@@ -26,7 +26,7 @@
26
26
  "@types/node": "^24.12.4",
27
27
  "@typescript/native-preview": "7.0.0-dev.20260412.1",
28
28
  "vite-plus": "^0.1.21",
29
- "@camox/api-contract": "0.28.4"
29
+ "@camox/api-contract": "0.28.5"
30
30
  },
31
31
  "nx": {
32
32
  "tags": [