design-embed 0.1.0 → 0.1.1

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 (40) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +93 -2
  3. package/dist/cli.d.mts +1 -0
  4. package/dist/cli.mjs +469 -0
  5. package/dist/index.d.mts +400 -0
  6. package/dist/index.mjs +2 -0
  7. package/dist/src-D3fnqGCq.mjs +511 -0
  8. package/package.json +8 -13
  9. package/src/cli.ts +18 -1
  10. package/src/commands/compile.ts +46 -63
  11. package/src/commands/generateTests.ts +17 -17
  12. package/src/commands/init.ts +54 -54
  13. package/src/commands/plugin.ts +3 -7
  14. package/src/targets/html.ts +68 -0
  15. package/dist/args.js +0 -36
  16. package/dist/cli.js +0 -35
  17. package/dist/commands/check.js +0 -4
  18. package/dist/commands/compile.js +0 -157
  19. package/dist/commands/generateTests.js +0 -113
  20. package/dist/commands/init.js +0 -102
  21. package/dist/commands/plugin.js +0 -68
  22. package/dist/index.js +0 -2
  23. package/node_modules/@design-embed/config/README.md +0 -5
  24. package/node_modules/@design-embed/config/dist/index.js +0 -283
  25. package/node_modules/@design-embed/config/package.json +0 -19
  26. package/node_modules/@design-embed/config/src/index.ts +0 -518
  27. package/node_modules/@design-embed/core/README.md +0 -5
  28. package/node_modules/@design-embed/core/dist/diagnostics/diagnostic.js +0 -3
  29. package/node_modules/@design-embed/core/dist/diagnostics/jsonDiagnostic.js +0 -35
  30. package/node_modules/@design-embed/core/dist/index.js +0 -351
  31. package/node_modules/@design-embed/core/dist/pipeline/checkMode.js +0 -29
  32. package/node_modules/@design-embed/core/dist/plugins/pluginApi.js +0 -1
  33. package/node_modules/@design-embed/core/dist/plugins/pluginRegistry.js +0 -25
  34. package/node_modules/@design-embed/core/package.json +0 -19
  35. package/node_modules/@design-embed/core/src/diagnostics/diagnostic.ts +0 -18
  36. package/node_modules/@design-embed/core/src/diagnostics/jsonDiagnostic.ts +0 -51
  37. package/node_modules/@design-embed/core/src/index.ts +0 -591
  38. package/node_modules/@design-embed/core/src/pipeline/checkMode.ts +0 -46
  39. package/node_modules/@design-embed/core/src/plugins/pluginApi.ts +0 -78
  40. package/node_modules/@design-embed/core/src/plugins/pluginRegistry.ts +0 -37
@@ -1,113 +0,0 @@
1
- import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
2
- import { dirname, isAbsolute, resolve } from "node:path";
3
- import { loadConfig } from "@design-embed/config";
4
- import { reactTestGenerator } from "@design-embed/target-react";
5
- import { getBooleanFlag, getFormat, getStringFlag } from "../args.js";
6
- import { printDiagnostics } from "./compile.js";
7
- export async function runGenerateTestsCommand(flags) {
8
- const cwd = resolve(process.cwd(), getStringFlag(flags, "--cwd") ?? ".");
9
- const configPath = getStringFlag(flags, "--config");
10
- const quiet = getBooleanFlag(flags, "--quiet");
11
- const format = getFormat(flags);
12
- const diagnostics = [];
13
- if (!configPath) {
14
- diagnostics.push({
15
- code: "CONFIG_REQUIRED",
16
- message: "--config is required for generate-tests.",
17
- severity: "error",
18
- });
19
- printDiagnostics(diagnostics, format, quiet);
20
- return 2;
21
- }
22
- const configResult = await loadConfig(configPath, cwd);
23
- diagnostics.push(...configResult.diagnostics);
24
- const config = configResult.config;
25
- if (!config || hasErrors(diagnostics)) {
26
- printDiagnostics(diagnostics, format, quiet);
27
- return 2;
28
- }
29
- const source = readConfiguredSource(config, configPath, cwd, diagnostics);
30
- if (!source || hasErrors(diagnostics)) {
31
- printDiagnostics(diagnostics, format, quiet);
32
- return 2;
33
- }
34
- const target = config.output?.target ?? "html";
35
- if (target !== "react") {
36
- diagnostics.push({
37
- code: "TEST_TARGET_UNSUPPORTED",
38
- message: `generate-tests currently supports target "react"; received "${target}".`,
39
- severity: "error",
40
- });
41
- printDiagnostics(diagnostics, format, quiet);
42
- return 2;
43
- }
44
- const result = reactTestGenerator.generateTests({
45
- html: source.html,
46
- css: source.css,
47
- config,
48
- diagnostics,
49
- });
50
- if (hasErrors(diagnostics)) {
51
- printDiagnostics(diagnostics, format, quiet);
52
- return 2;
53
- }
54
- for (const file of result.files) {
55
- const outPath = resolve(cwd, file.path);
56
- mkdirSync(dirname(outPath), { recursive: true });
57
- writeFileSync(outPath, file.contents, "utf-8");
58
- if (!quiet && format === "text") {
59
- console.log(`Wrote ${file.path}`);
60
- }
61
- }
62
- printDiagnostics(diagnostics, format, quiet);
63
- if (!quiet && format === "text") {
64
- console.log(`Success. Generated ${result.files.length} test file(s).`);
65
- }
66
- return 0;
67
- }
68
- function readConfiguredSource(config, configPath, cwd, diagnostics) {
69
- const source = config.tests?.source;
70
- if (!source?.html) {
71
- diagnostics.push({
72
- code: "TEST_SOURCE_HTML_REQUIRED",
73
- message: "tests.source.html is required for generate-tests.",
74
- severity: "error",
75
- });
76
- return undefined;
77
- }
78
- const configDir = dirname(resolve(cwd, configPath));
79
- const htmlPath = resolveConfigPath(source.html, configDir);
80
- if (!existsSync(htmlPath)) {
81
- diagnostics.push({
82
- code: "TEST_SOURCE_HTML_NOT_FOUND",
83
- message: `Test source HTML not found: ${htmlPath}`,
84
- severity: "error",
85
- file: source.html,
86
- });
87
- return undefined;
88
- }
89
- let css;
90
- if (source.css) {
91
- const cssPath = resolveConfigPath(source.css, configDir);
92
- if (!existsSync(cssPath)) {
93
- diagnostics.push({
94
- code: "TEST_SOURCE_CSS_NOT_FOUND",
95
- message: `Test source CSS not found: ${cssPath}`,
96
- severity: "error",
97
- file: source.css,
98
- });
99
- return undefined;
100
- }
101
- css = readFileSync(cssPath, "utf-8");
102
- }
103
- return {
104
- html: readFileSync(htmlPath, "utf-8"),
105
- css,
106
- };
107
- }
108
- function resolveConfigPath(path, configDir) {
109
- return isAbsolute(path) ? path : resolve(configDir, path);
110
- }
111
- function hasErrors(diagnostics) {
112
- return diagnostics.some((diagnostic) => diagnostic.severity === "error");
113
- }
@@ -1,102 +0,0 @@
1
- import { existsSync, mkdirSync, writeFileSync } from "node:fs";
2
- import { dirname, resolve } from "node:path";
3
- import { getBooleanFlag, getFormat, getStringFlag } from "../args.js";
4
- import { printDiagnostics } from "./compile.js";
5
- export async function runInitCommand(flags) {
6
- const cwd = resolve(process.cwd(), getStringFlag(flags, "--cwd") ?? ".");
7
- const quiet = getBooleanFlag(flags, "--quiet");
8
- const force = getBooleanFlag(flags, "--force");
9
- const format = getFormat(flags);
10
- const viewName = getStringFlag(flags, "--view-name") ?? "WelcomeHero";
11
- const diagnostics = [];
12
- const files = [
13
- {
14
- path: "design-embed.config.ts",
15
- contents: configTemplate(viewName),
16
- },
17
- {
18
- path: "design.html",
19
- contents: designHtmlTemplate(),
20
- },
21
- {
22
- path: "playwright-ct.config.ts",
23
- contents: playwrightConfigTemplate(),
24
- },
25
- ];
26
- let written = 0;
27
- for (const file of files) {
28
- const outPath = resolve(cwd, file.path);
29
- if (existsSync(outPath) && !force) {
30
- diagnostics.push({
31
- code: "INIT_FILE_EXISTS",
32
- message: `Skipped existing file: ${file.path}. Pass --force to overwrite it.`,
33
- severity: "warning",
34
- file: file.path,
35
- });
36
- continue;
37
- }
38
- mkdirSync(dirname(outPath), { recursive: true });
39
- writeFileSync(outPath, file.contents, "utf-8");
40
- written += 1;
41
- if (!quiet && format === "text") {
42
- console.log(`Wrote ${file.path}`);
43
- }
44
- }
45
- printDiagnostics(diagnostics, format, quiet);
46
- if (!quiet && format === "text") {
47
- console.log(`Success. Initialized design-embed with ${written} file(s).`);
48
- console.log("Next: pnpm exec design-embed --input ./design.html --config ./design-embed.config.ts");
49
- }
50
- return 0;
51
- }
52
- function configTemplate(viewName) {
53
- return `import { defineConfig } from "design-embed";
54
-
55
- export default defineConfig({
56
- \toutput: {
57
- \t\ttarget: "react",
58
- \t\tviewName: "${viewName}",
59
- \t\tviewsDir: "src/generated/views",
60
- \t\tstyleMode: "inline",
61
- \t},
62
- \ttests: {
63
- \t\toutputDir: "tests/generated/design-embed",
64
- \t\trunner: "playwright",
65
- \t\tsource: {
66
- \t\t\thtml: "./design.html",
67
- \t\t},
68
- \t\tviewports: [
69
- \t\t\t{ name: "mobile", width: 390, height: 844 },
70
- \t\t\t{ name: "desktop", width: 1440, height: 900 },
71
- \t\t],
72
- \t\tstates: [{ name: "default" }],
73
- \t\tassertions: {
74
- \t\t\tscreenshot: true,
75
- \t\t\tlayout: true,
76
- \t\t\tlayoutTolerance: 1,
77
- \t\t\tselectors: [":scope", ":scope *"],
78
- \t\t},
79
- \t},
80
- });
81
- `;
82
- }
83
- function designHtmlTemplate() {
84
- return `<section style="box-sizing: border-box; width: 320px; padding: 24px; border-radius: 16px; background: #f8fafc; color: #0f172a; font-family: Arial, sans-serif;">
85
- \t<p style="margin: 0 0 8px; color: #2563eb; font-size: 14px; font-weight: 700;">Design Embed</p>
86
- \t<h1 style="margin: 0 0 12px; font-size: 32px; line-height: 1.1;">Welcome hero</h1>
87
- \t<p style="margin: 0 0 20px; font-size: 16px; line-height: 1.5;">Replace this file with HTML exported from your design source.</p>
88
- \t<button data-role="primary" style="border: 0; border-radius: 999px; padding: 12px 18px; background: #2563eb; color: white; font-size: 14px; font-weight: 700;">Get started</button>
89
- </section>
90
- `;
91
- }
92
- function playwrightConfigTemplate() {
93
- return `import { defineConfig } from "@playwright/experimental-ct-react";
94
-
95
- export default defineConfig({
96
- \ttestDir: ".",
97
- \tuse: {
98
- \t\tctPort: 3100,
99
- \t},
100
- });
101
- `;
102
- }
@@ -1,68 +0,0 @@
1
- import { mkdirSync, writeFileSync } from "node:fs";
2
- import { dirname, resolve } from "node:path";
3
- import { loadConfig } from "@design-embed/config";
4
- import { getStringFlag } from "../args.js";
5
- export async function runPluginCommand(_name, flags) {
6
- const configPath = getStringFlag(flags, "--config");
7
- if (!configPath) {
8
- console.error("Error: --config is required.");
9
- return 2;
10
- }
11
- const cwd = process.cwd();
12
- const configResult = await loadConfig(configPath, cwd);
13
- for (const diagnostic of configResult.diagnostics) {
14
- if (diagnostic.severity === "error") {
15
- console.error(`error: ${diagnostic.code}: ${diagnostic.message}`);
16
- }
17
- else {
18
- console.warn(`${diagnostic.severity}: ${diagnostic.code}: ${diagnostic.message}`);
19
- }
20
- }
21
- if (configResult.diagnostics.some((d) => d.severity === "error")) {
22
- return 2;
23
- }
24
- const outPath = getStringFlag(flags, "--out");
25
- if (!outPath) {
26
- console.error("Error: --out is required.");
27
- return 2;
28
- }
29
- const plugin = findSourcePlugin(configResult.config?.plugins);
30
- if (!plugin) {
31
- console.error("Error: config must include a source plugin instance in the plugins array (e.g. new FigmaHtmlPlugin({ ... })).");
32
- return 2;
33
- }
34
- const result = await plugin.run({ cwd, args: {} });
35
- for (const diagnostic of result.diagnostics) {
36
- const output = `${diagnostic.severity}: ${diagnostic.code}: ${diagnostic.message}`;
37
- if (diagnostic.severity === "error") {
38
- console.error(output);
39
- }
40
- else {
41
- console.warn(output);
42
- }
43
- }
44
- if (result.diagnostics.some((d) => d.severity === "error")) {
45
- return 2;
46
- }
47
- if (!result.html) {
48
- console.error("Error: source plugin produced no HTML.");
49
- return 2;
50
- }
51
- const resolvedOutPath = resolve(cwd, outPath);
52
- mkdirSync(dirname(resolvedOutPath), { recursive: true });
53
- writeFileSync(resolvedOutPath, result.html, "utf-8");
54
- console.log(`Wrote ${outPath}`);
55
- for (const file of result.files ?? []) {
56
- const resolvedPath = resolve(cwd, file.path);
57
- mkdirSync(dirname(resolvedPath), { recursive: true });
58
- writeFileSync(resolvedPath, file.contents, "utf-8");
59
- console.log(`Wrote ${file.path}`);
60
- }
61
- return 0;
62
- }
63
- function isSourcePlugin(plugin) {
64
- return typeof plugin.run === "function";
65
- }
66
- function findSourcePlugin(plugins) {
67
- return plugins?.find(isSourcePlugin);
68
- }
package/dist/index.js DELETED
@@ -1,2 +0,0 @@
1
- export * from "@design-embed/config";
2
- export * from "@design-embed/core";
@@ -1,5 +0,0 @@
1
- # @design-embed/config
2
-
3
- Internal configuration loading and validation for design-embed.
4
-
5
- It parses the project config format used by the compiler, validates supported output targets, style modes, component mappings, token settings, plugin settings, and local transformer declarations. It also reports config diagnostics in a stable shape so callers can fail early before compilation begins.
@@ -1,283 +0,0 @@
1
- import { existsSync } from "node:fs";
2
- import { dirname, isAbsolute, resolve } from "node:path";
3
- import { pathToFileURL } from "node:url";
4
- /**
5
- * Helper to define configuration with type safety.
6
- *
7
- * @param config - The configuration object.
8
- * @returns The same configuration object.
9
- *
10
- * @example
11
- * export default defineConfig({
12
- * output: { target: 'react' }
13
- * });
14
- */
15
- export function defineConfig(config) {
16
- return config;
17
- }
18
- /**
19
- * Asynchronously loads a configuration file from disk.
20
- * Supports .ts, .js, and .mjs files via dynamic import.
21
- *
22
- * @param configPath - Path to the config file.
23
- * @param cwd - Current working directory.
24
- * @returns A promise resolving to the load result.
25
- */
26
- export async function loadConfig(configPath, cwd = process.cwd()) {
27
- const diagnostics = [];
28
- const resolvedPath = isAbsolute(configPath)
29
- ? configPath
30
- : resolve(cwd, configPath);
31
- if (!existsSync(resolvedPath)) {
32
- return {
33
- diagnostics: [
34
- {
35
- code: "CONFIG_NOT_FOUND",
36
- message: `Config file not found: ${resolvedPath}`,
37
- severity: "error",
38
- },
39
- ],
40
- };
41
- }
42
- if (!/\.(ts|js|mjs)$/.test(resolvedPath)) {
43
- return {
44
- diagnostics: [
45
- {
46
- code: "CONFIG_UNSUPPORTED_FORMAT",
47
- message: `Unsupported config format: ${resolvedPath}. Only .ts, .js, and .mjs are supported.`,
48
- severity: "error",
49
- },
50
- ],
51
- };
52
- }
53
- try {
54
- const module = await import(pathToFileURL(resolvedPath).href);
55
- const config = module.default ?? module.config;
56
- if (!config) {
57
- return {
58
- diagnostics: [
59
- {
60
- code: "CONFIG_INVALID",
61
- message: `Config file must export a default object or a named 'config' object: ${resolvedPath}`,
62
- severity: "error",
63
- },
64
- ],
65
- };
66
- }
67
- diagnostics.push(...validateConfig(config));
68
- diagnostics.push(...validateTransformerPaths(config, dirname(resolvedPath)));
69
- return { config, diagnostics };
70
- }
71
- catch (error) {
72
- const message = error instanceof Error ? error.message : String(error);
73
- return {
74
- diagnostics: [
75
- {
76
- code: "CONFIG_INVALID",
77
- message: `Failed to load config file: ${message}`,
78
- severity: "error",
79
- },
80
- ],
81
- };
82
- }
83
- }
84
- export function validateConfig(config) {
85
- const diagnostics = [];
86
- const target = config.output?.target;
87
- const styleMode = config.output?.styleMode;
88
- if (target && target !== "html" && target !== "react") {
89
- diagnostics.push({
90
- code: "UNSUPPORTED_TARGET",
91
- message: `Unsupported output target: ${target}`,
92
- severity: "error",
93
- });
94
- }
95
- if (styleMode &&
96
- styleMode !== "inline" &&
97
- styleMode !== "css-modules" &&
98
- styleMode !== "tailwind") {
99
- diagnostics.push({
100
- code: "STYLE_MODE_UNSUPPORTED",
101
- message: `Unsupported style mode: ${styleMode}`,
102
- severity: "error",
103
- });
104
- }
105
- for (const [index, component] of (config.components ?? []).entries()) {
106
- if (!component.selector || typeof component.selector !== "string") {
107
- diagnostics.push({
108
- code: "COMPONENT_SELECTOR_INVALID",
109
- message: `Component mapping ${index} must include a selector.`,
110
- severity: "error",
111
- });
112
- }
113
- if (!component.component || typeof component.component !== "string") {
114
- diagnostics.push({
115
- code: "COMPONENT_IMPORT_INVALID",
116
- message: `Component mapping ${index} must include a component path.`,
117
- severity: "error",
118
- });
119
- }
120
- }
121
- const spacing = config.tokens?.spacing;
122
- if (spacing?.unit && spacing.unit !== "px" && spacing.unit !== "rem") {
123
- diagnostics.push({
124
- code: "TOKEN_SPACING_UNIT_INVALID",
125
- message: `Unsupported spacing unit: ${spacing.unit}`,
126
- severity: "error",
127
- });
128
- }
129
- if (spacing?.threshold !== undefined && !Number.isFinite(spacing.threshold)) {
130
- diagnostics.push({
131
- code: "TOKEN_SPACING_THRESHOLD_INVALID",
132
- message: "Spacing threshold must be a finite number.",
133
- severity: "error",
134
- });
135
- }
136
- for (const [name, value] of Object.entries(spacing?.values ?? {})) {
137
- if (!Number.isFinite(value)) {
138
- diagnostics.push({
139
- code: "TOKEN_SPACING_VALUE_INVALID",
140
- message: `Spacing token ${name} must be a finite number.`,
141
- severity: "error",
142
- });
143
- }
144
- }
145
- for (const [name, value] of Object.entries(config.tokens?.colors ?? {})) {
146
- if (!/^#[0-9a-f]{3}([0-9a-f]{3})?$/i.test(value)) {
147
- diagnostics.push({
148
- code: "TOKEN_COLOR_INVALID",
149
- message: `Color token ${name} must be a hex color.`,
150
- severity: "error",
151
- });
152
- }
153
- }
154
- if (config.tokens?.colorThreshold !== undefined &&
155
- !Number.isFinite(config.tokens.colorThreshold)) {
156
- diagnostics.push({
157
- code: "TOKEN_COLOR_THRESHOLD_INVALID",
158
- message: "Color threshold must be a finite number.",
159
- severity: "error",
160
- });
161
- }
162
- for (const [groupName, group] of Object.entries({
163
- sizing: config.tokens?.sizing,
164
- typography: config.tokens?.typography,
165
- })) {
166
- if (!group) {
167
- continue;
168
- }
169
- if (group.unit && group.unit !== "px" && group.unit !== "rem") {
170
- diagnostics.push({
171
- code: "TOKEN_NUMERIC_UNIT_INVALID",
172
- message: `Unsupported ${groupName} unit: ${group.unit}`,
173
- severity: "error",
174
- });
175
- }
176
- if (group.threshold !== undefined && !Number.isFinite(group.threshold)) {
177
- diagnostics.push({
178
- code: "TOKEN_NUMERIC_THRESHOLD_INVALID",
179
- message: `${groupName} threshold must be a finite number.`,
180
- severity: "error",
181
- });
182
- }
183
- for (const [name, value] of Object.entries(group.values ?? {})) {
184
- if (!Number.isFinite(value)) {
185
- diagnostics.push({
186
- code: "TOKEN_NUMERIC_VALUE_INVALID",
187
- message: `${groupName} token ${name} must be a finite number.`,
188
- severity: "error",
189
- });
190
- }
191
- }
192
- }
193
- for (const [index, transformer] of (config.transformers ?? []).entries()) {
194
- if (!transformer.path || typeof transformer.path !== "string") {
195
- diagnostics.push({
196
- code: "TRANSFORMER_PATH_INVALID",
197
- message: `Transformer ${index} must include a path.`,
198
- severity: "error",
199
- });
200
- }
201
- if (transformer.order !== undefined &&
202
- !Number.isFinite(transformer.order)) {
203
- diagnostics.push({
204
- code: "TRANSFORMER_ORDER_INVALID",
205
- message: `Transformer ${index} order must be a finite number.`,
206
- severity: "error",
207
- });
208
- }
209
- }
210
- validateTestGeneration(config.tests, diagnostics);
211
- return diagnostics;
212
- }
213
- function validateTestGeneration(tests, diagnostics) {
214
- if (!tests) {
215
- return;
216
- }
217
- if (tests.runner && tests.runner !== "playwright") {
218
- diagnostics.push({
219
- code: "TEST_RUNNER_UNSUPPORTED",
220
- message: `Unsupported test runner: ${tests.runner}`,
221
- severity: "error",
222
- });
223
- }
224
- for (const [index, viewport] of (tests.viewports ?? []).entries()) {
225
- if (!Number.isFinite(viewport.width) || viewport.width <= 0) {
226
- diagnostics.push({
227
- code: "TEST_VIEWPORT_WIDTH_INVALID",
228
- message: `Test viewport ${index} width must be a positive finite number.`,
229
- severity: "error",
230
- });
231
- }
232
- if (!Number.isFinite(viewport.height) || viewport.height <= 0) {
233
- diagnostics.push({
234
- code: "TEST_VIEWPORT_HEIGHT_INVALID",
235
- message: `Test viewport ${index} height must be a positive finite number.`,
236
- severity: "error",
237
- });
238
- }
239
- }
240
- for (const [index, state] of (tests.states ?? []).entries()) {
241
- if (!state.name || typeof state.name !== "string") {
242
- diagnostics.push({
243
- code: "TEST_STATE_NAME_INVALID",
244
- message: `Test state ${index} must include a name.`,
245
- severity: "error",
246
- });
247
- }
248
- }
249
- if (tests.assertions?.layoutTolerance !== undefined &&
250
- (!Number.isFinite(tests.assertions.layoutTolerance) ||
251
- tests.assertions.layoutTolerance < 0)) {
252
- diagnostics.push({
253
- code: "TEST_LAYOUT_TOLERANCE_INVALID",
254
- message: "Test layout tolerance must be a finite number greater than or equal to 0.",
255
- severity: "error",
256
- });
257
- }
258
- }
259
- function isPackageName(path) {
260
- return !path.startsWith(".") && !isAbsolute(path);
261
- }
262
- function validateTransformerPaths(config, configDir) {
263
- const diagnostics = [];
264
- for (const transformer of config.transformers ?? []) {
265
- if (!transformer.path || typeof transformer.path !== "string") {
266
- continue;
267
- }
268
- if (isPackageName(transformer.path)) {
269
- continue;
270
- }
271
- const resolvedPath = isAbsolute(transformer.path)
272
- ? transformer.path
273
- : resolve(configDir, transformer.path);
274
- if (!existsSync(resolvedPath)) {
275
- diagnostics.push({
276
- code: "TRANSFORMER_NOT_FOUND",
277
- message: `Transformer file not found: ${resolvedPath}`,
278
- severity: "error",
279
- });
280
- }
281
- }
282
- return diagnostics;
283
- }
@@ -1,19 +0,0 @@
1
- {
2
- "name": "@design-embed/config",
3
- "version": "0.1.0",
4
- "type": "module",
5
- "private": true,
6
- "exports": {
7
- ".": {
8
- "types": "./src/index.ts",
9
- "development": "./src/index.ts",
10
- "default": "./dist/index.js"
11
- }
12
- },
13
- "files": [
14
- "dist",
15
- "src",
16
- "!src/**/*.test.ts",
17
- "README.md"
18
- ]
19
- }