@vaadin/hilla-generator-plugin-client 24.4.0-alpha2 → 24.4.0-alpha4
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/ClientProcessor.d.ts.map +1 -1
- package/ClientProcessor.js +4 -1
- package/ClientProcessor.js.map +2 -2
- package/package.json +4 -4
package/ClientProcessor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientProcessor.d.ts","sourceRoot":"","sources":["src/ClientProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,wCAAwC,CAAC;AAKjE,OAAW,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,CAAC,OAAO,OAAO,eAAe;;gBAItB,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAK3C,OAAO,IAAI,UAAU;
|
|
1
|
+
{"version":3,"file":"ClientProcessor.d.ts","sourceRoot":"","sources":["src/ClientProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,wCAAwC,CAAC;AAKjE,OAAW,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,CAAC,OAAO,OAAO,eAAe;;gBAItB,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAK3C,OAAO,IAAI,UAAU;CAuCtB"}
|
package/ClientProcessor.js
CHANGED
|
@@ -13,7 +13,10 @@ class ClientProcessor {
|
|
|
13
13
|
process() {
|
|
14
14
|
this.#owner.logger.debug(`Generating ${this.#outputPath}`);
|
|
15
15
|
const { exports, imports, paths } = new DependencyManager(new PathManager({ extension: ".js" }));
|
|
16
|
-
const clientClassId = imports.named.add(
|
|
16
|
+
const clientClassId = imports.named.add(
|
|
17
|
+
paths.createBareModulePath("@vaadin/hilla-frontend", false),
|
|
18
|
+
"ConnectClient"
|
|
19
|
+
);
|
|
17
20
|
const clientVarId = createFullyUniqueIdentifier("client");
|
|
18
21
|
exports.default.set(clientVarId);
|
|
19
22
|
const declaration = ts.factory.createVariableStatement(
|
package/ClientProcessor.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["src/ClientProcessor.ts"],
|
|
4
|
-
"sourcesContent": ["import type Plugin from '@vaadin/hilla-generator-core/Plugin.js';\nimport createFullyUniqueIdentifier from '@vaadin/hilla-generator-utils/createFullyUniqueIdentifier.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 ts, { type SourceFile } from 'typescript';\n\nexport default class ClientProcessor {\n readonly #owner: Plugin;\n readonly #outputPath: string;\n\n constructor(fileName: string, owner: Plugin) {\n this.#outputPath = new PathManager({ extension: 'ts' }).createRelativePath(fileName);\n this.#owner = owner;\n }\n\n process(): SourceFile {\n this.#owner.logger.debug(`Generating ${this.#outputPath}`);\n\n const { exports, imports, paths } = new DependencyManager(new PathManager({ extension: '.js' }));\n const clientClassId = imports.named.add(paths.createBareModulePath('@vaadin/hilla-
|
|
5
|
-
"mappings": "AACA,OAAO,iCAAiC;AACxC,OAAO,sBAAsB;AAC7B,OAAO,uBAAuB;AAC9B,OAAO,iBAAiB;AACxB,OAAO,YAA6B;AAEpC,MAAO,gBAA8B;AAAA,EAC1B;AAAA,EACA;AAAA,EAET,YAAY,UAAkB,OAAe;AAC3C,SAAK,cAAc,IAAI,YAAY,EAAE,WAAW,KAAK,CAAC,EAAE,mBAAmB,QAAQ;AACnF,SAAK,SAAS;AAAA,EAChB;AAAA,EAEA,UAAsB;AACpB,SAAK,OAAO,OAAO,MAAM,cAAc,KAAK,WAAW,EAAE;AAEzD,UAAM,EAAE,SAAS,SAAS,MAAM,IAAI,IAAI,kBAAkB,IAAI,YAAY,EAAE,WAAW,MAAM,CAAC,CAAC;AAC/F,UAAM,gBAAgB,QAAQ,MAAM,
|
|
4
|
+
"sourcesContent": ["import type Plugin from '@vaadin/hilla-generator-core/Plugin.js';\nimport createFullyUniqueIdentifier from '@vaadin/hilla-generator-utils/createFullyUniqueIdentifier.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 ts, { type SourceFile } from 'typescript';\n\nexport default class ClientProcessor {\n readonly #owner: Plugin;\n readonly #outputPath: string;\n\n constructor(fileName: string, owner: Plugin) {\n this.#outputPath = new PathManager({ extension: 'ts' }).createRelativePath(fileName);\n this.#owner = owner;\n }\n\n process(): SourceFile {\n this.#owner.logger.debug(`Generating ${this.#outputPath}`);\n\n const { exports, imports, paths } = new DependencyManager(new PathManager({ extension: '.js' }));\n const clientClassId = imports.named.add(\n paths.createBareModulePath('@vaadin/hilla-frontend', false),\n 'ConnectClient',\n );\n\n const clientVarId = createFullyUniqueIdentifier('client');\n exports.default.set(clientVarId);\n\n const declaration = ts.factory.createVariableStatement(\n undefined,\n ts.factory.createVariableDeclarationList(\n [\n ts.factory.createVariableDeclaration(\n clientVarId,\n undefined,\n undefined,\n ts.factory.createNewExpression(clientClassId, undefined, [\n ts.factory.createObjectLiteralExpression(\n [\n ts.factory.createPropertyAssignment(\n ts.factory.createIdentifier('prefix'),\n ts.factory.createStringLiteral('connect'),\n ),\n ],\n false,\n ),\n ]),\n ),\n ],\n ts.NodeFlags.Const,\n ),\n );\n\n return createSourceFile([...imports.toCode(), declaration, ...exports.toCode()], this.#outputPath);\n }\n}\n"],
|
|
5
|
+
"mappings": "AACA,OAAO,iCAAiC;AACxC,OAAO,sBAAsB;AAC7B,OAAO,uBAAuB;AAC9B,OAAO,iBAAiB;AACxB,OAAO,YAA6B;AAEpC,MAAO,gBAA8B;AAAA,EAC1B;AA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": "24.4.0-alpha4",
|
|
4
4
|
"description": "A Hilla TypeScript Generator plugin to generate default client implementation",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -51,14 +51,14 @@
|
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@vaadin/hilla-generator-core": "24.4.0-
|
|
54
|
+
"@vaadin/hilla-generator-core": "24.4.0-alpha4"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@vaadin/hilla-generator-utils": "24.4.0-
|
|
57
|
+
"@vaadin/hilla-generator-utils": "24.4.0-alpha4",
|
|
58
58
|
"typescript": "5.3.2"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@vaadin/hilla-generator-core": "24.4.0-
|
|
61
|
+
"@vaadin/hilla-generator-core": "24.4.0-alpha4",
|
|
62
62
|
"@types/chai": "^4.3.6",
|
|
63
63
|
"@types/mocha": "^10.0.2",
|
|
64
64
|
"@types/node": "^20.7.1",
|