@promptscript/cli 1.13.1 → 1.14.0
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 +324 -164
- package/bin/prs.js +3 -1
- package/index.js +4887 -822
- package/package.json +2 -2
- package/skills/promptscript/SKILL.md +68 -26
- package/src/cli.d.ts.map +1 -1
- package/src/commands/compile.d.ts.map +1 -1
- package/src/commands/diff.d.ts +7 -0
- package/src/commands/diff.d.ts.map +1 -1
- package/src/commands/hooks.d.ts +6 -0
- package/src/commands/hooks.d.ts.map +1 -1
- package/src/commands/init.d.ts +3 -0
- package/src/commands/init.d.ts.map +1 -1
- package/src/commands/migrate.d.ts +0 -7
- package/src/commands/migrate.d.ts.map +1 -1
- package/src/commands/registry/index.d.ts.map +1 -1
- package/src/commands/update.d.ts.map +1 -1
- package/src/commands/validate.d.ts.map +1 -1
- package/src/config/loader.d.ts +6 -0
- package/src/config/loader.d.ts.map +1 -1
- package/src/output/console.d.ts +2 -0
- package/src/output/console.d.ts.map +1 -1
- package/src/services.d.ts +5 -0
- package/src/services.d.ts.map +1 -1
- package/src/types.d.ts +11 -1
- package/src/types.d.ts.map +1 -1
- package/src/utils/ai-tools-detector.d.ts +1 -1
- package/src/utils/ai-tools-detector.d.ts.map +1 -1
- package/src/utils/backup.d.ts.map +1 -1
- package/src/utils/conflict-detector.d.ts +15 -0
- package/src/utils/conflict-detector.d.ts.map +1 -1
- package/src/utils/managed-output-cleanup.d.ts +30 -0
- package/src/utils/managed-output-cleanup.d.ts.map +1 -0
- package/src/utils/migration-prompt.d.ts +5 -1
- package/src/utils/migration-prompt.d.ts.map +1 -1
- package/src/utils/registry-scaffolder.d.ts +2 -0
- package/src/utils/registry-scaffolder.d.ts.map +1 -1
- package/src/utils/write-plan.d.ts +18 -0
- package/src/utils/write-plan.d.ts.map +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptscript/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "CLI for PromptScript - standardize AI instructions across GitHub Copilot, Claude, Cursor and other AI tools",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@inquirer/prompts": "^8.5.2",
|
|
44
44
|
"chalk": "^5.6.2",
|
|
45
45
|
"chokidar": "^5.0.0",
|
|
46
|
-
"commander": "^
|
|
46
|
+
"commander": "^15.0.0",
|
|
47
47
|
"ora": "^9.4.0",
|
|
48
48
|
"prettier": "^3.8.4",
|
|
49
49
|
"yaml": "^2.9.0",
|
|
@@ -7,9 +7,9 @@ description: >-
|
|
|
7
7
|
@restrictions, @shortcuts, @skills, or @agents, configuring
|
|
8
8
|
promptscript.yaml, resolving compilation errors, understanding inheritance
|
|
9
9
|
(@inherit) and composition (@use, @extend), or migrating AI instructions
|
|
10
|
-
to PromptScript. Also use when asked about
|
|
11
|
-
Copilot, Claude Code, Cursor, Antigravity,
|
|
12
|
-
AI
|
|
10
|
+
to PromptScript. Also use when asked about the 48 built-in compilation
|
|
11
|
+
targets, including GitHub Copilot, Claude Code, Cursor, Antigravity,
|
|
12
|
+
Factory AI, and AGENTS.md-based platforms.
|
|
13
13
|
license: MIT
|
|
14
14
|
metadata:
|
|
15
15
|
author: PromptScript
|
|
@@ -525,9 +525,17 @@ prs skills list
|
|
|
525
525
|
prs skills update
|
|
526
526
|
```
|
|
527
527
|
|
|
528
|
-
### @extend (modify imported blocks)
|
|
528
|
+
### @extend (modify existing or imported blocks)
|
|
529
529
|
|
|
530
|
-
|
|
530
|
+
Use a direct path for inherited or local blocks:
|
|
531
|
+
|
|
532
|
+
```
|
|
533
|
+
@extend standards.testing {
|
|
534
|
+
coverage: 95
|
|
535
|
+
}
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
Use an alias when targeting a specific imported block:
|
|
531
539
|
|
|
532
540
|
```
|
|
533
541
|
@use @core/typescript as ts
|
|
@@ -537,6 +545,26 @@ Requires an aliased @use:
|
|
|
537
545
|
}
|
|
538
546
|
```
|
|
539
547
|
|
|
548
|
+
#### Replacing regular block fields
|
|
549
|
+
|
|
550
|
+
Syntax `1.3.0` supports explicit replacement of complete regular block field values:
|
|
551
|
+
|
|
552
|
+
```
|
|
553
|
+
@meta { id: "project" syntax: "1.3.0" }
|
|
554
|
+
|
|
555
|
+
@inherit ./company-base
|
|
556
|
+
|
|
557
|
+
@extend standards {
|
|
558
|
+
testing!: ["Use Vitest"]
|
|
559
|
+
linting: ["Use ESLint"]
|
|
560
|
+
}
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
`testing!` replaces the inherited value. Fields without `!` keep normal merge behavior.
|
|
564
|
+
Replacement works after `@inherit` and `@use`, including aliases and nested target paths.
|
|
565
|
+
A missing field is set. The modifier is rejected for `@skills`, which retain their dedicated
|
|
566
|
+
merge and sealing semantics.
|
|
567
|
+
|
|
540
568
|
#### Skill-aware @extend semantics
|
|
541
569
|
|
|
542
570
|
When extending a skill definition via `@extend`, individual skill properties follow specific merge
|
|
@@ -720,7 +748,7 @@ targets:
|
|
|
720
748
|
version: frontmatter
|
|
721
749
|
factory:
|
|
722
750
|
version: full
|
|
723
|
-
windsurf: #
|
|
751
|
+
windsurf: # 41 additional targets supported
|
|
724
752
|
version: simple
|
|
725
753
|
cline:
|
|
726
754
|
version: simple
|
|
@@ -792,21 +820,28 @@ The `syntax` field in `@meta` declares the PromptScript language version (semver
|
|
|
792
820
|
| Version | What it adds |
|
|
793
821
|
| ------- | ----------------------------------------------------------------------------------------------------------------------- |
|
|
794
822
|
| `1.0.0` | Core blocks (identity, context, standards, restrictions, knowledge, shortcuts, commands, guards, params, skills, local) |
|
|
795
|
-
| `1.1.0` | Adds `@agents`
|
|
823
|
+
| `1.1.0` | Adds `@agents` and `@workflows`; reserves internal `@prompts` |
|
|
796
824
|
| `1.2.0` | Adds `@examples` (few-shot input/output pairs) |
|
|
825
|
+
| `1.3.0` | Adds explicit regular block field replacement in `@extend` |
|
|
826
|
+
| `1.4.0` | Adds `@hooks`, `@mcpServers`, and `@plugins` |
|
|
797
827
|
|
|
798
828
|
### Block Version Requirements
|
|
799
829
|
|
|
800
|
-
| Block
|
|
801
|
-
|
|
|
802
|
-
| `@agents`
|
|
803
|
-
| `@
|
|
830
|
+
| Block | Minimum Syntax Version |
|
|
831
|
+
| ------------- | ---------------------- |
|
|
832
|
+
| `@agents` | `1.1.0` |
|
|
833
|
+
| `@workflows` | `1.1.0` |
|
|
834
|
+
| `@examples` | `1.2.0` |
|
|
835
|
+
| `@hooks` | `1.4.0` |
|
|
836
|
+
| `@mcpServers` | `1.4.0` |
|
|
837
|
+
| `@plugins` | `1.4.0` |
|
|
804
838
|
|
|
805
839
|
All other built-in blocks are available from `1.0.0`.
|
|
840
|
+
Regular block field replacement with `field!: value` requires syntax `1.3.0`.
|
|
806
841
|
|
|
807
842
|
### Validation Rules
|
|
808
843
|
|
|
809
|
-
- **PS018 (`syntax-version-compat`)**: warns when blocks
|
|
844
|
+
- **PS018 (`syntax-version-compat`)**: warns when resolved blocks or syntax features require a higher version than declared. Requirements from inheritance, imports, and skill composition are included. Suggestion: run `prs validate --fix`.
|
|
810
845
|
- **PS019 (`unknown-block-name`)**: warns when a block name is not a known PromptScript type, with fuzzy-match suggestions for typos.
|
|
811
846
|
- **PS021 (`use-block-filter`)**: errors when `only` and `exclude` are both specified in `@use` parameters.
|
|
812
847
|
- **PS025 (`valid-skill-references`)**: errors when a `references` entry points to a file with a disallowed extension or a path that cannot be resolved.
|
|
@@ -823,7 +858,7 @@ prs validate --fix # Auto-fix syntax versions in .prs files
|
|
|
823
858
|
prs upgrade # Upgrade all .prs files to the latest version
|
|
824
859
|
```
|
|
825
860
|
|
|
826
|
-
`--fix` rewrites the `syntax: "..."` line in each file's `@meta` block to match the minimum version required by
|
|
861
|
+
`--fix` rewrites the `syntax: "..."` line in each file's `@meta` block to match the minimum version required by resolved blocks and syntax features. It follows inheritance, imports, and skill composition. It only upgrades, never downgrades.
|
|
827
862
|
|
|
828
863
|
`prs upgrade` upgrades all files to the latest known syntax version regardless of what blocks they use.
|
|
829
864
|
|
|
@@ -831,10 +866,13 @@ prs upgrade # Upgrade all .prs files to the latest version
|
|
|
831
866
|
|
|
832
867
|
```
|
|
833
868
|
prs init # Initialize project (auto-detects existing files)
|
|
869
|
+
prs init --yes --targets claude factory
|
|
870
|
+
prs init --dry-run # Preview initialization
|
|
834
871
|
prs init --auto-import # Initialize + static import of existing files
|
|
835
872
|
prs migrate # Interactive migration flow
|
|
836
873
|
prs migrate --static # Non-interactive static import
|
|
837
874
|
prs migrate --llm # Generate AI-assisted migration prompt
|
|
875
|
+
prs migrate --static --dry-run
|
|
838
876
|
prs compile # Compile to all targets
|
|
839
877
|
prs compile --watch # Watch mode
|
|
840
878
|
prs compile --ignore-hashes # Skip integrity hash verification
|
|
@@ -844,7 +882,7 @@ prs validate --fix # Auto-fix syntax version declarations
|
|
|
844
882
|
prs validate --skip-policies # Skip policy engine evaluation
|
|
845
883
|
prs upgrade # Upgrade all .prs files to latest syntax version
|
|
846
884
|
prs import CLAUDE.md # Import existing AI instructions
|
|
847
|
-
prs import --dry-run
|
|
885
|
+
prs import CLAUDE.md --dry-run # Preview import conversion
|
|
848
886
|
prs inspect <skill> # Show skill composition provenance
|
|
849
887
|
prs inspect <skill> --layers # Show layer-level breakdown
|
|
850
888
|
prs hooks install # Install auto-compilation hooks for AI tools
|
|
@@ -868,34 +906,39 @@ prs registry list # Show configured registries and aliases
|
|
|
868
906
|
prs registry add <alias> <url> # Add a registry alias
|
|
869
907
|
```
|
|
870
908
|
|
|
909
|
+
`prs init --yes` requires explicit, detected, or user-configured targets. It does not invent
|
|
910
|
+
default tools. For existing projects, `prs migrate` preserves `promptscript.yaml`, isolates static
|
|
911
|
+
output under `.promptscript/migrated/`, leaves source instructions untouched, and performs no
|
|
912
|
+
writes when no candidates are detected.
|
|
913
|
+
|
|
871
914
|
## Output Targets
|
|
872
915
|
|
|
873
|
-
|
|
916
|
+
48 supported targets. Key examples:
|
|
874
917
|
|
|
875
918
|
| Target | Main File | Skills |
|
|
876
919
|
| ----------- | ------------------------------- | -------------------------------------------------- |
|
|
877
920
|
| GitHub | .github/copilot-instructions.md | .github/skills/\*/SKILL.md |
|
|
878
921
|
| Claude | CLAUDE.md | .claude/skills/\*/SKILL.md |
|
|
879
|
-
| Cursor | .cursor/rules/project.mdc | .
|
|
880
|
-
| Antigravity | .agent/rules/project.md |
|
|
922
|
+
| Cursor | .cursor/rules/project.mdc | .agents/skills/\*/SKILL.md |
|
|
923
|
+
| Antigravity | .agent/rules/project.md | - |
|
|
881
924
|
| Factory | AGENTS.md | .factory/skills/\*/SKILL.md, .factory/droids/\*.md |
|
|
882
925
|
| OpenCode | OPENCODE.md | .opencode/skills/\*/SKILL.md |
|
|
883
|
-
| Gemini | GEMINI.md | .
|
|
926
|
+
| Gemini | GEMINI.md | .agents/skills/\*/skill.md |
|
|
884
927
|
| Windsurf | .windsurf/rules/project.md | .windsurf/skills/\*/SKILL.md |
|
|
885
|
-
| Cline | .clinerules |
|
|
886
|
-
| Roo Code | .roorules |
|
|
928
|
+
| Cline | .clinerules | - |
|
|
929
|
+
| Roo Code | .roorules | - |
|
|
887
930
|
| Codex | AGENTS.md | .agents/skills/\*/SKILL.md |
|
|
888
|
-
| Continue | .continue/rules/project.md |
|
|
889
|
-
| +
|
|
931
|
+
| Continue | .continue/rules/project.md | - |
|
|
932
|
+
| + 36 more | | See full list in documentation |
|
|
890
933
|
|
|
891
934
|
### Formatter Documentation
|
|
892
935
|
|
|
893
936
|
For detailed information about each formatter's output paths, supported features, quirks, and example outputs:
|
|
894
937
|
|
|
895
|
-
- **Full formatter reference:** `docs/reference/formatters/` (7 dedicated pages + index of all
|
|
938
|
+
- **Full formatter reference:** `docs/reference/formatters/` (7 dedicated pages + index of all 48)
|
|
896
939
|
- **llms-full.txt:** Available at the docs site root - contains all documentation in a single file for LLM consumption
|
|
897
940
|
- **Dedicated pages exist for:** Claude Code, GitHub Copilot, Cursor, Antigravity, Factory AI, Gemini CLI, OpenCode
|
|
898
|
-
- **All
|
|
941
|
+
- **All 48 formatters indexed at:** `docs/reference/formatters/index.md` with output paths, tier, and feature flags
|
|
899
942
|
|
|
900
943
|
### Auto-Compilation Hooks
|
|
901
944
|
|
|
@@ -905,7 +948,6 @@ triggers compilation automatically when you edit `.prs` files:
|
|
|
905
948
|
```
|
|
906
949
|
prs hooks install # Auto-detect and install for all detected tools
|
|
907
950
|
prs hooks install claude # Install for a specific tool
|
|
908
|
-
prs hooks install --all # Install for all supported tools
|
|
909
951
|
```
|
|
910
952
|
|
|
911
953
|
Hooks also protect generated files from direct edits — when an AI agent tries
|
|
@@ -932,7 +974,7 @@ The entry file uses `@use ./context`, `@use ./standards`, etc. to compose them.
|
|
|
932
974
|
|
|
933
975
|
1. Missing @meta block - every .prs file needs `@meta` with `id` and `syntax`
|
|
934
976
|
2. Multiple @inherit - only one per file; use `@use` for additional imports
|
|
935
|
-
3.
|
|
977
|
+
3. Extending an unknown path - target an inherited or local block, or use an imported alias
|
|
936
978
|
4. Unquoted strings with special chars - quote strings containing `:`, `#`, `{`, `}`
|
|
937
979
|
5. Forgetting to compile - `.prs` changes need `prs compile` to take effect
|
|
938
980
|
6. Triple quotes inside triple quotes - not supported; describe content textually instead
|
package/src/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../../packages/cli/src/cli.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../../packages/cli/src/cli.ts"],"names":[],"mappings":";AAgTA;;;GAGG;AACH,wBAAgB,GAAG,CAAC,IAAI,GAAE,MAAM,EAAiB,GAAG,IAAI,CAEvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/compile.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAkBlD,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/compile.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAkBlD,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,gBAAgB,CAAC;AA+dzE;;GAEG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,cAAc,EACvB,QAAQ,GAAE,WAAqC,GAC9C,OAAO,CAAC,IAAI,CAAC,CA6Mf"}
|
package/src/commands/diff.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type { DiffOptions } from '../types.js';
|
|
2
|
+
import type { Logger } from '@promptscript/core';
|
|
3
|
+
/**
|
|
4
|
+
* Logger that surfaces post-format diagnostics only when --verbose/--debug is set.
|
|
5
|
+
* Mirrors createCliLogger in compile.ts so diff and compile report Prettier
|
|
6
|
+
* post-format warnings consistently.
|
|
7
|
+
*/
|
|
8
|
+
export declare function createDiffLogger(): Logger;
|
|
2
9
|
/**
|
|
3
10
|
* Show diff between current output files and what would be generated.
|
|
4
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/diff.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/diff.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAiD,MAAM,oBAAoB,CAAC;AAwBhG;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAgBzC;AAgFD;;GAEG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAuFrE"}
|
package/src/commands/hooks.d.ts
CHANGED
|
@@ -5,6 +5,12 @@ export interface HooksOptions {
|
|
|
5
5
|
/** Install/uninstall for all detected tools */
|
|
6
6
|
all?: boolean;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Read a JSON settings file.
|
|
10
|
+
* Returns an empty object when the file is missing (ENOENT).
|
|
11
|
+
* Throws a clear error for parse failures or other filesystem errors.
|
|
12
|
+
*/
|
|
13
|
+
export declare function readSettingsFile(path: string): Promise<Record<string, unknown>>;
|
|
8
14
|
/**
|
|
9
15
|
* Main hooks command handler.
|
|
10
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/hooks.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,+CAA+C;IAC/C,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/hooks.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,+CAA+C;IAC/C,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAsBD;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAmBrF;AAmJD;;GAEG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE,MAAM,EACb,OAAO,GAAE,YAAiB,GACzB,OAAO,CAAC,IAAI,CAAC,CAmBf"}
|
package/src/commands/init.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { type CliServices } from '../services.js';
|
|
2
2
|
import type { InitOptions } from '../types.js';
|
|
3
3
|
import { type AIToolTarget } from '../utils/ai-tools-detector.js';
|
|
4
|
+
import { type PlannedWrite } from '../utils/write-plan.js';
|
|
4
5
|
/**
|
|
5
6
|
* Initialize PromptScript in the current directory.
|
|
6
7
|
* Creates configuration file and initial project structure.
|
|
7
8
|
*/
|
|
8
9
|
export declare function initCommand(options: InitOptions, services?: CliServices): Promise<void>;
|
|
10
|
+
export declare function selectMigrationStrategy(services: CliServices): Promise<'static' | 'llm'>;
|
|
11
|
+
export declare function getSkillWrites(targets: AIToolTarget[]): PlannedWrite[];
|
|
9
12
|
/**
|
|
10
13
|
* Format target name for display using the formatter's description.
|
|
11
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/init.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/init.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,gBAAgB,CAAC;AAoBzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C,OAAO,EAOL,KAAK,YAAY,EAElB,MAAM,+BAA+B,CAAC;AAIvC,OAAO,EAGL,KAAK,YAAY,EAElB,MAAM,wBAAwB,CAAC;AA4DhC;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,WAAW,EACpB,QAAQ,GAAE,WAAqC,GAC9C,OAAO,CAAC,IAAI,CAAC,CAQf;AAwTD,wBAAsB,uBAAuB,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,GAAG,KAAK,CAAC,CAU9F;AAoGD,wBAAgB,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,CAkCtE;AAqXD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAM7D"}
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
import type { MigrateOptions } from '../types.js';
|
|
2
2
|
import { type CliServices } from '../services.js';
|
|
3
|
-
/**
|
|
4
|
-
* prs migrate -- alias/shortcut to init migration path.
|
|
5
|
-
* Delegates to initCommand with appropriate flags.
|
|
6
|
-
*
|
|
7
|
-
* When promptscript.yaml already exists, force: true allows
|
|
8
|
-
* initCommand to re-enter and run migration-only flow.
|
|
9
|
-
*/
|
|
10
3
|
export declare function migrateCommand(options: MigrateOptions, services?: CliServices): Promise<void>;
|
|
11
4
|
//# sourceMappingURL=migrate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/migrate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/migrate.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,gBAAgB,CAAC;AAmBzE,wBAAsB,cAAc,CAClC,OAAO,EAAE,cAAc,EACvB,QAAQ,GAAE,WAAqC,GAC9C,OAAO,CAAC,IAAI,CAAC,CAQf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/commands/registry/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOzC;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/cli/src/commands/registry/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOzC;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAuChE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/update.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/update.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAQjD;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CACjC,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,IAAI,CAAC,CA4Gf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/validate.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/commands/validate.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAmJnD;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,EACtB,aAAa,EAAE,MAAM,GACpB,MAAM,GAAG,IAAI,CA+Bf;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAgBtD;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAoE7E"}
|
package/src/config/loader.d.ts
CHANGED
|
@@ -3,6 +3,12 @@ import type { PromptScriptConfig } from '@promptscript/core';
|
|
|
3
3
|
* List of config file names to search for.
|
|
4
4
|
*/
|
|
5
5
|
export declare const CONFIG_FILES: string[];
|
|
6
|
+
/**
|
|
7
|
+
* Interpolate environment variables in a string.
|
|
8
|
+
* Supports ${VAR} and ${VAR:-default} syntax.
|
|
9
|
+
* For missing variables without default: warns and returns empty string.
|
|
10
|
+
*/
|
|
11
|
+
export declare function interpolateEnvVars(text: string): string;
|
|
6
12
|
/**
|
|
7
13
|
* Find the config file in the current directory.
|
|
8
14
|
* @param customPath - Optional custom config file path.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/config/loader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAK7D;;GAEG;AACH,eAAO,MAAM,YAAY,UAKxB,CAAC;
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/config/loader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAK7D;;GAEG;AACH,eAAO,MAAM,YAAY,UAKxB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAoBvD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAmBjE;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAqBjF;AAED;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,CAAC,EAAE,MAAM,EACnB,QAAQ,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,GACrC,OAAO,CAAC,kBAAkB,CAAC,CAM7B"}
|
package/src/output/console.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/output/console.ts"],"names":[],"mappings":"AACA,OAAY,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAEpC;;GAEG;AACH,oBAAY,QAAQ;IAClB,wCAAwC;IACxC,KAAK,IAAI;IACT,8BAA8B;IAC9B,MAAM,IAAI;IACV,6CAA6C;IAC7C,OAAO,IAAI;IACX,wCAAwC;IACxC,KAAK,IAAI;CACV;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,wBAAwB;IACxB,QAAQ,EAAE,QAAQ,CAAC;IACnB,iCAAiC;IACjC,MAAM,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/output/console.ts"],"names":[],"mappings":"AACA,OAAY,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAEpC;;GAEG;AACH,oBAAY,QAAQ;IAClB,wCAAwC;IACxC,KAAK,IAAI;IACT,8BAA8B;IAC9B,MAAM,IAAI;IACV,6CAA6C;IAC7C,OAAO,IAAI;IACX,wCAAwC;IACxC,KAAK,IAAI;CACV;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,wBAAwB;IACxB,QAAQ,EAAE,QAAQ,CAAC;IACnB,iCAAiC;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,+CAA+C;IAC/C,YAAY,EAAE,QAAQ,GAAG,QAAQ,CAAC;CACnC;AAqBD;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,IAAI,CAE7D;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,UAAU,CAEvC;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAEnC;AAED;;GAEG;AACH,wBAAgB,OAAO,IAAI,OAAO,CAEjC;AAED;;GAEG;AACH,wBAAgB,OAAO,IAAI,OAAO,CAEjC;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAQ/C;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa;IACxB;;OAEG;qBACc,MAAM,GAAG,IAAI;IAK9B;;;OAGG;mBACY,MAAM,GAAG,IAAI;IAI5B;;OAEG;qBACc,MAAM,GAAG,IAAI;IAK9B;;OAEG;kBACW,MAAM,GAAG,IAAI;IAK3B;;OAEG;qBACc,MAAM,GAAG,IAAI;IAK9B;;OAEG;uBACgB,MAAM,GAAG,IAAI;IAKhC;;OAEG;kBACW,MAAM,GAAG,IAAI;IAK3B;;OAEG;mBACY,MAAM,GAAG,IAAI;IAK5B;;OAEG;qBACc,MAAM,GAAG,IAAI;IAK9B;;OAEG;mBACY,MAAM,GAAG,IAAI;IAK5B;;OAEG;oBACa,MAAM,GAAG,IAAI;IAK7B;;OAEG;eACQ,IAAI;IAKf;;OAEG;oBACa,MAAM,GAAG,IAAI;IAK7B;;OAEG;mBACY,MAAM,GAAG,IAAI;IAK5B;;OAEG;qBACc,MAAM,GAAG,MAAM;IAIhC;;OAEG;yBACkB,MAAM,SAAS,MAAM,WAAW,MAAM,GAAG,MAAM;CAUrE,CAAC"}
|
package/src/services.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { writeFile, mkdir, readFile, readdir } from 'fs/promises';
|
|
2
2
|
import { existsSync, readFileSync } from 'fs';
|
|
3
|
+
import type { PathLike, Stats } from 'fs';
|
|
3
4
|
import * as prompts from '@inquirer/prompts';
|
|
4
5
|
export interface FileSystem {
|
|
5
6
|
writeFile: typeof writeFile;
|
|
@@ -8,6 +9,10 @@ export interface FileSystem {
|
|
|
8
9
|
readdir: typeof readdir;
|
|
9
10
|
existsSync: typeof existsSync;
|
|
10
11
|
readFileSync: typeof readFileSync;
|
|
12
|
+
rename?: typeof import('fs/promises').rename;
|
|
13
|
+
rm?: typeof import('fs/promises').rm;
|
|
14
|
+
lstat?: (path: PathLike) => Promise<Stats>;
|
|
15
|
+
realpath?: (path: PathLike) => Promise<string>;
|
|
11
16
|
}
|
|
12
17
|
export interface PromptSystem {
|
|
13
18
|
input: typeof prompts.input;
|
package/src/services.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../../../packages/cli/src/services.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAE7C,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,OAAO,SAAS,CAAC;IAC5B,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,QAAQ,EAAE,OAAO,QAAQ,CAAC;IAC1B,OAAO,EAAE,OAAO,OAAO,CAAC;IACxB,UAAU,EAAE,OAAO,UAAU,CAAC;IAC9B,YAAY,EAAE,OAAO,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../../../packages/cli/src/services.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC;AAC1C,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAE7C,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,OAAO,SAAS,CAAC;IAC5B,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,QAAQ,EAAE,OAAO,QAAQ,CAAC;IAC1B,OAAO,EAAE,OAAO,OAAO,CAAC;IACxB,UAAU,EAAE,OAAO,UAAU,CAAC;IAC9B,YAAY,EAAE,OAAO,YAAY,CAAC;IAClC,MAAM,CAAC,EAAE,cAAc,aAAa,EAAE,MAAM,CAAC;IAC7C,EAAE,CAAC,EAAE,cAAc,aAAa,EAAE,EAAE,CAAC;IACrC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC;IAC3C,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CAChD;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,OAAO,OAAO,CAAC,KAAK,CAAC;IAC5B,OAAO,EAAE,OAAO,OAAO,CAAC,OAAO,CAAC;IAChC,QAAQ,EAAE,OAAO,OAAO,CAAC,QAAQ,CAAC;IAClC,MAAM,EAAE,OAAO,OAAO,CAAC,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,UAAU,CAAC;IACf,OAAO,EAAE,YAAY,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,eAAO,MAAM,iBAAiB,EAAE,UAuB/B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,YAS5B,CAAC;AAEF,eAAO,MAAM,qBAAqB,QAAO,WAIvC,CAAC"}
|
package/src/types.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export interface InitOptions {
|
|
|
10
10
|
inherit?: string;
|
|
11
11
|
/** Registry path or URL */
|
|
12
12
|
registry?: string;
|
|
13
|
-
/** Target AI tools
|
|
13
|
+
/** Target AI tools */
|
|
14
14
|
targets?: string[];
|
|
15
15
|
/** Interactive mode (prompts for all options) */
|
|
16
16
|
interactive?: boolean;
|
|
@@ -24,6 +24,8 @@ export interface InitOptions {
|
|
|
24
24
|
autoImport?: boolean;
|
|
25
25
|
/** Create backup before migration */
|
|
26
26
|
backup?: boolean;
|
|
27
|
+
/** Preview planned files without writing */
|
|
28
|
+
dryRun?: boolean;
|
|
27
29
|
/**
|
|
28
30
|
* Install auto-compile hooks for selected targets.
|
|
29
31
|
* Defaults to `true`; pass `--no-hooks` on the CLI to opt out.
|
|
@@ -43,6 +45,10 @@ export interface MigrateOptions {
|
|
|
43
45
|
static?: boolean;
|
|
44
46
|
llm?: boolean;
|
|
45
47
|
files?: string[];
|
|
48
|
+
targets?: string[];
|
|
49
|
+
backup?: boolean;
|
|
50
|
+
force?: boolean;
|
|
51
|
+
dryRun?: boolean;
|
|
46
52
|
}
|
|
47
53
|
/**
|
|
48
54
|
* Options for the compile command.
|
|
@@ -50,6 +56,8 @@ export interface MigrateOptions {
|
|
|
50
56
|
export interface CompileOptions {
|
|
51
57
|
/** Named build profile from config.builds */
|
|
52
58
|
build?: string;
|
|
59
|
+
/** Compile all named build profiles in deterministic key order */
|
|
60
|
+
allBuilds?: boolean;
|
|
53
61
|
/** Specific target to compile (github, claude, cursor) */
|
|
54
62
|
target?: string;
|
|
55
63
|
/** Output format (github, claude, cursor) - alias for target */
|
|
@@ -143,6 +151,8 @@ export interface RegistryInitOptions {
|
|
|
143
151
|
output?: string;
|
|
144
152
|
/** Whether to seed with starter configs (default true) */
|
|
145
153
|
seed?: boolean;
|
|
154
|
+
/** Force overwrite existing files */
|
|
155
|
+
force?: boolean;
|
|
146
156
|
}
|
|
147
157
|
/**
|
|
148
158
|
* Options for the registry validate command.
|
package/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../packages/cli/src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,qBAAqB;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM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ACH,MAAM,WAAW,mBAAmB;IAClC,sCAAsC;IACtC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,wEAAwE;IACxE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,sDAAsD;IACtD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,oBAAoB;IACpB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -35,7 +35,7 @@ export declare function detectAITools(services?: CliServices): Promise<AIToolsDe
|
|
|
35
35
|
export declare function getAllTargets(): AIToolTarget[];
|
|
36
36
|
/**
|
|
37
37
|
* Get suggested targets based on detection.
|
|
38
|
-
*
|
|
38
|
+
* Only strongly detected tools are suggested.
|
|
39
39
|
*/
|
|
40
40
|
export declare function getSuggestedTargets(detection: AIToolsDetection): AIToolTarget[];
|
|
41
41
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-tools-detector.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/ai-tools-detector.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"ai-tools-detector.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/ai-tools-detector.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE3E,OAAO,EAAE,KAAK,WAAW,EAAyB,MAAM,gBAAgB,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,cAAc,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,oDAAoD;IACpD,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAClC,yFAAyF;IACzF,mBAAmB,EAAE,kBAAkB,EAAE,CAAC;CAC3C;AA6QD;;GAEG;AACH,wBAAsB,aAAa,CACjC,QAAQ,GAAE,WAAqC,GAC9C,OAAO,CAAC,gBAAgB,CAAC,CA0D3B;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,YAAY,EAAE,CAE9C;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,gBAAgB,GAAG,YAAY,EAAE,CAE/E;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,gBAAgB,GAAG,MAAM,EAAE,CAkB5E;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAE3E;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,gBAAgB,GAAG,MAAM,EAAE,CAiBzE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backup.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/backup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"backup.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/backup.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,wBAAgB,SAAS,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO,CAaxD;AAED,wBAAsB,YAAY,CAChC,SAAS,EAAE,MAAM,EAAE,EACnB,QAAQ,EAAE,WAAW,GACpB,OAAO,CAAC,YAAY,CAAC,CAkCvB"}
|
|
@@ -7,4 +7,19 @@ export declare function detectOutputConflicts(targets: {
|
|
|
7
7
|
name: string;
|
|
8
8
|
config?: TargetConfig;
|
|
9
9
|
}[]): Map<string, string[]>;
|
|
10
|
+
/**
|
|
11
|
+
* Validate that an output path is project-relative and does not contain traversal.
|
|
12
|
+
* Returns an error message if invalid, or undefined if valid.
|
|
13
|
+
*/
|
|
14
|
+
export declare function validateOutputPath(outputPath: string, projectRoot?: string): string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Detect collisions across build profile outputs.
|
|
17
|
+
* Returns a map of conflicting paths to the list of profile names.
|
|
18
|
+
*/
|
|
19
|
+
export declare function detectBuildOutputCollisions(profiles: Map<string, string[]>): Map<string, string[]>;
|
|
20
|
+
/**
|
|
21
|
+
* Resolve an output path relative to the project root.
|
|
22
|
+
* Ensures the path stays within the project.
|
|
23
|
+
*/
|
|
24
|
+
export declare function resolveOutputPath(outputPath: string, projectRoot: string): string;
|
|
10
25
|
//# sourceMappingURL=conflict-detector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conflict-detector.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/conflict-detector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"conflict-detector.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/conflict-detector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIvD;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,YAAY,CAAA;CAAE,EAAE,GACjD,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAiBvB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAe/F;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAC9B,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAQvB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAKjF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { FormatterOutput } from '@promptscript/compiler';
|
|
2
|
+
export interface ManagedOutputCleanupResult {
|
|
3
|
+
/** Obsolete files removed, or that would be removed in dry-run mode */
|
|
4
|
+
removed: string[];
|
|
5
|
+
}
|
|
6
|
+
export interface ManagedOutputCleanupOptions {
|
|
7
|
+
/** Absolute base directory used to resolve formatter output paths */
|
|
8
|
+
outputRoot: string;
|
|
9
|
+
/** Report actions without modifying the filesystem */
|
|
10
|
+
dryRun?: boolean;
|
|
11
|
+
}
|
|
12
|
+
interface FileIdentity {
|
|
13
|
+
dev: number | bigint;
|
|
14
|
+
ino: number | bigint;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Remove obsolete generated files from formatter-declared managed directories.
|
|
18
|
+
*
|
|
19
|
+
* Only regular files carrying a PromptScript marker are eligible. Directory
|
|
20
|
+
* symlinks and file symlinks are skipped, and unmarked files are preserved.
|
|
21
|
+
*/
|
|
22
|
+
export declare function cleanupManagedOutputs(outputs: Map<string, FormatterOutput>, options: ManagedOutputCleanupOptions): Promise<ManagedOutputCleanupResult>;
|
|
23
|
+
/**
|
|
24
|
+
* Remove a file only when it is still a regular (non-symlink) file whose device
|
|
25
|
+
* and inode match the previously observed identity. Used as an in-process
|
|
26
|
+
* fallback when a child process cannot perform the cwd-relative guarded unlink.
|
|
27
|
+
*/
|
|
28
|
+
export declare function removeIfUnchanged(entryPath: string, fileStat: FileIdentity): Promise<boolean>;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=managed-output-cleanup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"managed-output-cleanup.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/managed-output-cleanup.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AA2C9D,MAAM,WAAW,0BAA0B;IACzC,uEAAuE;IACvE,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,2BAA2B;IAC1C,qEAAqE;IACrE,UAAU,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAOD,UAAU,YAAY;IACpB,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,EACrC,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,0BAA0B,CAAC,CAuBrC;AA0HD;;;;GAIG;AACH,wBAAsB,iBAAiB,CACrC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,YAAY,GACrB,OAAO,CAAC,OAAO,CAAC,CAclB"}
|
|
@@ -3,5 +3,9 @@ export interface MigrationPromptInput {
|
|
|
3
3
|
sizeHuman: string;
|
|
4
4
|
toolName: string;
|
|
5
5
|
}
|
|
6
|
-
export
|
|
6
|
+
export interface MigrationPromptOptions {
|
|
7
|
+
outputDirectory?: string;
|
|
8
|
+
existingEntry?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function generateMigrationPrompt(candidates: MigrationPromptInput[], options?: MigrationPromptOptions): string;
|
|
7
11
|
//# sourceMappingURL=migration-prompt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration-prompt.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/migration-prompt.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,uBAAuB,
|
|
1
|
+
{"version":3,"file":"migration-prompt.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/migration-prompt.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,sBAAsB;IACrC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,oBAAoB,EAAE,EAClC,OAAO,GAAE,sBAA2B,GACnC,MAAM,CA8BR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry-scaffolder.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/registry-scaffolder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,8BAA8B;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,2BAA2B;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,sBAAsB;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,IAAI,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"registry-scaffolder.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/registry-scaffolder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,8BAA8B;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,2BAA2B;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,sBAAsB;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,IAAI,EAAE,OAAO,CAAC;IACd,iDAAiD;IACjD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AA4GD;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,WAAW,GACpB,OAAO,CAAC,MAAM,EAAE,CAAC,CAsFnB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CliServices } from '../services.js';
|
|
2
|
+
export interface PlannedWrite {
|
|
3
|
+
path: string;
|
|
4
|
+
content: string;
|
|
5
|
+
}
|
|
6
|
+
export interface WritePlanOptions {
|
|
7
|
+
dryRun?: boolean;
|
|
8
|
+
force?: boolean;
|
|
9
|
+
canOverwrite?: (path: string, content: string) => boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface WritePlanResult {
|
|
12
|
+
created: string[];
|
|
13
|
+
updated: string[];
|
|
14
|
+
unchanged: string[];
|
|
15
|
+
}
|
|
16
|
+
export declare function assertSafeWritePath(path: string, services: CliServices): Promise<void>;
|
|
17
|
+
export declare function executeWritePlan(writes: PlannedWrite[], services: CliServices, options?: WritePlanOptions): Promise<WritePlanResult>;
|
|
18
|
+
//# sourceMappingURL=write-plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-plan.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/write-plan.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;CAC3D;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AA2CD,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAwB5F;AAED,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,YAAY,EAAE,EACtB,QAAQ,EAAE,WAAW,EACrB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,eAAe,CAAC,CAyI1B"}
|