@tachybase/sdk 0.23.40 → 0.23.47

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.
Files changed (2) hide show
  1. package/lib/APIClient.js +17 -18
  2. package/package.json +2 -2
package/lib/APIClient.js CHANGED
@@ -38,21 +38,20 @@ var import_axios = __toESM(require("axios"));
38
38
  var import_qs = __toESM(require("qs"));
39
39
  var import_getSubAppName = __toESM(require("./getSubAppName"));
40
40
  const _Auth = class _Auth {
41
- api;
42
- KEYS = {
43
- locale: "TACHYBASE_LOCALE",
44
- role: "TACHYBASE_ROLE",
45
- token: "TACHYBASE_TOKEN",
46
- authenticator: "TACHYBASE_AUTH",
47
- theme: "TACHYBASE_THEME"
48
- };
49
- options = {
50
- locale: null,
51
- role: null,
52
- authenticator: null,
53
- token: null
54
- };
55
41
  constructor(api) {
42
+ this.KEYS = {
43
+ locale: "TACHYBASE_LOCALE",
44
+ role: "TACHYBASE_ROLE",
45
+ token: "TACHYBASE_TOKEN",
46
+ authenticator: "TACHYBASE_AUTH",
47
+ theme: "TACHYBASE_THEME"
48
+ };
49
+ this.options = {
50
+ locale: null,
51
+ role: null,
52
+ authenticator: null,
53
+ token: null
54
+ };
56
55
  this.api = api;
57
56
  this.initKeys();
58
57
  this.api.axios.interceptors.request.use(this.middleware.bind(this));
@@ -187,7 +186,10 @@ const _Storage = class _Storage {
187
186
  __name(_Storage, "Storage");
188
187
  let Storage = _Storage;
189
188
  const _MemoryStorage = class _MemoryStorage extends Storage {
190
- items = /* @__PURE__ */ new Map();
189
+ constructor() {
190
+ super(...arguments);
191
+ this.items = /* @__PURE__ */ new Map();
192
+ }
191
193
  clear() {
192
194
  this.items.clear();
193
195
  }
@@ -204,9 +206,6 @@ const _MemoryStorage = class _MemoryStorage extends Storage {
204
206
  __name(_MemoryStorage, "MemoryStorage");
205
207
  let MemoryStorage = _MemoryStorage;
206
208
  const _APIClient = class _APIClient {
207
- axios;
208
- auth;
209
- storage;
210
209
  constructor(instance) {
211
210
  if (typeof instance === "function") {
212
211
  this.axios = instance;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tachybase/sdk",
3
- "version": "0.23.40",
3
+ "version": "0.23.47",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "devDependencies": {
12
12
  "axios-mock-adapter": "^1.22.0",
13
- "vitest": "^1.6.0"
13
+ "vitest": "^3.0.5"
14
14
  },
15
15
  "scripts": {
16
16
  "build": "tachybase-build --no-dts @tachybase/sdk"