@sdk-it/cli 0.14.5 → 0.16.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/dist/index.js +76 -23
- package/dist/index.js.map +4 -4
- package/dist/lib/cli.d.ts.map +1 -1
- package/dist/lib/generate.d.ts.map +1 -1
- package/dist/lib/langs/dart.d.ts +4 -0
- package/dist/lib/langs/dart.d.ts.map +1 -0
- package/dist/lib/langs/typescript.d.ts +4 -0
- package/dist/lib/langs/typescript.d.ts.map +1 -0
- package/dist/lib/loader.d.ts +5 -0
- package/dist/lib/loader.d.ts.map +1 -0
- package/dist/lib/options.d.ts +4 -0
- package/dist/lib/options.d.ts.map +1 -0
- package/package.json +5 -3
package/dist/index.js
CHANGED
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// packages/cli/src/lib/cli.ts
|
|
4
|
-
import { Command as
|
|
4
|
+
import { Command as Command3, program } from "commander";
|
|
5
5
|
|
|
6
|
-
// packages/cli/src/lib/
|
|
7
|
-
import { Command
|
|
8
|
-
import { execFile } from "node:child_process";
|
|
6
|
+
// packages/cli/src/lib/langs/dart.ts
|
|
7
|
+
import { Command } from "commander";
|
|
8
|
+
import { execFile, execSync } from "node:child_process";
|
|
9
|
+
import { generate } from "@sdk-it/dart";
|
|
10
|
+
|
|
11
|
+
// packages/cli/src/lib/loader.ts
|
|
9
12
|
import { readFile } from "node:fs/promises";
|
|
10
13
|
import { extname } from "node:path";
|
|
11
14
|
import { parse } from "yaml";
|
|
12
|
-
import { generate } from "@sdk-it/typescript";
|
|
13
|
-
var specOption = new Option(
|
|
14
|
-
"-s, --spec <spec>",
|
|
15
|
-
"Path to OpenAPI specification file"
|
|
16
|
-
);
|
|
17
|
-
var outputOption = new Option(
|
|
18
|
-
"-o, --output <output>",
|
|
19
|
-
"Output directory for the generated SDK"
|
|
20
|
-
);
|
|
21
15
|
async function loadRemote(location) {
|
|
22
16
|
const extName = extname(location);
|
|
23
17
|
const response = await fetch(location);
|
|
@@ -40,14 +34,13 @@ async function loadRemote(location) {
|
|
|
40
34
|
}
|
|
41
35
|
async function loadLocal(location) {
|
|
42
36
|
const extName = extname(location);
|
|
37
|
+
const text = await await readFile(location, "utf-8");
|
|
43
38
|
switch (extName) {
|
|
44
39
|
case ".json":
|
|
45
|
-
return
|
|
40
|
+
return JSON.parse(text);
|
|
46
41
|
case ".yaml":
|
|
47
|
-
case ".yml":
|
|
48
|
-
const text = await await readFile(location, "utf-8");
|
|
42
|
+
case ".yml":
|
|
49
43
|
return parse(text);
|
|
50
|
-
}
|
|
51
44
|
default:
|
|
52
45
|
throw new Error(`Unsupported file extension: ${extName}`);
|
|
53
46
|
}
|
|
@@ -59,7 +52,46 @@ function loadSpec(location) {
|
|
|
59
52
|
}
|
|
60
53
|
return loadLocal(location);
|
|
61
54
|
}
|
|
62
|
-
|
|
55
|
+
|
|
56
|
+
// packages/cli/src/lib/options.ts
|
|
57
|
+
import { Option } from "commander";
|
|
58
|
+
var specOption = new Option(
|
|
59
|
+
"-s, --spec <spec>",
|
|
60
|
+
"Path to OpenAPI specification file"
|
|
61
|
+
);
|
|
62
|
+
var outputOption = new Option(
|
|
63
|
+
"-o, --output <output>",
|
|
64
|
+
"Output directory for the generated SDK"
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
// packages/cli/src/lib/langs/dart.ts
|
|
68
|
+
var dart_default = new Command("dart").description("Generate Dart SDK").addOption(specOption.makeOptionMandatory(true)).addOption(outputOption.makeOptionMandatory(true)).option("-l, --language <language>", "Programming language for the SDK").option("-n, --name <name>", "Name of the generated client", "Client").option("-v, --verbose", "Verbose output", false).action(async (options) => {
|
|
69
|
+
const spec = await loadSpec(options.spec);
|
|
70
|
+
await generate(spec, {
|
|
71
|
+
output: options.output,
|
|
72
|
+
mode: options.mode || "minimal",
|
|
73
|
+
name: options.name,
|
|
74
|
+
formatCode: ({ output }) => {
|
|
75
|
+
if (options.formatter) {
|
|
76
|
+
const [command, ...args] = options.formatter.split(" ");
|
|
77
|
+
execFile(command, args, {
|
|
78
|
+
env: { ...process.env, SDK_IT_OUTPUT: output }
|
|
79
|
+
});
|
|
80
|
+
} else {
|
|
81
|
+
execSync("dart format $SDK_IT_OUTPUT ", {
|
|
82
|
+
env: { ...process.env, SDK_IT_OUTPUT: output },
|
|
83
|
+
stdio: options.verbose ? "inherit" : "pipe"
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
// packages/cli/src/lib/langs/typescript.ts
|
|
91
|
+
import { Command as Command2 } from "commander";
|
|
92
|
+
import { execFile as execFile2, execSync as execSync2 } from "node:child_process";
|
|
93
|
+
import { generate as generate2 } from "@sdk-it/typescript";
|
|
94
|
+
var typescript_default = new Command2("typescript").alias("ts").description("Generate TypeScript SDK").addOption(specOption.makeOptionMandatory(true)).addOption(outputOption.makeOptionMandatory(true)).option(
|
|
63
95
|
"--useTsExtension [value]",
|
|
64
96
|
"Use .ts extension for generated files",
|
|
65
97
|
(value) => value === "false" ? false : true,
|
|
@@ -70,9 +102,13 @@ var generate_default = new Command("generate").description(`Generate SDK out of
|
|
|
70
102
|
).option("-n, --name <name>", "Name of the generated client", "Client").option(
|
|
71
103
|
"-f, --framework <framework>",
|
|
72
104
|
"Framework that is integrating with the SDK"
|
|
73
|
-
).option("--formatter <formatter>", "Formatter to use for the generated code").
|
|
105
|
+
).option("--formatter <formatter>", "Formatter to use for the generated code").option(
|
|
106
|
+
"--install",
|
|
107
|
+
"Install dependencies using npm (only in full mode)",
|
|
108
|
+
true
|
|
109
|
+
).option("--no-default-formatter", "Do not use the default formatter").option("--no-install", "Do not install dependencies").option("-v, --verbose", "Verbose output", false).action(async (options) => {
|
|
74
110
|
const spec = await loadSpec(options.spec);
|
|
75
|
-
await
|
|
111
|
+
await generate2(spec, {
|
|
76
112
|
output: options.output,
|
|
77
113
|
mode: options.mode || "minimal",
|
|
78
114
|
name: options.name,
|
|
@@ -80,15 +116,32 @@ var generate_default = new Command("generate").description(`Generate SDK out of
|
|
|
80
116
|
formatCode: ({ env, output }) => {
|
|
81
117
|
if (options.formatter) {
|
|
82
118
|
const [command, ...args] = options.formatter.split(" ");
|
|
83
|
-
|
|
119
|
+
execFile2(command, args, { env: { ...env, SDK_IT_OUTPUT: output } });
|
|
120
|
+
} else if (options.defaultFormatter) {
|
|
121
|
+
execSync2("npx -y prettier $SDK_IT_OUTPUT --write", {
|
|
122
|
+
env: {
|
|
123
|
+
...env,
|
|
124
|
+
SDK_IT_OUTPUT: output,
|
|
125
|
+
NODE_OPTIONS: "--experimental-strip-types"
|
|
126
|
+
},
|
|
127
|
+
stdio: options.verbose ? "inherit" : "pipe"
|
|
128
|
+
});
|
|
84
129
|
}
|
|
85
130
|
}
|
|
86
131
|
});
|
|
132
|
+
if (options.install && options.mode === "full") {
|
|
133
|
+
console.log("Installing dependencies...");
|
|
134
|
+
execSync2("npm install", {
|
|
135
|
+
cwd: options.output,
|
|
136
|
+
stdio: options.verbose ? "inherit" : "pipe"
|
|
137
|
+
});
|
|
138
|
+
}
|
|
87
139
|
});
|
|
88
140
|
|
|
89
141
|
// packages/cli/src/lib/cli.ts
|
|
90
|
-
var
|
|
91
|
-
|
|
142
|
+
var generate3 = new Command3("generate").addCommand(typescript_default).addCommand(dart_default);
|
|
143
|
+
var cli = program.description(`CLI tool to interact with SDK-IT.`).addCommand(generate3, { isDefault: true }).addCommand(
|
|
144
|
+
new Command3("_internal").action(() => {
|
|
92
145
|
}),
|
|
93
146
|
{ hidden: true }
|
|
94
147
|
).parse(process.argv);
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/lib/cli.ts", "../src/lib/
|
|
4
|
-
"sourcesContent": ["#!/usr/bin/env node\nimport { Command, program } from 'commander';\n\nimport
|
|
5
|
-
"mappings": ";;;AACA,SAAS,WAAAA,UAAS,eAAe;;;ACDjC,SAAS,SAAS,
|
|
6
|
-
"names": ["Command", "Command"]
|
|
3
|
+
"sources": ["../src/lib/cli.ts", "../src/lib/langs/dart.ts", "../src/lib/loader.ts", "../src/lib/options.ts", "../src/lib/langs/typescript.ts"],
|
|
4
|
+
"sourcesContent": ["#!/usr/bin/env node\nimport { Command, program } from 'commander';\n\nimport dart from './langs/dart.ts';\nimport typescript from './langs/typescript.ts';\n\nconst generate = new Command('generate')\n .addCommand(typescript)\n .addCommand(dart);\nconst cli = program\n .description(`CLI tool to interact with SDK-IT.`)\n .addCommand(generate, { isDefault: true })\n .addCommand(\n new Command('_internal').action(() => {\n // do nothing\n }),\n { hidden: true },\n )\n .parse(process.argv);\n\nexport default cli;\n", "import { Command } from 'commander';\nimport { execFile, execSync } from 'node:child_process';\n\nimport { generate } from '@sdk-it/dart';\n\nimport { loadSpec } from '../loader.ts';\nimport { outputOption, specOption } from '../options.ts';\n\ninterface Options {\n spec: string;\n output: string;\n language: string;\n mode?: 'full' | 'minimal';\n name?: string;\n useTsExtension: boolean;\n /**\n * Command to run the formatter.\n * @example 'biome check $SDK_IT_OUTPUT --write'\n * @example 'prettier $SDK_IT_OUTPUT --write'\n */\n formatter?: string;\n verbose: boolean;\n}\n\nexport default new Command('dart')\n .description('Generate Dart SDK')\n .addOption(specOption.makeOptionMandatory(true))\n .addOption(outputOption.makeOptionMandatory(true))\n .option('-l, --language <language>', 'Programming language for the SDK')\n // .option(\n // '-m, --mode <mode>',\n // 'full: generate a full project including package.json and tsconfig.json. useful for monorepo/workspaces minimal: generate only the client sdk',\n // )\n .option('-n, --name <name>', 'Name of the generated client', 'Client')\n .option('-v, --verbose', 'Verbose output', false)\n // .option('--formatter <formatter>', 'Formatter to use for the generated code')\n .action(async (options: Options) => {\n const spec = await loadSpec(options.spec);\n await generate(spec, {\n output: options.output,\n mode: options.mode || 'minimal',\n name: options.name,\n formatCode: ({ output }) => {\n if (options.formatter) {\n const [command, ...args] = options.formatter.split(' ');\n execFile(command, args, {\n env: { ...process.env, SDK_IT_OUTPUT: output },\n });\n } else {\n execSync('dart format $SDK_IT_OUTPUT ', {\n env: { ...process.env, SDK_IT_OUTPUT: output },\n stdio: options.verbose ? 'inherit' : 'pipe',\n });\n // execSync('dart fix --apply $SDK_IT_OUTPUT ', {\n // env: { ...process.env, SDK_IT_OUTPUT: output },\n // stdio: options.verbose ? 'inherit' : 'pipe',\n // });\n }\n },\n });\n });\n", "import { readFile } from 'node:fs/promises';\nimport { extname } from 'node:path';\nimport type { OpenAPIObject } from 'openapi3-ts/oas31';\nimport { parse } from 'yaml';\n\nexport async function loadRemote(location: string) {\n const extName = extname(location);\n const response = await fetch(location);\n switch (extName) {\n case '.json':\n return response.json();\n case '.yaml':\n case '.yml': {\n const text = await response.text();\n return parse(text);\n }\n default:\n try {\n // try to parse it as json first\n return response.json();\n } catch {\n // parse as yaml\n const text = await response.text();\n return parse(text);\n }\n }\n}\nexport async function loadLocal(location: string) {\n const extName = extname(location);\n const text = await await readFile(location, 'utf-8');\n switch (extName) {\n case '.json':\n return JSON.parse(text);\n case '.yaml':\n case '.yml':\n return parse(text);\n default:\n throw new Error(`Unsupported file extension: ${extName}`);\n }\n}\n\nexport function loadSpec(location: string): Promise<OpenAPIObject> {\n const [protocol] = location.split(':');\n if (protocol === 'http' || protocol === 'https') {\n return loadRemote(location);\n }\n return loadLocal(location);\n}\n", "import { Option } from 'commander';\n\nexport const specOption = new Option(\n '-s, --spec <spec>',\n 'Path to OpenAPI specification file',\n);\n\nexport const outputOption = new Option(\n '-o, --output <output>',\n 'Output directory for the generated SDK',\n);\n", "import { Command } from 'commander';\nimport { execFile, execSync } from 'node:child_process';\n\nimport { generate } from '@sdk-it/typescript';\n\nimport { loadSpec } from '../loader.ts';\nimport { outputOption, specOption } from '../options.ts';\n\ninterface Options {\n spec: string;\n output: string;\n language: string;\n mode?: 'full' | 'minimal';\n name?: string;\n useTsExtension: boolean;\n /**\n * Command to run the formatter.\n * @example 'biome check $SDK_IT_OUTPUT --write'\n * @example 'prettier $SDK_IT_OUTPUT --write'\n */\n formatter?: string;\n framework?: string;\n install: boolean;\n verbose: boolean;\n defaultFormatter: boolean;\n}\n\nexport default new Command('typescript')\n .alias('ts')\n .description('Generate TypeScript SDK')\n .addOption(specOption.makeOptionMandatory(true))\n .addOption(outputOption.makeOptionMandatory(true))\n .option(\n '--useTsExtension [value]',\n 'Use .ts extension for generated files',\n (value) => (value === 'false' ? false : true),\n true,\n )\n .option('-l, --language <language>', 'Programming language for the SDK')\n .option(\n '-m, --mode <mode>',\n 'full: generate a full project including package.json and tsconfig.json. useful for monorepo/workspaces minimal: generate only the client sdk',\n )\n .option('-n, --name <name>', 'Name of the generated client', 'Client')\n .option(\n '-f, --framework <framework>',\n 'Framework that is integrating with the SDK',\n )\n .option('--formatter <formatter>', 'Formatter to use for the generated code')\n .option(\n '--install',\n 'Install dependencies using npm (only in full mode)',\n true,\n )\n .option('--no-default-formatter', 'Do not use the default formatter')\n .option('--no-install', 'Do not install dependencies')\n .option('-v, --verbose', 'Verbose output', false)\n .action(async (options: Options) => {\n const spec = await loadSpec(options.spec);\n await generate(spec, {\n output: options.output,\n mode: options.mode || 'minimal',\n name: options.name,\n useTsExtension: options.useTsExtension,\n formatCode: ({ env, output }) => {\n if (options.formatter) {\n const [command, ...args] = options.formatter.split(' ');\n execFile(command, args, { env: { ...env, SDK_IT_OUTPUT: output } });\n } else if (options.defaultFormatter) {\n execSync('npx -y prettier $SDK_IT_OUTPUT --write', {\n env: {\n ...env,\n SDK_IT_OUTPUT: output,\n NODE_OPTIONS: '--experimental-strip-types',\n },\n stdio: options.verbose ? 'inherit' : 'pipe',\n });\n }\n },\n });\n\n // Install dependencies if in full mode and install option is enabled\n\n if (options.install && options.mode === 'full') {\n console.log('Installing dependencies...');\n execSync('npm install', {\n cwd: options.output,\n stdio: options.verbose ? 'inherit' : 'pipe',\n });\n }\n });\n"],
|
|
5
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WAAWD,WAAU,EAAE,WAAW,KAAK,CAAC,EACxC;AAAA,EACC,IAAIC,SAAQ,WAAW,EAAE,OAAO,MAAM;AAAA,EAEtC,CAAC;AAAA,EACD,EAAE,QAAQ,KAAK;AACjB,EACC,MAAM,QAAQ,IAAI;",
|
|
6
|
+
"names": ["Command", "Command", "execFile", "execSync", "generate", "Command", "generate", "execFile", "execSync", "generate", "Command"]
|
|
7
7
|
}
|
package/dist/lib/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/lib/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAW,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/lib/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAW,MAAM,WAAW,CAAC;AAQ7C,QAAA,MAAM,GAAG,SASa,CAAC;AAEvB,eAAe,GAAG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/lib/generate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/lib/generate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;;AAIpC,wBAA8D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dart.d.ts","sourceRoot":"","sources":["../../../src/lib/langs/dart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;;AAwBpC,wBAoCK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../../src/lib/langs/typescript.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;;AA2BpC,wBA+DK"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { OpenAPIObject } from 'openapi3-ts/oas31';
|
|
2
|
+
export declare function loadRemote(location: string): Promise<any>;
|
|
3
|
+
export declare function loadLocal(location: string): Promise<any>;
|
|
4
|
+
export declare function loadSpec(location: string): Promise<OpenAPIObject>;
|
|
5
|
+
//# sourceMappingURL=loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/lib/loader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGvD,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,gBAqBhD;AACD,wBAAsB,SAAS,CAAC,QAAQ,EAAE,MAAM,gBAY/C;AAED,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAMjE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/lib/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,eAAO,MAAM,UAAU,QAGtB,CAAC;AAEF,eAAO,MAAM,YAAY,QAGxB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sdk-it/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -20,8 +20,10 @@
|
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"commander": "^13.1.0",
|
|
23
|
-
"@sdk-it/typescript": "0.
|
|
24
|
-
"yaml": "^2.7.0"
|
|
23
|
+
"@sdk-it/typescript": "0.16.0",
|
|
24
|
+
"yaml": "^2.7.0",
|
|
25
|
+
"@sdk-it/dart": "0.16.0",
|
|
26
|
+
"openapi3-ts": "4.4.0"
|
|
25
27
|
},
|
|
26
28
|
"publishConfig": {
|
|
27
29
|
"access": "public"
|