@atscript/db 0.1.118 → 0.1.120

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/sync.d.cts CHANGED
@@ -287,7 +287,7 @@ declare class SchemaSync {
287
287
  /**
288
288
  * Runs schema synchronization with distributed locking.
289
289
  */
290
- run(types: TAtscriptAnnotatedType[], opts?: TSyncOptions): Promise<TSyncResult>;
290
+ run(types: readonly TAtscriptAnnotatedType[], opts?: TSyncOptions): Promise<TSyncResult>;
291
291
  /**
292
292
  * Surfaces the run outcome per the `onError` policy. Reporting must never be
293
293
  * silently lost to the NoopLogger default — when no real logger is
@@ -298,7 +298,7 @@ declare class SchemaSync {
298
298
  /**
299
299
  * Computes a dry-run plan showing what `run()` would do, without executing any DDL.
300
300
  */
301
- plan(types: TAtscriptAnnotatedType[], opts?: Pick<TSyncOptions, "force" | "safe">): Promise<TSyncPlan>;
301
+ plan(types: readonly TAtscriptAnnotatedType[], opts?: Pick<TSyncOptions, "force" | "safe">): Promise<TSyncPlan>;
302
302
  /** Fallback typeMapper for snapshot-based Path B: compares designType directly, skips unions. */
303
303
  private resolveTypeMapper;
304
304
  private planTable;
@@ -388,7 +388,7 @@ declare function hasForeignKeyChanges(diff: TForeignKeyDiff): boolean;
388
388
  * @param types - Atscript annotated types to synchronize.
389
389
  * @param opts - Lock TTL, wait timeout, force mode, etc.
390
390
  */
391
- declare function syncSchema(space: DbSpace, types: TAtscriptAnnotatedType[], opts?: TSyncOptions): Promise<TSyncResult>;
391
+ declare function syncSchema(space: DbSpace, types: readonly TAtscriptAnnotatedType[], opts?: TSyncOptions): Promise<TSyncResult>;
392
392
  /**
393
393
  * Computes a dry-run plan showing what {@link syncSchema} would do, without
394
394
  * executing any DDL. Wraps {@link SchemaSync.plan}.
@@ -410,6 +410,6 @@ declare function syncSchema(space: DbSpace, types: TAtscriptAnnotatedType[], opt
410
410
  * Note: reading the stored baseline still requires a live DB connection (the
411
411
  * snapshot lives in the `__atscript_control` table).
412
412
  */
413
- declare function planSchema(space: DbSpace, types: TAtscriptAnnotatedType[], opts?: Pick<TSyncOptions, "force" | "safe">): Promise<TSyncPlan>;
413
+ declare function planSchema(space: DbSpace, types: readonly TAtscriptAnnotatedType[], opts?: Pick<TSyncOptions, "force" | "safe">): Promise<TSyncPlan>;
414
414
  //#endregion
415
415
  export { SchemaSync, SyncEntry, type TFieldSnapshot, type TForeignKeyDiff, type TForeignKeySnapshot, type TSyncColors, type TSyncEntryStatus, type TSyncOptions, type TSyncPlan, type TSyncResult, type TTableSnapshot, type TViewSnapshot, computeColumnDiff, computeForeignKeyDiff, computeSchemaHash, computeTableHash, computeTableOptionDiff, computeTableSnapshot, computeViewSnapshot, fkKey, hasForeignKeyChanges, planSchema, readStoredSnapshot, snapshotToExistingColumns, snapshotToExistingTableOptions, syncSchema };
package/dist/sync.d.mts CHANGED
@@ -287,7 +287,7 @@ declare class SchemaSync {
287
287
  /**
288
288
  * Runs schema synchronization with distributed locking.
289
289
  */
290
- run(types: TAtscriptAnnotatedType[], opts?: TSyncOptions): Promise<TSyncResult>;
290
+ run(types: readonly TAtscriptAnnotatedType[], opts?: TSyncOptions): Promise<TSyncResult>;
291
291
  /**
292
292
  * Surfaces the run outcome per the `onError` policy. Reporting must never be
293
293
  * silently lost to the NoopLogger default — when no real logger is
@@ -298,7 +298,7 @@ declare class SchemaSync {
298
298
  /**
299
299
  * Computes a dry-run plan showing what `run()` would do, without executing any DDL.
300
300
  */
301
- plan(types: TAtscriptAnnotatedType[], opts?: Pick<TSyncOptions, "force" | "safe">): Promise<TSyncPlan>;
301
+ plan(types: readonly TAtscriptAnnotatedType[], opts?: Pick<TSyncOptions, "force" | "safe">): Promise<TSyncPlan>;
302
302
  /** Fallback typeMapper for snapshot-based Path B: compares designType directly, skips unions. */
303
303
  private resolveTypeMapper;
304
304
  private planTable;
@@ -388,7 +388,7 @@ declare function hasForeignKeyChanges(diff: TForeignKeyDiff): boolean;
388
388
  * @param types - Atscript annotated types to synchronize.
389
389
  * @param opts - Lock TTL, wait timeout, force mode, etc.
390
390
  */
391
- declare function syncSchema(space: DbSpace, types: TAtscriptAnnotatedType[], opts?: TSyncOptions): Promise<TSyncResult>;
391
+ declare function syncSchema(space: DbSpace, types: readonly TAtscriptAnnotatedType[], opts?: TSyncOptions): Promise<TSyncResult>;
392
392
  /**
393
393
  * Computes a dry-run plan showing what {@link syncSchema} would do, without
394
394
  * executing any DDL. Wraps {@link SchemaSync.plan}.
@@ -410,6 +410,6 @@ declare function syncSchema(space: DbSpace, types: TAtscriptAnnotatedType[], opt
410
410
  * Note: reading the stored baseline still requires a live DB connection (the
411
411
  * snapshot lives in the `__atscript_control` table).
412
412
  */
413
- declare function planSchema(space: DbSpace, types: TAtscriptAnnotatedType[], opts?: Pick<TSyncOptions, "force" | "safe">): Promise<TSyncPlan>;
413
+ declare function planSchema(space: DbSpace, types: readonly TAtscriptAnnotatedType[], opts?: Pick<TSyncOptions, "force" | "safe">): Promise<TSyncPlan>;
414
414
  //#endregion
415
415
  export { SchemaSync, SyncEntry, type TFieldSnapshot, type TForeignKeyDiff, type TForeignKeySnapshot, type TSyncColors, type TSyncEntryStatus, type TSyncOptions, type TSyncPlan, type TSyncResult, type TTableSnapshot, type TViewSnapshot, computeColumnDiff, computeForeignKeyDiff, computeSchemaHash, computeTableHash, computeTableOptionDiff, computeTableSnapshot, computeViewSnapshot, fkKey, hasForeignKeyChanges, planSchema, readStoredSnapshot, snapshotToExistingColumns, snapshotToExistingTableOptions, syncSchema };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atscript/db",
3
- "version": "0.1.118",
3
+ "version": "0.1.120",
4
4
  "description": "Database adapter utilities for atscript.",
5
5
  "keywords": [
6
6
  "atscript",