@camox/cli 0.28.1 → 0.28.3
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.
- package/dist/index.mjs +22 -11
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -673,10 +673,29 @@ const parser$5 = command("init", object({ command: constant("init") }));
|
|
|
673
673
|
const handler$5 = init;
|
|
674
674
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
675
675
|
const ownPkg = JSON.parse(fs.readFileSync(path.resolve(__dirname, "..", "package.json"), "utf-8"));
|
|
676
|
+
const PNPM_VERSION = "11.1.3";
|
|
677
|
+
const PNPM_WORKSPACE = `allowBuilds:
|
|
678
|
+
core-js: true
|
|
679
|
+
msw: true
|
|
680
|
+
protobufjs: true
|
|
681
|
+
`;
|
|
676
682
|
function onCancel() {
|
|
677
683
|
p.cancel("Cancelled.");
|
|
678
684
|
process.exit(0);
|
|
679
685
|
}
|
|
686
|
+
function runCommand(bin, args, cwd) {
|
|
687
|
+
return new Promise((resolve, reject) => {
|
|
688
|
+
const child = spawn(bin, args, {
|
|
689
|
+
cwd,
|
|
690
|
+
stdio: "ignore"
|
|
691
|
+
});
|
|
692
|
+
child.on("close", (code) => {
|
|
693
|
+
if (code === 0) resolve();
|
|
694
|
+
else reject(/* @__PURE__ */ new Error(`Exit code ${code}`));
|
|
695
|
+
});
|
|
696
|
+
child.on("error", reject);
|
|
697
|
+
});
|
|
698
|
+
}
|
|
680
699
|
const CREATE_NEW_ORG = "__create_new__";
|
|
681
700
|
async function selectOrCreateOrganization(token) {
|
|
682
701
|
const orgs = await listOrganizations(token);
|
|
@@ -814,7 +833,9 @@ async function init() {
|
|
|
814
833
|
pkg.name = project.slug;
|
|
815
834
|
delete pkg.version;
|
|
816
835
|
pkg.dependencies.camox = `^${ownPkg.version}`;
|
|
836
|
+
if (pm === "pnpm") pkg.packageManager = `pnpm@${PNPM_VERSION}`;
|
|
817
837
|
fs.writeFileSync(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`);
|
|
838
|
+
if (pm === "pnpm") fs.writeFileSync(path.join(targetDir, "pnpm-workspace.yaml"), PNPM_WORKSPACE);
|
|
818
839
|
fs.writeFileSync(path.join(targetDir, ".env"), `CAMOX_SYNC_SECRET=${project.syncSecret}\n`);
|
|
819
840
|
fs.writeFileSync(path.join(targetDir, ".gitignore"), `node_modules
|
|
820
841
|
.DS_Store
|
|
@@ -843,17 +864,7 @@ src/routeTree.gen.ts
|
|
|
843
864
|
const s2 = p.spinner();
|
|
844
865
|
s2.start(`Running ${installCmd}...`);
|
|
845
866
|
try {
|
|
846
|
-
await
|
|
847
|
-
const child = spawn(installBin, installArgs, {
|
|
848
|
-
cwd: targetDir,
|
|
849
|
-
stdio: "ignore"
|
|
850
|
-
});
|
|
851
|
-
child.on("close", (code) => {
|
|
852
|
-
if (code === 0) resolve();
|
|
853
|
-
else reject(/* @__PURE__ */ new Error(`Exit code ${code}`));
|
|
854
|
-
});
|
|
855
|
-
child.on("error", reject);
|
|
856
|
-
});
|
|
867
|
+
await runCommand(installBin, installArgs, targetDir);
|
|
857
868
|
s2.stop("Dependencies installed!");
|
|
858
869
|
} catch {
|
|
859
870
|
s2.stop("Install failed.");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camox/cli",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.3",
|
|
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.
|
|
29
|
+
"@camox/api-contract": "0.28.3"
|
|
30
30
|
},
|
|
31
31
|
"nx": {
|
|
32
32
|
"tags": [
|