@vaadin/hilla-generator-plugin-model 24.9.5 → 24.9.7

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.
Files changed (2) hide show
  1. package/index.js.map +1 -1
  2. package/package.json +5 -5
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,wCAAwC,CAAC;AAI5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAGjE,MAAM,CAAN,IAAY,qBAEX;AAFD,WAAY,qBAAqB;IAC/B,wCAAe,CAAA;AACjB,CAAC,EAFW,qBAAqB,KAArB,qBAAqB,QAEhC;AAED,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,MAAM;IAC7C,MAAM,CAAU,sBAAsB,GAAG,wBAAwB,CAAC;IAEzD,KAAK,GAAG,IAAI,OAAO,EAAqC,CAAC;IAElE,IAAa,IAAI;QACf,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;IACzB,CAAC;IAGQ,KAAK,CAAC,OAAO,CAAC,OAAsB;QAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACrE,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC;QAC3E,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;QAC/B,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,sBAAsB,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IACjF,CAAC;IAED,gBAAgB,CAAC,OAA0D;QACzE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAEzC,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,MAAM,GAAG,GAAY;YACnB,KAAK,EAAE,IAAI;SACZ,CAAC;QAEF,OAAO,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,oBAAoB,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC;IAChH,CAAC","sourcesContent":["import 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 type { SourceFile } from 'typescript';\nimport { EntityModelProcessor } from './EntityModelProcessor.js';\nimport type { Context } from './utils.js';\n\nexport enum ModelPluginSourceType {\n Model = 'model',\n}\n\nexport default class ModelPlugin extends Plugin {\n static readonly MODEL_PLUGIN_FILE_TAGS = 'MODEL_PLUGIN_FILE_TAGS';\n declare ['constructor']: typeof ModelPlugin;\n readonly #tags = new WeakMap<SourceFile, ModelPluginSourceType>();\n\n override get path(): string {\n return import.meta.url;\n }\n\n // eslint-disable-next-line @typescript-eslint/require-await\n override async execute(storage: SharedStorage): Promise<void> {\n const files = this.#processEntities(storage.api.components?.schemas);\n files.forEach((file) => this.#tags.set(file, ModelPluginSourceType.Model));\n storage.sources.push(...files);\n storage.pluginStorage.set(this.constructor.MODEL_PLUGIN_FILE_TAGS, this.#tags);\n }\n\n #processEntities(schemas: OpenAPIV3.ComponentsObject['schemas'] | undefined): readonly SourceFile[] {\n this.logger.debug('Processing entities');\n\n if (!schemas) {\n return [];\n }\n\n const ctx: Context = {\n owner: this,\n };\n\n return Object.entries(schemas).map(([name, component]) => EntityModelProcessor.process(name, component, ctx));\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","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AC,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,oBAAoB,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC;IAChH,CAAC","sourcesContent":["import 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 type { SourceFile } from 'typescript';\nimport { EntityModelProcessor } from './EntityModelProcessor.js';\nimport type { Context } from './utils.js';\n\nexport enum ModelPluginSourceType {\n Model = 'model',\n}\n\nexport default class ModelPlugin extends Plugin {\n static readonly MODEL_PLUGIN_FILE_TAGS = 'MODEL_PLUGIN_FILE_TAGS';\n declare ['constructor']: typeof ModelPlugin;\n readonly #tags = new WeakMap<SourceFile, ModelPluginSourceType>();\n\n override get path(): string {\n return import.meta.url;\n }\n\n // eslint-disable-next-line @typescript-eslint/require-await\n override async execute(storage: SharedStorage): Promise<void> {\n const files = this.#processEntities(storage.api.components?.schemas);\n files.forEach((file) => this.#tags.set(file, ModelPluginSourceType.Model));\n storage.sources.push(...files);\n storage.pluginStorage.set(this.constructor.MODEL_PLUGIN_FILE_TAGS, this.#tags);\n }\n\n #processEntities(schemas: OpenAPIV3.ComponentsObject['schemas']): readonly SourceFile[] {\n this.logger.debug('Processing entities');\n\n if (!schemas) {\n return [];\n }\n\n const ctx: Context = {\n owner: this,\n };\n\n return Object.entries(schemas).map(([name, component]) => EntityModelProcessor.process(name, component, ctx));\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/hilla-generator-plugin-model",
3
- "version": "24.9.5",
3
+ "version": "24.9.7",
4
4
  "description": "A Hilla TypeScript Generator plugin to generate form models",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -49,10 +49,10 @@
49
49
  "access": "public"
50
50
  },
51
51
  "dependencies": {
52
- "@vaadin/hilla-generator-core": "24.9.5",
53
- "@vaadin/hilla-generator-plugin-backbone": "24.9.5",
54
- "@vaadin/hilla-generator-utils": "24.9.5",
55
- "@vaadin/hilla-lit-form": "24.9.5",
52
+ "@vaadin/hilla-generator-core": "24.9.7",
53
+ "@vaadin/hilla-generator-plugin-backbone": "24.9.7",
54
+ "@vaadin/hilla-generator-utils": "24.9.7",
55
+ "@vaadin/hilla-lit-form": "24.9.7",
56
56
  "fast-deep-equal": "3.1.3",
57
57
  "openapi-types": "12.1.3",
58
58
  "typescript": "5.8.3"