@smartmemory/sdk-js 0.5.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/README.md +266 -0
- package/dist/core-Ds7Kn35C.js +2476 -0
- package/dist/core.js +20 -0
- package/dist/fetch.js +43 -0
- package/dist/index.js +102 -0
- package/dist/progress.js +191 -0
- package/dist/react.js +77 -0
- package/package.json +68 -0
package/dist/core.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { A as e, a as r, d as A, e as I, B as P, D as o, f as n, I as i, M as t, i as g, o as m, p as M, S as h, k as S, T as f, m as p, U as u } from "./core-Ds7Kn35C.js";
|
|
2
|
+
export {
|
|
3
|
+
e as APIError,
|
|
4
|
+
r as AgentAPI,
|
|
5
|
+
A as AuthAPI,
|
|
6
|
+
I as AuthCore,
|
|
7
|
+
P as BaseAPI,
|
|
8
|
+
o as DecisionAPI,
|
|
9
|
+
n as GraphAPI,
|
|
10
|
+
i as InsightsAPI,
|
|
11
|
+
t as MemoryAPI,
|
|
12
|
+
g as ProfileAPI,
|
|
13
|
+
m as RefreshManager,
|
|
14
|
+
M as SSOManager,
|
|
15
|
+
h as SmartMemoryClient,
|
|
16
|
+
S as SubscriptionAPI,
|
|
17
|
+
f as TeamAPI,
|
|
18
|
+
p as TokenManager,
|
|
19
|
+
u as UsageAPI
|
|
20
|
+
};
|
package/dist/fetch.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
function d(e) {
|
|
2
|
+
return async function(c, t = {}) {
|
|
3
|
+
var r;
|
|
4
|
+
const n = {
|
|
5
|
+
"Content-Type": "application/json",
|
|
6
|
+
...e.getAuthHeaders(t.headers)
|
|
7
|
+
}, s = await fetch(c, e.getRequestOptions({ ...t, headers: n }));
|
|
8
|
+
if (s.status === 401 && !t.__isRetry)
|
|
9
|
+
try {
|
|
10
|
+
await e.refreshToken();
|
|
11
|
+
const a = {
|
|
12
|
+
"Content-Type": "application/json",
|
|
13
|
+
...e.getAuthHeaders(t.headers)
|
|
14
|
+
};
|
|
15
|
+
return fetch(
|
|
16
|
+
c,
|
|
17
|
+
e.getRequestOptions({ ...t, headers: a, __isRetry: !0 })
|
|
18
|
+
);
|
|
19
|
+
} catch {
|
|
20
|
+
throw (r = e.clearLocalAuth) == null || r.call(e), new Error("Authentication required");
|
|
21
|
+
}
|
|
22
|
+
return s;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function f(e, { urlPatterns: i = [] } = {}) {
|
|
26
|
+
const c = globalThis.fetch;
|
|
27
|
+
return globalThis.fetch = async function(n, s = {}) {
|
|
28
|
+
const r = typeof n == "string" ? n : n.toString();
|
|
29
|
+
if (!(i.length === 0 || i.some((o) => r.includes(o))))
|
|
30
|
+
return c(n, s);
|
|
31
|
+
const h = {
|
|
32
|
+
...s.headers,
|
|
33
|
+
...e.getAuthHeaders()
|
|
34
|
+
};
|
|
35
|
+
return c(n, { ...s, headers: h });
|
|
36
|
+
}, function() {
|
|
37
|
+
globalThis.fetch = c;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
d as createAuthFetch,
|
|
42
|
+
f as installInterceptor
|
|
43
|
+
};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { A as f, a as u, b, c as A, d as P, e as h, D as I, E as x, G as g, f as w, I as m, M as p, O as k, P as v, g as T, h as B, i as y, R as C, j as E, S as R, k as S, T as F, l as M, m as L, n as G, U as O, V as U, Z as $ } from "./core-Ds7Kn35C.js";
|
|
2
|
+
const i = {
|
|
3
|
+
variables: {
|
|
4
|
+
colorBackground: "transparent",
|
|
5
|
+
colorPrimary: "#2563eb",
|
|
6
|
+
colorText: "#ffffff",
|
|
7
|
+
colorTextSecondary: "#cbd5e1",
|
|
8
|
+
colorInputBackground: "#0f172a",
|
|
9
|
+
colorInputText: "#ffffff",
|
|
10
|
+
borderRadius: "0.5rem"
|
|
11
|
+
},
|
|
12
|
+
elements: {
|
|
13
|
+
rootBox: "w-full px-2 overflow-visible",
|
|
14
|
+
cardBox: "w-full overflow-visible",
|
|
15
|
+
card: "w-full bg-transparent shadow-none border-0 p-0 overflow-visible",
|
|
16
|
+
header: "hidden",
|
|
17
|
+
socialButtonsBlockButton: "!bg-white text-slate-900 hover:!bg-slate-100 border border-slate-300",
|
|
18
|
+
socialButtonsBlockButtonText: "text-slate-900 font-semibold",
|
|
19
|
+
socialButtonsIconButton: "!bg-white text-slate-900 hover:!bg-slate-100 border border-slate-300",
|
|
20
|
+
dividerLine: "bg-slate-600",
|
|
21
|
+
dividerText: "text-slate-300",
|
|
22
|
+
formFieldRow: "px-1 overflow-visible",
|
|
23
|
+
formFieldLabel: "text-slate-100 pl-1",
|
|
24
|
+
formFieldInput: "!bg-slate-100 border-slate-300 !text-slate-950 placeholder:text-slate-500",
|
|
25
|
+
otpCodeFieldInput: "!bg-white border-slate-300 !text-slate-950",
|
|
26
|
+
formFieldSuccessText: "text-emerald-300",
|
|
27
|
+
formFieldErrorText: "text-red-300",
|
|
28
|
+
formButtonPrimary: "bg-blue-600 hover:bg-blue-500 text-white",
|
|
29
|
+
footerActionLink: "text-blue-400 hover:text-blue-300",
|
|
30
|
+
footer: "!bg-transparent",
|
|
31
|
+
footerAction: "!bg-transparent",
|
|
32
|
+
badge: "hidden"
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
async function n(r, o = 8, a = 300) {
|
|
36
|
+
for (let e = 0; e < o; e += 1) {
|
|
37
|
+
let t = null;
|
|
38
|
+
try {
|
|
39
|
+
t = await r({ skipCache: !0 });
|
|
40
|
+
} catch {
|
|
41
|
+
t = await r();
|
|
42
|
+
}
|
|
43
|
+
if (t) return t;
|
|
44
|
+
e < o - 1 && await new Promise((s) => setTimeout(s, a));
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
async function l({
|
|
49
|
+
apiBaseUrl: r,
|
|
50
|
+
getToken: o
|
|
51
|
+
}) {
|
|
52
|
+
const a = await n(o);
|
|
53
|
+
if (!a)
|
|
54
|
+
throw new Error("Missing Clerk token after retries");
|
|
55
|
+
const e = await fetch(`${r}/auth/clerk/session`, {
|
|
56
|
+
method: "POST",
|
|
57
|
+
headers: { Authorization: `Bearer ${a}` },
|
|
58
|
+
credentials: "include"
|
|
59
|
+
});
|
|
60
|
+
if (!e.ok) {
|
|
61
|
+
const t = await e.text().catch(() => "");
|
|
62
|
+
throw new Error(t || `Session bootstrap failed (${e.status})`);
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
response: e,
|
|
66
|
+
accessToken: e.headers.get("x-sm-access-token"),
|
|
67
|
+
teamId: e.headers.get("x-sm-workspace-id")
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
export {
|
|
71
|
+
f as APIError,
|
|
72
|
+
u as AgentAPI,
|
|
73
|
+
b as AnalyticsAPI,
|
|
74
|
+
A as ArchiveAPI,
|
|
75
|
+
P as AuthAPI,
|
|
76
|
+
h as AuthCore,
|
|
77
|
+
i as CLERK_APPEARANCE,
|
|
78
|
+
I as DecisionAPI,
|
|
79
|
+
x as EvolutionAPI,
|
|
80
|
+
g as GovernanceAPI,
|
|
81
|
+
w as GraphAPI,
|
|
82
|
+
m as InsightsAPI,
|
|
83
|
+
p as MemoryAPI,
|
|
84
|
+
k as OntologyAPI,
|
|
85
|
+
v as PipelineAPI,
|
|
86
|
+
T as ProcedureCandidateAPI,
|
|
87
|
+
B as ProcedureMatchAPI,
|
|
88
|
+
y as ProfileAPI,
|
|
89
|
+
C as ReasoningAPI,
|
|
90
|
+
E as ReasoningTracesAPI,
|
|
91
|
+
R as SmartMemoryClient,
|
|
92
|
+
S as SubscriptionAPI,
|
|
93
|
+
F as TeamAPI,
|
|
94
|
+
M as TemporalAPI,
|
|
95
|
+
L as TokenManager,
|
|
96
|
+
G as TokenUsageAPI,
|
|
97
|
+
O as UsageAPI,
|
|
98
|
+
U as ValidationAPI,
|
|
99
|
+
$ as ZettelkastenAPI,
|
|
100
|
+
l as exchangeClerkSession,
|
|
101
|
+
n as getClerkTokenWithRetry
|
|
102
|
+
};
|
package/dist/progress.js
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
async function P(r, n) {
|
|
2
|
+
const t = r.getReader();
|
|
3
|
+
let e;
|
|
4
|
+
for (; !(e = await t.read()).done; )
|
|
5
|
+
n(e.value);
|
|
6
|
+
}
|
|
7
|
+
function j(r) {
|
|
8
|
+
let n, t, e, o = !1;
|
|
9
|
+
return function(a) {
|
|
10
|
+
n === void 0 ? (n = a, t = 0, e = -1) : n = L(n, a);
|
|
11
|
+
const i = n.length;
|
|
12
|
+
let s = 0;
|
|
13
|
+
for (; t < i; ) {
|
|
14
|
+
o && (n[t] === 10 && (s = ++t), o = !1);
|
|
15
|
+
let l = -1;
|
|
16
|
+
for (; t < i && l === -1; ++t)
|
|
17
|
+
switch (n[t]) {
|
|
18
|
+
case 58:
|
|
19
|
+
e === -1 && (e = t - s);
|
|
20
|
+
break;
|
|
21
|
+
case 13:
|
|
22
|
+
o = !0;
|
|
23
|
+
case 10:
|
|
24
|
+
l = t;
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
if (l === -1)
|
|
28
|
+
break;
|
|
29
|
+
r(n.subarray(s, l), e), s = t, e = -1;
|
|
30
|
+
}
|
|
31
|
+
s === i ? n = void 0 : s !== 0 && (n = n.subarray(s), t -= s);
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function x(r, n, t) {
|
|
35
|
+
let e = k();
|
|
36
|
+
const o = new TextDecoder();
|
|
37
|
+
return function(a, i) {
|
|
38
|
+
if (a.length === 0)
|
|
39
|
+
t == null || t(e), e = k();
|
|
40
|
+
else if (i > 0) {
|
|
41
|
+
const s = o.decode(a.subarray(0, i)), l = i + (a[i + 1] === 32 ? 2 : 1), c = o.decode(a.subarray(l));
|
|
42
|
+
switch (s) {
|
|
43
|
+
case "data":
|
|
44
|
+
e.data = e.data ? e.data + `
|
|
45
|
+
` + c : c;
|
|
46
|
+
break;
|
|
47
|
+
case "event":
|
|
48
|
+
e.event = c;
|
|
49
|
+
break;
|
|
50
|
+
case "id":
|
|
51
|
+
r(e.id = c);
|
|
52
|
+
break;
|
|
53
|
+
case "retry":
|
|
54
|
+
const f = parseInt(c, 10);
|
|
55
|
+
isNaN(f) || n(e.retry = f);
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function L(r, n) {
|
|
62
|
+
const t = new Uint8Array(r.length + n.length);
|
|
63
|
+
return t.set(r), t.set(n, r.length), t;
|
|
64
|
+
}
|
|
65
|
+
function k() {
|
|
66
|
+
return {
|
|
67
|
+
data: "",
|
|
68
|
+
event: "",
|
|
69
|
+
id: "",
|
|
70
|
+
retry: void 0
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
var $ = function(r, n) {
|
|
74
|
+
var t = {};
|
|
75
|
+
for (var e in r) Object.prototype.hasOwnProperty.call(r, e) && n.indexOf(e) < 0 && (t[e] = r[e]);
|
|
76
|
+
if (r != null && typeof Object.getOwnPropertySymbols == "function")
|
|
77
|
+
for (var o = 0, e = Object.getOwnPropertySymbols(r); o < e.length; o++)
|
|
78
|
+
n.indexOf(e[o]) < 0 && Object.prototype.propertyIsEnumerable.call(r, e[o]) && (t[e[o]] = r[e[o]]);
|
|
79
|
+
return t;
|
|
80
|
+
};
|
|
81
|
+
const T = "text/event-stream", C = 1e3, I = "last-event-id";
|
|
82
|
+
function H(r, n) {
|
|
83
|
+
var { signal: t, headers: e, onopen: o, onmessage: h, onclose: a, onerror: i, openWhenHidden: s, fetch: l } = n, c = $(n, ["signal", "headers", "onopen", "onmessage", "onclose", "onerror", "openWhenHidden", "fetch"]);
|
|
84
|
+
return new Promise((f, w) => {
|
|
85
|
+
const b = Object.assign({}, e);
|
|
86
|
+
b.accept || (b.accept = T);
|
|
87
|
+
let v;
|
|
88
|
+
function g() {
|
|
89
|
+
v.abort(), document.hidden || S();
|
|
90
|
+
}
|
|
91
|
+
s || document.addEventListener("visibilitychange", g);
|
|
92
|
+
let p = C, d = 0;
|
|
93
|
+
function u() {
|
|
94
|
+
document.removeEventListener("visibilitychange", g), window.clearTimeout(d), v.abort();
|
|
95
|
+
}
|
|
96
|
+
t == null || t.addEventListener("abort", () => {
|
|
97
|
+
u(), f();
|
|
98
|
+
});
|
|
99
|
+
const m = l ?? window.fetch, _ = o ?? R;
|
|
100
|
+
async function S() {
|
|
101
|
+
var O;
|
|
102
|
+
v = new AbortController();
|
|
103
|
+
try {
|
|
104
|
+
const E = await m(r, Object.assign(Object.assign({}, c), { headers: b, signal: v.signal }));
|
|
105
|
+
await _(E), await P(E.body, j(x((y) => {
|
|
106
|
+
y ? b[I] = y : delete b[I];
|
|
107
|
+
}, (y) => {
|
|
108
|
+
p = y;
|
|
109
|
+
}, h))), a == null || a(), u(), f();
|
|
110
|
+
} catch (E) {
|
|
111
|
+
if (!v.signal.aborted)
|
|
112
|
+
try {
|
|
113
|
+
const y = (O = i == null ? void 0 : i(E)) !== null && O !== void 0 ? O : p;
|
|
114
|
+
window.clearTimeout(d), d = window.setTimeout(S, y);
|
|
115
|
+
} catch (y) {
|
|
116
|
+
u(), w(y);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
S();
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function R(r) {
|
|
124
|
+
const n = r.headers.get("content-type");
|
|
125
|
+
if (!(n != null && n.startsWith(T)))
|
|
126
|
+
throw new Error(`Expected content-type to be ${T}, Actual: ${n}`);
|
|
127
|
+
}
|
|
128
|
+
const N = "/memory/progress/stream", A = 3, W = 1e3;
|
|
129
|
+
function q(r) {
|
|
130
|
+
const {
|
|
131
|
+
baseUrl: n = "",
|
|
132
|
+
token: t,
|
|
133
|
+
apiKey: e,
|
|
134
|
+
workspaceId: o,
|
|
135
|
+
runId: h,
|
|
136
|
+
fromSeq: a,
|
|
137
|
+
since: i,
|
|
138
|
+
onEvent: s,
|
|
139
|
+
onError: l,
|
|
140
|
+
onReconnect: c
|
|
141
|
+
} = r, f = new URLSearchParams();
|
|
142
|
+
h !== void 0 && f.set("run_id", h), a !== void 0 && f.set("from_seq", String(a)), i !== void 0 && f.set("since", i);
|
|
143
|
+
const w = f.toString(), b = `${n}${N}${w ? "?" + w : ""}`, v = {
|
|
144
|
+
Accept: "text/event-stream"
|
|
145
|
+
};
|
|
146
|
+
t ? v.Authorization = `Bearer ${t}` : e && (v["X-API-Key"] = e), o && (v["X-Workspace-Id"] = o);
|
|
147
|
+
const g = new AbortController();
|
|
148
|
+
let p = !1, d = 0;
|
|
149
|
+
return H(b, {
|
|
150
|
+
headers: v,
|
|
151
|
+
signal: g.signal,
|
|
152
|
+
openWhenHidden: !0,
|
|
153
|
+
async onopen(u) {
|
|
154
|
+
if (u.ok) {
|
|
155
|
+
d = 0;
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
throw new Error(`SSE connection failed: HTTP ${u.status}`);
|
|
159
|
+
},
|
|
160
|
+
onmessage(u) {
|
|
161
|
+
if (p || !u.data) return;
|
|
162
|
+
d = 0;
|
|
163
|
+
let m;
|
|
164
|
+
try {
|
|
165
|
+
m = JSON.parse(u.data);
|
|
166
|
+
} catch {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
s(m);
|
|
170
|
+
},
|
|
171
|
+
onerror(u) {
|
|
172
|
+
if (!p) {
|
|
173
|
+
if (d += 1, d >= A) {
|
|
174
|
+
l(u), g.abort(), p = !0;
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
return c == null || c(), W * d;
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
onclose() {
|
|
181
|
+
p || (d += 1, d >= A ? (l(new Error("SSE connection closed by server")), p = !0) : c == null || c());
|
|
182
|
+
}
|
|
183
|
+
}), {
|
|
184
|
+
close() {
|
|
185
|
+
p || (p = !0, g.abort());
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
export {
|
|
190
|
+
q as subscribeProgress
|
|
191
|
+
};
|
package/dist/react.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import h, { createContext as d, useRef as y, useState as v, useEffect as b, useCallback as c, useContext as f } from "react";
|
|
2
|
+
import { S as x } from "./core-Ds7Kn35C.js";
|
|
3
|
+
const m = d(null), g = d(null);
|
|
4
|
+
function U({ children: e, ...r }) {
|
|
5
|
+
const n = y(null);
|
|
6
|
+
n.current || (n.current = new x(r));
|
|
7
|
+
const t = n.current, [u, o] = v({
|
|
8
|
+
isAuthenticated: t.auth.isAuthenticated(),
|
|
9
|
+
user: t.auth.getCurrentUser(),
|
|
10
|
+
token: t.auth.getCurrentToken(),
|
|
11
|
+
tenantId: t.auth.getTenantId(),
|
|
12
|
+
loading: !1,
|
|
13
|
+
error: null
|
|
14
|
+
});
|
|
15
|
+
b(() => t.auth.addListener((a) => {
|
|
16
|
+
o((C) => ({
|
|
17
|
+
...C,
|
|
18
|
+
isAuthenticated: a.isAuthenticated,
|
|
19
|
+
user: a.user,
|
|
20
|
+
token: a.token,
|
|
21
|
+
tenantId: a.tenantId
|
|
22
|
+
}));
|
|
23
|
+
}), [t]);
|
|
24
|
+
const s = c(async () => {
|
|
25
|
+
await t.auth.logout();
|
|
26
|
+
}, [t]), A = c((i) => t.auth.hasRole(i), [t]), S = c((i) => t.auth.getLoginUrl(i), [t]), w = {
|
|
27
|
+
...u,
|
|
28
|
+
logout: s,
|
|
29
|
+
hasRole: A,
|
|
30
|
+
getLoginUrl: S
|
|
31
|
+
};
|
|
32
|
+
return /* @__PURE__ */ h.createElement(m.Provider, { value: w }, /* @__PURE__ */ h.createElement(g.Provider, { value: t }, e));
|
|
33
|
+
}
|
|
34
|
+
function l() {
|
|
35
|
+
const e = f(m);
|
|
36
|
+
if (!e)
|
|
37
|
+
throw new Error("useAuth must be used within a SmartMemoryProvider");
|
|
38
|
+
return e;
|
|
39
|
+
}
|
|
40
|
+
function k() {
|
|
41
|
+
const { isAuthenticated: e, user: r, token: n, tenantId: t, loading: u, error: o } = l();
|
|
42
|
+
return { isAuthenticated: e, user: r, token: n, tenantId: t, loading: u, error: o };
|
|
43
|
+
}
|
|
44
|
+
function p() {
|
|
45
|
+
const { login: e, logout: r, hasRole: n, getLoginUrl: t } = l();
|
|
46
|
+
return { login: e, logout: r, hasRole: n, getLoginUrl: t };
|
|
47
|
+
}
|
|
48
|
+
function E() {
|
|
49
|
+
const e = f(g);
|
|
50
|
+
if (!e)
|
|
51
|
+
throw new Error("useSmartMemory must be used within a SmartMemoryProvider");
|
|
52
|
+
return e;
|
|
53
|
+
}
|
|
54
|
+
function I({ children: e, fallback: r = null, redirectToLogin: n = !1 }) {
|
|
55
|
+
const { isAuthenticated: t, loading: u, getLoginUrl: o } = l();
|
|
56
|
+
if (u) return r;
|
|
57
|
+
if (!t) {
|
|
58
|
+
if (n)
|
|
59
|
+
try {
|
|
60
|
+
const s = o();
|
|
61
|
+
window.location.href = s;
|
|
62
|
+
} catch {
|
|
63
|
+
}
|
|
64
|
+
return r;
|
|
65
|
+
}
|
|
66
|
+
return e;
|
|
67
|
+
}
|
|
68
|
+
export {
|
|
69
|
+
m as AuthContext,
|
|
70
|
+
I as AuthWrapper,
|
|
71
|
+
g as ClientContext,
|
|
72
|
+
U as SmartMemoryProvider,
|
|
73
|
+
l as useAuth,
|
|
74
|
+
p as useAuthActions,
|
|
75
|
+
k as useAuthState,
|
|
76
|
+
E as useSmartMemory
|
|
77
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@smartmemory/sdk-js",
|
|
3
|
+
"version": "0.5.1",
|
|
4
|
+
"description": "Unified JavaScript SDK for SmartMemory API — auth + API client for all frontends",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"module": "dist/index.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./dist/index.js",
|
|
10
|
+
"./core": "./dist/core.js",
|
|
11
|
+
"./react": "./dist/react.js",
|
|
12
|
+
"./fetch": "./dist/fetch.js",
|
|
13
|
+
"./progress": "./dist/progress.js"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "vite build",
|
|
20
|
+
"test": "vitest run",
|
|
21
|
+
"test:watch": "vitest",
|
|
22
|
+
"test:coverage": "vitest run --coverage",
|
|
23
|
+
"lint": "eslint src/ tests/"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"react": ">=18.0.0",
|
|
27
|
+
"react-dom": ">=18.0.0"
|
|
28
|
+
},
|
|
29
|
+
"peerDependenciesMeta": {
|
|
30
|
+
"react": {
|
|
31
|
+
"optional": true
|
|
32
|
+
},
|
|
33
|
+
"react-dom": {
|
|
34
|
+
"optional": true
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@eslint/js": "^9.0.0",
|
|
39
|
+
"@testing-library/jest-dom": "^6.0.0",
|
|
40
|
+
"@testing-library/react": "^16.0.0",
|
|
41
|
+
"@vitest/coverage-v8": "^3.0.0",
|
|
42
|
+
"eslint": "^9.0.0",
|
|
43
|
+
"globals": "^16.0.0",
|
|
44
|
+
"jsdom": "^25.0.0",
|
|
45
|
+
"react": "^18.3.0",
|
|
46
|
+
"react-dom": "^18.3.0",
|
|
47
|
+
"vite": "^6.0.0",
|
|
48
|
+
"vitest": "^3.0.0"
|
|
49
|
+
},
|
|
50
|
+
"keywords": [
|
|
51
|
+
"smartmemory",
|
|
52
|
+
"sdk",
|
|
53
|
+
"auth",
|
|
54
|
+
"api-client"
|
|
55
|
+
],
|
|
56
|
+
"license": "MIT",
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"@microsoft/fetch-event-source": "^2.0.1"
|
|
59
|
+
},
|
|
60
|
+
"repository": {
|
|
61
|
+
"type": "git",
|
|
62
|
+
"url": "git+https://github.com/smart-memory/smart-memory-sdk-js.git"
|
|
63
|
+
},
|
|
64
|
+
"bugs": {
|
|
65
|
+
"url": "https://github.com/smart-memory/smart-memory-sdk-js/issues"
|
|
66
|
+
},
|
|
67
|
+
"homepage": "https://github.com/smart-memory/smart-memory-sdk-js#readme"
|
|
68
|
+
}
|