@cyberskill/shared 1.211.0 → 1.212.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.
@@ -1,2 +1,3 @@
1
1
  export * from './vitest.e2e.js';
2
2
  export * from './vitest.unit.js';
3
+ export * from './vitest.unit.setup.js';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@vitejs/plugin-react-swc"),a=require("../../node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.13_@vitest_browser@3.2.4_jiti@2.4.2_j_cac3da623d5688a51c0b1a2270e144db/node_modules/vitest/dist/config.cjs"),s=require("../../node/path/path.constant.cjs");var u=Object.defineProperty,n=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,o=(t,e,r)=>e in t?u(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,c=(t,e)=>{for(var r in e||(e={}))l.call(e,r)&&o(t,r,e[r]);if(n)for(var r of n(e))p.call(e,r)&&o(t,r,e[r]);return t};function _(t){return a.defineConfig(c({plugins:[i()],test:{globals:!0,environment:"jsdom",pool:"vmThreads",include:["**/*.test.unit.?(c|m)[jt]s?(x)"],setupFiles:[s.PATH.VITEST_UNIT_SETUP_CONFIG]}},t))}exports.vitestUnit=_;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@vitejs/plugin-react-swc"),s=require("../../node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.13_@vitest_browser@3.2.4_jiti@2.4.2_j_cac3da623d5688a51c0b1a2270e144db/node_modules/vitest/dist/config.cjs");var u=Object.defineProperty,n=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,o=(t,e,r)=>e in t?u(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,p=(t,e)=>{for(var r in e||(e={}))a.call(e,r)&&o(t,r,e[r]);if(n)for(var r of n(e))l.call(e,r)&&o(t,r,e[r]);return t};function c(t){return s.defineConfig(p({plugins:[i()],test:{globals:!0,environment:"jsdom",pool:"vmThreads",include:["**/*.test.unit.?(c|m)[jt]s?(x)"],setupFiles:["./vitest.unit.setup.ts"]}},t))}exports.vitestUnit=c;
@@ -1,26 +1,25 @@
1
1
  import i from "@vitejs/plugin-react-swc";
2
2
  import { defineConfig as p } from "../../node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.13_@vitest_browser@3.2.4_jiti@2.4.2_j_cac3da623d5688a51c0b1a2270e144db/node_modules/vitest/dist/config.js";
3
- import { PATH as a } from "../../node/path/path.constant.js";
4
- var s = Object.defineProperty, o = Object.getOwnPropertySymbols, l = Object.prototype.hasOwnProperty, f = Object.prototype.propertyIsEnumerable, n = (t, r, e) => r in t ? s(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e, m = (t, r) => {
3
+ var s = Object.defineProperty, o = Object.getOwnPropertySymbols, a = Object.prototype.hasOwnProperty, l = Object.prototype.propertyIsEnumerable, n = (t, r, e) => r in t ? s(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e, u = (t, r) => {
5
4
  for (var e in r || (r = {}))
6
- l.call(r, e) && n(t, e, r[e]);
5
+ a.call(r, e) && n(t, e, r[e]);
7
6
  if (o)
8
7
  for (var e of o(r))
9
- f.call(r, e) && n(t, e, r[e]);
8
+ l.call(r, e) && n(t, e, r[e]);
10
9
  return t;
11
10
  };
12
- function v(t) {
13
- return p(m({
11
+ function _(t) {
12
+ return p(u({
14
13
  plugins: [i()],
15
14
  test: {
16
15
  globals: !0,
17
16
  environment: "jsdom",
18
17
  pool: "vmThreads",
19
18
  include: ["**/*.test.unit.?(c|m)[jt]s?(x)"],
20
- setupFiles: [a.VITEST_UNIT_SETUP_CONFIG]
19
+ setupFiles: ["./vitest.unit.setup.ts"]
21
20
  }
22
21
  }, t));
23
22
  }
24
23
  export {
25
- v as vitestUnit
24
+ _ as vitestUnit
26
25
  };
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _e=require("fs-extra"),_=require("./path.util.cjs"),e=require("../command/command.type.cjs"),N=require("../command/command.util.cjs"),te=require("../package/package.util.cjs"),E=require("../package/package.type.cjs"),oe=require("../../config/env/env.util.cjs");var Ee=Object.defineProperty,R=Object.getOwnPropertySymbols,ae=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable,f=(a,t,o)=>t in a?Ee(a,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):a[t]=o,Ce=(a,t)=>{for(var o in t||(t={}))ae.call(t,o)&&f(a,o,t[o]);if(R)for(var o of R(t))Ie.call(t,o)&&f(a,o,t[o]);return a},ce=(a,t,o)=>new Promise((r,T)=>{var i=C=>{try{L(o.next(C))}catch(l){T(l)}},G=C=>{try{L(o.throw(C))}catch(l){T(l)}},L=C=>C.done?r(C.value):Promise.resolve(C.value).then(i,G);L((o=o.apply(a,t)).next())});const se=oe.getEnv(),P=se.CWD,g="@cyberskill/shared",d="node_modules",v="dist",h="public",D="package.json",$="package-lock.json",Y="tsconfig.json",F=".gitignore",V=".simple-git-hooks.json",W="pnpm-lock.yaml",H=".git/hooks/",U=".git/COMMIT_EDITMSG",j=".migrate-mongo.config.js",c=(()=>{const t=_e.readJsonSync(_.resolveWorkingPath(D)).name===g?P:_.join(P,d,g);return _.join(t,v)})(),me="cyberskill",Te="src/node/cli/index.ts",A="eslint",M="eslint",y="vitest",S="vitest",w="@commitlint/cli",J="@commitlint/config-conventional",k="commitlint",B="lint-staged",u="lint-staged",b="typescript",q="tsc",s="tsx",K="git",m="pnpm",x="pnpm exec",X="simple-git-hooks",z="simple-git-hooks",Q="@eslint/config-inspector",Z="eslint-config-inspector",ee="node-modules-inspector",ne="node-modules-inspector",p="migrate-mongo",O="./node_modules/migrate-mongo/bin/migrate-mongo",I={CYBERSKILL_DIRECTORY:c,WORKING_DIRECTORY:P,PUBLIC_DIRECTORY:_.resolveWorkingPath(h),TS_CONFIG:_.resolveWorkingPath(Y),GIT_IGNORE:_.resolveWorkingPath(F),GIT_HOOK:_.resolveWorkingPath(H),GIT_COMMIT_MSG:_.resolveWorkingPath(U),SIMPLE_GIT_HOOKS_JSON:_.resolveWorkingPath(V),PACKAGE_JSON:_.resolveWorkingPath(D),PACKAGE_LOCK_JSON:_.resolveWorkingPath($),PNPM_LOCK_YAML:_.resolveWorkingPath(W),NODE_MODULES:_.resolveWorkingPath(d),MIGRATE_MONGO_CONFIG:_.resolveWorkingPath(j),LINT_STAGED_CONFIG:_.resolveWorkingPath(`${c}/src/config/lint-staged/index.js`),COMMITLINT_CONFIG:_.resolveWorkingPath(`${c}/src/config/commitlint/index.js`),VITEST_UNIT_CONFIG:_.resolveWorkingPath(`${c}/src/config/vitest/vitest.unit.js`),VITEST_UNIT_SETUP_CONFIG:_.resolveWorkingPath(`${c}/src/config/vitest/vitest.unit.setup.js`),VITEST_E2E_CONFIG:_.resolveWorkingPath(`${c}/src/config/vitest/vitest.e2e.js`)};function re({isCurrentProject:a}){return Ce({"pre-commit":u,"commit-msg":k},a&&{"pre-push":N.rawCommand(`${K} pull`)})}function n({type:a,packages:t,command:o}){const r=t==null?void 0:t.reduce((T,i)=>(T.some(G=>G.name===i.name)||T.push(i),T),[]);return()=>ce(null,null,function*(){switch(a){case e.E_CommandType.CLI:return r!=null&&r.length&&(yield te.setupPackages(r,{install:!0})),N.formatCommand(N.rawCommand(`${x} ${o}`));case e.E_CommandType.STRING:return N.formatCommand(N.rawCommand(o));default:throw new Error("Unsupported command type")}})}const Ne={simpleGitHooks:n({type:e.E_CommandType.CLI,packages:[{name:X,type:E.E_PackageType.DEV_DEPENDENCY}],command:z}),eslintInspect:n({type:e.E_CommandType.CLI,packages:[{name:Q,type:E.E_PackageType.DEV_DEPENDENCY}],command:Z}),nodeModulesInspect:n({type:e.E_CommandType.CLI,packages:[{name:ee,type:E.E_PackageType.DEV_DEPENDENCY}],command:ne}),eslintCheck:n({type:e.E_CommandType.CLI,packages:[{name:A,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${M} ${I.WORKING_DIRECTORY} --no-cache`}),eslintFix:n({type:e.E_CommandType.CLI,packages:[{name:A,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${M} ${I.WORKING_DIRECTORY} --fix --no-cache`}),typescriptCheck:n({type:e.E_CommandType.CLI,packages:[{name:b,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${q} -p ${I.TS_CONFIG} --noEmit`}),testUnit:n({type:e.E_CommandType.CLI,packages:[{name:y,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${S} --config ${I.VITEST_UNIT_CONFIG}`}),testE2e:n({type:e.E_CommandType.CLI,packages:[{name:y,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${S} --config ${I.VITEST_E2E_CONFIG}`}),mongoMigrateCreate:a=>n({type:e.E_CommandType.CLI,packages:[{name:s,type:E.E_PackageType.DEPENDENCY},{name:p,type:E.E_PackageType.DEPENDENCY}],command:`${s} ${O} create ${a} -f ${I.MIGRATE_MONGO_CONFIG}`})(),mongoMigrateUp:n({type:e.E_CommandType.CLI,packages:[{name:s,type:E.E_PackageType.DEPENDENCY},{name:p,type:E.E_PackageType.DEPENDENCY}],command:`${s} ${O} up -f ${I.MIGRATE_MONGO_CONFIG}`}),mongoMigrateDown:n({type:e.E_CommandType.CLI,packages:[{name:s,type:E.E_PackageType.DEPENDENCY},{name:p,type:E.E_PackageType.DEPENDENCY}],command:`${s} ${O} down -f ${I.MIGRATE_MONGO_CONFIG}`}),commitLint:n({type:e.E_CommandType.CLI,packages:[{name:w,type:E.E_PackageType.DEV_DEPENDENCY},{name:J,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${k} --edit ${I.GIT_COMMIT_MSG} --config ${I.COMMITLINT_CONFIG}`}),lintStaged:n({type:e.E_CommandType.CLI,packages:[{name:B,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${u} --config ${I.LINT_STAGED_CONFIG}`}),configureGitHook:n({type:e.E_CommandType.STRING,command:`${K} config core.hooksPath ${I.GIT_HOOK}`}),build:n({type:e.E_CommandType.STRING,command:`${m} run --if-present build`}),pnpmInstallStandard:n({type:e.E_CommandType.STRING,command:`${m} install --ignore-scripts`}),pnpmInstallLegacy:n({type:e.E_CommandType.STRING,command:`${m} install --ignore-scripts --legacy-peer-deps`}),pnpmInstallForce:n({type:e.E_CommandType.STRING,command:`${m} install --ignore-scripts --force`}),pnpmPruneStore:n({type:e.E_CommandType.STRING,command:`${m} store prune`}),pnpmCleanCache:n({type:e.E_CommandType.STRING,command:`${m} cache delete`})};exports.BUILD_DIRECTORY=v;exports.COMMIT_LINT_CLI=k;exports.COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME=J;exports.COMMIT_LINT_PACKAGE_NAME=w;exports.CYBERSKILL_CLI=me;exports.CYBERSKILL_CLI_PATH=Te;exports.CYBERSKILL_DIRECTORY=c;exports.CYBERSKILL_PACKAGE_NAME=g;exports.ESLINT_CLI=M;exports.ESLINT_INSPECT_CLI=Z;exports.ESLINT_INSPECT_PACKAGE_NAME=Q;exports.ESLINT_PACKAGE_NAME=A;exports.GIT_CLI=K;exports.GIT_COMMIT_EDITMSG=U;exports.GIT_HOOK=H;exports.GIT_IGNORE=F;exports.LINT_STAGED_CLI=u;exports.LINT_STAGED_PACKAGE_NAME=B;exports.MIGRATE_MONGO_CLI=O;exports.MIGRATE_MONGO_CONFIG=j;exports.MIGRATE_MONGO_PACKAGE_NAME=p;exports.NODE_MODULES=d;exports.NODE_MODULES_INSPECT_CLI=ne;exports.NODE_MODULES_INSPECT_PACKAGE_NAME=ee;exports.PACKAGE_JSON=D;exports.PACKAGE_LOCK_JSON=$;exports.PATH=I;exports.PNPM_CLI=m;exports.PNPM_EXEC_CLI=x;exports.PNPM_LOCK_YAML=W;exports.PUBLIC_DIRECTORY=h;exports.SIMPLE_GIT_HOOKS_PACKAGE_NAME=X;exports.SIMPLE_GIT_HOOK_CLI=z;exports.SIMPLE_GIT_HOOK_JSON=V;exports.TSCONFIG_JSON=Y;exports.TSC_CLI=q;exports.TSC_PACKAGE_NAME=b;exports.TSX_CLI=s;exports.VITEST_CLI=S;exports.VITEST_PACKAGE_NAME=y;exports.WORKING_DIRECTORY=P;exports.command=Ne;exports.createGitHooksConfig=re;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _e=require("fs-extra"),o=require("./path.util.cjs"),e=require("../command/command.type.cjs"),p=require("../command/command.util.cjs"),oe=require("../package/package.util.cjs"),E=require("../package/package.type.cjs"),te=require("../../config/env/env.util.cjs");var Ee=Object.defineProperty,f=Object.getOwnPropertySymbols,ae=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable,v=(a,t,_)=>t in a?Ee(a,t,{enumerable:!0,configurable:!0,writable:!0,value:_}):a[t]=_,Ce=(a,t)=>{for(var _ in t||(t={}))ae.call(t,_)&&v(a,_,t[_]);if(f)for(var _ of f(t))Ie.call(t,_)&&v(a,_,t[_]);return a},ce=(a,t,_)=>new Promise((N,m)=>{var r=C=>{try{L(_.next(C))}catch(l){m(l)}},G=C=>{try{L(_.throw(C))}catch(l){m(l)}},L=C=>C.done?N(C.value):Promise.resolve(C.value).then(r,G);L((_=_.apply(a,t)).next())});const se=te.getEnv(),P=se.CWD,g="@cyberskill/shared",D="node_modules",A="dist",h="public",k="package.json",$="package-lock.json",Y="tsconfig.json",F=".gitignore",V=".simple-git-hooks.json",W="pnpm-lock.yaml",H=".git/hooks/",U=".git/COMMIT_EDITMSG",w=".migrate-mongo.config.js",T=_e.readJsonSync(o.resolveWorkingPath(k)).name===g?o.join(P,A):o.join(P,D,g,A),me="cyberskill",Te="src/node/cli/index.ts",y="eslint",M="eslint",d="vitest",S="vitest",j="@commitlint/cli",J="@commitlint/config-conventional",u="commitlint",b="lint-staged",K="lint-staged",B="typescript",q="tsc",c="tsx",R="git",s="pnpm",x="pnpm exec",X="simple-git-hooks",z="simple-git-hooks",Q="@eslint/config-inspector",Z="eslint-config-inspector",ee="node-modules-inspector",ne="node-modules-inspector",i="migrate-mongo",O="./node_modules/migrate-mongo/bin/migrate-mongo",I={CYBERSKILL_DIRECTORY:T,WORKING_DIRECTORY:P,PUBLIC_DIRECTORY:o.resolveWorkingPath(h),TS_CONFIG:o.resolveWorkingPath(Y),GIT_IGNORE:o.resolveWorkingPath(F),GIT_HOOK:o.resolveWorkingPath(H),GIT_COMMIT_MSG:o.resolveWorkingPath(U),SIMPLE_GIT_HOOKS_JSON:o.resolveWorkingPath(V),PACKAGE_JSON:o.resolveWorkingPath(k),PACKAGE_LOCK_JSON:o.resolveWorkingPath($),PNPM_LOCK_YAML:o.resolveWorkingPath(W),NODE_MODULES:o.resolveWorkingPath(D),MIGRATE_MONGO_CONFIG:o.resolveWorkingPath(w),LINT_STAGED_CONFIG:o.resolveWorkingPath(`${T}/config/lint-staged/index.js`),COMMITLINT_CONFIG:o.resolveWorkingPath(`${T}/config/commitlint/index.js`),VITEST_UNIT_CONFIG:o.resolveWorkingPath(`${T}/config/vitest/vitest.unit.js`),VITEST_E2E_CONFIG:o.resolveWorkingPath(`${T}/config/vitest/vitest.e2e.js`)};function Ne({isCurrentProject:a}){return Ce({"pre-commit":K,"commit-msg":u},a&&{"pre-push":p.rawCommand(`${R} pull`)})}function n({type:a,packages:t,command:_}){const N=t==null?void 0:t.reduce((m,r)=>(m.some(G=>G.name===r.name)||m.push(r),m),[]);return()=>ce(null,null,function*(){switch(a){case e.E_CommandType.CLI:return N!=null&&N.length&&(yield oe.setupPackages(N,{install:!0})),p.formatCommand(p.rawCommand(`${x} ${_}`));case e.E_CommandType.STRING:return p.formatCommand(p.rawCommand(_));default:throw new Error("Unsupported command type")}})}const pe={simpleGitHooks:n({type:e.E_CommandType.CLI,packages:[{name:X,type:E.E_PackageType.DEV_DEPENDENCY}],command:z}),eslintInspect:n({type:e.E_CommandType.CLI,packages:[{name:Q,type:E.E_PackageType.DEV_DEPENDENCY}],command:Z}),nodeModulesInspect:n({type:e.E_CommandType.CLI,packages:[{name:ee,type:E.E_PackageType.DEV_DEPENDENCY}],command:ne}),eslintCheck:n({type:e.E_CommandType.CLI,packages:[{name:y,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${M} ${I.WORKING_DIRECTORY} --no-cache`}),eslintFix:n({type:e.E_CommandType.CLI,packages:[{name:y,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${M} ${I.WORKING_DIRECTORY} --fix --no-cache`}),typescriptCheck:n({type:e.E_CommandType.CLI,packages:[{name:B,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${q} -p ${I.TS_CONFIG} --noEmit`}),testUnit:n({type:e.E_CommandType.CLI,packages:[{name:d,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${S} --config ${I.VITEST_UNIT_CONFIG}`}),testE2e:n({type:e.E_CommandType.CLI,packages:[{name:d,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${S} --config ${I.VITEST_E2E_CONFIG}`}),mongoMigrateCreate:a=>n({type:e.E_CommandType.CLI,packages:[{name:c,type:E.E_PackageType.DEPENDENCY},{name:i,type:E.E_PackageType.DEPENDENCY}],command:`${c} ${O} create ${a} -f ${I.MIGRATE_MONGO_CONFIG}`})(),mongoMigrateUp:n({type:e.E_CommandType.CLI,packages:[{name:c,type:E.E_PackageType.DEPENDENCY},{name:i,type:E.E_PackageType.DEPENDENCY}],command:`${c} ${O} up -f ${I.MIGRATE_MONGO_CONFIG}`}),mongoMigrateDown:n({type:e.E_CommandType.CLI,packages:[{name:c,type:E.E_PackageType.DEPENDENCY},{name:i,type:E.E_PackageType.DEPENDENCY}],command:`${c} ${O} down -f ${I.MIGRATE_MONGO_CONFIG}`}),commitLint:n({type:e.E_CommandType.CLI,packages:[{name:j,type:E.E_PackageType.DEV_DEPENDENCY},{name:J,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${u} --edit ${I.GIT_COMMIT_MSG} --config ${I.COMMITLINT_CONFIG}`}),lintStaged:n({type:e.E_CommandType.CLI,packages:[{name:b,type:E.E_PackageType.DEV_DEPENDENCY}],command:`${K} --config ${I.LINT_STAGED_CONFIG}`}),configureGitHook:n({type:e.E_CommandType.STRING,command:`${R} config core.hooksPath ${I.GIT_HOOK}`}),build:n({type:e.E_CommandType.STRING,command:`${s} run --if-present build`}),pnpmInstallStandard:n({type:e.E_CommandType.STRING,command:`${s} install --ignore-scripts`}),pnpmInstallLegacy:n({type:e.E_CommandType.STRING,command:`${s} install --ignore-scripts --legacy-peer-deps`}),pnpmInstallForce:n({type:e.E_CommandType.STRING,command:`${s} install --ignore-scripts --force`}),pnpmPruneStore:n({type:e.E_CommandType.STRING,command:`${s} store prune`}),pnpmCleanCache:n({type:e.E_CommandType.STRING,command:`${s} cache delete`})};exports.BUILD_DIRECTORY=A;exports.COMMIT_LINT_CLI=u;exports.COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME=J;exports.COMMIT_LINT_PACKAGE_NAME=j;exports.CYBERSKILL_CLI=me;exports.CYBERSKILL_CLI_PATH=Te;exports.CYBERSKILL_DIRECTORY=T;exports.CYBERSKILL_PACKAGE_NAME=g;exports.ESLINT_CLI=M;exports.ESLINT_INSPECT_CLI=Z;exports.ESLINT_INSPECT_PACKAGE_NAME=Q;exports.ESLINT_PACKAGE_NAME=y;exports.GIT_CLI=R;exports.GIT_COMMIT_EDITMSG=U;exports.GIT_HOOK=H;exports.GIT_IGNORE=F;exports.LINT_STAGED_CLI=K;exports.LINT_STAGED_PACKAGE_NAME=b;exports.MIGRATE_MONGO_CLI=O;exports.MIGRATE_MONGO_CONFIG=w;exports.MIGRATE_MONGO_PACKAGE_NAME=i;exports.NODE_MODULES=D;exports.NODE_MODULES_INSPECT_CLI=ne;exports.NODE_MODULES_INSPECT_PACKAGE_NAME=ee;exports.PACKAGE_JSON=k;exports.PACKAGE_LOCK_JSON=$;exports.PATH=I;exports.PNPM_CLI=s;exports.PNPM_EXEC_CLI=x;exports.PNPM_LOCK_YAML=W;exports.PUBLIC_DIRECTORY=h;exports.SIMPLE_GIT_HOOKS_PACKAGE_NAME=X;exports.SIMPLE_GIT_HOOK_CLI=z;exports.SIMPLE_GIT_HOOK_JSON=V;exports.TSCONFIG_JSON=Y;exports.TSC_CLI=q;exports.TSC_PACKAGE_NAME=B;exports.TSX_CLI=c;exports.VITEST_CLI=S;exports.VITEST_PACKAGE_NAME=d;exports.WORKING_DIRECTORY=P;exports.command=pe;exports.createGitHooksConfig=Ne;
@@ -56,7 +56,6 @@ export declare const PATH: {
56
56
  LINT_STAGED_CONFIG: string;
57
57
  COMMITLINT_CONFIG: string;
58
58
  VITEST_UNIT_CONFIG: string;
59
- VITEST_UNIT_SETUP_CONFIG: string;
60
59
  VITEST_E2E_CONFIG: string;
61
60
  };
62
61
  export declare function createGitHooksConfig({ isCurrentProject }: Partial<I_CommandContext>): {
@@ -1,84 +1,80 @@
1
- import v from "fs-extra";
2
- import { resolveWorkingPath as c, join as L } from "./path.util.js";
1
+ import h from "fs-extra";
2
+ import { resolveWorkingPath as E, join as d } from "./path.util.js";
3
3
  import { E_CommandType as e } from "../command/command.type.js";
4
- import { formatCommand as d, rawCommand as g } from "../command/command.util.js";
5
- import { setupPackages as h } from "../package/package.util.js";
6
- import { E_PackageType as s } from "../package/package.type.js";
7
- import { getEnv as F } from "../../config/env/env.util.js";
8
- var V = Object.defineProperty, P = Object.getOwnPropertySymbols, U = Object.prototype.hasOwnProperty, j = Object.prototype.propertyIsEnumerable, M = (E, n, o) => n in E ? V(E, n, { enumerable: !0, configurable: !0, writable: !0, value: o }) : E[n] = o, w = (E, n) => {
9
- for (var o in n || (n = {}))
10
- U.call(n, o) && M(E, o, n[o]);
4
+ import { formatCommand as g, rawCommand as D } from "../command/command.util.js";
5
+ import { setupPackages as F } from "../package/package.util.js";
6
+ import { E_PackageType as c } from "../package/package.type.js";
7
+ import { getEnv as V } from "../../config/env/env.util.js";
8
+ var w = Object.defineProperty, P = Object.getOwnPropertySymbols, j = Object.prototype.hasOwnProperty, H = Object.prototype.propertyIsEnumerable, M = (s, o, n) => o in s ? w(s, o, { enumerable: !0, configurable: !0, writable: !0, value: n }) : s[o] = n, U = (s, o) => {
9
+ for (var n in o || (o = {}))
10
+ j.call(o, n) && M(s, n, o[n]);
11
11
  if (P)
12
- for (var o of P(n))
13
- j.call(n, o) && M(E, o, n[o]);
14
- return E;
15
- }, H = (E, n, o) => new Promise((r, I) => {
12
+ for (var n of P(o))
13
+ H.call(o, n) && M(s, n, o[n]);
14
+ return s;
15
+ }, b = (s, o, n) => new Promise((p, I) => {
16
16
  var C = (a) => {
17
17
  try {
18
- O(o.next(a));
18
+ O(n.next(a));
19
19
  } catch (T) {
20
20
  I(T);
21
21
  }
22
22
  }, N = (a) => {
23
23
  try {
24
- O(o.throw(a));
24
+ O(n.throw(a));
25
25
  } catch (T) {
26
26
  I(T);
27
27
  }
28
- }, O = (a) => a.done ? r(a.value) : Promise.resolve(a.value).then(C, N);
29
- O((o = o.apply(E, n)).next());
28
+ }, O = (a) => a.done ? p(a.value) : Promise.resolve(a.value).then(C, N);
29
+ O((n = n.apply(s, o)).next());
30
30
  });
31
- const b = F(), D = b.CWD, S = "@cyberskill/shared", $ = "node_modules", J = "dist", x = "public", R = "package.json", B = "package-lock.json", W = "tsconfig.json", X = ".gitignore", q = ".simple-git-hooks.json", z = "pnpm-lock.yaml", Q = ".git/hooks/", Z = ".git/COMMIT_EDITMSG", ee = ".migrate-mongo.config.js", m = (() => {
32
- const n = v.readJsonSync(c(R)).name === S ? D : L(D, $, S);
33
- return L(n, J);
34
- })(), ge = "cyberskill", De = "src/node/cli/index.ts", y = "eslint", A = "eslint", u = "vitest", f = "vitest", te = "@commitlint/cli", ne = "@commitlint/config-conventional", K = "commitlint", oe = "lint-staged", k = "lint-staged", se = "typescript", ce = "tsc", i = "tsx", Y = "git", p = "pnpm", Ee = "pnpm exec", _e = "simple-git-hooks", ae = "simple-git-hooks", Ie = "@eslint/config-inspector", me = "eslint-config-inspector", ie = "node-modules-inspector", pe = "node-modules-inspector", l = "migrate-mongo", G = "./node_modules/migrate-mongo/bin/migrate-mongo", _ = {
35
- CYBERSKILL_DIRECTORY: m,
36
- WORKING_DIRECTORY: D,
37
- PUBLIC_DIRECTORY: c(x),
38
- TS_CONFIG: c(W),
39
- GIT_IGNORE: c(X),
40
- GIT_HOOK: c(Q),
41
- GIT_COMMIT_MSG: c(Z),
42
- SIMPLE_GIT_HOOKS_JSON: c(q),
43
- PACKAGE_JSON: c(R),
44
- PACKAGE_LOCK_JSON: c(B),
45
- PNPM_LOCK_YAML: c(z),
46
- NODE_MODULES: c($),
47
- MIGRATE_MONGO_CONFIG: c(ee),
48
- LINT_STAGED_CONFIG: c(`${m}/src/config/lint-staged/index.js`),
49
- COMMITLINT_CONFIG: c(`${m}/src/config/commitlint/index.js`),
50
- VITEST_UNIT_CONFIG: c(`${m}/src/config/vitest/vitest.unit.js`),
51
- VITEST_UNIT_SETUP_CONFIG: c(`${m}/src/config/vitest/vitest.unit.setup.js`),
52
- VITEST_E2E_CONFIG: c(`${m}/src/config/vitest/vitest.e2e.js`)
31
+ const J = V(), L = J.CWD, S = "@cyberskill/shared", R = "node_modules", y = "dist", x = "public", K = "package.json", B = "package-lock.json", W = "tsconfig.json", X = ".gitignore", q = ".simple-git-hooks.json", z = "pnpm-lock.yaml", Q = ".git/hooks/", Z = ".git/COMMIT_EDITMSG", ee = ".migrate-mongo.config.js", r = h.readJsonSync(E(K)).name === S ? d(L, y) : d(L, R, S, y), De = "cyberskill", Le = "src/node/cli/index.ts", A = "eslint", u = "eslint", f = "vitest", $ = "vitest", te = "@commitlint/cli", ne = "@commitlint/config-conventional", k = "commitlint", oe = "lint-staged", Y = "lint-staged", ce = "typescript", se = "tsc", m = "tsx", v = "git", i = "pnpm", Ee = "pnpm exec", _e = "simple-git-hooks", ae = "simple-git-hooks", Ie = "@eslint/config-inspector", me = "eslint-config-inspector", ie = "node-modules-inspector", pe = "node-modules-inspector", l = "migrate-mongo", G = "./node_modules/migrate-mongo/bin/migrate-mongo", _ = {
32
+ CYBERSKILL_DIRECTORY: r,
33
+ WORKING_DIRECTORY: L,
34
+ PUBLIC_DIRECTORY: E(x),
35
+ TS_CONFIG: E(W),
36
+ GIT_IGNORE: E(X),
37
+ GIT_HOOK: E(Q),
38
+ GIT_COMMIT_MSG: E(Z),
39
+ SIMPLE_GIT_HOOKS_JSON: E(q),
40
+ PACKAGE_JSON: E(K),
41
+ PACKAGE_LOCK_JSON: E(B),
42
+ PNPM_LOCK_YAML: E(z),
43
+ NODE_MODULES: E(R),
44
+ MIGRATE_MONGO_CONFIG: E(ee),
45
+ LINT_STAGED_CONFIG: E(`${r}/config/lint-staged/index.js`),
46
+ COMMITLINT_CONFIG: E(`${r}/config/commitlint/index.js`),
47
+ VITEST_UNIT_CONFIG: E(`${r}/config/vitest/vitest.unit.js`),
48
+ VITEST_E2E_CONFIG: E(`${r}/config/vitest/vitest.e2e.js`)
53
49
  };
54
- function Le({ isCurrentProject: E }) {
55
- return w({
56
- "pre-commit": k,
57
- "commit-msg": K
58
- }, E && { "pre-push": g(`${Y} pull`) });
50
+ function de({ isCurrentProject: s }) {
51
+ return U({
52
+ "pre-commit": Y,
53
+ "commit-msg": k
54
+ }, s && { "pre-push": D(`${v} pull`) });
59
55
  }
60
- function t({ type: E, packages: n, command: o }) {
61
- const r = n == null ? void 0 : n.reduce((I, C) => (I.some((N) => N.name === C.name) || I.push(C), I), []);
62
- return () => H(null, null, function* () {
63
- switch (E) {
56
+ function t({ type: s, packages: o, command: n }) {
57
+ const p = o == null ? void 0 : o.reduce((I, C) => (I.some((N) => N.name === C.name) || I.push(C), I), []);
58
+ return () => b(null, null, function* () {
59
+ switch (s) {
64
60
  case e.CLI:
65
- return r != null && r.length && (yield h(r, {
61
+ return p != null && p.length && (yield F(p, {
66
62
  install: !0
67
- })), d(g(`${Ee} ${o}`));
63
+ })), g(D(`${Ee} ${n}`));
68
64
  case e.STRING:
69
- return d(g(o));
65
+ return g(D(n));
70
66
  default:
71
67
  throw new Error("Unsupported command type");
72
68
  }
73
69
  });
74
70
  }
75
- const de = {
71
+ const ge = {
76
72
  simpleGitHooks: t({
77
73
  type: e.CLI,
78
74
  packages: [
79
75
  {
80
76
  name: _e,
81
- type: s.DEV_DEPENDENCY
77
+ type: c.DEV_DEPENDENCY
82
78
  }
83
79
  ],
84
80
  command: ae
@@ -88,7 +84,7 @@ const de = {
88
84
  packages: [
89
85
  {
90
86
  name: Ie,
91
- type: s.DEV_DEPENDENCY
87
+ type: c.DEV_DEPENDENCY
92
88
  }
93
89
  ],
94
90
  command: me
@@ -98,7 +94,7 @@ const de = {
98
94
  packages: [
99
95
  {
100
96
  name: ie,
101
- type: s.DEV_DEPENDENCY
97
+ type: c.DEV_DEPENDENCY
102
98
  }
103
99
  ],
104
100
  command: pe
@@ -107,176 +103,176 @@ const de = {
107
103
  type: e.CLI,
108
104
  packages: [
109
105
  {
110
- name: y,
111
- type: s.DEV_DEPENDENCY
106
+ name: A,
107
+ type: c.DEV_DEPENDENCY
112
108
  }
113
109
  ],
114
- command: `${A} ${_.WORKING_DIRECTORY} --no-cache`
110
+ command: `${u} ${_.WORKING_DIRECTORY} --no-cache`
115
111
  }),
116
112
  eslintFix: t({
117
113
  type: e.CLI,
118
114
  packages: [
119
115
  {
120
- name: y,
121
- type: s.DEV_DEPENDENCY
116
+ name: A,
117
+ type: c.DEV_DEPENDENCY
122
118
  }
123
119
  ],
124
- command: `${A} ${_.WORKING_DIRECTORY} --fix --no-cache`
120
+ command: `${u} ${_.WORKING_DIRECTORY} --fix --no-cache`
125
121
  }),
126
122
  typescriptCheck: t({
127
123
  type: e.CLI,
128
124
  packages: [
129
125
  {
130
- name: se,
131
- type: s.DEV_DEPENDENCY
126
+ name: ce,
127
+ type: c.DEV_DEPENDENCY
132
128
  }
133
129
  ],
134
- command: `${ce} -p ${_.TS_CONFIG} --noEmit`
130
+ command: `${se} -p ${_.TS_CONFIG} --noEmit`
135
131
  }),
136
132
  testUnit: t({
137
133
  type: e.CLI,
138
134
  packages: [
139
135
  {
140
- name: u,
141
- type: s.DEV_DEPENDENCY
136
+ name: f,
137
+ type: c.DEV_DEPENDENCY
142
138
  }
143
139
  ],
144
- command: `${f} --config ${_.VITEST_UNIT_CONFIG}`
140
+ command: `${$} --config ${_.VITEST_UNIT_CONFIG}`
145
141
  }),
146
142
  testE2e: t({
147
143
  type: e.CLI,
148
144
  packages: [
149
145
  {
150
- name: u,
151
- type: s.DEV_DEPENDENCY
146
+ name: f,
147
+ type: c.DEV_DEPENDENCY
152
148
  }
153
149
  ],
154
- command: `${f} --config ${_.VITEST_E2E_CONFIG}`
150
+ command: `${$} --config ${_.VITEST_E2E_CONFIG}`
155
151
  }),
156
- mongoMigrateCreate: (E) => t({
152
+ mongoMigrateCreate: (s) => t({
157
153
  type: e.CLI,
158
154
  packages: [
159
155
  {
160
- name: i,
161
- type: s.DEPENDENCY
156
+ name: m,
157
+ type: c.DEPENDENCY
162
158
  },
163
159
  {
164
160
  name: l,
165
- type: s.DEPENDENCY
161
+ type: c.DEPENDENCY
166
162
  }
167
163
  ],
168
- command: `${i} ${G} create ${E} -f ${_.MIGRATE_MONGO_CONFIG}`
164
+ command: `${m} ${G} create ${s} -f ${_.MIGRATE_MONGO_CONFIG}`
169
165
  })(),
170
166
  mongoMigrateUp: t({
171
167
  type: e.CLI,
172
168
  packages: [
173
169
  {
174
- name: i,
175
- type: s.DEPENDENCY
170
+ name: m,
171
+ type: c.DEPENDENCY
176
172
  },
177
173
  {
178
174
  name: l,
179
- type: s.DEPENDENCY
175
+ type: c.DEPENDENCY
180
176
  }
181
177
  ],
182
- command: `${i} ${G} up -f ${_.MIGRATE_MONGO_CONFIG}`
178
+ command: `${m} ${G} up -f ${_.MIGRATE_MONGO_CONFIG}`
183
179
  }),
184
180
  mongoMigrateDown: t({
185
181
  type: e.CLI,
186
182
  packages: [
187
183
  {
188
- name: i,
189
- type: s.DEPENDENCY
184
+ name: m,
185
+ type: c.DEPENDENCY
190
186
  },
191
187
  {
192
188
  name: l,
193
- type: s.DEPENDENCY
189
+ type: c.DEPENDENCY
194
190
  }
195
191
  ],
196
- command: `${i} ${G} down -f ${_.MIGRATE_MONGO_CONFIG}`
192
+ command: `${m} ${G} down -f ${_.MIGRATE_MONGO_CONFIG}`
197
193
  }),
198
194
  commitLint: t({
199
195
  type: e.CLI,
200
196
  packages: [
201
197
  {
202
198
  name: te,
203
- type: s.DEV_DEPENDENCY
199
+ type: c.DEV_DEPENDENCY
204
200
  },
205
201
  {
206
202
  name: ne,
207
- type: s.DEV_DEPENDENCY
203
+ type: c.DEV_DEPENDENCY
208
204
  }
209
205
  ],
210
- command: `${K} --edit ${_.GIT_COMMIT_MSG} --config ${_.COMMITLINT_CONFIG}`
206
+ command: `${k} --edit ${_.GIT_COMMIT_MSG} --config ${_.COMMITLINT_CONFIG}`
211
207
  }),
212
208
  lintStaged: t({
213
209
  type: e.CLI,
214
210
  packages: [
215
211
  {
216
212
  name: oe,
217
- type: s.DEV_DEPENDENCY
213
+ type: c.DEV_DEPENDENCY
218
214
  }
219
215
  ],
220
- command: `${k} --config ${_.LINT_STAGED_CONFIG}`
216
+ command: `${Y} --config ${_.LINT_STAGED_CONFIG}`
221
217
  }),
222
218
  configureGitHook: t({
223
219
  type: e.STRING,
224
- command: `${Y} config core.hooksPath ${_.GIT_HOOK}`
220
+ command: `${v} config core.hooksPath ${_.GIT_HOOK}`
225
221
  }),
226
222
  build: t({
227
223
  type: e.STRING,
228
- command: `${p} run --if-present build`
224
+ command: `${i} run --if-present build`
229
225
  }),
230
226
  pnpmInstallStandard: t({
231
227
  type: e.STRING,
232
- command: `${p} install --ignore-scripts`
228
+ command: `${i} install --ignore-scripts`
233
229
  }),
234
230
  pnpmInstallLegacy: t({
235
231
  type: e.STRING,
236
- command: `${p} install --ignore-scripts --legacy-peer-deps`
232
+ command: `${i} install --ignore-scripts --legacy-peer-deps`
237
233
  }),
238
234
  pnpmInstallForce: t({
239
235
  type: e.STRING,
240
- command: `${p} install --ignore-scripts --force`
236
+ command: `${i} install --ignore-scripts --force`
241
237
  }),
242
238
  pnpmPruneStore: t({
243
239
  type: e.STRING,
244
- command: `${p} store prune`
240
+ command: `${i} store prune`
245
241
  }),
246
242
  pnpmCleanCache: t({
247
243
  type: e.STRING,
248
- command: `${p} cache delete`
244
+ command: `${i} cache delete`
249
245
  })
250
246
  };
251
247
  export {
252
- J as BUILD_DIRECTORY,
253
- K as COMMIT_LINT_CLI,
248
+ y as BUILD_DIRECTORY,
249
+ k as COMMIT_LINT_CLI,
254
250
  ne as COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME,
255
251
  te as COMMIT_LINT_PACKAGE_NAME,
256
- ge as CYBERSKILL_CLI,
257
- De as CYBERSKILL_CLI_PATH,
258
- m as CYBERSKILL_DIRECTORY,
252
+ De as CYBERSKILL_CLI,
253
+ Le as CYBERSKILL_CLI_PATH,
254
+ r as CYBERSKILL_DIRECTORY,
259
255
  S as CYBERSKILL_PACKAGE_NAME,
260
- A as ESLINT_CLI,
256
+ u as ESLINT_CLI,
261
257
  me as ESLINT_INSPECT_CLI,
262
258
  Ie as ESLINT_INSPECT_PACKAGE_NAME,
263
- y as ESLINT_PACKAGE_NAME,
264
- Y as GIT_CLI,
259
+ A as ESLINT_PACKAGE_NAME,
260
+ v as GIT_CLI,
265
261
  Z as GIT_COMMIT_EDITMSG,
266
262
  Q as GIT_HOOK,
267
263
  X as GIT_IGNORE,
268
- k as LINT_STAGED_CLI,
264
+ Y as LINT_STAGED_CLI,
269
265
  oe as LINT_STAGED_PACKAGE_NAME,
270
266
  G as MIGRATE_MONGO_CLI,
271
267
  ee as MIGRATE_MONGO_CONFIG,
272
268
  l as MIGRATE_MONGO_PACKAGE_NAME,
273
- $ as NODE_MODULES,
269
+ R as NODE_MODULES,
274
270
  pe as NODE_MODULES_INSPECT_CLI,
275
271
  ie as NODE_MODULES_INSPECT_PACKAGE_NAME,
276
- R as PACKAGE_JSON,
272
+ K as PACKAGE_JSON,
277
273
  B as PACKAGE_LOCK_JSON,
278
274
  _ as PATH,
279
- p as PNPM_CLI,
275
+ i as PNPM_CLI,
280
276
  Ee as PNPM_EXEC_CLI,
281
277
  z as PNPM_LOCK_YAML,
282
278
  x as PUBLIC_DIRECTORY,
@@ -284,12 +280,12 @@ export {
284
280
  ae as SIMPLE_GIT_HOOK_CLI,
285
281
  q as SIMPLE_GIT_HOOK_JSON,
286
282
  W as TSCONFIG_JSON,
287
- ce as TSC_CLI,
288
- se as TSC_PACKAGE_NAME,
289
- i as TSX_CLI,
290
- f as VITEST_CLI,
291
- u as VITEST_PACKAGE_NAME,
292
- D as WORKING_DIRECTORY,
293
- de as command,
294
- Le as createGitHooksConfig
283
+ se as TSC_CLI,
284
+ ce as TSC_PACKAGE_NAME,
285
+ m as TSX_CLI,
286
+ $ as VITEST_CLI,
287
+ f as VITEST_PACKAGE_NAME,
288
+ L as WORKING_DIRECTORY,
289
+ ge as command,
290
+ de as createGitHooksConfig
295
291
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cyberskill/shared",
3
3
  "type": "module",
4
- "version": "1.211.0",
4
+ "version": "1.212.0",
5
5
  "description": "CyberSkill Shared",
6
6
  "author": "Stephen Cheng",
7
7
  "license": "MIT",
@@ -212,7 +212,7 @@
212
212
  "@apollo/server": "4.12.2",
213
213
  "@dotenvx/dotenvx": "1.47.5",
214
214
  "@eddeee888/gcg-typescript-resolver-files": "0.12.1",
215
- "@eslint-react/eslint-plugin": "1.52.2",
215
+ "@eslint-react/eslint-plugin": "1.52.3",
216
216
  "@graphql-codegen/cli": "5.0.7",
217
217
  "@graphql-codegen/client-preset": "4.8.3",
218
218
  "@nestjs/common": "11.1.3",
@@ -229,7 +229,7 @@
229
229
  "cors": "2.8.5",
230
230
  "crypto-js": "4.2.0",
231
231
  "date-fns": "4.1.0",
232
- "envalid": "8.0.0",
232
+ "envalid": "8.1.0",
233
233
  "eslint-plugin-format": "1.0.1",
234
234
  "eslint-plugin-react-hooks": "5.2.0",
235
235
  "eslint-plugin-react-refresh": "0.4.20",
@@ -268,7 +268,6 @@
268
268
  "@commitlint/cli": "19.8.1",
269
269
  "@commitlint/config-conventional": "19.8.1",
270
270
  "@eslint/config-inspector": "1.1.0",
271
- "@microsoft/api-extractor": "7.52.8",
272
271
  "@next/eslint-plugin-next": "15.3.5",
273
272
  "@testing-library/jest-dom": "6.6.3",
274
273
  "@testing-library/react": "16.3.0",