@primstack/cli 0.0.3 → 0.0.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.
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  // src/index.ts
4
4
  import { Command as Command34 } from "commander";
5
+ import { createRequire } from "module";
5
6
 
6
7
  // src/commands/init/index.ts
7
8
  import { Command } from "commander";
@@ -1812,9 +1813,9 @@ async function promptForFields() {
1812
1813
  async function getProjectName(cwd) {
1813
1814
  const rootPackageJson = path10.join(cwd, "package.json");
1814
1815
  if (await fs10.pathExists(rootPackageJson)) {
1815
- const pkg = await fs10.readJson(rootPackageJson);
1816
- if (pkg.name) {
1817
- return pkg.name.replace(/^@/, "").split("/")[0];
1816
+ const pkg2 = await fs10.readJson(rootPackageJson);
1817
+ if (pkg2.name) {
1818
+ return pkg2.name.replace(/^@/, "").split("/")[0];
1818
1819
  }
1819
1820
  }
1820
1821
  return path10.basename(cwd);
@@ -3254,8 +3255,8 @@ async function validateStripeConfig(cwd) {
3254
3255
  }
3255
3256
  const apiPkgPath = path15.join(cwd, "apps", "api", "package.json");
3256
3257
  if (await fs15.pathExists(apiPkgPath)) {
3257
- const pkg = await fs15.readJson(apiPkgPath);
3258
- if (!pkg.dependencies?.stripe) {
3258
+ const pkg2 = await fs15.readJson(apiPkgPath);
3259
+ if (!pkg2.dependencies?.stripe) {
3259
3260
  errors.push('Stripe package not found in dependencies. Run "prim integrations add stripe".');
3260
3261
  }
3261
3262
  }
@@ -6044,8 +6045,8 @@ async function installAuthJoyPackage(context) {
6044
6045
  if (context.isFullstack) {
6045
6046
  const webPackageJson = path53.join(context.cwd, "apps", "web", "package.json");
6046
6047
  if (await fs52.pathExists(webPackageJson)) {
6047
- const pkg = await fs52.readJson(webPackageJson);
6048
- const packageName = pkg.name || "@app/web";
6048
+ const pkg2 = await fs52.readJson(webPackageJson);
6049
+ const packageName = pkg2.name || "@app/web";
6049
6050
  execFileSync("pnpm", ["--filter", packageName, "add", "@authjoyio/react"], {
6050
6051
  cwd: context.cwd,
6051
6052
  stdio: "ignore"
@@ -9058,8 +9059,8 @@ async function detectFromPackageJson(cwd) {
9058
9059
  const pkgPath = path67.join(cwd, "package.json");
9059
9060
  if (!await fs56.pathExists(pkgPath)) return null;
9060
9061
  try {
9061
- const pkg = await fs56.readJson(pkgPath);
9062
- const deps = { ...pkg.dependencies, ...pkg.devDependencies };
9062
+ const pkg2 = await fs56.readJson(pkgPath);
9063
+ const deps = { ...pkg2.dependencies, ...pkg2.devDependencies };
9063
9064
  if (deps["next"]) {
9064
9065
  const hasNextOnPages = deps["@cloudflare/next-on-pages"] !== void 0;
9065
9066
  if (hasNextOnPages) {
@@ -9085,10 +9086,10 @@ async function detectFromPackageJson(cwd) {
9085
9086
  outputDir: "dist"
9086
9087
  };
9087
9088
  }
9088
- if (pkg.scripts?.build) {
9089
+ if (pkg2.scripts?.build) {
9089
9090
  return {
9090
9091
  framework: "static",
9091
- buildCommand: pkg.scripts.build,
9092
+ buildCommand: pkg2.scripts.build,
9092
9093
  outputDir: "dist"
9093
9094
  };
9094
9095
  }
@@ -9099,8 +9100,8 @@ async function detectFromPackageJson(cwd) {
9099
9100
  async function detectNextOnPages(cwd) {
9100
9101
  const pkgPath = path67.join(cwd, "package.json");
9101
9102
  try {
9102
- const pkg = await fs56.readJson(pkgPath);
9103
- const deps = { ...pkg.dependencies, ...pkg.devDependencies };
9103
+ const pkg2 = await fs56.readJson(pkgPath);
9104
+ const deps = { ...pkg2.dependencies, ...pkg2.devDependencies };
9104
9105
  return deps["@cloudflare/next-on-pages"] !== void 0;
9105
9106
  } catch {
9106
9107
  return false;
@@ -10095,8 +10096,10 @@ var upgradeCommand = new Command33("upgrade").description("Upgrade your Primstac
10095
10096
  });
10096
10097
 
10097
10098
  // src/index.ts
10099
+ var require2 = createRequire(import.meta.url);
10100
+ var pkg = require2("../package.json");
10098
10101
  var program = new Command34();
10099
- program.name("prim").description("CLI for Primstack component library").version("0.0.1");
10102
+ program.name("prim").description("CLI for Primstack component library").version(pkg.version);
10100
10103
  program.addCommand(initCommand);
10101
10104
  program.addCommand(addCommand);
10102
10105
  program.addCommand(themeCommand);
@@ -19,13 +19,12 @@
19
19
  "@primstack/tokens": "^0.0.2",
20
20
  "@primstack/ui": "^0.0.2",
21
21
  "drizzle-orm": "^0.38.0",
22
- "next": "^15.2.0",
22
+ "next": "^16.0.0",
23
23
  "next-auth": "^5.0.0-beta.25",
24
24
  "react": "^19.0.0",
25
25
  "react-dom": "^19.0.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@cloudflare/next-on-pages": "^1.13.0",
29
28
  "@types/node": "^22.0.0",
30
29
  "@types/react": "^19.0.0",
31
30
  "@types/react-dom": "^19.0.0",
@@ -1,6 +1,4 @@
1
+ // Instrumentation hook — add custom setup here if needed
1
2
  export async function register() {
2
- if (process.env.NEXT_RUNTIME === 'nodejs') {
3
- const { setupDevPlatform } = await import('@cloudflare/next-on-pages/next-dev');
4
- await setupDevPlatform();
5
- }
3
+ // no-op
6
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primstack/cli",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "CLI for Primstack component library",
5
5
  "type": "module",
6
6
  "bin": {
@@ -9,14 +9,6 @@
9
9
  "files": [
10
10
  "dist"
11
11
  ],
12
- "scripts": {
13
- "build": "tsup",
14
- "dev": "tsup --watch",
15
- "clean": "rm -rf dist",
16
- "typecheck": "tsc --noEmit",
17
- "test": "vitest run",
18
- "cli": "node --import tsx src/index.ts"
19
- },
20
12
  "dependencies": {
21
13
  "@primstack/platform-sdk": "^0.0.1",
22
14
  "@primstack/tokens": "^0.0.2",
@@ -42,5 +34,13 @@
42
34
  "tsx": "^4.21.0",
43
35
  "typescript": "^5.7.0"
44
36
  },
45
- "license": "MIT"
46
- }
37
+ "license": "MIT",
38
+ "scripts": {
39
+ "build": "tsup",
40
+ "dev": "tsup --watch",
41
+ "clean": "rm -rf dist",
42
+ "typecheck": "tsc --noEmit",
43
+ "test": "vitest run",
44
+ "cli": "node --import tsx src/index.ts"
45
+ }
46
+ }