@idlebox/ignore-edit 0.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/LICENSE +21 -0
- package/README.md +33 -0
- package/bin.js +6 -0
- package/config/rig.json +5 -0
- package/lib/api.d.ts +31 -0
- package/lib/api.d.ts.map +1 -0
- package/lib/api.js +235 -0
- package/lib/api.js.map +1 -0
- package/lib/bin.d.ts +2 -0
- package/lib/bin.d.ts.map +1 -0
- package/lib/bin.js +3 -0
- package/lib/bin.js.map +1 -0
- package/lib/test.d.ts +2 -0
- package/lib/test.d.ts.map +1 -0
- package/lib/test.js +51 -0
- package/lib/test.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/package.json +36 -0
- package/src/api.ts +281 -0
- package/src/bin.ts +1 -0
- package/src/test.ts +59 -0
- package/src/tsconfig.json +9 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 GongT<admin@gongt.me>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Structured Ignore Files
|
|
2
|
+
|
|
3
|
+
library to parse/modify ignore files like this:
|
|
4
|
+
|
|
5
|
+
```ignorefile
|
|
6
|
+
### dist files
|
|
7
|
+
/dist
|
|
8
|
+
|
|
9
|
+
### packages
|
|
10
|
+
node_modules
|
|
11
|
+
|
|
12
|
+
### logs
|
|
13
|
+
*.log
|
|
14
|
+
|
|
15
|
+
### temp folders
|
|
16
|
+
temp/
|
|
17
|
+
/generated-files
|
|
18
|
+
*.temp
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import { loadFile, saveFile } from '@idlebox/ignore-edit';
|
|
23
|
+
const content = loadFile('.gitignore');
|
|
24
|
+
|
|
25
|
+
content.packages.push('jspm_packages');
|
|
26
|
+
|
|
27
|
+
content['new section'].push('some/folder');
|
|
28
|
+
|
|
29
|
+
content['temp folders'].delete('temp/');
|
|
30
|
+
content['temp folders'].push('!wanted.temp');
|
|
31
|
+
|
|
32
|
+
saveFile(content);
|
|
33
|
+
```
|
package/bin.js
ADDED
package/config/rig.json
ADDED
package/lib/api.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const unscoped: unique symbol;
|
|
2
|
+
declare const filePath: unique symbol;
|
|
3
|
+
declare const originalContent: unique symbol;
|
|
4
|
+
export declare function emptyLine(): symbol;
|
|
5
|
+
type ILine = symbol | string;
|
|
6
|
+
export interface IIgnoreFile extends IIgnoreFileData, IIterable {
|
|
7
|
+
}
|
|
8
|
+
interface IIgnoreFileData {
|
|
9
|
+
[unscoped]: ILine[];
|
|
10
|
+
[filePath]?: string;
|
|
11
|
+
[originalContent]: string;
|
|
12
|
+
[title: string]: ILine[];
|
|
13
|
+
}
|
|
14
|
+
interface IIterable {
|
|
15
|
+
[Symbol.iterator](): IterableIterator<[string | typeof unscoped, readonly string[]]>;
|
|
16
|
+
}
|
|
17
|
+
export declare function stringify(data: IIgnoreFile): string;
|
|
18
|
+
/** @deprecated */
|
|
19
|
+
export declare function saveFileSync(data: IIgnoreFile, saveAs?: string): boolean;
|
|
20
|
+
export declare function saveFile(data: IIgnoreFile, saveAs?: string): Promise<boolean>;
|
|
21
|
+
export declare function parse(content: string): IIgnoreFile;
|
|
22
|
+
export declare function loadFile(file: string, create?: boolean): Promise<IIgnoreFile>;
|
|
23
|
+
/** @deprecated */
|
|
24
|
+
export declare function loadFileSync(file: string, create?: boolean): IIgnoreFile;
|
|
25
|
+
export declare class WrappedArray extends Array<string> {
|
|
26
|
+
push(...items: string[]): number;
|
|
27
|
+
unshift(...items: string[]): number;
|
|
28
|
+
splice(start: number, deleteCount: number, ...items: string[]): string[];
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=api.d.ts.map
|
package/lib/api.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,QAAQ,eAAqB,CAAC;AAC3C,QAAA,MAAM,QAAQ,eAAsB,CAAC;AACrC,QAAA,MAAM,eAAe,eAA6B,CAAC;AAGnD,wBAAgB,SAAS,WAGxB;AAED,KAAK,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAE7B,MAAM,WAAW,WAAY,SAAQ,eAAe,EAAE,SAAS;CAAG;AAElE,UAAU,eAAe;IACxB,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC;IACpB,CAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACpB,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAC1B,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,EAAE,CAAC;CACzB;AAED,UAAU,SAAS;IAClB,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,gBAAgB,CAAC,CAAC,MAAM,GAAG,OAAO,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAC;CACrF;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAiBnD;AAED,kBAAkB;AAClB,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,GAAE,MAAwB,WAU/E;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,GAAE,MAAwB,oBAUjF;AAkFD,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAOlD;AAED,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,UAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,CAgBjF;AAED,kBAAkB;AAClB,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,UAAQ,GAAG,WAAW,CAgBtE;AAED,qBAAa,YAAa,SAAQ,KAAK,CAAC,MAAM,CAAC;IACrC,IAAI,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM;IA4BhC,OAAO,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM;IAyBnC,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;CA0BjF"}
|
package/lib/api.js
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { readFile, writeFile } from 'node:fs/promises';
|
|
3
|
+
import { resolve } from 'node:path';
|
|
4
|
+
import { arrayUniqueReference } from '@idlebox/common';
|
|
5
|
+
export const unscoped = Symbol('unscoped');
|
|
6
|
+
const filePath = Symbol('file-path');
|
|
7
|
+
const originalContent = Symbol('original-content');
|
|
8
|
+
const EMPTYLINE = '@idebox/ignore/space';
|
|
9
|
+
export function emptyLine() {
|
|
10
|
+
const s = Symbol(EMPTYLINE);
|
|
11
|
+
return s;
|
|
12
|
+
}
|
|
13
|
+
export function stringify(data) {
|
|
14
|
+
let ret = '';
|
|
15
|
+
// console.log('stringify:', data);
|
|
16
|
+
for (const [item, arr] of data) {
|
|
17
|
+
if (!arr || arr.length === 0)
|
|
18
|
+
continue;
|
|
19
|
+
if (item !== unscoped) {
|
|
20
|
+
ret += `\n### ${item}\n`;
|
|
21
|
+
}
|
|
22
|
+
ret += `${arr
|
|
23
|
+
.map((e) => {
|
|
24
|
+
return isEmptyLine(e) ? '' : e;
|
|
25
|
+
})
|
|
26
|
+
.join('\n')}\n`;
|
|
27
|
+
}
|
|
28
|
+
return `${ret.trim()}\n`;
|
|
29
|
+
}
|
|
30
|
+
/** @deprecated */
|
|
31
|
+
export function saveFileSync(data, saveAs = data[filePath]) {
|
|
32
|
+
if (!saveAs) {
|
|
33
|
+
throw new Error('not opened by loadFile(), use saveAs');
|
|
34
|
+
}
|
|
35
|
+
const result = stringify(data);
|
|
36
|
+
if (result !== data[originalContent]) {
|
|
37
|
+
writeFileSync(saveAs, result, 'utf-8');
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
export async function saveFile(data, saveAs = data[filePath]) {
|
|
43
|
+
if (!saveAs) {
|
|
44
|
+
throw new Error('not opened by loadFile(), use saveAs');
|
|
45
|
+
}
|
|
46
|
+
const result = stringify(data);
|
|
47
|
+
if (result !== data[originalContent]) {
|
|
48
|
+
await writeFile(saveAs, result, 'utf-8');
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
function isEmptyLine(line) {
|
|
54
|
+
if (typeof line === 'symbol') {
|
|
55
|
+
if (line.description === EMPTYLINE) {
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
function trimLastEmptyLines(lines) {
|
|
62
|
+
while (isEmptyLine(lines.at(-1))) {
|
|
63
|
+
lines.pop();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function wrapProxy(instance, content) {
|
|
67
|
+
const lines = content.split('\n').map((l) => l.trim());
|
|
68
|
+
const sections = [];
|
|
69
|
+
let current = instance[unscoped];
|
|
70
|
+
for (const line of lines) {
|
|
71
|
+
if (line.startsWith('###')) {
|
|
72
|
+
trimLastEmptyLines(current);
|
|
73
|
+
current = new WrappedArray();
|
|
74
|
+
const section = line.slice(3).trim();
|
|
75
|
+
sections.push(section);
|
|
76
|
+
instance[section] = current;
|
|
77
|
+
}
|
|
78
|
+
else if (!line) {
|
|
79
|
+
if (current.length > 0 && !isEmptyLine(current.at(-1))) {
|
|
80
|
+
current.push(emptyLine());
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
current.push(line);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return new Proxy(instance, {
|
|
88
|
+
get(_target, name) {
|
|
89
|
+
if (typeof name === 'symbol') {
|
|
90
|
+
if (name === Symbol.iterator) {
|
|
91
|
+
const list = [unscoped, ...sections];
|
|
92
|
+
return function* () {
|
|
93
|
+
for (const i of list)
|
|
94
|
+
yield [i, instance[i]];
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
return instance[name];
|
|
98
|
+
}
|
|
99
|
+
if (!instance[name]) {
|
|
100
|
+
instance[name] = new WrappedArray();
|
|
101
|
+
sections.push(name);
|
|
102
|
+
}
|
|
103
|
+
return instance[name];
|
|
104
|
+
},
|
|
105
|
+
set(_target, name, value) {
|
|
106
|
+
if (!Array.isArray(value)) {
|
|
107
|
+
throw new TypeError('invalid value (must be array)');
|
|
108
|
+
}
|
|
109
|
+
if (!(value instanceof WrappedArray))
|
|
110
|
+
value = new WrappedArray(...value);
|
|
111
|
+
if (typeof name === 'symbol') {
|
|
112
|
+
if (unscoped === name) {
|
|
113
|
+
instance[unscoped] = value;
|
|
114
|
+
return true;
|
|
115
|
+
}
|
|
116
|
+
throw new Error('do not support symbol index (except "unscoped")');
|
|
117
|
+
}
|
|
118
|
+
instance[unscoped] = value;
|
|
119
|
+
return true;
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
export function parse(content) {
|
|
124
|
+
const struct = {
|
|
125
|
+
[unscoped]: new WrappedArray(),
|
|
126
|
+
[originalContent]: content,
|
|
127
|
+
};
|
|
128
|
+
return wrapProxy(struct, content);
|
|
129
|
+
}
|
|
130
|
+
export async function loadFile(file, create = false) {
|
|
131
|
+
file = resolve(process.cwd(), file);
|
|
132
|
+
if (create && !existsSync(file)) {
|
|
133
|
+
await writeFile(file, '');
|
|
134
|
+
}
|
|
135
|
+
const content = await readFile(file, 'utf-8');
|
|
136
|
+
const struct = {
|
|
137
|
+
[unscoped]: new WrappedArray(),
|
|
138
|
+
[originalContent]: content,
|
|
139
|
+
[filePath]: file,
|
|
140
|
+
};
|
|
141
|
+
return wrapProxy(struct, content);
|
|
142
|
+
}
|
|
143
|
+
/** @deprecated */
|
|
144
|
+
export function loadFileSync(file, create = false) {
|
|
145
|
+
file = resolve(process.cwd(), file);
|
|
146
|
+
if (create && !existsSync(file)) {
|
|
147
|
+
writeFileSync(file, '');
|
|
148
|
+
}
|
|
149
|
+
const content = readFileSync(file, 'utf-8');
|
|
150
|
+
const struct = {
|
|
151
|
+
[unscoped]: new WrappedArray(),
|
|
152
|
+
[originalContent]: content,
|
|
153
|
+
[filePath]: file,
|
|
154
|
+
};
|
|
155
|
+
return wrapProxy(struct, content);
|
|
156
|
+
}
|
|
157
|
+
export class WrappedArray extends Array {
|
|
158
|
+
push(...items) {
|
|
159
|
+
if (items.length === 0) {
|
|
160
|
+
return super.length;
|
|
161
|
+
}
|
|
162
|
+
arrayUniqueReference(items);
|
|
163
|
+
let lastIndex = -1;
|
|
164
|
+
for (const item of items) {
|
|
165
|
+
const index = super.indexOf(item);
|
|
166
|
+
if (index >= 0) {
|
|
167
|
+
if (index < lastIndex) {
|
|
168
|
+
super.splice(index, 1);
|
|
169
|
+
super.splice(lastIndex + 1, 0, item);
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
lastIndex = index;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
else if (lastIndex === -1) {
|
|
176
|
+
lastIndex = super.push(item) - 1;
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
lastIndex++;
|
|
180
|
+
super.splice(lastIndex, 0, item);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return super.length;
|
|
184
|
+
}
|
|
185
|
+
unshift(...items) {
|
|
186
|
+
if (items.length === 0) {
|
|
187
|
+
return super.length;
|
|
188
|
+
}
|
|
189
|
+
arrayUniqueReference(items);
|
|
190
|
+
let lastIndex = 0;
|
|
191
|
+
for (const item of items) {
|
|
192
|
+
const index = super.indexOf(item);
|
|
193
|
+
if (index >= 0) {
|
|
194
|
+
if (index < lastIndex) {
|
|
195
|
+
super.splice(index, 1);
|
|
196
|
+
super.splice(lastIndex + 1, 0, item);
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
lastIndex = index;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
lastIndex++;
|
|
204
|
+
super.splice(lastIndex, 0, item);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return super.length;
|
|
208
|
+
}
|
|
209
|
+
splice(start, deleteCount, ...items) {
|
|
210
|
+
const ret = super.splice(start, deleteCount);
|
|
211
|
+
if (items.length === 0) {
|
|
212
|
+
return ret;
|
|
213
|
+
}
|
|
214
|
+
arrayUniqueReference(items);
|
|
215
|
+
let lastIndex = start;
|
|
216
|
+
for (const item of items) {
|
|
217
|
+
const index = super.indexOf(item);
|
|
218
|
+
if (index >= 0) {
|
|
219
|
+
if (index < lastIndex) {
|
|
220
|
+
super.splice(index, 1);
|
|
221
|
+
super.splice(lastIndex + 1, 0, item);
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
lastIndex = index;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
lastIndex++;
|
|
229
|
+
super.splice(lastIndex, 0, item);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
return ret;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
//# sourceMappingURL=api.js.map
|
package/lib/api.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAC3C,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;AACrC,MAAM,eAAe,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;AACnD,MAAM,SAAS,GAAG,sBAAsB,CAAC;AAEzC,MAAM,UAAU,SAAS;IACxB,MAAM,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;IAC5B,OAAO,CAAC,CAAC;AACV,CAAC;AAiBD,MAAM,UAAU,SAAS,CAAC,IAAiB;IAC1C,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,mCAAmC;IACnC,KAAK,MAAM,CAAC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,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAC7C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxB,OAAO,GAAG,CAAC;QACZ,CAAC;QAED,oBAAoB,CAAC,KAAK,CAAC,CAAC;QAE5B,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YAC1B,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAClC,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;gBAChB,IAAI,KAAK,GAAG,SAAS,EAAE,CAAC;oBACvB,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;oBACvB,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;gBACtC,CAAC;qBAAM,CAAC;oBACP,SAAS,GAAG,KAAK,CAAC;gBACnB,CAAC;YACF,CAAC;iBAAM,CAAC;gBACP,SAAS,EAAE,CAAC;gBACZ,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;YAClC,CAAC;QACF,CAAC;QAED,OAAO,GAAG,CAAC;IACZ,CAAC;CACD"}
|
package/lib/bin.d.ts
ADDED
package/lib/bin.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":""}
|
package/lib/bin.js
ADDED
package/lib/bin.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AAAA,OAAO"}
|
package/lib/test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAC"}
|
package/lib/test.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import 'source-map-support/register';
|
|
2
|
+
import { parse, stringify, unscoped } from './api.js';
|
|
3
|
+
let failed = 0;
|
|
4
|
+
const t1 = '### t1';
|
|
5
|
+
const t2 = '### t2';
|
|
6
|
+
const l1 = 'a/f1';
|
|
7
|
+
const l2 = 'a/f2';
|
|
8
|
+
const l3 = 'a/f3';
|
|
9
|
+
// const l4 = 'a/*';
|
|
10
|
+
// const l5 = '!a/b';
|
|
11
|
+
function test(input, output, action) {
|
|
12
|
+
const data = parse(input.join('\n'));
|
|
13
|
+
action(data);
|
|
14
|
+
const result = stringify(data);
|
|
15
|
+
if (result.trim() !== output.join('\n').trim()) {
|
|
16
|
+
console.error('测试失败:', action.name);
|
|
17
|
+
console.error('===================== 期望\n%s', output.join('\n').trim());
|
|
18
|
+
console.error('===================== 实际\n%s', result.trim());
|
|
19
|
+
failed++;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
console.log('测试成功:', action.name);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
test([t1, l1, l2], [t1, l1, l3, l2], function push顺序(v) {
|
|
26
|
+
v.t1?.push(l1, l3);
|
|
27
|
+
});
|
|
28
|
+
test([t1, l1, l2], [t1, l2, l1], function push顺序2(v) {
|
|
29
|
+
v.t1?.push(l2, l1);
|
|
30
|
+
});
|
|
31
|
+
test([t1, l1, l2], [t1, l1, l3, l2], function unshift顺序(v) {
|
|
32
|
+
v.t1?.unshift(l1, l3);
|
|
33
|
+
});
|
|
34
|
+
test([t1, l1, l2], [t1, l2, l1], function unshift顺序2(v) {
|
|
35
|
+
v.t1?.unshift(l2, l1);
|
|
36
|
+
});
|
|
37
|
+
test([t1, l1, l2], [l1, l2, '', t1, l1, l2, '', t2, l1, l2], function 新增tag(v) {
|
|
38
|
+
v[unscoped].push(l1, l2);
|
|
39
|
+
v.t2?.push(l1, l2);
|
|
40
|
+
});
|
|
41
|
+
test([t1, l1], [t1, l1, l2], function 重复添加(v) {
|
|
42
|
+
v.t1?.push(l2, l2);
|
|
43
|
+
v.t1?.push(l2);
|
|
44
|
+
});
|
|
45
|
+
test(['', '', t1, '', '', l1, '', '', l2, l3, ''], [t1, l1, '', l2, l3], function 删除多余空白() { });
|
|
46
|
+
test([t1, l1], [t1, l1, l2], function 重复添加(v) {
|
|
47
|
+
v.t1?.push(l2, l2);
|
|
48
|
+
v.t1?.push(l2);
|
|
49
|
+
});
|
|
50
|
+
process.exit(failed);
|
|
51
|
+
//# sourceMappingURL=test.js.map
|
package/lib/test.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test.js","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAC;AACrC,OAAO,EAAoB,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAExE,IAAI,MAAM,GAAG,CAAC,CAAC;AACf,MAAM,EAAE,GAAG,QAAQ,CAAC;AACpB,MAAM,EAAE,GAAG,QAAQ,CAAC;AACpB,MAAM,EAAE,GAAG,MAAM,CAAC;AAClB,MAAM,EAAE,GAAG,MAAM,CAAC;AAClB,MAAM,EAAE,GAAG,MAAM,CAAC;AAClB,oBAAoB;AACpB,qBAAqB;AAErB,SAAS,IAAI,CAAC,KAAe,EAAE,MAAgB,EAAE,MAAoC;IACpF,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACrC,MAAM,CAAC,IAAI,CAAC,CAAC;IACb,MAAM,MAAM,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IAE/B,IAAI,MAAM,CAAC,IAAI,EAAE,KAAK,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;QAChD,OAAO,CAAC,KAAK,CAA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AE,EAAE,EAAE,CAAC,CAAC;IACnB,CAAC,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;AAChB,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2023.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2023.array.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2023.collection.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2023.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.collection.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.object.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2024.string.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.array.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.collection.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.promise.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.iterator.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.esnext.float16.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../common/src/array/arrayDiff.ts","../../common/src/array/arraySame.ts","../../common/src/array/arrayUnique.ts","../../common/src/array/normalizeArray.ts","../../common/src/array/sortAlpha.ts","../../common/src/date/consts.ts","../../common/src/date/isInvalid.ts","../../common/src/date/sibling.ts","../../common/src/string/pad2.ts","../../common/src/date/timeString.ts","../../common/src/date/unix.ts","../../common/src/debugging/serializable.ts","../../common/src/debugging/tryInspect.ts","../../common/src/error/stackTrace.ts","../../common/src/error/getFrame.ts","../../common/src/error/convertUnknown.ts","../../common/src/platform/os.ts","../../common/src/error/known.ts","../../common/src/path/isAbsolute.ts","../../common/src/path/normalizePath.ts","../../common/src/platform/globalObject.ts","../../common/src/error/pretty.vscode.ts","../../common/src/error/pretty.ts","../../common/src/error-wellknown/exit.error.ts","../../common/src/function/functionName.ts","../../common/src/function/asyncCallbackList.ts","../../common/src/function/callbackList.ts","../../common/src/function/delayCallbackList.ts","../../common/src/lifecycle/dispose/lifecycle.ts","../../common/src/lifecycle/event/event.ts","../../common/src/lifecycle/dispose/disposableEvent.ts","../../common/src/lifecycle/dispose/disposedError.ts","../../../node_modules/.pnpm/@types+ms@0.7.34/node_modules/@types/ms/index.d.ts","../../../node_modules/.pnpm/@types+debug@4.1.12/node_modules/@types/debug/index.d.ts","../../common/src/lifecycle/dispose/debug.ts","../../common/src/lifecycle/dispose/lifecycle.async.ts","../../common/src/platform/globalSingleton.ts","../../common/src/platform/globalSymbol.ts","../../common/src/lifecycle/dispose/lifecycle.global.ts","../../common/src/lifecycle/dispose/lifecycle.sync.ts","../../common/src/lifecycle/dispose/bridges/rxjs.ts","../../common/src/lifecycle/event/memorized.ts","../../common/src/lifecycle/promise/cancel.ts","../../common/src/lifecycle/promise/deferredPromise.ts","../../common/src/lifecycle/promise/cancellationToken/driver.browser.ts","../../common/src/lifecycle/promise/cancellationToken/driver.common.ts","../../common/src/lifecycle/promise/cancellationToken/source.ts","../../common/src/lifecycle/timeout/interval.ts","../../common/src/lifecycle/timeout/timeoutError.ts","../../common/src/lifecycle/timeout/timeout.ts","../../common/src/log/logger.ts","../../common/src/mapSet/customSet.ts","../../common/src/mapSet/extendMap.ts","../../common/src/misc/assertNotNull.ts","../../common/src/misc/package.json.ts","../../common/src/object/definePublicConstant.ts","../../common/src/object/initOnRead.ts","../../common/src/object/objectPath.ts","../../common/src/object/objectSame.ts","../../common/src/string/castCase.ts","../../common/src/path/pathArray.ts","../../common/src/promise/awaitIterator.ts","../../common/src/promise/finishAllPromise.ts","../../common/src/promise/promiseBool.ts","../../common/src/promise/promiseCollection.ts","../../common/src/promise/timeoutPromiseCollection.ts","../../common/src/reflection/classes/hookClass.ts","../../common/src/reflection/classes/singleton.ts","../../common/src/reflection/methods/bind.ts","../../common/src/reflection/methods/initOnRead.ts","../../common/src/reflection/methods/memorize.ts","../../common/src/state/StateMachine.ts","../../common/src/string/concatType.generated.ts","../../common/src/string/escapeRegexp.ts","../../common/src/string/sizeString.ts","../../common/src/typingHelper/literal.ts","../../common/src/typingHelper/deep.partial.ts","../../common/src/typingHelper/deep.readonly.ts","../../common/src/typingHelper/deep.required.ts","../../common/src/typingHelper/deep.writable.ts","../../common/src/autoindex.ts","../src/api.ts","../src/bin.ts","../../../node_modules/.pnpm/@types+source-map-support@0.5.10/node_modules/@types/source-map-support/register.d.ts","../src/test.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/utility.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/header.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/readable.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/fetch.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/formdata.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/connector.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/client.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/errors.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/global-origin.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/pool-stats.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/pool.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/handlers.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/h2c-client.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/agent.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/mock-call-history.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/mock-agent.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/mock-client.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/mock-pool.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/mock-errors.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/retry-handler.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/retry-agent.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/api.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/cache-interceptor.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/interceptors.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/util.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/cookies.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/patch.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/websocket.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/eventsource.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/content-type.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/cache.d.ts","../../../node_modules/.pnpm/undici-types@7.8.0/node_modules/undici-types/index.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/dom-events.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/sea.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/sqlite.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@24.0.14/node_modules/@types/node/index.d.ts"],"fileIdsList":[[166,210],[79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,114,115,116,117,118,119,120,121,122,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,166,210],[84,87,166,210],[93,166,210],[92,166,210],[95,166,210],[95,97,98,99,100,166,210],[103,166,210],[107,112,166,210],[107,166,210],[91,92,93,101,166,210],[92,94,107,108,110,112,113,166,210],[107,113,114,115,116,166,210],[92,107,108,110,113,166,210],[103,108,166,210],[102,107,166,210],[107,108,166,210],[108,125,166,210],[107,108,125,166,210],[99,107,108,118,123,124,166,210],[107,121,166,210],[107,108,118,166,210],[122,127,166,210],[88,166,210],[95,103,166,210],[80,166,210],[95,98,138,166,210],[99,103,166,210],[99,166,210],[121,122,166,210],[127,143,166,210],[145,166,210],[135,166,210],[108,166,210],[154,166,210],[159,166,210,223,224,232],[160,166,210],[111,166,210],[166,207,210],[166,209,210],[210],[166,210,215,245],[166,210,211,216,222,223,230,242,253],[166,210,211,212,222,230],[166,210,213,254],[166,210,214,215,223,231],[166,210,215,242,250],[166,210,216,218,222,230],[166,209,210,217],[166,210,218,219],[166,210,220,222],[166,209,210,222],[166,210,222,223,224,242,253],[166,210,222,223,224,237,242,245],[166,205,210],[166,205,210,218,222,225,230,242,253],[166,210,222,223,225,226,230,242,250,253],[166,210,225,227,242,250,253],[164,165,166,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259],[166,210,222,228],[166,210,229,253],[166,210,218,222,230,242],[166,210,231],[166,210,232],[166,209,210,233],[166,207,208,209,210,211,212,213,214,215,216,217,218,219,220,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259],[166,210,235],[166,210,236],[166,210,222,237,238],[166,210,237,239,254,256],[166,210,222,242,243,245],[166,210,244,245],[166,210,242,243],[166,210,245],[166,210,246],[166,207,210,242,247],[166,210,222,248,249],[166,210,248,249],[166,210,215,230,242,250],[166,210,251],[166,210,230,252],[166,210,225,236,253],[166,210,215,254],[166,210,242,255],[166,210,229,256],[166,210,257],[166,210,222,224,233,242,245,253,255,256,258],[166,210,242,259],[166,175,179,210,253],[166,175,210,242,253],[166,210,242],[166,170,210],[166,172,175,210,253],[166,210,230,250],[166,210,260],[166,170,210,260],[166,172,175,210,230,253],[166,167,168,169,171,174,210,222,242,253],[166,175,183,210],[166,168,173,210],[166,175,199,200,210],[166,168,171,175,210,245,253,260],[166,175,210],[166,167,210],[166,170,171,172,173,174,175,176,177,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,200,201,202,203,204,210],[166,175,192,195,210,218],[166,175,183,184,185,210],[166,173,175,184,186,210],[166,174,210],[166,168,170,175,210],[166,175,179,184,186,210],[166,179,210],[166,173,175,178,210,253],[166,168,172,175,183,210],[166,175,192,210],[166,170,175,199,210,245,258,260]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"27bdc30a0e32783366a5abeda841bc22757c1797de8681bbe81fbc735eeb1c10","impliedFormat":1},{"version":"8fd575e12870e9944c7e1d62e1f5a73fcf23dd8d3a321f2a2c74c20d022283fe","impliedFormat":1},{"version":"8bf8b5e44e3c9c36f98e1007e8b7018c0f38d8adc07aecef42f5200114547c70","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"b5ce7a470bc3628408429040c4e3a53a27755022a32fd05e2cb694e7015386c7","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"df83c2a6c73228b625b0beb6669c7ee2a09c914637e2d35170723ad49c0f5cd4","affectsGlobalScope":true,"impliedFormat":1},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e3c06ea092138bf9fa5e874a1fdbc9d54805d074bee1de31b99a11e2fec239d","affectsGlobalScope":true,"impliedFormat":1},{"version":"87dc0f382502f5bbce5129bdc0aea21e19a3abbc19259e0b43ae038a9fc4e326","affectsGlobalScope":true,"impliedFormat":1},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true,"impliedFormat":1},{"version":"56e4ed5aab5f5920980066a9409bfaf53e6d21d3f8d020c17e4de584d29600ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ece9f17b3866cc077099c73f4983bddbcb1dc7ddb943227f1ec070f529dedd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a6282c8827e4b9a95f4bf4f5c205673ada31b982f50572d27103df8ceb8013c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1c9319a09485199c1f7b0498f2988d6d2249793ef67edda49d1e584746be9032","affectsGlobalScope":true,"impliedFormat":1},{"version":"e3a2a0cee0f03ffdde24d89660eba2685bfbdeae955a6c67e8c4c9fd28928eeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811c71eee4aa0ac5f7adf713323a5c41b0cf6c4e17367a34fbce379e12bbf0a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"51ad4c928303041605b4d7ae32e0c1ee387d43a24cd6f1ebf4a2699e1076d4fa","affectsGlobalScope":true,"impliedFormat":1},{"version":"60037901da1a425516449b9a20073aa03386cce92f7a1fd902d7602be3a7c2e9","affectsGlobalScope":true,"impliedFormat":1},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22adec94ef7047a6c9d1af3cb96be87a335908bf9ef386ae9fd50eeb37f44c47","affectsGlobalScope":true,"impliedFormat":1},{"version":"4245fee526a7d1754529d19227ecbf3be066ff79ebb6a380d78e41648f2f224d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},"f5428bd7675d59a6f11ea2b03e12318e62cdac0815323dbd2294a8315855ce4e","40cfe0a059e731af0865ae0249e4c201666cf561ca80c9e45baa7304f2887c0a","10213a506b2c97a5ccf70c0e71b719d70cdb90ec5b8b56397d55d578382b3faa","b863546f34db4d41099a4135841f9986040f8139d125f2af12376c180bbfa8be","bfeeb25b6aaa6320709e3e04c929f4fa455104973adb2205b9be08e7185a532c","3295fef31e2566bf5370e37b7c161ff71e46553947af4add368d9f9d1154041b","8e2eb0b5ea378976fd0528974ab333587d1deefeb3910b5dc762a9cbaca5abb2","7549793f85b76b21d6209e386daee510cdb465416111a2a727490485b6a16ec2","0b57a60bb35ffa4d370535cc5a89940bd09b14d5341699b83717b4d5eae17744","59c550c60c454477be9ba7a5bf2d0a72088bafb60f664e6dae6561122306960a","5c289f65a31a292201d216d28d4e7b2551deb316f4c8c77a06fc22eda8c43220","36f5292c78c6400082d987f00567e47d901c7602df81d61479c1a034f803eb61","c735d6e0639feff91a7a96fa5c8b834ca746c97363b3d0cb730105e56dddef8e","183bef30e642c210c497a489c9744a26698e4fea83c9827de3926de3b84db3b6","cc34fdb851459eefe0cac96c05062d5ccd8ceba51c9e92682d68c6e158652d3d","6d3483ef561cdbdd4c4de53c944868a25a0ce119c33495cfe3409fce4f2adfaf","80d2660df59644c8505bdedd667b4231e04923fe87996391d354afa918c612c1","1ca719f52509c2111c6702ec7b279ac6c5d997c216b8042b43f62ded0faca68e","e5c218911ade23dbf17dd57284b93a463b688f984e2dc0d73359b020951eb762","fb32d3c593647be9ee6c8bbf5f551325348d6781c78c84dca9a5910d62b030d8","8a5b5102b1af5b37c1ce3eda58d4b004e7da651eaaf094e842025534e49e14cc","0cbef23398e80d9642bc1d87cf9e25a329a1ca5947d2e6b04ab714e2e1b133ae","5e7d38ef990f639ece8742c2ea2ce91ed44d79d1c1b78507ac7f4654d44fa0ca","eb2ccc04f4d654a7b5b19c65af2bdabca1b3970deb193791a23d6438ae2c26e6","94c543118275c0816e2d52b015e60a5961b43045de724ab039faee8cd20f19c4","71787ab10cf14bd3c810f117d5ece77c3be990e98f7d1f94464fee91fead4312","edf2ec411d90d61867c290b15ada51bbbd7fac28bea3bcca460e5ae6e7b2d3d0","6af193aa61cd219f9f496e7dc6f312e08ae9058f929c71f72e71a04e6eae8745","643ed6c5da60323fa354350a43d982422709a74dd01b256087216521af0aa38d","1796434ff38cf532f5ac5e951436cf61215e34ece269602df10673b2fea8950b","24c8277bb6273183a632442407891387925b541e644653e4a8f1ce5661dfdef0","9163644558baa35a579018333e6ab4214ba0b83509879721167a643088a3dfc1",{"version":"68cc8d6fcc2f270d7108f02f3ebc59480a54615be3e09a47e14527f349e9d53e","impliedFormat":1},{"version":"3eb11dbf3489064a47a2e1cf9d261b1f100ef0b3b50ffca6c44dd99d6dd81ac1","impliedFormat":1},"5b94e4952855b3b7b580bfddad2d25b3032388d25c1d6cc98fa785cceddf28ca","c867ab0cdc87bc3b3f0167afa1e6684ac80b37a9113e7cf2186829c486423a3a","8ce53823ce39a63961d377071367f71a517af6ff98554e0da76374c415a17f34","18c026844461d6280877cb19a1d9b926fc3f48235e42e162fe1f24ac2d475693","b6cb2750fa2dbd76443f05517cbb6c2fbe90dcd602b8135d05f147088f3e6fea","2e9bb093b2840fc11e4872d9e0ab0087bace78d23d3d5982e1a2c36d91eb47a9","46b0e83cfb8a678d9e5155cacabb6bed308e1701a7d74f7bab21714ab38581f6","423a1e12b703a405db08f75779df8165cac89ceaa175adadcb0d795456d1f928","2bf88a0cb29e3524004ad25dfcd119b18470171de25df2fb372ebaa1648f5dfd","235191783380c3ec7d745e4ff5f5e1fca3c9bbb9b7d108a25646028d2c338d53","4a9a6face5536ca83bac3a98341986234ea5b17b016d0c660c883493c26b199a","cbe0179efa3b92e7825079cb0b5e2c0edd0047df71dfb785bde5211f5dc524d1","276d83442b69804ee914da67df420fa87c24d1bc5ff698e99bd88008e1275aa2","b6ea8aa66720c93a7a27bee92efe5698d7ebea54a116ca4c4dca57df874c4c76","372bf8f67f2eba718c3d88d6949f5129363236326766e343912571583d02327e","695a2080004248a28ddaac95073eec4b155e8307a13bd7804e094ca960f3cb06","a6432d8ec1e06d99b22bc6a8504077405d7bbbfe1176624d2fff1406dc50adfa","df5ae079e693f602231cc0ccc35535bc5077b8e3e2355c7289d76481aa5db3a2","49e22645ef8123a66d9d5d5afc46de2de5afd6d1866c2a342924b6fd2b6ae225","b34c4e3b5d4b707afe82cc5d0808437b263b92637c290240bcce8eed5d86edce","74a6f0f6d69f9043d1747fc41c28d555dc9a8ee0fa5c27edd38598dfe802515a","f017c235d84f8316bbca91eaffa8fed3638ae9d5d867f58f95a9234f1923f51d","a5921d8c379c6986dec40340fb124b54d3e9b984d2f2d612a807a06be6e93e3e","37c27f14c6616f6333eb40bfd617de3b8ee9b2ed1c01eec639b65bac40da5f34","b2eab7a68905d52576eaa840e1840589155a77c193de36f9b03f1da975db5f9a","c101f4807fef9ab3a54e8cdb926b209cff86b1afa4c9b41a69f892fb1af063b7","51142022fd14024c0c4a2c6a49b6d5980801ebace066f602a8d05906c5d096e6","7cb445cc6efd6ed55e823ca23b45914c92c38aa571760d52e528fd7361aa7c92","a4927e0e4e90b8b34b552b0017c2c909fc5b8c03efdab094f415fbb063b7393d","7f47e344909bf5b7054b970ed75dbb8d48fb80f4d585c8dc0bef7dbeca5a7d78","91317c93541f7210416e77047682c3eecddd3b4458cc7c827dab764e77f839c4","29a5f52c3c6710ff7b92d2ec7d213d2ae1d3c35435b249bf735af3b6f0fd6424","86bed3d53b7c1126b5259c8cefcda53173f34302b80f8aede891d0171db686e0","28b4bf218ad51d147b1847076ad36b32ac3b3c16a78876d649cf051686f013c1","604a7f2879ccf859c586cd1af685831dc0f70d6da062add33f335bf89d9732c7","60924c260abbb9ae9c2789441a5b0c3ad1d76c2aa46ff07fe95d3d4e6dd0ac70","184ea7f5abe63c6cf2e809a76b0eda923ab992f1c24679ab14c8be8773dd50c4","2500cc6676a512f6221b88608a7cd7241905b78f29f51c3d4eea8c815d55b7e0","d8eb82f7475d14cef99cd13d94f4c1c454ffdbe58775cffba1773d4c1ebd1cae","1030ef921292d8d7aed9bf9952c667fbd502180057b7dfe8bf2a2a9213356113","a583043732c3dd1f4e59382390b10e7d9ab5612720878185ff751b76a41f337d","f0da9c416585c1be6f42cc4d437d8e62fcae4c0b2c7db9c5ddb96d76b1d61cf1","3f8c5c29a62addfec2dfa1e5e2844477480b1f3e4b285244c967a89de3337544","da50a46ca3507086937462d8fe895a415708e83379441ff3b9a23f38fe4b48be","31f5750f8af776723b3a7a7c5df96d3600e5ac38556a7ee035a5a76278d52295","83f237bf23b52bf7d5edd89e8b62dd23f7756bc8c16e7ea4175c56d60e264508","7b5e281b32a09d01abc14df5046740c55bca59d8622353cb900ff2d5e4f59fc5",{"version":"a259101178301b1aa7cfd02df87602c74661a868cb320cade6ded7897304590c","signature":"58f743e6597edef8d94f14e4e56d433a176b0c1ff441fd0f273fc9bea62e4a20"},{"version":"d86a603e47ff3551a7bc3efc1c88f9d93054ba56d714e5c95dab9d54d0a10161","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"890f0cb6e1fa8b76a6b5fbdadcfc20c8d4275fc0753b6301b5453b85ec374ccc","impliedFormat":1},{"version":"4abb4e26f7e15b695eb8e1ae9f4185cf4f7dcc6bb66f7fcd6ab80dccd71bf24a","signature":"070c885788ae4d4e375416ed4a90b7669df68eb03cbd4c9aebd148c336f6e948"},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0671b50bb99cc7ad46e9c68fa0e7f15ba4bc898b59c31a17ea4611fab5095da","affectsGlobalScope":true,"impliedFormat":1},{"version":"d802f0e6b5188646d307f070d83512e8eb94651858de8a82d1e47f60fb6da4e2","affectsGlobalScope":true,"impliedFormat":1},{"version":"cdcf9ea426ad970f96ac930cd176d5c69c6c24eebd9fc580e1572d6c6a88f62c","impliedFormat":1},{"version":"23cd712e2ce083d68afe69224587438e5914b457b8acf87073c22494d706a3d0","impliedFormat":1},{"version":"487b694c3de27ddf4ad107d4007ad304d29effccf9800c8ae23c2093638d906a","impliedFormat":1},{"version":"e525f9e67f5ddba7b5548430211cae2479070b70ef1fd93550c96c10529457bd","impliedFormat":1},{"version":"ccf4552357ce3c159ef75f0f0114e80401702228f1898bdc9402214c9499e8c0","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"17fe9131bec653b07b0a1a8b99a830216e3e43fe0ea2605be318dc31777c8bbf","impliedFormat":1},{"version":"3c8e93af4d6ce21eb4c8d005ad6dc02e7b5e6781f429d52a35290210f495a674","impliedFormat":1},{"version":"2c9875466123715464539bfd69bcaccb8ff6f3e217809428e0d7bd6323416d01","impliedFormat":1},{"version":"ea6bc8de8b59f90a7a3960005fd01988f98fd0784e14bc6922dde2e93305ec7d","impliedFormat":1},{"version":"36107995674b29284a115e21a0618c4c2751b32a8766dd4cb3ba740308b16d59","impliedFormat":1},{"version":"914a0ae30d96d71915fc519ccb4efbf2b62c0ddfb3a3fc6129151076bc01dc60","impliedFormat":1},{"version":"2472ef4c28971272a897fdb85d4155df022e1f5d9a474a526b8fc2ef598af94e","impliedFormat":1},{"version":"6c8e442ba33b07892169a14f7757321e49ab0f1032d676d321a1fdab8a67d40c","impliedFormat":1},{"version":"b41767d372275c154c7ea6c9d5449d9a741b8ce080f640155cc88ba1763e35b3","impliedFormat":1},{"version":"1cd673d367293fc5cb31cd7bf03d598eb368e4f31f39cf2b908abbaf120ab85a","impliedFormat":1},{"version":"19851a6596401ca52d42117108d35e87230fc21593df5c4d3da7108526b6111c","impliedFormat":1},{"version":"3825bf209f1662dfd039010a27747b73d0ef379f79970b1d05601ec8e8a4249f","impliedFormat":1},{"version":"0b6e25234b4eec6ed96ab138d96eb70b135690d7dd01f3dd8a8ab291c35a683a","impliedFormat":1},{"version":"40bfc70953be2617dc71979c14e9e99c5e65c940a4f1c9759ddb90b0f8ff6b1a","impliedFormat":1},{"version":"da52342062e70c77213e45107921100ba9f9b3a30dd019444cf349e5fb3470c4","impliedFormat":1},{"version":"e9ace91946385d29192766bf783b8460c7dbcbfc63284aa3c9cae6de5155c8bc","impliedFormat":1},{"version":"40b463c6766ca1b689bfcc46d26b5e295954f32ad43e37ee6953c0a677e4ae2b","impliedFormat":1},{"version":"561c60d8bfe0fec2c08827d09ff039eca0c1f9b50ef231025e5a549655ed0298","impliedFormat":1},{"version":"1e30c045732e7db8f7a82cf90b516ebe693d2f499ce2250a977ec0d12e44a529","impliedFormat":1},{"version":"84b736594d8760f43400202859cda55607663090a43445a078963031d47e25e7","impliedFormat":1},{"version":"499e5b055a5aba1e1998f7311a6c441a369831c70905cc565ceac93c28083d53","impliedFormat":1},{"version":"54c3e2371e3d016469ad959697fd257e5621e16296fa67082c2575d0bf8eced0","impliedFormat":1},{"version":"beb8233b2c220cfa0feea31fbe9218d89fa02faa81ef744be8dce5acb89bb1fd","impliedFormat":1},{"version":"78b29846349d4dfdd88bd6650cc5d2baaa67f2e89dc8a80c8e26ef7995386583","impliedFormat":1},{"version":"5d0375ca7310efb77e3ef18d068d53784faf62705e0ad04569597ae0e755c401","impliedFormat":1},{"version":"59af37caec41ecf7b2e76059c9672a49e682c1a2aa6f9d7dc78878f53aa284d6","impliedFormat":1},{"version":"addf417b9eb3f938fddf8d81e96393a165e4be0d4a8b6402292f9c634b1cb00d","impliedFormat":1},{"version":"e38d4fdf79e1eadd92ed7844c331dbaa40f29f21541cfee4e1acff4db09cda33","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"7c10a32ae6f3962672e6869ee2c794e8055d8225ef35c91c0228e354b4e5d2d3","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"99f569b42ea7e7c5fe404b2848c0893f3e1a56e0547c1cd0f74d5dbb9a9de27e","impliedFormat":1},{"version":"f4b4faedc57701ae727d78ba4a83e466a6e3bdcbe40efbf913b17e860642897c","affectsGlobalScope":true,"impliedFormat":1},{"version":"bbcfd9cd76d92c3ee70475270156755346c9086391e1b9cb643d072e0cf576b8","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"72c1f5e0a28e473026074817561d1bc9647909cf253c8d56c41d1df8d95b85f7","impliedFormat":1},{"version":"003ec918ec442c3a4db2c36dc0c9c766977ea1c8bcc1ca7c2085868727c3d3f6","affectsGlobalScope":true,"impliedFormat":1},{"version":"938f94db8400d0b479626b9006245a833d50ce8337f391085fad4af540279567","impliedFormat":1},{"version":"c4e8e8031808b158cfb5ac5c4b38d4a26659aec4b57b6a7e2ba0a141439c208c","impliedFormat":1},{"version":"2c91d8366ff2506296191c26fd97cc1990bab3ee22576275d28b654a21261a44","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"12fb9c13f24845000d7bd9660d11587e27ef967cbd64bd9df19ae3e6aa9b52d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"289e9894a4668c61b5ffed09e196c1f0c2f87ca81efcaebdf6357cfb198dac14","impliedFormat":1},{"version":"25a1105595236f09f5bce42398be9f9ededc8d538c258579ab662d509aa3b98e","impliedFormat":1},{"version":"5078cd62dbdf91ae8b1dc90b1384dec71a9c0932d62bdafb1a811d2a8e26bef2","impliedFormat":1},{"version":"a2e2bbde231b65c53c764c12313897ffdfb6c49183dd31823ee2405f2f7b5378","impliedFormat":1},{"version":"ad1cc0ed328f3f708771272021be61ab146b32ecf2b78f3224959ff1e2cd2a5c","impliedFormat":1},{"version":"71450bbc2d82821d24ca05699a533e72758964e9852062c53b30f31c36978ab8","affectsGlobalScope":true,"impliedFormat":1},{"version":"62f572306e0b173cc5dfc4c583471151f16ef3779cf27ab96922c92ec82a3bc8","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f32444438ecb1fa4519f6ec3977d69ce0e3acfa18b803e5cd725c204501f350","impliedFormat":1},{"version":"0ab3c844f1eb5a1d94c90edc346a25eb9d3943af7a7812f061bf2d627d8afac0","impliedFormat":1},{"version":"b0a84d9348601dbc217017c0721d6064c3b1af9b392663348ba146fdae0c7afd","impliedFormat":1},{"version":"161f09445a8b4ba07f62ae54b27054e4234e7957062e34c6362300726dabd315","impliedFormat":1},{"version":"77fced47f495f4ff29bb49c52c605c5e73cd9b47d50080133783032769a9d8a6","impliedFormat":1},{"version":"e6057f9e7b0c64d4527afeeada89f313f96a53291705f069a9193c18880578cb","impliedFormat":1},{"version":"34ecb9596317c44dab586118fb62c1565d3dad98d201cd77f3e6b0dde453339c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0f5cda0282e1d18198e2887387eb2f026372ebc4e11c4e4516fef8a19ee4d514","impliedFormat":1},{"version":"e99b0e71f07128fc32583e88ccd509a1aaa9524c290efb2f48c22f9bf8ba83b1","impliedFormat":1},{"version":"76957a6d92b94b9e2852cf527fea32ad2dc0ef50f67fe2b14bd027c9ceef2d86","impliedFormat":1},{"version":"237581f5ec4620a17e791d3bb79bad3af01e27a274dbee875ac9b0721a4fe97d","affectsGlobalScope":true,"impliedFormat":1},{"version":"a8a99a5e6ed33c4a951b67cc1fd5b64fd6ad719f5747845c165ca12f6c21ba16","affectsGlobalScope":true,"impliedFormat":1},{"version":"a58a15da4c5ba3df60c910a043281256fa52d36a0fcdef9b9100c646282e88dd","impliedFormat":1},{"version":"b36beffbf8acdc3ebc58c8bb4b75574b31a2169869c70fc03f82895b93950a12","impliedFormat":1},{"version":"de263f0089aefbfd73c89562fb7254a7468b1f33b61839aafc3f035d60766cb4","impliedFormat":1},{"version":"70b57b5529051497e9f6482b76d91c0dcbb103d9ead8a0549f5bab8f65e5d031","impliedFormat":1},{"version":"e6d81b1f7ab11dc1b1ad7ad29fcfad6904419b36baf55ed5e80df48d56ac3aff","impliedFormat":1},{"version":"1013eb2e2547ad8c100aca52ef9df8c3f209edee32bb387121bb3227f7c00088","impliedFormat":1},{"version":"b6b8e3736383a1d27e2592c484a940eeb37ec4808ba9e74dd57679b2453b5865","impliedFormat":1},{"version":"d6f36b683c59ac0d68a1d5ee906e578e2f5e9a285bca80ff95ce61cdc9ddcdeb","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"125d792ec6c0c0f657d758055c494301cc5fdb327d9d9d5960b3f129aff76093","impliedFormat":1},{"version":"12aad38de6f0594dc21efa78a2c1f67bf6a7ef5a389e05417fe9945284450908","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea713aa14a670b1ea0fbaaca4fd204e645f71ca7653a834a8ec07ee889c45de6","impliedFormat":1},{"version":"b338a6e6c1d456e65a6ea78da283e3077fe8edf7202ae10490abbba5b952b05e","impliedFormat":1},{"version":"2918b7c516051c30186a1055ebcdb3580522be7190f8a2fff4100ea714c7c366","affectsGlobalScope":true,"impliedFormat":1},{"version":"ae86f30d5d10e4f75ce8dcb6e1bd3a12ecec3d071a21e8f462c5c85c678efb41","impliedFormat":1},{"version":"982efeb2573605d4e6d5df4dc7e40846bda8b9e678e058fc99522ab6165c479e","impliedFormat":1},{"version":"e03460fe72b259f6d25ad029f085e4bedc3f90477da4401d8fbc1efa9793230e","impliedFormat":1},{"version":"4286a3a6619514fca656089aee160bb6f2e77f4dd53dc5a96b26a0b4fc778055","impliedFormat":1},{"version":"d67fc92a91171632fc74f413ce42ff1aa7fbcc5a85b127101f7ec446d2039a1f","affectsGlobalScope":true,"impliedFormat":1},{"version":"d40e4631100dbc067268bce96b07d7aff7f28a541b1bfb7ef791c64a696b3d33","affectsGlobalScope":true,"impliedFormat":1},{"version":"784490137935e1e38c49b9289110e74a1622baf8a8907888dcbe9e476d7c5e44","impliedFormat":1},{"version":"42180b657831d1b8fead051698618b31da623fb71ff37f002cb9d932cfa775f1","impliedFormat":1},{"version":"4f98d6fb4fe7cbeaa04635c6eaa119d966285d4d39f0eb55b2654187b0b27446","impliedFormat":1},{"version":"e4c653466d0497d87fa9ffd00e59a95f33bc1c1722c3f5c84dab2e950c18da70","affectsGlobalScope":true,"impliedFormat":1},{"version":"e6dcc3b933e864e91d4bea94274ad69854d5d2a1311a4b0e20408a57af19e95d","impliedFormat":1},{"version":"a51f786b9f3c297668f8f322a6c58f85d84948ef69ade32069d5d63ec917221c","impliedFormat":1}],"root":[160,161,163],"options":{"allowImportingTsExtensions":false,"allowJs":false,"allowSyntheticDefaultImports":true,"allowUmdGlobalAccess":false,"allowUnreachableCode":false,"allowUnusedLabels":false,"alwaysStrict":true,"assumeChangesOnlyAffectDirectDependencies":false,"checkJs":false,"composite":true,"declaration":true,"declarationMap":true,"downlevelIteration":true,"emitBOM":false,"emitDeclarationOnly":false,"emitDecoratorMetadata":false,"esModuleInterop":true,"exactOptionalPropertyTypes":false,"experimentalDecorators":false,"importHelpers":true,"inlineSourceMap":false,"inlineSources":false,"jsx":4,"jsxImportSource":"react","module":99,"newLine":1,"noEmitHelpers":false,"noEmitOnError":true,"noFallthroughCasesInSwitch":true,"noImplicitAny":true,"noImplicitOverride":true,"noImplicitReturns":true,"noImplicitThis":true,"noPropertyAccessFromIndexSignature":false,"noStrictGenericChecks":false,"noUncheckedIndexedAccess":false,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","preserveConstEnums":true,"removeComments":false,"rootDir":"../src","sourceMap":true,"strict":true,"strictBindCallApply":true,"strictFunctionTypes":true,"strictNullChecks":true,"strictPropertyInitialization":true,"stripInternal":false,"target":99,"useDefineForClassFields":true,"useUnknownInCatchVariables":true,"verbatimModuleSyntax":false},"referencedMap":[[79,1],[80,1],[81,1],[82,1],[83,1],[159,2],[84,1],[85,1],[86,1],[88,3],[89,1],[90,1],[91,1],[102,1],[94,4],[93,5],[96,6],[101,7],[100,1],[92,1],[104,8],[105,8],[106,8],[103,1],[119,1],[113,9],[109,10],[110,11],[114,12],[117,13],[118,14],[107,15],[108,16],[120,17],[121,1],[123,18],[124,19],[125,20],[122,21],[126,22],[128,23],[127,24],[129,25],[130,1],[131,1],[132,1],[133,1],[134,1],[135,1],[136,1],[137,26],[97,1],[98,1],[139,27],[99,1],[115,28],[116,29],[95,1],[140,1],[141,1],[142,1],[143,30],[144,31],[145,1],[146,32],[147,1],[148,33],[149,1],[150,34],[138,1],[151,1],[152,1],[87,1],[153,1],[155,35],[156,35],[157,35],[158,35],[154,1],[160,36],[161,1],[163,37],[112,38],[111,1],[207,39],[208,39],[209,40],[166,41],[210,42],[211,43],[212,44],[164,1],[213,45],[214,46],[215,47],[216,48],[217,49],[218,50],[219,50],[221,1],[220,51],[222,52],[223,53],[224,54],[206,55],[165,1],[225,56],[226,57],[227,58],[260,59],[228,60],[229,61],[230,62],[231,63],[232,64],[233,65],[234,66],[235,67],[236,68],[237,69],[238,69],[239,70],[240,1],[241,1],[242,71],[244,72],[243,73],[245,74],[246,75],[247,76],[248,77],[249,78],[250,79],[251,80],[252,81],[253,82],[254,83],[255,84],[256,85],[257,86],[258,87],[259,88],[162,1],[77,1],[78,1],[14,1],[13,1],[2,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[22,1],[3,1],[23,1],[24,1],[4,1],[25,1],[29,1],[26,1],[27,1],[28,1],[30,1],[31,1],[32,1],[5,1],[33,1],[34,1],[35,1],[36,1],[6,1],[40,1],[37,1],[38,1],[39,1],[41,1],[7,1],[42,1],[47,1],[48,1],[43,1],[44,1],[45,1],[46,1],[8,1],[52,1],[49,1],[50,1],[51,1],[53,1],[9,1],[54,1],[55,1],[56,1],[58,1],[57,1],[59,1],[60,1],[10,1],[61,1],[62,1],[63,1],[11,1],[64,1],[65,1],[66,1],[67,1],[68,1],[1,1],[69,1],[70,1],[12,1],[74,1],[72,1],[76,1],[71,1],[75,1],[73,1],[183,89],[194,90],[181,89],[195,91],[204,92],[173,93],[172,94],[203,95],[198,96],[202,97],[175,98],[191,99],[174,100],[201,101],[170,102],[171,96],[176,103],[177,1],[182,93],[180,103],[168,104],[205,105],[196,106],[186,107],[185,103],[187,108],[189,109],[184,110],[188,111],[199,95],[178,112],[179,113],[190,114],[169,91],[193,115],[192,103],[197,1],[167,1],[200,116]],"latestChangedDtsFile":"./test.d.ts","version":"5.8.3"}
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@idlebox/ignore-edit",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"description": "api for modify .*ignore files",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"gitignore",
|
|
8
|
+
"ignorefile"
|
|
9
|
+
],
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"default": "./lib/api.js"
|
|
13
|
+
},
|
|
14
|
+
"./package.json": "./package.json"
|
|
15
|
+
},
|
|
16
|
+
"bin": "bin.js",
|
|
17
|
+
"sideEffects": false,
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"source-map-support": "^0.5.21",
|
|
20
|
+
"@idlebox/common": "^1.4.14"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@rushstack/heft": "^0.74.0",
|
|
24
|
+
"@types/node": "^24.0.14",
|
|
25
|
+
"@mpis/run": "^0.0.2",
|
|
26
|
+
"@internal/local-rig": "^1.0.1",
|
|
27
|
+
"@build-script/single-dog-asset": "^1.0.35"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"prepublishHook": "internal-prepublish-hook",
|
|
31
|
+
"build": "mpis-run build",
|
|
32
|
+
"watch": "mpis-run watch",
|
|
33
|
+
"clean": "mpis-run clean",
|
|
34
|
+
"lint": "internal-lint"
|
|
35
|
+
}
|
|
36
|
+
}
|
package/src/api.ts
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { readFile, writeFile } from 'node:fs/promises';
|
|
3
|
+
import { resolve } from 'node:path';
|
|
4
|
+
import { arrayUniqueReference } from '@idlebox/common';
|
|
5
|
+
|
|
6
|
+
export const unscoped = Symbol('unscoped');
|
|
7
|
+
const filePath = Symbol('file-path');
|
|
8
|
+
const originalContent = Symbol('original-content');
|
|
9
|
+
const EMPTYLINE = '@idebox/ignore/space';
|
|
10
|
+
|
|
11
|
+
export function emptyLine() {
|
|
12
|
+
const s = Symbol(EMPTYLINE);
|
|
13
|
+
return s;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type ILine = symbol | string;
|
|
17
|
+
|
|
18
|
+
export interface IIgnoreFile extends IIgnoreFileData, IIterable {}
|
|
19
|
+
|
|
20
|
+
interface IIgnoreFileData {
|
|
21
|
+
[unscoped]: ILine[];
|
|
22
|
+
[filePath]?: string;
|
|
23
|
+
[originalContent]: string;
|
|
24
|
+
[title: string]: ILine[];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
interface IIterable {
|
|
28
|
+
[Symbol.iterator](): IterableIterator<[string | typeof unscoped, readonly string[]]>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function stringify(data: IIgnoreFile): string {
|
|
32
|
+
let ret = '';
|
|
33
|
+
// console.log('stringify:', data);
|
|
34
|
+
for (const [item, arr] of data) {
|
|
35
|
+
if (!arr || arr.length === 0) continue;
|
|
36
|
+
|
|
37
|
+
if (item !== unscoped) {
|
|
38
|
+
ret += `\n### ${item}\n`;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
ret += `${arr
|
|
42
|
+
.map((e) => {
|
|
43
|
+
return isEmptyLine(e) ? '' : e;
|
|
44
|
+
})
|
|
45
|
+
.join('\n')}\n`;
|
|
46
|
+
}
|
|
47
|
+
return `${ret.trim()}\n`;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** @deprecated */
|
|
51
|
+
export function saveFileSync(data: IIgnoreFile, saveAs: string = data[filePath]!) {
|
|
52
|
+
if (!saveAs) {
|
|
53
|
+
throw new Error('not opened by loadFile(), use saveAs');
|
|
54
|
+
}
|
|
55
|
+
const result = stringify(data);
|
|
56
|
+
if (result !== data[originalContent]) {
|
|
57
|
+
writeFileSync(saveAs, result, 'utf-8');
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export async function saveFile(data: IIgnoreFile, saveAs: string = data[filePath]!) {
|
|
64
|
+
if (!saveAs) {
|
|
65
|
+
throw new Error('not opened by loadFile(), use saveAs');
|
|
66
|
+
}
|
|
67
|
+
const result = stringify(data);
|
|
68
|
+
if (result !== data[originalContent]) {
|
|
69
|
+
await writeFile(saveAs, result, 'utf-8');
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function isEmptyLine(line: string | symbol) {
|
|
76
|
+
if (typeof line === 'symbol') {
|
|
77
|
+
if (line.description === EMPTYLINE) {
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function trimLastEmptyLines(lines: (string | symbol)[]) {
|
|
86
|
+
while (isEmptyLine(lines.at(-1)!)) {
|
|
87
|
+
lines.pop();
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function wrapProxy(instance: IIgnoreFileData, content: string): IIgnoreFile {
|
|
92
|
+
const lines = content.split('\n').map((l) => l.trim());
|
|
93
|
+
|
|
94
|
+
const sections: string[] = [];
|
|
95
|
+
|
|
96
|
+
let current = instance[unscoped];
|
|
97
|
+
for (const line of lines) {
|
|
98
|
+
if (line.startsWith('###')) {
|
|
99
|
+
trimLastEmptyLines(current);
|
|
100
|
+
|
|
101
|
+
current = new WrappedArray();
|
|
102
|
+
|
|
103
|
+
const section = line.slice(3).trim();
|
|
104
|
+
|
|
105
|
+
sections.push(section);
|
|
106
|
+
instance[section] = current;
|
|
107
|
+
} else if (!line) {
|
|
108
|
+
if (current.length > 0 && !isEmptyLine(current.at(-1)!)) {
|
|
109
|
+
current.push(emptyLine());
|
|
110
|
+
}
|
|
111
|
+
} else {
|
|
112
|
+
current.push(line);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return new Proxy(instance as any, {
|
|
117
|
+
get(_target, name: string | symbol) {
|
|
118
|
+
if (typeof name === 'symbol') {
|
|
119
|
+
if (name === Symbol.iterator) {
|
|
120
|
+
const list = [unscoped, ...sections];
|
|
121
|
+
return function* () {
|
|
122
|
+
for (const i of list) yield [i, instance[i as any]];
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
return (instance as any)[name];
|
|
126
|
+
}
|
|
127
|
+
if (!instance[name]) {
|
|
128
|
+
instance[name] = new WrappedArray();
|
|
129
|
+
sections.push(name);
|
|
130
|
+
}
|
|
131
|
+
return instance[name];
|
|
132
|
+
},
|
|
133
|
+
set(_target, name: string, value: string[]) {
|
|
134
|
+
if (!Array.isArray(value)) {
|
|
135
|
+
throw new TypeError('invalid value (must be array)');
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (!(value instanceof WrappedArray)) value = new WrappedArray(...value);
|
|
139
|
+
|
|
140
|
+
if (typeof name === 'symbol') {
|
|
141
|
+
if (unscoped === name) {
|
|
142
|
+
instance[unscoped] = value;
|
|
143
|
+
return true;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
throw new Error('do not support symbol index (except "unscoped")');
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
instance[unscoped] = value;
|
|
150
|
+
return true;
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function parse(content: string): IIgnoreFile {
|
|
156
|
+
const struct: IIgnoreFileData = {
|
|
157
|
+
[unscoped]: new WrappedArray(),
|
|
158
|
+
[originalContent]: content,
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
return wrapProxy(struct, content);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export async function loadFile(file: string, create = false): Promise<IIgnoreFile> {
|
|
165
|
+
file = resolve(process.cwd(), file);
|
|
166
|
+
|
|
167
|
+
if (create && !existsSync(file)) {
|
|
168
|
+
await writeFile(file, '');
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
const content = await readFile(file, 'utf-8');
|
|
172
|
+
|
|
173
|
+
const struct: IIgnoreFileData = {
|
|
174
|
+
[unscoped]: new WrappedArray(),
|
|
175
|
+
[originalContent]: content,
|
|
176
|
+
[filePath]: file,
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
return wrapProxy(struct, content);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/** @deprecated */
|
|
183
|
+
export function loadFileSync(file: string, create = false): IIgnoreFile {
|
|
184
|
+
file = resolve(process.cwd(), file);
|
|
185
|
+
|
|
186
|
+
if (create && !existsSync(file)) {
|
|
187
|
+
writeFileSync(file, '');
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
const content = readFileSync(file, 'utf-8');
|
|
191
|
+
|
|
192
|
+
const struct: IIgnoreFileData = {
|
|
193
|
+
[unscoped]: new WrappedArray(),
|
|
194
|
+
[originalContent]: content,
|
|
195
|
+
[filePath]: file,
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
return wrapProxy(struct, content);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export class WrappedArray extends Array<string> {
|
|
202
|
+
override push(...items: string[]): number {
|
|
203
|
+
if (items.length === 0) {
|
|
204
|
+
return super.length;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
arrayUniqueReference(items);
|
|
208
|
+
|
|
209
|
+
let lastIndex = -1;
|
|
210
|
+
for (const item of items) {
|
|
211
|
+
const index = super.indexOf(item);
|
|
212
|
+
if (index >= 0) {
|
|
213
|
+
if (index < lastIndex) {
|
|
214
|
+
super.splice(index, 1);
|
|
215
|
+
super.splice(lastIndex + 1, 0, item);
|
|
216
|
+
} else {
|
|
217
|
+
lastIndex = index;
|
|
218
|
+
}
|
|
219
|
+
} else if (lastIndex === -1) {
|
|
220
|
+
lastIndex = super.push(item) - 1;
|
|
221
|
+
} else {
|
|
222
|
+
lastIndex++;
|
|
223
|
+
super.splice(lastIndex, 0, item);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
return super.length;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
override unshift(...items: string[]): number {
|
|
231
|
+
if (items.length === 0) {
|
|
232
|
+
return super.length;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
arrayUniqueReference(items);
|
|
236
|
+
|
|
237
|
+
let lastIndex = 0;
|
|
238
|
+
for (const item of items) {
|
|
239
|
+
const index = super.indexOf(item);
|
|
240
|
+
if (index >= 0) {
|
|
241
|
+
if (index < lastIndex) {
|
|
242
|
+
super.splice(index, 1);
|
|
243
|
+
super.splice(lastIndex + 1, 0, item);
|
|
244
|
+
} else {
|
|
245
|
+
lastIndex = index;
|
|
246
|
+
}
|
|
247
|
+
} else {
|
|
248
|
+
lastIndex++;
|
|
249
|
+
super.splice(lastIndex, 0, item);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
return super.length;
|
|
254
|
+
}
|
|
255
|
+
override splice(start: number, deleteCount: number, ...items: string[]): string[] {
|
|
256
|
+
const ret = super.splice(start, deleteCount);
|
|
257
|
+
if (items.length === 0) {
|
|
258
|
+
return ret;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
arrayUniqueReference(items);
|
|
262
|
+
|
|
263
|
+
let lastIndex = start;
|
|
264
|
+
for (const item of items) {
|
|
265
|
+
const index = super.indexOf(item);
|
|
266
|
+
if (index >= 0) {
|
|
267
|
+
if (index < lastIndex) {
|
|
268
|
+
super.splice(index, 1);
|
|
269
|
+
super.splice(lastIndex + 1, 0, item);
|
|
270
|
+
} else {
|
|
271
|
+
lastIndex = index;
|
|
272
|
+
}
|
|
273
|
+
} else {
|
|
274
|
+
lastIndex++;
|
|
275
|
+
super.splice(lastIndex, 0, item);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
return ret;
|
|
280
|
+
}
|
|
281
|
+
}
|
package/src/bin.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// TODO
|
package/src/test.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import 'source-map-support/register';
|
|
2
|
+
import { type IIgnoreFile, parse, stringify, unscoped } from './api.js';
|
|
3
|
+
|
|
4
|
+
let failed = 0;
|
|
5
|
+
const t1 = '### t1';
|
|
6
|
+
const t2 = '### t2';
|
|
7
|
+
const l1 = 'a/f1';
|
|
8
|
+
const l2 = 'a/f2';
|
|
9
|
+
const l3 = 'a/f3';
|
|
10
|
+
// const l4 = 'a/*';
|
|
11
|
+
// const l5 = '!a/b';
|
|
12
|
+
|
|
13
|
+
function test(input: string[], output: string[], action: (value: IIgnoreFile) => void) {
|
|
14
|
+
const data = parse(input.join('\n'));
|
|
15
|
+
action(data);
|
|
16
|
+
const result = stringify(data);
|
|
17
|
+
|
|
18
|
+
if (result.trim() !== output.join('\n').trim()) {
|
|
19
|
+
console.error('测试失败:', action.name);
|
|
20
|
+
console.error('===================== 期望\n%s', output.join('\n').trim());
|
|
21
|
+
console.error('===================== 实际\n%s', result.trim());
|
|
22
|
+
failed++;
|
|
23
|
+
} else {
|
|
24
|
+
console.log('测试成功:', action.name);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
test([t1, l1, l2], [t1, l1, l3, l2], function push顺序(v) {
|
|
29
|
+
v.t1?.push(l1, l3);
|
|
30
|
+
});
|
|
31
|
+
test([t1, l1, l2], [t1, l2, l1], function push顺序2(v) {
|
|
32
|
+
v.t1?.push(l2, l1);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
test([t1, l1, l2], [t1, l1, l3, l2], function unshift顺序(v) {
|
|
36
|
+
v.t1?.unshift(l1, l3);
|
|
37
|
+
});
|
|
38
|
+
test([t1, l1, l2], [t1, l2, l1], function unshift顺序2(v) {
|
|
39
|
+
v.t1?.unshift(l2, l1);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
test([t1, l1, l2], [l1, l2, '', t1, l1, l2, '', t2, l1, l2], function 新增tag(v) {
|
|
43
|
+
v[unscoped].push(l1, l2);
|
|
44
|
+
v.t2?.push(l1, l2);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
test([t1, l1], [t1, l1, l2], function 重复添加(v) {
|
|
48
|
+
v.t1?.push(l2, l2);
|
|
49
|
+
v.t1?.push(l2);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
test(['', '', t1, '', '', l1, '', '', l2, l3, ''], [t1, l1, '', l2, l3], function 删除多余空白() {});
|
|
53
|
+
|
|
54
|
+
test([t1, l1], [t1, l1, l2], function 重复添加(v) {
|
|
55
|
+
v.t1?.push(l2, l2);
|
|
56
|
+
v.t1?.push(l2);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
process.exit(failed);
|