@hot-updater/cli-tools 1.0.0-rc.0 → 1.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +53 -162
- package/dist/index.mjs +1966 -947
- package/dist/{chunk-BEJ448es.mjs → rolldown-runtime-B4iAMlE-.mjs} +3 -3
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -2,8 +2,6 @@ import { Readable } from "stream";
|
|
|
2
2
|
import { Key as Key$1 } from "node:readline";
|
|
3
3
|
import { Readable as Readable$1, Writable } from "node:stream";
|
|
4
4
|
import { Bundle, BundleSigningPlugin, ConfigInput, LocalSigningConfig, Platform, RequiredDeep, SigningConfig, StoragePluginWith, StoragePutResult } from "@hot-updater/plugin-core";
|
|
5
|
-
import * as _$_hot_updater_core0 from "@hot-updater/core";
|
|
6
|
-
|
|
7
5
|
//#region src/BuildLogger.d.ts
|
|
8
6
|
type LinePattern = string | RegExp;
|
|
9
7
|
interface BuildLoggerConfig {
|
|
@@ -47,10 +45,13 @@ interface BundleSigningSession {
|
|
|
47
45
|
readonly publicKey: string;
|
|
48
46
|
readonly signFileHash: (fileHash: string) => Promise<string>;
|
|
49
47
|
}
|
|
48
|
+
declare const readBundleSigningPublicKeyFile: (publicKeyPath: string, options?: {
|
|
49
|
+
readonly cwd?: string;
|
|
50
|
+
}) => Promise<string>;
|
|
50
51
|
declare const prepareBundleSigning: (signing: SigningConfig | undefined, options?: {
|
|
51
52
|
readonly cwd?: string;
|
|
52
53
|
}) => Promise<BundleSigningSession | null>;
|
|
53
|
-
/** Resolves the
|
|
54
|
+
/** Resolves the public identity of the configured bundle signer. */
|
|
54
55
|
declare const getBundleSigningPublicKey: (signing: SigningConfig | undefined, options?: {
|
|
55
56
|
readonly cwd?: string;
|
|
56
57
|
}) => Promise<string | null>;
|
|
@@ -162,63 +163,42 @@ declare const copyDirToTmp: (dir: string, childDirname?: string) => Promise<{
|
|
|
162
163
|
}>;
|
|
163
164
|
//#endregion
|
|
164
165
|
//#region src/createTarBr.d.ts
|
|
165
|
-
declare const createTarBrTargetFiles: ({
|
|
166
|
-
outfile,
|
|
167
|
-
targetFiles
|
|
168
|
-
}: {
|
|
166
|
+
declare const createTarBrTargetFiles: ({ outfile, targetFiles }: {
|
|
169
167
|
targetFiles: {
|
|
170
168
|
path: string;
|
|
171
169
|
name: string;
|
|
172
170
|
}[];
|
|
173
171
|
outfile: string;
|
|
174
172
|
}) => Promise<string>;
|
|
175
|
-
declare const createTarBr: ({
|
|
176
|
-
outfile,
|
|
177
|
-
targetDir,
|
|
178
|
-
excludeExts
|
|
179
|
-
}: {
|
|
173
|
+
declare const createTarBr: ({ outfile, targetDir, excludeExts }: {
|
|
180
174
|
targetDir: string;
|
|
181
175
|
outfile: string;
|
|
182
176
|
excludeExts?: string[];
|
|
183
177
|
}) => Promise<string>;
|
|
184
178
|
//#endregion
|
|
185
179
|
//#region src/createTarGz.d.ts
|
|
186
|
-
declare const createTarGzTargetFiles: ({
|
|
187
|
-
outfile,
|
|
188
|
-
targetFiles
|
|
189
|
-
}: {
|
|
180
|
+
declare const createTarGzTargetFiles: ({ outfile, targetFiles }: {
|
|
190
181
|
targetFiles: {
|
|
191
182
|
path: string;
|
|
192
183
|
name: string;
|
|
193
184
|
}[];
|
|
194
185
|
outfile: string;
|
|
195
186
|
}) => Promise<string>;
|
|
196
|
-
declare const createTarGz: ({
|
|
197
|
-
outfile,
|
|
198
|
-
targetDir,
|
|
199
|
-
excludeExts
|
|
200
|
-
}: {
|
|
187
|
+
declare const createTarGz: ({ outfile, targetDir, excludeExts }: {
|
|
201
188
|
targetDir: string;
|
|
202
189
|
outfile: string;
|
|
203
190
|
excludeExts?: string[];
|
|
204
191
|
}) => Promise<string>;
|
|
205
192
|
//#endregion
|
|
206
193
|
//#region src/createZip.d.ts
|
|
207
|
-
declare const createZipTargetFiles: ({
|
|
208
|
-
outfile,
|
|
209
|
-
targetFiles
|
|
210
|
-
}: {
|
|
194
|
+
declare const createZipTargetFiles: ({ outfile, targetFiles }: {
|
|
211
195
|
targetFiles: {
|
|
212
196
|
path: string;
|
|
213
197
|
name: string;
|
|
214
198
|
}[];
|
|
215
199
|
outfile: string;
|
|
216
200
|
}) => Promise<string>;
|
|
217
|
-
declare const createZip: ({
|
|
218
|
-
outfile,
|
|
219
|
-
targetDir,
|
|
220
|
-
excludeExts
|
|
221
|
-
}: {
|
|
201
|
+
declare const createZip: ({ outfile, targetDir, excludeExts }: {
|
|
222
202
|
targetDir: string;
|
|
223
203
|
outfile: string;
|
|
224
204
|
excludeExts?: string[];
|
|
@@ -300,18 +280,8 @@ type WriteHotUpdaterConfigResult = {
|
|
|
300
280
|
path: string;
|
|
301
281
|
reason?: string;
|
|
302
282
|
};
|
|
303
|
-
declare const createHotUpdaterConfigScaffold: ({
|
|
304
|
-
|
|
305
|
-
storage,
|
|
306
|
-
database,
|
|
307
|
-
extraImports,
|
|
308
|
-
helperStatements,
|
|
309
|
-
updateStrategy
|
|
310
|
-
}: CreateHotUpdaterConfigScaffoldOptions) => HotUpdaterConfigScaffold;
|
|
311
|
-
declare const createHotUpdaterConfigScaffoldFromBuilder: (builder: ConfigBuilder, {
|
|
312
|
-
helperStatements,
|
|
313
|
-
updateStrategy
|
|
314
|
-
}?: CreateHotUpdaterConfigScaffoldFromBuilderOptions) => HotUpdaterConfigScaffold;
|
|
283
|
+
declare const createHotUpdaterConfigScaffold: ({ build, storage, database, extraImports, helperStatements, updateStrategy }: CreateHotUpdaterConfigScaffoldOptions) => HotUpdaterConfigScaffold;
|
|
284
|
+
declare const createHotUpdaterConfigScaffoldFromBuilder: (builder: ConfigBuilder, { helperStatements, updateStrategy }?: CreateHotUpdaterConfigScaffoldFromBuilderOptions) => HotUpdaterConfigScaffold;
|
|
315
285
|
declare const writeHotUpdaterConfig: (scaffold: HotUpdaterConfigScaffold, filePath?: string) => Promise<WriteHotUpdaterConfigResult>;
|
|
316
286
|
//#endregion
|
|
317
287
|
//#region src/hotUpdaterEnv.d.ts
|
|
@@ -320,10 +290,7 @@ type HotUpdaterInitEnv = {
|
|
|
320
290
|
readonly inputEnv?: Readonly<Record<string, string>>;
|
|
321
291
|
readonly managedEnv: Readonly<Record<string, string>>;
|
|
322
292
|
};
|
|
323
|
-
declare const getHotUpdaterInitInputEnv: ({
|
|
324
|
-
env,
|
|
325
|
-
managedEnv
|
|
326
|
-
}: HotUpdaterInitEnv, nonInteractive: boolean) => Readonly<Record<string, string>>;
|
|
293
|
+
declare const getHotUpdaterInitInputEnv: ({ env, managedEnv }: HotUpdaterInitEnv, nonInteractive: boolean) => Readonly<Record<string, string>>;
|
|
327
294
|
declare const readHotUpdaterInitEnv: (cwd: string, envFile?: string) => Promise<HotUpdaterInitEnv>;
|
|
328
295
|
declare const readHotUpdaterEnv: (cwd: string) => Promise<Readonly<Record<string, string>>>;
|
|
329
296
|
declare const getHotUpdaterEnvValue: (env: Readonly<Record<string, string>>, key: string) => string | undefined;
|
|
@@ -335,41 +302,25 @@ declare const HotUpdateDirUtil: {
|
|
|
335
302
|
readonly logDirName: "log";
|
|
336
303
|
readonly outputGitignorePath: ".hot-updater/output";
|
|
337
304
|
readonly logGitignorePath: ".hot-updater/log";
|
|
338
|
-
readonly getDirPath: ({
|
|
339
|
-
cwd
|
|
340
|
-
}: {
|
|
305
|
+
readonly getDirPath: ({ cwd }: {
|
|
341
306
|
cwd: string;
|
|
342
307
|
}) => string;
|
|
343
|
-
readonly getDefaultOutputPath: ({
|
|
344
|
-
cwd
|
|
345
|
-
}: {
|
|
308
|
+
readonly getDefaultOutputPath: ({ cwd }: {
|
|
346
309
|
cwd: string;
|
|
347
310
|
}) => string;
|
|
348
|
-
readonly getLogDirPath: ({
|
|
349
|
-
cwd
|
|
350
|
-
}: {
|
|
311
|
+
readonly getLogDirPath: ({ cwd }: {
|
|
351
312
|
cwd: string;
|
|
352
313
|
}) => string;
|
|
353
314
|
};
|
|
354
315
|
//#endregion
|
|
355
316
|
//#region src/infrastructureGeneration.d.ts
|
|
356
317
|
type Fetch = typeof fetch;
|
|
357
|
-
declare const assertInfrastructureGenerationPayload: ({
|
|
358
|
-
payload,
|
|
359
|
-
provider,
|
|
360
|
-
resource
|
|
361
|
-
}: {
|
|
318
|
+
declare const assertInfrastructureGenerationPayload: ({ payload, provider, resource }: {
|
|
362
319
|
readonly payload: unknown;
|
|
363
320
|
readonly provider: string;
|
|
364
321
|
readonly resource: string;
|
|
365
322
|
}) => void;
|
|
366
|
-
declare const assertInfrastructureGenerationAtUrl: ({
|
|
367
|
-
fetchImpl,
|
|
368
|
-
legacyStatuses,
|
|
369
|
-
provider,
|
|
370
|
-
resource,
|
|
371
|
-
versionUrl
|
|
372
|
-
}: {
|
|
323
|
+
declare const assertInfrastructureGenerationAtUrl: ({ fetchImpl, legacyStatuses, provider, resource, versionUrl }: {
|
|
373
324
|
readonly fetchImpl?: Fetch;
|
|
374
325
|
readonly legacyStatuses?: readonly number[];
|
|
375
326
|
readonly provider: string;
|
|
@@ -407,10 +358,7 @@ type InitProviderDefinition<TInputs extends InitProviderInputsDefinition = InitP
|
|
|
407
358
|
readonly label: string;
|
|
408
359
|
};
|
|
409
360
|
declare const defineInitProvider: <const TInputs extends InitProviderInputsDefinition>(provider: InitProviderDefinition<TInputs>) => InitProviderDefinition<TInputs>;
|
|
410
|
-
declare const shouldAutoSelectOnlyInitResource: ({
|
|
411
|
-
availableResourceCount,
|
|
412
|
-
savedIdentifier
|
|
413
|
-
}: {
|
|
361
|
+
declare const shouldAutoSelectOnlyInitResource: ({ availableResourceCount, savedIdentifier }: {
|
|
414
362
|
readonly availableResourceCount: number;
|
|
415
363
|
readonly savedIdentifier?: string;
|
|
416
364
|
}) => boolean;
|
|
@@ -420,40 +368,23 @@ declare const getInitProviderTextPromptValues: (prompt: InitProviderTextPromptDe
|
|
|
420
368
|
};
|
|
421
369
|
declare const resolveInitProviderInput: (env: Readonly<Record<string, string>>, input: InitProviderInputDefinition) => string | undefined;
|
|
422
370
|
declare const resolveInitProviderInputs: (env: Readonly<Record<string, string>>, provider: InitProviderDefinition) => Readonly<Record<string, string | undefined>>;
|
|
423
|
-
declare const getMissingInitProviderInputs: ({
|
|
424
|
-
inputs,
|
|
425
|
-
preflightOnly,
|
|
426
|
-
provider
|
|
427
|
-
}: {
|
|
371
|
+
declare const getMissingInitProviderInputs: ({ inputs, preflightOnly, provider }: {
|
|
428
372
|
readonly inputs: Readonly<Record<string, string | undefined>>;
|
|
429
373
|
readonly preflightOnly?: boolean;
|
|
430
374
|
readonly provider: InitProviderDefinition;
|
|
431
375
|
}) => readonly string[];
|
|
432
|
-
declare const assertInitProviderInputs: <TInputs extends InitProviderInputsDefinition>({
|
|
433
|
-
inputs,
|
|
434
|
-
provider,
|
|
435
|
-
strict
|
|
436
|
-
}: {
|
|
376
|
+
declare const assertInitProviderInputs: <TInputs extends InitProviderInputsDefinition>({ inputs, provider, strict }: {
|
|
437
377
|
readonly inputs: Readonly<Record<string, string | undefined>>;
|
|
438
378
|
readonly provider: InitProviderDefinition<TInputs>;
|
|
439
379
|
readonly strict?: boolean;
|
|
440
380
|
}) => void;
|
|
441
|
-
declare const confirmInitInputPersistence: <TInputs extends InitProviderInputsDefinition>({
|
|
442
|
-
existingEnv,
|
|
443
|
-
inputs,
|
|
444
|
-
nonInteractive,
|
|
445
|
-
provider
|
|
446
|
-
}: {
|
|
381
|
+
declare const confirmInitInputPersistence: <TInputs extends InitProviderInputsDefinition>({ existingEnv, inputs, nonInteractive, provider }: {
|
|
447
382
|
readonly existingEnv: Readonly<Record<string, string>>;
|
|
448
383
|
readonly inputs: Readonly<Record<string, string | undefined>>;
|
|
449
384
|
readonly nonInteractive: boolean;
|
|
450
385
|
readonly provider: InitProviderDefinition<TInputs>;
|
|
451
386
|
}) => Promise<boolean>;
|
|
452
|
-
declare const getInitProviderEnvVars: <TInputs extends InitProviderInputsDefinition>({
|
|
453
|
-
includeConsentInputs,
|
|
454
|
-
inputs,
|
|
455
|
-
provider
|
|
456
|
-
}: {
|
|
387
|
+
declare const getInitProviderEnvVars: <TInputs extends InitProviderInputsDefinition>({ includeConsentInputs, inputs, provider }: {
|
|
457
388
|
readonly includeConsentInputs: boolean;
|
|
458
389
|
readonly inputs: Readonly<Record<string, string | undefined>>;
|
|
459
390
|
readonly provider: InitProviderDefinition<TInputs>;
|
|
@@ -479,10 +410,7 @@ declare class LegacyInfrastructureError extends InitError {
|
|
|
479
410
|
readonly name = "LegacyInfrastructureError";
|
|
480
411
|
constructor(provider: string, resource: string);
|
|
481
412
|
}
|
|
482
|
-
declare const assertInitInputs: ({
|
|
483
|
-
inputs,
|
|
484
|
-
strict
|
|
485
|
-
}: {
|
|
413
|
+
declare const assertInitInputs: ({ inputs, strict }: {
|
|
486
414
|
readonly inputs: Readonly<Record<string, string | undefined>>;
|
|
487
415
|
readonly strict?: boolean;
|
|
488
416
|
}) => void;
|
|
@@ -496,10 +424,7 @@ type HotUpdaterLogWriter = {
|
|
|
496
424
|
close: () => Promise<void>;
|
|
497
425
|
};
|
|
498
426
|
declare const stripAnsi: (value: string) => string;
|
|
499
|
-
declare const createLogWriter: ({
|
|
500
|
-
prefix,
|
|
501
|
-
logFilePath
|
|
502
|
-
}: {
|
|
427
|
+
declare const createLogWriter: ({ prefix, logFilePath }: {
|
|
503
428
|
prefix: string;
|
|
504
429
|
logFilePath?: string;
|
|
505
430
|
}) => Promise<HotUpdaterLogWriter>;
|
|
@@ -542,12 +467,7 @@ declare const makeEnv: (newEnvVars: Record<string, EnvVarValue>, filePath?: stri
|
|
|
542
467
|
//#region src/promoteBundle.d.ts
|
|
543
468
|
type PromoteStoragePlugin = StoragePluginWith<"get" | "put" | "exists" | "delete">;
|
|
544
469
|
declare const LEGACY_BUNDLE_ERROR = "This OTA bundle was created by a version that does not support manifest.json. Copy bundle is not available.";
|
|
545
|
-
declare function createCopiedBundleArchive({
|
|
546
|
-
bundle,
|
|
547
|
-
config,
|
|
548
|
-
nextBundleId,
|
|
549
|
-
storagePlugin
|
|
550
|
-
}: {
|
|
470
|
+
declare function createCopiedBundleArchive({ bundle, config, nextBundleId, storagePlugin }: {
|
|
551
471
|
bundle: Bundle;
|
|
552
472
|
config: ConfigResponse;
|
|
553
473
|
nextBundleId: string;
|
|
@@ -558,12 +478,12 @@ declare function createCopiedBundleArchive({
|
|
|
558
478
|
archiveByteSize: number;
|
|
559
479
|
storageUri: string;
|
|
560
480
|
fileHash: string;
|
|
561
|
-
metadata:
|
|
481
|
+
metadata: import("@hot-updater/core").BundleMetadata | undefined;
|
|
562
482
|
assetBaseStorageUri: string;
|
|
563
483
|
patches: never[];
|
|
564
484
|
manifestFileHash: string;
|
|
565
485
|
manifestStorageUri: string;
|
|
566
|
-
platform:
|
|
486
|
+
platform: import("@hot-updater/core").Platform;
|
|
567
487
|
gitCommitHash: string | null;
|
|
568
488
|
};
|
|
569
489
|
uploadedStorageUris: string[];
|
|
@@ -622,12 +542,18 @@ interface ClackSettings {
|
|
|
622
542
|
* Date prompt localization
|
|
623
543
|
*/
|
|
624
544
|
date?: {
|
|
625
|
-
/** Month names for validation messages (January, February, ...) */
|
|
545
|
+
/** Month names for validation messages (January, February, ...) */
|
|
546
|
+
monthNames?: string[];
|
|
626
547
|
messages?: {
|
|
627
|
-
/** Shown when date is missing */
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
548
|
+
/** Shown when date is missing */
|
|
549
|
+
required?: string;
|
|
550
|
+
/** Shown when month > 12 */
|
|
551
|
+
invalidMonth?: string;
|
|
552
|
+
/** (days, monthName) => message for invalid day */
|
|
553
|
+
invalidDay?: (days: number, month: string) => string;
|
|
554
|
+
/** (min) => message when date is before minDate */
|
|
555
|
+
afterMin?: (min: Date) => string;
|
|
556
|
+
/** (max) => message when date is after maxDate */
|
|
631
557
|
beforeMax?: (max: Date) => string;
|
|
632
558
|
};
|
|
633
559
|
};
|
|
@@ -746,12 +672,6 @@ declare namespace StandardSchemaV1 {
|
|
|
746
672
|
* ```
|
|
747
673
|
*/
|
|
748
674
|
type Validate<TValue> = ((value: TValue | undefined) => string | Error | undefined) | StandardSchemaV1<TValue | undefined, unknown>;
|
|
749
|
-
/**
|
|
750
|
-
* Runs the `validate()` option and normalizes the result
|
|
751
|
-
* @param validate - The validate option
|
|
752
|
-
* @param value - The user input
|
|
753
|
-
* @returns the validation result
|
|
754
|
-
*/
|
|
755
675
|
interface PromptOptions<TValue, Self extends Prompt<TValue>> {
|
|
756
676
|
render(this: Omit<Self, 'prompt'>): string | undefined;
|
|
757
677
|
initialValue?: any;
|
|
@@ -1243,12 +1163,12 @@ interface DateOptions extends CommonOptions {
|
|
|
1243
1163
|
* ```
|
|
1244
1164
|
*/
|
|
1245
1165
|
declare const date: (opts: DateOptions) => Promise<Date | symbol>;
|
|
1246
|
-
type Prettify<T> = { [P in keyof T]: T[P] } & {};
|
|
1166
|
+
type Prettify<T> = { [P in keyof T]: T[P]; } & {};
|
|
1247
1167
|
/**
|
|
1248
1168
|
* The return type of a {@link PromptGroup}.
|
|
1249
1169
|
* Resolves all prompt results, excluding the cancel symbol.
|
|
1250
1170
|
*/
|
|
1251
|
-
type PromptGroupAwaitedReturn<T> = { [P in keyof T]: Exclude<Awaited<T[P]>, symbol
|
|
1171
|
+
type PromptGroupAwaitedReturn<T> = { [P in keyof T]: Exclude<Awaited<T[P]>, symbol>; };
|
|
1252
1172
|
/**
|
|
1253
1173
|
* Options for the {@link group} utility.
|
|
1254
1174
|
*/
|
|
@@ -1266,7 +1186,7 @@ interface PromptGroupOptions<T> {
|
|
|
1266
1186
|
*/
|
|
1267
1187
|
type PromptGroup<T> = { [P in keyof T]: (opts: {
|
|
1268
1188
|
results: Prettify<Partial<PromptGroupAwaitedReturn<Omit<T, P>>>>;
|
|
1269
|
-
}) => undefined | Promise<T[P] | undefined
|
|
1189
|
+
}) => undefined | Promise<T[P] | undefined>; };
|
|
1270
1190
|
/**
|
|
1271
1191
|
* The `group` utility provides a consistent way to combine a series of prompts,
|
|
1272
1192
|
* combining each answer into one object. Each prompt receives the results of
|
|
@@ -1424,32 +1344,19 @@ interface LimitOptionsParams<TOption> extends CommonOptions {
|
|
|
1424
1344
|
* });
|
|
1425
1345
|
* ```
|
|
1426
1346
|
*/
|
|
1427
|
-
declare const limitOptions: <TOption>({
|
|
1428
|
-
cursor,
|
|
1429
|
-
options,
|
|
1430
|
-
style,
|
|
1431
|
-
output,
|
|
1432
|
-
maxItems,
|
|
1433
|
-
columnPadding,
|
|
1434
|
-
rowPadding
|
|
1435
|
-
}: LimitOptionsParams<TOption>) => string[];
|
|
1347
|
+
declare const limitOptions: <TOption>({ cursor, options, style, output, maxItems, columnPadding, rowPadding }: LimitOptionsParams<TOption>) => string[];
|
|
1436
1348
|
interface LogMessageOptions extends CommonOptions {
|
|
1437
1349
|
symbol?: string;
|
|
1438
1350
|
spacing?: number;
|
|
1439
1351
|
secondarySymbol?: string;
|
|
1440
1352
|
}
|
|
1441
1353
|
declare const log$1: {
|
|
1442
|
-
message: (message?: string | string[], {
|
|
1443
|
-
symbol,
|
|
1444
|
-
secondarySymbol,
|
|
1445
|
-
output,
|
|
1446
|
-
spacing,
|
|
1447
|
-
withGuide
|
|
1448
|
-
}?: LogMessageOptions) => void;
|
|
1354
|
+
message: (message?: string | string[], { symbol, secondarySymbol, output, spacing, withGuide }?: LogMessageOptions) => void;
|
|
1449
1355
|
info: (message: string, opts?: LogMessageOptions) => void;
|
|
1450
1356
|
success: (message: string, opts?: LogMessageOptions) => void;
|
|
1451
1357
|
step: (message: string, opts?: LogMessageOptions) => void;
|
|
1452
|
-
warn: (message: string, opts?: LogMessageOptions) => void;
|
|
1358
|
+
warn: (message: string, opts?: LogMessageOptions) => void;
|
|
1359
|
+
/** alias for `log.warn()`. */
|
|
1453
1360
|
warning: (message: string, opts?: LogMessageOptions) => void;
|
|
1454
1361
|
error: (message: string, opts?: LogMessageOptions) => void;
|
|
1455
1362
|
};
|
|
@@ -1709,17 +1616,7 @@ interface SpinnerResult {
|
|
|
1709
1616
|
clear(): void;
|
|
1710
1617
|
readonly isCancelled: boolean;
|
|
1711
1618
|
}
|
|
1712
|
-
declare const spinner: ({
|
|
1713
|
-
indicator,
|
|
1714
|
-
onCancel,
|
|
1715
|
-
output,
|
|
1716
|
-
cancelMessage,
|
|
1717
|
-
errorMessage,
|
|
1718
|
-
frames,
|
|
1719
|
-
delay,
|
|
1720
|
-
signal,
|
|
1721
|
-
...opts
|
|
1722
|
-
}?: SpinnerOptions) => SpinnerResult;
|
|
1619
|
+
declare const spinner: ({ indicator, onCancel, output, cancelMessage, errorMessage, frames, delay, signal, ...opts }?: SpinnerOptions) => SpinnerResult;
|
|
1723
1620
|
interface ProgressOptions extends SpinnerOptions {
|
|
1724
1621
|
style?: 'light' | 'heavy' | 'block';
|
|
1725
1622
|
max?: number;
|
|
@@ -1728,12 +1625,7 @@ interface ProgressOptions extends SpinnerOptions {
|
|
|
1728
1625
|
interface ProgressResult extends SpinnerResult {
|
|
1729
1626
|
advance(step?: number, msg?: string): void;
|
|
1730
1627
|
}
|
|
1731
|
-
declare function progress({
|
|
1732
|
-
style,
|
|
1733
|
-
max: userMax,
|
|
1734
|
-
size: userSize,
|
|
1735
|
-
...spinnerOptions
|
|
1736
|
-
}?: ProgressOptions): ProgressResult;
|
|
1628
|
+
declare function progress({ style, max: userMax, size: userSize, ...spinnerOptions }?: ProgressOptions): ProgressResult;
|
|
1737
1629
|
interface SelectKeyOptions<Value extends string> extends CommonOptions {
|
|
1738
1630
|
message: string;
|
|
1739
1631
|
options: Option<Value>[];
|
|
@@ -1742,13 +1634,12 @@ interface SelectKeyOptions<Value extends string> extends CommonOptions {
|
|
|
1742
1634
|
}
|
|
1743
1635
|
declare const selectKey: <Value extends string>(opts: SelectKeyOptions<Value>) => Promise<Value | symbol>;
|
|
1744
1636
|
declare const stream: {
|
|
1745
|
-
message: (iterable: Iterable<string> | AsyncIterable<string>, {
|
|
1746
|
-
symbol
|
|
1747
|
-
}?: LogMessageOptions) => Promise<void>;
|
|
1637
|
+
message: (iterable: Iterable<string> | AsyncIterable<string>, { symbol }?: LogMessageOptions) => Promise<void>;
|
|
1748
1638
|
info: (iterable: Iterable<string> | AsyncIterable<string>) => Promise<void>;
|
|
1749
1639
|
success: (iterable: Iterable<string> | AsyncIterable<string>) => Promise<void>;
|
|
1750
1640
|
step: (iterable: Iterable<string> | AsyncIterable<string>) => Promise<void>;
|
|
1751
|
-
warn: (iterable: Iterable<string> | AsyncIterable<string>) => Promise<void>;
|
|
1641
|
+
warn: (iterable: Iterable<string> | AsyncIterable<string>) => Promise<void>;
|
|
1642
|
+
/** alias for `log.warn()`. */
|
|
1752
1643
|
warning: (iterable: Iterable<string> | AsyncIterable<string>) => Promise<void>;
|
|
1753
1644
|
error: (iterable: Iterable<string> | AsyncIterable<string>) => Promise<void>;
|
|
1754
1645
|
};
|
|
@@ -1830,7 +1721,7 @@ declare const transformEnv: <T extends Record<string, string>>(filename: string,
|
|
|
1830
1721
|
//#endregion
|
|
1831
1722
|
//#region src/transformTemplate.d.ts
|
|
1832
1723
|
type ExtractPlaceholders<T extends string> = T extends `${infer _Start}%%${infer Key}%%${infer Rest}` ? Key | ExtractPlaceholders<Rest> : never;
|
|
1833
|
-
type TransformTemplateArgs<T extends string> = { [Key in ExtractPlaceholders<T>]: string };
|
|
1724
|
+
type TransformTemplateArgs<T extends string> = { [Key in ExtractPlaceholders<T>]: string; };
|
|
1834
1725
|
/**
|
|
1835
1726
|
* Replaces placeholders in the format %%key%% in a template string with values from the values object.
|
|
1836
1727
|
* Uses generic type T to automatically infer placeholder keys from the template string to ensure type safety.
|
|
@@ -1842,4 +1733,4 @@ type TransformTemplateArgs<T extends string> = { [Key in ExtractPlaceholders<T>]
|
|
|
1842
1733
|
*/
|
|
1843
1734
|
declare function transformTemplate<T extends string>(templateString: T, values: TransformTemplateArgs<T>): string;
|
|
1844
1735
|
//#endregion
|
|
1845
|
-
export { BuildLogger, BuildLoggerConfig, BuildType, BundleSigningSession, ConfigBuilder, ConfigBuilderScaffold, ConfigResponse, CreateHotUpdaterConfigScaffoldFromBuilderOptions, CreateHotUpdaterConfigScaffoldOptions, HOT_UPDATER_SERVER_PACKAGE_VERSION_ENV, HotUpdateDirUtil, HotUpdaterConfigOptions, HotUpdaterConfigScaffold, HotUpdaterInitEnv, HotUpdaterLogWriter, IConfigBuilder, ImportInfo, InitEnvFileError, InitError, InitProviderDefinition, InitProviderInputDefinition, InitProviderInputPersistence, LEGACY_BUNDLE_ERROR, LegacyInfrastructureError, ManagedHelperStatement, ManagedHelperStrategy, MissingInitInputsError, PromptProgress, PromptSpinner, ProviderConfig, ReactNativeMetadata, ReadPackageUpResult, RunInitOptions, WriteHotUpdaterConfigResult, assertInfrastructureGenerationAtUrl, assertInfrastructureGenerationPayload, assertInitInputs, assertInitProviderInputs, banner, typedColors as colors, confirmInitInputPersistence, copyDirToTmp, createCopiedBundleArchive, createHotUpdaterConfigScaffold, createHotUpdaterConfigScaffoldFromBuilder, createLogWriter, createTarBr, createTarBrTargetFiles, createTarGz, createTarGzTargetFiles, createZip, createZipTargetFiles, decryptJson, defineInitProvider, encryptJson, ensureInstallPackages, formatApiKeyNote, getAndroidSdkPath, getBundleSigningPublicKey, getCwd, getHotUpdaterEnvValue, getHotUpdaterInitInputEnv, getInitProviderEnvVars, getInitProviderTextPromptValues, getMissingInitInputs, getMissingInitProviderInputs, getPackageManager, getReactNativeMetadatas, getStorageFileByteSize, link, loadConfig, log, makeEnv, p, prepareBundleSigning, printBanner, putStorageFile, readHotUpdaterEnv, readHotUpdaterInitEnv, readPackageUp, renderImportStatements, resolveHotUpdaterServerVersion, resolveInitProviderInput, resolveInitProviderInputs, resolvePackageVersion, shouldAutoSelectOnlyInitResource, stripAnsi, transformEnv, transformTemplate, writeHotUpdaterConfig, writeStorageFile, writeStorageResponseFile };
|
|
1736
|
+
export { BuildLogger, BuildLoggerConfig, BuildType, BundleSigningSession, ConfigBuilder, ConfigBuilderScaffold, ConfigResponse, CreateHotUpdaterConfigScaffoldFromBuilderOptions, CreateHotUpdaterConfigScaffoldOptions, HOT_UPDATER_SERVER_PACKAGE_VERSION_ENV, HotUpdateDirUtil, HotUpdaterConfigOptions, HotUpdaterConfigScaffold, HotUpdaterInitEnv, HotUpdaterLogWriter, IConfigBuilder, ImportInfo, InitEnvFileError, InitError, InitProviderDefinition, InitProviderInputDefinition, InitProviderInputPersistence, LEGACY_BUNDLE_ERROR, LegacyInfrastructureError, ManagedHelperStatement, ManagedHelperStrategy, MissingInitInputsError, PromptProgress, PromptSpinner, ProviderConfig, ReactNativeMetadata, ReadPackageUpResult, RunInitOptions, WriteHotUpdaterConfigResult, assertInfrastructureGenerationAtUrl, assertInfrastructureGenerationPayload, assertInitInputs, assertInitProviderInputs, banner, typedColors as colors, confirmInitInputPersistence, copyDirToTmp, createCopiedBundleArchive, createHotUpdaterConfigScaffold, createHotUpdaterConfigScaffoldFromBuilder, createLogWriter, createTarBr, createTarBrTargetFiles, createTarGz, createTarGzTargetFiles, createZip, createZipTargetFiles, decryptJson, defineInitProvider, encryptJson, ensureInstallPackages, formatApiKeyNote, getAndroidSdkPath, getBundleSigningPublicKey, getCwd, getHotUpdaterEnvValue, getHotUpdaterInitInputEnv, getInitProviderEnvVars, getInitProviderTextPromptValues, getMissingInitInputs, getMissingInitProviderInputs, getPackageManager, getReactNativeMetadatas, getStorageFileByteSize, link, loadConfig, log, makeEnv, p, prepareBundleSigning, printBanner, putStorageFile, readBundleSigningPublicKeyFile, readHotUpdaterEnv, readHotUpdaterInitEnv, readPackageUp, renderImportStatements, resolveHotUpdaterServerVersion, resolveInitProviderInput, resolveInitProviderInputs, resolvePackageVersion, shouldAutoSelectOnlyInitResource, stripAnsi, transformEnv, transformTemplate, writeHotUpdaterConfig, writeStorageFile, writeStorageResponseFile };
|