@cyberskill/shared 1.159.0 → 1.161.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -4
- package/dist/_tsup-dts-rollup.d.cts +9 -0
- package/dist/_tsup-dts-rollup.d.ts +9 -0
- package/dist/config/config.util.cjs +1 -1
- package/dist/config/config.util.js +1 -1
- package/dist/config/env/env.d.cjs +1 -0
- package/dist/config/env/env.d.d.cts +1 -0
- package/dist/config/env/env.d.d.ts +1 -0
- package/dist/config/env/env.d.js +0 -0
- package/dist/config/env/env.type.cjs +1 -1
- package/dist/config/env/env.type.d.cts +1 -0
- package/dist/config/env/env.type.d.ts +1 -0
- package/dist/config/env/env.type.js +1 -0
- package/dist/config/env/env.util.cjs +1 -1
- package/dist/config/env/env.util.js +1 -1
- package/dist/config/env/index.cjs +1 -1
- package/dist/config/env/index.d.cts +1 -0
- package/dist/config/env/index.d.ts +1 -0
- package/dist/config/env/index.js +1 -1
- package/dist/config/graphql-codegen/graphql-codegen.util.cjs +1 -1
- package/dist/config/graphql-codegen/graphql-codegen.util.js +1 -1
- package/dist/config/graphql-codegen/index.cjs +1 -1
- package/dist/config/graphql-codegen/index.js +1 -1
- package/dist/config/index.cjs +1 -1
- package/dist/config/index.d.cts +1 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.js +1 -1
- package/dist/node/apollo-server/apollo-server.util.cjs +1 -1
- package/dist/node/apollo-server/apollo-server.util.js +1 -1
- package/dist/node/apollo-server/index.cjs +1 -1
- package/dist/node/apollo-server/index.js +1 -1
- package/dist/node/cli/cli.util.cjs +1 -1
- package/dist/node/cli/cli.util.js +1 -1
- package/dist/node/cli/index.cjs +1 -1
- package/dist/node/cli/index.js +1 -1
- package/dist/node/command/command.util.cjs +1 -1
- package/dist/node/command/command.util.js +1 -1
- package/dist/node/command/index.cjs +1 -1
- package/dist/node/command/index.js +1 -1
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/log/index.cjs +1 -1
- package/dist/node/log/index.js +1 -1
- package/dist/node/log/log.util.cjs +1 -1
- package/dist/node/log/log.util.js +1 -1
- package/dist/node/mongo/index.cjs +1 -1
- package/dist/node/mongo/index.js +1 -1
- package/dist/node/mongo/mongo.util.cjs +1 -1
- package/dist/node/mongo/mongo.util.js +1 -1
- package/dist/node/package/index.cjs +1 -1
- package/dist/node/package/index.js +1 -1
- package/dist/node/package/package.util.cjs +1 -1
- package/dist/node/package/package.util.js +1 -1
- package/dist/node/path/index.cjs +1 -1
- package/dist/node/path/index.js +1 -1
- package/dist/node/path/path.constant.cjs +1 -1
- package/dist/node/path/path.constant.js +1 -1
- package/dist/node/path/path.util.cjs +1 -1
- package/dist/node/path/path.util.js +1 -1
- package/dist/node/storage/index.cjs +1 -1
- package/dist/node/storage/index.js +1 -1
- package/dist/node/storage/storage.util.cjs +1 -1
- package/dist/node/storage/storage.util.js +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/vitest/index.cjs +1 -1
- package/dist/react/vitest/index.js +1 -1
- package/dist/react/vitest/vitest.unit.cjs +1 -1
- package/dist/react/vitest/vitest.unit.js +1 -1
- package/package.json +10 -10
- package/public/renovate.base.json +1 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,n){if(n==null||n>e.length)n=e.length;for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function n(n){if(Array.isArray(n))return e(n)}function t(e,n,t,r,o,a,s){try{var i=e[a](s);var c=i.value}catch(e){t(e);return}if(i.done){n(c)}else{Promise.resolve(c).then(r,o)}}function r(e){return function(){var n=this,r=arguments;return new Promise(function(o,a){var s=e.apply(n,r);function i(e){t(s,o,a,i,c,"next",e)}function c(e){t(s,o,a,i,c,"throw",e)}i(undefined)})}}function o(e,n,t){if(n in e){Object.defineProperty(e,n,{value:t,enumerable:true,configurable:true,writable:true})}else{e[n]=t}return e}function a(e,n){if(n!=null&&typeof Symbol!=="undefined"&&n[Symbol.hasInstance]){return!!n[Symbol.hasInstance](e)}else{return e instanceof n}}function s(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};var r=Object.keys(t);if(typeof Object.getOwnPropertySymbols==="function"){r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))}r.forEach(function(n){o(e,n,t[n])})}return e}function u(e){return n(e)||s(e)||l(e)||i()}function E(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function l(n,t){if(!n)return;if(typeof n==="string")return e(n,t);var r=Object.prototype.toString.call(n).slice(8,-1);if(r==="Object"&&n.constructor)r=n.constructor.name;if(r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(n,t)}function d(e,n){var t,r,o,a={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},s=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return s.next=i(0),s["throw"]=i(1),s["return"]=i(2),typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function i(e){return function(n){return c([e,n])}}function c(i){if(t)throw new TypeError("Generator is already executing.");while(s&&(s=0,i[0]&&(a=0)),a)try{if(t=1,r&&(o=i[0]&2?r["return"]:i[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;if(r=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:false};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){a=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(i[0]===6&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}if(o[2])a.ops.pop();a.trys.pop();continue}i=n.call(e,a)}catch(e){i=[6,e];r=0}finally{t=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}}var p=Object.defineProperty;var f=function(e,n){return p(e,"name",{value:n,configurable:!0})};import m from"@vitejs/plugin-react-swc";import{defineConfig as S}from"vitest/config";import D from"fs-extra";var O=".cyberskill-storage";import C from"@dotenvx/dotenvx";import{bool as I,cleanEnv as y,str as v}from"envalid";import T from"node:os";import N from"node:path";import A from"node:process";var h=!1;function g(){h||(C.config(),h=!0)}f(g,"loadEnvFile");function _(){g();var e=y(A.env,{CWD:v({default:A.cwd()}),DEBUG:I({default:!1}),CYBERSKILL_STORAGE_DIRECTORY:v({default:N.join(T.homedir(),O)})});return{CWD:e.CWD,DEBUG:e.DEBUG,CYBERSKILL_STORAGE_DIRECTORY:e.CYBERSKILL_STORAGE_DIRECTORY}}f(_,"getEnv");var R=function(e){return e.CLI="CLI",e.STRING="STRING",e.FUNCTION="FUNCTION",e}({});import{exec as G}from"node:child_process";import P from"node:process";import*as M from"node:util";var b=function(e){return e.Error="error",e.Warning="warning",e}({});import L from"chalk";import U from"consola";import{GraphQLError as w}from"graphql";var F={GRAPHQL_PARSE_FAILED:{CODE:"GRAPHQL_PARSE_FAILED",MESSAGE:"The GraphQL operation string contains a syntax error."},GRAPHQL_VALIDATION_FAILED:{CODE:"GRAPHQL_VALIDATION_FAILED",MESSAGE:"The GraphQL operation is not valid against the server's schema."},BAD_USER_INPUT:{CODE:"BAD_USER_INPUT",MESSAGE:"The GraphQL operation includes an invalid value for a field argument."},PERSISTED_QUERY_NOT_FOUND:{CODE:"PERSISTED_QUERY_NOT_FOUND",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the query was not in the APQ cache."},PERSISTED_QUERY_NOT_SUPPORTED:{CODE:"PERSISTED_QUERY_NOT_SUPPORTED",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the server has disabled APQ."},OPERATION_RESOLUTION_FAILURE:{CODE:"OPERATION_RESOLUTION_FAILURE",MESSAGE:"The request was parsed successfully and is valid against the server's schema, but the server couldn't resolve which operation to run. This occurs when a request containing multiple named operations doesn't specify which operation to run (i.e.,operationName), or if the named operation isn't included in the request."},CONTINUE:{CODE:100,MESSAGE:"Continue"},SWITCHING_PROTOCOLS:{CODE:101,MESSAGE:"Switching Protocols"},PROCESSING:{CODE:102,MESSAGE:"Processing"},OK:{CODE:200,MESSAGE:"OK"},CREATED:{CODE:201,MESSAGE:"Created"},ACCEPTED:{CODE:202,MESSAGE:"Accepted"},NON_AUTHORITATIVE_INFORMATION:{CODE:203,MESSAGE:"Non Authoritative Information"},NO_CONTENT:{CODE:204,MESSAGE:"No Content"},RESET_CONTENT:{CODE:205,MESSAGE:"Reset Content"},PARTIAL_CONTENT:{CODE:206,MESSAGE:"Partial Content"},MULTI_STATUS:{CODE:207,MESSAGE:"Multi-Status"},MULTIPLE_CHOICES:{CODE:300,MESSAGE:"Multiple Choices"},MOVED_PERMANENTLY:{CODE:301,MESSAGE:"Moved Permanently"},MOVED_TEMPORARILY:{CODE:302,MESSAGE:"Moved Temporarily"},SEE_OTHER:{CODE:303,MESSAGE:"See Other"},NOT_MODIFIED:{CODE:304,MESSAGE:"Not Modified"},USE_PROXY:{CODE:305,MESSAGE:"Use Proxy"},TEMPORARY_REDIRECT:{CODE:307,MESSAGE:"Temporary Redirect"},PERMANENT_REDIRECT:{CODE:308,MESSAGE:"Permanent Redirect"},BAD_REQUEST:{CODE:400,MESSAGE:"Bad Request"},UNAUTHORIZED:{CODE:401,MESSAGE:"Unauthorized"},PAYMENT_REQUIRED:{CODE:402,MESSAGE:"Payment Required"},FORBIDDEN:{CODE:403,MESSAGE:"Forbidden"},NOT_FOUND:{CODE:404,MESSAGE:"Not Found"},METHOD_NOT_ALLOWED:{CODE:405,MESSAGE:"Method Not Allowed"},NOT_ACCEPTABLE:{CODE:406,MESSAGE:"Not Acceptable"},PROXY_AUTHENTICATION_REQUIRED:{CODE:407,MESSAGE:"Proxy Authentication Required"},REQUEST_TIMEOUT:{CODE:408,MESSAGE:"Request Timeout"},CONFLICT:{CODE:409,MESSAGE:"Conflict"},GONE:{CODE:410,MESSAGE:"Gone"},LENGTH_REQUIRED:{CODE:411,MESSAGE:"Length Required"},PRECONDITION_FAILED:{CODE:412,MESSAGE:"Precondition Failed"},REQUEST_TOO_LONG:{CODE:413,MESSAGE:"Request Entity Too Large"},REQUEST_URI_TOO_LONG:{CODE:414,MESSAGE:"Request-URI Too Long"},UNSUPPORTED_MEDIA_TYPE:{CODE:415,MESSAGE:"Unsupported Media Type"},REQUESTED_RANGE_NOT_SATISFIABLE:{CODE:416,MESSAGE:"Requested Range Not Satisfiable"},EXPECTATION_FAILED:{CODE:417,MESSAGE:"Expectation Failed"},IM_A_TEAPOT:{CODE:418,MESSAGE:"I'm a teapot"},INSUFFICIENT_SPACE_ON_RESOURCE:{CODE:419,MESSAGE:"Insufficient Space on Resource"},METHOD_FAILURE:{CODE:420,MESSAGE:"Method Failure"},MISDIRECTED_REQUEST:{CODE:421,MESSAGE:"Misdirected Request"},UNPROCESSABLE_ENTITY:{CODE:422,MESSAGE:"Unprocessable Entity"},LOCKED:{CODE:423,MESSAGE:"Locked"},FAILED_DEPENDENCY:{CODE:424,MESSAGE:"Failed Dependency"},PRECONDITION_REQUIRED:{CODE:428,MESSAGE:"Precondition Required"},TOO_MANY_REQUESTS:{CODE:429,MESSAGE:"Too Many Requests"},REQUEST_HEADER_FIELDS_TOO_LARGE:{CODE:431,MESSAGE:"Request Header Fields Too Large"},UNAVAILABLE_FOR_LEGAL_REASONS:{CODE:451,MESSAGE:"Unavailable For Legal Reasons"},INTERNAL_SERVER_ERROR:{CODE:500,MESSAGE:"Internal Server Error"},NOT_IMPLEMENTED:{CODE:501,MESSAGE:"Not Implemented"},BAD_GATEWAY:{CODE:502,MESSAGE:"Bad Gateway"},SERVICE_UNAVAILABLE:{CODE:503,MESSAGE:"Service Unavailable"},GATEWAY_TIMEOUT:{CODE:504,MESSAGE:"Gateway Timeout"},HTTP_VERSION_NOT_SUPPORTED:{CODE:505,MESSAGE:"HTTP Version Not Supported"},INSUFFICIENT_STORAGE:{CODE:507,MESSAGE:"Insufficient Storage"},NETWORK_AUTHENTICATION_REQUIRED:{CODE:511,MESSAGE:"Network Authentication Required"}};var k=_();k.DEBUG||(U.level=4);function Y(e){var n=L[e];return typeof n=="function"?n:L.green}f(Y,"chalkKeyword");var V={silent:U.silent,level:U.level,fatal:U.fatal,error:U.error,warn:U.warn,log:U.log,info:U.info,success:U.success,ready:U.ready,start:U.start,box:U.box,debug:U.debug,trace:U.trace,verbose:U.verbose,printBoxedLog:function e(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"red";if(!(n===null||n===void 0?void 0:n.length)){U.box(L.green(e));return}n.forEach(function(e){var n=e.file,r=e.position,o=e.rule,a=e.message;U.log("".concat(L.gray("File:")," ").concat(L.blue("".concat(n).concat(r?":".concat(r):"")))),o&&U.log(" ".concat(Y(t)("Rule:")," ").concat(o)),U.log(" ".concat(Y(t)("Message:")," ").concat(a))}),U.box(Y(t)("".concat(e," : ").concat(n.length))),U.log(L.gray("─".repeat(40)))}};function x(e,n){var t=n!==null&&n!==void 0?n:{},r=t.shouldLog,o=r===void 0?!0:r,s=t.returnValue,i=t.callback,c=a(e,Error)?e:new Error(typeof e=="string"?e:"Unknown error");return o&&V.error(c.message),i&&typeof i=="function"&&i(c),s||{success:!1,message:c.message,code:F.INTERNAL_SERVER_ERROR.CODE}}f(x,"catchError");var j=function(e){return e.DEPENDENCY="dependencies",e.DEV_DEPENDENCY="devDependencies",e.PEER_DEPENDENCY="peerDependencies",e.BUNDLE_DEPENDENCY="bundleDependencies",e.OPTIONAL_DEPENDENCY="optionalDependencies",e}({});import K from"node-fetch";import B from"fs-extra";var Q=B.lstatSync,H=B.readdirSync,q=B.mkdirSync,W=B.readFileSync,J=B.unlinkSync,$=B.statSync,X=B.readJsonSync;function z(e,n,t){B.writeFileSync(e,n,t!==null&&t!==void 0?t:"utf-8")}f(z,"writeFileSync");function Z(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}return n.every(function(e){return B.pathExistsSync(e)})}f(Z,"pathExistsSync");var ee=_();function en(e){return r(function(){var n,t,r,o;return d(this,function(a){switch(a.label){case 0:a.trys.push([0,3,,4]);return[4,K("https://registry.npmjs.org/".concat(e,"/latest"))];case 1:n=a.sent();if(!n.ok)throw new Error("Failed to fetch latest version: ".concat(n.status," ").concat(n.statusText));return[4,n.json()];case 2:t=a.sent(),r=t.version;return[2,{success:!0,result:r}];case 3:o=a.sent();return[2,x(o)];case 4:return[2]}})})()}f(en,"getLatestPackageVersion");function et(e){return r(function(){var n,t,r,o,a,s,i,c,u,E,l,p,f,m,S,D,O,C,I,y,v,T,N,A;return d(this,function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);if(!e){if(Z(nt.PACKAGE_JSON)){n=X(nt.PACKAGE_JSON),t=n.name,r=t===void 0?"":t,o=n.version,a=o===void 0?"":o;return[2,{success:!0,result:{name:r,currentVersion:a,latestVersion:a,isCurrentProject:!0,isInstalled:!0,isUpToDate:!0,isDependency:!1,isDevDependency:!1,installedPath:nt.PACKAGE_JSON,file:n}}]}return[2,{success:!0,result:{name:"",currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:!1,isDevDependency:!1,installedPath:"",file:{}}}]}if(!Z(nt.PACKAGE_JSON))return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:e.type===j.DEPENDENCY,isDevDependency:e.type===j.DEV_DEPENDENCY,installedPath:"",file:{}}}];s=X(nt.PACKAGE_JSON),i=s.name,c=s.version,u=c===void 0?"":c,E=s.dependencies,l=E===void 0?{}:E,p=s.devDependencies,f=p===void 0?{}:p;if(e.name===i)return[2,{success:!0,result:{name:i,currentVersion:u,latestVersion:u,isCurrentProject:!0,isInstalled:!0,isUpToDate:!0,isDependency:e.type===j.DEPENDENCY,isDevDependency:e.type===j.DEV_DEPENDENCY,installedPath:nt.PACKAGE_JSON,file:s}}];m=e.name in l,S=e.name in f;return[4,en(e.name)];case 1:D=d.sent();if(!D.success)return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:m,isDevDependency:S,installedPath:"",file:{}}}];if(!m&&!S)return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:D.result,isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:e.type===j.DEPENDENCY,isDevDependency:e.type===j.DEV_DEPENDENCY,installedPath:"",file:{}}}];I=(C=(O=l[e.name])!==null&&O!==void 0?O:f[e.name])!==null&&C!==void 0?C:"",y=eA(ee.CWD,eR,e.name,eP);if(!Z(y))return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:D.result,isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:m,isDevDependency:S,installedPath:"",file:{}}}];v=X(y),T=v.version,N=T===void 0?"":T;return[2,I!==N?{success:!0,result:{name:e.name,currentVersion:N||I,latestVersion:D.result,isCurrentProject:!1,isInstalled:!0,isUpToDate:!1,isDependency:m,isDevDependency:S,installedPath:y,file:v}}:{success:!0,result:{name:e.name,currentVersion:I,latestVersion:D.result,isCurrentProject:!1,isInstalled:!0,isUpToDate:I===D.result,isDependency:m,isDevDependency:S,installedPath:y,file:v}}];case 2:A=d.sent();return[2,x(A)];case 3:return[2]}})})()}f(et,"getPackage");function er(e){return r(function(){var n,t,r,o,a;return d(this,function(s){try{;r=X(nt.PACKAGE_JSON),o=(n=r.dependencies)!==null&&n!==void 0?n:{},a=(t=r.devDependencies)!==null&&t!==void 0?t:{};e.isDependency?o[e.name]=e.latestVersion:e.isDevDependency&&(a[e.name]=e.latestVersion),z(nt.PACKAGE_JSON,JSON.stringify(r,null,4)),V.info('Updated "'.concat(e.name,'" to version ').concat(e.latestVersion))}catch(e){x(e)}return[2]})})()}f(er,"updatePackage");function eo(){return r(function(){var e,n,t,r,o,a,s,i,c,u,E,l,p;return d(this,function(d){switch(d.label){case 0:d.trys.push([0,12,,13]);e=[{command:f(function(){return no.pnpmInstallStandard()},"command"),message:"Installing dependencies (standard)"},{command:f(function(){return no.pnpmInstallLegacy()},"command"),message:"Retrying with legacy peer dependencies"},{command:f(function(){return no.pnpmInstallForce()},"command"),message:"Retrying with force install"}];n=true,t=false,r=undefined;d.label=1;case 1:d.trys.push([1,9,10,11]);o=e[Symbol.iterator]();d.label=2;case 2:if(!!(n=(a=o.next()).done))return[3,8];s=a.value,i=s.command,c=s.message;d.label=3;case 3:d.trys.push([3,6,,7]);return[4,i()];case 4:u=d.sent();return[4,eI("".concat(c," using: ").concat(u),u)];case 5:d.sent();return[2];case 6:E=d.sent();x(E);return[3,7];case 7:n=true;return[3,2];case 8:return[3,11];case 9:l=d.sent();t=true;r=l;return[3,11];case 10:try{if(!n&&o.return!=null){o.return()}}finally{if(t){throw r}}return[7];case 11:return[3,13];case 12:p=d.sent();x(p);return[3,13];case 13:return[2]}})})()}f(eo,"installDependencies");function ea(e,n){return r(function(){var t,r,o,a,s,i,c,u,E,l,p,f;return d(this,function(d){switch(d.label){case 0:if(!Z(nt.PACKAGE_JSON)){V.error("package.json not found. Aborting setup.");return[2]}d.label=1;case 1:d.trys.push([1,16,,17]);return[4,Promise.all(e.map(et))];case 2:t=d.sent().filter(function(e){return e.success?!e.result.isCurrentProject&&(!e.result.isInstalled||!e.result.isUpToDate):!1});r=t.length>0;if(!r)return[3,7];return[4,Promise.all(t.map(function(e){return e.success?er(e.result):Promise.resolve()}))];case 3:d.sent();return[4,eo()];case 4:d.sent();o=["Running ESLint with auto-fix"];return[4,no.eslintFix()];case 5:return[4,eI.apply(void 0,o.concat([d.sent()]))];case 6:r=d.sent();d.label=7;case 7:r;s=true,i=false,c=undefined;d.label=8;case 8:d.trys.push([8,13,14,15]);u=((a=n===null||n===void 0?void 0:n.postInstallActions)!==null&&a!==void 0?a:[])[Symbol.iterator]();d.label=9;case 9:if(!!(s=(E=u.next()).done))return[3,12];l=E.value;return[4,l()];case 10:d.sent();d.label=11;case 11:s=true;return[3,9];case 12:return[3,15];case 13:p=d.sent();i=true;c=p;return[3,15];case 14:try{if(!s&&u.return!=null){u.return()}}finally{if(i){throw c}}return[7];case 15:return[3,17];case 16:f=d.sent();x(f);return[3,17];case 17:return[2]}})})()}f(ea,"setupPackages");import es from"node-persist";var ei=_();function ec(){return r(function(){var e;return d(this,function(n){switch(n.label){case 0:e=es.defaultInstance;if(e)return[3,2];return[4,es.init({dir:ei.CYBERSKILL_STORAGE_DIRECTORY})];case 1:e=n.sent();n.label=2;case 2:e;return[2]}})})()}f(ec,"initNodePersist");var eu={get:function e(e){return r(function(){var n,t;return d(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,ec()];case 1:r.sent();return[4,es.getItem(e)];case 2:return[2,(n=r.sent())!==null&&n!==void 0?n:null];case 3:t=r.sent();return[2,x(t,{returnValue:null})];case 4:return[2]}})})()},set:function e(e,n){return r(function(){var t;return d(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,ec()];case 1:r.sent();return[4,es.setItem(e,n)];case 2:r.sent();return[3,4];case 3:t=r.sent();x(t);return[3,4];case 4:return[2]}})})()},remove:function e(e){return r(function(){var n;return d(this,function(t){switch(t.label){case 0:t.trys.push([0,3,,4]);return[4,ec()];case 1:t.sent();return[4,es.removeItem(e)];case 2:t.sent();return[3,4];case 3:n=t.sent();x(n);return[3,4];case 4:return[2]}})})()},keys:function e(){return r(function(){var e,n;return d(this,function(t){switch(t.label){case 0:t.trys.push([0,3,,4]);return[4,ec()];case 1:t.sent();return[4,es.keys()];case 2:e=t.sent();return[2,Array.isArray(e)?e:(V.warn("[Storage:keys] Invalid keys response:",e),[])];case 3:n=t.sent();return[2,x(n,{returnValue:[]})];case 4:return[2]}})})()},getLogLink:function e(e){return r(function(){return d(this,function(n){try{return[2,"".concat(ei.CYBERSKILL_STORAGE_DIRECTORY," (key: ").concat(e,")")]}catch(e){return[2,x(e,{returnValue:null})]}return[2]})})()}};var eE=_(),el=M.promisify(G);function ed(){return r(function(){var e;return d(this,function(n){switch(n.label){case 0:return[4,et()];case 1:e=n.sent();return[2,e.success?e.result.name:Date.now().toString()]}})})()}f(ed,"getPackageName");function ep(e){return r(function(){var n,t;return d(this,function(o){switch(o.label){case 0:if(e.length===0)return[2];return[4,ed()];case 1:n=o.sent();o.label=2;case 2:o.trys.push([2,4,,5]);return[4,eu.set(n,e)];case 3:o.sent(),setTimeout(function(){return r(function(){var e;return d(this,function(t){switch(t.label){case 0:return[4,eu.getLogLink(n)];case 1:e=t.sent();e&&V.info("\uD83D\uDCC2 Open the error list manually: ".concat(e));return[2]}})})()},0);return[3,5];case 4:t=o.sent();x(t);return[3,5];case 5:return[2]}})})()}f(ep,"saveErrorListToStorage");function ef(e){var n=[],t=[],r="",o=/^\s*(\d+):(\d+)\s+(error|warning)\s+(.+?)\s+(\S+)$/,a=/^(.+?)\((\d+),(\d+)\):\s+(error|warning)\s+TS\d+:\s+(\S.+)$/,s=/^✖\s+(.*?)\s+\[(.*?)\]$/;e.split("\n").forEach(function(e){if(e.startsWith("/"))r=e.trim();else{var i,c,u,E,l;var d=o.exec(e)||[],p=a.exec(e)||[],f=s.exec(e)||[];var m,S,D,O,C,I;d.length&&r?n.push({file:r,position:"".concat(d[1],":").concat(d[2]),type:d[3]===b.Error?b.Error:b.Warning,message:(m=d===null||d===void 0?void 0:(i=d[4])===null||i===void 0?void 0:i.trim())!==null&&m!==void 0?m:"",rule:(S=d===null||d===void 0?void 0:(c=d[5])===null||c===void 0?void 0:c.trim())!==null&&S!==void 0?S:""}):p.length?n.push({file:(D=p===null||p===void 0?void 0:p[1])!==null&&D!==void 0?D:"",position:"".concat(p[2],":").concat(p[3]),type:p[4]===b.Error?b.Error:b.Warning,message:(O=p===null||p===void 0?void 0:(u=p[5])===null||u===void 0?void 0:u.trim())!==null&&O!==void 0?O:""}):f.length?n.push({file:"commitlint",type:b.Error,message:(C=f===null||f===void 0?void 0:(E=f[1])===null||E===void 0?void 0:E.trim())!==null&&C!==void 0?C:"",rule:(I=f===null||f===void 0?void 0:(l=f[2])===null||l===void 0?void 0:l.trim())!==null&&I!==void 0?I:""}):t.push(e.trim())}}),n.length&&ep(n),eE.DEBUG&&t.length&&(V.warn("Unmatched lines:"),t.forEach(function(e){return V.info(" ".concat(e))}))}f(ef,"parseTextErrors");function em(e){try{var n=JSON.parse(e),t=[];n.forEach(function(e){var n=e.filePath,r=e.messages;r.forEach(function(e){var r=e.severity,o=e.line,a=e.column,s=e.ruleId,i=e.message;t.push({type:r===2?b.Error:b.Warning,file:n,position:"".concat(o,":").concat(a),rule:s,message:i})})}),t.length&&ep(t)}catch(n){ef(e)}}f(em,"parseCommandOutput");function eS(e){return r(function(e){var n,t,r,o,a,s,i,c,u;var E=arguments;return d(this,function(l){switch(l.label){case 0:n=E.length>1&&E[1]!==void 0?E[1]:em;t=new AbortController;P.on("SIGINT",function(){V.warn("Process interrupted. Terminating..."),t.abort(),P.exit()});l.label=1;case 1:l.trys.push([1,4,,5]);if(!(typeof e=="string"))return[3,3];return[4,el(e,{maxBuffer:0x6400000,signal:t.signal})];case 2:r=l.sent(),o=r.stdout,a=r.stderr;[o,a].forEach(function(e){return e&&n(e)});l.label=3;case 3:return[3,5];case 4:s=l.sent();i=s.stdout,c=s.stderr,u=s.message;[i,c].forEach(function(e){return e&&n(e)}),!c&&!i&&V.error("Command failed: ".concat(u));return[3,5];case 5:return[2]}})}).apply(this,arguments)}f(eS,"executeCommand");function eD(e){return{raw:!0,cmd:e}}f(eD,"rawCommand");function eO(e,n){return(n===null||n===void 0?void 0:n.isCurrentProject)?"".concat(e4," ").concat(e0," ").concat(ej," ").concat(e):"".concat(e4," ").concat(ex," ").concat(e)}f(eO,"formatCLI");function eC(e,n){return typeof e=="function"?eO(e(n),n):(typeof e==="undefined"?"undefined":E(e))=="object"&&(e===null||e===void 0?void 0:e.raw)===!0?e.cmd:typeof e=="string"?eO(e,n):e}f(eC,"formatCommand");function eI(e,n){return r(function(){var t;return d(this,function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);V.start("".concat(e)),eE.DEBUG&&V.info("→ ".concat(n));return[4,eS(n)];case 1:r.sent(),V.success("".concat(e," done."));return[3,3];case 2:t=r.sent();x(t);return[3,3];case 3:return[2]}})})()}f(eI,"runCommand");import ey from"node:path";var ev=_(),eT=ey;function eN(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}var r;return(r=eT).resolve.apply(r,[ev.CWD].concat(u(n)))}f(eN,"resolveWorkingPath");function eA(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}var r;return(r=eT).join.apply(r,u(n))}f(eA,"join");var eh=_(),eg=eh.CWD,e_="@cyberskill/shared",eR="node_modules",eG="dist",eP="package.json",eM="package-lock.json",eb="tsconfig.json",eL=".gitignore",eU=".simple-git-hooks.json",ew="pnpm-lock.yaml",eF=".git/hooks/",ek=".git/COMMIT_EDITMSG",eY=".migrate-mongo.config.js",eV=function(){var e=D.readJsonSync(eN(eP)).name===e_?eg:eA(eg,eR,e_);return eA(e,eG)}(),ex="cyberskill",ej="src/node/cli/index.ts",eK="eslint",eB="eslint",eQ="vitest";var eH="vitest",eq="@commitlint/cli",eW="@commitlint/config-conventional",eJ="commitlint",e$="lint-staged",eX="lint-staged",ez="typescript",eZ="tsc",e0="tsx",e1="git",e2="pnpm",e4="pnpm exec",e3="simple-git-hooks",e5="simple-git-hooks",e7="@eslint/config-inspector",e6="eslint-config-inspector",e8="node-modules-inspector",e9="node-modules-inspector",ne="migrate-mongo",nn="./node_modules/migrate-mongo/bin/migrate-mongo",nt={CYBERSKILL_DIRECTORY:eV,WORKING_DIRECTORY:eg,TS_CONFIG:eN(eb),GIT_IGNORE:eN(eL),GIT_HOOK:eN(eF),GIT_COMMIT_MSG:eN(ek),SIMPLE_GIT_HOOKS_JSON:eN(eU),PACKAGE_JSON:eN(eP),PACKAGE_LOCK_JSON:eN(eM),PNPM_LOCK_YAML:eN(ew),NODE_MODULES:eN(eR),MIGRATE_MONGO_CONFIG:eN(eY),LINT_STAGED_CONFIG:eN("".concat(eV,"/config/lint-staged/index.js")),COMMITLINT_CONFIG:eN("".concat(eV,"/config/commitlint/index.js")),UNIT_TEST_CONFIG:eN("".concat(eV,"/react/vitest/vitest.unit.js")),UNIT_TEST_SETUP_CONFIG:eN("".concat(eV,"/react/vitest/vitest.unit.setup.js")),E2E_TEST_CONFIG:eN("".concat(eV,"/react/vitest/vitest.e2e.js"))};function nr(e){var n=e.type,t=e.packages,o=e.command;var a=t===null||t===void 0?void 0:t.reduce(function(e,n){return e.some(function(e){return e.name===n.name})||e.push(n),e},[]);return function(){return r(function(){var e;return d(this,function(t){switch(t.label){case 0:switch(n){case R.CLI:return[3,1];case R.STRING:return[3,4]}return[3,5];case 1:e=a===null||a===void 0?void 0:a.length;if(!e)return[3,3];return[4,ea(a,{update:!0})];case 2:e=t.sent();t.label=3;case 3:return[2,(e,eC(eD("".concat(e4," ").concat(o))))];case 4:return[2,eC(eD(o))];case 5:throw new Error("Unsupported command type");case 6:return[2]}})})()}}f(nr,"buildCommand");var no={simpleGitHooks:nr({type:R.CLI,packages:[{name:e3,type:j.DEV_DEPENDENCY}],command:e5}),eslintInspect:nr({type:R.CLI,packages:[{name:e7,type:j.DEV_DEPENDENCY}],command:e6}),nodeModulesInspect:nr({type:R.CLI,packages:[{name:e8,type:j.DEV_DEPENDENCY}],command:e9}),eslintCheck:nr({type:R.CLI,packages:[{name:eK,type:j.DEV_DEPENDENCY}],command:"".concat(eB," ").concat(nt.WORKING_DIRECTORY," --no-cache")}),eslintFix:nr({type:R.CLI,packages:[{name:eK,type:j.DEV_DEPENDENCY}],command:"".concat(eB," ").concat(nt.WORKING_DIRECTORY," --fix --no-cache")}),typescriptCheck:nr({type:R.CLI,packages:[{name:ez,type:j.DEPENDENCY}],command:"".concat(eZ," -p ").concat(nt.TS_CONFIG," --noEmit")}),testUnit:nr({type:R.CLI,packages:[{name:eQ,type:j.DEV_DEPENDENCY}],command:"".concat(eH," --config ").concat(nt.UNIT_TEST_CONFIG)}),testE2e:nr({type:R.CLI,packages:[{name:eQ,type:j.DEV_DEPENDENCY}],command:"".concat(eH," --config ").concat(nt.E2E_TEST_CONFIG)}),mongoMigrateCreate:f(function(e){return nr({type:R.CLI,packages:[{name:ne,type:j.DEPENDENCY}],command:"".concat(e0," ").concat(nn," create ").concat(e," -f ").concat(nt.MIGRATE_MONGO_CONFIG)})()},"mongoMigrateCreate"),mongoMigrateUp:nr({type:R.CLI,packages:[{name:ne,type:j.DEPENDENCY}],command:"".concat(e0," ").concat(nn," up -f ").concat(nt.MIGRATE_MONGO_CONFIG)}),mongoMigrateDown:nr({type:R.CLI,packages:[{name:ne,type:j.DEPENDENCY}],command:"".concat(e0," ").concat(nn," down -f ").concat(nt.MIGRATE_MONGO_CONFIG)}),commitLint:nr({type:R.CLI,packages:[{name:eq,type:j.DEV_DEPENDENCY},{name:eW,type:j.DEV_DEPENDENCY}],command:"".concat(eJ," --edit ").concat(nt.GIT_COMMIT_MSG," --config ").concat(nt.COMMITLINT_CONFIG)}),lintStaged:nr({type:R.CLI,packages:[{name:e$,type:j.DEV_DEPENDENCY}],command:"".concat(eX," --config ").concat(nt.LINT_STAGED_CONFIG)}),configureGitHook:nr({type:R.STRING,command:"".concat(e1," config core.hooksPath ").concat(nt.GIT_HOOK)}),build:nr({type:R.STRING,command:"".concat(e2," run --if-present build")}),pnpmInstallStandard:nr({type:R.STRING,command:"".concat(e2," install --ignore-scripts")}),pnpmInstallLegacy:nr({type:R.STRING,command:"".concat(e2," install --ignore-scripts --legacy-peer-deps")}),pnpmInstallForce:nr({type:R.STRING,command:"".concat(e2," install --ignore-scripts --force")})};function na(e){return S(c({plugins:[m()],test:{globals:!0,environment:"jsdom",pool:"vmThreads",include:["**/*.test.unit.?(c|m)[jt]s?(x)"],setupFiles:[nt.UNIT_TEST_SETUP_CONFIG]}},e))}f(na,"vitestUnit");export{na as vitestUnit};
|
|
1
|
+
function e(e,n){if(n==null||n>e.length)n=e.length;for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function n(n){if(Array.isArray(n))return e(n)}function t(e,n,t,r,o,a,s){try{var i=e[a](s);var c=i.value}catch(e){t(e);return}if(i.done){n(c)}else{Promise.resolve(c).then(r,o)}}function r(e){return function(){var n=this,r=arguments;return new Promise(function(o,a){var s=e.apply(n,r);function i(e){t(s,o,a,i,c,"next",e)}function c(e){t(s,o,a,i,c,"throw",e)}i(undefined)})}}function o(e,n,t){if(n in e){Object.defineProperty(e,n,{value:t,enumerable:true,configurable:true,writable:true})}else{e[n]=t}return e}function a(e,n){if(n!=null&&typeof Symbol!=="undefined"&&n[Symbol.hasInstance]){return!!n[Symbol.hasInstance](e)}else{return e instanceof n}}function s(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};var r=Object.keys(t);if(typeof Object.getOwnPropertySymbols==="function"){r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))}r.forEach(function(n){o(e,n,t[n])})}return e}function u(e){return n(e)||s(e)||l(e)||i()}function E(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function l(n,t){if(!n)return;if(typeof n==="string")return e(n,t);var r=Object.prototype.toString.call(n).slice(8,-1);if(r==="Object"&&n.constructor)r=n.constructor.name;if(r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(n,t)}function d(e,n){var t,r,o,a={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},s=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return s.next=i(0),s["throw"]=i(1),s["return"]=i(2),typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function i(e){return function(n){return c([e,n])}}function c(i){if(t)throw new TypeError("Generator is already executing.");while(s&&(s=0,i[0]&&(a=0)),a)try{if(t=1,r&&(o=i[0]&2?r["return"]:i[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;if(r=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:a.label++;return{value:i[1],done:false};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){a=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(i[0]===6&&a.label<o[1]){a.label=o[1];o=i;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(i);break}if(o[2])a.ops.pop();a.trys.pop();continue}i=n.call(e,a)}catch(e){i=[6,e];r=0}finally{t=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}}var p=Object.defineProperty;var f=function(e,n){return p(e,"name",{value:n,configurable:!0})};import m from"@vitejs/plugin-react-swc";import{defineConfig as S}from"vitest/config";import D from"fs-extra";var O=".cyberskill-storage";var C=function(e){return e.PRODUCTION="production",e.STAGING="staging",e.DEVELOPMENT="development",e}({});import I from"@dotenvx/dotenvx";import{bool as N,cleanEnv as T,str as v}from"envalid";import y from"node:os";import A from"node:path";import h from"node:process";var g=!1;function _(){h.env.NODE_ENV!==C.PRODUCTION&&!g&&(I.config(),g=!0)}f(_,"loadEnvFile");function R(){_();var e=T(h.env,{CWD:v({default:h.cwd()}),DEBUG:N({default:!1}),CYBERSKILL_STORAGE_DIRECTORY:v({default:A.join(y.homedir(),O)})});return{CWD:e.CWD,DEBUG:e.DEBUG,CYBERSKILL_STORAGE_DIRECTORY:e.CYBERSKILL_STORAGE_DIRECTORY}}f(R,"getEnv");var G=function(e){return e.CLI="CLI",e.STRING="STRING",e.FUNCTION="FUNCTION",e}({});import{exec as P}from"node:child_process";import M from"node:process";import*as L from"node:util";var b=function(e){return e.Error="error",e.Warning="warning",e}({});import U from"chalk";import w from"consola";import{GraphQLError as F}from"graphql";var k={GRAPHQL_PARSE_FAILED:{CODE:"GRAPHQL_PARSE_FAILED",MESSAGE:"The GraphQL operation string contains a syntax error."},GRAPHQL_VALIDATION_FAILED:{CODE:"GRAPHQL_VALIDATION_FAILED",MESSAGE:"The GraphQL operation is not valid against the server's schema."},BAD_USER_INPUT:{CODE:"BAD_USER_INPUT",MESSAGE:"The GraphQL operation includes an invalid value for a field argument."},PERSISTED_QUERY_NOT_FOUND:{CODE:"PERSISTED_QUERY_NOT_FOUND",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the query was not in the APQ cache."},PERSISTED_QUERY_NOT_SUPPORTED:{CODE:"PERSISTED_QUERY_NOT_SUPPORTED",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the server has disabled APQ."},OPERATION_RESOLUTION_FAILURE:{CODE:"OPERATION_RESOLUTION_FAILURE",MESSAGE:"The request was parsed successfully and is valid against the server's schema, but the server couldn't resolve which operation to run. This occurs when a request containing multiple named operations doesn't specify which operation to run (i.e.,operationName), or if the named operation isn't included in the request."},CONTINUE:{CODE:100,MESSAGE:"Continue"},SWITCHING_PROTOCOLS:{CODE:101,MESSAGE:"Switching Protocols"},PROCESSING:{CODE:102,MESSAGE:"Processing"},OK:{CODE:200,MESSAGE:"OK"},CREATED:{CODE:201,MESSAGE:"Created"},ACCEPTED:{CODE:202,MESSAGE:"Accepted"},NON_AUTHORITATIVE_INFORMATION:{CODE:203,MESSAGE:"Non Authoritative Information"},NO_CONTENT:{CODE:204,MESSAGE:"No Content"},RESET_CONTENT:{CODE:205,MESSAGE:"Reset Content"},PARTIAL_CONTENT:{CODE:206,MESSAGE:"Partial Content"},MULTI_STATUS:{CODE:207,MESSAGE:"Multi-Status"},MULTIPLE_CHOICES:{CODE:300,MESSAGE:"Multiple Choices"},MOVED_PERMANENTLY:{CODE:301,MESSAGE:"Moved Permanently"},MOVED_TEMPORARILY:{CODE:302,MESSAGE:"Moved Temporarily"},SEE_OTHER:{CODE:303,MESSAGE:"See Other"},NOT_MODIFIED:{CODE:304,MESSAGE:"Not Modified"},USE_PROXY:{CODE:305,MESSAGE:"Use Proxy"},TEMPORARY_REDIRECT:{CODE:307,MESSAGE:"Temporary Redirect"},PERMANENT_REDIRECT:{CODE:308,MESSAGE:"Permanent Redirect"},BAD_REQUEST:{CODE:400,MESSAGE:"Bad Request"},UNAUTHORIZED:{CODE:401,MESSAGE:"Unauthorized"},PAYMENT_REQUIRED:{CODE:402,MESSAGE:"Payment Required"},FORBIDDEN:{CODE:403,MESSAGE:"Forbidden"},NOT_FOUND:{CODE:404,MESSAGE:"Not Found"},METHOD_NOT_ALLOWED:{CODE:405,MESSAGE:"Method Not Allowed"},NOT_ACCEPTABLE:{CODE:406,MESSAGE:"Not Acceptable"},PROXY_AUTHENTICATION_REQUIRED:{CODE:407,MESSAGE:"Proxy Authentication Required"},REQUEST_TIMEOUT:{CODE:408,MESSAGE:"Request Timeout"},CONFLICT:{CODE:409,MESSAGE:"Conflict"},GONE:{CODE:410,MESSAGE:"Gone"},LENGTH_REQUIRED:{CODE:411,MESSAGE:"Length Required"},PRECONDITION_FAILED:{CODE:412,MESSAGE:"Precondition Failed"},REQUEST_TOO_LONG:{CODE:413,MESSAGE:"Request Entity Too Large"},REQUEST_URI_TOO_LONG:{CODE:414,MESSAGE:"Request-URI Too Long"},UNSUPPORTED_MEDIA_TYPE:{CODE:415,MESSAGE:"Unsupported Media Type"},REQUESTED_RANGE_NOT_SATISFIABLE:{CODE:416,MESSAGE:"Requested Range Not Satisfiable"},EXPECTATION_FAILED:{CODE:417,MESSAGE:"Expectation Failed"},IM_A_TEAPOT:{CODE:418,MESSAGE:"I'm a teapot"},INSUFFICIENT_SPACE_ON_RESOURCE:{CODE:419,MESSAGE:"Insufficient Space on Resource"},METHOD_FAILURE:{CODE:420,MESSAGE:"Method Failure"},MISDIRECTED_REQUEST:{CODE:421,MESSAGE:"Misdirected Request"},UNPROCESSABLE_ENTITY:{CODE:422,MESSAGE:"Unprocessable Entity"},LOCKED:{CODE:423,MESSAGE:"Locked"},FAILED_DEPENDENCY:{CODE:424,MESSAGE:"Failed Dependency"},PRECONDITION_REQUIRED:{CODE:428,MESSAGE:"Precondition Required"},TOO_MANY_REQUESTS:{CODE:429,MESSAGE:"Too Many Requests"},REQUEST_HEADER_FIELDS_TOO_LARGE:{CODE:431,MESSAGE:"Request Header Fields Too Large"},UNAVAILABLE_FOR_LEGAL_REASONS:{CODE:451,MESSAGE:"Unavailable For Legal Reasons"},INTERNAL_SERVER_ERROR:{CODE:500,MESSAGE:"Internal Server Error"},NOT_IMPLEMENTED:{CODE:501,MESSAGE:"Not Implemented"},BAD_GATEWAY:{CODE:502,MESSAGE:"Bad Gateway"},SERVICE_UNAVAILABLE:{CODE:503,MESSAGE:"Service Unavailable"},GATEWAY_TIMEOUT:{CODE:504,MESSAGE:"Gateway Timeout"},HTTP_VERSION_NOT_SUPPORTED:{CODE:505,MESSAGE:"HTTP Version Not Supported"},INSUFFICIENT_STORAGE:{CODE:507,MESSAGE:"Insufficient Storage"},NETWORK_AUTHENTICATION_REQUIRED:{CODE:511,MESSAGE:"Network Authentication Required"}};var Y=R();Y.DEBUG||(w.level=4);function V(e){var n=U[e];return typeof n=="function"?n:U.green}f(V,"chalkKeyword");var x={silent:w.silent,level:w.level,fatal:w.fatal,error:w.error,warn:w.warn,log:w.log,info:w.info,success:w.success,ready:w.ready,start:w.start,box:w.box,debug:w.debug,trace:w.trace,verbose:w.verbose,printBoxedLog:function e(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"red";if(!(n===null||n===void 0?void 0:n.length)){w.box(U.green(e));return}n.forEach(function(e){var n=e.file,r=e.position,o=e.rule,a=e.message;w.log("".concat(U.gray("File:")," ").concat(U.blue("".concat(n).concat(r?":".concat(r):"")))),o&&w.log(" ".concat(V(t)("Rule:")," ").concat(o)),w.log(" ".concat(V(t)("Message:")," ").concat(a))}),w.box(V(t)("".concat(e," : ").concat(n.length))),w.log(U.gray("─".repeat(40)))}};function j(e,n){var t=n!==null&&n!==void 0?n:{},r=t.shouldLog,o=r===void 0?!0:r,s=t.returnValue,i=t.callback,c=a(e,Error)?e:new Error(typeof e=="string"?e:"Unknown error");return o&&x.error(c.message),i&&typeof i=="function"&&i(c),s||{success:!1,message:c.message,code:k.INTERNAL_SERVER_ERROR.CODE}}f(j,"catchError");var K=function(e){return e.DEPENDENCY="dependencies",e.DEV_DEPENDENCY="devDependencies",e.PEER_DEPENDENCY="peerDependencies",e.BUNDLE_DEPENDENCY="bundleDependencies",e.OPTIONAL_DEPENDENCY="optionalDependencies",e}({});import B from"node-fetch";import Q from"fs-extra";var H=Q.lstatSync,q=Q.readdirSync,W=Q.mkdirSync,J=Q.readFileSync,$=Q.unlinkSync,X=Q.statSync,z=Q.readJsonSync;function Z(e,n,t){Q.writeFileSync(e,n,t!==null&&t!==void 0?t:"utf-8")}f(Z,"writeFileSync");function ee(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}return n.every(function(e){return Q.pathExistsSync(e)})}f(ee,"pathExistsSync");var en=R();function et(e){return r(function(){var n,t,r,o;return d(this,function(a){switch(a.label){case 0:a.trys.push([0,3,,4]);return[4,B("https://registry.npmjs.org/".concat(e,"/latest"))];case 1:n=a.sent();if(!n.ok)throw new Error("Failed to fetch latest version: ".concat(n.status," ").concat(n.statusText));return[4,n.json()];case 2:t=a.sent(),r=t.version;return[2,{success:!0,result:r}];case 3:o=a.sent();return[2,j(o)];case 4:return[2]}})})()}f(et,"getLatestPackageVersion");function er(e){return r(function(){var n,t,r,o,a,s,i,c,u,E,l,p,f,m,S,D,O,C,I,N,T,v,y,A;return d(this,function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);if(!e){if(ee(nr.PACKAGE_JSON)){n=z(nr.PACKAGE_JSON),t=n.name,r=t===void 0?"":t,o=n.version,a=o===void 0?"":o;return[2,{success:!0,result:{name:r,currentVersion:a,latestVersion:a,isCurrentProject:!0,isInstalled:!0,isUpToDate:!0,isDependency:!1,isDevDependency:!1,installedPath:nr.PACKAGE_JSON,file:n}}]}return[2,{success:!0,result:{name:"",currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:!1,isDevDependency:!1,installedPath:"",file:{}}}]}if(!ee(nr.PACKAGE_JSON))return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:e.type===K.DEPENDENCY,isDevDependency:e.type===K.DEV_DEPENDENCY,installedPath:"",file:{}}}];s=z(nr.PACKAGE_JSON),i=s.name,c=s.version,u=c===void 0?"":c,E=s.dependencies,l=E===void 0?{}:E,p=s.devDependencies,f=p===void 0?{}:p;if(e.name===i)return[2,{success:!0,result:{name:i,currentVersion:u,latestVersion:u,isCurrentProject:!0,isInstalled:!0,isUpToDate:!0,isDependency:e.type===K.DEPENDENCY,isDevDependency:e.type===K.DEV_DEPENDENCY,installedPath:nr.PACKAGE_JSON,file:s}}];m=e.name in l,S=e.name in f;return[4,et(e.name)];case 1:D=d.sent();if(!D.success)return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:m,isDevDependency:S,installedPath:"",file:{}}}];if(!m&&!S)return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:D.result,isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:e.type===K.DEPENDENCY,isDevDependency:e.type===K.DEV_DEPENDENCY,installedPath:"",file:{}}}];I=(C=(O=l[e.name])!==null&&O!==void 0?O:f[e.name])!==null&&C!==void 0?C:"",N=eh(en.CWD,eG,e.name,eM);if(!ee(N))return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:D.result,isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:m,isDevDependency:S,installedPath:"",file:{}}}];T=z(N),v=T.version,y=v===void 0?"":v;return[2,I!==y?{success:!0,result:{name:e.name,currentVersion:y||I,latestVersion:D.result,isCurrentProject:!1,isInstalled:!0,isUpToDate:!1,isDependency:m,isDevDependency:S,installedPath:N,file:T}}:{success:!0,result:{name:e.name,currentVersion:I,latestVersion:D.result,isCurrentProject:!1,isInstalled:!0,isUpToDate:I===D.result,isDependency:m,isDevDependency:S,installedPath:N,file:T}}];case 2:A=d.sent();return[2,j(A)];case 3:return[2]}})})()}f(er,"getPackage");function eo(e){return r(function(){var n,t,r,o,a;return d(this,function(s){try{;r=z(nr.PACKAGE_JSON),o=(n=r.dependencies)!==null&&n!==void 0?n:{},a=(t=r.devDependencies)!==null&&t!==void 0?t:{};e.isDependency?o[e.name]=e.latestVersion:e.isDevDependency&&(a[e.name]=e.latestVersion),Z(nr.PACKAGE_JSON,JSON.stringify(r,null,4)),x.info('Updated "'.concat(e.name,'" to version ').concat(e.latestVersion))}catch(e){j(e)}return[2]})})()}f(eo,"updatePackage");function ea(){return r(function(){var e,n,t,r,o,a,s,i,c,u,E,l,p;return d(this,function(d){switch(d.label){case 0:d.trys.push([0,12,,13]);e=[{command:f(function(){return na.pnpmInstallStandard()},"command"),message:"Installing dependencies (standard)"},{command:f(function(){return na.pnpmInstallLegacy()},"command"),message:"Retrying with legacy peer dependencies"},{command:f(function(){return na.pnpmInstallForce()},"command"),message:"Retrying with force install"}];n=true,t=false,r=undefined;d.label=1;case 1:d.trys.push([1,9,10,11]);o=e[Symbol.iterator]();d.label=2;case 2:if(!!(n=(a=o.next()).done))return[3,8];s=a.value,i=s.command,c=s.message;d.label=3;case 3:d.trys.push([3,6,,7]);return[4,i()];case 4:u=d.sent();return[4,eN("".concat(c," using: ").concat(u),u)];case 5:d.sent();return[2];case 6:E=d.sent();j(E);return[3,7];case 7:n=true;return[3,2];case 8:return[3,11];case 9:l=d.sent();t=true;r=l;return[3,11];case 10:try{if(!n&&o.return!=null){o.return()}}finally{if(t){throw r}}return[7];case 11:return[3,13];case 12:p=d.sent();j(p);return[3,13];case 13:return[2]}})})()}f(ea,"installDependencies");function es(e,n){return r(function(){var t,r,o,a,s,i,c,u,E,l,p,f;return d(this,function(d){switch(d.label){case 0:if(!ee(nr.PACKAGE_JSON)){x.error("package.json not found. Aborting setup.");return[2]}d.label=1;case 1:d.trys.push([1,16,,17]);return[4,Promise.all(e.map(er))];case 2:t=d.sent().filter(function(e){return e.success?!e.result.isCurrentProject&&(!e.result.isInstalled||!e.result.isUpToDate):!1});r=t.length>0;if(!r)return[3,7];return[4,Promise.all(t.map(function(e){return e.success?eo(e.result):Promise.resolve()}))];case 3:d.sent();return[4,ea()];case 4:d.sent();o=["Running ESLint with auto-fix"];return[4,na.eslintFix()];case 5:return[4,eN.apply(void 0,o.concat([d.sent()]))];case 6:r=d.sent();d.label=7;case 7:r;s=true,i=false,c=undefined;d.label=8;case 8:d.trys.push([8,13,14,15]);u=((a=n===null||n===void 0?void 0:n.postInstallActions)!==null&&a!==void 0?a:[])[Symbol.iterator]();d.label=9;case 9:if(!!(s=(E=u.next()).done))return[3,12];l=E.value;return[4,l()];case 10:d.sent();d.label=11;case 11:s=true;return[3,9];case 12:return[3,15];case 13:p=d.sent();i=true;c=p;return[3,15];case 14:try{if(!s&&u.return!=null){u.return()}}finally{if(i){throw c}}return[7];case 15:return[3,17];case 16:f=d.sent();j(f);return[3,17];case 17:return[2]}})})()}f(es,"setupPackages");import ei from"node-persist";var ec=R();function eu(){return r(function(){var e;return d(this,function(n){switch(n.label){case 0:e=ei.defaultInstance;if(e)return[3,2];return[4,ei.init({dir:ec.CYBERSKILL_STORAGE_DIRECTORY})];case 1:e=n.sent();n.label=2;case 2:e;return[2]}})})()}f(eu,"initNodePersist");var eE={get:function e(e){return r(function(){var n,t;return d(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,eu()];case 1:r.sent();return[4,ei.getItem(e)];case 2:return[2,(n=r.sent())!==null&&n!==void 0?n:null];case 3:t=r.sent();return[2,j(t,{returnValue:null})];case 4:return[2]}})})()},set:function e(e,n){return r(function(){var t;return d(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,eu()];case 1:r.sent();return[4,ei.setItem(e,n)];case 2:r.sent();return[3,4];case 3:t=r.sent();j(t);return[3,4];case 4:return[2]}})})()},remove:function e(e){return r(function(){var n;return d(this,function(t){switch(t.label){case 0:t.trys.push([0,3,,4]);return[4,eu()];case 1:t.sent();return[4,ei.removeItem(e)];case 2:t.sent();return[3,4];case 3:n=t.sent();j(n);return[3,4];case 4:return[2]}})})()},keys:function e(){return r(function(){var e,n;return d(this,function(t){switch(t.label){case 0:t.trys.push([0,3,,4]);return[4,eu()];case 1:t.sent();return[4,ei.keys()];case 2:e=t.sent();return[2,Array.isArray(e)?e:(x.warn("[Storage:keys] Invalid keys response:",e),[])];case 3:n=t.sent();return[2,j(n,{returnValue:[]})];case 4:return[2]}})})()},getLogLink:function e(e){return r(function(){return d(this,function(n){try{return[2,"".concat(ec.CYBERSKILL_STORAGE_DIRECTORY," (key: ").concat(e,")")]}catch(e){return[2,j(e,{returnValue:null})]}return[2]})})()}};var el=R(),ed=L.promisify(P);function ep(){return r(function(){var e;return d(this,function(n){switch(n.label){case 0:return[4,er()];case 1:e=n.sent();return[2,e.success?e.result.name:Date.now().toString()]}})})()}f(ep,"getPackageName");function ef(e){return r(function(){var n,t;return d(this,function(o){switch(o.label){case 0:if(e.length===0)return[2];return[4,ep()];case 1:n=o.sent();o.label=2;case 2:o.trys.push([2,4,,5]);return[4,eE.set(n,e)];case 3:o.sent(),setTimeout(function(){return r(function(){var e;return d(this,function(t){switch(t.label){case 0:return[4,eE.getLogLink(n)];case 1:e=t.sent();e&&x.info("\uD83D\uDCC2 Open the error list manually: ".concat(e));return[2]}})})()},0);return[3,5];case 4:t=o.sent();j(t);return[3,5];case 5:return[2]}})})()}f(ef,"saveErrorListToStorage");function em(e){var n=[],t=[],r="",o=/^\s*(\d+):(\d+)\s+(error|warning)\s+(.+?)\s+(\S+)$/,a=/^(.+?)\((\d+),(\d+)\):\s+(error|warning)\s+TS\d+:\s+(\S.+)$/,s=/^✖\s+(.*?)\s+\[(.*?)\]$/;e.split("\n").forEach(function(e){if(e.startsWith("/"))r=e.trim();else{var i,c,u,E,l;var d=o.exec(e)||[],p=a.exec(e)||[],f=s.exec(e)||[];var m,S,D,O,C,I;d.length&&r?n.push({file:r,position:"".concat(d[1],":").concat(d[2]),type:d[3]===b.Error?b.Error:b.Warning,message:(m=d===null||d===void 0?void 0:(i=d[4])===null||i===void 0?void 0:i.trim())!==null&&m!==void 0?m:"",rule:(S=d===null||d===void 0?void 0:(c=d[5])===null||c===void 0?void 0:c.trim())!==null&&S!==void 0?S:""}):p.length?n.push({file:(D=p===null||p===void 0?void 0:p[1])!==null&&D!==void 0?D:"",position:"".concat(p[2],":").concat(p[3]),type:p[4]===b.Error?b.Error:b.Warning,message:(O=p===null||p===void 0?void 0:(u=p[5])===null||u===void 0?void 0:u.trim())!==null&&O!==void 0?O:""}):f.length?n.push({file:"commitlint",type:b.Error,message:(C=f===null||f===void 0?void 0:(E=f[1])===null||E===void 0?void 0:E.trim())!==null&&C!==void 0?C:"",rule:(I=f===null||f===void 0?void 0:(l=f[2])===null||l===void 0?void 0:l.trim())!==null&&I!==void 0?I:""}):t.push(e.trim())}}),n.length&&ef(n),el.DEBUG&&t.length&&(x.warn("Unmatched lines:"),t.forEach(function(e){return x.info(" ".concat(e))}))}f(em,"parseTextErrors");function eS(e){try{var n=JSON.parse(e),t=[];n.forEach(function(e){var n=e.filePath,r=e.messages;r.forEach(function(e){var r=e.severity,o=e.line,a=e.column,s=e.ruleId,i=e.message;t.push({type:r===2?b.Error:b.Warning,file:n,position:"".concat(o,":").concat(a),rule:s,message:i})})}),t.length&&ef(t)}catch(n){em(e)}}f(eS,"parseCommandOutput");function eD(e){return r(function(e){var n,t,r,o,a,s,i,c,u;var E=arguments;return d(this,function(l){switch(l.label){case 0:n=E.length>1&&E[1]!==void 0?E[1]:eS;t=new AbortController;M.on("SIGINT",function(){x.warn("Process interrupted. Terminating..."),t.abort(),M.exit()});l.label=1;case 1:l.trys.push([1,4,,5]);if(!(typeof e=="string"))return[3,3];return[4,ed(e,{maxBuffer:0x6400000,signal:t.signal})];case 2:r=l.sent(),o=r.stdout,a=r.stderr;[o,a].forEach(function(e){return e&&n(e)});l.label=3;case 3:return[3,5];case 4:s=l.sent();i=s.stdout,c=s.stderr,u=s.message;[i,c].forEach(function(e){return e&&n(e)}),!c&&!i&&x.error("Command failed: ".concat(u));return[3,5];case 5:return[2]}})}).apply(this,arguments)}f(eD,"executeCommand");function eO(e){return{raw:!0,cmd:e}}f(eO,"rawCommand");function eC(e,n){return(n===null||n===void 0?void 0:n.isCurrentProject)?"".concat(e3," ").concat(e1," ").concat(eK," ").concat(e):"".concat(e3," ").concat(ej," ").concat(e)}f(eC,"formatCLI");function eI(e,n){return typeof e=="function"?eC(e(n),n):(typeof e==="undefined"?"undefined":E(e))=="object"&&(e===null||e===void 0?void 0:e.raw)===!0?e.cmd:typeof e=="string"?eC(e,n):e}f(eI,"formatCommand");function eN(e,n){return r(function(){var t;return d(this,function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);x.start("".concat(e)),el.DEBUG&&x.info("→ ".concat(n));return[4,eD(n)];case 1:r.sent(),x.success("".concat(e," done."));return[3,3];case 2:t=r.sent();j(t);return[3,3];case 3:return[2]}})})()}f(eN,"runCommand");import eT from"node:path";var ev=R(),ey=eT;function eA(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}var r;return(r=ey).resolve.apply(r,[ev.CWD].concat(u(n)))}f(eA,"resolveWorkingPath");function eh(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}var r;return(r=ey).join.apply(r,u(n))}f(eh,"join");var eg=R(),e_=eg.CWD,eR="@cyberskill/shared",eG="node_modules",eP="dist",eM="package.json",eL="package-lock.json",eb="tsconfig.json",eU=".gitignore",ew=".simple-git-hooks.json",eF="pnpm-lock.yaml",ek=".git/hooks/",eY=".git/COMMIT_EDITMSG",eV=".migrate-mongo.config.js",ex=function(){var e=D.readJsonSync(eA(eM)).name===eR?e_:eh(e_,eG,eR);return eh(e,eP)}(),ej="cyberskill",eK="src/node/cli/index.ts",eB="eslint",eQ="eslint",eH="vitest";var eq="vitest",eW="@commitlint/cli",eJ="@commitlint/config-conventional",e$="commitlint",eX="lint-staged",ez="lint-staged",eZ="typescript",e0="tsc",e1="tsx",e2="git",e4="pnpm",e3="pnpm exec",e5="simple-git-hooks",e7="simple-git-hooks",e6="@eslint/config-inspector",e8="eslint-config-inspector",e9="node-modules-inspector",ne="node-modules-inspector",nn="migrate-mongo",nt="./node_modules/migrate-mongo/bin/migrate-mongo",nr={CYBERSKILL_DIRECTORY:ex,WORKING_DIRECTORY:e_,TS_CONFIG:eA(eb),GIT_IGNORE:eA(eU),GIT_HOOK:eA(ek),GIT_COMMIT_MSG:eA(eY),SIMPLE_GIT_HOOKS_JSON:eA(ew),PACKAGE_JSON:eA(eM),PACKAGE_LOCK_JSON:eA(eL),PNPM_LOCK_YAML:eA(eF),NODE_MODULES:eA(eG),MIGRATE_MONGO_CONFIG:eA(eV),LINT_STAGED_CONFIG:eA("".concat(ex,"/config/lint-staged/index.js")),COMMITLINT_CONFIG:eA("".concat(ex,"/config/commitlint/index.js")),UNIT_TEST_CONFIG:eA("".concat(ex,"/react/vitest/vitest.unit.js")),UNIT_TEST_SETUP_CONFIG:eA("".concat(ex,"/react/vitest/vitest.unit.setup.js")),E2E_TEST_CONFIG:eA("".concat(ex,"/react/vitest/vitest.e2e.js"))};function no(e){var n=e.type,t=e.packages,o=e.command;var a=t===null||t===void 0?void 0:t.reduce(function(e,n){return e.some(function(e){return e.name===n.name})||e.push(n),e},[]);return function(){return r(function(){var e;return d(this,function(t){switch(t.label){case 0:switch(n){case G.CLI:return[3,1];case G.STRING:return[3,4]}return[3,5];case 1:e=a===null||a===void 0?void 0:a.length;if(!e)return[3,3];return[4,es(a,{update:!0})];case 2:e=t.sent();t.label=3;case 3:return[2,(e,eI(eO("".concat(e3," ").concat(o))))];case 4:return[2,eI(eO(o))];case 5:throw new Error("Unsupported command type");case 6:return[2]}})})()}}f(no,"buildCommand");var na={simpleGitHooks:no({type:G.CLI,packages:[{name:e5,type:K.DEV_DEPENDENCY}],command:e7}),eslintInspect:no({type:G.CLI,packages:[{name:e6,type:K.DEV_DEPENDENCY}],command:e8}),nodeModulesInspect:no({type:G.CLI,packages:[{name:e9,type:K.DEV_DEPENDENCY}],command:ne}),eslintCheck:no({type:G.CLI,packages:[{name:eB,type:K.DEV_DEPENDENCY}],command:"".concat(eQ," ").concat(nr.WORKING_DIRECTORY," --no-cache")}),eslintFix:no({type:G.CLI,packages:[{name:eB,type:K.DEV_DEPENDENCY}],command:"".concat(eQ," ").concat(nr.WORKING_DIRECTORY," --fix --no-cache")}),typescriptCheck:no({type:G.CLI,packages:[{name:eZ,type:K.DEPENDENCY}],command:"".concat(e0," -p ").concat(nr.TS_CONFIG," --noEmit")}),testUnit:no({type:G.CLI,packages:[{name:eH,type:K.DEV_DEPENDENCY}],command:"".concat(eq," --config ").concat(nr.UNIT_TEST_CONFIG)}),testE2e:no({type:G.CLI,packages:[{name:eH,type:K.DEV_DEPENDENCY}],command:"".concat(eq," --config ").concat(nr.E2E_TEST_CONFIG)}),mongoMigrateCreate:f(function(e){return no({type:G.CLI,packages:[{name:nn,type:K.DEPENDENCY}],command:"".concat(e1," ").concat(nt," create ").concat(e," -f ").concat(nr.MIGRATE_MONGO_CONFIG)})()},"mongoMigrateCreate"),mongoMigrateUp:no({type:G.CLI,packages:[{name:nn,type:K.DEPENDENCY}],command:"".concat(e1," ").concat(nt," up -f ").concat(nr.MIGRATE_MONGO_CONFIG)}),mongoMigrateDown:no({type:G.CLI,packages:[{name:nn,type:K.DEPENDENCY}],command:"".concat(e1," ").concat(nt," down -f ").concat(nr.MIGRATE_MONGO_CONFIG)}),commitLint:no({type:G.CLI,packages:[{name:eW,type:K.DEV_DEPENDENCY},{name:eJ,type:K.DEV_DEPENDENCY}],command:"".concat(e$," --edit ").concat(nr.GIT_COMMIT_MSG," --config ").concat(nr.COMMITLINT_CONFIG)}),lintStaged:no({type:G.CLI,packages:[{name:eX,type:K.DEV_DEPENDENCY}],command:"".concat(ez," --config ").concat(nr.LINT_STAGED_CONFIG)}),configureGitHook:no({type:G.STRING,command:"".concat(e2," config core.hooksPath ").concat(nr.GIT_HOOK)}),build:no({type:G.STRING,command:"".concat(e4," run --if-present build")}),pnpmInstallStandard:no({type:G.STRING,command:"".concat(e4," install --ignore-scripts")}),pnpmInstallLegacy:no({type:G.STRING,command:"".concat(e4," install --ignore-scripts --legacy-peer-deps")}),pnpmInstallForce:no({type:G.STRING,command:"".concat(e4," install --ignore-scripts --force")})};function ns(e){return S(c({plugins:[m()],test:{globals:!0,environment:"jsdom",pool:"vmThreads",include:["**/*.test.unit.?(c|m)[jt]s?(x)"],setupFiles:[nr.UNIT_TEST_SETUP_CONFIG]}},e))}f(ns,"vitestUnit");export{ns as vitestUnit};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyberskill/shared",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.161.0",
|
|
5
5
|
"description": "CyberSkill Shared",
|
|
6
6
|
"author": "Stephen Cheng",
|
|
7
7
|
"license": "MIT",
|
|
@@ -225,14 +225,14 @@
|
|
|
225
225
|
"@antfu/eslint-config": "4.13.0",
|
|
226
226
|
"@apollo/client": "3.13.8",
|
|
227
227
|
"@apollo/server": "4.12.0",
|
|
228
|
-
"@dotenvx/dotenvx": "1.
|
|
228
|
+
"@dotenvx/dotenvx": "1.44.0",
|
|
229
229
|
"@eddeee888/gcg-typescript-resolver-files": "0.12.0",
|
|
230
230
|
"@eslint-react/eslint-plugin": "1.49.0",
|
|
231
231
|
"@graphql-codegen/cli": "5.0.6",
|
|
232
232
|
"@graphql-codegen/client-preset": "4.8.1",
|
|
233
|
-
"@microsoft/api-extractor": "7.52.
|
|
234
|
-
"@nestjs/common": "11.1.
|
|
235
|
-
"@nestjs/core": "11.1.
|
|
233
|
+
"@microsoft/api-extractor": "7.52.8",
|
|
234
|
+
"@nestjs/common": "11.1.1",
|
|
235
|
+
"@nestjs/core": "11.1.1",
|
|
236
236
|
"@next/eslint-plugin-next": "15.3.2",
|
|
237
237
|
"@testing-library/jest-dom": "6.6.3",
|
|
238
238
|
"@testing-library/react": "16.3.0",
|
|
@@ -259,14 +259,14 @@
|
|
|
259
259
|
"fs-extra": "11.3.0",
|
|
260
260
|
"globals": "16.1.0",
|
|
261
261
|
"graphql": "16.11.0",
|
|
262
|
-
"graphql-ws": "6.0.
|
|
262
|
+
"graphql-ws": "6.0.5",
|
|
263
263
|
"i18next": "25.1.2",
|
|
264
264
|
"jsdom": "26.1.0",
|
|
265
265
|
"localforage": "1.10.0",
|
|
266
266
|
"migrate-mongo": "12.1.3",
|
|
267
267
|
"modern-normalize": "3.0.1",
|
|
268
268
|
"mongodb": "6.16.0",
|
|
269
|
-
"mongoose": "8.14.
|
|
269
|
+
"mongoose": "8.14.3",
|
|
270
270
|
"mongoose-aggregate-paginate-v2": "1.1.4",
|
|
271
271
|
"mongoose-paginate-v2": "1.9.0",
|
|
272
272
|
"next-intl": "4.1.0",
|
|
@@ -311,10 +311,10 @@
|
|
|
311
311
|
"@types/express-useragent": "1.0.5",
|
|
312
312
|
"@types/fs-extra": "11.0.4",
|
|
313
313
|
"@types/migrate-mongo": "10.0.5",
|
|
314
|
-
"@types/node": "22.15.
|
|
314
|
+
"@types/node": "22.15.18",
|
|
315
315
|
"@types/node-persist": "3.1.8",
|
|
316
|
-
"@types/react": "19.1.
|
|
317
|
-
"@types/react-dom": "19.1.
|
|
316
|
+
"@types/react": "19.1.4",
|
|
317
|
+
"@types/react-dom": "19.1.5",
|
|
318
318
|
"@types/unorm": "1.3.31",
|
|
319
319
|
"@types/uuid": "10.0.0",
|
|
320
320
|
"@types/ws": "8.18.1",
|