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 CHANGED
@@ -7,6 +7,7 @@ const swaggerTypescriptApi = require("swagger-typescript-api");
7
7
  const text = require("yummies/text");
8
8
  const tsMorph = require("ts-morph");
9
9
  var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;
10
+ const fs = {};
10
11
  const LINTERS_IGNORE = `/* eslint-disable */
11
12
  /* tslint:disable */`;
12
13
  const buildGenerics = (contract) => {
@@ -1586,7 +1587,7 @@ const generateApi = async (params) => {
1586
1587
  ...swaggerTypescriptApiCodegenBaseParams,
1587
1588
  ...inputToCodegenInput(params.mixinInput),
1588
1589
  hooks: {
1589
- onInit: (configuration, codegenProcess2) => {
1590
+ onInit: (configuration, _codegenProcess) => {
1590
1591
  mixinSwaggerSchema = lodashEs.cloneDeep(configuration.swaggerSchema);
1591
1592
  },
1592
1593
  onPrepareConfig: prepareConfig,
@@ -1633,8 +1634,9 @@ const generateApi = async (params) => {
1633
1634
  }
1634
1635
  }
1635
1636
  const codegenFs = codegenProcess.fileSystem;
1636
- codegenFs.cleanDir(paths.outputDir);
1637
- codegenFs.createDir(paths.outputDir);
1637
+ await Promise.resolve(codegenFs.cleanDir(paths.outputDir));
1638
+ await fs.mkdir(paths.outputDir, { recursive: true });
1639
+ await Promise.resolve(codegenFs.createDir(paths.outputDir));
1638
1640
  const filterTypes = unpackFilterOption(
1639
1641
  params.filterTypes,
1640
1642
  (modelType) => modelType.name
@@ -1669,7 +1671,12 @@ const generateApi = async (params) => {
1669
1671
  if (params.groupBy == null) {
1670
1672
  collectedExportFilesFromIndexFile.push("endpoints");
1671
1673
  if (outputType === "one-endpoint-per-file") {
1672
- codegenFs.createDir(path.resolve(params.output, "endpoints"));
1674
+ await fs.mkdir(path.resolve(paths.outputDir, "endpoints"), {
1675
+ recursive: true
1676
+ });
1677
+ await Promise.resolve(
1678
+ codegenFs.createDir(path.resolve(params.output, "endpoints"))
1679
+ );
1673
1680
  const fileNamesWithRequestInfo = [];
1674
1681
  for await (const route of allRoutes) {
1675
1682
  const {