barrelize 1.6.2 → 1.6.4
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/lib/index.js +43 -11
- package/package.json +6 -6
package/lib/index.js
CHANGED
|
@@ -594,7 +594,7 @@ class CAC extends EventEmitter {
|
|
|
594
594
|
}
|
|
595
595
|
const cac = (name2 = "") => new CAC(name2);
|
|
596
596
|
const name = "barrelize";
|
|
597
|
-
const version = "1.6.
|
|
597
|
+
const version = "1.6.4";
|
|
598
598
|
function cliInit() {
|
|
599
599
|
const cli = cac(name);
|
|
600
600
|
cli.command("[config path]", `Generate barrel files`).option("-w, --watch", "Watch for changes and regenerate barrel files automatically").action(async (configPath, options) => {
|
|
@@ -682,8 +682,16 @@ function require_validateReport() {
|
|
|
682
682
|
return path2.length > last.length || last.substring(0, path2.length) !== path2;
|
|
683
683
|
};
|
|
684
684
|
return (exceptable, error) => {
|
|
685
|
-
|
|
685
|
+
var _a;
|
|
686
|
+
if (exceptable && reportable(error.path)) {
|
|
687
|
+
if (error.value === void 0)
|
|
688
|
+
(_a = error.description) !== null && _a !== void 0 ? _a : error.description = [
|
|
689
|
+
"The value at this path is `undefined`.",
|
|
690
|
+
"",
|
|
691
|
+
`Please fill the \`${error.expected}\` typed value next time.`
|
|
692
|
+
].join("\n");
|
|
686
693
|
array.push(error);
|
|
694
|
+
}
|
|
687
695
|
return false;
|
|
688
696
|
};
|
|
689
697
|
};
|
|
@@ -831,7 +839,12 @@ const validateGenerateOptions = (() => {
|
|
|
831
839
|
return _report(_exceptionable, {
|
|
832
840
|
path: _path + _accessExpressionAsStringExports._accessExpressionAsString(key2),
|
|
833
841
|
expected: "undefined",
|
|
834
|
-
value
|
|
842
|
+
value,
|
|
843
|
+
description: [
|
|
844
|
+
`The property \`${key2}\` is not defined in the object type.`,
|
|
845
|
+
"",
|
|
846
|
+
"Please remove the property next time."
|
|
847
|
+
].join("\n")
|
|
835
848
|
});
|
|
836
849
|
}).every((flag) => flag))].every((flag) => flag);
|
|
837
850
|
const __is = (input, _exceptionable = true) => "object" === typeof input && null !== input && _io0(input, true);
|
|
@@ -1054,7 +1067,12 @@ const validateConfig = (() => {
|
|
|
1054
1067
|
return _report(_exceptionable, {
|
|
1055
1068
|
path: _path + _accessExpressionAsStringExports._accessExpressionAsString(key2),
|
|
1056
1069
|
expected: "undefined",
|
|
1057
|
-
value
|
|
1070
|
+
value,
|
|
1071
|
+
description: [
|
|
1072
|
+
`The property \`${key2}\` is not defined in the object type.`,
|
|
1073
|
+
"",
|
|
1074
|
+
"Please remove the property next time."
|
|
1075
|
+
].join("\n")
|
|
1058
1076
|
});
|
|
1059
1077
|
}).every((flag) => flag))].every((flag) => flag);
|
|
1060
1078
|
const _vo1 = (input, _path, _exceptionable = true) => [void 0 === input.root || "string" === typeof input.root || _report(_exceptionable, {
|
|
@@ -1142,7 +1160,12 @@ const validateConfig = (() => {
|
|
|
1142
1160
|
return _report(_exceptionable, {
|
|
1143
1161
|
path: _path + _accessExpressionAsStringExports._accessExpressionAsString(key2),
|
|
1144
1162
|
expected: "undefined",
|
|
1145
|
-
value
|
|
1163
|
+
value,
|
|
1164
|
+
description: [
|
|
1165
|
+
`The property \`${key2}\` is not defined in the object type.`,
|
|
1166
|
+
"",
|
|
1167
|
+
"Please remove the property next time."
|
|
1168
|
+
].join("\n")
|
|
1146
1169
|
});
|
|
1147
1170
|
}).every((flag) => flag))].every((flag) => flag);
|
|
1148
1171
|
const _vo2 = (input, _path, _exceptionable = true) => [false === _exceptionable || Object.keys(input).map((key2) => {
|
|
@@ -3094,11 +3117,14 @@ function requireLib() {
|
|
|
3094
3117
|
finishCallExpression(unfinished, optional) {
|
|
3095
3118
|
const node = super.finishCallExpression(unfinished, optional);
|
|
3096
3119
|
if (node.callee.type === "Import") {
|
|
3097
|
-
var _ref
|
|
3120
|
+
var _ref;
|
|
3098
3121
|
this.castNodeTo(node, "ImportExpression");
|
|
3099
3122
|
node.source = node.arguments[0];
|
|
3100
3123
|
node.options = (_ref = node.arguments[1]) != null ? _ref : null;
|
|
3101
|
-
|
|
3124
|
+
{
|
|
3125
|
+
var _ref2;
|
|
3126
|
+
node.attributes = (_ref2 = node.arguments[1]) != null ? _ref2 : null;
|
|
3127
|
+
}
|
|
3102
3128
|
delete node.arguments;
|
|
3103
3129
|
delete node.callee;
|
|
3104
3130
|
} else if (node.type === "OptionalCallExpression") {
|
|
@@ -10302,6 +10328,7 @@ function requireLib() {
|
|
|
10302
10328
|
this.expect(14);
|
|
10303
10329
|
withProperty.value = this.tsParseImportTypeWithPropertyValue();
|
|
10304
10330
|
node.properties = [this.finishObjectProperty(withProperty)];
|
|
10331
|
+
this.eat(12);
|
|
10305
10332
|
this.expect(8);
|
|
10306
10333
|
return this.finishNode(node, "ObjectExpression");
|
|
10307
10334
|
}
|
|
@@ -11598,6 +11625,7 @@ function requireLib() {
|
|
|
11598
11625
|
if (!noCalls && this.atPossibleAsyncArrow(base)) {
|
|
11599
11626
|
const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startLoc);
|
|
11600
11627
|
if (asyncArrowFn) {
|
|
11628
|
+
state.stop = true;
|
|
11601
11629
|
return asyncArrowFn;
|
|
11602
11630
|
}
|
|
11603
11631
|
}
|
|
@@ -12526,7 +12554,7 @@ function requireLib() {
|
|
|
12526
12554
|
}
|
|
12527
12555
|
}
|
|
12528
12556
|
fillOptionalPropertiesForTSESLint(node) {
|
|
12529
|
-
var _node$directive, _node$decorators, _node$optional, _node$typeAnnotation, _node$accessibility, _node$decorators2, _node$override, _node$readonly, _node$static, _node$declare, _node$returnType, _node$typeParameters, _node$optional2, _node$optional3, _node$accessibility2, _node$readonly2, _node$static2, _node$declare2, _node$definite, _node$readonly3, _node$typeAnnotation2, _node$accessibility3, _node$decorators3, _node$override2, _node$optional4, _node$id, _node$abstract, _node$declare3, _node$decorators4, _node$implements, _node$superTypeArgume, _node$typeParameters2, _node$declare4, _node$definite2, _node$const, _node$declare5, _node$computed, _node$qualifier, _node$options, _node$declare6, _node$extends, _node$declare7, _node$global, _node$const2, _node$in, _node$out;
|
|
12557
|
+
var _node$directive, _node$decorators, _node$optional, _node$typeAnnotation, _node$accessibility, _node$decorators2, _node$override, _node$readonly, _node$static, _node$declare, _node$returnType, _node$typeParameters, _node$optional2, _node$optional3, _node$accessibility2, _node$readonly2, _node$static2, _node$declare2, _node$definite, _node$readonly3, _node$typeAnnotation2, _node$accessibility3, _node$decorators3, _node$override2, _node$optional4, _node$id, _node$abstract, _node$declare3, _node$decorators4, _node$implements, _node$superTypeArgume, _node$typeParameters2, _node$declare4, _node$definite2, _node$const, _node$declare5, _node$computed, _node$qualifier, _node$options, _node$declare6, _node$extends, _node$optional5, _node$readonly4, _node$declare7, _node$global, _node$const2, _node$in, _node$out;
|
|
12530
12558
|
switch (node.type) {
|
|
12531
12559
|
case "ExpressionStatement":
|
|
12532
12560
|
(_node$directive = node.directive) != null ? _node$directive : node.directive = void 0;
|
|
@@ -12617,6 +12645,10 @@ function requireLib() {
|
|
|
12617
12645
|
(_node$declare6 = node.declare) != null ? _node$declare6 : node.declare = false;
|
|
12618
12646
|
(_node$extends = node.extends) != null ? _node$extends : node.extends = [];
|
|
12619
12647
|
return;
|
|
12648
|
+
case "TSMappedType":
|
|
12649
|
+
(_node$optional5 = node.optional) != null ? _node$optional5 : node.optional = false;
|
|
12650
|
+
(_node$readonly4 = node.readonly) != null ? _node$readonly4 : node.readonly = void 0;
|
|
12651
|
+
return;
|
|
12620
12652
|
case "TSModuleDeclaration":
|
|
12621
12653
|
(_node$declare7 = node.declare) != null ? _node$declare7 : node.declare = false;
|
|
12622
12654
|
(_node$global = node.global) != null ? _node$global : node.global = node.kind === "global";
|
|
@@ -17766,7 +17798,7 @@ class AST {
|
|
|
17766
17798
|
this.#hasMagic = void 0;
|
|
17767
17799
|
return [s, unescape(this.toString()), false, false];
|
|
17768
17800
|
}
|
|
17769
|
-
let bodyDotAllowed = !repeated || allowDot || dot ||
|
|
17801
|
+
let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? "" : this.#partsToRegExp(true);
|
|
17770
17802
|
if (bodyDotAllowed === body) {
|
|
17771
17803
|
bodyDotAllowed = "";
|
|
17772
17804
|
}
|
|
@@ -20857,7 +20889,7 @@ const IFREG = 8;
|
|
|
20857
20889
|
const IFLNK = 10;
|
|
20858
20890
|
const IFSOCK = 12;
|
|
20859
20891
|
const IFMT = 15;
|
|
20860
|
-
const IFMT_UNKNOWN =
|
|
20892
|
+
const IFMT_UNKNOWN = ~IFMT;
|
|
20861
20893
|
const READDIR_CALLED = 16;
|
|
20862
20894
|
const LSTAT_CALLED = 32;
|
|
20863
20895
|
const ENOTDIR = 64;
|
|
@@ -21119,7 +21151,7 @@ class PathBase {
|
|
|
21119
21151
|
}
|
|
21120
21152
|
const children = Object.assign([], { provisional: 0 });
|
|
21121
21153
|
this.#children.set(this, children);
|
|
21122
|
-
this.#type &=
|
|
21154
|
+
this.#type &= ~READDIR_CALLED;
|
|
21123
21155
|
return children;
|
|
21124
21156
|
}
|
|
21125
21157
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "barrelize",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.4",
|
|
4
4
|
"description": "Automatically generating index (barrel) files",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "npm run schema && vite build",
|
|
@@ -21,18 +21,18 @@
|
|
|
21
21
|
"author": "Nizami",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@babel/parser": "^7.28.
|
|
24
|
+
"@babel/parser": "^7.28.4",
|
|
25
25
|
"@ryoppippi/unplugin-typia": "^2.6.5",
|
|
26
|
-
"@types/node": "^24.
|
|
26
|
+
"@types/node": "^24.3.1",
|
|
27
27
|
"cac": "^6.7.14",
|
|
28
28
|
"chokidar": "^4.0.3",
|
|
29
29
|
"glob": "^11.0.3",
|
|
30
30
|
"json5": "^2.2.3",
|
|
31
31
|
"ts-json-schema-generator": "^2.4.0",
|
|
32
32
|
"ts-patch": "^3.3.0",
|
|
33
|
-
"typescript": "~5.
|
|
34
|
-
"typia": "^9.
|
|
35
|
-
"vite": "^7.
|
|
33
|
+
"typescript": "~5.9.2",
|
|
34
|
+
"typia": "^9.7.2",
|
|
35
|
+
"vite": "^7.1.4",
|
|
36
36
|
"vite-plugin-dts": "^4.5.4",
|
|
37
37
|
"vitest": "^3.2.4"
|
|
38
38
|
},
|