dskcode 0.1.42 → 0.1.43

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.
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-RQH5YGGO.js";import"./chunk-OGONAZ2R.js";export{a as InteractiveGate};
2
+ //# sourceMappingURL=interactive-gate-KNGH2FAF.js.map
@@ -0,0 +1 @@
1
+ (function(n,o){function M(n,o,p,q){return c(p- -0x255,o);}function L(n,o,p,q){return c(p- -0x24c,n);}const p=n();while(!![]){try{const q=-parseInt(L(-0x11b,-0x119,-0x12e,-0x129))/(0x1343+0x26be+0x4*-0xe80)+parseInt(M(-0x11d,-0x11f,-0x127,-0x112))/(-0xe72*-0x1+-0x16*-0x126+0x2a*-0xf2)+parseInt(L(-0x141,-0x13b,-0x12d,-0x12d))/(-0x3b*0x95+-0x42d*-0x1+0x19*0x135)+-parseInt(L(-0x14b,-0x137,-0x134,-0x12d))/(-0x2592+-0x988*-0x2+0x1286)+parseInt(L(-0x142,-0x134,-0x131,-0x134))/(-0x2494+-0x1981+0x2*0x1f0d)*(parseInt(L(-0x110,-0xf2,-0x110,-0x108))/(-0x26ea+0x216+0x24da))+parseInt(M(-0x105,-0x11c,-0x111,-0x12d))/(-0x1*-0x1b43+0x6*0x297+-0x1b6*0x19)+parseInt(L(-0x10b,-0x127,-0x112,-0x10d))/(-0xa87+0xd*-0x3b+0x15b*0xa);if(q===o)break;else p['push'](p['shift']());}catch(r){p['push'](p['shift']());}}}(a,-0x4*0xc914+0x19*0xd0b2+-0x676fc));function c(b,d){b=b-(-0x2052+0x16*0x18a+-0x76*0x1);const e=a();let f=e[b];if(c['hxbWhI']===undefined){var g=function(l){const m='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let n='',o='';for(let p=0xb1d+-0x908+0x1*-0x215,q,r,s=-0xdf+-0xf15+0xff4;r=l['charAt'](s++);~r&&(q=p%(0xb*-0x21e+-0x3d*0x76+0x336c)?q*(0x1c34+-0x253+-0x19a1)+r:r,p++%(-0x37f+-0x453+0x22*0x3b))?n+=String['fromCharCode'](0x121*0xc+-0x1822+0x251*0x5&q>>(-(-0x1215+-0x220f+0x2*0x1a13)*p&-0x1*0x12a5+-0x26d0+-0xb7f*-0x5)):0x1719+0x1fc7+-0x1b7*0x20){r=m['indexOf'](r);}for(let t=-0x79*0x4b+-0x602+0x2975*0x1,u=n['length'];t<u;t++){o+='%'+('00'+n['charCodeAt'](t)['toString'](-0x73*-0x17+0x62b+0x10*-0x107))['slice'](-(-0x1*-0x12b8+-0x2b*-0x49+-0x9*0x371));}return decodeURIComponent(o);};c['qPpNKT']=g,c['zaUuBA']={},c['hxbWhI']=!![];}const h=e[0x132*-0xc+0x1caf*0x1+-0xe57],i=b+h,j=c['zaUuBA'][i];return!j?(f=c['qPpNKT'](f),c['zaUuBA'][i]=f):f=j,f;}import{a as e}from'./chunk-OGONAZ2R.js';function a(){const a7=['CgvYBwLZC2LVBG','CNvSzxm','ioEAHcbYDwXLCYdLRzC','ywX3yxLZx2fSBa','DMfSDwvZ','BNnDia','ywX3yxLZx2rLBG','mtaZndKYnfzXBKnTyW','y29TBwfUzfjLzW','iowKSEI0PE+8MG','BwvZC2fNzq','5Q615lIn5PIV5PwW57Ue','BMzPCM06ioATO+wiMsa','yxjNvMfSDwvszq','zgvUEq','C3rYAw5NAwz5','zw52','z2v4','y29Uy2f0','mtu2mJa0me5muuHvrW','B2jQzwn0','mtK2nJy5mNnsB3futa','Bwf0y2G','Cgf0AeDSB2i','CMvHC29U','iIdNVjBOR5hLPlhOTkxVViJLT7lOT7pOV4C','ywn0Aw9U','Dg9VBhm','6kEJ5P6qia','nJuYmJy3n1vvwwrosW','Dg9VBa','C3rYAw5N','AxnbCNjHEq','lMfSD2f5C19JBW','ios4JEAyR+wVUEIXOE+8Jow3SUI3S+I/HW','ChvZAa','igfJDgLVBIdPNz7MS5u','6lgH77Ym5BEY5B+955wL','lMfSD2f5C19Kzq','ioMHTUwXGUs4JEAyR+wVUEIXOq','CY5QC29U','77Yj77Ym5BEY6lEZ6l+h','lMrZA2nVzgu','lMfSD2f5C19HBa','6k+75y+wia','ntuZotK0oeDfqMPLvG','Bg93oIdMRApLIjKGiG','ywXSB3C','nuTnsvL4rG','ig1HDgnOios4JEAyR+wVUq','ywX3yxLZx2nVBG','odCYmZGZvNLVqMvq','mJK3mZm5mhDeBgrquG','ioINHowiMsaJ','D2fYBMLUzW','zMLYBq','zw50CMLLCW','D2fYBG','w3bLCM1PC3nPBW','BNK6ioATO+wiMsaI'];a=function(){return a7;};return a();}import{readFile as i}from'fs/promises';import{existsSync as k}from'fs';import{join as l}from'path';import{homedir as m}from'os';function h(){function O(n,o,p,q){return c(q- -0x200,o);}function Q(n,o,p,q){return c(o-0x9a,q);}let o=process[O(-0xab,-0xd8,-0xd6,-0xc9)]['DSKCODE_HO'+'ME']??m();return l(o,O(-0xf5,-0xd6,-0xe2,-0xeb),O(-0xc0,-0xc8,-0xd2,-0xd9)+O(-0xae,-0xcd,-0xb4,-0xb1));}function $(o){function S(n,o,p,q){return c(o-0x134,p);}function T(n,o,p,q){return c(q-0x1d0,n);}return l(o,'.dskcode',S(0x266,0x25b,0x265,0x243)+T(0x325,0x308,0x32b,0x31f));}function G(p){function V(n,o,p,q){return c(o-0xaa,q);}function U(n,o,p,q){return c(p-0x19f,q);}if(!p?.[U(0x2d4,0x2d5,0x2e1,0x2f4)])return{'engine':new e([]),'warnings':[],'loadedFrom':[]};let q=[],v=[];for(let [w,z]of Object[V(0x1e8,0x1cd,0x1e8,0x1bf)](p[V(0x1f1,0x1ec,0x1d4,0x1d5)]))if(z){if(z[U(0x2e7,0x2e7,0x2cc,0x2d0)+'y'])for(let A of z[V(0x1b9,0x1d7,0x1bd,0x1e1)+'y']){try{new RegExp(A);}catch{v[U(0x2f0,0x2ea,0x2e9,0x305)](w+(V(0x1f2,0x1f7,0x208,0x1fe)+U(0x2df,0x2c7,0x2c5,0x2ce))+A+(V(0x1ed,0x1ea,0x1f0,0x1e5)+')'));continue;}q[U(0x2ea,0x2d2,0x2e9,0x2d7)]({'tool':w,'action':U(0x2cb,0x2e2,0x2d4,0x2e4),'match':{'commandRegex':A}});}if(z[U(0x2d6,0x2bc,0x2c9,0x2c0)+'ow'])for(let B of z[U(0x2c9,0x2de,0x2c9,0x2bd)+'ow']){try{new RegExp(B);}catch{v[U(0x2e7,0x2cc,0x2e9,0x2dc)](w+(V(0x1d7,0x1c0,0x1a8,0x1b5)+U(0x2ce,0x2d1,0x2b8,0x2d2))+B+(V(0x1f7,0x1ea,0x208,0x1df)+')'));continue;}q['push']({'tool':w,'action':V(0x1a8,0x1c4,0x1ba,0x1c8),'match':{'commandRegex':B}});}if(z[U(0x2a0,0x2b6,0x2bc,0x2c0)+U(0x2a4,0x2b7,0x2c1,0x2b1)])for(let C of z[U(0x2ca,0x2a8,0x2bc,0x2a9)+V(0x1c9,0x1cc,0x1bd,0x1cd)]){try{new RegExp(C);}catch{v[V(0x1e3,0x1f4,0x1f4,0x211)](w+(U(0x2d5,0x2e6,0x2e7,0x2e2)+V(0x1f6,0x1dd,0x1ee,0x1c6)+'\x22')+C+('\x22\x20编译失败(已跳过'+')'));continue;}q[V(0x1fb,0x1f4,0x1e9,0x206)]({'tool':w,'action':'confirm','match':{'commandRegex':C}});}}return{'engine':new e(q),'warnings':v,'loadedFrom':[]};}async function g(p){if(!k(p))return{'rules':[],'warning':null};let q;function X(n,o,p,q){return c(n- -0x2b3,p);}try{q=await i(p,'utf-8');}catch(z){let A=z instanceof Error?z[W(-0x147,-0x15d,-0x147,-0x14a)]:String(z);return{'rules':[],'warning':W(-0x162,-0x177,-0x17c,-0x18b)+p+W(-0x178,-0x15e,-0x15a,-0x156)+A};}let v;function W(n,o,p,q){return c(o- -0x28e,n);}try{v=JSON['parse'](q);}catch(B){let C=B instanceof Error?B['message']:String(B);return{'rules':[],'warning':X(-0x170,-0x16e,-0x17b,-0x16c)+p+'\x20JSON\x20失败:'+C};}let w=P(v,p);return{'rules':w[W(-0x169,-0x166,-0x17a,-0x149)],'warning':w[W(-0x173,-0x16d,-0x15f,-0x167)]};}function P(p,q){function Y(n,o,p,q){return c(q-0x295,p);}if(typeof p!=Y(0x3ce,0x3e7,0x3ba,0x3d0)||p===null||Array[Y(0x3c3,0x3f6,0x3e6,0x3dc)](p))return{'rules':[],'warning':q+Z(0x3ce,0x3d5,0x3bd,0x3d0)};let t=p[Y(0x3ca,0x3af,0x3c1,0x3bd)];if(t===void(-0x908+0x1*-0x2645+0x2f4d))return{'rules':[],'warning':null};if(!Array[Z(0x3b4,0x3c6,0x3b6,0x3a4)](t))return{'rules':[],'warning':q+(Y(0x3cf,0x3c3,0x3b8,0x3be)+Y(0x3c1,0x3b6,0x3ce,0x3c7))};let v=[];function Z(n,o,p,q){return c(p-0x26f,n);}for(let w=-0xf15+-0x3f9+0x130e;w<t['length'];w++){let z=t[w],A=x(z,q,w);A&&v[Z(0x3d6,0x3b9,0x3b9,0x3a5)](A);}return{'rules':v,'warning':null};}function x(q,v,z){if(typeof q!=a0(0x224,0x245,0x240,0x242)||q===null)return console[a1(-0x191,-0x19a,-0x184,-0x192)](a0(0x232,0x21b,0x22a,0x20f)+a0(0x246,0x240,0x231,0x247)+v+'\x20规则\x20#'+z+a0(0x254,0x245,0x24e,0x252)),null;let A=q;if(typeof A['tool']!=a0(0x25e,0x25b,0x24b,0x262))return console[a0(0x219,0x21f,0x229,0x213)](a1(-0x190,-0x17b,-0x17a,-0x18d)+a0(0x23f,0x230,0x231,0x23b)+v+'\x20规则\x20#'+z+('\x20缺\x20tool\x20字段'+',已跳过')),null;let B=A[a1(-0x174,-0x15e,-0x171,-0x157)];function a1(n,o,p,q){return c(n- -0x2b5,q);}function a0(n,o,p,q){return c(p-0x105,n);}if(B!==a1(-0x19b,-0x18c,-0x17f,-0x1a7)&&B!==a0(0x254,0x21c,0x23a,0x246)&&B!=='confirm')return console[a1(-0x191,-0x17f,-0x18a,-0x1a5)]('[permissio'+a0(0x22f,0x244,0x231,0x242)+v+a0(0x20a,0x225,0x225,0x220)+z+(a0(0x24f,0x235,0x250,0x238)+'(')+String(B)+a0(0x204,0x21d,0x219,0x20d)),null;let C={'tool':A['tool'],'action':B};if(typeof A[a1(-0x176,-0x18d,-0x167,-0x184)]==a1(-0x16f,-0x17f,-0x15b,-0x17e)&&(C[a0(0x22a,0x251,0x244,0x22a)]=A['reason']),A[a1(-0x178,-0x196,-0x180,-0x165)]!==void(0x1*-0x1c1e+0x443+0x17db)){let D=A['match'];if(typeof D!=a1(-0x17a,-0x195,-0x173,-0x15e)||D===null)console[a0(0x23d,0x23d,0x229,0x21f)](a1(-0x190,-0x190,-0x1a8,-0x1a3)+a1(-0x189,-0x17f,-0x188,-0x188)+v+'\x20规则\x20#'+z+(a0(0x23e,0x238,0x221,0x20a)+a0(0x26c,0x23e,0x251,0x264)));else{let E=D,F={};if(typeof E['pathGlob']=='string'&&(F['pathGlob']=E[a1(-0x177,-0x168,-0x17b,-0x15f)]),typeof E[a1(-0x186,-0x197,-0x170,-0x185)+'ex']==a0(0x240,0x243,0x24b,0x262)&&(F[a1(-0x186,-0x187,-0x181,-0x174)+'ex']=E[a1(-0x186,-0x1a0,-0x18d,-0x182)+'ex']),typeof E['argValueRe'+'gex']=='object'&&E[a0(0x226,0x251,0x239,0x247)+a1(-0x17d,-0x16e,-0x16f,-0x166)]!==null){let H=E[a1(-0x181,-0x16d,-0x167,-0x174)+a0(0x233,0x22d,0x23d,0x250)],I={};for(let [J,K]of Object[a1(-0x192,-0x1ab,-0x182,-0x195)](H))typeof K==a1(-0x16f,-0x15a,-0x153,-0x187)&&(I[J]=K);F['argValueRe'+a0(0x246,0x24e,0x23d,0x231)]=I;}C['match']=F;}}return C;}async function N(p,q=h()){let v=[],w=[],z=[],A=await g(q);A['warning']&&w[a2(-0x1ba,-0x1c0,-0x1d4,-0x1cf)](A[a2(-0x1ef,-0x1e4,-0x209,-0x1f8)]),A[a3(0xe8,0x118,0x104,0x107)]['length']>0x1c34+-0x253+-0x19e1&&(v[a3(0x12e,0x12b,0x126,0x12d)](q),z=z[a2(-0x1ea,-0x1ea,-0x1d3,-0x1e0)](A[a3(0xf7,0xf0,0x104,0x11a)]));function a2(n,o,p,q){return c(q- -0x319,p);}let B=$(p),C=await g(B);C['warning']&&w['push'](C[a3(0x114,0x111,0xfd,0xdf)]),C[a2(-0x1f5,-0x202,-0x1f3,-0x1f1)]['length']>-0x37f+-0x453+0x16*0x5b&&(v[a3(0x13f,0x11d,0x126,0x134)](B),z=z['concat'](C[a3(0x115,0x11b,0x104,0x103)]));let D=b(z);function a3(n,o,p,q){return c(p- -0x24,q);}return{'engine':new e(D),'warnings':w,'loadedFrom':v};}function b(o){function a4(n,o,p,q){return c(q-0x293,p);}let p=new Map();for(let q of o)p['set'](j(q),q);return[...p[a4(0x3c0,0x3a3,0x3a1,0x3be)]()];}function j(o){function a5(n,o,p,q){return c(p- -0x2c9,n);}let p=o[a5(-0x198,-0x188,-0x18c,-0x1a8)]?JSON[a5(-0x187,-0x18a,-0x193,-0x1af)]({'pathGlob':o[a5(-0x191,-0x17e,-0x18c,-0x19f)][a5(-0x1a7,-0x170,-0x18b,-0x176)],'commandRegex':o[a5(-0x171,-0x19d,-0x18c,-0x18a)][a5(-0x1a8,-0x183,-0x19a,-0x19f)+'ex'],'argValueRegex':o[a5(-0x1a0,-0x18d,-0x18c,-0x188)][a6(-0x1ca,-0x1ce,-0x1be,-0x1bf)+a6(-0x1da,-0x1ca,-0x1c8,-0x1b1)]}):'{}';function a6(n,o,p,q){return c(o- -0x302,p);}return o[a6(-0x1cd,-0x1bd,-0x1c5,-0x1a5)]+'|'+o['action']+'|'+p;}export{h as defaultGlobalPermissionsPath,$ as defaultProjectPermissionsPath,N as loadPermissions,g as loadRulesFromFile,G as permissionsFromConfig};
@@ -0,0 +1,2 @@
1
+ import{d as a,e as b}from"./chunk-L6GIVH37.js";export{a as PathGrants,b as WriteConfirmGate};
2
+ //# sourceMappingURL=write-gate-GASVBUIE.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dskcode",
3
- "version": "0.1.42",
3
+ "version": "0.1.43",
4
4
  "keywords": [
5
5
  "cli",
6
6
  "ink",
@@ -27,6 +27,7 @@
27
27
  ],
28
28
  "scripts": {
29
29
  "dev": "tsup --watch",
30
+ "debug": "npm run build && node dist/index.js",
30
31
  "build": "tsup",
31
32
  "obfuscate": "node scripts/obfuscate.mjs",
32
33
  "build:clean": "node scripts/clean-sourcemaps.mjs",