anhedral 0.4.2 → 0.6.0
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 +29 -269
- package/assets/anhedral-cli-init-technical.svg +322 -0
- package/assets/anhedral-cli-init.svg +257 -173
- package/dist/bin.js +28 -191
- package/dist/dependencies.d.ts +7 -57
- package/dist/dependencies.js +96 -308
- package/dist/index.d.ts +2 -7
- package/dist/index.js +1 -4
- package/dist/platforms/desktop.js +401 -0
- package/dist/platforms/extension.js +401 -0
- package/dist/platforms/mobile.js +232 -0
- package/dist/project.d.ts +0 -26
- package/dist/standard-products.d.ts +2 -0
- package/dist/standard-products.js +6 -0
- package/dist/standard.d.ts +18 -0
- package/dist/standard.js +578 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/application-stack-standard.md +700 -0
- package/package.json +34 -51
- package/CHANGELOG.md +0 -178
- package/CONTRIBUTING.md +0 -77
- package/SECURITY.md +0 -37
- package/SKILL.md +0 -339
- package/assets/images/svg/ably-symbol-color.svg +0 -8
- package/bin/anhedral.js +0 -2
- package/dist/architecture/contributions.d.ts +0 -28
- package/dist/architecture/contributions.js +0 -125
- package/dist/architecture/index.d.ts +0 -12
- package/dist/architecture/index.js +0 -6
- package/dist/architecture/manifest.d.ts +0 -53
- package/dist/architecture/manifest.js +0 -283
- package/dist/architecture/modules.d.ts +0 -41
- package/dist/architecture/modules.js +0 -187
- package/dist/architecture/plan.d.ts +0 -58
- package/dist/architecture/plan.js +0 -145
- package/dist/architecture/templates.d.ts +0 -10
- package/dist/architecture/templates.js +0 -23
- package/dist/cli.d.ts +0 -32
- package/dist/cli.js +0 -281
- package/dist/composers/root.d.ts +0 -6
- package/dist/composers/root.js +0 -35
- package/dist/print.d.ts +0 -8
- package/dist/print.js +0 -48
- package/dist/prompts.d.ts +0 -6
- package/dist/prompts.js +0 -41
- package/dist/scaffold.d.ts +0 -64
- package/dist/scaffold.js +0 -2102
- package/dist/template-source.d.ts +0 -20
- package/dist/template-source.js +0 -180
- package/dist/templates/api.d.ts +0 -2
- package/dist/templates/api.js +0 -3187
- package/dist/templates/assets-private-proxy.d.ts +0 -3
- package/dist/templates/assets-private-proxy.js +0 -277
- package/dist/templates/desktop.js +0 -792
- package/dist/templates/electron-updater.d.ts +0 -3
- package/dist/templates/electron-updater.js +0 -358
- package/dist/templates/extension.js +0 -856
- package/dist/templates/first-run.d.ts +0 -2
- package/dist/templates/first-run.js +0 -167
- package/dist/templates/mobile.js +0 -861
- package/dist/templates/shared.d.ts +0 -2
- package/dist/templates/shared.js +0 -577
- package/dist/templates/web.d.ts +0 -2
- package/dist/templates/web.js +0 -569
- package/dist/toolchain.d.ts +0 -3
- package/dist/toolchain.js +0 -8
- package/dist/ui.d.ts +0 -33
- package/dist/ui.js +0 -199
- package/dist/workspace-config.d.ts +0 -11
- package/dist/workspace-config.js +0 -372
- package/docs/NORTHSTAR.md +0 -114
- package/docs/conventions.md +0 -94
- package/docs/engineering-principles.md +0 -88
- package/docs/master-stack-map.md +0 -199
- package/docs/output-tree-contract.md +0 -493
- package/docs/references/manual-scaffolding.md +0 -421
- package/docs/references/provisioning.md +0 -577
- package/scripts/render-master-stack-map.mjs +0 -510
- package/templates/api-fastify/apps/api/tsconfig.json +0 -20
- package/templates/catalog.json +0 -23
- package/templates/db-drizzle/packages/db/tsconfig.json +0 -14
- package/templates/desktop-electron/apps/desktop/tsconfig.json +0 -37
- package/templates/extension-wxt/apps/extension/tsconfig.json +0 -41
- package/templates/mobile-expo/apps/mobile/expo-env.d.ts +0 -1
- package/templates/web-next/apps/web/next-env.d.ts +0 -6
- /package/dist/{templates → platforms}/desktop.d.ts +0 -0
- /package/dist/{templates → platforms}/extension.d.ts +0 -0
- /package/dist/{templates → platforms}/mobile.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anhedral",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"description": "Initialize client-owned applications with shadcn, pnpm, Turborepo, and Cloudflare-first services.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
@@ -12,30 +12,18 @@
|
|
|
12
12
|
"types": "./dist/index.d.ts",
|
|
13
13
|
"sideEffects": false,
|
|
14
14
|
"bin": {
|
|
15
|
-
"anhedral": "bin
|
|
15
|
+
"anhedral": "dist/bin.js"
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
|
-
"bin",
|
|
19
18
|
"dist",
|
|
20
|
-
"docs/conventions.md",
|
|
21
|
-
"docs/engineering-principles.md",
|
|
22
19
|
"assets/anhedral-cli-init.svg",
|
|
23
|
-
"assets/
|
|
20
|
+
"assets/anhedral-cli-init-technical.svg",
|
|
24
21
|
"assets/images/svg/logo-white-subtract.svg",
|
|
25
|
-
"docs/master-stack-map.md",
|
|
26
|
-
"docs/NORTHSTAR.md",
|
|
27
|
-
"docs/output-tree-contract.md",
|
|
28
|
-
"docs/references",
|
|
29
|
-
"scripts/render-master-stack-map.mjs",
|
|
30
|
-
"templates",
|
|
31
|
-
"SKILL.md",
|
|
32
|
-
"CHANGELOG.md",
|
|
33
|
-
"CONTRIBUTING.md",
|
|
34
22
|
"LICENSE",
|
|
35
23
|
"README.md",
|
|
36
|
-
"SECURITY.md",
|
|
37
24
|
"anhedral.svg",
|
|
38
|
-
"favicon.ico"
|
|
25
|
+
"favicon.ico",
|
|
26
|
+
"docs/application-stack-standard.md"
|
|
39
27
|
],
|
|
40
28
|
"homepage": "https://github.com/anhedral/anhedral-init#readme",
|
|
41
29
|
"repository": {
|
|
@@ -55,7 +43,7 @@
|
|
|
55
43
|
"scripts": {
|
|
56
44
|
"scaffold": "node dist/bin.js init",
|
|
57
45
|
"clean": "node scripts/clean.mjs",
|
|
58
|
-
"build": "pnpm clean && tsc",
|
|
46
|
+
"build": "pnpm clean && tsc && node scripts/prepare-cli.mjs",
|
|
59
47
|
"prepare": "pnpm build",
|
|
60
48
|
"typecheck": "tsc --noEmit",
|
|
61
49
|
"check:hygiene": "node scripts/check-source-hygiene.mjs",
|
|
@@ -63,56 +51,51 @@
|
|
|
63
51
|
"check:release-policy": "node scripts/check-release-policy.mjs",
|
|
64
52
|
"check:release-secrets": "node scripts/check-release-secrets.mjs",
|
|
65
53
|
"lint": "pnpm typecheck && pnpm check:hygiene && pnpm check:release-policy",
|
|
66
|
-
"audit:osv": "
|
|
67
|
-
"test": "pnpm test:
|
|
68
|
-
"test:coverage": "pnpm build && c8 --all --include='dist/**/*.js' --reporter=text --reporter=json-summary --check-coverage --lines 84 --statements 84 --functions 84 --branches 80 node tests/test-cli.js",
|
|
54
|
+
"audit:osv": "node scripts/audit-osv.mjs",
|
|
55
|
+
"test": "pnpm test:unit",
|
|
69
56
|
"pretest": "pnpm build",
|
|
70
57
|
"prepublishOnly": "pnpm test:all",
|
|
71
|
-
"test:cli": "node tests/test-cli.
|
|
72
|
-
"test:cli:validation": "node tests/test-cli-validation.js",
|
|
73
|
-
"test:deps": "pnpm build && node tests/test-dependency-manifest.js",
|
|
74
|
-
"test:vercel-schema": "pnpm build && node tests/test-vercel-services-schema.js",
|
|
58
|
+
"test:cli:validation": "node --test tests/test-cli-validation.test.mjs",
|
|
75
59
|
"test:pack": "pnpm build && node tests/test-packed-cli.js",
|
|
76
|
-
"test:pack:exact": "node tests/test-packed-cli.js release
|
|
60
|
+
"test:pack:exact": "node tests/test-packed-cli.js .artifacts/release/metadata.json",
|
|
77
61
|
"test:packlist": "pnpm build && node tests/test-packlist.js",
|
|
78
|
-
"test:release-tooling": "node tests/test-release-tooling.
|
|
79
|
-
"test:
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
87
|
-
"test:
|
|
88
|
-
"test:
|
|
89
|
-
"release:check": "pnpm check:release-policy && pnpm test:all && npm pack --dry-run --ignore-scripts",
|
|
90
|
-
"release:pack": "pnpm build && node scripts/create-release-artifact.mjs && node scripts/check-release-secrets.mjs release-artifact/metadata.json",
|
|
91
|
-
"release:artifact:verify": "node scripts/verify-release-artifact.mjs release-artifact/metadata.json && node scripts/check-release-secrets.mjs release-artifact/metadata.json",
|
|
92
|
-
"release:artifact:smoke": "node tests/test-packed-cli.js release-artifact/metadata.json",
|
|
93
|
-
"demo:refresh": "pnpm build && node tests/refresh-demo.js",
|
|
94
|
-
"docs:stack-map": "node scripts/render-master-stack-map.mjs"
|
|
62
|
+
"test:release-tooling": "node tests/test-release-tooling.test.mjs",
|
|
63
|
+
"test:all": "pnpm build && pnpm lint && pnpm check:security && pnpm audit:osv && pnpm test:unit && node tests/test-packed-cli.js && node tests/test-packlist.js",
|
|
64
|
+
"release:check": "pnpm test:all",
|
|
65
|
+
"release:pack": "pnpm build && node scripts/create-release-artifact.mjs && node scripts/check-release-secrets.mjs .artifacts/release/metadata.json",
|
|
66
|
+
"release:artifact:verify": "node scripts/verify-release-artifact.mjs .artifacts/release/metadata.json && node scripts/check-release-secrets.mjs .artifacts/release/metadata.json",
|
|
67
|
+
"release:artifact:smoke": "node tests/test-packed-cli.js .artifacts/release/metadata.json",
|
|
68
|
+
"docs:stack-map": "node scripts/render-master-stack-map.mjs",
|
|
69
|
+
"docs:technical-stack-map": "node scripts/render-master-stack-map.mjs --technical",
|
|
70
|
+
"docs:stack-maps": "pnpm docs:stack-map && pnpm docs:technical-stack-map",
|
|
71
|
+
"test:standard": "pnpm build && node --test tests/test-standard.test.mjs",
|
|
72
|
+
"test:unit": "node --test --test-concurrency=4 --test-reporter=spec tests/*.test.mjs"
|
|
95
73
|
},
|
|
96
74
|
"keywords": [
|
|
97
75
|
"cli",
|
|
98
76
|
"scaffold",
|
|
99
77
|
"typescript",
|
|
100
78
|
"nextjs",
|
|
101
|
-
"
|
|
79
|
+
"hono",
|
|
80
|
+
"cloudflare",
|
|
81
|
+
"opennext",
|
|
102
82
|
"expo",
|
|
103
83
|
"electron",
|
|
104
|
-
"clerk",
|
|
105
|
-
"drizzle",
|
|
106
|
-
"neondb",
|
|
107
|
-
"revenuecat",
|
|
108
84
|
"wxt",
|
|
109
|
-
"
|
|
85
|
+
"neon",
|
|
86
|
+
"drizzle",
|
|
87
|
+
"shadcn",
|
|
88
|
+
"turborepo"
|
|
110
89
|
],
|
|
111
90
|
"license": "Apache-2.0",
|
|
112
91
|
"packageManager": "pnpm@10.34.5",
|
|
92
|
+
"pnpm": {
|
|
93
|
+
"overrides": {
|
|
94
|
+
"brace-expansion@<=5.0.7": "5.0.8"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
113
97
|
"devDependencies": {
|
|
114
98
|
"@types/node": "20.19.43",
|
|
115
|
-
"c8": "11.0.0",
|
|
116
99
|
"simple-icons": "16.27.0",
|
|
117
100
|
"typescript": "5.9.3"
|
|
118
101
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
-
|
|
7
|
-
## Unreleased
|
|
8
|
-
|
|
9
|
-
## 0.4.2 - 2026-07-23
|
|
10
|
-
|
|
11
|
-
### Added
|
|
12
|
-
|
|
13
|
-
- Add idempotent `pnpm first-run` setup plus a secret-safe `pnpm ready` gate with
|
|
14
|
-
human and JSON output, required/optional variable awareness, and truthful exit
|
|
15
|
-
status.
|
|
16
|
-
- Generate a working items feature across Drizzle, Zod contracts, Fastify
|
|
17
|
-
routes, the shared API client, and idiomatic Next.js, Expo, Electron, and WXT
|
|
18
|
-
interfaces for every selected client.
|
|
19
|
-
- Add explicit `--all`, automatic Git initialization for `new`, dependency-resolution previews, confirmation, exact generated lifecycle scripts, UI-provider command previews, and actionable `doctor` recommendations.
|
|
20
|
-
- Add a published DX north star that defines measurable discovery, creation,
|
|
21
|
-
configuration, development, extension, diagnosis, upgrade, and shipping
|
|
22
|
-
journeys.
|
|
23
|
-
|
|
24
|
-
### Changed
|
|
25
|
-
|
|
26
|
-
- Default interactive creation to a focused web app with optional capabilities while preserving the complete-stack default for noninteractive compatibility.
|
|
27
|
-
- Replace deprecated Turborepo development commands, make cache outputs package-specific, and let typechecks depend on upstream typechecks instead of builds.
|
|
28
|
-
- Track bundled UI primitives in the project manifest and make generated onboarding, deployment, provider, and source-location guidance selection-aware.
|
|
29
|
-
- Include status, generator version, project root, resolved modules, and next
|
|
30
|
-
steps in machine-readable plans; make human lifecycle output concise unless a
|
|
31
|
-
dry-run or verbose path listing is requested.
|
|
32
|
-
|
|
33
|
-
### Fixed
|
|
34
|
-
|
|
35
|
-
- Allow Next.js client API factories to render safely during production prerendering while preserving HTTPS enforcement for non-loopback production endpoints.
|
|
36
|
-
- Make generated lifecycle commands reproducible even though Anhedral is intentionally not installed in application dependencies.
|
|
37
|
-
- Forward arguments through generated pnpm lifecycle scripts without inserting a literal `--` that the Anhedral or provider CLI would reject.
|
|
38
|
-
- Treat generated Clerk placeholder keys as unconfigured on every client instead
|
|
39
|
-
of mounting providers with knowingly invalid values.
|
|
40
|
-
- Keep Electron starter features synchronized with Clerk sign-in changes instead
|
|
41
|
-
of treating an opened account dialog as an authenticated session.
|
|
42
|
-
- Put reviewed database migration generation, Git staging, verification, and
|
|
43
|
-
application in one consistent onboarding order.
|
|
44
|
-
- Detect required environment variables that were deleted from an existing
|
|
45
|
-
package-local configuration file.
|
|
46
|
-
|
|
47
|
-
### Security
|
|
48
|
-
|
|
49
|
-
- Scope generated starter-item reads and writes to the authenticated Clerk user
|
|
50
|
-
whenever authentication is selected.
|
|
51
|
-
- Reject local home-directory paths and email addresses in source and packed
|
|
52
|
-
release artifacts while continuing to allow documentation placeholders and
|
|
53
|
-
public GitHub noreply contributor identities.
|
|
54
|
-
|
|
55
|
-
## 0.4.1 - 2026-07-22
|
|
56
|
-
|
|
57
|
-
### Added
|
|
58
|
-
|
|
59
|
-
- Add the public launch artwork, reusable stack-map renderer, and expanded brand asset library to the repository and published package.
|
|
60
|
-
|
|
61
|
-
### Changed
|
|
62
|
-
|
|
63
|
-
- Present Anhedral as a cross-platform, modular product stack that lets teams build once, ship everywhere, and scale without repeating framework setup.
|
|
64
|
-
- Automatically create patch versions for ordinary changes merged to `main`, while preserving explicitly declared minor and major releases.
|
|
65
|
-
- Keep project upgrades compatible across automatic patch releases and retain the supported 0.3-to-0.4 ownership migration.
|
|
66
|
-
- Publish from the exact generated release commit and attach npm provenance now that the source repository is public.
|
|
67
|
-
|
|
68
|
-
## 0.4.0 - 2026-07-22
|
|
69
|
-
|
|
70
|
-
### Added
|
|
71
|
-
|
|
72
|
-
- Add the `electron-updater` feature module, including packaged-app update checks, private R2 storage, a read-only bound Cloudflare Worker on a custom domain, ordered architecture-specific publishing commands, and a complete generated release runbook.
|
|
73
|
-
- Make the `anhedral-init` coding-agent skill the recommended setup path, with project/domain intake, Computer Use and subagent orchestration, provider provisioning order, authentication and secret-generation stops, and verified Cloudflare/Vercel domain handoffs.
|
|
74
|
-
- Add the canonical fixed-width master stack map to the published documentation and route the coding-agent skill through it for whole-platform planning and explanation.
|
|
75
|
-
- Add a transactional project-upgrade path so compatible 0.3 projects can adopt 0.4 without regeneration.
|
|
76
|
-
- Add a focused default development loop for the primary web and API surfaces, with `dev:all` available for intentionally launching every selected client.
|
|
77
|
-
|
|
78
|
-
### Changed
|
|
79
|
-
|
|
80
|
-
- Make generated onboarding follow the real environment, managed-Neon, verification, and framework source layout instead of promising an unconfigured one-command boot.
|
|
81
|
-
- Treat developer extension points as user-owned source while retaining conflict protection for generated wiring and mergeable workspace configuration.
|
|
82
|
-
- Publish the skill's provisioning references from their canonical `docs/references` location and validate every packed local documentation link.
|
|
83
|
-
- Upgrade GitHub artifact transfer actions to their Node.js 24-native releases and keep manual npm publication routed through the trusted-publisher workflow identity.
|
|
84
|
-
|
|
85
|
-
### Fixed
|
|
86
|
-
|
|
87
|
-
- Canonicalize module ordering when an incremental feature contributes a previously absent dependency.
|
|
88
|
-
- Attach release integrity metadata beside the npm tarball in GitHub Releases.
|
|
89
|
-
|
|
90
|
-
## 0.3.0 - 2026-07-21
|
|
91
|
-
|
|
92
|
-
### Added
|
|
93
|
-
|
|
94
|
-
- Add a unified `anhedral ui add` workflow that routes DOM clients to shadcn/ui and Expo clients to React Native Reusables.
|
|
95
|
-
- Add interactive starter-component selection after app surfaces and feature sets, with NativeWind or Uniwind selection for Expo.
|
|
96
|
-
- Add React Native Reusables-ready Expo configuration, theme CSS, aliases, utilities, Metro integration, and portal hosting.
|
|
97
|
-
- Add manifest schema v5 UI configuration and per-client component installation records.
|
|
98
|
-
- Add staged provider execution, dry-run plans, duplicate-install detection, target validation, and provider routing tests.
|
|
99
|
-
- Add `anhedral new <directory>` as the primary complete-stack creation flow while retaining `init` for an empty current directory.
|
|
100
|
-
- Generate selection-aware `README.md`, `docs/DEVELOPMENT.md`, `docs/STACK.md`, and `SKILL.md` guidance that maps product tasks to ordinary framework source.
|
|
101
|
-
- Publish the repository skill, manual scaffolding reference, conventions, and output-tree contract with the npm package.
|
|
102
|
-
|
|
103
|
-
### Changed
|
|
104
|
-
|
|
105
|
-
- Pin the component installer to shadcn 4.13.0 and run all provider mutations inside Anhedral transaction staging.
|
|
106
|
-
- Preserve Anhedral's exact Expo SDK dependency while resolving React Native Reusables registry dependencies before the root workspace install.
|
|
107
|
-
- Present Anhedral as a readable TypeScript stack generator with native Next.js, Expo, Fastify, Drizzle, Electron, and WXT conventions rather than a proprietary application runtime.
|
|
108
|
-
- Use argument-vector process execution for workspace installation instead of invoking a command through a shell.
|
|
109
|
-
- Remove the retired one-app compiler experiment from the production CLI and package surface.
|
|
110
|
-
|
|
111
|
-
### Security
|
|
112
|
-
|
|
113
|
-
- Reject symbolic-link scaffold roots before creating transaction metadata or modifying their targets.
|
|
114
|
-
- Override vulnerable `shell-quote` and `sharp` dependency ranges in generated workspaces.
|
|
115
|
-
|
|
116
|
-
## 0.2.1 - 2026-07-16
|
|
117
|
-
|
|
118
|
-
### Added
|
|
119
|
-
|
|
120
|
-
- Add integrity-checked bundled framework substrates, typed module contributions, deterministic root composers, and manifest schema v4 template provenance.
|
|
121
|
-
- Add template tamper, symbolic-link, package-content, and contribution-composition regression tests.
|
|
122
|
-
- Add exact-artifact portability checks at the minimum Node.js 20 and 22 releases and the pinned Node.js 24 release on macOS and Windows.
|
|
123
|
-
- Add scheduled and release-gated Electron, WXT, and Expo native runtime acceptance lanes.
|
|
124
|
-
- Add deterministic workflow, Renovate extraction, release declaration, registry recovery, and module-topology policy tests.
|
|
125
|
-
|
|
126
|
-
### Security
|
|
127
|
-
|
|
128
|
-
- Reject altered template catalogs, mismatched substrate digests, symbolic links, forbidden generated artifacts, and oversized template trees before transactional commit.
|
|
129
|
-
- Scan all tracked text, built output, and final package tarballs for high-confidence secret formats before publication.
|
|
130
|
-
- Clarify that public package availability grants no installation, execution, or generated-output rights without a separate written agreement.
|
|
131
|
-
|
|
132
|
-
## 0.2.0 - 2026-07-15
|
|
133
|
-
|
|
134
|
-
### Added
|
|
135
|
-
|
|
136
|
-
- Add manifest schema v3 with deterministic module dependency resolution, file ownership, hashes, modes, and an explicit toolchain channel.
|
|
137
|
-
- Add transactional `init` and `add` operations with locking, journaling, rollback, dry-run plans, and JSON output.
|
|
138
|
-
- Add the `anhedral doctor` command.
|
|
139
|
-
- Add deterministic output-tree contracts for representative scaffold combinations.
|
|
140
|
-
|
|
141
|
-
### Changed
|
|
142
|
-
|
|
143
|
-
- Generate only the dependencies, source files, environment keys, apps, and shared packages required by selected modules.
|
|
144
|
-
- Align Vercel Services output with the current `services` schema and mount Fastify routes under the preserved `/api` path.
|
|
145
|
-
- Refresh the verified Next.js, Expo, Clerk, Electron, WXT, Vite, and RevenueCat integration matrix.
|
|
146
|
-
- Separate the side-effect-free package API from the executable CLI entry point.
|
|
147
|
-
- Preserve user-owned documentation, workflows, package fields, and mergeable root configuration during incremental adds.
|
|
148
|
-
- Build from a clean `dist/` directory before tests and packaging.
|
|
149
|
-
- Publish one verified tarball and compare its integrity with npm before tagging.
|
|
150
|
-
- Pin the release Node.js/npm packer so recovery rebuilds remain reproducible.
|
|
151
|
-
- Install the exact release artifact and run its `.bin/anhedral` shim in package smoke tests.
|
|
152
|
-
- Enforce an explicit npm package allowlist and artifact size policy.
|
|
153
|
-
- Test the CLI on Node.js 20, 22, and 24 in CI.
|
|
154
|
-
- Wire Clerk controls and token-aware API helpers into web and mobile templates, and make the desktop account action open Clerk sign-in or profile UI.
|
|
155
|
-
- Bootstrap RevenueCat only for `native-subscriptions`, connect native purchases to the authenticated user, and expose a native paywall action.
|
|
156
|
-
- Put pnpm overrides, build permissions, and peer policy in `pnpm-workspace.yaml`, with conflict-safe structural merges.
|
|
157
|
-
- Keep public API GET requests simple by omitting unused platform and content-type headers.
|
|
158
|
-
- Remove unused provider dependencies and environment placeholders from generated clients.
|
|
159
|
-
- Wire Tailwind CSS v4 into generated web and desktop builds, including semantic shadcn color tokens.
|
|
160
|
-
- Keep canonical module IDs and valid RFC 3986 URI schemes in generated project metadata and documentation.
|
|
161
|
-
- Refresh generator-owned Node.js and pnpm policy during incremental adds when the recorded package manifest is unmodified.
|
|
162
|
-
|
|
163
|
-
### Removed
|
|
164
|
-
|
|
165
|
-
- Remove pre-schema-v3 manifest migration, generated-layout adoption, deprecated module aliases, and duplicate `stack.json` output. Projects must be generated with the current CLI and use canonical module IDs.
|
|
166
|
-
|
|
167
|
-
### Security
|
|
168
|
-
|
|
169
|
-
- Reject modified managed files and unowned path collisions before committing incremental changes.
|
|
170
|
-
- Validate recovery journals, reject symlink traversal, and persist transaction intent before moving files.
|
|
171
|
-
- Audit every locked CLI dependency through OSV after pnpm's retired audit endpoint became unavailable.
|
|
172
|
-
- Make RevenueCat webhook processing fail closed and persist idempotency records when billing is selected.
|
|
173
|
-
- Scope npm credentials to the single publish step in the protected release job.
|
|
174
|
-
- Separate read-only release verification from npm publication and Git tag creation.
|
|
175
|
-
- Pin GitHub Actions to verified upstream commit SHAs.
|
|
176
|
-
- Default Fastify proxy trust to off, require an explicit bounded trusted-hop count, and minimize conditional Chrome permissions.
|
|
177
|
-
- Reconcile exact package versions against detailed OSV advisory ranges when the batch index is over-broad.
|
|
178
|
-
- Reject manifest-recorded directories and other non-regular paths during project health checks.
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
# Contributing
|
|
2
|
-
|
|
3
|
-
Changes should follow the repository's
|
|
4
|
-
[engineering principles](docs/engineering-principles.md): explicit behavior,
|
|
5
|
-
one source of truth, narrow namespaces, visible failures, and focused tests.
|
|
6
|
-
|
|
7
|
-
## Local setup
|
|
8
|
-
|
|
9
|
-
Anhedral requires Node.js 20.19+ or 22.12+ and pnpm 10.34.5.
|
|
10
|
-
|
|
11
|
-
```sh
|
|
12
|
-
pnpm install --frozen-lockfile
|
|
13
|
-
pnpm build
|
|
14
|
-
pnpm lint
|
|
15
|
-
pnpm check:security
|
|
16
|
-
pnpm check:release-policy
|
|
17
|
-
pnpm audit:osv
|
|
18
|
-
pnpm test
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Before opening a pull request
|
|
22
|
-
|
|
23
|
-
Run the checks relevant to the files you changed:
|
|
24
|
-
|
|
25
|
-
```sh
|
|
26
|
-
pnpm typecheck
|
|
27
|
-
pnpm test
|
|
28
|
-
pnpm test:pack
|
|
29
|
-
pnpm test:packlist
|
|
30
|
-
pnpm test:release-tooling
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Changes to generated templates or dependency pins should also run:
|
|
34
|
-
|
|
35
|
-
```sh
|
|
36
|
-
pnpm test:deps
|
|
37
|
-
pnpm test:e2e
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
The E2E test installs upstream packages in a disposable operating-system temp directory, so it requires network access and may take several minutes. It removes the workspace in a `finally` block; set `ANHEDRAL_E2E_KEEP=1` only when you intentionally need to inspect a failed or completed run.
|
|
41
|
-
|
|
42
|
-
After an intentional scaffold-output change, regenerate and review the path/mode/SHA-256 contracts and generated tree documentation:
|
|
43
|
-
|
|
44
|
-
```sh
|
|
45
|
-
pnpm build
|
|
46
|
-
node tests/update-output-tree-contracts.js
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Package changes
|
|
50
|
-
|
|
51
|
-
- Keep the public package allowlist narrow.
|
|
52
|
-
- Do not commit `dist/`, tarballs, `release-artifact/`, or temporary E2E/demo workspaces.
|
|
53
|
-
- Add or update a regression test for CLI behavior and generated configuration changes.
|
|
54
|
-
- Keep stable toolchain commands pinned; mutable upstream versions belong only in the `latest` lane.
|
|
55
|
-
- Run the OSV audit against a newly installed representative generated lockfile when changing framework or runtime pins.
|
|
56
|
-
|
|
57
|
-
## Ownership and required review
|
|
58
|
-
|
|
59
|
-
Repository administrators must map the following roles to real maintainers in branch protection, the protected `npm` environment, private vulnerability reporting, and workflow-failure notifications:
|
|
60
|
-
|
|
61
|
-
- **Generator owner:** core architecture, transactions, manifests, and generated-file ownership.
|
|
62
|
-
- **Runtime owner:** application templates, provider integrations, and the stable dependency manifest.
|
|
63
|
-
- **Release owner:** package metadata, CI workflows, registry publication, tags, and recovery.
|
|
64
|
-
- **Security responder:** vulnerability intake, secret-exposure response, and supply-chain incidents.
|
|
65
|
-
|
|
66
|
-
No `CODEOWNERS` file is committed until an actual GitHub user or team slug is selected. A placeholder would create false confidence without enforcing review. Require at least one appropriate owner review for generator/runtime changes and a release-owner review for `.github/workflows/`, `scripts/`, `package.json`, `renovate.json`, `SECURITY.md`, or `docs/RELEASING.md`.
|
|
67
|
-
|
|
68
|
-
Scheduled Toolchain Drift failures and release-workflow failures must alert the release owner. Security-policy, secret-scan, or OSV failures must additionally alert the security responder. Configure those routes in repository notification settings and test them after changing ownership.
|
|
69
|
-
|
|
70
|
-
## Releases
|
|
71
|
-
|
|
72
|
-
Do not run `npm publish` from a development checkout. Version changes are reviewed before release, and CI publishes the verified tarball. See [docs/RELEASING.md](docs/RELEASING.md).
|
|
73
|
-
|
|
74
|
-
This repository and package are licensed under the Apache License 2.0. Unless
|
|
75
|
-
explicitly stated otherwise, contributions intentionally submitted for
|
|
76
|
-
inclusion in Anhedral are provided under the same license, as described in
|
|
77
|
-
Section 5 of [LICENSE](LICENSE).
|
package/SECURITY.md
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# Security Policy
|
|
2
|
-
|
|
3
|
-
## Supported versions
|
|
4
|
-
|
|
5
|
-
Security fixes are made on the current development branch and released as a new npm version. Consumers should use the latest version published under the `latest` dist-tag.
|
|
6
|
-
|
|
7
|
-
## Reporting a vulnerability
|
|
8
|
-
|
|
9
|
-
Do not open a public issue for a suspected vulnerability. Use GitHub's private vulnerability reporting or security-advisory flow for this repository. If repository access is unavailable, contact the package maintainers through the owner information on the [anhedral npm package](https://www.npmjs.com/package/anhedral).
|
|
10
|
-
|
|
11
|
-
Include the affected version, reproduction steps, impact, and any suggested mitigation. Please avoid accessing data that is not yours and allow maintainers time to investigate before public disclosure.
|
|
12
|
-
|
|
13
|
-
## Supply-chain policy
|
|
14
|
-
|
|
15
|
-
- Release artifacts are built and tested in a read-only job.
|
|
16
|
-
- The exact tarball uploaded by CI is the artifact submitted to npm.
|
|
17
|
-
- npm integrity is checked before and after publication.
|
|
18
|
-
- npm publication uses Trusted Publishing: GitHub exchanges an OIDC identity for a short-lived credential only in the publish step of the protected `npm` environment. No npm write token is stored in GitHub.
|
|
19
|
-
- A Git tag and GitHub release are created only after npm confirms the expected artifact integrity.
|
|
20
|
-
- GitHub Actions are pinned to reviewed commit SHAs, and the release Node.js/npm packer is pinned to an exact version.
|
|
21
|
-
- CI queries OSV for every exact package version in `pnpm-lock.yaml` and every dependency version shipped by the generator; it fails closed if the service remains unavailable after bounded retries or reports a finding.
|
|
22
|
-
- Local policy scans every tracked or non-ignored working-tree text file and built `dist/` file for high-confidence credential formats. Release jobs repeat the scan against the exact gzip tarball before it crosses the publish boundary. Placeholder examples use explicit non-secret values rather than allowlisting token-shaped strings.
|
|
23
|
-
- Release declarations must be valid Semantic Versioning and have a matching `CHANGELOG.md` section. Local deterministic checks validate workflow policy and confirm every Renovate custom manager still extracts a maintained pin.
|
|
24
|
-
|
|
25
|
-
Generated projects pin their stable dependency manifest, explicitly allow only required dependency build scripts, and record the selected toolchain channel in `anhedral.json`. The `latest` channel is for upstream-drift testing and is not the reproducible default.
|
|
26
|
-
|
|
27
|
-
Incremental generation rejects path traversal, symbolic-link targets, unowned collisions, modified managed files, and managed-file permission drift. Transaction journals are validated before recovery, fsynced before filesystem moves, and advanced only around durable rename barriers where the host filesystem supports directory synchronization.
|
|
28
|
-
|
|
29
|
-
UI component installation is an explicit networked supply-chain operation. Anhedral pins the shadcn installer version, routes Expo only to the official HTTPS React Native Reusables registry, validates component names and target paths, and runs provider mutation inside transaction staging. Provider-generated files and dependency manifests must pass ownership checks before commit. Users should review `--dry-run` output and the resulting source diff; registry content is upstream-maintained and is not part of Anhedral's immutable bundled-template catalog.
|
|
30
|
-
|
|
31
|
-
## Secret response
|
|
32
|
-
|
|
33
|
-
If a secret-shaped finding is real, do not merely remove it from the latest commit. Revoke or rotate the credential first, identify every log, artifact, cache, fork, and package version that may contain it, and coordinate history or artifact cleanup with the security responder. Treat false positives by changing the example to an unmistakable placeholder; do not add broad path exclusions.
|
|
34
|
-
|
|
35
|
-
Anhedral is licensed under the Apache License 2.0. Security research must still
|
|
36
|
-
comply with applicable law and the systems owner's authorization; the software
|
|
37
|
-
license does not authorize testing infrastructure or accounts you do not own.
|