@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.
- package/dist/config/vitest/index.d.ts +1 -0
- package/dist/config/vitest/vitest.unit.cjs +1 -1
- package/dist/config/vitest/vitest.unit.js +7 -8
- package/dist/config/vitest/vitest.unit.setup.d.ts +1 -0
- package/dist/node/path/path.constant.cjs +1 -1
- package/dist/node/path/path.constant.d.ts +0 -1
- package/dist/node/path/path.constant.js +111 -115
- package/package.json +3 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@vitejs/plugin-react-swc"),
|
|
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
|
-
|
|
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
|
-
|
|
5
|
+
a.call(r, e) && n(t, e, r[e]);
|
|
7
6
|
if (o)
|
|
8
7
|
for (var e of o(r))
|
|
9
|
-
|
|
8
|
+
l.call(r, e) && n(t, e, r[e]);
|
|
10
9
|
return t;
|
|
11
10
|
};
|
|
12
|
-
function
|
|
13
|
-
return p(
|
|
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: [
|
|
19
|
+
setupFiles: ["./vitest.unit.setup.ts"]
|
|
21
20
|
}
|
|
22
21
|
}, t));
|
|
23
22
|
}
|
|
24
23
|
export {
|
|
25
|
-
|
|
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"),
|
|
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
|
|
2
|
-
import { resolveWorkingPath as
|
|
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
|
|
5
|
-
import { setupPackages as
|
|
6
|
-
import { E_PackageType as
|
|
7
|
-
import { getEnv as
|
|
8
|
-
var
|
|
9
|
-
for (var
|
|
10
|
-
|
|
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
|
|
13
|
-
|
|
14
|
-
return
|
|
15
|
-
},
|
|
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(
|
|
18
|
+
O(n.next(a));
|
|
19
19
|
} catch (T) {
|
|
20
20
|
I(T);
|
|
21
21
|
}
|
|
22
22
|
}, N = (a) => {
|
|
23
23
|
try {
|
|
24
|
-
O(
|
|
24
|
+
O(n.throw(a));
|
|
25
25
|
} catch (T) {
|
|
26
26
|
I(T);
|
|
27
27
|
}
|
|
28
|
-
}, O = (a) => a.done ?
|
|
29
|
-
O((
|
|
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
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
|
55
|
-
return
|
|
56
|
-
"pre-commit":
|
|
57
|
-
"commit-msg":
|
|
58
|
-
},
|
|
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:
|
|
61
|
-
const
|
|
62
|
-
return () =>
|
|
63
|
-
switch (
|
|
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
|
|
61
|
+
return p != null && p.length && (yield F(p, {
|
|
66
62
|
install: !0
|
|
67
|
-
})),
|
|
63
|
+
})), g(D(`${Ee} ${n}`));
|
|
68
64
|
case e.STRING:
|
|
69
|
-
return
|
|
65
|
+
return g(D(n));
|
|
70
66
|
default:
|
|
71
67
|
throw new Error("Unsupported command type");
|
|
72
68
|
}
|
|
73
69
|
});
|
|
74
70
|
}
|
|
75
|
-
const
|
|
71
|
+
const ge = {
|
|
76
72
|
simpleGitHooks: t({
|
|
77
73
|
type: e.CLI,
|
|
78
74
|
packages: [
|
|
79
75
|
{
|
|
80
76
|
name: _e,
|
|
81
|
-
type:
|
|
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:
|
|
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:
|
|
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:
|
|
111
|
-
type:
|
|
106
|
+
name: A,
|
|
107
|
+
type: c.DEV_DEPENDENCY
|
|
112
108
|
}
|
|
113
109
|
],
|
|
114
|
-
command: `${
|
|
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:
|
|
121
|
-
type:
|
|
116
|
+
name: A,
|
|
117
|
+
type: c.DEV_DEPENDENCY
|
|
122
118
|
}
|
|
123
119
|
],
|
|
124
|
-
command: `${
|
|
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:
|
|
131
|
-
type:
|
|
126
|
+
name: ce,
|
|
127
|
+
type: c.DEV_DEPENDENCY
|
|
132
128
|
}
|
|
133
129
|
],
|
|
134
|
-
command: `${
|
|
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:
|
|
141
|
-
type:
|
|
136
|
+
name: f,
|
|
137
|
+
type: c.DEV_DEPENDENCY
|
|
142
138
|
}
|
|
143
139
|
],
|
|
144
|
-
command: `${
|
|
140
|
+
command: `${$} --config ${_.VITEST_UNIT_CONFIG}`
|
|
145
141
|
}),
|
|
146
142
|
testE2e: t({
|
|
147
143
|
type: e.CLI,
|
|
148
144
|
packages: [
|
|
149
145
|
{
|
|
150
|
-
name:
|
|
151
|
-
type:
|
|
146
|
+
name: f,
|
|
147
|
+
type: c.DEV_DEPENDENCY
|
|
152
148
|
}
|
|
153
149
|
],
|
|
154
|
-
command: `${
|
|
150
|
+
command: `${$} --config ${_.VITEST_E2E_CONFIG}`
|
|
155
151
|
}),
|
|
156
|
-
mongoMigrateCreate: (
|
|
152
|
+
mongoMigrateCreate: (s) => t({
|
|
157
153
|
type: e.CLI,
|
|
158
154
|
packages: [
|
|
159
155
|
{
|
|
160
|
-
name:
|
|
161
|
-
type:
|
|
156
|
+
name: m,
|
|
157
|
+
type: c.DEPENDENCY
|
|
162
158
|
},
|
|
163
159
|
{
|
|
164
160
|
name: l,
|
|
165
|
-
type:
|
|
161
|
+
type: c.DEPENDENCY
|
|
166
162
|
}
|
|
167
163
|
],
|
|
168
|
-
command: `${
|
|
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:
|
|
175
|
-
type:
|
|
170
|
+
name: m,
|
|
171
|
+
type: c.DEPENDENCY
|
|
176
172
|
},
|
|
177
173
|
{
|
|
178
174
|
name: l,
|
|
179
|
-
type:
|
|
175
|
+
type: c.DEPENDENCY
|
|
180
176
|
}
|
|
181
177
|
],
|
|
182
|
-
command: `${
|
|
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:
|
|
189
|
-
type:
|
|
184
|
+
name: m,
|
|
185
|
+
type: c.DEPENDENCY
|
|
190
186
|
},
|
|
191
187
|
{
|
|
192
188
|
name: l,
|
|
193
|
-
type:
|
|
189
|
+
type: c.DEPENDENCY
|
|
194
190
|
}
|
|
195
191
|
],
|
|
196
|
-
command: `${
|
|
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:
|
|
199
|
+
type: c.DEV_DEPENDENCY
|
|
204
200
|
},
|
|
205
201
|
{
|
|
206
202
|
name: ne,
|
|
207
|
-
type:
|
|
203
|
+
type: c.DEV_DEPENDENCY
|
|
208
204
|
}
|
|
209
205
|
],
|
|
210
|
-
command: `${
|
|
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:
|
|
213
|
+
type: c.DEV_DEPENDENCY
|
|
218
214
|
}
|
|
219
215
|
],
|
|
220
|
-
command: `${
|
|
216
|
+
command: `${Y} --config ${_.LINT_STAGED_CONFIG}`
|
|
221
217
|
}),
|
|
222
218
|
configureGitHook: t({
|
|
223
219
|
type: e.STRING,
|
|
224
|
-
command: `${
|
|
220
|
+
command: `${v} config core.hooksPath ${_.GIT_HOOK}`
|
|
225
221
|
}),
|
|
226
222
|
build: t({
|
|
227
223
|
type: e.STRING,
|
|
228
|
-
command: `${
|
|
224
|
+
command: `${i} run --if-present build`
|
|
229
225
|
}),
|
|
230
226
|
pnpmInstallStandard: t({
|
|
231
227
|
type: e.STRING,
|
|
232
|
-
command: `${
|
|
228
|
+
command: `${i} install --ignore-scripts`
|
|
233
229
|
}),
|
|
234
230
|
pnpmInstallLegacy: t({
|
|
235
231
|
type: e.STRING,
|
|
236
|
-
command: `${
|
|
232
|
+
command: `${i} install --ignore-scripts --legacy-peer-deps`
|
|
237
233
|
}),
|
|
238
234
|
pnpmInstallForce: t({
|
|
239
235
|
type: e.STRING,
|
|
240
|
-
command: `${
|
|
236
|
+
command: `${i} install --ignore-scripts --force`
|
|
241
237
|
}),
|
|
242
238
|
pnpmPruneStore: t({
|
|
243
239
|
type: e.STRING,
|
|
244
|
-
command: `${
|
|
240
|
+
command: `${i} store prune`
|
|
245
241
|
}),
|
|
246
242
|
pnpmCleanCache: t({
|
|
247
243
|
type: e.STRING,
|
|
248
|
-
command: `${
|
|
244
|
+
command: `${i} cache delete`
|
|
249
245
|
})
|
|
250
246
|
};
|
|
251
247
|
export {
|
|
252
|
-
|
|
253
|
-
|
|
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
|
-
|
|
257
|
-
|
|
258
|
-
|
|
252
|
+
De as CYBERSKILL_CLI,
|
|
253
|
+
Le as CYBERSKILL_CLI_PATH,
|
|
254
|
+
r as CYBERSKILL_DIRECTORY,
|
|
259
255
|
S as CYBERSKILL_PACKAGE_NAME,
|
|
260
|
-
|
|
256
|
+
u as ESLINT_CLI,
|
|
261
257
|
me as ESLINT_INSPECT_CLI,
|
|
262
258
|
Ie as ESLINT_INSPECT_PACKAGE_NAME,
|
|
263
|
-
|
|
264
|
-
|
|
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
|
-
|
|
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
|
-
|
|
269
|
+
R as NODE_MODULES,
|
|
274
270
|
pe as NODE_MODULES_INSPECT_CLI,
|
|
275
271
|
ie as NODE_MODULES_INSPECT_PACKAGE_NAME,
|
|
276
|
-
|
|
272
|
+
K as PACKAGE_JSON,
|
|
277
273
|
B as PACKAGE_LOCK_JSON,
|
|
278
274
|
_ as PATH,
|
|
279
|
-
|
|
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
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
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",
|