mobx-tanstack-query-api 0.39.0 → 0.40.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/cli.cjs +11 -4
- package/cli.cjs.map +1 -1
- package/cli.d.ts +1 -0
- package/cli.js +11 -4
- package/cli.js.map +1 -1
- package/package.json +2 -2
package/cli.d.ts
CHANGED
package/cli.js
CHANGED
|
@@ -4,6 +4,7 @@ import { cloneDeep } from "lodash-es";
|
|
|
4
4
|
import { generateApi as generateApi$1 } from "swagger-typescript-api";
|
|
5
5
|
import { splitTextByLines } from "yummies/text";
|
|
6
6
|
import { Project, SyntaxKind, Node } from "ts-morph";
|
|
7
|
+
const fs = {};
|
|
7
8
|
const LINTERS_IGNORE = `/* eslint-disable */
|
|
8
9
|
/* tslint:disable */`;
|
|
9
10
|
const buildGenerics = (contract) => {
|
|
@@ -1583,7 +1584,7 @@ const generateApi = async (params) => {
|
|
|
1583
1584
|
...swaggerTypescriptApiCodegenBaseParams,
|
|
1584
1585
|
...inputToCodegenInput(params.mixinInput),
|
|
1585
1586
|
hooks: {
|
|
1586
|
-
onInit: (configuration,
|
|
1587
|
+
onInit: (configuration, _codegenProcess) => {
|
|
1587
1588
|
mixinSwaggerSchema = cloneDeep(configuration.swaggerSchema);
|
|
1588
1589
|
},
|
|
1589
1590
|
onPrepareConfig: prepareConfig,
|
|
@@ -1630,8 +1631,9 @@ const generateApi = async (params) => {
|
|
|
1630
1631
|
}
|
|
1631
1632
|
}
|
|
1632
1633
|
const codegenFs = codegenProcess.fileSystem;
|
|
1633
|
-
codegenFs.cleanDir(paths.outputDir);
|
|
1634
|
-
|
|
1634
|
+
await Promise.resolve(codegenFs.cleanDir(paths.outputDir));
|
|
1635
|
+
await fs.mkdir(paths.outputDir, { recursive: true });
|
|
1636
|
+
await Promise.resolve(codegenFs.createDir(paths.outputDir));
|
|
1635
1637
|
const filterTypes = unpackFilterOption(
|
|
1636
1638
|
params.filterTypes,
|
|
1637
1639
|
(modelType) => modelType.name
|
|
@@ -1666,7 +1668,12 @@ const generateApi = async (params) => {
|
|
|
1666
1668
|
if (params.groupBy == null) {
|
|
1667
1669
|
collectedExportFilesFromIndexFile.push("endpoints");
|
|
1668
1670
|
if (outputType === "one-endpoint-per-file") {
|
|
1669
|
-
|
|
1671
|
+
await fs.mkdir(path.resolve(paths.outputDir, "endpoints"), {
|
|
1672
|
+
recursive: true
|
|
1673
|
+
});
|
|
1674
|
+
await Promise.resolve(
|
|
1675
|
+
codegenFs.createDir(path.resolve(params.output, "endpoints"))
|
|
1676
|
+
);
|
|
1670
1677
|
const fileNamesWithRequestInfo = [];
|
|
1671
1678
|
for await (const route of allRoutes) {
|
|
1672
1679
|
const {
|