@wairon/cli 5.0.2-dev.7 → 5.0.2-dev.8
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/cli/index.js +195 -29
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +191 -26
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -393,7 +393,7 @@ var init_template = __esm({
|
|
|
393
393
|
});
|
|
394
394
|
|
|
395
395
|
// src/models/specs.ts
|
|
396
|
-
var import_zod6, SpecIdSchema, SpecStatusSchema, BoundaryItemSchema, RequirementItemSchema, DatabaseSpecSchema, DiagramConfigSchema, SURFACE_AUDIENCES, SurfaceAudienceSchema, SystemPublicInterfaceSchema, SystemSpecSchema, PublicInterfaceTypeSchema, PublicInterfaceSchema, TrustedLinkSchema, LintAllowSchema, LintConfigSchema, ExtDataSchema, LifecycleEntrypointSchema, SubsystemSpecSchema, ComponentTypeSchema, PATTERN_TYPES, PortalTypeSchema, DispatchBindingSchema, DurabilitySchema, PatternRefSchema, EventBindingSchema, ExternalLinkTypeSchema, ExternalLinkSchema, ComponentSpecSchema, HttpMethodSchema, TransportSchema, EndpointSchema, SEMANTIC_GUARANTEES, GuaranteeSchema, MethodParamSchema, MethodSignatureSchema, InterfaceSpecSchema, NarrativeStepTypeSchema, LoopKindSchema, SwitchCaseSchema, CatchClauseSchema, ParallelBranchSchema, NarrativeStepSchema, NarrativeDetailSchema, ConformanceTierSchema, MethodImplementationSchema, ImplementationSpecSchema, TypeKindSchema, TypeFieldSchema, TypeMethodSchema, InvariantSchema, TypeSpecSchema, SurfaceOriginSchema, SurfaceTypeDefSchema, SurfaceContractEntrySchema, SurfaceSnapshotSchema, GroupSpecSchema;
|
|
396
|
+
var import_zod6, SpecIdSchema, SpecStatusSchema, BoundaryItemSchema, RequirementItemSchema, DatabaseSpecSchema, DiagramConfigSchema, SURFACE_AUDIENCES, SurfaceAudienceSchema, SystemPublicInterfaceSchema, SystemSpecSchema, PublicInterfaceTypeSchema, PublicInterfaceSchema, TrustedLinkSchema, LintAllowSchema, LintConfigSchema, ExtDataSchema, LifecycleEntrypointSchema, SubsystemSpecSchema, ComponentTypeSchema, PATTERN_TYPES, PortalTypeSchema, DispatchBindingSchema, DurabilitySchema, PatternRefSchema, EventBindingSchema, ExternalLinkTypeSchema, ExternalLinkSchema, PortalAuthSchemeSchema, PortalAuthSchema, ComponentSpecSchema, HttpMethodSchema, TransportSchema, EndpointSchema, SEMANTIC_GUARANTEES, GuaranteeSchema, MethodParamSchema, MethodSignatureSchema, InterfaceSpecSchema, NarrativeStepTypeSchema, LoopKindSchema, SwitchCaseSchema, CatchClauseSchema, ParallelBranchSchema, NarrativeStepSchema, NarrativeDetailSchema, ConformanceTierSchema, MethodImplementationSchema, ImplementationSpecSchema, TypeKindSchema, TypeFieldSchema, TypeMethodSchema, InvariantSchema, TypeSpecSchema, SurfaceOriginSchema, SurfaceTypeDefSchema, SurfaceContractEntrySchema, SurfaceSnapshotSchema, NamedOpenApiSpecSchema, GroupSpecSchema;
|
|
397
397
|
var init_specs = __esm({
|
|
398
398
|
"src/models/specs.ts"() {
|
|
399
399
|
"use strict";
|
|
@@ -604,6 +604,21 @@ var init_specs = __esm({
|
|
|
604
604
|
type: ExternalLinkTypeSchema.default("informative"),
|
|
605
605
|
label: import_zod6.z.string().optional()
|
|
606
606
|
});
|
|
607
|
+
PortalAuthSchemeSchema = import_zod6.z.enum(["none", "apiKey", "bearer", "basic", "oauth2", "openIdConnect", "custom"]);
|
|
608
|
+
PortalAuthSchema = import_zod6.z.object({
|
|
609
|
+
scheme: PortalAuthSchemeSchema,
|
|
610
|
+
in: import_zod6.z.enum(["header", "query", "cookie"]).optional(),
|
|
611
|
+
name: import_zod6.z.string().optional(),
|
|
612
|
+
bearerFormat: import_zod6.z.string().optional(),
|
|
613
|
+
authorizationUrl: import_zod6.z.string().optional(),
|
|
614
|
+
tokenUrl: import_zod6.z.string().optional(),
|
|
615
|
+
refreshUrl: import_zod6.z.string().optional(),
|
|
616
|
+
scopes: import_zod6.z.array(import_zod6.z.object({ name: import_zod6.z.string(), description: import_zod6.z.string() })).optional(),
|
|
617
|
+
flow: import_zod6.z.enum(["authorizationCode", "clientCredentials", "implicit", "password"]).optional(),
|
|
618
|
+
openIdConnectUrl: import_zod6.z.string().optional(),
|
|
619
|
+
description: import_zod6.z.string().optional(),
|
|
620
|
+
example: import_zod6.z.string().optional()
|
|
621
|
+
});
|
|
607
622
|
ComponentSpecSchema = import_zod6.z.object({
|
|
608
623
|
id: SpecIdSchema,
|
|
609
624
|
name: import_zod6.z.string(),
|
|
@@ -617,6 +632,10 @@ var init_specs = __esm({
|
|
|
617
632
|
dependsOn: import_zod6.z.array(import_zod6.z.string()).default([]),
|
|
618
633
|
portalType: PortalTypeSchema.optional(),
|
|
619
634
|
basePath: import_zod6.z.string().optional(),
|
|
635
|
+
/** Portal-only: the API's authentication scheme (see PortalAuthSchema) — projected
|
|
636
|
+
* into the generated OpenAPI's securitySchemes/security. Portals with different auth
|
|
637
|
+
* must be separate components (one auth per portal ⇒ one OpenAPI spec per portal). */
|
|
638
|
+
auth: PortalAuthSchema.optional(),
|
|
620
639
|
/** Portal-only: capability → component.method dispatch table (see DispatchBindingSchema). */
|
|
621
640
|
dispatch: import_zod6.z.array(DispatchBindingSchema).optional(),
|
|
622
641
|
/** Store-only: whether held state survives restart (see DurabilitySchema). */
|
|
@@ -982,7 +1001,12 @@ var init_specs = __esm({
|
|
|
982
1001
|
dispatch: import_zod6.z.array(DispatchBindingSchema).optional(),
|
|
983
1002
|
details: import_zod6.z.string().default(""),
|
|
984
1003
|
version: import_zod6.z.string().optional(),
|
|
985
|
-
stability: import_zod6.z.string().optional()
|
|
1004
|
+
stability: import_zod6.z.string().optional(),
|
|
1005
|
+
/** Projected copy of the backing Portal's auth (see PortalAuthSchema) — the codec
|
|
1006
|
+
* emits it as OpenAPI securitySchemes/security. */
|
|
1007
|
+
auth: PortalAuthSchema.optional(),
|
|
1008
|
+
/** The backing Portal's basePath — becomes the per-portal OpenAPI `servers` url. */
|
|
1009
|
+
basePath: import_zod6.z.string().optional()
|
|
986
1010
|
});
|
|
987
1011
|
SurfaceSnapshotSchema = import_zod6.z.object({
|
|
988
1012
|
/** Producing project/system name — the snapshot's resolution identity. */
|
|
@@ -997,6 +1021,11 @@ var init_specs = __esm({
|
|
|
997
1021
|
/** Transitive type closure of every exported signature — self-contained. */
|
|
998
1022
|
types: import_zod6.z.array(SurfaceTypeDefSchema).default([])
|
|
999
1023
|
});
|
|
1024
|
+
NamedOpenApiSpecSchema = import_zod6.z.object({
|
|
1025
|
+
portalId: import_zod6.z.string(),
|
|
1026
|
+
name: import_zod6.z.string(),
|
|
1027
|
+
document: import_zod6.z.string()
|
|
1028
|
+
});
|
|
1000
1029
|
GroupSpecSchema = import_zod6.z.object({
|
|
1001
1030
|
kind: import_zod6.z.literal("group"),
|
|
1002
1031
|
id: SpecIdSchema,
|
|
@@ -5461,7 +5490,7 @@ var MODEL = __MODEL_JSON__;
|
|
|
5461
5490
|
+ (scopeFocus ? staticChip('current view') : '')
|
|
5462
5491
|
+ chip(c.subsystem, 'subsystem', c.subsystem)
|
|
5463
5492
|
+ (scopeFocus ? '' : openViewButton('component', c.id, c.owns.length > 0))
|
|
5464
|
-
+ openApiButton(componentExposesApi(c), c.
|
|
5493
|
+
+ openApiButton(componentExposesApi(c), c.id)
|
|
5465
5494
|
+ openSpecButton('component', c.id);
|
|
5466
5495
|
|
|
5467
5496
|
var linkedTypes = MODEL.types.filter(function (t) { return t.componentClass === c.id; });
|
|
@@ -6269,11 +6298,63 @@ function operationFor(method, closureIds) {
|
|
|
6269
6298
|
}
|
|
6270
6299
|
return op;
|
|
6271
6300
|
}
|
|
6272
|
-
function
|
|
6273
|
-
|
|
6274
|
-
const
|
|
6301
|
+
function securitySchemeObject(auth) {
|
|
6302
|
+
if (auth.scheme === "none") return null;
|
|
6303
|
+
const desc = auth.description ? { description: auth.description } : {};
|
|
6304
|
+
switch (auth.scheme) {
|
|
6305
|
+
case "apiKey":
|
|
6306
|
+
return { type: "apiKey", in: auth.in ?? "header", name: auth.name ?? "X-API-Key", ...desc };
|
|
6307
|
+
case "bearer":
|
|
6308
|
+
return { type: "http", scheme: "bearer", ...auth.bearerFormat ? { bearerFormat: auth.bearerFormat } : {}, ...desc };
|
|
6309
|
+
case "basic":
|
|
6310
|
+
return { type: "http", scheme: "basic", ...desc };
|
|
6311
|
+
case "oauth2": {
|
|
6312
|
+
const flow = { scopes: Object.fromEntries((auth.scopes ?? []).map((s) => [s.name, s.description])) };
|
|
6313
|
+
if (auth.authorizationUrl) flow.authorizationUrl = auth.authorizationUrl;
|
|
6314
|
+
if (auth.tokenUrl) flow.tokenUrl = auth.tokenUrl;
|
|
6315
|
+
if (auth.refreshUrl) flow.refreshUrl = auth.refreshUrl;
|
|
6316
|
+
return { type: "oauth2", flows: { [auth.flow ?? "authorizationCode"]: flow }, ...desc };
|
|
6317
|
+
}
|
|
6318
|
+
case "openIdConnect":
|
|
6319
|
+
return { type: "openIdConnect", openIdConnectUrl: auth.openIdConnectUrl ?? "", ...desc };
|
|
6320
|
+
case "custom":
|
|
6321
|
+
return { type: "apiKey", in: auth.in ?? "header", name: auth.name ?? "Authorization", description: auth.description ?? auth.example ?? "Custom authentication scheme." };
|
|
6322
|
+
default:
|
|
6323
|
+
return null;
|
|
6324
|
+
}
|
|
6325
|
+
}
|
|
6326
|
+
function schemeBaseName(scheme) {
|
|
6327
|
+
return { apiKey: "ApiKeyAuth", bearer: "BearerAuth", basic: "BasicAuth", oauth2: "OAuth2", openIdConnect: "OpenIdConnect", custom: "CustomAuth" }[scheme] ?? "Auth";
|
|
6328
|
+
}
|
|
6329
|
+
function buildSecurity(entries) {
|
|
6330
|
+
const schemes = {};
|
|
6331
|
+
const nameByContent = /* @__PURE__ */ new Map();
|
|
6332
|
+
const securityByEntry = /* @__PURE__ */ new Map();
|
|
6333
|
+
for (const entry of entries) {
|
|
6334
|
+
if (!entry.auth) continue;
|
|
6335
|
+
const obj = securitySchemeObject(entry.auth);
|
|
6336
|
+
if (!obj) continue;
|
|
6337
|
+
const content = JSON.stringify(obj);
|
|
6338
|
+
let name = nameByContent.get(content);
|
|
6339
|
+
if (!name) {
|
|
6340
|
+
name = schemeBaseName(entry.auth.scheme);
|
|
6341
|
+
for (let n = 2; schemes[name]; n++) name = schemeBaseName(entry.auth.scheme) + n;
|
|
6342
|
+
schemes[name] = obj;
|
|
6343
|
+
nameByContent.set(content, name);
|
|
6344
|
+
}
|
|
6345
|
+
const scopeNames = entry.auth.scheme === "oauth2" ? (entry.auth.scopes ?? []).map((s) => s.name) : [];
|
|
6346
|
+
securityByEntry.set(entry.id, { [name]: scopeNames });
|
|
6347
|
+
}
|
|
6348
|
+
return { schemes, securityByEntry };
|
|
6349
|
+
}
|
|
6350
|
+
function httpEntriesOf(snapshot) {
|
|
6351
|
+
return snapshot.interfaces.filter((e) => e.type === "REST" || e.methods.some((m) => m.endpoint?.transport === "HTTP"));
|
|
6352
|
+
}
|
|
6353
|
+
function renderDoc(snapshot, entries, closureIds, opts = {}) {
|
|
6354
|
+
const { schemes, securityByEntry } = buildSecurity(entries);
|
|
6275
6355
|
const paths = {};
|
|
6276
|
-
for (const entry of
|
|
6356
|
+
for (const entry of entries) {
|
|
6357
|
+
const security = securityByEntry.get(entry.id);
|
|
6277
6358
|
for (const method of entry.methods) {
|
|
6278
6359
|
const endpoint = method.endpoint;
|
|
6279
6360
|
if (!endpoint || endpoint.transport !== "HTTP") continue;
|
|
@@ -6281,7 +6362,8 @@ function toOpenApi(snapshot) {
|
|
|
6281
6362
|
paths[p] = paths[p] ?? {};
|
|
6282
6363
|
paths[p][endpoint.method.toLowerCase()] = {
|
|
6283
6364
|
tags: [entry.id],
|
|
6284
|
-
...operationFor(method, closureIds)
|
|
6365
|
+
...operationFor(method, closureIds),
|
|
6366
|
+
...security ? { security: [security] } : {}
|
|
6285
6367
|
};
|
|
6286
6368
|
}
|
|
6287
6369
|
}
|
|
@@ -6294,19 +6376,45 @@ function toOpenApi(snapshot) {
|
|
|
6294
6376
|
required: t.fields.filter((f) => !f.optional).map((f) => f.name)
|
|
6295
6377
|
};
|
|
6296
6378
|
}
|
|
6297
|
-
const
|
|
6379
|
+
const components = {};
|
|
6380
|
+
if (Object.keys(schemas).length) components.schemas = schemas;
|
|
6381
|
+
if (Object.keys(schemes).length) components.securitySchemes = schemes;
|
|
6382
|
+
const basePaths = [...new Set(entries.map((e) => e.basePath).filter((b) => !!b))];
|
|
6383
|
+
const servers = opts.servers && basePaths.length === 1 ? [{ url: basePaths[0] }] : void 0;
|
|
6384
|
+
return {
|
|
6298
6385
|
openapi: "3.1.0",
|
|
6299
6386
|
info: {
|
|
6300
|
-
title: snapshot.projectName,
|
|
6387
|
+
title: opts.title ?? snapshot.projectName,
|
|
6301
6388
|
version: snapshot.version ?? "0.0.0",
|
|
6302
6389
|
...snapshot.stateId ? { "x-wairon-state-id": snapshot.stateId } : {},
|
|
6303
6390
|
"x-wairon-origin": snapshot.origin,
|
|
6304
6391
|
"x-wairon-generated-at": snapshot.generatedAt
|
|
6305
6392
|
},
|
|
6393
|
+
...servers ? { servers } : {},
|
|
6306
6394
|
paths,
|
|
6307
|
-
...Object.keys(
|
|
6395
|
+
...Object.keys(components).length ? { components } : {}
|
|
6308
6396
|
};
|
|
6309
|
-
|
|
6397
|
+
}
|
|
6398
|
+
function toOpenApi(snapshot) {
|
|
6399
|
+
const closureIds = new Set(snapshot.types.map((t) => t.id));
|
|
6400
|
+
return JSON.stringify(renderDoc(snapshot, httpEntriesOf(snapshot), closureIds), null, 2);
|
|
6401
|
+
}
|
|
6402
|
+
function toOpenApiSet(snapshot) {
|
|
6403
|
+
const closureIds = new Set(snapshot.types.map((t) => t.id));
|
|
6404
|
+
const byPortal = /* @__PURE__ */ new Map();
|
|
6405
|
+
const order = [];
|
|
6406
|
+
for (const entry of httpEntriesOf(snapshot)) {
|
|
6407
|
+
if (!byPortal.has(entry.component)) {
|
|
6408
|
+
byPortal.set(entry.component, []);
|
|
6409
|
+
order.push(entry.component);
|
|
6410
|
+
}
|
|
6411
|
+
byPortal.get(entry.component).push(entry);
|
|
6412
|
+
}
|
|
6413
|
+
return order.map((portalId) => {
|
|
6414
|
+
const entries = byPortal.get(portalId);
|
|
6415
|
+
const name = entries[0]?.name ?? portalId;
|
|
6416
|
+
return { portalId, name, document: JSON.stringify(renderDoc(snapshot, entries, closureIds, { title: name, servers: true }), null, 2) };
|
|
6417
|
+
});
|
|
6310
6418
|
}
|
|
6311
6419
|
function isOpenApiDocument(body) {
|
|
6312
6420
|
try {
|
|
@@ -6328,6 +6436,39 @@ function typeRefFromSchema(schema) {
|
|
|
6328
6436
|
if (typeof t === "string" && t !== "object") return t;
|
|
6329
6437
|
return "json";
|
|
6330
6438
|
}
|
|
6439
|
+
function authFromSecurityScheme(scheme) {
|
|
6440
|
+
const desc = typeof scheme.description === "string" ? { description: scheme.description } : {};
|
|
6441
|
+
if (scheme.type === "apiKey") {
|
|
6442
|
+
return {
|
|
6443
|
+
scheme: "apiKey",
|
|
6444
|
+
...scheme.in === "header" || scheme.in === "query" || scheme.in === "cookie" ? { in: scheme.in } : {},
|
|
6445
|
+
...typeof scheme.name === "string" ? { name: scheme.name } : {},
|
|
6446
|
+
...desc
|
|
6447
|
+
};
|
|
6448
|
+
}
|
|
6449
|
+
if (scheme.type === "http") {
|
|
6450
|
+
if (scheme.scheme === "bearer") return { scheme: "bearer", ...typeof scheme.bearerFormat === "string" ? { bearerFormat: scheme.bearerFormat } : {}, ...desc };
|
|
6451
|
+
if (scheme.scheme === "basic") return { scheme: "basic", ...desc };
|
|
6452
|
+
}
|
|
6453
|
+
if (scheme.type === "oauth2") {
|
|
6454
|
+
const flows = scheme.flows ?? {};
|
|
6455
|
+
const flowKey = Object.keys(flows)[0];
|
|
6456
|
+
const f = flows[flowKey] ?? {};
|
|
6457
|
+
return {
|
|
6458
|
+
scheme: "oauth2",
|
|
6459
|
+
...flowKey === "authorizationCode" || flowKey === "clientCredentials" || flowKey === "implicit" || flowKey === "password" ? { flow: flowKey } : {},
|
|
6460
|
+
...typeof f.authorizationUrl === "string" ? { authorizationUrl: f.authorizationUrl } : {},
|
|
6461
|
+
...typeof f.tokenUrl === "string" ? { tokenUrl: f.tokenUrl } : {},
|
|
6462
|
+
...typeof f.refreshUrl === "string" ? { refreshUrl: f.refreshUrl } : {},
|
|
6463
|
+
scopes: Object.entries(f.scopes ?? {}).map(([name, description]) => ({ name, description })),
|
|
6464
|
+
...desc
|
|
6465
|
+
};
|
|
6466
|
+
}
|
|
6467
|
+
if (scheme.type === "openIdConnect") {
|
|
6468
|
+
return { scheme: "openIdConnect", openIdConnectUrl: typeof scheme.openIdConnectUrl === "string" ? scheme.openIdConnectUrl : "", ...desc };
|
|
6469
|
+
}
|
|
6470
|
+
return void 0;
|
|
6471
|
+
}
|
|
6331
6472
|
function fromOpenApi(document, projectName) {
|
|
6332
6473
|
let parsed;
|
|
6333
6474
|
try {
|
|
@@ -6405,6 +6546,9 @@ function fromOpenApi(document, projectName) {
|
|
|
6405
6546
|
}))
|
|
6406
6547
|
});
|
|
6407
6548
|
}
|
|
6549
|
+
const securitySchemes = parsed.components?.securitySchemes ?? {};
|
|
6550
|
+
const firstScheme = Object.values(securitySchemes)[0];
|
|
6551
|
+
const importedAuth = firstScheme ? authFromSecurityScheme(firstScheme) : void 0;
|
|
6408
6552
|
const entry = {
|
|
6409
6553
|
id: `${projectName}-api`,
|
|
6410
6554
|
name: typeof info.title === "string" ? info.title : projectName,
|
|
@@ -6413,7 +6557,8 @@ function fromOpenApi(document, projectName) {
|
|
|
6413
6557
|
component: `${projectName}-api`,
|
|
6414
6558
|
methods,
|
|
6415
6559
|
details: typeof info.description === "string" ? info.description : `Imported OpenAPI surface of ${projectName}.`,
|
|
6416
|
-
...typeof info.version === "string" ? { version: info.version } : {}
|
|
6560
|
+
...typeof info.version === "string" ? { version: info.version } : {},
|
|
6561
|
+
...importedAuth ? { auth: importedAuth } : {}
|
|
6417
6562
|
};
|
|
6418
6563
|
return SurfaceSnapshotSchema.parse({
|
|
6419
6564
|
projectName,
|
|
@@ -6528,6 +6673,10 @@ function projectOwnSurface(maxAudience) {
|
|
|
6528
6673
|
component: comp.id,
|
|
6529
6674
|
methods,
|
|
6530
6675
|
...comp.dispatch && comp.dispatch.length ? { dispatch: comp.dispatch } : {},
|
|
6676
|
+
// Project the backing Portal's auth + basePath so the codec can emit
|
|
6677
|
+
// OpenAPI security + per-portal servers self-contained from the snapshot.
|
|
6678
|
+
...comp.auth && comp.auth.scheme !== "none" ? { auth: comp.auth } : {},
|
|
6679
|
+
...comp.basePath ? { basePath: comp.basePath } : {},
|
|
6531
6680
|
details: raw.details ?? "",
|
|
6532
6681
|
...raw.version ? { version: raw.version } : {},
|
|
6533
6682
|
...raw.stability ? { stability: raw.stability } : {}
|
|
@@ -6577,20 +6726,28 @@ function removeSnapshot(projectName, rootDir = getProjectRoot()) {
|
|
|
6577
6726
|
function loadSurfaceSnapshots() {
|
|
6578
6727
|
return listSnapshots();
|
|
6579
6728
|
}
|
|
6729
|
+
function renderOpenApiForms(snapshot) {
|
|
6730
|
+
const renderedSet = toOpenApiSet(snapshot);
|
|
6731
|
+
return { renderedSet, ...renderedSet.length === 1 ? { rendered: renderedSet[0].document } : {} };
|
|
6732
|
+
}
|
|
6733
|
+
function writeSurfaceFile(outPath, body, snapshot) {
|
|
6734
|
+
const resolved = path5.resolve(outPath);
|
|
6735
|
+
fs4.mkdirSync(path5.dirname(resolved), { recursive: true });
|
|
6736
|
+
if (body !== void 0) fs4.writeFileSync(resolved, body);
|
|
6737
|
+
else writeYamlFile(resolved, snapshot);
|
|
6738
|
+
return resolved;
|
|
6739
|
+
}
|
|
6580
6740
|
function exportSurface(maxAudience, format, outPath) {
|
|
6581
6741
|
const snapshot = projectOwnSurface(maxAudience);
|
|
6582
|
-
const
|
|
6583
|
-
|
|
6584
|
-
|
|
6585
|
-
|
|
6586
|
-
|
|
6587
|
-
|
|
6588
|
-
}
|
|
6589
|
-
|
|
6590
|
-
|
|
6591
|
-
writtenTo = path5.resolve(outPath);
|
|
6592
|
-
}
|
|
6593
|
-
return { snapshot, ...rendered !== void 0 ? { rendered } : {}, ...writtenTo ? { writtenTo } : {} };
|
|
6742
|
+
const openapi = format === "openapi" ? renderOpenApiForms(snapshot) : void 0;
|
|
6743
|
+
const body = openapi?.rendered ?? openapi?.renderedSet[0]?.document;
|
|
6744
|
+
const writtenTo = outPath ? writeSurfaceFile(outPath, body, snapshot) : void 0;
|
|
6745
|
+
return {
|
|
6746
|
+
snapshot,
|
|
6747
|
+
...openapi?.rendered !== void 0 ? { rendered: openapi.rendered } : {},
|
|
6748
|
+
...openapi ? { renderedSet: openapi.renderedSet } : {},
|
|
6749
|
+
...writtenTo ? { writtenTo } : {}
|
|
6750
|
+
};
|
|
6594
6751
|
}
|
|
6595
6752
|
function importSurface(sourcePath, origin) {
|
|
6596
6753
|
const resolved = path5.resolve(sourcePath);
|
|
@@ -15146,6 +15303,7 @@ __export(src_exports, {
|
|
|
15146
15303
|
MethodImplementationSchema: () => MethodImplementationSchema,
|
|
15147
15304
|
MethodParamSchema: () => MethodParamSchema,
|
|
15148
15305
|
MethodSignatureSchema: () => MethodSignatureSchema,
|
|
15306
|
+
NamedOpenApiSpecSchema: () => NamedOpenApiSpecSchema,
|
|
15149
15307
|
NamingRuleConfigSchema: () => NamingRuleConfigSchema,
|
|
15150
15308
|
NarrativeDetailSchema: () => NarrativeDetailSchema,
|
|
15151
15309
|
NarrativeStepSchema: () => NarrativeStepSchema,
|
|
@@ -15159,6 +15317,8 @@ __export(src_exports, {
|
|
|
15159
15317
|
PathsConfigSchema: () => PathsConfigSchema,
|
|
15160
15318
|
PatternDefSchema: () => PatternDefSchema,
|
|
15161
15319
|
PatternRefSchema: () => PatternRefSchema,
|
|
15320
|
+
PortalAuthSchema: () => PortalAuthSchema,
|
|
15321
|
+
PortalAuthSchemeSchema: () => PortalAuthSchemeSchema,
|
|
15162
15322
|
PortalTypeSchema: () => PortalTypeSchema,
|
|
15163
15323
|
ProfileDefSchema: () => ProfileDefSchema,
|
|
15164
15324
|
ProjectConfigSchema: () => ProjectConfigSchema,
|
|
@@ -15378,6 +15538,7 @@ __export(src_exports, {
|
|
|
15378
15538
|
syncContextFiles: () => syncContextFiles,
|
|
15379
15539
|
toMarkdown: () => toMarkdown,
|
|
15380
15540
|
toOpenApi: () => toOpenApi,
|
|
15541
|
+
toOpenApiSet: () => toOpenApiSet,
|
|
15381
15542
|
updateSpec: () => updateSpec,
|
|
15382
15543
|
validateAsComplete: () => validateAsComplete,
|
|
15383
15544
|
validateProjectConfig: () => validateProjectConfig,
|
|
@@ -15413,7 +15574,7 @@ function defaultTargetConfig(type) {
|
|
|
15413
15574
|
enabled: true
|
|
15414
15575
|
};
|
|
15415
15576
|
}
|
|
15416
|
-
var WAIRON_VERSION = "5.0.2-dev.
|
|
15577
|
+
var WAIRON_VERSION = "5.0.2-dev.8";
|
|
15417
15578
|
var GITHUB_REPO = "SYW-Apps/Waffle-AIron";
|
|
15418
15579
|
var ARCHITECT_AGENT_ID = "agent-architect";
|
|
15419
15580
|
var ARCHITECT_TEMPLATE_ID = "architect";
|
|
@@ -16729,6 +16890,7 @@ init_yaml();
|
|
|
16729
16890
|
MethodImplementationSchema,
|
|
16730
16891
|
MethodParamSchema,
|
|
16731
16892
|
MethodSignatureSchema,
|
|
16893
|
+
NamedOpenApiSpecSchema,
|
|
16732
16894
|
NamingRuleConfigSchema,
|
|
16733
16895
|
NarrativeDetailSchema,
|
|
16734
16896
|
NarrativeStepSchema,
|
|
@@ -16742,6 +16904,8 @@ init_yaml();
|
|
|
16742
16904
|
PathsConfigSchema,
|
|
16743
16905
|
PatternDefSchema,
|
|
16744
16906
|
PatternRefSchema,
|
|
16907
|
+
PortalAuthSchema,
|
|
16908
|
+
PortalAuthSchemeSchema,
|
|
16745
16909
|
PortalTypeSchema,
|
|
16746
16910
|
ProfileDefSchema,
|
|
16747
16911
|
ProjectConfigSchema,
|
|
@@ -16961,6 +17125,7 @@ init_yaml();
|
|
|
16961
17125
|
syncContextFiles,
|
|
16962
17126
|
toMarkdown,
|
|
16963
17127
|
toOpenApi,
|
|
17128
|
+
toOpenApiSet,
|
|
16964
17129
|
updateSpec,
|
|
16965
17130
|
validateAsComplete,
|
|
16966
17131
|
validateProjectConfig,
|