@econ-v1/app-sdk 7.6.15 → 7.6.17

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.
@@ -32,7 +32,10 @@ export declare const NODE_BUILTINS: ReadonlySet<string>;
32
32
  * build-time gate accepts them ahead of a runtime that provides them; an app
33
33
  * using them must depend on that node-app-burger release. `readSync`,
34
34
  * `fstatSync` and `utimesSync` arrive with the second data-app pack (asked
35
- * for by the node-app-memory flip, econ-v1/node-app-memory#40).
35
+ * for by the node-app-memory flip, econ-v1/node-app-memory#40). `statfsSync`,
36
+ * `deflateRawSync`, `inflateRawSync` and `setSystemTime` arrive with the
37
+ * third (node-app-memory's switch to Burger), likewise listed ahead of the
38
+ * release that ships them.
36
39
  */
37
40
  export declare const BURGER_EXPORTS: Readonly<Record<BurgerModule, readonly string[]>>;
38
41
  /**
@@ -156,7 +156,8 @@ var BURGER_EXPORTS = {
156
156
  "constants",
157
157
  "readSync",
158
158
  "fstatSync",
159
- "utimesSync"
159
+ "utimesSync",
160
+ "statfsSync"
160
161
  ],
161
162
  "burger:fs/promises": [
162
163
  "exists",
@@ -191,7 +192,13 @@ var BURGER_EXPORTS = {
191
192
  "burger:crypto": ["randomUUID", "randomBytes", "createHash", "createHmac", "timingSafeEqual"],
192
193
  "burger:buffer": ["Buffer"],
193
194
  "burger:sqlite": ["Database"],
194
- "burger:zlib": ["gzipSync", "gunzipSync", "constants"],
195
+ "burger:zlib": [
196
+ "gzipSync",
197
+ "gunzipSync",
198
+ "constants",
199
+ "deflateRawSync",
200
+ "inflateRawSync"
201
+ ],
195
202
  "burger:async_hooks": ["AsyncLocalStorage"],
196
203
  "burger:test": [
197
204
  "describe",
@@ -203,7 +210,8 @@ var BURGER_EXPORTS = {
203
210
  "afterAll",
204
211
  "expect",
205
212
  "mock",
206
- "setDefaultTimeout"
213
+ "setDefaultTimeout",
214
+ "setSystemTime"
207
215
  ]
208
216
  };
209
217
  var BURGER_DEFAULT_EXPORT = {
@@ -151,7 +151,8 @@ var BURGER_EXPORTS = {
151
151
  "constants",
152
152
  "readSync",
153
153
  "fstatSync",
154
- "utimesSync"
154
+ "utimesSync",
155
+ "statfsSync"
155
156
  ],
156
157
  "burger:fs/promises": [
157
158
  "exists",
@@ -186,7 +187,13 @@ var BURGER_EXPORTS = {
186
187
  "burger:crypto": ["randomUUID", "randomBytes", "createHash", "createHmac", "timingSafeEqual"],
187
188
  "burger:buffer": ["Buffer"],
188
189
  "burger:sqlite": ["Database"],
189
- "burger:zlib": ["gzipSync", "gunzipSync", "constants"],
190
+ "burger:zlib": [
191
+ "gzipSync",
192
+ "gunzipSync",
193
+ "constants",
194
+ "deflateRawSync",
195
+ "inflateRawSync"
196
+ ],
190
197
  "burger:async_hooks": ["AsyncLocalStorage"],
191
198
  "burger:test": [
192
199
  "describe",
@@ -198,7 +205,8 @@ var BURGER_EXPORTS = {
198
205
  "afterAll",
199
206
  "expect",
200
207
  "mock",
201
- "setDefaultTimeout"
208
+ "setDefaultTimeout",
209
+ "setSystemTime"
202
210
  ]
203
211
  };
204
212
  var BURGER_DEFAULT_EXPORT = {
@@ -56,6 +56,20 @@ declare module "burger:fs" {
56
56
  readonly mode: number;
57
57
  }
58
58
 
59
+ /** `statfsSync`'s result, Node's `StatsFs` (number fields; no `bigint` option). Free bytes: `bavail * bsize`. */
60
+ export interface StatsFs {
61
+ /** Filesystem type (`f_type`). */
62
+ readonly type: number;
63
+ /** Block size in bytes. */
64
+ readonly bsize: number;
65
+ readonly blocks: number;
66
+ readonly bfree: number;
67
+ /** Free blocks available to an unprivileged user. */
68
+ readonly bavail: number;
69
+ readonly files: number;
70
+ readonly ffree: number;
71
+ }
72
+
59
73
  /**
60
74
  * A `readdirSync(path, { withFileTypes: true })` entry, Node 22 shape (data-app
61
75
  * pack). The type is the entry's own, symlinks not followed.
@@ -131,6 +145,9 @@ declare module "burger:fs" {
131
145
  export function fstatSync(fd: number): Stats;
132
146
  /** Set access and modification times (seconds since the epoch, or Dates). */
133
147
  export function utimesSync(path: PathLike, atime: number | Date, mtime: number | Date): void;
148
+ // third data-app pack (node-app-memory's switch to Burger):
149
+ /** Usage of the filesystem holding `path`. */
150
+ export function statfsSync(path: PathLike): StatsFs;
134
151
 
135
152
  export interface FsPromises {
136
153
  exists(path: PathLike): Promise<boolean>;
@@ -176,6 +193,7 @@ declare module "burger:fs" {
176
193
  readSync: typeof readSync;
177
194
  fstatSync: typeof fstatSync;
178
195
  utimesSync: typeof utimesSync;
196
+ statfsSync: typeof statfsSync;
179
197
  Dirent: typeof Dirent;
180
198
  promises: FsPromises;
181
199
  };
@@ -307,10 +325,13 @@ declare module "burger:crypto" {
307
325
 
308
326
  /**
309
327
  * Agent runtime pack (node-app-burger ADR 003, >= 0.3.3): the synchronous gzip
310
- * pair of Node's `zlib`. Output is bounded like a whole-file read (half the
311
- * app's memory limit) and by `maxOutputLength`; past either, `ERR_BUFFER_TOO_LARGE`.
328
+ * pair of Node's `zlib`, and from the third data-app pack its raw DEFLATE pair.
329
+ * Output is bounded like a whole-file read (half the app's memory limit) and by
330
+ * `maxOutputLength`; past either, `ERR_BUFFER_TOO_LARGE`.
312
331
  */
313
332
  declare module "burger:zlib" {
333
+ import type { Buffer } from "burger:buffer";
334
+
314
335
  export interface GzipOptions {
315
336
  /** -1 (zlib's default) or 0..9. */
316
337
  level?: number;
@@ -325,11 +346,17 @@ declare module "burger:zlib" {
325
346
  Z_BEST_COMPRESSION: 9;
326
347
  Z_DEFAULT_COMPRESSION: -1;
327
348
  };
328
- export function gzipSync(data: string | Uint8Array | ArrayBuffer | ArrayBufferView, options?: GzipOptions): import("burger:buffer").Buffer;
329
- export function gunzipSync(data: string | Uint8Array | ArrayBuffer | ArrayBufferView, options?: GunzipOptions): import("burger:buffer").Buffer;
349
+ export function gzipSync(data: string | Uint8Array | ArrayBuffer | ArrayBufferView, options?: GzipOptions): Buffer;
350
+ export function gunzipSync(data: string | Uint8Array | ArrayBuffer | ArrayBufferView, options?: GunzipOptions): Buffer;
351
+ // third data-app pack (node-app-memory's switch to Burger): raw DEFLATE (RFC 1951, no header
352
+ // or trailer), byte-compatible with Node's and Bun's.
353
+ export function deflateRawSync(data: string | Uint8Array | ArrayBuffer | ArrayBufferView, options?: GzipOptions): Buffer;
354
+ export function inflateRawSync(data: string | Uint8Array | ArrayBuffer | ArrayBufferView, options?: GunzipOptions): Buffer;
330
355
  const zlib: {
331
356
  gzipSync: typeof gzipSync;
332
357
  gunzipSync: typeof gunzipSync;
358
+ deflateRawSync: typeof deflateRawSync;
359
+ inflateRawSync: typeof inflateRawSync;
333
360
  constants: typeof constants;
334
361
  };
335
362
  export default zlib;
@@ -508,6 +535,8 @@ declare module "burger:test" {
508
535
  export function beforeAll(fn: TestBody): void;
509
536
  export function afterAll(fn: TestBody): void;
510
537
  export function setDefaultTimeout(ms: number): void;
538
+ /** Fake the clock `Date` and `Date.now()` read from (third data-app pack); no argument restores the real one. */
539
+ export function setSystemTime(now?: Date | number): void;
511
540
 
512
541
  export interface Matchers<R> {
513
542
  toBe(expected: unknown): R;
@@ -530,6 +559,9 @@ declare module "burger:test" {
530
559
  /** `|expected - actual| < 10^-digits / 2`; `digits` defaults to 2. */
531
560
  toBeCloseTo(expected: number, digits?: number): R;
532
561
  toStartWith(prefix: string): R;
562
+ toEndWith(suffix: string): R;
563
+ /** The subject is a primitive string (third data-app pack). */
564
+ toBeString(): R;
533
565
  toThrow(expected?: string | RegExp | Error | AsymmetricMatcher | (new (...args: any[]) => Error)): R;
534
566
  toBeInstanceOf(expected: abstract new (...args: any[]) => unknown): R;
535
567
  toContainEqual(expected: unknown): R;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@econ-v1/app-sdk",
3
- "version": "7.6.15",
3
+ "version": "7.6.17",
4
4
  "description": "TypeScript SDK for building Node mini-app plugins (Bun runtime) on the Lightning-powered marketplace daemon",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "author": "Node contributors",