anhedral 0.6.0 → 0.6.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 +12 -2
- package/dist/dependencies.js +3 -3
- package/dist/standard.js +23 -6
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -6
package/README.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Anhedral
|
|
2
2
|
|
|
3
|
+
[](https://github.com/anhedral/anhedral-init/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/anhedral)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
|
|
3
7
|
Initialize client-owned applications using the [Anhedral Application Stack & Delivery Standard](docs/application-stack-standard.md).
|
|
4
8
|
|
|
5
9
|
Every new project starts from the official **shadcn pnpm/Turborepo monorepo**. The default creates **Next.js + React + TypeScript + Tailwind + shadcn/ui**, hosted on **Cloudflare Workers through OpenNext**. Select additional apps and services only when needed.
|
|
@@ -33,12 +37,18 @@ Provider packages and services are **starters**, not finished product features.
|
|
|
33
37
|
|
|
34
38
|
The CLI supports `new`, `init`, `--help`, and `--version`. Use `anhedral --help` for options.
|
|
35
39
|
|
|
40
|
+
Requires Node.js 20.19+ in the 20 series or 22.12+ and pnpm 10.34.5. Version 0.6 replaces the legacy generator and builder with the Cloudflare-first initializer; earlier generator commands and templates are retired. Existing applications are not automatically migrated. Pin a CLI version for reproducible initialization and review upgrades before use.
|
|
41
|
+
|
|
42
|
+
## Contributing and security
|
|
43
|
+
|
|
44
|
+
Anhedral is maintainer-led, with a small contribution surface. Focused bug fixes, tests, and documentation corrections are welcome; discuss larger changes before implementation. See [contributing](https://github.com/anhedral/anhedral-init/blob/main/.github/CONTRIBUTING.md), the [code of conduct](https://github.com/anhedral/anhedral-init/blob/main/.github/CODE_OF_CONDUCT.md), and [security reporting](https://github.com/anhedral/anhedral-init/blob/main/.github/SECURITY.md). Use [issues](https://github.com/anhedral/anhedral-init/issues) for reproducible CLI problems and [private reporting](https://github.com/anhedral/anhedral-init/security/advisories/new) for vulnerabilities.
|
|
45
|
+
|
|
36
46
|
## Workspace layout
|
|
37
47
|
|
|
38
48
|
```text
|
|
39
49
|
demo/
|
|
40
50
|
├── anhedral-factory/ Factory application and service workspaces
|
|
41
|
-
└── default-stack-demo/
|
|
51
|
+
└── default-stack-demo/ Default stack snapshot with security maintenance
|
|
42
52
|
|
|
43
53
|
src/ Current initializer implementation
|
|
44
54
|
dist/ Generated JavaScript + declarations
|
|
@@ -53,4 +63,4 @@ pnpm --dir demo/anhedral-factory dev
|
|
|
53
63
|
pnpm --dir demo/anhedral-factory check
|
|
54
64
|
```
|
|
55
65
|
|
|
56
|
-
Anhedral is open source under the [Apache License 2.0](LICENSE). Generated applications remain ordinary project source that their developers can customize and license for their products.
|
|
66
|
+
Anhedral is open source under the [Apache License 2.0](LICENSE). Generated applications remain ordinary project source that their developers can customize and license for their products. Preserve applicable license notices for upstream code and dependencies.
|
package/dist/dependencies.js
CHANGED
|
@@ -21,7 +21,7 @@ export const DESKTOP_DEPENDENCIES = {
|
|
|
21
21
|
// renovate: datasource=npm depName=@types/react-dom
|
|
22
22
|
"@types/react-dom": '19.2.3',
|
|
23
23
|
// renovate: datasource=npm depName=electron
|
|
24
|
-
"electron": '43.
|
|
24
|
+
"electron": '43.7.8',
|
|
25
25
|
// renovate: datasource=npm depName=electron-builder
|
|
26
26
|
"electron-builder": '26.15.3',
|
|
27
27
|
// renovate: datasource=npm depName=electron-builder-squirrel-windows
|
|
@@ -29,7 +29,7 @@ export const DESKTOP_DEPENDENCIES = {
|
|
|
29
29
|
// renovate: datasource=npm depName=tailwindcss
|
|
30
30
|
"tailwindcss": '4.1.18',
|
|
31
31
|
// renovate: datasource=npm depName=postcss
|
|
32
|
-
"postcss": '8.5.
|
|
32
|
+
"postcss": '8.5.23',
|
|
33
33
|
// renovate: datasource=npm depName=typescript
|
|
34
34
|
"typescript": '5.9.3',
|
|
35
35
|
// renovate: datasource=npm depName=vite
|
|
@@ -59,7 +59,7 @@ export const EXTENSION_DEPENDENCIES = {
|
|
|
59
59
|
// renovate: datasource=npm depName=autoprefixer
|
|
60
60
|
"autoprefixer": '10.4.23',
|
|
61
61
|
// renovate: datasource=npm depName=postcss
|
|
62
|
-
"postcss": '8.5.
|
|
62
|
+
"postcss": '8.5.23',
|
|
63
63
|
// renovate: datasource=npm depName=tailwindcss
|
|
64
64
|
"tailwindcss": '3.4.19',
|
|
65
65
|
// renovate: datasource=npm depName=typescript
|
package/dist/standard.js
CHANGED
|
@@ -149,6 +149,10 @@ function cleanShadcnStarter(root) {
|
|
|
149
149
|
if (!sources.some((source) => source.includes('@turbo/gen')) && !Object.values(manifest.scripts ?? {}).some((script) => String(script).includes('turbo gen')))
|
|
150
150
|
delete manifest.devDependencies?.['@turbo/gen'];
|
|
151
151
|
manifest.devDependencies = { ...manifest.devDependencies, 'postcss-load-config': '^6.0.1' };
|
|
152
|
+
if (manifest.dependencies?.shadcn) {
|
|
153
|
+
manifest.devDependencies.shadcn = manifest.dependencies.shadcn;
|
|
154
|
+
delete manifest.dependencies.shadcn;
|
|
155
|
+
}
|
|
152
156
|
}
|
|
153
157
|
json(root, manifestPath, manifest);
|
|
154
158
|
}
|
|
@@ -230,7 +234,7 @@ export function createDatabase(connectionString: string) {
|
|
|
230
234
|
` : `import { drizzle } from 'drizzle-orm/d1';
|
|
231
235
|
import * as schema from './schema.js';
|
|
232
236
|
export function createDatabase(binding: Parameters<typeof drizzle>[0]) { return drizzle(binding, { schema }); }
|
|
233
|
-
`, { 'drizzle-orm': '^0.
|
|
237
|
+
`, { 'drizzle-orm': '^0.45.3', ...(has('neon') ? { postgres: '^3.4.0' } : {}) });
|
|
234
238
|
put(root, 'packages/db/src/schema.ts', '// Define product tables here; generate and review SQL before migration.\nexport {};\n');
|
|
235
239
|
put(root, 'packages/db/drizzle.config.ts', has('neon') ? `import { defineConfig } from 'drizzle-kit';
|
|
236
240
|
export default defineConfig({ dialect: 'postgresql', schema: './src/schema.ts', out: './migrations', dbCredentials: { url: process.env.DATABASE_URL! } });
|
|
@@ -270,7 +274,7 @@ async function handler(request: Request) {
|
|
|
270
274
|
export { handler as GET, handler as POST };
|
|
271
275
|
`);
|
|
272
276
|
put(root, 'apps/web/cloudflare-env.d.ts', `interface CloudflareEnv { ${has('neon') ? 'HYPERDRIVE: { connectionString: string };' : "DB: Parameters<typeof import('drizzle-orm/d1').drizzle>[0];"} }\n`);
|
|
273
|
-
patchPackage(root, 'apps/web/package.json', { dependencies: { 'drizzle-orm': '^0.
|
|
277
|
+
patchPackage(root, 'apps/web/package.json', { dependencies: { 'drizzle-orm': '^0.45.3' } });
|
|
274
278
|
}
|
|
275
279
|
put(root, `apps/${runtimeApp}/.dev.vars.example`, 'BETTER_AUTH_SECRET=\nBETTER_AUTH_URL=http://localhost:8787\n');
|
|
276
280
|
if (has('hono'))
|
|
@@ -402,10 +406,23 @@ export async function recordEvents(stream: EventStream, events: Record<string, u
|
|
|
402
406
|
function writeStandardRoot(root, options) {
|
|
403
407
|
const has = (value) => options.products.includes(value);
|
|
404
408
|
const existing = readJson(root, 'package.json');
|
|
409
|
+
const securityOverrides = {
|
|
410
|
+
"sharp@<0.35.5": "0.35.5",
|
|
411
|
+
"source-map-js@<1.2.2": "1.2.2",
|
|
412
|
+
"baseline-browser-mapping@<2.11.0": "2.11.27",
|
|
413
|
+
"browserslist@<4.28.7": "4.29.3",
|
|
414
|
+
"esbuild@<0.25.0": "0.25.12",
|
|
415
|
+
"brace-expansion@<2": "1.1.21",
|
|
416
|
+
"brace-expansion@>=2 <3": "2.1.7",
|
|
417
|
+
"brace-expansion@>=3 <4": "3.0.9",
|
|
418
|
+
"brace-expansion@>=4 <5.0.12": "5.0.12"
|
|
419
|
+
};
|
|
405
420
|
patchPackage(root, 'package.json', { name: options.name, packageManager: PACKAGE_MANAGER, engines: { node: '>=22.13.0' },
|
|
406
421
|
scripts: { dev: 'turbo dev', build: 'turbo build', lint: 'turbo lint', typecheck: 'turbo typecheck',
|
|
407
|
-
test: 'turbo test', audit: 'node scripts/audit.mjs', 'audit:full': 'fallow --fail-on-issues', check: 'pnpm lint && pnpm typecheck && pnpm run audit && pnpm test && pnpm build' },
|
|
408
|
-
devDependencies: { fallow: '^3.31.0' }
|
|
422
|
+
test: 'turbo test', audit: 'node scripts/audit.mjs', 'audit:full': 'fallow --fail-on-issues', 'audit:deps': 'pnpm audit --prod --audit-level high', check: 'pnpm lint && pnpm typecheck && pnpm run audit && pnpm audit:deps && pnpm test && pnpm build' },
|
|
423
|
+
devDependencies: { fallow: '^3.31.0' },
|
|
424
|
+
// Upstream starter lockfiles can retain vulnerable transitive versions. Keep fixes within compatible majors.
|
|
425
|
+
pnpm: { ...existing.pnpm, overrides: { ...existing.pnpm?.overrides, ...securityOverrides } } });
|
|
409
426
|
put(root, 'scripts/audit.mjs', `import { spawnSync } from 'node:child_process';
|
|
410
427
|
const base = process.env.AUDIT_BASE;
|
|
411
428
|
const hasBase = base || ['origin/main', 'main'].find((ref) => spawnSync('git', ['rev-parse', '--verify', ref], { stdio: 'ignore' }).status === 0);
|
|
@@ -414,7 +431,7 @@ const result = spawnSync('pnpm', args, { stdio: 'inherit', shell: false });
|
|
|
414
431
|
if (result.error) throw result.error;
|
|
415
432
|
process.exitCode = result.status ?? 1;
|
|
416
433
|
`);
|
|
417
|
-
json(root, '.fallowrc.json', { ignorePatterns: ['**/.next/**', '**/.open-next/**', '**/.wrangler/**', '**/dist/**', '**/worker-configuration.d.ts', '**/cloudflare-env.d.ts'] });
|
|
434
|
+
json(root, '.fallowrc.json', { ignorePatterns: ['**/next-env.d.ts', '**/.next/**', '**/.open-next/**', '**/.wrangler/**', '**/dist/**', '**/worker-configuration.d.ts', '**/cloudflare-env.d.ts'] });
|
|
418
435
|
const turbo = readJson(root, 'turbo.json');
|
|
419
436
|
turbo.globalEnv = ['DATABASE_URL', 'NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY', 'CLERK_SECRET_KEY', 'BETTER_AUTH_SECRET', 'BETTER_AUTH_URL', 'OPENAI_API_KEY', 'RESEND_API_KEY', 'STRIPE_SECRET_KEY', 'STRIPE_WEBHOOK_SECRET', 'POSTHOG_API_KEY', 'POSTHOG_HOST', 'SENTRY_DSN'];
|
|
420
437
|
turbo.tasks = { ...turbo.tasks, test: { dependsOn: ['^build'], outputs: ['coverage/**'] },
|
|
@@ -496,7 +513,7 @@ jobs:
|
|
|
496
513
|
node-version: '22'
|
|
497
514
|
cache: pnpm
|
|
498
515
|
- run: pnpm install --frozen-lockfile
|
|
499
|
-
- run: pnpm lint && pnpm typecheck
|
|
516
|
+
- run: pnpm lint && pnpm typecheck && pnpm audit:deps
|
|
500
517
|
- name: Audit pull request
|
|
501
518
|
if: github.event_name == 'pull_request'
|
|
502
519
|
env:
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Kept in sync with package.json by tests/release checks. */
|
|
2
|
-
export declare const GENERATOR_VERSION = "0.6.
|
|
2
|
+
export declare const GENERATOR_VERSION = "0.6.1";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** Kept in sync with package.json by tests/release checks. */
|
|
2
|
-
export const GENERATOR_VERSION = '0.6.
|
|
2
|
+
export const GENERATOR_VERSION = '0.6.1';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anhedral",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Initialize client-owned applications with shadcn, pnpm, Turborepo, and Cloudflare-first services.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -89,11 +89,6 @@
|
|
|
89
89
|
],
|
|
90
90
|
"license": "Apache-2.0",
|
|
91
91
|
"packageManager": "pnpm@10.34.5",
|
|
92
|
-
"pnpm": {
|
|
93
|
-
"overrides": {
|
|
94
|
-
"brace-expansion@<=5.0.7": "5.0.8"
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
92
|
"devDependencies": {
|
|
98
93
|
"@types/node": "20.19.43",
|
|
99
94
|
"simple-icons": "16.27.0",
|