houdini-adapter-cloudflare 1.2.13 → 1.2.14
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/index.cjs +1 -18
- package/build/index.js +1 -18
- package/build/worker.cjs +1 -9
- package/build/worker.js +1 -9
- package/package.json +3 -3
package/build/index.cjs
CHANGED
|
@@ -1,18 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
const graphqlEndpoint = ${JSON.stringify((0,t.localApiEndpoint)(o.configFile))}
|
|
3
|
-
const schema = null
|
|
4
|
-
const yoga = null
|
|
5
|
-
`;s.local_yoga?c=`
|
|
6
|
-
import schema from '../src/api/+schema'
|
|
7
|
-
import yoga from '../src/api/+yoga'
|
|
8
|
-
|
|
9
|
-
const graphqlEndpoint = ${JSON.stringify((0,t.localApiEndpoint)(o.configFile))}
|
|
10
|
-
`:s.local_schema&&(c=`
|
|
11
|
-
import createYoga from '../$houdini/plugins/houdini-react/units/render/yoga'
|
|
12
|
-
import schema from '../src/api/+schema'
|
|
13
|
-
|
|
14
|
-
const graphqlEndpoint = ${JSON.stringify((0,t.localApiEndpoint)(o.configFile))}
|
|
15
|
-
const yoga = createYoga({
|
|
16
|
-
graphqlEndpoint
|
|
17
|
-
})
|
|
18
|
-
`),n=n.replaceAll('console.log("DYNAMIC_CONTENT")',c),await t.fs.writeFile(t.path.join(i,"_worker.js"),n)},w=u;function E(o){return(0,p.fileURLToPath)(new URL(o,A.url).href)}
|
|
1
|
+
"use strict";var p=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var w=Object.prototype.hasOwnProperty;var d=(r,e)=>{for(var t in e)p(r,t,{get:e[t],enumerable:!0})},f=(r,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of s(e))!w.call(r,i)&&i!==t&&p(r,i,{get:()=>e[i],enumerable:!(a=l(e,i))||a.enumerable});return r};var c=r=>f(p({},"__esModule",{value:!0}),r);var j={};d(j,{default:()=>u});module.exports=c(j);var o=require("houdini"),n=require("url"),k={},m=async({adapterPath:r,outDir:e,sourceDir:t})=>{await o.fs.recursiveCopy(t,e);let a=await o.fs.readFile(h("./worker.js"));a=a.replaceAll("houdini/adapter",r),await o.fs.writeFile(o.path.join(e,"_worker.js"),a)},u=m;function h(r){return(0,n.fileURLToPath)(new URL(r,k.url).href)}
|
package/build/index.js
CHANGED
|
@@ -1,18 +1 @@
|
|
|
1
|
-
import{fs as
|
|
2
|
-
const graphqlEndpoint = ${JSON.stringify(a(o.configFile))}
|
|
3
|
-
const schema = null
|
|
4
|
-
const yoga = null
|
|
5
|
-
`;n.local_yoga?t=`
|
|
6
|
-
import schema from '../src/api/+schema'
|
|
7
|
-
import yoga from '../src/api/+yoga'
|
|
8
|
-
|
|
9
|
-
const graphqlEndpoint = ${JSON.stringify(a(o.configFile))}
|
|
10
|
-
`:n.local_schema&&(t=`
|
|
11
|
-
import createYoga from '../$houdini/plugins/houdini-react/units/render/yoga'
|
|
12
|
-
import schema from '../src/api/+schema'
|
|
13
|
-
|
|
14
|
-
const graphqlEndpoint = ${JSON.stringify(a(o.configFile))}
|
|
15
|
-
const yoga = createYoga({
|
|
16
|
-
graphqlEndpoint
|
|
17
|
-
})
|
|
18
|
-
`),r=r.replaceAll('console.log("DYNAMIC_CONTENT")',t),await e.writeFile(l.join(i,"_worker.js"),r)},y=p;function m(o){return s(new URL(o,import.meta.url).href)}export{y as default};
|
|
1
|
+
import{fs as t,path as i}from"houdini";import{fileURLToPath as p}from"node:url";var n=async({adapterPath:e,outDir:a,sourceDir:o})=>{await t.recursiveCopy(o,a);let r=await t.readFile(l("./worker.js"));r=r.replaceAll("houdini/adapter",e),await t.writeFile(i.join(a,"_worker.js"),r)},d=n;function l(e){return p(new URL(e,import.meta.url).href)}export{d as default};
|
package/build/worker.cjs
CHANGED
|
@@ -1,9 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
<script>
|
|
3
|
-
window.__houdini__initial__cache__ = ${n.serialize()};
|
|
4
|
-
window.__houdini__initial__session__ = ${JSON.stringify(r)};
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<!-- add a virtual module that hydrates the client and sets up the initial pending cache -->
|
|
8
|
-
<script type="module" src="/assets/pages/${s.id}.js" async=""></script>
|
|
9
|
-
`),new Response(d)}var O=U;
|
|
1
|
+
"use strict";var o=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var i=(r,t)=>{for(var e in t)o(r,e,{get:t[e],enumerable:!0})},f=(r,t,e,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of p(t))!d.call(r,s)&&s!==e&&o(r,s,{get:()=>t[s],enumerable:!(a=c(t,s))||a.enumerable});return r};var l=r=>f(o({},"__esModule",{value:!0}),r);var w={};i(w,{default:()=>m});module.exports=l(w);var n=require("houdini/adapter"),u=(0,n.createServerAdapter)({production:!0,assetPrefix:"/assets"}),h={async fetch(r,t,e){let a=new URL(r.url).pathname;return a.startsWith("/assets/")||a==="/favicon.ico"?await t.ASSETS.fetch(r):await u(r,t,e)}},m=h;
|
package/build/worker.js
CHANGED
|
@@ -1,9 +1 @@
|
|
|
1
|
-
import{
|
|
2
|
-
<script>
|
|
3
|
-
window.__houdini__initial__cache__ = ${n.serialize()};
|
|
4
|
-
window.__houdini__initial__session__ = ${JSON.stringify(s)};
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<!-- add a virtual module that hydrates the client and sets up the initial pending cache -->
|
|
8
|
-
<script type="module" src="/assets/pages/${e.id}.js" async=""></script>
|
|
9
|
-
`),new Response(a)}var D=A;export{D as default};
|
|
1
|
+
import{createServerAdapter as s}from"houdini/adapter";var o=s({production:!0,assetPrefix:"/assets"}),n={async fetch(t,r,a){let e=new URL(t.url).pathname;return e.startsWith("/assets/")||e==="/favicon.ico"?await r.ASSETS.fetch(t):await o(t,r,a)}},p=n;export{p as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "houdini-adapter-cloudflare",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.14",
|
|
4
4
|
"description": "The adapter for deploying your Houdini application to Cloudflare Pages",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"houdini",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"react": "^18.2.0",
|
|
34
34
|
"react-dom": "^18.2.0",
|
|
35
35
|
"react-streaming": "^0.3.14",
|
|
36
|
-
"houdini": "^1.2.
|
|
36
|
+
"houdini": "^1.2.14"
|
|
37
37
|
},
|
|
38
38
|
"files": [
|
|
39
39
|
"build"
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
|
-
"build": "tsup src/index.ts src/worker.
|
|
61
|
+
"build": "tsup src/index.ts src/worker.ts --format esm,cjs --external ../\\$houdini --external ../src --external graphql --minify --dts --clean --out-dir build",
|
|
62
62
|
"build:": "cd ../../ && ((run build && cd -) || (cd - && exit 1))",
|
|
63
63
|
"build:build": "pnpm build: && pnpm build"
|
|
64
64
|
}
|