@cyberskill/shared 1.210.0 → 1.211.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/commitlint/index.cjs +1 -0
- package/dist/config/config.type.cjs +1 -0
- package/dist/config/config.util.cjs +1 -0
- package/dist/config/config.util.js +35 -26
- package/dist/config/env/env.constant.cjs +1 -0
- package/dist/config/env/env.util.cjs +1 -0
- package/dist/config/env/index.cjs +1 -0
- package/dist/config/eslint/index.cjs +1 -0
- package/dist/config/eslint/index.js +12 -4
- package/dist/config/graphql-codegen/graphql-codegen.util.cjs +1 -0
- package/dist/config/graphql-codegen/graphql-codegen.util.js +33 -28
- package/dist/config/graphql-codegen/index.cjs +1 -0
- package/dist/config/index.cjs +1 -0
- package/dist/config/lint-staged/index.cjs +1 -0
- package/dist/config/vitest/index.cjs +1 -0
- package/dist/config/vitest/vitest.e2e.cjs +1 -0
- package/dist/config/vitest/vitest.e2e.js +16 -9
- package/dist/config/vitest/vitest.unit.cjs +1 -0
- package/dist/config/vitest/vitest.unit.js +18 -11
- package/dist/constant/common.cjs +1 -0
- package/dist/constant/common.js +1 -1
- package/dist/constant/index.cjs +1 -0
- package/dist/constant/response-status.cjs +1 -0
- package/dist/node/apollo-server/apollo-server.util.cjs +1 -0
- package/dist/node/apollo-server/apollo-server.util.js +48 -21
- package/dist/node/apollo-server/index.cjs +1 -0
- package/dist/node/cli/index.cjs +6 -0
- package/dist/node/cli/index.js +140 -90
- package/dist/node/command/command.type.cjs +1 -0
- package/dist/node/command/command.util.cjs +2 -0
- package/dist/node/command/command.util.js +148 -117
- package/dist/node/command/index.cjs +1 -0
- package/dist/node/express/express.util.cjs +1 -0
- package/dist/node/express/express.util.js +70 -37
- package/dist/node/express/index.cjs +1 -0
- package/dist/node/fs/fs.util.cjs +1 -0
- package/dist/node/fs/fs.util.js +55 -40
- package/dist/node/fs/index.cjs +1 -0
- package/dist/node/log/index.cjs +1 -0
- package/dist/node/log/log.type.cjs +1 -0
- package/dist/node/log/log.util.cjs +1 -0
- package/dist/node/log/log.util.js +31 -30
- package/dist/node/mongo/index.cjs +1 -0
- package/dist/node/mongo/mongo.constant.cjs +1 -0
- package/dist/node/mongo/mongo.type.cjs +1 -0
- package/dist/node/mongo/mongo.util.cjs +5 -0
- package/dist/node/mongo/mongo.util.js +433 -365
- package/dist/node/package/index.cjs +1 -0
- package/dist/node/package/package.type.cjs +1 -0
- package/dist/node/package/package.util.cjs +1 -0
- package/dist/node/package/package.util.js +224 -195
- package/dist/node/path/index.cjs +1 -0
- package/dist/node/path/path.constant.cjs +1 -0
- package/dist/node/path/path.constant.js +205 -183
- package/dist/node/path/path.util.cjs +1 -0
- package/dist/node/storage/index.cjs +1 -0
- package/dist/node/storage/storage.util.cjs +1 -0
- package/dist/node/storage/storage.util.js +70 -40
- package/dist/node/upload/index.cjs +1 -0
- package/dist/node/upload/upload.type.cjs +1 -0
- package/dist/node/upload/upload.util.cjs +1 -0
- package/dist/node/upload/upload.util.js +119 -91
- package/dist/node/ws/index.cjs +1 -0
- package/dist/node/ws/ts.util.cjs +1 -0
- package/dist/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 +1 -0
- package/dist/react/apollo-client/apollo-client.component.cjs +1 -0
- package/dist/react/apollo-client/apollo-client.constant.cjs +1 -0
- package/dist/react/apollo-client/apollo-client.context.cjs +1 -0
- package/dist/react/apollo-client/apollo-client.util.cjs +1 -0
- package/dist/react/apollo-client/apollo-client.util.js +74 -64
- package/dist/react/apollo-client/index.cjs +1 -0
- package/dist/react/apollo-client-nextjs/apollo-client-nextjs.component.cjs +1 -0
- package/dist/react/apollo-client-nextjs/apollo-client-nextjs.rsc.cjs +1 -0
- package/dist/react/apollo-client-nextjs/apollo-client-nextjs.util.cjs +1 -0
- package/dist/react/apollo-client-nextjs/apollo-client-nextjs.util.js +18 -11
- package/dist/react/apollo-client-nextjs/index.cjs +1 -0
- package/dist/react/apollo-error/apollo-error.component.cjs +1 -0
- package/dist/react/apollo-error/apollo-error.component.js +6 -6
- package/dist/react/apollo-error/apollo-error.context.cjs +1 -0
- package/dist/react/apollo-error/apollo-error.hook.cjs +1 -0
- package/dist/react/apollo-error/apollo-error.module.scss.cjs +1 -0
- package/dist/react/apollo-error/apollo-error.provider.cjs +1 -0
- package/dist/react/apollo-error/apollo-error.util.cjs +1 -0
- package/dist/react/apollo-error/apollo-error.util.js +1 -1
- package/dist/react/apollo-error/index.cjs +1 -0
- package/dist/react/i18next/i18next.hook.cjs +1 -0
- package/dist/react/i18next/i18next.util.cjs +1 -0
- package/dist/react/i18next/index.cjs +1 -0
- package/dist/react/loading/index.cjs +1 -0
- package/dist/react/loading/loading.component.cjs +6 -0
- package/dist/react/loading/loading.component.js +36 -19
- package/dist/react/loading/loading.context.cjs +1 -0
- package/dist/react/loading/loading.hook.cjs +1 -0
- package/dist/react/loading/loading.module.scss.cjs +1 -0
- package/dist/react/loading/loading.provider.cjs +1 -0
- package/dist/react/log/index.cjs +1 -0
- package/dist/react/log/log.util.cjs +1 -0
- package/dist/react/log/log.util.js +4 -4
- package/dist/react/next-intl/index.cjs +1 -0
- package/dist/react/next-intl/next-intl.constant.cjs +1 -0
- package/dist/react/next-intl/next-intl.context.cjs +1 -0
- package/dist/react/next-intl/next-intl.hoc.cjs +1 -0
- package/dist/react/next-intl/next-intl.hoc.js +23 -14
- package/dist/react/next-intl/next-intl.hook.cjs +1 -0
- package/dist/react/next-intl/next-intl.provider.cjs +1 -0
- package/dist/react/next-intl/next-intl.provider.js +7 -7
- package/dist/react/storage/index.cjs +1 -0
- package/dist/react/storage/storage.hook.cjs +1 -0
- package/dist/react/storage/storage.hook.js +57 -41
- package/dist/react/storage/storage.util.cjs +1 -0
- package/dist/react/storage/storage.util.js +50 -25
- package/dist/react/toast/index.cjs +1 -0
- package/dist/react/userback/index.cjs +1 -0
- package/dist/react/userback/userback.component.cjs +1 -0
- package/dist/react/userback/userback.component.js +42 -18
- package/dist/style.css +1 -1
- package/dist/typescript/common.type.cjs +1 -0
- package/dist/typescript/index.cjs +1 -0
- package/dist/util/common/common.util.cjs +1 -0
- package/dist/util/common/common.util.js +37 -29
- package/dist/util/common/index.cjs +1 -0
- package/dist/util/index.cjs +1 -0
- package/dist/util/object/index.cjs +1 -0
- package/dist/util/object/object.util.cjs +1 -0
- package/dist/util/object/object.util.js +55 -49
- package/dist/util/serializer/index.cjs +1 -0
- package/dist/util/serializer/serializer.util.cjs +1 -0
- package/dist/util/string/index.cjs +1 -0
- package/dist/util/string/string.util.cjs +1 -0
- package/dist/util/string/string.util.js +46 -36
- package/dist/util/validate/index.cjs +1 -0
- package/dist/util/validate/validate.util.cjs +1 -0
- package/package.json +69 -35
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={extends:["@commitlint/config-conventional"],ignores:[e=>e.includes("[🚀 CI - Deploy]")]};exports.default=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.E_ConfigType=(t=>(t.ESLINT="eslint",t.COMMITLINT="commitlint",t.LINT_STAGED="lint-staged",t.VITEST_REACT_E2E="vitest-react-e2e",t.VITEST_REACT_UNIT="vitest-react-unit",t))(exports.E_ConfigType||{});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@antfu/eslint-config"),i=require("./config.type.cjs"),y=require("./eslint/index.cjs"),p=require("./vitest/vitest.e2e.cjs"),u=require("./vitest/vitest.unit.cjs"),s=require("../util/object/object.util.cjs");var g=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,d=(e,n)=>{var t={};for(var r in e)E.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&g)for(var r of g(e))n.indexOf(r)<0&&T.call(e,r)&&(t[r]=e[r]);return t};const c=(...e)=>{const t=s.deepMerge(y.default,...e.map(o=>o)),{ignores:r}=t,f=d(t,["ignores"]),a=Array.isArray(r)&&r.every(o=>typeof o=="string")?{ignores:r}:void 0,_=[f,...a?[a]:[]];return l({stylistic:{semi:!0,indent:4,quotes:"single"},formatters:{css:!0,html:!0,markdown:"prettier"},yaml:!1,react:!0},..._)},m={[i.E_ConfigType.ESLINT]:e=>c(e),[i.E_ConfigType.COMMITLINT]:e=>s.deepMerge(e),[i.E_ConfigType.LINT_STAGED]:e=>s.deepMerge(e),[i.E_ConfigType.VITEST_REACT_UNIT]:e=>u.vitestUnit(e),[i.E_ConfigType.VITEST_REACT_E2E]:e=>p.vitestE2E(e)};function v(e,...n){const t=m[e];if(!n||n.length===0)return t({});if(!t)throw new Error(`Unknown config type: ${e}`);return t(...n)}exports.mergeConfigs=v;
|
|
@@ -1,18 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { E_ConfigType as
|
|
3
|
-
import
|
|
4
|
-
import { vitestE2E as
|
|
5
|
-
import { vitestUnit as
|
|
6
|
-
import { deepMerge as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import g from "@antfu/eslint-config";
|
|
2
|
+
import { E_ConfigType as o } from "./config.type.js";
|
|
3
|
+
import l from "./eslint/index.js";
|
|
4
|
+
import { vitestE2E as y } from "./vitest/vitest.e2e.js";
|
|
5
|
+
import { vitestUnit as E } from "./vitest/vitest.unit.js";
|
|
6
|
+
import { deepMerge as a } from "../util/object/object.util.js";
|
|
7
|
+
var f = Object.getOwnPropertySymbols, _ = Object.prototype.hasOwnProperty, T = Object.prototype.propertyIsEnumerable, d = (r, n) => {
|
|
8
|
+
var e = {};
|
|
9
|
+
for (var t in r)
|
|
10
|
+
_.call(r, t) && n.indexOf(t) < 0 && (e[t] = r[t]);
|
|
11
|
+
if (r != null && f)
|
|
12
|
+
for (var t of f(r))
|
|
13
|
+
n.indexOf(t) < 0 && T.call(r, t) && (e[t] = r[t]);
|
|
14
|
+
return e;
|
|
15
|
+
};
|
|
16
|
+
const v = (...r) => {
|
|
17
|
+
const e = a(
|
|
18
|
+
l,
|
|
19
|
+
...r.map((i) => i)
|
|
20
|
+
), { ignores: t } = e, m = d(e, ["ignores"]), s = Array.isArray(t) && t.every((i) => typeof i == "string") ? { ignores: t } : void 0, p = [
|
|
12
21
|
m,
|
|
13
22
|
...s ? [s] : []
|
|
14
23
|
];
|
|
15
|
-
return
|
|
24
|
+
return g(
|
|
16
25
|
{
|
|
17
26
|
stylistic: {
|
|
18
27
|
semi: !0,
|
|
@@ -27,23 +36,23 @@ const c = (...r) => {
|
|
|
27
36
|
yaml: !1,
|
|
28
37
|
react: !0
|
|
29
38
|
},
|
|
30
|
-
...
|
|
39
|
+
...p
|
|
31
40
|
);
|
|
32
|
-
},
|
|
33
|
-
[
|
|
34
|
-
[
|
|
35
|
-
[
|
|
36
|
-
[
|
|
37
|
-
[
|
|
41
|
+
}, c = {
|
|
42
|
+
[o.ESLINT]: (r) => v(r),
|
|
43
|
+
[o.COMMITLINT]: (r) => a(r),
|
|
44
|
+
[o.LINT_STAGED]: (r) => a(r),
|
|
45
|
+
[o.VITEST_REACT_UNIT]: (r) => E(r),
|
|
46
|
+
[o.VITEST_REACT_E2E]: (r) => y(r)
|
|
38
47
|
};
|
|
39
|
-
function
|
|
40
|
-
const
|
|
41
|
-
if (!
|
|
42
|
-
return
|
|
43
|
-
if (!
|
|
48
|
+
function u(r, ...n) {
|
|
49
|
+
const e = c[r];
|
|
50
|
+
if (!n || n.length === 0)
|
|
51
|
+
return e({});
|
|
52
|
+
if (!e)
|
|
44
53
|
throw new Error(`Unknown config type: ${r}`);
|
|
45
|
-
return
|
|
54
|
+
return e(...n);
|
|
46
55
|
}
|
|
47
56
|
export {
|
|
48
|
-
|
|
57
|
+
u as mergeConfigs
|
|
49
58
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=".cyberskill-storage";exports.CYBERSKILL_STORAGE_DIRECTORY=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("@dotenvx/dotenvx"),n=require("envalid"),i=require("node:os"),a=require("node:path"),r=require("node:process"),l=require("./env.constant.cjs"),u=require("../../typescript/common.type.cjs");let t=!1;const d=n.makeValidator(e=>typeof e=="boolean"?e:typeof e=="string");function o(){r.env.NODE_ENV!==u.E_Environment.PRODUCTION&&!t&&(E.config(),t=!0)}function s(){o();const e=n.cleanEnv(r.env,{CWD:n.str({default:r.cwd()}),DEBUG:d({default:!1}),CYBERSKILL_STORAGE_DIRECTORY:n.str({default:a.join(i.homedir(),l.CYBERSKILL_STORAGE_DIRECTORY)})});return{CWD:e.CWD,DEBUG:e.DEBUG,CYBERSKILL_STORAGE_DIRECTORY:e.CYBERSKILL_STORAGE_DIRECTORY}}exports.getEnv=s;exports.loadEnvFile=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./env.constant.cjs"),e=require("./env.util.cjs");exports.CYBERSKILL_STORAGE_DIRECTORY=t.CYBERSKILL_STORAGE_DIRECTORY;exports.getEnv=e.getEnv;exports.loadEnvFile=e.loadEnvFile;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("globals");function u(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const n=u(i);var c=Object.defineProperty,a=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,l=(t,e,r)=>e in t?c(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,s=(t,e)=>{for(var r in e||(e={}))f.call(e,r)&&l(t,r,e[r]);if(a)for(var r of a(e))p.call(e,r)&&l(t,r,e[r]);return t};const d=[{languageOptions:{globals:s(s({},n.node),n.browser)},rules:{"perfectionist/sort-imports":["error",{internalPattern:["^#.*","^@/.*"]}],"dot-notation":"off"},ignores:["build","dist"]}];exports.default=d;
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
1
|
+
import * as t from "globals";
|
|
2
|
+
var l = Object.defineProperty, a = Object.getOwnPropertySymbols, i = Object.prototype.hasOwnProperty, p = Object.prototype.propertyIsEnumerable, n = (o, r, e) => r in o ? l(o, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[r] = e, s = (o, r) => {
|
|
3
|
+
for (var e in r || (r = {}))
|
|
4
|
+
i.call(r, e) && n(o, e, r[e]);
|
|
5
|
+
if (a)
|
|
6
|
+
for (var e of a(r))
|
|
7
|
+
p.call(r, e) && n(o, e, r[e]);
|
|
8
|
+
return o;
|
|
9
|
+
};
|
|
10
|
+
const f = [
|
|
3
11
|
{
|
|
4
12
|
languageOptions: {
|
|
5
|
-
globals: {
|
|
13
|
+
globals: s(s({}, t.node), t.browser)
|
|
6
14
|
},
|
|
7
15
|
rules: {
|
|
8
16
|
"perfectionist/sort-imports": ["error", {
|
|
@@ -14,5 +22,5 @@ const t = [
|
|
|
14
22
|
}
|
|
15
23
|
];
|
|
16
24
|
export {
|
|
17
|
-
|
|
25
|
+
f as default
|
|
18
26
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@eddeee888/gcg-typescript-resolver-files"),l=require("../env/env.util.cjs");var u=Object.defineProperty,f=Object.defineProperties,g=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,a=(t,e,r)=>e in t?u(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,o=(t,e)=>{for(var r in e||(e={}))_.call(e,r)&&a(t,r,e[r]);if(i)for(var r of i(e))v.call(e,r)&&a(t,r,e[r]);return t},d=(t,e)=>f(t,g(e));l.loadEnvFile();function m({uri:t,from:e,to:r,target:n="client"}){const s=n==="client",p=n==="server";return d(o({schema:t,ignoreNoDocuments:!0,overwrite:!0},s&&{documents:[e]}),{generates:o(o({},s&&{[r]:{preset:"client",presetConfig:{fragmentMasking:!1,persistedDocuments:!0},config:{useTypeImports:!0}}}),p&&{[r]:c.defineConfig()})})}exports.createGraphqlCodegenConfig=m;
|
|
@@ -1,37 +1,42 @@
|
|
|
1
|
-
import { defineConfig as
|
|
2
|
-
import { loadEnvFile as
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { defineConfig as c } from "@eddeee888/gcg-typescript-resolver-files";
|
|
2
|
+
import { loadEnvFile as f } from "../env/env.util.js";
|
|
3
|
+
var l = Object.defineProperty, u = Object.defineProperties, _ = Object.getOwnPropertyDescriptors, i = Object.getOwnPropertySymbols, m = Object.prototype.hasOwnProperty, v = Object.prototype.propertyIsEnumerable, p = (t, e, r) => e in t ? l(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, o = (t, e) => {
|
|
4
|
+
for (var r in e || (e = {}))
|
|
5
|
+
m.call(e, r) && p(t, r, e[r]);
|
|
6
|
+
if (i)
|
|
7
|
+
for (var r of i(e))
|
|
8
|
+
v.call(e, r) && p(t, r, e[r]);
|
|
9
|
+
return t;
|
|
10
|
+
}, g = (t, e) => u(t, _(e));
|
|
11
|
+
f();
|
|
12
|
+
function P({
|
|
5
13
|
uri: t,
|
|
6
|
-
from:
|
|
7
|
-
to:
|
|
8
|
-
target:
|
|
14
|
+
from: e,
|
|
15
|
+
to: r,
|
|
16
|
+
target: n = "client"
|
|
9
17
|
}) {
|
|
10
|
-
const
|
|
11
|
-
return {
|
|
18
|
+
const s = n === "client", a = n === "server";
|
|
19
|
+
return g(o({
|
|
12
20
|
schema: t,
|
|
13
21
|
ignoreNoDocuments: !0,
|
|
14
|
-
overwrite: !0
|
|
15
|
-
|
|
16
|
-
generates: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
useTypeImports: !0
|
|
26
|
-
}
|
|
22
|
+
overwrite: !0
|
|
23
|
+
}, s && { documents: [e] }), {
|
|
24
|
+
generates: o(o({}, s && {
|
|
25
|
+
[r]: {
|
|
26
|
+
preset: "client",
|
|
27
|
+
presetConfig: {
|
|
28
|
+
fragmentMasking: !1,
|
|
29
|
+
persistedDocuments: !0
|
|
30
|
+
},
|
|
31
|
+
config: {
|
|
32
|
+
useTypeImports: !0
|
|
27
33
|
}
|
|
28
|
-
},
|
|
29
|
-
...i && {
|
|
30
|
-
[e]: s()
|
|
31
34
|
}
|
|
32
|
-
}
|
|
33
|
-
|
|
35
|
+
}), a && {
|
|
36
|
+
[r]: c()
|
|
37
|
+
})
|
|
38
|
+
});
|
|
34
39
|
}
|
|
35
40
|
export {
|
|
36
|
-
|
|
41
|
+
P as createGraphqlCodegenConfig
|
|
37
42
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./graphql-codegen.util.cjs");exports.createGraphqlCodegenConfig=e.createGraphqlCodegenConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./config.type.cjs"),r=require("./config.util.cjs");Object.defineProperty(exports,"E_ConfigType",{enumerable:!0,get:()=>e.E_ConfigType});exports.mergeConfigs=r.mergeConfigs;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"*.ts":()=>"tsc --noEmit","*":["eslint --fix --no-cache"]};exports.default=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./vitest.e2e.cjs"),e=require("./vitest.unit.cjs");exports.vitestE2E=t.vitestE2E;exports.vitestUnit=e.vitestUnit;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=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 a=Object.defineProperty,o=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,i=(t,r,e)=>r in t?a(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e,p=(t,r)=>{for(var e in r||(r={}))u.call(r,e)&&i(t,e,r[e]);if(o)for(var e of o(r))l.call(r,e)&&i(t,e,r[e]);return t};function c(t){return s.defineConfig(p({plugins:[n()],test:{include:["**/*.test.e2e.?(c|m)[jt]s?(x)"],browser:{enabled:!0,provider:"playwright",instances:[{browser:"chromium"},{browser:"firefox"},{browser:"webkit"}]}}},t))}exports.vitestE2E=c;
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { defineConfig as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import n from "@vitejs/plugin-react-swc";
|
|
2
|
+
import { defineConfig as a } 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
|
+
var p = Object.defineProperty, o = Object.getOwnPropertySymbols, s = Object.prototype.hasOwnProperty, f = Object.prototype.propertyIsEnumerable, i = (t, r, e) => r in t ? p(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e, l = (t, r) => {
|
|
4
|
+
for (var e in r || (r = {}))
|
|
5
|
+
s.call(r, e) && i(t, e, r[e]);
|
|
6
|
+
if (o)
|
|
7
|
+
for (var e of o(r))
|
|
8
|
+
f.call(r, e) && i(t, e, r[e]);
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
function m(t) {
|
|
12
|
+
return a(l({
|
|
13
|
+
plugins: [n()],
|
|
6
14
|
test: {
|
|
7
15
|
include: ["**/*.test.e2e.?(c|m)[jt]s?(x)"],
|
|
8
16
|
browser: {
|
|
@@ -14,10 +22,9 @@ function s(e) {
|
|
|
14
22
|
{ browser: "webkit" }
|
|
15
23
|
]
|
|
16
24
|
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
});
|
|
25
|
+
}
|
|
26
|
+
}, t));
|
|
20
27
|
}
|
|
21
28
|
export {
|
|
22
|
-
|
|
29
|
+
m as vitestE2E
|
|
23
30
|
};
|
|
@@ -0,0 +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,19 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { defineConfig as
|
|
3
|
-
import { PATH as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import i from "@vitejs/plugin-react-swc";
|
|
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) => {
|
|
5
|
+
for (var e in r || (r = {}))
|
|
6
|
+
l.call(r, e) && n(t, e, r[e]);
|
|
7
|
+
if (o)
|
|
8
|
+
for (var e of o(r))
|
|
9
|
+
f.call(r, e) && n(t, e, r[e]);
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
function v(t) {
|
|
13
|
+
return p(m({
|
|
14
|
+
plugins: [i()],
|
|
7
15
|
test: {
|
|
8
16
|
globals: !0,
|
|
9
17
|
environment: "jsdom",
|
|
10
18
|
pool: "vmThreads",
|
|
11
19
|
include: ["**/*.test.unit.?(c|m)[jt]s?(x)"],
|
|
12
|
-
setupFiles: [
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
});
|
|
20
|
+
setupFiles: [a.VITEST_UNIT_SETUP_CONFIG]
|
|
21
|
+
}
|
|
22
|
+
}, t));
|
|
16
23
|
}
|
|
17
24
|
export {
|
|
18
|
-
|
|
25
|
+
v as vitestUnit
|
|
19
26
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=typeof window!="undefined";exports.IS_BROWSER=e;
|
package/dist/constant/common.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("./common.cjs"),e=require("./response-status.cjs");exports.IS_BROWSER=S.IS_BROWSER;exports.RESPONSE_STATUS=e.RESPONSE_STATUS;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E={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"}};exports.RESPONSE_STATUS=E;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("@apollo/server"),S=require("@apollo/server/plugin/drainHttpServer"),u=require("@apollo/server/plugin/landingPage/default"),_=require("../log/log.util.cjs");var P=Object.defineProperty,i=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,v=(r,e,l)=>e in r?P(r,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[e]=l,y=(r,e)=>{for(var l in e||(e={}))g.call(e,l)&&v(r,l,e[l]);if(i)for(var l of i(e))h.call(e,l)&&v(r,l,e[l]);return r},c=(r,e,l)=>new Promise((p,o)=>{var s=t=>{try{a(l.next(t))}catch(n){o(n)}},d=t=>{try{a(l.throw(t))}catch(n){o(n)}},a=t=>t.done?p(t.value):Promise.resolve(t.value).then(s,d);a((l=l.apply(r,e)).next())});function m(r){return new f.ApolloServer(y({schema:r.schema,plugins:[r.isDev?u.ApolloServerPluginLandingPageLocalDefault():u.ApolloServerPluginLandingPageProductionDefault(),S.ApolloServerPluginDrainHttpServer({httpServer:r.server}),...r.drainServer?[{serverWillStart(){return c(this,null,function*(){return{drainServer(){return c(this,null,function*(){var e;(e=r.drainServer)==null||e.call(r),_.log.info("Apollo Server drainServer hook called")})}}})}}]:[]]},r.isDev&&{introspection:!0,includeStacktraceInErrorResponses:!0}))}exports.createApolloServer=m;
|
|
@@ -1,29 +1,56 @@
|
|
|
1
|
-
import { ApolloServer as
|
|
2
|
-
import { ApolloServerPluginDrainHttpServer as
|
|
3
|
-
import { ApolloServerPluginLandingPageLocalDefault as
|
|
4
|
-
import { log as
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { ApolloServer as s } from "@apollo/server";
|
|
2
|
+
import { ApolloServerPluginDrainHttpServer as m } from "@apollo/server/plugin/drainHttpServer";
|
|
3
|
+
import { ApolloServerPluginLandingPageLocalDefault as d, ApolloServerPluginLandingPageProductionDefault as S } from "@apollo/server/plugin/landingPage/default";
|
|
4
|
+
import { log as P } from "../log/log.util.js";
|
|
5
|
+
var _ = Object.defineProperty, i = Object.getOwnPropertySymbols, h = Object.prototype.hasOwnProperty, y = Object.prototype.propertyIsEnumerable, u = (r, e, l) => e in r ? _(r, e, { enumerable: !0, configurable: !0, writable: !0, value: l }) : r[e] = l, g = (r, e) => {
|
|
6
|
+
for (var l in e || (e = {}))
|
|
7
|
+
h.call(e, l) && u(r, l, e[l]);
|
|
8
|
+
if (i)
|
|
9
|
+
for (var l of i(e))
|
|
10
|
+
y.call(e, l) && u(r, l, e[l]);
|
|
11
|
+
return r;
|
|
12
|
+
}, v = (r, e, l) => new Promise((p, o) => {
|
|
13
|
+
var c = (t) => {
|
|
14
|
+
try {
|
|
15
|
+
a(l.next(t));
|
|
16
|
+
} catch (n) {
|
|
17
|
+
o(n);
|
|
18
|
+
}
|
|
19
|
+
}, f = (t) => {
|
|
20
|
+
try {
|
|
21
|
+
a(l.throw(t));
|
|
22
|
+
} catch (n) {
|
|
23
|
+
o(n);
|
|
24
|
+
}
|
|
25
|
+
}, a = (t) => t.done ? p(t.value) : Promise.resolve(t.value).then(c, f);
|
|
26
|
+
a((l = l.apply(r, e)).next());
|
|
27
|
+
});
|
|
28
|
+
function E(r) {
|
|
29
|
+
return new s(g({
|
|
7
30
|
schema: r.schema,
|
|
8
31
|
plugins: [
|
|
9
|
-
r.isDev ?
|
|
10
|
-
|
|
32
|
+
r.isDev ? d() : S(),
|
|
33
|
+
m({ httpServer: r.server }),
|
|
11
34
|
...r.drainServer ? [{
|
|
12
|
-
|
|
13
|
-
return {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
35
|
+
serverWillStart() {
|
|
36
|
+
return v(this, null, function* () {
|
|
37
|
+
return {
|
|
38
|
+
drainServer() {
|
|
39
|
+
return v(this, null, function* () {
|
|
40
|
+
var e;
|
|
41
|
+
(e = r.drainServer) == null || e.call(r), P.info("Apollo Server drainServer hook called");
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
});
|
|
18
46
|
}
|
|
19
47
|
}] : []
|
|
20
|
-
]
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
});
|
|
48
|
+
]
|
|
49
|
+
}, r.isDev && {
|
|
50
|
+
introspection: !0,
|
|
51
|
+
includeStacktraceInErrorResponses: !0
|
|
52
|
+
}));
|
|
26
53
|
}
|
|
27
54
|
export {
|
|
28
|
-
|
|
55
|
+
E as createApolloServer
|
|
29
56
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./apollo-server.util.cjs"),r=require("@apollo/server/express4");exports.createApolloServer=e.createApolloServer;Object.defineProperty(exports,"expressMiddleware",{enumerable:!0,get:()=>r.expressMiddleware});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";const g=require("node:process"),k=require("yargs/helpers"),L=require("yargs/yargs"),i=require("../command/command.util.cjs"),p=require("../package/package.util.cjs"),l=require("../fs/fs.util.cjs"),P=require("../path/path.util.cjs"),n=require("../path/path.constant.cjs"),s=require("../log/log.util.cjs"),f=require("../log/log.type.cjs");var t=(e,o,r)=>new Promise((c,y)=>{var _=a=>{try{m(r.next(a))}catch(d){y(d)}},I=a=>{try{m(r.throw(a))}catch(d){y(d)}},m=a=>a.done?c(a.value):Promise.resolve(a.value).then(_,I);m((r=r.apply(e,o)).next())});function T(){try{return JSON.parse(l.readFileSync(P.resolve(__dirname,"../../../package.json"),"utf-8")).version}catch(e){return"1.0.0"}}function C(){return t(this,null,function*(){l.pathExistsSync(n.PATH.TS_CONFIG)?yield i.runCommand("Performing TypeScript validation",yield n.command.typescriptCheck()):s.log.warn("No TypeScript configuration found. Skipping type check.")})}function E(e=!1){return t(this,null,function*(){e?yield i.runCommand("Running ESLint with auto-fix",yield n.command.eslintFix()):yield i.runCommand("Running ESLint check",yield n.command.eslintCheck())})}function h(e,o){if(!o.length)return;const r=e==="Errors"?"red":"yellow";s.log.printBoxedLog(e==="Errors"?"✖ Errors":"⚠ Warnings",o,r)}function u(){return t(this,null,function*(){setTimeout(()=>t(null,null,function*(){const e=yield i.getStoredErrorLists(),o=e.filter(c=>c.type===f.E_IssueType.Error),r=e.filter(c=>c.type===f.E_IssueType.Warning);!o.length&&!r.length?s.log.printBoxedLog("✔ NO ISSUES FOUND",[],"green"):(h("Warnings",r),h("Errors",o),o.length>0&&g.exit(1))}),0)})}function A(){return t(this,null,function*(){yield i.clearAllErrorLists();const e=yield p.getPackage({name:n.CYBERSKILL_PACKAGE_NAME});if(!e.success){s.log.error("Failed to retrieve package information. Aborting lint-staged.");return}e.result.isCurrentProject&&(yield i.runCommand(`Building package: ${n.CYBERSKILL_PACKAGE_NAME}`,yield n.command.build())),yield i.runCommand("Executing lint-staged",yield n.command.lintStaged()),u()})}function M(){return t(this,null,function*(){yield i.runCommand("Inspecting ESLint configuration",yield n.command.eslintInspect())})}function O(){return t(this,null,function*(){yield i.clearAllErrorLists(),yield Promise.all([C(),E()]),u()})}function v(){return t(this,null,function*(){yield i.clearAllErrorLists(),yield Promise.all([C(),E(!0)]),u()})}function G(){return t(this,null,function*(){yield i.clearAllErrorLists(),yield i.runCommand("Validating commit message",yield n.command.commitLint()),u()})}function S(){return t(this,null,function*(){yield i.runCommand("Configuring Git hooks",yield n.command.configureGitHook()),l.removeSync(n.PATH.GIT_HOOK);const e=yield i.resolveCommands(n.createGitHooksConfig);l.writeFileSync(n.PATH.SIMPLE_GIT_HOOKS_JSON,JSON.stringify(e,null,4));const o=`
|
|
3
|
+
${n.SIMPLE_GIT_HOOK_JSON}
|
|
4
|
+
`;l.pathExistsSync(n.PATH.GIT_IGNORE)?l.readFileSync(n.PATH.GIT_IGNORE,"utf-8").split(`
|
|
5
|
+
`).includes(n.SIMPLE_GIT_HOOK_JSON)||l.appendFileSync(n.PATH.GIT_IGNORE,o):l.writeFileSync(n.PATH.GIT_IGNORE,o),yield i.runCommand("Setting up simple-git-hooks",yield n.command.simpleGitHooks())})}function R(){return t(this,null,function*(){yield p.installDependencies(),yield S()})}function N(){return t(this,null,function*(){l.removeSync(n.PATH.NODE_MODULES,n.PATH.PNPM_LOCK_YAML),yield i.runCommand("Pruning pnpm store",yield n.command.pnpmPruneStore()),yield i.runCommand("Clearing pnpm cache",yield n.command.pnpmCleanCache()),yield p.installDependencies(),yield S()})}function H(){return t(this,null,function*(){yield i.runCommand("Inspecting project dependencies",yield n.command.nodeModulesInspect())})}function w(){return t(this,null,function*(){yield i.runCommand("Running unit tests",yield n.command.testUnit())})}function D(){return t(this,null,function*(){yield i.runCommand("Running end-to-end tests",yield n.command.testE2e())})}function B(e){return t(this,null,function*(){yield i.runCommand("Creating MongoDB migration",yield n.command.mongoMigrateCreate(e))})}function x(){return t(this,null,function*(){yield i.runCommand("Running MongoDB migrations",yield n.command.mongoMigrateUp())})}function q(){return t(this,null,function*(){yield i.runCommand("Rolling back MongoDB migration",yield n.command.mongoMigrateDown())})}t(null,null,function*(){try{yield L(k.hideBin(g.argv)).scriptName(n.CYBERSKILL_CLI).usage("$0 <command> [options]").command("lint","Check code for linting issues",O).command("lint:fix","Fix linting issues automatically",v).command("lint:inspect","View active ESLint configuration",M).command("lint-staged","Run lint checks on staged files",A).command("commitlint","Validate commit message format",G).command("ready","Initialize project and dependencies",R).command("reset","Reset the project and reinstall dependencies",N).command("inspect","Analyze installed project dependencies",H).command("test:unit","Run unit test suite",w).command("test:e2e","Run end-to-end test suite",D).command("mongo:migrate:create <name>","Create a MongoDB migration",e=>e.positional("name",{describe:"Migration name",type:"string"}),e=>t(null,null,function*(){if(!e.name){s.log.error("Migration name is required.");return}yield B(e.name)})).command("mongo:migrate:up","Apply all MongoDB migrations",x).command("mongo:migrate:down","Rollback last MongoDB migration",q).demandCommand(1,"Please specify a valid command.").strict().help().alias("h","help").alias("v","version").version(T()).epilog(`💡 Tip: Use "--help" with any command to see options
|
|
6
|
+
`).parse()}catch(e){s.catchError(e),g.exit(1)}});
|