@selvajs/compute 5.0.0-beta.3 → 5.0.0-beta.4
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/{core-BMeRVFJI.js → core-CFlbOj2M.js} +2 -2
- package/dist/{core-BMeRVFJI.js.map → core-CFlbOj2M.js.map} +1 -1
- package/dist/{core-D2HyYEM_.cjs → core-UUSszGkB.cjs} +2 -2
- package/dist/{core-D2HyYEM_.cjs.map → core-UUSszGkB.cjs.map} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.cts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.js +1 -1
- package/dist/grasshopper.cjs +1 -1
- package/dist/grasshopper.cjs.map +1 -1
- package/dist/grasshopper.d.cts +1 -1
- package/dist/grasshopper.d.ts +1 -1
- package/dist/grasshopper.js +1 -1
- package/dist/grasshopper.js.map +1 -1
- package/dist/{index-CyKrrYnz.d.ts → index-cMvSohkf.d.cts} +13 -4
- package/dist/{index-CyKrrYnz.d.cts → index-cMvSohkf.d.ts} +13 -4
- package/package.json +1 -1
|
@@ -367,6 +367,14 @@ type FileBaseInfo = {
|
|
|
367
367
|
/** Optional directory path for archive organization (e.g., "extras/docs"). When omitted, file lands at archive root */
|
|
368
368
|
subFolder?: string;
|
|
369
369
|
};
|
|
370
|
+
type DownloadOptions = {
|
|
371
|
+
/**
|
|
372
|
+
* Saves each finished archive instead of the default `<a download>` click. For hosts where an
|
|
373
|
+
* anchor download doesn't work, such as an embedded WebView that hands saves to native code.
|
|
374
|
+
* Awaited when it returns a promise, so archives still save one at a time.
|
|
375
|
+
*/
|
|
376
|
+
saveBlob?: (blob: Blob, fileName: string) => unknown;
|
|
377
|
+
};
|
|
370
378
|
//#endregion
|
|
371
379
|
//#region src/core/files/handle-files.d.ts
|
|
372
380
|
/**
|
|
@@ -377,7 +385,7 @@ type FileBaseInfo = {
|
|
|
377
385
|
*/
|
|
378
386
|
declare const extractFilesFromComputeResponse: (downloadableFiles: FileData[], additionalFiles?: FileBaseInfo[] | FileBaseInfo | null) => Promise<ProcessedFile[]>;
|
|
379
387
|
/** Downloads files from a compute response as a ZIP archive. */
|
|
380
|
-
declare const downloadFileData: (downloadableFiles: FileData[], fileFoldername: string, additionalFiles?: FileBaseInfo[] | FileBaseInfo | null) => Promise<void>;
|
|
388
|
+
declare const downloadFileData: (downloadableFiles: FileData[], fileFoldername: string, additionalFiles?: FileBaseInfo[] | FileBaseInfo | null, options?: DownloadOptions) => Promise<void>;
|
|
381
389
|
/**
|
|
382
390
|
* Download one archive per `Sub Folder` root (see {@link groupFilesByRoot}). Files with no root go
|
|
383
391
|
* into `fallbackName`, so a definition that never sets `Sub Folder` downloads as one archive.
|
|
@@ -388,8 +396,9 @@ declare const downloadFileData: (downloadableFiles: FileData[], fileFoldername:
|
|
|
388
396
|
* @param downloadableFiles - `FileData` items from the compute response.
|
|
389
397
|
* @param fallbackName - Archive name for files with no `Sub Folder` root.
|
|
390
398
|
* @param additionalFiles - Extra files to package; they carry no root and join the fallback archive.
|
|
399
|
+
* @param options - `saveBlob` replaces the anchor download for every archive.
|
|
391
400
|
*/
|
|
392
|
-
declare const downloadFileDataByRoot: (downloadableFiles: FileData[], fallbackName: string, additionalFiles?: FileBaseInfo[] | FileBaseInfo | null) => Promise<void>;
|
|
401
|
+
declare const downloadFileDataByRoot: (downloadableFiles: FileData[], fallbackName: string, additionalFiles?: FileBaseInfo[] | FileBaseInfo | null, options?: DownloadOptions) => Promise<void>;
|
|
393
402
|
//#endregion
|
|
394
403
|
//#region src/core/files/sub-folder.d.ts
|
|
395
404
|
/**
|
|
@@ -423,5 +432,5 @@ declare const groupFilesByRoot: <T extends Pick<FileData, "subFolder">>(files: r
|
|
|
423
432
|
files: T[];
|
|
424
433
|
}>;
|
|
425
434
|
//#endregion
|
|
426
|
-
export {
|
|
427
|
-
//# sourceMappingURL=index-
|
|
435
|
+
export { ServerErrorCodeMap as A, enableDebugLogging as C, ComputeAuth as D, fetchCompute as E, ComputeError as M, ErrorCode as N, ComputeConfig as O, ErrorCodes as P, Logger as S, setLogger as T, SolveDefinition as _, extractFilesFromComputeResponse as a, hasField as b, FileData as c, ProbeVerdict as d, classifyProbeFailure as f, DefinitionRef as g, validateServerUrl as h, downloadFileDataByRoot as i, ServerTiming as j, RetryPolicy as k, ProcessedFile as l, ValidateServerUrlOptions as m, subFolderSegments as n, DownloadOptions as o, DEFAULT_BLOCKED_HOST as p, downloadFileData as r, FileBaseInfo as s, groupFilesByRoot as t, ProbeFailure as u, isDefinitionRef as v, getLogger as w, readField as x, decodeBase64ToBinary as y };
|
|
436
|
+
//# sourceMappingURL=index-cMvSohkf.d.cts.map
|
|
@@ -367,6 +367,14 @@ type FileBaseInfo = {
|
|
|
367
367
|
/** Optional directory path for archive organization (e.g., "extras/docs"). When omitted, file lands at archive root */
|
|
368
368
|
subFolder?: string;
|
|
369
369
|
};
|
|
370
|
+
type DownloadOptions = {
|
|
371
|
+
/**
|
|
372
|
+
* Saves each finished archive instead of the default `<a download>` click. For hosts where an
|
|
373
|
+
* anchor download doesn't work, such as an embedded WebView that hands saves to native code.
|
|
374
|
+
* Awaited when it returns a promise, so archives still save one at a time.
|
|
375
|
+
*/
|
|
376
|
+
saveBlob?: (blob: Blob, fileName: string) => unknown;
|
|
377
|
+
};
|
|
370
378
|
//#endregion
|
|
371
379
|
//#region src/core/files/handle-files.d.ts
|
|
372
380
|
/**
|
|
@@ -377,7 +385,7 @@ type FileBaseInfo = {
|
|
|
377
385
|
*/
|
|
378
386
|
declare const extractFilesFromComputeResponse: (downloadableFiles: FileData[], additionalFiles?: FileBaseInfo[] | FileBaseInfo | null) => Promise<ProcessedFile[]>;
|
|
379
387
|
/** Downloads files from a compute response as a ZIP archive. */
|
|
380
|
-
declare const downloadFileData: (downloadableFiles: FileData[], fileFoldername: string, additionalFiles?: FileBaseInfo[] | FileBaseInfo | null) => Promise<void>;
|
|
388
|
+
declare const downloadFileData: (downloadableFiles: FileData[], fileFoldername: string, additionalFiles?: FileBaseInfo[] | FileBaseInfo | null, options?: DownloadOptions) => Promise<void>;
|
|
381
389
|
/**
|
|
382
390
|
* Download one archive per `Sub Folder` root (see {@link groupFilesByRoot}). Files with no root go
|
|
383
391
|
* into `fallbackName`, so a definition that never sets `Sub Folder` downloads as one archive.
|
|
@@ -388,8 +396,9 @@ declare const downloadFileData: (downloadableFiles: FileData[], fileFoldername:
|
|
|
388
396
|
* @param downloadableFiles - `FileData` items from the compute response.
|
|
389
397
|
* @param fallbackName - Archive name for files with no `Sub Folder` root.
|
|
390
398
|
* @param additionalFiles - Extra files to package; they carry no root and join the fallback archive.
|
|
399
|
+
* @param options - `saveBlob` replaces the anchor download for every archive.
|
|
391
400
|
*/
|
|
392
|
-
declare const downloadFileDataByRoot: (downloadableFiles: FileData[], fallbackName: string, additionalFiles?: FileBaseInfo[] | FileBaseInfo | null) => Promise<void>;
|
|
401
|
+
declare const downloadFileDataByRoot: (downloadableFiles: FileData[], fallbackName: string, additionalFiles?: FileBaseInfo[] | FileBaseInfo | null, options?: DownloadOptions) => Promise<void>;
|
|
393
402
|
//#endregion
|
|
394
403
|
//#region src/core/files/sub-folder.d.ts
|
|
395
404
|
/**
|
|
@@ -423,5 +432,5 @@ declare const groupFilesByRoot: <T extends Pick<FileData, "subFolder">>(files: r
|
|
|
423
432
|
files: T[];
|
|
424
433
|
}>;
|
|
425
434
|
//#endregion
|
|
426
|
-
export {
|
|
427
|
-
//# sourceMappingURL=index-
|
|
435
|
+
export { ServerErrorCodeMap as A, enableDebugLogging as C, ComputeAuth as D, fetchCompute as E, ComputeError as M, ErrorCode as N, ComputeConfig as O, ErrorCodes as P, Logger as S, setLogger as T, SolveDefinition as _, extractFilesFromComputeResponse as a, hasField as b, FileData as c, ProbeVerdict as d, classifyProbeFailure as f, DefinitionRef as g, validateServerUrl as h, downloadFileDataByRoot as i, ServerTiming as j, RetryPolicy as k, ProcessedFile as l, ValidateServerUrlOptions as m, subFolderSegments as n, DownloadOptions as o, DEFAULT_BLOCKED_HOST as p, downloadFileData as r, FileBaseInfo as s, groupFilesByRoot as t, ProbeFailure as u, isDefinitionRef as v, getLogger as w, readField as x, decodeBase64ToBinary as y };
|
|
436
|
+
//# sourceMappingURL=index-cMvSohkf.d.ts.map
|