anhedral 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 +69 -11
- package/dist/branding.d.ts +2 -0
- package/dist/branding.js +9 -1
- package/dist/commands.js +1 -1
- package/dist/templates/default-web.js +798 -230
- package/dist/templates/frontend.js +1 -1
- package/dist/toolchain.js +6 -0
- package/dist/util.d.ts +1 -1
- package/dist/util.js +62 -38
- package/favicon.ico +0 -0
- package/package.json +12 -4
package/README.md
CHANGED
|
@@ -9,31 +9,31 @@ Opinionated init CLI for product teams shipping with Next.js, Expo, Fastify, Dri
|
|
|
9
9
|
|
|
10
10
|
## Usage
|
|
11
11
|
|
|
12
|
-
Run the CLI directly without installing it globally:
|
|
12
|
+
Run the latest published CLI directly without installing it globally:
|
|
13
13
|
|
|
14
14
|
```sh
|
|
15
|
-
pnpm dlx anhedral init next
|
|
16
|
-
pnpm dlx anhedral init next-fullstack
|
|
17
|
-
pnpm dlx anhedral init expo-fullstack
|
|
18
|
-
pnpm dlx anhedral init backend
|
|
15
|
+
pnpm dlx anhedral@latest init next
|
|
16
|
+
pnpm dlx anhedral@latest init next-fullstack
|
|
17
|
+
pnpm dlx anhedral@latest init expo-fullstack
|
|
18
|
+
pnpm dlx anhedral@latest init backend
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
```sh
|
|
22
|
-
npx anhedral init next
|
|
23
|
-
npx anhedral init next-fullstack
|
|
24
|
-
npx anhedral init expo-fullstack
|
|
25
|
-
npx anhedral init backend
|
|
22
|
+
npx anhedral@latest init next
|
|
23
|
+
npx anhedral@latest init next-fullstack
|
|
24
|
+
npx anhedral@latest init expo-fullstack
|
|
25
|
+
npx anhedral@latest init backend
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
Global install also works:
|
|
29
29
|
|
|
30
30
|
```sh
|
|
31
|
-
pnpm add -g anhedral
|
|
31
|
+
pnpm add -g anhedral@latest
|
|
32
32
|
anhedral init next
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
```sh
|
|
36
|
-
npm install -g anhedral
|
|
36
|
+
npm install -g anhedral@latest
|
|
37
37
|
anhedral init next
|
|
38
38
|
```
|
|
39
39
|
|
|
@@ -58,8 +58,66 @@ pnpm test:all
|
|
|
58
58
|
|
|
59
59
|
This package is published once to the npm registry. `pnpm`, `npm`, `yarn`, and `bun` users all install that same published package.
|
|
60
60
|
|
|
61
|
+
Manual local publish still works:
|
|
62
|
+
|
|
61
63
|
```sh
|
|
62
64
|
pnpm build
|
|
63
65
|
pnpm test:all
|
|
64
66
|
npm publish
|
|
65
67
|
```
|
|
68
|
+
|
|
69
|
+
GitHub Actions release automation is also configured in `.github/workflows/release.yml`.
|
|
70
|
+
|
|
71
|
+
Recommended release flow:
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
pnpm release:check
|
|
75
|
+
npm version patch
|
|
76
|
+
git push --follow-tags
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The release workflow will publish on tags like `v0.1.1`. For npm trusted publishing, configure the package on npmjs.com to trust the `release.yml` workflow in `anhedral/anhedral-init`.
|
|
80
|
+
|
|
81
|
+
## Maintenance
|
|
82
|
+
|
|
83
|
+
This repo is now maintained in two lanes:
|
|
84
|
+
|
|
85
|
+
- `stable`: the default user-facing toolchain, pinned to known-good upstream CLI versions in `src/toolchain.ts`.
|
|
86
|
+
- `latest`: an early-warning lane that tracks upstream scaffold tools without pinning, so breakage is detected before it reaches the default path.
|
|
87
|
+
|
|
88
|
+
The practical rule is simple: detect drift on `latest`, verify it, then promote the pinned `stable` versions only after the e2e matrix passes.
|
|
89
|
+
|
|
90
|
+
### Recommended automation
|
|
91
|
+
|
|
92
|
+
- Renovate is configured in `renovate.json` to keep this repo's own dependencies current.
|
|
93
|
+
- GitHub Actions CI runs on pushes and pull requests in `.github/workflows/ci.yml`.
|
|
94
|
+
- Weekly toolchain drift checks run in `.github/workflows/toolchain-drift.yml` for both `stable` and `latest`.
|
|
95
|
+
- Tagged releases publish through `.github/workflows/release.yml`.
|
|
96
|
+
- Stable toolchain pins in `src/toolchain.ts` are annotated so Renovate can open PRs when upstream scaffold CLIs publish updates.
|
|
97
|
+
- `prepublishOnly` stays strict. Every publish still runs `pnpm test:all`.
|
|
98
|
+
|
|
99
|
+
### Upgrade workflow
|
|
100
|
+
|
|
101
|
+
Use this sequence when Renovate opens a dependency or toolchain PR:
|
|
102
|
+
|
|
103
|
+
```sh
|
|
104
|
+
pnpm install --frozen-lockfile
|
|
105
|
+
pnpm test
|
|
106
|
+
pnpm test:e2e
|
|
107
|
+
npm pack --dry-run
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
If you want to validate upstream scaffold drift manually, use the explicit latest-lane script:
|
|
111
|
+
|
|
112
|
+
```sh
|
|
113
|
+
pnpm test:e2e:latest
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
When a toolchain pin PR passes and the generated outputs look good, update the `verifiedAt` date in `src/toolchain.ts` and release normally.
|
|
117
|
+
|
|
118
|
+
### Release policy
|
|
119
|
+
|
|
120
|
+
- Publish `patch` releases for scaffold fixes, dependency bumps, and safer defaults.
|
|
121
|
+
- Publish `minor` releases for new stacks, new flags, or new generated capabilities.
|
|
122
|
+
- Publish `major` releases for breaking CLI changes or incompatible generated-project structure changes.
|
|
123
|
+
- Never publish from a dirty worktree.
|
package/dist/branding.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export declare const ANHEDRAL_LOGO_FILE_NAME = "anhedral.svg";
|
|
2
2
|
export declare const ANHEDRAL_LOGO_PUBLIC_PATH = "/anhedral.svg";
|
|
3
|
+
export declare const ANHEDRAL_FAVICON_FILE_NAME = "favicon.ico";
|
|
3
4
|
export declare function writeAnhedralLogo(root: string): void;
|
|
5
|
+
export declare function writeAnhedralWebBranding(root: string): void;
|
package/dist/branding.js
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import { readFileSync } from 'node:fs';
|
|
1
|
+
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { writeFile } from './util.js';
|
|
4
4
|
export const ANHEDRAL_LOGO_FILE_NAME = 'anhedral.svg';
|
|
5
5
|
export const ANHEDRAL_LOGO_PUBLIC_PATH = `/${ANHEDRAL_LOGO_FILE_NAME}`;
|
|
6
|
+
export const ANHEDRAL_FAVICON_FILE_NAME = 'favicon.ico';
|
|
6
7
|
const ANHEDRAL_LOGO_SVG = readFileSync(new URL('../anhedral.svg', import.meta.url), 'utf8');
|
|
8
|
+
const ANHEDRAL_FAVICON = readFileSync(new URL(`../${ANHEDRAL_FAVICON_FILE_NAME}`, import.meta.url));
|
|
7
9
|
export function writeAnhedralLogo(root) {
|
|
8
10
|
writeFile(path.join(root, 'public', ANHEDRAL_LOGO_FILE_NAME), ANHEDRAL_LOGO_SVG);
|
|
9
11
|
}
|
|
12
|
+
export function writeAnhedralWebBranding(root) {
|
|
13
|
+
writeAnhedralLogo(root);
|
|
14
|
+
const faviconPath = path.join(root, 'app', ANHEDRAL_FAVICON_FILE_NAME);
|
|
15
|
+
mkdirSync(path.dirname(faviconPath), { recursive: true });
|
|
16
|
+
writeFileSync(faviconPath, ANHEDRAL_FAVICON);
|
|
17
|
+
}
|
package/dist/commands.js
CHANGED
|
@@ -21,7 +21,7 @@ export function getDefaultWebInitCommand(toolchain, projectName) {
|
|
|
21
21
|
export function getDefaultWebDependencyCommands() {
|
|
22
22
|
return [
|
|
23
23
|
{
|
|
24
|
-
cmd: 'pnpm add @clerk/nextjs
|
|
24
|
+
cmd: 'pnpm add @clerk/nextjs drizzle-orm @neondatabase/serverless stripe @aws-sdk/client-s3 @aws-sdk/lib-storage @aws-sdk/s3-request-presigner',
|
|
25
25
|
skippable: true,
|
|
26
26
|
},
|
|
27
27
|
{
|