@noormdev/sdk 1.4.1 → 1.5.0

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.
@@ -1,5 +1,6 @@
1
1
  import { createRequire } from 'module';
2
- import { attempt, observer, attemptSync, shouldSkipConfirmations } from './chunk-LY2F7ZFI.js';
2
+ import { observer, shouldSkipConfirmations } from './chunk-6LG4ENOJ.js';
3
+ import { attempt, attemptSync } from './chunk-TXDGFA44.js';
3
4
  import { __commonJS, __toESM } from './chunk-D2XW2UOP.js';
4
5
  import { generateKeyPairSync, randomBytes, createCipheriv, createPrivateKey, createPublicKey, diffieHellman, hkdfSync, createDecipheriv } from 'crypto';
5
6
 
@@ -97660,5 +97661,5 @@ async function listVaultSecretKeysChecked(gate, db, dialect) {
97660
97661
  }
97661
97662
 
97662
97663
  export { assertPolicy, assertVaultPolicy, checkConfigPolicy, deleteVaultSecret, deleteVaultSecretChecked, detectAgentHarness, encryptVaultKey, getAllVaultSecrets, getNoormTables, getVaultKey, getVaultKeyChecked, getVaultSecret, getVaultStatus, guarded, initializeVault, initializeVaultChecked, listVaultSecretKeys, listVaultSecretKeysChecked, noormDb, resolveLegacyAccess, setVaultSecret, setVaultSecretChecked, vaultSecretExists };
97663
- //# sourceMappingURL=chunk-FSVO6NAJ.js.map
97664
- //# sourceMappingURL=chunk-FSVO6NAJ.js.map
97664
+ //# sourceMappingURL=chunk-WUMCIKEQ.js.map
97665
+ //# sourceMappingURL=chunk-WUMCIKEQ.js.map
@@ -1,11 +1,12 @@
1
1
  import { createRequire } from 'module';
2
- export { eta, isTemplate, processFile, processFiles, renderTemplate } from './chunk-G4B7EHL7.js';
2
+ export { eta, isTemplate, processFile, processFiles, renderTemplate } from './chunk-M7Q44VFJ.js';
3
3
  import './chunk-UOFJT5PY.js';
4
- import './chunk-LY2F7ZFI.js';
4
+ import './chunk-6LG4ENOJ.js';
5
+ import './chunk-TXDGFA44.js';
5
6
  import './chunk-TBRUDUBQ.js';
6
7
  import './chunk-YJBKNUTP.js';
7
8
  import './chunk-D2XW2UOP.js';
8
9
 
9
10
  createRequire(import.meta.url);
10
- //# sourceMappingURL=engine-MZQ364EH.js.map
11
- //# sourceMappingURL=engine-MZQ364EH.js.map
11
+ //# sourceMappingURL=engine-P74UTJQO.js.map
12
+ //# sourceMappingURL=engine-P74UTJQO.js.map
package/dist/index.d.ts CHANGED
@@ -2541,6 +2541,42 @@ export declare class ChangesNamespace {
2541
2541
  */
2542
2542
  getFileHistory(operationId: number): Promise<FileHistoryRecord[]>;
2543
2543
  }
2544
+ /**
2545
+ * A session holding a lock the watched statement is waiting on.
2546
+ */
2547
+ export interface BlockingSession {
2548
+ pid: number;
2549
+ /** Start of the blocker's statement text, or its command/status when no text is visible. */
2550
+ query: string | null;
2551
+ /** How long the blocker has been in its current transaction or request. */
2552
+ ageMs: number | null;
2553
+ }
2554
+ /**
2555
+ * Progress an operation reports about itself, from the dialect's progress views.
2556
+ */
2557
+ export interface OperationProgress {
2558
+ /** What is running, e.g. `CREATE INDEX`, `VACUUM`, `COPY FROM`. */
2559
+ operation: string;
2560
+ /** Phase within the operation, e.g. `building index: loading tuples`. */
2561
+ phase: string | null;
2562
+ relation: string | null;
2563
+ done: number | null;
2564
+ total: number | null;
2565
+ /** 0-100, when the dialect reports enough to compute it. */
2566
+ percent: number | null;
2567
+ }
2568
+ /**
2569
+ * What the server says about a running statement at one point in time.
2570
+ */
2571
+ export interface StatementStatus {
2572
+ /** Session state, e.g. `active`, `suspended`, a mysql thread state. */
2573
+ state: string | null;
2574
+ /** What the session is waiting on, e.g. `Lock: transactionid`. Null when it is working. */
2575
+ waitEvent: string | null;
2576
+ blockedBy: BlockingSession[];
2577
+ workers: number;
2578
+ progress: OperationProgress | null;
2579
+ }
2544
2580
  export declare class RunNamespace {
2545
2581
  #private;
2546
2582
  constructor(state: ContextState);
@@ -2650,6 +2686,8 @@ export interface ProcedureSummary {
2650
2686
  name: string;
2651
2687
  schema?: string;
2652
2688
  parameterCount: number;
2689
+ /** Argument list that tells PostgreSQL overloads apart, e.g. `v integer, w text`. */
2690
+ signature?: string;
2653
2691
  }
2654
2692
  /**
2655
2693
  * Function summary for list display.
@@ -2659,6 +2697,8 @@ export interface FunctionSummary {
2659
2697
  schema?: string;
2660
2698
  parameterCount: number;
2661
2699
  returnType: string;
2700
+ /** Argument list that tells PostgreSQL overloads apart, e.g. `v integer, w text`. */
2701
+ signature?: string;
2662
2702
  }
2663
2703
  /**
2664
2704
  * Type/Enum summary for list display.
@@ -4480,6 +4520,17 @@ export interface NoormEvents extends SettingsEvents, UpdateEvents, VaultEvents,
4480
4520
  filepath: string;
4481
4521
  reason: "unchanged" | "already-run";
4482
4522
  };
4523
+ /**
4524
+ * A file has run past the watch delay. Repeats every watch interval until
4525
+ * it finishes. `status` is null when the dialect has no probe (sqlite) or
4526
+ * the server could not be asked.
4527
+ */
4528
+ "file:progress": {
4529
+ filepath: string;
4530
+ elapsedMs: number;
4531
+ sessionId: number | null;
4532
+ status: StatementStatus | null;
4533
+ };
4483
4534
  "file:dry-run": {
4484
4535
  filepath: string;
4485
4536
  status: "success" | "failed";
@@ -4688,7 +4739,11 @@ export interface NoormEvents extends SettingsEvents, UpdateEvents, VaultEvents,
4688
4739
  };
4689
4740
  "connection:error": {
4690
4741
  configName: string;
4742
+ /** Worded for the user. */
4691
4743
  error: string;
4744
+ /** What the server or driver reported, for the log: its code(s) and message(s). */
4745
+ serverCode?: string;
4746
+ serverMessage?: string;
4692
4747
  };
4693
4748
  "app:starting": {
4694
4749
  mode: AppMode;