@hot-updater/plugin-core 1.2.0-rc.6 → 1.2.0-rc.61
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/coreApi.d.cts +277 -10
- package/dist/coreApi.d.mts +277 -10
- package/dist/database/adapter.d.cts +24 -0
- package/dist/database/adapter.d.mts +24 -0
- package/dist/databaseRows.cjs +4 -2
- package/dist/databaseRows.mjs +4 -2
- package/dist/engine/core/schema.cjs +253 -6
- package/dist/engine/core/schema.d.cts +154 -1
- package/dist/engine/core/schema.d.mts +154 -1
- package/dist/engine/core/schema.mjs +252 -7
- package/dist/engine/createEngine.cjs +1 -2
- package/dist/engine/createEngine.d.cts +1 -6
- package/dist/engine/createEngine.d.mts +1 -6
- package/dist/engine/createEngine.mjs +1 -2
- package/dist/engine/database/aggregateBatching.cjs +87 -129
- package/dist/engine/database/aggregateBatching.mjs +87 -129
- package/dist/engine/database/database.cjs +1 -4
- package/dist/engine/database/database.mjs +1 -4
- package/dist/engine/database/engineTransaction.cjs +26 -2
- package/dist/engine/database/engineTransaction.d.cts +5 -1
- package/dist/engine/database/engineTransaction.d.mts +5 -1
- package/dist/engine/database/engineTransaction.mjs +26 -2
- package/dist/engine/database/fence.cjs +24 -2
- package/dist/engine/database/fence.d.cts +4 -1
- package/dist/engine/database/fence.d.mts +4 -1
- package/dist/engine/database/fence.mjs +24 -3
- package/dist/engine/database/kv/kvAdapter.cjs +80 -4
- package/dist/engine/database/kv/kvAdapter.mjs +80 -4
- package/dist/engine/database/resolveSchema.cjs +6 -3
- package/dist/engine/database/resolveSchema.mjs +6 -3
- package/dist/engine/database/sql/sqlAdapter.cjs +36 -12
- package/dist/engine/database/sql/sqlAdapter.mjs +37 -13
- package/dist/engine/database/sql/sqlSchema.cjs +24 -6
- package/dist/engine/database/sql/sqlSchema.d.cts +1 -1
- package/dist/engine/database/sql/sqlSchema.d.mts +1 -1
- package/dist/engine/database/sql/sqlSchema.mjs +24 -6
- package/dist/engine/db/coreDatabase.cjs +10 -5
- package/dist/engine/db/coreDatabase.d.cts +2 -1
- package/dist/engine/db/coreDatabase.d.mts +2 -1
- package/dist/engine/db/coreDatabase.mjs +10 -5
- package/dist/engine/db/engineMigrator.cjs +45 -17
- package/dist/engine/db/engineMigrator.mjs +46 -18
- package/dist/engine/db/engineSql.cjs +25 -0
- package/dist/engine/db/engineSql.d.cts +13 -1
- package/dist/engine/db/engineSql.d.mts +13 -1
- package/dist/engine/db/engineSql.mjs +26 -2
- package/dist/engine/db/engineSqlMigrator.cjs +60 -21
- package/dist/engine/db/engineSqlMigrator.d.cts +2 -0
- package/dist/engine/db/engineSqlMigrator.d.mts +2 -0
- package/dist/engine/db/engineSqlMigrator.mjs +62 -23
- package/dist/engine/db/schemaSettings.cjs +56 -5
- package/dist/engine/db/schemaSettings.d.cts +5 -2
- package/dist/engine/db/schemaSettings.d.mts +5 -2
- package/dist/engine/db/schemaSettings.mjs +55 -6
- package/dist/engine/db/settingsMigrator.cjs +113 -15
- package/dist/engine/db/settingsMigrator.d.cts +18 -8
- package/dist/engine/db/settingsMigrator.d.mts +18 -8
- package/dist/engine/db/settingsMigrator.mjs +111 -17
- package/dist/engine/db/sqlSchemaState.cjs +136 -0
- package/dist/engine/db/sqlSchemaState.mjs +131 -0
- package/dist/engine/db/types.d.cts +6 -0
- package/dist/engine/db/types.d.mts +6 -0
- package/dist/index.cjs +4 -8
- package/dist/index.d.cts +7 -8
- package/dist/index.d.mts +7 -8
- package/dist/index.mjs +5 -6
- package/dist/releaseCatalogCompiler.cjs +89 -7
- package/dist/releaseCatalogCompiler.d.cts +12 -1
- package/dist/releaseCatalogCompiler.d.mts +12 -1
- package/dist/releaseCatalogCompiler.mjs +89 -8
- package/dist/releaseCatalogMutation.d.cts +8 -2
- package/dist/releaseCatalogMutation.d.mts +8 -2
- package/dist/serverPlugin/coreReads.d.cts +10 -1
- package/dist/serverPlugin/coreReads.d.mts +10 -1
- package/dist/serverPlugin/definitions.d.cts +4 -0
- package/dist/serverPlugin/definitions.d.mts +4 -0
- package/dist/serverPlugin/schema.d.cts +4 -0
- package/dist/serverPlugin/schema.d.mts +4 -0
- package/dist/types/databaseConfig.d.cts +10 -20
- package/dist/types/databaseConfig.d.mts +10 -20
- package/dist/types/databaseRows.d.cts +77 -2
- package/dist/types/databaseRows.d.mts +77 -2
- package/dist/types/index.cjs +3 -0
- package/dist/types/index.d.cts +114 -56
- package/dist/types/index.d.mts +114 -56
- package/dist/types/index.mjs +3 -1
- package/dist/types/models.d.cts +9 -1
- package/dist/types/models.d.mts +9 -1
- package/dist/types/public.d.cts +3 -3
- package/dist/types/public.d.mts +3 -3
- package/package.json +3 -9
- package/dist/remoteBundleSigning.cjs +0 -357
- package/dist/remoteBundleSigning.d.cts +0 -38
- package/dist/remoteBundleSigning.d.mts +0 -38
- package/dist/remoteBundleSigning.mjs +0 -352
package/dist/types/index.d.mts
CHANGED
|
@@ -1,12 +1,39 @@
|
|
|
1
|
-
import { BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, NativeBuildArtifactKind, NativeBuildRow, NativeBuildSubmissionDestination, ReleaseCatalogRow, ReleaseRow } from "./databaseRows.mjs";
|
|
1
|
+
import { BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, IosDeviceRow, IosDeviceStatus, NativeBuildArtifactKind, NativeBuildExportMethod, NativeBuildRow, NativeBuildSubmissionDestination, ReleaseCatalogRow, ReleaseRow } from "./databaseRows.mjs";
|
|
2
2
|
import { AnyHotUpdaterPlugin } from "../serverPlugin/definePlugin.mjs";
|
|
3
3
|
import { AggregateBatching, ConfiguredDatabase, EngineDatabase, RemoteDatabase, isRemoteDatabase } from "./databaseConfig.mjs";
|
|
4
4
|
import { BuiltIns, HasMultipleCallSignatures, Primitive, RequiredDeep } from "./utils.mjs";
|
|
5
5
|
import { BundleRowUpdate, ReleaseCatalogRowUpdate, ReleaseRowUpdate } from "./databaseOperations.mjs";
|
|
6
|
-
import { ChannelDeleteResult, ChannelInsertResult, NativeBuildDeleteResult } from "./models.mjs";
|
|
6
|
+
import { ChannelDeleteResult, ChannelInsertResult, NativeBuildDeleteResult, NativeBuildMarkResult } from "./models.mjs";
|
|
7
7
|
import "./public.mjs";
|
|
8
8
|
import { Bundle as Bundle$1, Platform, Platform as Platform$1 } from "@hot-updater/protocol";
|
|
9
9
|
//#region src/types/index.d.ts
|
|
10
|
+
/**
|
|
11
|
+
* A value, or a function that returns it, called on first use: an
|
|
12
|
+
* adapter shared by servers and the CLI takes its credentials so, as a
|
|
13
|
+
* string from a server's own environment or as `secret("<name>")` from
|
|
14
|
+
* `hot-updater.config.ts`, which loads without reading a secret.
|
|
15
|
+
*/
|
|
16
|
+
type Lazy<T> = T | (() => T | Promise<T>);
|
|
17
|
+
/** The value of a `Lazy`, calling its function. */
|
|
18
|
+
declare const resolveLazy: <T>(value: Lazy<T>) => Promise<T>;
|
|
19
|
+
/**
|
|
20
|
+
* The brand of a `SecretRef`, `Symbol.for("@hot-updater/secret-ref")` at
|
|
21
|
+
* runtime: `hot-updater`'s `secret()` sets it, and the CLI recognizes a
|
|
22
|
+
* reference by it, so a plain string or function is none.
|
|
23
|
+
*/
|
|
24
|
+
declare const secretRefBrand: unique symbol;
|
|
25
|
+
/**
|
|
26
|
+
* `secret("<name>")` in `hot-updater.config.ts`: the secret the config's
|
|
27
|
+
* `secrets` adapter holds as `name`. Called, it reads the value, the
|
|
28
|
+
* environment first, so it is a `Lazy<string>` any adapter credential
|
|
29
|
+
* takes; the build credentials, such as `signing.keystore`, take only a
|
|
30
|
+
* reference, which the CLI resolves by `name` for its kind.
|
|
31
|
+
*/
|
|
32
|
+
type SecretRef = (() => Promise<string>) & {
|
|
33
|
+
readonly [secretRefBrand]: true;
|
|
34
|
+
/** The secret's name in the config's `secrets` adapter. */
|
|
35
|
+
readonly name: string;
|
|
36
|
+
};
|
|
10
37
|
interface BuildAdapterArgs {
|
|
11
38
|
cwd: string;
|
|
12
39
|
}
|
|
@@ -89,6 +116,11 @@ interface BuildAdapter {
|
|
|
89
116
|
readonly appVersion?: string;
|
|
90
117
|
/** The channel the native build would embed. */
|
|
91
118
|
readonly channel?: string;
|
|
119
|
+
/**
|
|
120
|
+
* The trust-anchor file the prebuild embeds as the bundle signing
|
|
121
|
+
* public key, such as the Expo config plugin's `publicKeyPath`.
|
|
122
|
+
*/
|
|
123
|
+
readonly publicKeyPath?: string;
|
|
92
124
|
}>;
|
|
93
125
|
prebuild?: (args: {
|
|
94
126
|
platform: Platform;
|
|
@@ -109,6 +141,19 @@ interface BuildAdapter {
|
|
|
109
141
|
/**
|
|
110
142
|
* Android native build gradle configuration.
|
|
111
143
|
*/
|
|
144
|
+
/** The options of a native build scheme's `sandbox`, which turn it on. */
|
|
145
|
+
interface NativeBuildSandboxOptions {
|
|
146
|
+
/**
|
|
147
|
+
* The URL scheme the sandbox build registers, which its preview links and
|
|
148
|
+
* QR codes open: lower case, a letter then up to 63 letters, digits, `+`,
|
|
149
|
+
* `.` or `-`, none the app registers itself, and not `http`, `https`,
|
|
150
|
+
* `file`, `data`, `javascript`, `true` or `false`. A build keeps the scheme it
|
|
151
|
+
* was built with, so a changed one takes effect at the next sandbox build.
|
|
152
|
+
*
|
|
153
|
+
* @default "hu-sandbox-<bundleIdentifier | packageName>"
|
|
154
|
+
*/
|
|
155
|
+
urlScheme?: string;
|
|
156
|
+
}
|
|
112
157
|
interface NativeBuildAndroidScheme {
|
|
113
158
|
/**
|
|
114
159
|
* Android application module build variant.
|
|
@@ -144,16 +189,28 @@ interface NativeBuildAndroidScheme {
|
|
|
144
189
|
applicationId?: string;
|
|
145
190
|
/**
|
|
146
191
|
* Signs a release variant with a keystore the CLI resolves: `keystore` is
|
|
147
|
-
* `secret
|
|
192
|
+
* `secret("<name>")`, the `android-keystore` the config's `secrets` adapter
|
|
148
193
|
* holds as `<name>`, which the `HOT_UPDATER_ANDROID_KEYSTORE_*`
|
|
149
194
|
* environment variables override. Debug variants keep the debug keystore
|
|
150
195
|
* and resolve nothing. Without it, the variant's own `signingConfig` signs.
|
|
151
196
|
*
|
|
152
|
-
* @example { keystore: "
|
|
197
|
+
* @example { keystore: secret("release-keystore") }
|
|
153
198
|
*/
|
|
154
199
|
signing?: {
|
|
155
|
-
keystore:
|
|
200
|
+
keystore: SecretRef;
|
|
156
201
|
};
|
|
202
|
+
/**
|
|
203
|
+
* Builds the app with the sandbox native layer, for testing OTA bundles on
|
|
204
|
+
* a device, as a separate app: the application ID gets a `.sandbox` suffix.
|
|
205
|
+
* It embeds the project's channel, as any scheme's build does, and reaches
|
|
206
|
+
* Google Play's internal testing only. No other build compiles the layer.
|
|
207
|
+
* An object turns it on with options: `urlScheme` is the URL scheme its
|
|
208
|
+
* preview links and QR codes open, `hu-sandbox-<packageName>` by default.
|
|
209
|
+
*
|
|
210
|
+
* @default false
|
|
211
|
+
* @example { urlScheme: "acme-preview" }
|
|
212
|
+
*/
|
|
213
|
+
sandbox?: boolean | NativeBuildSandboxOptions;
|
|
157
214
|
}
|
|
158
215
|
type IosBuildDestination = {
|
|
159
216
|
id: string;
|
|
@@ -241,17 +298,32 @@ interface NativeBuildIosScheme {
|
|
|
241
298
|
simulator?: boolean;
|
|
242
299
|
/**
|
|
243
300
|
* Signs a device build with automatic signing, authenticated by an App
|
|
244
|
-
* Store Connect API key the CLI resolves: `ascApiKey` is `secret
|
|
301
|
+
* Store Connect API key the CLI resolves: `ascApiKey` is `secret("<name>")`,
|
|
245
302
|
* the `asc-api-key` the config's `secrets` adapter holds as `<name>`,
|
|
246
303
|
* which the `HOT_UPDATER_ASC_KEY*` environment variables override.
|
|
247
304
|
* Simulator builds resolve nothing. Without it, the project's signing
|
|
248
305
|
* settings and Xcode's accounts sign.
|
|
249
306
|
*
|
|
250
|
-
* @example { ascApiKey: "
|
|
307
|
+
* @example { ascApiKey: secret("asc-api-key") }
|
|
251
308
|
*/
|
|
252
309
|
signing?: {
|
|
253
|
-
ascApiKey:
|
|
310
|
+
ascApiKey: SecretRef;
|
|
254
311
|
};
|
|
312
|
+
/**
|
|
313
|
+
* Builds the app with the sandbox native layer, for testing OTA bundles on
|
|
314
|
+
* a device. It has the bundle identifier its Xcode configuration builds,
|
|
315
|
+
* which `bundleIdentifier` must name: the store app's by default, which it
|
|
316
|
+
* replaces on a device, or its own from a separate configuration. It
|
|
317
|
+
* embeds the project's channel, as any scheme's build does, and its `.ipa`
|
|
318
|
+
* is for TestFlight internal testing only, never App Store review. No other build
|
|
319
|
+
* compiles the layer. An object turns it on with options: `urlScheme` is
|
|
320
|
+
* the URL scheme its preview links and QR codes open,
|
|
321
|
+
* `hu-sandbox-<bundleIdentifier>` by default.
|
|
322
|
+
*
|
|
323
|
+
* @default false
|
|
324
|
+
* @example { urlScheme: "acme-preview" }
|
|
325
|
+
*/
|
|
326
|
+
sandbox?: boolean | NativeBuildSandboxOptions;
|
|
255
327
|
}
|
|
256
328
|
interface PlatformConfig {
|
|
257
329
|
/**
|
|
@@ -362,28 +434,6 @@ interface StorageAdapter {
|
|
|
362
434
|
/** Deletes only the exact base-path-relative keys supplied by the caller. */
|
|
363
435
|
readonly deleteObjects?: (keys: readonly string[]) => Promise<void>;
|
|
364
436
|
}
|
|
365
|
-
interface BundleSigningAdapter {
|
|
366
|
-
readonly name: string;
|
|
367
|
-
/** Returns the RSA public key used by this provider in SPKI PEM format. */
|
|
368
|
-
readonly getPublicKey: (input?: {
|
|
369
|
-
readonly cwd?: string;
|
|
370
|
-
}) => Promise<{
|
|
371
|
-
readonly publicKey: string;
|
|
372
|
-
}>;
|
|
373
|
-
/**
|
|
374
|
-
* Signs `message` with RSA PKCS#1 v1.5 SHA-256.
|
|
375
|
-
*
|
|
376
|
-
* Hot Updater passes the 32 raw bytes decoded from a SHA-256 file hash.
|
|
377
|
-
* Remote signing services must treat this value as the raw message, not as
|
|
378
|
-
* an already-computed digest.
|
|
379
|
-
*/
|
|
380
|
-
readonly sign: (input: {
|
|
381
|
-
readonly message: Uint8Array;
|
|
382
|
-
readonly cwd?: string;
|
|
383
|
-
}) => Promise<{
|
|
384
|
-
readonly signature: Uint8Array;
|
|
385
|
-
}>;
|
|
386
|
-
}
|
|
387
437
|
/**
|
|
388
438
|
* What a secrets adapter is given with each call. It carries no secret: an
|
|
389
439
|
* adapter reads its own credentials, such as a token or a CLI sign-in.
|
|
@@ -393,11 +443,12 @@ interface SecretsContext {
|
|
|
393
443
|
readonly cwd: string;
|
|
394
444
|
}
|
|
395
445
|
/**
|
|
396
|
-
* Where the CLI reads secrets
|
|
397
|
-
*
|
|
446
|
+
* Where the CLI reads the secrets `secret("<name>")` names in a config: build
|
|
447
|
+
* credentials, such as a keystore, and adapter credentials. Values
|
|
398
448
|
* are strings: binary is base64, and a credential with several fields is one
|
|
399
449
|
* JSON value per name. `localSecrets()`, an export of `hot-updater`, keeps them
|
|
400
|
-
* in files on this machine
|
|
450
|
+
* in files on this machine, and `infisical()`, another, in an Infisical
|
|
451
|
+
* project; a store of your own implements this.
|
|
401
452
|
*/
|
|
402
453
|
interface SecretsAdapter {
|
|
403
454
|
readonly name: string;
|
|
@@ -428,22 +479,27 @@ type LocalSigningConfig = {
|
|
|
428
479
|
} | {
|
|
429
480
|
readonly enabled: true;
|
|
430
481
|
/**
|
|
431
|
-
* `secret
|
|
432
|
-
* `secrets` adapter holds as `<name>`. The CLI reads it once
|
|
433
|
-
* when it first signs or derives the public key, and keeps it
|
|
434
|
-
* memory only.
|
|
482
|
+
* `secret("<name>")`, the RSA private key in PEM format that the
|
|
483
|
+
* config's `secrets` adapter holds as `<name>`. The CLI reads it once
|
|
484
|
+
* per run, when it first signs or derives the public key, and keeps it
|
|
485
|
+
* in memory only.
|
|
435
486
|
*
|
|
436
|
-
* @example { enabled: true, privateKey: "
|
|
487
|
+
* @example { enabled: true, privateKey: secret("bundle-signing-key") }
|
|
437
488
|
*/
|
|
438
|
-
readonly privateKey:
|
|
489
|
+
readonly privateKey: SecretRef;
|
|
439
490
|
readonly privateKeyPath?: never;
|
|
440
491
|
} | {
|
|
441
492
|
readonly enabled: false;
|
|
442
493
|
readonly privateKeyPath?: string;
|
|
443
|
-
readonly privateKey?:
|
|
494
|
+
readonly privateKey?: SecretRef;
|
|
444
495
|
};
|
|
445
|
-
/**
|
|
446
|
-
|
|
496
|
+
/**
|
|
497
|
+
* Bundle signing with an RSA private key in PEM. `secret("<name>")` is the
|
|
498
|
+
* shorthand of `{ enabled: true, privateKey: secret("<name>") }`. Without
|
|
499
|
+
* `signing`, bundles are unsigned and deploy warns; `enabled: false` turns
|
|
500
|
+
* signing off without the warning.
|
|
501
|
+
*/
|
|
502
|
+
type SigningConfig = SecretRef | LocalSigningConfig;
|
|
447
503
|
/**
|
|
448
504
|
* Extra fingerprint sources.
|
|
449
505
|
*
|
|
@@ -471,6 +527,9 @@ type ConfigInput = {
|
|
|
471
527
|
* If `appVersion`, the bundle will be updated if the target app version is valid.
|
|
472
528
|
* @docs https://hot-updater.dev/docs/guides/update-strategies/app-version
|
|
473
529
|
*
|
|
530
|
+
* `hot-updater init` writes `fingerprint` for a new project; a config that
|
|
531
|
+
* sets none keeps `appVersion`, so upgrading never retargets shipped apps.
|
|
532
|
+
*
|
|
474
533
|
* @default "appVersion"
|
|
475
534
|
*/
|
|
476
535
|
updateStrategy: "fingerprint" | "appVersion";
|
|
@@ -504,7 +563,8 @@ type ConfigInput = {
|
|
|
504
563
|
*/
|
|
505
564
|
nativeVersion?: string | number;
|
|
506
565
|
/**
|
|
507
|
-
*
|
|
566
|
+
* Passed to the build adapter's fingerprint, which may use it for its own
|
|
567
|
+
* diagnostics. fingerprint.json never records them.
|
|
508
568
|
*/
|
|
509
569
|
debug?: boolean;
|
|
510
570
|
};
|
|
@@ -547,25 +607,23 @@ type ConfigInput = {
|
|
|
547
607
|
platform?: PlatformConfig;
|
|
548
608
|
nativeBuild?: NativeBuildArgs;
|
|
549
609
|
/**
|
|
550
|
-
*
|
|
551
|
-
*
|
|
552
|
-
*
|
|
553
|
-
*
|
|
610
|
+
* Signs each bundle with RSA-SHA256, which the app verifies with the
|
|
611
|
+
* public key it embeds. `secret("bundle-signing-key")` reads the RSA
|
|
612
|
+
* private key in PEM from the config's `secrets` adapter; the object
|
|
613
|
+
* forms take it from a secret (`privateKey`) or a file
|
|
614
|
+
* (`privateKeyPath`). Without `signing`, bundles are unsigned and deploy
|
|
615
|
+
* warns; `{ enabled: false }` turns signing off without the warning.
|
|
554
616
|
*
|
|
555
617
|
* @example
|
|
556
618
|
* ```ts
|
|
557
|
-
* signing:
|
|
558
|
-
* enabled: true,
|
|
559
|
-
* privateKey: "secret:bundle-signing-key",
|
|
560
|
-
* }
|
|
619
|
+
* signing: secret("bundle-signing-key"),
|
|
561
620
|
* ```
|
|
562
621
|
*/
|
|
563
622
|
signing?: SigningConfig;
|
|
564
623
|
/**
|
|
565
|
-
* Where the CLI reads the secrets the config names
|
|
566
|
-
*
|
|
567
|
-
*
|
|
568
|
-
* under it.
|
|
624
|
+
* Where the CLI reads the secrets the config names with `secret("<name>")`,
|
|
625
|
+
* after the environment, and stores the keys it issues. It is the only
|
|
626
|
+
* store: nothing is kept on this machine under it.
|
|
569
627
|
*
|
|
570
628
|
* @default localSecrets()
|
|
571
629
|
*/
|
|
@@ -592,4 +650,4 @@ interface NativeBuildOptions {
|
|
|
592
650
|
scheme?: string;
|
|
593
651
|
}
|
|
594
652
|
//#endregion
|
|
595
|
-
export { type AggregateBatching, ApplePlatform, BuildAdapter, BuildAdapterArgs, BuildAdapterConfig, BuiltIns, type Bundle$1 as Bundle, type BundlePatchRow, type BundleRow, type BundleRowUpdate,
|
|
653
|
+
export { type AggregateBatching, ApplePlatform, BuildAdapter, BuildAdapterArgs, BuildAdapterConfig, BuiltIns, type Bundle$1 as Bundle, type BundlePatchRow, type BundleRow, type BundleRowUpdate, type ChannelDeleteResult, type ChannelInsertResult, type ChannelRow, ConfigInput, type ConfiguredDatabase, type DatabaseBundleMetadata, type DatabaseJsonObject, type DatabaseJsonValue, type EngineDatabase, FingerprintExtraSources, HasMultipleCallSignatures, IosBuildDestination, type IosDeviceRow, type IosDeviceStatus, Lazy, LocalSigningConfig, NativeBuildAndroidScheme, NativeBuildArgs, type NativeBuildArtifactKind, type NativeBuildDeleteResult, type NativeBuildExportMethod, NativeBuildIosScheme, type NativeBuildMarkResult, NativeBuildOptions, type NativeBuildRow, NativeBuildSandboxOptions, type NativeBuildSubmissionDestination, NativeFingerprint, NativeFingerprintOptions, NativeFingerprintProvider, NativeFingerprintSource, type Platform$1 as Platform, PlatformConfig, Primitive, type ReleaseCatalogRow, type ReleaseCatalogRowUpdate, type ReleaseRow, type ReleaseRowUpdate, type RemoteDatabase, RequiredDeep, SecretRef, SecretsAdapter, SecretsContext, SigningConfig, StorageAdapter, StorageDeleteInput, StorageDeleteResult, StorageExistsInput, StorageExistsResult, StorageGetDownloadUrlInput, StorageGetDownloadUrlResult, StorageGetInput, StorageGetResult, StorageObject, StoragePutInput, StoragePutResult, isRemoteDatabase, resolveLazy, supportedIosPlatforms };
|
package/dist/types/index.mjs
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { isRemoteDatabase } from "./databaseConfig.mjs";
|
|
2
2
|
//#region src/types/index.ts
|
|
3
|
+
/** The value of a `Lazy`, calling its function. */
|
|
4
|
+
const resolveLazy = async (value) => typeof value === "function" ? await value() : value;
|
|
3
5
|
/**
|
|
4
6
|
* Supported Apple platforms for building and deployment
|
|
5
7
|
*/
|
|
6
8
|
const supportedIosPlatforms = { ios: "ios" };
|
|
7
9
|
//#endregion
|
|
8
|
-
export { isRemoteDatabase, supportedIosPlatforms };
|
|
10
|
+
export { isRemoteDatabase, resolveLazy, supportedIosPlatforms };
|
package/dist/types/models.d.cts
CHANGED
|
@@ -21,5 +21,13 @@ type NativeBuildDeleteResult = {
|
|
|
21
21
|
readonly deleted: false;
|
|
22
22
|
readonly reason: "not_found";
|
|
23
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* A store build mark's result: the build, and the build whose mark it replaced,
|
|
26
|
+
* or null when it replaced none.
|
|
27
|
+
*/
|
|
28
|
+
interface NativeBuildMarkResult {
|
|
29
|
+
readonly nativeBuild: NativeBuildRow;
|
|
30
|
+
readonly previous: NativeBuildRow | null;
|
|
31
|
+
}
|
|
24
32
|
//#endregion
|
|
25
|
-
export { ChannelDeleteResult, ChannelInsertResult, NativeBuildDeleteResult };
|
|
33
|
+
export { ChannelDeleteResult, ChannelInsertResult, NativeBuildDeleteResult, NativeBuildMarkResult };
|
package/dist/types/models.d.mts
CHANGED
|
@@ -21,5 +21,13 @@ type NativeBuildDeleteResult = {
|
|
|
21
21
|
readonly deleted: false;
|
|
22
22
|
readonly reason: "not_found";
|
|
23
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* A store build mark's result: the build, and the build whose mark it replaced,
|
|
26
|
+
* or null when it replaced none.
|
|
27
|
+
*/
|
|
28
|
+
interface NativeBuildMarkResult {
|
|
29
|
+
readonly nativeBuild: NativeBuildRow;
|
|
30
|
+
readonly previous: NativeBuildRow | null;
|
|
31
|
+
}
|
|
24
32
|
//#endregion
|
|
25
|
-
export { ChannelDeleteResult, ChannelInsertResult, NativeBuildDeleteResult };
|
|
33
|
+
export { ChannelDeleteResult, ChannelInsertResult, NativeBuildDeleteResult, NativeBuildMarkResult };
|
package/dist/types/public.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, NativeBuildArtifactKind, NativeBuildRow, NativeBuildSubmissionDestination, ReleaseCatalogRow, ReleaseRow } from "./databaseRows.cjs";
|
|
1
|
+
import { BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, IosDeviceRow, IosDeviceStatus, NativeBuildArtifactKind, NativeBuildExportMethod, NativeBuildRow, NativeBuildSubmissionDestination, ReleaseCatalogRow, ReleaseRow } from "./databaseRows.cjs";
|
|
2
2
|
import { AggregateBatching, ConfiguredDatabase, EngineDatabase, RemoteDatabase, isRemoteDatabase } from "./databaseConfig.cjs";
|
|
3
3
|
import { BundleRowUpdate, ReleaseCatalogRowUpdate, ReleaseRowUpdate } from "./databaseOperations.cjs";
|
|
4
|
-
import { ChannelDeleteResult, ChannelInsertResult, NativeBuildDeleteResult } from "./models.cjs";
|
|
5
|
-
export { type AggregateBatching, type BundlePatchRow, type BundleRow, type BundleRowUpdate, type ChannelDeleteResult, type ChannelInsertResult, type ChannelRow, type ConfiguredDatabase, type DatabaseBundleMetadata, type DatabaseJsonObject, type DatabaseJsonValue, type EngineDatabase, type NativeBuildArtifactKind, type NativeBuildDeleteResult, type NativeBuildRow, type NativeBuildSubmissionDestination, type ReleaseCatalogRow, type ReleaseCatalogRowUpdate, type ReleaseRow, type ReleaseRowUpdate, type RemoteDatabase, isRemoteDatabase };
|
|
4
|
+
import { ChannelDeleteResult, ChannelInsertResult, NativeBuildDeleteResult, NativeBuildMarkResult } from "./models.cjs";
|
|
5
|
+
export { type AggregateBatching, type BundlePatchRow, type BundleRow, type BundleRowUpdate, type ChannelDeleteResult, type ChannelInsertResult, type ChannelRow, type ConfiguredDatabase, type DatabaseBundleMetadata, type DatabaseJsonObject, type DatabaseJsonValue, type EngineDatabase, type IosDeviceRow, type IosDeviceStatus, type NativeBuildArtifactKind, type NativeBuildDeleteResult, type NativeBuildExportMethod, type NativeBuildMarkResult, type NativeBuildRow, type NativeBuildSubmissionDestination, type ReleaseCatalogRow, type ReleaseCatalogRowUpdate, type ReleaseRow, type ReleaseRowUpdate, type RemoteDatabase, isRemoteDatabase };
|
package/dist/types/public.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, NativeBuildArtifactKind, NativeBuildRow, NativeBuildSubmissionDestination, ReleaseCatalogRow, ReleaseRow } from "./databaseRows.mjs";
|
|
1
|
+
import { BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, IosDeviceRow, IosDeviceStatus, NativeBuildArtifactKind, NativeBuildExportMethod, NativeBuildRow, NativeBuildSubmissionDestination, ReleaseCatalogRow, ReleaseRow } from "./databaseRows.mjs";
|
|
2
2
|
import { AggregateBatching, ConfiguredDatabase, EngineDatabase, RemoteDatabase, isRemoteDatabase } from "./databaseConfig.mjs";
|
|
3
3
|
import { BundleRowUpdate, ReleaseCatalogRowUpdate, ReleaseRowUpdate } from "./databaseOperations.mjs";
|
|
4
|
-
import { ChannelDeleteResult, ChannelInsertResult, NativeBuildDeleteResult } from "./models.mjs";
|
|
5
|
-
export { type AggregateBatching, type BundlePatchRow, type BundleRow, type BundleRowUpdate, type ChannelDeleteResult, type ChannelInsertResult, type ChannelRow, type ConfiguredDatabase, type DatabaseBundleMetadata, type DatabaseJsonObject, type DatabaseJsonValue, type EngineDatabase, type NativeBuildArtifactKind, type NativeBuildDeleteResult, type NativeBuildRow, type NativeBuildSubmissionDestination, type ReleaseCatalogRow, type ReleaseCatalogRowUpdate, type ReleaseRow, type ReleaseRowUpdate, type RemoteDatabase, isRemoteDatabase };
|
|
4
|
+
import { ChannelDeleteResult, ChannelInsertResult, NativeBuildDeleteResult, NativeBuildMarkResult } from "./models.mjs";
|
|
5
|
+
export { type AggregateBatching, type BundlePatchRow, type BundleRow, type BundleRowUpdate, type ChannelDeleteResult, type ChannelInsertResult, type ChannelRow, type ConfiguredDatabase, type DatabaseBundleMetadata, type DatabaseJsonObject, type DatabaseJsonValue, type EngineDatabase, type IosDeviceRow, type IosDeviceStatus, type NativeBuildArtifactKind, type NativeBuildDeleteResult, type NativeBuildExportMethod, type NativeBuildMarkResult, type NativeBuildRow, type NativeBuildSubmissionDestination, type ReleaseCatalogRow, type ReleaseCatalogRowUpdate, type ReleaseRow, type ReleaseRowUpdate, type RemoteDatabase, isRemoteDatabase };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/plugin-core",
|
|
3
|
-
"version": "1.2.0-rc.
|
|
3
|
+
"version": "1.2.0-rc.61",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "React Native OTA solution for self-hosted",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -45,19 +45,13 @@
|
|
|
45
45
|
"es-toolkit": "^1.32.0",
|
|
46
46
|
"mime": "^4.0.4",
|
|
47
47
|
"verkit": "0.4.0",
|
|
48
|
-
"@hot-updater/protocol": "1.2.0-rc.
|
|
48
|
+
"@hot-updater/protocol": "1.2.0-rc.61"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@electric-sql/pglite": "0.4.1",
|
|
52
52
|
"@types/node": "^20",
|
|
53
53
|
"@typescript/native": "npm:typescript@7.0.2",
|
|
54
|
-
"typescript": "npm:@typescript/typescript6@6.0.2"
|
|
55
|
-
"@hot-updater/test-utils": "1.2.0-rc.6"
|
|
56
|
-
},
|
|
57
|
-
"nx": {
|
|
58
|
-
"implicitDependencies": [
|
|
59
|
-
"!@hot-updater/test-utils"
|
|
60
|
-
]
|
|
54
|
+
"typescript": "npm:@typescript/typescript6@6.0.2"
|
|
61
55
|
},
|
|
62
56
|
"inlinedDependencies": {
|
|
63
57
|
"verkit": "0.4.0"
|