prismic 1.27.0 → 1.28.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.
@@ -1,4 +1,4 @@
1
- import{_ as e,d as t,dt as n,ot as r,s as i,st as a,t as o,u as s,x as c}from"./adapters-CH12Bn8O.mjs";import{_ as l,l as u}from"./request-BlAQgJGK.mjs";import{n as d,s as f}from"./packageJson-uZy38HFJ.mjs";import{t as p}from"./taggedTemplateLiteral-DygvE_Ih.mjs";import{readFile as m,rm as h}from"node:fs/promises";import{relative as g}from"node:path";import{fileURLToPath as _}from"node:url";var v,y,b,x,S,C;function w({typescript:e}){return e?r`
1
+ import{Qt as e,Zt as t,_ as n,d as r,hn as i,s as a,t as o,u as s,x as c}from"./adapters-_6OwtgCL.mjs";import{S as l,m as u,n as d,s as f}from"./packageJson-Du_fIYqH.mjs";import{t as p}from"./taggedTemplateLiteral-DygvE_Ih.mjs";import{readFile as m,rm as h}from"node:fs/promises";import{relative as g}from"node:path";import{fileURLToPath as _}from"node:url";var v,y,b,x,S,C;function w({typescript:e}){return e?t`
2
2
  import { createClient as baseCreateClient } from "@prismicio/client";
3
3
  import { type CreateClientConfig, enableAutoPreviews } from '@prismicio/svelte/kit';
4
4
  import { PUBLIC_PRISMIC_ENVIRONMENT } from '$app/env/public';
@@ -26,7 +26,7 @@ import{_ as e,d as t,dt as n,ot as r,s as i,st as a,t as o,u as s,x as c}from"./
26
26
 
27
27
  return client;
28
28
  };
29
- `:r`
29
+ `:t`
30
30
  import { createClient as baseCreateClient } from "@prismicio/client";
31
31
  import { enableAutoPreviews } from '@prismicio/svelte/kit';
32
32
  import { PUBLIC_PRISMIC_ENVIRONMENT } from '$app/env/public';
@@ -54,19 +54,19 @@ import{_ as e,d as t,dt as n,ot as r,s as i,st as a,t as o,u as s,x as c}from"./
54
54
 
55
55
  return client;
56
56
  };
57
- `}function T(){return r`
57
+ `}function T(){return t`
58
58
  PUBLIC_PRISMIC_ENVIRONMENT: {
59
59
  public: true,
60
60
  schema: (value) => value,
61
61
  description: "The Prismic environment to use instead of the production repository.",
62
62
  },
63
- `}function E(){return r`
63
+ `}function E(){return t`
64
64
  import { defineEnvVars } from "@sveltejs/kit/env";
65
65
 
66
66
  export const variables = defineEnvVars({
67
67
  ${T()}
68
68
  });
69
- `}function D({extension:e}){return r(v||=p([`
69
+ `}function D({extension:e}){return t(v||=p([`
70
70
  <script>
71
71
  import { SliceSimulator, SliceZone } from '@prismicio/svelte';
72
72
  import { components } from '#lib/slices/index.`,`';
@@ -77,7 +77,7 @@ import{_ as e,d as t,dt as n,ot as r,s as i,st as a,t as o,u as s,x as c}from"./
77
77
  <SliceZone {slices} {components} />
78
78
  {/snippet}
79
79
  </SliceSimulator>
80
- `]),e)}function O({typescript:e}){return e?r`
80
+ `]),e)}function O({typescript:e}){return e?t`
81
81
  import { redirectToPreviewURL } from '@prismicio/svelte/kit';
82
82
  import { createClient } from '#lib/prismicio.ts';
83
83
  import type { RequestHandler } from "./$types";
@@ -87,7 +87,7 @@ import{_ as e,d as t,dt as n,ot as r,s as i,st as a,t as o,u as s,x as c}from"./
87
87
 
88
88
  return await redirectToPreviewURL({ client, request, cookies });
89
89
  }
90
- `:r`
90
+ `:t`
91
91
  import { redirectToPreviewURL } from '@prismicio/svelte/kit';
92
92
  import { createClient } from '#lib/prismicio.js';
93
93
 
@@ -97,7 +97,7 @@ import{_ as e,d as t,dt as n,ot as r,s as i,st as a,t as o,u as s,x as c}from"./
97
97
 
98
98
  return await redirectToPreviewURL({ client, request, cookies });
99
99
  }
100
- `}function k({extension:e}){return r`
100
+ `}function k({extension:e}){return t`
101
101
  import { repositoryName } from "#lib/prismicio.${e}";
102
102
 
103
103
  export const prerender = "auto";
@@ -105,7 +105,7 @@ import{_ as e,d as t,dt as n,ot as r,s as i,st as a,t as o,u as s,x as c}from"./
105
105
  export function load() {
106
106
  return { repositoryName };
107
107
  }
108
- `}function A(){return r(y||=p([`
108
+ `}function A(){return t(y||=p([`
109
109
  <script>
110
110
  import { isFilled, asImageSrc } from '@prismicio/client';
111
111
  import { PrismicPreview } from '@prismicio/svelte/kit';
@@ -127,7 +127,7 @@ import{_ as e,d as t,dt as n,ot as r,s as i,st as a,t as o,u as s,x as c}from"./
127
127
  </svelte:head>
128
128
  {@render children()}
129
129
  <PrismicPreview repositoryName={data.repositoryName} />
130
- `]))}function j({typescript:e}){return r(e?b||=p([`
130
+ `]))}function j({typescript:e}){return t(e?b||=p([`
131
131
  <script lang="ts">
132
132
  import { SliceZone } from "@prismicio/svelte";
133
133
  import { components } from "#lib/slices/index.ts";
@@ -146,7 +146,7 @@ import{_ as e,d as t,dt as n,ot as r,s as i,st as a,t as o,u as s,x as c}from"./
146
146
  <\/script>
147
147
 
148
148
  <SliceZone slices={data.page.data.slices} {components} />
149
- `]))}function M({model:e,typescript:t}){return e.repeatable?t?r`
149
+ `]))}function M({model:e,typescript:n}){return e.repeatable?n?t`
150
150
  import type { PageServerLoad } from "./$types";
151
151
  import { createClient } from "#lib/prismicio.ts";
152
152
 
@@ -156,7 +156,7 @@ import{_ as e,d as t,dt as n,ot as r,s as i,st as a,t as o,u as s,x as c}from"./
156
156
 
157
157
  return { page };
158
158
  };
159
- `:r`
159
+ `:t`
160
160
  import { createClient } from "#lib/prismicio.js";
161
161
 
162
162
  /** @type {import("./$types").PageServerLoad} */
@@ -166,7 +166,7 @@ import{_ as e,d as t,dt as n,ot as r,s as i,st as a,t as o,u as s,x as c}from"./
166
166
 
167
167
  return { page };
168
168
  }
169
- `:t?r`
169
+ `:n?t`
170
170
  import type { PageServerLoad } from "./$types";
171
171
  import { createClient } from "#lib/prismicio.ts";
172
172
 
@@ -176,7 +176,7 @@ import{_ as e,d as t,dt as n,ot as r,s as i,st as a,t as o,u as s,x as c}from"./
176
176
 
177
177
  return { page };
178
178
  };
179
- `:r`
179
+ `:t`
180
180
  import { createClient } from "#lib/prismicio.js";
181
181
 
182
182
  /* @type {import("./$types").PageServerLoad} */
@@ -186,13 +186,13 @@ import{_ as e,d as t,dt as n,ot as r,s as i,st as a,t as o,u as s,x as c}from"./
186
186
 
187
187
  return { page };
188
188
  }
189
- `}const N=r`
189
+ `}const N=t`
190
190
  <section data-slice-type={slice.slice_type} data-slice-variation={slice.variation}>
191
191
  Placeholder component for {slice.slice_type} (variation: {slice.variation}) slices.
192
192
  <br />
193
193
  <strong>You can edit this slice directly in your code editor.</strong>
194
194
  </section>
195
- `;function P({name:e,typescript:t}){let i=n(e);return r(t?S||=p([`
195
+ `;function P({name:e,typescript:n}){let r=i(e);return t(n?S||=p([`
196
196
  <script lang="ts">
197
197
  import type { Content } from '@prismicio/client';
198
198
  import type { SliceComponentProps } from '@prismicio/svelte';
@@ -213,11 +213,11 @@ import{_ as e,d as t,dt as n,ot as r,s as i,st as a,t as o,u as s,x as c}from"./
213
213
  <\/script>
214
214
 
215
215
  `,`
216
- `]),i,N)}var F;const I=[`<h1>WelcometoSvelteKit</h1><p>Visit<ahref="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a>toreadthedocumentation</p>`,`<h1>WelcometoSvelteKit</h1><p>Visit<ahref="https://kit.svelte.dev">kit.svelte.dev</a>toreadthedocumentation</p>`];var L=class extends o{id=`sveltekit`;environmentEnvVarName=`PUBLIC_PRISMIC_ENVIRONMENT`;localPreviewConfig={name:`Development`,websiteURL:`http://localhost:5173`,resolverPath:`/api/preview`};async setupProject(){await d({"@prismicio/client":`^${await f(`@prismicio/client`)}`,"@prismicio/svelte":`^${await f(`@prismicio/svelte`)}`});let n=await c(),i=await s(),a=await e();await t(new URL(`src/lib/prismicio.${i}`,n),w({typescript:a})),await z(`src/env`)||await l(new URL(`src/env.${i}`,n),E()),await t(new URL(`src/routes/slice-simulator/+page.svelte`,n),D({extension:i})),await t(new URL(`src/params/preview.${i}`,n),r`
216
+ `]),r,N)}var F;const I=[`<h1>WelcometoSvelteKit</h1><p>Visit<ahref="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a>toreadthedocumentation</p>`,`<h1>WelcometoSvelteKit</h1><p>Visit<ahref="https://kit.svelte.dev">kit.svelte.dev</a>toreadthedocumentation</p>`];var L=class extends o{id=`sveltekit`;environmentEnvVarName=`PUBLIC_PRISMIC_ENVIRONMENT`;localPreviewConfig={name:`Development`,websiteURL:`http://localhost:5173`,resolverPath:`/api/preview`};async setupProject(){await d({"@prismicio/client":`^${await f(`@prismicio/client`)}`,"@prismicio/svelte":`^${await f(`@prismicio/svelte`)}`});let e=await c(),i=await s(),a=await n();await r(new URL(`src/lib/prismicio.${i}`,e),w({typescript:a})),await z(`src/env`)||await l(new URL(`src/env.${i}`,e),E()),await r(new URL(`src/routes/slice-simulator/+page.svelte`,e),D({extension:i})),await r(new URL(`src/params/preview.${i}`,e),t`
217
217
  export function match(param) {
218
218
  return param === 'preview';
219
219
  }
220
- `),await t(new URL(`src/routes/api/preview/+server.${i}`,n),O({typescript:a})),await t(new URL(`src/routes/[[preview=preview]]/README.md`,n),r`
220
+ `),await r(new URL(`src/routes/api/preview/+server.${i}`,e),O({typescript:a})),await r(new URL(`src/routes/[[preview=preview]]/README.md`,e),t`
221
221
  This directory adds support for optional \`/preview\` routes. Do not remove this directory.
222
222
 
223
223
  All routes within this directory will be served using the following URLs:
@@ -226,22 +226,22 @@ import{_ as e,d as t,dt as n,ot as r,s as i,st as a,t as o,u as s,x as c}from"./
226
226
  - \`/preview/example-route\` (server-rendered)
227
227
 
228
228
  See <https://prismic.io/docs/svelte-preview> for more information.
229
- `);let o=await z(`src/routes/+layout.server`);o||await l(new URL(`src/routes/+layout.server.${i}`,n),k({extension:i})),(!o||(await m(new URL(o,n),`utf8`)).includes(`repositoryName`))&&await t(new URL(`src/routes/+layout.svelte`,n),A()),await R()}async getSetupInstructions(){let e=await c(),t=await u(new URL(`src/routes/+page.svelte`,e))&&await u(new URL(`src/routes/[[preview=preview]]/+page.svelte`,e))&&r`
229
+ `);let o=await z(`src/routes/+layout.server`);o||await l(new URL(`src/routes/+layout.server.${i}`,e),k({extension:i})),(!o||(await m(new URL(o,e),`utf8`)).includes(`repositoryName`))&&await r(new URL(`src/routes/+layout.svelte`,e),A()),await R()}async getSetupInstructions(){let e=await c(),n=await u(new URL(`src/routes/+page.svelte`,e))&&await u(new URL(`src/routes/[[preview=preview]]/+page.svelte`,e))&&t`
230
230
  Action required: delete src/routes/+page.svelte.
231
231
 
232
232
  It also serves / and hides your Prismic home page in
233
233
  src/routes/[[preview=preview]]/+page.svelte. Move anything you need
234
234
  from it first.
235
- `;return[await this.getEnvStep(),await this.getPreviewStep(),t].filter(Boolean).join(`
235
+ `;return[await this.getEnvStep(),await this.getPreviewStep(),n].filter(Boolean).join(`
236
236
 
237
- `)||void 0}async getEnvStep(){let e=await z(`src/env`);if(e&&!(await m(new URL(e,await c()),`utf8`)).includes(`PUBLIC_PRISMIC_ENVIRONMENT`))return r`
237
+ `)||void 0}async getEnvStep(){let e=await z(`src/env`);if(e&&!(await m(new URL(e,await c()),`utf8`)).includes(`PUBLIC_PRISMIC_ENVIRONMENT`))return t`
238
238
  Action required: add PUBLIC_PRISMIC_ENVIRONMENT to ${e}.
239
239
 
240
240
  Your project does not build until you do this. Add these lines to
241
241
  defineEnvVars({ ... }):
242
242
 
243
243
  ${T().replace(/^/gm,` `)}
244
- `}async getPreviewStep(){if(await i(`PrismicPreview`))return;let e=await z(`src/routes/+layout.server`)??`src/routes/+layout.server.${await s()}`,t=!(await m(new URL(e,await c()),`utf8`).catch(()=>``)).includes(`repositoryName`)&&`Return repositoryName from load in ${e}, creating the file if needed:\n\n${k({extension:e.split(`.`).pop()}).replace(/^/gm,` `)}`;return[r(F||=p([`
244
+ `}async getPreviewStep(){if(await a(`PrismicPreview`))return;let e=await z(`src/routes/+layout.server`)??`src/routes/+layout.server.${await s()}`,n=!(await m(new URL(e,await c()),`utf8`).catch(()=>``)).includes(`repositoryName`)&&`Return repositoryName from load in ${e}, creating the file if needed:\n\n${k({extension:e.split(`.`).pop()}).replace(/^/gm,` `)}`;return[t(F||=p([`
245
245
  Action required: add <PrismicPreview> to your root layout.
246
246
 
247
247
  Previews do not work until you do this, and the CLI cannot edit your
@@ -258,16 +258,16 @@ import{_ as e,d as t,dt as n,ot as r,s as i,st as a,t as o,u as s,x as c}from"./
258
258
 
259
259
  {@render children()}
260
260
  + <PrismicPreview repositoryName={data.repositoryName} />
261
- `])),t,"Run `prismic docs view sveltekit` for details."].filter(Boolean).join(`
261
+ `])),n,"Run `prismic docs view sveltekit` for details."].filter(Boolean).join(`
262
262
 
263
- `)}async createSliceIndexFile(e){let t=(await this.getSlices()).filter(t=>t.library.href===e.href),i=t.map(t=>{let r=g(_(e),_(t.directory));return`import ${n(t.model.name)} from "./${r}/index.svelte";`}),o=t.map(e=>`${a(e.model.id)}: ${n(e.model.name)}`),c=r`
263
+ `)}async createSliceIndexFile(n){let r=(await this.getSlices()).filter(e=>e.library.href===n.href),a=r.map(e=>{let t=g(_(n),_(e.directory));return`import ${i(e.model.name)} from "./${t}/index.svelte";`}),o=r.map(t=>`${e(t.model.id)}: ${i(t.model.name)}`),c=t`
264
264
  // Code generated by Prismic. DO NOT EDIT.
265
265
 
266
- ${i.join(`
266
+ ${a.join(`
267
267
  `)}
268
268
 
269
269
  export const components = {
270
270
  ${o.join(`,
271
271
  `)}
272
272
  };
273
- `;await l(new URL(`index.${await s()}`,e),c)}async getDefaultSliceLibrary(){return new URL(`src/lib/slices/`,await c())}async createSliceComponent(t,n){let r=P({name:t.name,typescript:await e()});await l(new URL(`index.svelte`,n),r)}async getPageFiles(t,n){let r=new URL(`src/routes/[[preview=preview]]/${n}/`,await c()),i=await e();return[{path:new URL(`+page.svelte`,r),contents:j({typescript:i})},{path:new URL(`+page.server.${await s()}`,r),contents:M({model:t,typescript:i})}]}};async function R(){let e=new URL(`src/routes/+page.svelte`,await c()),t=await m(e,`utf8`).catch(()=>void 0);I.includes(t?.replace(/\s/g,``)??``)&&await h(e)}async function z(e){let t=await c();for(let n of[`js`,`ts`])if(await u(new URL(`${e}.${n}`,t)))return`${e}.${n}`}export{M as a,w as c,k as i,A as l,R as n,j as o,z as r,O as s,L as t};
273
+ `;await l(new URL(`index.${await s()}`,n),c)}async getDefaultSliceLibrary(){return new URL(`src/lib/slices/`,await c())}async createSliceComponent(e,t){let r=P({name:e.name,typescript:await n()});await l(new URL(`index.svelte`,t),r)}async getPageFiles(e,t){let r=new URL(`src/routes/[[preview=preview]]/${t}/`,await c()),i=await n();return[{path:new URL(`+page.svelte`,r),contents:j({typescript:i})},{path:new URL(`+page.server.${await s()}`,r),contents:M({model:e,typescript:i})}]}};async function R(){let e=new URL(`src/routes/+page.svelte`,await c()),t=await m(e,`utf8`).catch(()=>void 0);I.includes(t?.replace(/\s/g,``)??``)&&await h(e)}async function z(e){let t=await c();for(let n of[`js`,`ts`])if(await u(new URL(`${e}.${n}`,t)))return`${e}.${n}`}export{M as a,w as c,k as i,A as l,R as n,j as o,z as r,O as s,L as t};
@@ -0,0 +1 @@
1
+ export{t as SvelteKitAdapter}from"./sveltekit-BvwbM55F.mjs";
@@ -1,4 +1,4 @@
1
- import{_ as e,d as t,ot as n,s as r,u as i,x as a}from"./adapters-CH12Bn8O.mjs";import{_ as o,l as s}from"./request-BlAQgJGK.mjs";import{n as c,s as l}from"./packageJson-uZy38HFJ.mjs";import{a as u,c as d,i as f,l as p,n as m,o as h,r as g,s as _,t as v}from"./sveltekit-CuRs_Ytj.mjs";import{t as y}from"./taggedTemplateLiteral-DygvE_Ih.mjs";import{readFile as b}from"node:fs/promises";var x;function S(e){return e.replace(/#lib\/(\w+)(?:\/index)?\.\w+/g,`$lib/$1`)}function C({typescript:e}){return d({typescript:e}).replace(`{ PUBLIC_PRISMIC_ENVIRONMENT } from '$app/env/public'`,`{ env } from '$env/dynamic/public'`).replace(`PUBLIC_PRISMIC_ENVIRONMENT ||`,`env.PUBLIC_PRISMIC_ENVIRONMENT ||`)}function w(){return n(x||=y([`
1
+ import{Zt as e,_ as t,d as n,s as r,u as i,x as a}from"./adapters-_6OwtgCL.mjs";import{S as o,m as s,n as c,s as l}from"./packageJson-Du_fIYqH.mjs";import{a as u,c as d,i as f,l as p,n as m,o as h,r as g,s as _,t as v}from"./sveltekit-BvwbM55F.mjs";import{t as y}from"./taggedTemplateLiteral-DygvE_Ih.mjs";import{readFile as b}from"node:fs/promises";var x;function S(e){return e.replace(/#lib\/(\w+)(?:\/index)?\.\w+/g,`$lib/$1`)}function C({typescript:e}){return d({typescript:e}).replace(`{ PUBLIC_PRISMIC_ENVIRONMENT } from '$app/env/public'`,`{ env } from '$env/dynamic/public'`).replace(`PUBLIC_PRISMIC_ENVIRONMENT ||`,`env.PUBLIC_PRISMIC_ENVIRONMENT ||`)}function w(){return e(x||=y([`
2
2
  <script>
3
3
  import { SliceSimulator, SliceZone } from '@prismicio/svelte';
4
4
  import { components } from '$lib/slices';
@@ -7,11 +7,11 @@ import{_ as e,d as t,ot as n,s as r,u as i,x as a}from"./adapters-CH12Bn8O.mjs";
7
7
  <SliceSimulator let:slices>
8
8
  <SliceZone {slices} {components} />
9
9
  </SliceSimulator>
10
- `]))}function T({typescript:e}){return S(_({typescript:e}))}function E(){return S(f({extension:`js`}))}function D({typescript:e}){return S(h({typescript:e}))}function O({model:e,typescript:t}){return S(u({model:e,typescript:t}))}var k,A=class extends v{async setupProject(){await c({"@prismicio/client":`^${await l(`@prismicio/client`)}`,"@prismicio/svelte":`^2`});let r=await a(),s=await i(),u=await e();await t(new URL(`src/lib/prismicio.${s}`,r),C({typescript:u})),await t(new URL(`src/routes/slice-simulator/+page.svelte`,r),w()),await t(new URL(`src/params/preview.${s}`,r),n`
10
+ `]))}function T({typescript:e}){return S(_({typescript:e}))}function E(){return S(f({extension:`js`}))}function D({typescript:e}){return S(h({typescript:e}))}function O({model:e,typescript:t}){return S(u({model:e,typescript:t}))}var k,A=class extends v{async setupProject(){await c({"@prismicio/client":`^${await l(`@prismicio/client`)}`,"@prismicio/svelte":`^2`});let r=await a(),s=await i(),u=await t();await n(new URL(`src/lib/prismicio.${s}`,r),C({typescript:u})),await n(new URL(`src/routes/slice-simulator/+page.svelte`,r),w()),await n(new URL(`src/params/preview.${s}`,r),e`
11
11
  export function match(param) {
12
12
  return param === 'preview';
13
13
  }
14
- `),await t(new URL(`src/routes/api/preview/+server.${s}`,r),T({typescript:u})),await t(new URL(`src/routes/[[preview=preview]]/README.md`,r),n`
14
+ `),await n(new URL(`src/routes/api/preview/+server.${s}`,r),T({typescript:u})),await n(new URL(`src/routes/[[preview=preview]]/README.md`,r),e`
15
15
  This directory adds support for optional \`/preview\` routes. Do not remove this directory.
16
16
 
17
17
  All routes within this directory will be served using the following URLs:
@@ -20,7 +20,7 @@ import{_ as e,d as t,ot as n,s as r,u as i,x as a}from"./adapters-CH12Bn8O.mjs";
20
20
  - \`/preview/example-route\` (server-rendered)
21
21
 
22
22
  See <https://prismic.io/docs/svelte-preview> for more information.
23
- `);let d=await g(`src/routes/+layout.server`);d||await o(new URL(`src/routes/+layout.server.${s}`,r),E()),(!d||(await b(new URL(d,r),`utf8`)).includes(`repositoryName`))&&await t(new URL(`src/routes/+layout.svelte`,r),p()),await m()}async getSetupInstructions(){let e=await a(),t=await g(`src/routes/+layout.server`)??`src/routes/+layout.server.${await i()}`,o=await b(new URL(t,e),`utf8`).catch(()=>``);return[!await r(`PrismicPreview`)&&[n(k||=y([`
23
+ `);let d=await g(`src/routes/+layout.server`);d||await o(new URL(`src/routes/+layout.server.${s}`,r),E()),(!d||(await b(new URL(d,r),`utf8`)).includes(`repositoryName`))&&await n(new URL(`src/routes/+layout.svelte`,r),p()),await m()}async getSetupInstructions(){let t=await a(),n=await g(`src/routes/+layout.server`)??`src/routes/+layout.server.${await i()}`,o=await b(new URL(n,t),`utf8`).catch(()=>``);return[!await r(`PrismicPreview`)&&[e(k||=y([`
24
24
  Action required: add <PrismicPreview> to your root layout.
25
25
 
26
26
  Previews do not work until you do this, and the CLI cannot edit your
@@ -37,9 +37,9 @@ import{_ as e,d as t,ot as n,s as r,u as i,x as a}from"./adapters-CH12Bn8O.mjs";
37
37
 
38
38
  {@render children()}
39
39
  + <PrismicPreview repositoryName={data.repositoryName} />
40
- `])),!o.includes(`repositoryName`)&&`Return repositoryName from load in ${t}, creating the file if needed:\n\n${E().replace(/^/gm,` `)}`,"Run `prismic docs view sveltekit` for details."].filter(Boolean).join(`
40
+ `])),!o.includes(`repositoryName`)&&`Return repositoryName from load in ${n}, creating the file if needed:\n\n${E().replace(/^/gm,` `)}`,"Run `prismic docs view sveltekit` for details."].filter(Boolean).join(`
41
41
 
42
- `),await s(new URL(`src/routes/+page.svelte`,e))&&await s(new URL(`src/routes/[[preview=preview]]/+page.svelte`,e))&&n`
42
+ `),await s(new URL(`src/routes/+page.svelte`,t))&&await s(new URL(`src/routes/[[preview=preview]]/+page.svelte`,t))&&e`
43
43
  Action required: delete src/routes/+page.svelte.
44
44
 
45
45
  It also serves / and hides your Prismic home page in
@@ -47,4 +47,4 @@ import{_ as e,d as t,ot as n,s as r,u as i,x as a}from"./adapters-CH12Bn8O.mjs";
47
47
  from it first.
48
48
  `].filter(Boolean).join(`
49
49
 
50
- `)||void 0}async getPageFiles(t,n){let r=new URL(`src/routes/[[preview=preview]]/${n}/`,await a()),o=await e();return[{path:new URL(`+page.svelte`,r),contents:D({typescript:o})},{path:new URL(`+page.server.${await i()}`,r),contents:O({model:t,typescript:o})}]}};export{A as SvelteKit2Adapter};
50
+ `)||void 0}async getPageFiles(e,n){let r=new URL(`src/routes/[[preview=preview]]/${n}/`,await a()),o=await t();return[{path:new URL(`+page.svelte`,r),contents:D({typescript:o})},{path:new URL(`+page.server.${await i()}`,r),contents:O({model:e,typescript:o})}]}};export{A as SvelteKit2Adapter};
@@ -0,0 +1 @@
1
+ import{n as e}from"./package-DPO7tnYd.mjs";import{J as t,K as n,S as r,U as i,X as a,_ as o,p as s,s as c}from"./packageJson-Du_fIYqH.mjs";import{fileURLToPath as l}from"node:url";import{spawn as u}from"node:child_process";const d=i({latestKnownVersion:t(a()),lastUpdateCheckAt:t(n())});async function f(t){try{if(p())return;let n=await m(t.statePath),r=e;if(n?.latestKnownVersion&&h(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`,()=>{_(t.npmPackageName,t.statePath)})}catch{}}function p(){return process.env.NO_UPDATE_NOTIFIER!==`0`&&!(process.env.NO_UPDATE_NOTIFIER!==`1`&&!process.env.CI&&process.stderr.isTTY)}async function m(e){return o(e,{schema:d}).catch(()=>void 0)}function h(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 g(e,t){let n=await c(e);await r(t,s({latestKnownVersion:n,lastUpdateCheckAt:Date.now()}))}function _(e,t){try{let n=l(new URL(`./subprocesses/updateVersionState.mjs`,import.meta.url));u(process.execPath,[n,e,t.href],{detached:!0,stdio:`ignore`}).unref()}catch{}}export{g as n,f as t};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prismic",
3
- "version": "1.27.0",
3
+ "version": "1.28.0",
4
4
  "description": "Prismic's official command line tool",
5
5
  "keywords": [
6
6
  "prismic",
@@ -35,21 +35,24 @@
35
35
  "evals:report": "jq -r '.evals | to_entries[] | \"\\([.value[]|select(.pass)]|length)/\\(.value|length) \\([.value[].durationS]|add/length|round)s \\(.key)\"' evals/results.json",
36
36
  "test": "npm run lint && npm run types && npm run unit"
37
37
  },
38
+ "dependencies": {
39
+ "@napi-rs/keyring": "^2.1.2"
40
+ },
38
41
  "devDependencies": {
39
- "@anthropic-ai/claude-agent-sdk": "^0.3.316",
40
- "@openai/codex-sdk": "^0.166.0",
42
+ "@anthropic-ai/claude-agent-sdk": "^0.3.319",
43
+ "@openai/codex-sdk": "^0.167.0",
41
44
  "@prismicio/types-internal": "4.7.0",
42
45
  "@types/node": "26.6.6",
43
46
  "change-case": "5.4.4",
44
47
  "dedent": "^1.7.2",
45
48
  "detect-indent": "^7.0.2",
46
49
  "github-slugger": "2.0.0",
47
- "oxfmt": "^0.75.0",
48
- "oxlint": "1.90.0",
50
+ "oxfmt": "^0.77.0",
51
+ "oxlint": "1.92.0",
49
52
  "prismic-ts-codegen": "^0.1.31",
50
53
  "tinyexec": "^1.3.1",
51
54
  "tinyglobby": "^0.2.17",
52
- "tsdown": "0.23.4",
55
+ "tsdown": "0.23.7",
53
56
  "typescript": "7.0.2",
54
57
  "vitest": "5.1.0",
55
58
  "zod": "^4.6.7"