@tsparticles/cli 3.3.1 → 3.3.3
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/.github/dependabot.yml +7 -0
- package/.planning/codebase/ARCHITECTURE.md +83 -51
- package/.planning/codebase/CONCERNS.md +61 -58
- package/.planning/codebase/CONVENTIONS.md +47 -52
- package/.planning/codebase/INTEGRATIONS.md +26 -17
- package/.planning/codebase/STACK.md +37 -31
- package/.planning/codebase/STRUCTURE.md +87 -53
- package/.planning/codebase/TESTING.md +80 -62
- package/dist/build/build-distfiles.js +14 -13
- package/dist/build/build-diststats.js +8 -7
- package/dist/build/build-prettier.js +16 -15
- package/dist/build/build-tsc.js +4 -3
- package/dist/build/build.js +10 -8
- package/dist/cli.js +3 -3
- package/dist/create/plugin/create-plugin.js +4 -3
- package/dist/create/preset/create-preset.js +4 -3
- package/dist/create/shape/create-shape.js +4 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/file-utils.js +8 -7
- package/dist/utils/template-utils.js +4 -3
- package/files/empty-project/package.json +7 -7
- package/files/empty-project/webpack.config.js +11 -11
- package/package.json +9 -11
- package/src/build/build-distfiles.ts +15 -14
- package/src/build/build-diststats.ts +8 -8
- package/src/build/build-prettier.ts +16 -15
- package/src/build/build-tsc.ts +4 -3
- package/src/build/build.ts +10 -10
- package/src/cli.ts +3 -3
- package/src/create/plugin/create-plugin.ts +4 -3
- package/src/create/preset/create-preset.ts +4 -3
- package/src/create/shape/create-shape.ts +4 -3
- package/src/utils/file-utils.ts +8 -7
- package/src/utils/template-utils.ts +4 -3
- package/tests/create-plugin.test.ts +25 -25
- package/tests/create-preset.test.ts +25 -25
- package/tests/create-shape.test.ts +25 -25
- package/tests/file-utils.test.ts +87 -78
- package/tests/tsconfig.json +12 -11
- package/tsconfig.json +52 -53
|
@@ -1,73 +1,82 @@
|
|
|
1
1
|
# External Integrations
|
|
2
2
|
|
|
3
|
-
**Analysis Date:** 2026-03-
|
|
3
|
+
**Analysis Date:** 2026-03-10
|
|
4
4
|
|
|
5
5
|
## APIs & External Services
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
This project is a local CLI tool focused on scaffolding and building tsParticles-related packages. There are minimal external service integrations.
|
|
8
|
+
|
|
9
|
+
**Repository / Git:**
|
|
10
|
+
|
|
11
|
+
- Git: CLI uses the `git` binary when available to obtain repository URL (`src/utils/file-utils.ts` uses `lookpath("git")` and executes `git config --get remote.origin.url`). No other GitHub API integration detected.
|
|
12
|
+
|
|
13
|
+
**NPM Registry:**
|
|
14
|
+
|
|
15
|
+
- Publishing: GitHub Actions workflow publishes packages to npm registry (`.github/workflows/npm-publish.yml`) using `pnpm publish` against `https://registry.npmjs.org`.
|
|
16
|
+
- Auth: CI uses OIDC/GitHub Actions environment for authentication as configured in `.github/workflows/npm-publish.yml` (permissions include `id-token: write`).
|
|
8
17
|
|
|
9
18
|
## Data Storage
|
|
10
19
|
|
|
11
20
|
**Databases:**
|
|
12
21
|
|
|
13
|
-
- Not detected.
|
|
22
|
+
- Not detected. The CLI operates on the local filesystem; no database clients (e.g. PostgreSQL, MongoDB) are referenced in `src/`.
|
|
14
23
|
|
|
15
24
|
**File Storage:**
|
|
16
25
|
|
|
17
|
-
- Local filesystem via `fs-extra`
|
|
26
|
+
- Local filesystem via `fs-extra` (`src/utils/file-utils.ts` and many create/template helpers). Templates are copied from `files/*` into target directories (`src/create/*`, e.g. `src/create/plugin/create-plugin.ts` uses `files/create-plugin`).
|
|
18
27
|
|
|
19
28
|
**Caching:**
|
|
20
29
|
|
|
21
|
-
-
|
|
30
|
+
- Not detected. No Redis or in-process caching libraries observed.
|
|
22
31
|
|
|
23
32
|
## Authentication & Identity
|
|
24
33
|
|
|
25
34
|
**Auth Provider:**
|
|
26
35
|
|
|
27
|
-
-
|
|
36
|
+
- None for runtime. CI publishes to npm using GitHub Actions OIDC flow (see `.github/workflows/npm-publish.yml`). There are no runtime OAuth or Identity providers integrated into the CLI.
|
|
28
37
|
|
|
29
38
|
## Monitoring & Observability
|
|
30
39
|
|
|
31
40
|
**Error Tracking:**
|
|
32
41
|
|
|
33
|
-
-
|
|
42
|
+
- Not detected. No Sentry, Datadog, or similar SDKs in dependencies.
|
|
34
43
|
|
|
35
44
|
**Logs:**
|
|
36
45
|
|
|
37
|
-
-
|
|
46
|
+
- Console logging used throughout the CLI (`console.log`, `console.warn`, `console.error`). See `src/build/*` and `src/create/*` for examples (e.g. `src/build/build.ts`, `src/build/build-prettier.ts`).
|
|
38
47
|
|
|
39
48
|
## CI/CD & Deployment
|
|
40
49
|
|
|
41
50
|
**Hosting:**
|
|
42
51
|
|
|
43
|
-
- NPM registry
|
|
52
|
+
- NPM registry for package distribution. Source is maintained in GitHub and CI runs on GitHub Actions (`.github/workflows/*`).
|
|
44
53
|
|
|
45
54
|
**CI Pipeline:**
|
|
46
55
|
|
|
47
|
-
- GitHub Actions
|
|
48
|
-
-
|
|
49
|
-
-
|
|
56
|
+
- GitHub Actions pipelines:
|
|
57
|
+
- `Node.js CI` (`.github/workflows/node.js-ci.yml`) runs on push and PRs to `main`: installs via `pnpm install`, runs `pnpm run build:ci` and `pnpm test`.
|
|
58
|
+
- `Publish Packages` (`.github/workflows/npm-publish.yml`) publishes tags `v*` to npm, using OIDC-based auth and `pnpm publish`.
|
|
50
59
|
|
|
51
60
|
## Environment Configuration
|
|
52
61
|
|
|
53
62
|
**Required env vars:**
|
|
54
63
|
|
|
55
|
-
-
|
|
64
|
+
- Not enforced in repo code. CI publishing relies on GitHub Actions OIDC configured in workflow; no runtime environment variables are required by the CLI itself.
|
|
56
65
|
|
|
57
66
|
**Secrets location:**
|
|
58
67
|
|
|
59
|
-
-
|
|
68
|
+
- Not present in repo. CI uses OIDC in the publish workflow. No local secrets files detected (no `.env`).
|
|
60
69
|
|
|
61
70
|
## Webhooks & Callbacks
|
|
62
71
|
|
|
63
72
|
**Incoming:**
|
|
64
73
|
|
|
65
|
-
-
|
|
74
|
+
- Not detected. This is a CLI tool; it does not expose HTTP endpoints.
|
|
66
75
|
|
|
67
76
|
**Outgoing:**
|
|
68
77
|
|
|
69
|
-
-
|
|
78
|
+
- Not detected. The CLI does not make outbound HTTP API calls; templates and README files reference public CDNs (jsDelivr) and GitHub URLs but no HTTP client libraries are used.
|
|
70
79
|
|
|
71
80
|
---
|
|
72
81
|
|
|
73
|
-
_Integration audit: 2026-03-
|
|
82
|
+
_Integration audit: 2026-03-10_
|
|
@@ -1,85 +1,91 @@
|
|
|
1
1
|
# Technology Stack
|
|
2
2
|
|
|
3
|
-
**Analysis Date:** 2026-03-
|
|
3
|
+
**Analysis Date:** 2026-03-10
|
|
4
4
|
|
|
5
5
|
## Languages
|
|
6
6
|
|
|
7
7
|
**Primary:**
|
|
8
8
|
|
|
9
|
-
- TypeScript (
|
|
9
|
+
- TypeScript 5.x (project uses `typescript` ^5.9.3) - used across CLI source under `src/` (`src/**/*.ts`). See `package.json` and `tsconfig.json` (`package.json`: `dependencies`/`devDependencies`, `tsconfig.json`: `compilerOptions`).
|
|
10
10
|
|
|
11
11
|
**Secondary:**
|
|
12
12
|
|
|
13
|
-
- JavaScript (Node
|
|
13
|
+
- JavaScript (Node ESM runtime output in `dist/` / CLI entry `dist/cli.js`) - `package.json` `type: "module"` and `bin` field (`package.json`).
|
|
14
14
|
|
|
15
15
|
## Runtime
|
|
16
16
|
|
|
17
17
|
**Environment:**
|
|
18
18
|
|
|
19
|
-
- Node.js
|
|
19
|
+
- Node.js (ES module, NodeNext resolution). CI workflows use Node 24 (`.github/workflows/node.js-ci.yml`). `tsconfig.json` `module: "NodeNext"`, `target: "ESNext"`.
|
|
20
20
|
|
|
21
21
|
**Package Manager:**
|
|
22
22
|
|
|
23
|
-
- pnpm (
|
|
24
|
-
- Lockfile
|
|
23
|
+
- pnpm (project declares `packageManager: "pnpm@10.32.0"` in `package.json`, lock file `pnpm-lock.yaml` present).
|
|
24
|
+
- Lockfile: `pnpm-lock.yaml` (present).
|
|
25
25
|
|
|
26
26
|
## Frameworks
|
|
27
27
|
|
|
28
28
|
**Core:**
|
|
29
29
|
|
|
30
|
-
- None web-framework
|
|
31
|
-
|
|
32
|
-
**CLI/Command parsing:**
|
|
33
|
-
|
|
34
|
-
- `commander` (`src/cli.ts`, `src/create/create.ts`, `src/build/*`) - used to declare commands and subcommands.
|
|
30
|
+
- None web-framework-specific. This is a CLI application built with Node and TypeScript. CLI command framework: `commander` (`package.json` -> `dependencies`), commands live in `src/cli.ts`, `src/build/*`, `src/create/*`.
|
|
35
31
|
|
|
36
32
|
**Testing:**
|
|
37
33
|
|
|
38
|
-
- `vitest`
|
|
34
|
+
- Vitest (`vitest` ^4.x) - config file: `vitest.config.ts`, tests located in `tests/*.test.ts`.
|
|
39
35
|
|
|
40
36
|
**Build/Dev:**
|
|
41
37
|
|
|
42
|
-
- `
|
|
43
|
-
- `
|
|
44
|
-
- `
|
|
38
|
+
- TypeScript compiler (`tsc`) is used for building (`scripts.build:ts*` in `package.json`, `tsconfig.json` and `src/tsconfig.json`).
|
|
39
|
+
- Prettier for formatting (configured via dependency `@tsparticles/prettier-config` referenced in `package.json`). Prettier is run by `src/build/build-prettier.ts` and scripts in `package.json`.
|
|
40
|
+
- ESLint (`eslint`) with `@tsparticles/eslint-config` - linting run in `src/build/build-eslint.ts` and via `package.json` scripts.
|
|
41
|
+
- Webpack used for bundling (dependency `webpack`, `swc-loader`, `@swc/core`) - bundling logic in `src/build/build-bundle.ts`.
|
|
42
|
+
- dependency-cruiser used for circular dependency checks - config `.dependency-cruiser.cjs` and script `circular-deps` in `package.json`.
|
|
45
43
|
|
|
46
44
|
## Key Dependencies
|
|
47
45
|
|
|
48
46
|
**Critical:**
|
|
49
47
|
|
|
50
|
-
- `
|
|
51
|
-
- `
|
|
52
|
-
- `
|
|
53
|
-
- `
|
|
48
|
+
- `typescript` ^5.9.3 - primary language toolchain (`package.json`).
|
|
49
|
+
- `commander` ^14.x - CLI command framework (`src/cli.ts`, `package.json`).
|
|
50
|
+
- `fs-extra` ^11.x - filesystem utilities used widely (`src/utils/file-utils.ts`, `package.json`).
|
|
51
|
+
- `prettier` ^3.8.x - formatting; project references `@tsparticles/prettier-config` (`package.json`).
|
|
52
|
+
- `eslint` ^10.x and TypeScript ESLint tooling (`package.json`, `src/build/build-eslint.ts`).
|
|
53
|
+
|
|
54
|
+
**Infrastructure / Build:**
|
|
55
|
+
|
|
56
|
+
- `webpack` ^5.x, `swc-loader`, `@swc/core` - bundling and fast transpilation (`package.json`, `src/build/build-bundle.ts`).
|
|
57
|
+
- `vitest` ^4.x - test runner (`vitest.config.ts`, `package.json`).
|
|
58
|
+
- `klaw` - used by prettier tooling to walk folders (`src/build/build-prettier.ts`).
|
|
54
59
|
|
|
55
|
-
**
|
|
60
|
+
**Utilities:**
|
|
56
61
|
|
|
57
|
-
- `prompts` - interactive prompts
|
|
58
|
-
- `lookpath` - used to detect
|
|
59
|
-
- `webpack` - bundling (`src/build/build-bundle.ts`)
|
|
60
|
-
- `vitest` - testing runner (`tests/*.test.ts`, `vitest.config.ts`)
|
|
62
|
+
- `prompts` - interactive prompts used in templates/generator code (`package.json`, `src/create/*`).
|
|
63
|
+
- `lookpath` - used to detect `git` presence in `src/utils/file-utils.ts`.
|
|
61
64
|
|
|
62
65
|
## Configuration
|
|
63
66
|
|
|
64
67
|
**Environment:**
|
|
65
68
|
|
|
66
|
-
- No `.env`
|
|
69
|
+
- No project-level `.env` files detected. The CLI uses the local environment (executes `git` where available). See `src/utils/file-utils.ts` (calls `lookpath("git")` and runs `git config --get remote.origin.url`).
|
|
67
70
|
|
|
68
71
|
**Build:**
|
|
69
72
|
|
|
70
|
-
- TypeScript config: `tsconfig.json` (root) and `src/tsconfig.json`
|
|
71
|
-
-
|
|
73
|
+
- TypeScript config: `tsconfig.json` (root) and `src/tsconfig.json` (per-source) - `module: NodeNext`, `target: ESNext`, strict compiler options.
|
|
74
|
+
- Linting config is provided by `@tsparticles/eslint-config` (referenced in `package.json`). A dependency-cruiser configuration is present at `.dependency-cruiser.cjs`.
|
|
75
|
+
- Prettier config is supplied via `@tsparticles/prettier-config` and `package.json` scripts rely on `src/build/build-prettier.ts`.
|
|
72
76
|
|
|
73
77
|
## Platform Requirements
|
|
74
78
|
|
|
75
79
|
**Development:**
|
|
76
80
|
|
|
77
|
-
- Node.js 24
|
|
81
|
+
- Node.js >= 24 recommended (CI uses Node 24 in `.github/workflows/node.js-ci.yml`).
|
|
82
|
+
- pnpm >= 10.x (project `packageManager` sets `pnpm@10.32.0`).
|
|
83
|
+
- Git CLI for repository URL resolution used by templates (`src/utils/file-utils.ts`).
|
|
78
84
|
|
|
79
|
-
**Production /
|
|
85
|
+
**Production / Publishing:**
|
|
80
86
|
|
|
81
|
-
-
|
|
87
|
+
- Packages are published to npm registry (see `.github/workflows/npm-publish.yml`). The CI uses GitHub Actions and OIDC for auth when publishing (`.github/workflows/npm-publish.yml`).
|
|
82
88
|
|
|
83
89
|
---
|
|
84
90
|
|
|
85
|
-
_Stack analysis: 2026-03-
|
|
91
|
+
_Stack analysis: 2026-03-10_
|
|
@@ -1,104 +1,138 @@
|
|
|
1
1
|
# Codebase Structure
|
|
2
2
|
|
|
3
|
-
**Analysis Date:** 2026-03-
|
|
3
|
+
**Analysis Date:** 2026-03-10
|
|
4
4
|
|
|
5
5
|
## Directory Layout
|
|
6
6
|
|
|
7
7
|
```
|
|
8
8
|
[project-root]/
|
|
9
|
-
├── src/ # TypeScript source for
|
|
10
|
-
│ ├──
|
|
11
|
-
│ ├── create/ #
|
|
12
|
-
│
|
|
13
|
-
├──
|
|
14
|
-
├──
|
|
15
|
-
|
|
16
|
-
├──
|
|
17
|
-
├──
|
|
18
|
-
|
|
19
|
-
└──
|
|
9
|
+
├── src/ # TypeScript source for CLI and build tasks
|
|
10
|
+
│ ├── cli.ts # CLI entrypoint (registers commands)
|
|
11
|
+
│ ├── create/ # "create" command and subcommands
|
|
12
|
+
│ │ ├── create.ts
|
|
13
|
+
│ │ ├── plugin/
|
|
14
|
+
│ │ │ ├── plugin.ts
|
|
15
|
+
│ │ │ └── create-plugin.ts
|
|
16
|
+
│ │ ├── preset/
|
|
17
|
+
│ │ │ ├── preset.ts
|
|
18
|
+
│ │ │ └── create-preset.ts
|
|
19
|
+
│ │ └── shape/
|
|
20
|
+
│ │ ├── shape.ts
|
|
21
|
+
│ │ └── create-shape.ts
|
|
22
|
+
│ ├── build/ # Build helper commands/tasks
|
|
23
|
+
│ │ ├── build.ts
|
|
24
|
+
│ │ ├── build-tsc.ts
|
|
25
|
+
│ │ ├── build-bundle.ts
|
|
26
|
+
│ │ └── ...
|
|
27
|
+
│ └── utils/ # Shared utilities
|
|
28
|
+
│ ├── file-utils.ts
|
|
29
|
+
│ ├── template-utils.ts
|
|
30
|
+
│ └── string-utils.ts
|
|
31
|
+
├── files/ # Template files used by generators (not under src/ but referenced)
|
|
32
|
+
├── tests/ # Vitest unit tests
|
|
33
|
+
├── dist/ # Compiled ESM output (generated)
|
|
34
|
+
├── package.json
|
|
35
|
+
├── pnpm-lock.yaml
|
|
36
|
+
├── tsconfig.json
|
|
37
|
+
└── .planning/ # Mapping and planning docs
|
|
20
38
|
```
|
|
21
39
|
|
|
22
40
|
## Directory Purposes
|
|
23
41
|
|
|
24
|
-
|
|
42
|
+
**src/**:
|
|
25
43
|
|
|
26
|
-
- Purpose:
|
|
27
|
-
- Contains: `src/
|
|
28
|
-
- Key files: `src/cli.ts
|
|
44
|
+
- Purpose: Source code for the CLI tool and internal build tasks.
|
|
45
|
+
- Contains: Command modules (`src/create/*`), build tasks (`src/build/*`), utilities (`src/utils/*`).
|
|
46
|
+
- Key files: `src/cli.ts`, `src/create/create.ts`, `src/create/preset/create-preset.ts`.
|
|
29
47
|
|
|
30
|
-
|
|
48
|
+
**src/create/**:
|
|
31
49
|
|
|
32
|
-
- Purpose:
|
|
33
|
-
- Contains: `
|
|
50
|
+
- Purpose: Implements the `create` command and its subcommands.
|
|
51
|
+
- Contains: `plugin`, `preset`, `shape` subfolders each exposing a `Command` instance and a template-creation implementation (`create-*.ts`).
|
|
52
|
+
- Key files: `src/create/preset/preset.ts`, `src/create/preset/create-preset.ts`.
|
|
34
53
|
|
|
35
|
-
|
|
54
|
+
**src/build/**:
|
|
36
55
|
|
|
37
|
-
- Purpose:
|
|
38
|
-
- Contains:
|
|
56
|
+
- Purpose: Build and CI helper tasks used by `pnpm run build` and `build` CLI command.
|
|
57
|
+
- Contains: modular build steps: `build-prettier.ts`, `build-eslint.ts`, `build-tsc.ts`, bundling helpers.
|
|
58
|
+
- Key files: `src/build/build.ts` (aggregator), `src/build/build-tsc.ts`.
|
|
39
59
|
|
|
40
|
-
|
|
60
|
+
**src/utils/**:
|
|
41
61
|
|
|
42
|
-
- Purpose:
|
|
62
|
+
- Purpose: Shared helpers for filesystem operations, string handling, and template updates.
|
|
63
|
+
- Contains: `file-utils.ts` (`replaceTokensInFile`, `getDestinationDir`), `template-utils.ts` (`runInstall`, `runBuild`, `updatePackageFile`).
|
|
64
|
+
|
|
65
|
+
**files/**:
|
|
66
|
+
|
|
67
|
+
- Purpose: Template projects that are copied into new destinations by `create` commands.
|
|
68
|
+
- Note: Referenced by `src/create/*` code via relative paths (e.g., `path.join(__dirname, "..", "..", "files", "create-preset")` in `src/create/preset/create-preset.ts`).
|
|
69
|
+
|
|
70
|
+
**tests/**:
|
|
71
|
+
|
|
72
|
+
- Purpose: Unit tests using Vitest for template creation behavior.
|
|
73
|
+
- Contains: `tests/create-shape.test.ts`, `tests/create-preset.test.ts`.
|
|
43
74
|
|
|
44
75
|
## Key File Locations
|
|
45
76
|
|
|
46
|
-
|
|
77
|
+
Entry Points:
|
|
47
78
|
|
|
48
|
-
- `src/cli.ts`:
|
|
79
|
+
- `src/cli.ts`: boots the program, reads package version from `package.json`, registers `build` and `create` commands.
|
|
49
80
|
|
|
50
|
-
|
|
81
|
+
Create commands:
|
|
51
82
|
|
|
52
|
-
- `
|
|
53
|
-
- `
|
|
54
|
-
- `
|
|
83
|
+
- `src/create/create.ts`: aggregates subcommands.
|
|
84
|
+
- `src/create/preset/preset.ts`: CLI surface for `preset` command.
|
|
85
|
+
- `src/create/preset/create-preset.ts`: implementation that writes files and runs install/build.
|
|
55
86
|
|
|
56
|
-
|
|
87
|
+
Utilities:
|
|
57
88
|
|
|
58
|
-
- `src/utils/file-utils.ts`: token replacement
|
|
59
|
-
- `src/utils/template-utils.ts`:
|
|
89
|
+
- `src/utils/file-utils.ts`: token replacement helpers and repository detection.
|
|
90
|
+
- `src/utils/template-utils.ts`: file copying, package updates and running `npm` commands.
|
|
60
91
|
|
|
61
|
-
|
|
92
|
+
Build tasks:
|
|
62
93
|
|
|
63
|
-
- `src/
|
|
64
|
-
- `src/build/*`: `build.ts`, `build-prettier.ts`, `build-bundle.ts`, `build-tsc.ts`, `build-eslint.ts`, `build-distfiles.ts`, `build-diststats.ts`.
|
|
94
|
+
- `src/build/build.ts`: orchestration of build steps called both in CI and local `pnpm run build`.
|
|
65
95
|
|
|
66
96
|
## Naming Conventions
|
|
67
97
|
|
|
68
98
|
Files:
|
|
69
99
|
|
|
70
|
-
-
|
|
71
|
-
- Source
|
|
100
|
+
- Pattern: kebab-case for file names that represent commands or grouped concerns (e.g., `create-preset.ts`, `build-tsc.ts`).
|
|
101
|
+
- Source modules are TypeScript (`.ts`) compiled to ESM JS in `dist/`.
|
|
72
102
|
|
|
73
103
|
Directories:
|
|
74
104
|
|
|
75
|
-
-
|
|
105
|
+
- Pattern: singular, descriptive names (`create`, `build`, `utils`, `files`).
|
|
76
106
|
|
|
77
107
|
## Where to Add New Code
|
|
78
108
|
|
|
79
|
-
New Feature (command):
|
|
80
|
-
New Component/Module:
|
|
109
|
+
New Feature (CLI command):
|
|
81
110
|
|
|
82
|
-
-
|
|
83
|
-
-
|
|
111
|
+
- Primary code: add a new command module under `src/<feature>/` or create a subcommand under `src/create/`.
|
|
112
|
+
- Registration: register the new `Command` in `src/cli.ts` or in `src/create/create.ts` for `create`-subcommands.
|
|
113
|
+
- Tests: add unit tests under `tests/` following existing patterns (`tests/<feature>.test.ts`).
|
|
84
114
|
|
|
85
|
-
|
|
115
|
+
New Utility:
|
|
116
|
+
|
|
117
|
+
- Implementation: add new helper in `src/utils/` and export named functions; reuse in command modules.
|
|
118
|
+
- Examples: `src/utils/new-util.ts` and update `src/utils/index.ts` (if created) to re-export it.
|
|
119
|
+
|
|
120
|
+
Templates and Files:
|
|
86
121
|
|
|
87
|
-
-
|
|
88
|
-
- If utility is generic, add tests in `tests/` and export clearly-typed interfaces.
|
|
122
|
+
- Add new templates under `files/` and reference them from create implementations using `path.join(__dirname, "..", "..", "files", "<template>")`.
|
|
89
123
|
|
|
90
124
|
## Special Directories
|
|
91
125
|
|
|
92
|
-
|
|
126
|
+
dist/:
|
|
93
127
|
|
|
94
|
-
- Purpose:
|
|
95
|
-
- Generated:
|
|
96
|
-
- Committed:
|
|
128
|
+
- Purpose: Compiled ESM output for packaging and the `bin` entry (`dist/cli.js`).
|
|
129
|
+
- Generated: Yes
|
|
130
|
+
- Committed: No (should be generated during build)
|
|
97
131
|
|
|
98
|
-
|
|
132
|
+
tests/tmp-files/:
|
|
99
133
|
|
|
100
|
-
- Purpose:
|
|
134
|
+
- Purpose: Tests write temporary projects into `tests/tmp-files/*` during execution and remove them afterwards (see `tests/*.test.ts`).
|
|
101
135
|
|
|
102
136
|
---
|
|
103
137
|
|
|
104
|
-
_Structure analysis: 2026-03-
|
|
138
|
+
_Structure analysis: 2026-03-10_
|