zudoku 0.1.1-dev.19 → 0.1.1-dev.20
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/lib/plugins/openapi/index.js +1 -1
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.js +3 -2
- package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.js.map +1 -1
- package/lib/urql-B7mLfVog.js +1611 -0
- package/lib/zudoku.auth.js +15 -19696
- package/lib/zudoku.openapi-worker.js +135 -4
- package/lib/zudoku.plugins.js +5691 -7423
- package/package.json +1 -1
- package/src/lib/plugins/openapi/index.tsx +6 -2
- package/src/lib/plugins/openapi/worker/createSharedWorkerClient.ts +3 -3
package/package.json
CHANGED
|
@@ -13,7 +13,9 @@ import {
|
|
|
13
13
|
cacheExchange,
|
|
14
14
|
fetchExchange,
|
|
15
15
|
} from "./util/urql.js";
|
|
16
|
-
|
|
16
|
+
|
|
17
|
+
import { createSharedWorkerClient } from "zudoku/open-api-worker";
|
|
18
|
+
import type { createSharedWorkerClient as createSharedWorkerClientType } from "./worker/createSharedWorkerClient.js";
|
|
17
19
|
|
|
18
20
|
const OasContext = createContext<{ config: OasPluginConfig } | undefined>(
|
|
19
21
|
undefined,
|
|
@@ -82,7 +84,9 @@ export const openApiPlugin = (config: OasPluginConfig): DevPortalPlugin => {
|
|
|
82
84
|
url: config.server,
|
|
83
85
|
exchanges: [cacheExchange, fetchExchange],
|
|
84
86
|
})
|
|
85
|
-
: createSharedWorkerClient()
|
|
87
|
+
: (createSharedWorkerClient() as ReturnType<
|
|
88
|
+
typeof createSharedWorkerClientType
|
|
89
|
+
>);
|
|
86
90
|
|
|
87
91
|
return {
|
|
88
92
|
getNavigation: async (path: string) => {
|
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
mapExchange,
|
|
8
8
|
} from "../util/urql.js";
|
|
9
9
|
|
|
10
|
-
import { createSharedWorker } from "zudoku/open-api-worker";
|
|
11
|
-
|
|
12
10
|
export type WorkerGraphQLMessage = { id: string; body: string };
|
|
13
11
|
|
|
14
12
|
const ulid = monotonicFactory();
|
|
15
13
|
export const createSharedWorkerClient = () => {
|
|
16
|
-
const worker =
|
|
14
|
+
const worker = new SharedWorker(new URL("./worker.ts", import.meta.url), {
|
|
15
|
+
type: "module",
|
|
16
|
+
});
|
|
17
17
|
|
|
18
18
|
worker.port.start();
|
|
19
19
|
|