@univer-cli/config 1.0.3 → 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 _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};
|
|
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();}
|