@openusd-wasm/pxr 0.0.1 → 0.0.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.
@@ -319,6 +319,14 @@ function normalizeCallbacks(callbacks) {
319
319
  if (!callbacks) return [];
320
320
  return Array.isArray(callbacks) ? callbacks : [callbacks];
321
321
  }
322
+ function withDefaultOpenUsdEnv(env) {
323
+ return {
324
+ TMPDIR: "/tmp",
325
+ TEMP: "/tmp",
326
+ TMP: "/tmp",
327
+ ...env && typeof env === "object" ? env : {}
328
+ };
329
+ }
322
330
  function readFile(FS, path, encodingOrOpts) {
323
331
  if (typeof encodingOrOpts === "string") {
324
332
  if (encodingOrOpts === "utf8" || encodingOrOpts === "utf-8") return FS.readFile(path, { encoding: "utf8" });
@@ -417,6 +425,7 @@ async function createPxr(options) {
417
425
  workerURL,
418
426
  locateFile
419
427
  });
428
+ wasmOptions.ENV = withDefaultOpenUsdEnv(wasmOptions.ENV);
420
429
  wasmOptions.preRun = [...normalizeCallbacks(preRun), (module) => {
421
430
  for (const mount of mounts) mountFilesystem(module, mount);
422
431
  installFiles(module, files);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openusd-wasm/pxr",
3
3
  "type": "module",
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "description": "Community TypeScript facade for OpenUSD pxr WebAssembly bindings.",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/openusd-wasm/openusd-pxr-wasm",