@fgv/repo-template 5.1.0-2
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/.rush/temp/45a8d0dcbb9c2e59fa02645657661dffbd25461f.tar.log +57 -0
- package/.rush/temp/92e27a75687fa5062b71fdb897f0928a8aa4e0c9.tar.log +57 -0
- package/.rush/temp/chunked-rush-logs/repo-template.build.chunks.jsonl +7 -0
- package/.rush/temp/operation/build/all.log +7 -0
- package/.rush/temp/operation/build/log-chunks.jsonl +7 -0
- package/.rush/temp/operation/build/state.json +3 -0
- package/.rush/temp/shrinkwrap-deps.json +576 -0
- package/README.md +216 -0
- package/bin/repo-template.js +18 -0
- package/config/rig.json +4 -0
- package/lib/cli.d.ts +14 -0
- package/lib/cli.d.ts.map +1 -0
- package/lib/cli.js +126 -0
- package/lib/cli.js.map +1 -0
- package/lib/commands/create.d.ts +17 -0
- package/lib/commands/create.d.ts.map +1 -0
- package/lib/commands/create.js +212 -0
- package/lib/commands/create.js.map +1 -0
- package/lib/commands/init-library.d.ts +25 -0
- package/lib/commands/init-library.d.ts.map +1 -0
- package/lib/commands/init-library.js +217 -0
- package/lib/commands/init-library.js.map +1 -0
- package/lib/commands/patch.d.ts +15 -0
- package/lib/commands/patch.d.ts.map +1 -0
- package/lib/commands/patch.js +104 -0
- package/lib/commands/patch.js.map +1 -0
- package/lib/commands/sync.d.ts +11 -0
- package/lib/commands/sync.d.ts.map +1 -0
- package/lib/commands/sync.js +156 -0
- package/lib/commands/sync.js.map +1 -0
- package/lib/index.d.ts +14 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +29 -0
- package/lib/index.js.map +1 -0
- package/lib/packlets/fs/index.d.ts +40 -0
- package/lib/packlets/fs/index.d.ts.map +1 -0
- package/lib/packlets/fs/index.js +142 -0
- package/lib/packlets/fs/index.js.map +1 -0
- package/lib/packlets/jsonc/index.d.ts +27 -0
- package/lib/packlets/jsonc/index.d.ts.map +1 -0
- package/lib/packlets/jsonc/index.js +124 -0
- package/lib/packlets/jsonc/index.js.map +1 -0
- package/lib/packlets/manifest/index.d.ts +15 -0
- package/lib/packlets/manifest/index.d.ts.map +1 -0
- package/lib/packlets/manifest/index.js +61 -0
- package/lib/packlets/manifest/index.js.map +1 -0
- package/lib/packlets/manifest/types.d.ts +33 -0
- package/lib/packlets/manifest/types.d.ts.map +1 -0
- package/lib/packlets/manifest/types.js +6 -0
- package/lib/packlets/manifest/types.js.map +1 -0
- package/lib/packlets/template/index.d.ts +22 -0
- package/lib/packlets/template/index.d.ts.map +1 -0
- package/lib/packlets/template/index.js +75 -0
- package/lib/packlets/template/index.js.map +1 -0
- package/package.json +32 -0
- package/rush-logs/repo-template.build.cache.log +4 -0
- package/rush-logs/repo-template.build.log +7 -0
- package/src/cli.ts +141 -0
- package/src/commands/create.ts +216 -0
- package/src/commands/init-library.ts +249 -0
- package/src/commands/patch.ts +84 -0
- package/src/commands/sync.ts +137 -0
- package/src/index.ts +14 -0
- package/src/packlets/fs/index.ts +114 -0
- package/src/packlets/jsonc/index.ts +134 -0
- package/src/packlets/manifest/index.ts +29 -0
- package/src/packlets/manifest/types.ts +36 -0
- package/src/packlets/template/index.ts +48 -0
- package/sync-manifest.json +222 -0
- package/temp/build/typescript/ts_l9Fw4VUO.json +1 -0
- package/templates/.gitignore.tmpl +85 -0
- package/templates/ACTIVE_DEVELOPMENT.md.tmpl +58 -0
- package/templates/CLAUDE.md.tmpl +124 -0
- package/templates/command-line.json.tmpl +50 -0
- package/templates/package.json.tmpl +5 -0
- package/templates/version-policies.json.tmpl +8 -0
- package/tsconfig.json +7 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Logs
|
|
2
|
+
*.log
|
|
3
|
+
npm-debug.log*
|
|
4
|
+
yarn-debug.log*
|
|
5
|
+
yarn-error.log*
|
|
6
|
+
|
|
7
|
+
# Runtime data
|
|
8
|
+
*.pid
|
|
9
|
+
*.seed
|
|
10
|
+
*.pid.lock
|
|
11
|
+
|
|
12
|
+
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
13
|
+
lib-cov
|
|
14
|
+
|
|
15
|
+
# Coverage directory used by tools like istanbul
|
|
16
|
+
coverage
|
|
17
|
+
|
|
18
|
+
# nyc test coverage
|
|
19
|
+
.nyc_output
|
|
20
|
+
|
|
21
|
+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
|
22
|
+
.grunt
|
|
23
|
+
|
|
24
|
+
# Bower dependency directory (https://bower.io/)
|
|
25
|
+
bower_components
|
|
26
|
+
|
|
27
|
+
# node-waf configuration
|
|
28
|
+
.lock-wscript
|
|
29
|
+
|
|
30
|
+
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
|
31
|
+
build/Release
|
|
32
|
+
|
|
33
|
+
# Dependency directories
|
|
34
|
+
node_modules/
|
|
35
|
+
jspm_packages/
|
|
36
|
+
|
|
37
|
+
# Optional npm cache directory
|
|
38
|
+
.npm
|
|
39
|
+
|
|
40
|
+
# Optional eslint cache
|
|
41
|
+
.eslintcache
|
|
42
|
+
|
|
43
|
+
# Optional REPL history
|
|
44
|
+
.node_repl_history
|
|
45
|
+
|
|
46
|
+
# Output of 'npm pack'
|
|
47
|
+
*.tgz
|
|
48
|
+
|
|
49
|
+
# Yarn Integrity file
|
|
50
|
+
.yarn-integrity
|
|
51
|
+
|
|
52
|
+
# dotenv environment variables file
|
|
53
|
+
.env
|
|
54
|
+
|
|
55
|
+
# next.js build output
|
|
56
|
+
.next
|
|
57
|
+
|
|
58
|
+
# OS X temporary files
|
|
59
|
+
.DS_Store
|
|
60
|
+
|
|
61
|
+
# IntelliJ IDEA project files
|
|
62
|
+
.idea/
|
|
63
|
+
*.iml
|
|
64
|
+
|
|
65
|
+
# Rush temporary files
|
|
66
|
+
common/deploy/
|
|
67
|
+
deploy/
|
|
68
|
+
common/temp/
|
|
69
|
+
common/autoinstallers/*/.npmrc
|
|
70
|
+
**/.rush/temp/
|
|
71
|
+
|
|
72
|
+
# Heft temporary files
|
|
73
|
+
.heft
|
|
74
|
+
|
|
75
|
+
# TypeScript incremental build info
|
|
76
|
+
*.tsbuildinfo
|
|
77
|
+
|
|
78
|
+
# built output
|
|
79
|
+
lib/
|
|
80
|
+
dist/
|
|
81
|
+
temp/
|
|
82
|
+
|
|
83
|
+
# AI workflow runtime artifacts
|
|
84
|
+
.ai/tasks/active/
|
|
85
|
+
.ai/tasks/completed/
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Active Development Guidelines
|
|
2
|
+
|
|
3
|
+
This document covers guidelines specific to the libraries and applications currently under active development. These rules supplement the general coding standards.
|
|
4
|
+
|
|
5
|
+
## Active Development Scope
|
|
6
|
+
|
|
7
|
+
<!-- Update this section with your domain-specific projects -->
|
|
8
|
+
|
|
9
|
+
### Libraries (all actively developed)
|
|
10
|
+
| Library | Path | Purpose |
|
|
11
|
+
|---------|------|---------|
|
|
12
|
+
{{ACTIVE_LIBRARIES}}
|
|
13
|
+
|
|
14
|
+
### Other Libraries (from @fgv/*, handle with care)
|
|
15
|
+
The @fgv/* utility packages are consumed as published npm dependencies. Do not modify them in this repo.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Compatibility Rules
|
|
20
|
+
|
|
21
|
+
### New Libraries: No Compatibility Burden
|
|
22
|
+
|
|
23
|
+
All libraries in this repo are new code. Compatibility is **not** a consideration:
|
|
24
|
+
|
|
25
|
+
- **Do not** preserve deprecated values, types, or re-exports
|
|
26
|
+
- **Do not** add backwards-compatibility shims or renamed aliases
|
|
27
|
+
- **Do not** leave dead code "just in case"
|
|
28
|
+
- If a change is necessary or appropriate, **break compatibility and fix consumers** rather than accumulating cruft
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Testing Philosophy During Active Development
|
|
33
|
+
|
|
34
|
+
### Prioritize Functional Breadth Over Measured Coverage
|
|
35
|
+
|
|
36
|
+
The repo requires 100% coverage to merge to `main`, but during active development:
|
|
37
|
+
|
|
38
|
+
1. **Focus on functional correctness** - Write tests that verify behavior, not just hit lines
|
|
39
|
+
2. **Coverage metrics come later** - Once code settles down, fill coverage gaps systematically
|
|
40
|
+
3. **Don't skip tests** - Still write tests, just prioritize breadth of behavior over coverage percentage
|
|
41
|
+
|
|
42
|
+
### Balance Effort vs Value
|
|
43
|
+
|
|
44
|
+
- Don't spend an hour writing tests for a 5-minute fix
|
|
45
|
+
- Use judgment about when tests add enough value to justify the work
|
|
46
|
+
- When in doubt, ask
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## General Principles
|
|
51
|
+
|
|
52
|
+
### Correctness Over Convenience
|
|
53
|
+
|
|
54
|
+
Prioritize correctness over ease, convenience, or brevity:
|
|
55
|
+
|
|
56
|
+
- Follow all repo guidelines including Result pattern with chaining
|
|
57
|
+
- Don't take shortcuts that sacrifice type safety or error handling
|
|
58
|
+
- A correct, slightly verbose solution is better than a clever but fragile one
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code when working with this repository.
|
|
4
|
+
|
|
5
|
+
## Quick Reference
|
|
6
|
+
|
|
7
|
+
This is a Rush-based TypeScript monorepo. Key commands:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
rush install # Install dependencies
|
|
11
|
+
rush build # Build all projects
|
|
12
|
+
rush test # Test all projects
|
|
13
|
+
rushx build/test # Build/test current project (from project dir)
|
|
14
|
+
rushx coverage # Run with coverage
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Core Instructions
|
|
18
|
+
|
|
19
|
+
All coding standards, testing guidelines, and review checklists are defined in the shared `.ai/` directory. These guidelines apply to all AI assistants and are the authoritative source:
|
|
20
|
+
|
|
21
|
+
@.ai/instructions/CODING_STANDARDS.md
|
|
22
|
+
@.ai/instructions/TESTING_GUIDELINES.md
|
|
23
|
+
@.ai/instructions/CODE_REVIEW_CHECKLIST.md
|
|
24
|
+
@.ai/instructions/MONOREPO_GUIDE.md
|
|
25
|
+
@.ai/instructions/ACTIVE_DEVELOPMENT.md
|
|
26
|
+
|
|
27
|
+
## Critical Rules Summary
|
|
28
|
+
|
|
29
|
+
These rules are **absolute and non-negotiable**:
|
|
30
|
+
|
|
31
|
+
1. **Never use `any` type** - Use `unknown`, branded types, or proper interfaces. Will fail CI.
|
|
32
|
+
2. **Use Result pattern** - All fallible operations return `Result<T>`, not exceptions
|
|
33
|
+
3. **Use Converters/Validators** - Never manual type checking with unsafe casts
|
|
34
|
+
4. **100% test coverage** - Required for all code
|
|
35
|
+
|
|
36
|
+
## Project Structure
|
|
37
|
+
|
|
38
|
+
### Libraries (`libraries/`)
|
|
39
|
+
| Library | Purpose |
|
|
40
|
+
|---------|---------|
|
|
41
|
+
{{PROJECT_TABLE}}
|
|
42
|
+
|
|
43
|
+
## Code Review
|
|
44
|
+
|
|
45
|
+
When reviewing code, use the checklist in [CODE_REVIEW_CHECKLIST.md](.ai/instructions/CODE_REVIEW_CHECKLIST.md). Key checks:
|
|
46
|
+
|
|
47
|
+
- No `any` type usage (Priority 1 - blocking)
|
|
48
|
+
- No manual type checking with unsafe casts (Priority 1)
|
|
49
|
+
- Result pattern used correctly (Priority 1)
|
|
50
|
+
- Proper error handling with context (Priority 2)
|
|
51
|
+
- Follows existing codebase patterns (Priority 2)
|
|
52
|
+
|
|
53
|
+
## Testing
|
|
54
|
+
|
|
55
|
+
Use Result matchers from `@fgv/ts-utils-jest`:
|
|
56
|
+
|
|
57
|
+
```typescript
|
|
58
|
+
expect(operation()).toSucceed();
|
|
59
|
+
expect(operation()).toSucceedWith(expectedValue);
|
|
60
|
+
expect(operation()).toFailWith(/error pattern/i);
|
|
61
|
+
expect(operation()).toSucceedAndSatisfy((result) => {
|
|
62
|
+
expect(result.property).toBe(expected);
|
|
63
|
+
});
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Complex Task Orchestration
|
|
67
|
+
|
|
68
|
+
For complex multi-phase tasks (new features, major refactoring), the task-master workflow system is available in `.claude/agents/`. This provides:
|
|
69
|
+
|
|
70
|
+
- Structured requirements analysis with confirmation gates
|
|
71
|
+
- Design review phases
|
|
72
|
+
- Implementation coordination with specialized agents
|
|
73
|
+
- Automated and manual testing phases
|
|
74
|
+
- Artifact preservation for future reference
|
|
75
|
+
|
|
76
|
+
Workflow templates are in `.ai/workflows/`. Use task-master for:
|
|
77
|
+
- Multi-step features requiring coordination
|
|
78
|
+
- Major refactoring with behavior preservation
|
|
79
|
+
- Tasks benefiting from structured documentation
|
|
80
|
+
|
|
81
|
+
## Claude-Specific Notes
|
|
82
|
+
|
|
83
|
+
### Avoid Over-Engineering
|
|
84
|
+
- Only make changes that are directly requested
|
|
85
|
+
- Don't add features beyond what was asked
|
|
86
|
+
- Don't refactor surrounding code during bug fixes
|
|
87
|
+
- Keep solutions simple and focused
|
|
88
|
+
|
|
89
|
+
### Webpack Dev Mode
|
|
90
|
+
Webpack may not pick up library changes. If a web app fails to load:
|
|
91
|
+
1. Kill the dev server
|
|
92
|
+
2. Restart the application
|
|
93
|
+
|
|
94
|
+
### Package Management
|
|
95
|
+
Always use `rush add -p package-name` or `rush remove -p package-name`. Never use npm directly or edit package.json manually for dependencies.
|
|
96
|
+
|
|
97
|
+
## File Organization
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
.ai/ # Shared AI assistant instructions
|
|
101
|
+
├── instructions/ # Coding standards (all AI tools)
|
|
102
|
+
│ ├── CODING_STANDARDS.md
|
|
103
|
+
│ ├── TESTING_GUIDELINES.md
|
|
104
|
+
│ ├── CODE_REVIEW_CHECKLIST.md
|
|
105
|
+
│ ├── MONOREPO_GUIDE.md
|
|
106
|
+
│ └── ACTIVE_DEVELOPMENT.md
|
|
107
|
+
├── workflows/ # Task orchestration workflows
|
|
108
|
+
└── tasks/ # Runtime task artifacts
|
|
109
|
+
|
|
110
|
+
.claude/ # Claude-specific configuration
|
|
111
|
+
├── agents/ # Orchestration agents (task-master, etc.)
|
|
112
|
+
├── skills/ # On-demand skills
|
|
113
|
+
├── settings.json # Permissions
|
|
114
|
+
└── project/ # Project-specific design docs
|
|
115
|
+
|
|
116
|
+
CLAUDE.md # This file (Claude entry point)
|
|
117
|
+
.windsurfrules # Windsurf adapter → .ai/
|
|
118
|
+
.cursorrules # Cursor adapter → .ai/
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Additional Resources
|
|
122
|
+
|
|
123
|
+
- Project design docs are in `.claude/project/`
|
|
124
|
+
- Workflow templates are in `.ai/workflows/`
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/command-line.schema.json",
|
|
3
|
+
"commands": [
|
|
4
|
+
{
|
|
5
|
+
"name": "prettier",
|
|
6
|
+
"commandKind": "global",
|
|
7
|
+
"summary": "Used by the pre-commit git hook to invoke prettier",
|
|
8
|
+
"safeForSimultaneousRushProcesses": true,
|
|
9
|
+
"autoinstallerName": "rush-prettier",
|
|
10
|
+
"shellCommand": "pretty-quick --staged"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "test",
|
|
14
|
+
"commandKind": "bulk",
|
|
15
|
+
"summary": "Run tests for all projects in the monorepo",
|
|
16
|
+
"description": "Runs the 'test' npm script for each project in the monorepo according to dependency order. Projects without a test script will be skipped.",
|
|
17
|
+
"safeForSimultaneousRushProcesses": false,
|
|
18
|
+
"enableParallelism": true,
|
|
19
|
+
"ignoreDependencyOrder": false,
|
|
20
|
+
"ignoreMissingScript": true,
|
|
21
|
+
"allowWarningsInSuccessfulBuild": false,
|
|
22
|
+
"incremental": false
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "lint",
|
|
26
|
+
"commandKind": "bulk",
|
|
27
|
+
"summary": "Run linting for all projects in the monorepo",
|
|
28
|
+
"description": "Runs the 'lint' npm script for each project in the monorepo according to dependency order. Projects without a lint script will be skipped.",
|
|
29
|
+
"safeForSimultaneousRushProcesses": false,
|
|
30
|
+
"enableParallelism": true,
|
|
31
|
+
"ignoreDependencyOrder": false,
|
|
32
|
+
"ignoreMissingScript": true,
|
|
33
|
+
"allowWarningsInSuccessfulBuild": false,
|
|
34
|
+
"incremental": false
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "build-docs",
|
|
38
|
+
"commandKind": "bulk",
|
|
39
|
+
"summary": "Build generated documentation for all projects in the monorepo",
|
|
40
|
+
"description": "Runs the 'build-docs' npm script for each project in the monorepo according to dependency order. Projects without a build-docs script will be skipped.",
|
|
41
|
+
"safeForSimultaneousRushProcesses": false,
|
|
42
|
+
"enableParallelism": true,
|
|
43
|
+
"ignoreDependencyOrder": false,
|
|
44
|
+
"ignoreMissingScript": true,
|
|
45
|
+
"allowWarningsInSuccessfulBuild": false,
|
|
46
|
+
"incremental": false
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"parameters": []
|
|
50
|
+
}
|