prismic 1.9.0 → 1.10.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/dist/auth-v411xsfu.mjs +1 -0
- package/dist/{builders-hKD4IrLX-DzjbepsH.mjs → builders-hKD4IrLX-BLEKUBnw.mjs} +1 -1
- package/dist/{core-C9QC2jUZ.mjs → core-C1t8NJrX.mjs} +2 -2
- package/dist/index.mjs +42 -42
- package/dist/{nextjs-DZchmZBW.mjs → nextjs-PuOdbHix.mjs} +1 -1
- package/dist/{nuxt-BL0XxxuM.mjs → nuxt-KLF-XKWk.mjs} +1 -1
- package/dist/package-Densjvs_.mjs +1 -0
- package/dist/{segment-BiyM1DAx.mjs → segment-BqeDS7HA.mjs} +1 -1
- package/dist/subprocesses/refreshToken.mjs +1 -1
- package/dist/subprocesses/sendSegmentEvents.mjs +1 -1
- package/dist/subprocesses/updateVersionState.mjs +1 -1
- package/dist/{sveltekit-BSicYgQU.mjs → sveltekit-BiUC4gGm.mjs} +1 -1
- package/dist/{update-notifier-0ylnuuXF.mjs → update-notifier-Bp8D-mmq.mjs} +1 -1
- package/package.json +1 -1
- package/dist/auth-D5YibiqF.mjs +0 -1
- package/dist/package-ln6JGWAi.mjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{C as e,N as t,a as n,b as r,c as i,i as a,s as o,t as s,u as c,v as l,w as u}from"./core-
|
|
1
|
+
import{C as e,N as t,a as n,b as r,c as i,i as a,s as o,t as s,u as c,v as l,w as u}from"./core-C1t8NJrX.mjs";import{c as d,f,p}from"./request-DFL5MlKG.mjs";import{i as m,n as h,r as g}from"./packageJson-yTgvK-Vp.mjs";import{i as _,r as v}from"./auth-v411xsfu.mjs";import{createRequire as y}from"node:module";import{fileURLToPath as b}from"node:url";import{relative as x}from"node:path";const S=i`
|
|
2
2
|
return (
|
|
3
3
|
<section
|
|
4
4
|
data-slice-type={slice.slice_type}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{C as e,N as t,O as n,T as r,a as i,b as a,c as o,i as s,s as c,t as l,u,v as d,w as f}from"./core-
|
|
1
|
+
import{C as e,N as t,O as n,T as r,a as i,b as a,c as o,i as s,s as c,t as l,u,v as d,w as f}from"./core-C1t8NJrX.mjs";import{c as p,f as m,p as h}from"./request-DFL5MlKG.mjs";import{i as g,n as _}from"./packageJson-yTgvK-Vp.mjs";import{i as v,r as y}from"./auth-v411xsfu.mjs";import{n as b,t as x}from"./builders-hKD4IrLX-BLEKUBnw.mjs";import{readFile as S,rm as C}from"node:fs/promises";import{fileURLToPath as w}from"node:url";import{relative as T}from"node:path";function E(e){let{name:n,typescript:r}=e,i=t(n);return r?o`
|
|
2
2
|
<script setup lang="ts">
|
|
3
3
|
import type { Content } from "@prismicio/client";
|
|
4
4
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=`prismic`,t=`1.10.0`;export{t as n,e as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./package-
|
|
1
|
+
import{n as e,t}from"./package-Densjvs_.mjs";import{fileURLToPath as n}from"node:url";import{spawn as r}from"node:child_process";const i=[],a=[],o=crypto.randomUUID();let s;async function c(e){let{writeKey:t}=e;process.on(`exit`,()=>d({writeKey:t}))}function l(n){s=n.userId,a.push({userId:n.userId,anonymousId:o,integrations:{Intercom:{user_hash:n.intercomHash}},context:{app:{name:t,version:e}},timestamp:new Date().toISOString()})}function u(n,r={}){let{properties:a,groupId:c}=r;i.push({event:n,properties:{nodeVersion:process.versions.node,...a},context:{app:{name:t,version:e},groupId:c},userId:s,anonymousId:o,timestamp:new Date().toISOString()})}function d(e){let{writeKey:t}=e;if(!(i.length===0&&a.length===0)){try{let e=Buffer.from(JSON.stringify({trackEvents:i.map(e=>({...e,userId:e.userId||s})),identifyEvents:a,writeKey:t})).toString(`base64`),o=n(new URL(`./subprocesses/sendSegmentEvents.mjs`,import.meta.url));r(process.execPath,[o,e],{detached:!0,stdio:`ignore`}).unref()}catch{}i.length=0,a.length=0}}async function f(e,t,n){let r={"Content-Type":`application/json`,Authorization:`Basic ${btoa(n+`:`)}`};await Promise.allSettled([...e.map(e=>fetch(`https://api.segment.io/v1/track`,{method:`POST`,headers:r,body:JSON.stringify(e)}).catch(()=>{})),...t.map(e=>fetch(`https://api.segment.io/v1/identify`,{method:`POST`,headers:r,body:JSON.stringify(e)}).catch(()=>{}))])}export{l as i,f as n,u as r,c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"../auth-
|
|
1
|
+
import{o as e}from"../auth-v411xsfu.mjs";try{await e()}catch{}export{};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"../segment-
|
|
1
|
+
import{n as e}from"../segment-BqeDS7HA.mjs";const{trackEvents:t,identifyEvents:n,writeKey:r}=JSON.parse(Buffer.from(process.argv[2],`base64`).toString());try{await e(t,n,r)}catch{}export{};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../packageJson-yTgvK-Vp.mjs";import{n as e}from"../update-notifier-
|
|
1
|
+
import"../packageJson-yTgvK-Vp.mjs";import{n as e}from"../update-notifier-Bp8D-mmq.mjs";const[t,n]=process.argv.slice(2);try{await e(t,new URL(n))}catch{}export{};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{C as e,N as t,a as n,b as r,c as i,i as a,s as o,t as s,u as c,v as l,w as u}from"./core-
|
|
1
|
+
import{C as e,N as t,a as n,b as r,c as i,i as a,s as o,t as s,u as c,v as l,w as u}from"./core-C1t8NJrX.mjs";import{c as d,f,p}from"./request-DFL5MlKG.mjs";import{i as m,n as h,r as g}from"./packageJson-yTgvK-Vp.mjs";import{i as _,r as v}from"./auth-v411xsfu.mjs";import{t as y}from"./builders-hKD4IrLX-BLEKUBnw.mjs";import{createRequire as b}from"node:module";import{writeFile as x}from"node:fs/promises";import{fileURLToPath as S}from"node:url";import{relative as C}from"node:path";function w(e){let{typescript:t}=e;return t?i`
|
|
2
2
|
import { createClient as baseCreateClient } from "@prismicio/client";
|
|
3
3
|
import { type CreateClientConfig, enableAutoPreviews } from '@prismicio/svelte/kit';
|
|
4
4
|
import prismicConfig from "../../prismic.config.json";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./package-
|
|
1
|
+
import{n as e}from"./package-Densjvs_.mjs";import{E as t,N as n,S as r,k as i,s as a,w as o}from"./request-DFL5MlKG.mjs";import{i as s}from"./packageJson-yTgvK-Vp.mjs";import{mkdir as c,readFile as l,writeFile as u}from"node:fs/promises";import{fileURLToPath as d}from"node:url";import{dirname as f}from"node:path";import{spawn as p}from"node:child_process";const m=r({latestKnownVersion:t(i()),lastUpdateCheckAt:t(o())});async function h(t){try{if(g())return;let n=await _(t.statePath),r=e;if(n?.latestKnownVersion&&v(n.latestKnownVersion,r)){let e=`Update available: ${r} → ${n.latestKnownVersion}. Run \`npx ${t.npmPackageName}@latest --version\` to update.`;process.on(`exit`,()=>{try{console.error(`\n${e}`)}catch{}})}(!n?.lastUpdateCheckAt||Date.now()-n.lastUpdateCheckAt>864e5)&&process.on(`exit`,()=>{b(t.npmPackageName,t.statePath)})}catch{}}function g(){return process.env.NO_UPDATE_NOTIFIER===`0`?!1:!!(process.env.NO_UPDATE_NOTIFIER===`1`||process.env.CI||!process.stderr.isTTY)}async function _(e){try{let t=await l(e,`utf-8`);return n(m,JSON.parse(t))}catch{return}}function v(e,t){if(e.includes(`-`)||t.includes(`-`))return!1;let n=e.split(`.`).map(Number),r=t.split(`.`).map(Number);if(n.length!==3||r.length!==3||n.some(e=>!Number.isFinite(e))||r.some(e=>!Number.isFinite(e)))return!1;for(let e=0;e<3;e++){if(n[e]>r[e])return!0;if(n[e]<r[e])return!1}return!1}async function y(e,t){let n=await s(e),r=d(t);await c(f(r),{recursive:!0}),await u(r,a({latestKnownVersion:n,lastUpdateCheckAt:Date.now()}))}function b(e,t){try{let n=d(new URL(`./subprocesses/updateVersionState.mjs`,import.meta.url));p(process.execPath,[n,e,t.href],{detached:!0,stdio:`ignore`}).unref()}catch{}}export{y as n,h as t};
|
package/package.json
CHANGED
package/dist/auth-D5YibiqF.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as e,E as t,M as n,N as r,S as i,T as a,c as o,f as s,g as c,k as l,o as u,p as d,s as f,x as p}from"./request-DFL5MlKG.mjs";import{readFile as m,rm as h}from"node:fs/promises";import{fileURLToPath as g,pathToFileURL as _}from"node:url";import{spawn as v}from"node:child_process";import{createServer as y}from"node:http";import{homedir as b}from"node:os";const x=`prismic.io`,S=`wroom.io`,C=r(a({MODE:l(),DEV:e(),PROD:e(),TEST:e(),PRISMIC_SENTRY_DSN:c(p(),`https://e1886b1775bd397cd1afc60bfd2ebfc8@o146123.ingest.us.sentry.io/4510445143588864`),PRISMIC_SENTRY_ENVIRONMENT:t(l()),PRISMIC_SENTRY_ENABLED:t(e()),PRISMIC_HOST:t(l()),PRISMIC_DOCS_HOST:t(l()),PRISMIC_CONFIG_DIR:t(l()),PRISMIC_TYPE_BUILDER_ENABLED:t(e())}),{...process.env,MODE:`production`,DEV:`false`,PROD:`true`,TEST:`false`});async function w(e,t){let{host:n}=t,r=T(n),i=new URL(`refreshtoken`,r);return i.searchParams.set(`token`,e),await u(i,{schema:l()})}function T(e){return new URL(`https://auth.${e}/`)}function E(e,t){if(t)return d(_(t));if(process.platform===`win32`){let t=process.env.APPDATA;if(t)return new URL(`${e}/`,d(_(t)))}if(process.platform!==`darwin`){let t=process.env.XDG_CONFIG_HOME;if(t)return new URL(`${e}/`,d(_(t)))}let n=d(_(b()));return new URL(`.config/${e}/`,n)}const D=E(`prismic`,C.PRISMIC_CONFIG_DIR),O=new URL(`credentials.json`,D),k=new URL(`update-notifier.json`,D),A=i({token:t(l().check(n(1))),host:t(l().check(n(1)))});async function j(){return(await F())?.token}async function M(){return C.PRISMIC_HOST?C.PRISMIC_HOST:(await F())?.host||x}async function N(){let e=await j();if(!e)return;let t=await M(),n=await w(e,{host:t});return await I({token:n,host:t}),n}async function P(){if(!await o(O))return!0;try{return await h(O,{force:!0}),!0}catch{return!1}}async function F(){try{let e=await m(O,`utf-8`);return r(A,JSON.parse(e))}catch{return}}async function I(e){await s(O,f(e))}async function L(e){let t=await M(),n=`https://${t}`;return new Promise((r,i)=>{let a=y((e,i)=>{if(e.method===`OPTIONS`){i.writeHead(204,{"Access-Control-Allow-Origin":n,"Access-Control-Allow-Methods":`POST, OPTIONS`,"Access-Control-Allow-Headers":`Content-Type`}),i.end();return}if(e.method===`POST`){let s=``;e.on(`data`,e=>{s+=e.toString()}),e.on(`end`,async()=>{try{let{cookies:e,email:c}=JSON.parse(s),l=e.find(e=>e.startsWith(`prismic-auth=`))?.split(`;`)[0]?.replace(/^prismic-auth=/,``);if(!l){i.writeHead(400,{"Access-Control-Allow-Origin":n,"Content-Type":`application/json`}),i.end(JSON.stringify({error:`Invalid request`}));return}await I({token:l,host:t}),i.writeHead(200,{"Access-Control-Allow-Origin":n,"Content-Type":`application/json`}),i.end(JSON.stringify({success:!0})),clearTimeout(o),a.close(),r({email:c})}catch{i.writeHead(400,{"Access-Control-Allow-Origin":n,"Content-Type":`application/json`}),i.end(JSON.stringify({error:`Invalid request`}))}});return}i.writeHead(404),i.end()}),o=setTimeout(()=>{a.close(),i(Error(`Login timed out. Please try again.`))},18e4),s=async()=>{let n=a.address();if(!n||typeof n==`string`){clearTimeout(o),a.close(),i(Error(`Failed to start login server`));return}let r=await B(t,n.port);e?.onReady?.(r)};a.on(`error`,e=>{e.code===`EADDRINUSE`&&a.listening===!1?a.listen(0,`0.0.0.0`,s):(clearTimeout(o),i(e))}),a.listen(5555,`0.0.0.0`,s)})}const R=new URL(`.prismic`,d(_(b())));async function z(){let e;try{e=await m(R,`utf-8`)}catch{return}try{let t=JSON.parse(e);if(!t||t.latestKnownVersion===void 0&&t.lastUpdateCheckAt===void 0)return}catch{return}try{await h(R,{force:!0})}catch{}}async function B(e,t){let n=new URL(`dashboard/cli/login`,`https://${e}/`);return n.searchParams.set(`source`,`prismic-cli`),n.searchParams.set(`port`,t.toString()),n}function V(){try{let e=g(new URL(`./subprocesses/refreshToken.mjs`,import.meta.url));v(process.execPath,[e],{detached:!0,stdio:`ignore`}).unref()}catch{}}export{P as a,k as c,C as d,j as i,x as l,L as n,N as o,M as r,V as s,z as t,S as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=`prismic`,t=`1.9.0`;export{t as n,e as t};
|