@dpuse/dpuse-shared 0.3.869 → 1.0.105
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.
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { InferOutput } from 'valibot';
|
|
2
2
|
import { Component } from '../..';
|
|
3
3
|
import { EngineConnectorActionOptions } from '../engine';
|
|
4
|
+
import { LocalisedConfig } from '../../../locale';
|
|
4
5
|
import { ToolConfig } from '../tool';
|
|
5
6
|
import { ConnectionDescriptionConfig, ConnectionNodeConfig, ObjectColumnConfig } from '../../connection';
|
|
6
7
|
import { connectorActionNameSchema, connectorCategoryConfigSchema, connectorConfigSchema, connectorUsageConfigSchema, connectorUsageIdSchema } from './connectorConfig.schema';
|
|
7
8
|
import { InferenceRecord, InferenceSummary, ParsingRecord, PreviewConfig, ValueDelimiterId } from '../../dataView';
|
|
8
|
-
import { LocalisedConfig } from '../../../locale';
|
|
9
9
|
export { connectorConfigSchema } from './connectorConfig.schema';
|
|
10
10
|
export interface ConnectorInterface extends Component {
|
|
11
11
|
abortController: AbortController | undefined;
|
|
@@ -10,6 +10,7 @@ interface EncodingTypeConfig {
|
|
|
10
10
|
groupId: EncodingGroupId | null;
|
|
11
11
|
isDetectable: boolean;
|
|
12
12
|
isDecodable: boolean;
|
|
13
|
+
decoderId: EncodingTypeId | null;
|
|
13
14
|
}
|
|
14
15
|
export interface EncodingTypeConfigLocalised {
|
|
15
16
|
id: EncodingTypeId;
|
|
@@ -17,6 +18,7 @@ export interface EncodingTypeConfigLocalised {
|
|
|
17
18
|
label: string;
|
|
18
19
|
isDetectable: boolean;
|
|
19
20
|
isDecodable: boolean;
|
|
21
|
+
decoderId: EncodingTypeId | null;
|
|
20
22
|
}
|
|
21
23
|
export interface EncodingDetectionConfig {
|
|
22
24
|
id: EncodingTypeId;
|
|
@@ -175,296 +177,345 @@ declare const ENCODING_TYPE_CONFIG_DATA: {
|
|
|
175
177
|
readonly ascii: {
|
|
176
178
|
readonly id: "ascii";
|
|
177
179
|
readonly groupId: null;
|
|
178
|
-
readonly isDetectable:
|
|
180
|
+
readonly isDetectable: true;
|
|
179
181
|
readonly isDecodable: true;
|
|
182
|
+
readonly decoderId: "windows-1252";
|
|
180
183
|
};
|
|
181
184
|
readonly big5: {
|
|
182
185
|
readonly id: "big5";
|
|
183
186
|
readonly groupId: "chineseTraditional";
|
|
184
187
|
readonly isDetectable: true;
|
|
185
188
|
readonly isDecodable: true;
|
|
189
|
+
readonly decoderId: null;
|
|
186
190
|
};
|
|
187
191
|
readonly 'euc-jp': {
|
|
188
192
|
readonly id: "euc-jp";
|
|
189
193
|
readonly groupId: "japanese";
|
|
190
194
|
readonly isDetectable: true;
|
|
191
195
|
readonly isDecodable: true;
|
|
196
|
+
readonly decoderId: null;
|
|
192
197
|
};
|
|
193
198
|
readonly 'euc-kr': {
|
|
194
199
|
readonly id: "euc-kr";
|
|
195
200
|
readonly groupId: "korean";
|
|
196
201
|
readonly isDetectable: true;
|
|
197
202
|
readonly isDecodable: true;
|
|
203
|
+
readonly decoderId: null;
|
|
198
204
|
};
|
|
199
205
|
readonly gb18030: {
|
|
200
206
|
readonly id: "gb18030";
|
|
201
207
|
readonly groupId: "chineseSimplified";
|
|
202
208
|
readonly isDetectable: true;
|
|
203
209
|
readonly isDecodable: true;
|
|
210
|
+
readonly decoderId: null;
|
|
204
211
|
};
|
|
205
212
|
readonly gbk: {
|
|
206
213
|
readonly id: "gbk";
|
|
207
214
|
readonly groupId: "chineseSimplified";
|
|
208
215
|
readonly isDetectable: false;
|
|
209
216
|
readonly isDecodable: true;
|
|
217
|
+
readonly decoderId: null;
|
|
210
218
|
};
|
|
211
219
|
readonly ibm866: {
|
|
212
220
|
readonly id: "ibm866";
|
|
213
221
|
readonly groupId: "cyrillic";
|
|
214
222
|
readonly isDetectable: false;
|
|
215
223
|
readonly isDecodable: true;
|
|
224
|
+
readonly decoderId: null;
|
|
216
225
|
};
|
|
217
226
|
readonly 'iso-2022-cn': {
|
|
218
227
|
readonly id: "iso-2022-cn";
|
|
219
228
|
readonly groupId: "chineseSimplified";
|
|
220
229
|
readonly isDetectable: true;
|
|
221
230
|
readonly isDecodable: false;
|
|
231
|
+
readonly decoderId: null;
|
|
222
232
|
};
|
|
223
233
|
readonly 'iso-2022-jp': {
|
|
224
234
|
readonly id: "iso-2022-jp";
|
|
225
235
|
readonly groupId: "japanese";
|
|
226
236
|
readonly isDetectable: true;
|
|
227
237
|
readonly isDecodable: true;
|
|
238
|
+
readonly decoderId: null;
|
|
228
239
|
};
|
|
229
240
|
readonly 'iso-2022-kr': {
|
|
230
241
|
readonly id: "iso-2022-kr";
|
|
231
242
|
readonly groupId: "korean";
|
|
232
243
|
readonly isDetectable: true;
|
|
233
244
|
readonly isDecodable: false;
|
|
245
|
+
readonly decoderId: null;
|
|
234
246
|
};
|
|
235
247
|
readonly 'iso-8859-1': {
|
|
236
248
|
readonly id: "iso-8859-1";
|
|
237
249
|
readonly groupId: "western";
|
|
238
250
|
readonly isDetectable: true;
|
|
239
251
|
readonly isDecodable: true;
|
|
252
|
+
readonly decoderId: "windows-1252";
|
|
240
253
|
};
|
|
241
254
|
readonly 'iso-8859-2': {
|
|
242
255
|
readonly id: "iso-8859-2";
|
|
243
256
|
readonly groupId: "centralEuropean";
|
|
244
257
|
readonly isDetectable: true;
|
|
245
258
|
readonly isDecodable: true;
|
|
259
|
+
readonly decoderId: null;
|
|
246
260
|
};
|
|
247
261
|
readonly 'iso-8859-3': {
|
|
248
262
|
readonly id: "iso-8859-3";
|
|
249
263
|
readonly groupId: "southernEuropean";
|
|
250
264
|
readonly isDetectable: false;
|
|
251
265
|
readonly isDecodable: true;
|
|
266
|
+
readonly decoderId: null;
|
|
252
267
|
};
|
|
253
268
|
readonly 'iso-8859-4': {
|
|
254
269
|
readonly id: "iso-8859-4";
|
|
255
270
|
readonly groupId: "baltic";
|
|
256
271
|
readonly isDetectable: false;
|
|
257
272
|
readonly isDecodable: true;
|
|
273
|
+
readonly decoderId: null;
|
|
258
274
|
};
|
|
259
275
|
readonly 'iso-8859-5': {
|
|
260
276
|
readonly id: "iso-8859-5";
|
|
261
277
|
readonly groupId: "cyrillic";
|
|
262
278
|
readonly isDetectable: true;
|
|
263
279
|
readonly isDecodable: true;
|
|
280
|
+
readonly decoderId: null;
|
|
264
281
|
};
|
|
265
282
|
readonly 'iso-8859-6': {
|
|
266
283
|
readonly id: "iso-8859-6";
|
|
267
284
|
readonly groupId: "arabic";
|
|
268
285
|
readonly isDetectable: true;
|
|
269
286
|
readonly isDecodable: true;
|
|
287
|
+
readonly decoderId: null;
|
|
270
288
|
};
|
|
271
289
|
readonly 'iso-8859-7': {
|
|
272
290
|
readonly id: "iso-8859-7";
|
|
273
291
|
readonly groupId: "greek";
|
|
274
292
|
readonly isDetectable: true;
|
|
275
293
|
readonly isDecodable: true;
|
|
294
|
+
readonly decoderId: null;
|
|
276
295
|
};
|
|
277
296
|
readonly 'iso-8859-8': {
|
|
278
297
|
readonly id: "iso-8859-8";
|
|
279
298
|
readonly groupId: "hebrew";
|
|
280
299
|
readonly isDetectable: true;
|
|
281
300
|
readonly isDecodable: true;
|
|
301
|
+
readonly decoderId: null;
|
|
282
302
|
};
|
|
283
303
|
readonly 'iso-8859-9': {
|
|
284
304
|
readonly id: "iso-8859-9";
|
|
285
305
|
readonly groupId: "turkish";
|
|
286
306
|
readonly isDetectable: true;
|
|
287
307
|
readonly isDecodable: true;
|
|
308
|
+
readonly decoderId: "windows-1254";
|
|
288
309
|
};
|
|
289
310
|
readonly 'iso-8859-10': {
|
|
290
311
|
readonly id: "iso-8859-10";
|
|
291
312
|
readonly groupId: "nordic";
|
|
292
313
|
readonly isDetectable: false;
|
|
293
314
|
readonly isDecodable: true;
|
|
315
|
+
readonly decoderId: null;
|
|
294
316
|
};
|
|
295
317
|
readonly 'iso-8859-11': {
|
|
296
318
|
readonly id: "iso-8859-11";
|
|
297
319
|
readonly groupId: "thai";
|
|
298
320
|
readonly isDetectable: false;
|
|
299
321
|
readonly isDecodable: true;
|
|
322
|
+
readonly decoderId: "windows-874";
|
|
300
323
|
};
|
|
301
324
|
readonly 'iso-8859-13': {
|
|
302
325
|
readonly id: "iso-8859-13";
|
|
303
326
|
readonly groupId: "baltic";
|
|
304
327
|
readonly isDetectable: false;
|
|
305
328
|
readonly isDecodable: true;
|
|
329
|
+
readonly decoderId: null;
|
|
306
330
|
};
|
|
307
331
|
readonly 'iso-8859-14': {
|
|
308
332
|
readonly id: "iso-8859-14";
|
|
309
333
|
readonly groupId: "celtic";
|
|
310
334
|
readonly isDetectable: false;
|
|
311
335
|
readonly isDecodable: true;
|
|
336
|
+
readonly decoderId: null;
|
|
312
337
|
};
|
|
313
338
|
readonly 'iso-8859-15': {
|
|
314
339
|
readonly id: "iso-8859-15";
|
|
315
340
|
readonly groupId: "western";
|
|
316
341
|
readonly isDetectable: false;
|
|
317
342
|
readonly isDecodable: true;
|
|
343
|
+
readonly decoderId: null;
|
|
318
344
|
};
|
|
319
345
|
readonly 'iso-8859-16': {
|
|
320
346
|
readonly id: "iso-8859-16";
|
|
321
347
|
readonly groupId: "romanian";
|
|
322
348
|
readonly isDetectable: false;
|
|
323
349
|
readonly isDecodable: true;
|
|
350
|
+
readonly decoderId: null;
|
|
324
351
|
};
|
|
325
352
|
readonly 'koi8-r': {
|
|
326
353
|
readonly id: "koi8-r";
|
|
327
354
|
readonly groupId: "cyrillic";
|
|
328
355
|
readonly isDetectable: true;
|
|
329
356
|
readonly isDecodable: true;
|
|
357
|
+
readonly decoderId: null;
|
|
330
358
|
};
|
|
331
359
|
readonly 'koi8-u': {
|
|
332
360
|
readonly id: "koi8-u";
|
|
333
361
|
readonly groupId: "cyrillic";
|
|
334
362
|
readonly isDetectable: false;
|
|
335
363
|
readonly isDecodable: true;
|
|
364
|
+
readonly decoderId: null;
|
|
336
365
|
};
|
|
337
366
|
readonly latin1: {
|
|
338
367
|
readonly id: "latin1";
|
|
339
368
|
readonly groupId: "western";
|
|
340
369
|
readonly isDetectable: false;
|
|
341
370
|
readonly isDecodable: true;
|
|
371
|
+
readonly decoderId: "windows-1252";
|
|
342
372
|
};
|
|
343
373
|
readonly macintosh: {
|
|
344
374
|
readonly id: "macintosh";
|
|
345
375
|
readonly groupId: "western";
|
|
346
376
|
readonly isDetectable: false;
|
|
347
377
|
readonly isDecodable: true;
|
|
378
|
+
readonly decoderId: null;
|
|
348
379
|
};
|
|
349
380
|
readonly shift_jis: {
|
|
350
381
|
readonly id: "shift_jis";
|
|
351
382
|
readonly groupId: "japanese";
|
|
352
383
|
readonly isDetectable: true;
|
|
353
384
|
readonly isDecodable: true;
|
|
385
|
+
readonly decoderId: null;
|
|
354
386
|
};
|
|
355
387
|
readonly 'tis-620': {
|
|
356
388
|
readonly id: "tis-620";
|
|
357
389
|
readonly groupId: "thai";
|
|
358
390
|
readonly isDetectable: false;
|
|
359
391
|
readonly isDecodable: true;
|
|
392
|
+
readonly decoderId: "windows-874";
|
|
360
393
|
};
|
|
361
394
|
readonly 'utf-16': {
|
|
362
395
|
readonly id: "utf-16";
|
|
363
396
|
readonly groupId: "unicode16";
|
|
364
397
|
readonly isDetectable: false;
|
|
365
398
|
readonly isDecodable: true;
|
|
399
|
+
readonly decoderId: "utf-16le";
|
|
366
400
|
};
|
|
367
401
|
readonly 'utf-16be': {
|
|
368
402
|
readonly id: "utf-16be";
|
|
369
403
|
readonly groupId: "unicode16";
|
|
370
404
|
readonly isDetectable: true;
|
|
371
405
|
readonly isDecodable: true;
|
|
406
|
+
readonly decoderId: null;
|
|
372
407
|
};
|
|
373
408
|
readonly 'utf-16le': {
|
|
374
409
|
readonly id: "utf-16le";
|
|
375
410
|
readonly groupId: "unicode16";
|
|
376
411
|
readonly isDetectable: true;
|
|
377
412
|
readonly isDecodable: true;
|
|
413
|
+
readonly decoderId: null;
|
|
378
414
|
};
|
|
379
415
|
readonly 'utf-32be': {
|
|
380
416
|
readonly id: "utf-32be";
|
|
381
417
|
readonly groupId: "unicode32";
|
|
382
418
|
readonly isDetectable: true;
|
|
383
419
|
readonly isDecodable: false;
|
|
420
|
+
readonly decoderId: null;
|
|
384
421
|
};
|
|
385
422
|
readonly 'utf-32le': {
|
|
386
423
|
readonly id: "utf-32le";
|
|
387
424
|
readonly groupId: "unicode32";
|
|
388
425
|
readonly isDetectable: true;
|
|
389
426
|
readonly isDecodable: false;
|
|
427
|
+
readonly decoderId: null;
|
|
390
428
|
};
|
|
391
429
|
readonly 'utf-8': {
|
|
392
430
|
readonly id: "utf-8";
|
|
393
431
|
readonly groupId: null;
|
|
394
432
|
readonly isDetectable: true;
|
|
395
433
|
readonly isDecodable: true;
|
|
434
|
+
readonly decoderId: null;
|
|
396
435
|
};
|
|
397
436
|
readonly 'windows-1250': {
|
|
398
437
|
readonly id: "windows-1250";
|
|
399
438
|
readonly groupId: "centralEuropean";
|
|
400
439
|
readonly isDetectable: true;
|
|
401
440
|
readonly isDecodable: true;
|
|
441
|
+
readonly decoderId: null;
|
|
402
442
|
};
|
|
403
443
|
readonly 'windows-1251': {
|
|
404
444
|
readonly id: "windows-1251";
|
|
405
445
|
readonly groupId: "cyrillic";
|
|
406
446
|
readonly isDetectable: true;
|
|
407
447
|
readonly isDecodable: true;
|
|
448
|
+
readonly decoderId: null;
|
|
408
449
|
};
|
|
409
450
|
readonly 'windows-1252': {
|
|
410
451
|
readonly id: "windows-1252";
|
|
411
452
|
readonly groupId: "western";
|
|
412
453
|
readonly isDetectable: true;
|
|
413
454
|
readonly isDecodable: true;
|
|
455
|
+
readonly decoderId: null;
|
|
414
456
|
};
|
|
415
457
|
readonly 'windows-1253': {
|
|
416
458
|
readonly id: "windows-1253";
|
|
417
459
|
readonly groupId: "greek";
|
|
418
460
|
readonly isDetectable: true;
|
|
419
461
|
readonly isDecodable: true;
|
|
462
|
+
readonly decoderId: null;
|
|
420
463
|
};
|
|
421
464
|
readonly 'windows-1254': {
|
|
422
465
|
readonly id: "windows-1254";
|
|
423
466
|
readonly groupId: "turkish";
|
|
424
467
|
readonly isDetectable: true;
|
|
425
468
|
readonly isDecodable: true;
|
|
469
|
+
readonly decoderId: null;
|
|
426
470
|
};
|
|
427
471
|
readonly 'windows-1255': {
|
|
428
472
|
readonly id: "windows-1255";
|
|
429
473
|
readonly groupId: "hebrew";
|
|
430
474
|
readonly isDetectable: true;
|
|
431
475
|
readonly isDecodable: true;
|
|
476
|
+
readonly decoderId: null;
|
|
432
477
|
};
|
|
433
478
|
readonly 'windows-1256': {
|
|
434
479
|
readonly id: "windows-1256";
|
|
435
480
|
readonly groupId: "arabic";
|
|
436
481
|
readonly isDetectable: true;
|
|
437
482
|
readonly isDecodable: true;
|
|
483
|
+
readonly decoderId: null;
|
|
438
484
|
};
|
|
439
485
|
readonly 'windows-1257': {
|
|
440
486
|
readonly id: "windows-1257";
|
|
441
487
|
readonly groupId: "baltic";
|
|
442
|
-
readonly isDetectable:
|
|
488
|
+
readonly isDetectable: true;
|
|
443
489
|
readonly isDecodable: true;
|
|
490
|
+
readonly decoderId: null;
|
|
444
491
|
};
|
|
445
492
|
readonly 'windows-1258': {
|
|
446
493
|
readonly id: "windows-1258";
|
|
447
494
|
readonly groupId: "vietnamese";
|
|
448
|
-
readonly isDetectable:
|
|
495
|
+
readonly isDetectable: true;
|
|
449
496
|
readonly isDecodable: true;
|
|
497
|
+
readonly decoderId: null;
|
|
450
498
|
};
|
|
451
499
|
readonly 'windows-874': {
|
|
452
500
|
readonly id: "windows-874";
|
|
453
501
|
readonly groupId: "thai";
|
|
454
|
-
readonly isDetectable:
|
|
502
|
+
readonly isDetectable: true;
|
|
455
503
|
readonly isDecodable: true;
|
|
504
|
+
readonly decoderId: null;
|
|
456
505
|
};
|
|
457
506
|
readonly 'x-mac-cyrillic': {
|
|
458
507
|
readonly id: "x-mac-cyrillic";
|
|
459
508
|
readonly groupId: "cyrillic";
|
|
460
509
|
readonly isDetectable: false;
|
|
461
510
|
readonly isDecodable: true;
|
|
511
|
+
readonly decoderId: null;
|
|
462
512
|
};
|
|
463
513
|
readonly 'x-user-defined': {
|
|
464
514
|
readonly id: "x-user-defined";
|
|
465
515
|
readonly groupId: "other";
|
|
466
516
|
readonly isDetectable: false;
|
|
467
517
|
readonly isDecodable: true;
|
|
518
|
+
readonly decoderId: null;
|
|
468
519
|
};
|
|
469
520
|
};
|
|
470
521
|
export declare const ENCODING_GROUP_CONFIG_MAP: Record<EncodingGroupId, EncodingGroupConfig>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dpuse/dpuse-shared",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.105",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Common constants, types and utilities used across DPUse projects.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"types": "./dist/types/src/index.d.ts",
|
|
20
20
|
"exports": {
|
|
21
21
|
".": {
|
|
22
|
-
"
|
|
23
|
-
"
|
|
22
|
+
"types": "./dist/types/src/index.d.ts",
|
|
23
|
+
"import": "./dist/dpuse-shared.es.js"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
@@ -51,30 +51,32 @@
|
|
|
51
51
|
"audit": "node -e \"import('@dpuse/dpuse-development').then(m => m.auditDependencies())\"",
|
|
52
52
|
"build": "node -e \"import('@dpuse/dpuse-development').then(m => m.buildProject())\"",
|
|
53
53
|
"check": "node -e \"import('@dpuse/dpuse-development').then(m => m.checkProject())\"",
|
|
54
|
-
"document": "node -e \"import('@dpuse/dpuse-development').then(m => m.documentProject('MIT'))\"",
|
|
54
|
+
"document": "node -e \"import('@dpuse/dpuse-development').then(m => m.documentProject('MIT'))\" && node scripts/documentEncodings.ts && prettier --write README.md",
|
|
55
55
|
"format": "node -e \"import('@dpuse/dpuse-development').then(m => m.formatCode())\"",
|
|
56
56
|
"lint": "node -e \"import('@dpuse/dpuse-development').then(m => m.lintCode())\"",
|
|
57
57
|
"release": "npm run build && npm run document && npm run sync && node -e \"import('@dpuse/dpuse-development').then(m => m.triggerGitHubRelease())\"",
|
|
58
58
|
"sync": "node -e \"import('@dpuse/dpuse-development').then(m => m.syncProjectWithGitHub())\"",
|
|
59
|
-
"test": "node -e \"import('@dpuse/dpuse-development').then(m => m.testProject())\""
|
|
59
|
+
"test": "node -e \"import('@dpuse/dpuse-development').then(m => m.testProject())\"",
|
|
60
|
+
"check:browsers": "node scripts/checkBrowserDecoding.ts"
|
|
60
61
|
},
|
|
61
62
|
"dependencies": {
|
|
62
63
|
"file-type": "^22.1.1",
|
|
63
64
|
"valibot": "^1.5.0"
|
|
64
65
|
},
|
|
65
66
|
"devDependencies": {
|
|
66
|
-
"@dpuse/dpuse-development": "^0.
|
|
67
|
-
"@dpuse/eslint-config-dpuse": "^1.0.
|
|
67
|
+
"@dpuse/dpuse-development": "^1.0.109",
|
|
68
|
+
"@dpuse/eslint-config-dpuse": "^1.0.132",
|
|
68
69
|
"@types/node": "^26.6.4",
|
|
69
70
|
"@vitest/coverage-v8": "^5.0.3",
|
|
70
|
-
"
|
|
71
|
+
"chardet": "^2.2.0",
|
|
72
|
+
"eslint": "^10.12.0",
|
|
71
73
|
"fallow": "^3.31.0",
|
|
72
74
|
"fast-check": "^4.10.2",
|
|
73
75
|
"prettier": "^3.9.9",
|
|
74
76
|
"sonda": "^0.14.0",
|
|
75
77
|
"typescript": "^6.0.3",
|
|
76
78
|
"vite": "^8.3.2",
|
|
77
|
-
"vite-plugin-dts": "^5.1.
|
|
79
|
+
"vite-plugin-dts": "^5.1.2",
|
|
78
80
|
"vitest": "^5.0.3"
|
|
79
81
|
}
|
|
80
82
|
}
|