prismic 1.12.2-pr.217.01acb9b → 1.12.2-pr.217.7336ffd

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/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{A as e,C as t,D as n,E as r,F as i,L as a,M as o,N as s,P as c,S as l,T as u,_ as d,a as f,c as p,d as m,f as h,g,h as ee,i as _,j as te,k as v,l as y,m as b,n as x,o as ne,p as re,r as ie,s as ae,t as oe,w as S,x as se,y as ce}from"./core-Dzm5w89l.mjs";import{n as le,t as ue}from"./package-BhJjBm_V.mjs";import{A as de,C as fe,D as pe,E as me,N as he,O as C,S as ge,T as w,a as T,b as _e,c as ve,d as ye,h as be,i as xe,m as Se,n as Ce,o as E,p as we,r as D,s as O,t as Te,u as Ee,v as De,w as Oe,y as ke}from"./request-Dtd3MvMj.mjs";import{a as Ae,c as je,o as Me,s as Ne}from"./packageJson-DuN38oFo.mjs";import{a as Pe,c as Fe,i as k,l as Ie,n as Le,r as A,s as Re,t as ze,u as j}from"./auth-t8Ao2K5y.mjs";import{i as Be,r as Ve,t as He}from"./segment-o0v3YJDx.mjs";import{t as Ue}from"./update-notifier-BFo6lfdc.mjs";import*as We from"node:util";import{parseArgs as Ge,promisify as Ke}from"node:util";import{realpath as qe}from"node:fs/promises";import{fileURLToPath as Je,pathToFileURL as Ye}from"node:url";import{createHash as Xe}from"node:crypto";import{dirname as Ze,join as Qe,posix as $e,sep as et}from"node:path";import{exec as tt,execFile as nt}from"node:child_process";import{Readable as rt}from"node:stream";import{createInterface as it}from"node:readline";import*as at from"node:http";import*as M from"node:os";import{homedir as ot}from"node:os";import{setTimeout as st}from"node:timers/promises";import{isMainThread as ct,threadId as lt}from"worker_threads";import*as ut from"node:diagnostics_channel";import{subscribe as dt}from"node:diagnostics_channel";import{createReadStream as ft,existsSync as pt,readFile as mt,readFileSync as ht,readdir as gt}from"node:fs";import{Worker as _t}from"node:worker_threads";import*as vt from"node:https";import{createGzip as yt}from"node:zlib";import*as bt from"node:net";import*as xt from"node:tls";import{AsyncLocalStorage as St}from"node:async_hooks";const Ct=w({email:C(),shortId:C(),intercomHash:C(),repositories:De(w({domain:C(),name:me(C()),role:me(de([C(),pe(C(),C())]))}))});async function wt(e){let{token:t,host:n}=e,r=Tt(n);return await E(new URL(`profile`,r),{credentials:{"prismic-auth":t},schema:Ct})}function Tt(e){return new URL(`https://user-service.${e}/`)}function N(e,t){return async function(){let{positionals:n={},options:r={}}=e,i=e.name.split(` `).length,a=process.argv.slice(1+i),o=Object.keys(n).length>0,s=Ge({args:a,options:{...r,help:{type:`boolean`,short:`h`}},allowPositionals:o,strict:!0});if(s.values.help){console.info(Et(e));return}for(let[e,[t,r]]of Object.entries(n).entries())if(r.required&&!s.positionals[e])throw new F(`Missing required argument: <${t}>`);for(let[e,t]of Object.entries(r))if(t.required&&!(e in s.values))throw new F(`Missing required option: --${e}`);await t(s)}}function Et(e){let{description:t,sections:n,positionals:r={},options:i}=e,a=Object.keys(r),o=[p(t)];o.push(``),o.push(`USAGE`);let s=` ${e.name}`;if(a.length>0&&(s+=` `+a.map(e=>`<${e}>`).join(` `)),s+=` [options]`,o.push(s),a.length>0){o.push(``),o.push(`ARGUMENTS`);let e=[];for(let t in r){let n=r[t],i=n.description+(n.required?` (required)`:``);e.push([` <${t}>`,i])}o.push(y(e))}o.push(``),o.push(`OPTIONS`);let c=[];if(i){let e=Object.keys(i);for(let t of e){let e=i[t],n=`${e.short?`-${e.short}, `:` `}--${t}${e.type===`string`?` string`:``}`,r=e.description+(e.required?` (required)`:``);c.push({left:n,description:r})}}c.push({left:`-h, --help`,description:`Show help for command`});let l=c.map(e=>[` ${e.left}`,e.description]);if(o.push(y(l)),n)for(let e in n){let t=p(n[e]);o.push(``),o.push(e);for(let e of t.split(`
2
+ import{A as e,C as t,D as n,E as r,F as i,L as a,M as o,N as s,P as c,S as l,T as u,_ as d,a as f,c as p,d as m,f as h,g,h as ee,i as _,j as te,k as v,l as y,m as b,n as x,o as ne,p as re,r as ie,s as ae,t as oe,w as S,x as se,y as ce}from"./core-Dzm5w89l.mjs";import{n as le,t as ue}from"./package-NWPx2xrA.mjs";import{A as de,C as fe,D as pe,E as me,N as he,O as C,S as ge,T as w,a as T,b as _e,c as ve,d as ye,h as be,i as xe,m as Se,n as Ce,o as E,p as we,r as D,s as O,t as Te,u as Ee,v as De,w as Oe,y as ke}from"./request-Dtd3MvMj.mjs";import{a as Ae,c as je,o as Me,s as Ne}from"./packageJson-DuN38oFo.mjs";import{a as Pe,c as Fe,i as k,l as Ie,n as Le,r as A,s as Re,t as ze,u as j}from"./auth-t8Ao2K5y.mjs";import{i as Be,r as Ve,t as He}from"./segment-ITLf4G86.mjs";import{t as Ue}from"./update-notifier-M-k2PrUj.mjs";import*as We from"node:util";import{parseArgs as Ge,promisify as Ke}from"node:util";import{realpath as qe}from"node:fs/promises";import{fileURLToPath as Je,pathToFileURL as Ye}from"node:url";import{createHash as Xe}from"node:crypto";import{dirname as Ze,join as Qe,posix as $e,sep as et}from"node:path";import{exec as tt,execFile as nt}from"node:child_process";import{Readable as rt}from"node:stream";import{createInterface as it}from"node:readline";import*as at from"node:http";import*as M from"node:os";import{homedir as ot}from"node:os";import{setTimeout as st}from"node:timers/promises";import{isMainThread as ct,threadId as lt}from"worker_threads";import*as ut from"node:diagnostics_channel";import{subscribe as dt}from"node:diagnostics_channel";import{createReadStream as ft,existsSync as pt,readFile as mt,readFileSync as ht,readdir as gt}from"node:fs";import{Worker as _t}from"node:worker_threads";import*as vt from"node:https";import{createGzip as yt}from"node:zlib";import*as bt from"node:net";import*as xt from"node:tls";import{AsyncLocalStorage as St}from"node:async_hooks";const Ct=w({email:C(),shortId:C(),intercomHash:C(),repositories:De(w({domain:C(),name:me(C()),role:me(de([C(),pe(C(),C())]))}))});async function wt(e){let{token:t,host:n}=e,r=Tt(n);return await E(new URL(`profile`,r),{credentials:{"prismic-auth":t},schema:Ct})}function Tt(e){return new URL(`https://user-service.${e}/`)}function N(e,t){return async function(){let{positionals:n={},options:r={}}=e,i=e.name.split(` `).length,a=process.argv.slice(1+i),o=Object.keys(n).length>0,s=Ge({args:a,options:{...r,help:{type:`boolean`,short:`h`}},allowPositionals:o,strict:!0});if(s.values.help){console.info(Et(e));return}for(let[e,[t,r]]of Object.entries(n).entries())if(r.required&&!s.positionals[e])throw new F(`Missing required argument: <${t}>`);for(let[e,t]of Object.entries(r))if(t.required&&!(e in s.values))throw new F(`Missing required option: --${e}`);await t(s)}}function Et(e){let{description:t,sections:n,positionals:r={},options:i}=e,a=Object.keys(r),o=[p(t)];o.push(``),o.push(`USAGE`);let s=` ${e.name}`;if(a.length>0&&(s+=` `+a.map(e=>`<${e}>`).join(` `)),s+=` [options]`,o.push(s),a.length>0){o.push(``),o.push(`ARGUMENTS`);let e=[];for(let t in r){let n=r[t],i=n.description+(n.required?` (required)`:``);e.push([` <${t}>`,i])}o.push(y(e))}o.push(``),o.push(`OPTIONS`);let c=[];if(i){let e=Object.keys(i);for(let t of e){let e=i[t],n=`${e.short?`-${e.short}, `:` `}--${t}${e.type===`string`?` string`:``}`,r=e.description+(e.required?` (required)`:``);c.push({left:n,description:r})}}c.push({left:`-h, --help`,description:`Show help for command`});let l=c.map(e=>[` ${e.left}`,e.description]);if(o.push(y(l)),n)for(let e in n){let t=p(n[e]);o.push(``),o.push(e);for(let e of t.split(`
3
3
  `))o.push(e?` ${e}`:``)}o.push(``),o.push(`LEARN MORE`);let u=e.name.split(` `)[0];return o.push(` Use \`${u} <command> --help\` for more information about a command.`),o.join(`
4
4
  `)}function P(e){let t=e.name.split(` `).length;return async function(){let{positionals:[n]}=Ge({args:process.argv.slice(1+t),options:{help:{type:`boolean`,short:`h`}},allowPositionals:!0,strict:!1}),r=n?e.commands[n]:void 0;if(r){await r.handler();return}if(n)throw new F(`Unknown command: ${n}`);console.info(Dt(e))}}function Dt(e){let{name:t,description:n,sections:r,commands:i}=e,a=[n];a.push(``),a.push(`USAGE`),a.push(` ${t} <command> [options]`),a.push(``),a.push(`COMMANDS`);let o=Object.entries(i).map(([e,t])=>[` ${e}`,t.description]);if(a.push(y(o)),a.push(``),a.push(`OPTIONS`),a.push(` -h, --help Show help for command`),r)for(let e in r){let t=p(r[e]);a.push(``),a.push(e);for(let e of t.split(`
5
5
  `))a.push(e?` ${e}`:``)}return a.push(``),a.push(`LEARN MORE`),a.push(` Use \`${t} <command> --help\` for more information about a command.`),a.join(`
@@ -0,0 +1 @@
1
+ var e=`prismic`,t=`1.12.2-pr.217.7336ffd`;export{t as n,e as t};
@@ -1 +1 @@
1
- import{n as e,t}from"./package-BhJjBm_V.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
+ import{n as e,t}from"./package-NWPx2xrA.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{n as e}from"../segment-o0v3YJDx.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
+ import{n as e}from"../segment-ITLf4G86.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-DuN38oFo.mjs";import{n as e}from"../update-notifier-BFo6lfdc.mjs";const[t,n]=process.argv.slice(2);try{await e(t,new URL(n))}catch{}export{};
1
+ import"../packageJson-DuN38oFo.mjs";import{n as e}from"../update-notifier-M-k2PrUj.mjs";const[t,n]=process.argv.slice(2);try{await e(t,new URL(n))}catch{}export{};
@@ -1 +1 @@
1
- import{n as e}from"./package-BhJjBm_V.mjs";import{E as t,N as n,O as r,S as i,s as a,w as o}from"./request-Dtd3MvMj.mjs";import{i as s}from"./packageJson-DuN38oFo.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=i({latestKnownVersion:t(r()),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};
1
+ import{n as e}from"./package-NWPx2xrA.mjs";import{E as t,N as n,O as r,S as i,s as a,w as o}from"./request-Dtd3MvMj.mjs";import{i as s}from"./packageJson-DuN38oFo.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=i({latestKnownVersion:t(r()),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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prismic",
3
- "version": "1.12.2-pr.217.01acb9b",
3
+ "version": "1.12.2-pr.217.7336ffd",
4
4
  "description": "Prismic's official command line tool",
5
5
  "keywords": [
6
6
  "prismic",
@@ -1 +0,0 @@
1
- var e=`prismic`,t=`1.12.2-pr.217.01acb9b`;export{t as n,e as t};