prismic 1.28.0 → 1.29.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/{adapters-_6OwtgCL.mjs → adapters-C-tqRizJ.mjs} +12 -12
- package/dist/index.mjs +100 -95
- package/dist/{nextjs-CiU-wONg.mjs → nextjs-Cydao8so.mjs} +1 -1
- package/dist/{nuxt-BNM57THK.mjs → nuxt-DZlxcDTY.mjs} +10 -10
- package/dist/package-CR69YEZ6.mjs +1 -0
- package/dist/{segment-BW5d22g2.mjs → segment-B2JRNROf.mjs} +1 -1
- package/dist/subprocesses/sendSegmentEvents.mjs +1 -1
- package/dist/subprocesses/updateVersionState.mjs +1 -1
- package/dist/sveltekit-B3tYQDoW.mjs +1 -0
- package/dist/{sveltekit-BvwbM55F.mjs → sveltekit-DCytYnBb.mjs} +1 -1
- package/dist/{sveltekit2-CVfxQ2tH.mjs → sveltekit2-DbVLruSc.mjs} +1 -1
- package/dist/{update-notifier-CaPWDsNo.mjs → update-notifier-BGQNWIvh.mjs} +1 -1
- package/package.json +5 -5
- package/dist/package-DPO7tnYd.mjs +0 -1
- package/dist/sveltekit-C5og1T-S.mjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{$t as e,Qt as t,_ as n,d as r,gn as i,s as a,t as o,u as s,x as c}from"./adapters-C-tqRizJ.mjs";import{S as l,a as u,m as d,n as f,s as p}from"./packageJson-Du_fIYqH.mjs";import{readFile as m}from"node:fs/promises";import{relative as h}from"node:path";import{fileURLToPath as g}from"node:url";const _=t`
|
|
2
2
|
return (
|
|
3
3
|
<section
|
|
4
4
|
data-slice-type={slice.slice_type}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{S as e,f as t,m as n,n as r,s as i}from"./packageJson-Du_fIYqH.mjs";import{
|
|
1
|
+
import{S as e,f as t,m as n,n as r,s as i}from"./packageJson-Du_fIYqH.mjs";import{$t as a,C as o,Qt as s,T as c,_ as l,d as u,gn as d,t as f,u as p,x as m}from"./adapters-C-tqRizJ.mjs";import{t as h}from"./taggedTemplateLiteral-DygvE_Ih.mjs";import{readFile as g,rm as _}from"node:fs/promises";import{relative as v}from"node:path";import{fileURLToPath as y}from"node:url";var b,x,S,C,w;const T=s`
|
|
2
2
|
<template>
|
|
3
3
|
<section
|
|
4
4
|
:data-slice-type="slice.slice_type"
|
|
@@ -9,7 +9,7 @@ import{S as e,f as t,m as n,n as r,s as i}from"./packageJson-Du_fIYqH.mjs";impor
|
|
|
9
9
|
<strong>You can edit this slice directly in your code editor.</strong>
|
|
10
10
|
</section>
|
|
11
11
|
</template>
|
|
12
|
-
`;function E({name:e,typescript:t}){return t?
|
|
12
|
+
`;function E({name:e,typescript:t}){return t?s(b||=h([`
|
|
13
13
|
<script setup lang="ts">
|
|
14
14
|
import type { Content } from "@prismicio/client";
|
|
15
15
|
|
|
@@ -33,7 +33,7 @@ import{S as e,f as t,m as n,n as r,s as i}from"./packageJson-Du_fIYqH.mjs";impor
|
|
|
33
33
|
<\/script>
|
|
34
34
|
|
|
35
35
|
`,`
|
|
36
|
-
`]),d(e),T):
|
|
36
|
+
`]),d(e),T):s(x||=h([`
|
|
37
37
|
<script setup>
|
|
38
38
|
// The array passed to \`getSliceComponentProps\` is purely optional.
|
|
39
39
|
// Consider it as a visual hint for you when templating your slice.
|
|
@@ -49,7 +49,7 @@ import{S as e,f as t,m as n,n as r,s as i}from"./packageJson-Du_fIYqH.mjs";impor
|
|
|
49
49
|
<\/script>
|
|
50
50
|
|
|
51
51
|
`,`
|
|
52
|
-
`]),T)}function D({model:e,typescript:t}){let n=t?`setup lang="ts"`:`setup`;if(e.repeatable){let r=t?`route.params.uid as string`:`route.params.uid`;return
|
|
52
|
+
`]),T)}function D({model:e,typescript:t}){let n=t?`setup lang="ts"`:`setup`;if(e.repeatable){let r=t?`route.params.uid as string`:`route.params.uid`;return s(S||=h([`
|
|
53
53
|
<script `,`>
|
|
54
54
|
import { components } from "~/slices";
|
|
55
55
|
|
|
@@ -65,7 +65,7 @@ import{S as e,f as t,m as n,n as r,s as i}from"./packageJson-Du_fIYqH.mjs";impor
|
|
|
65
65
|
<SliceZone :slices="page?.data.slices ?? []" :components="components" />
|
|
66
66
|
</main>
|
|
67
67
|
</template>
|
|
68
|
-
`]),n,r,e.id,r)}return
|
|
68
|
+
`]),n,r,e.id,r)}return s(C||=h([`
|
|
69
69
|
<script `,`>
|
|
70
70
|
import { components } from "~/slices";
|
|
71
71
|
|
|
@@ -80,7 +80,7 @@ import{S as e,f as t,m as n,n as r,s as i}from"./packageJson-Du_fIYqH.mjs";impor
|
|
|
80
80
|
<SliceZone :slices="page?.data.slices ?? []" :components="components" />
|
|
81
81
|
</main>
|
|
82
82
|
</template>
|
|
83
|
-
`]),n,e.id,e.id)}function O({typescript:e}){let t=e?`setup lang="ts"`:`setup`;return
|
|
83
|
+
`]),n,e.id,e.id)}function O({typescript:e}){let t=e?`setup lang="ts"`:`setup`;return s(w||=h([`
|
|
84
84
|
<script `,`>
|
|
85
85
|
import { components } from "~/slices";
|
|
86
86
|
<\/script>
|
|
@@ -90,7 +90,7 @@ import{S as e,f as t,m as n,n as r,s as i}from"./packageJson-Du_fIYqH.mjs";impor
|
|
|
90
90
|
<SliceZone :slices="slices" :components="components" />
|
|
91
91
|
</SliceSimulator>
|
|
92
92
|
</template>
|
|
93
|
-
`]),t)}const k=`@nuxtjs/prismic`,A=[`<template><div><NuxtRouteAnnouncer/><NuxtWelcome/></div></template>`,`<template><div><NuxtWelcome/></div></template>`];var j=class extends f{id=`nuxt`;environmentEnvVarName=`NUXT_PUBLIC_PRISMIC_ENVIRONMENT`;localPreviewConfig={name:`Development`,websiteURL:`http://localhost:3000`,resolverPath:`/preview`};async setupProject(){await r({"@prismicio/client":`^${await i(`@prismicio/client`)}`,[k]:`^${await i(k)}`}),await P(),await u(new URL(`slice-simulator.vue`,await N()),O({typescript:await l()})),await L(),await this.modifySliceLibraryPath()}async getSetupInstructions(){let e=[];await F()||e.push(
|
|
93
|
+
`]),t)}const k=`@nuxtjs/prismic`,A=[`<template><div><NuxtRouteAnnouncer/><NuxtWelcome/></div></template>`,`<template><div><NuxtWelcome/></div></template>`];var j=class extends f{id=`nuxt`;environmentEnvVarName=`NUXT_PUBLIC_PRISMIC_ENVIRONMENT`;localPreviewConfig={name:`Development`,websiteURL:`http://localhost:3000`,resolverPath:`/preview`};async setupProject(){await r({"@prismicio/client":`^${await i(`@prismicio/client`)}`,[k]:`^${await i(k)}`}),await P(),await u(new URL(`slice-simulator.vue`,await N()),O({typescript:await l()})),await L(),await this.modifySliceLibraryPath()}async getSetupInstructions(){let e=[];await F()||e.push(s`
|
|
94
94
|
Action required: add "${k}" to modules in nuxt.config.
|
|
95
95
|
|
|
96
96
|
Prismic does not work until you do this. Make the change now.
|
|
@@ -100,7 +100,7 @@ import{S as e,f as t,m as n,n as r,s as i}from"./packageJson-Du_fIYqH.mjs";impor
|
|
|
100
100
|
+ "${k}",
|
|
101
101
|
],
|
|
102
102
|
});
|
|
103
|
-
`);let t=await I();if(t!==void 0&&!t.includes(`<NuxtPage`)){let t=v(y(await m()),y(new URL(`app.vue`,await M())));e.push(
|
|
103
|
+
`);let t=await I();if(t!==void 0&&!t.includes(`<NuxtPage`)){let t=v(y(await m()),y(new URL(`app.vue`,await M())));e.push(s`
|
|
104
104
|
Action required: add <NuxtPage /> to ${t}.
|
|
105
105
|
|
|
106
106
|
Pages, including the slice simulator, do not render until you do
|
|
@@ -114,7 +114,7 @@ import{S as e,f as t,m as n,n as r,s as i}from"./packageJson-Du_fIYqH.mjs";impor
|
|
|
114
114
|
</template>
|
|
115
115
|
`)}return e.join(`
|
|
116
116
|
|
|
117
|
-
`)||void 0}async createSliceIndexFile(t){let n=(await this.getSlices()).filter(e=>e.library.href===t.href).map(e=>{let n=v(y(t),y(e.directory));return`${
|
|
117
|
+
`)||void 0}async createSliceIndexFile(t){let n=(await this.getSlices()).filter(e=>e.library.href===t.href).map(e=>{let n=v(y(t),y(e.directory));return`${a(e.model.id)}: defineAsyncComponent(() => import("./${n}/index.vue"))`}),r=s`
|
|
118
118
|
// Code generated by Prismic. DO NOT EDIT.
|
|
119
119
|
|
|
120
120
|
import { defineAsyncComponent } from "vue";
|
|
@@ -124,4 +124,4 @@ import{S as e,f as t,m as n,n as r,s as i}from"./packageJson-Du_fIYqH.mjs";impor
|
|
|
124
124
|
${n.join(`,
|
|
125
125
|
`)}
|
|
126
126
|
});
|
|
127
|
-
`;await e(new URL(`index.${await p()}`,t),r)}async getDefaultSliceLibrary(){return new URL(`slices/`,await M())}async createSliceComponent(t,n){let r=E({name:t.name,typescript:await l()});await e(new URL(`index.vue`,n),r)}async getPageFiles(e,t){return[{path:new URL(`${t||`index`}.vue`,await N()),contents:D({model:e,typescript:await l()})}]}async modifySliceLibraryPath(){let e=await m(),t=await n(new URL(`app/`,e)),r=await n(new URL(`src/`,e));if(!t&&!r)return;let i;try{i=await
|
|
127
|
+
`;await e(new URL(`index.${await p()}`,t),r)}async getDefaultSliceLibrary(){return new URL(`slices/`,await M())}async createSliceComponent(t,n){let r=E({name:t.name,typescript:await l()});await e(new URL(`index.vue`,n),r)}async getPageFiles(e,t){return[{path:new URL(`${t||`index`}.vue`,await N()),contents:D({model:e,typescript:await l()})}]}async modifySliceLibraryPath(){let e=await m(),t=await n(new URL(`app/`,e)),r=await n(new URL(`src/`,e));if(!t&&!r)return;let i;try{i=await o()}catch{return}JSON.stringify(i.libraries)===JSON.stringify([`./slices`])&&((await this.getSlices()).length>0||await c({libraries:[t?`./app/slices`:`./src/slices`]}))}};async function M(){let e=await m(),t=new URL(`app/`,e);if(await n(t))return t;let r=new URL(`src/`,e);return await n(r)?r:e}async function N(){let e=await m();for(let t of[`app/pages/`,`src/pages/`,`pages/`]){let r=new URL(t,e);if(await n(r))return r}return new URL(`pages/`,await M())}async function P(){if(!await F())try{await t(`nuxt`,[`module`,`add`,k,`--skipInstall`],{timeout:6e4,nodeOptions:{cwd:y(await m()),stdio:[`ignore`,`pipe`,`pipe`]}})}catch{}}async function F(){let e=await m();for(let t of[`ts`,`js`,`mts`,`mjs`,`cts`,`cjs`]){let n=new URL(`nuxt.config.${t}`,e);if((await g(n,`utf8`).catch(()=>``)).includes(k))return!0}return!1}async function I(){return await g(new URL(`app.vue`,await M()),`utf8`).catch(()=>void 0)}async function L(){let e=await I();A.includes(e?.replace(/\s/g,``)??``)&&await _(new URL(`app.vue`,await M()))}export{j as NuxtAdapter};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=`prismic`,t=`1.29.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-CR69YEZ6.mjs";import{fileURLToPath as n}from"node:url";import{spawn as r}from"node:child_process";const i=[],a=[];let o,s;function c(e){let{writeKey:t}=e;o=e.anonymousId,s=e.userId,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:(/* @__PURE__ */ new Date()).toISOString()})}function u(n,r={}){let{properties:a,groupId:c}=r;i.push({event:n,properties:{nodeVersion:process.versions.node,os:process.platform,...a},context:{app:{name:t,version:e},groupId:c},userId:s,anonymousId:o,timestamp:(/* @__PURE__ */ 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{n as e}from"../segment-
|
|
1
|
+
import{n as e}from"../segment-B2JRNROf.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{n as e}from"../update-notifier-
|
|
1
|
+
import{n as e}from"../update-notifier-BGQNWIvh.mjs";const[t,n]=process.argv.slice(2);try{await e(t,new URL(n))}catch{}export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{t as SvelteKitAdapter}from"./sveltekit-DCytYnBb.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{$t as e,Qt as t,_ as n,d as r,gn as i,s as a,t as o,u as s,x as c}from"./adapters-C-tqRizJ.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';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Qt as e,_ as t,d as n,s as r,u as i,x as a}from"./adapters-C-tqRizJ.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-DCytYnBb.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';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./package-
|
|
1
|
+
import{n as e}from"./package-CR69YEZ6.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.
|
|
3
|
+
"version": "1.29.0",
|
|
4
4
|
"description": "Prismic's official command line tool",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"prismic",
|
|
@@ -39,16 +39,16 @@
|
|
|
39
39
|
"@napi-rs/keyring": "^2.1.2"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@anthropic-ai/claude-agent-sdk": "^0.3.
|
|
43
|
-
"@openai/codex-sdk": "^0.167.
|
|
42
|
+
"@anthropic-ai/claude-agent-sdk": "^0.3.323",
|
|
43
|
+
"@openai/codex-sdk": "^0.167.2",
|
|
44
44
|
"@prismicio/types-internal": "4.7.0",
|
|
45
45
|
"@types/node": "26.6.6",
|
|
46
46
|
"change-case": "5.4.4",
|
|
47
47
|
"dedent": "^1.7.2",
|
|
48
48
|
"detect-indent": "^7.0.2",
|
|
49
49
|
"github-slugger": "2.0.0",
|
|
50
|
-
"oxfmt": "^0.
|
|
51
|
-
"oxlint": "1.
|
|
50
|
+
"oxfmt": "^0.78.0",
|
|
51
|
+
"oxlint": "1.93.0",
|
|
52
52
|
"prismic-ts-codegen": "^0.1.31",
|
|
53
53
|
"tinyexec": "^1.3.1",
|
|
54
54
|
"tinyglobby": "^0.2.17",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=`prismic`,t=`1.28.0`;export{t as n,e as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{t as SvelteKitAdapter}from"./sveltekit-BvwbM55F.mjs";
|