@mittwald/ext-bridge 0.2.0-alpha.106
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 +5 -0
- package/dist/js/config/parse.mjs +13 -0
- package/dist/js/config/parse.mjs.map +1 -0
- package/dist/js/config/schemas.mjs +17 -0
- package/dist/js/config/schemas.mjs.map +1 -0
- package/dist/js/environment.mjs +6 -0
- package/dist/js/environment.mjs.map +1 -0
- package/dist/js/error.mjs +10 -0
- package/dist/js/error.mjs.map +1 -0
- package/dist/js/global.mjs +12 -0
- package/dist/js/global.mjs.map +1 -0
- package/dist/js/index.mjs +5 -0
- package/dist/js/index.mjs.map +1 -0
- package/dist/js/loading.mjs +19 -0
- package/dist/js/loading.mjs.map +1 -0
- package/dist/js/react/hooks/useExtBridge.mjs +9 -0
- package/dist/js/react/hooks/useExtBridge.mjs.map +1 -0
- package/dist/js/react.mjs +2 -0
- package/dist/js/react.mjs.map +1 -0
- package/dist/js/sessionToken/decode.mjs +29 -0
- package/dist/js/sessionToken/decode.mjs.map +1 -0
- package/dist/js/sessionToken/publicKeys/fetchPublicKey.mjs +17 -0
- package/dist/js/sessionToken/publicKeys/fetchPublicKey.mjs.map +1 -0
- package/dist/js/sessionToken/publicKeys/publicKeys.mjs +17 -0
- package/dist/js/sessionToken/publicKeys/publicKeys.mjs.map +1 -0
- package/dist/js/sessionToken/schemas.mjs +18 -0
- package/dist/js/sessionToken/schemas.mjs.map +1 -0
- package/dist/js/sessionToken/verify.mjs +13 -0
- package/dist/js/sessionToken/verify.mjs.map +1 -0
- package/dist/types/config/parse.d.ts +11 -0
- package/dist/types/config/parse.d.ts.map +1 -0
- package/dist/types/config/schemas.d.ts +30 -0
- package/dist/types/config/schemas.d.ts.map +1 -0
- package/dist/types/config/types.d.ts +4 -0
- package/dist/types/config/types.d.ts.map +1 -0
- package/dist/types/environment.d.ts +2 -0
- package/dist/types/environment.d.ts.map +1 -0
- package/dist/types/error.d.ts +4 -0
- package/dist/types/error.d.ts.map +1 -0
- package/dist/types/global.d.ts +2 -0
- package/dist/types/global.d.ts.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/loading.d.ts +5 -0
- package/dist/types/loading.d.ts.map +1 -0
- package/dist/types/react/hooks/index.d.ts +2 -0
- package/dist/types/react/hooks/index.d.ts.map +1 -0
- package/dist/types/react/hooks/useExtBridge.d.ts +2 -0
- package/dist/types/react/hooks/useExtBridge.d.ts.map +1 -0
- package/dist/types/react/index.d.ts +2 -0
- package/dist/types/react/index.d.ts.map +1 -0
- package/dist/types/sessionToken/decode.d.ts +12 -0
- package/dist/types/sessionToken/decode.d.ts.map +1 -0
- package/dist/types/sessionToken/index.d.ts +4 -0
- package/dist/types/sessionToken/index.d.ts.map +1 -0
- package/dist/types/sessionToken/publicKeys/fetchPublicKey.d.ts +2 -0
- package/dist/types/sessionToken/publicKeys/fetchPublicKey.d.ts.map +1 -0
- package/dist/types/sessionToken/publicKeys/index.d.ts +2 -0
- package/dist/types/sessionToken/publicKeys/index.d.ts.map +1 -0
- package/dist/types/sessionToken/publicKeys/publicKeys.d.ts +2 -0
- package/dist/types/sessionToken/publicKeys/publicKeys.d.ts.map +1 -0
- package/dist/types/sessionToken/schemas.d.ts +35 -0
- package/dist/types/sessionToken/schemas.d.ts.map +1 -0
- package/dist/types/sessionToken/types.d.ts +6 -0
- package/dist/types/sessionToken/types.d.ts.map +1 -0
- package/dist/types/sessionToken/verify.d.ts +12 -0
- package/dist/types/sessionToken/verify.d.ts.map +1 -0
- package/dist/types/types.d.ts +15 -0
- package/dist/types/types.d.ts.map +1 -0
- package/package.json +66 -0
package/README.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { config } from './schemas.mjs';
|
|
2
|
+
import { ExtBridgeError } from '../error.mjs';
|
|
3
|
+
|
|
4
|
+
const parseConfig = (something) => {
|
|
5
|
+
const parsed = config.safeParse(something);
|
|
6
|
+
if (parsed.error) {
|
|
7
|
+
throw new ExtBridgeError("Invalid config: " + parsed.error.message);
|
|
8
|
+
}
|
|
9
|
+
return parsed.data;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { parseConfig };
|
|
13
|
+
//# sourceMappingURL=parse.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse.mjs","sources":["../../../src/config/parse.ts"],"sourcesContent":["import { config } from \"@/config/schemas\";\nimport { ExtBridgeError } from \"@/error\";\n\nexport const parseConfig = (something: unknown) => {\n const parsed = config.safeParse(something);\n if (parsed.error) {\n throw new ExtBridgeError(\"Invalid config: \" + parsed.error.message);\n }\n return parsed.data;\n};\n"],"names":[],"mappings":";;;AAGa,MAAA,WAAA,GAAc,CAAC,SAAuB,KAAA;AACjD,EAAM,MAAA,MAAA,GAAS,MAAO,CAAA,SAAA,CAAU,SAAS,CAAA;AACzC,EAAA,IAAI,OAAO,KAAO,EAAA;AAChB,IAAA,MAAM,IAAI,cAAA,CAAe,kBAAqB,GAAA,MAAA,CAAO,MAAM,OAAO,CAAA;AAAA;AAEpE,EAAA,OAAO,MAAO,CAAA,IAAA;AAChB;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
const baseConfig = z.object({
|
|
4
|
+
sessionId: z.string(),
|
|
5
|
+
userId: z.string(),
|
|
6
|
+
extensionId: z.string(),
|
|
7
|
+
extensionInstanceId: z.string()
|
|
8
|
+
});
|
|
9
|
+
const contextParameters = z.object({
|
|
10
|
+
appId: z.string().optional(),
|
|
11
|
+
projectId: z.string().optional(),
|
|
12
|
+
customerId: z.string().optional()
|
|
13
|
+
}).catchall(z.string());
|
|
14
|
+
const config = z.union([baseConfig, contextParameters]);
|
|
15
|
+
|
|
16
|
+
export { config };
|
|
17
|
+
//# sourceMappingURL=schemas.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.mjs","sources":["../../../src/config/schemas.ts"],"sourcesContent":["import { z } from \"zod\";\n\nconst baseConfig = z.object({\n sessionId: z.string(),\n userId: z.string(),\n extensionId: z.string(),\n extensionInstanceId: z.string(),\n});\n\nconst contextParameters = z\n .object({\n appId: z.string().optional(),\n projectId: z.string().optional(),\n customerId: z.string().optional(),\n })\n .catchall(z.string());\n\nexport const config = z.union([baseConfig, contextParameters]);\n"],"names":[],"mappings":";;AAEA,MAAM,UAAA,GAAa,EAAE,MAAO,CAAA;AAAA,EAC1B,SAAA,EAAW,EAAE,MAAO,EAAA;AAAA,EACpB,MAAA,EAAQ,EAAE,MAAO,EAAA;AAAA,EACjB,WAAA,EAAa,EAAE,MAAO,EAAA;AAAA,EACtB,mBAAA,EAAqB,EAAE,MAAO;AAChC,CAAC,CAAA;AAED,MAAM,iBAAA,GAAoB,EACvB,MAAO,CAAA;AAAA,EACN,KAAO,EAAA,CAAA,CAAE,MAAO,EAAA,CAAE,QAAS,EAAA;AAAA,EAC3B,SAAW,EAAA,CAAA,CAAE,MAAO,EAAA,CAAE,QAAS,EAAA;AAAA,EAC/B,UAAY,EAAA,CAAA,CAAE,MAAO,EAAA,CAAE,QAAS;AAClC,CAAC,CACA,CAAA,QAAA,CAAS,CAAE,CAAA,MAAA,EAAQ,CAAA;AAEf,MAAM,SAAS,CAAE,CAAA,KAAA,CAAM,CAAC,UAAA,EAAY,iBAAiB,CAAC;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.mjs","sources":["../../src/environment.ts"],"sourcesContent":["import { env } from \"std-env\";\n\n/** @internal */\nexport const MW_EXT_API_URL =\n env[\"MW_EXT_API_URL\"] ?? \"https://api.mittwald.de\";\n"],"names":[],"mappings":";;AAGa,MAAA,cAAA,GACX,GAAI,CAAA,gBAAgB,CAAK,IAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.mjs","sources":["../../src/error.ts"],"sourcesContent":["export class ExtBridgeError extends Error {\n constructor(message: string) {\n super(message);\n this.message = message;\n }\n}\n\nExtBridgeError.prototype.name = \"ExtBridgeError\";\n"],"names":[],"mappings":"AAAO,MAAM,uBAAuB,KAAM,CAAA;AAAA,EACxC,YAAY,OAAiB,EAAA;AAC3B,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,OAAU,GAAA,OAAA;AAAA;AAEnB;AAEA,cAAA,CAAe,UAAU,IAAO,GAAA,gBAAA;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { loadingApi } from './loading.mjs';
|
|
2
|
+
|
|
3
|
+
const isAlreadyDefined = typeof globalThis.mwExtBridge !== "undefined";
|
|
4
|
+
if (isAlreadyDefined) {
|
|
5
|
+
console.warn(
|
|
6
|
+
"mwExtBridge is already defined. The @mittwald/ext-bridge package is probably installed multiple times."
|
|
7
|
+
);
|
|
8
|
+
}
|
|
9
|
+
globalThis.mwExtBridge = {
|
|
10
|
+
...loadingApi
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=global.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global.mjs","sources":["../../src/global.ts"],"sourcesContent":["import { loadingApi } from \"@/loading\";\nimport type { ExtBridge } from \"@/types\";\n\nconst isAlreadyDefined = typeof globalThis.mwExtBridge !== \"undefined\";\n\nif (isAlreadyDefined) {\n console.warn(\n \"mwExtBridge is already defined. The @mittwald/ext-bridge package is probably installed multiple times.\",\n );\n}\n\nglobalThis.mwExtBridge = {\n ...loadingApi,\n} as ExtBridge;\n"],"names":[],"mappings":";;AAGA,MAAM,gBAAA,GAAmB,OAAO,UAAA,CAAW,WAAgB,KAAA,WAAA;AAE3D,IAAI,gBAAkB,EAAA;AACpB,EAAQ,OAAA,CAAA,IAAA;AAAA,IACN;AAAA,GACF;AACF;AAEA,UAAA,CAAW,WAAc,GAAA;AAAA,EACvB,GAAG;AACL,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { parseConfig } from './config/parse.mjs';
|
|
2
|
+
import { ExtBridgeError } from './error.mjs';
|
|
3
|
+
|
|
4
|
+
let resolveReadyPromise = () => {
|
|
5
|
+
throw new ExtBridgeError("Unexpected call of resolveReadyPromise()");
|
|
6
|
+
};
|
|
7
|
+
const loadingApi = {
|
|
8
|
+
ready: new Promise((res) => {
|
|
9
|
+
resolveReadyPromise = res;
|
|
10
|
+
}),
|
|
11
|
+
setIsReady: async () => {
|
|
12
|
+
const config = await mwExtBridge.getConfig();
|
|
13
|
+
mwExtBridge.config = parseConfig(config);
|
|
14
|
+
resolveReadyPromise();
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { loadingApi };
|
|
19
|
+
//# sourceMappingURL=loading.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loading.mjs","sources":["../../src/loading.ts"],"sourcesContent":["import { parseConfig } from \"@/config/parse\";\nimport { ExtBridgeError } from \"@/error\";\n\nlet resolveReadyPromise: () => void = () => {\n throw new ExtBridgeError(\"Unexpected call of resolveReadyPromise()\");\n};\n\nexport const loadingApi = {\n ready: new Promise<void>((res) => {\n resolveReadyPromise = res;\n }),\n setIsReady: async () => {\n const config = await mwExtBridge.getConfig();\n mwExtBridge.config = parseConfig(config);\n resolveReadyPromise();\n },\n} as const;\n"],"names":[],"mappings":";;;AAGA,IAAI,sBAAkC,MAAM;AAC1C,EAAM,MAAA,IAAI,eAAe,0CAA0C,CAAA;AACrE,CAAA;AAEO,MAAM,UAAa,GAAA;AAAA,EACxB,KAAO,EAAA,IAAI,OAAc,CAAA,CAAC,GAAQ,KAAA;AAChC,IAAsB,mBAAA,GAAA,GAAA;AAAA,GACvB,CAAA;AAAA,EACD,YAAY,YAAY;AACtB,IAAM,MAAA,MAAA,GAAS,MAAM,WAAA,CAAY,SAAU,EAAA;AAC3C,IAAY,WAAA,CAAA,MAAA,GAAS,YAAY,MAAM,CAAA;AACvC,IAAoB,mBAAA,EAAA;AAAA;AAExB;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { usePromise } from '@mittwald/react-use-promise';
|
|
2
|
+
|
|
3
|
+
const useExtBridge = () => usePromise(async () => {
|
|
4
|
+
await globalThis.mwExtBridge.ready;
|
|
5
|
+
return globalThis.mwExtBridge;
|
|
6
|
+
}, []);
|
|
7
|
+
|
|
8
|
+
export { useExtBridge };
|
|
9
|
+
//# sourceMappingURL=useExtBridge.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExtBridge.mjs","sources":["../../../../src/react/hooks/useExtBridge.ts"],"sourcesContent":["import { usePromise } from \"@mittwald/react-use-promise\";\n\nexport const useExtBridge = () =>\n usePromise(async () => {\n await globalThis.mwExtBridge.ready;\n return globalThis.mwExtBridge;\n }, []);\n"],"names":[],"mappings":";;AAEa,MAAA,YAAA,GAAe,MAC1B,UAAA,CAAW,YAAY;AACrB,EAAA,MAAM,WAAW,WAAY,CAAA,KAAA;AAC7B,EAAA,OAAO,UAAW,CAAA,WAAA;AACpB,CAAA,EAAG,EAAE;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ExtBridgeError } from '../error.mjs';
|
|
2
|
+
import { sessionTokenPayload } from './schemas.mjs';
|
|
3
|
+
import { decodeJwt } from 'jose';
|
|
4
|
+
|
|
5
|
+
const decode = (jwt) => {
|
|
6
|
+
const {
|
|
7
|
+
sub,
|
|
8
|
+
aud: ignoredAud,
|
|
9
|
+
exp: ignoredExp,
|
|
10
|
+
iat: ignoredIat,
|
|
11
|
+
iss: ignoredIss,
|
|
12
|
+
jti: ignoredJti,
|
|
13
|
+
nbf: ignoredNbf,
|
|
14
|
+
...rest
|
|
15
|
+
} = decodeJwt(jwt);
|
|
16
|
+
const parsed = sessionTokenPayload.safeParse({
|
|
17
|
+
userId: sub,
|
|
18
|
+
...rest
|
|
19
|
+
});
|
|
20
|
+
if (parsed.error) {
|
|
21
|
+
throw new ExtBridgeError(
|
|
22
|
+
"Session token payload invalid: " + parsed.error.message
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
return parsed.data;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export { decode };
|
|
29
|
+
//# sourceMappingURL=decode.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decode.mjs","sources":["../../../src/sessionToken/decode.ts"],"sourcesContent":["import { ExtBridgeError } from \"@/error\";\nimport { sessionTokenPayload } from \"@/sessionToken/schemas\";\nimport type { SessionTokenPayload } from \"@/sessionToken/types\";\nimport { decodeJwt } from \"jose\";\n\ntype JwtPayloadType = Omit<SessionTokenPayload, \"userId\">;\n\nexport const decode = (jwt: string) => {\n const {\n sub,\n aud: ignoredAud,\n exp: ignoredExp,\n iat: ignoredIat,\n iss: ignoredIss,\n jti: ignoredJti,\n nbf: ignoredNbf,\n ...rest\n } = decodeJwt<JwtPayloadType>(jwt);\n\n const parsed = sessionTokenPayload.safeParse({\n userId: sub,\n ...rest,\n });\n\n if (parsed.error) {\n throw new ExtBridgeError(\n \"Session token payload invalid: \" + parsed.error.message,\n );\n }\n\n return parsed.data;\n};\n"],"names":[],"mappings":";;;;AAOa,MAAA,MAAA,GAAS,CAAC,GAAgB,KAAA;AACrC,EAAM,MAAA;AAAA,IACJ,GAAA;AAAA,IACA,GAAK,EAAA,UAAA;AAAA,IACL,GAAK,EAAA,UAAA;AAAA,IACL,GAAK,EAAA,UAAA;AAAA,IACL,GAAK,EAAA,UAAA;AAAA,IACL,GAAK,EAAA,UAAA;AAAA,IACL,GAAK,EAAA,UAAA;AAAA,IACL,GAAG;AAAA,GACL,GAAI,UAA0B,GAAG,CAAA;AAEjC,EAAM,MAAA,MAAA,GAAS,oBAAoB,SAAU,CAAA;AAAA,IAC3C,MAAQ,EAAA,GAAA;AAAA,IACR,GAAG;AAAA,GACJ,CAAA;AAED,EAAA,IAAI,OAAO,KAAO,EAAA;AAChB,IAAA,MAAM,IAAI,cAAA;AAAA,MACR,iCAAA,GAAoC,OAAO,KAAM,CAAA;AAAA,KACnD;AAAA;AAGF,EAAA,OAAO,MAAO,CAAA,IAAA;AAChB;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MW_EXT_API_URL } from '../../environment.mjs';
|
|
2
|
+
import axios from 'axios';
|
|
3
|
+
|
|
4
|
+
const fetchPublicKey = async (serial) => {
|
|
5
|
+
const response = await axios({
|
|
6
|
+
url: `https://${MW_EXT_API_URL}/v2/public-keys/${serial}`,
|
|
7
|
+
validateStatus: (status) => status === 200,
|
|
8
|
+
params: {
|
|
9
|
+
format: "spki",
|
|
10
|
+
purpose: "session_key"
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
return response.data.key;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { fetchPublicKey };
|
|
17
|
+
//# sourceMappingURL=fetchPublicKey.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchPublicKey.mjs","sources":["../../../../src/sessionToken/publicKeys/fetchPublicKey.ts"],"sourcesContent":["import { MW_EXT_API_URL } from \"@/environment\";\nimport axios from \"axios\";\n\ninterface ApiResponse {\n algorithm: string;\n key: string;\n serial: string;\n}\n\nexport const fetchPublicKey = async (serial: string) => {\n const response = await axios<ApiResponse>({\n url: `https://${MW_EXT_API_URL}/v2/public-keys/${serial}`,\n validateStatus: (status) => status === 200,\n params: {\n format: \"spki\",\n purpose: \"session_key\",\n },\n });\n return response.data.key;\n};\n"],"names":[],"mappings":";;;AASa,MAAA,cAAA,GAAiB,OAAO,MAAmB,KAAA;AACtD,EAAM,MAAA,QAAA,GAAW,MAAM,KAAmB,CAAA;AAAA,IACxC,GAAK,EAAA,CAAA,QAAA,EAAW,cAAc,CAAA,gBAAA,EAAmB,MAAM,CAAA,CAAA;AAAA,IACvD,cAAA,EAAgB,CAAC,MAAA,KAAW,MAAW,KAAA,GAAA;AAAA,IACvC,MAAQ,EAAA;AAAA,MACN,MAAQ,EAAA,MAAA;AAAA,MACR,OAAS,EAAA;AAAA;AACX,GACD,CAAA;AACD,EAAA,OAAO,SAAS,IAAK,CAAA,GAAA;AACvB;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { fetchPublicKey } from './fetchPublicKey.mjs';
|
|
2
|
+
import { importSPKI } from 'jose';
|
|
3
|
+
|
|
4
|
+
const cache = /* @__PURE__ */ new Map();
|
|
5
|
+
const getPublicKey = async (serial) => {
|
|
6
|
+
const cached = cache.get(serial);
|
|
7
|
+
if (cached) {
|
|
8
|
+
return cached;
|
|
9
|
+
}
|
|
10
|
+
const publicKeyFromApi = await fetchPublicKey(serial);
|
|
11
|
+
const cryptoKey = await importSPKI(publicKeyFromApi, "Ed25519");
|
|
12
|
+
cache.set(serial, cryptoKey);
|
|
13
|
+
return cryptoKey;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { getPublicKey };
|
|
17
|
+
//# sourceMappingURL=publicKeys.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publicKeys.mjs","sources":["../../../../src/sessionToken/publicKeys/publicKeys.ts"],"sourcesContent":["import { fetchPublicKey } from \"@/sessionToken/publicKeys/fetchPublicKey\";\nimport { importSPKI } from \"jose\";\n\nconst cache = new Map<string, CryptoKey>();\n\nexport const getPublicKey = async (serial: string): Promise<CryptoKey> => {\n const cached = cache.get(serial);\n if (cached) {\n return cached;\n }\n\n const publicKeyFromApi = await fetchPublicKey(serial);\n const cryptoKey = await importSPKI(publicKeyFromApi, \"Ed25519\");\n\n cache.set(serial, cryptoKey);\n return cryptoKey;\n};\n"],"names":[],"mappings":";;;AAGA,MAAM,KAAA,uBAAY,GAAuB,EAAA;AAE5B,MAAA,YAAA,GAAe,OAAO,MAAuC,KAAA;AACxE,EAAM,MAAA,MAAA,GAAS,KAAM,CAAA,GAAA,CAAI,MAAM,CAAA;AAC/B,EAAA,IAAI,MAAQ,EAAA;AACV,IAAO,OAAA,MAAA;AAAA;AAGT,EAAM,MAAA,gBAAA,GAAmB,MAAM,cAAA,CAAe,MAAM,CAAA;AACpD,EAAA,MAAM,SAAY,GAAA,MAAM,UAAW,CAAA,gBAAA,EAAkB,SAAS,CAAA;AAE9D,EAAM,KAAA,CAAA,GAAA,CAAI,QAAQ,SAAS,CAAA;AAC3B,EAAO,OAAA,SAAA;AACT;;;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
const extensionScopes = z.string().array();
|
|
4
|
+
const extensionContext = z.enum(["project", "organization"]);
|
|
5
|
+
const sessionTokenPayload = z.object({
|
|
6
|
+
sessionId: z.string(),
|
|
7
|
+
userId: z.string(),
|
|
8
|
+
extensionId: z.string(),
|
|
9
|
+
extensionInstanceId: z.string(),
|
|
10
|
+
contextId: z.string(),
|
|
11
|
+
context: extensionContext,
|
|
12
|
+
scopes: extensionScopes,
|
|
13
|
+
authenticatableWithoutSecret: z.boolean(),
|
|
14
|
+
publicKeySerial: z.string()
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export { extensionContext, extensionScopes, sessionTokenPayload };
|
|
18
|
+
//# sourceMappingURL=schemas.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.mjs","sources":["../../../src/sessionToken/schemas.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const extensionScopes = z.string().array();\nexport const extensionContext = z.enum([\"project\", \"organization\"]);\n\nexport const sessionTokenPayload = z.object({\n sessionId: z.string(),\n userId: z.string(),\n extensionId: z.string(),\n extensionInstanceId: z.string(),\n contextId: z.string(),\n context: extensionContext,\n scopes: extensionScopes,\n authenticatableWithoutSecret: z.boolean(),\n publicKeySerial: z.string(),\n});\n"],"names":[],"mappings":";;AAEO,MAAM,eAAkB,GAAA,CAAA,CAAE,MAAO,EAAA,CAAE,KAAM;AACzC,MAAM,mBAAmB,CAAE,CAAA,IAAA,CAAK,CAAC,SAAA,EAAW,cAAc,CAAC;AAErD,MAAA,mBAAA,GAAsB,EAAE,MAAO,CAAA;AAAA,EAC1C,SAAA,EAAW,EAAE,MAAO,EAAA;AAAA,EACpB,MAAA,EAAQ,EAAE,MAAO,EAAA;AAAA,EACjB,WAAA,EAAa,EAAE,MAAO,EAAA;AAAA,EACtB,mBAAA,EAAqB,EAAE,MAAO,EAAA;AAAA,EAC9B,SAAA,EAAW,EAAE,MAAO,EAAA;AAAA,EACpB,OAAS,EAAA,gBAAA;AAAA,EACT,MAAQ,EAAA,eAAA;AAAA,EACR,4BAAA,EAA8B,EAAE,OAAQ,EAAA;AAAA,EACxC,eAAA,EAAiB,EAAE,MAAO;AAC5B,CAAC;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { decode } from './decode.mjs';
|
|
2
|
+
import { getPublicKey } from './publicKeys/publicKeys.mjs';
|
|
3
|
+
import { jwtVerify } from 'jose';
|
|
4
|
+
|
|
5
|
+
const verify = async (sessionToken) => {
|
|
6
|
+
const decoded = decode(sessionToken);
|
|
7
|
+
const publicKey = await getPublicKey(decoded.publicKeySerial);
|
|
8
|
+
await jwtVerify(sessionToken, publicKey);
|
|
9
|
+
return decoded;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { verify };
|
|
13
|
+
//# sourceMappingURL=verify.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify.mjs","sources":["../../../src/sessionToken/verify.ts"],"sourcesContent":["import { decode } from \"@/sessionToken/decode\";\nimport { getPublicKey } from \"@/sessionToken/publicKeys\";\nimport { jwtVerify } from \"jose\";\n\nexport const verify = async (sessionToken: string) => {\n const decoded = decode(sessionToken);\n const publicKey = await getPublicKey(decoded.publicKeySerial);\n await jwtVerify(sessionToken, publicKey);\n return decoded;\n};\n"],"names":[],"mappings":";;;;AAIa,MAAA,MAAA,GAAS,OAAO,YAAyB,KAAA;AACpD,EAAM,MAAA,OAAA,GAAU,OAAO,YAAY,CAAA;AACnC,EAAA,MAAM,SAAY,GAAA,MAAM,YAAa,CAAA,OAAA,CAAQ,eAAe,CAAA;AAC5D,EAAM,MAAA,SAAA,CAAU,cAAc,SAAS,CAAA;AACvC,EAAO,OAAA,OAAA;AACT;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const parseConfig: (something: unknown) => {
|
|
2
|
+
sessionId: string;
|
|
3
|
+
userId: string;
|
|
4
|
+
extensionId: string;
|
|
5
|
+
extensionInstanceId: string;
|
|
6
|
+
} | import('zod').objectOutputType<{
|
|
7
|
+
appId: import('zod').ZodOptional<import('zod').ZodString>;
|
|
8
|
+
projectId: import('zod').ZodOptional<import('zod').ZodString>;
|
|
9
|
+
customerId: import('zod').ZodOptional<import('zod').ZodString>;
|
|
10
|
+
}, import('zod').ZodString, "strip">;
|
|
11
|
+
//# sourceMappingURL=parse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../../src/config/parse.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,GAAI,WAAW,OAAO;;;;;;;;;oCAM7C,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const config: z.ZodUnion<[z.ZodObject<{
|
|
3
|
+
sessionId: z.ZodString;
|
|
4
|
+
userId: z.ZodString;
|
|
5
|
+
extensionId: z.ZodString;
|
|
6
|
+
extensionInstanceId: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
sessionId: string;
|
|
9
|
+
userId: string;
|
|
10
|
+
extensionId: string;
|
|
11
|
+
extensionInstanceId: string;
|
|
12
|
+
}, {
|
|
13
|
+
sessionId: string;
|
|
14
|
+
userId: string;
|
|
15
|
+
extensionId: string;
|
|
16
|
+
extensionInstanceId: string;
|
|
17
|
+
}>, z.ZodObject<{
|
|
18
|
+
appId: z.ZodOptional<z.ZodString>;
|
|
19
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
20
|
+
customerId: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, "strip", z.ZodString, z.objectOutputType<{
|
|
22
|
+
appId: z.ZodOptional<z.ZodString>;
|
|
23
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
24
|
+
customerId: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, z.ZodString, "strip">, z.objectInputType<{
|
|
26
|
+
appId: z.ZodOptional<z.ZodString>;
|
|
27
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
28
|
+
customerId: z.ZodOptional<z.ZodString>;
|
|
29
|
+
}, z.ZodString, "strip">>]>;
|
|
30
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/config/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAA2C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/config/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/environment.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/error.ts"],"names":[],"mappings":"AAAA,qBAAa,cAAe,SAAQ,KAAK;gBAC3B,OAAO,EAAE,MAAM;CAI5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../src/global.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,CAAC;AAClB,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loading.d.ts","sourceRoot":"","sources":["../../src/loading.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,UAAU;;;CASb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/react/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExtBridge.d.ts","sourceRoot":"","sources":["../../../../src/react/hooks/useExtBridge.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,iCAIjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const decode: (jwt: string) => {
|
|
2
|
+
sessionId: string;
|
|
3
|
+
userId: string;
|
|
4
|
+
extensionId: string;
|
|
5
|
+
extensionInstanceId: string;
|
|
6
|
+
contextId: string;
|
|
7
|
+
context: "project" | "organization";
|
|
8
|
+
scopes: string[];
|
|
9
|
+
authenticatableWithoutSecret: boolean;
|
|
10
|
+
publicKeySerial: string;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=decode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decode.d.ts","sourceRoot":"","sources":["../../../src/sessionToken/decode.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,MAAM,GAAI,KAAK,MAAM;;;;;;;;;;CAwBjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sessionToken/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchPublicKey.d.ts","sourceRoot":"","sources":["../../../../src/sessionToken/publicKeys/fetchPublicKey.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,cAAc,GAAU,QAAQ,MAAM,oBAUlD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sessionToken/publicKeys/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publicKeys.d.ts","sourceRoot":"","sources":["../../../../src/sessionToken/publicKeys/publicKeys.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,GAAU,QAAQ,MAAM,KAAG,OAAO,CAAC,SAAS,CAWpE,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const extensionScopes: z.ZodArray<z.ZodString, "many">;
|
|
3
|
+
export declare const extensionContext: z.ZodEnum<["project", "organization"]>;
|
|
4
|
+
export declare const sessionTokenPayload: z.ZodObject<{
|
|
5
|
+
sessionId: z.ZodString;
|
|
6
|
+
userId: z.ZodString;
|
|
7
|
+
extensionId: z.ZodString;
|
|
8
|
+
extensionInstanceId: z.ZodString;
|
|
9
|
+
contextId: z.ZodString;
|
|
10
|
+
context: z.ZodEnum<["project", "organization"]>;
|
|
11
|
+
scopes: z.ZodArray<z.ZodString, "many">;
|
|
12
|
+
authenticatableWithoutSecret: z.ZodBoolean;
|
|
13
|
+
publicKeySerial: z.ZodString;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
sessionId: string;
|
|
16
|
+
userId: string;
|
|
17
|
+
extensionId: string;
|
|
18
|
+
extensionInstanceId: string;
|
|
19
|
+
contextId: string;
|
|
20
|
+
context: "project" | "organization";
|
|
21
|
+
scopes: string[];
|
|
22
|
+
authenticatableWithoutSecret: boolean;
|
|
23
|
+
publicKeySerial: string;
|
|
24
|
+
}, {
|
|
25
|
+
sessionId: string;
|
|
26
|
+
userId: string;
|
|
27
|
+
extensionId: string;
|
|
28
|
+
extensionInstanceId: string;
|
|
29
|
+
contextId: string;
|
|
30
|
+
context: "project" | "organization";
|
|
31
|
+
scopes: string[];
|
|
32
|
+
authenticatableWithoutSecret: boolean;
|
|
33
|
+
publicKeySerial: string;
|
|
34
|
+
}>;
|
|
35
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/sessionToken/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,eAAe,iCAAqB,CAAC;AAClD,eAAO,MAAM,gBAAgB,wCAAsC,CAAC;AAEpE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU9B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { extensionContext, extensionScopes, sessionTokenPayload } from './schemas';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export type ExtensionScopes = z.infer<typeof extensionScopes>;
|
|
4
|
+
export type ExtensionContext = z.infer<typeof extensionContext>;
|
|
5
|
+
export type SessionTokenPayload = z.infer<typeof sessionTokenPayload>;
|
|
6
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/sessionToken/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAC9D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAChE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const verify: (sessionToken: string) => Promise<{
|
|
2
|
+
sessionId: string;
|
|
3
|
+
userId: string;
|
|
4
|
+
extensionId: string;
|
|
5
|
+
extensionInstanceId: string;
|
|
6
|
+
contextId: string;
|
|
7
|
+
context: "project" | "organization";
|
|
8
|
+
scopes: string[];
|
|
9
|
+
authenticatableWithoutSecret: boolean;
|
|
10
|
+
publicKeySerial: string;
|
|
11
|
+
}>;
|
|
12
|
+
//# sourceMappingURL=verify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../../src/sessionToken/verify.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,GAAU,cAAc,MAAM;;;;;;;;;;EAKhD,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ExtBridgeConfig } from './config/types';
|
|
2
|
+
import { loadingApi } from './loading';
|
|
3
|
+
export type { ExtBridgeConfig } from './config/types';
|
|
4
|
+
type LoadingApi = typeof loadingApi;
|
|
5
|
+
export interface ExtBridgeRemoteApi {
|
|
6
|
+
getSessionToken: () => Promise<string>;
|
|
7
|
+
getConfig: () => Promise<ExtBridgeConfig>;
|
|
8
|
+
}
|
|
9
|
+
export interface ExtBridge extends ExtBridgeRemoteApi, LoadingApi {
|
|
10
|
+
config: ExtBridgeConfig;
|
|
11
|
+
}
|
|
12
|
+
declare global {
|
|
13
|
+
var mwExtBridge: ExtBridge;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,YAAY,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,KAAK,UAAU,GAAG,OAAO,UAAU,CAAC;AAEpC,MAAM,WAAW,kBAAkB;IACjC,eAAe,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IACvC,SAAS,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,SAAU,SAAQ,kBAAkB,EAAE,UAAU;IAC/D,MAAM,EAAE,eAAe,CAAC;CACzB;AAED,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,WAAW,EAAE,SAAS,CAAC;CAC5B"}
|
package/package.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mittwald/ext-bridge",
|
|
3
|
+
"version": "0.2.0-alpha.106",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Bridge for mStudio embedded frontend extensions",
|
|
6
|
+
"homepage": "https://mittwald.github.io/flow",
|
|
7
|
+
"repository": "https://github.com/mittwald/flow",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/types/index.d.ts",
|
|
11
|
+
"default": "./dist/js/index.mjs"
|
|
12
|
+
},
|
|
13
|
+
"./react": {
|
|
14
|
+
"types": "./dist/types/react/index.d.ts",
|
|
15
|
+
"default": "./dist/js/react.mjs"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=20.11"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "vite build --config vite.build.config.ts",
|
|
26
|
+
"clean": "rimraf dist",
|
|
27
|
+
"test": "exit 0",
|
|
28
|
+
"test:compile": "tsc --noEmit"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@mittwald/react-use-promise": "^3.0.3",
|
|
32
|
+
"axios": "^1.8.3",
|
|
33
|
+
"jose": "^6.0.10",
|
|
34
|
+
"std-env": "^3.8.1",
|
|
35
|
+
"zod": "^3.24.2"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@mittwald/typescript-config": "workspace:*",
|
|
39
|
+
"@types/node": "^22.13.10",
|
|
40
|
+
"@types/react": "^19",
|
|
41
|
+
"@types/react-dom": "^19",
|
|
42
|
+
"nx": "^20.5.0",
|
|
43
|
+
"prettier": "^3.5.3",
|
|
44
|
+
"react": "^19",
|
|
45
|
+
"react-dom": "^19",
|
|
46
|
+
"rimraf": "^6.0.1",
|
|
47
|
+
"rollup-preserve-directives": "^1.1.3",
|
|
48
|
+
"typescript": "^5.8.2",
|
|
49
|
+
"vite": "^6.2.1",
|
|
50
|
+
"vite-plugin-checker": "^0.9.0",
|
|
51
|
+
"vite-plugin-dts": "^4.5.3",
|
|
52
|
+
"vite-plugin-externalize-deps": "^0.9.0"
|
|
53
|
+
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"react": "^19",
|
|
56
|
+
"react-dom": "^19"
|
|
57
|
+
},
|
|
58
|
+
"peerDependenciesMeta": {
|
|
59
|
+
"react": {
|
|
60
|
+
"optional": true
|
|
61
|
+
},
|
|
62
|
+
"react-dom": {
|
|
63
|
+
"optional": true
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|