specweave 1.0.220 → 1.0.221
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/CLAUDE.md +24 -24
- package/package.json +1 -1
- package/plugins/specweave/skills/.specweave/logs/decisions.jsonl +2 -0
- package/plugins/specweave/skills/.specweave/logs/reflect/auto-reflect.log +15 -0
- package/plugins/specweave/skills/.specweave/logs/reflect/reflect.log +3 -0
- package/plugins/specweave/skills/.specweave/logs/stop-auto.log +1 -0
- package/plugins/specweave/skills/save/SKILL.md +1 -1
- package/dist/src/core/iac/index.d.ts +0 -10
- package/dist/src/core/iac/index.d.ts.map +0 -1
- package/dist/src/core/iac/index.js +0 -11
- package/dist/src/core/iac/index.js.map +0 -1
- package/dist/src/core/iac/template-engine.d.ts +0 -77
- package/dist/src/core/iac/template-engine.d.ts.map +0 -1
- package/dist/src/core/iac/template-engine.js +0 -160
- package/dist/src/core/iac/template-engine.js.map +0 -1
- package/dist/src/core/iac/template-generator.d.ts +0 -53
- package/dist/src/core/iac/template-generator.d.ts.map +0 -1
- package/dist/src/core/iac/template-generator.js +0 -104
- package/dist/src/core/iac/template-generator.js.map +0 -1
- package/plugins/specweave/iac-templates/aws-lambda/README.md.hbs +0 -280
- package/plugins/specweave/iac-templates/aws-lambda/defaults.json +0 -118
- package/plugins/specweave/iac-templates/aws-lambda/environments/dev.defaults.json +0 -46
- package/plugins/specweave/iac-templates/aws-lambda/environments/prod.defaults.json +0 -67
- package/plugins/specweave/iac-templates/aws-lambda/environments/staging.defaults.json +0 -47
- package/plugins/specweave/iac-templates/aws-lambda/main.tf.hbs +0 -241
- package/plugins/specweave/iac-templates/aws-lambda/outputs.tf.hbs +0 -61
- package/plugins/specweave/iac-templates/aws-lambda/provider.tf.hbs +0 -15
- package/plugins/specweave/iac-templates/aws-lambda/variables.tf.hbs +0 -88
- package/plugins/specweave/iac-templates/azure-functions/README.md.hbs +0 -315
- package/plugins/specweave/iac-templates/azure-functions/defaults.json +0 -65
- package/plugins/specweave/iac-templates/azure-functions/environments/dev.defaults.json +0 -30
- package/plugins/specweave/iac-templates/azure-functions/environments/prod.defaults.json +0 -34
- package/plugins/specweave/iac-templates/azure-functions/environments/staging.defaults.json +0 -31
- package/plugins/specweave/iac-templates/azure-functions/iam.tf.hbs +0 -34
- package/plugins/specweave/iac-templates/azure-functions/main.tf.hbs +0 -247
- package/plugins/specweave/iac-templates/azure-functions/outputs.tf.hbs +0 -72
- package/plugins/specweave/iac-templates/azure-functions/provider.tf.hbs +0 -14
- package/plugins/specweave/iac-templates/azure-functions/variables.tf.hbs +0 -64
- package/plugins/specweave/iac-templates/firebase/README.md.hbs +0 -487
- package/plugins/specweave/iac-templates/firebase/defaults.json +0 -55
- package/plugins/specweave/iac-templates/firebase/environments/dev.defaults.json +0 -44
- package/plugins/specweave/iac-templates/firebase/environments/prod.defaults.json +0 -52
- package/plugins/specweave/iac-templates/firebase/environments/staging.defaults.json +0 -43
- package/plugins/specweave/iac-templates/firebase/iam.tf.hbs +0 -75
- package/plugins/specweave/iac-templates/firebase/main.tf.hbs +0 -297
- package/plugins/specweave/iac-templates/firebase/outputs.tf.hbs +0 -67
- package/plugins/specweave/iac-templates/firebase/provider.tf.hbs +0 -26
- package/plugins/specweave/iac-templates/firebase/variables.tf.hbs +0 -68
- package/plugins/specweave/iac-templates/gcp-cloud-functions/README.md.hbs +0 -330
- package/plugins/specweave/iac-templates/gcp-cloud-functions/defaults.json +0 -69
- package/plugins/specweave/iac-templates/gcp-cloud-functions/environments/dev.defaults.json +0 -33
- package/plugins/specweave/iac-templates/gcp-cloud-functions/environments/prod.defaults.json +0 -40
- package/plugins/specweave/iac-templates/gcp-cloud-functions/environments/staging.defaults.json +0 -33
- package/plugins/specweave/iac-templates/gcp-cloud-functions/iam.tf.hbs +0 -54
- package/plugins/specweave/iac-templates/gcp-cloud-functions/main.tf.hbs +0 -211
- package/plugins/specweave/iac-templates/gcp-cloud-functions/outputs.tf.hbs +0 -44
- package/plugins/specweave/iac-templates/gcp-cloud-functions/provider.tf.hbs +0 -14
- package/plugins/specweave/iac-templates/gcp-cloud-functions/variables.tf.hbs +0 -82
- package/plugins/specweave/iac-templates/supabase/README.md.hbs +0 -534
- package/plugins/specweave/iac-templates/supabase/defaults.json +0 -69
- package/plugins/specweave/iac-templates/supabase/environments/dev.defaults.json +0 -55
- package/plugins/specweave/iac-templates/supabase/environments/prod.defaults.json +0 -75
- package/plugins/specweave/iac-templates/supabase/environments/staging.defaults.json +0 -54
- package/plugins/specweave/iac-templates/supabase/iam.tf.hbs +0 -146
- package/plugins/specweave/iac-templates/supabase/main.tf.hbs +0 -310
- package/plugins/specweave/iac-templates/supabase/outputs.tf.hbs +0 -74
- package/plugins/specweave/iac-templates/supabase/provider.tf.hbs +0 -19
- package/plugins/specweave/iac-templates/supabase/variables.tf.hbs +0 -78
- package/plugins/specweave/templates/iac/aws-lambda/defaults.json +0 -24
- package/plugins/specweave/templates/iac/aws-lambda/templates/README.md.hbs +0 -260
- package/plugins/specweave/templates/iac/aws-lambda/templates/environments/dev.tfvars.hbs +0 -34
- package/plugins/specweave/templates/iac/aws-lambda/templates/environments/prod.tfvars.hbs +0 -37
- package/plugins/specweave/templates/iac/aws-lambda/templates/environments/staging.tfvars.hbs +0 -35
- package/plugins/specweave/templates/iac/aws-lambda/templates/iam.tf.hbs +0 -137
- package/plugins/specweave/templates/iac/aws-lambda/templates/main.tf.hbs +0 -216
- package/plugins/specweave/templates/iac/aws-lambda/templates/outputs.tf.hbs +0 -77
- package/plugins/specweave/templates/iac/aws-lambda/templates/providers.tf.hbs +0 -36
- package/plugins/specweave/templates/iac/aws-lambda/templates/variables.tf.hbs +0 -115
- package/plugins/specweave/templates/iac/azure-functions/defaults.json +0 -25
- package/plugins/specweave/templates/iac/azure-functions/templates/README.md.hbs +0 -268
- package/plugins/specweave/templates/iac/azure-functions/templates/environments/dev.tfvars.hbs +0 -34
- package/plugins/specweave/templates/iac/azure-functions/templates/environments/prod.tfvars.hbs +0 -46
- package/plugins/specweave/templates/iac/azure-functions/templates/environments/staging.tfvars.hbs +0 -34
- package/plugins/specweave/templates/iac/azure-functions/templates/main.tf.hbs +0 -225
- package/plugins/specweave/templates/iac/azure-functions/templates/outputs.tf.hbs +0 -89
- package/plugins/specweave/templates/iac/azure-functions/templates/provider.tf.hbs +0 -27
- package/plugins/specweave/templates/iac/azure-functions/templates/providers.tf.hbs +0 -35
- package/plugins/specweave/templates/iac/azure-functions/templates/variables.tf.hbs +0 -124
- package/plugins/specweave/templates/iac/firebase/defaults.json +0 -29
- package/plugins/specweave/templates/iac/firebase/templates/README.md.hbs +0 -35
- package/plugins/specweave/templates/iac/firebase/templates/environments/dev.tfvars.hbs +0 -7
- package/plugins/specweave/templates/iac/firebase/templates/environments/prod.tfvars.hbs +0 -7
- package/plugins/specweave/templates/iac/firebase/templates/environments/staging.tfvars.hbs +0 -7
- package/plugins/specweave/templates/iac/firebase/templates/main.tf.hbs +0 -90
- package/plugins/specweave/templates/iac/firebase/templates/outputs.tf.hbs +0 -15
- package/plugins/specweave/templates/iac/firebase/templates/providers.tf.hbs +0 -23
- package/plugins/specweave/templates/iac/firebase/templates/variables.tf.hbs +0 -42
- package/plugins/specweave/templates/iac/gcp-cloud-functions/defaults.json +0 -26
- package/plugins/specweave/templates/iac/gcp-cloud-functions/templates/README.md.hbs +0 -299
- package/plugins/specweave/templates/iac/gcp-cloud-functions/templates/environments/dev.tfvars.hbs +0 -36
- package/plugins/specweave/templates/iac/gcp-cloud-functions/templates/environments/prod.tfvars.hbs +0 -48
- package/plugins/specweave/templates/iac/gcp-cloud-functions/templates/environments/staging.tfvars.hbs +0 -41
- package/plugins/specweave/templates/iac/gcp-cloud-functions/templates/main.tf.hbs +0 -192
- package/plugins/specweave/templates/iac/gcp-cloud-functions/templates/outputs.tf.hbs +0 -66
- package/plugins/specweave/templates/iac/gcp-cloud-functions/templates/providers.tf.hbs +0 -25
- package/plugins/specweave/templates/iac/gcp-cloud-functions/templates/variables.tf.hbs +0 -119
- package/plugins/specweave/templates/iac/supabase/defaults.json +0 -15
- package/plugins/specweave/templates/iac/supabase/templates/README.md.hbs +0 -46
- package/plugins/specweave/templates/iac/supabase/templates/main.tf.hbs +0 -50
package/CLAUDE.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- SW:META template="claude" version="1.0.
|
|
1
|
+
<!-- SW:META template="claude" version="1.0.220" sections="header,start,autodetect,metarule,rules,workflow,reflect,context,structure,taskformat,secrets,syncing,testing,tdd,api,limits,troubleshooting,lazyloading,principles,linking,mcp,auto,docs" -->
|
|
2
2
|
|
|
3
3
|
<!-- SW:SECTION:hook-priority version="1.0.171" -->
|
|
4
4
|
## ⛔ Hook Instructions Override Everything
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
**SKILL FIRST ≠ only one skill.** Chain: hook skill → `sw-frontend:*` / `sw-backend:*` / etc → implement.
|
|
14
14
|
<!-- SW:END:hook-priority -->
|
|
15
15
|
|
|
16
|
-
<!-- SW:SECTION:header version="1.0.
|
|
16
|
+
<!-- SW:SECTION:header version="1.0.220" -->
|
|
17
17
|
**Framework**: SpecWeave | **Truth**: `spec.md` + `tasks.md`
|
|
18
18
|
<!-- SW:END:header -->
|
|
19
19
|
|
|
@@ -123,7 +123,7 @@ claude plugin install sw@specweave --scope project # Team-shared
|
|
|
123
123
|
|
|
124
124
|
SpecWeave auto-installs: LSP → project scope, sw-* → user scope.
|
|
125
125
|
|
|
126
|
-
<!-- SW:SECTION:start version="1.0.
|
|
126
|
+
<!-- SW:SECTION:start version="1.0.220" -->
|
|
127
127
|
## Getting Started
|
|
128
128
|
|
|
129
129
|
**Initial increment**: `0001-project-setup` (auto-created by `specweave init`)
|
|
@@ -133,7 +133,7 @@ SpecWeave auto-installs: LSP → project scope, sw-* → user scope.
|
|
|
133
133
|
2. **Customize**: Edit spec.md and use for setup tasks
|
|
134
134
|
<!-- SW:END:start -->
|
|
135
135
|
|
|
136
|
-
<!-- SW:SECTION:autodetect version="1.0.
|
|
136
|
+
<!-- SW:SECTION:autodetect version="1.0.220" -->
|
|
137
137
|
## Auto-Detection
|
|
138
138
|
|
|
139
139
|
SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
|
|
@@ -143,7 +143,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
|
|
|
143
143
|
**Opt-out phrases**: "Just brainstorm first" | "Don't plan yet" | "Quick discussion" | "Let's explore ideas"
|
|
144
144
|
<!-- SW:END:autodetect -->
|
|
145
145
|
|
|
146
|
-
<!-- SW:SECTION:metarule version="1.0.
|
|
146
|
+
<!-- SW:SECTION:metarule version="1.0.220" -->
|
|
147
147
|
## Workflow Orchestration
|
|
148
148
|
|
|
149
149
|
### 1. Plan Mode Default
|
|
@@ -170,7 +170,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
|
|
|
170
170
|
```
|
|
171
171
|
<!-- SW:END:metarule -->
|
|
172
172
|
|
|
173
|
-
<!-- SW:SECTION:rules version="1.0.
|
|
173
|
+
<!-- SW:SECTION:rules version="1.0.220" -->
|
|
174
174
|
## Rules
|
|
175
175
|
|
|
176
176
|
1. **Files** → `.specweave/increments/####-name/` (see Structure section for details)
|
|
@@ -189,7 +189,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
|
|
|
189
189
|
Use next available number. **NEVER create duplicate prefixes.**
|
|
190
190
|
<!-- SW:END:rules -->
|
|
191
191
|
|
|
192
|
-
<!-- SW:SECTION:workflow version="1.0.
|
|
192
|
+
<!-- SW:SECTION:workflow version="1.0.220" -->
|
|
193
193
|
## Workflow
|
|
194
194
|
|
|
195
195
|
`/sw:increment "X"` → `/sw:do` → `/sw:progress` → `/sw:done 0001`
|
|
@@ -235,7 +235,7 @@ project/
|
|
|
235
235
|
**NEVER assume single-repo mode without scanning first!**
|
|
236
236
|
<!-- SW:END:save-nested-repos -->
|
|
237
237
|
|
|
238
|
-
<!-- SW:SECTION:reflect version="1.0.
|
|
238
|
+
<!-- SW:SECTION:reflect version="1.0.220" -->
|
|
239
239
|
## Skill Memories
|
|
240
240
|
|
|
241
241
|
SpecWeave learns from corrections. Learnings saved here automatically. Edit or delete as needed.
|
|
@@ -254,7 +254,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
|
|
|
254
254
|
- **2026-02-02**: Use subagents liberally for codebase analysis - up to 10+ concurrent for large-scale exploration
|
|
255
255
|
- **2026-02-02**: Prefer leaderboard-style reporting when analyzing usage patterns or identifying deletion candidates
|
|
256
256
|
|
|
257
|
-
<!-- SW:SECTION:context version="1.0.
|
|
257
|
+
<!-- SW:SECTION:context version="1.0.220" -->
|
|
258
258
|
## Context
|
|
259
259
|
|
|
260
260
|
**Before implementing**: Check ADRs at `.specweave/docs/internal/architecture/adr/`
|
|
@@ -262,7 +262,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
|
|
|
262
262
|
**Load context**: `/sw:context <topic>` loads relevant living docs into conversation
|
|
263
263
|
<!-- SW:END:context -->
|
|
264
264
|
|
|
265
|
-
<!-- SW:SECTION:structure version="1.0.
|
|
265
|
+
<!-- SW:SECTION:structure version="1.0.220" -->
|
|
266
266
|
## Structure
|
|
267
267
|
|
|
268
268
|
```
|
|
@@ -277,7 +277,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
|
|
|
277
277
|
**Everything else → subfolders**: `reports/` | `logs/` | `scripts/` | `backups/`
|
|
278
278
|
<!-- SW:END:structure -->
|
|
279
279
|
|
|
280
|
-
<!-- SW:SECTION:taskformat version="1.0.
|
|
280
|
+
<!-- SW:SECTION:taskformat version="1.0.220" -->
|
|
281
281
|
## Task Format
|
|
282
282
|
|
|
283
283
|
```markdown
|
|
@@ -287,7 +287,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
|
|
|
287
287
|
```
|
|
288
288
|
<!-- SW:END:taskformat -->
|
|
289
289
|
|
|
290
|
-
<!-- SW:SECTION:secrets version="1.0.
|
|
290
|
+
<!-- SW:SECTION:secrets version="1.0.220" -->
|
|
291
291
|
## Secrets Check
|
|
292
292
|
|
|
293
293
|
**BEFORE CLI tools**: Check existing config first!
|
|
@@ -301,7 +301,7 @@ gh auth status
|
|
|
301
301
|
**SECURITY**: NEVER use `grep TOKEN .env` without `-q` flag - it exposes credentials in terminal!
|
|
302
302
|
<!-- SW:END:secrets -->
|
|
303
303
|
|
|
304
|
-
<!-- SW:SECTION:syncing version="1.0.
|
|
304
|
+
<!-- SW:SECTION:syncing version="1.0.220" -->
|
|
305
305
|
## External Sync (GitHub/JIRA/ADO)
|
|
306
306
|
|
|
307
307
|
**Commands**: `/sw-github:sync {id}` (issues) | `/sw:sync-specs` (living docs only)
|
|
@@ -311,7 +311,7 @@ gh auth status
|
|
|
311
311
|
**Config**: Set `sync.github.enabled: true` + `canUpdateExternalItems: true` in config.json
|
|
312
312
|
<!-- SW:END:syncing -->
|
|
313
313
|
|
|
314
|
-
<!-- SW:SECTION:testing version="1.0.
|
|
314
|
+
<!-- SW:SECTION:testing version="1.0.220" -->
|
|
315
315
|
## Testing
|
|
316
316
|
|
|
317
317
|
BDD in tasks.md | Unit >80% | `.test.ts` (Vitest)
|
|
@@ -323,7 +323,7 @@ vi.mock('./module', () => ({ func: mockFn }));
|
|
|
323
323
|
```
|
|
324
324
|
<!-- SW:END:testing -->
|
|
325
325
|
|
|
326
|
-
<!-- SW:SECTION:tdd version="1.0.
|
|
326
|
+
<!-- SW:SECTION:tdd version="1.0.220" -->
|
|
327
327
|
## TDD Mode (Test-Driven Development)
|
|
328
328
|
|
|
329
329
|
**When `testing.defaultTestMode: "TDD"` is configured**, follow RED-GREEN-REFACTOR discipline:
|
|
@@ -384,7 +384,7 @@ When TDD is enabled, tasks include phase markers:
|
|
|
384
384
|
**Rule**: Complete dependencies BEFORE dependent tasks (RED before GREEN).
|
|
385
385
|
<!-- SW:END:tdd -->
|
|
386
386
|
|
|
387
|
-
<!-- SW:SECTION:api version="1.0.
|
|
387
|
+
<!-- SW:SECTION:api version="1.0.220" -->
|
|
388
388
|
## API Development (OpenAPI-First)
|
|
389
389
|
|
|
390
390
|
**For API projects only.** Commands: `/sw:api-docs --all` | `--openapi` | `--postman` | `--validate`
|
|
@@ -392,13 +392,13 @@ When TDD is enabled, tasks include phase markers:
|
|
|
392
392
|
Enable in config: `{"apiDocs":{"enabled":true,"openApiPath":"openapi.yaml"}}`
|
|
393
393
|
<!-- SW:END:api -->
|
|
394
394
|
|
|
395
|
-
<!-- SW:SECTION:limits version="1.0.
|
|
395
|
+
<!-- SW:SECTION:limits version="1.0.220" -->
|
|
396
396
|
## Limits
|
|
397
397
|
|
|
398
398
|
**Max 1500 lines/file** — extract before adding
|
|
399
399
|
<!-- SW:END:limits -->
|
|
400
400
|
|
|
401
|
-
<!-- SW:SECTION:troubleshooting version="1.0.
|
|
401
|
+
<!-- SW:SECTION:troubleshooting version="1.0.220" -->
|
|
402
402
|
## Troubleshooting
|
|
403
403
|
|
|
404
404
|
| Issue | Fix |
|
|
@@ -411,7 +411,7 @@ Enable in config: `{"apiDocs":{"enabled":true,"openApiPath":"openapi.yaml"}}`
|
|
|
411
411
|
| Session stuck | Kill + `rm -f .specweave/state/*.lock` + restart |
|
|
412
412
|
<!-- SW:END:troubleshooting -->
|
|
413
413
|
|
|
414
|
-
<!-- SW:SECTION:lazyloading version="1.0.
|
|
414
|
+
<!-- SW:SECTION:lazyloading version="1.0.220" -->
|
|
415
415
|
## Plugin Auto-Loading
|
|
416
416
|
|
|
417
417
|
Plugins load automatically based on project type and keywords. Manual install if needed:
|
|
@@ -425,7 +425,7 @@ export SPECWEAVE_DISABLE_AUTO_LOAD=1 # Disable auto-load
|
|
|
425
425
|
**Token savings**: Core ~3-5K tokens vs all plugins ~60K+
|
|
426
426
|
<!-- SW:END:lazyloading -->
|
|
427
427
|
|
|
428
|
-
<!-- SW:SECTION:principles version="1.0.
|
|
428
|
+
<!-- SW:SECTION:principles version="1.0.220" -->
|
|
429
429
|
## Principles
|
|
430
430
|
|
|
431
431
|
### SpecWeave Principles
|
|
@@ -441,7 +441,7 @@ export SPECWEAVE_DISABLE_AUTO_LOAD=1 # Disable auto-load
|
|
|
441
441
|
- **Demand Elegance**: For non-trivial changes, pause and ask "is there a more elegant way?" - but skip this for simple, obvious fixes (don't over-engineer).
|
|
442
442
|
<!-- SW:END:principles -->
|
|
443
443
|
|
|
444
|
-
<!-- SW:SECTION:linking version="1.0.
|
|
444
|
+
<!-- SW:SECTION:linking version="1.0.220" -->
|
|
445
445
|
## Bidirectional Linking
|
|
446
446
|
|
|
447
447
|
Tasks ↔ User Stories auto-linked via AC-IDs: `AC-US1-01` → `US-001`
|
|
@@ -449,7 +449,7 @@ Tasks ↔ User Stories auto-linked via AC-IDs: `AC-US1-01` → `US-001`
|
|
|
449
449
|
Task format: `**AC**: AC-US1-01, AC-US1-02` (CRITICAL for linking)
|
|
450
450
|
<!-- SW:END:linking -->
|
|
451
451
|
|
|
452
|
-
<!-- SW:SECTION:mcp version="1.0.
|
|
452
|
+
<!-- SW:SECTION:mcp version="1.0.220" -->
|
|
453
453
|
## External Services
|
|
454
454
|
|
|
455
455
|
**Priority**: CLI tools first (simpler) → MCP for complex integrations
|
|
@@ -471,7 +471,7 @@ claude mcp add --transport stdio postgres -- npx -y @modelcontextprotocol/server
|
|
|
471
471
|
MCP supports lazy-loading (auto mode) - tools load on-demand when >10% context.
|
|
472
472
|
<!-- SW:END:mcp -->
|
|
473
473
|
|
|
474
|
-
<!-- SW:SECTION:auto version="1.0.
|
|
474
|
+
<!-- SW:SECTION:auto version="1.0.220" -->
|
|
475
475
|
## Auto Mode
|
|
476
476
|
|
|
477
477
|
**Commands**: `/sw:auto` (start) | `/sw:auto-status` (check) | `/sw:cancel-auto` (emergency only)
|
|
@@ -488,7 +488,7 @@ MCP supports lazy-loading (auto mode) - tools load on-demand when >10% context.
|
|
|
488
488
|
**STOP & ASK** if: Spec conflicts | Task unnecessary | Requirement ambiguous
|
|
489
489
|
<!-- SW:END:auto -->
|
|
490
490
|
|
|
491
|
-
<!-- SW:SECTION:docs version="1.0.
|
|
491
|
+
<!-- SW:SECTION:docs version="1.0.220" -->
|
|
492
492
|
## Docs
|
|
493
493
|
|
|
494
494
|
[spec-weave.com](https://spec-weave.com)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specweave",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.221",
|
|
4
4
|
"description": "Spec-driven development framework for Claude Code. AI-native workflow with living documentation, intelligent agents, and multilingual support (9 languages). Enterprise-grade traceability with permanent specs and temporary increments.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
{"timestamp":"2026-02-03T22:03:06Z","hook":"stop-auto","decision":"approve","reason":"No increments directory","reasonCode":"no_increments_dir","durationMs":0,"context":{}}
|
|
2
|
+
{"timestamp":"2026-02-03T22:03:07Z","hook":"stop-reflect","decision":"approve","reason":"No learnings to extract","reasonCode":"nothing_to_learn","durationMs":1000,"context":{"transcriptLines":265,"reflectionEnabled":true,"learningsExtracted":0,"learningCategories":[],"exitReason":"nothing_to_learn","triggerReason":"session_end"}}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ran": false,
|
|
3
|
+
"inputSummary": {
|
|
4
|
+
"transcriptLines": 266
|
|
5
|
+
},
|
|
6
|
+
"extracted": {
|
|
7
|
+
"skillLearnings": []
|
|
8
|
+
},
|
|
9
|
+
"written": {
|
|
10
|
+
"learningsAdded": 0,
|
|
11
|
+
"learningsSkippedDuplicate": 0
|
|
12
|
+
},
|
|
13
|
+
"durationMs": 1.4448749999999997,
|
|
14
|
+
"reason": "CLAUDE.md not found in project"
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[2026-02-03T22:03:06Z] APPROVE: No increments directory
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: save
|
|
3
|
-
description: SMART save - auto-generates commit messages, handles git pull/merge/rebase automatically, resolves divergent branches, stashes dirty work. Works for single repos and umbrella multi-repo setups.
|
|
3
|
+
description: SMART save - auto-generates commit messages, handles git pull/merge/rebase automatically, resolves divergent branches, stashes dirty work. Works for single repos and umbrella multi-repo setups. Run with no args for fully automatic save.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# /sw:save - Smart Save with Auto-Sync
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Infrastructure as Code (IaC) Generation - Barrel Exports
|
|
3
|
-
*
|
|
4
|
-
* This module provides Terraform template generation capabilities for serverless platforms:
|
|
5
|
-
* - Handlebars template engine
|
|
6
|
-
* - Multi-platform support (AWS Lambda, Azure Functions, GCP, Firebase, Supabase)
|
|
7
|
-
* - Environment-specific configuration (dev, staging, prod)
|
|
8
|
-
*/
|
|
9
|
-
export * from './template-engine.js';
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/iac/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,cAAc,sBAAsB,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Infrastructure as Code (IaC) Generation - Barrel Exports
|
|
3
|
-
*
|
|
4
|
-
* This module provides Terraform template generation capabilities for serverless platforms:
|
|
5
|
-
* - Handlebars template engine
|
|
6
|
-
* - Multi-platform support (AWS Lambda, Azure Functions, GCP, Firebase, Supabase)
|
|
7
|
-
* - Environment-specific configuration (dev, staging, prod)
|
|
8
|
-
*/
|
|
9
|
-
// Template engine
|
|
10
|
-
export * from './template-engine.js';
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/iac/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,kBAAkB;AAClB,cAAc,sBAAsB,CAAC"}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Terraform Template Engine
|
|
3
|
-
*
|
|
4
|
-
* Renders Terraform templates using Handlebars with platform-specific variables.
|
|
5
|
-
*/
|
|
6
|
-
export interface TemplateVariables {
|
|
7
|
-
projectName?: string;
|
|
8
|
-
projectDescription?: string;
|
|
9
|
-
environment?: 'dev' | 'staging' | 'prod';
|
|
10
|
-
provider?: 'aws' | 'azure' | 'gcp' | 'firebase' | 'supabase';
|
|
11
|
-
region?: string;
|
|
12
|
-
functionName?: string;
|
|
13
|
-
runtime?: string;
|
|
14
|
-
handler?: string;
|
|
15
|
-
memorySize?: number;
|
|
16
|
-
timeout?: number;
|
|
17
|
-
databaseName?: string;
|
|
18
|
-
databaseType?: 'dynamodb' | 'cosmosdb' | 'firestore' | 'postgresql';
|
|
19
|
-
apiName?: string;
|
|
20
|
-
apiStageName?: string;
|
|
21
|
-
authEnabled?: boolean;
|
|
22
|
-
authProvider?: string;
|
|
23
|
-
monitoringEnabled?: boolean;
|
|
24
|
-
[key: string]: any;
|
|
25
|
-
}
|
|
26
|
-
export interface TemplateRenderResult {
|
|
27
|
-
mainTf: string;
|
|
28
|
-
variablesTf: string;
|
|
29
|
-
outputsTf: string;
|
|
30
|
-
providerTf?: string;
|
|
31
|
-
readmeMd?: string;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Template Engine for generating Terraform configurations
|
|
35
|
-
*/
|
|
36
|
-
export declare class TerraformTemplateEngine {
|
|
37
|
-
private handlebars;
|
|
38
|
-
private templateCache;
|
|
39
|
-
constructor();
|
|
40
|
-
/**
|
|
41
|
-
* Register custom Handlebars helpers
|
|
42
|
-
*/
|
|
43
|
-
private registerHelpers;
|
|
44
|
-
/**
|
|
45
|
-
* Load and compile a template from file
|
|
46
|
-
*/
|
|
47
|
-
loadTemplate(templatePath: string): HandlebarsTemplateDelegate;
|
|
48
|
-
/**
|
|
49
|
-
* Load template from string
|
|
50
|
-
*/
|
|
51
|
-
loadTemplateString(templateContent: string): HandlebarsTemplateDelegate;
|
|
52
|
-
/**
|
|
53
|
-
* Register a partial template
|
|
54
|
-
*/
|
|
55
|
-
registerPartial(name: string, templatePath: string): void;
|
|
56
|
-
/**
|
|
57
|
-
* Render a single template file
|
|
58
|
-
*/
|
|
59
|
-
renderTemplate(templatePath: string, variables: TemplateVariables): string;
|
|
60
|
-
/**
|
|
61
|
-
* Render complete Terraform configuration from template directory
|
|
62
|
-
*/
|
|
63
|
-
renderTerraformConfig(templateDir: string, variables: TemplateVariables): TemplateRenderResult;
|
|
64
|
-
/**
|
|
65
|
-
* Write rendered Terraform configuration to output directory
|
|
66
|
-
*/
|
|
67
|
-
writeTerraformConfig(outputDir: string, config: TemplateRenderResult): void;
|
|
68
|
-
/**
|
|
69
|
-
* Clear template cache
|
|
70
|
-
*/
|
|
71
|
-
clearCache(): void;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Create a new template engine instance
|
|
75
|
-
*/
|
|
76
|
-
export declare function createTemplateEngine(): TerraformTemplateEngine;
|
|
77
|
-
//# sourceMappingURL=template-engine.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"template-engine.d.ts","sourceRoot":"","sources":["../../../../src/core/iac/template-engine.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,MAAM,WAAW,iBAAiB;IAEhC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,WAAW,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,MAAM,CAAC;IAGzC,QAAQ,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,KAAK,GAAG,UAAU,GAAG,UAAU,CAAC;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,YAAY,CAAC,EAAE,MA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;IAyCvB;;OAEG;IACH,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,oBAAoB,GAAG,IAAI;IAoB3E;;OAEG;IACH,UAAU,IAAI,IAAI;CAGnB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,uBAAuB,CAE9D"}
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Terraform Template Engine
|
|
3
|
-
*
|
|
4
|
-
* Renders Terraform templates using Handlebars with platform-specific variables.
|
|
5
|
-
*/
|
|
6
|
-
import Handlebars from 'handlebars';
|
|
7
|
-
import * as fs from 'fs';
|
|
8
|
-
import * as path from 'path';
|
|
9
|
-
/**
|
|
10
|
-
* Template Engine for generating Terraform configurations
|
|
11
|
-
*/
|
|
12
|
-
export class TerraformTemplateEngine {
|
|
13
|
-
constructor() {
|
|
14
|
-
this.handlebars = Handlebars.create();
|
|
15
|
-
this.templateCache = new Map();
|
|
16
|
-
this.registerHelpers();
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Register custom Handlebars helpers
|
|
20
|
-
*/
|
|
21
|
-
registerHelpers() {
|
|
22
|
-
// String transformation helpers
|
|
23
|
-
this.handlebars.registerHelper('snakeCase', (str) => str ? str.replace(/([A-Z])/g, '_$1').toLowerCase().replace(/^_/, '') : '');
|
|
24
|
-
this.handlebars.registerHelper('kebabCase', (str) => str ? str.replace(/([A-Z])/g, '-$1').toLowerCase().replace(/^-/, '') : '');
|
|
25
|
-
this.handlebars.registerHelper('uppercase', (str) => str?.toUpperCase() ?? '');
|
|
26
|
-
this.handlebars.registerHelper('lowercase', (str) => str?.toLowerCase() ?? '');
|
|
27
|
-
// Comparison and logic helpers
|
|
28
|
-
this.handlebars.registerHelper('eq', (a, b) => a === b);
|
|
29
|
-
this.handlebars.registerHelper('or', (...args) => args.slice(0, -1).some(v => !!v));
|
|
30
|
-
// Math helpers (remove options object which is last arg)
|
|
31
|
-
this.handlebars.registerHelper('multiply', (...args) => args.slice(0, -1).reduce((acc, val) => acc * (parseFloat(val) || 0), 1));
|
|
32
|
-
this.handlebars.registerHelper('add', (...args) => args.slice(0, -1).reduce((acc, val) => acc + (parseFloat(val) || 0), 0));
|
|
33
|
-
// Utility helpers
|
|
34
|
-
this.handlebars.registerHelper('currentDate', () => new Date().toISOString().split('T')[0]);
|
|
35
|
-
this.handlebars.registerHelper('json', (obj) => JSON.stringify(obj, null, 2));
|
|
36
|
-
// Terraform formatting helpers
|
|
37
|
-
this.handlebars.registerHelper('tfList', (arr) => {
|
|
38
|
-
if (!Array.isArray(arr) || arr.length === 0)
|
|
39
|
-
return '[]';
|
|
40
|
-
return `[${arr.map(item => `"${item}"`).join(', ')}]`;
|
|
41
|
-
});
|
|
42
|
-
this.handlebars.registerHelper('tfMap', (obj) => {
|
|
43
|
-
if (!obj || Object.keys(obj).length === 0)
|
|
44
|
-
return '{}';
|
|
45
|
-
const entries = Object.entries(obj).map(([k, v]) => ` ${k} = "${v}"`).join('\n');
|
|
46
|
-
return `{\n${entries}\n}`;
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Load and compile a template from file
|
|
51
|
-
*/
|
|
52
|
-
loadTemplate(templatePath) {
|
|
53
|
-
// Check cache first
|
|
54
|
-
if (this.templateCache.has(templatePath)) {
|
|
55
|
-
return this.templateCache.get(templatePath);
|
|
56
|
-
}
|
|
57
|
-
// Read template file
|
|
58
|
-
const templateContent = fs.readFileSync(templatePath, 'utf-8');
|
|
59
|
-
// Compile template
|
|
60
|
-
const compiled = this.handlebars.compile(templateContent, {
|
|
61
|
-
strict: true,
|
|
62
|
-
noEscape: true, // Don't escape HTML (not relevant for Terraform)
|
|
63
|
-
});
|
|
64
|
-
// Cache compiled template
|
|
65
|
-
this.templateCache.set(templatePath, compiled);
|
|
66
|
-
return compiled;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Load template from string
|
|
70
|
-
*/
|
|
71
|
-
loadTemplateString(templateContent) {
|
|
72
|
-
return this.handlebars.compile(templateContent, {
|
|
73
|
-
strict: true,
|
|
74
|
-
noEscape: true,
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Register a partial template
|
|
79
|
-
*/
|
|
80
|
-
registerPartial(name, templatePath) {
|
|
81
|
-
const templateContent = fs.readFileSync(templatePath, 'utf-8');
|
|
82
|
-
this.handlebars.registerPartial(name, templateContent);
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Render a single template file
|
|
86
|
-
*/
|
|
87
|
-
renderTemplate(templatePath, variables) {
|
|
88
|
-
const template = this.loadTemplate(templatePath);
|
|
89
|
-
return template(variables);
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Render complete Terraform configuration from template directory
|
|
93
|
-
*/
|
|
94
|
-
renderTerraformConfig(templateDir, variables) {
|
|
95
|
-
const result = {
|
|
96
|
-
mainTf: '',
|
|
97
|
-
variablesTf: '',
|
|
98
|
-
outputsTf: '',
|
|
99
|
-
};
|
|
100
|
-
// Required files
|
|
101
|
-
const mainTfPath = path.join(templateDir, 'main.tf.hbs');
|
|
102
|
-
const variablesTfPath = path.join(templateDir, 'variables.tf.hbs');
|
|
103
|
-
const outputsTfPath = path.join(templateDir, 'outputs.tf.hbs');
|
|
104
|
-
if (!fs.existsSync(mainTfPath)) {
|
|
105
|
-
throw new Error(`Template not found: ${mainTfPath}`);
|
|
106
|
-
}
|
|
107
|
-
if (!fs.existsSync(variablesTfPath)) {
|
|
108
|
-
throw new Error(`Template not found: ${variablesTfPath}`);
|
|
109
|
-
}
|
|
110
|
-
if (!fs.existsSync(outputsTfPath)) {
|
|
111
|
-
throw new Error(`Template not found: ${outputsTfPath}`);
|
|
112
|
-
}
|
|
113
|
-
// Render required files
|
|
114
|
-
result.mainTf = this.renderTemplate(mainTfPath, variables);
|
|
115
|
-
result.variablesTf = this.renderTemplate(variablesTfPath, variables);
|
|
116
|
-
result.outputsTf = this.renderTemplate(outputsTfPath, variables);
|
|
117
|
-
// Optional files
|
|
118
|
-
const providerTfPath = path.join(templateDir, 'provider.tf.hbs');
|
|
119
|
-
if (fs.existsSync(providerTfPath)) {
|
|
120
|
-
result.providerTf = this.renderTemplate(providerTfPath, variables);
|
|
121
|
-
}
|
|
122
|
-
const readmeMdPath = path.join(templateDir, 'README.md.hbs');
|
|
123
|
-
if (fs.existsSync(readmeMdPath)) {
|
|
124
|
-
result.readmeMd = this.renderTemplate(readmeMdPath, variables);
|
|
125
|
-
}
|
|
126
|
-
return result;
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Write rendered Terraform configuration to output directory
|
|
130
|
-
*/
|
|
131
|
-
writeTerraformConfig(outputDir, config) {
|
|
132
|
-
// Create output directory if it doesn't exist
|
|
133
|
-
if (!fs.existsSync(outputDir)) {
|
|
134
|
-
fs.mkdirSync(outputDir, { recursive: true });
|
|
135
|
-
}
|
|
136
|
-
// Write files
|
|
137
|
-
fs.writeFileSync(path.join(outputDir, 'main.tf'), config.mainTf);
|
|
138
|
-
fs.writeFileSync(path.join(outputDir, 'variables.tf'), config.variablesTf);
|
|
139
|
-
fs.writeFileSync(path.join(outputDir, 'outputs.tf'), config.outputsTf);
|
|
140
|
-
if (config.providerTf) {
|
|
141
|
-
fs.writeFileSync(path.join(outputDir, 'provider.tf'), config.providerTf);
|
|
142
|
-
}
|
|
143
|
-
if (config.readmeMd) {
|
|
144
|
-
fs.writeFileSync(path.join(outputDir, 'README.md'), config.readmeMd);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Clear template cache
|
|
149
|
-
*/
|
|
150
|
-
clearCache() {
|
|
151
|
-
this.templateCache.clear();
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Create a new template engine instance
|
|
156
|
-
*/
|
|
157
|
-
export function createTemplateEngine() {
|
|
158
|
-
return new TerraformTemplateEngine();
|
|
159
|
-
}
|
|
160
|
-
//# sourceMappingURL=template-engine.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"template-engine.js","sourceRoot":"","sources":["../../../../src/core/iac/template-engine.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AA8C7B;;GAEG;AACH,MAAM,OAAO,uBAAuB;IAIlC;QACE,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC;QACtC,IAAI,CAAC,aAAa,GAAG,IAAI,GAAG,EAAE,CAAC;QAC/B,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;IAED;;OAEG;IACK,eAAe;QACrB,gCAAgC;QAChC,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,WAAW,EAAE,CAAC,GAAW,EAAE,EAAE,CAC1D,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAC1E,CAAC;QACF,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,WAAW,EAAE,CAAC,GAAW,EAAE,EAAE,CAC1D,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAC1E,CAAC;QACF,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,WAAW,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;QACvF,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,WAAW,EAAE,CAAC,GAAW,EA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
2
|
-
* Result of template generation
|
|
3
|
-
*/
|
|
4
|
-
export interface TemplateGeneratorResult {
|
|
5
|
-
/** Rendered template content */
|
|
6
|
-
content: string;
|
|
7
|
-
/** Template path (if from file) */
|
|
8
|
-
templatePath?: string;
|
|
9
|
-
/** Variables used for rendering */
|
|
10
|
-
variables: Record<string, any>;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Terraform template generator using Handlebars
|
|
14
|
-
* Provides variable substitution, conditionals, loops, and custom helpers
|
|
15
|
-
*/
|
|
16
|
-
export declare class TemplateGenerator {
|
|
17
|
-
private handlebars;
|
|
18
|
-
constructor();
|
|
19
|
-
/**
|
|
20
|
-
* Register custom Handlebars helpers
|
|
21
|
-
*/
|
|
22
|
-
private registerHelpers;
|
|
23
|
-
/**
|
|
24
|
-
* Render a Handlebars template with variables
|
|
25
|
-
* @param template Template string or compiled template
|
|
26
|
-
* @param variables Variables to substitute
|
|
27
|
-
* @returns Rendered template content
|
|
28
|
-
*/
|
|
29
|
-
render(template: string, variables: Record<string, any>): string;
|
|
30
|
-
/**
|
|
31
|
-
* Merge default variables with custom variables
|
|
32
|
-
* Custom variables override defaults
|
|
33
|
-
* @param defaults Default variable values
|
|
34
|
-
* @param custom Custom variable values
|
|
35
|
-
* @returns Merged variables
|
|
36
|
-
*/
|
|
37
|
-
mergeVariables(defaults: Record<string, any>, custom: Record<string, any>): Record<string, any>;
|
|
38
|
-
/**
|
|
39
|
-
* Generate Terraform files from template directory
|
|
40
|
-
* @param templateDir Directory containing .hbs templates
|
|
41
|
-
* @param outputDir Directory to write generated files
|
|
42
|
-
* @param variables Variables to substitute
|
|
43
|
-
* @returns Array of generated file results
|
|
44
|
-
*/
|
|
45
|
-
generateFromDirectory(templateDir: string, outputDir: string, variables: Record<string, any>): Promise<TemplateGeneratorResult[]>;
|
|
46
|
-
/**
|
|
47
|
-
* Load defaults from JSON file
|
|
48
|
-
* @param defaultsPath Path to defaults.json
|
|
49
|
-
* @returns Default variables
|
|
50
|
-
*/
|
|
51
|
-
loadDefaults(defaultsPath: string): Promise<Record<string, any>>;
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=template-generator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"template-generator.d.ts","sourceRoot":"","sources":["../../../../src/core/iac/template-generator.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mCAAmC;IACnC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAChC;AAED;;;GAGG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,UAAU,CAAoB;;IAOtC;;OAEG;IACH,OAAO,CAAC,eAAe;IAyBvB;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM;IAKhE;;;;;;OAMG;IACH,cAAc,CACZ,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC7B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC1B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAItB;;;;;;OAMG;IACG,qBAAqB,CACzB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC7B,OAAO,CAAC,uBAAuB,EAAE,CAAC;IAkCrC;;;;OAIG;IACG,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAKvE"}
|