@arcteninc/core 0.0.6 → 0.0.8
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/core.css +1 -0
- package/dist/index.cjs +14 -0
- package/dist/index.mjs +6221 -0
- package/dist/server.cjs +1 -0
- package/dist/server.mjs +26 -0
- package/package.json +4 -3
package/dist/server.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});async function a(t){const{apiKey:o,user:r,apiUrl:n="https://api.arcten.com"}=t,e=await fetch(`${n}/token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:o,user:r})});if(!e.ok){const i=await e.json().catch(()=>({}));throw new Error(i.error||`Failed to verify token: ${e.statusText}`)}return e.json()}exports.verifyToken=a;
|
package/dist/server.mjs
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
async function s(e) {
|
|
2
|
+
const {
|
|
3
|
+
apiKey: o,
|
|
4
|
+
user: r,
|
|
5
|
+
apiUrl: n = "https://api.arcten.com"
|
|
6
|
+
} = e, t = await fetch(`${n}/token`, {
|
|
7
|
+
method: "POST",
|
|
8
|
+
headers: {
|
|
9
|
+
"Content-Type": "application/json"
|
|
10
|
+
},
|
|
11
|
+
body: JSON.stringify({
|
|
12
|
+
apiKey: o,
|
|
13
|
+
user: r
|
|
14
|
+
})
|
|
15
|
+
});
|
|
16
|
+
if (!t.ok) {
|
|
17
|
+
const a = await t.json().catch(() => ({}));
|
|
18
|
+
throw new Error(
|
|
19
|
+
a.error || `Failed to verify token: ${t.statusText}`
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
return t.json();
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
s as verifyToken
|
|
26
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcteninc/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"import": "./dist/server.mjs",
|
|
17
17
|
"require": "./dist/server.cjs"
|
|
18
18
|
},
|
|
19
|
-
"./styles": "./dist/core.css"
|
|
19
|
+
"./styles": "./dist/core.css",
|
|
20
|
+
"./styles-standalone": "./dist/core.css"
|
|
20
21
|
},
|
|
21
22
|
"sideEffects": [
|
|
22
23
|
"*.css",
|
|
@@ -27,7 +28,7 @@
|
|
|
27
28
|
],
|
|
28
29
|
"scripts": {
|
|
29
30
|
"dev": "vite build --watch",
|
|
30
|
-
"build": "vite build && bunx tsc --emitDeclarationOnly --outDir dist",
|
|
31
|
+
"build": "vite build && node scripts/flatten-css.mjs && bunx tsc --emitDeclarationOnly --outDir dist",
|
|
31
32
|
"prepublishOnly": "bun run build"
|
|
32
33
|
},
|
|
33
34
|
"peerDependencies": {
|