@aurostack/stacks 0.1.0 → 0.1.1

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/README.md CHANGED
@@ -63,6 +63,31 @@ claude --plugin-dir ./stacks # try skill edits without reinstalling
63
63
  `package.json` holds the version; the plugin manifests repeat it, and
64
64
  `stack doctor` fails if they drift.
65
65
 
66
+ ### Releasing
67
+
68
+ ```sh
69
+ npm version patch # or minor / major: bumps package.json and the plugin
70
+ # manifests in one commit, tagged vX.Y.Z
71
+ git push --follow-tags
72
+ ```
73
+
74
+ The tag runs the full CI (`.github/workflows/ci.yml`: every template's key
75
+ variants generated with `--strict`, then typechecked, linted, built and tested,
76
+ plus the Docker images), then `release.yml` stages the version on npm and
77
+ creates the GitHub release. The Claude Code plugin updates from the same
78
+ commit.
79
+
80
+ A staged version goes live only once a maintainer approves it with 2FA:
81
+
82
+ ```sh
83
+ npm stage list @aurostack/stacks
84
+ npm stage approve <stage-id> # or npmjs.com → the package → Staged Packages
85
+ ```
86
+
87
+ CI authenticates as an npm **trusted publisher** (no token): repository
88
+ `aurostack-org/stacks`, workflow `release.yml`, environment `npm`, allowed to
89
+ stage only. The `npm` GitHub environment is restricted to `v*` tags.
90
+
66
91
  ## The templates
67
92
 
68
93
  | Template | What you get |
package/cli/src/hooks.mjs CHANGED
@@ -5,14 +5,21 @@
5
5
  * expression, so `yarn prisma generate` only runs for stacks that kept Prisma.
6
6
  * A non-optional hook that fails aborts with a non-zero exit; an optional one
7
7
  * warns and continues, because a missing `yarn` on the machine should not throw
8
- * away an otherwise-correct scaffold.
8
+ * away an otherwise-correct scaffold. `strict` (`stack new --strict`, used in
9
+ * CI) makes every failure fatal.
9
10
  */
10
11
  import { spawnSync } from 'node:child_process';
11
12
  import path from 'node:path';
12
13
  import { evalExpr } from './strip.mjs';
13
14
  import { interpolate } from './tokens.mjs';
14
15
 
15
- export function runHooks(manifest, target, enabled, ctx, { skip = false, log }) {
16
+ export function runHooks(
17
+ manifest,
18
+ target,
19
+ enabled,
20
+ ctx,
21
+ { skip = false, strict = false, log }
22
+ ) {
16
23
  const hooks = manifest.hooks || [];
17
24
  const results = [];
18
25
 
@@ -41,7 +48,7 @@ export function runHooks(manifest, target, enabled, ctx, { skip = false, log })
41
48
  continue;
42
49
  }
43
50
 
44
- if (hook.optional) {
51
+ if (hook.optional && !strict) {
45
52
  log(` warning "${label}" failed (exit ${res.status}) — continuing`);
46
53
  results.push({ command, status: 'failed-optional' });
47
54
  continue;
package/cli/stack.mjs CHANGED
@@ -82,6 +82,7 @@ ${c.bold('new options')}
82
82
  --without a,b Disable default features (repeatable)
83
83
  --all Enable every optional feature
84
84
  --no-hooks Skip install / prisma generate / git init
85
+ --strict Fail on any hook failure (for CI)
85
86
  --force Write into a non-empty directory
86
87
  --dry-run Print what would happen, write nothing
87
88
 
@@ -207,6 +208,7 @@ function cmdNew(args, values) {
207
208
  log(c.bold(' Post-generation'));
208
209
  runHooks(manifest, target, enabled, ctx, {
209
210
  skip: values['no-hooks'],
211
+ strict: Boolean(values.strict),
210
212
  log
211
213
  });
212
214
  log('');
@@ -627,6 +629,7 @@ function main() {
627
629
  prune: { type: 'boolean' },
628
630
  'dry-run': { type: 'boolean' },
629
631
  'no-hooks': { type: 'boolean' },
632
+ strict: { type: 'boolean' },
630
633
  help: { type: 'boolean', short: 'h' },
631
634
  version: { type: 'boolean', short: 'v' }
632
635
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurostack/stacks",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Scaffold new projects from house templates: a NestJS API, React app or Turborepo monorepo, and Node or Python workers. Subtractive templates plus a zero-dependency generator.",
5
5
  "license": "MIT",
6
6
  "author": "Aurostack (https://github.com/aurostack-org)",
@@ -31,6 +31,9 @@
31
31
  "engines": {
32
32
  "node": ">=20.19"
33
33
  },
34
+ "scripts": {
35
+ "version": "node scripts/sync-version.mjs && git add .claude-plugin"
36
+ },
34
37
  "publishConfig": {
35
38
  "access": "public"
36
39
  }
@@ -11,7 +11,7 @@
11
11
  "build": "nest build",
12
12
  "gen": "nest generate",
13
13
  "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
14
- "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
14
+ "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\" --no-error-on-unmatched-pattern",
15
15
  "email:dev": "email dev -p 5003",
16
16
  "secrets": "ts-node .bin/secrets",
17
17
  "db:generate": "ts-node ./.bin/db.ts",
@@ -415,7 +415,7 @@
415
415
  },
416
416
  {
417
417
  "title": "yarn install",
418
- "run": "yarn install",
418
+ "run": "yarn install --no-immutable",
419
419
  "optional": true
420
420
  },
421
421
  {
@@ -2,3 +2,5 @@ node_modules/
2
2
  dist/
3
3
  tmp/
4
4
  yarn.lock
5
+ # the Prisma client is generated; formatting it would only churn
6
+ prisma/generated/
@@ -108,7 +108,7 @@
108
108
  },
109
109
  {
110
110
  "title": "yarn install",
111
- "run": "yarn install",
111
+ "run": "yarn install --no-immutable",
112
112
  "optional": true
113
113
  },
114
114
  {
@@ -199,7 +199,7 @@
199
199
  },
200
200
  {
201
201
  "title": "yarn install",
202
- "run": "yarn install",
202
+ "run": "yarn install --no-immutable",
203
203
  "optional": true
204
204
  },
205
205
  {
@@ -208,7 +208,7 @@
208
208
  },
209
209
  {
210
210
  "title": "yarn install",
211
- "run": "yarn install",
211
+ "run": "yarn install --no-immutable",
212
212
  "optional": true
213
213
  },
214
214
  {