@npayload/sdk 5.0.5 → 5.1.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.
Files changed (48) hide show
  1. package/dist/chunk-2G46BKEC.mjs +1 -0
  2. package/dist/{chunk-KUJJYP3K.mjs → chunk-2WG7FETK.mjs} +1 -1
  3. package/dist/chunk-5R5L7GTT.mjs +17 -0
  4. package/dist/{chunk-PYLSDRRO.mjs → chunk-6R2QLUWE.mjs} +2 -2
  5. package/dist/chunk-7IFTQ52O.mjs +1 -0
  6. package/dist/chunk-7QTR5IWG.mjs +1 -0
  7. package/dist/{chunk-UJP3Q23X.mjs → chunk-AECDYMA2.mjs} +1 -1
  8. package/dist/{chunk-455C67EN.mjs → chunk-AGDMCMF3.mjs} +1 -1
  9. package/dist/chunk-C5EDDEPR.mjs +1 -0
  10. package/dist/{chunk-6BBB7BRP.mjs → chunk-CDA75PLA.mjs} +1 -1
  11. package/dist/{chunk-JUXYOKI2.mjs → chunk-CFM43QNN.mjs} +4 -4
  12. package/dist/{chunk-UNDT7J2V.mjs → chunk-GG7UQYUV.mjs} +1 -1
  13. package/dist/{chunk-FAO3QJC5.mjs → chunk-HX6PH7C3.mjs} +1 -1
  14. package/dist/{chunk-IK32U5FV.mjs → chunk-IH2OLS7G.mjs} +1 -1
  15. package/dist/{chunk-5WGVEULS.mjs → chunk-K3YY77PG.mjs} +1 -1
  16. package/dist/{chunk-CWBN2DOO.mjs → chunk-KQCX2PCW.mjs} +1 -1
  17. package/dist/{chunk-I7YPDC7V.mjs → chunk-LCUELOEE.mjs} +1 -1
  18. package/dist/{chunk-2XQXDEXA.mjs → chunk-M7WGBUJ2.mjs} +1 -1
  19. package/dist/{chunk-LVVHOJLW.mjs → chunk-N6NIJISZ.mjs} +1 -1
  20. package/dist/chunk-ONTNXGOM.mjs +1 -0
  21. package/dist/{chunk-HTQLUO4J.mjs → chunk-ORT5FUFW.mjs} +1 -1
  22. package/dist/chunk-R6DPWMZM.mjs +1 -0
  23. package/dist/{chunk-MPYL6HQR.mjs → chunk-STS7CL74.mjs} +1 -1
  24. package/dist/{chunk-A7HA64P6.mjs → chunk-TUWFD3AZ.mjs} +1 -1
  25. package/dist/chunk-UDLS46F5.mjs +1 -0
  26. package/dist/{chunk-QGH4LHSH.mjs → chunk-VZT7RCAC.mjs} +3 -3
  27. package/dist/{chunk-SRQQNHSX.mjs → chunk-WOMYXKGW.mjs} +3 -3
  28. package/dist/{chunk-K3SNPW2B.mjs → chunk-X3CZMXOZ.mjs} +1 -1
  29. package/dist/{chunk-P5GCOROB.mjs → chunk-YFFHEYYK.mjs} +1 -1
  30. package/dist/chunk-YHUBO6K4.mjs +1 -0
  31. package/dist/{chunk-QHGF2GC6.mjs → chunk-YLV3KSNV.mjs} +1 -1
  32. package/dist/{chunk-MW4TLR2T.mjs → chunk-ZDOLKWQD.mjs} +1 -1
  33. package/dist/cli/index.js +247 -272
  34. package/dist/cli/index.mjs +177 -202
  35. package/dist/index.d.mts +4795 -1890
  36. package/dist/index.d.ts +4795 -1890
  37. package/dist/index.js +2 -2
  38. package/dist/index.mjs +2 -2
  39. package/package.json +1 -1
  40. package/dist/chunk-5KFQTEH3.mjs +0 -1
  41. package/dist/chunk-6HF3N3NR.mjs +0 -1
  42. package/dist/chunk-6ITUDSL7.mjs +0 -17
  43. package/dist/chunk-APBVAT7F.mjs +0 -1
  44. package/dist/chunk-CNAIHF3M.mjs +0 -1
  45. package/dist/chunk-I3UZ2FRE.mjs +0 -1
  46. package/dist/chunk-JNYV4RW3.mjs +0 -1
  47. package/dist/chunk-O7HHWVMT.mjs +0 -1
  48. package/dist/chunk-X3VVI7V3.mjs +0 -1
@@ -1,5 +1,5 @@
1
- import{a as g}from"./chunk-4NWQCPI4.mjs";import{c as p,f}from"./chunk-2XQXDEXA.mjs";import{h as d}from"./chunk-UJP3Q23X.mjs";import{a as c}from"./chunk-LJNU5QHZ.mjs";import a from"chalk";function u(){let e=new Set;for(let t of[p,g,f])for(let o of Object.values(t))for(let n of Object.values(o.ops))for(let s of n.scopes??[])e.add(s);return e.add("account:read"),e.add("account:write"),[...e].sort()}c(u,"reconcileOpScopes");function m(e){return[...new Set([...e,...u()])].sort()}c(m,"computePushGrant");async function O(e,t,o){if(!t){o(a.dim(` (credential scopes not synced \u2014 no app id on this run)
2
- `));return}try{let{restoreSession:n}=await import("./chunk-I3UZ2FRE.mjs"),s=await n();if(!s){o(a.dim(" (credential scopes not synced \u2014 run `npayload login` once to let push manage them)\n"));return}let r=m(e),l=(await s.provisionOac(null,t,!1,r)).allowedScopes?.length??r.length;o(a.dim(` credential scopes \u2014 synced to the config (${l} per-object scope(s))
1
+ import{a as g}from"./chunk-4NWQCPI4.mjs";import{c as p,f}from"./chunk-M7WGBUJ2.mjs";import{h as d}from"./chunk-AECDYMA2.mjs";import{a as c}from"./chunk-LJNU5QHZ.mjs";import a from"chalk";function u(){let e=new Set;for(let t of[p,g,f])for(let o of Object.values(t))for(let n of Object.values(o.ops))for(let s of n.scopes??[])e.add(s);return e.add("account:read"),e.add("account:write"),[...e].sort()}c(u,"reconcileOpScopes");function m(e){return[...new Set([...e,...u()])].sort()}c(m,"computePushGrant");async function O(e,t,o){if(!t){o(a.dim(` (credential scopes not synced \u2014 no app id on this run)
2
+ `));return}try{let{restoreSession:n}=await import("./chunk-7QTR5IWG.mjs"),s=await n();if(!s){o(a.dim(" (credential scopes not synced \u2014 run `npayload login` once to let push manage them)\n"));return}let r=m(e),l=(await s.provisionOac(null,t,!1,r)).allowedScopes?.length??r.length;o(a.dim(` credential scopes \u2014 synced to the config (${l} per-object scope(s))
3
3
  `))}catch(n){d(n);let s=n instanceof Error?n.message:String(n);o(a.yellow(` (credential scopes not synced: ${s} \u2014 config is applied; re-run \`npayload push\` after \`npayload login\`)
4
- `))}}c(O,"syncCredentialScopes");async function R(e,t,o=()=>{}){let n=[...new Set(e)].sort(),{restoreSession:s}=await import("./chunk-I3UZ2FRE.mjs"),r=await s();if(!r)throw new Error("declared [access_scopes] sync needs the human management session \u2014 run `npayload login` (a machine credential can never widen its own grant).");let i=await r.provisionOac(null,t,!1,n),l=i.allowedScopes?.length??n.length;return o(a.dim(` credential scopes \u2014 grant set-equal to the manifest (${l} scope(s))
4
+ `))}}c(O,"syncCredentialScopes");async function R(e,t,o=()=>{}){let n=[...new Set(e)].sort(),{restoreSession:s}=await import("./chunk-7QTR5IWG.mjs"),r=await s();if(!r)throw new Error("declared [access_scopes] sync needs the human management session \u2014 run `npayload login` (a machine credential can never widen its own grant).");let i=await r.provisionOac(null,t,!1,n),l=i.allowedScopes?.length??n.length;return o(a.dim(` credential scopes \u2014 grant set-equal to the manifest (${l} scope(s))
5
5
  `)),{allowedScopes:i.allowedScopes??n}}c(R,"syncExactGrant");export{u as a,m as b,O as c,R as d};
@@ -1,4 +1,4 @@
1
- import{a as p}from"./chunk-UNDT7J2V.mjs";import{a as l,b as m}from"./chunk-IK32U5FV.mjs";import"./chunk-SRQQNHSX.mjs";import"./chunk-MW4TLR2T.mjs";import{l as i,o as c}from"./chunk-JUXYOKI2.mjs";import"./chunk-TQFAYJEP.mjs";import"./chunk-4NWQCPI4.mjs";import"./chunk-FAO3QJC5.mjs";import"./chunk-455C67EN.mjs";import"./chunk-CJDCY2NH.mjs";import"./chunk-2XQXDEXA.mjs";import"./chunk-XLK55DEY.mjs";import"./chunk-LVVHOJLW.mjs";import"./chunk-I7YPDC7V.mjs";import"./chunk-OA73YMB6.mjs";import"./chunk-P5GCOROB.mjs";import"./chunk-UJP3Q23X.mjs";import"./chunk-QGH4LHSH.mjs";import"./chunk-GGXNXM73.mjs";import{a as n}from"./chunk-LJNU5QHZ.mjs";var r=class extends Error{static{n(this,"ScopeFloorError")}gap;constructor(t){super(`npayload.toml [access_scopes] does not cover the required scope floor \u2014 ${t.length} scope(s) missing:
1
+ import{a as p}from"./chunk-GG7UQYUV.mjs";import{a as l,b as m}from"./chunk-IH2OLS7G.mjs";import"./chunk-WOMYXKGW.mjs";import"./chunk-ZDOLKWQD.mjs";import{l as i,o as c}from"./chunk-CFM43QNN.mjs";import"./chunk-TQFAYJEP.mjs";import"./chunk-4NWQCPI4.mjs";import"./chunk-HX6PH7C3.mjs";import"./chunk-AGDMCMF3.mjs";import"./chunk-CJDCY2NH.mjs";import"./chunk-M7WGBUJ2.mjs";import"./chunk-XLK55DEY.mjs";import"./chunk-N6NIJISZ.mjs";import"./chunk-LCUELOEE.mjs";import"./chunk-OA73YMB6.mjs";import"./chunk-YFFHEYYK.mjs";import"./chunk-AECDYMA2.mjs";import"./chunk-VZT7RCAC.mjs";import"./chunk-GGXNXM73.mjs";import{a as n}from"./chunk-LJNU5QHZ.mjs";var r=class extends Error{static{n(this,"ScopeFloorError")}gap;constructor(t){super(`npayload.toml [access_scopes] does not cover the required scope floor \u2014 ${t.length} scope(s) missing:
2
2
  ${t.join(`
3
3
  `)}
4
4
  Run \`npayload scopes fix\` to append exactly these to the manifest.`),this.name="ScopeFloorError",this.gap=t}},s=class extends Error{static{n(this,"ScopeDriftError")}diff;constructor(t){super(`The remote grant has drifted from the manifest \u2014 refusing to overwrite it silently.
@@ -1 +1 @@
1
- import{T as t,U as f}from"./chunk-QGH4LHSH.mjs";import{a as s}from"./chunk-LJNU5QHZ.mjs";function l(e){let r=f(e.edge),a=r!==void 0,n=r??(e.npp&&e.guard.production?t:void 0);if(n===void 0&&!e.npp)return{named:!1};for(let d of e.provisioning??[]){let i=e.guard.refusal(d);if(i!==void 0)return{named:a,refusal:i}}if(n===void 0){let d=e.guard.noEdge();return d===void 0?{named:!1}:{named:!1,refusal:d}}let o=e.guard.refusal(n);return o===void 0?{edgeUrl:n,named:a}:{named:a,refusal:o}}s(l,"resolveEdge");export{l as a};
1
+ import{T as t,U as f}from"./chunk-VZT7RCAC.mjs";import{a as s}from"./chunk-LJNU5QHZ.mjs";function l(e){let r=f(e.edge),a=r!==void 0,n=r??(e.npp&&e.guard.production?t:void 0);if(n===void 0&&!e.npp)return{named:!1};for(let d of e.provisioning??[]){let i=e.guard.refusal(d);if(i!==void 0)return{named:a,refusal:i}}if(n===void 0){let d=e.guard.noEdge();return d===void 0?{named:!1}:{named:!1,refusal:d}}let o=e.guard.refusal(n);return o===void 0?{edgeUrl:n,named:a}:{named:a,refusal:o}}s(l,"resolveEdge");export{l as a};
@@ -0,0 +1 @@
1
+ import{l as a,m as b}from"./chunk-5R5L7GTT.mjs";import"./chunk-CFM43QNN.mjs";import"./chunk-TQFAYJEP.mjs";import"./chunk-4NWQCPI4.mjs";import"./chunk-CJDCY2NH.mjs";import"./chunk-M7WGBUJ2.mjs";import"./chunk-XLK55DEY.mjs";import"./chunk-N6NIJISZ.mjs";import"./chunk-LCUELOEE.mjs";import"./chunk-OA73YMB6.mjs";import"./chunk-YFFHEYYK.mjs";import"./chunk-AECDYMA2.mjs";import"./chunk-VZT7RCAC.mjs";import"./chunk-GGXNXM73.mjs";import"./chunk-LJNU5QHZ.mjs";export{a as buildReport,b as registerDoctor};
@@ -1 +1 @@
1
- import{b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h}from"./chunk-LVVHOJLW.mjs";import"./chunk-QGH4LHSH.mjs";import"./chunk-GGXNXM73.mjs";import"./chunk-LJNU5QHZ.mjs";export{a as CliError,h as failWith,c as failureReceiptLines,e as failureText,f as isNetworkFailure,b as renderError,g as unreachableText,d as withFailureReceipt};
1
+ import{b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h}from"./chunk-N6NIJISZ.mjs";import"./chunk-VZT7RCAC.mjs";import"./chunk-GGXNXM73.mjs";import"./chunk-LJNU5QHZ.mjs";export{a as CliError,h as failWith,c as failureReceiptLines,e as failureText,f as isNetworkFailure,b as renderError,g as unreachableText,d as withFailureReceipt};
@@ -1 +1 @@
1
- import{F as i,G as c}from"./chunk-JUXYOKI2.mjs";import{a as e,b as n,c as t}from"./chunk-FAO3QJC5.mjs";import{a as o}from"./chunk-LJNU5QHZ.mjs";var a={events:e,pipes:n,primus:t};async function u(){let s=new Set;for(let[f,p]of Object.entries(a)){let r=i(f);if(!r)continue;let g=await c(r);for(let m of p(g))s.add(m)}return[...s].sort()}o(u,"projectAllPermissions");export{u as a};
1
+ import{F as i,G as c}from"./chunk-CFM43QNN.mjs";import{a as e,b as n,c as t}from"./chunk-HX6PH7C3.mjs";import{a as o}from"./chunk-LJNU5QHZ.mjs";var a={events:e,pipes:n,primus:t};async function u(){let s=new Set;for(let[f,p]of Object.entries(a)){let r=i(f);if(!r)continue;let g=await c(r);for(let m of p(g))s.add(m)}return[...s].sort()}o(u,"projectAllPermissions");export{u as a};