@povio/openapi-codegen-cli 3.1.0-rc.3 → 3.1.0-rc.4

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/vite.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./generateCodeFromOpenAPIDoc-C-n0Knj8.mjs";
2
2
  import "./generate.runner-BXTc97I0.mjs";
3
3
  import { t as createOpenApiCodegenRunner } from "./openapi-codegen.runner-QGd35-a3.mjs";
4
- import { i as normalizeWatchFolders, r as isTinyOpenApiFakeMode, t as createTinyOpenApiSourceRunner } from "./openapi-source.runner-D19XnvMe.mjs";
4
+ import { i as normalizeWatchFolders, r as isTinyOpenApiFakeMode, t as createTinyOpenApiSourceRunner } from "./openapi-source.runner-wLs5vqw6.mjs";
5
5
  import path from "path";
6
6
 
7
7
  //#region src/vite/openapi-codegen.plugin.ts
@@ -54,6 +54,8 @@ function tinyOpenApiCodegenPlugin(codegenConfig, options) {
54
54
  cwd: options.cwd,
55
55
  env: options.env,
56
56
  generateOpenApiFile: options.generateOpenApiFile,
57
+ generateOpenApiSpec: options.generateOpenApiSpec,
58
+ generateOpenApiSpecModule: options.generateOpenApiSpecModule,
57
59
  input: codegenConfig.input,
58
60
  root
59
61
  });
package/package.json CHANGED
@@ -138,5 +138,5 @@
138
138
  "pnpm": ">= 9"
139
139
  },
140
140
  "packageManager": "pnpm@10.4.0",
141
- "version": "3.1.0-rc.3"
141
+ "version": "3.1.0-rc.4"
142
142
  }
@@ -1,39 +0,0 @@
1
- import path from "path";
2
-
3
- //#region src/tiny/openapi-source.runner.ts
4
- function createTinyOpenApiSourceRunner(config) {
5
- let queue = Promise.resolve();
6
- const getOutputPath = () => getLocalInputPath(config.input, config.root);
7
- const runGenerate = async () => {
8
- const outputPath = getOutputPath();
9
- if (!outputPath) return;
10
- await config.generateOpenApiFile({
11
- argv: ["--output", outputPath],
12
- cwd: config.cwd ?? config.root,
13
- defaultOutput: outputPath,
14
- env: config.env ?? process.env
15
- });
16
- };
17
- const enqueueGenerate = () => {
18
- const run = queue.catch(() => void 0).then(runGenerate);
19
- queue = run.then(() => void 0, () => void 0);
20
- return run;
21
- };
22
- return {
23
- enqueueGenerate,
24
- getOutputPath
25
- };
26
- }
27
- function isTinyOpenApiFakeMode(apiMode = process.env.VITE_PUBLIC_API_MODE ?? process.env.EXPO_PUBLIC_API_MODE) {
28
- return apiMode !== "real";
29
- }
30
- function getLocalInputPath(input, root) {
31
- if (typeof input !== "string" || /^https?:\/\//i.test(input)) return;
32
- return path.resolve(root, input);
33
- }
34
- function normalizeWatchFolders(root, watchFolders = []) {
35
- return watchFolders.map((folder) => path.isAbsolute(folder) ? folder : path.resolve(root, folder));
36
- }
37
-
38
- //#endregion
39
- export { normalizeWatchFolders as i, getLocalInputPath as n, isTinyOpenApiFakeMode as r, createTinyOpenApiSourceRunner as t };