@unityclaw/sdk 1.0.0 → 1.0.1

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.cjs CHANGED
@@ -40,6 +40,8 @@ __export(index_exports, {
40
40
  module.exports = __toCommonJS(index_exports);
41
41
 
42
42
  // src/client.ts
43
+ var import_path2 = __toESM(require("path"), 1);
44
+ var import_os = __toESM(require("os"), 1);
43
45
  var import_axios2 = __toESM(require("axios"), 1);
44
46
 
45
47
  // src/task-folder.ts
@@ -743,12 +745,10 @@ var UnityClawClient = class {
743
745
  apiKey,
744
746
  baseUrl,
745
747
  taskDir: config.taskDir ?? (() => {
746
- const path = require("path");
747
- const os = require("os");
748
748
  try {
749
- return path.join(process.cwd(), "tasks");
749
+ return import_path2.default.join(process.cwd(), "tasks");
750
750
  } catch {
751
- return path.join(os.homedir(), "tasks");
751
+ return import_path2.default.join(import_os.default.homedir(), "tasks");
752
752
  }
753
753
  })(),
754
754
  timeout: config.timeout ?? DEFAULT_TIMEOUT,
package/dist/index.js CHANGED
@@ -1,11 +1,6 @@
1
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
- }) : x)(function(x) {
4
- if (typeof require !== "undefined") return require.apply(this, arguments);
5
- throw Error('Dynamic require of "' + x + '" is not supported');
6
- });
7
-
8
1
  // src/client.ts
2
+ import path from "path";
3
+ import os from "os";
9
4
  import axios2, { AxiosError } from "axios";
10
5
 
11
6
  // src/task-folder.ts
@@ -709,8 +704,6 @@ var UnityClawClient = class {
709
704
  apiKey,
710
705
  baseUrl,
711
706
  taskDir: config.taskDir ?? (() => {
712
- const path = __require("path");
713
- const os = __require("os");
714
707
  try {
715
708
  return path.join(process.cwd(), "tasks");
716
709
  } catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unityclaw/sdk",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Node.js SDK for UnityClaw API - AI-powered image/video generation, media analysis, and more",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -8,9 +8,9 @@
8
8
  "types": "./dist/index.d.ts",
9
9
  "exports": {
10
10
  ".": {
11
+ "types": "./dist/index.d.ts",
11
12
  "import": "./dist/index.js",
12
- "require": "./dist/index.cjs",
13
- "types": "./dist/index.d.ts"
13
+ "require": "./dist/index.cjs"
14
14
  }
15
15
  },
16
16
  "files": [