@hot-updater/cli-tools 1.2.0-rc.0 → 1.2.0-rc.10

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.
Files changed (3) hide show
  1. package/dist/index.d.mts +418 -114
  2. package/dist/index.mjs +1408 -981
  3. package/package.json +5 -5
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Readable } from "stream";
2
2
  import { Key as Key$1 } from "node:readline";
3
- import { AnyHotUpdaterPlugin, BundleSigningAdapter, ConfigInput, ConfiguredDatabase, EngineDatabase, HotUpdaterCoreApi, LocalSigningConfig, Migrator, NativeFingerprint, NativeFingerprintOptions, Platform, PluginClientPlugin, RequiredDeep, SchemaGenerator, SecretsAdapter, SigningConfig, StorageAdapter, StorageAdapterWith, StoragePutResult, ToolingDatabase } from "@hot-updater/plugin-core";
3
+ import { AnyHotUpdaterPlugin, ConfigInput, ConfiguredDatabase, EngineDatabase, HotUpdaterCoreApi, Migrator, NativeFingerprint, NativeFingerprintOptions, Platform, PluginClientPlugin, RequiredDeep, SchemaGenerator, SecretRef, SecretsAdapter, SigningConfig, StorageAdapter, StorageAdapterWith, StoragePutResult, ToolingDatabase } from "@hot-updater/plugin-core";
4
4
  import { Readable as Readable$1, Writable } from "node:stream";
5
5
  import { ManifestArchive } from "@hot-updater/protocol";
6
6
  //#region src/BuildLogger.d.ts
@@ -18,13 +18,41 @@ interface BuildFailureSummaryConfig {
18
18
  end: LinePattern;
19
19
  includeEnd: boolean;
20
20
  }[];
21
+ /**
22
+ * Lines never printed, nor counted in the last lines, such as a
23
+ * download's progress meter.
24
+ */
25
+ ignore?: LinePattern[];
26
+ /**
27
+ * How many of the last lines print after the kept ones, for a tool whose
28
+ * error line is followed by its cause. Without it, the last lines print
29
+ * only when no line is kept.
30
+ */
31
+ tail?: number;
32
+ /** The widest a printed line is, cut with `…`: the log has it whole. */
33
+ maxWidth?: number;
34
+ /**
35
+ * The line that ends the tool's report of its error, after which its
36
+ * output is boilerplate, such as a crash report's links: the summary is
37
+ * the kept lines, without the last lines.
38
+ */
39
+ stopAfter?: LinePattern;
21
40
  }
41
+ /**
42
+ * Reads the short phase a live build line shows, such as `Compiling
43
+ * React-Core · 412 files`, from each line of the tool's raw output, or
44
+ * undefined for a line that starts no phase. One reader reads one run.
45
+ */
46
+ type BuildPhaseReader = (line: string) => string | undefined;
22
47
  interface BuildLoggerConfig {
23
48
  logPrefix: string;
24
- /** Lines that should be surfaced in prompt output as important events. */
25
- importantLogPatterns: LinePattern[];
26
- /** Progress stages: stage index advances when corresponding output patterns are observed. */
27
- progressStages: LinePattern[][];
49
+ /**
50
+ * The log file to append to, such as an archive's for its export, instead
51
+ * of a new one.
52
+ */
53
+ logFilePath?: string;
54
+ /** A phase reader for each run. */
55
+ createPhaseReader: () => BuildPhaseReader;
28
56
  /** What a failure prints from the tool's raw output. */
29
57
  failureSummary: BuildFailureSummaryConfig;
30
58
  }
@@ -38,55 +66,67 @@ declare class BuildFailedError extends Error {
38
66
  readonly logPath: string | null;
39
67
  /** The lines of the tool's output the summary printed. */
40
68
  readonly summary: string[];
41
- constructor(message: string, { logPath, summary, cause }: {
69
+ /**
70
+ * What to do about it, such as accepting an agreement, which the summary
71
+ * doesn't say: the one line a command prints after it, or null.
72
+ */
73
+ readonly hint: string | null;
74
+ constructor(message: string, { logPath, summary, hint, cause }: {
42
75
  logPath: string | null;
43
76
  summary: string[];
77
+ hint?: string | null;
44
78
  cause?: unknown;
45
79
  });
46
80
  }
47
81
  declare class BuildLogger {
48
82
  private readonly config;
49
- private state;
50
83
  private logWriter?;
84
+ private step?;
51
85
  private summaryLines;
52
86
  private tailLines;
87
+ private lineCount;
88
+ private stopped;
53
89
  private openBlock?;
54
- private readonly promptProgress;
55
- private readonly stageCount;
56
90
  constructor(config: BuildLoggerConfig);
57
- start(): Promise<void>;
58
91
  /**
59
- * Writes the tool's raw output to the log file and reads its failure
60
- * summary from it, and shows progress from `display`, a formatter's
61
- * output of it such as xcbeautify's, or from the raw output without one.
92
+ * Opens the log, writes `header` to it, such as the tool's command line,
93
+ * which the terminal doesn't show, and starts the step titled `title`.
62
94
  */
63
- processStream(input: Readable, { display }?: {
64
- display?: Readable;
95
+ start({ title, header }: {
96
+ title: string;
97
+ header?: string[];
65
98
  }): Promise<void>;
99
+ /**
100
+ * Writes the tool's raw output to the log file, reads its failure summary
101
+ * from it, and shows its phases on the step's line.
102
+ */
103
+ processStream(input: Readable): Promise<void>;
66
104
  /** The build log, relative to the project, or null without one. */
67
105
  get logPath(): string | null;
106
+ /** The build log's absolute path, or null without one. */
107
+ get logFilePath(): string | null;
68
108
  /**
69
109
  * The lines of the raw output a failure prints: the ones the config's
70
- * `failureSummary` keeps, deduplicated, or the last lines without any.
110
+ * `failureSummary` keeps, deduplicated, with its `tail` unless the output
111
+ * reached `stopAfter`, or the last lines without any.
71
112
  */
72
113
  get failureSummary(): string[];
73
114
  private consumeSummaryStream;
74
115
  private processSummaryLine;
75
116
  private keepSummaryLine;
76
117
  private consumeProgressStream;
77
- private processProgressLine;
118
+ /**
119
+ * Ends the step with `message` and its duration, or, for a failure, as
120
+ * failed, then prints the failure summary and the log's path.
121
+ */
78
122
  stop(message?: string, success?: boolean): void;
79
123
  writeError(error: unknown): void;
80
124
  close(): Promise<void>;
81
- private updateProgress;
82
- private finishRemainingProgress;
83
- private shouldLogLine;
84
125
  /**
85
126
  * Prints the failure summary and the log's path to stderr, so a `--json`
86
127
  * command's stdout stays its JSON.
87
128
  */
88
129
  private showFailureSummary;
89
- private showLogFileLocation;
90
130
  }
91
131
  //#endregion
92
132
  //#region src/appSetup.d.ts
@@ -196,21 +236,79 @@ declare const banner: (version?: string) => string;
196
236
  declare const printBanner: (version?: string) => void;
197
237
  //#endregion
198
238
  //#region src/bundleSigning.d.ts
239
+ /** The secret `signing: secret("bundle-signing-key")` names, which `secrets issue` creates. */
240
+ declare const BUNDLE_SIGNING_KEY_SECRET = "bundle-signing-key";
241
+ /** The command that creates and stores a bundle signing key. */
242
+ declare const ISSUE_SIGNING_KEY_COMMAND = "npx hot-updater secrets issue bundle-signing-key";
243
+ /** The command that stores a bundle signing key you have. */
244
+ declare const PUT_SIGNING_KEY_COMMAND = "npx hot-updater secrets put bundle-signing-key <key.pem>";
245
+ /** The command that stores the bundle signing key you have as `name`. */
246
+ declare const bundleSigningPutCommand: (name: string) => string;
247
+ /** What deploy and doctor say when the config sets no `signing`. */
248
+ declare const UNSIGNED_BUNDLES_WARNING = "Bundles are unsigned.";
249
+ /** The next step after `UNSIGNED_BUNDLES_WARNING`. */
250
+ declare const UNSIGNED_BUNDLES_NEXT_STEP = "To sign them, run:";
251
+ /** What deploy and doctor say when `signing` is no shape it takes. */
252
+ declare const INVALID_SIGNING_MESSAGE = "signing takes secret(\"bundle-signing-key\").";
253
+ /** The next step after `INVALID_SIGNING_MESSAGE`. */
254
+ declare const INVALID_SIGNING_NEXT_STEP = "Store your key:";
255
+ /**
256
+ * The config's `signing`, read without reading any key:
257
+ * - `on`: signs, with the private key from a secret or a file. The
258
+ * shorthand `secret("<name>")` is `{ enabled: true, privateKey }`;
259
+ * - `off`: `{ enabled: false }`, which turns signing off on purpose;
260
+ * - `unsigned`: no `signing`, which deploy and doctor warn about;
261
+ * - `invalid`: any other value, such as a signing adapter of earlier
262
+ * releases, which deploy refuses rather than deploy unsigned.
263
+ */
264
+ type BundleSigningState = {
265
+ readonly status: "on";
266
+ readonly key: {
267
+ readonly secret: string;
268
+ } | {
269
+ readonly privateKeyPath: string;
270
+ };
271
+ } | {
272
+ readonly status: "off";
273
+ } | {
274
+ readonly status: "unsigned";
275
+ } | {
276
+ readonly status: "invalid";
277
+ readonly message: string;
278
+ };
279
+ declare const readBundleSigningState: (signing: unknown) => BundleSigningState;
280
+ /** The `secret()` the config's `signing` reads its private key from, if any. */
281
+ declare const bundleSigningSecretRef: (signing: unknown) => SecretRef | undefined;
282
+ /**
283
+ * A bundle signing failure whose message the CLI prints as it is: it names
284
+ * the secret and the next step, and quotes no key material.
285
+ */
286
+ declare class BundleSigningKeyError extends Error {
287
+ constructor(message: string, options?: ErrorOptions);
288
+ }
199
289
  interface BundleSigningSession {
200
- readonly name: string;
201
290
  readonly publicKey: string;
202
291
  readonly signFileHash: (fileHash: string) => Promise<string>;
203
292
  }
204
293
  declare const readBundleSigningPublicKeyFile: (publicKeyPath: string, options?: {
205
294
  readonly cwd?: string;
206
295
  }) => Promise<string>;
207
- declare const prepareBundleSigning: (signing: SigningConfig | undefined, options?: {
296
+ interface BundleSigningOptions {
208
297
  readonly cwd?: string;
209
- }) => Promise<BundleSigningSession | null>;
210
- /** Resolves the public identity of the configured bundle signer. */
211
- declare const getBundleSigningPublicKey: (signing: SigningConfig | undefined, options?: {
212
- readonly cwd?: string;
213
- }) => Promise<string | null>;
298
+ /** The config's `secrets` adapter; the configured one by default. */
299
+ readonly secrets?: SecretsAdapter;
300
+ }
301
+ /**
302
+ * Prepares the run's bundle signing: the public key the app must embed, and
303
+ * a signer of SHA-256 file hashes that signs each hash once. Null when
304
+ * `signing` is omitted or `{ enabled: false }`.
305
+ */
306
+ declare const prepareBundleSigning: (signing: unknown, options?: BundleSigningOptions) => Promise<BundleSigningSession | null>;
307
+ /**
308
+ * The public key of the configured bundle signing key, in SPKI PEM; null
309
+ * when `signing` signs nothing.
310
+ */
311
+ declare const getBundleSigningPublicKey: (signing: unknown, options?: BundleSigningOptions) => Promise<string | null>;
214
312
  //#endregion
215
313
  //#region src/ConfigBuilder.d.ts
216
314
  type BuildType = "bare" | "rock" | "expo";
@@ -364,8 +462,8 @@ declare const CREDENTIAL_ENV_NAMES: {
364
462
  //#endregion
365
463
  //#region src/credentialResolver.d.ts
366
464
  /**
367
- * The build credentials the CLI resolves by name. Deploy credentials reach
368
- * the config's adapters through `secretEnv`.
465
+ * The build credentials the CLI resolves by name. Adapter credentials are
466
+ * `secret()`s the adapters call.
369
467
  */
370
468
  interface Credentials {
371
469
  /** App Store Connect API key, for automatic signing and uploads. */
@@ -412,40 +510,52 @@ interface CredentialResolver {
412
510
  dispose(): Promise<void>;
413
511
  }
414
512
  /**
415
- * The sentence every "credential unavailable" message ends with: the
416
- * environment variables that provide `kind` whatever the secrets adapter.
513
+ * A command to print, broken at spaces with ` \` once a line would pass
514
+ * 74 columns, each continuation indented two spaces, so a terminal never
515
+ * wraps it mid-word and it still pastes as one command.
417
516
  */
418
- declare const credentialOverrideHint: (kind: CredentialKind) => string;
517
+ declare const formatCommand: (command: string) => string;
518
+ /** The credentials Hot Updater issues itself after a sign-in. */
519
+ type IssuedCredentialKind = "asc-api-key";
520
+ /** The credentials `secrets put <name> <file>` stores from one file. */
521
+ type FileCredentialKind = Exclude<CredentialKind, IssuedCredentialKind>;
419
522
  /**
420
- * The command that stores a credential of `kind` you have as `name` through
421
- * the config's `secrets` adapter, from its files.
523
+ * The command that stores the file you have as `name`: the service
524
+ * account's JSON key, or the app's upload keystore. `--kind` is named only
525
+ * for a name that is not the kind.
422
526
  */
423
- declare const credentialPutCommand: (kind: CredentialKind, name?: string) => string;
424
- /** The credentials Hot Updater issues itself after a sign-in. */
425
- type IssuedCredentialKind = Exclude<CredentialKind, "android-keystore">;
527
+ declare const credentialPutCommand: (kind: FileCredentialKind, name?: string) => string;
426
528
  /**
427
- * The command that signs in once, at a terminal, and stores the key Hot
428
- * Updater issues as `name`: an App Store Connect API key after an Apple
429
- * Account sign-in, a Play service account after a Google one.
529
+ * The command that stores the key Hot Updater issues as `name`: an App
530
+ * Store Connect API key after an Apple Account sign-in, and an upload
531
+ * keystore it creates.
430
532
  */
431
- declare const credentialIssueCommand: (kind: IssuedCredentialKind, name?: string) => string;
533
+ declare const credentialIssueCommand: (kind: CredentialKind, name?: string) => string;
432
534
  /** The command group of each issued kind's shortcut, `<group> login`. */
433
535
  declare const CREDENTIAL_LOGIN_GROUPS: {
434
536
  readonly "asc-api-key": "apple";
435
- readonly "play-service-account": "google-play";
436
537
  };
437
538
  /**
438
539
  * The command people meet first that issues `kind` as `name`: its shortcut,
439
- * `apple login` for an App Store Connect API key or `google-play login`
440
- * for a Play service account, which takes nothing and stores the kind's
441
- * own name; for another name, `credentialIssueCommand`.
540
+ * `apple login` for an App Store Connect API key, which takes nothing and
541
+ * stores the kind's own name; for another name, `credentialIssueCommand`.
442
542
  */
443
543
  declare const credentialLoginCommand: (kind: IssuedCredentialKind, name?: string) => string;
444
544
  /**
445
545
  * The command that stores a missing credential of `kind` as `name`: the
446
- * keystore you have, or the key Hot Updater issues after a sign-in.
546
+ * key Hot Updater issues after an Apple sign-in, or the file you have.
447
547
  */
448
548
  declare const credentialStoreCommand: (kind: CredentialKind, name?: string) => string;
549
+ /**
550
+ * Why `secrets` has no `name`, and the command that brings the existing
551
+ * one in, never one that creates another: a signing key may already be
552
+ * trusted by a shipped app or a store. Under a team's adapter the name or
553
+ * the access is wrong; under `localSecrets()` this machine lacks it.
554
+ */
555
+ declare const describeMissingSecret: (secrets: SecretsAdapter, name: string, { action, command }: {
556
+ action?: string;
557
+ command: string;
558
+ }) => string;
449
559
  declare class CredentialUnavailableError extends Error {
450
560
  readonly kind: CredentialKind;
451
561
  /** The environment variables that can provide this credential. */
@@ -581,6 +691,14 @@ declare const createHotUpdaterConfigScaffoldFromBuilder: (builder: ConfigBuilder
581
691
  * existing config with the scaffold's build, storage, database, plugins, and
582
692
  * helpers merged in, keeping the project's own settings.
583
693
  */
694
+ /**
695
+ * Whether `hot-updater.config.ts` in `cwd` sets a team `secrets` adapter,
696
+ * read from its text: a `secrets` property other than `localSecrets(...)`,
697
+ * or a config whose shape init can't read. False without the file. Init
698
+ * reads the store through the loaded config, so one that sets a store but
699
+ * doesn't load must be fixed first.
700
+ */
701
+ declare const configSetsTeamSecrets: (cwd: string) => Promise<boolean>;
584
702
  declare const writeHotUpdaterConfig: (scaffold: HotUpdaterConfigScaffold, filePath?: string) => Promise<WriteHotUpdaterConfigResult>;
585
703
  /**
586
704
  * Writes hot-updater.config.ts and says what it did. `settings` names the
@@ -593,6 +711,30 @@ declare const writeHotUpdaterFiles: (scaffold: HotUpdaterConfigScaffold, { cwd,
593
711
  }) => Promise<{
594
712
  readonly config: WriteHotUpdaterConfigResult;
595
713
  }>;
714
+ /** What `addSigningSecretToConfigText` did. */
715
+ type AddSigningSecretResult = {
716
+ readonly status: "added";
717
+ readonly text: string;
718
+ } |
719
+ /** The config already sets `signing`, which stays as it is. */
720
+ {
721
+ readonly status: "kept";
722
+ } |
723
+ /** The file is no `export default defineConfig({ ... })` it can edit. */
724
+ {
725
+ readonly status: "unsupported";
726
+ };
727
+ /**
728
+ * The config text with `signing: secret("<name>")` added, and `secret` in
729
+ * its `hot-updater` import, once. A config that sets `signing` in any form,
730
+ * such as 1.1's `{ enabled: true, privateKeyPath }`, is kept.
731
+ */
732
+ declare const addSigningSecretToConfigText: (text: string, name: string) => AddSigningSecretResult;
733
+ /**
734
+ * Adds `signing: secret("<name>")` to `hot-updater.config.ts` in `cwd`, as
735
+ * `addSigningSecretToConfigText` does. Without the file, nothing is written.
736
+ */
737
+ declare const addSigningSecretToConfig: (cwd: string, name: string) => Promise<AddSigningSecretResult["status"] | "missing">;
596
738
  //#endregion
597
739
  //#region src/hotUpdaterEnv.d.ts
598
740
  type HotUpdaterInitEnv = {
@@ -601,7 +743,12 @@ type HotUpdaterInitEnv = {
601
743
  readonly managedEnv: Readonly<Record<string, string>>;
602
744
  };
603
745
  declare const getHotUpdaterInitInputEnv: ({ env, managedEnv }: HotUpdaterInitEnv, nonInteractive: boolean) => Readonly<Record<string, string>>;
604
- declare const readHotUpdaterInitEnv: (cwd: string, envFile?: string) => Promise<HotUpdaterInitEnv>;
746
+ /**
747
+ * Init's inputs: `.env.hotupdater` (`managedEnv`), with `envFile`'s over
748
+ * it (`env`). `secretsEnv`, the credentials init read from a team secrets
749
+ * store, sits under both, as values the file would hold.
750
+ */
751
+ declare const readHotUpdaterInitEnv: (cwd: string, envFile?: string, secretsEnv?: Readonly<Record<string, string>>) => Promise<HotUpdaterInitEnv>;
605
752
  declare const getHotUpdaterEnvValue: (env: Readonly<Record<string, string>>, key: string) => string | undefined;
606
753
  /**
607
754
  * An env file's variables as `process.loadEnvFile` sets them, the way
@@ -611,6 +758,11 @@ declare const getHotUpdaterEnvValue: (env: Readonly<Record<string, string>>, key
611
758
  declare const parseLoadedEnv: (content: string) => Readonly<Record<string, string>>;
612
759
  /** `cwd`'s `.env.hotupdater` as the config loads it; empty when there is none. */
613
760
  declare const readLoadedHotUpdaterEnv: (cwd: string) => Promise<Readonly<Record<string, string>>>;
761
+ /**
762
+ * `file`, an env file a command was given, relative to `cwd`, as
763
+ * `parseLoadedEnv` reads it; a file that can't be read is refused by name.
764
+ */
765
+ declare const readLoadedEnvFile: (file: string, cwd: string) => Promise<Readonly<Record<string, string>>>;
614
766
  //#endregion
615
767
  //#region src/HotUpdateDirUtil.d.ts
616
768
  declare const HotUpdateDirUtil: {
@@ -673,6 +825,13 @@ type InitProviderInputsDefinition = Readonly<Record<string, InitProviderInputDef
673
825
  type InitProviderDefinition<TInputs extends InitProviderInputsDefinition = InitProviderInputsDefinition> = {
674
826
  readonly inputs: TInputs;
675
827
  readonly label: string;
828
+ /**
829
+ * The variables of the credentials the config init writes reads with
830
+ * `secret()`, such as an API token. With a team `secrets` adapter, init
831
+ * stores them there with the app's API key, and reads one the
832
+ * environment and the env file lack from it.
833
+ */
834
+ readonly secrets?: readonly string[];
676
835
  };
677
836
  declare const defineInitProvider: <const TInputs extends InitProviderInputsDefinition>(provider: InitProviderDefinition<TInputs>) => InitProviderDefinition<TInputs>;
678
837
  declare const shouldAutoSelectOnlyInitResource: ({ availableResourceCount, savedIdentifier }: {
@@ -711,6 +870,12 @@ declare const getInitProviderEnvVars: <TInputs extends InitProviderInputsDefinit
711
870
  type RunInitOptions = {
712
871
  readonly build: BuildType;
713
872
  readonly envFile?: string;
873
+ /**
874
+ * Credentials the environment and the env files lack, read from the
875
+ * config's team `secrets` adapter (`InitProviderDefinition.secrets`):
876
+ * init reads them as if `.env.hotupdater` held them.
877
+ */
878
+ readonly secretsEnv?: Readonly<Record<string, string>>;
714
879
  };
715
880
  declare class InitError extends Error {
716
881
  readonly name: string;
@@ -879,6 +1044,8 @@ declare const reactNativeCliFingerprint: (cwd: string, options: NativeFingerprin
879
1044
  type HotUpdaterLogWriter = {
880
1045
  logFilePath: string | null;
881
1046
  writeStream: (input: Readable) => Promise<void>;
1047
+ /** Writes lines of its own, such as the command a build runs. */
1048
+ writeLines: (lines: readonly string[]) => void;
882
1049
  writeError: (error: unknown) => void;
883
1050
  close: () => Promise<void>;
884
1051
  };
@@ -888,17 +1055,6 @@ declare const createLogWriter: ({ prefix, logFilePath }: {
888
1055
  logFilePath?: string;
889
1056
  }) => Promise<HotUpdaterLogWriter>;
890
1057
  //#endregion
891
- //#region src/localBundleSigning.d.ts
892
- /** The secret `keys generate --secret` stores the private key as by default. */
893
- declare const DEFAULT_SIGNING_KEY_SECRET = "bundle-signing-key";
894
- /** Local signing enabled, with its private key from a file or a secret. */
895
- type EnabledLocalSigningConfig = Extract<LocalSigningConfig, {
896
- enabled: true;
897
- }>;
898
- declare const normalizeSigningConfig: (signing: SigningConfig | undefined, { secrets }?: {
899
- readonly secrets?: SecretsAdapter;
900
- }) => BundleSigningAdapter | EnabledLocalSigningConfig | undefined;
901
- //#endregion
902
1058
  //#region src/loadConfig.d.ts
903
1059
  type HotUpdaterConfigOptions = {
904
1060
  platform: Platform;
@@ -911,11 +1067,16 @@ type ConfigResponse = RequiredDeep<Omit<ConfigInput, "database" | "storage" | "p
911
1067
  storage?: StorageAdapter;
912
1068
  /** The plugins the server runs; none when the config lists none. */
913
1069
  plugins: readonly AnyHotUpdaterPlugin[];
914
- signing?: ReturnType<typeof normalizeSigningConfig>;
915
1070
  /**
916
- * Where `secret:` references and issued keys are read and stored: the
917
- * config's adapter with `localSecrets()`'s store after it (`withLocalKeyStore`),
918
- * or `localSecrets()` when it sets none.
1071
+ * As the config sets it, read only when a command signs: deploy refuses a
1072
+ * value it doesn't take (`readBundleSigningState`), and other commands,
1073
+ * such as the `secrets put` that fixes it, still load the config.
1074
+ */
1075
+ signing?: SigningConfig;
1076
+ /**
1077
+ * Where `secret()` references and issued keys are read and stored: the
1078
+ * config's adapter alone, or `localSecrets()` when it sets none
1079
+ * (`resolveSecretsAdapter`).
919
1080
  */
920
1081
  secrets: SecretsAdapter;
921
1082
  };
@@ -932,6 +1093,13 @@ declare const loadPlatformConfigs: <TPlatform extends Platform>(platforms: reado
932
1093
  readonly platform: TPlatform;
933
1094
  readonly config: ConfigResponse;
934
1095
  }[]>;
1096
+ /**
1097
+ * The names the config's `secret()`s reference for its adapters, such as
1098
+ * `HOT_UPDATER_CLOUDFLARE_API_TOKEN`, in the order the config created
1099
+ * them: every name but those of build credentials, which `doctor` lists
1100
+ * by field.
1101
+ */
1102
+ declare const getDeploySecretNames: (config: ConfigResponse) => readonly string[];
935
1103
  //#endregion
936
1104
  //#region src/serverDefinition.d.ts
937
1105
  /** A plugin's endpoint on a server's `handlers.client`. */
@@ -1051,6 +1219,17 @@ declare const makeEnv: (newEnvVars: Record<string, EnvVarValue>, filePath?: stri
1051
1219
  readonly expectedContent?: string;
1052
1220
  }) => Promise<string>;
1053
1221
  //#endregion
1222
+ //#region src/messageLines.d.ts
1223
+ /** The widest line of a message the CLI prints, inside its 80-column frame. */
1224
+ declare const MESSAGE_WIDTH = 76;
1225
+ /**
1226
+ * A message of `lines`, each at most `MESSAGE_WIDTH` columns, broken at
1227
+ * spaces, so a name, a path, or a list it embeds never widens a line. A
1228
+ * word longer than a line, such as a URL or a path, gets a line of its
1229
+ * own. Lines that fit, such as an indented command, stay as they are.
1230
+ */
1231
+ declare const fitMessage: (lines: readonly string[]) => string;
1232
+ //#endregion
1054
1233
  //#region src/minBundleId.d.ts
1055
1234
  /**
1056
1235
  * The MIN_BUNDLE_ID a native build compiles in, which is also the ID of its
@@ -2298,7 +2477,7 @@ declare const readPackageUp: <T = unknown>(cwd: string) => Promise<ReadPackageUp
2298
2477
  * interpreter reads (`NODE_*` but `NODE_ENV`, `PATH`, `LD_*`, `DYLD_*`,
2299
2478
  * `BASH_ENV`, `ENV`, `GIT_*`, `npm_config_*`, the JVM's, Gradle's, Ruby's,
2300
2479
  * Python's, and Perl's options), or one Hot Updater reads its credentials
2301
- * from. `secretEnv` refuses these names, and so does every environment the
2480
+ * from. `secret()` refuses these names, and so does every environment the
2302
2481
  * CLI gives a child process from resolved secrets.
2303
2482
  */
2304
2483
  declare const isReservedVariableName: (name: string) => boolean;
@@ -2388,14 +2567,16 @@ declare const readLocalKey: (name: string, cwd: string) => Promise<string | unde
2388
2567
  declare const writeLocalKey: (name: string, value: string, cwd: string) => Promise<string>;
2389
2568
  //#endregion
2390
2569
  //#region src/secrets.d.ts
2391
- /** Whether `name` is a secret's name, as `secret:<name>` takes one. */
2570
+ /** Whether `name` is a secret's name, as `secret("<name>")` takes one. */
2392
2571
  declare const isSecretName: (name: string) => boolean;
2572
+ /** Whether `value` is a `secret("<name>")` reference. */
2573
+ declare const isSecretRef: (value: unknown) => value is SecretRef;
2393
2574
  /**
2394
- * The secret name a config's `secret:<name>` reference names, such as
2395
- * `release-keystore` for `"secret:release-keystore"`. `field` is the config
2396
- * field the reference is in, which the error names.
2575
+ * The secret name a config's `secret("<name>")` names, such as
2576
+ * `release-keystore` for `secret("release-keystore")`. `field` is the
2577
+ * config field it is in, which the error names.
2397
2578
  */
2398
- declare const parseSecretReference: (reference: string, field: string) => string;
2579
+ declare const parseSecretReference: (reference: unknown, field: string) => string;
2399
2580
  /**
2400
2581
  * The environment variable the default store reads a secret from: a name
2401
2582
  * that is a variable name already, such as `CLOUDFLARE_API_TOKEN`, as it
@@ -2415,9 +2596,9 @@ declare const LOCAL_SECRETS_NAME = "localSecrets";
2415
2596
  * `~/.hot-updater/secrets/<project-key>/<name>.json`; `set` writes that
2416
2597
  * file, 0600 in a 0700 directory, outside the project, so it survives
2417
2598
  * `node_modules` and is never committed. `HOT_UPDATER_HOME` moves
2418
- * `~/.hot-updater`. The project key is the same for every clone of one app
2419
- * on a machine (its `origin` remote and its directory in the repository),
2420
- * so another machine signs in and issues a key of its own.
2599
+ * `~/.hot-updater`. The project key hashes the checkout's real path
2600
+ * (`getProjectKey`), so each clone of an app has its own directory, and
2601
+ * another clone or machine signs in and issues a key of its own.
2421
2602
  *
2422
2603
  * @example
2423
2604
  * export default defineConfig({ secrets: localSecrets(), ... });
@@ -2429,38 +2610,43 @@ interface LocalSecretsOptions {
2429
2610
  * each, such as `~/.hot-updater/secrets/my-app`: `~` is the home
2430
2611
  * directory, and a relative path is the project's. A directory in a git
2431
2612
  * work tree must be one git ignores. Defaults to
2432
- * `~/.hot-updater/secrets/<project-key>`, whose key is the same for every
2433
- * clone of the app on a machine (`getProjectKey`).
2613
+ * `~/.hot-updater/secrets/<project-key>`, whose key hashes the
2614
+ * checkout's real path, one per clone (`getProjectKey`).
2434
2615
  */
2435
2616
  readonly path?: string;
2436
2617
  }
2437
2618
  /**
2438
- * The config's `secrets` adapter with `localSecrets()`'s store after it:
2439
- * `get` reads each name the adapter does not hold from
2440
- * `~/.hot-updater/secrets/<project-key>/<name>.json`, and `set` stores there
2441
- * when the adapter stores nothing. Without an adapter, it is
2442
- * `localSecrets()` itself. Keys Hot Updater issues, and credentials
2443
- * `secrets put` imports, are reused by the next build on this machine with
2444
- * no step in between.
2619
+ * The `secrets` adapter a config load uses: the config's own adapter as it
2620
+ * is, with no store on this machine under it, or `localSecrets()` when the
2621
+ * config sets none.
2445
2622
  */
2446
- declare const withLocalKeyStore: (configured?: SecretsAdapter) => SecretsAdapter;
2623
+ declare const resolveSecretsAdapter: (configured?: SecretsAdapter) => SecretsAdapter;
2447
2624
  /**
2448
- * The `localSecrets()` store `secrets` reads after its adapter, and stores
2449
- * in when the adapter stores nothing: `localSecrets({ path })`'s, else the
2450
- * default one.
2625
+ * `localSecrets()`'s store, for `localSecrets()` itself; undefined for any
2626
+ * other adapter, which keeps nothing on this machine.
2451
2627
  */
2452
- declare const getLocalSecretsStore: (secrets: SecretsAdapter) => LocalSecretsStore;
2628
+ declare const getLocalSecretsStore: (secrets: SecretsAdapter) => LocalSecretsStore | undefined;
2453
2629
  /**
2454
- * The config's own `secrets` adapter, without `localSecrets()`'s store
2455
- * after it: undefined for `localSecrets()`, and when the config sets none.
2456
- * `secretEnv` reads deploy credentials from it.
2630
+ * The config's own `secrets` adapter: undefined for `localSecrets()`,
2631
+ * which is the adapter when the config sets none. A called `secret()` reads
2632
+ * from it.
2457
2633
  */
2458
2634
  declare const getConfiguredAdapter: (secrets: SecretsAdapter) => SecretsAdapter | undefined;
2459
2635
  /**
2460
- * Where `secrets.set` stores `name`, for messages: the config's adapter
2461
- * when it stores values, else `localSecrets()`'s file.
2636
+ * Where `secrets.set` stores `name`, for messages: the config's adapter,
2637
+ * else `localSecrets()`'s file.
2462
2638
  */
2463
2639
  declare const describeStoredSecret: (secrets: SecretsAdapter, name: string) => string;
2640
+ /**
2641
+ * `name`'s value, read in the order `secrets.get` reads it, with the one
2642
+ * place it came from, for messages: the config's adapter
2643
+ * (`describeSecret`), the environment variable `localSecrets()` reads
2644
+ * first, or `localSecrets()`'s file. Undefined when nothing holds it.
2645
+ */
2646
+ declare const readSecretWithSource: (secrets: SecretsAdapter, name: string, cwd: string) => Promise<{
2647
+ readonly value: string;
2648
+ readonly source: string;
2649
+ } | undefined>;
2464
2650
  /**
2465
2651
  * Whether a key `secrets` stores stays on this machine: it is `localSecrets()`,
2466
2652
  * whose files no other machine reads.
@@ -2468,56 +2654,174 @@ declare const describeStoredSecret: (secrets: SecretsAdapter, name: string) => s
2468
2654
  declare const keepsKeysOnThisMachine: (secrets: SecretsAdapter) => boolean;
2469
2655
  /**
2470
2656
  * The `secrets` adapter of one config load, filled once the config it
2471
- * evaluates resolves: each `secretEnv` the evaluation creates reads from it.
2657
+ * evaluates resolves: each `secret()` the evaluation creates reads from it,
2658
+ * and adds its name to `names`.
2472
2659
  */
2473
2660
  interface SecretsScope {
2474
2661
  secrets?: SecretsAdapter;
2662
+ names?: Set<string>;
2663
+ /**
2664
+ * The names build credentials reference, such as `signing.keystore`'s,
2665
+ * which the CLI reads for their kind: the batched read leaves them out.
2666
+ */
2667
+ buildNames?: Set<string>;
2668
+ /** The one read of the scope's other names, once a `secret()` is called. */
2669
+ read?: Promise<Readonly<Record<string, string | undefined>>>;
2475
2670
  }
2476
2671
  /**
2477
2672
  * Evaluates a config, the file or a config function, with `scope` as the
2478
- * scope of every `secretEnv` it creates, so each reads the `secrets` of the
2673
+ * scope of every `secret()` it creates, so each reads the `secrets` of the
2479
2674
  * config that created it, whatever config loads after. It is kept on
2480
2675
  * `globalThis`: the config file loads its own copy of Hot Updater's modules.
2481
2676
  */
2482
2677
  declare const withSecretsScope: <T>(scope: SecretsScope, evaluate: () => Promise<T> | T) => Promise<T>;
2483
2678
  /**
2484
2679
  * Makes `secrets` the adapter a credential resolver reads from by default,
2485
- * and a `secretEnv` created outside any config load, as `loadConfig` does
2680
+ * and a `secret()` created outside any config load, as `loadConfig` does
2486
2681
  * with the config's. It is kept on `globalThis`: the config file loads Hot
2487
2682
  * Updater's modules again, as its own copies.
2488
2683
  */
2489
2684
  declare const setConfiguredSecrets: (secrets: SecretsAdapter) => void;
2490
2685
  /**
2491
- * The config's `secrets` adapter with `localSecrets()`'s store after it
2492
- * (`withLocalKeyStore`), `localSecrets()` until a config loads.
2686
+ * The config's `secrets` adapter (`resolveSecretsAdapter`), `localSecrets()`
2687
+ * until a config loads.
2493
2688
  */
2494
2689
  declare const getConfiguredSecrets: () => SecretsAdapter;
2690
+ /**
2691
+ * `names` from `secrets` in one `get`. A read that fails names the secrets
2692
+ * and the adapter, with the adapter's own error on the next line, such as
2693
+ * `EACCES: permission denied, open '<file>'`.
2694
+ */
2695
+ declare const readSecrets: (secrets: SecretsAdapter, names: readonly string[], cwd: string) => Promise<Readonly<Record<string, string | undefined>>>;
2495
2696
  /** Where an adapter keeps `name`, for messages. */
2496
2697
  declare const describeSecret: (secrets: SecretsAdapter, name: string) => string;
2497
2698
  /**
2498
- * Environment variables from the `secrets` adapter of the config that
2499
- * creates it, as a function a config calls when an adapter needs them, so loading
2500
- * `hot-updater.config.ts` reads no secret. Each name set in the environment
2501
- * or `.env.hotupdater` wins; the others are read from the config's
2502
- * `secrets` adapter in one call, and without one they must be set. The values go only to the caller: they are never set in
2503
- * `process.env`, and are masked in the CLI's logs. Names a loader or
2504
- * interpreter reads, such as `NODE_OPTIONS`, are refused.
2699
+ * `secret("<name>")`: the secret `name` in `hot-updater.config.ts`, for a
2700
+ * build credential, such as `signing.keystore`, or any adapter credential,
2701
+ * which calls it on first use, so loading the config reads no secret.
2702
+ * Called, it reads `name`'s variable (`secretVariableName`) in the
2703
+ * environment or `.env.hotupdater`, else the config's `secrets` adapter:
2704
+ * the first call reads every name the config's `secret()`s reference and
2705
+ * the environment doesn't set, in one `get`. With `localSecrets()`, the
2706
+ * variable must be set: its files hold only the keys Hot Updater stores.
2707
+ * Values are masked in the CLI's logs and never set in `process.env`.
2708
+ * Names a loader or interpreter reads, such as `NODE_OPTIONS`, are refused.
2709
+ * A server passes its own environment's values instead.
2505
2710
  *
2506
2711
  * @example
2507
- * const deploy = secretEnv(["S3_ACCESS_KEY_ID", "S3_SECRET_ACCESS_KEY"]);
2508
- * s3Storage({
2712
+ * r2Storage({
2509
2713
  * bucketName: "bundles",
2510
- * region: "us-east-1",
2511
- * credentials: async () => {
2512
- * const env = await deploy();
2513
- * return {
2514
- * accessKeyId: env.S3_ACCESS_KEY_ID,
2515
- * secretAccessKey: env.S3_SECRET_ACCESS_KEY,
2516
- * };
2714
+ * accountId: "<account-id>",
2715
+ * credentials: {
2716
+ * accessKeyId: secret("HOT_UPDATER_CLOUDFLARE_R2_ACCESS_KEY_ID"),
2717
+ * secretAccessKey: secret("HOT_UPDATER_CLOUDFLARE_R2_SECRET_ACCESS_KEY"),
2517
2718
  * },
2518
2719
  * });
2519
2720
  */
2520
- declare const secretEnv: <const TName extends string>(names: readonly TName[]) => (() => Promise<Readonly<Record<TName, string>>>);
2721
+ declare const secret: (name: string) => SecretRef;
2722
+ //#endregion
2723
+ //#region src/step.d.ts
2724
+ type Output = Writable & {
2725
+ isTTY?: boolean;
2726
+ columns?: number;
2727
+ };
2728
+ /** `4.2s`, `38s`, `6m41s`, `1h02m`. */
2729
+ declare const formatDuration: (ms: number) => string;
2730
+ /**
2731
+ * `message` with `duration` at the right edge of a step's line, the message
2732
+ * cut with `…` when the line would be wider.
2733
+ */
2734
+ declare const withDuration: (message: string, ms: number, width?: number) => string;
2735
+ /** `text` cut to `width` visible columns, with `…` for the rest. */
2736
+ declare const truncateLine: (text: string, width: number) => string;
2737
+ /** How a finished step's line is marked. */
2738
+ type StepLevel = "step" | "info" | "warn";
2739
+ /**
2740
+ * A step of a command that takes a while, shown as one line: at a terminal,
2741
+ * a spinner whose line shows the step's current detail and its elapsed
2742
+ * time, which ends as the step's line with its duration; elsewhere, such as
2743
+ * in CI, only that last line.
2744
+ *
2745
+ * While it runs, what other code prints through `p` is held: a spinner's
2746
+ * messages become the step's detail, and logs print after the step's line,
2747
+ * but an error ends the step as failed first and prints at once, since the
2748
+ * process may exit right after it.
2749
+ */
2750
+ interface Step {
2751
+ /** Starts the step, once: nothing shows before. */
2752
+ start(): Step;
2753
+ /** Shows `detail` after the title on the live line, or the title alone. */
2754
+ update(detail?: string): void;
2755
+ /**
2756
+ * Ends the step with `message`, the title by default, and its duration,
2757
+ * marked as a finished step or with `level`.
2758
+ */
2759
+ succeed(message?: string, options?: {
2760
+ level?: StepLevel;
2761
+ }): void;
2762
+ /** Ends the step as failed, with `message` or `<title> failed`. */
2763
+ fail(message?: string): void;
2764
+ /** Milliseconds since it started, or 0 before. */
2765
+ readonly elapsedMs: number;
2766
+ /** Whether it started and has not ended. */
2767
+ readonly active: boolean;
2768
+ }
2769
+ interface StepOptions {
2770
+ output?: Output;
2771
+ }
2772
+ /**
2773
+ * A step that shows nothing until `start()`. A step created while another
2774
+ * runs is part of it: its title and detail become the running step's detail,
2775
+ * and its failure fails the running step.
2776
+ */
2777
+ declare const createStep: (title: string, { output }?: StepOptions) => Step;
2778
+ /**
2779
+ * Ends the running step as failed, if one runs, before a command prints
2780
+ * its error.
2781
+ */
2782
+ declare const failActiveStep: () => void;
2783
+ /** A step, started. */
2784
+ declare const startStep: (title: string, options?: StepOptions) => Step;
2785
+ /**
2786
+ * Runs `run` as a step titled `title`, which ends with `done(result)`, or as
2787
+ * failed when `run` throws.
2788
+ */
2789
+ declare const withStep: <T>(title: string, run: (step: Step) => Promise<T>, done?: (result: T) => string, options?: StepOptions) => Promise<T>;
2790
+ //#endregion
2791
+ //#region src/teamSecrets.d.ts
2792
+ /**
2793
+ * The client API key the managed servers' `apiKeys()` gives an app, which
2794
+ * init saves (`API_KEY_ENV` in `@hot-updater/plugin-api-keys`). The config
2795
+ * never reads it; a team store shares it with the deploy credentials, so a
2796
+ * teammate's init registers the same key again rather than a new one.
2797
+ */
2798
+ declare const MANAGED_CLIENT_CREDENTIAL_ENV = "HOT_UPDATER_API_KEY";
2799
+ /**
2800
+ * The config's own `secrets` adapter, the team store: undefined when the
2801
+ * config sets none, which is `localSecrets()`. Loading the config runs its
2802
+ * `process.loadEnvFile(".env.hotupdater")`, which init must not see, so
2803
+ * `process.env` is restored after it.
2804
+ */
2805
+ declare const loadTeamSecrets: () => Promise<SecretsAdapter | undefined>;
2806
+ /**
2807
+ * `names` neither the environment nor `env`, init's env files, sets, read
2808
+ * from `secrets` in one call: the values a teammate's init, or a run after
2809
+ * the file's lines were deleted, replays with.
2810
+ */
2811
+ declare const readMissingFromTeamSecrets: (secrets: SecretsAdapter, names: readonly string[], { env, cwd }: {
2812
+ readonly env: Readonly<Record<string, string>>;
2813
+ readonly cwd: string;
2814
+ }) => Promise<Readonly<Record<string, string>>>;
2815
+ /**
2816
+ * Stores each of `names` that `envFile`, `.env.hotupdater` by default,
2817
+ * holds through `secrets`, then reads them back in one call. Only the file
2818
+ * is read, never the environment. The file is left as it is. Returns the
2819
+ * names stored, in the order of `names`; throws when the adapter reads
2820
+ * back another value.
2821
+ */
2822
+ declare const storeEnvFileSecrets: (secrets: SecretsAdapter, names: readonly string[], cwd: string,
2823
+ /** An env file to read instead of `.env.hotupdater`, relative to `cwd`. */
2824
+ envFile?: string) => Promise<readonly string[]>;
2521
2825
  //#endregion
2522
2826
  //#region src/storageFiles.d.ts
2523
2827
  declare const getStorageFileByteSize: (filePath: string) => Promise<number>;
@@ -2542,4 +2846,4 @@ type TransformTemplateArgs<T extends string> = { [Key in ExtractPlaceholders<T>]
2542
2846
  */
2543
2847
  declare function transformTemplate<T extends string>(templateString: T, values: TransformTemplateArgs<T>): string;
2544
2848
  //#endregion
2545
- export { AppClientCredential, AppClientPlugin, AssembleServerOptions, AssembledServer, BuildFailedError, BuildFailureSummaryConfig, BuildLogger, BuildLoggerConfig, BuildType, BundleSigningSession, CREDENTIAL_ENV_NAMES, CREDENTIAL_LOGIN_GROUPS, ClientAuthSpec, ClientCredentialSpec, ConfigBuilder, ConfigBuilderScaffold, ConfigResponse, CreateCredentialResolverOptions, CreateHotUpdaterConfigScaffoldFromBuilderOptions, CreateHotUpdaterConfigScaffoldOptions, type CredentialFiles, CredentialKind, CredentialRequest, CredentialResolver, CredentialUnavailableError, Credentials, DEFAULT_SIGNING_KEY_SECRET, HOT_UPDATER_HOME_ENV, HOT_UPDATER_SERVER_PACKAGE_VERSION_ENV, HotUpdateDirUtil, HotUpdaterConfigOptions, HotUpdaterConfigScaffold, HotUpdaterInitEnv, HotUpdaterLogWriter, INTERFACE_FINGERPRINT_ENGINE, ImportInfo, InitEnvFileError, InitError, InitProviderDefinition, InitProviderInputDefinition, InitProviderInputPersistence, IssuedCredentialKind, LOCAL_SECRETS_NAME, LegacyInfrastructureError, LocalSecretsOptions, LocalSecretsStore, ManagedHelperStatement, ManagedHelperStrategy, MissingInitInputsError, NativeDependency, NativeInterface, PromptProgress, PromptSpinner, ProviderConfig, ProvisionedClientCredential, ReactNativeMetadata, ReadPackageUpResult, RunInitOptions, SecretsScope, ServerClientEndpoint, ServerDefinition, ServerDefinitionError, WriteHotUpdaterConfigResult, assembleServer, assertInfrastructureGenerationAtUrl, assertInfrastructureGenerationPayload, assertInitInputs, assertInitProviderInputs, assertUnreservedEnv, autolinkingConfigCommand, banner, clientAuthOf, typedColors as colors, confirmInitInputPersistence, copyDirToTmp, createCredentialResolver, createHotUpdaterConfigScaffold, createHotUpdaterConfigScaffoldFromBuilder, createInterfaceFingerprint, createLocalSecretsStore, createLogWriter, createMigrator, createMinBundleId, createTarBrTargetFiles, createZip, credentialIssueCommand, credentialLoginCommand, credentialOverrideHint, credentialPutCommand, credentialStoreCommand, decryptJson, defineInitProvider, describeSecret, describeStoredSecret, encryptJson, ensureInstallPackages, generateClientCredential, generateSchema, generatesSchema, getAndroidSdkPath, getBundleSigningPublicKey, getConfiguredAdapter, getConfiguredSecrets, getCwd, getHotUpdaterEnvValue, getHotUpdaterHome, getHotUpdaterInitInputEnv, getInitProviderEnvVars, getInitProviderTextPromptValues, getLocalKeyFile, getLocalKeyStoreDir, getLocalSecretsStore, getMissingInitInputs, getMissingInitProviderInputs, getPackageManager, getProjectKey, getReactNativeMetadatas, getStorageFileByteSize, isCI, isCodegenSpecFile, isReservedVariableName, isSecretName, isServerDefinition, keepsKeysOnThisMachine, link, loadConfig, loadPlatformConfigs, localSecrets, log, makeEnv, maskSecretValues, moduleSpecifiersOf, nonInteractiveReason, p, parseLoadedEnv, parseSecretReference, prepareBundleSigning, printAppSetup, printBanner, provisionClientCredential, putStorageFile, reactNativeCliFingerprint, reactNativeConfigCommand, readBundleSigningPublicKeyFile, readHotUpdaterInitEnv, readLoadedHotUpdaterEnv, readLocalKey, readPackageUp, readReactNativeInterface, readSecretVariables, registerCredentialValue, registerSecretValue, renderAppImports, renderAppSetup, renderImportStatements, resolveExpoAutolinking, resolveHotUpdaterServerVersion, resolveInitProviderInput, resolveInitProviderInputs, resolveLocalSecretsPath, resolvePackageVersion, secretEnv, secretVariableName, serverDefinitionOf, setConfiguredSecrets, shouldAutoSelectOnlyInitResource, stripAnsi, transformEnv, transformTemplate, withCredentialResolver, withLocalKeyStore, withSecretsScope, writeHotUpdaterConfig, writeHotUpdaterFiles, writeLocalKey };
2849
+ export { AddSigningSecretResult, AppClientCredential, AppClientPlugin, AssembleServerOptions, AssembledServer, BUNDLE_SIGNING_KEY_SECRET, BuildFailedError, BuildFailureSummaryConfig, BuildLogger, BuildLoggerConfig, BuildPhaseReader, BuildType, BundleSigningKeyError, BundleSigningOptions, BundleSigningSession, BundleSigningState, CREDENTIAL_ENV_NAMES, CREDENTIAL_LOGIN_GROUPS, ClientAuthSpec, ClientCredentialSpec, ConfigBuilder, ConfigBuilderScaffold, ConfigResponse, CreateCredentialResolverOptions, CreateHotUpdaterConfigScaffoldFromBuilderOptions, CreateHotUpdaterConfigScaffoldOptions, type CredentialFiles, CredentialKind, CredentialRequest, CredentialResolver, CredentialUnavailableError, Credentials, FileCredentialKind, HOT_UPDATER_HOME_ENV, HOT_UPDATER_SERVER_PACKAGE_VERSION_ENV, HotUpdateDirUtil, HotUpdaterConfigOptions, HotUpdaterConfigScaffold, HotUpdaterInitEnv, HotUpdaterLogWriter, INTERFACE_FINGERPRINT_ENGINE, INVALID_SIGNING_MESSAGE, INVALID_SIGNING_NEXT_STEP, ISSUE_SIGNING_KEY_COMMAND, ImportInfo, InitEnvFileError, InitError, InitProviderDefinition, InitProviderInputDefinition, InitProviderInputPersistence, IssuedCredentialKind, LOCAL_SECRETS_NAME, LegacyInfrastructureError, LocalSecretsOptions, LocalSecretsStore, MANAGED_CLIENT_CREDENTIAL_ENV, MESSAGE_WIDTH, ManagedHelperStatement, ManagedHelperStrategy, MissingInitInputsError, NativeDependency, NativeInterface, PUT_SIGNING_KEY_COMMAND, PromptProgress, PromptSpinner, ProviderConfig, ProvisionedClientCredential, ReactNativeMetadata, ReadPackageUpResult, RunInitOptions, SecretsScope, ServerClientEndpoint, ServerDefinition, ServerDefinitionError, Step, StepLevel, UNSIGNED_BUNDLES_NEXT_STEP, UNSIGNED_BUNDLES_WARNING, WriteHotUpdaterConfigResult, addSigningSecretToConfig, addSigningSecretToConfigText, assembleServer, assertInfrastructureGenerationAtUrl, assertInfrastructureGenerationPayload, assertInitInputs, assertInitProviderInputs, assertUnreservedEnv, autolinkingConfigCommand, banner, bundleSigningPutCommand, bundleSigningSecretRef, clientAuthOf, typedColors as colors, configSetsTeamSecrets, confirmInitInputPersistence, copyDirToTmp, createCredentialResolver, createHotUpdaterConfigScaffold, createHotUpdaterConfigScaffoldFromBuilder, createInterfaceFingerprint, createLocalSecretsStore, createLogWriter, createMigrator, createMinBundleId, createStep, createTarBrTargetFiles, createZip, credentialIssueCommand, credentialLoginCommand, credentialPutCommand, credentialStoreCommand, decryptJson, defineInitProvider, describeMissingSecret, describeSecret, describeStoredSecret, encryptJson, ensureInstallPackages, failActiveStep, fitMessage, formatCommand, formatDuration, generateClientCredential, generateSchema, generatesSchema, getAndroidSdkPath, getBundleSigningPublicKey, getConfiguredAdapter, getConfiguredSecrets, getCwd, getDeploySecretNames, getHotUpdaterEnvValue, getHotUpdaterHome, getHotUpdaterInitInputEnv, getInitProviderEnvVars, getInitProviderTextPromptValues, getLocalKeyFile, getLocalKeyStoreDir, getLocalSecretsStore, getMissingInitInputs, getMissingInitProviderInputs, getPackageManager, getProjectKey, getReactNativeMetadatas, getStorageFileByteSize, isCI, isCodegenSpecFile, isReservedVariableName, isSecretName, isSecretRef, isServerDefinition, keepsKeysOnThisMachine, link, loadConfig, loadPlatformConfigs, loadTeamSecrets, localSecrets, log, makeEnv, maskSecretValues, moduleSpecifiersOf, nonInteractiveReason, p, parseLoadedEnv, parseSecretReference, prepareBundleSigning, printAppSetup, printBanner, provisionClientCredential, putStorageFile, reactNativeCliFingerprint, reactNativeConfigCommand, readBundleSigningPublicKeyFile, readBundleSigningState, readHotUpdaterInitEnv, readLoadedEnvFile, readLoadedHotUpdaterEnv, readLocalKey, readMissingFromTeamSecrets, readPackageUp, readReactNativeInterface, readSecretVariables, readSecretWithSource, readSecrets, registerCredentialValue, registerSecretValue, renderAppImports, renderAppSetup, renderImportStatements, resolveExpoAutolinking, resolveHotUpdaterServerVersion, resolveInitProviderInput, resolveInitProviderInputs, resolveLocalSecretsPath, resolvePackageVersion, resolveSecretsAdapter, secret, secretVariableName, serverDefinitionOf, setConfiguredSecrets, shouldAutoSelectOnlyInitResource, startStep, storeEnvFileSecrets, stripAnsi, transformEnv, transformTemplate, truncateLine, withCredentialResolver, withDuration, withSecretsScope, withStep, writeHotUpdaterConfig, writeHotUpdaterFiles, writeLocalKey };