one 1.25.12 → 1.25.13
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/cjs/cli/build.cjs +8 -161
- package/dist/cjs/cli/build.native.js +8 -204
- package/dist/cjs/cli/build.native.js.map +1 -1
- package/dist/cjs/createDevHandleRequest.cjs +151 -0
- package/dist/cjs/createDevHandleRequest.native.js +194 -0
- package/dist/cjs/createDevHandleRequest.native.js.map +1 -0
- package/dist/cjs/createHandleRequest.cjs +1 -123
- package/dist/cjs/createHandleRequest.native.js +1 -163
- package/dist/cjs/createHandleRequest.native.js.map +1 -1
- package/dist/cjs/createHandleRequest.test.cjs +25 -25
- package/dist/cjs/createHandleRequest.test.native.js +25 -25
- package/dist/cjs/createHandleRequest.test.native.js.map +1 -1
- package/dist/cjs/layouts/Drawer.cjs +0 -2
- package/dist/cjs/layouts/Drawer.native.js.map +1 -1
- package/dist/cjs/layouts/Tabs.cjs +0 -2
- package/dist/cjs/layouts/Tabs.native.js.map +1 -1
- package/dist/cjs/router/web/WebStackView.cjs +0 -2
- package/dist/cjs/router/web/WebStackView.native.js +0 -2
- package/dist/cjs/router/web/WebStackView.native.js.map +1 -1
- package/dist/cjs/serve-worker.cjs +3 -2
- package/dist/cjs/serve-worker.native.js +3 -2
- package/dist/cjs/serve-worker.native.js.map +1 -1
- package/dist/cjs/server/workerHandler.cjs +12 -7
- package/dist/cjs/server/workerHandler.native.js +13 -8
- package/dist/cjs/server/workerHandler.native.js.map +1 -1
- package/dist/cjs/server/workerHandler.test.cjs +25 -0
- package/dist/cjs/server/workerHandler.test.native.js +25 -0
- package/dist/cjs/server/workerHandler.test.native.js.map +1 -1
- package/dist/cjs/vite/cloudflareWranglerConfig.cjs +247 -0
- package/dist/cjs/vite/cloudflareWranglerConfig.native.js +392 -0
- package/dist/cjs/vite/cloudflareWranglerConfig.native.js.map +1 -0
- package/dist/cjs/vite/cloudflareWranglerConfig.test.cjs +116 -0
- package/dist/cjs/vite/cloudflareWranglerConfig.test.native.js +120 -0
- package/dist/cjs/vite/cloudflareWranglerConfig.test.native.js.map +1 -0
- package/dist/cjs/vite/one.cjs +4 -2
- package/dist/cjs/vite/one.native.js +8 -6
- package/dist/cjs/vite/one.native.js.map +1 -1
- package/dist/cjs/vite/plugins/SSRCSSPlugin.cjs +10 -1
- package/dist/cjs/vite/plugins/SSRCSSPlugin.native.js +52 -3
- package/dist/cjs/vite/plugins/SSRCSSPlugin.native.js.map +1 -1
- package/dist/cjs/vite/plugins/environmentGuardPlugin.cjs +1 -1
- package/dist/cjs/vite/plugins/environmentGuardPlugin.native.js +1 -1
- package/dist/cjs/vite/plugins/environmentGuardPlugin.native.js.map +1 -1
- package/dist/cjs/vite/plugins/environmentGuardPlugin.test.cjs +4 -0
- package/dist/cjs/vite/plugins/environmentGuardPlugin.test.native.js +4 -0
- package/dist/cjs/vite/plugins/environmentGuardPlugin.test.native.js.map +1 -1
- package/dist/cjs/vite/plugins/fileSystemRouterPlugin.cjs +14 -5
- package/dist/cjs/vite/plugins/fileSystemRouterPlugin.native.js +15 -5
- package/dist/cjs/vite/plugins/fileSystemRouterPlugin.native.js.map +1 -1
- package/dist/cjs/vite/plugins/fileSystemRouterPlugin.test.cjs +47 -0
- package/dist/cjs/vite/plugins/fileSystemRouterPlugin.test.native.js +47 -0
- package/dist/cjs/vite/plugins/fileSystemRouterPlugin.test.native.js.map +1 -1
- package/dist/cjs/vite/plugins/virtualEntryPlugin.cjs +2 -1
- package/dist/cjs/vite/plugins/virtualEntryPlugin.native.js +2 -1
- package/dist/cjs/vite/plugins/virtualEntryPlugin.native.js.map +1 -1
- package/dist/cjs/vite/plugins/virtualEntryPlugin.test.cjs +12 -0
- package/dist/cjs/vite/plugins/virtualEntryPlugin.test.native.js +12 -0
- package/dist/cjs/vite/plugins/virtualEntryPlugin.test.native.js.map +1 -1
- package/dist/cjs/vite/plugins/workerdDevPlugin.cjs +377 -0
- package/dist/cjs/vite/plugins/workerdDevPlugin.native.js +493 -0
- package/dist/cjs/vite/plugins/workerdDevPlugin.native.js.map +1 -0
- package/dist/cjs/vite/plugins/workerdDevPlugin.test.cjs +42 -0
- package/dist/cjs/vite/plugins/workerdDevPlugin.test.native.js +45 -0
- package/dist/cjs/vite/plugins/workerdDevPlugin.test.native.js.map +1 -0
- package/dist/esm/cli/build.mjs +1 -154
- package/dist/esm/cli/build.mjs.map +1 -1
- package/dist/esm/cli/build.native.js +1 -197
- package/dist/esm/cli/build.native.js.map +1 -1
- package/dist/esm/createDevHandleRequest.mjs +126 -0
- package/dist/esm/createDevHandleRequest.mjs.map +1 -0
- package/dist/esm/createDevHandleRequest.native.js +166 -0
- package/dist/esm/createDevHandleRequest.native.js.map +1 -0
- package/dist/esm/createHandleRequest.mjs +1 -123
- package/dist/esm/createHandleRequest.mjs.map +1 -1
- package/dist/esm/createHandleRequest.native.js +1 -163
- package/dist/esm/createHandleRequest.native.js.map +1 -1
- package/dist/esm/createHandleRequest.test.mjs +1 -1
- package/dist/esm/createHandleRequest.test.native.js +1 -1
- package/dist/esm/fork/useLinking.native.test.mjs +1 -1
- package/dist/esm/getURL.native.test.mjs +1 -1
- package/dist/esm/layouts/Drawer.mjs +0 -2
- package/dist/esm/layouts/Drawer.mjs.map +1 -1
- package/dist/esm/layouts/Drawer.native.js.map +1 -1
- package/dist/esm/layouts/Tabs.mjs +0 -2
- package/dist/esm/layouts/Tabs.mjs.map +1 -1
- package/dist/esm/layouts/Tabs.native.js.map +1 -1
- package/dist/esm/router/hmrImport.native.test.mjs +1 -1
- package/dist/esm/router/routeHmr.native.test.mjs +1 -1
- package/dist/esm/router/routeHmr.native.test.mjs.map +1 -1
- package/dist/esm/router/web/WebStackView.mjs +0 -2
- package/dist/esm/router/web/WebStackView.mjs.map +1 -1
- package/dist/esm/router/web/WebStackView.native.js +0 -2
- package/dist/esm/router/web/WebStackView.native.js.map +1 -1
- package/dist/esm/serve-worker.mjs +3 -2
- package/dist/esm/serve-worker.mjs.map +1 -1
- package/dist/esm/serve-worker.native.js +3 -2
- package/dist/esm/serve-worker.native.js.map +1 -1
- package/dist/esm/server/workerHandler.mjs +12 -7
- package/dist/esm/server/workerHandler.mjs.map +1 -1
- package/dist/esm/server/workerHandler.native.js +13 -8
- package/dist/esm/server/workerHandler.native.js.map +1 -1
- package/dist/esm/server/workerHandler.test.mjs +25 -0
- package/dist/esm/server/workerHandler.test.mjs.map +1 -1
- package/dist/esm/server/workerHandler.test.native.js +25 -0
- package/dist/esm/server/workerHandler.test.native.js.map +1 -1
- package/dist/esm/vite/cloudflareWranglerConfig.mjs +202 -0
- package/dist/esm/vite/cloudflareWranglerConfig.mjs.map +1 -0
- package/dist/esm/vite/cloudflareWranglerConfig.native.js +344 -0
- package/dist/esm/vite/cloudflareWranglerConfig.native.js.map +1 -0
- package/dist/esm/vite/cloudflareWranglerConfig.test.mjs +117 -0
- package/dist/esm/vite/cloudflareWranglerConfig.test.mjs.map +1 -0
- package/dist/esm/vite/cloudflareWranglerConfig.test.native.js +118 -0
- package/dist/esm/vite/cloudflareWranglerConfig.test.native.js.map +1 -0
- package/dist/esm/vite/one.mjs +4 -2
- package/dist/esm/vite/one.mjs.map +1 -1
- package/dist/esm/vite/one.native.js +8 -6
- package/dist/esm/vite/one.native.js.map +1 -1
- package/dist/esm/vite/plugins/SSRCSSPlugin.mjs +10 -1
- package/dist/esm/vite/plugins/SSRCSSPlugin.mjs.map +1 -1
- package/dist/esm/vite/plugins/SSRCSSPlugin.native.js +52 -3
- package/dist/esm/vite/plugins/SSRCSSPlugin.native.js.map +1 -1
- package/dist/esm/vite/plugins/environmentGuardPlugin.mjs +1 -1
- package/dist/esm/vite/plugins/environmentGuardPlugin.mjs.map +1 -1
- package/dist/esm/vite/plugins/environmentGuardPlugin.native.js +1 -1
- package/dist/esm/vite/plugins/environmentGuardPlugin.native.js.map +1 -1
- package/dist/esm/vite/plugins/environmentGuardPlugin.test.mjs +4 -0
- package/dist/esm/vite/plugins/environmentGuardPlugin.test.mjs.map +1 -1
- package/dist/esm/vite/plugins/environmentGuardPlugin.test.native.js +4 -0
- package/dist/esm/vite/plugins/environmentGuardPlugin.test.native.js.map +1 -1
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.mjs +13 -4
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.mjs.map +1 -1
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.native.js +14 -4
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.native.js.map +1 -1
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.test.mjs +47 -0
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.test.mjs.map +1 -1
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.test.native.js +47 -0
- package/dist/esm/vite/plugins/fileSystemRouterPlugin.test.native.js.map +1 -1
- package/dist/esm/vite/plugins/virtualEntryPlugin.mjs +2 -1
- package/dist/esm/vite/plugins/virtualEntryPlugin.mjs.map +1 -1
- package/dist/esm/vite/plugins/virtualEntryPlugin.native.js +2 -1
- package/dist/esm/vite/plugins/virtualEntryPlugin.native.js.map +1 -1
- package/dist/esm/vite/plugins/virtualEntryPlugin.test.mjs +12 -0
- package/dist/esm/vite/plugins/virtualEntryPlugin.test.mjs.map +1 -1
- package/dist/esm/vite/plugins/virtualEntryPlugin.test.native.js +12 -0
- package/dist/esm/vite/plugins/virtualEntryPlugin.test.native.js.map +1 -1
- package/dist/esm/vite/plugins/workerdDevPlugin.mjs +349 -0
- package/dist/esm/vite/plugins/workerdDevPlugin.mjs.map +1 -0
- package/dist/esm/vite/plugins/workerdDevPlugin.native.js +462 -0
- package/dist/esm/vite/plugins/workerdDevPlugin.native.js.map +1 -0
- package/dist/esm/vite/plugins/workerdDevPlugin.test.mjs +43 -0
- package/dist/esm/vite/plugins/workerdDevPlugin.test.mjs.map +1 -0
- package/dist/esm/vite/plugins/workerdDevPlugin.test.native.js +43 -0
- package/dist/esm/vite/plugins/workerdDevPlugin.test.native.js.map +1 -0
- package/package.json +9 -9
- package/src/cli/build.ts +7 -192
- package/src/createDevHandleRequest.ts +186 -0
- package/src/createHandleRequest.test.ts +1 -1
- package/src/createHandleRequest.ts +2 -172
- package/src/layouts/Drawer.web.tsx +0 -3
- package/src/layouts/Tabs.web.tsx +0 -2
- package/src/router/web/WebStackView.tsx +0 -3
- package/src/serve-worker.ts +6 -1
- package/src/server/workerHandler.test.ts +23 -0
- package/src/server/workerHandler.ts +15 -7
- package/src/vite/cloudflareWranglerConfig.test.ts +101 -0
- package/src/vite/cloudflareWranglerConfig.ts +248 -0
- package/src/vite/one.ts +11 -1
- package/src/vite/plugins/SSRCSSPlugin.ts +17 -2
- package/src/vite/plugins/environmentGuardPlugin.test.ts +5 -0
- package/src/vite/plugins/environmentGuardPlugin.ts +2 -2
- package/src/vite/plugins/fileSystemRouterPlugin.test.ts +44 -0
- package/src/vite/plugins/fileSystemRouterPlugin.tsx +20 -8
- package/src/vite/plugins/virtualEntryPlugin.test.ts +13 -0
- package/src/vite/plugins/virtualEntryPlugin.ts +3 -1
- package/src/vite/plugins/workerdDevPlugin.test.ts +44 -0
- package/src/vite/plugins/workerdDevPlugin.ts +408 -0
- package/types/cli/build.d.ts.map +1 -1
- package/types/createDevHandleRequest.d.ts +10 -0
- package/types/createDevHandleRequest.d.ts.map +1 -0
- package/types/createHandleRequest.d.ts +2 -9
- package/types/createHandleRequest.d.ts.map +1 -1
- package/types/layouts/Drawer.web.d.ts.map +1 -1
- package/types/layouts/Tabs.web.d.ts.map +1 -1
- package/types/router/web/WebStackView.d.ts.map +1 -1
- package/types/serve-worker.d.ts +3 -1
- package/types/serve-worker.d.ts.map +1 -1
- package/types/server/workerHandler.d.ts +1 -0
- package/types/server/workerHandler.d.ts.map +1 -1
- package/types/vite/cloudflareWranglerConfig.d.ts +21 -0
- package/types/vite/cloudflareWranglerConfig.d.ts.map +1 -0
- package/types/vite/cloudflareWranglerConfig.test.d.ts +2 -0
- package/types/vite/cloudflareWranglerConfig.test.d.ts.map +1 -0
- package/types/vite/one.d.ts.map +1 -1
- package/types/vite/plugins/SSRCSSPlugin.d.ts.map +1 -1
- package/types/vite/plugins/fileSystemRouterPlugin.d.ts.map +1 -1
- package/types/vite/plugins/virtualEntryPlugin.d.ts.map +1 -1
- package/types/vite/plugins/workerdDevPlugin.d.ts +15 -0
- package/types/vite/plugins/workerdDevPlugin.d.ts.map +1 -0
- package/types/vite/plugins/workerdDevPlugin.test.d.ts +2 -0
- package/types/vite/plugins/workerdDevPlugin.test.d.ts.map +1 -0
- package/dist/cjs/headless/devHeadlessNote.cjs +0 -34
- package/dist/cjs/headless/devHeadlessNote.native.js +0 -37
- package/dist/cjs/headless/devHeadlessNote.native.js.map +0 -1
- package/dist/esm/headless/devHeadlessNote.mjs +0 -9
- package/dist/esm/headless/devHeadlessNote.mjs.map +0 -1
- package/dist/esm/headless/devHeadlessNote.native.js +0 -9
- package/dist/esm/headless/devHeadlessNote.native.js.map +0 -1
- package/src/headless/devHeadlessNote.ts +0 -13
- package/types/headless/devHeadlessNote.d.ts +0 -2
- package/types/headless/devHeadlessNote.d.ts.map +0 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs'
|
|
2
|
+
import { tmpdir } from 'node:os'
|
|
3
|
+
import { join } from 'node:path'
|
|
4
|
+
import { afterEach, describe, expect, it } from 'vitest'
|
|
5
|
+
import { generateWorkerdDevEntryModule } from './workerdDevPlugin'
|
|
6
|
+
|
|
7
|
+
let testDir: string | undefined
|
|
8
|
+
|
|
9
|
+
afterEach(() => {
|
|
10
|
+
if (testDir) {
|
|
11
|
+
rmSync(testDir, { recursive: true, force: true })
|
|
12
|
+
testDir = undefined
|
|
13
|
+
}
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
describe('generateWorkerdDevEntryModule', () => {
|
|
17
|
+
it('emits createWorkerHandler wiring and lazy imports for pages and api routes', () => {
|
|
18
|
+
testDir = mkdtempSync(join(tmpdir(), 'one-workerd-entry-'))
|
|
19
|
+
const appDir = join(testDir, 'app')
|
|
20
|
+
mkdirSync(join(appDir, 'api'), { recursive: true })
|
|
21
|
+
writeFileSync(
|
|
22
|
+
join(appDir, 'ssr-page+ssr.tsx'),
|
|
23
|
+
'export default function Page() { return null }\n'
|
|
24
|
+
)
|
|
25
|
+
writeFileSync(
|
|
26
|
+
join(appDir, 'api', 'hello+api.ts'),
|
|
27
|
+
'export function GET() { return new Response("ok") }\n'
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
const code = generateWorkerdDevEntryModule({
|
|
31
|
+
root: testDir,
|
|
32
|
+
options: { web: { defaultRenderMode: 'ssr' } },
|
|
33
|
+
routerRoot: 'app',
|
|
34
|
+
routePaths: ['./ssr-page+ssr.tsx', './api/hello+api.ts'],
|
|
35
|
+
preloads: ['/@vite/client'],
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
expect(code).toContain("from 'one/serve-worker'")
|
|
39
|
+
expect(code).toContain('disableModuleCache: true')
|
|
40
|
+
expect(code).toContain('serverEntry: () => import("virtual:one-entry")')
|
|
41
|
+
expect(code).toContain('/api/hello')
|
|
42
|
+
expect(code).toContain('ssr-page+ssr.tsx')
|
|
43
|
+
})
|
|
44
|
+
})
|
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
import { mkdirSync, writeFileSync } from 'node:fs'
|
|
2
|
+
import { join, resolve } from 'node:path'
|
|
3
|
+
import { pathToFileURL } from 'node:url'
|
|
4
|
+
import { resolvePath } from '@vxrn/resolve'
|
|
5
|
+
import { cloudflare } from '@cloudflare/vite-plugin'
|
|
6
|
+
import { getPlatformEnvDefine } from '@vxrn/vite-plugin-metro'
|
|
7
|
+
import { exactRegex } from 'rolldown/filter'
|
|
8
|
+
import { type Plugin, type PluginOption } from 'vite'
|
|
9
|
+
import { CACHE_KEY } from '../../constants'
|
|
10
|
+
import { virtalEntryIdClient, virtualEntryId } from './virtualEntryConstants'
|
|
11
|
+
import { getManifest } from '../getManifest'
|
|
12
|
+
import { getRouterRootFromOneOptions } from '../../utils/getRouterRootFromOneOptions'
|
|
13
|
+
import type { RouteIndex } from '../../utils/routeIndex'
|
|
14
|
+
import type { One, RouteInfo } from '../types'
|
|
15
|
+
import {
|
|
16
|
+
createCloudflareWranglerConfig,
|
|
17
|
+
getCloudflareProjectNameSync,
|
|
18
|
+
loadUserWranglerConfigSync,
|
|
19
|
+
shouldEnableWorkerdDev,
|
|
20
|
+
} from '../cloudflareWranglerConfig'
|
|
21
|
+
|
|
22
|
+
export { shouldEnableWorkerdDev }
|
|
23
|
+
|
|
24
|
+
export const workerdDevEntryId = 'virtual:one-workerd-dev-entry'
|
|
25
|
+
const resolvedWorkerdDevEntryId = `\0${workerdDevEntryId}`
|
|
26
|
+
|
|
27
|
+
const WORKERD_DEV_DIR = 'node_modules/.one-workerd-dev'
|
|
28
|
+
|
|
29
|
+
function serveOnly(plugin: Plugin): Plugin {
|
|
30
|
+
const existing = plugin.apply
|
|
31
|
+
return {
|
|
32
|
+
...plugin,
|
|
33
|
+
apply(config, env) {
|
|
34
|
+
if (env.command !== 'serve') return false
|
|
35
|
+
if (typeof existing === 'function') return existing(config, env)
|
|
36
|
+
if (existing === 'build') return false
|
|
37
|
+
return true
|
|
38
|
+
},
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function toImportHref(root: string, routerRoot: string, routeFile: string): string {
|
|
43
|
+
const rel = routeFile.replace(/^\.\//, '')
|
|
44
|
+
return pathToFileURL(resolve(root, routerRoot, rel)).href
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function serializeImportMap(entries: Array<[string, string]>): string {
|
|
48
|
+
return entries
|
|
49
|
+
.map(([key, href]) => ` ${JSON.stringify(key)}: () => import(${JSON.stringify(href)})`)
|
|
50
|
+
.join(',\n')
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function stripRouteForWorker(route: RouteInfo): RouteInfo {
|
|
54
|
+
const { layouts, middlewares, ...rest } = route
|
|
55
|
+
return {
|
|
56
|
+
...rest,
|
|
57
|
+
// live-render SSG in dev the same way the node middleware does
|
|
58
|
+
type: route.type === 'ssg' ? 'ssr' : route.type,
|
|
59
|
+
layouts: layouts?.map((layout) => ({
|
|
60
|
+
contextKey: layout.contextKey,
|
|
61
|
+
})) as RouteInfo['layouts'],
|
|
62
|
+
middlewares: middlewares?.map((middleware) => ({
|
|
63
|
+
contextKey: middleware.contextKey,
|
|
64
|
+
})) as RouteInfo['middlewares'],
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function stubRouteBuildInfo(
|
|
69
|
+
route: RouteInfo,
|
|
70
|
+
preloads: string[]
|
|
71
|
+
): One.BuildInfo['routeToBuildInfo'][string] {
|
|
72
|
+
const pageType = route.type === 'ssg' ? 'ssr' : route.type
|
|
73
|
+
return {
|
|
74
|
+
type: pageType,
|
|
75
|
+
path: route.page,
|
|
76
|
+
routeFile: route.file,
|
|
77
|
+
middlewares: route.middlewares?.map((middleware) => middleware.contextKey) ?? [],
|
|
78
|
+
preloadPath: '',
|
|
79
|
+
cssPreloadPath: '',
|
|
80
|
+
loaderPath: '',
|
|
81
|
+
cleanPath: route.urlCleanPath || route.page,
|
|
82
|
+
htmlPath: '',
|
|
83
|
+
clientJsPath: '',
|
|
84
|
+
serverJsPath: '',
|
|
85
|
+
params: {},
|
|
86
|
+
preloads,
|
|
87
|
+
css: [],
|
|
88
|
+
layoutCSS: [],
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function generateWorkerdDevEntryModule(args: {
|
|
93
|
+
root: string
|
|
94
|
+
options: One.PluginOptions
|
|
95
|
+
routerRoot: string
|
|
96
|
+
routePaths: string[]
|
|
97
|
+
preloads: string[]
|
|
98
|
+
}): string {
|
|
99
|
+
const { root, options, routerRoot, routePaths, preloads } = args
|
|
100
|
+
const manifest = getManifest({
|
|
101
|
+
routerRoot: resolve(root, routerRoot),
|
|
102
|
+
ignoredRouteFiles: options.router?.ignoredRouteFiles,
|
|
103
|
+
routePaths,
|
|
104
|
+
})
|
|
105
|
+
|
|
106
|
+
if (!manifest) {
|
|
107
|
+
throw new Error('[one] workerd dev: no routes manifest')
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const pageImports = new Map<string, string>()
|
|
111
|
+
const apiImports = new Map<string, string>()
|
|
112
|
+
const middlewareImports = new Map<string, string>()
|
|
113
|
+
const routeToBuildInfo: One.BuildInfo['routeToBuildInfo'] = {}
|
|
114
|
+
|
|
115
|
+
const registerPage = (routeFile: string | undefined) => {
|
|
116
|
+
if (!routeFile) return
|
|
117
|
+
if (pageImports.has(routeFile)) return
|
|
118
|
+
pageImports.set(routeFile, toImportHref(root, routerRoot, routeFile))
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
for (const route of manifest.pageRoutes) {
|
|
122
|
+
registerPage(route.file)
|
|
123
|
+
for (const layout of route.layouts || []) {
|
|
124
|
+
registerPage(layout.contextKey)
|
|
125
|
+
}
|
|
126
|
+
for (const middleware of route.middlewares || []) {
|
|
127
|
+
if (!middleware.contextKey || middlewareImports.has(middleware.contextKey)) continue
|
|
128
|
+
middlewareImports.set(
|
|
129
|
+
middleware.contextKey,
|
|
130
|
+
toImportHref(root, routerRoot, middleware.contextKey)
|
|
131
|
+
)
|
|
132
|
+
}
|
|
133
|
+
if (route.file) {
|
|
134
|
+
routeToBuildInfo[route.file] = stubRouteBuildInfo(route, preloads)
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
for (const route of manifest.apiRoutes) {
|
|
139
|
+
if (route.file) {
|
|
140
|
+
apiImports.set(route.page, toImportHref(root, routerRoot, route.file))
|
|
141
|
+
}
|
|
142
|
+
for (const middleware of route.middlewares || []) {
|
|
143
|
+
if (!middleware.contextKey || middlewareImports.has(middleware.contextKey)) continue
|
|
144
|
+
middlewareImports.set(
|
|
145
|
+
middleware.contextKey,
|
|
146
|
+
toImportHref(root, routerRoot, middleware.contextKey)
|
|
147
|
+
)
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
const pageRoutes = manifest.pageRoutes.map(stripRouteForWorker)
|
|
152
|
+
const apiRoutes = manifest.apiRoutes.map(stripRouteForWorker)
|
|
153
|
+
|
|
154
|
+
const buildInfo: One.BuildInfo = {
|
|
155
|
+
constants: { CACHE_KEY },
|
|
156
|
+
oneOptions: options,
|
|
157
|
+
routeToBuildInfo,
|
|
158
|
+
pathToRoute: {},
|
|
159
|
+
routeMap: {},
|
|
160
|
+
manifest: {
|
|
161
|
+
pageRoutes,
|
|
162
|
+
apiRoutes,
|
|
163
|
+
allRoutes: [...pageRoutes, ...apiRoutes],
|
|
164
|
+
},
|
|
165
|
+
preloads: Object.fromEntries(preloads.map((preload) => [preload, true])),
|
|
166
|
+
cssPreloads: {},
|
|
167
|
+
loaders: {},
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const spaPreloadScripts = preloads
|
|
171
|
+
.map((preload) => `<script type="module" src="${preload}"></script>`)
|
|
172
|
+
.join('')
|
|
173
|
+
|
|
174
|
+
return `if (typeof MessageChannel === 'undefined') {
|
|
175
|
+
globalThis.MessageChannel = class MessageChannel {
|
|
176
|
+
constructor() {
|
|
177
|
+
this.port1 = { postMessage: () => {}, onmessage: null, close: () => {} }
|
|
178
|
+
this.port2 = { postMessage: () => {}, onmessage: null, close: () => {} }
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
import { serve, setFetchStaticHtml } from 'one/serve-worker'
|
|
184
|
+
|
|
185
|
+
const lazyRoutes = {
|
|
186
|
+
serverEntry: () => import(${JSON.stringify(virtualEntryId)}),
|
|
187
|
+
pages: {
|
|
188
|
+
${serializeImportMap([...pageImports])}
|
|
189
|
+
},
|
|
190
|
+
api: {
|
|
191
|
+
${serializeImportMap([...apiImports])}
|
|
192
|
+
},
|
|
193
|
+
middlewares: {
|
|
194
|
+
${serializeImportMap([...middlewareImports])}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
const buildInfo = ${JSON.stringify(buildInfo)}
|
|
199
|
+
|
|
200
|
+
let server
|
|
201
|
+
|
|
202
|
+
export default {
|
|
203
|
+
async fetch(request, env, ctx) {
|
|
204
|
+
const url = new URL(request.url)
|
|
205
|
+
const pathname = url.pathname
|
|
206
|
+
|
|
207
|
+
if (pathname === '/status' || pathname.startsWith('/status?')) {
|
|
208
|
+
return new Response('packager-status:running', {
|
|
209
|
+
headers: { 'content-type': 'text/plain' },
|
|
210
|
+
})
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
if (!server) {
|
|
214
|
+
server = await serve(buildInfo, lazyRoutes, { disableModuleCache: true })
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
if (env && env.ASSETS) {
|
|
218
|
+
setFetchStaticHtml(async (path) => {
|
|
219
|
+
try {
|
|
220
|
+
const assetUrl = new URL(request.url)
|
|
221
|
+
assetUrl.pathname = path
|
|
222
|
+
const assetResponse = await env.ASSETS.fetch(new Request(assetUrl))
|
|
223
|
+
if (assetResponse && assetResponse.ok) {
|
|
224
|
+
return await assetResponse.text()
|
|
225
|
+
}
|
|
226
|
+
} catch {}
|
|
227
|
+
return null
|
|
228
|
+
})
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
try {
|
|
232
|
+
const response = await server.fetch(request, env, ctx)
|
|
233
|
+
|
|
234
|
+
if (!response || response.status === 404) {
|
|
235
|
+
if (env && env.ASSETS) {
|
|
236
|
+
try {
|
|
237
|
+
const assetResponse = await env.ASSETS.fetch(request)
|
|
238
|
+
if (assetResponse && assetResponse.status !== 404) {
|
|
239
|
+
return assetResponse
|
|
240
|
+
}
|
|
241
|
+
} catch {}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
if (!response) {
|
|
246
|
+
if (request.method === 'GET' || request.method === 'HEAD') {
|
|
247
|
+
return new Response(
|
|
248
|
+
'<!DOCTYPE html><html><head>' +
|
|
249
|
+
${JSON.stringify(spaPreloadScripts)} +
|
|
250
|
+
'</head></html>',
|
|
251
|
+
{ headers: { 'content-type': 'text/html' } }
|
|
252
|
+
)
|
|
253
|
+
}
|
|
254
|
+
return new Response('Not Found', { status: 404 })
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
return response
|
|
258
|
+
} finally {
|
|
259
|
+
setFetchStaticHtml(null)
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
`
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export function createWorkerdDevPlugins(
|
|
267
|
+
options: One.PluginOptions,
|
|
268
|
+
root: string,
|
|
269
|
+
routeIndex: RouteIndex
|
|
270
|
+
): PluginOption[] {
|
|
271
|
+
if (!shouldEnableWorkerdDev(options.web?.deploy, root)) {
|
|
272
|
+
return []
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
const cacheDir = join(root, WORKERD_DEV_DIR)
|
|
276
|
+
const wranglerInputPath = join(cacheDir, '_wrangler.input.jsonc')
|
|
277
|
+
const workerEntryPath = join(cacheDir, 'worker-entry.js')
|
|
278
|
+
|
|
279
|
+
mkdirSync(cacheDir, { recursive: true })
|
|
280
|
+
writeFileSync(
|
|
281
|
+
workerEntryPath,
|
|
282
|
+
`export { default } from ${JSON.stringify(workerdDevEntryId)}\n`
|
|
283
|
+
)
|
|
284
|
+
|
|
285
|
+
const userWranglerConfig = loadUserWranglerConfigSync(root)
|
|
286
|
+
const projectName = getCloudflareProjectNameSync(root)
|
|
287
|
+
const wranglerInputConfig = createCloudflareWranglerConfig(
|
|
288
|
+
projectName,
|
|
289
|
+
userWranglerConfig?.config
|
|
290
|
+
)
|
|
291
|
+
// wrangler resolves `main` relative to the config file, which lives in cacheDir
|
|
292
|
+
wranglerInputConfig.main = 'worker-entry.js'
|
|
293
|
+
writeFileSync(wranglerInputPath, `${JSON.stringify(wranglerInputConfig, null, 2)}\n`)
|
|
294
|
+
|
|
295
|
+
const preloads = options.web?.experimentalBundledDev
|
|
296
|
+
? ['/bundledDevClient.mjs', '/assets/_virtual_one-entry.js']
|
|
297
|
+
: ['/@vite/client', virtalEntryIdClient]
|
|
298
|
+
|
|
299
|
+
const empty = resolvePath('@vxrn/vite-plugin-metro/empty', root)
|
|
300
|
+
const rnWebPkg = resolvePath('react-native-web/package.json', root)
|
|
301
|
+
const rnWeb = resolvePath('react-native-web', root)
|
|
302
|
+
const safeArea = resolvePath('@vxrn/safe-area', root)
|
|
303
|
+
|
|
304
|
+
const preparePlugin: Plugin = {
|
|
305
|
+
name: 'one:workerd-dev-prepare',
|
|
306
|
+
apply: 'serve',
|
|
307
|
+
enforce: 'pre',
|
|
308
|
+
|
|
309
|
+
config() {
|
|
310
|
+
return {
|
|
311
|
+
environments: {
|
|
312
|
+
worker: {
|
|
313
|
+
define: {
|
|
314
|
+
...getPlatformEnvDefine('ssr'),
|
|
315
|
+
'process.env.TAMAGUI_IS_SERVER': JSON.stringify('1'),
|
|
316
|
+
'process.env.TAMAGUI_KEEP_THEMES': JSON.stringify('1'),
|
|
317
|
+
'process.env.ONE_CACHE_KEY': JSON.stringify(CACHE_KEY),
|
|
318
|
+
},
|
|
319
|
+
optimizeDeps: {
|
|
320
|
+
include: [
|
|
321
|
+
'react',
|
|
322
|
+
'react-dom',
|
|
323
|
+
'react-dom/client',
|
|
324
|
+
'react-dom/server.browser',
|
|
325
|
+
'react/jsx-runtime',
|
|
326
|
+
'react/jsx-dev-runtime',
|
|
327
|
+
],
|
|
328
|
+
},
|
|
329
|
+
build: {
|
|
330
|
+
rolldownOptions: {
|
|
331
|
+
shimMissingExports: true,
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
},
|
|
335
|
+
},
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
|
|
339
|
+
// environment resolve options have no alias field; match the production
|
|
340
|
+
// worker aliases with a worker-only resolveId (rolldown cannot parse RN Flow)
|
|
341
|
+
resolveId: {
|
|
342
|
+
filter: {
|
|
343
|
+
id: /^(react-native(\/|$)|react-native-safe-area-context$)/,
|
|
344
|
+
},
|
|
345
|
+
handler(source) {
|
|
346
|
+
if (this.environment.name !== 'worker') return
|
|
347
|
+
if (/^react-native\/Libraries\//.test(source)) return empty
|
|
348
|
+
if (source === 'react-native/package.json') return rnWebPkg
|
|
349
|
+
if (source === 'react-native') return rnWeb
|
|
350
|
+
if (source === 'react-native-safe-area-context') return safeArea
|
|
351
|
+
},
|
|
352
|
+
},
|
|
353
|
+
|
|
354
|
+
configureServer(server) {
|
|
355
|
+
if (!server.environments.worker) {
|
|
356
|
+
throw new Error(
|
|
357
|
+
'[one] ONE_EXPERIMENTAL_WORKER_DEV=1 is set but @cloudflare/vite-plugin did not register a "worker" environment. ' +
|
|
358
|
+
`Expected wrangler config at ${wranglerInputPath}.`
|
|
359
|
+
)
|
|
360
|
+
}
|
|
361
|
+
console.info('[one] experimental workerd dev enabled (ONE_EXPERIMENTAL_WORKER_DEV=1)')
|
|
362
|
+
},
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
const virtualPlugin: Plugin = {
|
|
366
|
+
name: 'one:workerd-dev-entry',
|
|
367
|
+
apply: 'serve',
|
|
368
|
+
|
|
369
|
+
resolveId: {
|
|
370
|
+
filter: { id: exactRegex(workerdDevEntryId) },
|
|
371
|
+
handler(id) {
|
|
372
|
+
if (this.environment.name !== 'worker') return
|
|
373
|
+
if (id === workerdDevEntryId) return resolvedWorkerdDevEntryId
|
|
374
|
+
},
|
|
375
|
+
},
|
|
376
|
+
|
|
377
|
+
load: {
|
|
378
|
+
filter: { id: exactRegex(resolvedWorkerdDevEntryId) },
|
|
379
|
+
handler() {
|
|
380
|
+
if (this.environment.name !== 'worker') return
|
|
381
|
+
return generateWorkerdDevEntryModule({
|
|
382
|
+
root,
|
|
383
|
+
options,
|
|
384
|
+
routerRoot: getRouterRootFromOneOptions(options),
|
|
385
|
+
routePaths: routeIndex.getPaths(),
|
|
386
|
+
preloads,
|
|
387
|
+
})
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
|
|
391
|
+
hotUpdate({ file }) {
|
|
392
|
+
if (this.environment.name !== 'worker') return
|
|
393
|
+
const graph = this.environment.moduleGraph
|
|
394
|
+
const entry = graph.getModuleById(resolvedWorkerdDevEntryId)
|
|
395
|
+
if (!entry) return
|
|
396
|
+
const modules = graph.getModulesByFile(file)
|
|
397
|
+
if (!modules?.size) return
|
|
398
|
+
graph.invalidateModule(entry)
|
|
399
|
+
},
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
const cloudflarePlugins = cloudflare({
|
|
403
|
+
configPath: wranglerInputPath,
|
|
404
|
+
viteEnvironment: { name: 'worker' },
|
|
405
|
+
}).map(serveOnly)
|
|
406
|
+
|
|
407
|
+
return [preparePlugin, virtualPlugin, ...cloudflarePlugins]
|
|
408
|
+
}
|
package/types/cli/build.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/cli/build.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/cli/build.ts"],"names":[],"mappings":"AA0LA,wBAAsB,KAAK,CAAC,IAAI,EAAE;IAChC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,SAAS,CAAA;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,iBA0yCA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type RequestHandlerResponse, type RequestHandlers } from './createHandleRequest';
|
|
2
|
+
export declare function createHandleRequest(handlers: RequestHandlers, { routerRoot, ignoredRouteFiles, routePaths, }: {
|
|
3
|
+
routerRoot: string;
|
|
4
|
+
ignoredRouteFiles?: string[];
|
|
5
|
+
routePaths?: string[];
|
|
6
|
+
}): {
|
|
7
|
+
manifest: import("./server/createRoutesManifest").RoutesManifest<string>;
|
|
8
|
+
handler: (request: Request) => Promise<RequestHandlerResponse>;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=createDevHandleRequest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createDevHandleRequest.d.ts","sourceRoot":"","sources":["../src/createDevHandleRequest.ts"],"names":[],"mappings":"AACA,OAAO,EASL,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACrB,MAAM,uBAAuB,CAAA;AAQ9B,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,EACE,UAAU,EACV,iBAAiB,EACjB,UAAU,GACX,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE;;uBAWjE,OAAO,KACf,OAAO,CAAC,sBAAsB,CAAC;EAmJrC"}
|
|
@@ -15,7 +15,8 @@ type RequestHandlerProps<RouteExtraProps extends object = {}> = {
|
|
|
15
15
|
url: URL;
|
|
16
16
|
loaderProps?: LoaderProps;
|
|
17
17
|
};
|
|
18
|
-
type RequestHandlerResponse = null | string | Response;
|
|
18
|
+
export type RequestHandlerResponse = null | string | Response;
|
|
19
|
+
export declare function isStaticAssetRequestPath(pathname: string): boolean;
|
|
19
20
|
export declare function isPageRequestMethod(method: string): method is "GET" | "HEAD";
|
|
20
21
|
export declare function runMiddlewares(handlers: RequestHandlers, request: Request, route: RouteInfo, getResponse: () => Promise<Response>): Promise<Response>;
|
|
21
22
|
export declare function resolveAPIRoute(handlers: RequestHandlers, request: Request, url: URL, route: RouteInfoCompiled, env?: unknown, executionCtx?: unknown): Promise<Response>;
|
|
@@ -30,14 +31,6 @@ export declare function compileManifest(manifest: {
|
|
|
30
31
|
pageRoutes: RouteInfoCompiled[];
|
|
31
32
|
apiRoutes: RouteInfoCompiled[];
|
|
32
33
|
};
|
|
33
|
-
export declare function createHandleRequest(handlers: RequestHandlers, { routerRoot, ignoredRouteFiles, routePaths, }: {
|
|
34
|
-
routerRoot: string;
|
|
35
|
-
ignoredRouteFiles?: string[];
|
|
36
|
-
routePaths?: string[];
|
|
37
|
-
}): {
|
|
38
|
-
manifest: import("./server/createRoutesManifest").RoutesManifest<string>;
|
|
39
|
-
handler: (request: Request) => Promise<RequestHandlerResponse>;
|
|
40
|
-
};
|
|
41
34
|
export declare function getLoaderParams(url: URL, config: {
|
|
42
35
|
compiledRegex: RegExp;
|
|
43
36
|
routeKeys: Record<string, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createHandleRequest.d.ts","sourceRoot":"","sources":["../src/createHandleRequest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"createHandleRequest.d.ts","sourceRoot":"","sources":["../src/createHandleRequest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAG1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IACzD,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IAC3D,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IACxD,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAA;IAC7D,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;CACpD,CAAA;AAED,KAAK,mBAAmB,CAAC,eAAe,SAAS,MAAM,GAAG,EAAE,IAAI;IAC9D,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,eAAe,CAAA;IAC1C,GAAG,EAAE,GAAG,CAAA;IACR,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,CAAA;AAK7D,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAIlE;AAKD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,4BAEjD;AAmBD,wBAAsB,cAAc,CAClC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,SAAS,EAChB,WAAW,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,GACnC,OAAO,CAAC,QAAQ,CAAC,CAgEnB;AAED,wBAAsB,eAAe,CACnC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,iBAAiB,EACxB,GAAG,CAAC,EAAE,OAAO,EACb,YAAY,CAAC,EAAE,OAAO,qBA+CvB;AAED,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,iBAAiB,qBAkFzB;AAuBD,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,iBAAiB,gBA4BzB;AAKD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,OAcpD;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,SAAS,CAazD;AASD,wBAAgB,eAAe,CAAC,QAAQ,EAAE;IACxC,UAAU,EAAE,SAAS,EAAE,CAAA;IACvB,SAAS,EAAE,SAAS,EAAE,CAAA;CACvB,GAAG;IACF,UAAU,EAAE,iBAAiB,EAAE,CAAA;IAC/B,SAAS,EAAE,iBAAiB,EAAE,CAAA;CAC/B,CAKA;AAED,wBAAgB,eAAe,CAC7B,GAAG,EAAE,GAAG,EACR,MAAM,EAAE;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,0BAWrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.web.d.ts","sourceRoot":"","sources":["../../src/layouts/Drawer.web.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Drawer.web.d.ts","sourceRoot":"","sources":["../../src/layouts/Drawer.web.tsx"],"names":[],"mappings":"AA6GA,eAAO,MAAM,MAAM;;CAEjB,CAAA;AAEF,eAAe,MAAM,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.web.d.ts","sourceRoot":"","sources":["../../src/layouts/Tabs.web.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAkC,KAAK,SAAS,EAAmB,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Tabs.web.d.ts","sourceRoot":"","sources":["../../src/layouts/Tabs.web.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAkC,KAAK,SAAS,EAAmB,MAAM,OAAO,CAAA;AASvF,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAQxC,KAAK,qBAAqB,GAAG;IAC3B,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,gBAAgB,CAAC,EAAE,SAAS,EAAE,CAAA;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,aAAa,CAAC,EAAE,GAAG,CAAA;IACnB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACnB,CAAA;AAED,KAAK,SAAS,GAAG,IAAI,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,GAAG;IACjE,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAwGD,eAAO,MAAM,IAAI;;;CAGf,CAAA;AAEF,eAAe,IAAI,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebStackView.d.ts","sourceRoot":"","sources":["../../../src/router/web/WebStackView.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EACV,6BAA6B,EAC7B,4BAA4B,EAC7B,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAML,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"WebStackView.d.ts","sourceRoot":"","sources":["../../../src/router/web/WebStackView.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EACV,6BAA6B,EAC7B,4BAA4B,EAC7B,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAML,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;AAiBd,KAAK,YAAY,GAAG,IAAI,CAAC,4BAA4B,EAAE,cAAc,CAAC,GAAG;IACvE,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,YAAY,CAAC,EAAE,4BAA4B,CAAC,cAAc,CAAC,GAAG,OAAO,GAAG,MAAM,CAAA;CAC/E,CAAA;AAED,KAAK,WAAW,GAAG,MAAM,CACvB,MAAM,EACN;IACE,OAAO,EAAE,YAAY,CAAA;IACrB,MAAM,EAAE,MAAM,YAAY,CAAA;IAC1B,UAAU,EAAE,GAAG,CAAA;CAChB,CACF,CAAA;AAED,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,oBAAoB,CAAC,aAAa,CAAC,CAAA;IAC1C,UAAU,EAAE,kBAAkB,CAAC,aAAa,CAAC,GAAG;QAC9C,MAAM,EAAE,MAAM,IAAI,CAAA;QAClB,QAAQ,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAA;KAChC,CAAA;IACD,WAAW,EAAE,WAAW,CAAA;IACxB,cAAc,CAAC,EAAE,SAAS,EAAE,CAAA;IAC5B,QAAQ,CAAC,EAAE,6BAA6B,CAAA;CACzC,CAAA;AAED,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,UAAU,EACV,WAAW,EACX,cAAc,GACf,EAAE,iBAAiB,2CAcnB"}
|
package/types/serve-worker.d.ts
CHANGED
|
@@ -11,7 +11,9 @@ export type { LazyRoutes };
|
|
|
11
11
|
* API route handler contexts as `{ env, executionCtx }`).
|
|
12
12
|
* Call `updateRoutes(newBuildInfo, newLazyRoutes?)` to hot-swap the route table.
|
|
13
13
|
*/
|
|
14
|
-
export declare function serve(buildInfo: One.BuildInfo, lazyRoutes?: LazyRoutes
|
|
14
|
+
export declare function serve(buildInfo: One.BuildInfo, lazyRoutes?: LazyRoutes, serveOptions?: {
|
|
15
|
+
disableModuleCache?: boolean;
|
|
16
|
+
}): Promise<{
|
|
15
17
|
fetch: (request: Request, env?: unknown, executionCtx?: unknown) => Promise<Response | null>;
|
|
16
18
|
updateRoutes(newBuildInfo: One.BuildInfo, newLazyRoutes?: LazyRoutes): void;
|
|
17
19
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve-worker.d.ts","sourceRoot":"","sources":["../src/serve-worker.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAE7E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAGvC,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAGnF,YAAY,EAAE,UAAU,EAAE,CAAA;AAE1B;;;;;;;;GAQG;AACH,wBAAsB,KAAK,
|
|
1
|
+
{"version":3,"file":"serve-worker.d.ts","sourceRoot":"","sources":["../src/serve-worker.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAE7E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAGvC,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAGnF,YAAY,EAAE,UAAU,EAAE,CAAA;AAE1B;;;;;;;;GAQG;AACH,wBAAsB,KAAK,CACzB,SAAS,EAAE,GAAG,CAAC,SAAS,EACxB,UAAU,CAAC,EAAE,UAAU,EACvB,YAAY,CAAC,EAAE;IAAE,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAAE;;+BAelB,GAAG,CAAC,SAAS,kBAAkB,UAAU;GAKvE"}
|
|
@@ -14,6 +14,7 @@ type WorkerHandlerOptions = {
|
|
|
14
14
|
oneOptions: One.PluginOptions;
|
|
15
15
|
buildInfo: One.BuildInfo;
|
|
16
16
|
lazyRoutes: LazyRoutes;
|
|
17
|
+
disableModuleCache?: boolean;
|
|
17
18
|
};
|
|
18
19
|
export declare function createWorkerHandler(options: WorkerHandlerOptions): {
|
|
19
20
|
handleRequest: (request: Request, env?: unknown, executionCtx?: unknown) => Promise<Response | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workerHandler.d.ts","sourceRoot":"","sources":["../../src/server/workerHandler.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAA;AAKxC,MAAM,MAAM,UAAU,GAAG;IACvB,WAAW,EAAE,MAAM,OAAO,CAAC;QACzB,OAAO,EAAE;YACP,MAAM,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAA;YAC3B,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,CAAC,cAAc,CAAC,CAAA;SACvD,CAAA;KACF,CAAC,CAAA;IACF,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,CAAA;IACzC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,CAAA;IACvC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,CAAA;CAChD,CAAA;AAED,KAAK,oBAAoB,GAAG;IAC1B,UAAU,EAAE,GAAG,CAAC,aAAa,CAAA;IAC7B,SAAS,EAAE,GAAG,CAAC,SAAS,CAAA;IACxB,UAAU,EAAE,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"workerHandler.d.ts","sourceRoot":"","sources":["../../src/server/workerHandler.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAA;AAKxC,MAAM,MAAM,UAAU,GAAG;IACvB,WAAW,EAAE,MAAM,OAAO,CAAC;QACzB,OAAO,EAAE;YACP,MAAM,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAA;YAC3B,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,CAAC,cAAc,CAAC,CAAA;SACvD,CAAA;KACF,CAAC,CAAA;IACF,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,CAAA;IACzC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,CAAA;IACvC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,CAAA;CAChD,CAAA;AAED,KAAK,oBAAoB,GAAG;IAC1B,UAAU,EAAE,GAAG,CAAC,aAAa,CAAA;IAC7B,SAAS,EAAE,GAAG,CAAC,SAAS,CAAA;IACxB,UAAU,EAAE,UAAU,CAAA;IAGtB,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B,CAAA;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,oBAAoB;6BAqhBpD,OAAO,QACV,OAAO,iBACE,OAAO,KACrB,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;iCA0MS,GAAG,CAAC,SAAS,kBAAkB,UAAU;EAmB9E"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type JsonPrimitive = string | number | boolean | null;
|
|
2
|
+
export type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
3
|
+
[key: string]: JsonValue;
|
|
4
|
+
};
|
|
5
|
+
export declare const GENERATED_CLOUDFLARE_WRANGLER_RULES: JsonValue[];
|
|
6
|
+
export declare function isPlainObject(value: unknown): value is Record<string, JsonValue>;
|
|
7
|
+
export declare function hasUserWranglerConfig(root: string): boolean;
|
|
8
|
+
export declare function loadUserWranglerConfigSync(root: string): {
|
|
9
|
+
path: string;
|
|
10
|
+
config: Record<string, JsonValue>;
|
|
11
|
+
} | null;
|
|
12
|
+
export declare function loadUserWranglerConfig(root: string): Promise<{
|
|
13
|
+
path: string;
|
|
14
|
+
config: Record<string, JsonValue>;
|
|
15
|
+
} | null>;
|
|
16
|
+
export declare function createCloudflareWranglerConfig(projectName: string, userConfig?: Record<string, JsonValue>): Record<string, JsonValue>;
|
|
17
|
+
export declare function getCloudflareProjectNameSync(root: string): string;
|
|
18
|
+
export declare function getCloudflareProjectName(root: string): Promise<string>;
|
|
19
|
+
export declare function isExperimentalWorkerDevEnabled(): boolean;
|
|
20
|
+
export declare function shouldEnableWorkerdDev(deploy: unknown, root: string): boolean;
|
|
21
|
+
//# sourceMappingURL=cloudflareWranglerConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudflareWranglerConfig.d.ts","sourceRoot":"","sources":["../../src/vite/cloudflareWranglerConfig.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAA;AAC5D,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,SAAS,EAAE,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAA;AAElF,eAAO,MAAM,mCAAmC,EAAE,SAAS,EAK1D,CAAA;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAEhF;AAmGD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAO3D;AA2BD,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,MAAM,GACX;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;CAAE,GAAG,IAAI,CAS5D;AAED,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,MAAM,GACX,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;CAAE,GAAG,IAAI,CAAC,CAcrE;AAED,wBAAgB,8BAA8B,CAC5C,WAAW,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GACrC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAiC3B;AAED,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQjE;AAED,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQ5E;AAED,wBAAgB,8BAA8B,IAAI,OAAO,CAExD;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAK7E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloudflareWranglerConfig.test.d.ts","sourceRoot":"","sources":["../../src/vite/cloudflareWranglerConfig.test.ts"],"names":[],"mappings":""}
|
package/types/vite/one.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"one.d.ts","sourceRoot":"","sources":["../../src/vite/one.ts"],"names":[],"mappings":"AAWA,OAAO,EAA8B,KAAK,YAAY,EAAE,MAAM,MAAM,CAAA;AAKpE,OAAO,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"one.d.ts","sourceRoot":"","sources":["../../src/vite/one.ts"],"names":[],"mappings":"AAWA,OAAO,EAA8B,KAAK,YAAY,EAAE,MAAM,MAAM,CAAA;AAKpE,OAAO,qBAAqB,CAAA;AAqB5B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,SAAS,CAAA;AAyBlC,wBAAgB,GAAG,CAAC,OAAO,GAAE,GAAG,CAAC,aAAkB,GAAG,YAAY,CAs2BjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SSRCSSPlugin.d.ts","sourceRoot":"","sources":["../../../src/vite/plugins/SSRCSSPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"SSRCSSPlugin.d.ts","sourceRoot":"","sources":["../../../src/vite/plugins/SSRCSSPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,MAAM,EAAE,aAAa,EAAE,MAAM,MAAM,CAAA;AAK7D,wBAAgB,YAAY,CAAC,UAAU,EAAE;IAAE,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,MAAM,CAgFtE;AAaD,wBAAsB,YAAY,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,mBAgD1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileSystemRouterPlugin.d.ts","sourceRoot":"","sources":["../../../src/vite/plugins/fileSystemRouterPlugin.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAW,MAAM,EAAiB,MAAM,MAAM,CAAA;AAY1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAIxD,OAAO,KAAK,EAAE,GAAG,EAAa,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"fileSystemRouterPlugin.d.ts","sourceRoot":"","sources":["../../../src/vite/plugins/fileSystemRouterPlugin.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAW,MAAM,EAAiB,MAAM,MAAM,CAAA;AAY1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAIxD,OAAO,KAAK,EAAE,GAAG,EAAa,MAAM,kBAAkB,CAAA;AAuBtD,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,GAAG,CAAC,aAAa,EAC1B,UAAU,EAAE,UAAU,GACrB,MAAM,CAq4BR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtualEntryPlugin.d.ts","sourceRoot":"","sources":["../../../src/vite/plugins/virtualEntryPlugin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AASlC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"virtualEntryPlugin.d.ts","sourceRoot":"","sources":["../../../src/vite/plugins/virtualEntryPlugin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AASlC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAgHnC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAC1C,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,GAAG,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAA;IACpC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAA;IAChB,SAAS,CAAC,EAAE,GAAG,CAAC,aAAa,CAAC,WAAW,CAAC,CAAA;IAC1C,UAAU,EAAE,UAAU,CAAA;CACvB,GAAG,MAAM,CAwNT"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type PluginOption } from 'vite';
|
|
2
|
+
import type { RouteIndex } from '../../utils/routeIndex';
|
|
3
|
+
import type { One } from '../types';
|
|
4
|
+
import { shouldEnableWorkerdDev } from '../cloudflareWranglerConfig';
|
|
5
|
+
export { shouldEnableWorkerdDev };
|
|
6
|
+
export declare const workerdDevEntryId = "virtual:one-workerd-dev-entry";
|
|
7
|
+
export declare function generateWorkerdDevEntryModule(args: {
|
|
8
|
+
root: string;
|
|
9
|
+
options: One.PluginOptions;
|
|
10
|
+
routerRoot: string;
|
|
11
|
+
routePaths: string[];
|
|
12
|
+
preloads: string[];
|
|
13
|
+
}): string;
|
|
14
|
+
export declare function createWorkerdDevPlugins(options: One.PluginOptions, root: string, routeIndex: RouteIndex): PluginOption[];
|
|
15
|
+
//# sourceMappingURL=workerdDevPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workerdDevPlugin.d.ts","sourceRoot":"","sources":["../../../src/vite/plugins/workerdDevPlugin.ts"],"names":[],"mappings":"AAOA,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,MAAM,CAAA;AAKrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,KAAK,EAAE,GAAG,EAAa,MAAM,UAAU,CAAA;AAC9C,OAAO,EAIL,sBAAsB,EACvB,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EAAE,sBAAsB,EAAE,CAAA;AAEjC,eAAO,MAAM,iBAAiB,kCAAkC,CAAA;AAoEhE,wBAAgB,6BAA6B,CAAC,IAAI,EAAE;IAClD,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,GAAG,CAAC,aAAa,CAAA;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,QAAQ,EAAE,MAAM,EAAE,CAAA;CACnB,GAAG,MAAM,CAsKT;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,GAAG,CAAC,aAAa,EAC1B,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,UAAU,GACrB,YAAY,EAAE,CA0IhB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workerdDevPlugin.test.d.ts","sourceRoot":"","sources":["../../../src/vite/plugins/workerdDevPlugin.test.ts"],"names":[],"mappings":""}
|