api-core-lib 12.0.46 → 12.0.47
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/cli.cjs +4 -21
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -128,29 +128,12 @@ async function runGenerator(options) {
|
|
|
128
128
|
console.log(import_chalk.default.green(`\u2713 OpenAPI spec saved temporarily to ${tempSpecPath}`));
|
|
129
129
|
console.log("\n" + import_chalk.default.blue("Step 3: Generating organized TypeScript types..."));
|
|
130
130
|
const typesOutputPath = import_path.default.join(options.output, "types");
|
|
131
|
-
ignoreFilePath = import_path.default.join(process.cwd(), `.openapi-generator-ignore-${Date.now()}`);
|
|
132
|
-
const ignoreContent = `# Main generator metadata
|
|
133
|
-
.openapi-generator/
|
|
134
|
-
# Documentation files
|
|
135
|
-
docs/
|
|
136
|
-
# Git helper files
|
|
137
|
-
.gitignore
|
|
138
|
-
git_push.sh
|
|
139
|
-
# NPM helper files
|
|
140
|
-
.npmignore
|
|
141
|
-
README.md`;
|
|
142
|
-
import_fs.default.writeFileSync(ignoreFilePath, ignoreContent);
|
|
143
|
-
console.log(import_chalk.default.gray("\u2713 Created temporary .openapi-generator-ignore file."));
|
|
144
131
|
const generatorCommand = [
|
|
145
|
-
"npx --yes
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
`-o "${typesOutputPath}"`,
|
|
149
|
-
`--ignore-file-override "${ignoreFilePath}"`,
|
|
150
|
-
"--global-property models,apis=false,supportingFiles=false",
|
|
151
|
-
`--additional-properties=supportsES6=true,useSingleRequestParameter=true,withInterfaces=true,modelPropertyNaming=original`
|
|
132
|
+
"npx --yes openapi-typescript",
|
|
133
|
+
`"${tempSpecPath}"`,
|
|
134
|
+
`--output "${import_path.default.join(typesOutputPath, "schema.d.ts")}"`
|
|
152
135
|
].join(" ");
|
|
153
|
-
console.log(import_chalk.default.gray(`Executing command: npx
|
|
136
|
+
console.log(import_chalk.default.gray(`Executing command: npx openapi-typescript...`));
|
|
154
137
|
(0, import_child_process.execSync)(generatorCommand, { stdio: "inherit" });
|
|
155
138
|
console.log(import_chalk.default.green(`\u2713 Types generated successfully at ${typesOutputPath}`));
|
|
156
139
|
console.log("\n" + import_chalk.default.blue("Step 4: Generating custom API modules..."));
|