@univer-cli/config 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x430175=_0x3dd4;(function(_0x3b073c,_0x4e3d7e){const _0x13ec4c=_0x3dd4,_0xed1241=_0x3b073c();while(!![]){try{const _0x50cb60=-parseInt(_0x13ec4c(0x147))/0x1+parseInt(_0x13ec4c(0x12f))/0x2*(parseInt(_0x13ec4c(0x12c))/0x3)+-parseInt(_0x13ec4c(0x101))/0x4+-parseInt(_0x13ec4c(0x141))/0x5+parseInt(_0x13ec4c(0x146))/0x6+-parseInt(_0x13ec4c(0x102))/0x7+parseInt(_0x13ec4c(0x138))/0x8;if(_0x50cb60===_0x4e3d7e)break;else _0xed1241['push'](_0xed1241['shift']());}catch(_0x335fa1){_0xed1241['push'](_0xed1241['shift']());}}}(_0x26ad,0x4d5da));import _0x2baae1 from'conf';function _0x26ad(){const _0x3d3920=['1573824aSAolj','172058OGLfJS','minimum','boolean','constructor','segment','json','name','includes','toString','CONFIG_INVALID_DEFINITION','Expected\x20\x22true\x22\x20or\x20\x22false\x22.','push','write','map','object','text','trim','Expected\x20one\x20of:\x20','some','then','getPrototypeOf','Failed\x20to\x20','ext','2114808zBJfnB','504077PGxQXQ','function','Config\x20document\x20conflicts\x20with\x20registered\x20key\x20','definitions','Expected\x20a\x20JSON-compatible\x20value.','config','message','found','string','CONFIG_WRITE_FAILED','codec','ConfigError','values','path','delete','hasOwn','description','CONFIG_UNKNOWN_KEY','true','slice','Expected\x20an\x20integer\x20greater\x20than\x20or\x20equal\x20to\x20','__proto__','join','add','read','Invalid\x20config\x20definition\x20','Config\x20path\x20must\x20be\x20absolute.','length','test','key','Expected\x20a\x20finite\x20JSON\x20number.','prototype','keys','parse','Expected\x20an\x20acyclic\x20JSON-compatible\x20value.','CONFIG_READ_FAILED','defaultValue','isArray','http:','origin','reverse','Expected\x20an\x20absolute\x20HTTP\x20or\x20HTTPS\x20URL.','2553qasczL','Expected\x20a\x20safe\x20integer.','code','324uwlatD','number','value','split','parseText','protocol','resolve','Invalid\x20value\x20for\x20config\x20key\x20','Expected\x20a\x20plain\x20JSON\x20object.','8022872WLzFsT','dir','maximum','isSafeInteger','isFinite','Expected\x20an\x20integer.','\x20config\x20file\x20','CONFIG_INVALID_DOCUMENT','Codec\x20must\x20provide\x20parse\x20and\x20parseText\x20functions.','1566820oMuZOs','false','freeze','has','Config\x20path\x20must\x20use\x20the\x20.json\x20extension.'];_0x26ad=function(){return _0x3d3920;};return _0x26ad();}import{mkdirSync as _0x12054a}from'node:fs';import{isAbsolute as _0x2c3cf4,parse as _0x36deab,resolve as _0x3505a2}from'node:path';var a={'nonEmptyString'(){return{'parse':o,'parseText':o};},'boolean'(){return{'parse'(_0x107cdd){const _0x425d21=_0x3dd4;if(typeof _0x107cdd!=_0x425d21(0x149))throw Error('Expected\x20a\x20boolean.');return _0x107cdd;},'parseText'(_0xec33be){const _0x342b88=_0x3dd4;if(_0xec33be===_0x342b88(0x114))return!0x0;if(_0xec33be===_0x342b88(0x142))return!0x1;throw Error(_0x342b88(0x151));}};},'integer'(_0x15e203={}){let _0x3cab9f=_0x7945ad=>{const _0x95d0d3=_0x3dd4;if(typeof _0x7945ad!=_0x95d0d3(0x130)||!Number[_0x95d0d3(0x13b)](_0x7945ad))throw Error(_0x95d0d3(0x12d));if(_0x15e203['minimum']!==void 0x0&&_0x7945ad<_0x15e203[_0x95d0d3(0x148)])throw Error(_0x95d0d3(0x116)+_0x15e203['minimum']+'.');if(_0x15e203[_0x95d0d3(0x13a)]!==void 0x0&&_0x7945ad>_0x15e203[_0x95d0d3(0x13a)])throw Error('Expected\x20an\x20integer\x20less\x20than\x20or\x20equal\x20to\x20'+_0x15e203[_0x95d0d3(0x13a)]+'.');return _0x7945ad;};return{'parse':_0x3cab9f,'parseText'(_0xdb8532){const _0x32cdbd=_0x3dd4;if(!/^-?(?:0|[1-9]\d*)$/u['test'](_0xdb8532))throw Error(_0x32cdbd(0x13d));return _0x3cab9f(Number(_0xdb8532));}};},'enumeration'(_0x29ea72){let _0x5176b5=_0xc5e026=>{const _0x1dac00=_0x3dd4;if(typeof _0xc5e026!='string'||!_0x29ea72[_0x1dac00(0x14e)](_0xc5e026))throw Error(_0x1dac00(0xfb)+_0x29ea72[_0x1dac00(0x118)](',\x20')+'.');return _0xc5e026;};return{'parse':_0x5176b5,'parseText':_0x5176b5};},'httpUrl'(){return{'parse':s,'parseText':s};},'httpOrigin'(){const _0x52c916=_0x3dd4;let _0x2457ad=_0x189563=>new URL(s(_0x189563))[_0x52c916(0x129)];return{'parse':_0x2457ad,'parseText':_0x2457ad};}};function o(_0x174dbf){const _0x514ce0=_0x3dd4;if(typeof _0x174dbf!=_0x514ce0(0x10a)||_0x174dbf[_0x514ce0(0x11d)]===0x0||_0x174dbf[_0x514ce0(0xfa)]()!==_0x174dbf)throw Error('Expected\x20a\x20non-empty\x20string\x20without\x20surrounding\x20whitespace.');return _0x174dbf;}function s(_0x1d20a6){const _0x1e10fe=_0x3dd4;let _0x52c2cf=o(_0x1d20a6),_0x1d7748;try{_0x1d7748=new URL(_0x52c2cf);}catch{throw Error(_0x1e10fe(0x12b));}if(_0x1d7748[_0x1e10fe(0x134)]!==_0x1e10fe(0x128)&&_0x1d7748['protocol']!=='https:')throw Error(_0x1e10fe(0x12b));return _0x1d7748[_0x1e10fe(0x14f)]();}function _0x3dd4(_0x5b00b3,_0xedf15f){_0x5b00b3=_0x5b00b3-0xf8;const _0x26ad5a=_0x26ad();let _0x3dd46c=_0x26ad5a[_0x5b00b3];return _0x3dd46c;}function c(_0x2bd234){l(_0x2bd234,new Set());}function l(_0x3e1371,_0x3e8bc3){const _0x37568d=_0x3dd4;if(_0x3e1371===null||typeof _0x3e1371=='string'||typeof _0x3e1371==_0x37568d(0x149))return;if(typeof _0x3e1371==_0x37568d(0x130)){if(!Number[_0x37568d(0x13c)](_0x3e1371))throw Error(_0x37568d(0x120));return;}if(typeof _0x3e1371!=_0x37568d(0xf8))throw Error(_0x37568d(0x106));if(_0x3e8bc3[_0x37568d(0x144)](_0x3e1371))throw Error(_0x37568d(0x124));if(_0x3e8bc3[_0x37568d(0x119)](_0x3e1371),Array[_0x37568d(0x127)](_0x3e1371)){for(let _0x4dc66c of _0x3e1371)l(_0x4dc66c,_0x3e8bc3);_0x3e8bc3[_0x37568d(0x110)](_0x3e1371);return;}let _0x37fa71=Object[_0x37568d(0xfe)](_0x3e1371);if(_0x37fa71!==Object[_0x37568d(0x121)]&&_0x37fa71!==null)throw Error(_0x37568d(0x137));for(let _0x15ff62 of Object[_0x37568d(0x10e)](_0x3e1371))l(_0x15ff62,_0x3e8bc3);_0x3e8bc3[_0x37568d(0x110)](_0x3e1371);}var u=class extends Error{[_0x430175(0x12e)];['details'];constructor(_0x2011e8,_0x7978f3,_0x25201f={},_0x487102){const _0x2275da=_0x430175;super(_0x7978f3,_0x487102),this[_0x2275da(0x14d)]=_0x2275da(0x10d),this['code']=_0x2011e8,this['details']=_0x25201f;}};function d(_0x543615){const _0xddf83f=_0x430175;return _0x543615 instanceof Error?_0x543615[_0xddf83f(0x108)]:String(_0x543615);}var f=new Set([_0x430175(0x117),_0x430175(0x14a),'prototype']);function p(_0x48f726){const _0x54ea8c=_0x430175;let _0x38447c={};for(let [_0x45c193,_0x31f7a5]of Object['entries'](_0x48f726)){m(_0x45c193);let _0x29dc1e=_0x31f7a5[_0x54ea8c(0x112)][_0x54ea8c(0xfa)]();if(_0x29dc1e==='')throw h(_0x45c193,'Description\x20must\x20not\x20be\x20empty.');if(typeof _0x31f7a5[_0x54ea8c(0x10c)]?.['parse']!='function'||typeof _0x31f7a5[_0x54ea8c(0x10c)][_0x54ea8c(0x133)]!=_0x54ea8c(0x103))throw h(_0x45c193,_0x54ea8c(0x140));let _0x29d988;if(Object[_0x54ea8c(0x111)](_0x31f7a5,_0x54ea8c(0x126)))try{_0x29d988=_0x31f7a5[_0x54ea8c(0x10c)][_0x54ea8c(0x123)](_0x31f7a5[_0x54ea8c(0x126)]),c(_0x29d988);}catch(_0x223302){throw h(_0x45c193,'Invalid\x20default\x20value:\x20'+d(_0x223302),_0x223302);}_0x38447c[_0x45c193]=Object[_0x54ea8c(0x143)]({'codec':_0x31f7a5['codec'],'description':_0x29dc1e,...Object[_0x54ea8c(0x111)](_0x31f7a5,_0x54ea8c(0x126))?{'defaultValue':_0x29d988}:{}});}return Object['freeze'](_0x38447c);}function m(_0x96b276){const _0x30529d=_0x430175;let _0x484948=_0x96b276[_0x30529d(0x132)]('.');if(_0x96b276[_0x30529d(0x11d)]===0x0||_0x96b276[_0x30529d(0xfa)]()!==_0x96b276||_0x484948[_0x30529d(0xfc)](_0x49cb23=>_0x49cb23['length']===0x0||f['has'](_0x49cb23)||!/^[A-Za-z][A-Za-z0-9_-]*$/u[_0x30529d(0x11e)](_0x49cb23)))throw h(_0x96b276,'Key\x20must\x20contain\x20safe\x20dot-separated\x20identifier\x20segments.');}function h(_0x328651,_0xf1d9b2,_0x5c3f7d){const _0x487311=_0x430175;return new u(_0x487311(0x150),_0x487311(0x11b)+_0x328651+':\x20'+_0xf1d9b2,{'key':_0x328651},_0x5c3f7d===void 0x0?void 0x0:{'cause':_0x5c3f7d});}function g(_0x21b993){const _0x32ab78=_0x430175;if(!_0x2c3cf4(_0x21b993['path']))throw Error(_0x32ab78(0x11c));let _0x1abef9=_0x3505a2(_0x21b993['path']),_0x2cfa99=_0x36deab(_0x1abef9);if(_0x2cfa99[_0x32ab78(0x100)]!=='.json')throw Error(_0x32ab78(0x145));try{_0x12054a(_0x2cfa99['dir'],{'mode':0x1c0,'recursive':!0x0});}catch(_0x3943f7){throw D(_0x32ab78(0x10b),_0x1abef9,_0x3943f7);}let _0x5da45f;try{_0x5da45f=new _0x2baae1({'configFileMode':0x180,'configName':_0x2cfa99[_0x32ab78(0x14d)],'cwd':_0x2cfa99[_0x32ab78(0x139)],'fileExtension':_0x32ab78(0x14c)});}catch(_0x21e06c){throw D(_0x32ab78(0x125),_0x1abef9,_0x21e06c);}let _0x29c3c6=Promise[_0x32ab78(0x135)](),_0x13ab2e=()=>{const _0x7d303e=_0x32ab78;try{return _0x5da45f['store'];}catch(_0x2b44ed){throw D(_0x7d303e(0x125),_0x1abef9,_0x2b44ed);}},_0x16aac0=_0x161575=>{try{_0x5da45f['store']=_0x161575;}catch(_0x51f3c7){throw D('CONFIG_WRITE_FAILED',_0x1abef9,_0x51f3c7);}},_0xc5509=_0x170727=>{const _0x29c1af=_0x32ab78;let _0x168eb8=_(_0x21b993,_0x170727),_0x45c592=x(_0x13ab2e(),_0x170727);return _0x45c592[_0x29c1af(0x109)]?v(_0x170727,_0x168eb8,_0x45c592[_0x29c1af(0x131)]):b(_0x170727,_0x168eb8);},_0x192119=async(_0x2ee3ae,_0x5514d6)=>{const _0x33dc5b=_0x32ab78;let _0x65789b=_0x29c3c6[_0x33dc5b(0xfd)](()=>{const _0x2038e9=_0x33dc5b;let _0x5e650a=_0x13ab2e();if(_0x5514d6===void 0x0&&!x(_0x5e650a,_0x2ee3ae)[_0x2038e9(0x109)])return _0xc5509(_0x2ee3ae);let _0x36021d=_0x5514d6===void 0x0?C(_0x5e650a,_0x2ee3ae):S(_0x5e650a,_0x2ee3ae,_0x5514d6);return _0x16aac0(_0x36021d),_0xc5509(_0x2ee3ae);});return _0x29c3c6=_0x65789b[_0x33dc5b(0xfd)](()=>void 0x0,()=>void 0x0),await _0x65789b;};return{'path':_0x5da45f[_0x32ab78(0x10f)],async 'get'(_0xd0c49){const _0x1c75d0=_0x32ab78;return _0xc5509(_0xd0c49[_0x1c75d0(0x11f)]);},async 'list'(){const _0x37095d=_0x32ab78;return Object[_0x37095d(0x122)](_0x21b993[_0x37095d(0x105)])[_0x37095d(0x154)](_0x3d5a41=>_0xc5509(_0x3d5a41));},async 'set'(_0x5afa76){const _0x3468de=_0x32ab78;let _0x24d06f=_(_0x21b993,_0x5afa76[_0x3468de(0x11f)]);return await _0x192119(_0x5afa76[_0x3468de(0x11f)],y(_0x5afa76[_0x3468de(0x11f)],()=>_0x24d06f['codec']['parse'](_0x5afa76[_0x3468de(0x131)])));},async 'setFromText'(_0x5419d9){const _0x5d5dd3=_0x32ab78;let _0x47f325=_(_0x21b993,_0x5419d9['key']);return await _0x192119(_0x5419d9[_0x5d5dd3(0x11f)],y(_0x5419d9[_0x5d5dd3(0x11f)],()=>_0x47f325[_0x5d5dd3(0x10c)][_0x5d5dd3(0x133)](_0x5419d9[_0x5d5dd3(0xf9)])));},async 'unset'(_0x5f22fb){const _0x2a383c=_0x32ab78;return _(_0x21b993,_0x5f22fb[_0x2a383c(0x11f)]),await _0x192119(_0x5f22fb[_0x2a383c(0x11f)],void 0x0);}};}function _(_0x3e4c46,_0x597f12){const _0x46e01b=_0x430175;let _0x48b213=_0x3e4c46['definitions'][_0x597f12];if(_0x48b213===void 0x0)throw new u(_0x46e01b(0x113),'Config\x20key\x20is\x20not\x20available:\x20'+_0x597f12+'.',{'availableKeys':Object[_0x46e01b(0x122)](_0x3e4c46[_0x46e01b(0x105)]),'key':_0x597f12});return _0x48b213;}function v(_0x6cb139,_0x2479b7,_0x486630){const _0x2f0010=_0x430175;let _0x115c8b=y(_0x6cb139,()=>_0x2479b7[_0x2f0010(0x10c)]['parse'](_0x486630));return{'description':_0x2479b7['description'],'key':_0x6cb139,'source':_0x2f0010(0x107),'value':_0x115c8b,...Object[_0x2f0010(0x111)](_0x2479b7,_0x2f0010(0x126))?{'defaultValue':_0x2479b7[_0x2f0010(0x126)]}:{}};}function y(_0xceb109,_0x11c928){const _0x369b35=_0x430175;try{let _0x3392f7=_0x11c928();return c(_0x3392f7),_0x3392f7;}catch(_0x8dc443){throw new u('CONFIG_INVALID_VALUE',_0x369b35(0x136)+_0xceb109+':\x20'+d(_0x8dc443),{'key':_0xceb109},{'cause':_0x8dc443});}}function b(_0x2f43d8,_0x5ce810){const _0x1b089c=_0x430175;return Object[_0x1b089c(0x111)](_0x5ce810,_0x1b089c(0x126))?{'defaultValue':_0x5ce810['defaultValue'],'description':_0x5ce810[_0x1b089c(0x112)],'key':_0x2f43d8,'source':'default','value':_0x5ce810[_0x1b089c(0x126)]}:{'description':_0x5ce810[_0x1b089c(0x112)],'key':_0x2f43d8,'source':'unset'};}function x(_0x3bea2,_0x577890){const _0x3887ec=_0x430175;let _0x4d0344=_0x3bea2;for(let _0x23c4a7 of _0x577890[_0x3887ec(0x132)]('.')){if(!w(_0x4d0344))throw E(_0x577890);if(!Object[_0x3887ec(0x111)](_0x4d0344,_0x23c4a7))return{'found':!0x1};_0x4d0344=_0x4d0344[_0x23c4a7];}return{'found':!0x0,'value':_0x4d0344};}function S(_0x650572,_0x1670c6,_0x56029c){const _0xf32c51=_0x430175;let _0x14b144={...structuredClone(_0x650572)},_0xecc220=_0x1670c6[_0xf32c51(0x132)]('.'),_0x853cf=_0x14b144;for(let _0x299f1d of _0xecc220[_0xf32c51(0x115)](0x0,-0x1)){let _0x467c76=_0x853cf[_0x299f1d];if(_0x467c76===void 0x0){let _0x18d873={};_0x853cf[_0x299f1d]=_0x18d873,_0x853cf=_0x18d873;}else{if(T(_0x467c76))_0x853cf=_0x467c76;else throw E(_0x1670c6);}}return _0x853cf[_0xecc220['at'](-0x1)]=structuredClone(_0x56029c),_0x14b144;}function C(_0x583804,_0x38b570){const _0x1556d6=_0x430175;let _0x5d272f={...structuredClone(_0x583804)},_0x1111fb=_0x38b570[_0x1556d6(0x132)]('.'),_0x4f3f58=[],_0x52d370=_0x5d272f;for(let _0x4d73ee of _0x1111fb[_0x1556d6(0x115)](0x0,-0x1)){let _0x3b0ac4=_0x52d370[_0x4d73ee];if(_0x3b0ac4===void 0x0)return _0x5d272f;if(!T(_0x3b0ac4))throw E(_0x38b570);_0x4f3f58[_0x1556d6(0x152)]({'object':_0x52d370,'segment':_0x4d73ee}),_0x52d370=_0x3b0ac4;}delete _0x52d370[_0x1111fb['at'](-0x1)];for(let _0x3d9afd of _0x4f3f58[_0x1556d6(0x12a)]()){let _0x153ab0=_0x3d9afd[_0x1556d6(0xf8)][_0x3d9afd[_0x1556d6(0x14b)]];if(w(_0x153ab0)&&Object[_0x1556d6(0x122)](_0x153ab0)[_0x1556d6(0x11d)]===0x0)delete _0x3d9afd[_0x1556d6(0xf8)][_0x3d9afd[_0x1556d6(0x14b)]];else break;}return _0x5d272f;}function w(_0x2a8c83){const _0x3c5ff8=_0x430175;return typeof _0x2a8c83==_0x3c5ff8(0xf8)&&!!_0x2a8c83&&!Array['isArray'](_0x2a8c83);}function T(_0x102343){return w(_0x102343);}function E(_0x384315){const _0x1c69e4=_0x430175;return new u(_0x1c69e4(0x13f),_0x1c69e4(0x104)+_0x384315+'.',{'key':_0x384315});}function D(_0x3e2fde,_0x3a86db,_0x24b067){const _0x4da107=_0x430175;return new u(_0x3e2fde,_0x4da107(0xff)+(_0x3e2fde===_0x4da107(0x125)?_0x4da107(0x11a):_0x4da107(0x153))+_0x4da107(0x13e)+_0x3a86db+':\x20'+d(_0x24b067),{'path':_0x3a86db},{'cause':_0x24b067});}export{u as ConfigError,a as configCodecs,g as createFileConfig,p as defineConfig};
|
|
1
|
+
const _0xe17d37=_0x79b1;(function(_0x4225d3,_0xe1daed){const _0x399ab7=_0x79b1,_0x380c56=_0x4225d3();while(!![]){try{const _0x20006b=-parseInt(_0x399ab7(0xbd))/0x1+parseInt(_0x399ab7(0xee))/0x2*(-parseInt(_0x399ab7(0xd9))/0x3)+-parseInt(_0x399ab7(0xca))/0x4+-parseInt(_0x399ab7(0xb6))/0x5+-parseInt(_0x399ab7(0xd4))/0x6*(-parseInt(_0x399ab7(0xfd))/0x7)+-parseInt(_0x399ab7(0xec))/0x8+parseInt(_0x399ab7(0xd5))/0x9;if(_0x20006b===_0xe1daed)break;else _0x380c56['push'](_0x380c56['shift']());}catch(_0x1a8330){_0x380c56['push'](_0x380c56['shift']());}}}(_0x2e63,0xeffee));import _0x4194fe from'conf';function _0x79b1(_0x4b0cfd,_0x1b6633){_0x4b0cfd=_0x4b0cfd-0xa8;const _0x2e636a=_0x2e63();let _0x79b1c=_0x2e636a[_0x4b0cfd];return _0x79b1c;}import{mkdirSync as _0x481316}from'node:fs';import{isAbsolute as _0x24fdf1,parse as _0xc82e35,resolve as _0x125caf}from'node:path';var a={'nonEmptyString'(){return{'parse':o,'parseText':o};},'boolean'(){return{'parse'(_0x548476){const _0x67b28c=_0x79b1;if(typeof _0x548476!=_0x67b28c(0xb7))throw Error(_0x67b28c(0xd3));return _0x548476;},'parseText'(_0x1f86c0){const _0x2f9a59=_0x79b1;if(_0x1f86c0==='true')return!0x0;if(_0x1f86c0===_0x2f9a59(0xda))return!0x1;throw Error(_0x2f9a59(0xbc));}};},'integer'(_0x2dae74={}){let _0x5658ad=_0x8aa755=>{const _0x187ffd=_0x79b1;if(typeof _0x8aa755!=_0x187ffd(0xce)||!Number[_0x187ffd(0xaf)](_0x8aa755))throw Error(_0x187ffd(0xf9));if(_0x2dae74[_0x187ffd(0xef)]!==void 0x0&&_0x8aa755<_0x2dae74['minimum'])throw Error(_0x187ffd(0xe0)+_0x2dae74['minimum']+'.');if(_0x2dae74[_0x187ffd(0xc6)]!==void 0x0&&_0x8aa755>_0x2dae74[_0x187ffd(0xc6)])throw Error(_0x187ffd(0xbf)+_0x2dae74['maximum']+'.');return _0x8aa755;};return{'parse':_0x5658ad,'parseText'(_0x33ff20){const _0x8fa402=_0x79b1;if(!/^-?(?:0|[1-9]\d*)$/u[_0x8fa402(0xbb)](_0x33ff20))throw Error('Expected\x20an\x20integer.');return _0x5658ad(Number(_0x33ff20));}};},'enumeration'(_0x5db47b){let _0x4e33d3=_0x11ebe1=>{const _0x56fcda=_0x79b1;if(typeof _0x11ebe1!='string'||!_0x5db47b[_0x56fcda(0xc5)](_0x11ebe1))throw Error(_0x56fcda(0xb8)+_0x5db47b[_0x56fcda(0xdf)](',\x20')+'.');return _0x11ebe1;};return{'parse':_0x4e33d3,'parseText':_0x4e33d3};},'httpUrl'(){return{'parse':s,'parseText':s};},'httpOrigin'(){const _0x54c3c7=_0x79b1;let _0x3af6a9=_0x41bab1=>new URL(s(_0x41bab1))[_0x54c3c7(0xaa)];return{'parse':_0x3af6a9,'parseText':_0x3af6a9};}};function o(_0x350913){const _0x41495f=_0x79b1;if(typeof _0x350913!=_0x41495f(0xb5)||_0x350913[_0x41495f(0xc4)]===0x0||_0x350913[_0x41495f(0xe7)]()!==_0x350913)throw Error(_0x41495f(0x107));return _0x350913;}function s(_0x502f4f){const _0x2c773d=_0x79b1;let _0x5392bb=o(_0x502f4f),_0x5781fd;try{_0x5781fd=new URL(_0x5392bb);}catch{throw Error(_0x2c773d(0xa8));}if(_0x5781fd['protocol']!==_0x2c773d(0xa9)&&_0x5781fd[_0x2c773d(0xdc)]!==_0x2c773d(0xae))throw Error(_0x2c773d(0xa8));return _0x5781fd[_0x2c773d(0xf6)]();}function c(_0x300ab4){l(_0x300ab4,new Set());}function l(_0x301113,_0x106589){const _0x17d9f7=_0x79b1;if(_0x301113===null||typeof _0x301113=='string'||typeof _0x301113=='boolean')return;if(typeof _0x301113=='number'){if(!Number[_0x17d9f7(0xe6)](_0x301113))throw Error(_0x17d9f7(0xc9));return;}if(typeof _0x301113!=_0x17d9f7(0xf7))throw Error('Expected\x20a\x20JSON-compatible\x20value.');if(_0x106589[_0x17d9f7(0xeb)](_0x301113))throw Error(_0x17d9f7(0xf0));if(_0x106589[_0x17d9f7(0xe2)](_0x301113),Array[_0x17d9f7(0xc3)](_0x301113)){for(let _0x53a0b7 of _0x301113)l(_0x53a0b7,_0x106589);_0x106589[_0x17d9f7(0x103)](_0x301113);return;}let _0x53696d=Object[_0x17d9f7(0xcf)](_0x301113);if(_0x53696d!==Object[_0x17d9f7(0xc7)]&&_0x53696d!==null)throw Error(_0x17d9f7(0xf8));for(let _0x464728 of Object[_0x17d9f7(0xe9)](_0x301113))l(_0x464728,_0x106589);_0x106589[_0x17d9f7(0x103)](_0x301113);}var u=class extends Error{[_0xe17d37(0x105)];[_0xe17d37(0xfa)];constructor(_0x139ef7,_0x2c05f6,_0x41eced={},_0x44e3f6){const _0x1deb2b=_0xe17d37;super(_0x2c05f6,_0x44e3f6),this[_0x1deb2b(0xb9)]='ConfigError',this[_0x1deb2b(0x105)]=_0x139ef7,this[_0x1deb2b(0xfa)]=_0x41eced;}};function d(_0x501180){const _0x445584=_0xe17d37;return _0x501180 instanceof Error?_0x501180[_0x445584(0x106)]:String(_0x501180);}var f=new Set([_0xe17d37(0xd0),_0xe17d37(0xf4),'prototype']);function p(_0x6f25bf){const _0x9f2394=_0xe17d37;let _0x275dbb={};for(let [_0x26db99,_0x2087ca]of Object[_0x9f2394(0xea)](_0x6f25bf)){m(_0x26db99);let _0x222aee=_0x2087ca[_0x9f2394(0xba)][_0x9f2394(0xe7)]();if(_0x222aee==='')throw h(_0x26db99,'Description\x20must\x20not\x20be\x20empty.');if(typeof _0x2087ca['codec']?.[_0x9f2394(0x101)]!=_0x9f2394(0xd6)||typeof _0x2087ca['codec'][_0x9f2394(0xff)]!=_0x9f2394(0xd6))throw h(_0x26db99,_0x9f2394(0xfb));let _0x32cdf6;if(Object[_0x9f2394(0x104)](_0x2087ca,'defaultValue'))try{_0x32cdf6=_0x2087ca[_0x9f2394(0xf1)]['parse'](_0x2087ca['defaultValue']),c(_0x32cdf6);}catch(_0x5362b6){throw h(_0x26db99,'Invalid\x20default\x20value:\x20'+d(_0x5362b6),_0x5362b6);}_0x275dbb[_0x26db99]=Object[_0x9f2394(0xed)]({'codec':_0x2087ca[_0x9f2394(0xf1)],'description':_0x222aee,...Object[_0x9f2394(0x104)](_0x2087ca,_0x9f2394(0xd1))?{'defaultValue':_0x32cdf6}:{}});}return Object[_0x9f2394(0xed)](_0x275dbb);}function m(_0x3770bd){const _0x3e7510=_0xe17d37;let _0x54b3f7=_0x3770bd['split']('.');if(_0x3770bd[_0x3e7510(0xc4)]===0x0||_0x3770bd['trim']()!==_0x3770bd||_0x54b3f7[_0x3e7510(0xbe)](_0x5a2458=>_0x5a2458[_0x3e7510(0xc4)]===0x0||f[_0x3e7510(0xeb)](_0x5a2458)||!/^[A-Za-z][A-Za-z0-9_-]*$/u[_0x3e7510(0xbb)](_0x5a2458)))throw h(_0x3770bd,_0x3e7510(0xfc));}function h(_0x6696ad,_0x42a5f7,_0x1e77e0){const _0x2920ec=_0xe17d37;return new u(_0x2920ec(0xfe),'Invalid\x20config\x20definition\x20'+_0x6696ad+':\x20'+_0x42a5f7,{'key':_0x6696ad},_0x1e77e0===void 0x0?void 0x0:{'cause':_0x1e77e0});}function g(_0x2cf596){const _0x5b4145=_0xe17d37;if(!_0x24fdf1(_0x2cf596['path']))throw Error(_0x5b4145(0xe8));let _0x7376f4=_0x125caf(_0x2cf596['path']),_0x5ed99e=_0xc82e35(_0x7376f4);if(_0x5ed99e[_0x5b4145(0xb2)]!==_0x5b4145(0xe1))throw Error('Config\x20path\x20must\x20use\x20the\x20.json\x20extension.');try{_0x481316(_0x5ed99e[_0x5b4145(0xf5)],{'mode':0x1c0,'recursive':!0x0});}catch(_0x362435){throw D(_0x5b4145(0xac),_0x7376f4,_0x362435);}let _0x122539;try{_0x122539=new _0x4194fe({'configFileMode':0x180,'configName':_0x5ed99e[_0x5b4145(0xb9)],'cwd':_0x5ed99e[_0x5b4145(0xf5)],'fileExtension':_0x5b4145(0xcd)});}catch(_0x23e850){throw D('CONFIG_READ_FAILED',_0x7376f4,_0x23e850);}let _0x5b66fd=Promise[_0x5b4145(0xdb)](),_0xde6d7c=()=>{const _0x3954cb=_0x5b4145;try{return _0x122539[_0x3954cb(0xde)];}catch(_0x45a75e){throw D(_0x3954cb(0xb1),_0x7376f4,_0x45a75e);}},_0x3b20c4=_0x1b9d04=>{const _0x5abf6c=_0x5b4145;try{_0x122539[_0x5abf6c(0xde)]=_0x1b9d04;}catch(_0x6bb223){throw D(_0x5abf6c(0xac),_0x7376f4,_0x6bb223);}},_0x22cfb2=_0x55b463=>{const _0x3d51a1=_0x5b4145;let _0x32e335=_(_0x2cf596,_0x55b463),_0x100abb=x(_0xde6d7c(),_0x55b463);return _0x100abb[_0x3d51a1(0xc0)]?v(_0x55b463,_0x32e335,_0x100abb[_0x3d51a1(0xf3)]):b(_0x55b463,_0x32e335);},_0x19921d=async(_0x3a5c30,_0x3b630a)=>{const _0x33e3cb=_0x5b4145;let _0x150377=_0x5b66fd[_0x33e3cb(0x102)](()=>{const _0x4ac164=_0x33e3cb;let _0x58148f=_0xde6d7c();if(_0x3b630a===void 0x0&&!x(_0x58148f,_0x3a5c30)[_0x4ac164(0xc0)])return _0x22cfb2(_0x3a5c30);let _0x3f5583=_0x3b630a===void 0x0?C(_0x58148f,_0x3a5c30):S(_0x58148f,_0x3a5c30,_0x3b630a);return _0x3b20c4(_0x3f5583),_0x22cfb2(_0x3a5c30);});return _0x5b66fd=_0x150377['then'](()=>void 0x0,()=>void 0x0),await _0x150377;};return{'path':_0x122539[_0x5b4145(0xd8)],async 'get'(_0x1c97c7){const _0x14adaf=_0x5b4145;return _0x22cfb2(_0x1c97c7[_0x14adaf(0xd2)]);},async 'list'(){const _0x23e8b1=_0x5b4145;return Object[_0x23e8b1(0xab)](_0x2cf596['definitions'])[_0x23e8b1(0xdd)](_0x1fef3a=>_0x22cfb2(_0x1fef3a));},async 'set'(_0x4cc25e){const _0x1da9c8=_0x5b4145;let _0x51c505=_(_0x2cf596,_0x4cc25e[_0x1da9c8(0xd2)]);return await _0x19921d(_0x4cc25e[_0x1da9c8(0xd2)],y(_0x4cc25e['key'],()=>_0x51c505[_0x1da9c8(0xf1)]['parse'](_0x4cc25e['value'])));},async 'setFromText'(_0x4e663f){const _0x4b73f9=_0x5b4145;let _0x5f4ec5=_(_0x2cf596,_0x4e663f['key']);return await _0x19921d(_0x4e663f[_0x4b73f9(0xd2)],y(_0x4e663f[_0x4b73f9(0xd2)],()=>_0x5f4ec5[_0x4b73f9(0xf1)]['parseText'](_0x4e663f['text'])));},async 'unset'(_0x2f21f4){return _(_0x2cf596,_0x2f21f4['key']),await _0x19921d(_0x2f21f4['key'],void 0x0);}};}function _(_0x2b170f,_0x5cee40){const _0xbccc1f=_0xe17d37;let _0x9ca13a=_0x2b170f['definitions'][_0x5cee40];if(_0x9ca13a===void 0x0)throw new u(_0xbccc1f(0xb3),_0xbccc1f(0xad)+_0x5cee40+'.',{'availableKeys':Object[_0xbccc1f(0xab)](_0x2b170f[_0xbccc1f(0x100)]),'key':_0x5cee40});return _0x9ca13a;}function v(_0x2fc823,_0xbad380,_0x496802){const _0x569754=_0xe17d37;let _0x1eda95=y(_0x2fc823,()=>_0xbad380[_0x569754(0xf1)][_0x569754(0x101)](_0x496802));return{'description':_0xbad380['description'],'key':_0x2fc823,'source':'config','value':_0x1eda95,...Object['hasOwn'](_0xbad380,_0x569754(0xd1))?{'defaultValue':_0xbad380['defaultValue']}:{}};}function y(_0x1696b4,_0x163e2e){const _0x4433fd=_0xe17d37;try{let _0x2529cd=_0x163e2e();return c(_0x2529cd),_0x2529cd;}catch(_0x4a01a0){throw new u(_0x4433fd(0xb0),_0x4433fd(0xb4)+_0x1696b4+':\x20'+d(_0x4a01a0),{'key':_0x1696b4},{'cause':_0x4a01a0});}}function b(_0x2a0696,_0xb2dfd){const _0x5269cf=_0xe17d37;return Object[_0x5269cf(0x104)](_0xb2dfd,_0x5269cf(0xd1))?{'defaultValue':_0xb2dfd['defaultValue'],'description':_0xb2dfd[_0x5269cf(0xba)],'key':_0x2a0696,'source':_0x5269cf(0xe5),'value':_0xb2dfd[_0x5269cf(0xd1)]}:{'description':_0xb2dfd[_0x5269cf(0xba)],'key':_0x2a0696,'source':_0x5269cf(0x108)};}function x(_0x335a05,_0x472da0){const _0x2f171d=_0xe17d37;let _0x406e4e=_0x335a05;for(let _0x26fae2 of _0x472da0[_0x2f171d(0xc1)]('.')){if(!w(_0x406e4e))throw E(_0x472da0);if(!Object[_0x2f171d(0x104)](_0x406e4e,_0x26fae2))return{'found':!0x1};_0x406e4e=_0x406e4e[_0x26fae2];}return{'found':!0x0,'value':_0x406e4e};}function S(_0x4cb49d,_0x16c528,_0x89101c){const _0x16f2e4=_0xe17d37;let _0x4469e0={...structuredClone(_0x4cb49d)},_0x5232f4=_0x16c528['split']('.'),_0x3daec6=_0x4469e0;for(let _0x28f1b7 of _0x5232f4[_0x16f2e4(0xf2)](0x0,-0x1)){let _0x5c8fb8=_0x3daec6[_0x28f1b7];if(_0x5c8fb8===void 0x0){let _0x12b1e5={};_0x3daec6[_0x28f1b7]=_0x12b1e5,_0x3daec6=_0x12b1e5;}else{if(T(_0x5c8fb8))_0x3daec6=_0x5c8fb8;else throw E(_0x16c528);}}return _0x3daec6[_0x5232f4['at'](-0x1)]=structuredClone(_0x89101c),_0x4469e0;}function C(_0x47b9c8,_0x4753a3){const _0x18bfb1=_0xe17d37;let _0xd3f03={...structuredClone(_0x47b9c8)},_0x246c1b=_0x4753a3['split']('.'),_0x325efd=[],_0x19eb60=_0xd3f03;for(let _0x371eb1 of _0x246c1b[_0x18bfb1(0xf2)](0x0,-0x1)){let _0x3235bf=_0x19eb60[_0x371eb1];if(_0x3235bf===void 0x0)return _0xd3f03;if(!T(_0x3235bf))throw E(_0x4753a3);_0x325efd[_0x18bfb1(0xcb)]({'object':_0x19eb60,'segment':_0x371eb1}),_0x19eb60=_0x3235bf;}delete _0x19eb60[_0x246c1b['at'](-0x1)];for(let _0x1db3d9 of _0x325efd[_0x18bfb1(0xd7)]()){let _0x3c16ac=_0x1db3d9[_0x18bfb1(0xf7)][_0x1db3d9['segment']];if(w(_0x3c16ac)&&Object[_0x18bfb1(0xab)](_0x3c16ac)[_0x18bfb1(0xc4)]===0x0)delete _0x1db3d9['object'][_0x1db3d9['segment']];else break;}return _0xd3f03;}function w(_0x4fab67){const _0x432c19=_0xe17d37;return typeof _0x4fab67==_0x432c19(0xf7)&&!!_0x4fab67&&!Array[_0x432c19(0xc3)](_0x4fab67);}function T(_0x192efe){return w(_0x192efe);}function E(_0xbcfcc){const _0x2ea793=_0xe17d37;return new u(_0x2ea793(0xe3),_0x2ea793(0xe4)+_0xbcfcc+'.',{'key':_0xbcfcc});}function D(_0x138726,_0x114454,_0x4580a8){const _0x198f64=_0xe17d37;return new u(_0x138726,_0x198f64(0xc8)+(_0x138726===_0x198f64(0xb1)?_0x198f64(0xc2):'write')+_0x198f64(0xcc)+_0x114454+':\x20'+d(_0x4580a8),{'path':_0x114454},{'cause':_0x4580a8});}export{u as ConfigError,a as configCodecs,g as createFileConfig,p as defineConfig};function _0x2e63(){const _0x50f02c=['toString','object','Expected\x20a\x20plain\x20JSON\x20object.','Expected\x20a\x20safe\x20integer.','details','Codec\x20must\x20provide\x20parse\x20and\x20parseText\x20functions.','Key\x20must\x20contain\x20safe\x20dot-separated\x20identifier\x20segments.','28dZolMF','CONFIG_INVALID_DEFINITION','parseText','definitions','parse','then','delete','hasOwn','code','message','Expected\x20a\x20non-empty\x20string\x20without\x20surrounding\x20whitespace.','unset','Expected\x20an\x20absolute\x20HTTP\x20or\x20HTTPS\x20URL.','http:','origin','keys','CONFIG_WRITE_FAILED','Config\x20key\x20is\x20not\x20available:\x20','https:','isSafeInteger','CONFIG_INVALID_VALUE','CONFIG_READ_FAILED','ext','CONFIG_UNKNOWN_KEY','Invalid\x20value\x20for\x20config\x20key\x20','string','5243720YYLdQV','boolean','Expected\x20one\x20of:\x20','name','description','test','Expected\x20\x22true\x22\x20or\x20\x22false\x22.','1449800ujCUBE','some','Expected\x20an\x20integer\x20less\x20than\x20or\x20equal\x20to\x20','found','split','read','isArray','length','includes','maximum','prototype','Failed\x20to\x20','Expected\x20a\x20finite\x20JSON\x20number.','4776684CdaYcx','push','\x20config\x20file\x20','json','number','getPrototypeOf','__proto__','defaultValue','key','Expected\x20a\x20boolean.','2340894NdYiaJ','56210976LMvIyG','function','reverse','path','7281sSQGKo','false','resolve','protocol','map','store','join','Expected\x20an\x20integer\x20greater\x20than\x20or\x20equal\x20to\x20','.json','add','CONFIG_INVALID_DOCUMENT','Config\x20document\x20conflicts\x20with\x20registered\x20key\x20','default','isFinite','trim','Config\x20path\x20must\x20be\x20absolute.','values','entries','has','13841152EiSzuK','freeze','1154ZoNupQ','minimum','Expected\x20an\x20acyclic\x20JSON-compatible\x20value.','codec','slice','value','constructor','dir'];_0x2e63=function(){return _0x50f02c;};return _0x2e63();}
|