@routier/core 0.1.0-rc.2 → 0.2.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.
- package/dist/assertions/index.d.ts +30 -0
- package/dist/assertions/index.js +92 -19
- package/dist/assertions/index.js.map +1 -1
- package/dist/capabilities/index.js +75 -105
- package/dist/capabilities/index.js.map +1 -1
- package/dist/codegen/blocks.test.d.ts +1 -0
- package/dist/codegen/handlers/SetHandlerBuilder.d.ts +4 -0
- package/dist/codegen/handlers/index.d.ts +1 -0
- package/dist/codegen/handlers/serialize/SerializeComputedHandler.d.ts +6 -0
- package/dist/codegen/handlers/set/SetComplexHandler.d.ts +6 -0
- package/dist/codegen/index.js +22 -36
- package/dist/codegen/index.js.map +1 -1
- package/dist/codegen/utils.test.d.ts +1 -0
- package/dist/collections/Changes.d.ts +2 -2
- package/dist/collections/IdSet.test.d.ts +1 -0
- package/dist/collections/TagCollection.contract.test.d.ts +1 -0
- package/dist/collections/TagCollection.d.ts +7 -7
- package/dist/collections/index.js +50 -93
- package/dist/collections/index.js.map +1 -1
- package/dist/errors/index.js +4 -15
- package/dist/errors/index.js.map +1 -1
- package/dist/expressions/constants.d.ts +2 -0
- package/dist/expressions/index.d.ts +2 -0
- package/dist/expressions/index.js +450 -114
- package/dist/expressions/index.js.map +1 -1
- package/dist/expressions/sql.d.ts +28 -0
- package/dist/expressions/sql.test.d.ts +1 -0
- package/dist/expressions/utils.d.ts +1 -2
- package/dist/index.js +3058 -2618
- package/dist/index.js.map +1 -1
- package/dist/performance/index.js +22 -22
- package/dist/performance/index.js.map +1 -1
- package/dist/pipeline/index.js +48 -60
- package/dist/pipeline/index.js.map +1 -1
- package/dist/plugins/index.d.ts +0 -1
- package/dist/plugins/index.js +268 -937
- package/dist/plugins/index.js.map +1 -1
- package/dist/plugins/query/Query.test.d.ts +1 -0
- package/dist/plugins/query/QueryOptionsCollection.d.ts +1 -0
- package/dist/plugins/translators/SqlTranslator.test.d.ts +1 -0
- package/dist/plugins/translators/TranslatedArrayValue.d.ts +3 -1
- package/dist/plugins/translators/TranslatedGroupValue.d.ts +3 -1
- package/dist/plugins/translators/TranslatedSingleValue.d.ts +3 -1
- package/dist/plugins/translators/TranslatedValues.test.d.ts +1 -0
- package/dist/plugins/translators/types.d.ts +8 -1
- package/dist/plugins/types.d.ts +6 -10
- package/dist/results/Result.d.ts +2 -2
- package/dist/results/Result.test.d.ts +1 -0
- package/dist/results/index.js +11 -26
- package/dist/results/index.js.map +1 -1
- package/dist/results/utils.test.d.ts +1 -0
- package/dist/schema/PropertyInfo.d.ts +5 -1
- package/dist/schema/SchemaDefinition.d.ts +35 -6
- package/dist/schema/communication/broadcast.test.d.ts +1 -0
- package/dist/schema/index.d.ts +2 -0
- package/dist/schema/index.js +2115 -1513
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/property/base/SchemaBase.d.ts +3 -1
- package/dist/schema/property/modifiers/SchemaDeserialize.d.ts +5 -1
- package/dist/schema/property/modifiers/SchemaForeignKey.d.ts +15 -0
- package/dist/schema/property/modifiers/SchemaKey.d.ts +2 -0
- package/dist/schema/property/modifiers/SchemaNullable.d.ts +5 -1
- package/dist/schema/property/modifiers/SchemaOptional.d.ts +3 -1
- package/dist/schema/property/modifiers/SchemaTag.d.ts +27 -0
- package/dist/schema/property/modifiers/SchemaTracked.d.ts +5 -1
- package/dist/schema/property/modifiers/index.d.ts +2 -0
- package/dist/schema/property/types/SchemaArray.d.ts +2 -0
- package/dist/schema/property/types/SchemaBoolean.d.ts +2 -0
- package/dist/schema/property/types/SchemaDate.d.ts +2 -0
- package/dist/schema/property/types/SchemaNumber.d.ts +5 -1
- package/dist/schema/property/types/SchemaObject.d.ts +2 -0
- package/dist/schema/property/types/SchemaString.d.ts +5 -1
- package/dist/schema/types.d.ts +41 -29
- package/dist/schema/utils/standardJsonSchema.d.ts +90 -0
- package/dist/schema/utils/standardJsonSchema.test.d.ts +1 -0
- package/dist/types/index.js +0 -6
- package/dist/types/index.js.map +1 -1
- package/dist/utilities/functions.d.ts +1 -1
- package/dist/utilities/index.js +213 -138
- package/dist/utilities/index.js.map +1 -1
- package/dist/utilities/runtime.test.d.ts +1 -0
- package/dist/utilities/types.d.ts +17 -2
- package/dist/utilities/uuid.test.d.ts +1 -0
- package/package.json +2 -2
- package/readme.md +1 -1
- package/dist/plugins/replication/OptimisticReplicationDbPlugin.d.ts +0 -22
- package/dist/plugins/replication/ReplicationDbPlugin.d.ts +0 -22
- package/dist/plugins/replication/index.d.ts +0 -3
- package/dist/plugins/replication/types.d.ts +0 -4
- package/dist/schema/testSchemas.test.d.ts +0 -314
- /package/dist/{pipeline/WorkPipeline.test.d.ts → codegen/SlotPath.test.d.ts} +0 -0
|
@@ -1,5 +1,35 @@
|
|
|
1
|
+
import { ComparatorExpression, EmptyExpression, Expression, NotParsableExpression, OperatorExpression, PropertyExpression, ValueExpression } from "../expressions/types";
|
|
1
2
|
export declare function assertDate(data: unknown): asserts data is Date;
|
|
2
3
|
export declare function assertIsNotNull<T>(data: T | null | undefined, message?: string | (() => string)): asserts data is NonNullable<T>;
|
|
3
4
|
export declare function assertIsArray<T>(data: unknown, message?: string): asserts data is T[];
|
|
4
5
|
export declare function assertString(data: unknown, message?: string): asserts data is string;
|
|
5
6
|
export declare function assertInstanceOf<T extends new (...args: any[]) => any>(value: unknown, Instance: T): asserts value is T;
|
|
7
|
+
export declare function assertIsNumber(value: unknown): asserts value is number;
|
|
8
|
+
/**
|
|
9
|
+
* Type guard: narrows `value` to `Expression` when it is an object with a valid `type` property.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isExpression(value: unknown): value is Expression;
|
|
12
|
+
/**
|
|
13
|
+
* Type guard: narrows `value` to `OperatorExpression` when it is an object with `type === "operator"`.
|
|
14
|
+
*/
|
|
15
|
+
export declare function isOperatorExpression(value: unknown): value is OperatorExpression;
|
|
16
|
+
/**
|
|
17
|
+
* Type guard: narrows `value` to `ComparatorExpression` when it is an object with `type === "comparator"`.
|
|
18
|
+
*/
|
|
19
|
+
export declare function isComparatorExpression(value: unknown): value is ComparatorExpression;
|
|
20
|
+
/**
|
|
21
|
+
* Type guard: narrows `value` to `PropertyExpression` when it is an object with `type === "property"`.
|
|
22
|
+
*/
|
|
23
|
+
export declare function isPropertyExpression(value: unknown): value is PropertyExpression;
|
|
24
|
+
/**
|
|
25
|
+
* Type guard: narrows `value` to `ValueExpression` when it is an object with `type === "value"`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function isValueExpression(value: unknown): value is ValueExpression;
|
|
28
|
+
/**
|
|
29
|
+
* Type guard: narrows `value` to `EmptyExpression` when it is an object with `type === "empty"`.
|
|
30
|
+
*/
|
|
31
|
+
export declare function isEmptyExpression(value: unknown): value is EmptyExpression;
|
|
32
|
+
/**
|
|
33
|
+
* Type guard: narrows `value` to `NotParsableExpression` when it is an object with `type === "not-parsable"`.
|
|
34
|
+
*/
|
|
35
|
+
export declare function isNotParsableExpression(value: unknown): value is NotParsableExpression;
|
package/dist/assertions/index.js
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
var __webpack_modules__ = ({
|
|
2
|
-
"./src/
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"./src/expressions/constants.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
3
|
+
__webpack_require__.r(__webpack_exports__);
|
|
4
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
5
|
+
EXPRESSION_TYPES: () => (EXPRESSION_TYPES)
|
|
6
|
+
});
|
|
7
|
+
const EXPRESSION_TYPES = [
|
|
8
|
+
"operator",
|
|
9
|
+
"comparator",
|
|
10
|
+
"property",
|
|
11
|
+
"value",
|
|
12
|
+
"empty",
|
|
13
|
+
"not-parsable",
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
},
|
|
18
|
+
"./src/utilities/dates.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
7
19
|
__webpack_require__.r(__webpack_exports__);
|
|
8
20
|
__webpack_require__.d(__webpack_exports__, {
|
|
9
21
|
isDate: () => (isDate)
|
|
@@ -19,10 +31,9 @@ const isDate = (data) => {
|
|
|
19
31
|
};
|
|
20
32
|
|
|
21
33
|
|
|
22
|
-
}
|
|
34
|
+
},
|
|
23
35
|
|
|
24
36
|
});
|
|
25
|
-
/************************************************************************/
|
|
26
37
|
// The module cache
|
|
27
38
|
var __webpack_module_cache__ = {};
|
|
28
39
|
|
|
@@ -46,7 +57,6 @@ return module.exports;
|
|
|
46
57
|
|
|
47
58
|
}
|
|
48
59
|
|
|
49
|
-
/************************************************************************/
|
|
50
60
|
// webpack/runtime/define_property_getters
|
|
51
61
|
(() => {
|
|
52
62
|
__webpack_require__.d = (exports, definition) => {
|
|
@@ -71,26 +81,31 @@ __webpack_require__.r = (exports) => {
|
|
|
71
81
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
72
82
|
};
|
|
73
83
|
})();
|
|
74
|
-
/************************************************************************/
|
|
75
84
|
var __webpack_exports__ = {};
|
|
76
85
|
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
|
|
77
86
|
(() => {
|
|
78
|
-
|
|
79
|
-
/*!*********************************!*\
|
|
80
|
-
!*** ./src/assertions/index.ts ***!
|
|
81
|
-
\*********************************/
|
|
82
87
|
__webpack_require__.r(__webpack_exports__);
|
|
83
88
|
__webpack_require__.d(__webpack_exports__, {
|
|
84
89
|
assertDate: () => (assertDate),
|
|
85
90
|
assertInstanceOf: () => (assertInstanceOf),
|
|
86
91
|
assertIsArray: () => (assertIsArray),
|
|
87
92
|
assertIsNotNull: () => (assertIsNotNull),
|
|
88
|
-
|
|
93
|
+
assertIsNumber: () => (assertIsNumber),
|
|
94
|
+
assertString: () => (assertString),
|
|
95
|
+
isComparatorExpression: () => (isComparatorExpression),
|
|
96
|
+
isEmptyExpression: () => (isEmptyExpression),
|
|
97
|
+
isExpression: () => (isExpression),
|
|
98
|
+
isNotParsableExpression: () => (isNotParsableExpression),
|
|
99
|
+
isOperatorExpression: () => (isOperatorExpression),
|
|
100
|
+
isPropertyExpression: () => (isPropertyExpression),
|
|
101
|
+
isValueExpression: () => (isValueExpression)
|
|
89
102
|
});
|
|
90
|
-
/*
|
|
103
|
+
/* import */ var _expressions_constants__rspack_import_1 = __webpack_require__("./src/expressions/constants.ts");
|
|
104
|
+
/* import */ var _utilities__rspack_import_0 = __webpack_require__("./src/utilities/dates.ts");
|
|
105
|
+
|
|
91
106
|
|
|
92
107
|
function assertDate(data) {
|
|
93
|
-
if ((0,
|
|
108
|
+
if ((0,_utilities__rspack_import_0.isDate)(data) === false) {
|
|
94
109
|
throw new TypeError('Value is not a Date');
|
|
95
110
|
}
|
|
96
111
|
}
|
|
@@ -120,9 +135,59 @@ function assertInstanceOf(value, Instance) {
|
|
|
120
135
|
return;
|
|
121
136
|
}
|
|
122
137
|
if (value != null && typeof value === "object" && "constructor" in value) {
|
|
123
|
-
throw new TypeError(`
|
|
138
|
+
throw new TypeError(`value is not instance of type. Type: ${value.constructor.name}`);
|
|
139
|
+
}
|
|
140
|
+
throw new TypeError(`value is not instance of type`);
|
|
141
|
+
}
|
|
142
|
+
function assertIsNumber(value) {
|
|
143
|
+
if (typeof value !== "number") {
|
|
144
|
+
throw new TypeError("value is not of type `number`");
|
|
124
145
|
}
|
|
125
|
-
|
|
146
|
+
}
|
|
147
|
+
function isObjectWithType(value) {
|
|
148
|
+
return typeof value === "object" && value !== null && "type" in value;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Type guard: narrows `value` to `Expression` when it is an object with a valid `type` property.
|
|
152
|
+
*/
|
|
153
|
+
function isExpression(value) {
|
|
154
|
+
return isObjectWithType(value) && _expressions_constants__rspack_import_1.EXPRESSION_TYPES.includes(value.type);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Type guard: narrows `value` to `OperatorExpression` when it is an object with `type === "operator"`.
|
|
158
|
+
*/
|
|
159
|
+
function isOperatorExpression(value) {
|
|
160
|
+
return isObjectWithType(value) && value.type === "operator";
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Type guard: narrows `value` to `ComparatorExpression` when it is an object with `type === "comparator"`.
|
|
164
|
+
*/
|
|
165
|
+
function isComparatorExpression(value) {
|
|
166
|
+
return isObjectWithType(value) && value.type === "comparator";
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Type guard: narrows `value` to `PropertyExpression` when it is an object with `type === "property"`.
|
|
170
|
+
*/
|
|
171
|
+
function isPropertyExpression(value) {
|
|
172
|
+
return isObjectWithType(value) && value.type === "property";
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Type guard: narrows `value` to `ValueExpression` when it is an object with `type === "value"`.
|
|
176
|
+
*/
|
|
177
|
+
function isValueExpression(value) {
|
|
178
|
+
return isObjectWithType(value) && value.type === "value";
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Type guard: narrows `value` to `EmptyExpression` when it is an object with `type === "empty"`.
|
|
182
|
+
*/
|
|
183
|
+
function isEmptyExpression(value) {
|
|
184
|
+
return isObjectWithType(value) && value.type === "empty";
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Type guard: narrows `value` to `NotParsableExpression` when it is an object with `type === "not-parsable"`.
|
|
188
|
+
*/
|
|
189
|
+
function isNotParsableExpression(value) {
|
|
190
|
+
return isObjectWithType(value) && value.type === "not-parsable";
|
|
126
191
|
}
|
|
127
192
|
|
|
128
193
|
})();
|
|
@@ -131,7 +196,15 @@ var __webpack_exports__assertDate = __webpack_exports__.assertDate;
|
|
|
131
196
|
var __webpack_exports__assertInstanceOf = __webpack_exports__.assertInstanceOf;
|
|
132
197
|
var __webpack_exports__assertIsArray = __webpack_exports__.assertIsArray;
|
|
133
198
|
var __webpack_exports__assertIsNotNull = __webpack_exports__.assertIsNotNull;
|
|
199
|
+
var __webpack_exports__assertIsNumber = __webpack_exports__.assertIsNumber;
|
|
134
200
|
var __webpack_exports__assertString = __webpack_exports__.assertString;
|
|
135
|
-
|
|
201
|
+
var __webpack_exports__isComparatorExpression = __webpack_exports__.isComparatorExpression;
|
|
202
|
+
var __webpack_exports__isEmptyExpression = __webpack_exports__.isEmptyExpression;
|
|
203
|
+
var __webpack_exports__isExpression = __webpack_exports__.isExpression;
|
|
204
|
+
var __webpack_exports__isNotParsableExpression = __webpack_exports__.isNotParsableExpression;
|
|
205
|
+
var __webpack_exports__isOperatorExpression = __webpack_exports__.isOperatorExpression;
|
|
206
|
+
var __webpack_exports__isPropertyExpression = __webpack_exports__.isPropertyExpression;
|
|
207
|
+
var __webpack_exports__isValueExpression = __webpack_exports__.isValueExpression;
|
|
208
|
+
export { __webpack_exports__assertDate as assertDate, __webpack_exports__assertInstanceOf as assertInstanceOf, __webpack_exports__assertIsArray as assertIsArray, __webpack_exports__assertIsNotNull as assertIsNotNull, __webpack_exports__assertIsNumber as assertIsNumber, __webpack_exports__assertString as assertString, __webpack_exports__isComparatorExpression as isComparatorExpression, __webpack_exports__isEmptyExpression as isEmptyExpression, __webpack_exports__isExpression as isExpression, __webpack_exports__isNotParsableExpression as isNotParsableExpression, __webpack_exports__isOperatorExpression as isOperatorExpression, __webpack_exports__isPropertyExpression as isPropertyExpression, __webpack_exports__isValueExpression as isValueExpression };
|
|
136
209
|
|
|
137
210
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assertions/index.js","sources":["webpack://@routier/core/./src/utilities/dates.ts","webpack://@routier/core/webpack/runtime/define_property_getters","webpack://@routier/core/webpack/runtime/has_own_property","webpack://@routier/core/webpack/runtime/make_namespace_object","webpack://@routier/core/./src/assertions/index.ts"],"sourcesContent":["export const isDate = (data: unknown): data is Date => {\n if (data == null) {\n return false;\n }\n\n if (typeof data !== \"object\") {\n return false;\n }\n\n return data instanceof Date;\n}","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { isDate } from \"../utilities\";\n\nexport function assertDate(data: unknown): asserts data is Date {\n if (isDate(data) === false) {\n throw new TypeError('Value is not a Date');\n }\n}\n\nexport function assertIsNotNull<T>(data: T | null | undefined, message?: string | (() => string)): asserts data is NonNullable<T> {\n if (data == null) {\n if (message == null) {\n throw new TypeError('Assertion failed, data is null');\n }\n\n if (typeof message === \"string\") {\n throw new TypeError(message);\n }\n\n throw new TypeError(message());\n }\n}\n\nexport function assertIsArray<T>(data: unknown, message?: string): asserts data is T[] {\n if (!Array.isArray(data)) {\n throw new TypeError(message ?? 'Assertion failed, data is not of type Array');\n }\n}\n\nexport function assertString(data: unknown, message?: string): asserts data is string {\n if (typeof data !== \"string\") {\n throw new TypeError(message ?? 'Assertion failed, data is not of type String');\n }\n}\n\nexport function assertInstanceOf<T extends new (...args: any[]) => any>(value: unknown, Instance: T): asserts value is T {\n if (value instanceof Instance) {\n return;\n }\n\n if (value != null && typeof value === \"object\" && \"constructor\" in value) {\n throw new TypeError(`
|
|
1
|
+
{"version":3,"file":"assertions/index.js","sources":["webpack://@routier/core/./src/expressions/constants.ts","webpack://@routier/core/./src/utilities/dates.ts","webpack://@routier/core/webpack/runtime/define_property_getters","webpack://@routier/core/webpack/runtime/has_own_property","webpack://@routier/core/webpack/runtime/make_namespace_object","webpack://@routier/core/./src/assertions/index.ts"],"sourcesContent":["import { ExpressionType } from \"./types\";\n\nexport const EXPRESSION_TYPES: ExpressionType[] = [\n \"operator\",\n \"comparator\",\n \"property\",\n \"value\",\n \"empty\",\n \"not-parsable\",\n];\n","export const isDate = (data: unknown): data is Date => {\n if (data == null) {\n return false;\n }\n\n if (typeof data !== \"object\") {\n return false;\n }\n\n return data instanceof Date;\n}","__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { EXPRESSION_TYPES } from \"../expressions/constants\";\nimport { ComparatorExpression, EmptyExpression, Expression, ExpressionType, NotParsableExpression, OperatorExpression, PropertyExpression, ValueExpression } from \"../expressions/types\";\nimport { isDate } from \"../utilities\";\n\nexport function assertDate(data: unknown): asserts data is Date {\n if (isDate(data) === false) {\n throw new TypeError('Value is not a Date');\n }\n}\n\nexport function assertIsNotNull<T>(data: T | null | undefined, message?: string | (() => string)): asserts data is NonNullable<T> {\n if (data == null) {\n if (message == null) {\n throw new TypeError('Assertion failed, data is null');\n }\n\n if (typeof message === \"string\") {\n throw new TypeError(message);\n }\n\n throw new TypeError(message());\n }\n}\n\nexport function assertIsArray<T>(data: unknown, message?: string): asserts data is T[] {\n if (!Array.isArray(data)) {\n throw new TypeError(message ?? 'Assertion failed, data is not of type Array');\n }\n}\n\nexport function assertString(data: unknown, message?: string): asserts data is string {\n if (typeof data !== \"string\") {\n throw new TypeError(message ?? 'Assertion failed, data is not of type String');\n }\n}\n\nexport function assertInstanceOf<T extends new (...args: any[]) => any>(value: unknown, Instance: T): asserts value is T {\n if (value instanceof Instance) {\n return;\n }\n\n if (value != null && typeof value === \"object\" && \"constructor\" in value) {\n throw new TypeError(`value is not instance of type. Type: ${value.constructor.name}`);\n }\n\n throw new TypeError(`value is not instance of type`);\n}\n\nexport function assertIsNumber(value: unknown): asserts value is number {\n if (typeof value !== \"number\") {\n throw new TypeError(\"value is not of type `number`\");\n }\n}\n\n\nfunction isObjectWithType(value: unknown): value is Record<\"type\", unknown> {\n return typeof value === \"object\" && value !== null && \"type\" in value;\n}\n\n/**\n * Type guard: narrows `value` to `Expression` when it is an object with a valid `type` property.\n */\nexport function isExpression(value: unknown): value is Expression {\n return isObjectWithType(value) && EXPRESSION_TYPES.includes(value.type as ExpressionType);\n}\n\n/**\n * Type guard: narrows `value` to `OperatorExpression` when it is an object with `type === \"operator\"`.\n */\nexport function isOperatorExpression(value: unknown): value is OperatorExpression {\n return isObjectWithType(value) && value.type === \"operator\";\n}\n\n/**\n * Type guard: narrows `value` to `ComparatorExpression` when it is an object with `type === \"comparator\"`.\n */\nexport function isComparatorExpression(value: unknown): value is ComparatorExpression {\n return isObjectWithType(value) && value.type === \"comparator\";\n}\n\n/**\n * Type guard: narrows `value` to `PropertyExpression` when it is an object with `type === \"property\"`.\n */\nexport function isPropertyExpression(value: unknown): value is PropertyExpression {\n return isObjectWithType(value) && value.type === \"property\";\n}\n\n/**\n * Type guard: narrows `value` to `ValueExpression` when it is an object with `type === \"value\"`.\n */\nexport function isValueExpression(value: unknown): value is ValueExpression {\n return isObjectWithType(value) && value.type === \"value\";\n}\n\n/**\n * Type guard: narrows `value` to `EmptyExpression` when it is an object with `type === \"empty\"`.\n */\nexport function isEmptyExpression(value: unknown): value is EmptyExpression {\n return isObjectWithType(value) && value.type === \"empty\";\n}\n\n/**\n * Type guard: narrows `value` to `NotParsableExpression` when it is an object with `type === \"not-parsable\"`.\n */\nexport function isNotParsableExpression(value: unknown): value is NotParsableExpression {\n return isObjectWithType(value) && value.type === \"not-parsable\";\n}"],"names":[],"mappings":"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"}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
var __webpack_modules__ = ({
|
|
2
|
-
"./src/capabilities/Capability.ts"
|
|
3
|
-
/*!****************************************!*\
|
|
4
|
-
!*** ./src/capabilities/Capability.ts ***!
|
|
5
|
-
\****************************************/
|
|
6
|
-
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2
|
+
"./src/capabilities/Capability.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
7
3
|
__webpack_require__.r(__webpack_exports__);
|
|
8
4
|
__webpack_require__.d(__webpack_exports__, {
|
|
9
5
|
Capability: () => (Capability)
|
|
@@ -110,27 +106,23 @@ class Capability {
|
|
|
110
106
|
}
|
|
111
107
|
|
|
112
108
|
|
|
113
|
-
}
|
|
114
|
-
"./src/capabilities/PerformanceCapability.ts"
|
|
115
|
-
/*!***************************************************!*\
|
|
116
|
-
!*** ./src/capabilities/PerformanceCapability.ts ***!
|
|
117
|
-
\***************************************************/
|
|
118
|
-
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
109
|
+
},
|
|
110
|
+
"./src/capabilities/PerformanceCapability.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
119
111
|
__webpack_require__.r(__webpack_exports__);
|
|
120
112
|
__webpack_require__.d(__webpack_exports__, {
|
|
121
113
|
PerformanceCapability: () => (PerformanceCapability)
|
|
122
114
|
});
|
|
123
|
-
/*
|
|
124
|
-
/*
|
|
125
|
-
/*
|
|
126
|
-
/*
|
|
127
|
-
/*
|
|
115
|
+
/* import */ var _utilities__rspack_import_4 = __webpack_require__("./src/utilities/strings.ts");
|
|
116
|
+
/* import */ var _Capability__rspack_import_0 = __webpack_require__("./src/capabilities/Capability.ts");
|
|
117
|
+
/* import */ var _performance_PerformanceTracker__rspack_import_2 = __webpack_require__("./src/capabilities/performance/PerformanceTracker.ts");
|
|
118
|
+
/* import */ var _tracing_CallTraceManager__rspack_import_1 = __webpack_require__("./src/capabilities/tracing/CallTraceManager.ts");
|
|
119
|
+
/* import */ var _utilities__rspack_import_3 = __webpack_require__("./src/utilities/logger.ts");
|
|
128
120
|
|
|
129
121
|
|
|
130
122
|
|
|
131
123
|
|
|
132
124
|
|
|
133
|
-
class PerformanceCapability extends
|
|
125
|
+
class PerformanceCapability extends _Capability__rspack_import_0.Capability {
|
|
134
126
|
callTraceManager;
|
|
135
127
|
performanceTracker;
|
|
136
128
|
filter;
|
|
@@ -138,8 +130,8 @@ class PerformanceCapability extends _Capability__WEBPACK_IMPORTED_MODULE_0__.Cap
|
|
|
138
130
|
constructor(options) {
|
|
139
131
|
super();
|
|
140
132
|
this.filter = options?.filter ?? (() => true);
|
|
141
|
-
this.callTraceManager = new
|
|
142
|
-
this.performanceTracker = new
|
|
133
|
+
this.callTraceManager = new _tracing_CallTraceManager__rspack_import_1.CallTraceManager();
|
|
134
|
+
this.performanceTracker = new _performance_PerformanceTracker__rspack_import_2.PerformanceTracker();
|
|
143
135
|
}
|
|
144
136
|
apply(instance) {
|
|
145
137
|
this.explore(instance, (meta, info) => {
|
|
@@ -161,12 +153,12 @@ class PerformanceCapability extends _Capability__WEBPACK_IMPORTED_MODULE_0__.Cap
|
|
|
161
153
|
depth = callTrace.length - 1;
|
|
162
154
|
const formattedCallTrace = this.callTraceManager.formatMethodPaths(callTrace);
|
|
163
155
|
this.performanceTracker.startMethodTiming(operationId, path);
|
|
164
|
-
|
|
165
|
-
|
|
156
|
+
_utilities__rspack_import_3.logger.log(`\n${'═'.repeat(60)}`);
|
|
157
|
+
_utilities__rspack_import_3.logger.log(`▶ ORIGIN [${operationId}] ${path}`);
|
|
166
158
|
if (args.length > 0) {
|
|
167
|
-
|
|
159
|
+
_utilities__rspack_import_3.logger.log(` Args:`, (0,_utilities__rspack_import_4.stringifyObject)(args, 4, 0));
|
|
168
160
|
}
|
|
169
|
-
|
|
161
|
+
_utilities__rspack_import_3.logger.log(` Call Stack: ${formattedCallTrace.join(' → ')}`);
|
|
170
162
|
}
|
|
171
163
|
else {
|
|
172
164
|
operationId = this.callTraceManager.getActiveOperationId();
|
|
@@ -177,9 +169,9 @@ class PerformanceCapability extends _Capability__WEBPACK_IMPORTED_MODULE_0__.Cap
|
|
|
177
169
|
const childMethodKey = `${operationId}:${path}`;
|
|
178
170
|
this.childDurations.set(childMethodKey, []);
|
|
179
171
|
this.performanceTracker.startMethodTiming(operationId, path);
|
|
180
|
-
|
|
172
|
+
_utilities__rspack_import_3.logger.log(`${indent}└─ CHILD [${operationId}] ${path}`);
|
|
181
173
|
if (args.length > 0) {
|
|
182
|
-
|
|
174
|
+
_utilities__rspack_import_3.logger.log(`${indent} Args:`, (0,_utilities__rspack_import_4.stringifyObject)(args, 4, 0));
|
|
183
175
|
}
|
|
184
176
|
}
|
|
185
177
|
try {
|
|
@@ -195,14 +187,14 @@ class PerformanceCapability extends _Capability__WEBPACK_IMPORTED_MODULE_0__.Cap
|
|
|
195
187
|
const formattedTotalChildTime = this.performanceTracker.formatDuration(totalChildTime);
|
|
196
188
|
const overhead = duration - totalChildTime;
|
|
197
189
|
const formattedOverhead = this.performanceTracker.formatDuration(Math.max(0, overhead));
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
190
|
+
_utilities__rspack_import_3.logger.log(`\n${'═'.repeat(60)}`);
|
|
191
|
+
_utilities__rspack_import_3.logger.log(`◀ COMPLETE [${operationId}] ${path}`);
|
|
192
|
+
_utilities__rspack_import_3.logger.log(` Total Duration: ${formattedDuration}`);
|
|
201
193
|
if (childDurations.length > 0) {
|
|
202
|
-
|
|
203
|
-
|
|
194
|
+
_utilities__rspack_import_3.logger.log(` Children Duration: ${formattedTotalChildTime} (${childDurations.length} calls)`);
|
|
195
|
+
_utilities__rspack_import_3.logger.log(` Overhead: ${formattedOverhead}`);
|
|
204
196
|
}
|
|
205
|
-
|
|
197
|
+
_utilities__rspack_import_3.logger.log(`${'═'.repeat(60)}\n`);
|
|
206
198
|
this.childDurations.delete(operationId);
|
|
207
199
|
this.performanceTracker.cleanupOperation(operationId);
|
|
208
200
|
this.callTraceManager.endOperation();
|
|
@@ -215,9 +207,9 @@ class PerformanceCapability extends _Capability__WEBPACK_IMPORTED_MODULE_0__.Cap
|
|
|
215
207
|
const formattedTotalChildTime = this.performanceTracker.formatDuration(totalChildTime);
|
|
216
208
|
const overhead = duration - totalChildTime;
|
|
217
209
|
const formattedOverhead = this.performanceTracker.formatDuration(Math.max(0, overhead));
|
|
218
|
-
|
|
210
|
+
_utilities__rspack_import_3.logger.log(`${indent} ✓ ${formattedDuration}`);
|
|
219
211
|
if (childDurations.length > 0) {
|
|
220
|
-
|
|
212
|
+
_utilities__rspack_import_3.logger.log(`${indent} Children: ${formattedTotalChildTime} (${childDurations.length} calls), Overhead: ${formattedOverhead}`);
|
|
221
213
|
}
|
|
222
214
|
// Clean up child method tracking
|
|
223
215
|
this.childDurations.delete(childMethodKey);
|
|
@@ -254,31 +246,25 @@ class PerformanceCapability extends _Capability__WEBPACK_IMPORTED_MODULE_0__.Cap
|
|
|
254
246
|
}
|
|
255
247
|
|
|
256
248
|
|
|
257
|
-
}
|
|
258
|
-
"./src/capabilities/TracingCapability.ts"
|
|
259
|
-
/*!***********************************************!*\
|
|
260
|
-
!*** ./src/capabilities/TracingCapability.ts ***!
|
|
261
|
-
\***********************************************/
|
|
262
|
-
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
249
|
+
},
|
|
250
|
+
"./src/capabilities/TracingCapability.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
263
251
|
__webpack_require__.r(__webpack_exports__);
|
|
264
252
|
__webpack_require__.d(__webpack_exports__, {
|
|
265
253
|
TracingCapability: () => (TracingCapability)
|
|
266
254
|
});
|
|
267
|
-
/*
|
|
268
|
-
/*
|
|
269
|
-
/*
|
|
270
|
-
/* ESM import */var _utilities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utilities */ "./src/utilities/logger.ts");
|
|
255
|
+
/* import */ var _Capability__rspack_import_0 = __webpack_require__("./src/capabilities/Capability.ts");
|
|
256
|
+
/* import */ var _tracing_CallTraceManager__rspack_import_1 = __webpack_require__("./src/capabilities/tracing/CallTraceManager.ts");
|
|
257
|
+
/* import */ var _utilities_strings__rspack_import_2 = __webpack_require__("./src/utilities/strings.ts");
|
|
271
258
|
|
|
272
259
|
|
|
273
260
|
|
|
274
|
-
|
|
275
|
-
class TracingCapability extends _Capability__WEBPACK_IMPORTED_MODULE_0__.Capability {
|
|
261
|
+
class TracingCapability extends _Capability__rspack_import_0.Capability {
|
|
276
262
|
callTraceManager;
|
|
277
263
|
filter;
|
|
278
264
|
constructor(options) {
|
|
279
265
|
super();
|
|
280
266
|
this.filter = options?.filter ?? (() => true);
|
|
281
|
-
this.callTraceManager = new
|
|
267
|
+
this.callTraceManager = new _tracing_CallTraceManager__rspack_import_1.CallTraceManager();
|
|
282
268
|
}
|
|
283
269
|
apply(instance) {
|
|
284
270
|
this.explore(instance, (meta, info) => {
|
|
@@ -295,20 +281,20 @@ class TracingCapability extends _Capability__WEBPACK_IMPORTED_MODULE_0__.Capabil
|
|
|
295
281
|
operationId = this.callTraceManager.startNewOperation();
|
|
296
282
|
const callTrace = this.callTraceManager.addMethodToTrace(path);
|
|
297
283
|
const formattedCallTrace = this.callTraceManager.formatMethodPaths(callTrace);
|
|
298
|
-
|
|
299
|
-
|
|
284
|
+
console.log(`\n${'═'.repeat(60)}`);
|
|
285
|
+
console.log(`▶ ORIGIN [${operationId}] ${path}`);
|
|
300
286
|
if (args.length > 0) {
|
|
301
|
-
|
|
287
|
+
console.log(` Args:`, (0,_utilities_strings__rspack_import_2.stringifyObject)(args, 4, 0));
|
|
302
288
|
}
|
|
303
|
-
|
|
289
|
+
console.log(` Call Stack: ${formattedCallTrace.join(' → ')}`);
|
|
304
290
|
}
|
|
305
291
|
else {
|
|
306
292
|
operationId = this.callTraceManager.getActiveOperationId();
|
|
307
293
|
const callTrace = this.callTraceManager.addMethodToTrace(path);
|
|
308
294
|
const indent = ' '.repeat(Math.min(callTrace.length - 1, 4));
|
|
309
|
-
|
|
295
|
+
console.log(`${indent}└─ CHILD [${operationId}] ${path}`);
|
|
310
296
|
if (args.length > 0) {
|
|
311
|
-
|
|
297
|
+
console.log(`${indent} Args:`, (0,_utilities_strings__rspack_import_2.stringifyObject)(args, 4, 0));
|
|
312
298
|
}
|
|
313
299
|
}
|
|
314
300
|
try {
|
|
@@ -327,12 +313,8 @@ class TracingCapability extends _Capability__WEBPACK_IMPORTED_MODULE_0__.Capabil
|
|
|
327
313
|
}
|
|
328
314
|
|
|
329
315
|
|
|
330
|
-
}
|
|
331
|
-
"./src/capabilities/performance/PerformanceTracker.ts"
|
|
332
|
-
/*!************************************************************!*\
|
|
333
|
-
!*** ./src/capabilities/performance/PerformanceTracker.ts ***!
|
|
334
|
-
\************************************************************/
|
|
335
|
-
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
316
|
+
},
|
|
317
|
+
"./src/capabilities/performance/PerformanceTracker.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
336
318
|
__webpack_require__.r(__webpack_exports__);
|
|
337
319
|
__webpack_require__.d(__webpack_exports__, {
|
|
338
320
|
PerformanceTracker: () => (PerformanceTracker)
|
|
@@ -398,23 +380,19 @@ class PerformanceTracker {
|
|
|
398
380
|
}
|
|
399
381
|
|
|
400
382
|
|
|
401
|
-
}
|
|
402
|
-
"./src/capabilities/tracing/CallTraceManager.ts"
|
|
403
|
-
/*!******************************************************!*\
|
|
404
|
-
!*** ./src/capabilities/tracing/CallTraceManager.ts ***!
|
|
405
|
-
\******************************************************/
|
|
406
|
-
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
383
|
+
},
|
|
384
|
+
"./src/capabilities/tracing/CallTraceManager.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
407
385
|
__webpack_require__.r(__webpack_exports__);
|
|
408
386
|
__webpack_require__.d(__webpack_exports__, {
|
|
409
387
|
CallTraceManager: () => (CallTraceManager)
|
|
410
388
|
});
|
|
411
|
-
/*
|
|
389
|
+
/* import */ var _utilities__rspack_import_0 = __webpack_require__("./src/utilities/uuid.ts");
|
|
412
390
|
|
|
413
391
|
class CallTraceManager {
|
|
414
392
|
activeOperationId = null;
|
|
415
393
|
activeCallStack = [];
|
|
416
394
|
startNewOperation() {
|
|
417
|
-
const operationId = (0,
|
|
395
|
+
const operationId = (0,_utilities__rspack_import_0.uuid)(8);
|
|
418
396
|
this.activeOperationId = operationId;
|
|
419
397
|
this.activeCallStack = [];
|
|
420
398
|
return operationId;
|
|
@@ -455,26 +433,33 @@ class CallTraceManager {
|
|
|
455
433
|
}
|
|
456
434
|
|
|
457
435
|
|
|
458
|
-
}
|
|
459
|
-
"./src/utilities/logger.ts"
|
|
460
|
-
/*!*********************************!*\
|
|
461
|
-
!*** ./src/utilities/logger.ts ***!
|
|
462
|
-
\*********************************/
|
|
463
|
-
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
436
|
+
},
|
|
437
|
+
"./src/utilities/logger.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
464
438
|
__webpack_require__.r(__webpack_exports__);
|
|
465
439
|
__webpack_require__.d(__webpack_exports__, {
|
|
466
440
|
logger: () => (logger)
|
|
467
441
|
});
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
442
|
+
/**
|
|
443
|
+
* Enable logging by setting `globalThis.__ROUTIER_DEBUG__ = true` before any routier code runs.
|
|
444
|
+
*/
|
|
445
|
+
const shouldLog = () => {
|
|
446
|
+
if (typeof globalThis !== 'undefined') {
|
|
447
|
+
const g = globalThis;
|
|
448
|
+
if (g.__ROUTIER_DEBUG__ === true)
|
|
449
|
+
return true;
|
|
471
450
|
}
|
|
472
|
-
|
|
473
|
-
|
|
451
|
+
if (typeof process !== 'undefined' && process.env != null) {
|
|
452
|
+
const debug = process.env.DEBUG;
|
|
453
|
+
if (debug === 'routier' || debug === '*')
|
|
454
|
+
return true;
|
|
455
|
+
const env = "development"?.toLowerCase();
|
|
456
|
+
if (env === 'dev' || env === 'development' || env === 'test')
|
|
457
|
+
return true;
|
|
458
|
+
}
|
|
459
|
+
return false;
|
|
474
460
|
};
|
|
475
|
-
const shouldLog = isDevelopment();
|
|
476
461
|
const tryLog = (type, ...args) => {
|
|
477
|
-
if (shouldLog) {
|
|
462
|
+
if (shouldLog()) {
|
|
478
463
|
console[type](...args);
|
|
479
464
|
}
|
|
480
465
|
};
|
|
@@ -500,12 +485,8 @@ const logger = {
|
|
|
500
485
|
};
|
|
501
486
|
|
|
502
487
|
|
|
503
|
-
}
|
|
504
|
-
"./src/utilities/strings.ts"
|
|
505
|
-
/*!**********************************!*\
|
|
506
|
-
!*** ./src/utilities/strings.ts ***!
|
|
507
|
-
\**********************************/
|
|
508
|
-
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
488
|
+
},
|
|
489
|
+
"./src/utilities/strings.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
509
490
|
__webpack_require__.r(__webpack_exports__);
|
|
510
491
|
__webpack_require__.d(__webpack_exports__, {
|
|
511
492
|
fastHash: () => (fastHash),
|
|
@@ -666,12 +647,8 @@ function stringifyPlainObject(obj, maxDepth, currentDepth) {
|
|
|
666
647
|
}
|
|
667
648
|
|
|
668
649
|
|
|
669
|
-
}
|
|
670
|
-
"./src/utilities/uuid.ts"
|
|
671
|
-
/*!*******************************!*\
|
|
672
|
-
!*** ./src/utilities/uuid.ts ***!
|
|
673
|
-
\*******************************/
|
|
674
|
-
(function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
650
|
+
},
|
|
651
|
+
"./src/utilities/uuid.ts"(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
675
652
|
__webpack_require__.r(__webpack_exports__);
|
|
676
653
|
__webpack_require__.d(__webpack_exports__, {
|
|
677
654
|
uuid: () => (uuid),
|
|
@@ -728,10 +705,9 @@ const uuidv4 = () => {
|
|
|
728
705
|
};
|
|
729
706
|
|
|
730
707
|
|
|
731
|
-
}
|
|
708
|
+
},
|
|
732
709
|
|
|
733
710
|
});
|
|
734
|
-
/************************************************************************/
|
|
735
711
|
// The module cache
|
|
736
712
|
var __webpack_module_cache__ = {};
|
|
737
713
|
|
|
@@ -755,7 +731,6 @@ return module.exports;
|
|
|
755
731
|
|
|
756
732
|
}
|
|
757
733
|
|
|
758
|
-
/************************************************************************/
|
|
759
734
|
// webpack/runtime/define_property_getters
|
|
760
735
|
(() => {
|
|
761
736
|
__webpack_require__.d = (exports, definition) => {
|
|
@@ -780,23 +755,18 @@ __webpack_require__.r = (exports) => {
|
|
|
780
755
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
781
756
|
};
|
|
782
757
|
})();
|
|
783
|
-
/************************************************************************/
|
|
784
758
|
var __webpack_exports__ = {};
|
|
785
759
|
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
|
|
786
760
|
(() => {
|
|
787
|
-
|
|
788
|
-
/*!***********************************!*\
|
|
789
|
-
!*** ./src/capabilities/index.ts ***!
|
|
790
|
-
\***********************************/
|
|
791
761
|
__webpack_require__.r(__webpack_exports__);
|
|
792
762
|
__webpack_require__.d(__webpack_exports__, {
|
|
793
|
-
Capability: () => (/* reexport safe */
|
|
794
|
-
PerformanceCapability: () => (/* reexport safe */
|
|
795
|
-
TracingCapability: () => (/* reexport safe */
|
|
763
|
+
Capability: () => (/* reexport safe */ _Capability__rspack_import_0.Capability),
|
|
764
|
+
PerformanceCapability: () => (/* reexport safe */ _PerformanceCapability__rspack_import_1.PerformanceCapability),
|
|
765
|
+
TracingCapability: () => (/* reexport safe */ _TracingCapability__rspack_import_2.TracingCapability)
|
|
796
766
|
});
|
|
797
|
-
/*
|
|
798
|
-
/*
|
|
799
|
-
/*
|
|
767
|
+
/* import */ var _Capability__rspack_import_0 = __webpack_require__("./src/capabilities/Capability.ts");
|
|
768
|
+
/* import */ var _PerformanceCapability__rspack_import_1 = __webpack_require__("./src/capabilities/PerformanceCapability.ts");
|
|
769
|
+
/* import */ var _TracingCapability__rspack_import_2 = __webpack_require__("./src/capabilities/TracingCapability.ts");
|
|
800
770
|
|
|
801
771
|
|
|
802
772
|
|