@asnd/skill-creator 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +64 -125
- package/dist/cli/dynamic.d.ts +26 -0
- package/dist/cli/dynamic.js +136 -0
- package/dist/cli/dynamic.js.map +1 -0
- package/dist/cli/main.d.ts +2 -4
- package/dist/cli/main.js +376 -1530
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/parse.d.ts +9 -0
- package/dist/cli/parse.js +38 -0
- package/dist/cli/parse.js.map +1 -0
- package/dist/commands/agents.d.ts +96 -0
- package/dist/commands/agents.js +116 -0
- package/dist/commands/agents.js.map +1 -0
- package/dist/commands/install.d.ts +12 -0
- package/dist/commands/install.js +229 -0
- package/dist/commands/install.js.map +1 -0
- package/dist/core/cache.d.ts +3 -0
- package/dist/core/cache.js +52 -0
- package/dist/core/cache.js.map +1 -0
- package/dist/core/coerce.d.ts +8 -0
- package/dist/core/coerce.js +128 -0
- package/dist/core/coerce.js.map +1 -0
- package/dist/core/filter.d.ts +7 -0
- package/dist/core/filter.js +16 -0
- package/dist/core/filter.js.map +1 -0
- package/dist/core/listing.d.ts +11 -0
- package/dist/core/listing.js +31 -0
- package/dist/core/listing.js.map +1 -0
- package/dist/core/names.d.ts +1 -0
- package/dist/core/names.js +7 -0
- package/dist/core/names.js.map +1 -0
- package/dist/core/output.d.ts +12 -0
- package/dist/core/output.js +34 -0
- package/dist/core/output.js.map +1 -0
- package/dist/core/secrets.d.ts +1 -0
- package/dist/core/secrets.js +21 -0
- package/dist/core/secrets.js.map +1 -0
- package/dist/core/types.d.ts +37 -0
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/usage.d.ts +13 -0
- package/dist/core/usage.js +33 -0
- package/dist/core/usage.js.map +1 -0
- package/dist/graphql/execute.d.ts +8 -0
- package/dist/graphql/execute.js +133 -0
- package/dist/graphql/execute.js.map +1 -0
- package/dist/graphql/extract.d.ts +6 -0
- package/dist/graphql/extract.js +109 -0
- package/dist/graphql/extract.js.map +1 -0
- package/dist/graphql/load.d.ts +11 -0
- package/dist/graphql/load.js +95 -0
- package/dist/graphql/load.js.map +1 -0
- package/dist/mcp/extract.d.ts +8 -0
- package/dist/mcp/extract.js +40 -0
- package/dist/mcp/extract.js.map +1 -0
- package/dist/mcp/http.d.ts +8 -0
- package/dist/mcp/http.js +80 -0
- package/dist/mcp/http.js.map +1 -0
- package/dist/mcp/stdio.d.ts +9 -0
- package/dist/mcp/stdio.js +67 -0
- package/dist/mcp/stdio.js.map +1 -0
- package/dist/openapi/execute.d.ts +12 -0
- package/dist/openapi/execute.js +44 -0
- package/dist/openapi/execute.js.map +1 -0
- package/dist/openapi/extract.d.ts +2 -0
- package/dist/openapi/extract.js +123 -0
- package/dist/openapi/extract.js.map +1 -0
- package/dist/openapi/load.d.ts +11 -0
- package/dist/openapi/load.js +52 -0
- package/dist/openapi/load.js.map +1 -0
- package/dist/openapi/params.d.ts +12 -0
- package/dist/openapi/params.js +47 -0
- package/dist/openapi/params.js.map +1 -0
- package/dist/openapi/refs.d.ts +1 -0
- package/dist/openapi/refs.js +8 -0
- package/dist/openapi/refs.js.map +1 -0
- package/dist/skills/agents.d.ts +77 -0
- package/dist/skills/agents.js +85 -0
- package/dist/skills/agents.js.map +1 -0
- package/dist/skills/generate.d.ts +1 -0
- package/dist/skills/generate.js +494 -0
- package/dist/skills/generate.js.map +1 -0
- package/package.json +7 -10
- package/prompts/skill-creator.md +169 -0
- package/dist/cli/package-SLCRJ4QY.js +0 -89
- package/dist/cli/package-SLCRJ4QY.js.map +0 -1
- package/prompts/generate-skill.md +0 -22
- package/skills/skill-creator/SKILL.md +0 -260
package/README.md
CHANGED
|
@@ -1,169 +1,108 @@
|
|
|
1
1
|
# skill-creator
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Give an AI agent a link to an OpenAPI spec, GraphQL schema, or MCP server and get back a ready-to-use Agent Skill with wrapper scripts, references, and usage notes.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Instead of pasting API docs into every chat, install one slash command and let your agent create reusable command-line skills for the tools your team uses.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
Install the `/skill-creator` command with `npx`:
|
|
8
10
|
|
|
9
11
|
```bash
|
|
10
|
-
|
|
11
|
-
pnpm build
|
|
12
|
-
node dist/cli/main.js --help
|
|
12
|
+
npx @asnd/skill-creator command install --agent pi --scope global
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
For a project-local command:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
|
|
18
|
+
npx @asnd/skill-creator command install --agent pi --scope project
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Exactly one source is required:
|
|
21
|
+
Other supported agents include `claude-code`, `codex`, `cursor`, `opencode`, `gemini-cli`, `github-copilot`, `cline`, and `windsurf`.
|
|
24
22
|
|
|
25
23
|
```bash
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
skill-creator --spec https://petstore3.swagger.io/api/v3/openapi.json --list
|
|
24
|
+
npx @asnd/skill-creator command install --agent claude-code --scope project
|
|
25
|
+
```
|
|
29
26
|
|
|
30
|
-
|
|
31
|
-
skill-creator --mcp https://api.example.com/mcp --list
|
|
27
|
+
## Use it
|
|
32
28
|
|
|
33
|
-
|
|
34
|
-
skill-creator --mcp-stdio "npx -y @modelcontextprotocol/server-filesystem /tmp" --list
|
|
29
|
+
Open your agent and run `/skill-creator` with the source you want to turn into a skill.
|
|
35
30
|
|
|
36
|
-
|
|
37
|
-
skill-creator
|
|
31
|
+
```txt
|
|
32
|
+
/skill-creator https://example.com/openapi.json
|
|
38
33
|
```
|
|
39
34
|
|
|
40
|
-
|
|
35
|
+
That is the normal flow: provide the spec/server/schema link, answer any missing install questions, and the agent creates the skill for you.
|
|
36
|
+
|
|
37
|
+
More examples:
|
|
41
38
|
|
|
42
39
|
```txt
|
|
43
|
-
|
|
44
|
-
--
|
|
45
|
-
--
|
|
46
|
-
--
|
|
47
|
-
--methods METHODS OpenAPI method filter, e.g. GET,POST
|
|
48
|
-
--graphql-schema SRC GraphQL SDL or introspection JSON schema FILE|URL
|
|
49
|
-
--cache-ttl SECONDS Cache TTL for remote specs, MCP tools, GraphQL schemas
|
|
50
|
-
--refresh Bypass cache
|
|
51
|
-
--search PATTERN Search commands/tools
|
|
52
|
-
--fields FIELDS GraphQL selection override
|
|
53
|
-
--selection-depth N GraphQL default selection depth (default: 2)
|
|
54
|
-
--stdin Read GraphQL variables from stdin JSON
|
|
55
|
-
--pretty Pretty-print JSON
|
|
56
|
-
--raw Print raw response body
|
|
57
|
-
--head N Limit arrays to first N records
|
|
40
|
+
/skill-creator --spec https://example.com/openapi.json --name youtube --agent pi --scope project
|
|
41
|
+
/skill-creator --graphql https://api.example.com/graphql --graphql-schema https://example.com/schema.graphql --name pokeapi
|
|
42
|
+
/skill-creator --mcp https://mcp.example.com/mcp --name context7
|
|
43
|
+
/skill-creator --mcp-stdio "npx -y @example/mcp-server" --name example-mcp
|
|
58
44
|
```
|
|
59
45
|
|
|
60
|
-
##
|
|
61
|
-
|
|
62
|
-
### GitHub remote MCP
|
|
46
|
+
## What it creates
|
|
63
47
|
|
|
64
|
-
|
|
48
|
+
A generated skill looks like this:
|
|
65
49
|
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
node dist/cli/main.js \
|
|
75
|
-
--mcp https://api.githubcopilot.com/mcp/x/repos/readonly \
|
|
76
|
-
--auth-header Authorization:env:GITHUB_MCP_PAT \
|
|
77
|
-
get-file-contents \
|
|
78
|
-
--owner github \
|
|
79
|
-
--repo github-mcp-server \
|
|
80
|
-
--path README.md
|
|
50
|
+
```txt
|
|
51
|
+
.pi/skills/youtube/
|
|
52
|
+
├── SKILL.md
|
|
53
|
+
├── scripts/
|
|
54
|
+
│ └── youtube
|
|
55
|
+
└── references/
|
|
56
|
+
└── openapi-spec-MM-DD-YYYY.json
|
|
81
57
|
```
|
|
82
58
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
On some current npm installs the filesystem server needs `ajv` supplied explicitly:
|
|
59
|
+
Future agents can then use simple commands instead of reading API docs from scratch:
|
|
86
60
|
|
|
87
61
|
```bash
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
printf 'hello from filesystem mcp\n' > /tmp/skill-creator-test.txt
|
|
93
|
-
|
|
94
|
-
pnpm dev -- --mcp-stdio \
|
|
95
|
-
"npx -y -p ajv -p @modelcontextprotocol/server-filesystem mcp-server-filesystem /tmp" \
|
|
96
|
-
read-text-file --path /private/tmp/skill-creator-test.txt
|
|
62
|
+
./scripts/youtube --list
|
|
63
|
+
./scripts/youtube --search videos
|
|
64
|
+
./scripts/youtube <command> --help
|
|
65
|
+
./scripts/youtube --pretty <command> <flags>
|
|
97
66
|
```
|
|
98
67
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
### PokeAPI GraphQL
|
|
68
|
+
Generated scripts use `npx -y @asnd/skill-creator` internally, so consumers do not need a global install.
|
|
102
69
|
|
|
103
|
-
|
|
104
|
-
node dist/cli/main.js \
|
|
105
|
-
--graphql https://beta.pokeapi.co/graphql/v1beta \
|
|
106
|
-
--list
|
|
107
|
-
|
|
108
|
-
node dist/cli/main.js \
|
|
109
|
-
--graphql https://beta.pokeapi.co/graphql/v1beta \
|
|
110
|
-
--fields "id name" \
|
|
111
|
-
pokemon-v2-pokemon \
|
|
112
|
-
--limit 3
|
|
113
|
-
|
|
114
|
-
node dist/cli/main.js \
|
|
115
|
-
--graphql https://beta.pokeapi.co/graphql/v1beta \
|
|
116
|
-
--fields "id name height weight" \
|
|
117
|
-
pokemon-v2-pokemon-by-pk \
|
|
118
|
-
--id 25
|
|
119
|
-
```
|
|
70
|
+
## Shell usage
|
|
120
71
|
|
|
121
|
-
|
|
72
|
+
If you want to generate a skill directly from the shell or CI, use the same package with `npx`:
|
|
122
73
|
|
|
123
74
|
```bash
|
|
124
|
-
|
|
125
|
-
--
|
|
126
|
-
|
|
127
|
-
--
|
|
75
|
+
npx @asnd/skill-creator generate \
|
|
76
|
+
--template openapi \
|
|
77
|
+
--name youtube \
|
|
78
|
+
--spec https://example.com/openapi.json \
|
|
79
|
+
--agent pi \
|
|
80
|
+
--scope project
|
|
128
81
|
```
|
|
129
82
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
By default, `--graphql` introspects the endpoint to discover commands. If introspection is disabled, provide a schema SDL file or introspection JSON file/URL:
|
|
83
|
+
GraphQL and MCP are supported too:
|
|
133
84
|
|
|
134
85
|
```bash
|
|
135
|
-
|
|
86
|
+
npx @asnd/skill-creator generate \
|
|
87
|
+
--template graphql \
|
|
88
|
+
--name pokeapi \
|
|
136
89
|
--graphql https://api.example.com/graphql \
|
|
137
90
|
--graphql-schema ./schema.graphql \
|
|
138
|
-
--
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
--
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
### Filtering command lists
|
|
149
|
-
|
|
150
|
-
```bash
|
|
151
|
-
# Only list read operations from an OpenAPI spec
|
|
152
|
-
skill-creator --spec ./openapi.json --methods GET --list
|
|
153
|
-
|
|
154
|
-
# Include/exclude by command name
|
|
155
|
-
skill-creator --graphql https://beta.pokeapi.co/graphql/v1beta \
|
|
156
|
-
--include 'pokemon-v2-pokemon*' \
|
|
157
|
-
--exclude '*aggregate' \
|
|
158
|
-
--list
|
|
91
|
+
--agent pi \
|
|
92
|
+
--scope project
|
|
93
|
+
|
|
94
|
+
npx @asnd/skill-creator generate \
|
|
95
|
+
--template mcp-http \
|
|
96
|
+
--name context7 \
|
|
97
|
+
--mcp https://mcp.example.com/mcp \
|
|
98
|
+
--agent pi \
|
|
99
|
+
--scope project
|
|
159
100
|
```
|
|
160
101
|
|
|
161
|
-
##
|
|
102
|
+
## Why use it?
|
|
162
103
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
pnpm build
|
|
169
|
-
```
|
|
104
|
+
- One command turns API sources into reusable agent skills.
|
|
105
|
+
- Specs and schemas are saved as references, so future runs are reproducible.
|
|
106
|
+
- Wrapper scripts expose discoverable commands with `--list`, `--search`, and `--help`.
|
|
107
|
+
- Secrets stay in environment variables or files, not in generated docs.
|
|
108
|
+
- Future agents get focused instructions, gotchas, and safe usage patterns instead of a giant pasted spec.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { CommandDef } from '../core/types.js';
|
|
2
|
+
export type DynamicModeGlobals = {
|
|
3
|
+
include?: string[];
|
|
4
|
+
exclude?: string[];
|
|
5
|
+
methods?: string[];
|
|
6
|
+
list: boolean;
|
|
7
|
+
search?: string;
|
|
8
|
+
pretty: boolean;
|
|
9
|
+
raw: boolean;
|
|
10
|
+
head?: number;
|
|
11
|
+
};
|
|
12
|
+
export type PreparedCommandArgs = {
|
|
13
|
+
argv: string[];
|
|
14
|
+
initialValues?: Record<string, unknown>;
|
|
15
|
+
};
|
|
16
|
+
export type RunDynamicModeOptions = {
|
|
17
|
+
globals: DynamicModeGlobals;
|
|
18
|
+
commandArgv: string[];
|
|
19
|
+
loadCommands: () => Promise<CommandDef[]> | CommandDef[];
|
|
20
|
+
renderCommands: (commands: CommandDef[]) => string;
|
|
21
|
+
executeCommand: (command: CommandDef, values: Record<string, unknown>, argv: string[]) => Promise<unknown> | unknown;
|
|
22
|
+
prepareCommandArgs?: (argv: string[]) => Promise<PreparedCommandArgs> | PreparedCommandArgs;
|
|
23
|
+
onEmptyCommand?: (commands: CommandDef[]) => Promise<void> | void;
|
|
24
|
+
};
|
|
25
|
+
export declare function runDynamicMode(options: RunDynamicModeOptions): Promise<void>;
|
|
26
|
+
export declare function parseCommandValues(command: CommandDef, argv: string[], initialValues?: Record<string, unknown>): Record<string, unknown>;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { parseArgs } from 'node:util';
|
|
2
|
+
import { filterCommands } from '../core/filter.js';
|
|
3
|
+
import { formatOutput } from '../core/output.js';
|
|
4
|
+
export async function runDynamicMode(options) {
|
|
5
|
+
let commands = filterCommands(await options.loadCommands(), options.globals);
|
|
6
|
+
if (options.globals.search !== undefined) {
|
|
7
|
+
commands = searchCommands(commands, options.globals.search);
|
|
8
|
+
}
|
|
9
|
+
if (options.globals.list || options.globals.search !== undefined) {
|
|
10
|
+
writeStdout(options.renderCommands(commands));
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (options.commandArgv.length === 0) {
|
|
14
|
+
if (options.onEmptyCommand !== undefined) {
|
|
15
|
+
await options.onEmptyCommand(commands);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
writeStdout(options.renderCommands(commands));
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const commandName = options.commandArgv[0];
|
|
22
|
+
if (commandName === undefined)
|
|
23
|
+
throw new Error('missing subcommand');
|
|
24
|
+
const command = commands.find((candidate) => candidate.name === commandName);
|
|
25
|
+
if (command === undefined)
|
|
26
|
+
throw new Error(`unknown subcommand: ${commandName}`);
|
|
27
|
+
if (options.commandArgv.includes('--help') || options.commandArgv.includes('-h')) {
|
|
28
|
+
writeStdout(renderCommandHelp(command));
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const prepared = await prepareCommandArgs(options, options.commandArgv.slice(1));
|
|
32
|
+
const values = parseCommandValues(command, prepared.argv, prepared.initialValues ?? {});
|
|
33
|
+
const result = await options.executeCommand(command, values, prepared.argv);
|
|
34
|
+
writeFormattedOutput(result, options.globals);
|
|
35
|
+
}
|
|
36
|
+
function searchCommands(commands, search) {
|
|
37
|
+
const pattern = search.toLowerCase();
|
|
38
|
+
return commands.filter((command) => command.name.toLowerCase().includes(pattern) ||
|
|
39
|
+
(command.description ?? '').toLowerCase().includes(pattern));
|
|
40
|
+
}
|
|
41
|
+
async function prepareCommandArgs(options, argv) {
|
|
42
|
+
return options.prepareCommandArgs === undefined
|
|
43
|
+
? { argv }
|
|
44
|
+
: await options.prepareCommandArgs(argv);
|
|
45
|
+
}
|
|
46
|
+
export function parseCommandValues(command, argv, initialValues = {}) {
|
|
47
|
+
const values = { ...initialValues };
|
|
48
|
+
const params = new Map(command.params.map((param) => [param.name, param]));
|
|
49
|
+
validateCommandOptions(command, argv, params);
|
|
50
|
+
const { values: parsedValues } = parseArgs({
|
|
51
|
+
args: normalizeStringOptionValues(argv, stringParamNames(command)),
|
|
52
|
+
options: commandOptionSpec(command),
|
|
53
|
+
strict: true,
|
|
54
|
+
allowPositionals: true,
|
|
55
|
+
});
|
|
56
|
+
for (const param of command.params) {
|
|
57
|
+
const value = parsedValues[param.name];
|
|
58
|
+
if (value !== undefined)
|
|
59
|
+
values[param.name] = value;
|
|
60
|
+
}
|
|
61
|
+
for (const param of command.params) {
|
|
62
|
+
if (param.required &&
|
|
63
|
+
values[param.name] === undefined &&
|
|
64
|
+
values[param.originalName] === undefined &&
|
|
65
|
+
param.location !== 'body') {
|
|
66
|
+
throw new Error(`missing required option --${param.name}`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return values;
|
|
70
|
+
}
|
|
71
|
+
function validateCommandOptions(command, argv, params) {
|
|
72
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
73
|
+
const token = argv[index];
|
|
74
|
+
if (token === undefined || !token.startsWith('--'))
|
|
75
|
+
continue;
|
|
76
|
+
const rawFlag = token.slice(2);
|
|
77
|
+
const flag = rawFlag.includes('=') ? rawFlag.slice(0, rawFlag.indexOf('=')) : rawFlag;
|
|
78
|
+
const param = params.get(flag);
|
|
79
|
+
if (param === undefined)
|
|
80
|
+
throw new Error(`unknown option for ${command.name}: --${flag}`);
|
|
81
|
+
if (param.type !== 'boolean' && !rawFlag.includes('=') && argv[index + 1] === undefined) {
|
|
82
|
+
throw new Error(`missing value for --${flag}`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function commandOptionSpec(command) {
|
|
87
|
+
return Object.fromEntries(command.params.map((param) => [
|
|
88
|
+
param.name,
|
|
89
|
+
{ type: param.type === 'boolean' ? 'boolean' : 'string' },
|
|
90
|
+
]));
|
|
91
|
+
}
|
|
92
|
+
function stringParamNames(command) {
|
|
93
|
+
return new Set(command.params.filter((param) => param.type !== 'boolean').map((param) => param.name));
|
|
94
|
+
}
|
|
95
|
+
function normalizeStringOptionValues(argv, optionNames) {
|
|
96
|
+
const result = [];
|
|
97
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
98
|
+
const token = argv[index];
|
|
99
|
+
const next = argv[index + 1];
|
|
100
|
+
if (token !== undefined &&
|
|
101
|
+
next !== undefined &&
|
|
102
|
+
token.startsWith('--') &&
|
|
103
|
+
!token.includes('=') &&
|
|
104
|
+
optionNames.has(token.slice(2)) &&
|
|
105
|
+
next.startsWith('-')) {
|
|
106
|
+
result.push(`${token}=${next}`);
|
|
107
|
+
index += 1;
|
|
108
|
+
}
|
|
109
|
+
else if (token !== undefined) {
|
|
110
|
+
result.push(token);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return result;
|
|
114
|
+
}
|
|
115
|
+
function renderCommandHelp(command) {
|
|
116
|
+
const lines = [`${command.name}: ${command.description ?? ''}`, '', 'Options:'];
|
|
117
|
+
for (const param of command.params) {
|
|
118
|
+
const required = param.required ? ' (required)' : '';
|
|
119
|
+
lines.push(` --${param.name.padEnd(24)} ${param.description ?? param.originalName}${required}`);
|
|
120
|
+
}
|
|
121
|
+
return `${lines.join('\n')}\n`;
|
|
122
|
+
}
|
|
123
|
+
function writeFormattedOutput(data, globals) {
|
|
124
|
+
const output = formatOutput(data, {
|
|
125
|
+
pretty: globals.pretty,
|
|
126
|
+
raw: globals.raw,
|
|
127
|
+
...(globals.head === undefined ? {} : { head: globals.head }),
|
|
128
|
+
});
|
|
129
|
+
if (output.stderr)
|
|
130
|
+
console.error(output.stderr.replace(/\n$/, ''));
|
|
131
|
+
writeStdout(output.stdout);
|
|
132
|
+
}
|
|
133
|
+
function writeStdout(text) {
|
|
134
|
+
console.log(text.replace(/\n$/, ''));
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=dynamic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic.js","sourceRoot":"","sources":["../../src/cli/dynamic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAwB,MAAM,WAAW,CAAC;AAI5D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAgCjD,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,OAA8B;IACjE,IAAI,QAAQ,GAAG,cAAc,CAAC,MAAM,OAAO,CAAC,YAAY,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAE7E,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QACzC,QAAQ,GAAG,cAAc,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9D,CAAC;IAED,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QACjE,WAAW,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC9C,OAAO;IACT,CAAC;IAED,IAAI,OAAO,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACrC,IAAI,OAAO,CAAC,cAAc,KAAK,SAAS,EAAE,CAAC;YACzC,MAAM,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;YACvC,OAAO;QACT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AAO,CAAC,IAAI,EAAE,CAAC;KAC9D,CAAC,CAAC;IACH,IAAI,MAAM,CAAC,MAAM;QAAE,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;IACnE,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC7B,CAAC;AAED,SAAS,WAAW,CAAC,IAAY;IAC/B,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;AACvC,CAAC"}
|
package/dist/cli/main.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
declare function run(argv?: string[]): Promise<number>;
|
|
3
|
-
declare function isCliEntrypoint(metaUrl: string, argv1?: string | undefined): boolean;
|
|
4
|
-
|
|
5
|
-
export { isCliEntrypoint, run };
|
|
2
|
+
export declare function run(argv?: string[]): Promise<number>;
|
|
3
|
+
export declare function isCliEntrypoint(metaUrl: string, argv1?: string | undefined): boolean;
|