@xaendar/build-tools 0.3.11

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 (3) hide show
  1. package/index.js +223 -0
  2. package/index.js.map +1 -0
  3. package/package.json +11 -0
package/index.js ADDED
@@ -0,0 +1,223 @@
1
+ // ../packages/build-tools/src/lib/plugin.ts
2
+ import { compile } from "@xaendar/compiler";
3
+ import { basename, dirname as dirname2, extname, resolve as resolve2 } from "path";
4
+
5
+ // ../packages/build-tools/src/lib/costants.ts
6
+ var RENDER_PLACEHOLDER = "// __XAENDAR_RENDER__";
7
+ var TEMPLATE_EXTENSION = ".xd.component.html";
8
+ var COMPONENT_FILE_RE = /\.xd\.component\.ts$/;
9
+
10
+ // ../packages/build-tools/src/lib/node-compiler-host.model.ts
11
+ import { existsSync, readdirSync, readFileSync, realpathSync, statSync } from "fs";
12
+ import { dirname, resolve } from "path";
13
+ var NodeCompilerHost = class {
14
+ /**
15
+ * Reads the content of a file from disk as a UTF-8 string.
16
+ *
17
+ * Returns `undefined` instead of throwing when the file does not exist,
18
+ * is a directory, or cannot be read due to permission restrictions.
19
+ * The compiler treats `undefined` as a missing-file condition and emits
20
+ * an appropriate diagnostic.
21
+ *
22
+ * @param filePath - Absolute path of the file to read.
23
+ * @returns The file content as a UTF-8 string, or `undefined` on any
24
+ * filesystem error.
25
+ */
26
+ readFile(filePath) {
27
+ try {
28
+ return readFileSync(filePath, "utf-8");
29
+ } catch {
30
+ return void 0;
31
+ }
32
+ }
33
+ /**
34
+ * Checks whether a file exists and is accessible on disk.
35
+ *
36
+ * Uses `existsSync` rather than `accessSync` to avoid throwing —
37
+ * a missing file is an expected condition during path resolution,
38
+ * not an exceptional one.
39
+ *
40
+ * Returns `true` for both regular files and directories. Callers that
41
+ * need to distinguish between the two should combine this method with
42
+ * {@link isDirectory}.
43
+ *
44
+ * @param filePath - Absolute path of the file to check.
45
+ * @returns `true` if the path exists and is accessible, `false` otherwise.
46
+ */
47
+ fileExists(filePath) {
48
+ return existsSync(filePath);
49
+ }
50
+ /**
51
+ * Resolves a path relative to the **directory** containing the source file.
52
+ *
53
+ * Delegates to `path.resolve(path.dirname(from), to)` so that relative
54
+ * paths like `./button.xd.component.html` are resolved against the
55
+ * directory of the referencing file, not the current working directory.
56
+ *
57
+ * Absolute paths passed as `to` are returned unchanged by `path.resolve`
58
+ * and therefore work correctly without any special handling.
59
+ *
60
+ * Does not resolve path aliases (e.g. `@components/button.html`).
61
+ * Alias resolution must be performed by the caller before invoking
62
+ * this method, or by providing a subclass that overrides it.
63
+ *
64
+ * @param from - Absolute path of the source file that contains the
65
+ * reference (e.g. the `.ts` file of the component).
66
+ * @param to - Relative or absolute path to resolve.
67
+ * @returns The resolved absolute path of the target file.
68
+ *
69
+ * @example
70
+ * host.resolvePath(
71
+ * '/src/features/user/user.xd.component.ts',
72
+ * './user.xd.component.html',
73
+ * );
74
+ * // → '/src/features/user/user.xd.component.html'
75
+ */
76
+ resolvePath(from, to) {
77
+ return resolve(dirname(from), to);
78
+ }
79
+ /**
80
+ * Returns the names of all entries (files and subdirectories) inside
81
+ * a directory.
82
+ *
83
+ * Returns an empty array instead of throwing when the directory does
84
+ * not exist, is not readable, or `dirPath` points to a regular file.
85
+ * This matches the behaviour expected by the compiler during the
86
+ * discovery phase, where missing directories are not errors.
87
+ *
88
+ * The returned names are entry names only — not absolute paths. Callers
89
+ * must combine them with `dirPath` via {@link resolvePath} to obtain
90
+ * usable absolute paths.
91
+ *
92
+ * @param dirPath - Absolute path of the directory to read.
93
+ * @returns An array of entry names inside `dirPath`, or an empty array
94
+ * if the directory does not exist or cannot be read.
95
+ *
96
+ * @example
97
+ * host.getDirectoryEntries('/src/components');
98
+ * // → ['button', 'input', 'modal']
99
+ */
100
+ getDirectoryEntries(dirPath) {
101
+ try {
102
+ return readdirSync(dirPath);
103
+ } catch {
104
+ return [];
105
+ }
106
+ }
107
+ /**
108
+ * Checks whether the given path refers to a directory.
109
+ *
110
+ * Uses `statSync` rather than `lstatSync` so that symlinks to directories
111
+ * are correctly reported as directories. Returns `false` for non-existent
112
+ * paths, regular files, symlinks to files, and any path that causes
113
+ * `statSync` to throw (e.g. permission denied).
114
+ *
115
+ * @param filePath - Absolute path to check.
116
+ * @returns `true` if the path exists and is a directory (or a symlink
117
+ * to one), `false` in all other cases.
118
+ */
119
+ isDirectory(filePath) {
120
+ try {
121
+ return statSync(filePath).isDirectory();
122
+ } catch {
123
+ return false;
124
+ }
125
+ }
126
+ /**
127
+ * Resolves all symlinks in a path and returns the real physical path.
128
+ *
129
+ * Critical in npm monorepos where workspace packages are symlinked inside
130
+ * `node_modules`. Without real-path resolution the compiler may process
131
+ * the same physical file twice under different apparent paths, producing
132
+ * duplicate entries in the module graph and the output bundle.
133
+ *
134
+ * Falls back to returning `filePath` unchanged when `realpathSync` throws
135
+ * (e.g. the path does not exist or a symlink is dangling). This keeps the
136
+ * compiler operational even when the path cannot be fully resolved.
137
+ *
138
+ * @param filePath - Absolute path, potentially containing symlinks.
139
+ * @returns The real absolute path with all symlinks resolved, or
140
+ * `filePath` unchanged if resolution fails.
141
+ *
142
+ * @example
143
+ * // In an npm monorepo:
144
+ * // /app/node_modules/@xaendar/core → /packages/core/src
145
+ * host.getRealPath('/app/node_modules/@xaendar/core/index.ts');
146
+ * // → '/packages/core/src/index.ts'
147
+ */
148
+ getRealPath(filePath) {
149
+ try {
150
+ return realpathSync(filePath);
151
+ } catch {
152
+ return filePath;
153
+ }
154
+ }
155
+ /**
156
+ * Returns the current working directory of the Node.js process.
157
+ *
158
+ * Used by the compiler as the base for resolving relative paths that
159
+ * have no associated source file — for example paths passed as CLI
160
+ * arguments or specified in the project configuration file.
161
+ *
162
+ * @returns The absolute path of the current working directory.
163
+ */
164
+ getCurrentDirectory() {
165
+ return process.cwd();
166
+ }
167
+ };
168
+
169
+ // ../packages/build-tools/src/lib/plugin.ts
170
+ function xaendarPlugin() {
171
+ const host = new NodeCompilerHost();
172
+ return {
173
+ name: "xaendar",
174
+ transform(code, id) {
175
+ if (!COMPONENT_FILE_RE.test(id)) {
176
+ return null;
177
+ }
178
+ const templatePath = resolveTemplatePath(id);
179
+ this.addWatchFile(templatePath);
180
+ if (!host.fileExists(templatePath)) {
181
+ this.warn(`Xaendar: could not find template at ${templatePath}`);
182
+ return null;
183
+ }
184
+ const templateSource = host.readFile(templatePath);
185
+ if (templateSource === void 0) {
186
+ this.warn(`Xaendar: could not read template at ${templatePath}`);
187
+ return null;
188
+ }
189
+ let compiledMethods;
190
+ try {
191
+ compiledMethods = compile(templateSource);
192
+ } catch (err) {
193
+ this.error(`Xaendar: failed to compile template ${templatePath}:
194
+ ${String(err)}`);
195
+ }
196
+ let transformed;
197
+ try {
198
+ transformed = injectRenderMethods(code, compiledMethods);
199
+ } catch (err) {
200
+ this.error(String(err));
201
+ }
202
+ return {
203
+ code: transformed
204
+ };
205
+ }
206
+ };
207
+ }
208
+ function resolveTemplatePath(componentPath) {
209
+ const dir = dirname2(componentPath);
210
+ const base = basename(componentPath, extname(componentPath));
211
+ return resolve2(dir, `${base}${TEMPLATE_EXTENSION}`);
212
+ }
213
+ function injectRenderMethods(tsSource, compiledMethods) {
214
+ if (!tsSource.includes(RENDER_PLACEHOLDER)) {
215
+ throw new Error(`Xaendar: render placeholder '${RENDER_PLACEHOLDER}' not found in component source. Make sure the component was generated by the Xaendar CLI.`);
216
+ }
217
+ const methods = compiledMethods.trim().split(/\n(?=\w)/).map((fn) => ` private ${fn.trim()}`).join("\n\n");
218
+ return tsSource.replace(RENDER_PLACEHOLDER, methods);
219
+ }
220
+ export {
221
+ xaendarPlugin
222
+ };
223
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../packages/build-tools/src/lib/plugin.ts","../../../packages/build-tools/src/lib/costants.ts","../../../packages/build-tools/src/lib/node-compiler-host.model.ts"],"sourcesContent":["import { compile } from '@xaendar/compiler';\r\nimport { basename, dirname, extname, resolve } from 'node:path';\r\nimport type { Plugin } from 'vite';\r\nimport { COMPONENT_FILE_RE, RENDER_PLACEHOLDER, TEMPLATE_EXTENSION } from './costants.js';\r\nimport { NodeCompilerHost } from './node-compiler-host.model.js';\r\n\r\n/**\r\n * Vite plugin that compiles Xaendar DSL template files (`.xd.component.html`)\r\n * and injects the generated render methods into the associated component class.\r\n *\r\n * ## Dev mode\r\n *\r\n * Files are transformed on demand when the browser requests them. The plugin\r\n * registers the template as a watch file via `this.addWatchFile` so that\r\n * modifying the template invalidates the component module and triggers HMR.\r\n *\r\n * ## Production build\r\n *\r\n * The same `transform` hook runs for every component file during the esbuild\r\n * bundling phase. The output is handed to esbuild as TypeScript, which strips\r\n * the types and produces the final JavaScript bundle.\r\n *\r\n * @returns A Vite {@link Plugin} instance.\r\n *\r\n * @example\r\n * // vite.config.ts\r\n * import { defineConfig } from 'vite';\r\n * import { xaendarPlugin } from '@xaendar/build-tools';\r\n *\r\n * export default defineConfig({\r\n * plugins: [xaendarPlugin()],\r\n * });\r\n */\r\nexport function xaendarPlugin(): Plugin {\r\n const host = new NodeCompilerHost;\r\n\r\n return {\r\n name: 'xaendar',\r\n transform(code, id) {\r\n if (!COMPONENT_FILE_RE.test(id)) {\r\n return null;\r\n }\r\n\r\n const templatePath = resolveTemplatePath(id);\r\n this.addWatchFile(templatePath);\r\n\r\n if (!host.fileExists(templatePath)) {\r\n this.warn(`Xaendar: could not find template at ${templatePath}`);\r\n return null;\r\n }\r\n\r\n const templateSource = host.readFile(templatePath);\r\n if (templateSource === undefined) {\r\n this.warn(`Xaendar: could not read template at ${templatePath}`);\r\n return null;\r\n }\r\n\r\n let compiledMethods!: string;\r\n try {\r\n compiledMethods = compile(templateSource);\r\n } catch (err) {\r\n this.error(`Xaendar: failed to compile template ${templatePath}:\\n${String(err)}`);\r\n }\r\n\r\n let transformed!: string;\r\n try {\r\n transformed = injectRenderMethods(code, compiledMethods);\r\n } catch (err) {\r\n this.error(String(err));\r\n }\r\n\r\n return {\r\n code: transformed\r\n };\r\n },\r\n };\r\n}\r\n\r\n/**\r\n * Resolves the absolute path of the template file associated with a given\r\n * component `.ts` file, following the convention:\r\n *\r\n * ```\r\n * app.xd.component.ts → app.xd.component.html\r\n * ```\r\n *\r\n * @param componentPath - Absolute path of the component TypeScript file.\r\n * @returns Absolute path of the associated template file.\r\n */\r\nfunction resolveTemplatePath(componentPath: string): string {\r\n const dir = dirname(componentPath);\r\n const base = basename(componentPath, extname(componentPath));\r\n return resolve(dir, `${base}${TEMPLATE_EXTENSION}`);\r\n}\r\n\r\n/**\r\n * Injects the compiled render methods into the component class source by\r\n * replacing the `// __XAENDAR_RENDER__` placeholder.\r\n *\r\n * Each generated function (e.g. `_render`, `control_flow_if_2`) becomes\r\n * a private method of the class so that `this` and `this._root` resolve\r\n * correctly at runtime without any additional context parameter.\r\n *\r\n * @param tsSource - The original TypeScript source of the component file.\r\n * @param compiledMethods - The raw output of the compiler, already\r\n * formatted as class method bodies (no `function` keyword, no standalone\r\n * context parameter).\r\n * @returns The transformed TypeScript source with the placeholder replaced\r\n * by the compiled methods.\r\n * @throws {Error} When the placeholder is not found in the source — this\r\n * means the component file was not scaffolded correctly by the CLI.\r\n */\r\nfunction injectRenderMethods(tsSource: string, compiledMethods: string): string {\r\n if (!tsSource.includes(RENDER_PLACEHOLDER)) {\r\n throw new Error(`Xaendar: render placeholder '${RENDER_PLACEHOLDER}' not found in component source. Make sure the component was generated by the Xaendar CLI.`);\r\n }\r\n\r\n // Wrap each generated function as a private method.\r\n // The compiler emits bare function bodies — we add the `private` modifier\r\n // so they are invisible to subclasses while remaining accessible via `this`\r\n // at runtime (TypeScript `private` is erased by esbuild).\r\n const methods = compiledMethods\r\n .trim()\r\n .split(/\\n(?=\\w)/) // split on lines that start a new function definition\r\n .map((fn) => ` private ${fn.trim()}`)\r\n .join('\\n\\n');\r\n\r\n return tsSource.replace(RENDER_PLACEHOLDER, methods);\r\n}","/** \r\n * Placeholder inserted by the CLI scaffolder inside the component class. \r\n */\r\nexport const RENDER_PLACEHOLDER = '// __XAENDAR_RENDER__';\r\n\r\n/** \r\n * Extension of the Xaendar DSL template files. \r\n */\r\nexport const TEMPLATE_EXTENSION = '.xd.component.html';\r\n\r\n/** \r\n * Matches any TypeScript file that follows the Xaendar component convention. \r\n */\r\nexport const COMPONENT_FILE_RE = /\\.xd\\.component\\.ts$/;","import type { CompilerHost } from '@xaendar/compiler';\r\nimport { existsSync, readdirSync, readFileSync, realpathSync, statSync } from 'node:fs';\r\nimport { dirname, resolve } from 'node:path';\r\n\r\n/**\r\n * Node.js implementation of {@link CompilerHost}.\r\n *\r\n * Reads files synchronously from the real filesystem using the Node.js\r\n * `fs` and `path` modules. Intended for use in `build-tools` (Vite and\r\n * esbuild plugins) and `cli` (project and component generation).\r\n *\r\n * All methods are synchronous to match the expectations of the TypeScript\r\n * compiler host API and to keep the compiler pipeline free of async\r\n * complexity at the I/O level.\r\n *\r\n * Every method that interacts with the filesystem swallows OS-level errors\r\n * (e.g. `ENOENT`, `EACCES`) and returns a safe fallback value instead of\r\n * throwing. The compiler is responsible for turning missing or unreadable\r\n * files into structured diagnostics.\r\n *\r\n * @example\r\n * import { NodeCompilerHost } from '@xaendar/build-tools';\r\n * import { Compiler } from '@xaendar/compiler';\r\n *\r\n * const host = new NodeCompilerHost();\r\n * const compiler = new Compiler(host);\r\n * const result = compiler.compile('/absolute/path/to/template.xd.component.html');\r\n */\r\nexport class NodeCompilerHost implements CompilerHost {\r\n /**\r\n * Reads the content of a file from disk as a UTF-8 string.\r\n *\r\n * Returns `undefined` instead of throwing when the file does not exist,\r\n * is a directory, or cannot be read due to permission restrictions.\r\n * The compiler treats `undefined` as a missing-file condition and emits\r\n * an appropriate diagnostic.\r\n *\r\n * @param filePath - Absolute path of the file to read.\r\n * @returns The file content as a UTF-8 string, or `undefined` on any\r\n * filesystem error.\r\n */\r\n public readFile(filePath: string): string | undefined {\r\n try {\r\n return readFileSync(filePath, 'utf-8');\r\n } catch {\r\n return undefined;\r\n }\r\n }\r\n\r\n /**\r\n * Checks whether a file exists and is accessible on disk.\r\n *\r\n * Uses `existsSync` rather than `accessSync` to avoid throwing —\r\n * a missing file is an expected condition during path resolution,\r\n * not an exceptional one.\r\n *\r\n * Returns `true` for both regular files and directories. Callers that\r\n * need to distinguish between the two should combine this method with\r\n * {@link isDirectory}.\r\n *\r\n * @param filePath - Absolute path of the file to check.\r\n * @returns `true` if the path exists and is accessible, `false` otherwise.\r\n */\r\n public fileExists(filePath: string): boolean {\r\n return existsSync(filePath);\r\n }\r\n\r\n /**\r\n * Resolves a path relative to the **directory** containing the source file.\r\n *\r\n * Delegates to `path.resolve(path.dirname(from), to)` so that relative\r\n * paths like `./button.xd.component.html` are resolved against the\r\n * directory of the referencing file, not the current working directory.\r\n *\r\n * Absolute paths passed as `to` are returned unchanged by `path.resolve`\r\n * and therefore work correctly without any special handling.\r\n *\r\n * Does not resolve path aliases (e.g. `@components/button.html`).\r\n * Alias resolution must be performed by the caller before invoking\r\n * this method, or by providing a subclass that overrides it.\r\n *\r\n * @param from - Absolute path of the source file that contains the\r\n * reference (e.g. the `.ts` file of the component).\r\n * @param to - Relative or absolute path to resolve.\r\n * @returns The resolved absolute path of the target file.\r\n *\r\n * @example\r\n * host.resolvePath(\r\n * '/src/features/user/user.xd.component.ts',\r\n * './user.xd.component.html',\r\n * );\r\n * // → '/src/features/user/user.xd.component.html'\r\n */\r\n public resolvePath(from: string, to: string): string {\r\n return resolve(dirname(from), to);\r\n }\r\n\r\n /**\r\n * Returns the names of all entries (files and subdirectories) inside\r\n * a directory.\r\n *\r\n * Returns an empty array instead of throwing when the directory does\r\n * not exist, is not readable, or `dirPath` points to a regular file.\r\n * This matches the behaviour expected by the compiler during the\r\n * discovery phase, where missing directories are not errors.\r\n *\r\n * The returned names are entry names only — not absolute paths. Callers\r\n * must combine them with `dirPath` via {@link resolvePath} to obtain\r\n * usable absolute paths.\r\n *\r\n * @param dirPath - Absolute path of the directory to read.\r\n * @returns An array of entry names inside `dirPath`, or an empty array\r\n * if the directory does not exist or cannot be read.\r\n *\r\n * @example\r\n * host.getDirectoryEntries('/src/components');\r\n * // → ['button', 'input', 'modal']\r\n */\r\n public getDirectoryEntries(dirPath: string): string[] {\r\n try {\r\n return readdirSync(dirPath);\r\n } catch {\r\n return [];\r\n }\r\n }\r\n\r\n /**\r\n * Checks whether the given path refers to a directory.\r\n *\r\n * Uses `statSync` rather than `lstatSync` so that symlinks to directories\r\n * are correctly reported as directories. Returns `false` for non-existent\r\n * paths, regular files, symlinks to files, and any path that causes\r\n * `statSync` to throw (e.g. permission denied).\r\n *\r\n * @param filePath - Absolute path to check.\r\n * @returns `true` if the path exists and is a directory (or a symlink\r\n * to one), `false` in all other cases.\r\n */\r\n public isDirectory(filePath: string): boolean {\r\n try {\r\n return statSync(filePath).isDirectory();\r\n } catch {\r\n return false;\r\n }\r\n }\r\n\r\n /**\r\n * Resolves all symlinks in a path and returns the real physical path.\r\n *\r\n * Critical in npm monorepos where workspace packages are symlinked inside\r\n * `node_modules`. Without real-path resolution the compiler may process\r\n * the same physical file twice under different apparent paths, producing\r\n * duplicate entries in the module graph and the output bundle.\r\n *\r\n * Falls back to returning `filePath` unchanged when `realpathSync` throws\r\n * (e.g. the path does not exist or a symlink is dangling). This keeps the\r\n * compiler operational even when the path cannot be fully resolved.\r\n *\r\n * @param filePath - Absolute path, potentially containing symlinks.\r\n * @returns The real absolute path with all symlinks resolved, or\r\n * `filePath` unchanged if resolution fails.\r\n *\r\n * @example\r\n * // In an npm monorepo:\r\n * // /app/node_modules/@xaendar/core → /packages/core/src\r\n * host.getRealPath('/app/node_modules/@xaendar/core/index.ts');\r\n * // → '/packages/core/src/index.ts'\r\n */\r\n public getRealPath(filePath: string): string {\r\n try {\r\n return realpathSync(filePath);\r\n } catch {\r\n return filePath;\r\n }\r\n }\r\n\r\n /**\r\n * Returns the current working directory of the Node.js process.\r\n *\r\n * Used by the compiler as the base for resolving relative paths that\r\n * have no associated source file — for example paths passed as CLI\r\n * arguments or specified in the project configuration file.\r\n *\r\n * @returns The absolute path of the current working directory.\r\n */\r\n public getCurrentDirectory(): string {\r\n return process.cwd();\r\n }\r\n}"],"mappings":"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","names":["dirname","resolve","dirname","resolve"]}
package/package.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "@xaendar/build-tools",
3
+ "version": "0.3.11",
4
+ "description": "A library containing build tools for Xaendar framework",
5
+ "author": "Kaitenjo",
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "exports": {
9
+ ".": "./index.js"
10
+ }
11
+ }