openapi-sync 5.0.6 → 6.0.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.
@@ -0,0 +1,396 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://openapi-sync.com/schema/openapi.sync.schema.json",
4
+ "title": "openapi-sync Configuration",
5
+ "description": "Configuration schema for openapi-sync (openapi.sync.json / openapi.sync.ts / openapi.sync.js). See https://openapi-sync.com for full documentation.",
6
+ "type": "object",
7
+ "required": ["api"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "$schema": {
11
+ "type": "string",
12
+ "description": "JSON Schema reference (for editor autocomplete)"
13
+ },
14
+ "language": {
15
+ "type": "string",
16
+ "enum": ["typescript", "python"],
17
+ "default": "typescript",
18
+ "description": "Output language for generated types"
19
+ },
20
+ "refetchInterval": {
21
+ "type": "number",
22
+ "minimum": 0,
23
+ "description": "Interval in milliseconds to automatically re-fetch and re-sync specs. Omit or set to 0 to disable auto-sync."
24
+ },
25
+ "folder": {
26
+ "type": "string",
27
+ "default": "api",
28
+ "description": "Root output folder for all generated files (relative to project root)"
29
+ },
30
+ "api": {
31
+ "type": "object",
32
+ "description": "Map of API names to their OpenAPI spec URLs or local file paths. At least one entry is required.",
33
+ "minProperties": 1,
34
+ "additionalProperties": {
35
+ "type": "string",
36
+ "description": "URL (https://...) or relative file path to the OpenAPI spec (JSON or YAML)"
37
+ },
38
+ "examples": [
39
+ { "petstore": "https://petstore3.swagger.io/api/v3/openapi.json" },
40
+ { "myapi": "./api/openapi.yaml" }
41
+ ]
42
+ },
43
+ "server": {
44
+ "oneOf": [
45
+ { "type": "number", "minimum": 0 },
46
+ { "type": "string" }
47
+ ],
48
+ "description": "Server index (0-based) or explicit base URL to use from the spec's servers array"
49
+ },
50
+ "folderSplit": {
51
+ "type": "object",
52
+ "description": "Controls how generated files are organized into sub-folders",
53
+ "additionalProperties": false,
54
+ "properties": {
55
+ "byTags": {
56
+ "type": "boolean",
57
+ "description": "When true, creates a sub-folder for each OpenAPI tag and places related types/endpoints/validations inside"
58
+ }
59
+ }
60
+ },
61
+ "customCode": {
62
+ "type": "object",
63
+ "description": "Controls preservation of custom code between regeneration runs",
64
+ "additionalProperties": false,
65
+ "properties": {
66
+ "enabled": {
67
+ "type": "boolean",
68
+ "default": true,
69
+ "description": "Enable custom code preservation markers in generated files"
70
+ },
71
+ "position": {
72
+ "type": "string",
73
+ "enum": ["top", "bottom", "both"],
74
+ "default": "bottom",
75
+ "description": "Where to place the custom code marker block in each generated file"
76
+ },
77
+ "markerText": {
78
+ "type": "string",
79
+ "default": "CUSTOM CODE",
80
+ "description": "Text used in the custom code marker comments"
81
+ },
82
+ "includeInstructions": {
83
+ "type": "boolean",
84
+ "default": true,
85
+ "description": "Include human-readable instructions inside the marker block"
86
+ }
87
+ }
88
+ },
89
+ "validations": {
90
+ "type": "object",
91
+ "description": "Configuration for runtime validation schema generation",
92
+ "additionalProperties": false,
93
+ "properties": {
94
+ "disable": {
95
+ "type": "boolean",
96
+ "default": false,
97
+ "description": "Disable validation schema generation entirely"
98
+ },
99
+ "library": {
100
+ "type": "string",
101
+ "enum": ["zod", "yup", "joi"],
102
+ "description": "Validation library to generate schemas for"
103
+ },
104
+ "generate": {
105
+ "type": "object",
106
+ "additionalProperties": false,
107
+ "properties": {
108
+ "query": {
109
+ "type": "boolean",
110
+ "default": true,
111
+ "description": "Generate validation schemas for query parameters"
112
+ },
113
+ "dto": {
114
+ "type": "boolean",
115
+ "default": true,
116
+ "description": "Generate validation schemas for request bodies (DTOs)"
117
+ }
118
+ }
119
+ },
120
+ "name": {
121
+ "type": "object",
122
+ "description": "Naming configuration for generated validation schemas",
123
+ "additionalProperties": false,
124
+ "properties": {
125
+ "prefix": { "type": "string" },
126
+ "suffix": { "type": "string" },
127
+ "useOperationId": { "type": "boolean" }
128
+ }
129
+ }
130
+ }
131
+ },
132
+ "clientGeneration": {
133
+ "type": "object",
134
+ "description": "Configuration for generating type-safe API clients",
135
+ "additionalProperties": false,
136
+ "properties": {
137
+ "enabled": {
138
+ "type": "boolean",
139
+ "default": false,
140
+ "description": "Enable API client generation"
141
+ },
142
+ "type": {
143
+ "type": "string",
144
+ "enum": ["fetch", "axios", "react-query", "swr", "rtk-query"],
145
+ "description": "Client framework to generate"
146
+ },
147
+ "outputDir": {
148
+ "type": "string",
149
+ "description": "Output directory for generated client files"
150
+ },
151
+ "baseURL": {
152
+ "type": "string",
153
+ "description": "Base URL baked into the generated client (can be overridden at runtime)"
154
+ },
155
+ "tags": {
156
+ "type": "array",
157
+ "items": { "type": "string" },
158
+ "description": "Only generate client methods for endpoints with these tags"
159
+ },
160
+ "endpoints": {
161
+ "type": "array",
162
+ "items": { "type": "string" },
163
+ "description": "Only generate client methods for these specific endpoint names/operationIds"
164
+ },
165
+ "name": {
166
+ "type": "object",
167
+ "additionalProperties": false,
168
+ "properties": {
169
+ "prefix": { "type": "string" },
170
+ "suffix": { "type": "string" },
171
+ "useOperationId": { "type": "boolean" }
172
+ }
173
+ },
174
+ "reactQuery": {
175
+ "type": "object",
176
+ "description": "React Query specific options",
177
+ "additionalProperties": false,
178
+ "properties": {
179
+ "version": {
180
+ "type": "number",
181
+ "enum": [4, 5],
182
+ "default": 5
183
+ },
184
+ "mutations": {
185
+ "type": "boolean",
186
+ "default": true,
187
+ "description": "Generate mutation hooks for POST/PUT/PATCH/DELETE"
188
+ },
189
+ "infiniteQueries": {
190
+ "type": "object",
191
+ "additionalProperties": false,
192
+ "properties": {
193
+ "disable": { "type": "boolean" }
194
+ }
195
+ }
196
+ }
197
+ },
198
+ "swr": {
199
+ "type": "object",
200
+ "description": "SWR specific options",
201
+ "additionalProperties": false,
202
+ "properties": {
203
+ "mutations": {
204
+ "type": "boolean",
205
+ "default": true
206
+ },
207
+ "infiniteQueries": {
208
+ "type": "object",
209
+ "additionalProperties": false,
210
+ "properties": {
211
+ "disable": { "type": "boolean" }
212
+ }
213
+ }
214
+ }
215
+ },
216
+ "rtkQuery": {
217
+ "type": "object",
218
+ "description": "RTK Query specific options",
219
+ "additionalProperties": false,
220
+ "properties": {
221
+ "apiName": { "type": "string" },
222
+ "baseQuery": {
223
+ "type": "string",
224
+ "enum": ["fetchBaseQuery", "axiosBaseQuery"]
225
+ }
226
+ }
227
+ },
228
+ "auth": {
229
+ "type": "object",
230
+ "description": "Authentication configuration for the generated client",
231
+ "additionalProperties": false,
232
+ "properties": {
233
+ "type": {
234
+ "type": "string",
235
+ "enum": ["bearer", "apiKey", "basic", "oauth2"]
236
+ },
237
+ "in": {
238
+ "type": "string",
239
+ "enum": ["header", "query", "cookie"]
240
+ },
241
+ "name": { "type": "string" }
242
+ }
243
+ },
244
+ "errorHandling": {
245
+ "type": "object",
246
+ "additionalProperties": false,
247
+ "properties": {
248
+ "generateErrorClasses": {
249
+ "type": "boolean",
250
+ "default": false,
251
+ "description": "Generate typed ApiError classes in the client"
252
+ },
253
+ "customHandler": { "type": "string" }
254
+ }
255
+ }
256
+ }
257
+ },
258
+ "types": {
259
+ "type": "object",
260
+ "description": "Configuration for TypeScript type generation",
261
+ "additionalProperties": false,
262
+ "properties": {
263
+ "name": {
264
+ "type": "object",
265
+ "additionalProperties": false,
266
+ "properties": {
267
+ "prefix": {
268
+ "type": "string",
269
+ "default": "I",
270
+ "description": "Prefix added to all generated interface names (e.g. 'I' → IPet)"
271
+ },
272
+ "useOperationId": {
273
+ "type": "boolean",
274
+ "default": false,
275
+ "description": "Use the operationId from the spec to name types instead of path+method"
276
+ }
277
+ }
278
+ },
279
+ "doc": {
280
+ "type": "object",
281
+ "additionalProperties": false,
282
+ "properties": {
283
+ "disable": { "type": "boolean" },
284
+ "showCurl": { "type": "boolean" }
285
+ }
286
+ }
287
+ }
288
+ },
289
+ "endpoints": {
290
+ "type": "object",
291
+ "description": "Configuration for endpoint function generation",
292
+ "additionalProperties": false,
293
+ "properties": {
294
+ "value": {
295
+ "type": "object",
296
+ "additionalProperties": false,
297
+ "properties": {
298
+ "includeServer": { "type": "boolean" },
299
+ "type": {
300
+ "type": "string",
301
+ "enum": ["string", "object"]
302
+ },
303
+ "replaceWords": {
304
+ "type": "array",
305
+ "items": {
306
+ "type": "object",
307
+ "required": ["replace", "with"],
308
+ "additionalProperties": false,
309
+ "properties": {
310
+ "replace": { "type": "string" },
311
+ "with": { "type": "string" }
312
+ }
313
+ }
314
+ }
315
+ }
316
+ },
317
+ "name": {
318
+ "type": "object",
319
+ "additionalProperties": false,
320
+ "properties": {
321
+ "prefix": { "type": "string" },
322
+ "useOperationId": { "type": "boolean" }
323
+ }
324
+ },
325
+ "doc": {
326
+ "type": "object",
327
+ "additionalProperties": false,
328
+ "properties": {
329
+ "disable": { "type": "boolean" },
330
+ "showCurl": {
331
+ "type": "boolean",
332
+ "description": "Include a cURL example in the generated JSDoc for each endpoint"
333
+ }
334
+ }
335
+ },
336
+ "exclude": {
337
+ "type": "object",
338
+ "description": "Endpoints matching these criteria will be excluded from generation",
339
+ "additionalProperties": false,
340
+ "properties": {
341
+ "tags": {
342
+ "type": "array",
343
+ "items": { "type": "string" },
344
+ "description": "Exclude all endpoints with any of these tags (e.g. [\"deprecated\", \"internal\"])"
345
+ },
346
+ "endpoints": {
347
+ "type": "array",
348
+ "items": {
349
+ "type": "object",
350
+ "additionalProperties": false,
351
+ "properties": {
352
+ "path": { "type": "string" },
353
+ "regex": { "type": "string" },
354
+ "method": { "type": "string" }
355
+ }
356
+ }
357
+ }
358
+ }
359
+ },
360
+ "include": {
361
+ "type": "object",
362
+ "description": "When set, only endpoints matching these criteria will be generated",
363
+ "additionalProperties": false,
364
+ "properties": {
365
+ "tags": {
366
+ "type": "array",
367
+ "items": { "type": "string" }
368
+ },
369
+ "endpoints": {
370
+ "type": "array",
371
+ "items": {
372
+ "type": "object",
373
+ "additionalProperties": false,
374
+ "properties": {
375
+ "path": { "type": "string" },
376
+ "regex": { "type": "string" },
377
+ "method": { "type": "string" }
378
+ }
379
+ }
380
+ }
381
+ }
382
+ }
383
+ }
384
+ }
385
+ },
386
+ "examples": [
387
+ {
388
+ "api": {
389
+ "petstore": "https://petstore3.swagger.io/api/v3/openapi.json"
390
+ },
391
+ "folder": "./src/api",
392
+ "validations": { "library": "zod" },
393
+ "clientGeneration": { "enabled": true, "type": "react-query" }
394
+ }
395
+ ]
396
+ }
package/package.json CHANGED
@@ -1,12 +1,27 @@
1
1
  {
2
2
  "name": "openapi-sync",
3
- "version": "5.0.6",
3
+ "version": "6.0.0",
4
4
  "description": "A powerful developer tool that automates API documentation synchronization with your codebase using OpenAPI specifications. Generates TypeScript types, fully-typed API clients (Fetch, Axios, React Query, SWR, RTK Query), endpoint definitions, runtime validation schemas (Zod, Yup, Joi), and comprehensive documentation with enterprise-grade reliability",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "bin": {
8
- "openapi-sync": "./bin/cli.js"
8
+ "openapi-sync": "./bin/cli.js",
9
+ "openapi-sync-mcp": "./bin/mcp.js"
9
10
  },
11
+ "files": [
12
+ "bin",
13
+ "dist/**/*.js",
14
+ "dist/**/*.mjs",
15
+ "dist/**/*.d.ts",
16
+ "dist/**/*.d.mts",
17
+ "!dist/**/*.map",
18
+ "LICENSE",
19
+ "README.md",
20
+ "package.json",
21
+ "openapi.sync.schema.json",
22
+ "llms.txt",
23
+ "!website/**/*"
24
+ ],
10
25
  "keywords": [
11
26
  "openapi",
12
27
  "rest",
@@ -36,20 +51,21 @@
36
51
  "redux toolkit",
37
52
  "type-safe",
38
53
  "hooks",
39
- "client generation"
40
- ],
41
- "files": [
42
- "bin",
43
- "dist/**/*.js",
44
- "dist/**/*.mjs",
45
- "dist/**/*.d.ts",
46
- "dist/**/*.d.mts",
47
- "!dist/**/*.map",
48
- "LICENSE",
49
- "README.md",
50
- "package.json",
51
- "!website/**/*"
54
+ "client generation",
55
+ "mcp",
56
+ "model-context-protocol",
57
+ "ai-agent",
58
+ "llm"
52
59
  ],
60
+ "exports": {
61
+ ".": {
62
+ "types": "./dist/index.d.ts",
63
+ "import": "./dist/index.mjs",
64
+ "require": "./dist/index.js"
65
+ },
66
+ "./schema": "./openapi.sync.schema.json",
67
+ "./llms": "./llms.txt"
68
+ },
53
69
  "repository": {
54
70
  "type": "git",
55
71
  "url": "https://github.com/akintomiwa-fisayo/openapi-sync"
@@ -67,13 +83,13 @@
67
83
  "author": "P-Technologies",
68
84
  "license": "ISC",
69
85
  "devDependencies": {
70
- "@types/prompts": "^2.4.9",
71
86
  "@types/jest": "^30.0.0",
72
87
  "@types/js-yaml": "^4.0.9",
73
88
  "@types/lodash": "^4.17.7",
74
89
  "@types/lodash.get": "^4.4.9",
75
90
  "@types/lodash.isequal": "^4.5.8",
76
91
  "@types/node": "^22.1.0",
92
+ "@types/prompts": "^2.4.9",
77
93
  "jest": "^30.2.0",
78
94
  "source-map-explorer": "^2.5.3",
79
95
  "ts-jest": "^29.4.4",
@@ -82,6 +98,7 @@
82
98
  },
83
99
  "dependencies": {
84
100
  "@apidevtools/swagger-parser": "^12.0.0",
101
+ "@modelcontextprotocol/sdk": "^1.29.0",
85
102
  "axios": "^1.7.3",
86
103
  "axios-retry": "^4.5.0",
87
104
  "curl-generator": "^0.4.2",
@@ -90,6 +107,10 @@
90
107
  "lodash.get": "^4.4.2",
91
108
  "lodash.isequal": "^4.5.0",
92
109
  "prompts": "^2.4.2",
93
- "yargs": "^17.7.2"
110
+ "yargs": "^17.7.2",
111
+ "zod": "^4.4.3"
112
+ },
113
+ "overrides": {
114
+ "esbuild": "0.28.1"
94
115
  }
95
116
  }
@@ -1 +0,0 @@
1
- var m=Object.defineProperty,n=Object.defineProperties;var o=Object.getOwnPropertyDescriptors;var h=Object.getOwnPropertySymbols;var p=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var i=(b,c,a)=>c in b?m(b,c,{enumerable:true,configurable:true,writable:true,value:a}):b[c]=a,r=(b,c)=>{for(var a in c||(c={}))p.call(c,a)&&i(b,a,c[a]);if(h)for(var a of h(c))q.call(c,a)&&i(b,a,c[a]);return b},s=(b,c)=>n(b,o(c));var t=(b=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(b,{get:(c,a)=>(typeof require!="undefined"?require:c)[a]}):b)(function(b){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+b+'" is not supported')});var u=(b,c,a)=>new Promise((j,g)=>{var k=d=>{try{e(a.next(d));}catch(f){g(f);}},l=d=>{try{e(a.throw(d));}catch(f){g(f);}},e=d=>d.done?j(d.value):Promise.resolve(d.value).then(k,l);e((a=a.apply(b,c)).next());});export{r as a,s as b,t as c,u as d};
@@ -1,12 +0,0 @@
1
- import {d}from'./chunk-PUWCZVB7.mjs';import y from'prompts';import l from'fs';import r from'path';var i=process.env.NODE_ENV==="test"||process.env.JEST_WORKER_ID!==void 0;function v(){return d(this,null,function*(){try{let e=yield y([{type:"select",name:"configFormat",message:"What configuration format would you like to use?",choices:[{title:"TypeScript (openapi.sync.ts)",value:"typescript"},{title:"JSON (openapi.sync.json)",value:"json"},{title:"JavaScript (openapi.sync.js)",value:"javascript"}],initial:0},{type:"select",name:"apiSource",message:"Where is your OpenAPI specification?",choices:[{title:"URL (e.g., https://api.example.com/openapi.json)",value:"url"},{title:"Local file",value:"file"}],initial:0},{type:t=>t==="url"?"text":null,name:"apiUrl",message:"Enter the OpenAPI specification URL:",validate:t=>t.startsWith("http://")||t.startsWith("https://")?!0:"Please enter a valid URL starting with http:// or https://"},{type:(t,a)=>a.apiSource==="file"?"text":null,name:"apiFile",message:"Enter the path to your OpenAPI file:",validate:t=>t.trim()!==""?!0:"Please enter a valid file path"},{type:"text",name:"apiName",message:"What would you like to name this API?",initial:"myapi",validate:t=>/^[a-zA-Z0-9_-]+$/.test(t)?!0:"API name must contain only letters, numbers, hyphens, and underscores"},{type:"text",name:"outputFolder",message:"Where should generated files be saved?",initial:"./src/api",validate:t=>{if(!t||t.trim()==="")return "Output folder cannot be empty";let a=r.normalize(t);if(a==="/"||a==="C:\\"||a==="\\")return "Cannot use filesystem root directory. Please use a project subfolder like './src/api'";if(r.isAbsolute(t)){let g=process.cwd();if(!t.startsWith(g))return "\u26A0\uFE0F Warning: Using absolute path outside project directory. Recommended: use relative path like './src/api'"}return !0}},{type:"confirm",name:"enableFolderSplit",message:"Organize generated code into folders by OpenAPI tags?",initial:!1},{type:"confirm",name:"generateClient",message:"Generate API client code?",initial:!0},{type:t=>t?"select":null,name:"clientType",message:"Which client type would you like?",choices:[{title:"React Query (Recommended for React)",value:"react-query"},{title:"RTK Query (Redux Toolkit)",value:"rtk-query"},{title:"SWR",value:"swr"},{title:"Fetch API",value:"fetch"},{title:"Axios",value:"axios"}],initial:0},{type:"confirm",name:"enableValidation",message:"Enable runtime validation schemas?",initial:!0},{type:t=>t?"select":null,name:"validationLibrary",message:"Which validation library?",choices:[{title:"Zod (Recommended)",value:"zod"},{title:"Yup",value:"yup"},{title:"Joi",value:"joi"}],initial:0},{type:"confirm",name:"enableCustomCode",message:"Enable custom code preservation?",initial:!0},{type:"confirm",name:"typesUseOperationId",message:"Use operationId from OpenAPI spec for type names?",initial:!0},{type:"text",name:"typesPrefix",message:"Prefix for TypeScript interface names (leave empty for none):",initial:"I"},{type:"confirm",name:"excludeEndpointsByTags",message:"Exclude endpoints by tags (e.g., deprecated, internal)?",initial:!1},{type:t=>t?"text":null,name:"excludeTags",message:"Enter tags to exclude (comma-separated):",initial:"deprecated,internal"},{type:"confirm",name:"showCurlInDocs",message:"Include cURL examples in generated documentation?",initial:!0},{type:"number",name:"refetchInterval",message:"Refetch interval in milliseconds (0 to disable auto-refresh):",initial:5e3,min:0},{type:"confirm",name:"runSync",message:"Run initial sync after setup?",initial:!0}],{onCancel:()=>{throw i||process.exit(0),new Error("Setup cancelled")}}),n={refetchInterval:e.refetchInterval||void 0,folder:e.outputFolder,api:{[e.apiName]:e.apiUrl||e.apiFile}};e.enableFolderSplit&&(n.folderSplit={byTags:!0}),n.types={name:{prefix:e.typesPrefix||"",useOperationId:e.typesUseOperationId}},n.endpoints={name:{useOperationId:e.typesUseOperationId},doc:{showCurl:e.showCurlInDocs}},e.excludeEndpointsByTags&&e.excludeTags&&(n.endpoints.exclude={tags:e.excludeTags.split(",").map(t=>t.trim())}),e.generateClient&&e.clientType&&(n.clientGeneration={enabled:!0,type:e.clientType,outputDir:r.join(e.outputFolder,e.apiName,"client")},e.clientType==="react-query"?n.clientGeneration.reactQuery={version:5,mutations:!0}:e.clientType==="swr"&&(n.clientGeneration.swr={mutations:!0})),e.enableValidation&&e.validationLibrary&&(n.validations={library:e.validationLibrary}),e.enableCustomCode&&(n.customCode={enabled:!0,position:"bottom"});let s,o;e.configFormat==="json"?(o="openapi.sync.json",s=JSON.stringify(n,null,2)):e.configFormat==="typescript"?(o="openapi.sync.ts",s=`import { IConfig } from "openapi-sync";
2
-
3
- const config: IConfig = ${JSON.stringify(n,null,2)};
4
-
5
- export default config;
6
- `):(o="openapi.sync.js",s=`module.exports = ${JSON.stringify(n,null,2)};
7
- `);let p=r.join(process.cwd(),o);if(l.existsSync(p)&&!(yield y({type:"confirm",name:"value",message:`${o} already exists. Overwrite?`,initial:!1})).value)throw i||process.exit(0),new Error("Configuration file not created");l.writeFileSync(p,s,"utf-8"),i||`${o}`;let u=r.isAbsolute(e.outputFolder)?e.outputFolder:r.join(process.cwd(),e.outputFolder);if(!l.existsSync(u))try{l.mkdirSync(u,{recursive:!0}),i||`${e.outputFolder}`;}catch(t){i||`${t.message}`;}let c=r.join(process.cwd(),".gitignore");if(l.existsSync(c)&&(l.readFileSync(c,"utf-8").includes(e.outputFolder)||l.appendFileSync(c,`
8
- # OpenAPI Sync generated files
9
- ${e.outputFolder}
10
- `)),i||(`${o}`,e.generateClient&&e.clientType&&(e.clientType==="axios"||e.clientType==="react-query"||e.clientType==="swr"||e.clientType),e.enableValidation&&e.validationLibrary&&(e.generateClient,`${e.validationLibrary}`)),e.runSync&&!i)try{let{Init:t,GenerateClient:a}=yield import('./index.mjs');yield t({refetchInterval:e.refetchInterval}),e.generateClient&&e.clientType&&(yield a({type:e.clientType,apiName:e.apiName}));}catch(t){console.error(`
11
- \u274C Error during sync:`,t.message),t.stack&&process.env.DEBUG&&console.error(t.stack);}else i||(e.generateClient||e.enableValidation,e.generateClient&&e.clientType&&(e.generateClient||e.enableValidation,`${e.clientType}`));i||(`${e.outputFolder}${e.apiName}`,e.generateClient&&`${e.outputFolder}${e.apiName}`,e.generateClient&&e.clientType&&`${e.clientType}`);}catch(e){throw i||(console.error(`
12
- \u274C Error during setup:`,e.message),process.exit(1)),e}})}export{v as interactiveInit};