@ppdostudio/ppdo-cli 1.0.0-beta.0 → 1.0.0-beta.1
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/CHANGELOG.md +66 -54
- package/LICENSE +114 -114
- package/README.md +362 -331
- package/dist/bin.js +2 -2
- package/dist/chunks/{ado-NLCWVIVQ.js → ado-XAHQWYNQ.js} +6 -6
- package/dist/chunks/{api-T5SWGOFX.js → api-7RAWLIQV.js} +1 -1
- package/dist/chunks/{api-YKKPVMTX.js → api-KN24TLH6.js} +1 -1
- package/dist/chunks/auth-VZSJMSMF.js +6 -0
- package/dist/chunks/azCli-AEZK2RBQ.js +2 -0
- package/dist/chunks/{batch-GCXLGQET.js → batch-EZPKLWEI.js} +1 -1
- package/dist/chunks/{build-XDCWMEEL.js → build-LSQEAEFK.js} +3 -3
- package/dist/chunks/{bulk-5QO343HO.js → bulk-7FZCDH5U.js} +1 -1
- package/dist/chunks/chunk-4KP27OCL.js +2 -0
- package/dist/chunks/chunk-B4FPKDMH.js +2 -0
- package/dist/chunks/chunk-BCAXUZIO.js +2 -0
- package/dist/chunks/{chunk-X7VWUI6N.js → chunk-BODUSF3V.js} +1 -1
- package/dist/chunks/{chunk-WXCLWAE2.js → chunk-DVQ7OYIJ.js} +1 -1
- package/dist/chunks/chunk-H4OY4EFC.js +3 -0
- package/dist/chunks/chunk-HIW2K6OP.js +4 -0
- package/dist/chunks/{chunk-GT52BRS2.js → chunk-I3TMFYRJ.js} +18 -18
- package/dist/chunks/{chunk-PDFXH652.js → chunk-KBQYSAJX.js} +1 -1
- package/dist/chunks/chunk-LB7WNZVK.js +5 -0
- package/dist/chunks/{chunk-J777TCSE.js → chunk-LL4XQ3L7.js} +1 -1
- package/dist/chunks/chunk-MBNUMAAZ.js +2 -0
- package/dist/chunks/{chunk-5KZDCOFA.js → chunk-MGZDEW3X.js} +1 -1
- package/dist/chunks/chunk-MK6QZ4ES.js +2 -0
- package/dist/chunks/chunk-MZEUD7ET.js +6 -0
- package/dist/chunks/{chunk-JGLUQBCK.js → chunk-OXZG44O5.js} +1 -1
- package/dist/chunks/{chunk-UWFDJKOJ.js → chunk-PYTSDUPY.js} +1 -1
- package/dist/chunks/{chunk-QE4DELWW.js → chunk-RC5VPVGC.js} +1 -1
- package/dist/chunks/chunk-STWQDANK.js +5 -0
- package/dist/chunks/{chunk-HLE2WURE.js → chunk-TADCW6ZI.js} +1 -1
- package/dist/chunks/{chunk-XL7E7LX5.js → chunk-TM3M633T.js} +2 -2
- package/dist/chunks/{chunk-UKKSN4F7.js → chunk-TXVNEV3M.js} +1 -1
- package/dist/chunks/{chunk-UYDBLVAM.js → chunk-WMDKJRDC.js} +1 -1
- package/dist/chunks/{chunk-NNHEYYF5.js → chunk-WNQERCOO.js} +1 -1
- package/dist/chunks/{commands-GHYN6GZT.js → commands-GRWX32IX.js} +1 -1
- package/dist/chunks/{component-PAASRIK6.js → component-TCL43QXZ.js} +1 -1
- package/dist/chunks/config-UKI5TBH5.js +2 -0
- package/dist/chunks/{connection-IWFELK5W.js → connection-QNXMJGHZ.js} +1 -1
- package/dist/chunks/{connref-ZDY7JYK5.js → connref-U3CMQ64O.js} +1 -1
- package/dist/chunks/{customizations-IE2KO275.js → customizations-VNEASPWI.js} +2 -2
- package/dist/chunks/{dependency-EFDSIKSN.js → dependency-U6OQA5PS.js} +1 -1
- package/dist/chunks/{discovery-XXVLVHD6.js → discovery-IWAWXXWF.js} +1 -1
- package/dist/chunks/{dv-3OESFBNW.js → dv-C45WDXRG.js} +21 -21
- package/dist/chunks/{env-MZPI3UA2.js → env-GL5ZPAZI.js} +1 -1
- package/dist/chunks/{environment-NUQHU74A.js → environment-FPS4AFM5.js} +1 -1
- package/dist/chunks/{environments-WMBLSAQF.js → environments-VZWNFJYE.js} +1 -1
- package/dist/chunks/{envvar-YN35IDWJ.js → envvar-52V6K6LF.js} +1 -1
- package/dist/chunks/{fanout-DUP5CD5X.js → fanout-Q3656CCP.js} +1 -1
- package/dist/chunks/{fetchxml-ONTNTA6Z.js → fetchxml-FWUQZP4M.js} +1 -1
- package/dist/chunks/{functions-K5TYRB2C.js → functions-SNCK2IYV.js} +1 -1
- package/dist/chunks/{graph-JI23YQB5.js → graph-OK24IOUV.js} +1 -1
- package/dist/chunks/{group-DKEPSVRV.js → group-TLGLTTUG.js} +2 -2
- package/dist/chunks/{history-SNSJRV6B.js → history-67SQS54S.js} +1 -1
- package/dist/chunks/identity-SRTOEQVC.js +2 -0
- package/dist/chunks/{jobs-PXNJFWWF.js → jobs-2ZPBDDHT.js} +1 -1
- package/dist/chunks/{lifecycle-7RMWV26J.js → lifecycle-OJRM7K2I.js} +1 -1
- package/dist/chunks/{main-ZVIKC3VA.js → main-HOYSLMHZ.js} +2 -2
- package/dist/chunks/{metadata-74WGGOV5.js → metadata-WYVJ7NP7.js} +1 -1
- package/dist/chunks/{metadataCreate-W3NDI5FB.js → metadataCreate-PBA3KH3A.js} +1 -1
- package/dist/chunks/msalUser-3PBGT655.js +2 -0
- package/dist/chunks/{names-SFYZQY6Q.js → names-ZRM6SAYU.js} +1 -1
- package/dist/chunks/{pack-2UDE25IY.js → pack-3OYGV36R.js} +1 -1
- package/dist/chunks/pat-KGOBISLG.js +2 -0
- package/dist/chunks/{pipelines-O3OYNCHT.js → pipelines-62CVDRXV.js} +1 -1
- package/dist/chunks/{plugins-EUDJ7QIS.js → plugins-SBMDFXVA.js} +1 -1
- package/dist/chunks/{policies-KVPQVUHS.js → policies-BZR5437X.js} +1 -1
- package/dist/chunks/{pools-7H2L4QJC.js → pools-I4NVR67Z.js} +1 -1
- package/dist/chunks/{process-G7LCTGKS.js → process-WS76WV3T.js} +1 -1
- package/dist/chunks/{projects-BHG2B4IX.js → projects-GXIQO7HV.js} +1 -1
- package/dist/chunks/protect-X2J7LU7X.js +2 -0
- package/dist/chunks/provider-FN7TXWRE.js +2 -0
- package/dist/chunks/{prs-NOXIZ7AT.js → prs-F2EVQJRV.js} +1 -1
- package/dist/chunks/{records-TN7ZKUJ7.js → records-7IQET422.js} +1 -1
- package/dist/chunks/run-APD3TRCW.js +2 -0
- package/dist/chunks/{run-MGLIIM7Z.js → run-G2MVOV3C.js} +1 -1
- package/dist/chunks/{run-JYU5BTWN.js → run-H2OLE76P.js} +1 -1
- package/dist/chunks/run-ICS4FNZA.js +3 -0
- package/dist/chunks/run-KP2SNX2A.js +3 -0
- package/dist/chunks/{run-BXFENCN6.js → run-LNEOCXZA.js} +1 -1
- package/dist/chunks/run-SB4QN5Q4.js +2 -0
- package/dist/chunks/run-XRPU3YZF.js +2 -0
- package/dist/chunks/{runtime-VOF7XYXW.js → runtime-MIU5CS5B.js} +1 -1
- package/dist/chunks/{security-FLEAZ4EA.js → security-RC3EI7CZ.js} +1 -1
- package/dist/chunks/{service-V2TQEEID.js → service-4VHAPTA6.js} +1 -1
- package/dist/chunks/{service-4PIAYFYF.js → service-RFKOKM72.js} +1 -1
- package/dist/chunks/services-4BORTJPM.js +2 -0
- package/dist/chunks/{skills-GD6Z6P3R.js → skills-6O2GSTU4.js} +1 -1
- package/dist/chunks/{solution-HF57MP27.js → solution-3WUUDYF3.js} +1 -1
- package/dist/chunks/{solutionExport-TLGHMUM5.js → solutionExport-GTBTHG2D.js} +1 -1
- package/dist/chunks/{solutionfiles-P223QW2J.js → solutionfiles-VWZHFZZ6.js} +1 -1
- package/dist/chunks/spn-2RZJLCML.js +2 -0
- package/dist/chunks/tokenCache-TQFT6LAD.js +2 -0
- package/dist/chunks/{unpack-XZLTBUGC.js → unpack-HUH7OJMP.js} +1 -1
- package/dist/chunks/{users-KFAPPGF4.js → users-JIBQKPYA.js} +1 -1
- package/dist/chunks/{vargroups-33EZAHGZ.js → vargroups-Q2KG7LHR.js} +1 -1
- package/dist/chunks/{whoami-ULK5UMZV.js → whoami-V54TCLT5.js} +1 -1
- package/dist/chunks/{workitems-YGES6KKN.js → workitems-UG5O3EGB.js} +1 -1
- package/package.json +57 -57
- package/schema/ppdo-cli.schema.json +16 -4
- package/skills/ppdo-cli/SKILL.md +1 -1
- package/dist/chunks/auth-IP7AOWSF.js +0 -6
- package/dist/chunks/azCli-T67ZMIC3.js +0 -2
- package/dist/chunks/chunk-3C3GSN3J.js +0 -2
- package/dist/chunks/chunk-4S5ETLH4.js +0 -2
- package/dist/chunks/chunk-5UOZCXQF.js +0 -5
- package/dist/chunks/chunk-BWZ6HZXM.js +0 -2
- package/dist/chunks/chunk-MME53RWW.js +0 -4
- package/dist/chunks/chunk-OP6EXLWQ.js +0 -5
- package/dist/chunks/chunk-RHQP7X6H.js +0 -3
- package/dist/chunks/config-JN3I5EII.js +0 -2
- package/dist/chunks/identity-OW4WCDOA.js +0 -2
- package/dist/chunks/msalUser-JRNX5HPO.js +0 -2
- package/dist/chunks/protect-WZO3MAHF.js +0 -2
- package/dist/chunks/provider-VXRAQRN2.js +0 -2
- package/dist/chunks/run-F6H4QCWR.js +0 -2
- package/dist/chunks/run-HBQCSGYY.js +0 -3
- package/dist/chunks/run-MHM3GTGH.js +0 -2
- package/dist/chunks/run-SRQPP6N3.js +0 -3
- package/dist/chunks/run-ZNDSC7LR.js +0 -2
- package/dist/chunks/services-B6V4VVX5.js +0 -2
- package/dist/chunks/spn-AIUWML5R.js +0 -2
- package/dist/chunks/tokenCache-3LMJRUTI.js +0 -2
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
+
import{F as u,e as w,f as g,z as f}from"./chunk-STWQDANK.js";import"./chunk-TQLZ3TRU.js";import{e as l}from"./chunk-S4KF5Z3S.js";import{b as p}from"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";function r(e){return typeof e=="string"&&e?e:null}async function y(e){let o=await e.config(),s=r(e.args.name);if(s)return[o.identity(s)];let n=r(e.args.env),i=r(e.args.service),t;n?t=[o.environment(n).service]:t=i?[g[i]]:[...w];let c=[];for(let a of t)try{c.push(await f(o,a,n))}catch(m){if(!(m instanceof p)||t.length===1)throw m}if(!c.length)throw new p("no environment selected",{hint:"name an identity, or pass --env <name>"});let d=[];for(let a of c){let[m]=u(o,a,r(e.args.identity));d.some(v=>v.name===m.name)||d.push(m)}return d}async function k(e){let o=await import("./provider-FN7TXWRE.js"),{loginScope:s}=await import("./services-4BORTJPM.js"),n=await e.config(),i=!!(r(e.args.name)||r(e.args.service)),t=[];for(let c of await y(e)){let d=[...n.environments.values()].flatMap(a=>{let m=n.groups.get(a.group);return m?.identity===c.name?[{name:a.name,mode:m.mode}]:[]});t.push(await o.login(c,{deviceCode:!!e.args.deviceCode,scope:s(n,c),force:i,usedBy:d,rt:e,expires:r(e.args.expires),identities:[...n.identities.values()]}))}await e.emit(t.length!==1?t:t[0])}async function I(e){let o=await import("./provider-FN7TXWRE.js"),s=await e.config(),n=r(e.args.name),i;if(e.args.all)i=[...s.identities.values()];else if(n)i=[s.identity(n)];else throw new p("name an identity or pass --all");let t=[];for(let c of i)t.push(await o.logout(c));await e.emit(t.length!==1?t:t[0])}async function x(e){let o=await import("./provider-FN7TXWRE.js"),s=await e.config(),n=r(e.args.name),t=(n?[s.identity(n)]:[...s.identities.values()]).map(c=>o.status(c));await e.emit(n?t[0]:t)}async function E(e){let o=r(e.args.service),s=r(e.args.scope);if(!o&&!s)throw new p("pass --service dv|ado or --scope <scope>");let n=await e.config(),i,t;if(o){let a=await f(n,g[o],r(e.args.env));[i]=u(n,a,r(e.args.identity));let{scopeFor:m}=await import("./services-4BORTJPM.js");t=s??m(a.env)}else{let a=r(e.args.identity);if(!a)throw new p("pass --identity <name> or --service");i=n.identity(a),t=s}if(i.method==="pat")throw new p(`identity '${i.name}' uses an Azure DevOps PAT, which ppdo-cli never prints`,{hint:"ppdo-cli ado commands use it for you"});if(process.stdout.isTTY&&!e.args.show)throw new p("refusing to print a token to the terminal",{hint:"pipe it, or pass --show"});let{getToken:c}=await import("./provider-FN7TXWRE.js"),d=await c(i,t,{log:a=>e.log(a)});process.stdout.write(d+`
|
|
3
|
+
`),e.verbose&&l(`token for ${i.name} (${t})`)}export{k as login,I as logout,x as status,E as token};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
+
import{a as d}from"./chunk-HIW2K6OP.js";import{G as j,e as g,f as S,g as R,i as f,n as l,q as P,r as x,v as w,w as $,z as y}from"./chunk-STWQDANK.js";import"./chunk-LB7WNZVK.js";import"./chunk-TQLZ3TRU.js";import"./chunk-S4KF5Z3S.js";import{b as m}from"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";import{existsSync as O,realpathSync as I,statSync as E,unlinkSync as N,writeFileSync as C}from"node:fs";import{join as k,resolve as F}from"node:path";function u(n){return typeof n=="string"&&n?n:null}function D(n){return{dataverse:u(n.args.dataverse),devopsOrg:u(n.args.devopsOrg),devopsProject:u(n.args.devopsProject)}}function A(n,e){if(e.dataverse&&(e.devopsOrg||e.devopsProject))throw new m("an environment is either Dataverse or DevOps, not both",{hint:"add a second environment for the other service"});if(e.dataverse){if(n.service!=="dataverse")throw new m(`'${n.name}' is a DevOps environment`,{hint:"remove it and add a new one"});n.url=j(e.dataverse)}if(e.devopsOrg||e.devopsProject){if(n.service!=="devops")throw new m(`'${n.name}' is a Dataverse environment`,{hint:"remove it and add a new one"});e.devopsOrg&&(n.org=e.devopsOrg.trim().replace(/^\/+|\/+$/g,"")),e.devopsProject&&(n.project=e.devopsProject.trim())}}function p(n,e){let t=n.groups.get(e.group),o={name:e.name,service:e.service,endpoint:e.endpoint,group:e.group,mode:t?t.mode:null,identity:t?t.identity:null},r=t&&t.identity?n.identities.get(t.identity):void 0;return r&&(o.account=r.username||r.name),o}async function B(n){let e=String(n.args.name),t=String(n.args.in);l(e,"environment");let o=D(n);if(!(o.dataverse||o.devopsOrg))throw new m("pass --dataverse <url>, or --devops-org <org> [--devops-project <project>]");let r=o.dataverse?"dataverse":"devops";await n.emit(await d(e,s=>{if(s.environments.has(e))throw new m(`environment '${e}' already exists`,{hint:`run: ppdo-cli env update ${e} ...`});s.group(t);let a=new P(e,t,r);return A(a,o),s.environments.set(e,a),s.current[r]??=e,p(s,a)}))}async function M(n){let e=String(n.args.name),t=D(n);await n.emit(await d(e,o=>{let r=o.environment(e);return A(r,t),p(o,r)}))}async function q(n){let e=String(n.args.name),t=String(n.args.newName);l(t,"environment");let o=await d(e,a=>{let i=a.environment(e);if(a.environments.has(t))throw new m(`environment '${t}' already exists`);return i.name=t,a.environments=new Map([...a.environments].map(([c,v])=>[c===e?t:c,v])),a.current[i.service]===e&&(a.current[i.service]=t),p(a,i)}),r=await w(),s=r&&Object.values(r[0]).includes(e);await n.emit({renamed:e,...o,...s?{warning:`${r[1]} still names '${e}'`}:{}})}async function z(n){let e=String(n.args.name),t=String(n.args.to);await n.emit(await d(e,o=>{let r=o.environment(e);return o.group(t),r.group=t,p(o,r)}))}async function G(n){let e=await n.config(),t=u(n.args.group);t&&e.group(t);let o=u(n.args.service),r=o?S[o]:void 0,s={};for(let i of g)try{s[i]=(await y(e,i,null)).env.name}catch(c){if(!(c instanceof m))throw c}let a=[];for(let i of e.environments.values())t&&i.group!==t||r&&i.service!==r||a.push({...p(e,i),default:s[i.service]===i.name});await n.emit(a)}async function H(n){let e=await n.config();await n.emit(p(e,e.environment(String(n.args.name))))}async function K(n){let e=String(n.args.name);await n.emit(await d(e,t=>{let o=t.environment(e);return t.current[o.service]=e,{[`current-${o.service}`]:e}}))}async function Q(n){let e=await n.config(),t={};for(let o of g)try{let r=await y(e,o,null);t[o]={env:r.env.name,group:r.group.name,mode:r.mode,source:r.source}}catch(r){if(!(r instanceof m))throw r;t[o]={error:r.message}}await n.emit(t)}function L(n){try{return E(n).isDirectory()}catch{return!1}}function b(n){if(n){let t=F(n);if(!L(t))throw new m(`not a folder: ${n}`);return I.native(t)}let e=$();if(!e)throw new m("not inside a git repo",{hint:"run inside the repo or pass --path <repo>"});return e}async function W(n){let e=await n.config(),t={},o=Array.isArray(n.args.names)?n.args.names:[];for(let i of o){let c=e.environment(i),v=t[c.service];if(v!==void 0)throw new m(`pin one ${R[c.service]} environment, not '${v}' and '${i}'`);t[c.service]=i}let r=k(b(u(n.args.path)),f),s=null;if(O(r)&&E(r).isFile()){let i={};try{i=x(r)??{}}catch{i={}}let c={};for(let v of g){let h=i[v];typeof h=="string"&&(c[v]=h)}t={...c,...t},s=u(i.$schema)}let a=s?{$schema:s}:{};for(let i of g)t[i]!==void 0&&(a[i]=t[i]);C(r,JSON.stringify(a,null,2)+`
|
|
3
|
+
`,"utf8"),await n.emit({pinned:t,file:r})}async function X(n){let e=k(b(u(n.args.path)),f),t=O(e);t&&N(e),await n.emit({removed:t?e:null})}async function Y(n){let e=String(n.args.name);await d(e,r=>{let s=r.environment(e);r.environments.delete(e),r.current[s.service]===e&&delete r.current[s.service]});let t=await w(),o=t&&Object.values(t[0]).includes(e);await n.emit({removed:e,...o?{warning:`${t[1]} still names it`}:{}})}export{B as add,Q as current,p as describe,G as list,z as move,W as pin,Y as remove,q as rename,H as show,X as unpin,M as update,K as use};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import{
|
|
2
|
+
import{A as T,B as C,e as S}from"./chunk-STWQDANK.js";import{b as k,c as O,d as P}from"./chunk-4KP27OCL.js";import{c as J,g as j}from"./chunk-J4R6QXW7.js";import"./chunk-5SBBTR3Y.js";import"./chunk-WMDKJRDC.js";import"./chunk-H4OY4EFC.js";import"./chunk-TQLZ3TRU.js";import{e as x}from"./chunk-S4KF5Z3S.js";import{b as u,d as E,g as q}from"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";var f="graph.microsoft.com";function A(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var h=class extends k{name="graph";scope(){return`https://${f}/.default`}url(e,n){let i=e.includes("://")?e:`https://${f}/v1.0/${e.replace(/^\/+/,"")}`;return n&&n.length&&(i+=(i.includes("?")?"&":"?")+J(n,`$'(),:@"`)),i}allowed(e){let n=j(e);return n.scheme==="https"&&n.host===f}requestId(e){return e.header("request-id")||e.header("client-request-id")}error(e){let n=null,i=null;try{let s=e.json(),o=A(s)&&A(s.error)?s.error:{};n=typeof o.code=="string"?o.code:null,i=typeof o.message=="string"?o.message:null}catch{i=e.text.trim().slice(0,300)||null}return O(this.name,e,n,i,this.requestId(e))}},w=class{constructor(e){this.inner=e}request(e,n,i={}){if(e.toUpperCase()!=="GET")throw new q("blocked: the graph service is read-only",{service:"graph"});return this.inner.request(e,n,i)}paginate(e,n){return this.inner.paginate(e,n)}get identity(){return this.inner.identity??null}};async function b(t){let e=await t.config(),n=t.args,i;if(T(n))i=C(n);else if(typeof n.identity=="string"&&n.identity){let r=e.identities.get(n.identity);if(!r)throw new u(`no identity '${n.identity}'`,{hint:"run: ppdo-cli identity list"});i=r}else{let r,a=n.env;if(typeof a=="string"&&a){if(a.includes(","))throw new u("graph runs against one account: pass one --env, or --identity");r=a}else{let d=S.map(l=>e.current[l]).find(l=>l);if(!d)throw new u("no account to use",{hint:"pass --identity <name> or --env <environment>"});r=d}let p=e.environment(r),m=e.groups.get(p.group);if(!m||!m.identity)throw new u(`environment '${p.name}' has no account`,{hint:"pass --identity <name>"});i=e.identity(m.identity)}let s=new h,{getToken:o}=await import("./provider-FN7TXWRE.js"),c=new P(s,t,r=>o(i,s.scope(),{forceRefresh:r,log:a=>t.log(a)}));return c.identity=i,new w(c)}var R="id,displayName,description,mail,mailEnabled,securityEnabled,groupTypes,membershipRule,createdDateTime";function L(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function $(t){let e=L(t)?t.value:null;return Array.isArray(e)?e:[]}function U(t){return(Array.isArray(t.groupTypes)?t.groupTypes:[]).includes("Unified")?"microsoft365":t.securityEnabled?t.mailEnabled?"mail-enabled-security":"security":"distribution"}function N(t){let e={id:t.id??null,name:t.displayName??null,type:U(t),description:t.description??null,mail:t.mail??null,dynamic:t.membershipRule?!0:null,rule:t.membershipRule??null,created:t.createdDateTime??null};return Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null))}async function F(t,e){if(/^[0-9a-fA-F-]{36}$/.test(e.trim()))return(await t.request("GET",`groups/${e.trim()}`,{params:[["$select",R]]})).json();let n=e.replace(/'/g,"''"),i=$((await t.request("GET","groups",{params:[["$filter",`displayName eq '${n}'`],["$select",R]]})).json());if(!i.length)throw new E(`no Entra group named '${e}'`,{service:"graph",hint:"run: ppdo-cli graph group search <words>"});if(i.length>1)throw new u(`${i.length} groups are named '${e}'; use an id`,{hint:i.map(s=>String(s.id)).join(", ")});return i[0]}async function W(t){let e=t.args,n=await b(t),i=await F(n,String(e.groupRef)),s=String(i.id),o=(await n.request("GET",`groups/${s}/members/$count`,{headers:{ConsistencyLevel:"eventual",Accept:"text/plain"}})).text.trim(),c={...N(i),members_count:/^\d+$/.test(o)?parseInt(o,10):o};if(e.members){let r=e.all?null:typeof e.limit=="number"&&e.limit?e.limit:100,a=[],p=`groups/${s}/members`,m=[["$select","id,displayName,userPrincipalName,mail,appId"],["$top",String(Math.min(r||999,999))]];for(;p&&(r===null||a.length<r);){let g=(await n.request("GET",p,{params:m})).json()??{};for(let y of $(g)){let v=String(y["@odata.type"]??"").split(".").pop()??"",I={name:y.displayName??null,upn:y.userPrincipalName||y.mail||null,type:v==="servicePrincipal"?"service-principal":v,id:y.id??null};a.push(Object.fromEntries(Object.entries(I).filter(([,G])=>G)))}p=typeof g["@odata.nextLink"]=="string"&&g["@odata.nextLink"]?g["@odata.nextLink"]:null,m=null}let d=r!==null&&a.length>r?a.slice(0,r):a,l=c.members_count;r!==null&&typeof l=="number"&&l>d.length&&x(`showing ${d.length} of ${l} members; pass --limit n or --all`),c.members=d}await t.emit(c)}async function X(t){let e=t.args,n=await b(t),i=String(e.text).replace(/"/g,""),s=typeof e.limit=="number"&&e.limit?e.limit:25,o=(await n.request("GET","groups",{params:[["$search",`"displayName:${i}"`],["$select",R],["$top",String(Math.min(s,999))],["$orderby","displayName"]],headers:{ConsistencyLevel:"eventual"}})).json();await t.emit($(o).map(N).slice(0,s))}export{W as get,N as groupRow,X as search};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
+
import{a as c}from"./chunk-HIW2K6OP.js";import{l as f,m as u,n as d,o as l}from"./chunk-STWQDANK.js";import"./chunk-LB7WNZVK.js";import"./chunk-TQLZ3TRU.js";import{e as m}from"./chunk-S4KF5Z3S.js";import{b as o}from"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";var g=["broker","browser","device_code"],w=[["tenant","tenant"],["username","username"],["method","method"],["clientId","clientId"],["configDir","configDir"],["secretEnv","secretEnv"],["certificate","certificate"],["organization","organization"],["patEnv","patEnv"]];function a(e,t){let n=e.args[t];return typeof n=="string"?n:void 0}function h(e){if(e.method==="pat"){v(e);return}if(e.organization||e.patEnv)throw new o("--organization and --pat-env apply to method 'pat' only");if(!e.tenant)throw new o("--tenant is required");if(g.includes(e.method)&&!e.username)throw new o(`--username is required for method '${e.method}'`,{hint:"it pins sign-in to the right account"});if(e.method==="spn"&&!e.clientId)throw new o(`--client-id is required for method '${e.method}'`);if(e.method==="spn"&&!(e.secretEnv||e.certificate))throw new o("method 'spn' needs --secret-env or --certificate");if(e.configDir&&e.method!=="az_cli")throw new o("--config-dir applies to method 'az_cli' only");if((e.secretEnv||e.certificate)&&e.method!=="spn")throw new o("--secret-env and --certificate apply to method 'spn' only");e.method==="broker"&&e.clientId&&m(`warning: identity '${e.name}' uses the broker with a custom client ID; the app must have ms-appx-web://Microsoft.AAD.BrokerPlugin/${e.clientId} registered as a redirect URI`)}function v(e){if(!e.organization)throw new o("--organization is required for method 'pat'",{hint:"a PAT is sent to that one Azure DevOps organization only"});if(!f.test(e.organization))throw new o(`'${e.organization}' is not an Azure DevOps organization name`,{hint:"letters, digits and hyphens, as in https://dev.azure.com/<organization>"});if(!e.username)throw new o("--username is required for method 'pat'",{hint:"the PAT must belong to this account; auth login checks it before it's stored"});if(e.clientId||e.configDir||e.secretEnv||e.certificate)throw new o("--client-id, --config-dir, --secret-env and --certificate don't apply to method 'pat'");if(e.patEnv&&!u.test(e.patEnv))throw new o(`--pat-env '${e.patEnv}' is not an environment variable name`)}async function b(e){let t=String(e.args.name);d(t,"identity");let n=new l(t,{tenant:a(e,"tenant")??"",username:a(e,"username")??null,method:a(e,"method")??"browser",clientId:a(e,"clientId")??null,configDir:a(e,"configDir")??null,secretEnv:a(e,"secretEnv")??null,certificate:a(e,"certificate")??null,organization:a(e,"organization")??null,patEnv:a(e,"patEnv")??null});h(n),await c(t,i=>{if(i.identities.has(t))throw new o(`identity '${t}' already exists`,{hint:`run: ppdo-cli identity update ${t} ...`});i.identities.set(t,n.clone())}),await e.emit({name:t,...n.toDict()})}function y(e){let t=[];for(let[n,i]of w){let s=a(e,n);s!==void 0&&t.push([i,s||null])}return t}function p(e,t){for(let[n,i]of t)n==="tenant"?e.tenant=i??"":n==="method"?e.method=i??"":e[n]=i}async function R(e){let t=String(e.args.name),n=y(e),i=(await e.config()).identity(t).clone();p(i,n),h(i),await e.emit(await c(t,s=>{let r=s.identity(t);return p(r,n),{name:t,...r.toDict()}}))}async function A(e){let t=await e.config();await e.emit([...t.identities.values()].map(n=>({name:n.name,username:n.username,tenant:n.tenant,method:n.method})))}async function S(e){let{filesFor:t}=await import("./tokenCache-TQFT6LAD.js"),n=(await e.config()).identity(String(e.args.name));await e.emit({name:n.name,...n.toDict(),client_id:n.effectiveClientId,cache_files:t(n.name)})}async function _(e){let t=String(e.args.name);await c(t,i=>{i.identity(t);let s=[...i.groups.values()].filter(r=>r.identity===t).map(r=>r.name);if(s.length&&!e.args.force)throw new o(`identity '${t}' is used by group(s): ${s.join(", ")}`,{hint:"update those groups first, or pass --force"});i.identities.delete(t);for(let r of i.groups.values())r.identity===t&&(r.identity=null)});let{deleteAll:n}=await import("./tokenCache-TQFT6LAD.js");await e.emit({removed:t,deleted_files:n(t)})}export{b as add,A as list,_ as remove,S as show,R as update};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
+
import{F as v,e as g,f,z as p}from"./chunk-STWQDANK.js";import"./chunk-TQLZ3TRU.js";import"./chunk-S4KF5Z3S.js";import{a as l,b as u}from"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";function d(e){return typeof e=="string"&&e?e:null}function h(e,s){let t=d(s.args.service),i=t?f[t]:void 0,o=d(s.args.env);if(o){let r=e.environment(o);if(i&&i!==r.service)throw new u(`environment '${o}' is not a ${i} environment`);return[r.service]}return i?[i]:[...g]}async function _(e){let s=await import("./tokenCache-TQFT6LAD.js"),t=await e.config(),i=h(t,e),o={};for(let r of i){let a;try{a=await p(t,r,d(e.args.env))}catch(n){if(!(n instanceof u)||i.length===1)throw n;continue}let c={env:a.env.name,group:a.group.name,mode:a.mode,source:a.source,endpoint:a.env.endpoint};try{let[n,w]=v(t,a,d(e.args.identity)),m;n.method==="pat"?m=(await import("./pat-KGOBISLG.js")).describe(n).signed_in===!0:m=s.accountMatches(s.load(n.name),n)||n.method==="az_cli",Object.assign(c,{identity:n.name,identity_source:w,username:n.username,method:n.method,signed_in:m})}catch(n){if(!(n instanceof l))throw n;c.error=n.message}e.args.check&&"identity"in c&&(c.check=await y(e,r)),o[r]=c}if(!Object.keys(o).length)throw new u("no environment selected",{hint:"pass --env <name>, or run: ppdo-cli env use <name> (see ppdo-cli env list)"});await e.emit(o)}async function y(e,s){try{let t=await e.client(s);if(s==="dataverse"){let r=(await t.request("GET","WhoAmI")).json()??{};return{ok:!0,user_id:r.UserId??null,organization_id:r.OrganizationId??null}}let o=((await t.request("GET","_apis/connectionData",{params:[["api-version","7.1-preview"]]})).json()??{}).authenticatedUser??{};return{ok:!0,user:o.providerDisplayName??null,user_id:o.id??null}}catch(t){if(!(t instanceof l))throw t;return{ok:!1,error:t.message,exit_code:t.exitCode}}}export{_ as whoami};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import{a}from"./chunk-
|
|
2
|
+
import{a}from"./chunk-TM3M633T.js";import"./chunk-S4KF5Z3S.js";import"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";export{a as Runtime};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s}from"./chunk-
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s}from"./chunk-BODUSF3V.js";import"./chunk-TXVNEV3M.js";import"./chunk-UCTMKA2J.js";import"./chunk-BALEFXOL.js";import"./chunk-J4R6QXW7.js";import"./chunk-5SBBTR3Y.js";import"./chunk-S4KF5Z3S.js";import"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";export{b as TEAM_LABELS,a as TEAM_TYPES,c as VERBS,f as findRole,e as findTeam,d as findUser,r as origin,r as origin_,k as privileges,q as rights,m as roleGet,l as roleList,s as shared,p as tableOf,i as teamAddRole,h as teamGet,g as teamList,j as teamRemoveRole,n as userGet,o as userPrivileges};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import{a as c,b as d,c as e,d as f,e as g}from"./chunk-
|
|
2
|
+
import{a as c,b as d,c as e,d as f,e as g}from"./chunk-B4FPKDMH.js";import{a,b}from"./chunk-MTF66YXU.js";import"./chunk-4KP27OCL.js";import"./chunk-J4R6QXW7.js";import"./chunk-5SBBTR3Y.js";import"./chunk-WMDKJRDC.js";import"./chunk-H4OY4EFC.js";import"./chunk-TQLZ3TRU.js";import"./chunk-S4KF5Z3S.js";import"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";export{d as DEFAULT_API_VERSION,e as DevOps,a as HOSTS,b as LEGACY_SUBHOSTS,c as RESOURCE,g as items,f as nextUrl};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e}from"./chunk-
|
|
2
|
+
import{a,b,c,d,e}from"./chunk-WNQERCOO.js";import"./chunk-4KP27OCL.js";import"./chunk-J4R6QXW7.js";import"./chunk-5SBBTR3Y.js";import"./chunk-WMDKJRDC.js";import"./chunk-H4OY4EFC.js";import"./chunk-TQLZ3TRU.js";import"./chunk-S4KF5Z3S.js";import"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";export{a as API_PATH,c as Dataverse,b as cleanMessage,e as items,d as nextLink};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
+
import{c as f}from"./chunk-WNQERCOO.js";import{A as m,E as u,F as g,z as l}from"./chunk-STWQDANK.js";import{c as v}from"./chunk-B4FPKDMH.js";import"./chunk-MTF66YXU.js";import{d as p}from"./chunk-4KP27OCL.js";import"./chunk-J4R6QXW7.js";import"./chunk-5SBBTR3Y.js";import"./chunk-WMDKJRDC.js";import"./chunk-H4OY4EFC.js";import"./chunk-TQLZ3TRU.js";import"./chunk-S4KF5Z3S.js";import"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";function y(e){return e.service==="dataverse"?new f({url:e.url}):new v({org:e.org,project:e.project})}function S(e){return y(e).scope()}function I(e,c){for(let o of e.environments.values()){let t=e.groups.get(o.group);if(t&&t.identity===c.name)return S(o)}return"https://graph.microsoft.com/.default"}async function k(e,c){let o=await e.config(),t,r;if(m(e.args))[t,r]=await u(o,c,e.args);else{let i=e.args.env;t=await l(o,c,typeof i=="string"?i:null);let n=e.args.identity;[r]=g(o,t,typeof n=="string"?n:null)}let a=y(t.env),s;if(r.method==="pat"){let{PatAuthorizer:i}=await import("./pat-KGOBISLG.js"),n=new i(r,e);await n.check(a),s=new p(a,e,n)}else{let i=async n=>{let{getToken:d}=await import("./provider-FN7TXWRE.js");return d(r,a.scope(),{forceRefresh:n,log:w=>e.log(w)})};s=new p(a,e,i)}return s.target=t,s.identity=r,s}export{k as clientFor,I as loginScope,y as makeService,S as scopeFor};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import{e as o,o as a,r as i}from"./chunk-BALEFXOL.js";import"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";var r=["claude","copilot"],p=["user","repo"];function m(d){let s=a(d,"skills","install the bundled agent skills"),t=()=>import("./run-
|
|
2
|
+
import{e as o,o as a,r as i}from"./chunk-BALEFXOL.js";import"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";var r=["claude","copilot"],p=["user","repo"];function m(d){let s=a(d,"skills","install the bundled agent skills"),t=()=>import("./run-G2MVOV3C.js");for(let[e,c]of[["install","copy the bundled skills into an agent's skill folder"],["uninstall","remove the skills ppdo-cli installed"]]){let l=i(s,e,"L",c).addOption(new o("--target <target>").choices(r).makeOptionMandatory()).addOption(new o("--scope <scope>").choices(p)).option("--path <repo>","repo folder for --scope repo (default: git root)");e==="install"?(l.option("--force","overwrite skill folders ppdo-cli didn't create").option("--link","link to the skills instead of copying them, so they follow the installed ppdo-cli (for npm link or a local build, your repo)"),l.handler(async n=>(await t()).install(n))):l.handler(async n=>(await t()).uninstall(n))}i(s,"list","L","bundled skills and where they are installed").addOption(new o("--target <target>").choices(r)).addOption(new o("--scope <scope>").choices(p)).option("--path <repo>").handler(async e=>(await t()).list(e))}export{p as SCOPES,r as TARGET_NAMES,m as register};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t}from"./chunk-
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t}from"./chunk-OXZG44O5.js";import"./chunk-RC5VPVGC.js";import"./chunk-ZUXLC5VX.js";import"./chunk-TXVNEV3M.js";import"./chunk-UCTMKA2J.js";import"./chunk-BALEFXOL.js";import"./chunk-J4R6QXW7.js";import"./chunk-5SBBTR3Y.js";import"./chunk-S4KF5Z3S.js";import"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";export{a as OPERATIONS,i as components,j as dependencies,k as exportCmd,c as find,h as get,s as history,p as importCmd,r as importResults,o as isInstalledAtLeast,g as list,d as names,f as objectIds,q as parseImportResults,m as projectZip,t as publish,b as row,l as settingsParameters,e as tableType,n as zipIdentity};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import{a as R,b as U,c as N,m as v}from"./chunk-
|
|
2
|
+
import{a as R,b as U,c as N,m as v}from"./chunk-TADCW6ZI.js";import{ga as f}from"./chunk-TZSB4PR7.js";import"./chunk-C42MGXRN.js";import"./chunk-ZNJ4DRCA.js";import"./chunk-WIA546AL.js";import"./chunk-QMTPHZLQ.js";import{c as C}from"./chunk-OXZG44O5.js";import{b as M,g as $,j as B}from"./chunk-RC5VPVGC.js";import{a as P}from"./chunk-ZUXLC5VX.js";import{C as E,D as A,E as S,F as h}from"./chunk-TXVNEV3M.js";import"./chunk-UCTMKA2J.js";import"./chunk-BALEFXOL.js";import"./chunk-J4R6QXW7.js";import"./chunk-5SBBTR3Y.js";import{e as p}from"./chunk-S4KF5Z3S.js";import{a as d,b as y,c as b,d as w,g as x,h as j}from"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";var u=n=>n?"managed":"unmanaged";async function m(n,a,e,i){return S(await A(n,a,"POST",e,{body:h(i)}))}async function D(n,a,e,i){let s=async o=>{try{let g=(await m(n,a,"ExportSolution",{SolutionName:e,Managed:o})).ExportSolutionFile;if(typeof g!="string")return"unexpected response: 'ExportSolutionFile'";try{return f(g)}catch(F){return`unexpected response: ${F.message}`}}catch(t){if(t instanceof b||t instanceof j||t instanceof w||t instanceof y||t instanceof x)throw t;if(t instanceof d){if((t.status??500)<500)throw t;return t.message}throw t}},l=i.map(o=>(p(`exporting ${e} (${u(o)})`),s(o))),c=await Promise.allSettled(l),r=new Map;return c.forEach((o,t)=>{if(o.status==="rejected")throw o.reason;r.set(i[t],o.value)}),r}async function I(n,a,e,i){let s=[];for(let o of i){let t=await m(n,a,"ExportSolutionAsync",{SolutionName:e,Managed:o});s.push({managed:o,job:String(t.AsyncOperationId??""),export:String(t.ExportJobId??"")}),p(`exporting ${e} (${u(o)}), job ${String(t.AsyncOperationId??"None")}`)}let l=typeof n.args.maxWait=="number"&&n.args.maxWait?n.args.maxWait:60,c=await P(async()=>{let o=new Map;for(let t of s)o.set(t.job,await $(n,a,t.job));return o},o=>[...o.values()].every(t=>t.statecode===M),{timeout:l*60,log:p,hint:"raise --max-wait, or check later with the job id",describe:o=>s.map(t=>`${u(t.managed)}: ${String(o.get(t.job).status)}`).join("; ")}),r=new Map;for(let o of s){B(c.get(o.job));let t=await m(n,a,"DownloadSolutionExportData",{ExportJobId:o.export});r.set(o.managed,f(String(t.ExportSolutionFile)))}return r}async function O(n,a,e,i,s=!1){let l=new Map,c=s?[...i]:[];if(!s)for(let[r,o]of await D(n,a,e,i))typeof o!="string"?l.set(r,o):(p(`${u(r)} export didn't finish in one request (${o}); running it as a job`),c.push(r));if(c.length)for(let[r,o]of await I(n,a,e,c))l.set(r,o);return l}async function Z(n,a,e,i=[],s=null){let l=await E(n);await C(n,l,a);let r=await O(n,l,a,e===R?[!1]:e===U?[!0]:[!1,!0],!!n.args.async),o=r.get(!1)??r.get(!0);return v(o,e,{managedZip:e===N?r.get(!0)??null:null,ignore:i,mapping:s})}export{O as exportAll,Z as exportAndPlan};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import{a as
|
|
2
|
+
import{a as k}from"./chunk-JEAIFLEN.js";import{a as M}from"./chunk-GE3XBV3K.js";import{a as q,b as D,c as x,g as B,m as L}from"./chunk-TADCW6ZI.js";import{Y as O}from"./chunk-TZSB4PR7.js";import{c as T,d as v}from"./chunk-C42MGXRN.js";import"./chunk-ZNJ4DRCA.js";import{q as E}from"./chunk-WIA546AL.js";import"./chunk-QMTPHZLQ.js";import{e as h}from"./chunk-S4KF5Z3S.js";import{a as R,b as m}from"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";import{existsSync as _,mkdirSync as G,readdirSync as I,statSync as J}from"node:fs";var N=100;function b(t){if(t==null)return null;let n={unmanaged:q,managed:D,both:x}[String(t)];if(n===void 0)throw new m(`unknown package type '${String(t)}'`);return n}async function u(t){try{return await t()}catch(n){if(n instanceof R)throw n;if(n instanceof O)throw new m(n.message);let r=n;throw r.code==="ENOENT"?new m(`not found: ${r.path??r.message}`):n instanceof Error&&!r.code?new m(n.message):n}}function z(t){let n=Object.entries(t),r={};for(let[e,o]of n)r[e]=Array.isArray(o)?o.length:o;let a={files:r},i={};for(let[e,o]of n)Array.isArray(o)&&o.length&&(i[e]=o.slice(0,N));return Object.keys(i).length&&(a.changes=i),n.some(([,e])=>Array.isArray(e)&&e.length>N)&&h(`lists are capped at ${N} paths each; the counts are complete`),a}function Z(t,n){return!!(t.added.length||t.changed.length||t.deleted.length||n&&t.stale.length)}function U(t){return new R(t,{code:"out_of_date",exitCode:6,hint:"run it again without --check to update the folder"})}async function $(t,n){if(typeof t!="string"||!t)return null;let r=await u(async()=>new M(t,n));for(let a of r.warnings)h(`warning: ${a}`);return r.warnings=[],r}function H(t){try{return J(t).isDirectory()}catch{return!1}}async function rn(t){let n=t.args,r=String(n.fileZip),a=b(n.packageType),i=String(n.folder),e=!!n.allowDelete,o=!!n.check,s=n.managedZip;if(s&&a!==x)throw new m("--managed-zip is for --package-type both");let{sol:l,diff:p}=await u(async()=>{let c=new T(i),f=await $(n.map,i),[g,w]=L(r,a,{managedZip:s??null,mapping:f});return{sol:w,diff:await v(g,i,{delete:e,check:o,snapshot:c})}});if(await t.emit({solution:l.uniqueName,version:l.version,package_type:(a??l.packageType).toLowerCase(),folder:i,checked_only:o,...z(p)}),o&&Z(p,e))throw U(`${i} doesn't match ${r}`)}async function an(t){let n=t.args,r=await import("./project-HSZLY2AY.js"),a=await import("./pack-3OYGV36R.js"),i=String(n.folder),e=b(n.packageType),o=typeof n.map=="string"?n.map:null,s=null,l=null,p=typeof n.configuration=="string"?n.configuration:"Debug",c=await u(async()=>r.findProject(i));if(c&&!_(k(i,"Other","Solution.xml"))){let y=await import("./build-LSQEAEFK.js");i=r.sourceRoot(c);let d=await u(async()=>y.settings(c));if(e===null&&(e=b((d.package_type||(p.toLowerCase()==="release"?"managed":"unmanaged")).toLowerCase())),o=o||d.map_file,d.references.length){let j=i;[s,l]=await u(async()=>y.buildProject(c,j,p,n.build!==!1,h))}}let f=String(n.save),g=await u(()=>a.pack(i,f,e,{mapFile:o,remap:!!n.remapPlugins,overlay:s}));for(let y of g)for(let d of y.warnings)h(`warning: ${d}`);let w=g.length===1?{...g[0]}:{solution:g[0].solution,zips:g};c&&(w.project=c),l&&l.length&&(w.built=l),await t.emit(w)}async function sn(t){let n=t.args,{exportAndPlan:r}=await import("./solutionExport-GTBTHG2D.js"),{writeProject:a}=await import("./project-HSZLY2AY.js"),i=String(n.uniquename),e=typeof n.folder=="string"&&n.folder?n.folder:k(".",i);if(H(e)&&I(e).length)throw new m(`${e} is not empty`,{hint:"clone into a new folder, or use dv solution sync"});let o=b(n.packageType??"both"),s=n.project===!1?e:k(e,"src"),l=await $(n.map,s),[p,c]=await u(()=>r(t,i,o,[],l));G(s,{recursive:!0}),await v(p,s,{delete:!1});let f={solution:c.uniqueName,version:c.version,package_type:o.toLowerCase(),folder:e,source:s,files:p.size};n.project!==!1&&(f.project=a(e,c.uniqueName)[0]),await t.emit(f)}async function cn(t){let n=t.args,{exportAndPlan:r}=await import("./solutionExport-GTBTHG2D.js"),a=await import("./project-HSZLY2AY.js"),i=typeof n.folder=="string"?n.folder:".",e=i,o=[],s=null,l=typeof n.map=="string"?n.map:null;if(!_(k(e,"Other","Solution.xml"))){if(s=await u(async()=>a.findProject(i)),!s)throw new m(`${i} has no Other/Solution.xml and no .cdsproj`,{hint:"sync a folder made by dv solution clone or unpack"});let A=s;if(e=a.sourceRoot(A),o=await u(async()=>a.referencedComponents(A)),!l){let X=await import("./build-LSQEAEFK.js");l=(await u(async()=>X.settings(A))).map_file}o.length&&h(`left out (built by project references): ${o.join(", ")}`)}let p=k(e,"Other","Solution.xml");if(!_(p))throw new m(`${p} is missing`,{hint:"clone the solution first: dv solution clone <uniquename>"});let c=await u(async()=>new B(E(p))),f=b(n.packageType??"both"),g=new T(e),w=await $(l,e),[y,d]=await u(()=>r(t,c.uniqueName,f,o,w)),j=!n.keepStale,S=!!n.check,C=await v(y,e,{delete:j,check:S,snapshot:g}),P={solution:d.uniqueName,version:d.version,previous_version:c.version,package_type:f.toLowerCase(),folder:e,checked_only:S};if(s&&(P.project=s),o.length&&(P.left_out=o),Object.assign(P,z(C)),await t.emit(P),S&&Z(C,j))throw U(`${e} is out of date with ${c.uniqueName} in the environment`)}export{sn as clone,an as pack,cn as sync,rn as unpack};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
+
import{a,b,c,d,e,f,g}from"./chunk-BCAXUZIO.js";import"./chunk-I3TMFYRJ.js";import"./chunk-MK6QZ4ES.js";import"./chunk-STWQDANK.js";import"./chunk-MBNUMAAZ.js";import"./chunk-LB7WNZVK.js";import"./chunk-4KP27OCL.js";import"./chunk-J4R6QXW7.js";import"./chunk-5SBBTR3Y.js";import"./chunk-WMDKJRDC.js";import"./chunk-H4OY4EFC.js";import"./chunk-TQLZ3TRU.js";import"./chunk-S4KF5Z3S.js";import"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";export{d as acquire,b as certificate,f as check,c as credential,e as ephemeralToken,a as expandPath,g as resetForTests};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
+
import{f as a,g as b,h as c,i as d,j as e,k as f,l as g,m as h,n as i,o as j,p as k,q as l}from"./chunk-MBNUMAAZ.js";import"./chunk-H4OY4EFC.js";import"./chunk-TQLZ3TRU.js";import"./chunk-S4KF5Z3S.js";import"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";export{a as MIN_LIFETIME,k as accountMatches,f as deleteAll,l as describe,e as filesFor,i as getValid,g as load,c as msalPath,d as patPath,j as put,h as save,b as tokensPath};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m}from"./chunk-
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m}from"./chunk-TADCW6ZI.js";import"./chunk-TZSB4PR7.js";import"./chunk-C42MGXRN.js";import"./chunk-ZNJ4DRCA.js";import"./chunk-WIA546AL.js";import"./chunk-QMTPHZLQ.js";import"./chunk-ZHHVG47C.js";export{c as BOTH,h as Context,b as MANAGED,d as Part,g as Solution,a as UNMANAGED,m as buildPlan,l as detectType,k as managedZipName,f as partKey,i as readZip,j as unpackPass,e as unquote};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import{H as f,I as c,e as r,f as o,g as a,j as d,k as l,u as h}from"./chunk-
|
|
2
|
+
import{H as f,I as c,e as r,f as o,g as a,j as d,k as l,u as h}from"./chunk-MGZDEW3X.js";import"./chunk-BALEFXOL.js";import"./chunk-B4FPKDMH.js";import"./chunk-MTF66YXU.js";import"./chunk-4KP27OCL.js";import"./chunk-J4R6QXW7.js";import"./chunk-5SBBTR3Y.js";import"./chunk-WMDKJRDC.js";import"./chunk-H4OY4EFC.js";import"./chunk-TQLZ3TRU.js";import"./chunk-S4KF5Z3S.js";import{b as u,d as p}from"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";async function v(e){let t=String(e.args.who).trim(),n=await h(e),i;if(t==="me"?i=await c(e,n,[["identityIds",l((await f(e,n)).id)]]):i=await c(e,n,[["searchFilter","General"],["filterValue",t]]),!i.length)throw new p(`no user or group matches '${t}'`,{service:"devops",hint:"use their email, UPN or full display name; part of a name matches nothing"});if(i.length>1){let w=i.map(s=>l(r(m(s).upn??null,m(s).name??null,s.id??null))).join(", ");throw new u(`${i.length} identities match '${t}'`,{hint:`use one of: ${w}`})}await e.emit(m(i[0]))}function m(e){let t=Object.fromEntries(Object.entries(a(e.properties)).map(([n,i])=>[n,o(a(i),"$value")]));return d({id:o(e,"id"),name:r(e.customDisplayName??null,e.providerDisplayName??null),upn:t.Account??null,mail:r(t.Mail??null,null),descriptor:o(e,"subjectDescriptor"),active:o(e,"isActive"),kind:t.SchemaClassName??null,object_id:t["http://schemas.microsoft.com/identity/claims/objectidentifier"]??null})}export{v as getUser,m as userRow};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import{A as j,B as R,C as q,D as F,F as G,J as H,N as I,d as f,e as w,f as l,g as v,h as V,i as S,j as z,k as y,l as x,m as K,p as M,s as W,u as h,z as k}from"./chunk-
|
|
2
|
+
import{A as j,B as R,C as q,D as F,F as G,J as H,N as I,d as f,e as w,f as l,g as v,h as V,i as S,j as z,k as y,l as x,m as K,p as M,s as W,u as h,z as k}from"./chunk-MGZDEW3X.js";import{w as D,y as L}from"./chunk-BALEFXOL.js";import{d as N,e as U}from"./chunk-B4FPKDMH.js";import"./chunk-MTF66YXU.js";import"./chunk-4KP27OCL.js";import"./chunk-J4R6QXW7.js";import{b as $}from"./chunk-5SBBTR3Y.js";import"./chunk-WMDKJRDC.js";import"./chunk-H4OY4EFC.js";import"./chunk-TQLZ3TRU.js";import"./chunk-S4KF5Z3S.js";import{a as T,b as d,d as _,f as A}from"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";var ne=/(pass(word)?|pwd|secret|token|key|credential|connectionstring|sas)/i,Q="<hidden>";function te(e){let n={};for(let[t,r]of Object.entries(v(e))){let o=v(r);f(o.isSecret)?n[t]={secret:!0}:ne.test(t)?n[t]={value:Q,masked:"name looks secret"}:n[t]={value:l(o,"value")}}return n}function P(e,n){let t={id:l(e,"id"),name:l(e,"name"),type:l(e,"type"),description:l(e,"description"),modified:l(e,"modifiedOn"),modified_by:H(e.modifiedBy)};return e.type==="AzureKeyVault"&&(t.key_vault=l(v(e.providerData),"vault")),n?t.variables=te(e.variables):t.variable_count=Object.keys(v(e.variables)).length,z(t,[""])}async function ue(e){let n=await h(e),t=typeof e.args.name=="string"&&e.args.name?e.args.name:null,r=t?[["groupName",t]]:null,o=`${k(n)}/_apis/distributedtask/variablegroups`;$(e,n,"GET",o,null);let a=[];for await(let i of n.paginate(o,{params:r,nextLink:N,items:U}))a.push(P(v(i),!1));await e.emit(W(K(a,i=>S(w(i.name??null,""))),e.args,"variable groups"))}async function pe(e){let n=await h(e),t=`${k(n)}/_apis/distributedtask/variablegroups`,r=String(e.args.vargroup),o;if(x(r)){let a=(await j(e,n,"GET",`${t}/${r}`)).json();o=f(a)?a:null}else o=G(await R(e,n,t,[["groupName",r]])).find(i=>(S(w(i.name??null,""))??"").toLowerCase()===r.toLowerCase())??null;if(!o)throw new _(`no variable group '${r}'`,{service:"devops",hint:"run: ppdo-cli ado vargroup list"});await e.emit(P(o,!0))}function E(e,n){let t=[];for(let[r,o]of D(e,n)){let a=o;if(a.startsWith("@")){let i=I(L(a)??Buffer.alloc(0));if(i===null)throw M("'utf-8' codec can't decode the input");a=i.replace(/[\r\n]+$/,"")}if(!r)throw new d(`${n} needs a name`);t.push([r,a])}return t}function oe(e){let n={...e};return n.variables=Object.fromEntries(Object.entries(v(e.variables)).map(([t,r])=>{let o=r;return[t,f(o.isSecret)&&"value"in o?{...o,value:Q}:o]})),n}async function X(e,n,t,r,o,a){if(e.dryRun)return await e.emit({dry_run:!0,method:t,path:r,body:oe(o)}),null;try{return q(await j(e,n,t,r,{body:F(o)}))}catch(i){throw i instanceof T&&i.code==="VariableGroupExistsException"?new A(`a variable group named '${y(a)}' already exists`,{service:"devops",hint:`change it with: ppdo-cli ado vargroup set ${y(a)} ...`}):i}}async function Y(e,n,t,r){let o=await R(e,n,`_apis/projects/${k(n)}`);return{name:t,description:w(r??null,""),projectReference:{id:o.id,name:o.name}}}async function de(e){let n=e.args,t=Object.fromEntries(E(n.variable,"--variable").map(([m,u])=>[m,{value:u}]));for(let[m,u]of E(n.secret,"--secret")){if(!u)throw new d(`secret '${m}' is empty`,{hint:"Azure DevOps ignores an empty secret"});t[m]={value:u,isSecret:!0}}if(!Object.keys(t).length)throw new d("a variable group needs at least one variable",{hint:"pass --variable k=v or --secret k=@file"});let r=await h(e);$(e,r,"POST","_apis/distributedtask/variablegroups",Buffer.from("{}"));let o=await r.lookups(()=>Y(e,r,n.name,n.description??null)),a={name:n.name,type:"Vsts",description:w(n.description??null,""),variables:t,variableGroupProjectReferences:[o]},i=await X(e,r,"POST","_apis/distributedtask/variablegroups",a,n.name);i!==null&&await e.emit(P(i,!0))}async function fe(e){let n=e.args,t=E(n.variable,"--variable"),r=E(n.secret,"--secret"),o=n.remove??[],a=typeof n.description=="string"?n.description:null;if(!(t.length||r.length||o.length||a!==null))throw new d("nothing to change",{hint:"pass --variable, --secret, --remove or --description"});let i=await h(e);$(e,i,"PUT","_apis/distributedtask/variablegroups",Buffer.from("{}"));let m=`${k(i)}/_apis/distributedtask/variablegroups`,u=String(n.vargroup),p=await i.lookups(async()=>{let s=x(u)?u:null;if(!s){let C=G(await R(e,i,m,[["groupName",u]])).find(ee=>(S(w(ee.name??null,""))??"").toLowerCase()===u.toLowerCase());s=C?y(C.id):null}let c=null;if(s){let b=(await j(e,i,"GET",`${m}/${s}`)).json();c=f(b)?b:null}return c&&!f(c.variableGroupProjectReferences)&&(c.variableGroupProjectReferences=[await Y(e,i,c.name??null,c.description??null)]),c});if(!p)throw new _(`no variable group '${u}'`,{service:"devops",hint:"run: ppdo-cli ado vargroup list"});let g={};for(let[s,c]of Object.entries(v(p.variables))){let b=v(c);g[s]=f(b.isSecret)?{isSecret:!0}:{value:l(b,"value")}}let O=[];for(let[s,c]of t){if(f(g[s]?.isSecret))throw new d(`'${s}' is a secret; change it with --secret`,{hint:"turning a secret into a plain variable isn't supported"});g[s]={value:c},O.push(s)}for(let[s,c]of r){if(!c)throw new d(`secret '${s}' is empty`,{hint:"Azure DevOps ignores an empty secret"});g[s]={value:c,isSecret:!0},O.push(s)}for(let s of o){if(!(s in g))throw new d(`'${s}' isn't in the group`);delete g[s]}if(!Object.keys(g).length)throw new d("a variable group must keep at least one variable");let B=V(p.variableGroupProjectReferences).map(s=>({...s}));if(a!==null)for(let s of B)s.description=a;let Z={name:l(p,"name"),type:w(p.type??null,"Vsts"),description:a===null?l(p,"description"):a,providerData:l(p,"providerData"),variables:g,variableGroupProjectReferences:B},J=await X(e,i,"PUT",`_apis/distributedtask/variablegroups/${y(p.id)}`,Z,p.name??null);if(J!==null){let s=(await j(e,i,"GET",`${m}/${y(p.id)}`)).json();J=f(s)?s:J,await e.emit({...P(J,!0),changed:[...new Set(O)].sort(),removed:o.length?[...o].sort():null})}}export{Q as MASK,de as create,pe as getGroup,ue as list,fe as set};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import{e,r as o}from"./chunk-BALEFXOL.js";import{f as i}from"./chunk-
|
|
2
|
+
import{e,r as o}from"./chunk-BALEFXOL.js";import{f as i}from"./chunk-STWQDANK.js";import"./chunk-TQLZ3TRU.js";import"./chunk-S4KF5Z3S.js";import"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";function a(r){o(r,"whoami","L","show the resolved environment, mode and account per service").addOption(new e("--service <service>").choices(Object.keys(i))).option("--check","call each service to confirm the account works").handler(async t=>(await import("./run-XRPU3YZF.js")).whoami(t))}export{a as register};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import{A as T,B as p,C as _,D as b,E as W,F as P,J as U,M as et,P as L,b as B,c as Q,d as u,e as y,f as l,g as C,h as $,i as S,j as N,k as j,m as V,r as D,s as F,t as H,u as w,v as Z,w as v,y as tt,z as f}from"./chunk-5KZDCOFA.js";import"./chunk-BWZ6HZXM.js";import"./chunk-MTF66YXU.js";import{w as q}from"./chunk-BALEFXOL.js";import"./chunk-4S5ETLH4.js";import{a as J,b as K}from"./chunk-J4R6QXW7.js";import{b as Y}from"./chunk-5SBBTR3Y.js";import"./chunk-UYDBLVAM.js";import"./chunk-RHQP7X6H.js";import"./chunk-TQLZ3TRU.js";import{e as M}from"./chunk-S4KF5Z3S.js";import{b as R,d as X}from"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";import{mkdirSync as dt}from"node:fs";import{extname as pt,join as ut}from"node:path";var nt=200,z="7.1-preview.4",ft="7.1-preview.1",Nt=["like","dislike","heart","hooray","smile","confused"],gt=["System.Id","System.WorkItemType","System.Title","System.State","System.AssignedTo","System.IterationPath","System.ChangedDate"],wt=new Set(["System.Description","System.History"]),yt=new Set(["System.Title","System.State","System.Reason","System.AssignedTo","System.AreaPath","System.IterationPath","System.Tags"]),st=["html","history"],ot={priority:"Microsoft.VSTS.Common.Priority",severity:"Microsoft.VSTS.Common.Severity",storypoints:"Microsoft.VSTS.Scheduling.StoryPoints",effort:"Microsoft.VSTS.Scheduling.Effort",remainingwork:"Microsoft.VSTS.Scheduling.RemainingWork",originalestimate:"Microsoft.VSTS.Scheduling.OriginalEstimate",completedwork:"Microsoft.VSTS.Scheduling.CompletedWork",acceptancecriteria:"Microsoft.VSTS.Common.AcceptanceCriteria",reprosteps:"Microsoft.VSTS.TCM.ReproSteps",activity:"Microsoft.VSTS.Common.Activity",valuearea:"Microsoft.VSTS.Common.ValueArea"};function h(t){return typeof t=="string"&&t?t:null}function k(t){return t.toLowerCase()}function A(t){if(t.includes("."))return t;let e=t.toLowerCase().replace(/ /g,"");return Object.hasOwn(ot,e)?ot[e]:`System.${t}`}function it(t){return t.startsWith("System.")?t.slice(7):t}function O(t){let e={id:l(t,"id"),rev:l(t,"rev")};for(let[i,o]of Object.entries(C(t.fields))){if(i==="System.Id")continue;let a=o;Q(a)&&("uniqueName"in a||"displayName"in a)&&(a=U(a)),e[it(i)]=a}let n=Object.fromEntries(Object.entries(C(t.multilineFieldsFormat)).map(([i,o])=>[it(i),o]));return Object.keys(n).length&&(e.formats=n),u(t.relations)&&(e.relations=$(t.relations).map(i=>({rel:l(i,"rel"),url:l(i,"url"),name:l(C(l(i,"attributes")),"name")}))),e}function ht(t,e=new Set,n="Markdown"){let i=[];for(let[o,a]of t){let s=A(o);i.push({op:"add",path:`/fields/${s}`,value:a}),e.has(s)&&i.push({op:"add",path:`/multilineFieldsFormat/${s}`,value:n})}return i}function at(t){return t.map(([e,n])=>[e,n.startsWith("@")?L(n):n])}async function St(t,e,n,i,o){Y(t,e,n,i,null);let a=new Set;for(let s of new Set(o.map(([r])=>A(r))))if(wt.has(s))a.add(s);else if(!yt.has(s)){let r=await e.lookups(()=>p(t,e,`${f(e)}/_apis/wit/fields/${J(s)}`));st.includes(String(r.type))&&a.add(s)}return a}async function rt(t,e,n,i,o){return ht(o,await St(t,e,n,i,o),t.args.html?"Html":"Markdown")}async function ct(t,e,n,i,o){return _(await T(t,e,n,i,{body:b(o),headers:{"Content-Type":"application/json-patch+json"}}))}function $t(t){return t.split(",").map(e=>A(e.trim())).join(",")}async function Vt(t){let e=t.args,n=await w(t),i=[];h(e.fields)?i.push(["fields",$t(String(e.fields))]):e.relations&&i.push(["$expand","relations"]);let o=await p(t,n,`${f(n)}/_apis/wit/workitems/${v(e.id,"wi",n)}`,i);await t.emit(O(o))}async function Dt(t){let e=t.args,n=await w(t),i=f(n),o;if(h(e.saved))o=await p(t,n,`${i}/_apis/wit/wiql/${String(e.saved)}`);else{let c=L(String(e.wiql));o=_(await T(t,n,"POST",`${i}/_apis/wit/wiql`,{body:b({query:c})}))}let a=u(o.workItems)?$(o.workItems):$(o.workItemRelations).map(c=>l(c,"target")).filter(c=>u(c)),s=[...new Set(a.filter(c=>u(c)).map(c=>c.id))],r=D(e);r!==null&&s.length>r&&(H(r,!0,`of ${s.length} work items`),s=s.slice(0,r));let d=h(e.fields)?String(e.fields).split(",").map(c=>A(c.trim())):gt,m=[];for(let c=0;c<s.length;c+=nt){let g={ids:s.slice(c,c+nt),fields:d};m.push(...P(_(await T(t,n,"POST",`${i}/_apis/wit/workitemsbatch`,{body:b(g)}))))}await t.emit(m.map(O))}async function Ft(t){let e=t.args,n=await w(t),i=[["System.Title",String(e.title)],...at(q(e.field,"--field"))];h(e.assign)&&i.push(["System.AssignedTo",String(e.assign)]);let o=`${f(n)}/_apis/wit/workitems/$${J(String(e.type))}`,a=await rt(t,n,"POST",o,i);if(h(e.parent)){let s=v(e.parent,"wi",n),r=J(Z(n).org);a.push({op:"add",path:"/relations/-",value:{rel:"System.LinkTypes.Hierarchy-Reverse",url:`https://dev.azure.com/${r}/_apis/wit/workItems/${s}`}})}await t.emit(O(await ct(t,n,"POST",o,a)))}async function Ht(t){let e=t.args,n=at(q(e.field,"--field"));for(let[r,d]of[["System.State",e.state],["System.Title",e.title],["System.AssignedTo",e.assign]])typeof d=="string"&&n.push([r,d]);let i=u(e.addTag)||u(e.removeTag);if(i&&n.some(([r])=>A(r)==="System.Tags"))throw new R("use --field Tags or --add-tag/--remove-tag, not both");if(!n.length&&!i)throw new R("nothing to update",{hint:"pass --field, --state, --title, --assign, --add-tag or --remove-tag"});let o=await w(t),a=`${f(o)}/_apis/wit/workitems/${v(e.id,"wi",o)}`,s=await rt(t,o,"PATCH",a,n);for(let r of s)r.path==="/fields/System.Tags"&&(r.op="replace");if(i&&(s=[...await vt(t,o,a,G(e.addTag),G(e.removeTag)),...s]),!s.length){M("nothing to change: the tags are already as asked"),await t.emit(O(await p(t,o,a)));return}await t.emit(O(await ct(t,o,"PATCH",a,s)))}function G(t){let e=[];for(let n of t??[])for(let i of n.split(/[;,]/)){let o=i.trim();o&&!e.some(a=>k(a)===k(o))&&e.push(o)}return e}async function vt(t,e,n,i,o){if(!o.length)return i.length?[{op:"add",path:"/fields/System.Tags",value:i.join("; ")}]:[];let a=await e.lookups(()=>p(t,e,n,[["fields","System.Tags"]])),s=G([S(y(l(C(a.fields),"System.Tags"),""))??""]),r=Tt(s,i,o);if(r.map(k).join("\0")===s.map(k).join("\0")&&r.length===s.length)return[];let d=r.length?{op:"replace",path:"/fields/System.Tags",value:r.join("; ")}:{op:"remove",path:"/fields/System.Tags"};return[{op:"test",path:"/rev",value:l(a,"rev")},d]}function Tt(t,e,n){let i=new Set(n.map(k)),o=t.filter(s=>!i.has(k(s))),a=new Set(o.map(k));return[...o,...e.filter(s=>!a.has(k(s)))]}async function Wt(t){let e=t.args,n=await w(t),i=v(e.id,"wi",n),o=await p(t,n,`${f(n)}/_apis/wit/workitems/${i}`,[["$expand","relations"]]),s=$(o.relations).filter(m=>l(m,"rel")==="AttachedFile").map(m=>{let c=C(m.attributes),g=S(y(m.url??null,""))??"";return[N({id:g.replace(/\/+$/,"").split("/").pop()??"",name:l(c,"name"),size:l(c,"resourceSize"),added:l(c,"authorizedDate"),comment:y(c.comment??null,null)}),l(m,"url")]}),r=h(e.name);if(r){let m=r.split(",").map(c=>c.trim().toLowerCase()).filter(c=>c);if(s=s.filter(([c])=>m.some(g=>B((S(y(c.name??null,""))??"").toLowerCase(),g))),!s.length)throw new X(`work item ${i} has no attachment matching '${r}'`,{service:"devops",hint:`run: ppdo-cli ado wi attachments ${i}`})}let d=h(e.save);if(d){dt(d,{recursive:!0});let m=new Set;for(let[c,g]of s){let x=ut(d,kt(S(y(c.name??null,c.id))??"",m));await T(t,n,"GET",String(g),{params:[["download","true"]],headers:{Accept:"application/octet-stream"},saveTo:x}),c.file=x}}await t.emit(s.map(([m])=>m))}function kt(t,e){let n=/^\.+[^.]*$/.test(t)?"":pt(t),i=n?t.slice(0,-n.length):t,o=t,a=1;for(;e.has(o.toLowerCase());)a++,o=`${i} (${a})${n}`;return e.add(o.toLowerCase()),o}async function Ut(t){let e=await w(t),n=P(await p(t,e,`${f(e)}/_apis/wit/tags`)).map(i=>({name:l(i,"name"),id:l(i,"id"),last_updated:l(i,"lastUpdated")}));await t.emit(F(V(n,i=>k(S(y(i.name,""))??"")),t.args,"tags"))}async function zt(t){let e=t.args,n=await w(t),i=v(e.id,"wi",n),o=`${f(n)}/_apis/wit/workItems/${i}/comments`,a=typeof e.delete=="number"?e.delete:null,s=typeof e.edit=="number"?e.edit:null,r=typeof e.body=="string"?e.body:null;if(a!==null){if(r!==null||e.html)throw new R("--delete takes no --body or --html");await T(t,n,"DELETE",`${o}/${a}`,{params:[["api-version",z]]}),await t.emit({work_item:i,comment:a,deleted:!0});return}if(r===null)throw new R("--body is required",{hint:"pass --body text|@file|-"});let d=[["format",e.html?"html":"markdown"],["api-version",z]],m=b({text:L(r)});if(s!==null){let g=_(await T(t,n,"PATCH",`${o}/${s}`,{params:d,body:m}));await t.emit({work_item:l(g,"workItemId"),comment:l(g,"id"),format:l(g,"format"),version:l(g,"version"),modified:l(g,"modifiedDate")});return}let c=_(await T(t,n,"POST",o,{params:d,body:m}));await t.emit({work_item:l(c,"workItemId"),comment:l(c,"id"),format:l(c,"format"),created:l(c,"createdDate")})}async function Gt(t){let e=t.args,n=await w(t),i=`${f(n)}/_apis/wit/queries`,o=e.wiql?[["$expand","wiql"]]:[],a=h(e.folder),s=a?et(a).replace(/\\/g,"/").replace(/^\/+|\/+$/g,""):null,r,d=h(e.name);if(d){let m=await p(t,n,i,[["$filter",d],["$top","200"],...o]);r=P(m),s&&(r=r.filter(c=>(S(y(c.path??null,""))??"").toLowerCase().startsWith(s.toLowerCase()+"/"))),u(m.hasMore)&&M("more than 200 queries match; showing the first 200 (use a longer --name)")}else{let m=s?[await p(t,n,`${i}/${J(s)}`,[["$depth","2"],...o])]:P(await p(t,n,i,[["$depth","2"],...o]));r=await lt(t,n,i,m,o)}r=V(r,m=>(S(y(m.path??null,""))??"").toLowerCase()),await t.emit(F(r.map(m=>Ct(m,!!e.wiql)),e,"queries"))}var Jt={getJson:p};async function lt(t,e,n,i,o){let a=[];for(let s of i){if(!u(s.isFolder)){a.push(s);continue}let r=s.children;r==null&&u(s.hasChildren)&&(r=(await Jt.getJson(t,e,`${n}/${j(s.id)}`,[["$depth","2"],...o])).children),a.push(...await lt(t,e,n,$(r),o))}return a}function Ct(t,e){let n={id:l(t,"id"),name:l(t,"name"),path:l(t,"path"),type:l(t,"queryType"),shared:l(t,"isPublic"),modified:l(t,"lastModifiedDate")};return u(t.isInvalidSyntax)&&(n.invalid=!0),e&&(n.wiql=l(t,"wiql")),n}async function Xt(t){let e=t.args,n=await w(t),i=`${f(n)}/_apis/wit/workItems/${v(e.id,"wi",n)}/comments`,o=D(e),a=!!e.reactions,s=[],r=null;for(;;){let d=[["order","desc"],["$top","200"],["api-version",z]];a&&d.push(["$expand","reactions"]),u(r)&&d.push(["continuationToken",j(r)]);let m=await p(t,n,i,d);if(s.push(...$(m.comments).map(c=>Pt(c,a))),r=l(m,"continuationToken"),!u(r)||o!==null&&s.length>o)break}o!==null&&s.length>o&&(H(o,!0,"comments"),s=s.slice(0,o)),await t.emit(s)}function Pt(t,e=!1){let n={id:l(t,"id"),author:U(t.createdBy),created:l(t,"createdDate"),modified:l(t,"modifiedDate")!==l(t,"createdDate")?l(t,"modifiedDate"):null,format:l(t,"format"),text:l(t,"text")};if(e){let i=$(t.reactions).filter(o=>u(o.count));n.reactions=Object.fromEntries(i.map(o=>[String(o.type),o.count])),n.reacted=i.filter(o=>u(o.isCurrentUserEngaged)).map(o=>o.type)}return N(n)}async function Yt(t){let e=t.args,n=await w(t),i=f(n),o=`${i}/_apis/wit/workitemtypes/${J(String(e.type))}`,a=P(await p(t,n,`${o}/fields`,[["$expand","allowedValues"]])),s=new Map;for(let c of P(await p(t,n,`${i}/_apis/wit/fields`)))s.set(l(c,"referenceName"),c);let r=P(await p(t,n,`${o}/states`)),d=a.map(c=>_t(c,C(s.get(l(c,"referenceName"))),r)),m=h(e.name);m&&(d=d.filter(c=>jt(c,m))),await t.emit(e.required?d.filter(c=>c.required):d)}function jt(t,e){let n=[(S(y(t.name??null,""))??"").toLowerCase(),(S(y(t.reference_name??null,""))??"").toLowerCase()];for(let i of e.split(",").map(o=>o.trim()).filter(o=>o))if(n.some(o=>B(o,i.toLowerCase()))||A(i)===t.reference_name)return!0;return!1}function _t(t,e,n){let i=l(t,"referenceName"),o={name:l(t,"name"),reference_name:i,type:l(e,"type"),required:u(t.alwaysRequired)},a=l(t,"defaultValue");a!==null&&a!==""&&(o.default=a);let s=$(t.allowedValues);i==="System.State"&&n.length&&(s=n.map(r=>l(r,"name"))),s.length&&(o.allowed_values=s),i==="System.State"&&n.length&&(o.states=n.map(r=>({name:l(r,"name"),category:l(r,"category")})));for(let[r,d]of[["other_values_allowed",e.isPicklistSuggested],["long_text",st.includes(String(e.type))],["identity",e.isIdentity],["read_only",e.readOnly]])u(d)&&(o[r]=!0);return o}async function Kt(t){let e=t.args,n=await w(t),i=v(e.id,"wi",n),o=`${f(n)}/_apis/wit/workItems/${i}/comments/${String(e.comment)}/reactions/${String(e.reaction)}`,a=_(await T(t,n,e.remove?"DELETE":"PUT",o,{params:[["api-version",ft]]}));await t.emit({work_item:i,comment:"commentId"in a?a.commentId:e.comment,reaction:"type"in a?a.type:e.reaction,count:l(a,"count"),reacted:l(a,"isCurrentUserEngaged")})}async function Qt(t){let e=t.args,n=await w(t),{getPr:i,linkWorkItem:o}=await import("./prs-NOXIZ7AT.js"),a=v(e.id,"wi",n);if(h(e.pr)){let I=v(e.pr,"pr",n),E=await W(t,n,async()=>(await i(t,n,I)).repository);await o(t,n,E,I,a),await t.emit({work_item:a,pr:I});return}let s=String(e.commit),r=tt(s,n),d=/\/_git\/([^/?#]+)\/commits?\//.exec(s),m=d?K(d[1]):h(e.repo);if(!m)throw new R("--commit with a SHA needs --repo",{hint:"or paste the commit's URL"});let[c,g]=await W(t,n,async()=>{let I=await p(t,n,`${f(n)}/_apis/git/repositories/${J(m)}`),E=await p(t,n,`${f(n)}/_apis/git/repositories/${j(I.id)}/commits/${r}`);return[I,E]}),x=j(g.commitId),mt="vstfs:///Git/Commit/"+J(`${j(C(c.project).id)}/${j(c.id)}/${x}`,"");await xt(t,n,a,mt,"Fixed in Commit"),await t.emit({work_item:a,commit:x,repo:c.name??null})}async function xt(t,e,n,i,o){let a=`${f(e)}/_apis/wit/workitems/${n}`,s=await e.lookups(()=>p(t,e,a,[["$expand","relations"]]));if($(s.relations).some(d=>(S(y(l(d,"url"),""))??"").toLowerCase()===i.toLowerCase()))return;await T(t,e,"PATCH",a,{body:b([{op:"add",path:"/relations/-",value:{rel:"ArtifactLink",url:i,attributes:{name:o}}}]),headers:{"Content-Type":"application/json-patch+json"}})}export{nt as BATCH,z as COMMENTS_API,gt as DEFAULT_FIELDS,Nt as REACTIONS,ft as REACTIONS_API,Wt as attachments,zt as comment,Xt as comments,Ft as create,Jt as fetcher,A as fieldName,Yt as fields,kt as freeName,Vt as getOne,Qt as link,ht as patchOps,Gt as queries,Dt as query,lt as queryTree,Kt as react,Tt as tagAfter,G as tagList,Ut as tags,Ht as update,O as wiRow};
|
|
2
|
+
import{A as T,B as p,C as _,D as b,E as W,F as P,J as U,M as et,P as L,b as B,c as Q,d as u,e as y,f as l,g as C,h as $,i as S,j as N,k as j,m as V,r as D,s as F,t as H,u as w,v as Z,w as v,y as tt,z as f}from"./chunk-MGZDEW3X.js";import{w as q}from"./chunk-BALEFXOL.js";import"./chunk-B4FPKDMH.js";import"./chunk-MTF66YXU.js";import"./chunk-4KP27OCL.js";import{a as J,b as K}from"./chunk-J4R6QXW7.js";import{b as Y}from"./chunk-5SBBTR3Y.js";import"./chunk-WMDKJRDC.js";import"./chunk-H4OY4EFC.js";import"./chunk-TQLZ3TRU.js";import{e as M}from"./chunk-S4KF5Z3S.js";import{b as R,d as X}from"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";import{mkdirSync as dt}from"node:fs";import{extname as pt,join as ut}from"node:path";var nt=200,z="7.1-preview.4",ft="7.1-preview.1",Nt=["like","dislike","heart","hooray","smile","confused"],gt=["System.Id","System.WorkItemType","System.Title","System.State","System.AssignedTo","System.IterationPath","System.ChangedDate"],wt=new Set(["System.Description","System.History"]),yt=new Set(["System.Title","System.State","System.Reason","System.AssignedTo","System.AreaPath","System.IterationPath","System.Tags"]),st=["html","history"],ot={priority:"Microsoft.VSTS.Common.Priority",severity:"Microsoft.VSTS.Common.Severity",storypoints:"Microsoft.VSTS.Scheduling.StoryPoints",effort:"Microsoft.VSTS.Scheduling.Effort",remainingwork:"Microsoft.VSTS.Scheduling.RemainingWork",originalestimate:"Microsoft.VSTS.Scheduling.OriginalEstimate",completedwork:"Microsoft.VSTS.Scheduling.CompletedWork",acceptancecriteria:"Microsoft.VSTS.Common.AcceptanceCriteria",reprosteps:"Microsoft.VSTS.TCM.ReproSteps",activity:"Microsoft.VSTS.Common.Activity",valuearea:"Microsoft.VSTS.Common.ValueArea"};function h(t){return typeof t=="string"&&t?t:null}function k(t){return t.toLowerCase()}function A(t){if(t.includes("."))return t;let e=t.toLowerCase().replace(/ /g,"");return Object.hasOwn(ot,e)?ot[e]:`System.${t}`}function it(t){return t.startsWith("System.")?t.slice(7):t}function O(t){let e={id:l(t,"id"),rev:l(t,"rev")};for(let[i,o]of Object.entries(C(t.fields))){if(i==="System.Id")continue;let a=o;Q(a)&&("uniqueName"in a||"displayName"in a)&&(a=U(a)),e[it(i)]=a}let n=Object.fromEntries(Object.entries(C(t.multilineFieldsFormat)).map(([i,o])=>[it(i),o]));return Object.keys(n).length&&(e.formats=n),u(t.relations)&&(e.relations=$(t.relations).map(i=>({rel:l(i,"rel"),url:l(i,"url"),name:l(C(l(i,"attributes")),"name")}))),e}function ht(t,e=new Set,n="Markdown"){let i=[];for(let[o,a]of t){let s=A(o);i.push({op:"add",path:`/fields/${s}`,value:a}),e.has(s)&&i.push({op:"add",path:`/multilineFieldsFormat/${s}`,value:n})}return i}function at(t){return t.map(([e,n])=>[e,n.startsWith("@")?L(n):n])}async function St(t,e,n,i,o){Y(t,e,n,i,null);let a=new Set;for(let s of new Set(o.map(([r])=>A(r))))if(wt.has(s))a.add(s);else if(!yt.has(s)){let r=await e.lookups(()=>p(t,e,`${f(e)}/_apis/wit/fields/${J(s)}`));st.includes(String(r.type))&&a.add(s)}return a}async function rt(t,e,n,i,o){return ht(o,await St(t,e,n,i,o),t.args.html?"Html":"Markdown")}async function ct(t,e,n,i,o){return _(await T(t,e,n,i,{body:b(o),headers:{"Content-Type":"application/json-patch+json"}}))}function $t(t){return t.split(",").map(e=>A(e.trim())).join(",")}async function Vt(t){let e=t.args,n=await w(t),i=[];h(e.fields)?i.push(["fields",$t(String(e.fields))]):e.relations&&i.push(["$expand","relations"]);let o=await p(t,n,`${f(n)}/_apis/wit/workitems/${v(e.id,"wi",n)}`,i);await t.emit(O(o))}async function Dt(t){let e=t.args,n=await w(t),i=f(n),o;if(h(e.saved))o=await p(t,n,`${i}/_apis/wit/wiql/${String(e.saved)}`);else{let c=L(String(e.wiql));o=_(await T(t,n,"POST",`${i}/_apis/wit/wiql`,{body:b({query:c})}))}let a=u(o.workItems)?$(o.workItems):$(o.workItemRelations).map(c=>l(c,"target")).filter(c=>u(c)),s=[...new Set(a.filter(c=>u(c)).map(c=>c.id))],r=D(e);r!==null&&s.length>r&&(H(r,!0,`of ${s.length} work items`),s=s.slice(0,r));let d=h(e.fields)?String(e.fields).split(",").map(c=>A(c.trim())):gt,m=[];for(let c=0;c<s.length;c+=nt){let g={ids:s.slice(c,c+nt),fields:d};m.push(...P(_(await T(t,n,"POST",`${i}/_apis/wit/workitemsbatch`,{body:b(g)}))))}await t.emit(m.map(O))}async function Ft(t){let e=t.args,n=await w(t),i=[["System.Title",String(e.title)],...at(q(e.field,"--field"))];h(e.assign)&&i.push(["System.AssignedTo",String(e.assign)]);let o=`${f(n)}/_apis/wit/workitems/$${J(String(e.type))}`,a=await rt(t,n,"POST",o,i);if(h(e.parent)){let s=v(e.parent,"wi",n),r=J(Z(n).org);a.push({op:"add",path:"/relations/-",value:{rel:"System.LinkTypes.Hierarchy-Reverse",url:`https://dev.azure.com/${r}/_apis/wit/workItems/${s}`}})}await t.emit(O(await ct(t,n,"POST",o,a)))}async function Ht(t){let e=t.args,n=at(q(e.field,"--field"));for(let[r,d]of[["System.State",e.state],["System.Title",e.title],["System.AssignedTo",e.assign]])typeof d=="string"&&n.push([r,d]);let i=u(e.addTag)||u(e.removeTag);if(i&&n.some(([r])=>A(r)==="System.Tags"))throw new R("use --field Tags or --add-tag/--remove-tag, not both");if(!n.length&&!i)throw new R("nothing to update",{hint:"pass --field, --state, --title, --assign, --add-tag or --remove-tag"});let o=await w(t),a=`${f(o)}/_apis/wit/workitems/${v(e.id,"wi",o)}`,s=await rt(t,o,"PATCH",a,n);for(let r of s)r.path==="/fields/System.Tags"&&(r.op="replace");if(i&&(s=[...await vt(t,o,a,G(e.addTag),G(e.removeTag)),...s]),!s.length){M("nothing to change: the tags are already as asked"),await t.emit(O(await p(t,o,a)));return}await t.emit(O(await ct(t,o,"PATCH",a,s)))}function G(t){let e=[];for(let n of t??[])for(let i of n.split(/[;,]/)){let o=i.trim();o&&!e.some(a=>k(a)===k(o))&&e.push(o)}return e}async function vt(t,e,n,i,o){if(!o.length)return i.length?[{op:"add",path:"/fields/System.Tags",value:i.join("; ")}]:[];let a=await e.lookups(()=>p(t,e,n,[["fields","System.Tags"]])),s=G([S(y(l(C(a.fields),"System.Tags"),""))??""]),r=Tt(s,i,o);if(r.map(k).join("\0")===s.map(k).join("\0")&&r.length===s.length)return[];let d=r.length?{op:"replace",path:"/fields/System.Tags",value:r.join("; ")}:{op:"remove",path:"/fields/System.Tags"};return[{op:"test",path:"/rev",value:l(a,"rev")},d]}function Tt(t,e,n){let i=new Set(n.map(k)),o=t.filter(s=>!i.has(k(s))),a=new Set(o.map(k));return[...o,...e.filter(s=>!a.has(k(s)))]}async function Wt(t){let e=t.args,n=await w(t),i=v(e.id,"wi",n),o=await p(t,n,`${f(n)}/_apis/wit/workitems/${i}`,[["$expand","relations"]]),s=$(o.relations).filter(m=>l(m,"rel")==="AttachedFile").map(m=>{let c=C(m.attributes),g=S(y(m.url??null,""))??"";return[N({id:g.replace(/\/+$/,"").split("/").pop()??"",name:l(c,"name"),size:l(c,"resourceSize"),added:l(c,"authorizedDate"),comment:y(c.comment??null,null)}),l(m,"url")]}),r=h(e.name);if(r){let m=r.split(",").map(c=>c.trim().toLowerCase()).filter(c=>c);if(s=s.filter(([c])=>m.some(g=>B((S(y(c.name??null,""))??"").toLowerCase(),g))),!s.length)throw new X(`work item ${i} has no attachment matching '${r}'`,{service:"devops",hint:`run: ppdo-cli ado wi attachments ${i}`})}let d=h(e.save);if(d){dt(d,{recursive:!0});let m=new Set;for(let[c,g]of s){let x=ut(d,kt(S(y(c.name??null,c.id))??"",m));await T(t,n,"GET",String(g),{params:[["download","true"]],headers:{Accept:"application/octet-stream"},saveTo:x}),c.file=x}}await t.emit(s.map(([m])=>m))}function kt(t,e){let n=/^\.+[^.]*$/.test(t)?"":pt(t),i=n?t.slice(0,-n.length):t,o=t,a=1;for(;e.has(o.toLowerCase());)a++,o=`${i} (${a})${n}`;return e.add(o.toLowerCase()),o}async function Ut(t){let e=await w(t),n=P(await p(t,e,`${f(e)}/_apis/wit/tags`)).map(i=>({name:l(i,"name"),id:l(i,"id"),last_updated:l(i,"lastUpdated")}));await t.emit(F(V(n,i=>k(S(y(i.name,""))??"")),t.args,"tags"))}async function zt(t){let e=t.args,n=await w(t),i=v(e.id,"wi",n),o=`${f(n)}/_apis/wit/workItems/${i}/comments`,a=typeof e.delete=="number"?e.delete:null,s=typeof e.edit=="number"?e.edit:null,r=typeof e.body=="string"?e.body:null;if(a!==null){if(r!==null||e.html)throw new R("--delete takes no --body or --html");await T(t,n,"DELETE",`${o}/${a}`,{params:[["api-version",z]]}),await t.emit({work_item:i,comment:a,deleted:!0});return}if(r===null)throw new R("--body is required",{hint:"pass --body text|@file|-"});let d=[["format",e.html?"html":"markdown"],["api-version",z]],m=b({text:L(r)});if(s!==null){let g=_(await T(t,n,"PATCH",`${o}/${s}`,{params:d,body:m}));await t.emit({work_item:l(g,"workItemId"),comment:l(g,"id"),format:l(g,"format"),version:l(g,"version"),modified:l(g,"modifiedDate")});return}let c=_(await T(t,n,"POST",o,{params:d,body:m}));await t.emit({work_item:l(c,"workItemId"),comment:l(c,"id"),format:l(c,"format"),created:l(c,"createdDate")})}async function Gt(t){let e=t.args,n=await w(t),i=`${f(n)}/_apis/wit/queries`,o=e.wiql?[["$expand","wiql"]]:[],a=h(e.folder),s=a?et(a).replace(/\\/g,"/").replace(/^\/+|\/+$/g,""):null,r,d=h(e.name);if(d){let m=await p(t,n,i,[["$filter",d],["$top","200"],...o]);r=P(m),s&&(r=r.filter(c=>(S(y(c.path??null,""))??"").toLowerCase().startsWith(s.toLowerCase()+"/"))),u(m.hasMore)&&M("more than 200 queries match; showing the first 200 (use a longer --name)")}else{let m=s?[await p(t,n,`${i}/${J(s)}`,[["$depth","2"],...o])]:P(await p(t,n,i,[["$depth","2"],...o]));r=await lt(t,n,i,m,o)}r=V(r,m=>(S(y(m.path??null,""))??"").toLowerCase()),await t.emit(F(r.map(m=>Ct(m,!!e.wiql)),e,"queries"))}var Jt={getJson:p};async function lt(t,e,n,i,o){let a=[];for(let s of i){if(!u(s.isFolder)){a.push(s);continue}let r=s.children;r==null&&u(s.hasChildren)&&(r=(await Jt.getJson(t,e,`${n}/${j(s.id)}`,[["$depth","2"],...o])).children),a.push(...await lt(t,e,n,$(r),o))}return a}function Ct(t,e){let n={id:l(t,"id"),name:l(t,"name"),path:l(t,"path"),type:l(t,"queryType"),shared:l(t,"isPublic"),modified:l(t,"lastModifiedDate")};return u(t.isInvalidSyntax)&&(n.invalid=!0),e&&(n.wiql=l(t,"wiql")),n}async function Xt(t){let e=t.args,n=await w(t),i=`${f(n)}/_apis/wit/workItems/${v(e.id,"wi",n)}/comments`,o=D(e),a=!!e.reactions,s=[],r=null;for(;;){let d=[["order","desc"],["$top","200"],["api-version",z]];a&&d.push(["$expand","reactions"]),u(r)&&d.push(["continuationToken",j(r)]);let m=await p(t,n,i,d);if(s.push(...$(m.comments).map(c=>Pt(c,a))),r=l(m,"continuationToken"),!u(r)||o!==null&&s.length>o)break}o!==null&&s.length>o&&(H(o,!0,"comments"),s=s.slice(0,o)),await t.emit(s)}function Pt(t,e=!1){let n={id:l(t,"id"),author:U(t.createdBy),created:l(t,"createdDate"),modified:l(t,"modifiedDate")!==l(t,"createdDate")?l(t,"modifiedDate"):null,format:l(t,"format"),text:l(t,"text")};if(e){let i=$(t.reactions).filter(o=>u(o.count));n.reactions=Object.fromEntries(i.map(o=>[String(o.type),o.count])),n.reacted=i.filter(o=>u(o.isCurrentUserEngaged)).map(o=>o.type)}return N(n)}async function Yt(t){let e=t.args,n=await w(t),i=f(n),o=`${i}/_apis/wit/workitemtypes/${J(String(e.type))}`,a=P(await p(t,n,`${o}/fields`,[["$expand","allowedValues"]])),s=new Map;for(let c of P(await p(t,n,`${i}/_apis/wit/fields`)))s.set(l(c,"referenceName"),c);let r=P(await p(t,n,`${o}/states`)),d=a.map(c=>_t(c,C(s.get(l(c,"referenceName"))),r)),m=h(e.name);m&&(d=d.filter(c=>jt(c,m))),await t.emit(e.required?d.filter(c=>c.required):d)}function jt(t,e){let n=[(S(y(t.name??null,""))??"").toLowerCase(),(S(y(t.reference_name??null,""))??"").toLowerCase()];for(let i of e.split(",").map(o=>o.trim()).filter(o=>o))if(n.some(o=>B(o,i.toLowerCase()))||A(i)===t.reference_name)return!0;return!1}function _t(t,e,n){let i=l(t,"referenceName"),o={name:l(t,"name"),reference_name:i,type:l(e,"type"),required:u(t.alwaysRequired)},a=l(t,"defaultValue");a!==null&&a!==""&&(o.default=a);let s=$(t.allowedValues);i==="System.State"&&n.length&&(s=n.map(r=>l(r,"name"))),s.length&&(o.allowed_values=s),i==="System.State"&&n.length&&(o.states=n.map(r=>({name:l(r,"name"),category:l(r,"category")})));for(let[r,d]of[["other_values_allowed",e.isPicklistSuggested],["long_text",st.includes(String(e.type))],["identity",e.isIdentity],["read_only",e.readOnly]])u(d)&&(o[r]=!0);return o}async function Kt(t){let e=t.args,n=await w(t),i=v(e.id,"wi",n),o=`${f(n)}/_apis/wit/workItems/${i}/comments/${String(e.comment)}/reactions/${String(e.reaction)}`,a=_(await T(t,n,e.remove?"DELETE":"PUT",o,{params:[["api-version",ft]]}));await t.emit({work_item:i,comment:"commentId"in a?a.commentId:e.comment,reaction:"type"in a?a.type:e.reaction,count:l(a,"count"),reacted:l(a,"isCurrentUserEngaged")})}async function Qt(t){let e=t.args,n=await w(t),{getPr:i,linkWorkItem:o}=await import("./prs-F2EVQJRV.js"),a=v(e.id,"wi",n);if(h(e.pr)){let I=v(e.pr,"pr",n),E=await W(t,n,async()=>(await i(t,n,I)).repository);await o(t,n,E,I,a),await t.emit({work_item:a,pr:I});return}let s=String(e.commit),r=tt(s,n),d=/\/_git\/([^/?#]+)\/commits?\//.exec(s),m=d?K(d[1]):h(e.repo);if(!m)throw new R("--commit with a SHA needs --repo",{hint:"or paste the commit's URL"});let[c,g]=await W(t,n,async()=>{let I=await p(t,n,`${f(n)}/_apis/git/repositories/${J(m)}`),E=await p(t,n,`${f(n)}/_apis/git/repositories/${j(I.id)}/commits/${r}`);return[I,E]}),x=j(g.commitId),mt="vstfs:///Git/Commit/"+J(`${j(C(c.project).id)}/${j(c.id)}/${x}`,"");await xt(t,n,a,mt,"Fixed in Commit"),await t.emit({work_item:a,commit:x,repo:c.name??null})}async function xt(t,e,n,i,o){let a=`${f(e)}/_apis/wit/workitems/${n}`,s=await e.lookups(()=>p(t,e,a,[["$expand","relations"]]));if($(s.relations).some(d=>(S(y(l(d,"url"),""))??"").toLowerCase()===i.toLowerCase()))return;await T(t,e,"PATCH",a,{body:b([{op:"add",path:"/relations/-",value:{rel:"ArtifactLink",url:i,attributes:{name:o}}}]),headers:{"Content-Type":"application/json-patch+json"}})}export{nt as BATCH,z as COMMENTS_API,gt as DEFAULT_FIELDS,Nt as REACTIONS,ft as REACTIONS_API,Wt as attachments,zt as comment,Xt as comments,Ft as create,Jt as fetcher,A as fieldName,Yt as fields,kt as freeName,Vt as getOne,Qt as link,ht as patchOps,Gt as queries,Dt as query,lt as queryTree,Kt as react,Tt as tagAfter,G as tagList,Ut as tags,Ht as update,O as wiRow};
|
package/package.json
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@ppdostudio/ppdo-cli",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
4
|
-
"description": "Power Platform DevOps Studio CLI: Dataverse and Azure DevOps for agents and people",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"power-platform",
|
|
7
|
-
"dataverse",
|
|
8
|
-
"azure-devops",
|
|
9
|
-
"cli",
|
|
10
|
-
"agents",
|
|
11
|
-
"dynamics-365",
|
|
12
|
-
"power-apps",
|
|
13
|
-
"claude-code",
|
|
14
|
-
"github-copilot"
|
|
15
|
-
],
|
|
16
|
-
"license": "SEE LICENSE IN LICENSE",
|
|
17
|
-
"author": "Dylan Haskins and Ryan James",
|
|
18
|
-
"homepage": "https://powerplatformdevops.studio/",
|
|
19
|
-
"repository": {
|
|
20
|
-
"type": "git",
|
|
21
|
-
"url": "git+https://github.com/PPDOStudio/ppdo-cli-release.git"
|
|
22
|
-
},
|
|
23
|
-
"bugs": {
|
|
24
|
-
"url": "https://github.com/PPDOStudio/ppdo-cli-release/issues"
|
|
25
|
-
},
|
|
26
|
-
"type": "module",
|
|
27
|
-
"bin": {
|
|
28
|
-
"ppdo-cli": "dist/bin.js"
|
|
29
|
-
},
|
|
30
|
-
"files": [
|
|
31
|
-
"dist",
|
|
32
|
-
"skills",
|
|
33
|
-
"schema",
|
|
34
|
-
"CHANGELOG.md",
|
|
35
|
-
"THIRD-PARTY-NOTICES"
|
|
36
|
-
],
|
|
37
|
-
"scripts": {
|
|
38
|
-
"build": "node scripts/bundle.mjs",
|
|
39
|
-
"typecheck": "tsc --noEmit",
|
|
40
|
-
"test": "vitest run"
|
|
41
|
-
},
|
|
42
|
-
"devDependencies": {
|
|
43
|
-
"@azure/msal-node": "^5.3.1",
|
|
44
|
-
"@types/node": "^24.0.0",
|
|
45
|
-
"commander": "^14.0.0",
|
|
46
|
-
"esbuild": "^0.27.4",
|
|
47
|
-
"fflate": "^0.8.2",
|
|
48
|
-
"typescript": "^5.6.0",
|
|
49
|
-
"vitest": "^3.2.7"
|
|
50
|
-
},
|
|
51
|
-
"engines": {
|
|
52
|
-
"node": ">=22.12.0"
|
|
53
|
-
},
|
|
54
|
-
"optionalDependencies": {
|
|
55
|
-
"@azure/msal-node-extensions": "^5.6.1"
|
|
56
|
-
}
|
|
57
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@ppdostudio/ppdo-cli",
|
|
3
|
+
"version": "1.0.0-beta.1",
|
|
4
|
+
"description": "Power Platform DevOps Studio CLI: Dataverse and Azure DevOps for agents and people",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"power-platform",
|
|
7
|
+
"dataverse",
|
|
8
|
+
"azure-devops",
|
|
9
|
+
"cli",
|
|
10
|
+
"agents",
|
|
11
|
+
"dynamics-365",
|
|
12
|
+
"power-apps",
|
|
13
|
+
"claude-code",
|
|
14
|
+
"github-copilot"
|
|
15
|
+
],
|
|
16
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
17
|
+
"author": "Dylan Haskins and Ryan James",
|
|
18
|
+
"homepage": "https://powerplatformdevops.studio/",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/PPDOStudio/ppdo-cli-release.git"
|
|
22
|
+
},
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/PPDOStudio/ppdo-cli-release/issues"
|
|
25
|
+
},
|
|
26
|
+
"type": "module",
|
|
27
|
+
"bin": {
|
|
28
|
+
"ppdo-cli": "dist/bin.js"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist",
|
|
32
|
+
"skills",
|
|
33
|
+
"schema",
|
|
34
|
+
"CHANGELOG.md",
|
|
35
|
+
"THIRD-PARTY-NOTICES"
|
|
36
|
+
],
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "node scripts/bundle.mjs",
|
|
39
|
+
"typecheck": "tsc --noEmit",
|
|
40
|
+
"test": "vitest run"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@azure/msal-node": "^5.3.1",
|
|
44
|
+
"@types/node": "^24.0.0",
|
|
45
|
+
"commander": "^14.0.0",
|
|
46
|
+
"esbuild": "^0.27.4",
|
|
47
|
+
"fflate": "^0.8.2",
|
|
48
|
+
"typescript": "^5.6.0",
|
|
49
|
+
"vitest": "^3.2.7"
|
|
50
|
+
},
|
|
51
|
+
"engines": {
|
|
52
|
+
"node": ">=22.12.0"
|
|
53
|
+
},
|
|
54
|
+
"optionalDependencies": {
|
|
55
|
+
"@azure/msal-node-extensions": "^5.6.1"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -44,11 +44,13 @@
|
|
|
44
44
|
"identity": {
|
|
45
45
|
"type": "object",
|
|
46
46
|
"additionalProperties": false,
|
|
47
|
-
"required": ["
|
|
47
|
+
"if": { "properties": { "method": { "const": "pat" } }, "required": ["method"] },
|
|
48
|
+
"then": { "required": ["organization", "username"] },
|
|
49
|
+
"else": { "required": ["tenant"] },
|
|
48
50
|
"properties": {
|
|
49
51
|
"tenant": {
|
|
50
52
|
"type": "string",
|
|
51
|
-
"description": "Entra tenant id or domain, for example contoso.onmicrosoft.com."
|
|
53
|
+
"description": "Entra tenant id or domain, for example contoso.onmicrosoft.com. Not needed for pat."
|
|
52
54
|
},
|
|
53
55
|
"username": {
|
|
54
56
|
"type": "string",
|
|
@@ -56,9 +58,9 @@
|
|
|
56
58
|
},
|
|
57
59
|
"method": {
|
|
58
60
|
"type": "string",
|
|
59
|
-
"enum": ["broker", "browser", "device_code", "az_cli", "spn"],
|
|
61
|
+
"enum": ["broker", "browser", "device_code", "az_cli", "spn", "pat"],
|
|
60
62
|
"default": "browser",
|
|
61
|
-
"description": "How to sign in: browser, broker (Windows single sign-on), device_code, az_cli (the Azure CLI's sign-in)
|
|
63
|
+
"description": "How to sign in: browser, broker (Windows single sign-on), device_code, az_cli (the Azure CLI's sign-in), spn (a service principal) or pat (an Azure DevOps personal access token, for one organization)."
|
|
62
64
|
},
|
|
63
65
|
"client_id": {
|
|
64
66
|
"type": "string",
|
|
@@ -75,6 +77,16 @@
|
|
|
75
77
|
"certificate": {
|
|
76
78
|
"type": "string",
|
|
77
79
|
"description": "spn only, instead of secret_env: a PEM file with the private key and the certificate, or a PFX/P12 file without a password."
|
|
80
|
+
},
|
|
81
|
+
"organization": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]{0,48}[A-Za-z0-9])?$",
|
|
84
|
+
"description": "pat only: the one Azure DevOps organization the PAT is for. Every environment in a group that uses this identity must be in it."
|
|
85
|
+
},
|
|
86
|
+
"pat_env": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
|
|
89
|
+
"description": "pat only: the name of an environment variable that holds the PAT, for pipelines. Without it, ppdo-cli auth login stores the PAT encrypted. The PAT itself is never in this file."
|
|
78
90
|
}
|
|
79
91
|
}
|
|
80
92
|
},
|
package/skills/ppdo-cli/SKILL.md
CHANGED
|
@@ -12,7 +12,7 @@ description: Use the ppdo-cli CLI to reach Dataverse and Azure DevOps. Load befo
|
|
|
12
12
|
1. Run `ppdo-cli whoami`. For each service it shows the environment, its group and mode, and the account.
|
|
13
13
|
2. Check the mode against your plan. If the task needs a write in a `read-only` environment, or a delete outside `full`, tell the user **before** you start, not halfway through.
|
|
14
14
|
3. Tell the user which environment and account you are about to use before you change anything.
|
|
15
|
-
4. If a command exits 3, ask the user to run the `ppdo-cli auth login …` command from the hint. Never try to sign in yourself.
|
|
15
|
+
4. If a command exits 3, ask the user to run the `ppdo-cli auth login …` command from the hint. Never try to sign in yourself. For an identity with method `pat`, the user pastes a new PAT at that command (or sets the variable the hint names); never ask the user for a PAT, and never put one in a command, file or variable yourself.
|
|
16
16
|
|
|
17
17
|
## Which skill
|
|
18
18
|
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import{e as o,o as a,r as t}from"./chunk-BALEFXOL.js";import"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";var s=["dv","dataverse","ado","devops"];function p(d){let n=a(d,"auth","sign in, sign out, tokens"),i=()=>import("./run-SRQPP6N3.js");t(n,"login","L","interactive sign-in for an identity",{description:`ppdo-cli auth login <identity> sign in one identity
|
|
3
|
-
ppdo-cli auth login --service ado sign in the identity the default DevOps environment uses
|
|
4
|
-
ppdo-cli auth login --env <name> sign in the identity that environment's group uses
|
|
5
|
-
ppdo-cli auth login sign in every identity the default environments need that
|
|
6
|
-
has no valid session`}).argument("[identity]").argKey("identity","name").addOption(new o("--service <service>").choices(s)).option("--device-code","use the device code flow this time").handler(async e=>(await i()).login(e)),t(n,"logout","L","delete an identity's token caches").argument("[identity]").argKey("identity","name").option("--all","every identity").handler(async e=>(await i()).logout(e)),t(n,"status","L","sign-in state and cached tokens per identity").argument("[identity]").argKey("identity","name").handler(async e=>(await i()).status(e)),t(n,"token","L","print an access token for scripts (curl, PowerShell)").addOption(new o("--service <service>").choices(s)).option("--scope <scope>","any other resource scope, e.g. https://graph.microsoft.com/.default").option("--show","print even when stdout is a terminal").handler(async e=>(await i()).token(e))}export{p as register};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import{a as d}from"./chunk-MME53RWW.js";import"./chunk-GT52BRS2.js";import"./chunk-4S5ETLH4.js";import"./chunk-J4R6QXW7.js";import"./chunk-5SBBTR3Y.js";import"./chunk-UYDBLVAM.js";import{b as l}from"./chunk-3C3GSN3J.js";import"./chunk-RHQP7X6H.js";import"./chunk-TQLZ3TRU.js";import"./chunk-S4KF5Z3S.js";import{b as m,c as p}from"./chunk-WXOTXJNG.js";import"./chunk-ZHHVG47C.js";import{execFile as w}from"node:child_process";import{statSync as x}from"node:fs";import{delimiter as h,extname as b,join as y}from"node:path";var E=12e4;function v(t){let n={...process.env};return t.configDir&&(n.AZURE_CONFIG_DIR=d(t.configDir)),n}function g(t){return`run: ${t.configDir?`AZURE_CONFIG_DIR=${t.configDir} `:""}az login --tenant ${t.tenant}`}function A(t){let n=process.platform==="win32"?(process.env.PATHEXT||".COM;.EXE;.BAT;.CMD").split(";").filter(o=>o):[""];for(let o of(process.env.PATH||"").split(h))if(o)for(let i of b(t)?[""]:n){let e=y(o,t+i);try{if(x(e).isFile())return e}catch{}}return null}function I(t,n,o){let i=t,e=n,s=!1;if(process.platform==="win32"&&/\.(cmd|bat)$/i.test(t)){for(let r of[t,...n])if(/["%\r\n]/.test(r))throw new m(`cannot pass '${r}' to az safely`);i=process.env.ComSpec||"cmd.exe",e=["/d","/s","/c",`"${[t,...n].map(r=>`"${r}"`).join(" ")}"`],s=!0}return new Promise(r=>{w(i,e,{env:o,timeout:E,windowsHide:!0,windowsVerbatimArguments:s,maxBuffer:16<<20},(c,a,u)=>{let f=c;r({code:f?typeof f.code=="number"?f.code:1:0,stdout:String(a),stderr:String(u),timedOut:!!f?.killed})})})}async function T(t,n){let o=A("az");if(!o)throw new m("method 'az_cli' needs the Azure CLI on PATH",{hint:"install it, or use --method browser"});let i=["account","get-access-token","--scope",n,"--output","json"];t.tenant&&i.push("--tenant",t.tenant);let e=await I(o,i,v(t));if(e.timedOut)throw new p("az account get-access-token timed out",{hint:g(t)});if(e.code!==0){let a=e.stderr.split(/\r?\n/).map(u=>u.trim()).find(u=>u)??"az failed";throw new p(`az could not get a token for identity '${t.name}': ${a}`,{hint:g(t)})}let s=JSON.parse(e.stdout),r=s.accessToken,c=s.expires_on;if(c==null){let a=l(r)?.exp;c=typeof a=="number"?a:Date.now()/1e3+300}return[r,Number(c),s.tenant??null]}export{E as AZ_TIMEOUT_MS,T as acquire,g as loginHint,A as which};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
2
|
-
import{e as p,f as m}from"./chunk-RHQP7X6H.js";import{a}from"./chunk-TQLZ3TRU.js";import{c as u}from"./chunk-WXOTXJNG.js";import{unlinkSync as y}from"node:fs";import{join as k}from"node:path";var h=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;function S(n){return!!(n&&h.test(n))}function D(n){let t=n.split(".")[1];if(t===void 0)return null;try{if(!/^[A-Za-z0-9_=-]*$/.test(t))return null;let e=JSON.parse(Buffer.from(t,"base64url").toString("utf8"));return typeof e=="object"&&e!==null&&!Array.isArray(e)?e:null}catch{return null}}function s(n){return n.toLowerCase().replace(new RegExp("\xDF","g"),"ss")}function x(n){let t=new Set;for(let e of["upn","preferred_username","unique_name","email"]){let r=n[e];if(typeof r=="string"&&r){t.add(s(r));let o=r.indexOf("#");o>=0&&t.add(s(r.slice(o+1)))}}return t}function I(n,t,e,r){if(!r)return;let o=typeof r.tid=="string"?r.tid:null;if(e&&o&&o.toLowerCase()!==e.toLowerCase())throw new u(`identity '${n}' returned a token for tenant ${o}, expected ${e}`,{hint:`run: ppdo-cli auth login ${n}`});let i=x(r);if(t&&i.size&&!i.has(s(t)))throw new u(`identity '${n}' returned a token for ${[...i].sort()[0]}, expected ${t}`,{hint:`run: ppdo-cli auth login ${n}`})}var w=300;function l(n){return k(a(),`tokens.${n}.bin`)}function C(n){return k(a(),`msal.${n}.bin`)}function b(n){let t=[];for(let e of[l(n),C(n)])t.push(e,e+".lock");return t}function j(n){let t=[];for(let e of b(n))try{y(e),t.push(e)}catch(r){let o=r.code;if(o!=="ENOENT"&&o!=="EPERM"&&o!=="EACCES"&&o!=="EBUSY")throw r}return t}function c(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function _(n){let t=p(l(n));if(!t)return{account:null,tokens:{}};let e;try{e=JSON.parse(t.toString("utf8"))}catch{return{account:null,tokens:{}}}return c(e)?{...e,account:c(e.account)?e.account:null,tokens:c(e.tokens)?e.tokens:{}}:{account:null,tokens:{}}}function B(n,t){m(l(n),Buffer.from(JSON.stringify(t),"utf8"))}function f(n,t){return n.tenant===t.tenant&&n.client_id===t.effectiveClientId&&s(n.username??"")===s(t.username??"")}function N(n,t,e=_(n.name)){let r=e.tokens[t];return!r||!f(r,n)||(r.expires_on??0)-Date.now()/1e3<w?null:r.access_token??null}function T(n,t,e,r,o){n.tokens[e]={access_token:r,expires_on:Math.trunc(o),tenant:t.tenant,username:t.username,client_id:t.effectiveClientId}}function A(n,t){let e=n.account;return!!(e&&Object.keys(e).length)&&f(e,t)}function J(n){let t=_(n.name),e=t.account??{},r=Date.now()/1e3,o=Object.keys(t.tokens).sort().map(i=>{let d=t.tokens[i],g=Math.trunc((d.expires_on??0)-r);return{scope:i,valid:g>0&&f(d,n),expires_in_minutes:Math.max(0,Math.floor(g/60))}});return{signed_in:A(t,n),account:e.username??null,tenant_id:e.tenant_id??null,signed_in_at:e.signed_in_at??null,tokens:o}}export{S as a,D as b,s as c,x as d,I as e,w as f,l as g,C as h,b as i,j,_ as k,B as l,N as m,T as n,A as o,J as p};
|