@hot-updater/plugin-core 1.2.0-rc.3 → 1.2.0-rc.30
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 +142 -6
- package/dist/coreApi.d.mts +142 -6
- package/dist/engine/core/schema.cjs +157 -2
- package/dist/engine/core/schema.d.cts +111 -1
- package/dist/engine/core/schema.d.mts +111 -1
- package/dist/engine/core/schema.mjs +157 -2
- 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 +24 -116
- package/dist/engine/database/aggregateBatching.mjs +24 -116
- package/dist/engine/database/database.cjs +1 -4
- package/dist/engine/database/database.mjs +1 -4
- package/dist/engine/database/resolveSchema.cjs +6 -3
- package/dist/engine/database/resolveSchema.mjs +6 -3
- package/dist/index.cjs +1 -7
- package/dist/index.d.cts +5 -6
- package/dist/index.d.mts +5 -6
- package/dist/index.mjs +2 -3
- 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 +8 -19
- package/dist/types/databaseConfig.d.mts +8 -19
- package/dist/types/databaseRows.d.cts +60 -2
- package/dist/types/databaseRows.d.mts +60 -2
- package/dist/types/index.cjs +3 -0
- package/dist/types/index.d.cts +118 -60
- package/dist/types/index.d.mts +118 -60
- 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/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ import { createStorageUriWithRelativePath, getManifestAssetDownloadPath, getMani
|
|
|
3
3
|
import { CONTENT_ADDRESSED_ASSET_PREFIX, getContentAddressedAssetStoragePath, isContentAddressedAssetFileHash } from "./contentAddressedAssets.mjs";
|
|
4
4
|
import { getContentType } from "./contentType.mjs";
|
|
5
5
|
import { CatalogVersionBound, CompiledCatalogSegment, CompiledReleaseCatalog, ReleaseCatalogCompilation, ReleaseCatalogCompilationError, ReleaseCatalogCompilerDiagnostics, canonicalizeAppVersion, compileReleaseCatalog, projectCompiledCatalog, projectCompiledRollbackCatalog, referenceCompatibleReleases } from "./releaseCatalogCompiler.mjs";
|
|
6
|
-
import { BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, NativeBuildArtifactKind, NativeBuildRow, NativeBuildSubmissionDestination, ReleaseCatalogRow, ReleaseRow } from "./types/databaseRows.mjs";
|
|
6
|
+
import { BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, IosDeviceRow, IosDeviceStatus, NativeBuildArtifactKind, NativeBuildExportMethod, NativeBuildRow, NativeBuildSubmissionDestination, ReleaseCatalogRow, ReleaseRow } from "./types/databaseRows.mjs";
|
|
7
7
|
import { CoreReads, ReleaseCatalogRequest } from "./serverPlugin/coreReads.mjs";
|
|
8
8
|
import { DATABASE_VERSION_COLUMN, DatabaseAdapter, DatabaseJson, DatabaseKey, DatabaseKeyValue, DatabaseSchemaError, DatabaseValue, PhysicalColumn, PhysicalColumnType, PhysicalIndex, PhysicalRetention, PhysicalTable, QueryBound, QueryRequest, StoredRow, WriteGuard, WriteOp, WriteResult, expiresAt, findPhysicalColumn, findPhysicalIndex, indexOrderColumns, rowKey } from "./database/adapter.mjs";
|
|
9
9
|
import { FieldDefinition, FieldReference, FieldType, IndexDefinition, ReferenceAction } from "./serverPlugin/definitions.mjs";
|
|
@@ -17,11 +17,11 @@ import { RetryOptions } from "./engine/database/engineTransaction.mjs";
|
|
|
17
17
|
import { AggregateBatching, ConfiguredDatabase, EngineDatabase, RemoteDatabase, isRemoteDatabase } from "./types/databaseConfig.mjs";
|
|
18
18
|
import { BuiltIns, HasMultipleCallSignatures, Primitive, RequiredDeep } from "./types/utils.mjs";
|
|
19
19
|
import { BundleRowUpdate, ReleaseCatalogRowUpdate, ReleaseRowUpdate } from "./types/databaseOperations.mjs";
|
|
20
|
-
import { ChannelDeleteResult, ChannelInsertResult, NativeBuildDeleteResult } from "./types/models.mjs";
|
|
21
|
-
import { ApplePlatform, BuildAdapter, BuildAdapterArgs, BuildAdapterConfig, Bundle,
|
|
20
|
+
import { ChannelDeleteResult, ChannelInsertResult, NativeBuildDeleteResult, NativeBuildMarkResult } from "./types/models.mjs";
|
|
21
|
+
import { ApplePlatform, BuildAdapter, BuildAdapterArgs, BuildAdapterConfig, Bundle, ConfigInput, FingerprintExtraSources, IosBuildDestination, Lazy, LocalSigningConfig, NativeBuildAndroidScheme, NativeBuildArgs, NativeBuildIosScheme, NativeBuildOptions, NativeBuildSandboxOptions, NativeFingerprint, NativeFingerprintOptions, NativeFingerprintProvider, NativeFingerprintSource, Platform, PlatformConfig, SecretRef, SecretsAdapter, SecretsContext, SigningConfig, StorageAdapter, StorageDeleteInput, StorageDeleteResult, StorageExistsInput, StorageExistsResult, StorageGetDownloadUrlInput, StorageGetDownloadUrlResult, StorageGetInput, StorageGetResult, StorageObject, StoragePutInput, StoragePutResult, resolveLazy, supportedIosPlatforms } from "./types/index.mjs";
|
|
22
22
|
import { ReleaseCatalogMutationError, ReleaseCatalogMutationPreflight, ReleaseCatalogMutationResult, ReleaseCatalogRebuildPreflight, ReleaseCatalogRebuildResult, ReleaseCatalogScope } from "./releaseCatalogMutation.mjs";
|
|
23
23
|
import { PromoteReleaseResult, ReleaseManagementError, ReleasePolicyPatch } from "./releaseManagement.mjs";
|
|
24
|
-
import { BundleDeployment, BundleDetail, DeployReleasePolicy, Deployment, HotUpdaterCoreApi, KeysetInput, NativeBuildRegistration, NativeBuildScope, ReleaseFilter, ReleaseTarget, StoredBundleDeployment } from "./coreApi.mjs";
|
|
24
|
+
import { BundleDeployment, BundleDetail, DeployReleasePolicy, Deployment, HotUpdaterCoreApi, IosDeviceAccountClaim, IosDeviceOutcome, IosDeviceOutcomeInput, IosDeviceRequestResult, KeysetInput, NativeBuildRegistration, NativeBuildScope, ReleaseFilter, ReleaseTarget, StoredBundleDeployment } from "./coreApi.mjs";
|
|
25
25
|
import { DatabaseAdapterInputError, DatabaseAdapterInputErrorCode, DatabaseBundleNotFoundError, DatabaseRowReferencedError } from "./databaseErrors.mjs";
|
|
26
26
|
import { createStorageKeyBuilder } from "./createStorageKeyBuilder.mjs";
|
|
27
27
|
import { CreateStorageAdapterOptions, StorageAdapterWith, StorageOperation, assertStorageOperations, createStorageAdapter } from "./createStorageAdapter.mjs";
|
|
@@ -29,7 +29,6 @@ import { isDatabaseJsonObject, isDatabaseMetadataObject } from "./databaseJsonVa
|
|
|
29
29
|
import { BundleRowHydrationError, BundleRowHydrationErrorReason, bundleToPatchRows, bundleToRow, releaseRowToRelease, releaseToRow, rowToBundle, rowsToBundles } from "./databaseRows.mjs";
|
|
30
30
|
import { generateMinBundleId } from "./generateMinBundleId.mjs";
|
|
31
31
|
import { CreateStorageUriInput, ParsedStorageUri, createStorageUri, parseStorageUri } from "./parseStorageUri.mjs";
|
|
32
|
-
import { BundleSigningHandlerOptions, REMOTE_BUNDLE_SIGNING_ALGORITHM, REMOTE_BUNDLE_SIGNING_PATH, REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION, REMOTE_BUNDLE_SIGNING_TOKEN_HEADER, RemoteSigningOptions, createBundleSigningHandler, remoteSigning } from "./remoteBundleSigning.mjs";
|
|
33
32
|
import { semverSatisfies } from "./semverSatisfies.mjs";
|
|
34
33
|
import { createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, extractTimestampFromUUIDv7, isUUIDv7 } from "./uuidv7.mjs";
|
|
35
34
|
import { isDatabaseBusyError } from "./serverPlugin/busy.mjs";
|
|
@@ -52,4 +51,4 @@ import { EngineSqlOptions, generateEngineSql } from "./engine/db/engineSql.mjs";
|
|
|
52
51
|
import { EngineSqlMigratorOptions, createEngineSqlMigrator } from "./engine/db/engineSqlMigrator.mjs";
|
|
53
52
|
import { writeSchemaSettings } from "./engine/db/schemaSettings.mjs";
|
|
54
53
|
import { createSettingsMigrator } from "./engine/db/settingsMigrator.mjs";
|
|
55
|
-
export { type AggregateBatching, type AggregateChanges, type AggregateDefinition, type AggregateIdentity, type AggregateRow, type AnyHotUpdaterPlugin, ApplePlatform, BUNDLE_STORAGE_PREFIX, type BaseCandidateQuery, type BaseCandidateTarget, BuildAdapter, BuildAdapterArgs, BuildAdapterConfig, BuiltIns, type Bundle, type BundleDeployment, type BundleDetail, type BundlePatchRow, type BundleRow, BundleRowHydrationError, BundleRowHydrationErrorReason, type BundleRowUpdate,
|
|
54
|
+
export { type AggregateBatching, type AggregateChanges, type AggregateDefinition, type AggregateIdentity, type AggregateRow, type AnyHotUpdaterPlugin, ApplePlatform, BUNDLE_STORAGE_PREFIX, type BaseCandidateQuery, type BaseCandidateTarget, BuildAdapter, BuildAdapterArgs, BuildAdapterConfig, BuiltIns, type Bundle, type BundleDeployment, type BundleDetail, type BundlePatchRow, type BundleRow, BundleRowHydrationError, BundleRowHydrationErrorReason, type BundleRowUpdate, CONTENT_ADDRESSED_ASSET_PREFIX, CatalogVersionBound, type ChannelDeleteResult, type ChannelInsertResult, type ChannelRow, type ClientAuth, CompiledCatalogSegment, CompiledReleaseCatalog, ConfigInput, type ConfiguredDatabase, type ConstraintReason, type CoreReader, type CoreReads, type CoreSchema, type CreateRow, CreateStorageAdapterOptions, CreateStorageUriInput, DATABASE_VERSION_COLUMN, type DatabaseAdapter, DatabaseAdapterContractError, DatabaseAdapterInputError, type DatabaseAdapterInputErrorCode, DatabaseAmbiguousCommitError, type DatabaseBundleMetadata, DatabaseBundleNotFoundError, DatabaseConflictError, DatabaseConstraintError, DatabaseCursorError, type DatabaseJson, type DatabaseJsonObject, type DatabaseJsonValue, type DatabaseKey, type DatabaseKeyValue, DatabaseQueryError, type DatabaseReadCount, type DatabaseReadMeter, DatabaseRowReferencedError, DatabaseSchemaError, type DatabaseTooling, DatabaseTransactionError, type DatabaseValue, type DeployReleasePolicy, type Deployment, type DerivedDefinition, type DerivedFields, type Engine, type EngineColumns, type EngineDatabase, type EngineDatabaseOptions, type EngineOptions, type EngineReadCount, type EngineSqlMigratorOptions, type EngineSqlOptions, type FieldDefinition, type FieldReference, type FieldType, type FieldValue, type FindAggregatesModel, type FindManyModel, FingerprintExtraSources, HasMultipleCallSignatures, HotUpdaterConfigError, type HotUpdaterCoreApi, type HotUpdaterDatabase, type HotUpdaterPlugin, HotUpdaterSchemaMigrationRequiredError, type HotUpdaterTransaction, type IndexDefinition, IosBuildDestination, type IosDeviceAccountClaim, type IosDeviceOutcome, type IosDeviceOutcomeInput, type IosDeviceRequestResult, type IosDeviceRow, type IosDeviceStatus, type KeyLookup, type KeyValueStore, type KeysetInput, type KvAdapterOptions, type KvCondition, type KvItem, type KvKey, type KvOp, type KvRange, Lazy, LocalSigningConfig, type Lookup, type MemoryAdapterOptions, type MeteredDatabase, type MigrateOptions, type MigrationResult, type Migrator, type ModelDefinition, type ModuleSchema, NativeBuildAndroidScheme, NativeBuildArgs, type NativeBuildArtifactKind, type NativeBuildDeleteResult, type NativeBuildExportMethod, NativeBuildIosScheme, type NativeBuildMarkResult, NativeBuildOptions, type NativeBuildRegistration, type NativeBuildRow, NativeBuildSandboxOptions, type NativeBuildScope, type NativeBuildSubmissionDestination, NativeFingerprint, NativeFingerprintOptions, NativeFingerprintProvider, NativeFingerprintSource, type NormalizeOptions, type Page, ParsedStorageUri, type PhysicalColumn, type PhysicalColumnType, type PhysicalIndex, type PhysicalRetention, type PhysicalTable, type Platform, PlatformConfig, type PluginApis, type PluginCli, type PluginClientCredential, type PluginClientPlugin, type PluginContext, type PluginEndpoint, type PluginEndpointMethod, type PluginInstance, type PluginProvides, type PluginTables, Primitive, PromoteReleaseResult, type QueryBound, type QueryRequest, type ReadMeasurement, type ReadOptions, type ReadRow, type ReferenceAction, ReleaseCatalogCompilation, ReleaseCatalogCompilationError, ReleaseCatalogCompilerDiagnostics, ReleaseCatalogMutationError, ReleaseCatalogMutationPreflight, ReleaseCatalogMutationResult, ReleaseCatalogRebuildPreflight, ReleaseCatalogRebuildResult, type ReleaseCatalogRequest, type ReleaseCatalogRow, type ReleaseCatalogRowUpdate, ReleaseCatalogScope, type ReleaseFilter, ReleaseManagementError, ReleasePolicyPatch, type ReleaseRow, type ReleaseRowUpdate, type ReleaseTarget, type RemoteDatabase, RequiredDeep, type ResolvedModel, type ResolvedSchema, type RetentionDefinition, type RetryOptions, type RowOf, SETTINGS_TABLE, type SchemaGenerator, type SchemaSettings, SecretRef, SecretsAdapter, SecretsContext, SigningConfig, type SqlAdapterOptions, type SqlColumnShape, type SqlConnection, type SqlDialect, type SqlExecutor, type SqlResult, type SqlStatement, type SqlTableShape, StorageAdapter, StorageAdapterWith, StorageDeleteInput, StorageDeleteResult, StorageExistsInput, StorageExistsResult, StorageGetDownloadUrlInput, StorageGetDownloadUrlResult, StorageGetInput, StorageGetResult, StorageObject, StorageOperation, StoragePutInput, StoragePutResult, type StoredBundleDeployment, type StoredRow, type TableDefinition, type TableRow, type ToolingDatabase, type ToolingTarget, type UpdateSet, type VerifiedDatabaseAdapter, type VerifyAdapterOptions, WRITE_GUARD_TABLE, type WriteGuard, type WriteOp, type WriteResult, addDistinct, aggregateBatchingTables, assertStorageOperations, bundleToPatchRows, bundleToRow, canonicalizeAppVersion, compareUtf8, compileReleaseCatalog, coreSchema, coreSettings, coreTarget, countDistinct, createBundleStorageKey, createEngine, createEngineDatabase, createEngineSqlMigrator, createKvAdapter, createMemoryAdapter, createSettingsMigrator, createSqlAdapter, createStorageAdapter, createStorageKeyBuilder, createStorageRootUriWithPath, createStorageUri, createStorageUriWithRelativePath, createTableStatements, createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, defineAggregate, definePlugin, defineTable, encodeKvKey, expiresAt, extractTimestampFromUUIDv7, findPhysicalColumn, findPhysicalIndex, generateEngineSql, generateMinBundleId, getBundleArchiveStorageUri, getContentAddressedAssetStoragePath, getContentType, getManifestAssetDownloadPath, getManifestAssetStoragePath, indexOrderColumns, isBrotliManifestAssetPath, isContentAddressedAssetFileHash, isDatabaseBusyError, isDatabaseJsonObject, isDatabaseMetadataObject, isMultiIndex, isRemoteDatabase, isUUIDv7, mergeDistinct, meterReads, migrateCoreSchema, normalizeStoredRow, parseBaseCandidateKey, parseStorageUri, projectCompiledCatalog, projectCompiledRollbackCatalog, quoteSql, referenceCompatibleReleases, releaseRowToRelease, releaseToRow, replaceStorageUriKeySuffix, resolveLazy, resolveManifestAssetStorageFileHash, resolveManifestAssetStorageUri, rowKey, rowToBundle, rowsToBundles, semverSatisfies, sqlTableShapes, supportedIosPlatforms, targetBaseCandidateKey, toolingTargetOf, verifyAdapter, writeSchemaSettings };
|
package/dist/index.mjs
CHANGED
|
@@ -13,10 +13,9 @@ import { createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, extract
|
|
|
13
13
|
import { ReleaseCatalogCompilationError, canonicalizeAppVersion, compileReleaseCatalog, projectCompiledCatalog, projectCompiledRollbackCatalog, referenceCompatibleReleases } from "./releaseCatalogCompiler.mjs";
|
|
14
14
|
import { ReleaseManagementError } from "./releaseManagement.mjs";
|
|
15
15
|
import { ReleaseCatalogMutationError } from "./releaseCatalogMutation.mjs";
|
|
16
|
-
import { REMOTE_BUNDLE_SIGNING_ALGORITHM, REMOTE_BUNDLE_SIGNING_PATH, REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION, REMOTE_BUNDLE_SIGNING_TOKEN_HEADER, createBundleSigningHandler, remoteSigning } from "./remoteBundleSigning.mjs";
|
|
17
16
|
import { semverSatisfies } from "./semverSatisfies.mjs";
|
|
18
17
|
import { isRemoteDatabase } from "./types/databaseConfig.mjs";
|
|
19
|
-
import { supportedIosPlatforms } from "./types/index.mjs";
|
|
18
|
+
import { resolveLazy, supportedIosPlatforms } from "./types/index.mjs";
|
|
20
19
|
import { definePlugin } from "./serverPlugin/definePlugin.mjs";
|
|
21
20
|
import { defineAggregate, defineTable } from "./serverPlugin/schema.mjs";
|
|
22
21
|
import { DatabaseAmbiguousCommitError, DatabaseConflictError, DatabaseConstraintError, DatabaseCursorError, DatabaseQueryError, DatabaseTransactionError } from "./serverPlugin/errors.mjs";
|
|
@@ -39,4 +38,4 @@ import { createEngine } from "./engine/createEngine.mjs";
|
|
|
39
38
|
import { createKvAdapter, encodeKvKey } from "./engine/database/kv/kvAdapter.mjs";
|
|
40
39
|
import { WRITE_GUARD_TABLE, createSqlAdapter } from "./engine/database/sql/sqlAdapter.mjs";
|
|
41
40
|
import { createEngineSqlMigrator } from "./engine/db/engineSqlMigrator.mjs";
|
|
42
|
-
export { BUNDLE_STORAGE_PREFIX, BundleRowHydrationError, BundleRowHydrationErrorReason, CONTENT_ADDRESSED_ASSET_PREFIX, DATABASE_VERSION_COLUMN, DatabaseAdapterContractError, DatabaseAdapterInputError, DatabaseAmbiguousCommitError, DatabaseBundleNotFoundError, DatabaseConflictError, DatabaseConstraintError, DatabaseCursorError, DatabaseQueryError, DatabaseRowReferencedError, DatabaseSchemaError, DatabaseTransactionError, HotUpdaterConfigError, HotUpdaterSchemaMigrationRequiredError,
|
|
41
|
+
export { BUNDLE_STORAGE_PREFIX, BundleRowHydrationError, BundleRowHydrationErrorReason, CONTENT_ADDRESSED_ASSET_PREFIX, DATABASE_VERSION_COLUMN, DatabaseAdapterContractError, DatabaseAdapterInputError, DatabaseAmbiguousCommitError, DatabaseBundleNotFoundError, DatabaseConflictError, DatabaseConstraintError, DatabaseCursorError, DatabaseQueryError, DatabaseRowReferencedError, DatabaseSchemaError, DatabaseTransactionError, HotUpdaterConfigError, HotUpdaterSchemaMigrationRequiredError, ReleaseCatalogCompilationError, ReleaseCatalogMutationError, ReleaseManagementError, SETTINGS_TABLE, WRITE_GUARD_TABLE, addDistinct, aggregateBatchingTables, assertStorageOperations, bundleToPatchRows, bundleToRow, canonicalizeAppVersion, compareUtf8, compileReleaseCatalog, coreSchema, coreSettings, coreTarget, countDistinct, createBundleStorageKey, createEngine, createEngineDatabase, createEngineSqlMigrator, createKvAdapter, createMemoryAdapter, createSettingsMigrator, createSqlAdapter, createStorageAdapter, createStorageKeyBuilder, createStorageRootUriWithPath, createStorageUri, createStorageUriWithRelativePath, createTableStatements, createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, defineAggregate, definePlugin, defineTable, encodeKvKey, expiresAt, extractTimestampFromUUIDv7, findPhysicalColumn, findPhysicalIndex, generateEngineSql, generateMinBundleId, getBundleArchiveStorageUri, getContentAddressedAssetStoragePath, getContentType, getManifestAssetDownloadPath, getManifestAssetStoragePath, indexOrderColumns, isBrotliManifestAssetPath, isContentAddressedAssetFileHash, isDatabaseBusyError, isDatabaseJsonObject, isDatabaseMetadataObject, isMultiIndex, isRemoteDatabase, isUUIDv7, mergeDistinct, meterReads, migrateCoreSchema, normalizeStoredRow, parseBaseCandidateKey, parseStorageUri, projectCompiledCatalog, projectCompiledRollbackCatalog, quoteSql, referenceCompatibleReleases, releaseRowToRelease, releaseToRow, replaceStorageUriKeySuffix, resolveLazy, resolveManifestAssetStorageFileHash, resolveManifestAssetStorageUri, rowKey, rowToBundle, rowsToBundles, semverSatisfies, sqlTableShapes, supportedIosPlatforms, targetBaseCandidateKey, toolingTargetOf, verifyAdapter, writeSchemaSettings };
|
|
@@ -36,6 +36,10 @@ interface DerivedShape {
|
|
|
36
36
|
readonly type: FieldType;
|
|
37
37
|
/** Up to 16 values; the row is indexed once per value. */
|
|
38
38
|
readonly multi?: true;
|
|
39
|
+
/** Strings: the maximum length; unbounded text when absent. */
|
|
40
|
+
readonly maxLength?: number;
|
|
41
|
+
/** Strings: ASCII only, so a long key fits MySQL's 3,072-byte index limit. */
|
|
42
|
+
readonly ascii?: true;
|
|
39
43
|
/** Null, or an empty list, leaves the row out of indexes on this field. */
|
|
40
44
|
compute(row: never): unknown;
|
|
41
45
|
}
|
|
@@ -36,6 +36,10 @@ interface DerivedShape {
|
|
|
36
36
|
readonly type: FieldType;
|
|
37
37
|
/** Up to 16 values; the row is indexed once per value. */
|
|
38
38
|
readonly multi?: true;
|
|
39
|
+
/** Strings: the maximum length; unbounded text when absent. */
|
|
40
|
+
readonly maxLength?: number;
|
|
41
|
+
/** Strings: ASCII only, so a long key fits MySQL's 3,072-byte index limit. */
|
|
42
|
+
readonly ascii?: true;
|
|
39
43
|
/** Null, or an empty list, leaves the row out of indexes on this field. */
|
|
40
44
|
compute(row: never): unknown;
|
|
41
45
|
}
|
|
@@ -21,6 +21,10 @@ interface DerivedDefinition<TRow = never, TType extends FieldType = FieldType> {
|
|
|
21
21
|
readonly type: TType;
|
|
22
22
|
/** Up to 16 values; the row is indexed once per value. */
|
|
23
23
|
readonly multi?: true;
|
|
24
|
+
/** Strings: the maximum length; unbounded text when absent. */
|
|
25
|
+
readonly maxLength?: number;
|
|
26
|
+
/** Strings: ASCII only, so a long key fits MySQL's 3,072-byte index limit. */
|
|
27
|
+
readonly ascii?: true;
|
|
24
28
|
/** Null, or an empty list, leaves the row out of indexes on this field. */
|
|
25
29
|
compute(row: TRow): FieldValue<TType> | null | readonly FieldValue<TType>[];
|
|
26
30
|
}
|
|
@@ -21,6 +21,10 @@ interface DerivedDefinition<TRow = never, TType extends FieldType = FieldType> {
|
|
|
21
21
|
readonly type: TType;
|
|
22
22
|
/** Up to 16 values; the row is indexed once per value. */
|
|
23
23
|
readonly multi?: true;
|
|
24
|
+
/** Strings: the maximum length; unbounded text when absent. */
|
|
25
|
+
readonly maxLength?: number;
|
|
26
|
+
/** Strings: ASCII only, so a long key fits MySQL's 3,072-byte index limit. */
|
|
27
|
+
readonly ascii?: true;
|
|
24
28
|
/** Null, or an empty list, leaves the row out of indexes on this field. */
|
|
25
29
|
compute(row: TRow): FieldValue<TType> | null | readonly FieldValue<TType>[];
|
|
26
30
|
}
|
|
@@ -3,28 +3,17 @@ import { RetryOptions } from "../engine/database/engineTransaction.cjs";
|
|
|
3
3
|
import { HotUpdaterCoreApi } from "../coreApi.cjs";
|
|
4
4
|
//#region src/types/databaseConfig.d.ts
|
|
5
5
|
/**
|
|
6
|
-
* How changes to aggregates declared `batched` reach their rows:
|
|
7
|
-
* transaction
|
|
8
|
-
*
|
|
9
|
-
* (DynamoDB, Firestore) batch them.
|
|
6
|
+
* How changes to aggregates declared `batched` reach their rows: each
|
|
7
|
+
* transaction writes its changes as one log row, and a compaction merges
|
|
8
|
+
* pending log rows into one write per aggregate row. Databases that bill each
|
|
9
|
+
* write (DynamoDB, Firestore, Cosmos DB) batch them.
|
|
10
10
|
*/
|
|
11
11
|
interface AggregateBatching {
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* aggregates
|
|
16
|
-
* changes
|
|
17
|
-
* rows, but a crash loses up to one window, and a runtime that freezes
|
|
18
|
-
* or drops the process between requests (Lambda, Cloud Functions,
|
|
19
|
-
* Workers) loses more, so use it only on a long-lived server.
|
|
20
|
-
*/
|
|
21
|
-
readonly mode?: "log" | "memory";
|
|
22
|
-
/**
|
|
23
|
-
* How long changes wait before a compaction or a flush: `"log"` compacts
|
|
24
|
-
* after a commit once this has passed since the last compaction, 60
|
|
25
|
-
* seconds by default, and `"memory"` flushes this often, 15 seconds by
|
|
26
|
-
* default. A read that cannot compact (read-only credentials) shows
|
|
27
|
-
* aggregates that can leave out up to one window of the latest changes.
|
|
13
|
+
* A commit compacts once this has passed since the last compaction, 60
|
|
14
|
+
* seconds by default. A read compacts first; one that cannot (read-only
|
|
15
|
+
* credentials) shows aggregates that can leave out up to one window of the
|
|
16
|
+
* latest changes.
|
|
28
17
|
*/
|
|
29
18
|
readonly windowMs?: number;
|
|
30
19
|
}
|
|
@@ -3,28 +3,17 @@ import { RetryOptions } from "../engine/database/engineTransaction.mjs";
|
|
|
3
3
|
import { HotUpdaterCoreApi } from "../coreApi.mjs";
|
|
4
4
|
//#region src/types/databaseConfig.d.ts
|
|
5
5
|
/**
|
|
6
|
-
* How changes to aggregates declared `batched` reach their rows:
|
|
7
|
-
* transaction
|
|
8
|
-
*
|
|
9
|
-
* (DynamoDB, Firestore) batch them.
|
|
6
|
+
* How changes to aggregates declared `batched` reach their rows: each
|
|
7
|
+
* transaction writes its changes as one log row, and a compaction merges
|
|
8
|
+
* pending log rows into one write per aggregate row. Databases that bill each
|
|
9
|
+
* write (DynamoDB, Firestore, Cosmos DB) batch them.
|
|
10
10
|
*/
|
|
11
11
|
interface AggregateBatching {
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* aggregates
|
|
16
|
-
* changes
|
|
17
|
-
* rows, but a crash loses up to one window, and a runtime that freezes
|
|
18
|
-
* or drops the process between requests (Lambda, Cloud Functions,
|
|
19
|
-
* Workers) loses more, so use it only on a long-lived server.
|
|
20
|
-
*/
|
|
21
|
-
readonly mode?: "log" | "memory";
|
|
22
|
-
/**
|
|
23
|
-
* How long changes wait before a compaction or a flush: `"log"` compacts
|
|
24
|
-
* after a commit once this has passed since the last compaction, 60
|
|
25
|
-
* seconds by default, and `"memory"` flushes this often, 15 seconds by
|
|
26
|
-
* default. A read that cannot compact (read-only credentials) shows
|
|
27
|
-
* aggregates that can leave out up to one window of the latest changes.
|
|
13
|
+
* A commit compacts once this has passed since the last compaction, 60
|
|
14
|
+
* seconds by default. A read compacts first; one that cannot (read-only
|
|
15
|
+
* credentials) shows aggregates that can leave out up to one window of the
|
|
16
|
+
* latest changes.
|
|
28
17
|
*/
|
|
29
18
|
readonly windowMs?: number;
|
|
30
19
|
}
|
|
@@ -69,7 +69,13 @@ interface ChannelRow {
|
|
|
69
69
|
/** The kinds of artifact a native build registers. */
|
|
70
70
|
type NativeBuildArtifactKind = "apk" | "aab" | "ipa" | "app";
|
|
71
71
|
/** The store track a native build was submitted to. */
|
|
72
|
-
type NativeBuildSubmissionDestination = "testflight" | "play-internal";
|
|
72
|
+
type NativeBuildSubmissionDestination = "testflight" | "play-internal" | "play-closed" | "play-open" | "play-production";
|
|
73
|
+
/**
|
|
74
|
+
* How an iOS `.ipa` was exported, as its embedded provisioning profile says:
|
|
75
|
+
* for the App Store (no device list), ad hoc or development (a device list,
|
|
76
|
+
* development's with `get-task-allow`), or enterprise (every device).
|
|
77
|
+
*/
|
|
78
|
+
type NativeBuildExportMethod = "app-store" | "ad-hoc" | "development" | "enterprise";
|
|
73
79
|
/**
|
|
74
80
|
* A registered native build: its artifact in storage, the scope it serves,
|
|
75
81
|
* and `min_bundle_id`, the `bundles` row of the bundle built into it.
|
|
@@ -105,6 +111,58 @@ interface NativeBuildRow {
|
|
|
105
111
|
* by the build number, and a fingerprint build records no app version.
|
|
106
112
|
*/
|
|
107
113
|
readonly submitted_version: string | null;
|
|
114
|
+
/**
|
|
115
|
+
* Whether the build is marked as what the store sells, which deploys patch
|
|
116
|
+
* from over the scope's newest build. A scope has one at most.
|
|
117
|
+
*/
|
|
118
|
+
readonly is_store_build: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Whether the build is a sandbox build, one built from a scheme with
|
|
121
|
+
* `sandbox: true` or imported with the sandbox layer. Set when the build
|
|
122
|
+
* registers and never changed. A sandbox build is never the store build.
|
|
123
|
+
*/
|
|
124
|
+
readonly is_sandbox: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* The URL scheme a sandbox build's artifact registers, which its preview
|
|
127
|
+
* links open. Null on any other build, and on a sandbox build registered
|
|
128
|
+
* before it was recorded, which registered `hu-sandbox-<app ID>`.
|
|
129
|
+
*/
|
|
130
|
+
readonly sandbox_url_scheme: string | null;
|
|
131
|
+
/**
|
|
132
|
+
* How an `.ipa` was exported, read from its profile when it registered and
|
|
133
|
+
* never changed. Null on any other artifact, and on an `.ipa` registered
|
|
134
|
+
* before it was recorded.
|
|
135
|
+
*/
|
|
136
|
+
readonly export_method: NativeBuildExportMethod | null;
|
|
137
|
+
}
|
|
138
|
+
/** Where an iOS device is in the registry: requested, approved, or registered with Apple. */
|
|
139
|
+
type IosDeviceStatus = "pending" | "approved" | "registered";
|
|
140
|
+
/**
|
|
141
|
+
* An iPhone or iPad a team asked to install ad hoc builds on: the device
|
|
142
|
+
* registry the CLI registers with Apple from. Holds personal data: a UDID, a
|
|
143
|
+
* name, and emails.
|
|
144
|
+
*/
|
|
145
|
+
interface IosDeviceRow {
|
|
146
|
+
readonly id: string;
|
|
147
|
+
/** The UDID in lower case, in whichever of Apple's two formats it came. */
|
|
148
|
+
readonly udid: string;
|
|
149
|
+
/** The name App Store Connect shows once it is registered. */
|
|
150
|
+
readonly name: string;
|
|
151
|
+
readonly status: IosDeviceStatus;
|
|
152
|
+
/** Who asked for it, or null for the CLI. */
|
|
153
|
+
readonly requested_by: string | null;
|
|
154
|
+
readonly created_at_ms: number;
|
|
155
|
+
/** Who approved it: a Console email, or null for the CLI. */
|
|
156
|
+
readonly approved_by: string | null;
|
|
157
|
+
readonly approved_at_ms: number | null;
|
|
158
|
+
/** When it first counted as registered with Apple. */
|
|
159
|
+
readonly registered_at_ms: number | null;
|
|
160
|
+
/** The App Store Connect issuer of the account that registered it, set once. */
|
|
161
|
+
readonly apple_issuer_id: string | null;
|
|
162
|
+
/** Why Apple didn't take it or stopped counting it, in Apple's words or ours. */
|
|
163
|
+
readonly apple_error: string | null;
|
|
164
|
+
/** The newest native build whose .ipa the CLI checked lists it. */
|
|
165
|
+
readonly build_id: string | null;
|
|
108
166
|
}
|
|
109
167
|
//#endregion
|
|
110
|
-
export { BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, NativeBuildArtifactKind, NativeBuildRow, NativeBuildSubmissionDestination, ReleaseCatalogRow, ReleaseRow };
|
|
168
|
+
export { BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, IosDeviceRow, IosDeviceStatus, NativeBuildArtifactKind, NativeBuildExportMethod, NativeBuildRow, NativeBuildSubmissionDestination, ReleaseCatalogRow, ReleaseRow };
|
|
@@ -69,7 +69,13 @@ interface ChannelRow {
|
|
|
69
69
|
/** The kinds of artifact a native build registers. */
|
|
70
70
|
type NativeBuildArtifactKind = "apk" | "aab" | "ipa" | "app";
|
|
71
71
|
/** The store track a native build was submitted to. */
|
|
72
|
-
type NativeBuildSubmissionDestination = "testflight" | "play-internal";
|
|
72
|
+
type NativeBuildSubmissionDestination = "testflight" | "play-internal" | "play-closed" | "play-open" | "play-production";
|
|
73
|
+
/**
|
|
74
|
+
* How an iOS `.ipa` was exported, as its embedded provisioning profile says:
|
|
75
|
+
* for the App Store (no device list), ad hoc or development (a device list,
|
|
76
|
+
* development's with `get-task-allow`), or enterprise (every device).
|
|
77
|
+
*/
|
|
78
|
+
type NativeBuildExportMethod = "app-store" | "ad-hoc" | "development" | "enterprise";
|
|
73
79
|
/**
|
|
74
80
|
* A registered native build: its artifact in storage, the scope it serves,
|
|
75
81
|
* and `min_bundle_id`, the `bundles` row of the bundle built into it.
|
|
@@ -105,6 +111,58 @@ interface NativeBuildRow {
|
|
|
105
111
|
* by the build number, and a fingerprint build records no app version.
|
|
106
112
|
*/
|
|
107
113
|
readonly submitted_version: string | null;
|
|
114
|
+
/**
|
|
115
|
+
* Whether the build is marked as what the store sells, which deploys patch
|
|
116
|
+
* from over the scope's newest build. A scope has one at most.
|
|
117
|
+
*/
|
|
118
|
+
readonly is_store_build: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Whether the build is a sandbox build, one built from a scheme with
|
|
121
|
+
* `sandbox: true` or imported with the sandbox layer. Set when the build
|
|
122
|
+
* registers and never changed. A sandbox build is never the store build.
|
|
123
|
+
*/
|
|
124
|
+
readonly is_sandbox: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* The URL scheme a sandbox build's artifact registers, which its preview
|
|
127
|
+
* links open. Null on any other build, and on a sandbox build registered
|
|
128
|
+
* before it was recorded, which registered `hu-sandbox-<app ID>`.
|
|
129
|
+
*/
|
|
130
|
+
readonly sandbox_url_scheme: string | null;
|
|
131
|
+
/**
|
|
132
|
+
* How an `.ipa` was exported, read from its profile when it registered and
|
|
133
|
+
* never changed. Null on any other artifact, and on an `.ipa` registered
|
|
134
|
+
* before it was recorded.
|
|
135
|
+
*/
|
|
136
|
+
readonly export_method: NativeBuildExportMethod | null;
|
|
137
|
+
}
|
|
138
|
+
/** Where an iOS device is in the registry: requested, approved, or registered with Apple. */
|
|
139
|
+
type IosDeviceStatus = "pending" | "approved" | "registered";
|
|
140
|
+
/**
|
|
141
|
+
* An iPhone or iPad a team asked to install ad hoc builds on: the device
|
|
142
|
+
* registry the CLI registers with Apple from. Holds personal data: a UDID, a
|
|
143
|
+
* name, and emails.
|
|
144
|
+
*/
|
|
145
|
+
interface IosDeviceRow {
|
|
146
|
+
readonly id: string;
|
|
147
|
+
/** The UDID in lower case, in whichever of Apple's two formats it came. */
|
|
148
|
+
readonly udid: string;
|
|
149
|
+
/** The name App Store Connect shows once it is registered. */
|
|
150
|
+
readonly name: string;
|
|
151
|
+
readonly status: IosDeviceStatus;
|
|
152
|
+
/** Who asked for it, or null for the CLI. */
|
|
153
|
+
readonly requested_by: string | null;
|
|
154
|
+
readonly created_at_ms: number;
|
|
155
|
+
/** Who approved it: a Console email, or null for the CLI. */
|
|
156
|
+
readonly approved_by: string | null;
|
|
157
|
+
readonly approved_at_ms: number | null;
|
|
158
|
+
/** When it first counted as registered with Apple. */
|
|
159
|
+
readonly registered_at_ms: number | null;
|
|
160
|
+
/** The App Store Connect issuer of the account that registered it, set once. */
|
|
161
|
+
readonly apple_issuer_id: string | null;
|
|
162
|
+
/** Why Apple didn't take it or stopped counting it, in Apple's words or ours. */
|
|
163
|
+
readonly apple_error: string | null;
|
|
164
|
+
/** The newest native build whose .ipa the CLI checked lists it. */
|
|
165
|
+
readonly build_id: string | null;
|
|
108
166
|
}
|
|
109
167
|
//#endregion
|
|
110
|
-
export { BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, NativeBuildArtifactKind, NativeBuildRow, NativeBuildSubmissionDestination, ReleaseCatalogRow, ReleaseRow };
|
|
168
|
+
export { BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, IosDeviceRow, IosDeviceStatus, NativeBuildArtifactKind, NativeBuildExportMethod, NativeBuildRow, NativeBuildSubmissionDestination, ReleaseCatalogRow, ReleaseRow };
|
package/dist/types/index.cjs
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
const require_databaseConfig = require("./databaseConfig.cjs");
|
|
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
10
|
exports.isRemoteDatabase = require_databaseConfig.isRemoteDatabase;
|
|
11
|
+
exports.resolveLazy = resolveLazy;
|
|
9
12
|
exports.supportedIosPlatforms = supportedIosPlatforms;
|