@likec4/config 1.47.0 → 1.49.0

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.
@@ -1,42 +1,332 @@
1
- import { invariant } from '@likec4/core';
2
- import { bundleRequire } from 'bundle-require';
3
- import * as fs from 'node:fs/promises';
4
- import { dirname } from 'node:path';
5
- import { b as isLikeC4JsonConfig, v as validateProjectConfig, c as isLikeC4NonJsonConfig, d as defineConfig } from '../shared/config.CUC_rqhf.mjs';
6
- export { C as ConfigFilenames, e as defineGenerators, f as defineStyle, g as defineTheme, h as defineThemeColor, i as isLikeC4Config, n as normalizeIncludeConfig, a as validateIncludePaths } from '../shared/config.CUC_rqhf.mjs';
7
- import { rootLogger } from '@likec4/log';
8
-
9
- const logger = rootLogger.getChild("config");
10
-
1
+ import { t as defu } from "../_chunks/libs/defu.mjs";
2
+ import { i as t, n as t$1, r as e, t as n } from "../_chunks/libs/remeda.mjs";
3
+ import JSON5 from "json5";
4
+ import z from "zod/v4";
5
+ import { BorderStyles, ElementShapes, IconPositions, RelationshipArrowTypes, Sizes, ThemeColors, computeColorValues } from "@likec4/core/styles";
6
+ import { exact } from "@likec4/core/types";
7
+ import { basename } from "pathe";
8
+ import { invariant } from "@likec4/core";
9
+ import { logger, wrapError } from "@likec4/log";
10
+ import { bundleRequire } from "bundle-require";
11
+ import { formatMessagesSync } from "esbuild";
12
+ import * as fs from "node:fs/promises";
13
+ import { basename as basename$1, dirname, resolve } from "node:path";
14
+ const IMAGE_ALIAS_KEY_REGEX = /^@[A-Za-z0-9_-]*$/;
15
+ const IMAGE_ALIAS_VALUE_REGEX = /^(?!\/|[A-Za-z]:[\\\/])(?!.*:\/\/).*$/;
16
+ const ImageAliasKey = z.string().min(1, "Image alias key cannot be empty").regex(IMAGE_ALIAS_KEY_REGEX, "Image alias key must match /^@\\w+$/");
17
+ const ImageAliasValue = z.string().min(1, "Image alias value cannot be empty").regex(IMAGE_ALIAS_VALUE_REGEX, "Image alias value must be a relative path (no leading slash or protocol)");
18
+ const ImageAliasesSchema = z.record(ImageAliasKey, ImageAliasValue).meta({
19
+ id: "ImageAliases",
20
+ description: "Map of image alias prefixes to relative paths (keys must match /^@\\w+$/; values must be relative paths without protocol or leading slash)."
21
+ });
22
+ const IncludePathValue = z.string().min(1, "Include path cannot be empty").regex(/^(?!\/|[A-Za-z]:[\\\/])(?!.*:\/\/).*$/, "Include path must be a relative path (no leading slash, drive letter, or protocol)");
23
+ const IncludeSchema = z.strictObject({
24
+ paths: z.array(IncludePathValue).meta({ description: [
25
+ "Additional relative directory paths to include LikeC4 source files from, searched recursively.",
26
+ "Paths are relative to the project folder (the folder containing this config file).",
27
+ "Example: [\"../shared\", \"../common/specs\"]"
28
+ ].join("\n") }),
29
+ maxDepth: z.number().int().min(1).max(20).default(3).meta({ description: [
30
+ "Maximum directory depth to scan when searching for .c4 files in include paths.",
31
+ "Prevents excessive scanning of deeply nested directories.",
32
+ "Default: 3"
33
+ ].join("\n") }),
34
+ fileThreshold: z.number().int().min(1).max(1e4).default(30).meta({ description: [
35
+ "Maximum number of files to load from include paths before warning.",
36
+ "Helps identify performance issues from accidentally including large directories.",
37
+ "Default: 30"
38
+ ].join("\n") })
39
+ }).meta({
40
+ id: "include-config",
41
+ description: ["Configuration for including additional LikeC4 source files from other directories.", "Example: { \"paths\": [\"../shared\", \"../common/specs\"], \"maxDepth\": 5, \"fileThreshold\": 50 }"].join("\n")
42
+ });
43
+ const opacity = z.int().min(0, "Opacity must be between 0 and 100").max(100, "Opacity must be between 0 and 100").meta({
44
+ id: "Opacity",
45
+ description: "Opacity 0-100%"
46
+ });
47
+ const shape = z.enum(ElementShapes).meta({ id: "ElementShape" });
48
+ const border = z.enum(BorderStyles).meta({ id: "BorderStyle" });
49
+ const size = z.enum(Sizes).meta({ id: "ElementSize" });
50
+ const iconPosition = z.enum(IconPositions).meta({ id: "IconPosition" });
51
+ const arrow = z.enum(RelationshipArrowTypes).meta({ id: "ArrowType" });
52
+ const line = z.enum([
53
+ "dashed",
54
+ "solid",
55
+ "dotted"
56
+ ]).meta({ id: "LineType" });
57
+ const themeColor = z.enum(ThemeColors).meta({ id: "ThemeColorName" });
58
+ const customColor = z.custom().refine((v) => typeof v === "string", "Custom color name must be a string").transform((value) => value).meta({ id: "CustomColorName" });
59
+ const color = themeColor.or(customColor).transform((value) => value).meta({ id: "ColorName" });
60
+ const colorSchema = z.string().min(1, "Color value cannot be empty").meta({ id: "ColorLiteral" });
61
+ const ElementColorValuesSchema = z.strictObject({
62
+ fill: colorSchema.meta({ description: "Background color" }),
63
+ stroke: colorSchema.meta({ description: "Stroke color (border, paths above background)" }),
64
+ hiContrast: colorSchema.meta({ description: "High contrast text color (title)" }),
65
+ loContrast: colorSchema.meta({ description: "Low contrast text color (description)" })
66
+ }).meta({ id: "ElementColorValues" }).transform((value) => value);
67
+ const RelationshipColorValuesSchema = z.strictObject({
68
+ line: colorSchema.meta({ description: "Line color" }),
69
+ label: colorSchema.meta({ description: "Label text color" }),
70
+ labelBg: colorSchema.optional().default("rgba(0, 0, 0, 0.5)").meta({ description: "Label background color" })
71
+ }).meta({ id: "RelationshipColorValues" }).transform((value) => value);
72
+ const ThemeColorValuesSchema = z.strictObject({
73
+ elements: ElementColorValuesSchema.or(colorSchema.transform((v) => computeColorValues(v).elements)).meta({ description: "Exact color value (hex, rgb, rgba, hsl, hsla ...) or break down of specific color values" }),
74
+ relationships: RelationshipColorValuesSchema.or(colorSchema.transform((v) => computeColorValues(v).relationships)).meta({ description: "Exact color value (hex, rgb, rgba, hsl, hsla ...) or break down of specific color values" })
75
+ }).transform((value) => value).meta({
76
+ id: "StrictThemeColorValues",
77
+ description: "Exact color value (hex, rgb, rgba, hsl, hsla ...) or break down of specific color value"
78
+ }).or(colorSchema.transform((v) => computeColorValues(v))).transform((value) => value).meta({
79
+ id: "ThemeColorValues",
80
+ description: "Exact value (hex, rgb, rgba, hsl, hsla ...) or break down of specific color values"
81
+ });
82
+ const ThemeColorsSchema = z.partialRecord(color, ThemeColorValuesSchema).transform((value) => value);
83
+ const DimensionsSchema = z.strictObject({
84
+ width: z.number().min(50),
85
+ height: z.number().min(50)
86
+ }).meta({
87
+ id: "Dimensions",
88
+ description: "Defines dimensions for theme size"
89
+ });
90
+ const LikeC4Config_Styles_Theme_Sizes = z.partialRecord(size, DimensionsSchema);
91
+ const LikeC4Config_Styles_Theme = z.strictObject({
92
+ colors: ThemeColorsSchema.optional().meta({ description: "Override theme colors" }),
93
+ sizes: LikeC4Config_Styles_Theme_Sizes.optional().meta({ description: "Override theme sizes" })
94
+ }).meta({
95
+ id: "ThemeCustomization",
96
+ description: "Customize theme colors and sizes"
97
+ }).transform(({ colors, sizes }) => {
98
+ return exact({
99
+ colors: colors ? exact(colors) : void 0,
100
+ sizes: sizes ? exact(sizes) : void 0
101
+ });
102
+ });
103
+ const LikeC4Config_Styles_Defaults_Group = z.strictObject({
104
+ color: color.optional().meta({ description: "Default color for groups\n(must be a valid color name from the theme)" }),
105
+ opacity: opacity.optional().meta({ description: "Default opacity for groups" }),
106
+ border: border.optional().meta({ description: "Default border for groups" })
107
+ }).meta({ id: "GroupDefaultStyleValues" });
108
+ const LikeC4Config_Styles_Defaults_Relationship = z.strictObject({
109
+ color: color.optional().meta({ description: "Default color for relationships\n(must be a valid color name from the theme)" }),
110
+ line: line.optional().meta({ description: "Default line style for relationships" }),
111
+ arrow: arrow.optional().meta({ description: "Default arrow style for relationships" })
112
+ }).meta({
113
+ id: "RelationshipDefaultStyleValues",
114
+ description: "Override default values for relationship style properties\nThese values will be used if such property is not defined"
115
+ });
116
+ const LikeC4Config_Styles_Defaults = z.strictObject({
117
+ color: color.optional().meta({ description: "Default color for elements\n(must be a valid color name from the theme)" }),
118
+ opacity: opacity.optional().meta({ description: "Default opacity (0-100%) for elements when displayed as a group (like a container)" }),
119
+ border: border.optional().meta({ description: "Default border style for elements when displayed as a group (like a container)" }),
120
+ size: size.optional().meta({ description: "Default size for elements" }),
121
+ shape: shape.optional().meta({ description: "Default shape for elements" }),
122
+ iconPosition: iconPosition.optional().meta({ description: "Default icon position for elements" }),
123
+ group: LikeC4Config_Styles_Defaults_Group.optional().meta({ description: "Override default values for group style properties\nThese values will be used if such property is not defined" }),
124
+ relationship: LikeC4Config_Styles_Defaults_Relationship.optional().meta({ description: "Override default values for relationship style properties\nThese values will be used if such property is not defined" })
125
+ }).meta({ id: "DefaultStyleValues" });
126
+ const LikeC4Config_Styles_CustomStylesheets = z.union([z.string().min(1, "Custom CSS file path cannot be empty"), z.array(z.string().min(1, "Custom CSS file path cannot be empty"))]).meta({ id: "CustomStylesheets" });
127
+ const LikeC4StylesConfigSchema = z.strictObject({
128
+ theme: LikeC4Config_Styles_Theme.optional().meta({ description: "Project theme customization" }),
129
+ defaults: LikeC4Config_Styles_Defaults.optional().meta({ description: "Override default values for style properties\nThese values will be used if such property is not defined" }),
130
+ customCss: LikeC4Config_Styles_CustomStylesheets.optional().meta({ description: "Custom CSS (or list of CSS files) to be included in the generated diagrams" })
131
+ }).transform(({ theme, defaults, customCss }) => exact({
132
+ defaults: normalizeDefaults(defaults),
133
+ customCss: normalizeStylesheets(customCss),
134
+ theme
135
+ }));
136
+ function normalizeDefaults(defaults) {
137
+ if (!defaults) return;
138
+ const { relationship, group, ...rest } = defaults;
139
+ return exact({
140
+ ...rest,
141
+ relationship: relationship && exact(relationship),
142
+ group: group && exact(group)
143
+ });
144
+ }
145
+ function normalizeStylesheets(stylesheets) {
146
+ if (!stylesheets) return;
147
+ const paths = (Array.isArray(stylesheets) ? stylesheets : [stylesheets]).filter(Boolean);
148
+ if (paths.length === 0) return;
149
+ return {
150
+ paths,
151
+ content: ""
152
+ };
153
+ }
154
+ const ManualLayoutsConfigSchema = z.strictObject({ outDir: z.string().default(".likec4").meta({ description: [
155
+ "Path to the directory where manual layouts will be stored,",
156
+ "relative to the folder containing the project config. ",
157
+ "",
158
+ "Defaults to '.likec4'."
159
+ ].join("\n") }) }).meta({
160
+ id: "ManualLayoutsConfig",
161
+ description: "Configuration for manual layouts"
162
+ });
163
+ const LikeC4ProjectJsonConfigSchema = z.object({
164
+ name: z.string().nonempty("Project name cannot be empty").refine((value) => value !== "default", {
165
+ abort: true,
166
+ error: "Project name cannot be \"default\""
167
+ }).refine((value) => !value.includes(".") && !value.includes("@") && !value.includes("#"), {
168
+ abort: true,
169
+ error: "Project name cannot contain \".\", \"@\" or \"#\", try to use A-z, 0-9, _ and -"
170
+ }).meta({ description: "Project name, must be unique in the workspace" }),
171
+ extends: z.union([z.string().min(1, "Extend path cannot be empty"), z.array(z.string().min(1, "Extend path cannot be empty")).min(1, "Extend list cannot be empty")]).optional().meta({ description: "Extend styles from other config files" }),
172
+ title: z.string().nonempty("Project title cannot be empty if specified").optional().meta({ description: "A human readable title for the project" }),
173
+ contactPerson: z.string().nonempty("Contact person cannot be empty if specified").optional().meta({ description: "A person who has been involved in creating or maintaining this project" }),
174
+ styles: LikeC4StylesConfigSchema.optional().meta({ description: "Project styles customization" }),
175
+ imageAliases: ImageAliasesSchema.optional(),
176
+ include: IncludeSchema.optional(),
177
+ exclude: z.array(z.string()).optional().meta({ description: "List of file patterns to exclude from the project, default is [\"**/node_modules/**\"]" }),
178
+ manualLayouts: ManualLayoutsConfigSchema.optional()
179
+ }).meta({
180
+ id: "LikeC4ProjectConfig",
181
+ description: "LikeC4 Project Configuration"
182
+ });
183
+ const FunctionType = z.instanceof(Function);
184
+ const GeneratorsSchema = z.record(z.string(), FunctionType);
185
+ const LikeC4ProjectConfigSchema = LikeC4ProjectJsonConfigSchema.extend({ generators: GeneratorsSchema.optional() });
186
+ function validateProjectConfig(config) {
187
+ const parsed = LikeC4ProjectConfigSchema.safeParse(config);
188
+ if (parsed.success) return parsed.data;
189
+ throw new Error("Config validation failed:\n" + z.prettifyError(parsed.error));
190
+ }
191
+ function parseProjectConfigJSON(config) {
192
+ return validateProjectConfig(JSON5.parse(config.trim() || "{}"));
193
+ }
194
+ const LikeC4ProjectConfigOps = {
195
+ parse: parseProjectConfigJSON,
196
+ validate: validateProjectConfig,
197
+ normalizeInclude: (include) => {
198
+ const parsed = IncludeSchema.safeParse(include);
199
+ if (parsed.success) return parsed.data;
200
+ return {
201
+ paths: [],
202
+ maxDepth: 3,
203
+ fileThreshold: 30
204
+ };
205
+ }
206
+ };
207
+ const configJsonFilenames = [
208
+ ".likec4rc",
209
+ ".likec4.config.json",
210
+ "likec4.config.json"
211
+ ];
212
+ const configNonJsonFilenames = [
213
+ "likec4.config.js",
214
+ "likec4.config.cjs",
215
+ "likec4.config.mjs",
216
+ "likec4.config.ts",
217
+ "likec4.config.cts",
218
+ "likec4.config.mts"
219
+ ];
220
+ const ConfigFilenames = [...configJsonFilenames, ...configNonJsonFilenames];
221
+ function isLikeC4JsonConfig(filename) {
222
+ return configJsonFilenames.includes(basename(filename));
223
+ }
224
+ function isLikeC4NonJsonConfig(filename) {
225
+ return configNonJsonFilenames.includes(basename(filename));
226
+ }
227
+ function isLikeC4Config(filename) {
228
+ return isLikeC4JsonConfig(filename) || isLikeC4NonJsonConfig(filename);
229
+ }
230
+ function defineConfig(config) {
231
+ return LikeC4ProjectConfigSchema.parse(config);
232
+ }
233
+ function defineGenerators(generators) {
234
+ return GeneratorsSchema.parse(generators);
235
+ }
236
+ function defineThemeColor(colors) {
237
+ return ThemeColorValuesSchema.parse(colors);
238
+ }
239
+ function defineTheme(theme) {
240
+ return LikeC4Config_Styles_Theme.parse(theme);
241
+ }
242
+ function defineStyle(styles) {
243
+ return LikeC4StylesConfigSchema.parse(styles);
244
+ }
245
+ const JsonConfigInputSchema = LikeC4ProjectJsonConfigSchema.pick({
246
+ extends: true,
247
+ styles: true
248
+ }).loose();
249
+ const normalizeExtends = (value) => {
250
+ if (!value) return [];
251
+ return Array.isArray(value) ? value : [value];
252
+ };
253
+ const parseJsonConfig = async (filepath) => {
254
+ const content = await fs.readFile(filepath, "utf-8");
255
+ let parsed;
256
+ try {
257
+ parsed = JSON5.parse(content.trim() || "{}");
258
+ } catch (e) {
259
+ throw wrapError(e, `${filepath}:`);
260
+ }
261
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) throw new Error(`${filepath}: Config must be a JSON object`);
262
+ const result = JsonConfigInputSchema.safeParse(parsed);
263
+ if (!result.success) throw new Error(`${filepath}: Invalid config\n` + z.prettifyError(result.error));
264
+ return result.data;
265
+ };
266
+ const loadJsonConfigs = async (filepath, stack) => {
267
+ if (stack.includes(filepath)) {
268
+ const cycleStart = stack.indexOf(filepath);
269
+ const cycle = [...stack.slice(cycleStart), filepath].join(" -> ");
270
+ throw new Error(`Config extends cycle detected: ${cycle}`);
271
+ }
272
+ const parsed = await parseJsonConfig(filepath);
273
+ const extendsPaths = normalizeExtends(parsed.extends);
274
+ const nextStack = [...stack, filepath];
275
+ const configs = [];
276
+ for (const extendPath of extendsPaths) {
277
+ const resolvedPath = resolve(dirname(filepath), extendPath);
278
+ configs.push(...await loadJsonConfigs(resolvedPath, nextStack));
279
+ }
280
+ return [...configs, parsed];
281
+ };
11
282
  async function loadConfig(filepath) {
12
- logger.debug`Loading config file: ${filepath.fsPath}`;
13
- if (isLikeC4JsonConfig(filepath.fsPath)) {
14
- try {
15
- const content = await fs.readFile(filepath.fsPath, "utf-8");
16
- return validateProjectConfig(content);
17
- } catch (err) {
18
- logger.error(`Failed to load json config file: ${filepath.fsPath}`, { err });
19
- throw err;
20
- }
21
- }
22
- invariant(isLikeC4NonJsonConfig(filepath.fsPath), `Invalid config file: ${filepath.fsPath}`);
23
- try {
24
- const cwd = dirname(filepath.fsPath);
25
- const { mod } = await bundleRequire({
26
- filepath: filepath.fsPath,
27
- cwd,
28
- esbuildOptions: {
29
- resolveExtensions: [".mjs", ".js", ".ts", ".mts"],
30
- plugins: [{
31
- name: "likec4-config",
32
- setup(build) {
33
- build.onResolve({ filter: /^@?likec4\/config$/ }, (args) => ({
34
- path: args.path,
35
- namespace: "likec4-config"
36
- }));
37
- build.onLoad({ filter: /.*/, namespace: "likec4-config" }, (_args) => {
38
- return {
39
- contents: `
283
+ filepath = typeof filepath === "string" ? filepath : filepath.fsPath;
284
+ logger.getChild("config").debug`Loading config: ${filepath}`;
285
+ const folder = dirname(filepath);
286
+ const filename = basename$1(filepath);
287
+ const implicitcfg = { name: basename$1(folder) };
288
+ if (isLikeC4JsonConfig(filename)) {
289
+ const configs = await loadJsonConfigs(resolve(filepath), []);
290
+ invariant(t(configs, 1), "Expect at least one config");
291
+ const rootConfig = n(t$1(configs), ["extends", "styles"]);
292
+ const stylesChain = configs.map((config) => config.styles).filter(e);
293
+ const mergedStyles = stylesChain.length > 0 ? defu({}, ...stylesChain.reverse()) : void 0;
294
+ return validateProjectConfig({
295
+ ...implicitcfg,
296
+ ...rootConfig,
297
+ ...mergedStyles ? { styles: mergedStyles } : {}
298
+ });
299
+ }
300
+ invariant(isLikeC4NonJsonConfig(filename), `Invalid name for config file: ${filepath}`);
301
+ const { mod } = await bundleRequire({
302
+ filepath,
303
+ cwd: folder,
304
+ esbuildOptions: {
305
+ resolveExtensions: [
306
+ ".ts",
307
+ ".mts",
308
+ ".cts",
309
+ ".mjs",
310
+ ".js",
311
+ ".cjs"
312
+ ],
313
+ plugins: [{
314
+ name: "likec4-config",
315
+ setup(build) {
316
+ build.onResolve({ filter: /^@?likec4\/config$/ }, (args) => ({
317
+ path: args.path,
318
+ namespace: "likec4-config"
319
+ }));
320
+ build.onEnd((result) => {
321
+ const messages = formatMessagesSync(result.errors, { kind: "error" });
322
+ for (const message of messages) logger.error(message);
323
+ });
324
+ build.onLoad({
325
+ filter: /.*/,
326
+ namespace: "likec4-config"
327
+ }, (_args) => {
328
+ return {
329
+ contents: `
40
330
  // Mock implementation to allow loading config files without bundling @likec4/config
41
331
  function mock(x) { return x }
42
332
  export {
@@ -46,18 +336,13 @@ export {
46
336
  mock as defineTheme,
47
337
  mock as defineThemeColor,
48
338
  }`,
49
- loader: "js"
50
- };
51
- });
52
- }
53
- }]
54
- }
55
- });
56
- return defineConfig(mod?.default ?? mod);
57
- } catch (err) {
58
- logger.error(`Failed to load config file: ${filepath.fsPath}`, { err });
59
- throw err;
60
- }
61
- }
62
-
63
- export { defineConfig, isLikeC4JsonConfig, isLikeC4NonJsonConfig, loadConfig, validateProjectConfig };
339
+ loader: "js"
340
+ };
341
+ });
342
+ }
343
+ }]
344
+ }
345
+ });
346
+ return validateProjectConfig(Object.assign(implicitcfg, mod?.default ?? mod));
347
+ }
348
+ export { ConfigFilenames, LikeC4ProjectConfigOps, defineConfig, defineGenerators, defineStyle, defineTheme, defineThemeColor, isLikeC4Config, isLikeC4JsonConfig, isLikeC4NonJsonConfig, loadConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likec4/config",
3
- "version": "1.47.0",
3
+ "version": "1.49.0",
4
4
  "license": "MIT",
5
5
  "homepage": "https://likec4.dev",
6
6
  "author": "Denis Davydkov <denis@davydkov.com>",
@@ -25,6 +25,7 @@
25
25
  "sideEffects": false,
26
26
  "exports": {
27
27
  ".": {
28
+ "sources": "./src/index.ts",
28
29
  "node": {
29
30
  "sources": "./src/node/index.ts",
30
31
  "default": {
@@ -32,7 +33,6 @@
32
33
  "default": "./dist/node/index.mjs"
33
34
  }
34
35
  },
35
- "sources": "./src/index.ts",
36
36
  "default": {
37
37
  "types": "./dist/index.d.mts",
38
38
  "default": "./dist/index.mjs"
@@ -45,8 +45,6 @@
45
45
  "default": "./dist/node/index.mjs"
46
46
  }
47
47
  },
48
- "./src": "./src/index.ts",
49
- "./src/*": "./src/*",
50
48
  "./package.json": "./package.json",
51
49
  "./schema.json": "./schema.json"
52
50
  },
@@ -55,40 +53,43 @@
55
53
  "access": "public"
56
54
  },
57
55
  "dependencies": {
58
- "bundle-require": "^5.1.0",
59
- "defu": "^6.1.4",
60
56
  "json5": "^2.2.3",
61
- "zod": "^4.2.1",
62
- "type-fest": "^4.41.0"
57
+ "pathe": "^2.0.3",
58
+ "zod": "^3.25.76",
59
+ "type-fest": "^4.41.0",
60
+ "@likec4/log": "1.49.0",
61
+ "@likec4/core": "1.49.0"
63
62
  },
64
63
  "peerDependencies": {
65
- "esbuild": "^0.27.2",
66
- "vscode-uri": "3.1.0",
67
- "@likec4/core": "1.47.0",
68
- "@likec4/log": "1.46.1"
64
+ "bundle-require": "^5.1.0",
65
+ "esbuild": "0.27.3"
69
66
  },
70
67
  "peerDependenciesMeta": {
71
- "vscode-uri": {
68
+ "esbuild": {
69
+ "optional": true
70
+ },
71
+ "bundle-require": {
72
72
  "optional": true
73
73
  }
74
74
  },
75
75
  "devDependencies": {
76
- "@types/node": "~22.19.3",
77
- "remeda": "^2.32.0",
76
+ "@types/node": "~22.19.10",
77
+ "remeda": "^2.33.5",
78
+ "defu": "^6.1.4",
79
+ "ufo": "1.6.3",
78
80
  "tsx": "4.21.0",
79
- "turbo": "2.7.2",
81
+ "turbo": "2.8.3",
80
82
  "typescript": "5.9.3",
81
- "unbuild": "3.5.0",
83
+ "obuild": "^0.4.27",
82
84
  "nano-spawn": "^2.0.0",
83
- "vitest": "4.0.16",
84
- "@likec4/core": "1.47.0",
85
- "@likec4/tsconfig": "1.46.1",
85
+ "vitest": "4.0.18",
86
86
  "@likec4/devops": "1.42.0",
87
- "@likec4/log": "1.46.1"
87
+ "@likec4/tsconfig": "1.49.0"
88
88
  },
89
89
  "scripts": {
90
+ "generate": "tsx --conditions=sources scripts/generate.mts",
90
91
  "typecheck": "tsc -b --verbose",
91
- "build": "unbuild",
92
+ "build": "obuild",
92
93
  "lint:package": "pnpx publint ./package.tgz",
93
94
  "clean": "likec4ops clean",
94
95
  "pack": "pnpm pack"