@ariacompute/engine-ts 1.18.1 → 1.19.2

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/index.d.ts CHANGED
@@ -74,7 +74,7 @@ export declare function cachedFfiPath(platform?: string): string | undefined;
74
74
  export declare function ffiAssetOs(platform?: string, arch?: string): string;
75
75
  export declare function selectLatestStable(releases: Array<Record<string, unknown>>): string;
76
76
  export declare function extractFfiArchive(archive: string, destDir: string, want?: string): string;
77
- /** Return a path to libaria_ffi, downloading the latest stable Release if needed. */
77
+ /** Return a path to libaria-engine_ffi, downloading the latest stable Release if needed. */
78
78
  export declare function ensureFfiLib(site?: string): Promise<string>;
79
79
  export declare function isLocalRef(modelRef: string): boolean;
80
80
  export declare class Engine {
package/dist/index.js CHANGED
@@ -350,10 +350,10 @@ async function downloadModel(model, tokenOrOpts, site = DEFAULT_SITE) {
350
350
  const SDK_UA = "aria-engine-sdk/0.1.0";
351
351
  function ffiLibName(platform = process.platform) {
352
352
  if (platform === "win32" || platform.toLowerCase().startsWith("win"))
353
- return "aria_ffi.dll";
353
+ return "aria-engine_ffi.dll";
354
354
  if (platform === "darwin")
355
- return "libaria_ffi.dylib";
356
- return "libaria_ffi.so";
355
+ return "libaria-engine_ffi.dylib";
356
+ return "libaria-engine_ffi.so";
357
357
  }
358
358
  function libDir() {
359
359
  return path.join(ariaHome(), "lib");
@@ -378,7 +378,7 @@ function ffiAssetOs(platform = process.platform, arch = process.arch) {
378
378
  if ((p === "win32" || p.startsWith("win")) && (a === "x64" || a === "x86_64" || a === "amd64")) {
379
379
  return "windows_x86_64";
380
380
  }
381
- throw new Error(`unsupported platform ${platform}/${arch} for libaria_ffi`);
381
+ throw new Error(`unsupported platform ${platform}/${arch} for libaria-engine_ffi`);
382
382
  }
383
383
  function stripV(tag) {
384
384
  const t = tag.trim();
@@ -413,7 +413,7 @@ function selectLatestStable(releases) {
413
413
  }
414
414
  }
415
415
  if (!bestTag)
416
- throw new Error("no stable release found for libaria_ffi");
416
+ throw new Error("no stable release found for libaria-engine_ffi");
417
417
  return stripV(bestTag);
418
418
  }
419
419
  function upgradeOrg(site) {
@@ -491,7 +491,7 @@ function installFfiFromReleases(raw, archiveBytes) {
491
491
  if (!Array.isArray(releases))
492
492
  throw new Error("unexpected releases payload");
493
493
  const ver = selectLatestStable(releases);
494
- const assetName = `libaria_ffi_${ver}_${ffiAssetOs()}.tar.gz`;
494
+ const assetName = `libaria-engine_ffi_${ver}_${ffiAssetOs()}.tar.gz`;
495
495
  let url;
496
496
  for (const rel of releases) {
497
497
  const tag = String(rel.tag_name || rel.tag || "");
@@ -521,7 +521,7 @@ function installFfiFromReleases(raw, archiveBytes) {
521
521
  fs.rmSync(staging, { recursive: true, force: true });
522
522
  }
523
523
  }
524
- /** Return a path to libaria_ffi, downloading the latest stable Release if needed. */
524
+ /** Return a path to libaria-engine_ffi, downloading the latest stable Release if needed. */
525
525
  async function ensureFfiLib(site) {
526
526
  const env = process.env.ARIA_FFI_LIB;
527
527
  if (env && fs.existsSync(env))
@@ -557,7 +557,7 @@ function loadLib(ffiLib, site) {
557
557
  cachedFfiPath() ||
558
558
  ensureFfiLibSync(site);
559
559
  if (!libPath)
560
- throw new Error("Cannot locate libaria_ffi");
560
+ throw new Error("Cannot locate libaria-engine_ffi");
561
561
  const koffiNS = require("koffi");
562
562
  return koffiNS.load(libPath);
563
563
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ariacompute/engine-ts",
3
- "version": "1.18.1",
3
+ "version": "1.19.2",
4
4
  "description": "TypeScript/Node SDK for Aria Engine",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",