create-jant 0.3.43 → 0.3.44

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
@@ -9,7 +9,7 @@ import path from "path";
9
9
  import { fileURLToPath } from "url";
10
10
  var __filename = fileURLToPath(import.meta.url);
11
11
  var __dirname = path.dirname(__filename);
12
- var CORE_VERSION = "0.3.43";
12
+ var CORE_VERSION = "0.3.44";
13
13
  var WRANGLER_VERSION = "^4.76.0";
14
14
  var TEMPLATE_DIR = fs.existsSync(path.resolve(__dirname, "../template")) ? path.resolve(__dirname, "../template") : path.resolve(__dirname, "../../../sites/demo");
15
15
  function isValidProjectName(name) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-jant",
3
- "version": "0.3.43",
3
+ "version": "0.3.44",
4
4
  "description": "Create a new Jant project",
5
5
  "type": "module",
6
6
  "bin": {
@@ -53,7 +53,7 @@
53
53
  "build": "tsup src/index.ts --format esm --clean --outDir dist",
54
54
  "dev": "tsup src/index.ts --format esm --watch",
55
55
  "typecheck": "tsc --noEmit",
56
- "copy-template": "rm -rf template && rsync -a --exclude node_modules --exclude .wrangler --exclude .dev.vars --exclude .claude --exclude CLAUDE.md --exclude docs/internal --exclude scripts ../../sites/demo/ template/ && mv template/.gitignore template/_gitignore && mv template/.github template/_github",
56
+ "copy-template": "rm -rf template && rsync -a --exclude node_modules --exclude .wrangler --exclude .dev.vars --exclude .claude --exclude CLAUDE.md --exclude docs/internal --exclude scripts/bootstrap-demo.mjs ../../sites/demo/ template/ && mv template/.gitignore template/_gitignore && mv template/.github template/_github",
57
57
  "inject-version": "node -e \"const fs=require('fs');const path=require('path');const coreVersion=require('../core/package.json').version;const workspace=fs.readFileSync(path.resolve(__dirname,'../../pnpm-workspace.yaml'),'utf8');const match=workspace.match(/^[ \\t]*wrangler:[ \\t]*(.+)$/m);if(!match)throw new Error('Unable to resolve wrangler catalog version');const wranglerVersion=match[1].trim();const f='dist/index.js';const source=fs.readFileSync(f,'utf8').replace('__JANT_CORE_VERSION__',coreVersion).replace('__WRANGLER_VERSION__',wranglerVersion);fs.writeFileSync(f,source)\"",
58
58
  "test-template": "node scripts/test-template.js"
59
59
  }
@@ -4,7 +4,7 @@
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "jant migrate --local && node scripts/dev.mjs",
7
- "deploy": "node ../../scripts/demo-shared/run-with-env.mjs --site demo -- pnpm exec jant deploy",
7
+ "deploy": "jant deploy",
8
8
  "reset-password": "jant reset-password",
9
9
  "export": "jant export"
10
10
  },
@@ -0,0 +1,22 @@
1
+ import { spawn } from "node:child_process";
2
+
3
+ const port = process.env.PORT || "3000";
4
+ const wranglerBin = process.platform === "win32" ? "wrangler.cmd" : "wrangler";
5
+
6
+ const child = spawn(wranglerBin, ["dev", "--port", port], {
7
+ stdio: "inherit",
8
+ });
9
+
10
+ child.once("error", (error) => {
11
+ console.error(error.message);
12
+ process.exit(1);
13
+ });
14
+
15
+ child.once("exit", (code, signal) => {
16
+ if (signal) {
17
+ process.kill(process.pid, signal);
18
+ return;
19
+ }
20
+
21
+ process.exit(code ?? 0);
22
+ });