create-projx 1.3.2 → 1.3.4

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.js +20 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -192,7 +192,7 @@ async function readComponentMarker(dir) {
192
192
  const data = JSON.parse(raw);
193
193
  return {
194
194
  components: data.components ?? (data.component ? [data.component] : []),
195
- origin: data.origin ?? "scaffold",
195
+ origin: data.origin,
196
196
  skip: data.skip
197
197
  };
198
198
  } catch {
@@ -457,7 +457,12 @@ function matchesSkip(filePath, patterns) {
457
457
  }
458
458
  if (pattern.startsWith("**/")) {
459
459
  const suffix = pattern.slice(3);
460
- if (filePath.endsWith(suffix) || filePath.includes("/" + suffix)) return true;
460
+ if (suffix.startsWith("*.")) {
461
+ const ext = suffix.slice(1);
462
+ if (filePath.endsWith(ext)) return true;
463
+ } else if (filePath.endsWith(suffix) || filePath.includes("/" + suffix)) {
464
+ return true;
465
+ }
461
466
  }
462
467
  if (pattern.startsWith("*.")) {
463
468
  const ext = pattern.slice(1);
@@ -828,7 +833,7 @@ async function update(cwd, localRepo) {
828
833
  const marker = await readComponentMarker(join5(cwd, dir));
829
834
  if (marker?.skip && marker.skip.length > 0) {
830
835
  componentSkips[component] = marker.skip;
831
- } else if (marker?.origin === "init") {
836
+ } else if (marker?.origin === "init" || !marker?.origin) {
832
837
  componentSkips[component] = ["**"];
833
838
  }
834
839
  }
@@ -852,14 +857,24 @@ async function update(cwd, localRepo) {
852
857
  const result = mergeBaseline(cwd, `projx: update to template v${version}`);
853
858
  mergeSpinner.stop("Merge complete.");
854
859
  if (result.status === "clean") {
860
+ const { writeFile: writeFile3 } = await import("fs/promises");
855
861
  const updatedConfig = {
856
862
  ...config,
857
863
  version,
858
864
  baseline: { branch: "projx/baseline", templateVersion: version }
859
865
  };
860
- const { writeFile: writeFile3 } = await import("fs/promises");
861
866
  await writeFile3(join5(cwd, ".projx"), JSON.stringify(updatedConfig, null, 2) + "\n");
862
- execSync3("git add .projx && git commit --no-verify --amend --no-edit", { cwd, stdio: "pipe" });
867
+ for (const component of config.components) {
868
+ const dir = componentPaths[component];
869
+ const skip = componentSkips[component];
870
+ await writeComponentMarker(
871
+ join5(cwd, dir),
872
+ component,
873
+ skip?.includes("**") ? "init" : "scaffold",
874
+ skip
875
+ );
876
+ }
877
+ execSync3('git add -A && git commit --no-verify -m "projx: post-update config"', { cwd, stdio: "pipe" });
863
878
  }
864
879
  if (result.status === "conflicts") {
865
880
  p4.log.warn(`Merge conflicts in ${result.conflictedFiles.length} file(s):`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-projx",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "Scaffold production-grade fullstack projects in seconds. FastAPI, Fastify, React, Flutter, Terraform — with auth, database, CI/CD, E2E tests, and Docker. One command, ready to deploy.",
5
5
  "type": "module",
6
6
  "bin": {