@pol-studios/db 1.0.0 → 1.0.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/README.md +434 -0
- package/dist/EntityPermissions-DwFt4tUd.d.ts +35 -0
- package/dist/FilterConfig-Bt2Ek74z.d.ts +99 -0
- package/dist/UserMetadataContext-CeUdM6kV.d.ts +89 -0
- package/dist/auth/context.d.ts +47 -0
- package/dist/auth/context.js +12791 -0
- package/dist/auth/context.js.map +1 -0
- package/dist/auth/guards.d.ts +180 -0
- package/dist/auth/guards.js +7651 -0
- package/dist/auth/guards.js.map +1 -0
- package/dist/auth/hooks.d.ts +312 -0
- package/dist/auth/hooks.js +10600 -0
- package/dist/auth/hooks.js.map +1 -0
- package/dist/auth/index.d.ts +10 -0
- package/dist/auth/index.js +13035 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/client/index.d.ts +16 -0
- package/dist/core/index.d.ts +508 -0
- package/dist/executor-CB4KHyYG.d.ts +507 -0
- package/dist/gen/index.d.ts +1099 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/index-CMhJjgef.d.ts +1815 -0
- package/dist/index-DNv49L9u.d.ts +8780 -0
- package/dist/index.d.ts +1486 -0
- package/dist/index.js +10320 -7124
- package/dist/index.js.map +1 -1
- package/dist/mutation/index.d.ts +58 -0
- package/dist/mutation/index.js +4581 -76
- package/dist/mutation/index.js.map +1 -1
- package/dist/parser/index.d.ts +366 -0
- package/dist/parser/index.js +26 -26
- package/dist/parser/index.js.map +1 -1
- package/dist/query/index.d.ts +723 -0
- package/dist/query/index.js +13124 -10324
- package/dist/query/index.js.map +1 -1
- package/dist/realtime/index.d.ts +44 -0
- package/dist/realtime/index.js +13217 -9297
- package/dist/realtime/index.js.map +1 -1
- package/dist/select-query-parser-CGI40aOg.d.ts +352 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types-DjuX1XHy.d.ts +62 -0
- package/dist/useBatchUpsert-BHaIk9ID.d.ts +24 -0
- package/dist/useDbQuery-C-TL8jY1.d.ts +19 -0
- package/dist/useSupabase-DO9kQv2O.d.ts +27 -0
- package/package.json +28 -15
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
import { PostgrestBuilder, PostgrestSingleResponse, PostgrestMaybeSingleResponse, PostgrestResponse, PostgrestQueryBuilder } from '@supabase/postgrest-js';
|
|
2
|
+
export { G as GetResult, S as SelectQueryError } from '../select-query-parser-CGI40aOg.js';
|
|
3
|
+
export { F as Fetch, k as GenericFunction, i as GenericNonUpdatableView, G as GenericSchema, a as GenericTable, h as GenericUpdatableView, j as GenericView, b as PostgrestError, f as PostgrestMaybeSingleResponse, g as PostgrestResponse, d as PostgrestResponseFailure, c as PostgrestResponseSuccess, e as PostgrestSingleResponse, P as Prettify } from '../types-DjuX1XHy.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A function that validates whether the given input is an object of type Type
|
|
7
|
+
* @returns true if obj is of type Type, false if not
|
|
8
|
+
*/
|
|
9
|
+
type FilterFn<Type extends Record<string, unknown>> = (obj: unknown) => obj is Type;
|
|
10
|
+
/**
|
|
11
|
+
* The supported value types
|
|
12
|
+
*/
|
|
13
|
+
type ValueType = number | string | boolean | null | Date | object;
|
|
14
|
+
/**
|
|
15
|
+
* A function implementing a FilterOperators
|
|
16
|
+
* @param columnValue the value of the input object to test the filter against
|
|
17
|
+
* @param filterValue the value of the filter, e.g. in .eq('colname', 'filterValue'), 'filterValue' would be the filterValue
|
|
18
|
+
* @returns true if the filter applies, false if not
|
|
19
|
+
*/
|
|
20
|
+
type OperatorFn = (columnValue: any, filterValue: any) => boolean;
|
|
21
|
+
/**
|
|
22
|
+
* All supported operators of PostgREST
|
|
23
|
+
*/
|
|
24
|
+
type PostgrestFilterOperator = 'or' | 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'like' | 'ilike' | 'is' | 'in' | 'cs' | 'cd' | 'fts' | 'plfts';
|
|
25
|
+
/**
|
|
26
|
+
* An object describing a selected path of a query
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
type Path = {
|
|
30
|
+
/**
|
|
31
|
+
* The aliased path if a column or relation name mapping is used within the path
|
|
32
|
+
*/
|
|
33
|
+
alias?: string;
|
|
34
|
+
/**
|
|
35
|
+
* The "real" path of a column
|
|
36
|
+
*/
|
|
37
|
+
path: string;
|
|
38
|
+
/**
|
|
39
|
+
* The full declaration of a column that includes alias, hints and inner joins
|
|
40
|
+
*/
|
|
41
|
+
declaration: string;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* A decomposed filter applied to a query
|
|
45
|
+
*/
|
|
46
|
+
type FilterDefinition = {
|
|
47
|
+
/**
|
|
48
|
+
* The path to which the filter is applied
|
|
49
|
+
*/
|
|
50
|
+
path: string;
|
|
51
|
+
/**
|
|
52
|
+
* The aliased path if a column or relation name mapping is used
|
|
53
|
+
*/
|
|
54
|
+
alias?: string;
|
|
55
|
+
/**
|
|
56
|
+
* The operator that is applied
|
|
57
|
+
*/
|
|
58
|
+
operator: PostgrestFilterOperator;
|
|
59
|
+
/**
|
|
60
|
+
* Whether or not to negate the results of the filter, e.g. when .not('name', 'eq', 'Paris') is applied
|
|
61
|
+
*/
|
|
62
|
+
negate: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* The value of the filter
|
|
65
|
+
*/
|
|
66
|
+
value: ValueType;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* A json representation of PostgREST filters that are applied to a query
|
|
70
|
+
*/
|
|
71
|
+
type FilterDefinitions = ({
|
|
72
|
+
or: FilterDefinitions;
|
|
73
|
+
} | {
|
|
74
|
+
and: FilterDefinitions;
|
|
75
|
+
} | FilterDefinition)[];
|
|
76
|
+
type ArrayElement<ArrayType extends readonly unknown[]> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never;
|
|
77
|
+
declare const isAndFilter: (f: ArrayElement<FilterDefinitions>) => f is {
|
|
78
|
+
and: FilterDefinitions;
|
|
79
|
+
};
|
|
80
|
+
declare const isOrFilter: (f: ArrayElement<FilterDefinitions>) => f is {
|
|
81
|
+
or: FilterDefinitions;
|
|
82
|
+
};
|
|
83
|
+
declare const isFilterDefinition: (f: ArrayElement<FilterDefinitions>) => f is FilterDefinition;
|
|
84
|
+
type OrderDefinition = {
|
|
85
|
+
column: string;
|
|
86
|
+
ascending: boolean;
|
|
87
|
+
nullsFirst: boolean;
|
|
88
|
+
foreignTable?: string;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
declare const SUPPORTED_OPERATORS: string[];
|
|
92
|
+
type PostgrestQueryParserOptions = {
|
|
93
|
+
/**
|
|
94
|
+
* If defined, will use only filters that apply to the given paths
|
|
95
|
+
*/
|
|
96
|
+
exclusivePaths?: string[];
|
|
97
|
+
};
|
|
98
|
+
declare class PostgrestQueryParser {
|
|
99
|
+
readonly opts?: PostgrestQueryParserOptions;
|
|
100
|
+
private readonly _params;
|
|
101
|
+
private _filters;
|
|
102
|
+
private _paths;
|
|
103
|
+
constructor(query: string, opts?: PostgrestQueryParserOptions);
|
|
104
|
+
/**
|
|
105
|
+
* Getter that returns the paths and their aliases that the query selects. Will do the computation only once.
|
|
106
|
+
*
|
|
107
|
+
* ```js
|
|
108
|
+
* const p = new PostgrestParser(
|
|
109
|
+
* supabaseClient.from("test")
|
|
110
|
+
* .select(
|
|
111
|
+
* `name,
|
|
112
|
+
* city:cities (
|
|
113
|
+
* test:name
|
|
114
|
+
* ),
|
|
115
|
+
* countries (
|
|
116
|
+
* capital,
|
|
117
|
+
* population,
|
|
118
|
+
* some_ref (
|
|
119
|
+
* test:first,
|
|
120
|
+
* second
|
|
121
|
+
* )
|
|
122
|
+
* )`
|
|
123
|
+
* );
|
|
124
|
+
* console.log(p.paths);
|
|
125
|
+
* // [
|
|
126
|
+
* // { alias: undefined, path: "name" },
|
|
127
|
+
* // { alias: "city.test", path: "cities.name" },
|
|
128
|
+
* // { alias: undefined, path: "countries.capital" },
|
|
129
|
+
* // { alias: undefined, path: "countries.population" },
|
|
130
|
+
* // {
|
|
131
|
+
* // alias: "countries.some_ref.test",
|
|
132
|
+
* // path: "countries.some_ref.first",
|
|
133
|
+
* // },
|
|
134
|
+
* // { alias: undefined, path: "countries.some_ref.second" },
|
|
135
|
+
* // ];
|
|
136
|
+
* ```
|
|
137
|
+
*
|
|
138
|
+
* @returns an array of paths that the query selects, containing the columns and aliases
|
|
139
|
+
*/
|
|
140
|
+
get paths(): Path[];
|
|
141
|
+
/**
|
|
142
|
+
* Getter that returns the filters that this query applies in a json object.
|
|
143
|
+
*
|
|
144
|
+
* ```js
|
|
145
|
+
* const p = new PostgrestParser(
|
|
146
|
+
* supabaseClient.from("test").select('*')
|
|
147
|
+
* .or("full_name.eq.20,test.neq.true,and(full_name.eq.Test Name,email.eq.test@mail.com)")
|
|
148
|
+
* .eq("id", "123")
|
|
149
|
+
* .contains("id", "456")
|
|
150
|
+
* );
|
|
151
|
+
*
|
|
152
|
+
* console.log(p.filters);
|
|
153
|
+
*
|
|
154
|
+
* // [
|
|
155
|
+
* // {
|
|
156
|
+
* // or: [
|
|
157
|
+
* // {
|
|
158
|
+
* // path: "full_name",
|
|
159
|
+
* // negate: false,
|
|
160
|
+
* // operator: "eq",
|
|
161
|
+
* // value: 20,
|
|
162
|
+
* // },
|
|
163
|
+
* // {
|
|
164
|
+
* // path: "test",
|
|
165
|
+
* // negate: false,
|
|
166
|
+
* // operator: "neq",
|
|
167
|
+
* // value: true,
|
|
168
|
+
* // },
|
|
169
|
+
* // {
|
|
170
|
+
* // and: [
|
|
171
|
+
* // {
|
|
172
|
+
* // path: "full_name",
|
|
173
|
+
* // negate: false,
|
|
174
|
+
* // operator: "eq",
|
|
175
|
+
* // value: "Test Name",
|
|
176
|
+
* // },
|
|
177
|
+
* // {
|
|
178
|
+
* // path: "email",
|
|
179
|
+
* // negate: false,
|
|
180
|
+
* // operator: "eq",
|
|
181
|
+
* // value: "test@mail.com",
|
|
182
|
+
* // },
|
|
183
|
+
* // ],
|
|
184
|
+
* // },
|
|
185
|
+
* // ],
|
|
186
|
+
* // },
|
|
187
|
+
* // {
|
|
188
|
+
* // path: "id",
|
|
189
|
+
* // negate: false,
|
|
190
|
+
* // operator: "eq",
|
|
191
|
+
* // value: 123,
|
|
192
|
+
* // },
|
|
193
|
+
* // {
|
|
194
|
+
* // path: "id",
|
|
195
|
+
* // negate: false,
|
|
196
|
+
* // operator: "cs",
|
|
197
|
+
* // value: 456,
|
|
198
|
+
* // },
|
|
199
|
+
* // ];
|
|
200
|
+
* ```
|
|
201
|
+
*
|
|
202
|
+
* @returns a FilterDefinitions object
|
|
203
|
+
*/
|
|
204
|
+
get filters(): FilterDefinitions;
|
|
205
|
+
private parseFilterString;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
declare class PostgrestParser<Result> extends PostgrestQueryParser {
|
|
209
|
+
readonly opts?: PostgrestQueryParserOptions;
|
|
210
|
+
private readonly _url;
|
|
211
|
+
private readonly _headers;
|
|
212
|
+
private readonly _body;
|
|
213
|
+
readonly method: "GET" | "HEAD" | "POST" | "PATCH" | "DELETE";
|
|
214
|
+
readonly select: string;
|
|
215
|
+
readonly queryKey: string;
|
|
216
|
+
readonly bodyKey: string | undefined;
|
|
217
|
+
readonly count: string | null;
|
|
218
|
+
readonly schema: string;
|
|
219
|
+
readonly table: string;
|
|
220
|
+
readonly isHead: boolean | undefined;
|
|
221
|
+
readonly limit: number | undefined;
|
|
222
|
+
readonly offset: number | undefined;
|
|
223
|
+
readonly orderBy: OrderDefinition[];
|
|
224
|
+
readonly orderByKey: string;
|
|
225
|
+
readonly searchParams: URLSearchParams;
|
|
226
|
+
constructor(fb: PostgrestBuilder<any, Result>, opts?: PostgrestQueryParserOptions);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
declare class PostgrestFilter<Result extends Record<string, unknown>> {
|
|
230
|
+
readonly params: {
|
|
231
|
+
filters: FilterDefinitions;
|
|
232
|
+
paths: Path[];
|
|
233
|
+
};
|
|
234
|
+
private _fn;
|
|
235
|
+
private _selectFn;
|
|
236
|
+
private _filtersFn;
|
|
237
|
+
private _filterPaths;
|
|
238
|
+
constructor(params: {
|
|
239
|
+
filters: FilterDefinitions;
|
|
240
|
+
paths: Path[];
|
|
241
|
+
});
|
|
242
|
+
static fromQuery(query: string, opts?: PostgrestQueryParserOptions): PostgrestFilter<Record<string, unknown>>;
|
|
243
|
+
static fromBuilder<Result extends Record<string, unknown> = Record<string, unknown>>(fb: PostgrestBuilder<any, Result>, opts?: PostgrestQueryParserOptions): PostgrestFilter<Result>;
|
|
244
|
+
denormalize<Type extends Record<string, unknown>>(obj: Type): Type;
|
|
245
|
+
apply(obj: unknown): obj is Result;
|
|
246
|
+
applyFilters(obj: unknown): obj is Result;
|
|
247
|
+
hasFiltersOnPaths(paths: string[]): boolean;
|
|
248
|
+
applyFiltersOnPaths(obj: unknown, paths: string[]): obj is Result;
|
|
249
|
+
hasPaths(obj: unknown): obj is Result;
|
|
250
|
+
private hasPathRecursive;
|
|
251
|
+
private applyFilterFn;
|
|
252
|
+
private buildFilterFn;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Denormalize a normalized response object using the paths of the target query
|
|
257
|
+
* **/
|
|
258
|
+
declare const denormalize: <R extends Record<string, unknown>>(paths: Path[], obj: R) => R;
|
|
259
|
+
|
|
260
|
+
declare function binarySearch<Type>(arr: Type[], el: Type, compare: (a: Type, b: Type) => number): number;
|
|
261
|
+
|
|
262
|
+
type AnyPostgrestResponse<Result> = PostgrestSingleResponse<Result> | PostgrestMaybeSingleResponse<Result> | PostgrestResponse<Result>;
|
|
263
|
+
declare const isAnyPostgrestResponse: <Result>(q: unknown) => q is AnyPostgrestResponse<Result>;
|
|
264
|
+
type PostgrestPaginationResponse<Result> = Result[];
|
|
265
|
+
declare const isPostgrestPaginationResponse: <Result>(q: unknown) => q is PostgrestPaginationResponse<Result>;
|
|
266
|
+
type PostgrestHasMorePaginationResponse<Result> = {
|
|
267
|
+
data: Result[];
|
|
268
|
+
hasMore: boolean;
|
|
269
|
+
};
|
|
270
|
+
declare const isPostgrestHasMorePaginationResponse: <Result>(q: unknown) => q is PostgrestHasMorePaginationResponse<Result>;
|
|
271
|
+
|
|
272
|
+
type PostgrestPaginationCacheData<Result> = Result[][];
|
|
273
|
+
declare const isPostgrestPaginationCacheData: <Result>(q: unknown) => q is PostgrestPaginationCacheData<Result>;
|
|
274
|
+
type PostgrestHasMorePaginationCacheData<Result> = PostgrestHasMorePaginationResponse<Result>[];
|
|
275
|
+
declare const isPostgrestHasMorePaginationCacheData: <Result>(q: unknown) => q is PostgrestHasMorePaginationCacheData<Result>;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Encodes an object by url-encoding an ordered lists of all paths and their values.
|
|
279
|
+
*/
|
|
280
|
+
declare const encodeObject: (obj: Record<string, unknown>) => string;
|
|
281
|
+
|
|
282
|
+
declare const extractPathsFromFilters: (f: FilterDefinitions, p: Path[]) => Path[];
|
|
283
|
+
|
|
284
|
+
declare const filterFilterDefinitionsByPaths: (f: FilterDefinitions, paths: string[]) => FilterDefinitions;
|
|
285
|
+
|
|
286
|
+
declare const findFilters: (f: FilterDefinitions, by: Partial<FilterDefinition>) => FilterDefinition[];
|
|
287
|
+
|
|
288
|
+
declare const findIndexOrdered: <Type extends Record<string, unknown>>(input: Type, currentData: Type[], orderBy: OrderDefinition[]) => number;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Returns the index of the last element in the array where predicate is true, and -1
|
|
292
|
+
* otherwise.
|
|
293
|
+
* @param array The source array to search in
|
|
294
|
+
* @param predicate find calls predicate once for each element of the array, in descending
|
|
295
|
+
* order, until it finds one where predicate returns true. If such an element is found,
|
|
296
|
+
* findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
|
|
297
|
+
*/
|
|
298
|
+
declare function findLastIndex<T>(array: T[], predicate: (value: T, index: number, obj: T[]) => boolean): number;
|
|
299
|
+
|
|
300
|
+
declare const get: (obj: any, path: string, defaultValue?: any) => any;
|
|
301
|
+
|
|
302
|
+
declare const getTable: (query: PostgrestBuilder<any, any> | PostgrestQueryBuilder<any, any, any>) => string;
|
|
303
|
+
|
|
304
|
+
type NestedPath = {
|
|
305
|
+
alias?: string;
|
|
306
|
+
path: string;
|
|
307
|
+
declaration: string;
|
|
308
|
+
paths: (Path | NestedPath)[];
|
|
309
|
+
};
|
|
310
|
+
declare const isNestedPath: (p: Path | NestedPath) => p is NestedPath;
|
|
311
|
+
declare const groupPathsRecursive: (paths: Path[]) => (Path | NestedPath)[];
|
|
312
|
+
|
|
313
|
+
declare const ifDateGetTime: (v: unknown) => unknown;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Check if a value is a valid ISO DateTime string
|
|
317
|
+
* @param v
|
|
318
|
+
* @returns
|
|
319
|
+
*/
|
|
320
|
+
declare const isISODateString: (v: unknown) => boolean;
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
*
|
|
324
|
+
* @param i Ahhh gotta love typescript
|
|
325
|
+
* @returns
|
|
326
|
+
*/
|
|
327
|
+
declare const isNotNull: <I>(i: I | null) => i is I;
|
|
328
|
+
|
|
329
|
+
declare const isObject: (v: unknown) => v is Record<string, unknown>;
|
|
330
|
+
|
|
331
|
+
declare const isPostgrestBuilder: <Result>(q: unknown) => q is PostgrestBuilder<any, Result>;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* An object containing all PostgrestFilterOperator implementations
|
|
335
|
+
*/
|
|
336
|
+
declare const OPERATOR_MAP: {
|
|
337
|
+
[Key in PostgrestFilterOperator]?: OperatorFn;
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Parses orderByKey back to OrderDefinition
|
|
342
|
+
* @param key generated by PostgrestParser
|
|
343
|
+
* @returns The parsed OrderDefinition
|
|
344
|
+
*/
|
|
345
|
+
declare const parseOrderByKey: (v: string) => OrderDefinition[];
|
|
346
|
+
|
|
347
|
+
declare const parseSelectParam: (s: string, currentPath?: Path) => Path[];
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Safely parse any value to a ValueType
|
|
351
|
+
* @param v Any value
|
|
352
|
+
* @returns a ValueType
|
|
353
|
+
*/
|
|
354
|
+
declare const parseValue: (v: any) => ValueType;
|
|
355
|
+
|
|
356
|
+
declare const removeAliasFromDeclaration: (d: string) => string;
|
|
357
|
+
|
|
358
|
+
declare const removeFirstPathElement: (p: Path) => Path;
|
|
359
|
+
|
|
360
|
+
declare const setFilterValue: (searchParams: URLSearchParams, path: string, op: string, value: string) => void;
|
|
361
|
+
|
|
362
|
+
declare const sortSearchParams: (params: URLSearchParams) => URLSearchParams;
|
|
363
|
+
|
|
364
|
+
declare const buildSortedComparator: <Type extends Record<string, unknown>>(orderBy: OrderDefinition[]) => (a: Type, b: Type) => 0 | 1 | -1;
|
|
365
|
+
|
|
366
|
+
export { type AnyPostgrestResponse, type FilterDefinition, type FilterDefinitions, type FilterFn, type NestedPath, OPERATOR_MAP, type OperatorFn, type OrderDefinition, type Path, PostgrestFilter, type PostgrestFilterOperator, type PostgrestHasMorePaginationCacheData, type PostgrestHasMorePaginationResponse, type PostgrestPaginationCacheData, type PostgrestPaginationResponse, PostgrestParser, PostgrestQueryParser, type PostgrestQueryParserOptions, SUPPORTED_OPERATORS, type ValueType, binarySearch, buildSortedComparator, denormalize, encodeObject, extractPathsFromFilters, filterFilterDefinitionsByPaths, findFilters, findIndexOrdered, findLastIndex, get, getTable, groupPathsRecursive, ifDateGetTime, isAndFilter, isAnyPostgrestResponse, isFilterDefinition, isISODateString, isNestedPath, isNotNull, isObject, isOrFilter, isPostgrestBuilder, isPostgrestHasMorePaginationCacheData, isPostgrestHasMorePaginationResponse, isPostgrestPaginationCacheData, isPostgrestPaginationResponse, parseOrderByKey, parseSelectParam, parseValue, removeAliasFromDeclaration, removeFirstPathElement, setFilterValue, sortSearchParams };
|
package/dist/parser/index.js
CHANGED
|
@@ -24,9 +24,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
mod
|
|
25
25
|
));
|
|
26
26
|
|
|
27
|
-
// ../../../node_modules/.pnpm/xregexp@5.1.
|
|
27
|
+
// ../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/tools/output/categories.js
|
|
28
28
|
var require_categories = __commonJS({
|
|
29
|
-
"../../../node_modules/.pnpm/xregexp@5.1.
|
|
29
|
+
"../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/tools/output/categories.js"(exports, module) {
|
|
30
30
|
module.exports = [
|
|
31
31
|
{
|
|
32
32
|
"name": "C",
|
|
@@ -248,9 +248,9 @@ var require_categories = __commonJS({
|
|
|
248
248
|
}
|
|
249
249
|
});
|
|
250
250
|
|
|
251
|
-
// ../../../node_modules/.pnpm/xregexp@5.1.
|
|
251
|
+
// ../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/tools/output/properties.js
|
|
252
252
|
var require_properties = __commonJS({
|
|
253
|
-
"../../../node_modules/.pnpm/xregexp@5.1.
|
|
253
|
+
"../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/tools/output/properties.js"(exports, module) {
|
|
254
254
|
module.exports = [
|
|
255
255
|
{
|
|
256
256
|
"name": "ASCII",
|
|
@@ -295,9 +295,9 @@ var require_properties = __commonJS({
|
|
|
295
295
|
}
|
|
296
296
|
});
|
|
297
297
|
|
|
298
|
-
// ../../../node_modules/.pnpm/xregexp@5.1.
|
|
298
|
+
// ../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/tools/output/scripts.js
|
|
299
299
|
var require_scripts = __commonJS({
|
|
300
|
-
"../../../node_modules/.pnpm/xregexp@5.1.
|
|
300
|
+
"../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/tools/output/scripts.js"(exports, module) {
|
|
301
301
|
module.exports = [
|
|
302
302
|
{
|
|
303
303
|
"name": "Adlam",
|
|
@@ -1559,15 +1559,15 @@ var OPERATOR_MAP = {
|
|
|
1559
1559
|
)
|
|
1560
1560
|
};
|
|
1561
1561
|
|
|
1562
|
-
// ../../../node_modules/.pnpm/xregexp@5.1.
|
|
1562
|
+
// ../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/src/xregexp.js
|
|
1563
1563
|
var REGEX_DATA = "xregexp";
|
|
1564
1564
|
var features = {
|
|
1565
1565
|
astral: false,
|
|
1566
1566
|
namespacing: true
|
|
1567
1567
|
};
|
|
1568
1568
|
var fixed = {};
|
|
1569
|
-
var regexCache =
|
|
1570
|
-
var patternCache =
|
|
1569
|
+
var regexCache = /* @__PURE__ */ Object.create(null);
|
|
1570
|
+
var patternCache = /* @__PURE__ */ Object.create(null);
|
|
1571
1571
|
var tokens = [];
|
|
1572
1572
|
var defaultScope = "default";
|
|
1573
1573
|
var classScope = "class";
|
|
@@ -1873,7 +1873,7 @@ function XRegExp(pattern, flags) {
|
|
|
1873
1873
|
);
|
|
1874
1874
|
}
|
|
1875
1875
|
XRegExp.prototype = new RegExp();
|
|
1876
|
-
XRegExp.version = "5.1.
|
|
1876
|
+
XRegExp.version = "5.1.2";
|
|
1877
1877
|
XRegExp._clipDuplicates = clipDuplicates;
|
|
1878
1878
|
XRegExp._hasNativeFlag = hasNativeFlag;
|
|
1879
1879
|
XRegExp._dec = dec;
|
|
@@ -1913,9 +1913,9 @@ XRegExp.cache = (pattern, flags) => {
|
|
|
1913
1913
|
};
|
|
1914
1914
|
XRegExp.cache.flush = (cacheName) => {
|
|
1915
1915
|
if (cacheName === "patterns") {
|
|
1916
|
-
patternCache =
|
|
1916
|
+
patternCache = /* @__PURE__ */ Object.create(null);
|
|
1917
1917
|
} else {
|
|
1918
|
-
regexCache =
|
|
1918
|
+
regexCache = /* @__PURE__ */ Object.create(null);
|
|
1919
1919
|
}
|
|
1920
1920
|
};
|
|
1921
1921
|
XRegExp.escape = (str) => String(nullThrows(str)).replace(/[\\\[\]{}()*+?.^$|]/g, "\\$&").replace(/[\s#\-,]/g, (match) => `\\u${pad4(hex(match.charCodeAt(0)))}`);
|
|
@@ -2368,7 +2368,7 @@ XRegExp.addToken(
|
|
|
2368
2368
|
);
|
|
2369
2369
|
var xregexp_default = XRegExp;
|
|
2370
2370
|
|
|
2371
|
-
// ../../../node_modules/.pnpm/xregexp@5.1.
|
|
2371
|
+
// ../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/src/addons/build.js
|
|
2372
2372
|
var build_default = (XRegExp2) => {
|
|
2373
2373
|
const REGEX_DATA2 = "xregexp";
|
|
2374
2374
|
const subParts = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g;
|
|
@@ -2492,7 +2492,7 @@ var build_default = (XRegExp2) => {
|
|
|
2492
2492
|
};
|
|
2493
2493
|
};
|
|
2494
2494
|
|
|
2495
|
-
// ../../../node_modules/.pnpm/xregexp@5.1.
|
|
2495
|
+
// ../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/src/addons/matchrecursive.js
|
|
2496
2496
|
var matchrecursive_default = (XRegExp2) => {
|
|
2497
2497
|
function row(name, value, start, end) {
|
|
2498
2498
|
return {
|
|
@@ -2622,7 +2622,7 @@ var matchrecursive_default = (XRegExp2) => {
|
|
|
2622
2622
|
};
|
|
2623
2623
|
};
|
|
2624
2624
|
|
|
2625
|
-
// ../../../node_modules/.pnpm/xregexp@5.1.
|
|
2625
|
+
// ../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/src/addons/unicode-base.js
|
|
2626
2626
|
var unicode_base_default = (XRegExp2) => {
|
|
2627
2627
|
const unicode = {};
|
|
2628
2628
|
const unicodeTypes = {};
|
|
@@ -2774,7 +2774,7 @@ var unicode_base_default = (XRegExp2) => {
|
|
|
2774
2774
|
};
|
|
2775
2775
|
};
|
|
2776
2776
|
|
|
2777
|
-
// ../../../node_modules/.pnpm/xregexp@5.1.
|
|
2777
|
+
// ../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/src/addons/unicode-categories.js
|
|
2778
2778
|
var import_categories = __toESM(require_categories());
|
|
2779
2779
|
var unicode_categories_default = (XRegExp2) => {
|
|
2780
2780
|
if (!XRegExp2.addUnicodeData) {
|
|
@@ -2783,7 +2783,7 @@ var unicode_categories_default = (XRegExp2) => {
|
|
|
2783
2783
|
XRegExp2.addUnicodeData(import_categories.default);
|
|
2784
2784
|
};
|
|
2785
2785
|
|
|
2786
|
-
// ../../../node_modules/.pnpm/xregexp@5.1.
|
|
2786
|
+
// ../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/src/addons/unicode-properties.js
|
|
2787
2787
|
var import_properties = __toESM(require_properties());
|
|
2788
2788
|
var unicode_properties_default = (XRegExp2) => {
|
|
2789
2789
|
if (!XRegExp2.addUnicodeData) {
|
|
@@ -2799,7 +2799,7 @@ var unicode_properties_default = (XRegExp2) => {
|
|
|
2799
2799
|
XRegExp2.addUnicodeData(unicodeData);
|
|
2800
2800
|
};
|
|
2801
2801
|
|
|
2802
|
-
// ../../../node_modules/.pnpm/xregexp@5.1.
|
|
2802
|
+
// ../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/src/addons/unicode-scripts.js
|
|
2803
2803
|
var import_scripts = __toESM(require_scripts());
|
|
2804
2804
|
var unicode_scripts_default = (XRegExp2) => {
|
|
2805
2805
|
if (!XRegExp2.addUnicodeData) {
|
|
@@ -2808,7 +2808,7 @@ var unicode_scripts_default = (XRegExp2) => {
|
|
|
2808
2808
|
XRegExp2.addUnicodeData(import_scripts.default, "Script");
|
|
2809
2809
|
};
|
|
2810
2810
|
|
|
2811
|
-
// ../../../node_modules/.pnpm/xregexp@5.1.
|
|
2811
|
+
// ../../../node_modules/.pnpm/xregexp@5.1.2/node_modules/xregexp/src/index.js
|
|
2812
2812
|
build_default(xregexp_default);
|
|
2813
2813
|
matchrecursive_default(xregexp_default);
|
|
2814
2814
|
unicode_base_default(xregexp_default);
|
|
@@ -3684,35 +3684,35 @@ export {
|
|
|
3684
3684
|
|
|
3685
3685
|
xregexp/src/xregexp.js:
|
|
3686
3686
|
(*!
|
|
3687
|
-
* XRegExp 5.1.
|
|
3687
|
+
* XRegExp 5.1.2
|
|
3688
3688
|
* <xregexp.com>
|
|
3689
3689
|
* Steven Levithan (c) 2007-present MIT License
|
|
3690
3690
|
*)
|
|
3691
3691
|
|
|
3692
3692
|
xregexp/src/addons/build.js:
|
|
3693
3693
|
(*!
|
|
3694
|
-
* XRegExp.build 5.1.
|
|
3694
|
+
* XRegExp.build 5.1.2
|
|
3695
3695
|
* <xregexp.com>
|
|
3696
3696
|
* Steven Levithan (c) 2012-present MIT License
|
|
3697
3697
|
*)
|
|
3698
3698
|
|
|
3699
3699
|
xregexp/src/addons/matchrecursive.js:
|
|
3700
3700
|
(*!
|
|
3701
|
-
* XRegExp.matchRecursive 5.1.
|
|
3701
|
+
* XRegExp.matchRecursive 5.1.2
|
|
3702
3702
|
* <xregexp.com>
|
|
3703
3703
|
* Steven Levithan (c) 2009-present MIT License
|
|
3704
3704
|
*)
|
|
3705
3705
|
|
|
3706
3706
|
xregexp/src/addons/unicode-base.js:
|
|
3707
3707
|
(*!
|
|
3708
|
-
* XRegExp Unicode Base 5.1.
|
|
3708
|
+
* XRegExp Unicode Base 5.1.2
|
|
3709
3709
|
* <xregexp.com>
|
|
3710
3710
|
* Steven Levithan (c) 2008-present MIT License
|
|
3711
3711
|
*)
|
|
3712
3712
|
|
|
3713
3713
|
xregexp/src/addons/unicode-categories.js:
|
|
3714
3714
|
(*!
|
|
3715
|
-
* XRegExp Unicode Categories 5.1.
|
|
3715
|
+
* XRegExp Unicode Categories 5.1.2
|
|
3716
3716
|
* <xregexp.com>
|
|
3717
3717
|
* Steven Levithan (c) 2010-present MIT License
|
|
3718
3718
|
* Unicode data by Mathias Bynens <mathiasbynens.be>
|
|
@@ -3720,7 +3720,7 @@ xregexp/src/addons/unicode-categories.js:
|
|
|
3720
3720
|
|
|
3721
3721
|
xregexp/src/addons/unicode-properties.js:
|
|
3722
3722
|
(*!
|
|
3723
|
-
* XRegExp Unicode Properties 5.1.
|
|
3723
|
+
* XRegExp Unicode Properties 5.1.2
|
|
3724
3724
|
* <xregexp.com>
|
|
3725
3725
|
* Steven Levithan (c) 2012-present MIT License
|
|
3726
3726
|
* Unicode data by Mathias Bynens <mathiasbynens.be>
|
|
@@ -3728,7 +3728,7 @@ xregexp/src/addons/unicode-properties.js:
|
|
|
3728
3728
|
|
|
3729
3729
|
xregexp/src/addons/unicode-scripts.js:
|
|
3730
3730
|
(*!
|
|
3731
|
-
* XRegExp Unicode Scripts 5.1.
|
|
3731
|
+
* XRegExp Unicode Scripts 5.1.2
|
|
3732
3732
|
* <xregexp.com>
|
|
3733
3733
|
* Steven Levithan (c) 2010-present MIT License
|
|
3734
3734
|
* Unicode data by Mathias Bynens <mathiasbynens.be>
|