@univer-cli/config 1.0.2 → 1.0.3
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 _0x22dc59=_0x5c94;(function(_0x5dc7de,_0x551745){const _0x289e9=_0x5c94,_0x14c181=_0x5dc7de();while(!![]){try{const _0x2bcd82=parseInt(_0x289e9(0xf2))/0x1+parseInt(_0x289e9(0xe3))/0x2+-parseInt(_0x289e9(0xe6))/0x3+-parseInt(_0x289e9(0xee))/0x4+-parseInt(_0x289e9(0xe9))/0x5*(parseInt(_0x289e9(0x102))/0x6)+parseInt(_0x289e9(0xf3))/0x7*(-parseInt(_0x289e9(0xec))/0x8)+parseInt(_0x289e9(0x10d))/0x9*(parseInt(_0x289e9(0xf4))/0xa);if(_0x2bcd82===_0x551745)break;else _0x14c181['push'](_0x14c181['shift']());}catch(_0xb43e3e){_0x14c181['push'](_0x14c181['shift']());}}}(_0x3165,0x1ce6d));import _0x17e4f7 from'conf';import{mkdirSync as _0x33532b}from'node:fs';import{isAbsolute as _0x3e3bdb,parse as _0x58c147,resolve as _0x365468}from'node:path';var a={'nonEmptyString'(){return{'parse':o,'parseText':o};},'boolean'(){return{'parse'(_0x12fd45){const _0x136ad9=_0x5c94;if(typeof _0x12fd45!=_0x136ad9(0x10a))throw Error(_0x136ad9(0x11b));return _0x12fd45;},'parseText'(_0x3a91f0){const _0x5db7a5=_0x5c94;if(_0x3a91f0===_0x5db7a5(0xf8))return!0x0;if(_0x3a91f0===_0x5db7a5(0xe1))return!0x1;throw Error('Expected\x20\x22true\x22\x20or\x20\x22false\x22.');}};},'integer'(_0x3137a6={}){let _0xa2d3a7=_0x5c7914=>{const _0x5d43a1=_0x5c94;if(typeof _0x5c7914!=_0x5d43a1(0x128)||!Number[_0x5d43a1(0x107)](_0x5c7914))throw Error(_0x5d43a1(0xe4));if(_0x3137a6['minimum']!==void 0x0&&_0x5c7914<_0x3137a6[_0x5d43a1(0xf6)])throw Error('Expected\x20an\x20integer\x20greater\x20than\x20or\x20equal\x20to\x20'+_0x3137a6[_0x5d43a1(0xf6)]+'.');if(_0x3137a6[_0x5d43a1(0x10c)]!==void 0x0&&_0x5c7914>_0x3137a6[_0x5d43a1(0x10c)])throw Error(_0x5d43a1(0xde)+_0x3137a6['maximum']+'.');return _0x5c7914;};return{'parse':_0xa2d3a7,'parseText'(_0x558a43){const _0x4c054c=_0x5c94;if(!/^-?(?:0|[1-9]\d*)$/u['test'](_0x558a43))throw Error(_0x4c054c(0x11a));return _0xa2d3a7(Number(_0x558a43));}};},'enumeration'(_0x2d4f46){let _0x51af8a=_0x1dc47c=>{const _0x2383d9=_0x5c94;if(typeof _0x1dc47c!='string'||!_0x2d4f46[_0x2383d9(0x111)](_0x1dc47c))throw Error('Expected\x20one\x20of:\x20'+_0x2d4f46[_0x2383d9(0x120)](',\x20')+'.');return _0x1dc47c;};return{'parse':_0x51af8a,'parseText':_0x51af8a};},'httpUrl'(){return{'parse':s,'parseText':s};},'httpOrigin'(){let _0x504833=_0xa56070=>new URL(s(_0xa56070))['origin'];return{'parse':_0x504833,'parseText':_0x504833};}};function o(_0xda0475){const _0x2733d4=_0x5c94;if(typeof _0xda0475!='string'||_0xda0475['length']===0x0||_0xda0475[_0x2733d4(0x112)]()!==_0xda0475)throw Error('Expected\x20a\x20non-empty\x20string\x20without\x20surrounding\x20whitespace.');return _0xda0475;}function s(_0x2c7939){const _0xb340ed=_0x5c94;let _0x5cf20f=o(_0x2c7939),_0x1ffda9;try{_0x1ffda9=new URL(_0x5cf20f);}catch{throw Error('Expected\x20an\x20absolute\x20HTTP\x20or\x20HTTPS\x20URL.');}if(_0x1ffda9[_0xb340ed(0x119)]!==_0xb340ed(0x10f)&&_0x1ffda9[_0xb340ed(0x119)]!==_0xb340ed(0x116))throw Error(_0xb340ed(0xef));return _0x1ffda9[_0xb340ed(0x110)]();}function c(_0x2ce654){l(_0x2ce654,new Set());}function l(_0x2ef237,_0x35591c){const _0x2b8932=_0x5c94;if(_0x2ef237===null||typeof _0x2ef237=='string'||typeof _0x2ef237==_0x2b8932(0x10a))return;if(typeof _0x2ef237==_0x2b8932(0x128)){if(!Number['isFinite'](_0x2ef237))throw Error(_0x2b8932(0xdb));return;}if(typeof _0x2ef237!=_0x2b8932(0x10e))throw Error(_0x2b8932(0xf9));if(_0x35591c[_0x2b8932(0x125)](_0x2ef237))throw Error(_0x2b8932(0x12b));if(_0x35591c[_0x2b8932(0xfc)](_0x2ef237),Array[_0x2b8932(0xf7)](_0x2ef237)){for(let _0x43a962 of _0x2ef237)l(_0x43a962,_0x35591c);_0x35591c[_0x2b8932(0xeb)](_0x2ef237);return;}let _0x14c3a8=Object[_0x2b8932(0x104)](_0x2ef237);if(_0x14c3a8!==Object[_0x2b8932(0x101)]&&_0x14c3a8!==null)throw Error(_0x2b8932(0xfe));for(let _0x4e3c20 of Object[_0x2b8932(0xf5)](_0x2ef237))l(_0x4e3c20,_0x35591c);_0x35591c[_0x2b8932(0xeb)](_0x2ef237);}var u=class extends Error{[_0x22dc59(0xff)];[_0x22dc59(0xe8)];constructor(_0x203304,_0x59b9a6,_0x228f72={},_0x4cebdd){const _0x38e111=_0x22dc59;super(_0x59b9a6,_0x4cebdd),this[_0x38e111(0xea)]='ConfigError',this['code']=_0x203304,this[_0x38e111(0xe8)]=_0x228f72;}};function _0x5c94(_0x28ea18,_0x205c54){_0x28ea18=_0x28ea18-0xd8;const _0x3165da=_0x3165();let _0x5c9487=_0x3165da[_0x28ea18];return _0x5c9487;}function d(_0xc9ce94){return _0xc9ce94 instanceof Error?_0xc9ce94['message']:String(_0xc9ce94);}var f=new Set(['__proto__','constructor',_0x22dc59(0x101)]);function p(_0x2f61f){const _0x4e410d=_0x22dc59;let _0x3dcd96={};for(let [_0x55ed2d,_0x3fd2da]of Object['entries'](_0x2f61f)){m(_0x55ed2d);let _0x26e164=_0x3fd2da[_0x4e410d(0x109)][_0x4e410d(0x112)]();if(_0x26e164==='')throw h(_0x55ed2d,_0x4e410d(0xe5));if(typeof _0x3fd2da[_0x4e410d(0xdd)]?.[_0x4e410d(0x113)]!=_0x4e410d(0x11e)||typeof _0x3fd2da[_0x4e410d(0xdd)][_0x4e410d(0xed)]!='function')throw h(_0x55ed2d,_0x4e410d(0x114));let _0x44846b;if(Object[_0x4e410d(0x108)](_0x3fd2da,_0x4e410d(0xf0)))try{_0x44846b=_0x3fd2da[_0x4e410d(0xdd)][_0x4e410d(0x113)](_0x3fd2da[_0x4e410d(0xf0)]),c(_0x44846b);}catch(_0x467c91){throw h(_0x55ed2d,_0x4e410d(0x11c)+d(_0x467c91),_0x467c91);}_0x3dcd96[_0x55ed2d]=Object['freeze']({'codec':_0x3fd2da[_0x4e410d(0xdd)],'description':_0x26e164,...Object['hasOwn'](_0x3fd2da,_0x4e410d(0xf0))?{'defaultValue':_0x44846b}:{}});}return Object['freeze'](_0x3dcd96);}function m(_0x3a11f5){const _0x1632ae=_0x22dc59;let _0x18dcd1=_0x3a11f5[_0x1632ae(0xfb)]('.');if(_0x3a11f5['length']===0x0||_0x3a11f5[_0x1632ae(0x112)]()!==_0x3a11f5||_0x18dcd1[_0x1632ae(0x127)](_0xf5c2a6=>_0xf5c2a6[_0x1632ae(0x123)]===0x0||f[_0x1632ae(0x125)](_0xf5c2a6)||!/^[A-Za-z][A-Za-z0-9_-]*$/u[_0x1632ae(0x105)](_0xf5c2a6)))throw h(_0x3a11f5,'Key\x20must\x20contain\x20safe\x20dot-separated\x20identifier\x20segments.');}function _0x3165(){const _0x244158=['key','CONFIG_INVALID_VALUE','protocol','Expected\x20an\x20integer.','Expected\x20a\x20boolean.','Invalid\x20default\x20value:\x20','Config\x20path\x20must\x20be\x20absolute.','function','Config\x20key\x20is\x20not\x20available:\x20','join','map','CONFIG_READ_FAILED','length','read','has','CONFIG_WRITE_FAILED','some','number','Config\x20path\x20must\x20use\x20the\x20.json\x20extension.','store','Expected\x20an\x20acyclic\x20JSON-compatible\x20value.','dir','path','Config\x20document\x20conflicts\x20with\x20registered\x20key\x20','Expected\x20a\x20finite\x20JSON\x20number.','Invalid\x20config\x20definition\x20','codec','Expected\x20an\x20integer\x20less\x20than\x20or\x20equal\x20to\x20','keys','.json','false','value','101514JvjIAq','Expected\x20a\x20safe\x20integer.','Description\x20must\x20not\x20be\x20empty.','30954RnaRZT','default','details','1715CWyxeV','name','delete','7296EZhKzs','parseText','257936uikwdN','Expected\x20an\x20absolute\x20HTTP\x20or\x20HTTPS\x20URL.','defaultValue','slice','34548JUKobH','1064NHgryQ','10BfrfXp','values','minimum','isArray','true','Expected\x20a\x20JSON-compatible\x20value.','unset','split','add','Failed\x20to\x20','Expected\x20a\x20plain\x20JSON\x20object.','code','segment','prototype','3834zpCTeF','CONFIG_INVALID_DEFINITION','getPrototypeOf','test','\x20config\x20file\x20','isSafeInteger','hasOwn','description','boolean','config','maximum','4191111yXtnnv','object','http:','toString','includes','trim','parse','Codec\x20must\x20provide\x20parse\x20and\x20parseText\x20functions.','then','https:'];_0x3165=function(){return _0x244158;};return _0x3165();}function h(_0x36169c,_0x549314,_0x5e11f6){const _0x114ed0=_0x22dc59;return new u(_0x114ed0(0x103),_0x114ed0(0xdc)+_0x36169c+':\x20'+_0x549314,{'key':_0x36169c},_0x5e11f6===void 0x0?void 0x0:{'cause':_0x5e11f6});}function g(_0x2fd91f){const _0x37832e=_0x22dc59;if(!_0x3e3bdb(_0x2fd91f[_0x37832e(0xd9)]))throw Error(_0x37832e(0x11d));let _0x51f4fd=_0x365468(_0x2fd91f[_0x37832e(0xd9)]),_0x5b040b=_0x58c147(_0x51f4fd);if(_0x5b040b['ext']!==_0x37832e(0xe0))throw Error(_0x37832e(0x129));try{_0x33532b(_0x5b040b[_0x37832e(0xd8)],{'mode':0x1c0,'recursive':!0x0});}catch(_0x4e3e7a){throw D('CONFIG_WRITE_FAILED',_0x51f4fd,_0x4e3e7a);}let _0x13be03;try{_0x13be03=new _0x17e4f7({'configFileMode':0x180,'configName':_0x5b040b[_0x37832e(0xea)],'cwd':_0x5b040b[_0x37832e(0xd8)],'fileExtension':'json'});}catch(_0x1749af){throw D(_0x37832e(0x122),_0x51f4fd,_0x1749af);}let _0x5b00dc=Promise['resolve'](),_0x5637a3=()=>{const _0x3e2e40=_0x37832e;try{return _0x13be03[_0x3e2e40(0x12a)];}catch(_0x2da175){throw D(_0x3e2e40(0x122),_0x51f4fd,_0x2da175);}},_0x17435a=_0x2cb53f=>{const _0x37d18f=_0x37832e;try{_0x13be03[_0x37d18f(0x12a)]=_0x2cb53f;}catch(_0x170fa6){throw D(_0x37d18f(0x126),_0x51f4fd,_0x170fa6);}},_0xc0914b=_0xee811c=>{const _0x2249bb=_0x37832e;let _0x109457=_(_0x2fd91f,_0xee811c),_0x4ddcea=x(_0x5637a3(),_0xee811c);return _0x4ddcea['found']?v(_0xee811c,_0x109457,_0x4ddcea[_0x2249bb(0xe2)]):b(_0xee811c,_0x109457);},_0x444d1c=async(_0x34c252,_0x542f63)=>{const _0x143791=_0x37832e;let _0x3bb984=_0x5b00dc[_0x143791(0x115)](()=>{let _0x335169=_0x5637a3();if(_0x542f63===void 0x0&&!x(_0x335169,_0x34c252)['found'])return _0xc0914b(_0x34c252);let _0x5f1b9b=_0x542f63===void 0x0?C(_0x335169,_0x34c252):S(_0x335169,_0x34c252,_0x542f63);return _0x17435a(_0x5f1b9b),_0xc0914b(_0x34c252);});return _0x5b00dc=_0x3bb984[_0x143791(0x115)](()=>void 0x0,()=>void 0x0),await _0x3bb984;};return{'path':_0x13be03[_0x37832e(0xd9)],async 'get'(_0xc5bb9b){const _0x4e8922=_0x37832e;return _0xc0914b(_0xc5bb9b[_0x4e8922(0x117)]);},async 'list'(){const _0x11b379=_0x37832e;return Object[_0x11b379(0xdf)](_0x2fd91f['definitions'])[_0x11b379(0x121)](_0x8b04d2=>_0xc0914b(_0x8b04d2));},async 'set'(_0x5d6f61){const _0x1691ce=_0x37832e;let _0x451e07=_(_0x2fd91f,_0x5d6f61['key']);return await _0x444d1c(_0x5d6f61[_0x1691ce(0x117)],y(_0x5d6f61[_0x1691ce(0x117)],()=>_0x451e07[_0x1691ce(0xdd)][_0x1691ce(0x113)](_0x5d6f61['value'])));},async 'setFromText'(_0x170184){const _0x814864=_0x37832e;let _0x5de5aa=_(_0x2fd91f,_0x170184[_0x814864(0x117)]);return await _0x444d1c(_0x170184[_0x814864(0x117)],y(_0x170184[_0x814864(0x117)],()=>_0x5de5aa[_0x814864(0xdd)][_0x814864(0xed)](_0x170184['text'])));},async 'unset'(_0x57114c){const _0x82ffe2=_0x37832e;return _(_0x2fd91f,_0x57114c[_0x82ffe2(0x117)]),await _0x444d1c(_0x57114c[_0x82ffe2(0x117)],void 0x0);}};}function _(_0x13406d,_0x4f8db4){const _0x1662c2=_0x22dc59;let _0x56859f=_0x13406d['definitions'][_0x4f8db4];if(_0x56859f===void 0x0)throw new u('CONFIG_UNKNOWN_KEY',_0x1662c2(0x11f)+_0x4f8db4+'.',{'availableKeys':Object['keys'](_0x13406d['definitions']),'key':_0x4f8db4});return _0x56859f;}function v(_0x14fd92,_0x2691dc,_0x234fc2){const _0x24ff9c=_0x22dc59;let _0x3102e5=y(_0x14fd92,()=>_0x2691dc[_0x24ff9c(0xdd)][_0x24ff9c(0x113)](_0x234fc2));return{'description':_0x2691dc[_0x24ff9c(0x109)],'key':_0x14fd92,'source':_0x24ff9c(0x10b),'value':_0x3102e5,...Object[_0x24ff9c(0x108)](_0x2691dc,_0x24ff9c(0xf0))?{'defaultValue':_0x2691dc['defaultValue']}:{}};}function y(_0x256e21,_0x735172){const _0x5b060c=_0x22dc59;try{let _0x5017ef=_0x735172();return c(_0x5017ef),_0x5017ef;}catch(_0x33c59b){throw new u(_0x5b060c(0x118),'Invalid\x20value\x20for\x20config\x20key\x20'+_0x256e21+':\x20'+d(_0x33c59b),{'key':_0x256e21},{'cause':_0x33c59b});}}function b(_0x5e5c4e,_0x55acc6){const _0x39fddc=_0x22dc59;return Object[_0x39fddc(0x108)](_0x55acc6,_0x39fddc(0xf0))?{'defaultValue':_0x55acc6['defaultValue'],'description':_0x55acc6[_0x39fddc(0x109)],'key':_0x5e5c4e,'source':_0x39fddc(0xe7),'value':_0x55acc6[_0x39fddc(0xf0)]}:{'description':_0x55acc6[_0x39fddc(0x109)],'key':_0x5e5c4e,'source':_0x39fddc(0xfa)};}function x(_0x4b321f,_0x478004){const _0x5b6f2c=_0x22dc59;let _0x22f97b=_0x4b321f;for(let _0x328fd7 of _0x478004[_0x5b6f2c(0xfb)]('.')){if(!w(_0x22f97b))throw E(_0x478004);if(!Object[_0x5b6f2c(0x108)](_0x22f97b,_0x328fd7))return{'found':!0x1};_0x22f97b=_0x22f97b[_0x328fd7];}return{'found':!0x0,'value':_0x22f97b};}function S(_0x286cf1,_0x49e56b,_0x48c3af){const _0x34ded7=_0x22dc59;let _0x2b4b6f={...structuredClone(_0x286cf1)},_0x1527d5=_0x49e56b[_0x34ded7(0xfb)]('.'),_0x5c4a71=_0x2b4b6f;for(let _0x3a69b5 of _0x1527d5[_0x34ded7(0xf1)](0x0,-0x1)){let _0x566b25=_0x5c4a71[_0x3a69b5];if(_0x566b25===void 0x0){let _0x1a4d65={};_0x5c4a71[_0x3a69b5]=_0x1a4d65,_0x5c4a71=_0x1a4d65;}else{if(T(_0x566b25))_0x5c4a71=_0x566b25;else throw E(_0x49e56b);}}return _0x5c4a71[_0x1527d5['at'](-0x1)]=structuredClone(_0x48c3af),_0x2b4b6f;}function C(_0x9947c4,_0x23d83a){const _0x141517=_0x22dc59;let _0x55fd7a={...structuredClone(_0x9947c4)},_0x526b93=_0x23d83a[_0x141517(0xfb)]('.'),_0x1aa59b=[],_0x554e65=_0x55fd7a;for(let _0xa3d60c of _0x526b93['slice'](0x0,-0x1)){let _0x35195c=_0x554e65[_0xa3d60c];if(_0x35195c===void 0x0)return _0x55fd7a;if(!T(_0x35195c))throw E(_0x23d83a);_0x1aa59b['push']({'object':_0x554e65,'segment':_0xa3d60c}),_0x554e65=_0x35195c;}delete _0x554e65[_0x526b93['at'](-0x1)];for(let _0x131a33 of _0x1aa59b['reverse']()){let _0x1bce82=_0x131a33[_0x141517(0x10e)][_0x131a33['segment']];if(w(_0x1bce82)&&Object[_0x141517(0xdf)](_0x1bce82)[_0x141517(0x123)]===0x0)delete _0x131a33[_0x141517(0x10e)][_0x131a33[_0x141517(0x100)]];else break;}return _0x55fd7a;}function w(_0x2e8baa){const _0x23d0dc=_0x22dc59;return typeof _0x2e8baa==_0x23d0dc(0x10e)&&!!_0x2e8baa&&!Array[_0x23d0dc(0xf7)](_0x2e8baa);}function T(_0x23cf4c){return w(_0x23cf4c);}function E(_0x248421){const _0x5d9036=_0x22dc59;return new u('CONFIG_INVALID_DOCUMENT',_0x5d9036(0xda)+_0x248421+'.',{'key':_0x248421});}function D(_0x4edff9,_0x2f307a,_0x395169){const _0x40dad0=_0x22dc59;return new u(_0x4edff9,_0x40dad0(0xfd)+(_0x4edff9===_0x40dad0(0x122)?_0x40dad0(0x124):'write')+_0x40dad0(0x106)+_0x2f307a+':\x20'+d(_0x395169),{'path':_0x2f307a},{'cause':_0x395169});}export{u as ConfigError,a as configCodecs,g as createFileConfig,p as defineConfig};
|