@thiagodiogo/pscode 1.0.1 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -22
- package/README.md +142 -142
- package/bin/pscode.js +4 -4
- package/dist/cli/index.js +0 -1
- package/dist/commands/feedback.js +4 -4
- package/dist/commands/schema.js +60 -60
- package/dist/core/collections/initiatives/templates.js +57 -57
- package/dist/core/command-generation/adapters/claude.js +8 -8
- package/dist/core/command-generation/adapters/codex.js +6 -6
- package/dist/core/command-generation/adapters/cursor.js +8 -8
- package/dist/core/command-generation/adapters/gemini.js +5 -5
- package/dist/core/command-generation/adapters/github-copilot.js +5 -5
- package/dist/core/complete.d.ts +0 -1
- package/dist/core/complete.js +35 -59
- package/dist/core/completions/command-registry.js +0 -4
- package/dist/core/completions/generators/bash-generator.js +41 -41
- package/dist/core/completions/generators/fish-generator.js +7 -7
- package/dist/core/completions/generators/powershell-generator.js +29 -29
- package/dist/core/completions/generators/zsh-generator.js +33 -33
- package/dist/core/completions/templates/bash-templates.js +24 -24
- package/dist/core/completions/templates/fish-templates.js +38 -38
- package/dist/core/completions/templates/powershell-templates.js +28 -28
- package/dist/core/completions/templates/zsh-templates.js +39 -39
- package/dist/core/init.js +0 -1
- package/dist/core/profile-sync-drift.js +0 -1
- package/dist/core/profiles.d.ts +3 -3
- package/dist/core/profiles.js +2 -3
- package/dist/core/shared/skill-generation.js +1 -3
- package/dist/core/shared/tool-detection.d.ts +2 -2
- package/dist/core/shared/tool-detection.js +0 -2
- package/dist/core/templates/skill-templates.d.ts +0 -1
- package/dist/core/templates/skill-templates.js +0 -1
- package/dist/core/templates/workflows/apply-change.js +264 -264
- package/dist/core/templates/workflows/archive-change.js +204 -204
- package/dist/core/templates/workflows/bulk-archive-change.js +472 -472
- package/dist/core/templates/workflows/continue-change.js +214 -214
- package/dist/core/templates/workflows/explore.js +735 -735
- package/dist/core/templates/workflows/feedback.js +97 -97
- package/dist/core/templates/workflows/ff-change.js +180 -180
- package/dist/core/templates/workflows/new-change.js +123 -123
- package/dist/core/templates/workflows/onboard.js +584 -584
- package/dist/core/templates/workflows/propose.js +324 -324
- package/dist/core/templates/workflows/trello-draft.js +194 -194
- package/dist/core/templates/workflows/trello-setup.js +292 -292
- package/dist/core/templates/workflows/verify-change.js +318 -318
- package/dist/core/workspace/open-surface.js +30 -30
- package/package.json +18 -20
- package/schemas/spec-driven/schema.yaml +153 -153
- package/schemas/spec-driven/templates/design.md +19 -19
- package/schemas/spec-driven/templates/proposal.md +23 -23
- package/schemas/spec-driven/templates/spec.md +8 -8
- package/schemas/spec-driven/templates/tasks.md +9 -9
- package/schemas/workspace-planning/schema.yaml +72 -72
- package/schemas/workspace-planning/templates/design.md +33 -33
- package/schemas/workspace-planning/templates/proposal.md +28 -28
- package/schemas/workspace-planning/templates/spec.md +9 -9
- package/schemas/workspace-planning/templates/tasks.md +15 -15
- package/scripts/postinstall.js +83 -83
- package/dist/core/templates/workflows/sync-specs.d.ts +0 -10
- package/dist/core/templates/workflows/sync-specs.js +0 -290
|
@@ -30,14 +30,14 @@ export const cursorAdapter = {
|
|
|
30
30
|
return path.join('.cursor', 'commands', `ps-${commandId}.md`);
|
|
31
31
|
},
|
|
32
32
|
formatFile(content) {
|
|
33
|
-
return `---
|
|
34
|
-
name: /ps-${content.id}
|
|
35
|
-
id: ps-${content.id}
|
|
36
|
-
category: ${escapeYamlValue(content.category)}
|
|
37
|
-
description: ${escapeYamlValue(content.description)}
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
${content.body}
|
|
33
|
+
return `---
|
|
34
|
+
name: /ps-${content.id}
|
|
35
|
+
id: ps-${content.id}
|
|
36
|
+
category: ${escapeYamlValue(content.category)}
|
|
37
|
+
description: ${escapeYamlValue(content.description)}
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
${content.body}
|
|
41
41
|
`;
|
|
42
42
|
},
|
|
43
43
|
};
|
|
@@ -15,11 +15,11 @@ export const geminiAdapter = {
|
|
|
15
15
|
return path.join('.gemini', 'commands', 'ps', `${commandId}.toml`);
|
|
16
16
|
},
|
|
17
17
|
formatFile(content) {
|
|
18
|
-
return `description = "${content.description}"
|
|
19
|
-
|
|
20
|
-
prompt = """
|
|
21
|
-
${content.body}
|
|
22
|
-
"""
|
|
18
|
+
return `description = "${content.description}"
|
|
19
|
+
|
|
20
|
+
prompt = """
|
|
21
|
+
${content.body}
|
|
22
|
+
"""
|
|
23
23
|
`;
|
|
24
24
|
},
|
|
25
25
|
};
|
|
@@ -15,11 +15,11 @@ export const githubCopilotAdapter = {
|
|
|
15
15
|
return path.join('.github', 'prompts', `ps-${commandId}.prompt.md`);
|
|
16
16
|
},
|
|
17
17
|
formatFile(content) {
|
|
18
|
-
return `---
|
|
19
|
-
description: ${content.description}
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
${content.body}
|
|
18
|
+
return `---
|
|
19
|
+
description: ${content.description}
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
${content.body}
|
|
23
23
|
`;
|
|
24
24
|
},
|
|
25
25
|
};
|
package/dist/core/complete.d.ts
CHANGED
package/dist/core/complete.js
CHANGED
|
@@ -182,73 +182,49 @@ export class CompleteCommand {
|
|
|
182
182
|
console.log(`Warning: ${incompleteTasks} incomplete task(s) found. Continuing due to --yes flag.`);
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
//
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
if (specUpdates.length > 0) {
|
|
193
|
-
console.log('\nSpecs to update:');
|
|
185
|
+
// Sync delta specs to main specs
|
|
186
|
+
const specUpdates = await findSpecUpdates(changeDir, mainSpecsDir);
|
|
187
|
+
if (specUpdates.length > 0) {
|
|
188
|
+
console.log('\nSincronizando specs...');
|
|
189
|
+
// Prepare all updates first (validation pass, no writes)
|
|
190
|
+
const prepared = [];
|
|
191
|
+
try {
|
|
194
192
|
for (const update of specUpdates) {
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
console.log(` ${capability}: ${status}`);
|
|
193
|
+
const built = await buildUpdatedSpec(update, changeName);
|
|
194
|
+
prepared.push({ update, rebuilt: built.rebuilt, counts: built.counts });
|
|
198
195
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
196
|
+
}
|
|
197
|
+
catch (err) {
|
|
198
|
+
console.log(String(err.message || err));
|
|
199
|
+
console.log('Aborted. No files were changed.');
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
// All validations passed; pre-validate rebuilt full spec and then write files and display counts
|
|
203
|
+
let totals = { added: 0, modified: 0, removed: 0, renamed: 0 };
|
|
204
|
+
for (const p of prepared) {
|
|
205
|
+
const specName = path.basename(path.dirname(p.update.target));
|
|
206
|
+
if (!skipValidation) {
|
|
207
|
+
const report = await new Validator().validateSpecContent(specName, p.rebuilt);
|
|
208
|
+
if (!report.valid) {
|
|
209
|
+
console.log(chalk.red(`\nValidation errors in rebuilt spec for ${specName} (will not write changes):`));
|
|
210
|
+
for (const issue of report.issues) {
|
|
211
|
+
if (issue.level === 'ERROR')
|
|
212
|
+
console.log(chalk.red(` ✗ ${issue.message}`));
|
|
213
|
+
else if (issue.level === 'WARNING')
|
|
214
|
+
console.log(chalk.yellow(` ⚠ ${issue.message}`));
|
|
217
215
|
}
|
|
218
|
-
}
|
|
219
|
-
catch (err) {
|
|
220
|
-
console.log(String(err.message || err));
|
|
221
216
|
console.log('Aborted. No files were changed.');
|
|
222
217
|
return;
|
|
223
218
|
}
|
|
224
|
-
// All validations passed; pre-validate rebuilt full spec and then write files and display counts
|
|
225
|
-
let totals = { added: 0, modified: 0, removed: 0, renamed: 0 };
|
|
226
|
-
for (const p of prepared) {
|
|
227
|
-
const specName = path.basename(path.dirname(p.update.target));
|
|
228
|
-
if (!skipValidation) {
|
|
229
|
-
const report = await new Validator().validateSpecContent(specName, p.rebuilt);
|
|
230
|
-
if (!report.valid) {
|
|
231
|
-
console.log(chalk.red(`\nValidation errors in rebuilt spec for ${specName} (will not write changes):`));
|
|
232
|
-
for (const issue of report.issues) {
|
|
233
|
-
if (issue.level === 'ERROR')
|
|
234
|
-
console.log(chalk.red(` ✗ ${issue.message}`));
|
|
235
|
-
else if (issue.level === 'WARNING')
|
|
236
|
-
console.log(chalk.yellow(` ⚠ ${issue.message}`));
|
|
237
|
-
}
|
|
238
|
-
console.log('Aborted. No files were changed.');
|
|
239
|
-
return;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
await writeUpdatedSpec(p.update, p.rebuilt, p.counts);
|
|
243
|
-
totals.added += p.counts.added;
|
|
244
|
-
totals.modified += p.counts.modified;
|
|
245
|
-
totals.removed += p.counts.removed;
|
|
246
|
-
totals.renamed += p.counts.renamed;
|
|
247
|
-
}
|
|
248
|
-
console.log(`Totals: + ${totals.added}, ~ ${totals.modified}, - ${totals.removed}, → ${totals.renamed}`);
|
|
249
|
-
console.log('Specs updated successfully.');
|
|
250
219
|
}
|
|
220
|
+
await writeUpdatedSpec(p.update, p.rebuilt, p.counts);
|
|
221
|
+
totals.added += p.counts.added;
|
|
222
|
+
totals.modified += p.counts.modified;
|
|
223
|
+
totals.removed += p.counts.removed;
|
|
224
|
+
totals.renamed += p.counts.renamed;
|
|
251
225
|
}
|
|
226
|
+
console.log(`Totals: + ${totals.added}, ~ ${totals.modified}, - ${totals.removed}, → ${totals.renamed}`);
|
|
227
|
+
console.log('Specs updated successfully.');
|
|
252
228
|
}
|
|
253
229
|
// Create archive directory with date prefix
|
|
254
230
|
const archiveName = `${this.getArchiveDate()}-${changeName}`;
|
|
@@ -139,10 +139,6 @@ export const COMMAND_REGISTRY = [
|
|
|
139
139
|
short: 'y',
|
|
140
140
|
description: 'Skip confirmation prompts',
|
|
141
141
|
},
|
|
142
|
-
{
|
|
143
|
-
name: 'skip-specs',
|
|
144
|
-
description: 'Skip spec update operations',
|
|
145
|
-
},
|
|
146
142
|
{
|
|
147
143
|
name: 'no-validate',
|
|
148
144
|
description: 'Skip validation (not recommended)',
|
|
@@ -25,47 +25,47 @@ export class BashGenerator {
|
|
|
25
25
|
// Dynamic completion helpers from template
|
|
26
26
|
const helpers = BASH_DYNAMIC_HELPERS;
|
|
27
27
|
// Assemble final script with template literal
|
|
28
|
-
return `# Bash completion script for Pscode CLI
|
|
29
|
-
# Auto-generated - do not edit manually
|
|
30
|
-
|
|
31
|
-
_pscode_completion() {
|
|
32
|
-
local cur prev words cword
|
|
33
|
-
|
|
34
|
-
# Use _init_completion if available (from bash-completion package)
|
|
35
|
-
# The -n : option prevents colons from being treated as word separators
|
|
36
|
-
# (important for spec/change IDs that may contain colons)
|
|
37
|
-
# Otherwise, fall back to manual initialization
|
|
38
|
-
if declare -F _init_completion >/dev/null 2>&1; then
|
|
39
|
-
_init_completion -n : || return
|
|
40
|
-
else
|
|
41
|
-
# Manual fallback when bash-completion is not installed
|
|
42
|
-
COMPREPLY=()
|
|
43
|
-
cur="\${COMP_WORDS[COMP_CWORD]}"
|
|
44
|
-
prev="\${COMP_WORDS[COMP_CWORD-1]}"
|
|
45
|
-
words=("\${COMP_WORDS[@]}")
|
|
46
|
-
cword=$COMP_CWORD
|
|
47
|
-
fi
|
|
48
|
-
|
|
49
|
-
local cmd="\${words[1]}"
|
|
50
|
-
local subcmd="\${words[2]}"
|
|
51
|
-
|
|
52
|
-
# Top-level commands
|
|
53
|
-
if [[ $cword -eq 1 ]]; then
|
|
54
|
-
local commands="${commandList}"
|
|
55
|
-
COMPREPLY=($(compgen -W "$commands" -- "$cur"))
|
|
56
|
-
return 0
|
|
57
|
-
fi
|
|
58
|
-
|
|
59
|
-
# Command-specific completion
|
|
60
|
-
case "$cmd" in
|
|
61
|
-
${commandCases}
|
|
62
|
-
esac
|
|
63
|
-
|
|
64
|
-
return 0
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
${helpers}
|
|
68
|
-
complete -F _pscode_completion pscode
|
|
28
|
+
return `# Bash completion script for Pscode CLI
|
|
29
|
+
# Auto-generated - do not edit manually
|
|
30
|
+
|
|
31
|
+
_pscode_completion() {
|
|
32
|
+
local cur prev words cword
|
|
33
|
+
|
|
34
|
+
# Use _init_completion if available (from bash-completion package)
|
|
35
|
+
# The -n : option prevents colons from being treated as word separators
|
|
36
|
+
# (important for spec/change IDs that may contain colons)
|
|
37
|
+
# Otherwise, fall back to manual initialization
|
|
38
|
+
if declare -F _init_completion >/dev/null 2>&1; then
|
|
39
|
+
_init_completion -n : || return
|
|
40
|
+
else
|
|
41
|
+
# Manual fallback when bash-completion is not installed
|
|
42
|
+
COMPREPLY=()
|
|
43
|
+
cur="\${COMP_WORDS[COMP_CWORD]}"
|
|
44
|
+
prev="\${COMP_WORDS[COMP_CWORD-1]}"
|
|
45
|
+
words=("\${COMP_WORDS[@]}")
|
|
46
|
+
cword=$COMP_CWORD
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
local cmd="\${words[1]}"
|
|
50
|
+
local subcmd="\${words[2]}"
|
|
51
|
+
|
|
52
|
+
# Top-level commands
|
|
53
|
+
if [[ $cword -eq 1 ]]; then
|
|
54
|
+
local commands="${commandList}"
|
|
55
|
+
COMPREPLY=($(compgen -W "$commands" -- "$cur"))
|
|
56
|
+
return 0
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
# Command-specific completion
|
|
60
|
+
case "$cmd" in
|
|
61
|
+
${commandCases}
|
|
62
|
+
esac
|
|
63
|
+
|
|
64
|
+
return 0
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
${helpers}
|
|
68
|
+
complete -F _pscode_completion pscode
|
|
69
69
|
`;
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
@@ -31,13 +31,13 @@ export class FishGenerator {
|
|
|
31
31
|
// Dynamic completion helpers from template
|
|
32
32
|
const dynamicHelpers = FISH_DYNAMIC_HELPERS;
|
|
33
33
|
// Assemble final script with template literal
|
|
34
|
-
return `# Fish completion script for Pscode CLI
|
|
35
|
-
# Auto-generated - do not edit manually
|
|
36
|
-
|
|
37
|
-
${helperFunctions}
|
|
38
|
-
${dynamicHelpers}
|
|
39
|
-
${topLevelCommands}
|
|
40
|
-
|
|
34
|
+
return `# Fish completion script for Pscode CLI
|
|
35
|
+
# Auto-generated - do not edit manually
|
|
36
|
+
|
|
37
|
+
${helperFunctions}
|
|
38
|
+
${dynamicHelpers}
|
|
39
|
+
${topLevelCommands}
|
|
40
|
+
|
|
41
41
|
${commandCompletions}`;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
@@ -35,35 +35,35 @@ export class PowerShellGenerator {
|
|
|
35
35
|
// Dynamic completion helpers from template
|
|
36
36
|
const helpers = POWERSHELL_DYNAMIC_HELPERS;
|
|
37
37
|
// Assemble final script with template literal
|
|
38
|
-
return `# PowerShell completion script for Pscode CLI
|
|
39
|
-
# Auto-generated - do not edit manually
|
|
40
|
-
|
|
41
|
-
${helpers}
|
|
42
|
-
$pscodeCompleter = {
|
|
43
|
-
param($wordToComplete, $commandAst, $cursorPosition)
|
|
44
|
-
|
|
45
|
-
$tokens = $commandAst.ToString() -split "\\s+"
|
|
46
|
-
$commandCount = ($tokens | Measure-Object).Count
|
|
47
|
-
|
|
48
|
-
# Top-level commands
|
|
49
|
-
if ($commandCount -eq 1 -or ($commandCount -eq 2 -and $wordToComplete)) {
|
|
50
|
-
$commands = @(
|
|
51
|
-
${topLevelCommands}
|
|
52
|
-
)
|
|
53
|
-
$commands | Where-Object { $_.Name -like "$wordToComplete*" } | ForEach-Object {
|
|
54
|
-
[System.Management.Automation.CompletionResult]::new($_.Name, $_.Name, "ParameterValue", $_.Description)
|
|
55
|
-
}
|
|
56
|
-
return
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
$command = $tokens[1]
|
|
60
|
-
|
|
61
|
-
switch ($command) {
|
|
62
|
-
${commandCases}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
Register-ArgumentCompleter -CommandName pscode -ScriptBlock $pscodeCompleter
|
|
38
|
+
return `# PowerShell completion script for Pscode CLI
|
|
39
|
+
# Auto-generated - do not edit manually
|
|
40
|
+
|
|
41
|
+
${helpers}
|
|
42
|
+
$pscodeCompleter = {
|
|
43
|
+
param($wordToComplete, $commandAst, $cursorPosition)
|
|
44
|
+
|
|
45
|
+
$tokens = $commandAst.ToString() -split "\\s+"
|
|
46
|
+
$commandCount = ($tokens | Measure-Object).Count
|
|
47
|
+
|
|
48
|
+
# Top-level commands
|
|
49
|
+
if ($commandCount -eq 1 -or ($commandCount -eq 2 -and $wordToComplete)) {
|
|
50
|
+
$commands = @(
|
|
51
|
+
${topLevelCommands}
|
|
52
|
+
)
|
|
53
|
+
$commands | Where-Object { $_.Name -like "$wordToComplete*" } | ForEach-Object {
|
|
54
|
+
[System.Management.Automation.CompletionResult]::new($_.Name, $_.Name, "ParameterValue", $_.Description)
|
|
55
|
+
}
|
|
56
|
+
return
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
$command = $tokens[1]
|
|
60
|
+
|
|
61
|
+
switch ($command) {
|
|
62
|
+
${commandCases}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
Register-ArgumentCompleter -CommandName pscode -ScriptBlock $pscodeCompleter
|
|
67
67
|
`;
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
@@ -37,39 +37,39 @@ export class ZshGenerator {
|
|
|
37
37
|
// Dynamic completion helpers from template
|
|
38
38
|
const helpers = ZSH_DYNAMIC_HELPERS;
|
|
39
39
|
// Assemble final script with template literal
|
|
40
|
-
return `#compdef pscode
|
|
41
|
-
|
|
42
|
-
# Zsh completion script for Pscode CLI
|
|
43
|
-
# Auto-generated - do not edit manually
|
|
44
|
-
|
|
45
|
-
_pscode() {
|
|
46
|
-
local context state line
|
|
47
|
-
typeset -A opt_args
|
|
48
|
-
|
|
49
|
-
local -a commands
|
|
50
|
-
commands=(
|
|
51
|
-
${commandList}
|
|
52
|
-
)
|
|
53
|
-
|
|
54
|
-
_arguments -C \\
|
|
55
|
-
"1: :->command" \\
|
|
56
|
-
"*::arg:->args"
|
|
57
|
-
|
|
58
|
-
case $state in
|
|
59
|
-
command)
|
|
60
|
-
_describe "pscode command" commands
|
|
61
|
-
;;
|
|
62
|
-
args)
|
|
63
|
-
case $words[1] in
|
|
64
|
-
${commandCases}
|
|
65
|
-
esac
|
|
66
|
-
;;
|
|
67
|
-
esac
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
${commandFunctions}
|
|
71
|
-
${helpers}
|
|
72
|
-
compdef _pscode pscode
|
|
40
|
+
return `#compdef pscode
|
|
41
|
+
|
|
42
|
+
# Zsh completion script for Pscode CLI
|
|
43
|
+
# Auto-generated - do not edit manually
|
|
44
|
+
|
|
45
|
+
_pscode() {
|
|
46
|
+
local context state line
|
|
47
|
+
typeset -A opt_args
|
|
48
|
+
|
|
49
|
+
local -a commands
|
|
50
|
+
commands=(
|
|
51
|
+
${commandList}
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
_arguments -C \\
|
|
55
|
+
"1: :->command" \\
|
|
56
|
+
"*::arg:->args"
|
|
57
|
+
|
|
58
|
+
case $state in
|
|
59
|
+
command)
|
|
60
|
+
_describe "pscode command" commands
|
|
61
|
+
;;
|
|
62
|
+
args)
|
|
63
|
+
case $words[1] in
|
|
64
|
+
${commandCases}
|
|
65
|
+
esac
|
|
66
|
+
;;
|
|
67
|
+
esac
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
${commandFunctions}
|
|
71
|
+
${helpers}
|
|
72
|
+
compdef _pscode pscode
|
|
73
73
|
`;
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
@@ -2,29 +2,29 @@
|
|
|
2
2
|
* Static template strings for Bash completion scripts.
|
|
3
3
|
* These are Bash-specific helper functions that never change.
|
|
4
4
|
*/
|
|
5
|
-
export const BASH_DYNAMIC_HELPERS = `# Dynamic completion helpers
|
|
6
|
-
|
|
7
|
-
_pscode_complete_changes() {
|
|
8
|
-
local changes
|
|
9
|
-
changes=$(pscode __complete changes 2>/dev/null | cut -f1)
|
|
10
|
-
COMPREPLY=($(compgen -W "$changes" -- "$cur"))
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
_pscode_complete_specs() {
|
|
14
|
-
local specs
|
|
15
|
-
specs=$(pscode __complete specs 2>/dev/null | cut -f1)
|
|
16
|
-
COMPREPLY=($(compgen -W "$specs" -- "$cur"))
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
_pscode_complete_items() {
|
|
20
|
-
local items
|
|
21
|
-
items=$(pscode __complete changes 2>/dev/null | cut -f1; pscode __complete specs 2>/dev/null | cut -f1)
|
|
22
|
-
COMPREPLY=($(compgen -W "$items" -- "$cur"))
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
_pscode_complete_schemas() {
|
|
26
|
-
local schemas
|
|
27
|
-
schemas=$(pscode __complete schemas 2>/dev/null | cut -f1)
|
|
28
|
-
COMPREPLY=($(compgen -W "$schemas" -- "$cur"))
|
|
5
|
+
export const BASH_DYNAMIC_HELPERS = `# Dynamic completion helpers
|
|
6
|
+
|
|
7
|
+
_pscode_complete_changes() {
|
|
8
|
+
local changes
|
|
9
|
+
changes=$(pscode __complete changes 2>/dev/null | cut -f1)
|
|
10
|
+
COMPREPLY=($(compgen -W "$changes" -- "$cur"))
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
_pscode_complete_specs() {
|
|
14
|
+
local specs
|
|
15
|
+
specs=$(pscode __complete specs 2>/dev/null | cut -f1)
|
|
16
|
+
COMPREPLY=($(compgen -W "$specs" -- "$cur"))
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
_pscode_complete_items() {
|
|
20
|
+
local items
|
|
21
|
+
items=$(pscode __complete changes 2>/dev/null | cut -f1; pscode __complete specs 2>/dev/null | cut -f1)
|
|
22
|
+
COMPREPLY=($(compgen -W "$items" -- "$cur"))
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
_pscode_complete_schemas() {
|
|
26
|
+
local schemas
|
|
27
|
+
schemas=$(pscode __complete schemas 2>/dev/null | cut -f1)
|
|
28
|
+
COMPREPLY=($(compgen -W "$schemas" -- "$cur"))
|
|
29
29
|
}`;
|
|
30
30
|
//# sourceMappingURL=bash-templates.js.map
|
|
@@ -2,44 +2,44 @@
|
|
|
2
2
|
* Static template strings for Fish completion scripts.
|
|
3
3
|
* These are Fish-specific helper functions that never change.
|
|
4
4
|
*/
|
|
5
|
-
export const FISH_STATIC_HELPERS = `# Helper function to check if a subcommand is present
|
|
6
|
-
function __fish_pscode_using_subcommand
|
|
7
|
-
set -l cmd (commandline -opc)
|
|
8
|
-
set -e cmd[1]
|
|
9
|
-
for i in $argv
|
|
10
|
-
if contains -- $i $cmd
|
|
11
|
-
return 0
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
return 1
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
function __fish_pscode_no_subcommand
|
|
18
|
-
set -l cmd (commandline -opc)
|
|
19
|
-
test (count $cmd) -eq 1
|
|
5
|
+
export const FISH_STATIC_HELPERS = `# Helper function to check if a subcommand is present
|
|
6
|
+
function __fish_pscode_using_subcommand
|
|
7
|
+
set -l cmd (commandline -opc)
|
|
8
|
+
set -e cmd[1]
|
|
9
|
+
for i in $argv
|
|
10
|
+
if contains -- $i $cmd
|
|
11
|
+
return 0
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
return 1
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
function __fish_pscode_no_subcommand
|
|
18
|
+
set -l cmd (commandline -opc)
|
|
19
|
+
test (count $cmd) -eq 1
|
|
20
20
|
end`;
|
|
21
|
-
export const FISH_DYNAMIC_HELPERS = `# Dynamic completion helpers
|
|
22
|
-
|
|
23
|
-
function __fish_pscode_changes
|
|
24
|
-
pscode __complete changes 2>/dev/null | while read -l id desc
|
|
25
|
-
printf '%s\\t%s\\n' "$id" "$desc"
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
function __fish_pscode_specs
|
|
30
|
-
pscode __complete specs 2>/dev/null | while read -l id desc
|
|
31
|
-
printf '%s\\t%s\\n' "$id" "$desc"
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
function __fish_pscode_items
|
|
36
|
-
__fish_pscode_changes
|
|
37
|
-
__fish_pscode_specs
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
function __fish_pscode_schemas
|
|
41
|
-
pscode __complete schemas 2>/dev/null | while read -l id desc
|
|
42
|
-
printf '%s\\t%s\\n' "$id" "$desc"
|
|
43
|
-
end
|
|
21
|
+
export const FISH_DYNAMIC_HELPERS = `# Dynamic completion helpers
|
|
22
|
+
|
|
23
|
+
function __fish_pscode_changes
|
|
24
|
+
pscode __complete changes 2>/dev/null | while read -l id desc
|
|
25
|
+
printf '%s\\t%s\\n' "$id" "$desc"
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
function __fish_pscode_specs
|
|
30
|
+
pscode __complete specs 2>/dev/null | while read -l id desc
|
|
31
|
+
printf '%s\\t%s\\n' "$id" "$desc"
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
function __fish_pscode_items
|
|
36
|
+
__fish_pscode_changes
|
|
37
|
+
__fish_pscode_specs
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
function __fish_pscode_schemas
|
|
41
|
+
pscode __complete schemas 2>/dev/null | while read -l id desc
|
|
42
|
+
printf '%s\\t%s\\n' "$id" "$desc"
|
|
43
|
+
end
|
|
44
44
|
end`;
|
|
45
45
|
//# sourceMappingURL=fish-templates.js.map
|
|
@@ -2,33 +2,33 @@
|
|
|
2
2
|
* Static template strings for PowerShell completion scripts.
|
|
3
3
|
* These are PowerShell-specific helper functions that never change.
|
|
4
4
|
*/
|
|
5
|
-
export const POWERSHELL_DYNAMIC_HELPERS = `# Dynamic completion helpers
|
|
6
|
-
|
|
7
|
-
function Get-PscodeChanges {
|
|
8
|
-
$output = pscode __complete changes 2>$null
|
|
9
|
-
if ($output) {
|
|
10
|
-
$output | ForEach-Object {
|
|
11
|
-
($_ -split "\\t")[0]
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function Get-PscodeSpecs {
|
|
17
|
-
$output = pscode __complete specs 2>$null
|
|
18
|
-
if ($output) {
|
|
19
|
-
$output | ForEach-Object {
|
|
20
|
-
($_ -split "\\t")[0]
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function Get-PscodeSchemas {
|
|
26
|
-
$output = pscode __complete schemas 2>$null
|
|
27
|
-
if ($output) {
|
|
28
|
-
$output | ForEach-Object {
|
|
29
|
-
($_ -split "\\t")[0]
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
5
|
+
export const POWERSHELL_DYNAMIC_HELPERS = `# Dynamic completion helpers
|
|
6
|
+
|
|
7
|
+
function Get-PscodeChanges {
|
|
8
|
+
$output = pscode __complete changes 2>$null
|
|
9
|
+
if ($output) {
|
|
10
|
+
$output | ForEach-Object {
|
|
11
|
+
($_ -split "\\t")[0]
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function Get-PscodeSpecs {
|
|
17
|
+
$output = pscode __complete specs 2>$null
|
|
18
|
+
if ($output) {
|
|
19
|
+
$output | ForEach-Object {
|
|
20
|
+
($_ -split "\\t")[0]
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function Get-PscodeSchemas {
|
|
26
|
+
$output = pscode __complete schemas 2>$null
|
|
27
|
+
if ($output) {
|
|
28
|
+
$output | ForEach-Object {
|
|
29
|
+
($_ -split "\\t")[0]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
33
|
`;
|
|
34
34
|
//# sourceMappingURL=powershell-templates.js.map
|