@zuplo/cli 1.30.0 → 1.32.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.
@@ -1,5 +1,6 @@
1
1
  import fg from "fast-glob";
2
- import { existsSync } from "node:fs";
2
+ import { existsSync, readdirSync } from "node:fs";
3
+ import { join } from "node:path";
3
4
  import { simpleGit } from "simple-git";
4
5
  import { TEST_IN_FOLDER } from "../constants.js";
5
6
  import { CompositeValidator } from "./lib.js";
@@ -108,11 +109,16 @@ export class ZuploProjectValidator {
108
109
  return { ok: true };
109
110
  }
110
111
  else {
111
- return {
112
- ok: false,
113
- error: new NotAZuploProject(),
114
- };
112
+ const files = readdirSync(join(dir, "config"));
113
+ const existingOASFiles = files.filter((file) => file.endsWith(".oas.json")).length >= 1;
114
+ if (existingOASFiles === true) {
115
+ return { ok: true };
116
+ }
115
117
  }
118
+ return {
119
+ ok: false,
120
+ error: new NotAZuploProject(),
121
+ };
116
122
  }
117
123
  catch (err) {
118
124
  return {
@@ -19,7 +19,6 @@ export function convertRoutes(routesConfig) {
19
19
  operation["description"] = route.description;
20
20
  operation["operationId"] = route.operationId;
21
21
  const xZuploRoute = {};
22
- xZuploRoute["version"] = "none";
23
22
  if (route.corsPolicy)
24
23
  xZuploRoute["corsPolicy"] = route.corsPolicy;
25
24
  if (route.custom)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zuplo/cli",
3
- "version": "1.30.0",
3
+ "version": "1.32.0",
4
4
  "type": "module",
5
5
  "repository": "https://github.com/zuplo/cli",
6
6
  "author": "Zuplo, Inc.",