@iobroker/js-controller-common 4.0.21 → 4.1.0-alpha.0-20220819-74ceeddc

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.
@@ -0,0 +1,559 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="iobroker" />
3
+ /// <reference types="iobroker" />
4
+ /// <reference types="node" />
5
+ /// <reference types="node" />
6
+ import { ChildProcessPromise } from 'promisify-child-process';
7
+ import { CommandResult } from '@alcalzone/pak';
8
+ import type { ExecOptions } from 'child_process';
9
+ export declare enum ERRORS {
10
+ ERROR_NOT_FOUND = "Not exists",
11
+ ERROR_EMPTY_OBJECT = "null object",
12
+ ERROR_NO_OBJECT = "no object",
13
+ ERROR_DB_CLOSED = "DB closed"
14
+ }
15
+ /** All characters that may not appear in an object ID. */
16
+ export declare const FORBIDDEN_CHARS: RegExp;
17
+ /**
18
+ * Checks the flag nonEdit and restores non-changeable values if required
19
+ *
20
+ * @alias checkNonEditable
21
+ * @memberof tools
22
+ * @param oldObject source object
23
+ * @param newObject destination object
24
+ *
25
+ */
26
+ export declare function checkNonEditable(oldObject: Record<string, any> | null, newObject: Record<string, any>): boolean;
27
+ /**
28
+ * @param repoVersion
29
+ * @param installedVersion
30
+ * @throws {Error} if version is invalid
31
+ */
32
+ export declare function upToDate(repoVersion: string, installedVersion: string): boolean;
33
+ export declare function decryptPhrase(password: string, data: any, callback: (decrypted?: null | string) => void): void;
34
+ /**
35
+ * Checks if multiple host objects exists, without using object views
36
+ *
37
+ * @param objects the objects db
38
+ * @return true if only one host object exists
39
+ */
40
+ export declare function isSingleHost(objects: any): Promise<boolean>;
41
+ /**
42
+ * Checks if at least one host is running in a MH environment
43
+ *
44
+ * @param objects the objects db
45
+ * @param states the states db
46
+ * @return true if one or more hosts running else false
47
+ */
48
+ export declare function isHostRunning(objects: any, states: any): Promise<boolean>;
49
+ export declare const appName: string;
50
+ export declare function rmdirRecursiveSync(path: string): void;
51
+ export declare function findIPs(): string[];
52
+ /**
53
+ * Checks if we are running inside a docker container
54
+ */
55
+ export declare function isDocker(): boolean;
56
+ /**
57
+ * Generates a new uuid if non existing
58
+ *
59
+ * @param objects - objects DB
60
+ * @return uuid if successfully created/updated
61
+ */
62
+ export declare function createUuid(objects: any): Promise<void | string>;
63
+ export declare function getFile(urlOrPath: string, fileName: string, callback: (file?: string) => void): Promise<void>;
64
+ export declare function getJson(urlOrPath: string, agent: string, callback: (sources?: Record<string, any> | null, urlOrPath?: string | null) => void): Promise<void>;
65
+ /**
66
+ * Return content of the json file. Download it or read directly
67
+ * @param urlOrPath URL where the json file could be found
68
+ * @param agent optional agent identifier like "Windows Chrome 12.56"
69
+ * @returns json object
70
+ */
71
+ export declare function getJsonAsync(urlOrPath: string, agent: string): Promise<Record<string, any> | null>;
72
+ export interface AdapterInformation {
73
+ /** this flag is only true for the js-controller */
74
+ controller: boolean;
75
+ /** adapter version **/
76
+ version: string;
77
+ /** path to icon of the adapter */
78
+ icon: string;
79
+ /** path to local icon of the adater */
80
+ localIcon: string;
81
+ /** title of the adapter */
82
+ title: string;
83
+ /** title of the adapter in multiple languages */
84
+ titleLang: Multilingual;
85
+ /** description of the adapter in multiple languages */
86
+ desc: Multilingual;
87
+ /** platform of the adapter */
88
+ platform: 'Javascript/Node.js';
89
+ /** keywords of the adapter */
90
+ keywords: string[];
91
+ /** path to readme file */
92
+ readme: string;
93
+ /** type of the adapter */
94
+ type: string;
95
+ /** license of the adapter */
96
+ license: string;
97
+ /** url to license information */
98
+ licenseUrl?: string;
99
+ }
100
+ interface Multilingual {
101
+ en: string;
102
+ de?: string;
103
+ ru?: string;
104
+ pt?: string;
105
+ nl?: string;
106
+ fr?: string;
107
+ it?: string;
108
+ es?: string;
109
+ pl?: string;
110
+ 'zh-cn'?: string;
111
+ }
112
+ export interface GetInstalledInfoReponse {
113
+ controller?: boolean;
114
+ version?: string;
115
+ icon?: string;
116
+ title?: string;
117
+ titleLang?: Multilingual;
118
+ desc?: Multilingual;
119
+ platform?: string;
120
+ keywords?: string[];
121
+ readme?: string;
122
+ runningVersion?: string;
123
+ license?: string;
124
+ licenseUrl?: string;
125
+ }
126
+ /**
127
+ * Get list of all installed adapters and controller version on this host
128
+ * @param hostRunningVersion Version of the running js-controller, will be included in the returned information if provided
129
+ * @returns object containing information about installed host
130
+ */
131
+ export declare function getInstalledInfo(hostRunningVersion?: string): GetInstalledInfoReponse;
132
+ /**
133
+ * Get list of all adapters and controller in some repository file or in /conf/source-dist.json
134
+ *
135
+ * @alias getRepositoryFile
136
+ * @memberof tools
137
+ * @param urlOrPath URL starting with http:// or https:// or local file link
138
+ * @param additionalInfo destination object
139
+ * @param callback function (err, sources, actualHash) { }
140
+ *
141
+ */
142
+ export declare function getRepositoryFile(urlOrPath: string, additionalInfo: Record<string, any>, callback: (err?: Error | null, sources?: Record<string, any>, actualHash?: string | number | undefined) => void): void;
143
+ export interface RepositoryFile {
144
+ json: Record<string, any>;
145
+ changed: boolean;
146
+ hash: string;
147
+ }
148
+ /**
149
+ * Read on repository
150
+ *
151
+ * @alias getRepositoryFileAsync
152
+ * @memberof tools
153
+ * @param url URL starting with http:// or https:// or local file link
154
+ * @param hash actual hash
155
+ * @param force Force repository update despite on hash
156
+ * @param _actualRepo Actual repository
157
+ *
158
+ */
159
+ export declare function getRepositoryFileAsync(url: string, hash: string, force: boolean, _actualRepo: RepositoryFile): Promise<RepositoryFile>;
160
+ /**
161
+ * Sends the given object to the diagnosis server
162
+ *
163
+ * @param obj - diagnosis object
164
+ */
165
+ export declare function sendDiagInfo(obj: Record<string, any>): Promise<void>;
166
+ /**
167
+ * Finds the adapter directory of a given adapter
168
+ *
169
+ * @alias getAdapterDir
170
+ * @memberof tools
171
+ * @param adapter name of the adapter, e.g. hm-rpc
172
+ * @returns path to adapter directory or null if no directory found
173
+ */
174
+ export declare function getAdapterDir(adapter: string): string | null;
175
+ /**
176
+ * Returns the hostname of this host
177
+ * @alias getHostName
178
+ */
179
+ export declare function getHostName(): string;
180
+ export interface InstallNodeModuleOptions {
181
+ unsafePerm?: boolean;
182
+ debug?: boolean;
183
+ cwd?: string;
184
+ }
185
+ /**
186
+ * Installs a node module using npm or a similar package manager
187
+ * @param npmUrl Which node module to install
188
+ * @param options Options for the installation
189
+ */
190
+ export declare function installNodeModule(npmUrl: string, options?: InstallNodeModuleOptions): Promise<CommandResult>;
191
+ export interface UninstallNodeModuleOptions {
192
+ debug?: boolean;
193
+ cwd?: string;
194
+ }
195
+ /**
196
+ * Uninstalls a node module using npm or a similar package manager
197
+ * @param packageName Which node module to uninstall
198
+ * @param options Options for the installation
199
+ */
200
+ export declare function uninstallNodeModule(packageName: string, options?: UninstallNodeModuleOptions): Promise<CommandResult>;
201
+ export interface RebuildNodeModulesOptions {
202
+ debug?: boolean;
203
+ cwd?: string;
204
+ module?: string;
205
+ }
206
+ /**
207
+ * Rebuilds all native node_modules that are dependencies of the project in the current working directory / project root.
208
+ * If `options.cwd` is given, the directory must contain a lockfile.
209
+ * @param options Options for the rebuild
210
+ */
211
+ export declare function rebuildNodeModules(options?: RebuildNodeModulesOptions): Promise<CommandResult>;
212
+ export interface GetDiskInfoResponse {
213
+ 'Disk size': number;
214
+ 'Disk free': number;
215
+ }
216
+ /**
217
+ * Read disk free space
218
+ *
219
+ * @alias getDiskInfo
220
+ * @memberof Tools
221
+ * @param platform result of os.platform() (win32 => Windows, darwin => OSX)
222
+ * @param callback return result
223
+ * <pre><code>
224
+ * function (err, infos) {
225
+ * adapter.log.debug('Disks sizes is: ' + info['Disk size'] + ' - ' + info['Disk free']);
226
+ * }
227
+ * </code></pre>
228
+ */
229
+ export declare function getDiskInfo(platform: NodeJS.Platform, callback: (err?: Error | null, infos?: null | GetDiskInfoResponse) => void): void;
230
+ /**
231
+ * Returns information about a certificate
232
+ *
233
+ *
234
+ * Following info will be returned:
235
+ * - certificate: the certificate itself
236
+ * - serialNumber: serial number
237
+ * - signature: type of signature as text like "RSA",
238
+ * - keyLength: bits used for encryption key like 2048
239
+ * - issuer: issuer of the certificate
240
+ * - subject: subject that is signed
241
+ * - dnsNames: server name this certificate belong to
242
+ * - keyUsage: this certificate can be used for the followinf puposes
243
+ * - extKeyUsage: usable or client, server or ...
244
+ * - validityNotBefore: certificate validity start datetime
245
+ * - validityNotAfter: certificate validity end datetime
246
+ *
247
+ * @alias getCertificateInfo
248
+ * @memberof Tools
249
+ * @param cert
250
+ * @return certificate information object
251
+ */
252
+ export declare function getCertificateInfo(cert: string): null | Record<string, any>;
253
+ export interface DefaultCertificates {
254
+ defaultPrivate: string;
255
+ defaultPublic: string;
256
+ }
257
+ /**
258
+ * Returns default SSL certificates (private and public)
259
+ *
260
+ *
261
+ * Following info will be returned:
262
+ * - defaultPrivate: private RSA key
263
+ * - defaultPublic: public certificate
264
+ *
265
+ * @alias generateDefaultCertificates
266
+ * @memberof Tools
267
+ * <pre><code>
268
+ * const certificates = tools.generateDefaultCertificates();
269
+ * </code></pre>
270
+ */
271
+ export declare function generateDefaultCertificates(): DefaultCertificates;
272
+ /**
273
+ * Collects information about host and available adapters
274
+ *
275
+ * Following info will be collected:
276
+ * - available adapters
277
+ * - node.js --version
278
+ * - npm --version
279
+ *
280
+ * @alias getHostInfo
281
+ * @memberof Tools
282
+ * @param objects db
283
+ * @param callback
284
+ * <pre><code>
285
+ * function (result) {
286
+ * adapter.log.debug('Info about host: ' + JSON.stringify(result, null, 2);
287
+ * }
288
+ * </code></pre>
289
+ */
290
+ export declare function getHostInfo(objects: any, callback: (result?: Record<string, any>) => void): Promise<Record<string, any>>;
291
+ /**
292
+ * Finds the controller root directory
293
+ * @returns absolute path to controller dir
294
+ */
295
+ export declare function getControllerDir(): string;
296
+ export declare function getDefaultDataDir(): string;
297
+ /**
298
+ * Returns the path of the config file
299
+ */
300
+ export declare function getConfigFileName(): string;
301
+ /**
302
+ * Promisifies a function which returns an error as the first argument in its callback
303
+ * @param fn The function to promisify
304
+ * @param context (optional) The context (value of `this` to bind the function to)
305
+ * @param returnArgNames (optional) If the callback contains multiple arguments,
306
+ * you can combine them into one object by passing the names as an array.
307
+ * Otherwise the Promise will resolve with an array
308
+ */
309
+ export declare function promisify(fn: (...args: any[]) => void, context?: any, returnArgNames?: string[]): (...args: any[]) => Promise<any>;
310
+ /**
311
+ * Promisifies a function which does not provide an error as the first argument in its callback
312
+ * @param fn The function to promisify
313
+ * @param context (optional) The context (value of `this` to bind the function to)
314
+ * @param returnArgNames (optional) If the callback contains multiple arguments,
315
+ * you can combine them into one object by passing the names as an array.
316
+ * Otherwise the Promise will resolve with an array
317
+ */
318
+ export declare function promisifyNoError(fn: (...args: any[]) => void, context?: any, returnArgNames?: string[]): (...args: any[]) => Promise<any>;
319
+ /**
320
+ * Creates and executes an array of promises in sequence
321
+ * @param promiseFactories An array of promise-returning functions
322
+ */
323
+ export declare function promiseSequence(promiseFactories: ((...args: any[]) => Promise<any>)[]): any[];
324
+ export declare function setQualityForInstance(objects: any, states: any, namespace: string, q: number): Promise<void>;
325
+ /**
326
+ * Converts ioB pattern into regex.
327
+ * @param pattern - Regex string to use it in new RegExp(pattern)
328
+ */
329
+ export declare function pattern2RegEx(pattern: string): string;
330
+ /**
331
+ * Appends the stack trace generated by `captureStackTrace` to the given string
332
+ * @param str - The string to append the stack trace to
333
+ */
334
+ export declare function appendStackTrace(str: string): string;
335
+ /**
336
+ * encrypts a value by a given key via AES-192-CBC
337
+ *
338
+ * @param key - Secret key
339
+ * @param value - value to decrypt
340
+ */
341
+ export declare function encrypt(key: string, value: string): string;
342
+ /**
343
+ * encrypts a value by a given key via AES-192-CBC
344
+ *
345
+ * @param key - Secret key
346
+ * @param value - value to decrypt
347
+ */
348
+ export declare function decrypt(key: string, value: string): string;
349
+ /**
350
+ * Tests whether the given variable is a real object and not an Array
351
+ * @param it The variable to test
352
+ * @returns true if it is Record<string, any>
353
+ */
354
+ export declare function isObject(it: any): it is Record<string, any>;
355
+ /**
356
+ * Tests whether the given variable is really an Array
357
+ * @param it The variable to test
358
+ */
359
+ export declare function isArray(it: any): it is any[];
360
+ /**
361
+ * Measure the Node.js event loop lag and repeatedly call the provided callback function with the updated results
362
+ * @param ms The number of milliseconds for monitoring
363
+ * @param cb Callback function to call for each new value
364
+ */
365
+ export declare function measureEventLoopLag(ms: number, cb: (eventLoopLag?: number) => void): void;
366
+ /**
367
+ * This function convert state values by read and write of aliases. Function is synchron.
368
+ *
369
+ * @param sourceObj
370
+ * @param targetObj
371
+ * @param state Object with val, ack and so on
372
+ * @param logger Logging object
373
+ * @param logNamespace optional Logging namespace
374
+ */
375
+ export declare function formatAliasValue(sourceObj: Record<string, any>, targetObj: Record<string, any>, state: Record<string, any>, logger: any, logNamespace?: string): Record<string, any> | null;
376
+ /**
377
+ * remove given id from all enums
378
+ *
379
+ * @alias removeIdFromAllEnums
380
+ * @memberof tools
381
+ * @param objects object to access objects db
382
+ * @param id the object id which will be deleted from enums
383
+ * @param allEnums objects with all enums to use - if not provided all enums will be queried
384
+ * @returns Promise All objects are tried to be updated - reject will happen as soon as one fails with the error of the first fail
385
+ *
386
+ */
387
+ export declare function removeIdFromAllEnums(objects: any, id: string, allEnums?: Record<string, any>): Promise<void>;
388
+ /**
389
+ * Parses dependencies to standardized object of form
390
+ *
391
+ * @alias parseDependencies
392
+ * @memberof tools
393
+ * @param dependencies dependencies array or single dependency
394
+ * @returns parsedDeps parsed dependencies
395
+ */
396
+ export declare function parseDependencies(dependencies: string[] | Record<string, string>[] | string | Record<string, string>): Record<string, string>;
397
+ /**
398
+ * Validates types of obj.common properties and object.type, if invalid types are used, an error is thrown.
399
+ * If attributes of obj.common are not provided, no error is thrown. obj.type has to be there and has to be valid.
400
+ *
401
+ * @param obj an object which will be validated
402
+ * @param extend (optional) if true checks will allow more optional cases for extendObject calls
403
+ * @throws Error if a property has the wrong type or obj.type is non existing
404
+ */
405
+ export declare function validateGeneralObjectProperties(obj: any, extend?: boolean): void;
406
+ /**
407
+ * get all instances of all adapters in the list
408
+ *
409
+ * @alias getAllInstances
410
+ * @memberof tools
411
+ * @param adapters list of adapter names to get instances for
412
+ * @param objects class redis objects
413
+ * @returns array of IDs
414
+ */
415
+ export declare function getAllInstances(adapters: string[], objects: any): Promise<string[]>;
416
+ export interface GetObjectViewResult {
417
+ rows: ioBroker.GetObjectViewItem<ioBroker.Object>[];
418
+ }
419
+ export interface GetObjectViewInstanceEntry {
420
+ id: string;
421
+ value: ioBroker.InstanceObject;
422
+ }
423
+ export interface GetObjectViewInstanceResult {
424
+ rows: GetObjectViewInstanceEntry[];
425
+ }
426
+ /**
427
+ * Get all existing enums
428
+ *
429
+ * @param objects - objects db
430
+ * @returns Promise
431
+ */
432
+ export declare function getAllEnums(objects: any): Promise<Record<string, any>>;
433
+ /**
434
+ * get async all instances of one adapter
435
+ *
436
+ * @alias getInstances
437
+ * @param adapter name of the adapter
438
+ * @param objects objects DB
439
+ * @param withObjects return objects instead of only ids
440
+ */
441
+ export declare function getInstances(adapter: string, objects: any, withObjects: boolean): Promise<any[] | string[]>;
442
+ /**
443
+ * Executes a command asynchronously. On success, the promise resolves with stdout and stderr.
444
+ * On error, the promise rejects with the exit code or signal, as well as stdout and stderr.
445
+ * @param command The command to execute
446
+ * @param execOptions The options for child_process.exec
447
+ * @returns child process promise
448
+ */
449
+ export declare function execAsync(command: string, execOptions?: ExecOptions): ChildProcessPromise;
450
+ /**
451
+ * Takes input from one stream and writes it to another as soon as a complete line was read.
452
+ * @param input The stream to read from
453
+ * @param output The stream to write into
454
+ */
455
+ export declare function pipeLinewise(input: NodeJS.ReadableStream, output: NodeJS.WritableStream): void;
456
+ /**
457
+ * Find the adapter main file as full path
458
+ *
459
+ * @memberof tools
460
+ * @param adapter - adapter name of the adapter, e.g. hm-rpc
461
+ * @returns full file name
462
+ */
463
+ export declare function resolveAdapterMainFile(adapter: string): Promise<string>;
464
+ /**
465
+ * Returns the default nodeArgs required to execute the main file, e.g. transpile hooks for TypeScript
466
+ * @param mainFile
467
+ * @returns default node args for cli
468
+ */
469
+ export declare function getDefaultNodeArgs(mainFile: string): string[];
470
+ /**
471
+ * Tests if the given URL matches the format <githubname>/<githubrepo>[#<commit-ish>]
472
+ * @param url The URL to parse
473
+ */
474
+ export declare function isShortGithubUrl(url: string): boolean;
475
+ export interface ParsedGithubUrl {
476
+ user: string;
477
+ repo: string;
478
+ commit?: string;
479
+ }
480
+ /**
481
+ * Tries to parse an URL in the format <githubname>/<githubrepo>[#<commit-ish>] into its separate parts
482
+ * @param url The URL to parse
483
+ */
484
+ export declare function parseShortGithubUrl(url: string): ParsedGithubUrl | null;
485
+ /**
486
+ * Tests if the given pathname matches the format /<githubname>/<githubrepo>[.git][/<tarball|tree|archive>/<commit-ish>[.zip|.gz]]
487
+ * @param pathname The pathname part of a Github URL
488
+ */
489
+ export declare function isGithubPathname(pathname: string): boolean;
490
+ /**
491
+ * Tries to a github pathname format /<githubname>/<githubrepo>[.git][/<tarball|tree|archive>/<commit-ish>[.zip|.gz|.tar.gz]] into its separate parts
492
+ * @param pathname The pathname part of a Github URL
493
+ */
494
+ export declare function parseGithubPathname(pathname: string): ParsedGithubUrl | null;
495
+ /**
496
+ * Removes properties which are given by preserve
497
+ * @param preserve - object which has true entries (or array of selected attributes) for all attributes which should be removed from currObj
498
+ * @param oldObj - old object
499
+ * @param newObj - new object
500
+ */
501
+ export declare function removePreservedProperties(preserve: Record<string, any>, oldObj: Record<string, any>, newObj: Record<string, any>): void;
502
+ /**
503
+ * Returns the array of system.adapter.<namespace>.* objects which are created for every instance
504
+ *
505
+ * @param namespace - adapter namespace + id, e.g. hm-rpc.0
506
+ * @param createWakeup - indicator to create wakeup object too
507
+ */
508
+ export declare function getInstanceIndicatorObjects(namespace: string, createWakeup: boolean): ioBroker.StateObject[];
509
+ export declare type InternalLogger = Omit<ioBroker.Logger, 'level'>;
510
+ export declare function getLogger(log: any): InternalLogger;
511
+ export interface OrderedInstancesObject {
512
+ 1: ioBroker.InstanceObject[];
513
+ 2: ioBroker.InstanceObject[];
514
+ 3: ioBroker.InstanceObject[];
515
+ admin: ioBroker.InstanceObject[];
516
+ }
517
+ /**
518
+ * Get ordered instances according to tier level
519
+ *
520
+ * @param objects - Objects DB
521
+ * @param logger - logger object
522
+ * @param logPrefix prefix for logging
523
+ */
524
+ export declare function getInstancesOrderedByStartPrio(objects: any, logger: any, logPrefix?: string): Promise<Record<string, any>[]>;
525
+ /**
526
+ * Set capabilities of the given executable on Linux systems
527
+ * @param execPath - path to the executable for node you can determine it via process.execPath
528
+ * @param capabilities - capabilities to set, e.g. ['cap_net_admin', 'cap_net_bind_service']
529
+ * @param modeEffective - add effective mode
530
+ * @param modePermitted - add permitted mode
531
+ * @param modeInherited - add inherited mode
532
+ */
533
+ export declare function setExecutableCapabilities(execPath: string, capabilities: string[], modeEffective?: boolean, modePermitted?: boolean, modeInherited?: boolean): Promise<void>;
534
+ /**
535
+ * Reads the licenses from iobroker.net
536
+ * Reads the licenses from iobroker.net and if no login/password provided stores it in system.licenses
537
+ * @param objects Object store instance
538
+ * @param login Login for ioBroker.net
539
+ * @param password Decoded password for ioBroker.net
540
+ * @returns array of all licenses stored on iobroker.net
541
+ */
542
+ export declare function updateLicenses(objects: any, login: string, password: string): Promise<any[]>;
543
+ export interface GZipFileOptions {
544
+ deleteInput?: boolean;
545
+ }
546
+ /**
547
+ * Compresses an input file using GZip and writes it somewhere else
548
+ * @param inputFilename The filename of the input file that should be gzipped
549
+ * @param outputFilename The filename of the output file where the gzipped content should be written to
550
+ * @param options Options for the compression
551
+ */
552
+ export declare function compressFileGZip(inputFilename: string, outputFilename: string, options?: GZipFileOptions): Promise<void>;
553
+ /**
554
+ * If an array is passed it will be stringified, else the parameter is returned
555
+ * @param maybeArr parameter which will be stringified if it is an array
556
+ */
557
+ export declare function maybeArrayToString<T>(maybeArr: T): T extends any[] ? string : T;
558
+ export * from './maybeCallback';
559
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/lib/common/tools.ts"],"names":[],"mappings":";;;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