@run402/functions 4.0.0 → 4.2.0
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 +8 -6
- package/dist/assets.d.ts +2 -6
- package/dist/assets.d.ts.map +1 -1
- package/dist/assets.js +0 -4
- package/dist/assets.js.map +1 -1
- package/dist/auth/errors.d.ts +3 -3
- package/dist/auth/errors.d.ts.map +1 -1
- package/dist/auth/errors.js +3 -3
- package/dist/auth/errors.js.map +1 -1
- package/dist/auth/index.d.ts +5 -7
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +64 -48
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/types.d.ts +4 -6
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/auth/types.js +0 -2
- package/dist/auth/types.js.map +1 -1
- package/dist/auth.d.ts +9 -11
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +9 -11
- package/dist/auth.js.map +1 -1
- package/dist/db.d.ts +40 -10
- package/dist/db.d.ts.map +1 -1
- package/dist/db.js +57 -18
- package/dist/db.js.map +1 -1
- package/dist/lib/project-jwt-keys.d.ts +38 -16
- package/dist/lib/project-jwt-keys.d.ts.map +1 -1
- package/dist/lib/project-jwt-keys.js +124 -29
- package/dist/lib/project-jwt-keys.js.map +1 -1
- package/package.json +1 -1
|
@@ -17,22 +17,14 @@
|
|
|
17
17
|
* pattern for the actor-context key — same lazy single-flight fetch, same
|
|
18
18
|
* service-key auth, same "failures are non-fatal, the next request retries".
|
|
19
19
|
*
|
|
20
|
-
* FETCH-ONLY
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* asymmetric, the gateway was still minting HS256 tokens that an
|
|
25
|
-
* asymmetric-only keyset cannot verify.
|
|
26
|
-
*
|
|
27
|
-
* That window closed. The gateway signs ES256 (`kid=p1-2026-08`), and §8 both
|
|
28
|
-
* stopped injecting the env key and swept it out of the fleet, so the fallback
|
|
29
|
-
* had already stopped firing in production before this removed it — it read an
|
|
30
|
-
* env var that is no longer set on any live function.
|
|
20
|
+
* FETCH-ONLY, with no local fallback key. `RUN402_JWT_SECRET` is not injected
|
|
21
|
+
* into any live function and is not read here. The gateway signs project
|
|
22
|
+
* tokens with an asymmetric key (`kid`-stamped); this runtime verifies only
|
|
23
|
+
* against the fetched keyset.
|
|
31
24
|
*
|
|
32
25
|
* The consequence is deliberate and is the whole point: with no fallback, a
|
|
33
26
|
* failed keyset fetch leaves NO keys, and `getUser()` fails closed rather than
|
|
34
27
|
* silently falling back to material the tenant's own environment could supply.
|
|
35
|
-
* See `openspec/changes/functions-runtime-key-decoupling/design.md`.
|
|
36
28
|
*/
|
|
37
29
|
import type { VerificationKey } from "./jwt.js";
|
|
38
30
|
/**
|
|
@@ -46,12 +38,42 @@ export declare function projectJwtVerificationKeys(): VerificationKey[];
|
|
|
46
38
|
/**
|
|
47
39
|
* Ensure the keyset is loaded before a synchronous verify.
|
|
48
40
|
*
|
|
49
|
-
* Single-flight: concurrent invocations in the same execution environment
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
41
|
+
* Single-flight: concurrent invocations in the same execution environment share
|
|
42
|
+
* one fetch. Never throws — a failed fetch leaves whatever keys are available
|
|
43
|
+
* (possibly none at all) and the next request retries.
|
|
44
|
+
*
|
|
45
|
+
* AWAITS ONLY WHEN THERE IS NOTHING TO SERVE. With no keys we must block; with
|
|
46
|
+
* a merely STALE keyset we refresh in the background and verify against what we
|
|
47
|
+
* have, because the old keys are still perfectly valid — a rotation adds a key
|
|
48
|
+
* before it promotes one. Blocking on the refresh instead would put a network
|
|
49
|
+
* round trip on one unlucky request every TTL for no correctness gain.
|
|
53
50
|
*/
|
|
54
51
|
export declare function ensureProjectJwtKeysLoaded(): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Refetch once when a token names a `kid` this environment has never seen, so a
|
|
54
|
+
* freshly promoted signing key is picked up NOW rather than at the next TTL.
|
|
55
|
+
*
|
|
56
|
+
* Returns true only when the refetch actually produced that `kid` — i.e. when
|
|
57
|
+
* retrying the verification is worth doing. Deliberately narrow:
|
|
58
|
+
*
|
|
59
|
+
* - a kid-less token returns false. Those select the legacy key, and a
|
|
60
|
+
* missing legacy key is not something a refetch fixes.
|
|
61
|
+
* - a KNOWN kid returns false. If the kid is present and verification still
|
|
62
|
+
* failed, the signature is bad; refetching the same public keys cannot
|
|
63
|
+
* change that, and doing so would let a forged-signature flood drive the
|
|
64
|
+
* same amplification the interval floor exists to prevent.
|
|
65
|
+
* - inside the cooldown returns false, without fetching.
|
|
66
|
+
*/
|
|
67
|
+
export declare function refreshForUnknownKid(kid: string | undefined): Promise<boolean>;
|
|
68
|
+
/**
|
|
69
|
+
* The `kid` a token claims, read WITHOUT verifying it.
|
|
70
|
+
*
|
|
71
|
+
* Untrusted by construction and used for exactly one decision: whether to
|
|
72
|
+
* refresh a PUBLIC keyset. It never selects a key, never influences which key
|
|
73
|
+
* verifies, and nothing it returns is trusted — `verifyWithKey` still does the
|
|
74
|
+
* real `kid` selection against material the gateway served.
|
|
75
|
+
*/
|
|
76
|
+
export declare function unverifiedKidFromToken(token: string): string | undefined;
|
|
55
77
|
/** True when verification has no key at all — the caller must fail CLOSED
|
|
56
78
|
* rather than treat the request as anonymous-but-fine. */
|
|
57
79
|
export declare function projectJwtKeysUnavailable(): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-jwt-keys.d.ts","sourceRoot":"","sources":["../../src/lib/project-jwt-keys.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"project-jwt-keys.d.ts","sourceRoot":"","sources":["../../src/lib/project-jwt-keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AA2EhD;;;;;;GAMG;AACH,wBAAgB,0BAA0B,IAAI,eAAe,EAAE,CAE9D;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,IAAI,CAAC,CAQhE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,CAOpF;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CASxE;AAED;2DAC2D;AAC3D,wBAAgB,yBAAyB,IAAI,OAAO,CAEnD;AAsCD,uDAAuD;AACvD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,eAAe,EAAE,GAAG,IAAI,GAAG,IAAI,CAK9E;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B,yBAAyB,CAAC;AAQpE,2DAA2D;AAC3D,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAS7E;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAGhF"}
|
|
@@ -17,52 +17,59 @@
|
|
|
17
17
|
* pattern for the actor-context key — same lazy single-flight fetch, same
|
|
18
18
|
* service-key auth, same "failures are non-fatal, the next request retries".
|
|
19
19
|
*
|
|
20
|
-
* FETCH-ONLY
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* asymmetric, the gateway was still minting HS256 tokens that an
|
|
25
|
-
* asymmetric-only keyset cannot verify.
|
|
26
|
-
*
|
|
27
|
-
* That window closed. The gateway signs ES256 (`kid=p1-2026-08`), and §8 both
|
|
28
|
-
* stopped injecting the env key and swept it out of the fleet, so the fallback
|
|
29
|
-
* had already stopped firing in production before this removed it — it read an
|
|
30
|
-
* env var that is no longer set on any live function.
|
|
20
|
+
* FETCH-ONLY, with no local fallback key. `RUN402_JWT_SECRET` is not injected
|
|
21
|
+
* into any live function and is not read here. The gateway signs project
|
|
22
|
+
* tokens with an asymmetric key (`kid`-stamped); this runtime verifies only
|
|
23
|
+
* against the fetched keyset.
|
|
31
24
|
*
|
|
32
25
|
* The consequence is deliberate and is the whole point: with no fallback, a
|
|
33
26
|
* failed keyset fetch leaves NO keys, and `getUser()` fails closed rather than
|
|
34
27
|
* silently falling back to material the tenant's own environment could supply.
|
|
35
|
-
* See `openspec/changes/functions-runtime-key-decoupling/design.md`.
|
|
36
28
|
*/
|
|
37
29
|
import { createPublicKey } from "node:crypto";
|
|
38
30
|
let cached = null;
|
|
39
31
|
let fetchInFlight = null;
|
|
32
|
+
let cachedAt = 0;
|
|
33
|
+
let lastUnknownKidRefetchAt = 0;
|
|
40
34
|
/**
|
|
41
|
-
*
|
|
35
|
+
* How stale a keyset may get before it is refreshed in the background.
|
|
42
36
|
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
37
|
+
* This is what makes a key rotation self-healing. Before it existed the cache
|
|
38
|
+
* had no TTL at all: a warm execution environment fetched once and NEVER
|
|
39
|
+
* refetched, so promoting a new signing key meant every warm function rejected
|
|
40
|
+
* the new tokens until its environment happened to recycle — with nothing in
|
|
41
|
+
* the system forcing that. The operator's only lever was a fleet-wide config
|
|
42
|
+
* touch to retire the environments.
|
|
46
43
|
*/
|
|
47
|
-
|
|
48
|
-
return cached ? [...cached] : [];
|
|
49
|
-
}
|
|
44
|
+
const KEYSET_MAX_AGE_MS = 5 * 60_000;
|
|
50
45
|
/**
|
|
51
|
-
*
|
|
46
|
+
* Floor on how often an unknown `kid` may force an immediate refetch.
|
|
47
|
+
*
|
|
48
|
+
* THE REASON THIS NUMBER EXISTS, and why the unknown-kid path is not simply
|
|
49
|
+
* "refetch whenever we see one": a `kid` is attacker-controlled. Without a
|
|
50
|
+
* floor, a flood of tokens carrying random kids would make every warm Lambda in
|
|
51
|
+
* the fleet fetch the keyset once per request — turning an unauthenticated
|
|
52
|
+
* request into amplified load on the gateway. With it, an attacker gets one
|
|
53
|
+
* fetch per environment per interval no matter what they send, which is the
|
|
54
|
+
* same rate the TTL already permits.
|
|
52
55
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
56
|
+
* It is its OWN budget, not "time since the last fetch of any kind". Sharing
|
|
57
|
+
* the routine-fetch timestamp would starve the legitimate case it exists to
|
|
58
|
+
* serve: an environment that cold-started moments before a promotion would sit
|
|
59
|
+
* out the cooldown and reject valid tokens, which is the exact failure this
|
|
60
|
+
* whole mechanism was added to remove.
|
|
57
61
|
*/
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return;
|
|
62
|
+
const MIN_REFETCH_INTERVAL_MS = 30_000;
|
|
63
|
+
function startFetch() {
|
|
61
64
|
if (!fetchInFlight) {
|
|
62
65
|
fetchInFlight = fetchKeysFromGateway()
|
|
63
66
|
.then((fetched) => {
|
|
64
|
-
|
|
67
|
+
// Only REPLACE on a non-empty result. A gateway blip must not empty a
|
|
68
|
+
// working keyset and fail every request until it recovers.
|
|
69
|
+
if (fetched.length > 0) {
|
|
65
70
|
cached = fetched;
|
|
71
|
+
cachedAt = Date.now();
|
|
72
|
+
}
|
|
66
73
|
})
|
|
67
74
|
.catch(() => {
|
|
68
75
|
/* keep whatever we have; the next request retries */
|
|
@@ -71,7 +78,93 @@ export async function ensureProjectJwtKeysLoaded() {
|
|
|
71
78
|
fetchInFlight = null;
|
|
72
79
|
});
|
|
73
80
|
}
|
|
74
|
-
|
|
81
|
+
return fetchInFlight;
|
|
82
|
+
}
|
|
83
|
+
/** The `kid`s currently verifiable, for the unknown-kid check. */
|
|
84
|
+
function knownKids() {
|
|
85
|
+
const out = new Set();
|
|
86
|
+
for (const k of cached ?? [])
|
|
87
|
+
if (k.kid)
|
|
88
|
+
out.add(k.kid);
|
|
89
|
+
return out;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* The keys `getUser()` should verify against.
|
|
93
|
+
*
|
|
94
|
+
* The fetched public keyset, and nothing else. An empty array is a legitimate
|
|
95
|
+
* result — it means the fetch has not succeeded yet — and callers must treat it
|
|
96
|
+
* as "cannot verify", never as "no verification needed".
|
|
97
|
+
*/
|
|
98
|
+
export function projectJwtVerificationKeys() {
|
|
99
|
+
return cached ? [...cached] : [];
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Ensure the keyset is loaded before a synchronous verify.
|
|
103
|
+
*
|
|
104
|
+
* Single-flight: concurrent invocations in the same execution environment share
|
|
105
|
+
* one fetch. Never throws — a failed fetch leaves whatever keys are available
|
|
106
|
+
* (possibly none at all) and the next request retries.
|
|
107
|
+
*
|
|
108
|
+
* AWAITS ONLY WHEN THERE IS NOTHING TO SERVE. With no keys we must block; with
|
|
109
|
+
* a merely STALE keyset we refresh in the background and verify against what we
|
|
110
|
+
* have, because the old keys are still perfectly valid — a rotation adds a key
|
|
111
|
+
* before it promotes one. Blocking on the refresh instead would put a network
|
|
112
|
+
* round trip on one unlucky request every TTL for no correctness gain.
|
|
113
|
+
*/
|
|
114
|
+
export async function ensureProjectJwtKeysLoaded() {
|
|
115
|
+
if (!cached || cached.length === 0) {
|
|
116
|
+
await startFetch();
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
if (Date.now() - cachedAt > KEYSET_MAX_AGE_MS) {
|
|
120
|
+
void startFetch();
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Refetch once when a token names a `kid` this environment has never seen, so a
|
|
125
|
+
* freshly promoted signing key is picked up NOW rather than at the next TTL.
|
|
126
|
+
*
|
|
127
|
+
* Returns true only when the refetch actually produced that `kid` — i.e. when
|
|
128
|
+
* retrying the verification is worth doing. Deliberately narrow:
|
|
129
|
+
*
|
|
130
|
+
* - a kid-less token returns false. Those select the legacy key, and a
|
|
131
|
+
* missing legacy key is not something a refetch fixes.
|
|
132
|
+
* - a KNOWN kid returns false. If the kid is present and verification still
|
|
133
|
+
* failed, the signature is bad; refetching the same public keys cannot
|
|
134
|
+
* change that, and doing so would let a forged-signature flood drive the
|
|
135
|
+
* same amplification the interval floor exists to prevent.
|
|
136
|
+
* - inside the cooldown returns false, without fetching.
|
|
137
|
+
*/
|
|
138
|
+
export async function refreshForUnknownKid(kid) {
|
|
139
|
+
if (!kid)
|
|
140
|
+
return false;
|
|
141
|
+
if (knownKids().has(kid))
|
|
142
|
+
return false;
|
|
143
|
+
if (Date.now() - lastUnknownKidRefetchAt < MIN_REFETCH_INTERVAL_MS)
|
|
144
|
+
return false;
|
|
145
|
+
lastUnknownKidRefetchAt = Date.now();
|
|
146
|
+
await startFetch();
|
|
147
|
+
return knownKids().has(kid);
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* The `kid` a token claims, read WITHOUT verifying it.
|
|
151
|
+
*
|
|
152
|
+
* Untrusted by construction and used for exactly one decision: whether to
|
|
153
|
+
* refresh a PUBLIC keyset. It never selects a key, never influences which key
|
|
154
|
+
* verifies, and nothing it returns is trusted — `verifyWithKey` still does the
|
|
155
|
+
* real `kid` selection against material the gateway served.
|
|
156
|
+
*/
|
|
157
|
+
export function unverifiedKidFromToken(token) {
|
|
158
|
+
try {
|
|
159
|
+
const [header] = token.split(".");
|
|
160
|
+
if (!header)
|
|
161
|
+
return undefined;
|
|
162
|
+
const parsed = JSON.parse(Buffer.from(header, "base64url").toString("utf8"));
|
|
163
|
+
return typeof parsed.kid === "string" && parsed.kid.length > 0 ? parsed.kid : undefined;
|
|
164
|
+
}
|
|
165
|
+
catch {
|
|
166
|
+
return undefined;
|
|
167
|
+
}
|
|
75
168
|
}
|
|
76
169
|
/** True when verification has no key at all — the caller must fail CLOSED
|
|
77
170
|
* rather than treat the request as anonymous-but-fine. */
|
|
@@ -122,6 +215,8 @@ async function fetchKeysFromGateway() {
|
|
|
122
215
|
export function _setProjectJwtKeysForTest(keys) {
|
|
123
216
|
cached = keys;
|
|
124
217
|
fetchInFlight = null;
|
|
218
|
+
cachedAt = keys ? Date.now() : 0;
|
|
219
|
+
lastUnknownKidRefetchAt = 0;
|
|
125
220
|
}
|
|
126
221
|
/**
|
|
127
222
|
* The header carrying the gateway-minted actor token.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-jwt-keys.js","sourceRoot":"","sources":["../../src/lib/project-jwt-keys.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"project-jwt-keys.js","sourceRoot":"","sources":["../../src/lib/project-jwt-keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAY9C,IAAI,MAAM,GAA6B,IAAI,CAAC;AAC5C,IAAI,aAAa,GAAyB,IAAI,CAAC;AAC/C,IAAI,QAAQ,GAAG,CAAC,CAAC;AACjB,IAAI,uBAAuB,GAAG,CAAC,CAAC;AAEhC;;;;;;;;;GASG;AACH,MAAM,iBAAiB,GAAG,CAAC,GAAG,MAAM,CAAC;AAErC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAEvC,SAAS,UAAU;IACjB,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,aAAa,GAAG,oBAAoB,EAAE;aACnC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE;YAChB,sEAAsE;YACtE,2DAA2D;YAC3D,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACvB,MAAM,GAAG,OAAO,CAAC;gBACjB,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;YACxB,CAAC;QACH,CAAC,CAAC;aACD,KAAK,CAAC,GAAG,EAAE;YACV,qDAAqD;QACvD,CAAC,CAAC;aACD,OAAO,CAAC,GAAG,EAAE;YACZ,aAAa,GAAG,IAAI,CAAC;QACvB,CAAC,CAAC,CAAC;IACP,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,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AAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,sBAAsB,CAAC;AAQpE,2DAA2D;AAC3D,MAAM,UAAU,UAAU,CAAC,OAAgB,EAAE,IAAY;IACvD,IAAI,CAAC,OAAO;QAAE,OAAO,SAAS,CAAC;IAC/B,MAAM,CAAC,GAAG,OAAsB,CAAC;IACjC,IAAI,OAAQ,CAAuB,CAAC,GAAG,KAAK,UAAU,EAAE,CAAC;QACvD,OAAQ,CAAuC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC;IACzE,CAAC;IACD,MAAM,GAAG,GAAG,CAAkD,CAAC;IAC/D,MAAM,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;IAC5E,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;AAC3C,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,2BAA2B,CAAC,OAAgB;IAC1D,MAAM,KAAK,GAAG,UAAU,CAAC,OAAO,EAAE,6BAA6B,CAAC,CAAC;IACjE,OAAO,KAAK,CAAC,CAAC,CAAC,UAAU,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAC/C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@run402/functions",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "In-function helper library for Run402 serverless functions - db, adminDb, getUser, email, ai, assets, verifyWebhook. Auto-bundled into deployed functions; also installable for local TypeScript autocomplete.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|