create-projx 1.7.1 → 1.7.2

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.
@@ -8,8 +8,8 @@ import {
8
8
  matchesSkip,
9
9
  saveBaselineRef,
10
10
  writeTemplateToDir
11
- } from "./chunk-N4WD4VN3.js";
12
- import "./chunk-OLPF7FAN.js";
11
+ } from "./chunk-XAYCVTHL.js";
12
+ import "./chunk-FQPOK3QZ.js";
13
13
  export {
14
14
  BASELINE_REF,
15
15
  applyTemplate,
@@ -223,6 +223,7 @@ async function copyStaticFiles(repoDir, dest) {
223
223
  }
224
224
  const staticScripts = [
225
225
  "ci-local.sh",
226
+ "check-bundle-size.sh",
226
227
  "setup-docker.sh",
227
228
  "setup-ssl.sh",
228
229
  "style-check.py"
@@ -343,6 +344,7 @@ var DEFAULT_ROOT_SKIP_PATTERNS = [
343
344
  ".githooks/pre-commit",
344
345
  ".github/workflows/ci.yml",
345
346
  "scripts/ci-local.sh",
347
+ "scripts/check-bundle-size.sh",
346
348
  "scripts/setup.sh",
347
349
  "scripts/setup-docker.sh",
348
350
  "scripts/setup-ssl.sh"
@@ -394,10 +396,15 @@ function render(template, vars) {
394
396
  function evalExpr(expr, vars) {
395
397
  const components = vars.components;
396
398
  const projectName = vars.projectName;
397
- const pmName = vars.pm?.name ?? "npm";
399
+ if (vars.pm !== void 0 && typeof vars.pm !== "object") {
400
+ throw new Error(
401
+ `render: vars.pm must be a PmCommands object (got ${typeof vars.pm}). Templates use pm.exec, pm.name etc.; passing the package-manager name as a bare string silently breaks those references.`
402
+ );
403
+ }
404
+ const pm = typeof vars.pm === "object" && vars.pm !== null ? vars.pm : { name: "npm" };
398
405
  const orm = vars.orm ?? "prisma";
399
406
  const argNames = ["components", "projectName", "pm", "orm"];
400
- const argValues = [components, projectName, pmName, orm];
407
+ const argValues = [components, projectName, pm, orm];
401
408
  for (const [k, v] of Object.entries(vars)) {
402
409
  if (["components", "projectName", "pm", "orm"].includes(k)) continue;
403
410
  if (!/^[a-zA-Z_$][\w$]*$/.test(k)) continue;
@@ -13,7 +13,7 @@ import {
13
13
  toSnake,
14
14
  upsertComponentMarker,
15
15
  writeProjxConfig
16
- } from "./chunk-OLPF7FAN.js";
16
+ } from "./chunk-FQPOK3QZ.js";
17
17
 
18
18
  // src/baseline.ts
19
19
  import { existsSync, writeFileSync, unlinkSync } from "fs";
@@ -126,7 +126,7 @@ function generateVscodeSettings(vars) {
126
126
  // src/baseline.ts
127
127
  var BASELINE_REF = "refs/projx/baseline";
128
128
  async function migrateComponentMarkers(cwd, components, componentPaths, applyDefaults) {
129
- const { readComponentMarker: readComponentMarker2, writeComponentMarker } = await import("./utils-4G3HNHES.js");
129
+ const { readComponentMarker: readComponentMarker2, writeComponentMarker } = await import("./utils-MC7VKL2U.js");
130
130
  for (const component of components) {
131
131
  const dir = componentPaths[component];
132
132
  const markerDir = join2(cwd, dir);
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  matchesSkip,
10
10
  saveBaselineRef,
11
11
  writeTemplateToDir
12
- } from "./chunk-N4WD4VN3.js";
12
+ } from "./chunk-XAYCVTHL.js";
13
13
  import {
14
14
  COMPONENTS,
15
15
  COMPONENT_MARKER,
@@ -36,7 +36,7 @@ import {
36
36
  toSnake,
37
37
  writeComponentMarker,
38
38
  writeProjxConfig
39
- } from "./chunk-OLPF7FAN.js";
39
+ } from "./chunk-FQPOK3QZ.js";
40
40
 
41
41
  // src/index.ts
42
42
  import { existsSync as existsSync11 } from "fs";
@@ -851,7 +851,7 @@ function hasUncommittedChanges(cwd) {
851
851
  async function findPinnedFilesWithUpdates(cwd, repoDir, components, componentPaths, vars, version, componentSkips, rootSkip) {
852
852
  const { mkdtemp: mkdtemp2, rm: rm2, readFile: readFile8 } = await import("fs/promises");
853
853
  const { tmpdir: tmpdir2 } = await import("os");
854
- const { writeTemplateToDir: writeTemplateToDir2 } = await import("./baseline-FKCXQFRD.js");
854
+ const { writeTemplateToDir: writeTemplateToDir2 } = await import("./baseline-ZPPJKHBN.js");
855
855
  const config = await readProjxConfig(cwd);
856
856
  const rootPinned = Array.isArray(config.skip) ? config.skip : [];
857
857
  const componentPinned = [];
@@ -35,7 +35,7 @@ import {
35
35
  upsertComponentMarker,
36
36
  writeComponentMarker,
37
37
  writeProjxConfig
38
- } from "./chunk-OLPF7FAN.js";
38
+ } from "./chunk-FQPOK3QZ.js";
39
39
  export {
40
40
  COMPONENTS,
41
41
  COMPONENT_MARKER,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-projx",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "description": "Scaffold production-grade fullstack projects in seconds. FastAPI, Fastify, Express, React, Flutter, Terraform — with auth, database, CI/CD, E2E tests, and Docker. One command, ready to deploy.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -123,7 +123,7 @@ jobs:
123
123
  run: |
124
124
  run_pip_audit() {
125
125
  for attempt in 1 2 3; do
126
- if uv run pip-audit --ignore-vuln CVE-2026-3219; then
126
+ if uv run pip-audit --ignore-vuln CVE-2026-3219 --ignore-vuln PYSEC-2025-183; then
127
127
  return 0
128
128
  fi
129
129
  if [ "$attempt" -eq 3 ]; then
@@ -163,15 +163,15 @@ jobs:
163
163
  JWT_SECRET: ci-test-secret # gitleaks:allow
164
164
  steps:
165
165
  - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
166
- <% if (pm === 'pnpm') { %>
166
+ <% if (pm.name === 'pnpm') { %>
167
167
  - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
168
168
  with:
169
169
  version: 10
170
170
  <% } %>
171
- <% if (pm === 'bun') { %>
171
+ <% if (pm.name === 'bun') { %>
172
172
  - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
173
173
  <% } %>
174
- <% if (pm !== 'bun') { %>
174
+ <% if (pm.name !== 'bun') { %>
175
175
  - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
176
176
  with:
177
177
  node-version: 22
@@ -196,7 +196,7 @@ jobs:
196
196
  <% for (const inst of expressInstances) { %>
197
197
 
198
198
  <%= inst.path %>:
199
- name: <%= inst.display %> (format + lint + typecheck + build + test + audit)
199
+ name: <%= inst.display %> (format + lint + typecheck + build + audit)
200
200
  needs: changes
201
201
  if: github.event_name == 'workflow_dispatch' || needs.changes.outputs.<%= inst.path %> == 'true'
202
202
  runs-on: ubuntu-latest
@@ -221,15 +221,15 @@ jobs:
221
221
  DATABASE_URL: postgresql://postgres:postgres@localhost:5432/ci_test
222
222
  steps:
223
223
  - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
224
- <% if (pm === 'pnpm') { %>
224
+ <% if (pm.name === 'pnpm') { %>
225
225
  - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
226
226
  with:
227
227
  version: 10
228
228
  <% } %>
229
- <% if (pm === 'bun') { %>
229
+ <% if (pm.name === 'bun') { %>
230
230
  - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
231
231
  <% } %>
232
- <% if (pm !== 'bun') { %>
232
+ <% if (pm.name !== 'bun') { %>
233
233
  - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
234
234
  with:
235
235
  node-version: 22
@@ -249,7 +249,6 @@ jobs:
249
249
  - run: <%= pm.exec %> eslint .
250
250
  - run: <%= pm.exec %> tsc --noEmit
251
251
  - run: <%= pm.run %> build
252
- - run: <%= pm.exec %> vitest run --coverage.enabled=false
253
252
  - run: <%= pm.audit %>
254
253
  <% } %>
255
254
  <% for (const inst of frontendInstances) { %>
@@ -264,15 +263,15 @@ jobs:
264
263
  working-directory: <%= inst.path %>
265
264
  steps:
266
265
  - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
267
- <% if (pm === 'pnpm') { %>
266
+ <% if (pm.name === 'pnpm') { %>
268
267
  - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
269
268
  with:
270
269
  version: 10
271
270
  <% } %>
272
- <% if (pm === 'bun') { %>
271
+ <% if (pm.name === 'bun') { %>
273
272
  - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
274
273
  <% } %>
275
- <% if (pm !== 'bun') { %>
274
+ <% if (pm.name !== 'bun') { %>
276
275
  - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
277
276
  with:
278
277
  node-version: 22
@@ -321,15 +320,15 @@ jobs:
321
320
  working-directory: <%= inst.path %>
322
321
  steps:
323
322
  - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
324
- <% if (pm === 'pnpm') { %>
323
+ <% if (pm.name === 'pnpm') { %>
325
324
  - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
326
325
  with:
327
326
  version: 10
328
327
  <% } %>
329
- <% if (pm === 'bun') { %>
328
+ <% if (pm.name === 'bun') { %>
330
329
  - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
331
330
  <% } %>
332
- <% if (pm !== 'bun') { %>
331
+ <% if (pm.name !== 'bun') { %>
333
332
  - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
334
333
  with:
335
334
  node-version: 22
@@ -135,9 +135,21 @@ fi
135
135
  <%= inst.upper %>_TF=$(echo "$STAGED_FILES" | grep '^<%= inst.path %>/.*\.tf$' || true)
136
136
  if [ -n "$<%= inst.upper %>_TF" ]; then
137
137
  if command -v terraform &> /dev/null; then
138
- echo "Formatting <%= inst.path %>..."
138
+ echo "Checking <%= inst.path %>..."
139
139
  cd <%= inst.path %>/stack
140
140
  echo "$<%= inst.upper %>_TF" | sed 's|^<%= inst.path %>/stack/||' | xargs terraform fmt
141
+ [ -d .terraform ] || terraform init -backend=false -input=false >/dev/null
142
+ terraform validate
143
+ if command -v tflint &> /dev/null; then
144
+ tflint --recursive
145
+ else
146
+ echo "Skipping tflint (not installed)"
147
+ fi
148
+ if command -v trivy &> /dev/null; then
149
+ trivy config --exit-code 1 --severity HIGH,CRITICAL .
150
+ else
151
+ echo "Skipping trivy config scan (not installed)"
152
+ fi
141
153
  cd ../..
142
154
  echo "$<%= inst.upper %>_TF" | xargs git add
143
155
  else