houdini-react 1.3.13 → 2.0.0-go.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/build/houdini-react/package.json +92 -0
- package/build/houdini-react/postInstall.js +117 -0
- package/build/houdini-react/runtime/client.ts +5 -0
- package/build/houdini-react/runtime/clientPlugin.ts +17 -0
- package/build/houdini-react/runtime/componentFields.ts +79 -0
- package/build/houdini-react/runtime/hooks/index.ts +9 -0
- package/build/houdini-react/runtime/hooks/useDeepCompareEffect.ts +89 -0
- package/build/houdini-react/runtime/hooks/useDocumentHandle.ts +224 -0
- package/build/houdini-react/runtime/hooks/useDocumentStore.ts +76 -0
- package/build/houdini-react/runtime/hooks/useDocumentSubscription.ts +62 -0
- package/build/houdini-react/runtime/hooks/useFragment.ts +102 -0
- package/build/houdini-react/runtime/hooks/useFragmentHandle.ts +47 -0
- package/build/houdini-react/runtime/hooks/useIsMounted.ts +14 -0
- package/build/houdini-react/runtime/hooks/useMutation.ts +54 -0
- package/build/houdini-react/runtime/hooks/useQuery.ts +17 -0
- package/build/houdini-react/runtime/hooks/useQueryHandle.ts +184 -0
- package/build/houdini-react/runtime/hooks/useSubscription.ts +12 -0
- package/build/houdini-react/runtime/hooks/useSubscriptionHandle.ts +33 -0
- package/build/houdini-react/runtime/index.tsx +49 -0
- package/build/houdini-react/runtime/manifest.ts +6 -0
- package/build/houdini-react/runtime/routing/Router.tsx +887 -0
- package/build/houdini-react/runtime/routing/cache.ts +52 -0
- package/build/houdini-react/runtime/routing/index.ts +2 -0
- package/build/houdini-react/shim.cjs +64 -0
- package/build/houdini-react/vite/index.d.ts +3 -0
- package/build/houdini-react/vite/index.js +11 -0
- package/build/houdini-react-darwin-arm64/bin/houdini-react +0 -0
- package/build/houdini-react-darwin-arm64/package.json +11 -0
- package/build/houdini-react-darwin-x64/bin/houdini-react +0 -0
- package/build/houdini-react-darwin-x64/package.json +11 -0
- package/build/houdini-react-linux-arm64/bin/houdini-react +0 -0
- package/build/houdini-react-linux-arm64/package.json +11 -0
- package/build/houdini-react-linux-x64/bin/houdini-react +0 -0
- package/build/houdini-react-linux-x64/package.json +11 -0
- package/build/houdini-react-windows-arm64/bin/houdini-react.exe +0 -0
- package/build/houdini-react-windows-arm64/package.json +11 -0
- package/build/houdini-react-windows-x64/bin/houdini-react.exe +0 -0
- package/build/houdini-react-windows-x64/package.json +11 -0
- package/build/package.json +91 -0
- package/package.json +6 -6
- package/build/plugin/codegen/entries/documentWrappers.d.ts +0 -6
- package/build/plugin/codegen/entries/fallbacks.d.ts +0 -5
- package/build/plugin/codegen/entries/index.d.ts +0 -16
- package/build/plugin/codegen/entries/pages.d.ts +0 -2
- package/build/plugin/codegen/index.d.ts +0 -17
- package/build/plugin/codegen/manifest.d.ts +0 -5
- package/build/plugin/codegen/render.d.ts +0 -7
- package/build/plugin/codegen/router.d.ts +0 -7
- package/build/plugin/codegen/typeRoot.d.ts +0 -5
- package/build/plugin/config.d.ts +0 -4
- package/build/plugin/dedent.d.ts +0 -1
- package/build/plugin/extract.d.ts +0 -6
- package/build/plugin/index.d.ts +0 -5
- package/build/plugin/state.d.ts +0 -3
- package/build/plugin/transform.d.ts +0 -6
- package/build/plugin/vite.d.ts +0 -70
- package/build/plugin-cjs/index.js +0 -84192
- package/build/plugin-cjs/package.json +0 -1
- package/build/plugin-esm/index.js +0 -84184
- package/build/runtime/client.d.ts +0 -3
- package/build/runtime/clientPlugin.d.ts +0 -3
- package/build/runtime/componentFields.d.ts +0 -9
- package/build/runtime/hooks/index.d.ts +0 -8
- package/build/runtime/hooks/useDeepCompareEffect.d.ts +0 -35
- package/build/runtime/hooks/useDocumentHandle.d.ts +0 -36
- package/build/runtime/hooks/useDocumentStore.d.ts +0 -11
- package/build/runtime/hooks/useDocumentSubscription.d.ts +0 -11
- package/build/runtime/hooks/useFragment.d.ts +0 -16
- package/build/runtime/hooks/useFragmentHandle.d.ts +0 -8
- package/build/runtime/hooks/useIsMounted.d.ts +0 -3
- package/build/runtime/hooks/useMutation.d.ts +0 -11
- package/build/runtime/hooks/useQuery.d.ts +0 -5
- package/build/runtime/hooks/useQueryHandle.d.ts +0 -10
- package/build/runtime/hooks/useSubscription.d.ts +0 -4
- package/build/runtime/hooks/useSubscriptionHandle.d.ts +0 -25
- package/build/runtime/index.d.ts +0 -14
- package/build/runtime/manifest.d.ts +0 -3
- package/build/runtime/routing/Router.d.ts +0 -62
- package/build/runtime/routing/cache.d.ts +0 -7
- package/build/runtime/routing/hooks.d.ts +0 -40
- package/build/runtime/routing/index.d.ts +0 -3
- package/build/runtime-cjs/client.d.ts +0 -3
- package/build/runtime-cjs/client.js +0 -27
- package/build/runtime-cjs/clientPlugin.d.ts +0 -3
- package/build/runtime-cjs/clientPlugin.js +0 -39
- package/build/runtime-cjs/componentFields.d.ts +0 -9
- package/build/runtime-cjs/componentFields.js +0 -83
- package/build/runtime-cjs/hooks/index.d.ts +0 -8
- package/build/runtime-cjs/hooks/index.js +0 -45
- package/build/runtime-cjs/hooks/useDeepCompareEffect.d.ts +0 -35
- package/build/runtime-cjs/hooks/useDeepCompareEffect.js +0 -72
- package/build/runtime-cjs/hooks/useDocumentHandle.d.ts +0 -36
- package/build/runtime-cjs/hooks/useDocumentHandle.js +0 -173
- package/build/runtime-cjs/hooks/useDocumentStore.d.ts +0 -11
- package/build/runtime-cjs/hooks/useDocumentStore.js +0 -72
- package/build/runtime-cjs/hooks/useDocumentSubscription.d.ts +0 -11
- package/build/runtime-cjs/hooks/useDocumentSubscription.js +0 -71
- package/build/runtime-cjs/hooks/useFragment.d.ts +0 -16
- package/build/runtime-cjs/hooks/useFragment.js +0 -97
- package/build/runtime-cjs/hooks/useFragmentHandle.d.ts +0 -8
- package/build/runtime-cjs/hooks/useFragmentHandle.js +0 -47
- package/build/runtime-cjs/hooks/useIsMounted.d.ts +0 -3
- package/build/runtime-cjs/hooks/useIsMounted.js +0 -38
- package/build/runtime-cjs/hooks/useMutation.d.ts +0 -11
- package/build/runtime-cjs/hooks/useMutation.js +0 -52
- package/build/runtime-cjs/hooks/useQuery.d.ts +0 -5
- package/build/runtime-cjs/hooks/useQuery.js +0 -32
- package/build/runtime-cjs/hooks/useQueryHandle.d.ts +0 -10
- package/build/runtime-cjs/hooks/useQueryHandle.js +0 -125
- package/build/runtime-cjs/hooks/useSubscription.d.ts +0 -4
- package/build/runtime-cjs/hooks/useSubscription.js +0 -32
- package/build/runtime-cjs/hooks/useSubscriptionHandle.d.ts +0 -25
- package/build/runtime-cjs/hooks/useSubscriptionHandle.js +0 -42
- package/build/runtime-cjs/index.d.ts +0 -14
- package/build/runtime-cjs/index.js +0 -83
- package/build/runtime-cjs/manifest.d.ts +0 -3
- package/build/runtime-cjs/manifest.js +0 -27
- package/build/runtime-cjs/package.json +0 -1
- package/build/runtime-cjs/routing/Router.d.ts +0 -62
- package/build/runtime-cjs/routing/Router.js +0 -532
- package/build/runtime-cjs/routing/cache.d.ts +0 -7
- package/build/runtime-cjs/routing/cache.js +0 -58
- package/build/runtime-cjs/routing/hooks.d.ts +0 -40
- package/build/runtime-cjs/routing/hooks.js +0 -89
- package/build/runtime-cjs/routing/index.d.ts +0 -3
- package/build/runtime-cjs/routing/index.js +0 -31
- package/build/runtime-esm/client.d.ts +0 -3
- package/build/runtime-esm/client.js +0 -5
- package/build/runtime-esm/clientPlugin.d.ts +0 -3
- package/build/runtime-esm/clientPlugin.js +0 -17
- package/build/runtime-esm/componentFields.d.ts +0 -9
- package/build/runtime-esm/componentFields.js +0 -59
- package/build/runtime-esm/hooks/index.d.ts +0 -8
- package/build/runtime-esm/hooks/index.js +0 -16
- package/build/runtime-esm/hooks/useDeepCompareEffect.d.ts +0 -35
- package/build/runtime-esm/hooks/useDeepCompareEffect.js +0 -41
- package/build/runtime-esm/hooks/useDocumentHandle.d.ts +0 -36
- package/build/runtime-esm/hooks/useDocumentHandle.js +0 -143
- package/build/runtime-esm/hooks/useDocumentStore.d.ts +0 -11
- package/build/runtime-esm/hooks/useDocumentStore.js +0 -42
- package/build/runtime-esm/hooks/useDocumentSubscription.d.ts +0 -11
- package/build/runtime-esm/hooks/useDocumentSubscription.js +0 -41
- package/build/runtime-esm/hooks/useFragment.d.ts +0 -16
- package/build/runtime-esm/hooks/useFragment.js +0 -66
- package/build/runtime-esm/hooks/useFragmentHandle.d.ts +0 -8
- package/build/runtime-esm/hooks/useFragmentHandle.js +0 -23
- package/build/runtime-esm/hooks/useIsMounted.d.ts +0 -3
- package/build/runtime-esm/hooks/useIsMounted.js +0 -14
- package/build/runtime-esm/hooks/useMutation.d.ts +0 -11
- package/build/runtime-esm/hooks/useMutation.js +0 -28
- package/build/runtime-esm/hooks/useQuery.d.ts +0 -5
- package/build/runtime-esm/hooks/useQuery.js +0 -8
- package/build/runtime-esm/hooks/useQueryHandle.d.ts +0 -10
- package/build/runtime-esm/hooks/useQueryHandle.js +0 -95
- package/build/runtime-esm/hooks/useSubscription.d.ts +0 -4
- package/build/runtime-esm/hooks/useSubscription.js +0 -8
- package/build/runtime-esm/hooks/useSubscriptionHandle.d.ts +0 -25
- package/build/runtime-esm/hooks/useSubscriptionHandle.js +0 -18
- package/build/runtime-esm/index.d.ts +0 -14
- package/build/runtime-esm/index.js +0 -48
- package/build/runtime-esm/manifest.d.ts +0 -3
- package/build/runtime-esm/manifest.js +0 -5
- package/build/runtime-esm/routing/Router.d.ts +0 -62
- package/build/runtime-esm/routing/Router.js +0 -495
- package/build/runtime-esm/routing/cache.d.ts +0 -7
- package/build/runtime-esm/routing/cache.js +0 -33
- package/build/runtime-esm/routing/hooks.d.ts +0 -40
- package/build/runtime-esm/routing/hooks.js +0 -53
- package/build/runtime-esm/routing/index.d.ts +0 -3
- package/build/runtime-esm/routing/index.js +0 -6
- package/build/server-cjs/index.js +0 -28
- package/build/server-cjs/package.json +0 -1
- /package/build/{plugin-esm → houdini-react/runtime}/package.json +0 -0
- /package/build/{server → houdini-react/server}/index.d.ts +0 -0
- /package/build/{server-esm → houdini-react/server}/index.js +0 -0
- /package/build/{runtime-esm → houdini-react/server}/package.json +0 -0
- /package/build/{server-esm → houdini-react/vite}/package.json +0 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// a suspense cache is an object that maintains a key-value store of
|
|
2
|
+
// objects. If a value is missing when get() is called, a promise
|
|
3
|
+
// is thrown that resolves when a value is passed to set()
|
|
4
|
+
import { LRUCache } from 'houdini/runtime'
|
|
5
|
+
|
|
6
|
+
export function suspense_cache<T>(initialData?: Record<string, T>): SuspenseCache<T> {
|
|
7
|
+
const cache = new SuspenseCache<T>()
|
|
8
|
+
|
|
9
|
+
for (const [key, value] of Object.entries(initialData ?? {})) {
|
|
10
|
+
cache.set(key, value)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
return cache
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export class SuspenseCache<_Data> extends LRUCache<_Data> {
|
|
17
|
+
// if get is called before set, we need to invoke a callback.
|
|
18
|
+
// that means we need a place to put our callbacks
|
|
19
|
+
#callbacks: Map<string, { resolve: () => void; reject: () => void }[]> = new Map()
|
|
20
|
+
|
|
21
|
+
get(key: string): _Data {
|
|
22
|
+
// if there is a value, use that
|
|
23
|
+
if (super.has(key)) {
|
|
24
|
+
return super.get(key)!
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// we don't have a value, so we need to throw a promise
|
|
28
|
+
// that resolves when a value is passed to set()
|
|
29
|
+
throw new Promise<void>((resolve, reject) => {
|
|
30
|
+
this.#subscribe(key, resolve, reject)
|
|
31
|
+
})
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// TODO: reject?
|
|
35
|
+
|
|
36
|
+
set(key: string, value: _Data) {
|
|
37
|
+
// perform the set like normal
|
|
38
|
+
super.set(key, value)
|
|
39
|
+
|
|
40
|
+
// if there are subscribers, resolve them
|
|
41
|
+
if (this.#callbacks.has(key)) {
|
|
42
|
+
// resolve all of the callbacks
|
|
43
|
+
this.#callbacks.get(key)?.forEach(({ resolve }) => resolve())
|
|
44
|
+
// delete the key
|
|
45
|
+
this.#callbacks.delete(key)
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
#subscribe(key: string, resolve: () => void, reject: () => void) {
|
|
50
|
+
this.#callbacks.set(key, [...(this.#callbacks.get(key) || []), { resolve, reject }])
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
function getBinaryPath() {
|
|
4
|
+
// lookup table for all platforms and binary distribution packages
|
|
5
|
+
const BINARY_DISTRIBUTION_PACKAGES = {
|
|
6
|
+
'linux-x64': 'houdini-react-linux-x64',
|
|
7
|
+
'linux-arm64': 'houdini-react-linux-arm64',
|
|
8
|
+
'win32-x64': 'houdini-react-windows-x64',
|
|
9
|
+
'win32-arm64': 'houdini-react-windows-arm64',
|
|
10
|
+
'darwin-x64': 'houdini-react-darwin-x64',
|
|
11
|
+
'darwin-arm64': 'houdini-react-darwin-arm64',
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// windows binaries end with .exe so we need to special case them
|
|
15
|
+
const binaryName = process.platform === 'win32' ? 'houdini-react.exe' : 'houdini-react'
|
|
16
|
+
|
|
17
|
+
// determine package name for this platform
|
|
18
|
+
const platformSpecificPackageName =
|
|
19
|
+
BINARY_DISTRIBUTION_PACKAGES[`${process.platform}-${process.arch}`]
|
|
20
|
+
|
|
21
|
+
try {
|
|
22
|
+
// resolving will fail if the optionalDependency was not installed
|
|
23
|
+
return require.resolve(`../${platformSpecificPackageName}/bin/${binaryName}`)
|
|
24
|
+
} catch (e) {
|
|
25
|
+
return require('path').join(__dirname, binaryName)
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
// instead of execFileSync, use spawn to handle the process more gracefully
|
|
29
|
+
const childProcess = require('child_process').spawn(getBinaryPath(), process.argv.slice(2), {
|
|
30
|
+
stdio: 'inherit',
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
// array of signals we want to handle
|
|
34
|
+
const signals = ['SIGTERM', 'SIGINT', 'SIGQUIT', 'SIGHUP']
|
|
35
|
+
|
|
36
|
+
// handle each signal
|
|
37
|
+
signals.forEach((signal) => {
|
|
38
|
+
process.on(signal, () => {
|
|
39
|
+
if (childProcess) {
|
|
40
|
+
// on windows, we need to use taskkill for proper tree killing
|
|
41
|
+
if (process.platform === 'win32') {
|
|
42
|
+
require('child_process').spawn('taskkill', ['/pid', childProcess.pid, '/f', '/t'])
|
|
43
|
+
} else {
|
|
44
|
+
try {
|
|
45
|
+
childProcess.kill(signal)
|
|
46
|
+
} catch (err) {
|
|
47
|
+
// if the process is already gone, that's fine
|
|
48
|
+
if (err.code !== 'ESRCH') throw err
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
process.exit(0)
|
|
53
|
+
})
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
// handle child process exit
|
|
57
|
+
childProcess.on('exit', (code, signal) => {
|
|
58
|
+
// if the child was terminated due to a signal, exit with the same signal
|
|
59
|
+
if (signal) {
|
|
60
|
+
process.exit(0)
|
|
61
|
+
} else {
|
|
62
|
+
process.exit(code)
|
|
63
|
+
}
|
|
64
|
+
})
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "houdini-react",
|
|
3
|
+
"version": "2.0.0-go.0",
|
|
4
|
+
"description": "The React plugin for houdini",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"typescript",
|
|
7
|
+
"react",
|
|
8
|
+
"graphql",
|
|
9
|
+
"graphql-client"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://github.com/HoudiniGraphql/houdini",
|
|
12
|
+
"funding": "https://github.com/sponsors/HoudiniGraphql",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/HoudiniGraphql/houdini.git"
|
|
16
|
+
},
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"scripts": {
|
|
19
|
+
"compile": "scripts build-go",
|
|
20
|
+
"typedefs": "scripts typedefs --plugin --go-package",
|
|
21
|
+
"postinstall": "node postInstall.js"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/cookie-parser": "^1.4.3",
|
|
25
|
+
"@types/cookie-session": "^2.0.44",
|
|
26
|
+
"@types/cookies": "^0.7.7",
|
|
27
|
+
"@types/estraverse": "^5.1.2",
|
|
28
|
+
"@types/express": "^4.17.17",
|
|
29
|
+
"@types/react": "^19.0.7",
|
|
30
|
+
"@types/react-dom": "^19.0.3"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@babel/parser": "^7.24.6",
|
|
34
|
+
"@babel/types": "^7.24.6",
|
|
35
|
+
"@whatwg-node/server": "^0.9.14",
|
|
36
|
+
"cookie-parser": "^1.4.6",
|
|
37
|
+
"cookie-session": "^2.0.0",
|
|
38
|
+
"cookies": "^0.8.0",
|
|
39
|
+
"estraverse": "^5.3.0",
|
|
40
|
+
"express": "^4.18.2",
|
|
41
|
+
"graphql": "^15.8.0",
|
|
42
|
+
"graphql-yoga": "^4.0.4",
|
|
43
|
+
"houdini": "workspace:^",
|
|
44
|
+
"react": "^19.0.0",
|
|
45
|
+
"react-dom": "^19.0.0",
|
|
46
|
+
"react-streaming-compat": "^0.3.18",
|
|
47
|
+
"recast": "^0.23.1",
|
|
48
|
+
"rollup": "^4.28.1",
|
|
49
|
+
"use-deep-compare-effect": "^1.8.1"
|
|
50
|
+
},
|
|
51
|
+
"files": [
|
|
52
|
+
"build"
|
|
53
|
+
],
|
|
54
|
+
"exports": {
|
|
55
|
+
"./package.json": "./package.json",
|
|
56
|
+
"./server": {
|
|
57
|
+
"types": "./build/server/index.d.ts",
|
|
58
|
+
"import": "./build/server/index.js"
|
|
59
|
+
},
|
|
60
|
+
"./server/*": {
|
|
61
|
+
"types": "./build/server/*",
|
|
62
|
+
"import": "./build/server/*"
|
|
63
|
+
},
|
|
64
|
+
"./vite": {
|
|
65
|
+
"types": "./build/vite/index.d.ts",
|
|
66
|
+
"import": "./build/vite/index.js"
|
|
67
|
+
},
|
|
68
|
+
"./vite/*": {
|
|
69
|
+
"types": "./build/vite/*",
|
|
70
|
+
"import": "./build/vite/*"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"typesVersions": {
|
|
74
|
+
"*": {
|
|
75
|
+
"server": [
|
|
76
|
+
"./build/server/index.d.ts"
|
|
77
|
+
],
|
|
78
|
+
"vite": [
|
|
79
|
+
"./build/vite/index.d.ts"
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"optionalDependencies": {
|
|
84
|
+
"houdini-react-darwin-amd64": "2.0.0-go.0",
|
|
85
|
+
"houdini-react-darwin-arm64": "2.0.0-go.0",
|
|
86
|
+
"houdini-react-linux-amd64": "2.0.0-go.0",
|
|
87
|
+
"houdini-react-linux-arm64": "2.0.0-go.0",
|
|
88
|
+
"houdini-react-windows-amd64": "2.0.0-go.0",
|
|
89
|
+
"houdini-react-windows-arm64": "2.0.0-go.0"
|
|
90
|
+
}
|
|
91
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "houdini-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-go.0",
|
|
4
4
|
"description": "The React plugin for houdini",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@types/express": "^4.17.17",
|
|
24
24
|
"@types/react": "^19.0.7",
|
|
25
25
|
"@types/react-dom": "^19.0.3",
|
|
26
|
-
"scripts": "^
|
|
26
|
+
"scripts": "^2.0.0-go.0"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@babel/parser": "^7.24.6",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"recast": "^0.23.1",
|
|
43
43
|
"rollup": "^4.28.1",
|
|
44
44
|
"use-deep-compare-effect": "^1.8.1",
|
|
45
|
-
"houdini": "^
|
|
45
|
+
"houdini": "^2.0.0-go.0"
|
|
46
46
|
},
|
|
47
47
|
"files": [
|
|
48
48
|
"build"
|
|
@@ -63,14 +63,14 @@
|
|
|
63
63
|
"typesVersions": {
|
|
64
64
|
"*": {
|
|
65
65
|
"server": [
|
|
66
|
-
"build/server/index.d.ts"
|
|
66
|
+
"./build/server/index.d.ts"
|
|
67
67
|
]
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
"main": "./build/plugin-cjs/index.js",
|
|
71
71
|
"types": "./build/plugin/index.d.ts",
|
|
72
72
|
"scripts": {
|
|
73
|
-
"compile": "scripts build
|
|
74
|
-
"typedefs": "scripts typedefs --plugin"
|
|
73
|
+
"compile": "scripts build-go",
|
|
74
|
+
"typedefs": "scripts typedefs --plugin --go-package"
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type Config, type ProjectManifest, type Document } from 'houdini';
|
|
2
|
-
export declare function generate_routing_document_wrappers({ manifest, config, documents, }: {
|
|
3
|
-
manifest: ProjectManifest;
|
|
4
|
-
config: Config;
|
|
5
|
-
documents: Record<string, Document>;
|
|
6
|
-
}): Promise<void[]>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Config, ProjectManifest, PageManifest, Document } from 'houdini';
|
|
2
|
-
import type { ComponentFieldData } from '..';
|
|
3
|
-
export declare function generate_entries({ config, manifest, documents, componentFields, }: {
|
|
4
|
-
config: Config;
|
|
5
|
-
manifest: ProjectManifest;
|
|
6
|
-
documents: Document[];
|
|
7
|
-
componentFields: ComponentFieldData[];
|
|
8
|
-
}): Promise<void>;
|
|
9
|
-
export type PageBundleInput = {
|
|
10
|
-
id: string;
|
|
11
|
-
page: PageManifest;
|
|
12
|
-
project: ProjectManifest;
|
|
13
|
-
config: Config;
|
|
14
|
-
documents: Record<string, Document>;
|
|
15
|
-
componentFields: ComponentFieldData[];
|
|
16
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { Config, GenerateHookInput, ProjectManifest } from 'houdini';
|
|
2
|
-
import { processComponentFieldDirective } from 'houdini';
|
|
3
|
-
/**
|
|
4
|
-
* The router is fundamentally a component that knows how to render
|
|
5
|
-
* a particular component tree for a given url. This is driven by something
|
|
6
|
-
* we call the applications "manifest".
|
|
7
|
-
*
|
|
8
|
-
* In react, the tree of route directories maps to a component hierarchy
|
|
9
|
-
* with suspense boundaries sprinkled when there is a loading directive
|
|
10
|
-
* present on a query.
|
|
11
|
-
*/
|
|
12
|
-
export default function routerCodegen({ config, manifest, documents, }: GenerateHookInput & {
|
|
13
|
-
manifest: ProjectManifest;
|
|
14
|
-
}): Promise<void>;
|
|
15
|
-
export type ComponentFieldData = ReturnType<typeof processComponentFieldDirective> & Config['componentFields'][string][string] & {
|
|
16
|
-
type: string;
|
|
17
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type Config, type ProjectManifest } from 'houdini';
|
|
2
|
-
import type { ComponentFieldData } from '.';
|
|
3
|
-
export declare function generate_renders({ componentFields, config, manifest, }: {
|
|
4
|
-
componentFields: ComponentFieldData[];
|
|
5
|
-
config: Config;
|
|
6
|
-
manifest: ProjectManifest;
|
|
7
|
-
}): Promise<void>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type Config, type ProjectManifest } from 'houdini';
|
|
2
|
-
export declare function format_router_manifest({ config, manifest, exportDefaultStatement, }: {
|
|
3
|
-
config: Config;
|
|
4
|
-
manifest: ProjectManifest;
|
|
5
|
-
exportDefaultStatement: (name: string) => string;
|
|
6
|
-
importStatement: (from: string, as: string) => string;
|
|
7
|
-
}): string;
|
package/build/plugin/config.d.ts
DELETED
package/build/plugin/dedent.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function dedent(indentString: string, input?: string): string;
|
package/build/plugin/index.d.ts
DELETED
package/build/plugin/state.d.ts
DELETED
package/build/plugin/vite.d.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { ConfigEnv } from 'vite';
|
|
2
|
-
declare const _default: {
|
|
3
|
-
config?: ((config: import("houdini").Config, env: ConfigEnv) => import("vite").UserConfig | Promise<import("vite").UserConfig>) | undefined;
|
|
4
|
-
buildStart?: ((this: import("rollup").PluginContext, options: import("rollup").NormalizedInputOptions & {
|
|
5
|
-
houdiniConfig: import("houdini").Config;
|
|
6
|
-
}) => void | Promise<void>) | undefined;
|
|
7
|
-
buildEnd?: ((this: import("rollup").PluginContext, error?: Error | undefined, houdiniConfig?: import("houdini").Config | undefined) => void | Promise<void>) | undefined;
|
|
8
|
-
closeBundle?: ((this: import("rollup").PluginContext, config: import("houdini").Config) => void | Promise<void>) | undefined;
|
|
9
|
-
configResolved?: import("rollup").ObjectHook<(this: void, config: Readonly<Omit<import("vite").UserConfig, "plugins" | "build" | "dev" | "optimizeDeps" | "css" | "json" | "assetsInclude" | "worker" | "environments" | "server" | "preview"> & {
|
|
10
|
-
configFile: string | undefined;
|
|
11
|
-
configFileDependencies: string[];
|
|
12
|
-
inlineConfig: import("vite").InlineConfig;
|
|
13
|
-
root: string;
|
|
14
|
-
base: string;
|
|
15
|
-
publicDir: string;
|
|
16
|
-
cacheDir: string;
|
|
17
|
-
command: "build" | "serve";
|
|
18
|
-
mode: string;
|
|
19
|
-
isWorker: boolean;
|
|
20
|
-
isProduction: boolean;
|
|
21
|
-
envDir: string;
|
|
22
|
-
env: Record<string, any>;
|
|
23
|
-
resolve: Required<import("vite").ResolveOptions> & {
|
|
24
|
-
alias: import("vite").Alias[];
|
|
25
|
-
};
|
|
26
|
-
plugins: readonly import("vite").Plugin<any>[];
|
|
27
|
-
css: import("vite").ResolvedCSSOptions;
|
|
28
|
-
json: Required<import("vite").JsonOptions>;
|
|
29
|
-
esbuild: false | import("vite").ESBuildOptions;
|
|
30
|
-
server: import("vite").ResolvedServerOptions;
|
|
31
|
-
dev: import("vite").ResolvedDevEnvironmentOptions;
|
|
32
|
-
builder: Required<import("vite").BuilderOptions> | undefined;
|
|
33
|
-
build: import("vite").ResolvedBuildOptions;
|
|
34
|
-
preview: import("vite").ResolvedPreviewOptions;
|
|
35
|
-
ssr: import("vite").ResolvedSSROptions;
|
|
36
|
-
assetsInclude: (file: string) => boolean;
|
|
37
|
-
logger: import("vite").Logger;
|
|
38
|
-
createResolver: (options?: Partial<import("vite").InternalResolveOptions> | undefined) => import("vite").ResolveFn;
|
|
39
|
-
optimizeDeps: import("vite").DepOptimizationOptions;
|
|
40
|
-
worker: import("vite").ResolvedWorkerOptions;
|
|
41
|
-
appType: import("vite").AppType;
|
|
42
|
-
experimental: import("vite").ExperimentalOptions;
|
|
43
|
-
environments: Record<string, {
|
|
44
|
-
define?: Record<string, any> | undefined;
|
|
45
|
-
resolve: Required<import("vite").ResolveOptions>;
|
|
46
|
-
consumer: "client" | "server";
|
|
47
|
-
keepProcessEnv?: boolean | undefined;
|
|
48
|
-
optimizeDeps: import("vite").DepOptimizationOptions;
|
|
49
|
-
dev: import("vite").ResolvedDevEnvironmentOptions;
|
|
50
|
-
build: import("vite").ResolvedBuildEnvironmentOptions;
|
|
51
|
-
}>;
|
|
52
|
-
} & import("vite").PluginHookUtils>) => void | Promise<void>, {}> | undefined;
|
|
53
|
-
options?: ((this: import("rollup").MinimalPluginContext, options: import("rollup").InputOptions & {
|
|
54
|
-
houdiniConfig: import("houdini").Config;
|
|
55
|
-
}) => import("rollup").InputOptions | import("rollup").NullValue) | undefined;
|
|
56
|
-
resolveId?: import("rollup").ObjectHook<(this: import("rollup").PluginContext, source: string, importer: string | undefined, options: {
|
|
57
|
-
config: import("houdini").Config;
|
|
58
|
-
custom?: import("rollup").CustomPluginOptions | undefined;
|
|
59
|
-
ssr?: boolean | undefined;
|
|
60
|
-
isEntry: boolean;
|
|
61
|
-
}) => import("rollup").ResolveIdResult | Promise<import("rollup").ResolveIdResult>, {}> | undefined;
|
|
62
|
-
load?: import("rollup").ObjectHook<(this: import("rollup").PluginContext, id: string, options: {
|
|
63
|
-
config: import("houdini").Config;
|
|
64
|
-
ssr?: boolean | undefined;
|
|
65
|
-
}) => import("rollup").LoadResult | Promise<import("rollup").LoadResult>, {}> | undefined;
|
|
66
|
-
configureServer?: import("rollup").ObjectHook<(this: void, server: import("vite").ViteDevServer & {
|
|
67
|
-
houdiniConfig: import("houdini").Config;
|
|
68
|
-
}) => void | (() => void) | Promise<void | (() => void)>, {}> | undefined;
|
|
69
|
-
} | undefined;
|
|
70
|
-
export default _default;
|