@vaadin/hilla-generator-plugin-backbone 25.3.0-alpha8 → 25.3.0-alpha9
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/EndpointMethodOperationProcessor.d.ts +1 -1
- package/EndpointMethodOperationProcessor.js +1 -1
- package/EndpointMethodOperationProcessor.js.map +1 -1
- package/EndpointMethodRequestBodyProcessor.d.ts +1 -1
- package/EndpointMethodRequestBodyProcessor.js +1 -1
- package/EndpointMethodRequestBodyProcessor.js.map +1 -1
- package/EndpointMethodResponseProcessor.d.ts +1 -1
- package/EndpointMethodResponseProcessor.js.map +1 -1
- package/EndpointProcessor.d.ts +1 -1
- package/EndpointProcessor.js.map +1 -1
- package/EntityProcessor.d.ts +1 -1
- package/EntityProcessor.js +1 -1
- package/EntityProcessor.js.map +1 -1
- package/TypeSchemaProcessor.d.ts +1 -1
- package/TypeSchemaProcessor.js +1 -1
- package/TypeSchemaProcessor.js.map +1 -1
- package/index.js.map +1 -1
- package/package.json +6 -6
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { type Statement } from "@typescript/typescript6";
|
|
1
2
|
import type Plugin from "@vaadin/hilla-generator-core/Plugin.js";
|
|
2
3
|
import type { TransferTypes } from "@vaadin/hilla-generator-core/SharedStorage.js";
|
|
3
4
|
import type DependencyManager from "@vaadin/hilla-generator-utils/dependencies/DependencyManager.js";
|
|
4
5
|
import { OpenAPIV3 } from "openapi-types";
|
|
5
|
-
import { type Statement } from "typescript";
|
|
6
6
|
export type EndpointMethodOperation = OpenAPIV3.OperationObject;
|
|
7
7
|
export default abstract class EndpointMethodOperationProcessor {
|
|
8
8
|
static createProcessor(httpMethod: OpenAPIV3.HttpMethods, endpointName: string, endpointMethodName: string, operation: EndpointMethodOperation, dependencies: DependencyManager, transferTypes: TransferTypes, owner: Plugin): EndpointMethodOperationProcessor | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import ts from "@typescript/typescript6";
|
|
1
2
|
import ClientPlugin from "@vaadin/hilla-generator-plugin-client";
|
|
2
3
|
import equal from "fast-deep-equal";
|
|
3
4
|
import { OpenAPIV3 } from "openapi-types";
|
|
4
|
-
import ts from "typescript";
|
|
5
5
|
import EndpointMethodRequestBodyProcessor from "./EndpointMethodRequestBodyProcessor.js";
|
|
6
6
|
import EndpointMethodResponseProcessor from "./EndpointMethodResponseProcessor.js";
|
|
7
7
|
export default class EndpointMethodOperationProcessor {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":"AACA,OAAO,iCAAsF;AAG7F,OAAO,yDAA0D;AAEjE,OAAO,4BAA6B;AACpC,SAAS,gCAAiC;AAC1C,OAAO,iFAAkF;AACzF,OAAO,2EAA4E;AAInF,eAAe,MAAe,iCAAiC;CAE7D,OAAO,gBACLA,YACAC,cACAC,oBACAC,WACAC,cACAC,eACAC,OAC8C;AAC9C,UAAQ,YAAR;GACE,KAAK,UAAU,YAAY,MAAM;AAE/B,WAAO,IAAI,qCACT,cACA,oBACA,WACA,cACA,eACA;GAEH;GACD;AACE,UAAM,OAAO,MAAM,aAAa,WAAW,aAAa,CAAC,6BAA6B;AACtF,WAAO;EACV;CACF;AAGF;AAED,MAAM,6CAA6C,iCAAiC;CAClF,AAASC;CACT,AAASC;CACT,AAASC;CACT,AAASC;CACT,AAASC;CACT,AAASC;CAGT,YACEX,cACAC,oBACAC,WACAC,cACAC,eACAC,OACA;AACA,SAAO;AACP,OAAKM,SAAS;AACd,OAAKL,gBAAgB;AACrB,OAAKG,gBAAgB;AACrB,OAAKD,sBAAsB;AAC3B,OAAKE,aAAa;AAClB,OAAKH,iBAAiB;CACvB;CAED,MAAM,QAAQK,WAAoD;EAChE,MAAM,EAAE,SAAS,SAAS,OAAO,GAAG,KAAKN;AACzC,OAAKK,OAAO,OAAO,OAAO,EAAE,KAAKF,cAAc,GAAG,KAAKD,oBAAoB,2BAA2B;EAEtG,MAAM,EAAE,WAAW,kBA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oBAAoB,cAAc;CACrD;AACF","names":["httpMethod: OpenAPIV3.HttpMethods","endpointName: string","endpointMethodName: string","operation: EndpointMethodOperation","dependencies: DependencyManager","transferTypes: TransferTypes","owner: Plugin","#dependencies","#transferTypes","#endpointMethodName","#endpointName","#operation","#owner","outputDir?: string","#prepareResponseType"],"sources":["/opt/agent/work/649c11185a3798db/packages/ts/generator-plugin-backbone/src/EndpointMethodOperationProcessor.ts"],"sourcesContent":["/* eslint-disable max-params */\nimport ts, { type Expression, type Statement, type TypeNode } from '@typescript/typescript6';\nimport type Plugin from '@vaadin/hilla-generator-core/Plugin.js';\nimport type { TransferTypes } from '@vaadin/hilla-generator-core/SharedStorage.js';\nimport ClientPlugin from '@vaadin/hilla-generator-plugin-client';\nimport type DependencyManager from '@vaadin/hilla-generator-utils/dependencies/DependencyManager.js';\nimport equal from 'fast-deep-equal';\nimport { OpenAPIV3 } from 'openapi-types';\nimport EndpointMethodRequestBodyProcessor from './EndpointMethodRequestBodyProcessor.js';\nimport EndpointMethodResponseProcessor from './EndpointMethodResponseProcessor.js';\n\nexport type EndpointMethodOperation = OpenAPIV3.OperationObject;\n\nexport default abstract class EndpointMethodOperationProcessor {\n // eslint-disable-next-line @typescript-eslint/max-params\n static createProcessor(\n httpMethod: OpenAPIV3.HttpMethods,\n endpointName: string,\n endpointMethodName: string,\n operation: EndpointMethodOperation,\n dependencies: DependencyManager,\n transferTypes: TransferTypes,\n owner: Plugin,\n ): EndpointMethodOperationProcessor | undefined {\n switch (httpMethod) {\n case OpenAPIV3.HttpMethods.POST: {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return new EndpointMethodOperationPOSTProcessor(\n endpointName,\n endpointMethodName,\n operation,\n dependencies,\n transferTypes,\n owner,\n );\n }\n default:\n owner.logger.warn(`Processing ${httpMethod.toUpperCase()} currently is not supported`);\n return undefined;\n }\n }\n\n abstract process(outputDir?: string): Promise<Statement | undefined>;\n}\n\nclass EndpointMethodOperationPOSTProcessor extends EndpointMethodOperationProcessor {\n readonly #dependencies: DependencyManager;\n readonly #transferTypes: TransferTypes;\n readonly #endpointMethodName: string;\n readonly #endpointName: string;\n readonly #operation: EndpointMethodOperation;\n readonly #owner: Plugin;\n\n // eslint-disable-next-line @typescript-eslint/max-params\n constructor(\n endpointName: string,\n endpointMethodName: string,\n operation: EndpointMethodOperation,\n dependencies: DependencyManager,\n transferTypes: TransferTypes,\n owner: Plugin,\n ) {\n super();\n this.#owner = owner;\n this.#dependencies = dependencies;\n this.#endpointName = endpointName;\n this.#endpointMethodName = endpointMethodName;\n this.#operation = operation;\n this.#transferTypes = transferTypes;\n }\n\n async process(outputDir?: string): Promise<Statement | undefined> {\n const { exports, imports, paths } = this.#dependencies;\n this.#owner.logger.debug(`${this.#endpointName}.${this.#endpointMethodName} - processing POST method`);\n\n const { initParam, packedParameters, parameters } = new EndpointMethodRequestBodyProcessor(\n this.#operation.requestBody,\n this.#dependencies,\n this.#transferTypes,\n this.#owner,\n ).process();\n\n const methodIdentifier = exports.named.add(this.#endpointMethodName);\n const clientLibIdentifier = imports.default.getIdentifier(\n paths.createRelativePath(await ClientPlugin.getClientFileName(outputDir)),\n )!;\n\n const callExpression = ts.factory.createCallExpression(\n ts.factory.createPropertyAccessExpression(clientLibIdentifier, ts.factory.createIdentifier('call')),\n undefined,\n [\n ts.factory.createStringLiteral(this.#endpointName),\n ts.factory.createStringLiteral(this.#endpointMethodName),\n packedParameters,\n initParam,\n ].filter(Boolean) as readonly Expression[],\n );\n\n const responseType = this.#prepareResponseType();\n\n return ts.factory.createFunctionDeclaration(\n [ts.factory.createToken(ts.SyntaxKind.AsyncKeyword)],\n undefined,\n methodIdentifier,\n undefined,\n parameters,\n ts.factory.createTypeReferenceNode('Promise', [responseType]),\n ts.factory.createBlock([ts.factory.createReturnStatement(callExpression)]),\n );\n }\n\n #prepareResponseType(): TypeNode {\n this.#owner.logger.debug(`${this.#endpointName}.${this.#endpointMethodName} POST - processing response type`);\n\n const responseTypes = Object.entries(this.#operation.responses)\n .flatMap(([code, response]) =>\n new EndpointMethodResponseProcessor(\n code,\n response,\n this.#dependencies,\n this.#transferTypes,\n this.#owner,\n ).process(),\n )\n .filter((value, index, arr) => arr.findIndex((v) => equal(v, value)) === index);\n\n if (responseTypes.length === 0) {\n return ts.factory.createKeywordTypeNode(ts.SyntaxKind.VoidKeyword);\n }\n\n return ts.factory.createUnionTypeNode(responseTypes);\n }\n}\n"],"version":3}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { type Identifier, type ObjectLiteralExpression, type ParameterDeclaration } from "@typescript/typescript6";
|
|
1
2
|
import type Plugin from "@vaadin/hilla-generator-core/Plugin.js";
|
|
2
3
|
import type { TransferTypes } from "@vaadin/hilla-generator-core/SharedStorage.js";
|
|
3
4
|
import type DependencyManager from "@vaadin/hilla-generator-utils/dependencies/DependencyManager.js";
|
|
4
5
|
import type { OpenAPIV3 } from "openapi-types";
|
|
5
|
-
import { type Identifier, type ObjectLiteralExpression, type ParameterDeclaration } from "typescript";
|
|
6
6
|
export type EndpointMethodRequestBody = OpenAPIV3.RequestBodyObject;
|
|
7
7
|
export type EndpointMethodRequestBodyProcessingResult = Readonly<{
|
|
8
8
|
parameters: readonly ParameterDeclaration[]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import ts from "@typescript/typescript6";
|
|
1
2
|
import { isEmptyObject, isObjectSchema } from "@vaadin/hilla-generator-core/Schema.js";
|
|
2
|
-
import ts from "typescript";
|
|
3
3
|
import TypeSchemaProcessor from "./TypeSchemaProcessor.js";
|
|
4
4
|
import { defaultMediaType } from "./utils.js";
|
|
5
5
|
const DEFAULT_INIT_PARAM_NAME = "init";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":"AAAA,OAAO,iCAAgH;AAEvH,SACE,eACA,8DAG8C;AAIhD,OAAO,mDAAoD;AAC3D,SAAS,oCAAqC;AAU9C,MAAM,0BAA0B;AAChC,MAAM,iBAAiB;AACv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,GAAG,QAAQ,2BAChB,WACA,WACA,MACA,WACA,GAAG,QAAQ,oBAAoB,MAAM,CACtC;GACF,EAAC,EACF,GAAG,QAAQ,2BACT,WACA,WACA,eACA,GAAG,QAAQ,YAAY,GAAG,WAAW,cAAc,EACnD,GAAG,QAAQ,wBAAwB,mBAAmB,CACvD,AACF;EACF;CACF;CAED,sBACEQ,aACkC;AAClC,OAAK,aAAa;AAChB,UAAO,CAAE;EACV;EAED,MAAM,EAAE,QAAQ,UAAU,GAAG,KAAKP;EAElC,MAAM,iBAAiB,SAAS,QAAQ,YAAY;AAEpD,MAAI,eAAe,eAAe,KAAK,cAAc,eAAe,EAAE;AACpE,UAAO,OAAO,QAAS,eAAwC,WAAW;EAC3E;AAED,SAAO,KAAK,yEAAyE;AACrF,SAAO,CAAE;CACV;AACF","names":["#dependencies","#transferTypes","#owner","#requestBody","requestBody: OpenAPIV3.ReferenceObject | OpenAPIV3.RequestBodyObject | undefined","dependencies: DependencyManager","transferTypes: TransferTypes","owner: Plugin","#extractParameterData","basicSchema?: OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject"],"sources":["/opt/agent/work/649c11185a3798db/packages/ts/generator-plugin-backbone/src/EndpointMethodRequestBodyProcessor.ts"],"sourcesContent":["import ts, { type Identifier, type ObjectLiteralExpression, type ParameterDeclaration } from '@typescript/typescript6';\nimport type Plugin from '@vaadin/hilla-generator-core/Plugin.js';\nimport {\n isEmptyObject,\n isObjectSchema,\n type NonEmptyObjectSchema,\n type Schema,\n} from '@vaadin/hilla-generator-core/Schema.js';\nimport type { TransferTypes } from '@vaadin/hilla-generator-core/SharedStorage.js';\nimport type DependencyManager from '@vaadin/hilla-generator-utils/dependencies/DependencyManager.js';\nimport type { OpenAPIV3 } from 'openapi-types';\nimport TypeSchemaProcessor from './TypeSchemaProcessor.js';\nimport { defaultMediaType } from './utils.js';\n\nexport type EndpointMethodRequestBody = OpenAPIV3.RequestBodyObject;\n\nexport type EndpointMethodRequestBodyProcessingResult = Readonly<{\n parameters: readonly ParameterDeclaration[];\n packedParameters?: ObjectLiteralExpression;\n initParam: Identifier;\n}>;\n\nconst DEFAULT_INIT_PARAM_NAME = 'init';\nconst INIT_TYPE_NAME = 'EndpointRequestInit';\nconst HILLA_FRONTEND_NAME = '@vaadin/hilla-frontend';\n\nexport default class EndpointMethodRequestBodyProcessor {\n readonly #dependencies: DependencyManager;\n readonly #transferTypes: TransferTypes;\n readonly #owner: Plugin;\n readonly #requestBody?: EndpointMethodRequestBody;\n\n constructor(\n requestBody: OpenAPIV3.ReferenceObject | OpenAPIV3.RequestBodyObject | undefined,\n dependencies: DependencyManager,\n transferTypes: TransferTypes,\n owner: Plugin,\n ) {\n this.#owner = owner;\n this.#dependencies = dependencies;\n this.#requestBody = requestBody ? owner.resolver.resolve(requestBody) : undefined;\n this.#transferTypes = transferTypes;\n }\n\n process(): EndpointMethodRequestBodyProcessingResult {\n const { imports, paths } = this.#dependencies;\n const path = paths.createBareModulePath(HILLA_FRONTEND_NAME);\n const initTypeIdentifier =\n imports.named.getIdentifier(path, INIT_TYPE_NAME) ?? imports.named.add(path, INIT_TYPE_NAME);\n\n if (!this.#requestBody) {\n return {\n initParam: ts.factory.createIdentifier(DEFAULT_INIT_PARAM_NAME),\n packedParameters: ts.factory.createObjectLiteralExpression(),\n parameters: [\n ts.factory.createParameterDeclaration(\n undefined,\n undefined,\n DEFAULT_INIT_PARAM_NAME,\n ts.factory.createToken(ts.SyntaxKind.QuestionToken),\n ts.factory.createTypeReferenceNode(initTypeIdentifier),\n ),\n ],\n };\n }\n\n const parameterData = this.#extractParameterData(this.#requestBody.content[defaultMediaType].schema);\n const parameterNames = parameterData.map(([name]) => name);\n let initParamName = DEFAULT_INIT_PARAM_NAME;\n\n while (parameterNames.includes(initParamName)) {\n initParamName = `_${initParamName}`;\n }\n\n return {\n initParam: ts.factory.createIdentifier(initParamName),\n packedParameters: ts.factory.createObjectLiteralExpression(\n parameterData.map(([name]) => ts.factory.createShorthandPropertyAssignment(name)),\n ),\n parameters: [\n ...parameterData.map(([name, schema]) => {\n const nodes = new TypeSchemaProcessor(schema, this.#dependencies, this.#transferTypes).process();\n\n return ts.factory.createParameterDeclaration(\n undefined,\n undefined,\n name,\n undefined,\n ts.factory.createUnionTypeNode(nodes),\n );\n }),\n ts.factory.createParameterDeclaration(\n undefined,\n undefined,\n initParamName,\n ts.factory.createToken(ts.SyntaxKind.QuestionToken),\n ts.factory.createTypeReferenceNode(initTypeIdentifier),\n ),\n ],\n };\n }\n\n #extractParameterData(\n basicSchema?: OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject,\n ): Array<readonly [string, Schema]> {\n if (!basicSchema) {\n return [];\n }\n\n const { logger, resolver } = this.#owner;\n\n const resolvedSchema = resolver.resolve(basicSchema);\n\n if (isObjectSchema(resolvedSchema) && !isEmptyObject(resolvedSchema)) {\n return Object.entries((resolvedSchema as NonEmptyObjectSchema).properties);\n }\n\n logger.warn(\"A schema provided for endpoint method's 'requestBody' is not supported\");\n return [];\n }\n}\n"],"version":3}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import type { TypeNode } from "@typescript/typescript6";
|
|
1
2
|
import type Plugin from "@vaadin/hilla-generator-core/Plugin.js";
|
|
2
3
|
import type { TransferTypes } from "@vaadin/hilla-generator-core/SharedStorage.js";
|
|
3
4
|
import type DependencyManager from "@vaadin/hilla-generator-utils/dependencies/DependencyManager.js";
|
|
4
5
|
import type { OpenAPIV3 } from "openapi-types";
|
|
5
|
-
import type { TypeNode } from "typescript";
|
|
6
6
|
export type EndpointMethodResponses = OpenAPIV3.ResponsesObject;
|
|
7
7
|
export type EndpointMethodResponse = OpenAPIV3.ResponseObject;
|
|
8
8
|
export default class EndpointMethodResponseProcessor {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAKA,OAAO,mDAAoD;AAC3D,SAAS,oCAAqC;AAK9C,eAAe,MAAM,gCAAgC;CACnD,AAASA;CACT,AAASC;CACT,AAASC;CACT,AAASC;CACT,AAASC;CAGT,YACEC,MACAC,UACAC,mBACAC,eACAC,OACA;AACA,OAAKT,QAAQ;AACb,OAAKG,SAAS;AACd,OAAKF,gBAAgB;AACrB,OAAKG,YAAY,MAAM,SAAS,QAAQ,SAAS;AACjD,OAAKF,iBAAiB;CACvB;CAED,UAA+B;AAC7B,UAAQ,KAAKF,OAAb;GACE,KAAK,MACH,QAAO,KAAKU,YAAY;GAC1B;AACE,SAAKP,OAAO,OAAO,MAAM,iBAAiB,KAAKH,MAAM,oBAAoB;AACzE,WAAO,CAAE;EACZ;CACF;CAED,aAAkC;EAChC,MAAM,YAAY,KAAKI,UAAU,UAAU,mBAAmB;AAE9D,SAAO,YAAY,IAAI,oBAAoB,WAAW,KAAKH,eAAe,KAAKC,gBAAgB,SAAS,GAAG,CAAE;CAC9G;AACF","names":["#code","#dependencies","#transferTypes","#owner","#response","code: string","response: EndpointMethodResponses[string]","dependencyManager: DependencyManager","transferTypes: TransferTypes","owner: Plugin","#processOk"],"sources":["/opt/agent/work/649c11185a3798db/packages/ts/generator-plugin-backbone/src/EndpointMethodResponseProcessor.ts"],"sourcesContent":["import type Plugin from '@vaadin/hilla-generator-core/Plugin.js';\nimport type { TransferTypes } from '@vaadin/hilla-generator-core/SharedStorage.js';\nimport type DependencyManager from '@vaadin/hilla-generator-utils/dependencies/DependencyManager.js';\nimport type { OpenAPIV3 } from 'openapi-types';\nimport
|
|
1
|
+
{"mappings":"AAKA,OAAO,mDAAoD;AAC3D,SAAS,oCAAqC;AAK9C,eAAe,MAAM,gCAAgC;CACnD,AAASA;CACT,AAASC;CACT,AAASC;CACT,AAASC;CACT,AAASC;CAGT,YACEC,MACAC,UACAC,mBACAC,eACAC,OACA;AACA,OAAKT,QAAQ;AACb,OAAKG,SAAS;AACd,OAAKF,gBAAgB;AACrB,OAAKG,YAAY,MAAM,SAAS,QAAQ,SAAS;AACjD,OAAKF,iBAAiB;CACvB;CAED,UAA+B;AAC7B,UAAQ,KAAKF,OAAb;GACE,KAAK,MACH,QAAO,KAAKU,YAAY;GAC1B;AACE,SAAKP,OAAO,OAAO,MAAM,iBAAiB,KAAKH,MAAM,oBAAoB;AACzE,WAAO,CAAE;EACZ;CACF;CAED,aAAkC;EAChC,MAAM,YAAY,KAAKI,UAAU,UAAU,mBAAmB;AAE9D,SAAO,YAAY,IAAI,oBAAoB,WAAW,KAAKH,eAAe,KAAKC,gBAAgB,SAAS,GAAG,CAAE;CAC9G;AACF","names":["#code","#dependencies","#transferTypes","#owner","#response","code: string","response: EndpointMethodResponses[string]","dependencyManager: DependencyManager","transferTypes: TransferTypes","owner: Plugin","#processOk"],"sources":["/opt/agent/work/649c11185a3798db/packages/ts/generator-plugin-backbone/src/EndpointMethodResponseProcessor.ts"],"sourcesContent":["import type { TypeNode } from '@typescript/typescript6';\nimport type Plugin from '@vaadin/hilla-generator-core/Plugin.js';\nimport type { TransferTypes } from '@vaadin/hilla-generator-core/SharedStorage.js';\nimport type DependencyManager from '@vaadin/hilla-generator-utils/dependencies/DependencyManager.js';\nimport type { OpenAPIV3 } from 'openapi-types';\nimport TypeSchemaProcessor from './TypeSchemaProcessor.js';\nimport { defaultMediaType } from './utils.js';\n\nexport type EndpointMethodResponses = OpenAPIV3.ResponsesObject;\nexport type EndpointMethodResponse = OpenAPIV3.ResponseObject;\n\nexport default class EndpointMethodResponseProcessor {\n readonly #code: string;\n readonly #dependencies: DependencyManager;\n readonly #transferTypes: TransferTypes;\n readonly #owner: Plugin;\n readonly #response: EndpointMethodResponse;\n\n // eslint-disable-next-line @typescript-eslint/max-params\n constructor(\n code: string,\n response: EndpointMethodResponses[string],\n dependencyManager: DependencyManager,\n transferTypes: TransferTypes,\n owner: Plugin,\n ) {\n this.#code = code;\n this.#owner = owner;\n this.#dependencies = dependencyManager;\n this.#response = owner.resolver.resolve(response);\n this.#transferTypes = transferTypes;\n }\n\n process(): readonly TypeNode[] {\n switch (this.#code) {\n case '200':\n return this.#processOk();\n default:\n this.#owner.logger.warn(`Response code '${this.#code} is not supported'`);\n return [];\n }\n }\n\n #processOk(): readonly TypeNode[] {\n const rawSchema = this.#response.content?.[defaultMediaType]?.schema;\n\n return rawSchema ? new TypeSchemaProcessor(rawSchema, this.#dependencies, this.#transferTypes).process() : [];\n }\n}\n"],"version":3}
|
package/EndpointProcessor.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { SourceFile } from "@typescript/typescript6";
|
|
1
2
|
import type Plugin from "@vaadin/hilla-generator-core/Plugin.js";
|
|
2
3
|
import type { SharedStorage } from "@vaadin/hilla-generator-core/SharedStorage.js";
|
|
3
4
|
import { OpenAPIV3 } from "openapi-types";
|
|
4
|
-
import type { SourceFile } from "typescript";
|
|
5
5
|
export default class EndpointProcessor {
|
|
6
6
|
#private;
|
|
7
7
|
static create(name: string, methods: Map<string, OpenAPIV3.PathItemObject>, storage: SharedStorage, owner: Plugin): Promise<EndpointProcessor>;
|
package/EndpointProcessor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":"AAGA,OAAO,yDAA0D;AACjE,OAAO,yEAA0E;AACjF,OAAO,wFAAyF;AAChG,OAAO,4EAA6E;AACpF,SAAS,gCAAiC;AAC1C,OAAO,6EAA8E;AAErF,eAAe,MAAM,kBAAkB;CACrC,aAAa,OACXA,MACAC,SACAC,SACAC,OAC4B;EAC5B,MAAM,WAAW,IAAI,kBAAkB,MAAM,SAAS,SAAS;AAC/D,WAASC,cAAc,QAAQ,QAAQ,IACrC,SAASA,cAAc,MAAM,mBAAmB,MAAM,aAAa,kBAAkB,QAAQ,UAAU,CAAC,EACxG,SACD;AACD,SAAO;CACR;CAED,AAASC,oBAAoB,IAAI,YAAY,EAAE,WAAW,KAAM;CAChE,AAASD,gBAAgB,IAAI,kBAAkB,IAAI,YAAY,EAAE,WAAW,MAAO;CACnF,AAASE;CACT,AAASC;CACT,AAASC;CACT,AAASC;CACT,AAASC;CAET,AAAQ,YACNV,MACAC,SACAC,SACAC,OACA;AACA,OAAKI,QAAQ;AACb,OAAKG,SAAS;AACd,OAAKJ,WAAW;AAChB,OAAKE,aAAa,QAAQ;AAC1B,OAAKC,iBAAiB,QAAQ;CAC/B;CAED,MAAM,UAA+B;AACnC,OAAKC,OAAO,OAAO,OAAO,uBAAuB,KAAKH,MAAM,EAAE;EAE9D,MAAM,aAAa,CACjB,MAAM,QAAQ,IAAI,MAAM,KAAK,KAAKD,UAAU,OAAO,CAAC,QAAQ,SAAS,KAAK,KAAKK,eAAe,QAAQ,SAAS,CAAC,CAAC,EACjH,QAAQ,CAAC,SAAS,KAAK;EAEzB,MAAM,EAAE,SAAS,SAAS,GAAG,KAAKP;AAElC,SAAO,iBACL;GAAC,GAAG,QAAQ,QAAQ;GAAE,GAAG;GAAY,GAAG,QAAQ,QAAQ;EAAC,GACzD,KAAKC,kBAAkB,mBAAmB,KAAKE,MAAM,CACtD;CACF;CAED,MAAMI,eAAeC,QAAgBC,UAAmE;AACtG,OAAKH,OAAO,OAAO,OAAO,8BAA8B,KAAKH,MAAM,GAAG,OAAO,EAAE;AAE/E,SAAO,CACL,MAAM,QAAQ,IACZ,OAAO,OAAO,UAAU,YAAY,CACjC,OAAO,CAAC,eAAe,SAAS,YAAY,CAC5C,IAAI,OAAO,eACV,iCAAiC,gBAC/B,YACA,KAAKA,OACL,QACA,SAAS,aACT,KAAKH,eACL,KAAKK,gBACL,KAAKC,OACN,EAAE,QAAQ,KAAKF,WAAW,CAC5B,CACJ,EACD,OAAO,QAAQ;CAClB;AACF","names":["name: string","methods: Map<string, OpenAPIV3.PathItemObject>","storage: SharedStorage","owner: Plugin","#dependencies","#createdFilePaths","#methods","#name","#outputDir","#transferTypes","#owner","#processMethod","method: string","pathItem: OpenAPIV3.PathItemObject"],"sources":["/opt/agent/work/649c11185a3798db/packages/ts/generator-plugin-backbone/src/EndpointProcessor.ts"],"sourcesContent":["import type { SourceFile, Statement } from '@typescript/typescript6';\nimport type Plugin from '@vaadin/hilla-generator-core/Plugin.js';\nimport type { SharedStorage, TransferTypes } from '@vaadin/hilla-generator-core/SharedStorage.js';\nimport ClientPlugin from '@vaadin/hilla-generator-plugin-client';\nimport createSourceFile from '@vaadin/hilla-generator-utils/createSourceFile.js';\nimport DependencyManager from '@vaadin/hilla-generator-utils/dependencies/DependencyManager.js';\nimport PathManager from '@vaadin/hilla-generator-utils/dependencies/PathManager.js';\nimport { OpenAPIV3 } from 'openapi-types';\nimport EndpointMethodOperationProcessor from './EndpointMethodOperationProcessor.js';\n\nexport default class EndpointProcessor {\n static async create(\n name: string,\n methods: Map<string, OpenAPIV3.PathItemObject>,\n storage: SharedStorage,\n owner: Plugin,\n ): Promise<EndpointProcessor> {\n const endpoint = new EndpointProcessor(name, methods, storage, owner);\n endpoint.#dependencies.imports.default.add(\n endpoint.#dependencies.paths.createRelativePath(await ClientPlugin.getClientFileName(storage.outputDir)),\n 'client',\n );\n return endpoint;\n }\n\n readonly #createdFilePaths = new PathManager({ extension: 'ts' });\n readonly #dependencies = new DependencyManager(new PathManager({ extension: '.js' }));\n readonly #methods: Map<string, OpenAPIV3.PathItemObject>;\n readonly #name: string;\n readonly #outputDir: string | undefined;\n readonly #transferTypes: TransferTypes;\n readonly #owner: Plugin;\n\n private constructor(\n name: string,\n methods: Map<string, OpenAPIV3.PathItemObject>,\n storage: SharedStorage,\n owner: Plugin,\n ) {\n this.#name = name;\n this.#owner = owner;\n this.#methods = methods;\n this.#outputDir = storage.outputDir;\n this.#transferTypes = storage.transferTypes;\n }\n\n async process(): Promise<SourceFile> {\n this.#owner.logger.debug(`Processing endpoint: ${this.#name}`);\n\n const statements = (\n await Promise.all(Array.from(this.#methods, async ([method, pathItem]) => this.#processMethod(method, pathItem)))\n ).flatMap((item) => item);\n\n const { exports, imports } = this.#dependencies;\n\n return createSourceFile(\n [...imports.toCode(), ...statements, ...exports.toCode()],\n this.#createdFilePaths.createRelativePath(this.#name),\n );\n }\n\n async #processMethod(method: string, pathItem: OpenAPIV3.PathItemObject): Promise<readonly Statement[]> {\n this.#owner.logger.debug(`Processing endpoint method: ${this.#name}.${method}`);\n\n return (\n await Promise.all(\n Object.values(OpenAPIV3.HttpMethods)\n .filter((httpMethod) => pathItem[httpMethod])\n .map(async (httpMethod) =>\n EndpointMethodOperationProcessor.createProcessor(\n httpMethod,\n this.#name,\n method,\n pathItem[httpMethod]!,\n this.#dependencies,\n this.#transferTypes,\n this.#owner,\n )?.process(this.#outputDir),\n ),\n )\n ).filter(Boolean) as readonly Statement[];\n }\n}\n"],"version":3}
|
package/EntityProcessor.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { type SourceFile } from "@typescript/typescript6";
|
|
1
2
|
import type Plugin from "@vaadin/hilla-generator-core/Plugin.js";
|
|
2
3
|
import { type Schema } from "@vaadin/hilla-generator-core/Schema.js";
|
|
3
4
|
import type { SharedStorage } from "@vaadin/hilla-generator-core/SharedStorage.js";
|
|
4
|
-
import { type SourceFile } from "typescript";
|
|
5
5
|
export declare class EntityProcessor {
|
|
6
6
|
#private;
|
|
7
7
|
constructor(name: string, component: Schema, storage: SharedStorage, owner: Plugin);
|
package/EntityProcessor.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { dirname } from "path/posix";
|
|
2
|
+
import ts from "@typescript/typescript6";
|
|
2
3
|
import { convertReferenceSchemaToPath, convertReferenceSchemaToSpecifier, decomposeSchema, isComposedSchema, isEmptyObject, isEnumSchema, isNullableSchema, isObjectSchema, isReferenceSchema, convertFullyQualifiedNameToRelativePath, simplifyFullyQualifiedName } from "@vaadin/hilla-generator-core/Schema.js";
|
|
3
4
|
import createSourceFile from "@vaadin/hilla-generator-utils/createSourceFile.js";
|
|
4
5
|
import DependencyManager from "@vaadin/hilla-generator-utils/dependencies/DependencyManager.js";
|
|
5
6
|
import PathManager from "@vaadin/hilla-generator-utils/dependencies/PathManager.js";
|
|
6
|
-
import ts from "typescript";
|
|
7
7
|
import TypeSchemaProcessor from "./TypeSchemaProcessor.js";
|
|
8
8
|
import { findTypeParameters } from "./utils.js";
|
|
9
9
|
export class EntityProcessor {
|
package/EntityProcessor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAAA,SAAS,2BAA4B;
|
|
1
|
+
{"mappings":"AAAA,SAAS,2BAA4B;AACrC,OAAO,iCAO0B;AAEjC,SAIE,8BACA,mCACA,iBACA,kBACA,eACA,cACA,kBACA,gBACA,mBAEA,yCACA,0EAC8C;AAEhD,OAAO,yEAA0E;AACjF,OAAO,wFAAyF;AAChG,OAAO,4EAA6E;AACpF,OAAO,mDAAoD;AAC3D,SAAS,sCAAuC;AAEhD,OAAO,MAAM,gBAAgB;CAC3B,AAASA;CACT,AAASC;CACT,AAASC;CACT,AAASC;CACT,AAASC,qBAAqB,IAAI,YAAY,EAAE,WAAW,KAAM;CACjE,AAASC;CACT,AAASC;CACT,AAASC;CAET,YAAYC,MAAcC,WAAmBC,SAAwBC,OAAe;AAClF,OAAKX,aAAa;AAClB,OAAKM,SAAS;AACd,OAAKJ,sBAAsB;AAC3B,OAAKC,QAAQ,2BAA2B,KAAK;AAC7C,OAAKI,QAAQ,wCAAwC,KAAK;AAC1D,OAAKN,gBAAgB,IAAI,kBAAkB,IAAI,YAAY;GAAE,WAAW;GAAO,YAAY,QAAQ,KAAKM,MAAM;EAAE;AAChH,OAAKF,iBAAiB,QAAQ;CAC/B;CAED,IAAIO,MAAkB;EACpB,MAAM,KAAK,GAAG,QAAQ,iBAAiB,KAAKT,MAAM;AAElD,OAAKF,cAAc,QAAQ,QAAQ,IAAI,GAAG;AAE1C,SAAO;CACR;CAED,UAAsB;AACpB,OAAKK,OAAO,OAAO,OAAO,qBAAqB,KAAKH,MAAM,EAAE;EAE5D,MAAM,cAAc,aAAa,KAAKH,WAAW,GAC7C,KAAKa,aAAa,KAAKb,WAAW,GAClC,KAAKc,sBAAsB,KAAKd,WAAW;EAE/C,MAAM,aAAa,cAAc,CAAC,WAAY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,YAAY,MACZ,YAAY,gBACZ,CACE,GAAG,QAAQ,qBAAqB,GAAG,WAAW,gBAAgB,CAC5D,GAAG,QAAQ,kCAAkC,YAAY,UAAU,AACpE,EAAC,AACH,GACD,YAAY,QACb;EAEJ;AAED,SAAO,KAAKD,cAAc,OAAO;CAClC;CAED,oBAAoBE,QAAqC;EACvD,MAAM,EAAE,SAAS,OAAO,GAAG,KAAKnB;EAEhC,MAAM,YAAY,kCAAkC,OAAO;EAC3D,MAAM,OAAO,MAAM,mBAAmB,6BAA6B,OAAO,CAAC;AAE3E,SAAO,QAAQ,QAAQ,cAAc,KAAK,IAAI,QAAQ,QAAQ,IAAI,MAAM,WAAW,KAAK;CACzF;CAED,qBAAqB,EAAE,YAA0B,EAA0B;AACzE,SAAO,OAAO,QAAQ,cAAc,CAAE,EAAC,CAAC,IAAI,CAAC,CAAC,MAAM,OAAO,KAAK;GAC9D,MAAM,CAAC,KAAK,GAAG,IAAI,oBAAoB,QAAQ,KAAKA,eAAe,KAAKI,gBAAgB,SAAS;AAEjG,UAAO,GAAG,QAAQ,wBAChB,WACA,MACA,iBAAiB,OAAO,GAAG,GAAG,QAAQ,YAAY,GAAG,WAAW,cAAc,GAAG,WACjF,KACD;EACF,EAAC;CACH;CAED,OAAOW,uBAAuBD,QAAiE;AAC7F,SAAO,mBAAmB,OAAO,EAC7B,IAAI,OAAO,CACZ,IAAI,CAAC,SACJ,GAAG,QAAQ,+BACT,WACA,MACA,WACA,GAAG,QAAQ,sBAAsB,GAAG,WAAW,eAAe,CAC/D,CACF;CACJ;AACF","names":["#component","#dependencies","#fullyQualifiedName","#name","#outputPathManager","#transferTypes","#owner","#path","name: string","component: Schema","storage: SharedStorage","owner: Plugin","#id","#processEnum","#processExtendedClass","schema: Schema","#processTypeParameters","#processTypeElements","#processClass","#processParentClass","schema: ReferenceSchema"],"sources":["/opt/agent/work/649c11185a3798db/packages/ts/generator-plugin-backbone/src/EntityProcessor.ts"],"sourcesContent":["import { dirname } from 'path/posix';\nimport ts, {\n type Identifier,\n type InterfaceDeclaration,\n type SourceFile,\n type Statement,\n type TypeElement,\n type TypeParameterDeclaration,\n} from '@typescript/typescript6';\nimport type Plugin from '@vaadin/hilla-generator-core/Plugin.js';\nimport {\n type EnumSchema,\n type ReferenceSchema,\n type Schema,\n convertReferenceSchemaToPath,\n convertReferenceSchemaToSpecifier,\n decomposeSchema,\n isComposedSchema,\n isEmptyObject,\n isEnumSchema,\n isNullableSchema,\n isObjectSchema,\n isReferenceSchema,\n type ObjectSchema,\n convertFullyQualifiedNameToRelativePath,\n simplifyFullyQualifiedName,\n} from '@vaadin/hilla-generator-core/Schema.js';\nimport type { SharedStorage, TransferTypes } from '@vaadin/hilla-generator-core/SharedStorage.js';\nimport createSourceFile from '@vaadin/hilla-generator-utils/createSourceFile.js';\nimport DependencyManager from '@vaadin/hilla-generator-utils/dependencies/DependencyManager.js';\nimport PathManager from '@vaadin/hilla-generator-utils/dependencies/PathManager.js';\nimport TypeSchemaProcessor from './TypeSchemaProcessor.js';\nimport { findTypeParameters } from './utils.js';\n\nexport class EntityProcessor {\n readonly #component: Schema;\n readonly #dependencies;\n readonly #fullyQualifiedName: string;\n readonly #name: string;\n readonly #outputPathManager = new PathManager({ extension: 'ts' });\n readonly #transferTypes: TransferTypes;\n readonly #owner: Plugin;\n readonly #path: string;\n\n constructor(name: string, component: Schema, storage: SharedStorage, owner: Plugin) {\n this.#component = component;\n this.#owner = owner;\n this.#fullyQualifiedName = name;\n this.#name = simplifyFullyQualifiedName(name);\n this.#path = convertFullyQualifiedNameToRelativePath(name);\n this.#dependencies = new DependencyManager(new PathManager({ extension: '.js', relativeTo: dirname(this.#path) }));\n this.#transferTypes = storage.transferTypes;\n }\n\n get #id(): Identifier {\n const id = ts.factory.createIdentifier(this.#name);\n\n this.#dependencies.exports.default.set(id);\n\n return id;\n }\n\n process(): SourceFile {\n this.#owner.logger.debug(`Processing entity: ${this.#name}`);\n\n const declaration = isEnumSchema(this.#component)\n ? this.#processEnum(this.#component)\n : this.#processExtendedClass(this.#component);\n\n const statements = declaration ? [declaration] : [];\n\n const { exports, imports } = this.#dependencies;\n\n return createSourceFile(\n [...imports.toCode(), ...statements, ...exports.toCode()],\n this.#outputPathManager.createRelativePath(this.#path),\n );\n }\n\n #processClass(schema: Schema): InterfaceDeclaration | undefined {\n const { logger } = this.#owner;\n\n if (!isObjectSchema(schema)) {\n logger.debug(schema, `Component is not an object: '${this.#fullyQualifiedName}'`);\n return undefined;\n }\n\n if (isEmptyObject(schema)) {\n logger.debug(`Component has no properties:' ${this.#fullyQualifiedName}'`);\n }\n\n return ts.factory.createInterfaceDeclaration(\n undefined,\n this.#id,\n EntityProcessor.#processTypeParameters(schema),\n undefined,\n this.#processTypeElements(schema),\n );\n }\n\n #processEnum({ enum: members }: EnumSchema): Statement {\n return ts.factory.createEnumDeclaration(\n undefined,\n this.#id,\n members.map((member) => ts.factory.createEnumMember(member, ts.factory.createStringLiteral(member))),\n );\n }\n\n #processExtendedClass(schema: Schema): Statement | undefined {\n const { logger } = this.#owner;\n\n if (isComposedSchema(schema)) {\n const decomposed = decomposeSchema(schema);\n\n if (decomposed.length > 2) {\n logger.debug(\n schema,\n `Schema for '${this.#fullyQualifiedName}' has more than two components. This plugin will ignore it.`,\n );\n return undefined;\n }\n\n const [parent, child] = decomposed;\n\n if (!isReferenceSchema(parent)) {\n logger.debug(parent, 'Only reference schema allowed for parent class');\n return undefined;\n }\n\n const declaration = this.#processClass(child);\n const identifier = this.#processParentClass(parent);\n\n return (\n declaration &&\n ts.factory.updateInterfaceDeclaration(\n declaration,\n declaration.modifiers,\n declaration.name,\n declaration.typeParameters,\n [\n ts.factory.createHeritageClause(ts.SyntaxKind.ExtendsKeyword, [\n ts.factory.createExpressionWithTypeArguments(identifier, undefined),\n ]),\n ],\n declaration.members,\n )\n );\n }\n\n return this.#processClass(schema);\n }\n\n #processParentClass(schema: ReferenceSchema): Identifier {\n const { imports, paths } = this.#dependencies;\n\n const specifier = convertReferenceSchemaToSpecifier(schema);\n const path = paths.createRelativePath(convertReferenceSchemaToPath(schema));\n\n return imports.default.getIdentifier(path) ?? imports.default.add(path, specifier, true);\n }\n\n #processTypeElements({ properties }: ObjectSchema): readonly TypeElement[] {\n return Object.entries(properties ?? {}).map(([name, schema]) => {\n const [type] = new TypeSchemaProcessor(schema, this.#dependencies, this.#transferTypes).process();\n\n return ts.factory.createPropertySignature(\n undefined,\n name,\n isNullableSchema(schema) ? ts.factory.createToken(ts.SyntaxKind.QuestionToken) : undefined,\n type,\n );\n });\n }\n\n static #processTypeParameters(schema: Schema): readonly TypeParameterDeclaration[] | undefined {\n return findTypeParameters(schema)\n ?.map(String)\n .map((name) =>\n ts.factory.createTypeParameterDeclaration(\n undefined,\n name,\n undefined,\n ts.factory.createKeywordTypeNode(ts.SyntaxKind.UnknownKeyword),\n ),\n );\n }\n}\n"],"version":3}
|
package/TypeSchemaProcessor.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { type TypeNode } from "@typescript/typescript6";
|
|
1
2
|
import { type Schema } from "@vaadin/hilla-generator-core/Schema.js";
|
|
2
3
|
import type { TransferTypeMaker } from "@vaadin/hilla-generator-core/SharedStorage.js";
|
|
3
4
|
import type DependencyManager from "@vaadin/hilla-generator-utils/dependencies/DependencyManager.js";
|
|
4
|
-
import { type TypeNode } from "typescript";
|
|
5
5
|
export default class TypeSchemaProcessor {
|
|
6
6
|
#private;
|
|
7
7
|
["constructor"]: typeof TypeSchemaProcessor;
|
package/TypeSchemaProcessor.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import ts from "@typescript/typescript6";
|
|
1
2
|
import { convertFullyQualifiedNameToRelativePath, convertReferenceSchemaToFullyQualifiedName, convertReferenceSchemaToSpecifier, decomposeSchema, isArraySchema, isBooleanSchema, isComposedSchema, isIntegerSchema, isMapSchema, isNullableSchema, isNumberSchema, isReferenceSchema, isStringSchema } from "@vaadin/hilla-generator-core/Schema.js";
|
|
2
|
-
import ts from "typescript";
|
|
3
3
|
import { findTypeArguments, findTypeVariable } from "./utils.js";
|
|
4
4
|
function createBoolean() {
|
|
5
5
|
return ts.factory.createKeywordTypeNode(ts.SyntaxKind.BooleanKeyword);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAAA,SAEE,yCACA,4CACA,mCACA,iBACA,eACA,iBACA,kBACA,iBACA,aACA,kBACA,gBACA,mBACA,8DAK8C;AAGhD,
|
|
1
|
+
{"mappings":"AAAA,OAAO,iCAAqD;AAC5D,SAEE,yCACA,4CACA,mCACA,iBACA,eACA,iBACA,kBACA,iBACA,aACA,kBACA,gBACA,mBACA,8DAK8C;AAGhD,SAAS,mBAAmB,oCAAqC;AAEjE,SAAS,gBAA0B;AACjC,QAAO,GAAG,QAAQ,sBAAsB,GAAG,WAAW,eAAe;AACtE;AAED,SAAS,eAAyB;AAChC,QAAO,GAAG,QAAQ,sBAAsB,GAAG,WAAW,cAAc;AACrE;AAED,SAAS,eAAyB;AAChC,QAAO,GAAG,QAAQ,sBAAsB,GAAG,WAAW,cAAc;AACrE;AAED,SAAS,kBAA4B;AACnC,QAAO,GAAG,QAAQ,sBAAsB,GAAG,WAAW,iBAAiB;AACxE;AAED,SAAS,gBAA0B;AACjC,QAAO,GAAG,QAAQ,sBAAsB,GAAG,WAAW,eAAe;AACtE;AAED,SAAS,6BAA6BA,QAAmC;AACvE,KAAI,iBAAiB,OAAO,EAAE;EAC5B,MAAM,CAAC,OAAO,GAAG,gBAAgB,OAAO;AAExC,SAAO;CACR;AAED,QAAO;AACR;AAED,eAAe,MAAM,oBAAoB;CAEvC,AAASC;CACT,AAASC;CACT,AAASC;CAET,YAAYH,QAAgBI,cAAiCC,eAA+C;AAC1G,OAAKH,UAAU;AACf,OAAKD,gBAAgB;AACrB,OAAKE,iBAAiB;CACvB;CAED,UAA+B;EAC7B,IAAIG;EAEJ,MAAM,kBAAkB,6BAA6B,KAAKJ,QAAQ;EAElE,MAAM,eAAe,iBA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;CAED,sBAAsBH,QAAiD;AAErE,SAAO,kBAAkB,OAAO,EAC5B,MAAM,IAAI,CAAC,MAAM,IAAI,oBAAoB,GAAG,KAAKC,eAAe,KAAKE,gBAAgB,SAAS,CAAC,CAChG,IAAI,CAAC,MAAM,GAAG,QAAQ,oBAAoB,EAAE,CAAC;CACjD;CAED,kBAAkBU,QAAyBC,eAA0D;EACnG,MAAM,EAAE,SAAS,OAAO,GAAG,KAAKb;EAEhC,MAAM,qBAAqB,2CAA2C,OAAO;AAE7E,MAAI,KAAKE,eAAe,IAAI,mBAAmB,EAAE;AAC/C,UAAO,KAAKA,eAAe,IAAI,mBAAmB,CAAE;IAClD,cAAc,KAAKF;IACnB;GACD,EAAC;EACH;EAED,MAAM,YAAY,kCAAkC,OAAO;EAC3D,MAAM,OAAO,MAAM,mBAAmB,wCAAwC,mBAAmB,CAAC;EAElG,MAAM,aAAa,QAAQ,QAAQ,cAAc,KAAK,IAAI,QAAQ,QAAQ,IAAI,MAAM,WAAW,KAAK;AAEpG,SAAO,GAAG,QAAQ,wBAAwB,YAAY,cAAc;CACrE;AACF","names":["schema: Schema","#dependencies","#schema","#transferTypes","dependencies: DependencyManager","transferTypes: Map<string, TransferTypeMaker>","node: TypeNode","#processTypeArguments","#processReference","#processArray","#processMap","schema: ArraySchema","valuesTypeNode: TypeNode","schema: ReferenceSchema","typeArguments: readonly TypeNode[] | undefined"],"sources":["/opt/agent/work/649c11185a3798db/packages/ts/generator-plugin-backbone/src/TypeSchemaProcessor.ts"],"sourcesContent":["import ts, { type TypeNode } from '@typescript/typescript6';\nimport {\n type ArraySchema,\n convertFullyQualifiedNameToRelativePath,\n convertReferenceSchemaToFullyQualifiedName,\n convertReferenceSchemaToSpecifier,\n decomposeSchema,\n isArraySchema,\n isBooleanSchema,\n isComposedSchema,\n isIntegerSchema,\n isMapSchema,\n isNullableSchema,\n isNumberSchema,\n isReferenceSchema,\n isStringSchema,\n type MapSchema,\n type NonComposedSchema,\n type ReferenceSchema,\n type Schema,\n} from '@vaadin/hilla-generator-core/Schema.js';\nimport type { TransferTypeMaker } from '@vaadin/hilla-generator-core/SharedStorage.js';\nimport type DependencyManager from '@vaadin/hilla-generator-utils/dependencies/DependencyManager.js';\nimport { findTypeArguments, findTypeVariable } from './utils.js';\n\nfunction createBoolean(): TypeNode {\n return ts.factory.createKeywordTypeNode(ts.SyntaxKind.BooleanKeyword);\n}\n\nfunction createNumber(): TypeNode {\n return ts.factory.createKeywordTypeNode(ts.SyntaxKind.NumberKeyword);\n}\n\nfunction createString(): TypeNode {\n return ts.factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword);\n}\n\nfunction createUndefined(): TypeNode {\n return ts.factory.createKeywordTypeNode(ts.SyntaxKind.UndefinedKeyword);\n}\n\nfunction createUnknown(): TypeNode {\n return ts.factory.createKeywordTypeNode(ts.SyntaxKind.UnknownKeyword);\n}\n\nfunction unwrapPossiblyNullableSchema(schema: Schema): NonComposedSchema {\n if (isComposedSchema(schema)) {\n const [result] = decomposeSchema(schema);\n\n return result as NonComposedSchema;\n }\n\n return schema as NonComposedSchema;\n}\n\nexport default class TypeSchemaProcessor {\n declare ['constructor']: typeof TypeSchemaProcessor;\n readonly #dependencies: DependencyManager;\n readonly #schema: Schema;\n readonly #transferTypes: Map<string, TransferTypeMaker>;\n\n constructor(schema: Schema, dependencies: DependencyManager, transferTypes: Map<string, TransferTypeMaker>) {\n this.#schema = schema;\n this.#dependencies = dependencies;\n this.#transferTypes = transferTypes;\n }\n\n process(): readonly TypeNode[] {\n let node: TypeNode;\n\n const unwrappedSchema = unwrapPossiblyNullableSchema(this.#schema);\n\n const typeVariable = findTypeVariable(this.#schema);\n if (typeVariable) {\n // Type variables are returned directly as they are, no further processing is needed\n return [ts.factory.createTypeReferenceNode(typeVariable)];\n }\n\n if (isReferenceSchema(unwrappedSchema)) {\n const typeArguments = this.#processTypeArguments(this.#schema);\n node = this.#processReference(unwrappedSchema, typeArguments);\n } else if (isArraySchema(unwrappedSchema)) {\n node = this.#processArray(unwrappedSchema);\n } else if (isMapSchema(unwrappedSchema)) {\n node = this.#processMap(unwrappedSchema);\n } else if (isBooleanSchema(unwrappedSchema)) {\n node = createBoolean();\n } else if (isIntegerSchema(unwrappedSchema) || isNumberSchema(unwrappedSchema)) {\n node = createNumber();\n } else if (isStringSchema(unwrappedSchema)) {\n node = createString();\n } else {\n node = createUnknown();\n }\n\n return isNullableSchema(this.#schema) ? [node, createUndefined()] : [node];\n }\n\n #processArray(schema: ArraySchema): TypeNode {\n const nodes = new TypeSchemaProcessor(schema.items, this.#dependencies, this.#transferTypes).process();\n\n return ts.factory.createTypeReferenceNode('Array', [ts.factory.createUnionTypeNode(nodes)]);\n }\n\n #processMap({ additionalProperties: valuesType }: MapSchema): TypeNode {\n let valuesTypeNode: TypeNode;\n\n if (typeof valuesType !== 'boolean') {\n const nodes = new TypeSchemaProcessor(valuesType, this.#dependencies, this.#transferTypes).process();\n valuesTypeNode = ts.factory.createUnionTypeNode(nodes);\n } else {\n valuesTypeNode = ts.factory.createKeywordTypeNode(ts.SyntaxKind.UnknownKeyword);\n }\n\n return ts.factory.createTypeReferenceNode('Record', [\n ts.factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword),\n valuesTypeNode,\n ]);\n }\n\n #processTypeArguments(schema: Schema): readonly TypeNode[] | undefined {\n // Type arguments are processed recursively\n return findTypeArguments(schema)\n ?.allOf.map((s) => new TypeSchemaProcessor(s, this.#dependencies, this.#transferTypes).process())\n .map((t) => ts.factory.createUnionTypeNode(t));\n }\n\n #processReference(schema: ReferenceSchema, typeArguments: readonly TypeNode[] | undefined): TypeNode {\n const { imports, paths } = this.#dependencies;\n\n const fullyQualifiedName = convertReferenceSchemaToFullyQualifiedName(schema);\n\n if (this.#transferTypes.has(fullyQualifiedName)) {\n return this.#transferTypes.get(fullyQualifiedName)!({\n dependencies: this.#dependencies,\n typeArguments,\n });\n }\n\n const specifier = convertReferenceSchemaToSpecifier(schema);\n const path = paths.createRelativePath(convertFullyQualifiedNameToRelativePath(fullyQualifiedName));\n\n const identifier = imports.default.getIdentifier(path) ?? imports.default.add(path, specifier, true);\n\n return ts.factory.createTypeReferenceNode(identifier, typeArguments);\n }\n}\n"],"version":3}
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":"AACA,OAAO,oDAAqD;AAG5D,OAAO,+CAAgD;AACvD,SAAS,6CAA8C;AAEvD,OAAO,IAAK,8DAAL;AACL;AACA;;AACD;AAED,eAAe,MAAM,uBAAuB,OAAO;CACjD,OAAgB,4BAA4B;CAE5C,AAASA,QAAQ,IAAI;CAErB,IAAa,OAAe;AAC1B,SAAO,OAAO,KAAK;CACpB;CAED,MAAe,QAAQC,SAAuC;EAC5D,MAAM,sBAAsB,MAAM,KAAKC,kBAAkB,QAAQ;EACjE,MAAM,oBAAoB,KAAKC,iBAAiB,QAAQ;AAExD,sBAAoB,QAAQ,CAAC,SAAS,KAAKH,MAAM,IAAI,MAAM,yBAAyB,SAAS,CAAC;AAC9F,oBAAkB,QAAQ,CAAC,SAAS,KAAKA,MAAM,IAAI,MAAM,yBAAyB,OAAO,CAAC;AAE1F,UAAQ,QAAQ,KAAK,GAAG,qBAAqB,GAAG,kBAAkB;AAClE,UAAQ,cAAc,IAAI,KAAK,YAAY,2BAA2B,KAAKA,MAAM;CAClF;CAED,MAAME,kBAAkBD,SAAwD;AAC9E,OAAK,OAAO,MAAM,uBAAuB;EACzC,MAAM,YAAY,IAAI;AAEtB,SAAO,QAAQ,QAAQ,IAAI,MAAM,CAC9B,OAAO,CAAC,GAAG,SAAS,OAAO,SAAS,CACpC,QAAQ,CAAC,CAAC,MAAM,SAAS,KAAK;GAC7B,MAAM,GAAG,cAAc,mBAAmB,GAAG,KAAK,MAAM,IAAI;GAE5D,IAAIG;AAEJ,OAAI,UAAU,IAAI,aAAa,EAAE;AAC/B,cAAU,UAAU,IAAI,aAAa;GACtC,OAAM;AACL,cAAU,IAAI;AACd,cAAU,IAAI,cAAc,QAAQ;GACrC;AAED,WAAQ,IAAI,oBAAoB,SAAU;EAC3C,EAAC;EAEJ,MAAM,aAAa,MAAM,QAAQ,IAC/B,MAAM,KAAK,UAAU,SAAS,EAAE,OAAO,CAAC,cAAc,QAAQ,KAC5D,kBAAkB,OAAO,cAAc,SAAS,SAAS,KAAK,CAC/D,CACF;AAED,SAAO,QAAQ,IAAI,WAAW,IAAI,OAAO,cAAc,UAAU,SAAS,CAAC,CAAC;CAC7E;CAED,iBAAiBH,SAA+C;AAC9D,OAAK,OAAO,MAAM,sBAAsB;AAExC,SAAO,QAAQ,IAAI,YAAY,UAC3B,OAAO,QAAQ,QAAQ,IAAI,WAAW,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,UAAU,KACnE,IAAI,gBAAgB,MAAM,WAAW,SAAS,MAAM,SAAS,CAC9D,GACD,CAAE;CACP;AACF","names":["#tags","storage: SharedStorage","#processEndpoints","#processEntities","methods: Map<string, OpenAPIV3.PathItemObject>"],"sources":["/opt/agent/work/649c11185a3798db/packages/ts/generator-plugin-backbone/src/index.ts"],"sourcesContent":["import type { SourceFile } from '@typescript/typescript6';\nimport Plugin from '@vaadin/hilla-generator-core/Plugin.js';\nimport type { SharedStorage } from '@vaadin/hilla-generator-core/SharedStorage.js';\nimport type { OpenAPIV3 } from 'openapi-types';\nimport EndpointProcessor from './EndpointProcessor.js';\nimport { EntityProcessor } from './EntityProcessor.js';\n\nexport enum BackbonePluginSourceType {\n Endpoint = 'endpoint',\n Entity = 'entity',\n}\n\nexport default class BackbonePlugin extends Plugin {\n static readonly BACKBONE_PLUGIN_FILE_TAGS = 'BACKBONE_PLUGIN_FILE_TAGS';\n declare ['constructor']: typeof BackbonePlugin;\n readonly #tags = new WeakMap<SourceFile, BackbonePluginSourceType>();\n\n override get path(): string {\n return import.meta.url;\n }\n\n override async execute(storage: SharedStorage): Promise<void> {\n const endpointSourceFiles = await this.#processEndpoints(storage);\n const entitySourceFiles = this.#processEntities(storage);\n\n endpointSourceFiles.forEach((file) => this.#tags.set(file, BackbonePluginSourceType.Endpoint));\n entitySourceFiles.forEach((file) => this.#tags.set(file, BackbonePluginSourceType.Entity));\n\n storage.sources.push(...endpointSourceFiles, ...entitySourceFiles);\n storage.pluginStorage.set(this.constructor.BACKBONE_PLUGIN_FILE_TAGS, this.#tags);\n }\n\n async #processEndpoints(storage: SharedStorage): Promise<readonly SourceFile[]> {\n this.logger.debug('Processing endpoints');\n const endpoints = new Map<string, Map<string, OpenAPIV3.PathItemObject>>();\n\n Object.entries(storage.api.paths)\n .filter(([, pathItem]) => !!pathItem)\n .forEach(([path, pathItem]) => {\n const [, endpointName, endpointMethodName] = path.split('/');\n\n let methods: Map<string, OpenAPIV3.PathItemObject>;\n\n if (endpoints.has(endpointName)) {\n methods = endpoints.get(endpointName)!;\n } else {\n methods = new Map();\n endpoints.set(endpointName, methods);\n }\n\n methods.set(endpointMethodName, pathItem!);\n });\n\n const processors = await Promise.all(\n Array.from(endpoints.entries(), async ([endpointName, methods]) =>\n EndpointProcessor.create(endpointName, methods, storage, this),\n ),\n );\n\n return Promise.all(processors.map(async (processor) => processor.process()));\n }\n\n #processEntities(storage: SharedStorage): readonly SourceFile[] {\n this.logger.debug('Processing entities');\n\n return storage.api.components?.schemas\n ? Object.entries(storage.api.components.schemas).map(([name, component]) =>\n new EntityProcessor(name, component, storage, this).process(),\n )\n : [];\n }\n}\n"],"version":3}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/hilla-generator-plugin-backbone",
|
|
3
|
-
"version": "25.3.0-
|
|
3
|
+
"version": "25.3.0-alpha9",
|
|
4
4
|
"description": "A Hilla TypeScript Generator plugin to generate basic code",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@
|
|
53
|
-
"@vaadin/hilla-generator-
|
|
54
|
-
"@vaadin/hilla-generator-
|
|
52
|
+
"@typescript/typescript6": "6.0.2",
|
|
53
|
+
"@vaadin/hilla-generator-core": "25.3.0-alpha9",
|
|
54
|
+
"@vaadin/hilla-generator-plugin-client": "25.3.0-alpha9",
|
|
55
|
+
"@vaadin/hilla-generator-utils": "25.3.0-alpha9",
|
|
55
56
|
"fast-deep-equal": "3.1.3",
|
|
56
|
-
"openapi-types": "12.1.3"
|
|
57
|
-
"typescript": "npm:@typescript/typescript6@6.0.2"
|
|
57
|
+
"openapi-types": "12.1.3"
|
|
58
58
|
}
|
|
59
59
|
}
|