@vaadin/hilla-generator-plugin-transfertypes 24.7.0-alpha15 → 24.7.0-beta3

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/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import Plugin from '@vaadin/hilla-generator-core/Plugin.js';
2
- import type { SharedStorage } from '@vaadin/hilla-generator-core/SharedStorage.js';
1
+ import Plugin from "@vaadin/hilla-generator-core/Plugin.js";
2
+ import type { SharedStorage } from "@vaadin/hilla-generator-core/SharedStorage.js";
3
3
  export default class TransferTypesPlugin extends Plugin {
4
- get path(): string;
5
- execute({ api: { components }, transferTypes }: SharedStorage): void;
4
+ get path(): string;
5
+ execute({ api: { components }, transferTypes }: SharedStorage): void;
6
6
  }
7
- //# sourceMappingURL=index.d.ts.map
package/index.js CHANGED
@@ -1,14 +1,14 @@
1
- import Plugin from '@vaadin/hilla-generator-core/Plugin.js';
2
- import ts from 'typescript';
1
+ import Plugin from "@vaadin/hilla-generator-core/Plugin.js";
2
+ import ts from "typescript";
3
3
  export default class TransferTypesPlugin extends Plugin {
4
- get path() {
5
- return import.meta.url;
6
- }
7
- execute({ api: { components }, transferTypes }) {
8
- transferTypes.set('com.vaadin.hilla.runtime.transfertypes.File', () => ts.factory.createTypeReferenceNode('File'));
9
- if (components?.schemas) {
10
- components.schemas = Object.fromEntries(Object.entries(components.schemas).filter(([key]) => key !== 'com.vaadin.hilla.runtime.transfertypes.File'));
11
- }
12
- }
4
+ get path() {
5
+ return import.meta.url;
6
+ }
7
+ execute({ api: { components }, transferTypes }) {
8
+ transferTypes.set("com.vaadin.hilla.runtime.transfertypes.File", () => ts.factory.createTypeReferenceNode("File"));
9
+ if (components?.schemas) {
10
+ components.schemas = Object.fromEntries(Object.entries(components.schemas).filter(([key]) => key !== "com.vaadin.hilla.runtime.transfertypes.File"));
11
+ }
12
+ }
13
13
  }
14
- //# sourceMappingURL=index.js.map
14
+ //# sourceMappingURL=./index.js.map
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;AAG5D,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,MAAM;IACrD,IAAa,IAAI;QACf,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;IACzB,CAAC;IAEQ,OAAO,CAAC,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,EAAE,aAAa,EAAiB;QACpE,aAAa,CAAC,GAAG,CAAC,6CAA6C,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC,CAAC;QAEnH,IAAI,UAAU,EAAE,OAAO,EAAE,CAAC;YACvB,UAA0C,CAAC,OAAO,GAAG,MAAM,CAAC,WAAW,CACtE,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,6CAA6C,CAAC,CAC5G,CAAC;QACJ,CAAC;IACH,CAAC;CACF","sourcesContent":["import Plugin from '@vaadin/hilla-generator-core/Plugin.js';\nimport type { SharedStorage } from '@vaadin/hilla-generator-core/SharedStorage.js';\nimport type { Writable } from 'type-fest';\nimport ts from 'typescript';\n\nexport default class TransferTypesPlugin extends Plugin {\n override get path(): string {\n return import.meta.url;\n }\n\n override execute({ api: { components }, transferTypes }: SharedStorage): void {\n transferTypes.set('com.vaadin.hilla.runtime.transfertypes.File', () => ts.factory.createTypeReferenceNode('File'));\n\n if (components?.schemas) {\n (components as Writable<typeof components>).schemas = Object.fromEntries(\n Object.entries(components.schemas).filter(([key]) => key !== 'com.vaadin.hilla.runtime.transfertypes.File'),\n );\n }\n }\n}\n"]}
1
+ {"mappings":"AAAA,OAAO,oDAAqD;AAG5D,OAAO,oBAAqB;AAE5B,eAAe,MAAM,4BAA4B,OAAO;CACtD,IAAa,OAAe;AAC1B,SAAO,OAAO,KAAK;CACpB;CAED,AAAS,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,eAA8B,EAAQ;AAC5E,gBAAc,IAAI,+CAA+C,MAAM,GAAG,QAAQ,wBAAwB,OAAO,CAAC;AAElH,MAAI,YAAY,SAAS;AACvB,GAAC,WAA2C,UAAU,OAAO,YAC3D,OAAO,QAAQ,WAAW,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK,QAAQ,8CAA8C,CAC5G;EACF;CACF;AACF","names":[],"sources":["/opt/agent/work/1af72d8adc613024/hilla/packages/ts/generator-plugin-transfertypes/src/index.ts"],"sourcesContent":["import Plugin from '@vaadin/hilla-generator-core/Plugin.js';\nimport type { SharedStorage } from '@vaadin/hilla-generator-core/SharedStorage.js';\nimport type { Writable } from 'type-fest';\nimport ts from 'typescript';\n\nexport default class TransferTypesPlugin extends Plugin {\n override get path(): string {\n return import.meta.url;\n }\n\n override execute({ api: { components }, transferTypes }: SharedStorage): void {\n transferTypes.set('com.vaadin.hilla.runtime.transfertypes.File', () => ts.factory.createTypeReferenceNode('File'));\n\n if (components?.schemas) {\n (components as Writable<typeof components>).schemas = Object.fromEntries(\n Object.entries(components.schemas).filter(([key]) => key !== 'com.vaadin.hilla.runtime.transfertypes.File'),\n );\n }\n }\n}\n"],"version":3}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/hilla-generator-plugin-transfertypes",
3
- "version": "24.7.0-alpha15",
3
+ "version": "24.7.0-beta3",
4
4
  "description": "A plugin to replace types in the generated code",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -9,14 +9,13 @@
9
9
  },
10
10
  "scripts": {
11
11
  "clean:build": "git clean -fx . -e .vite -e node_modules",
12
- "build": "concurrently npm:build:*",
13
- "build:transpile": "tsc --isolatedModules -p tsconfig.build.json",
14
- "build:copy": "cd src && copyfiles **/*.d.ts ..",
12
+ "build": "tsx ../../../scripts/fast-build.ts",
15
13
  "lint": "eslint src test",
16
14
  "lint:fix": "eslint src test --fix",
17
15
  "test": "vitest --run",
18
- "test:update": "vitest --update",
19
- "test:coverage": "vitest --coverage",
16
+ "test:coverage": "vitest --run --coverage",
17
+ "test:update": "vitest --run --update",
18
+ "test:watch": "vitest",
20
19
  "typecheck": "tsc --noEmit"
21
20
  },
22
21
  "exports": {
@@ -50,10 +49,10 @@
50
49
  "access": "public"
51
50
  },
52
51
  "dependencies": {
53
- "@vaadin/hilla-generator-core": "24.7.0-alpha15",
54
- "@vaadin/hilla-generator-plugin-client": "24.7.0-alpha15",
55
- "@vaadin/hilla-generator-plugin-model": "24.7.0-alpha15",
56
- "@vaadin/hilla-generator-utils": "24.7.0-alpha15",
52
+ "@vaadin/hilla-generator-core": "24.7.0-beta3",
53
+ "@vaadin/hilla-generator-plugin-client": "24.7.0-beta3",
54
+ "@vaadin/hilla-generator-plugin-model": "24.7.0-beta3",
55
+ "@vaadin/hilla-generator-utils": "24.7.0-beta3",
57
56
  "fast-deep-equal": "3.1.3",
58
57
  "openapi-types": "12.1.3",
59
58
  "typescript": "5.7.3"
package/index.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,wCAAwC,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAC;AAInF,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,MAAM;IACrD,IAAa,IAAI,IAAI,MAAM,CAE1B;IAEQ,OAAO,CAAC,EAAE,GAAG,EAAE,EAAE,UAAU,EAAE,EAAE,aAAa,EAAE,EAAE,aAAa,GAAG,IAAI;CAS9E"}