@makaio/framework 1.0.0-dev-1781081952714 → 1.0.0-dev-1781260968078
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/README.md +29 -0
- package/dist/.makaio-build.json +2 -2
- package/dist/adapters/acp-client/index.d.mts +4 -4
- package/dist/adapters/config/index.d.mts +1 -1
- package/dist/adapters/config/index.mjs +1 -1
- package/dist/adapters/index.d.mts +1 -1
- package/dist/adapters/index.mjs +1 -1
- package/dist/adapters/node.mjs +1 -1
- package/dist/ajv-BA2z5ztb.mjs +8 -0
- package/dist/bus/index.d.mts +19 -19
- package/dist/bus/index.mjs +1 -1
- package/dist/client-BJVDImPV.d.mts +175 -0
- package/dist/clients/index.d.mts +105 -2
- package/dist/clients/index.mjs +2 -2
- package/dist/contracts/adapter/index.d.mts +2 -2
- package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
- package/dist/contracts/artifact/index.d.mts +1 -1
- package/dist/contracts/client/index.d.mts +1 -1
- package/dist/contracts/extension/index.d.mts +3 -3
- package/dist/contracts/extension/index.mjs +1 -1
- package/dist/contracts/facet/index.d.mts +1 -1
- package/dist/contracts/index.d.mts +741 -228
- package/dist/contracts/index.mjs +1 -1
- package/dist/contracts/materialization/index.d.mts +3 -3
- package/dist/contracts/session/index.d.mts +2 -2
- package/dist/{cursor-storage-C_WTAESV.mjs → cursor-storage-CmKjSvKY.mjs} +1 -1
- package/dist/{definition-DqJOg6Lv.d.mts → definition-SiimP25_.d.mts} +1 -1
- package/dist/{detached-extension-handle-CxEBQnSa.mjs → detached-extension-handle-Diiwgm13.mjs} +1 -1
- package/dist/drizzle/0001_messages_content_tsv.na.md +18 -0
- package/dist/drizzle/0012_legal_kate_bishop.sql +3 -0
- package/dist/drizzle/0013_eager_rhodey.sql +56 -0
- package/dist/drizzle/0014_fancy_ultimo.sql +1 -0
- package/dist/drizzle/meta/0012_snapshot.json +2934 -0
- package/dist/drizzle/meta/0013_snapshot.json +2954 -0
- package/dist/drizzle/meta/0014_snapshot.json +2959 -0
- package/dist/drizzle/meta/_journal.json +21 -0
- package/dist/drizzle-wjquQK2m.mjs +1 -0
- package/dist/esm-CQVFKEW5.mjs +1 -0
- package/dist/expression/index.d.mts +11 -2
- package/dist/expression/index.mjs +4 -4
- package/dist/extension-DfNcE0zm.mjs +1 -0
- package/dist/extension-ZBN4BGre.mjs +1 -0
- package/dist/{filesystem-service-DH9zlxyd.mjs → filesystem-service-BjfrUmGS.mjs} +1 -1
- package/dist/git/index.mjs +14 -14
- package/dist/{globby-4SrlyIlj.mjs → globby-BIH65cbN.mjs} +1 -1
- package/dist/handler-DSfSAlxx.mjs +1 -0
- package/dist/handlers-C8EtpSqK.mjs +41 -0
- package/dist/{index-BCKRUuI2.d.mts → index-B2xbnMZe.d.mts} +1 -1
- package/dist/{index-YDfOv0GT.d.mts → index-BDRKAxIV.d.mts} +160 -7
- package/dist/{index-CwKzQuIX.d.mts → index-BQiHs8EF.d.mts} +12 -12
- package/dist/{index-BheaEhyI.d.mts → index-BtztOqaF.d.mts} +6 -6
- package/dist/{index-BmV60tMf.d.mts → index-BvSyOgTY.d.mts} +1298 -30
- package/dist/{index-D6bw4qJp.d.mts → index-CARxIllg.d.mts} +98 -98
- package/dist/{index-Bibt5jAX.d.mts → index-CZ_TcT6J.d.mts} +8 -8
- package/dist/{index-CNOTkyGw.d.mts → index-Cb64d5c5.d.mts} +307 -383
- package/dist/{index-DETxgKS2.d.mts → index-CgjslA5-.d.mts} +88 -15
- package/dist/{index-C3zfJg6s.d.mts → index-D5CI1V5d.d.mts} +16 -16
- package/dist/{index-jlQ4IhR5.d.mts → index-DDQkhhRo.d.mts} +281 -273
- package/dist/{index-Db0uJ_Cg2.d.mts → index-DTdqGAfH2.d.mts} +18 -8
- package/dist/{index-Clut1ljB.d.mts → index-Drz_a7kW.d.mts} +1 -1
- package/dist/kernel/extension/index.d.mts +1 -1
- package/dist/kernel/extension/index.mjs +1 -1
- package/dist/kernel/index.d.mts +2 -2
- package/dist/kernel/index.mjs +1 -1
- package/dist/kernel/observability/index.d.mts +1 -1
- package/dist/{lib-B9kVK_1_.mjs → lib-CNOQJtgs.mjs} +1 -1
- package/dist/{lib-DPruLs5D.mjs → lib-Cq5R6Tx9.mjs} +19 -22
- package/dist/lib-nlcl5kRW.mjs +2 -0
- package/dist/{load-extensions-C-TqCwzL.mjs → load-extensions-wELQ4BBN.mjs} +1 -1
- package/dist/mcp-http-server/index.mjs +1 -1
- package/dist/{namespace-ByyuIFpL.d.mts → namespace-7tsuJhQ9.d.mts} +28 -28
- package/dist/{namespace-BlS_i9KT.d.mts → namespace-B73Sxj5L.d.mts} +1 -1
- package/dist/{namespace-aBIAWxY3.d.mts → namespace-Ba4bxtHQ.d.mts} +12 -12
- package/dist/{namespace-DBKWNrk7.d.mts → namespace-DDCjoQUj.d.mts} +3 -3
- package/dist/{namespace-Ds6HkJEU.d.mts → namespace-DRFJN-_z.d.mts} +134 -134
- package/dist/namespace-DwE2g8Wm.mjs +1 -0
- package/dist/{orchestrator-shared-FnWrPS09.mjs → orchestrator-shared-Dt4WDse7.mjs} +1 -1
- package/dist/{out-CvZYgczi.mjs → out-C1JFb2Bp.mjs} +1 -1
- package/dist/package-Be2Ez4vv.mjs +1 -0
- package/dist/package.json +1 -1
- package/dist/primitive-runtime-Xrc9xh6p.mjs +1 -0
- package/dist/registry-RG-bkw3c.mjs +146 -0
- package/dist/rules/index.mjs +1 -1
- package/dist/runtime-bun/index.mjs +1 -1
- package/dist/runtime-node/extension-validation.mjs +1 -1
- package/dist/runtime-node/index.d.mts +57 -36
- package/dist/runtime-node/index.mjs +26 -53
- package/dist/runtime-node/makaio-config.mjs +1 -1
- package/dist/runtime-node/workflow-worker/index.d.mts +1 -1
- package/dist/runtime-node/workflow-worker/index.mjs +1 -1
- package/dist/{schema-CDL_pyyM.d.mts → schema-BNrM9LWb.d.mts} +216 -10
- package/dist/schema-BerZmr2q.mjs +1 -0
- package/dist/schema-BrnYlDwZ.mjs +1 -0
- package/dist/{schemas-t1VR6_b_.d.mts → schemas-CkOSG2eJ.d.mts} +3 -3
- package/dist/{schemas-Exixg77V2.d.mts → schemas-DAFYpgHk2.d.mts} +12 -12
- package/dist/{schemas-on3_N5HP.d.mts → schemas-Dv5FxHDT.d.mts} +134 -134
- package/dist/services/agent-runtime/index.d.mts +2 -2
- package/dist/services/agent-runtime/namespace.d.mts +1 -1
- package/dist/services/agent-runtime/schemas.d.mts +1 -1
- package/dist/services/filesystem/index.mjs +1 -1
- package/dist/services/filesystem/namespace.d.mts +6 -6
- package/dist/services/filesystem/schemas.d.mts +3 -3
- package/dist/services/git/namespace.d.mts +2 -2
- package/dist/services/git/schemas.d.mts +2 -2
- package/dist/services/harness/index.d.mts +29 -17
- package/dist/services/harness/index.mjs +1 -1
- package/dist/services/harness/storage/schema.d.mts +60 -16
- package/dist/services/harness/storage/schema.mjs +1 -1
- package/dist/services/index.d.mts +103 -103
- package/dist/services/index.mjs +1 -1
- package/dist/services/log-import/browser.d.mts +2 -2
- package/dist/services/log-import/index.d.mts +7 -12
- package/dist/services/log-import/index.mjs +2 -2
- package/dist/services/log-import/log-import.d.mts +1 -1
- package/dist/services/log-import/namespace.d.mts +2 -2
- package/dist/services/log-import/schemas.d.mts +1 -1
- package/dist/services/session/handlers/index.mjs +1 -1
- package/dist/services/session/index.d.mts +7 -7
- package/dist/services/session/index.mjs +1 -1
- package/dist/services/session/messages/namespace.d.mts +1 -1
- package/dist/services/session/messages/namespace.mjs +1 -1
- package/dist/services/session/orchestrator-testing/index.mjs +1 -1
- package/dist/services/session/session-events/namespace.d.mts +1 -1
- package/dist/services/session/session-events/namespace.mjs +1 -1
- package/dist/services/session/storage/namespace.d.mts +1 -1
- package/dist/services/session/storage/schema.d.mts +2 -2
- package/dist/services/session/storage/schema.mjs +1 -1
- package/dist/services/session/testing/index.d.mts +18 -2
- package/dist/services/session/testing/index.mjs +52 -3
- package/dist/services/session/testing/orchestrator-shared.mjs +1 -1
- package/dist/services/session/turns/namespace.d.mts +1 -1
- package/dist/services/session/turns/namespace.mjs +1 -1
- package/dist/services/settings/namespace.d.mts +12 -12
- package/dist/services/subagent-template/index.d.mts +1 -1
- package/dist/services/subagent-template/schemas.d.mts +1 -1
- package/dist/services/tool-approval/index.mjs +1 -1
- package/dist/services/tools/index.mjs +1 -1
- package/dist/session-KnewDVxt.mjs +39 -0
- package/dist/{session-lineage-CKg6mErA.d.mts → session-lineage-CXzV_hAP.d.mts} +1 -1
- package/dist/{src-Dvp41Cg2.mjs → src-CBG3IHUl.mjs} +1 -1
- package/dist/storage/drizzle/client.d.mts +2 -78
- package/dist/storage/drizzle/client.mjs +1 -1
- package/dist/storage/drizzle/columns/postgres.d.mts +88 -0
- package/dist/storage/drizzle/columns/postgres.mjs +1 -0
- package/dist/storage/drizzle/columns/sqlite.d.mts +81 -0
- package/dist/storage/drizzle/columns/sqlite.mjs +1 -0
- package/dist/storage/drizzle/index.d.mts +976 -23
- package/dist/storage/drizzle/index.mjs +1 -1
- package/dist/storage/handlers/drizzle/index.d.mts +1 -1
- package/dist/storage/handlers/drizzle/index.mjs +1 -1
- package/dist/storage/handlers/index.d.mts +1 -1
- package/dist/storage/handlers/index.mjs +1 -1
- package/dist/style.css +540 -540
- package/dist/testing/drizzle-harness.d.mts +52 -6
- package/dist/testing/drizzle-harness.mjs +1 -1
- package/dist/testing/index.d.mts +34 -2
- package/dist/testing/index.mjs +1 -1
- package/dist/{tool-approval-service-BgNcJvKx.mjs → tool-approval-service-Cb2F1yT6.mjs} +1 -1
- package/dist/tools-D5DVHC-R.mjs +1 -0
- package/dist/{types-CmMesAgR.d.mts → types-BMpIa4fx.d.mts} +1 -1
- package/dist/{types-D0fPFh-D.d.mts → types-D5IMwOkJ.d.mts} +1 -1
- package/dist/{types-DiGqpZOD.d.mts → types-DLVitCZP.d.mts} +195 -195
- package/dist/ui-components/index.d.mts +1 -1
- package/dist/ui-components/index.mjs +2 -2
- package/dist/ui-hooks/index.d.mts +6 -6
- package/dist/ui-views/index.mjs +2 -2
- package/dist/workflow-engine/index.d.mts +492 -96
- package/dist/workflow-engine/index.mjs +1 -1
- package/dist/workflow-engine/package.mjs +1 -1
- package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
- package/dist/workflow-worker-CK9Sqj7D.mjs +1 -0
- package/package.json +40 -1
- package/dist/ajv-BJsabpMb.mjs +0 -8
- package/dist/drizzle-DpjZFY_j.mjs +0 -1
- package/dist/esm-BdLRFEUy.mjs +0 -3
- package/dist/extension--5Q190u_.mjs +0 -1
- package/dist/extension-DFIZ3FCJ.mjs +0 -1
- package/dist/fast-uri-BF2Xuiop.mjs +0 -1
- package/dist/handlers-Bev7-xjL.mjs +0 -41
- package/dist/lib-aRogYLqg.mjs +0 -5
- package/dist/namespace-CDiM5Bcr.mjs +0 -1
- package/dist/namespace-h0HIuqx0.mjs +0 -1
- package/dist/package-1DS4bXg5.mjs +0 -1
- package/dist/primitive-runtime-DcYYWy_6.mjs +0 -8
- package/dist/schema-DCJyzRHe.mjs +0 -1
- package/dist/schema-DOnJmAPw.mjs +0 -1
- package/dist/session-BnfsJoZi.mjs +0 -134
- package/dist/tools-DC4KrqI1.mjs +0 -1
- package/dist/types-BhXRffJ_.d.mts +0 -31
- package/dist/workflow-worker-DvP753UN.mjs +0 -1
- /package/dist/{cleanEnvForAdapter-BlpmyXYk.mjs → cleanEnvForAdapter-vZfPGi0X.mjs} +0 -0
- /package/dist/{create-static-mount-CFGo91CI.mjs → create-static-mount-BB1MIQ9J.mjs} +0 -0
- /package/dist/{jsonl-transport-BxNXizIm.mjs → jsonl-transport-C21tpVfe.mjs} +0 -0
- /package/dist/{src-Z3vAZJfw.mjs → src-DedDL9iv.mjs} +0 -0
|
@@ -85,6 +85,27 @@
|
|
|
85
85
|
"when": 1780568212122,
|
|
86
86
|
"tag": "0011_solid_nomad",
|
|
87
87
|
"breakpoints": true
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"idx": 12,
|
|
91
|
+
"version": "6",
|
|
92
|
+
"when": 1781121894180,
|
|
93
|
+
"tag": "0012_legal_kate_bishop",
|
|
94
|
+
"breakpoints": true
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"idx": 13,
|
|
98
|
+
"version": "6",
|
|
99
|
+
"when": 1781166923626,
|
|
100
|
+
"tag": "0013_eager_rhodey",
|
|
101
|
+
"breakpoints": true
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"idx": 14,
|
|
105
|
+
"version": "6",
|
|
106
|
+
"when": 1781173496000,
|
|
107
|
+
"tag": "0014_fancy_ultimo",
|
|
108
|
+
"breakpoints": true
|
|
88
109
|
}
|
|
89
110
|
]
|
|
90
111
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{didAffectRows as e}from"@makaio/framework/storage/drizzle";import{and as t,eq as n,getTableColumns as r,inArray as i,sql as a}from"drizzle-orm";function o(e,t){return{[e]:t}}function s(e,t,n){let i=r(e);if(!n)return i[t];let a=n(e);if(a.length===0)throw Error(`createDrizzleCrudHandlers: conflictTarget returned an empty array. Provide at least one column for the conflict target.`);return a}function c(e,t,i){let{table:a,idField:s,singularKey:c,mapper:l,getSubject:u}=i;return e.on(u,async e=>{let{id:i}=e.payload,u=r(a)[s],[d]=await t.select().from(a).where(n(u,i)).limit(1);e.setResult(o(c,d?l(d):null))})}function l(e,t,i){let{table:o,idField:s,singularKey:c,mapper:l,toDbValues:u,setSubject:d,resolvedConflictTarget:f,lifecycle:p}=i;return e.on(d,async i=>{let d=i.payload[c],m=d[s],h=Date.now(),g=r(o),_=u(d),v={..._,[s]:m,createdAt:h,updatedAt:h};if(!p){await t.insert(o).values(v).onConflictDoUpdate({target:f,set:{..._,[s]:m,updatedAt:h,createdAt:a`COALESCE(${g.createdAt}, excluded.created_at)`}}),i.setResult({id:m});return}let y=await t.insert(o).values(v).onConflictDoNothing({target:f}).returning();if(y.length>0){await e.emit(p.created,l(y[0])),i.setResult({id:m});return}let[b]=await t.update(o).set({..._,updatedAt:h}).where(n(g[s],m)).returning();b&&await e.emit(p.updated,l(b)),i.setResult({id:m})})}function u(t,i,a){let{table:o,idField:s,deleteSubject:c}=a;return t.on(c,async t=>{let{id:a}=t.payload,c=r(o)[s],l=await i.delete(o).where(n(c,a));t.setResult({deleted:e(l)})})}function d(e,t,i){let{table:a,idField:o,singularKey:s,getSubject:c,deleteSubject:l,lifecycle:u}=i;return e.on(l,async i=>{let{id:l}=i.payload,d=r(a)[o],[f]=await t.select({id:d}).from(a).where(n(d,l)).limit(1);await i.next(),f&&((await e.request(c,{id:l}))[s]||await e.emit(u.deleted,{id:l}))})}function f(e){if(e.conflictTarget&&e.lifecycle)throw Error(`createDrizzleCrudHandlers: conflictTarget is not yet compatible with lifecycle events. The lifecycle path uses a PK-based UPDATE fallback that cannot resolve rows by natural key.`);let{table:t,subjects:n,idField:r,singularKey:i,mapper:a,toDbValues:o,conflictTarget:f,lifecycle:p}=e,m=s(t,r,f);return(e,s)=>{let f=[];return f.push(c(e,s,{table:t,idField:r,singularKey:i,mapper:a,getSubject:n.get})),f.push(l(e,s,{table:t,idField:r,singularKey:i,mapper:a,toDbValues:o,setSubject:n.set,resolvedConflictTarget:m,lifecycle:p})),p&&f.push(d(e,s,{table:t,idField:r,singularKey:i,getSubject:n.get,deleteSubject:n.delete,lifecycle:p})),f.push(u(e,s,{table:t,idField:r,deleteSubject:n.delete})),()=>f.forEach(e=>e())}}function p(e){let{table:n,subject:r,pluralKey:i,mapper:a,buildPredicates:o}=e;return(e,s)=>{let c=(e,t)=>({[e]:t});return e.on(r,async e=>{let r=o(e.payload,n),l=r.length>0?t(...r):void 0,u=l?await s.select().from(n).where(l):await s.select().from(n);e.setResult(c(i,u.map(a)))})}}function m(e,t){return t?[i(e.scope,[`default`,t])]:[n(e.scope,`default`)]}export{p as n,f as r,m as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=(e,r,i)=>{let a=e instanceof RegExp?t(e,i):e,o=r instanceof RegExp?t(r,i):r,s=a!==null&&o!=null&&n(a,o,i);return s&&{start:s[0],end:s[1],pre:i.slice(0,s[0]),body:i.slice(s[0]+a.length,s[1]),post:i.slice(s[1]+o.length)}},t=(e,t)=>{let n=t.match(e);return n?n[0]:null},n=(e,t,n)=>{let r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;){if(u===c)r.push(u),c=n.indexOf(e,u+1);else if(r.length===1){let e=r.pop();e!==void 0&&(s=[e,l])}else i=r.pop(),i!==void 0&&i<a&&(a=i,o=l),l=n.indexOf(t,u+1);u=c<l&&c>=0?c:l}r.length&&o!==void 0&&(s=[a,o])}return s},r=`\0SLASH`+Math.random()+`\0`,i=`\0OPEN`+Math.random()+`\0`,a=`\0CLOSE`+Math.random()+`\0`,o=`\0COMMA`+Math.random()+`\0`,s=`\0PERIOD`+Math.random()+`\0`,c=new RegExp(r,`g`),l=new RegExp(i,`g`),u=new RegExp(a,`g`),d=new RegExp(o,`g`),f=new RegExp(s,`g`),p=/\\\\/g,m=/\\{/g,h=/\\}/g,g=/\\,/g,ee=/\\\./g;function _(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function te(e){return e.replace(p,r).replace(m,i).replace(h,a).replace(g,o).replace(ee,s)}function ne(e){return e.replace(c,`\\`).replace(l,`{`).replace(u,`}`).replace(d,`,`).replace(f,`.`)}function v(t){if(!t)return[``];let n=[],r=e(`{`,`}`,t);if(!r)return t.split(`,`);let{pre:i,body:a,post:o}=r,s=i.split(`,`);s[s.length-1]+=`{`+a+`}`;let c=v(o);return o.length&&(s[s.length-1]+=c.shift(),s.push.apply(s,c)),n.push.apply(n,s),n}function re(e,t={}){if(!e)return[];let{max:n=1e5}=t;return e.slice(0,2)===`{}`&&(e=`\\{\\}`+e.slice(2)),S(te(e),n,!0).map(ne)}function y(e){return`{`+e+`}`}function b(e){return/^-?0\d/.test(e)}function x(e,t){return e<=t}function ie(e,t){return e>=t}function S(t,n,r){let i=[],o=e(`{`,`}`,t);if(!o)return[t];let s=o.pre,c=o.post.length?S(o.post,n,!1):[``];if(/\$$/.test(o.pre))for(let e=0;e<c.length&&e<n;e++){let t=s+`{`+o.body+`}`+c[e];i.push(t)}else{let e=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),u=e||l,d=o.body.indexOf(`,`)>=0;if(!u&&!d)return o.post.match(/,(?!,).*\}/)?(t=o.pre+`{`+o.body+a+o.post,S(t,n,!0)):[t];let f;if(u)f=o.body.split(/\.\./);else if(f=v(o.body),f.length===1&&f[0]!==void 0&&(f=S(f[0],n,!1).map(y),f.length===1))return c.map(e=>o.pre+f[0]+e);let p;if(u&&f[0]!==void 0&&f[1]!==void 0){let e=_(f[0]),t=_(f[1]),r=Math.max(f[0].length,f[1].length),i=f.length===3&&f[2]!==void 0?Math.max(Math.abs(_(f[2])),1):1,a=x;t<e&&(i*=-1,a=ie);let o=f.some(b);p=[];for(let s=e;a(s,t)&&p.length<n;s+=i){let e;if(l)e=String.fromCharCode(s),e===`\\`&&(e=``);else if(e=String(s),o){let t=r-e.length;if(t>0){let n=Array(t+1).join(`0`);e=s<0?`-`+n+e.slice(1):n+e}}p.push(e)}}else{p=[];for(let e=0;e<f.length;e++)p.push.apply(p,S(f[e],n,!1))}for(let e=0;e<p.length;e++)for(let t=0;t<c.length&&i.length<n;t++){let n=s+p[e]+c[t];(!r||u||n)&&i.push(n)}}return i}const C=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>65536)throw TypeError(`pattern is too long`)},ae={"[:alnum:]":[`\\p{L}\\p{Nl}\\p{Nd}`,!0],"[:alpha:]":[`\\p{L}\\p{Nl}`,!0],"[:ascii:]":[`\\x00-\\x7f`,!1],"[:blank:]":[`\\p{Zs}\\t`,!0],"[:cntrl:]":[`\\p{Cc}`,!0],"[:digit:]":[`\\p{Nd}`,!0],"[:graph:]":[`\\p{Z}\\p{C}`,!0,!0],"[:lower:]":[`\\p{Ll}`,!0],"[:print:]":[`\\p{C}`,!0],"[:punct:]":[`\\p{P}`,!0],"[:space:]":[`\\p{Z}\\t\\r\\n\\v\\f`,!0],"[:upper:]":[`\\p{Lu}`,!0],"[:word:]":[`\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}`,!0],"[:xdigit:]":[`A-Fa-f0-9`,!1]},w=e=>e.replace(/[[\]\\-]/g,`\\$&`),oe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),T=e=>e.join(``),E=(e,t)=>{let n=t;if(e.charAt(n)!==`[`)throw Error(`not in a brace expression`);let r=[],i=[],a=n+1,o=!1,s=!1,c=!1,l=!1,u=n,d=``;WHILE:for(;a<e.length;){let t=e.charAt(a);if((t===`!`||t===`^`)&&a===n+1){l=!0,a++;continue}if(t===`]`&&o&&!c){u=a+1;break}if(o=!0,t===`\\`&&!c){c=!0,a++;continue}if(t===`[`&&!c){for(let[t,[o,c,l]]of Object.entries(ae))if(e.startsWith(t,a)){if(d)return[`$.`,!1,e.length-n,!0];a+=t.length,l?i.push(o):r.push(o),s||=c;continue WHILE}}if(c=!1,d){t>d?r.push(w(d)+`-`+w(t)):t===d&&r.push(w(t)),d=``,a++;continue}if(e.startsWith(`-]`,a+1)){r.push(w(t+`-`)),a+=2;continue}if(e.startsWith(`-`,a+1)){d=t,a+=2;continue}r.push(w(t)),a++}if(u<a)return[``,!1,0,!1];if(!r.length&&!i.length)return[`$.`,!1,e.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!l)return[oe(r[0].length===2?r[0].slice(-1):r[0]),!1,u-n,!1];let f=`[`+(l?`^`:``)+T(r)+`]`,p=`[`+(l?``:`^`)+T(i)+`]`;return[r.length&&i.length?`(`+f+`|`+p+`)`:r.length?f:p,s,u-n,!0]},D=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!0}={})=>n?t?e.replace(/\[([^/\\])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^/\\])\]/g,`$1$2`).replace(/\\([^/])/g,`$1`):t?e.replace(/\[([^/\\{}])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,`$1$2`).replace(/\\([^/{}])/g,`$1`);var O;const k=new Set([`!`,`?`,`+`,`*`,`@`]),A=e=>k.has(e),j=e=>A(e.type),se=new Map([[`!`,[`@`]],[`?`,[`?`,`@`]],[`@`,[`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`]]]),ce=new Map([[`!`,[`?`]],[`@`,[`?`]],[`+`,[`?`,`*`]]]),le=new Map([[`!`,[`?`,`@`]],[`?`,[`?`,`@`]],[`@`,[`?`,`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`,`?`,`*`]]]),M=new Map([[`!`,new Map([[`!`,`@`]])],[`?`,new Map([[`*`,`*`],[`+`,`*`]])],[`@`,new Map([[`!`,`!`],[`?`,`?`],[`@`,`@`],[`*`,`*`],[`+`,`+`]])],[`+`,new Map([[`?`,`*`],[`*`,`*`]])]]),N=`(?!\\.)`,ue=new Set([`[`,`.`]),P=new Set([`..`,`.`]),F=new Set(`().*{}+?[]^$\\!`),I=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),L=`[^/]`,R=L+`*?`,z=L+`+?`;let B=0;var V=class{type;#e;#t;#n=!1;#r=[];#i;#a;#o;#s=!1;#c;#l;#u=!1;id=++B;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for(`nodejs.util.inspect.custom`)](){return{"@@type":`AST`,id:this.id,type:this.type,root:this.#e.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#r.length,parts:this.#r}}constructor(e,t,n={}){this.type=e,e&&(this.#t=!0),this.#i=t,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#o=this.#e===this?[]:this.#e.#o,e===`!`&&!this.#e.#s&&this.#o.push(this),this.#a=this.#i?this.#i.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!=`string`&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l===void 0?this.type?this.#l=this.type+`(`+this.#r.map(e=>String(e)).join(`|`)+`)`:this.#l=this.#r.map(e=>String(e)).join(``):this.#l}#d(){if(this!==this.#e)throw Error(`should only call on root`);if(this.#s)return this;this.toString(),this.#s=!0;let e;for(;e=this.#o.pop();){if(e.type!==`!`)continue;let t=e,n=t.#i;for(;n;){for(let r=t.#a+1;!n.type&&r<n.#r.length;r++)for(let t of e.#r){if(typeof t==`string`)throw Error(`string part in extglob AST??`);t.copyIn(n.#r[r])}t=n,n=t.#i}}return this}push(...e){for(let t of e)if(t!==``){if(typeof t!=`string`&&!(t instanceof O&&t.#i===this))throw Error(`invalid part: `+t);this.#r.push(t)}}toJSON(){let e=this.type===null?this.#r.slice().map(e=>typeof e==`string`?e:e.toJSON()):[this.type,...this.#r.map(e=>e.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&this.#i?.type===`!`)&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let e=this.#i;for(let t=0;t<this.#a;t++){let n=e.#r[t];if(!(n instanceof O&&n.type===`!`))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type===`!`)return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let e=this.#i?this.#i.#r.length:0;return this.#a===e-1}copyIn(e){typeof e==`string`?this.push(e):this.push(e.clone(this))}clone(e){let t=new O(this.type,e);for(let e of this.#r)t.copyIn(e);return t}static#f(e,t,n,r,i){let a=r.maxExtglobRecursion??2,o=!1,s=!1,c=-1,l=!1;if(t.type===null){let u=n,d=``;for(;u<e.length;){let n=e.charAt(u++);if(o||n===`\\`){o=!o,d+=n;continue}if(s){u===c+1?(n===`^`||n===`!`)&&(l=!0):n===`]`&&!(u===c+2&&l)&&(s=!1),d+=n;continue}else if(n===`[`){s=!0,c=u,l=!1,d+=n;continue}if(!r.noext&&A(n)&&e.charAt(u)===`(`&&i<=a){t.push(d),d=``;let a=new O(n,t);u=O.#f(e,a,u,r,i+1),t.push(a);continue}d+=n}return t.push(d),u}let u=n+1,d=new O(null,t),f=[],p=``;for(;u<e.length;){let n=e.charAt(u++);if(o||n===`\\`){o=!o,p+=n;continue}if(s){u===c+1?(n===`^`||n===`!`)&&(l=!0):n===`]`&&!(u===c+2&&l)&&(s=!1),p+=n;continue}else if(n===`[`){s=!0,c=u,l=!1,p+=n;continue}if(!r.noext&&A(n)&&e.charAt(u)===`(`&&(i<=a||t&&t.#h(n))){let a=t&&t.#h(n)?0:1;d.push(p),p=``;let o=new O(n,d);d.push(o),u=O.#f(e,o,u,r,i+a);continue}if(n===`|`){d.push(p),p=``,f.push(d),d=new O(null,t);continue}if(n===`)`)return p===``&&t.#r.length===0&&(t.#u=!0),d.push(p),p=``,t.push(...f,d),u;p+=n}return t.type=null,t.#t=void 0,t.#r=[e.substring(n-1)],u}#p(e){return this.#m(e,ce)}#m(e,t=se){if(!e||typeof e!=`object`||e.type!==null||e.#r.length!==1||this.type===null)return!1;let n=e.#r[0];return!n||typeof n!=`object`||n.type===null?!1:this.#h(n.type,t)}#h(e,t=le){return!!t.get(this.type)?.includes(e)}#g(e,t){let n=e.#r[0],r=new O(null,n,this.options);r.#r.push(``),n.push(r),this.#_(e,t)}#_(e,t){let n=e.#r[0];this.#r.splice(t,1,...n.#r);for(let e of n.#r)typeof e==`object`&&(e.#i=this);this.#l=void 0}#v(e){return!!M.get(this.type)?.has(e)}#y(e){if(!e||typeof e!=`object`||e.type!==null||e.#r.length!==1||this.type===null||this.#r.length!==1)return!1;let t=e.#r[0];return!t||typeof t!=`object`||t.type===null?!1:this.#v(t.type)}#b(e){let t=M.get(this.type),n=e.#r[0],r=t?.get(n.type);if(!r)return!1;this.#r=n.#r;for(let e of this.#r)typeof e==`object`&&(e.#i=this);this.type=r,this.#l=void 0,this.#u=!1}static fromGlob(e,t={}){let n=new O(null,void 0,t);return O.#f(e,n,0,t,0),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,n,r,i]=this.toRegExpSource();if(!(r||this.#t||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let a=(this.#c.nocase?`i`:``)+(i?`u`:``);return Object.assign(RegExp(`^${t}$`,a),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(e){let t=e??!!this.#c.dot;if(this.#e===this&&(this.#x(),this.#d()),!j(this)){let n=this.isStart()&&this.isEnd()&&!this.#r.some(e=>typeof e!=`string`),r=this.#r.map(t=>{let[r,i,a,o]=typeof t==`string`?O.#C(t,this.#t,n):t.toRegExpSource(e);return this.#t=this.#t||a,this.#n=this.#n||o,r}).join(``),i=``;if(this.isStart()&&typeof this.#r[0]==`string`&&!(this.#r.length===1&&P.has(this.#r[0]))){let n=ue,a=t&&n.has(r.charAt(0))||r.startsWith(`\\.`)&&n.has(r.charAt(2))||r.startsWith(`\\.\\.`)&&n.has(r.charAt(4)),o=!t&&!e&&n.has(r.charAt(0));i=a?`(?!(?:^|/)\\.\\.?(?:$|/))`:o?N:``}let a=``;return this.isEnd()&&this.#e.#s&&this.#i?.type===`!`&&(a=`(?:$|\\/)`),[i+r+a,D(r),this.#t=!!this.#t,this.#n]}let n=this.type===`*`||this.type===`+`,r=this.type===`!`?`(?:(?!(?:`:`(?:`,i=this.#S(t);if(this.isStart()&&this.isEnd()&&!i&&this.type!==`!`){let e=this.toString(),t=this;return t.#r=[e],t.type=null,t.#t=void 0,[e,D(this.toString()),!1,!1]}let a=!n||e||t?``:this.#S(!0);a===i&&(a=``),a&&(i=`(?:${i})(?:${a})*?`);let o=``;if(this.type===`!`&&this.#u)o=(this.isStart()&&!t?N:``)+z;else{let n=this.type===`!`?`))`+(this.isStart()&&!t&&!e?N:``)+R+`)`:this.type===`@`?`)`:this.type===`?`?`)?`:this.type===`+`&&a?`)`:this.type===`*`&&a?`)?`:`)${this.type}`;o=r+i+n}return[o,D(i),this.#t=!!this.#t,this.#n]}#x(){if(j(this)){let e=0,t=!1;do{t=!0;for(let e=0;e<this.#r.length;e++){let n=this.#r[e];typeof n==`object`&&(n.#x(),this.#m(n)?(t=!1,this.#_(n,e)):this.#p(n)?(t=!1,this.#g(n,e)):this.#y(n)&&(t=!1,this.#b(n)))}}while(!t&&++e<10)}else for(let e of this.#r)typeof e==`object`&&e.#x();this.#l=void 0}#S(e){return this.#r.map(t=>{if(typeof t==`string`)throw Error(`string type in extglob ast??`);let[n,r,i,a]=t.toRegExpSource(e);return this.#n=this.#n||a,n}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join(`|`)}static#C(e,t,n=!1){let r=!1,i=``,a=!1,o=!1;for(let s=0;s<e.length;s++){let c=e.charAt(s);if(r){r=!1,i+=(F.has(c)?`\\`:``)+c;continue}if(c===`*`){if(o)continue;o=!0,i+=n&&/^[*]+$/.test(e)?z:R,t=!0;continue}else o=!1;if(c===`\\`){s===e.length-1?i+=`\\\\`:r=!0;continue}if(c===`[`){let[n,r,o,c]=E(e,s);if(o){i+=n,a||=r,s+=o-1,t||=c;continue}}if(c===`?`){i+=L,t=!0;continue}i+=I(c)}return[i,D(e),!!t,a]}};O=V;const H=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,`[$&]`):e.replace(/[?*()[\]\\{}]/g,`\\$&`):t?e.replace(/[?*()[\]]/g,`[$&]`):e.replace(/[?*()[\]\\]/g,`\\$&`),U=(e,t,n={})=>(C(t),!n.nocomment&&t.charAt(0)===`#`?!1:new $(t,n).match(e)),de=/^\*+([^+@!?*[(]*)$/,fe=e=>t=>!t.startsWith(`.`)&&t.endsWith(e),pe=e=>t=>t.endsWith(e),me=e=>(e=e.toLowerCase(),t=>!t.startsWith(`.`)&&t.toLowerCase().endsWith(e)),he=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),ge=/^\*+\.\*+$/,_e=e=>!e.startsWith(`.`)&&e.includes(`.`),ve=e=>e!==`.`&&e!==`..`&&e.includes(`.`),ye=/^\.\*+$/,be=e=>e!==`.`&&e!==`..`&&e.startsWith(`.`),xe=/^\*+$/,Se=e=>e.length!==0&&!e.startsWith(`.`),Ce=e=>e.length!==0&&e!==`.`&&e!==`..`,we=/^\?+([^+@!?*[(]*)?$/,Te=([e,t=``])=>{let n=G([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},Ee=([e,t=``])=>{let n=K([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},De=([e,t=``])=>{let n=K([e]);return t?e=>n(e)&&e.endsWith(t):n},W=([e,t=``])=>{let n=G([e]);return t?e=>n(e)&&e.endsWith(t):n},G=([e])=>{let t=e.length;return e=>e.length===t&&!e.startsWith(`.`)},K=([e])=>{let t=e.length;return e=>e.length===t&&e!==`.`&&e!==`..`},q=typeof process==`object`&&process?typeof process.env==`object`&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:`posix`,J={win32:{sep:`\\`},posix:{sep:`/`}};U.sep=q===`win32`?J.win32.sep:J.posix.sep;const Y=Symbol(`globstar **`);U.GLOBSTAR=Y,U.filter=(e,t={})=>n=>U(n,e,t);const X=(e,t={})=>Object.assign({},e,t);U.defaults=e=>{if(!e||typeof e!=`object`||!Object.keys(e).length)return U;let t=U;return Object.assign((n,r,i={})=>t(n,r,X(e,i)),{Minimatch:class extends t.Minimatch{constructor(t,n={}){super(t,X(e,n))}static defaults(n){return t.defaults(X(e,n)).Minimatch}},AST:class extends t.AST{constructor(t,n,r={}){super(t,n,X(e,r))}static fromGlob(n,r={}){return t.AST.fromGlob(n,X(e,r))}},unescape:(n,r={})=>t.unescape(n,X(e,r)),escape:(n,r={})=>t.escape(n,X(e,r)),filter:(n,r={})=>t.filter(n,X(e,r)),defaults:n=>t.defaults(X(e,n)),makeRe:(n,r={})=>t.makeRe(n,X(e,r)),braceExpand:(n,r={})=>t.braceExpand(n,X(e,r)),match:(n,r,i={})=>t.match(n,r,X(e,i)),sep:t.sep,GLOBSTAR:Y})};const Z=(e,t={})=>(C(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:re(e,{max:t.braceExpandMax}));U.braceExpand=Z,U.makeRe=(e,t={})=>new $(e,t).makeRe(),U.match=(e,t,n={})=>{let r=new $(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e};const Q=/[?*]|[+@!]\(.*?\)|\[|\]/,Oe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`);var $=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){C(e),t||={},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||q,this.isWindows=this.platform===`win32`,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot===void 0?!!(this.isWindows&&this.nocase):t.windowsNoMagicRoot,this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!=`string`)return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(e=>this.slashSplit(e));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){let t=e[0]===``&&e[1]===``&&(e[2]===`?`||!Q.test(e[2]))&&!Q.test(e[3]),n=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map(e=>this.parse(e))];if(n)return[e[0],...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.debug(this.pattern,r),this.set=r.filter(e=>e.indexOf(!1)===-1),this.isWindows)for(let e=0;e<this.set.length;e++){let t=this.set[e];t[0]===``&&t[1]===``&&this.globParts[e][2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3])&&(t[2]=`?`)}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t of e)for(let e=0;e<t.length;e++)t[e]===`**`&&(t[e]=`*`);let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;(t=e.indexOf(`**`,t+1))!==-1;){let n=t;for(;e[n+1]===`**`;)n++;n!==t&&e.splice(t,n-t)}return e})}levelOneOptimize(e){return e.map(e=>(e=e.reduce((e,t)=>{let n=e[e.length-1];return t===`**`&&n===`**`?e:t===`..`&&n&&n!==`..`&&n!==`.`&&n!==`**`?(e.pop(),e):(e.push(t),e)},[]),e.length===0?[``]:e))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let r=e[n];n===1&&r===``&&e[0]===``||(r===`.`||r===``)&&(t=!0,e.splice(n,1),n--)}e[0]===`.`&&e.length===2&&(e[1]===`.`||e[1]===``)&&(t=!0,e.pop())}let n=0;for(;(n=e.indexOf(`..`,n+1))!==-1;){let r=e[n-1];r&&r!==`.`&&r!==`..`&&r!==`**`&&!(this.isWindows&&/^[a-z]:$/i.test(r))&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[``]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let r=-1;for(;(r=n.indexOf(`**`,r+1))!==-1;){let i=r;for(;n[i+1]===`**`;)i++;i>r&&n.splice(r+1,i-r);let a=n[r+1],o=n[r+2],s=n[r+3];if(a!==`..`||!o||o===`.`||o===`..`||!s||s===`.`||s===`..`)continue;t=!0,n.splice(r,1);let c=n.slice(0);c[r]=`**`,e.push(c),r--}if(!this.preserveMultipleSlashes){for(let e=1;e<n.length-1;e++){let r=n[e];e===1&&r===``&&n[0]===``||(r===`.`||r===``)&&(t=!0,n.splice(e,1),e--)}n[0]===`.`&&n.length===2&&(n[1]===`.`||n[1]===``)&&(t=!0,n.pop())}let i=0;for(;(i=n.indexOf(`..`,i+1))!==-1;){let e=n[i-1];if(e&&e!==`.`&&e!==`..`&&e!==`**`){t=!0;let e=i===1&&n[i+1]===`**`?[`.`]:[];n.splice(i-1,2,...e),n.length===0&&n.push(``),i-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(r){e[t]=[],e[n]=r;break}}return e.filter(e=>e.length)}partsMatch(e,t,n=!1){let r=0,i=0,a=[],o=``;for(;r<e.length&&i<t.length;)if(e[r]===t[i])a.push(o===`b`?t[i]:e[r]),r++,i++;else if(n&&e[r]===`**`&&t[i]===e[r+1])a.push(e[r]),r++;else if(n&&t[i]===`**`&&e[r]===t[i+1])a.push(t[i]),i++;else if(e[r]===`*`&&t[i]&&(this.options.dot||!t[i].startsWith(`.`))&&t[i]!==`**`){if(o===`b`)return!1;o=`a`,a.push(e[r]),r++,i++}else if(t[i]===`*`&&e[r]&&(this.options.dot||!e[r].startsWith(`.`))&&e[r]!==`**`){if(o===`a`)return!1;o=`b`,a.push(t[i]),r++,i++}else return!1;return e.length===t.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)===`!`;r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n=!1){let r=0,i=0;if(this.isWindows){let n=typeof e[0]==`string`&&/^[a-z]:$/i.test(e[0]),a=!n&&e[0]===``&&e[1]===``&&e[2]===`?`&&/^[a-z]:$/i.test(e[3]),o=typeof t[0]==`string`&&/^[a-z]:$/i.test(t[0]),s=!o&&t[0]===``&&t[1]===``&&t[2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3]),c=a?3:n?0:void 0,l=s?3:o?0:void 0;if(typeof c==`number`&&typeof l==`number`){let[n,a]=[e[c],t[l]];n.toLowerCase()===a.toLowerCase()&&(t[l]=n,i=l,r=c)}}let{optimizationLevel:a=1}=this.options;return a>=2&&(e=this.levelTwoFileOptimize(e)),t.includes(Y)?this.#e(e,t,n,r,i):this.#n(e,t,n,r,i)}#e(e,t,n,r,i){let a=t.indexOf(Y,i),o=t.lastIndexOf(Y),[s,c,l]=n?[t.slice(i,a),t.slice(a+1),[]]:[t.slice(i,a),t.slice(a+1,o),t.slice(o+1)];if(s.length){let t=e.slice(r,r+s.length);if(!this.#n(t,s,n,0,0))return!1;r+=s.length,i+=s.length}let u=0;if(l.length){if(l.length+r>e.length)return!1;let t=e.length-l.length;if(this.#n(e,l,n,t,0))u=l.length;else{if(e[e.length-1]!==``||r+l.length===e.length||(t--,!this.#n(e,l,n,t,0)))return!1;u=l.length+1}}if(!c.length){let t=!!u;for(let n=r;n<e.length-u;n++){let r=String(e[n]);if(t=!0,r===`.`||r===`..`||!this.options.dot&&r.startsWith(`.`))return!1}return n||t}let d=[[[],0]],f=d[0],p=0,m=[0];for(let e of c)e===Y?(m.push(p),f=[[],0],d.push(f)):(f[0].push(e),p++);let h=d.length-1,g=e.length-u;for(let e of d)e[1]=g-(m[h--]+e[0].length);return!!this.#t(e,d,r,0,n,0,!!u)}#t(e,t,n,r,i,a,o){let s=t[r];if(!s){for(let t=n;t<e.length;t++){o=!0;let n=e[t];if(n===`.`||n===`..`||!this.options.dot&&n.startsWith(`.`))return!1}return o}let[c,l]=s;for(;n<=l;){if(this.#n(e.slice(0,n+c.length),c,i,n,0)&&a<this.maxGlobstarRecursion){let s=this.#t(e,t,n+c.length,r+1,i,a+1,o);if(s!==!1)return s}let s=e[n];if(s===`.`||s===`..`||!this.options.dot&&s.startsWith(`.`))return!1;n++}return i||null}#n(e,t,n,r,i){let a,o,s,c;for(a=r,o=i,c=e.length,s=t.length;a<c&&o<s;a++,o++){this.debug(`matchOne loop`);let n=t[o],r=e[a];if(this.debug(t,n,r),n===!1||n===Y)return!1;let i;if(typeof n==`string`?(i=r===n,this.debug(`string match`,n,r,i)):(i=n.test(r),this.debug(`pattern match`,n,r,i)),!i)return!1}if(a===c&&o===s)return!0;if(a===c)return n;if(o===s)return a===c-1&&e[a]===``;throw Error(`wtf?`)}braceExpand(){return Z(this.pattern,this.options)}parse(e){C(e);let t=this.options;if(e===`**`)return Y;if(e===``)return``;let n,r=null;(n=e.match(xe))?r=t.dot?Ce:Se:(n=e.match(de))?r=(t.nocase?t.dot?he:me:t.dot?pe:fe)(n[1]):(n=e.match(we))?r=(t.nocase?t.dot?Ee:Te:t.dot?De:W)(n):(n=e.match(ge))?r=t.dot?ve:_e:(n=e.match(ye))&&(r=be);let i=V.fromGlob(e,this.options).toMMPattern();return r&&typeof i==`object`&&Reflect.defineProperty(i,`test`,{value:r}),i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,n=t.noglobstar?`[^/]*?`:t.dot?`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`:`(?:(?!(?:\\/|^)\\.).)*?`,r=new Set(t.nocase?[`i`]:[]),i=e.map(e=>{let t=e.map(e=>{if(e instanceof RegExp)for(let t of e.flags.split(``))r.add(t);return typeof e==`string`?Oe(e):e===Y?Y:e._src});t.forEach((e,r)=>{let i=t[r+1],a=t[r-1];e!==Y||a===Y||(a===void 0?i!==void 0&&i!==Y?t[r+1]=`(?:\\/|`+n+`\\/)?`+i:t[r]=n:i===void 0?t[r-1]=a+`(?:\\/|\\/`+n+`)?`:i!==Y&&(t[r-1]=a+`(?:\\/|\\/`+n+`\\/)`+i,t[r+1]=Y))});let i=t.filter(e=>e!==Y);if(this.partial&&i.length>=1){let e=[];for(let t=1;t<=i.length;t++)e.push(i.slice(0,t).join(`/`));return`(?:`+e.join(`|`)+`)`}return i.join(`/`)}).join(`|`),[a,o]=e.length>1?[`(?:`,`)`]:[``,``];i=`^`+a+i+o+`$`,this.partial&&(i=`^(?:\\/|`+a+i.slice(1,-1)+o+`)$`),this.negate&&(i=`^(?!`+i+`).+$`);try{this.regexp=new RegExp(i,[...r].join(``))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split(`/`):this.isWindows&&/^\/\/[^/]+/.test(e)?[``,...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug(`match`,e,this.pattern),this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;let n=this.options;this.isWindows&&(e=e.split(`\\`).join(`/`));let r=this.slashSplit(e);this.debug(this.pattern,`split`,r);let i=this.set;this.debug(this.pattern,`set`,i);let a=r[r.length-1];if(!a)for(let e=r.length-2;!a&&e>=0;e--)a=r[e];for(let e of i){let i=r;if(n.matchBase&&e.length===1&&(i=[a]),this.matchOne(i,e,t))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return U.defaults(e).Minimatch}};U.AST=V,U.Minimatch=$,U.escape=H,U.unescape=D;export{U as n,$ as t};
|
|
@@ -80,10 +80,19 @@ declare function compile(expr: string): CompiledExpression;
|
|
|
80
80
|
/**
|
|
81
81
|
* Resolve \{\{ \}\} placeholders in a template string using jexl evaluation.
|
|
82
82
|
*
|
|
83
|
-
* Each placeholder is evaluated as a jexl expression against the context
|
|
83
|
+
* Each placeholder is evaluated as a jexl expression against the context,
|
|
84
|
+
* using the shared engine instance so templates see the same transforms
|
|
85
|
+
* (e.g. `pluck`) as every other expression surface.
|
|
86
|
+
*
|
|
87
|
+
* Evaluation MUST go through the engine's `JexlExtended` instance and never a
|
|
88
|
+
* default import of `jexl-extended`: the package ships CJS, and under native
|
|
89
|
+
* Node ESM interop the default import is the `module.exports` namespace — not
|
|
90
|
+
* the instance — which made every placeholder silently resolve to `''`.
|
|
91
|
+
*
|
|
84
92
|
* Unknown paths resolve to '' (empty string) — templates should degrade
|
|
85
93
|
* gracefully rather than fail on missing context.
|
|
86
|
-
* Errors in individual placeholders
|
|
94
|
+
* Errors in individual placeholders resolve to '' but emit a warning so
|
|
95
|
+
* infrastructure failures are not silently masked as missing variables.
|
|
87
96
|
* @param template - string with \{\{ expr \}\} placeholders
|
|
88
97
|
* @param context - evaluation context
|
|
89
98
|
* @returns resolved string
|