@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.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023-2025 Denis Davydkov
3
+ Copyright (c) 2023-2026 Denis Davydkov
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -172,12 +172,16 @@ for (const name of ConfigFilenames) {
172
172
  ## JSON Schema
173
173
 
174
174
  The JSON Schema is published at `@likec4/config/schema.json` and mirrors the Zod schema.
175
+ For JSON configs you can use `extends` to reuse `styles` from other JSON configs.
176
+ Only `styles` are merged (in order), other fields come from the root config.
175
177
 
176
178
  Fields:
177
179
 
178
180
  - `name` (required): unique project id within the workspace
179
181
  - `title` (optional): human-readable project title
180
182
  - `contactPerson` (optional): maintainer/author
183
+ - `extends` (optional): string or array of strings, paths to JSON configs to merge `styles` from (relative to each config file)
184
+ - `styles` (optional): theme/defaults/customCss customization
181
185
  - `exclude` (optional): array of glob patterns (picomatch) to exclude (defaults to `['**/node_modules/**']`)
182
186
 
183
187
  ## Getting help
@@ -0,0 +1,41 @@
1
+ # Licenses of Bundled Dependencies
2
+
3
+ The published artifact additionally contains code with the following licenses:
4
+ MIT
5
+
6
+ # Bundled Dependencies
7
+
8
+ ## defu
9
+
10
+ License: MIT
11
+ Repository: https://github.com/unjs/defu
12
+
13
+ > MIT License
14
+ >
15
+ > Copyright (c) Pooya Parsa <pooya@pi0.io>
16
+ >
17
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
18
+ > of this software and associated documentation files (the "Software"), to deal
19
+ > in the Software without restriction, including without limitation the rights
20
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
21
+ > copies of the Software, and to permit persons to whom the Software is
22
+ > furnished to do so, subject to the following conditions:
23
+ >
24
+ > The above copyright notice and this permission notice shall be included in all
25
+ > copies or substantial portions of the Software.
26
+ >
27
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
30
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33
+ > SOFTWARE.
34
+
35
+ ---------------------------------------
36
+
37
+ ## remeda
38
+
39
+ License: MIT
40
+ By: Łukasz Sentkiewicz
41
+ Repository: https://github.com/remeda/remeda
@@ -0,0 +1,39 @@
1
+ function isPlainObject(value) {
2
+ if (value === null || typeof value !== "object") return false;
3
+ const prototype = Object.getPrototypeOf(value);
4
+ if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) return false;
5
+ if (Symbol.iterator in value) return false;
6
+ if (Symbol.toStringTag in value) return Object.prototype.toString.call(value) === "[object Module]";
7
+ return true;
8
+ }
9
+ function _defu(baseObject, defaults, namespace = ".", merger) {
10
+ if (!isPlainObject(defaults)) return _defu(baseObject, {}, namespace, merger);
11
+ const object = Object.assign({}, defaults);
12
+ for (const key in baseObject) {
13
+ if (key === "__proto__" || key === "constructor") continue;
14
+ const value = baseObject[key];
15
+ if (value === null || value === void 0) continue;
16
+ if (merger && merger(object, key, value, namespace)) continue;
17
+ if (Array.isArray(value) && Array.isArray(object[key])) object[key] = [...value, ...object[key]];
18
+ else if (isPlainObject(value) && isPlainObject(object[key])) object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
19
+ else object[key] = value;
20
+ }
21
+ return object;
22
+ }
23
+ function createDefu(merger) {
24
+ return (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, "", merger), {});
25
+ }
26
+ const defu = createDefu();
27
+ createDefu((object, key, currentValue) => {
28
+ if (object[key] !== void 0 && typeof currentValue === "function") {
29
+ object[key] = currentValue(object[key]);
30
+ return true;
31
+ }
32
+ });
33
+ createDefu((object, key, currentValue) => {
34
+ if (Array.isArray(object[key]) && typeof currentValue === "function") {
35
+ object[key] = currentValue(object[key]);
36
+ return true;
37
+ }
38
+ });
39
+ export { defu as t };
@@ -0,0 +1,38 @@
1
+ function e$1(e, t, n) {
2
+ let r = (n) => e(n, ...t);
3
+ return n === void 0 ? r : Object.assign(r, {
4
+ lazy: n,
5
+ lazyArgs: t
6
+ });
7
+ }
8
+ function t$2(t, n, r) {
9
+ let i = t.length - n.length;
10
+ if (i === 0) return t(...n);
11
+ if (i === 1) return e$1(t, n, r);
12
+ throw Error(`Wrong number of arguments`);
13
+ }
14
+ function t$1(...t) {
15
+ return t$2(n$2, t);
16
+ }
17
+ const n$2 = (e, t) => e.length >= t;
18
+ function e(e) {
19
+ return e != null;
20
+ }
21
+ function t(...t) {
22
+ return t$2(n$1, t);
23
+ }
24
+ const n$1 = (e) => e.at(-1);
25
+ function n(...t) {
26
+ return t$2(r, t);
27
+ }
28
+ function r(e, n) {
29
+ if (!t$1(n, 1)) return { ...e };
30
+ if (!t$1(n, 2)) {
31
+ let { [n[0]]: t, ...r } = e;
32
+ return r;
33
+ }
34
+ let r = { ...e };
35
+ for (let e of n) delete r[e];
36
+ return r;
37
+ }
38
+ export { t$1 as i, t as n, e as r, n as t };