@cyberskill/shared 1.201.0 → 1.202.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/magic-string.es-D_iPNVbJ.cjs +10 -0
- package/dist/magic-string.es-cELbkQ5L.js +901 -0
- package/dist/{path.constant-Y6ImOuVK.cjs → path.constant-CPGOAxEp.cjs} +2 -2
- package/dist/{path.constant-CFKXX6cG.js → path.constant-DJq0jtD0.js} +63 -64
- package/dist/src/config/vitest/vitest.unit.cjs +1 -1
- package/dist/src/config/vitest/vitest.unit.js +1 -1
- package/dist/src/config/vitest/vitest.unit.setup.cjs +1 -1
- package/dist/src/config/vitest/vitest.unit.setup.js +1 -1
- package/dist/src/node/cli/cli.util.cjs +1 -1
- package/dist/src/node/cli/cli.util.js +19 -19
- package/dist/src/node/command/command.util.cjs +1 -1
- package/dist/src/node/command/command.util.js +1 -1
- package/dist/src/node/command/index.cjs +1 -1
- package/dist/src/node/command/index.js +1 -1
- package/dist/src/node/express/express.util.cjs +1 -1
- package/dist/src/node/express/express.util.js +43 -42
- package/dist/src/node/mongo/mongo.util.cjs +1 -1
- package/dist/src/node/mongo/mongo.util.js +1 -1
- package/dist/src/node/package/index.cjs +1 -1
- package/dist/src/node/package/index.js +1 -1
- package/dist/src/node/package/package.util.cjs +1 -1
- package/dist/src/node/package/package.util.js +1 -1
- package/dist/src/node/path/index.cjs +1 -1
- package/dist/src/node/path/index.js +20 -21
- package/dist/src/node/path/path.constant.cjs +1 -1
- package/dist/src/node/path/path.constant.d.ts +0 -1
- package/dist/src/node/path/path.constant.js +25 -26
- package/dist/src/node/upload/upload.util.cjs +1 -1
- package/dist/src/node/upload/upload.util.js +1 -1
- package/dist/src/react/apollo-client/apollo-client.util.cjs +1 -1
- package/dist/src/react/apollo-client/apollo-client.util.js +29 -29
- package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.component.cjs +1 -0
- package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.component.d.ts +3 -0
- package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.component.js +20 -0
- package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.cjs +1 -0
- package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.d.ts +6 -0
- package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.js +6 -0
- package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.util.cjs +1 -0
- package/dist/src/react/apollo-client-nextjs/{apollo-client.util.d.ts → apollo-client-nextjs.util.d.ts} +1 -1
- package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.util.js +24 -0
- package/dist/src/react/apollo-client-nextjs/index.cjs +1 -1
- package/dist/src/react/apollo-client-nextjs/index.d.ts +2 -2
- package/dist/src/react/apollo-client-nextjs/index.js +4 -4
- package/package.json +9 -5
- package/dist/magic-string.es-CyLHbrL2.js +0 -871
- package/dist/magic-string.es-hjygV5wN.cjs +0 -10
- package/dist/src/react/apollo-client-nextjs/apollo-client.component.cjs +0 -1
- package/dist/src/react/apollo-client-nextjs/apollo-client.component.d.ts +0 -3
- package/dist/src/react/apollo-client-nextjs/apollo-client.component.js +0 -33
- package/dist/src/react/apollo-client-nextjs/apollo-client.util.cjs +0 -1
- package/dist/src/react/apollo-client-nextjs/apollo-client.util.js +0 -31
|
@@ -17,27 +17,27 @@ var t = (e, n, r) => new Promise((a, y) => {
|
|
|
17
17
|
g((r = r.apply(e, n)).next());
|
|
18
18
|
});
|
|
19
19
|
import x from "node:process";
|
|
20
|
-
import { hideBin as
|
|
21
|
-
import
|
|
22
|
-
import { g as
|
|
20
|
+
import { hideBin as _ } from "yargs/helpers";
|
|
21
|
+
import O from "yargs/yargs";
|
|
22
|
+
import { g as R, X as l, $ as s, I as i, K as G, C as f, Q as k, F as o, U as T, _ as N, S as j, H as D } from "../../../path.constant-DJq0jtD0.js";
|
|
23
23
|
import { removeSync as v, pathExistsSync as b, writeFileSync as w, readFileSync as P, appendFileSync as B } from "../fs/fs.util.js";
|
|
24
24
|
import { E_IssueType as h } from "../log/log.type.js";
|
|
25
|
-
import { log as d, catchError as
|
|
25
|
+
import { log as d, catchError as F } from "../log/log.util.js";
|
|
26
26
|
import "../path/path.util.js";
|
|
27
27
|
var fe = L((u) => {
|
|
28
|
-
const
|
|
29
|
-
name:
|
|
28
|
+
const A = "@cyberskill/shared", H = "module", U = "1.201.1", K = "CyberSkill Shared", $ = "Stephen Cheng", J = "MIT", V = "https://github.com/cyberskill-world/shared#readme", W = { type: "git", url: "git+https://github.com/cyberskill-world/shared.git" }, Y = { url: "https://github.com/cyberskill-world/shared/issues" }, z = { "./config": { types: "./dist/src/config/index.d.ts", import: "./dist/src/config/index.js", require: "./dist/src/config/index.cjs" }, "./config/commitlint": { types: "./dist/src/config/commitlint/index.d.ts", import: "./dist/src/config/commitlint/index.js", require: "./dist/src/config/commitlint/index.cjs" }, "./config/env": { types: "./dist/src/config/env/index.d.ts", import: "./dist/src/config/env/index.js", require: "./dist/src/config/env/index.cjs" }, "./config/eslint": { types: "./dist/src/config/eslint/index.d.ts", import: "./dist/src/config/eslint/index.js", require: "./dist/src/config/eslint/index.cjs" }, "./config/graphql-codegen": { types: "./dist/src/config/graphql-codegen/index.d.ts", import: "./dist/src/config/graphql-codegen/index.js", require: "./dist/src/config/graphql-codegen/index.cjs" }, "./config/lint-staged": { types: "./dist/src/config/lint-staged/index.d.ts", import: "./dist/src/config/lint-staged/index.js", require: "./dist/src/config/lint-staged/index.cjs" }, "./config/vitest": { types: "./dist/src/config/vitest/index.d.ts", import: "./dist/src/config/vitest/index.js", require: "./dist/src/config/vitest/index.cjs" }, "./constant": { types: "./dist/src/constant/index.d.ts", import: "./dist/src/constant/index.js", require: "./dist/src/constant/index.cjs" }, "./node/apollo-server": { types: "./dist/src/node/apollo-server/index.d.ts", import: "./dist/src/node/apollo-server/index.js", require: "./dist/src/node/apollo-server/index.cjs" }, "./node/cli": { types: "./dist/src/node/cli/index.d.ts", import: "./dist/src/node/cli/index.js", require: "./dist/src/node/cli/index.cjs" }, "./node/command": { types: "./dist/src/node/command/index.d.ts", import: "./dist/src/node/command/index.js", require: "./dist/src/node/command/index.cjs" }, "./node/express": { types: "./dist/src/node/express/index.d.ts", import: "./dist/src/node/express/index.js", require: "./dist/src/node/express/index.cjs" }, "./node/fs": { types: "./dist/src/node/fs/index.d.ts", import: "./dist/src/node/fs/index.js", require: "./dist/src/node/fs/index.cjs" }, "./node/log": { types: "./dist/src/node/log/index.d.ts", import: "./dist/src/node/log/index.js", require: "./dist/src/node/log/index.cjs" }, "./node/mongo": { types: "./dist/src/node/mongo/index.d.ts", import: "./dist/src/node/mongo/index.js", require: "./dist/src/node/mongo/index.cjs" }, "./node/package": { types: "./dist/src/node/package/index.d.ts", import: "./dist/src/node/package/index.js", require: "./dist/src/node/package/index.cjs" }, "./node/path": { types: "./dist/src/node/path/index.d.ts", import: "./dist/src/node/path/index.js", require: "./dist/src/node/path/index.cjs" }, "./node/storage": { types: "./dist/src/node/storage/index.d.ts", import: "./dist/src/node/storage/index.js", require: "./dist/src/node/storage/index.cjs" }, "./node/upload": { types: "./dist/src/node/upload/index.d.ts", import: "./dist/src/node/upload/index.js", require: "./dist/src/node/upload/index.cjs" }, "./node/ws": { types: "./dist/src/node/ws/index.d.ts", import: "./dist/src/node/ws/index.js", require: "./dist/src/node/ws/index.cjs" }, "./react/apollo-client": { types: "./dist/src/react/apollo-client/index.d.ts", import: "./dist/src/react/apollo-client/index.js", require: "./dist/src/react/apollo-client/index.cjs" }, "./react/apollo-client-nextjs": { types: "./dist/src/react/apollo-client-nextjs/index.d.ts", import: "./dist/src/react/apollo-client-nextjs/index.js", require: "./dist/src/react/apollo-client-nextjs/index.cjs" }, "./react/apollo-client-nextjs/rsc": { types: "./dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.d.ts", import: "./dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.js", require: "./dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.cjs" }, "./react/apollo-error": { types: "./dist/src/react/apollo-error/index.d.ts", import: "./dist/src/react/apollo-error/index.js", require: "./dist/src/react/apollo-error/index.cjs" }, "./react/i18next": { types: "./dist/src/react/i18next/index.d.ts", import: "./dist/src/react/i18next/index.js", require: "./dist/src/react/i18next/index.cjs" }, "./react/loading": { types: "./dist/src/react/loading/index.d.ts", import: "./dist/src/react/loading/index.js", require: "./dist/src/react/loading/index.cjs" }, "./react/log": { types: "./dist/src/react/log/index.d.ts", import: "./dist/src/react/log/index.js", require: "./dist/src/react/log/index.cjs" }, "./react/next-intl": { types: "./dist/src/react/next-intl/index.d.ts", import: "./dist/src/react/next-intl/index.js", require: "./dist/src/react/next-intl/index.cjs" }, "./react/storage": { types: "./dist/src/react/storage/index.d.ts", import: "./dist/src/react/storage/index.js", require: "./dist/src/react/storage/index.cjs" }, "./react/toast": { types: "./dist/src/react/toast/index.d.ts", import: "./dist/src/react/toast/index.js", require: "./dist/src/react/toast/index.cjs" }, "./react/userback": { types: "./dist/src/react/userback/index.d.ts", import: "./dist/src/react/userback/index.js", require: "./dist/src/react/userback/index.cjs" }, "./typescript": { types: "./dist/src/typescript/index.d.ts", import: "./dist/src/typescript/index.js", require: "./dist/src/typescript/index.cjs" }, "./util": { types: "./dist/src/util/index.d.ts", import: "./dist/src/util/index.js", require: "./dist/src/util/index.cjs" }, "./style.css": { import: "./dist/style.css", require: "./dist/style.css" } }, Q = { cyberskill: "dist/src/node/cli/index.js" }, X = ["dist", "public"], Z = { build: "vite build", commitlint: "tsx src/node/cli/index.ts commitlint", dev: "vite build --watch", inspect: "tsx src/node/cli/index.ts inspect", lint: "tsx src/node/cli/index.ts lint", "lint:fix": "tsx src/node/cli/index.ts lint:fix", "lint:inspect": "tsx src/node/cli/index.ts lint:inspect", ready: "tsx src/node/cli/index.ts ready", reset: "tsx src/node/cli/index.ts reset", "test:e2e": "tsx src/node/cli/index.ts test:e2e", "test:unit": "tsx src/node/cli/index.ts test:unit" }, ee = { "@antfu/eslint-config": "4.16.1", "@apollo/client": "3.13.8", "@apollo/client-integration-nextjs": "0.12.2", "@apollo/server": "4.12.2", "@dotenvx/dotenvx": "1.45.1", "@eddeee888/gcg-typescript-resolver-files": "0.12.1", "@graphql-codegen/cli": "5.0.7", "@graphql-codegen/client-preset": "4.8.3", "@nestjs/common": "11.1.3", "@nestjs/core": "11.1.3", "@userback/widget": "0.3.11", "@vitejs/plugin-react-swc": "3.10.2", "body-parser": "2.2.0", chalk: "5.4.1", clsx: "2.1.1", compression: "1.8.0", consola: "3.4.2", "cookie-parser": "1.4.7", cors: "2.8.5", "crypto-js": "4.2.0", "date-fns": "4.1.0", envalid: "8.0.0", express: "4.21.2", "express-session": "1.18.1", "express-useragent": "1.0.15", "fs-extra": "11.3.0", globals: "16.2.0", graphql: "16.11.0", "graphql-upload": "17.0.0", "graphql-ws": "6.0.5", i18next: "25.3.0", jsdom: "26.1.0", localforage: "1.10.0", "migrate-mongo": "12.1.3", mongodb: "6.17.0", mongoose: "8.16.1", "mongoose-aggregate-paginate-v2": "1.1.4", "mongoose-paginate-v2": "1.9.1", "next-intl": "4.3.1", "node-fetch": "3.3.2", "node-persist": "4.0.4", qs: "6.14.0", react: "19.1.0", "react-dom": "19.1.0", "react-hot-toast": "2.5.2", "react-i18next": "15.5.3", slugify: "1.6.6", unorm: "1.6.0", uuid: "11.1.0", vite: "7.0.0", ws: "8.18.3", yargs: "18.0.0" }, te = { "@commitlint/cli": "19.8.1", "@commitlint/config-conventional": "19.8.1", "@eslint-react/eslint-plugin": "1.52.2", "@eslint/config-inspector": "1.1.0", "@microsoft/api-extractor": "7.52.8", "@next/eslint-plugin-next": "15.3.4", "@testing-library/jest-dom": "6.6.3", "@testing-library/react": "16.3.0", "@types/body-parser": "1.19.6", "@types/compression": "1.8.1", "@types/cookie-parser": "1.4.9", "@types/cors": "2.8.19", "@types/crypto-js": "4.2.2", "@types/express": "4.17.21", "@types/express-session": "1.18.2", "@types/express-useragent": "1.0.5", "@types/fs-extra": "11.0.4", "@types/graphql-upload": "17.0.0", "@types/migrate-mongo": "10.0.5", "@types/node": "24.0.7", "@types/node-persist": "3.1.8", "@types/react": "19.1.8", "@types/react-dom": "19.1.6", "@types/unorm": "1.3.31", "@types/uuid": "10.0.0", "@types/ws": "8.18.1", "@types/yargs": "17.0.33", "@vitest/browser": "3.2.4", eslint: "9.30.0", "eslint-config-next": "15.3.4", "eslint-plugin-format": "1.0.1", "eslint-plugin-react-hooks": "5.2.0", "eslint-plugin-react-refresh": "0.4.20", glob: "11.0.3", "lint-staged": "16.1.2", "node-modules-inspector": "1.0.0", sass: "1.89.2", "simple-git-hooks": "2.13.0", tsx: "4.20.3", typescript: "5.8.3", vite: "7.0.0", "vite-plugin-dts": "4.5.4", vitest: "3.2.4" }, se = { access: "public", registry: "https://registry.npmjs.org/" }, ie = {
|
|
29
|
+
name: A,
|
|
30
30
|
type: H,
|
|
31
31
|
version: U,
|
|
32
32
|
description: K,
|
|
33
|
-
author:
|
|
34
|
-
license:
|
|
35
|
-
homepage:
|
|
36
|
-
repository:
|
|
37
|
-
bugs:
|
|
33
|
+
author: $,
|
|
34
|
+
license: J,
|
|
35
|
+
homepage: V,
|
|
36
|
+
repository: W,
|
|
37
|
+
bugs: Y,
|
|
38
38
|
exports: z,
|
|
39
|
-
bin:
|
|
40
|
-
files:
|
|
39
|
+
bin: Q,
|
|
40
|
+
files: X,
|
|
41
41
|
scripts: Z,
|
|
42
42
|
dependencies: ee,
|
|
43
43
|
devDependencies: te,
|
|
@@ -53,7 +53,7 @@ var fe = L((u) => {
|
|
|
53
53
|
e ? yield s("Running ESLint with auto-fix", yield i.eslintFix()) : yield s("Running ESLint check", yield i.eslintCheck());
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function q(e, n) {
|
|
57
57
|
if (!n.length)
|
|
58
58
|
return;
|
|
59
59
|
const r = e === "Errors" ? "red" : "yellow";
|
|
@@ -63,7 +63,7 @@ var fe = L((u) => {
|
|
|
63
63
|
return t(this, null, function* () {
|
|
64
64
|
setTimeout(() => t(null, null, function* () {
|
|
65
65
|
const e = yield T(), n = e.filter((a) => a.type === h.Error), r = e.filter((a) => a.type === h.Warning);
|
|
66
|
-
!n.length && !r.length ? d.printBoxedLog("✔ NO ISSUES FOUND", [], "green") : (
|
|
66
|
+
!n.length && !r.length ? d.printBoxedLog("✔ NO ISSUES FOUND", [], "green") : (q("Warnings", r), q("Errors", n), (n.length > 0 || r.length > 0) && x.exit(1));
|
|
67
67
|
}), 0);
|
|
68
68
|
});
|
|
69
69
|
}
|
|
@@ -112,12 +112,12 @@ ${j}
|
|
|
112
112
|
}
|
|
113
113
|
function de() {
|
|
114
114
|
return t(this, null, function* () {
|
|
115
|
-
yield
|
|
115
|
+
yield k(), yield C();
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
118
|
function le() {
|
|
119
119
|
return t(this, null, function* () {
|
|
120
|
-
v(o.NODE_MODULES, o.PNPM_LOCK_YAML), yield s("Pruning pnpm store", yield i.pnpmPruneStore()), yield s("Clearing pnpm cache", yield i.pnpmCleanCache()), yield
|
|
120
|
+
v(o.NODE_MODULES, o.PNPM_LOCK_YAML), yield s("Pruning pnpm store", yield i.pnpmPruneStore()), yield s("Clearing pnpm cache", yield i.pnpmCleanCache()), yield k(), yield C();
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
123
|
function pe() {
|
|
@@ -152,7 +152,7 @@ ${j}
|
|
|
152
152
|
}
|
|
153
153
|
t(null, null, function* () {
|
|
154
154
|
try {
|
|
155
|
-
yield
|
|
155
|
+
yield O(_(x.argv)).scriptName(R).usage("$0 <command> [options]").command("lint", "Check code for linting issues", oe).command("lint:fix", "Fix linting issues automatically", ce).command("lint:inspect", "View active ESLint configuration", re).command("lint-staged", "Run lint checks on staged files", ne).command("commitlint", "Validate commit message format", ae).command("ready", "Initialize project and dependencies", de).command("reset", "Reset the project and reinstall dependencies", le).command("inspect", "Analyze installed project dependencies", pe).command("test:unit", "Run unit test suite", ge).command("test:e2e", "Run end-to-end test suite", me).command("mongo:migrate:create <name>", "Create a MongoDB migration", (e) => e.positional("name", {
|
|
156
156
|
describe: "Migration name",
|
|
157
157
|
type: "string"
|
|
158
158
|
}), (e) => t(null, null, function* () {
|
|
@@ -164,7 +164,7 @@ ${j}
|
|
|
164
164
|
})).command("mongo:migrate:up", "Apply all MongoDB migrations", ue).command("mongo:migrate:down", "Rollback last MongoDB migration", ye).demandCommand(1, "Please specify a valid command.").strict().help().alias("h", "help").alias("v", "version").version(ie.version).epilog(`💡 Tip: Use "--help" with any command to see options
|
|
165
165
|
`).parse();
|
|
166
166
|
} catch (e) {
|
|
167
|
-
|
|
167
|
+
F(e), x.exit(1);
|
|
168
168
|
}
|
|
169
169
|
});
|
|
170
170
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("node:child_process");require("node:process");require("node:util");require("../../config/env/env.util.cjs");require("../log/log.type.cjs");require("../log/log.util.cjs");const r=require("../../../path.constant-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("node:child_process");require("node:process");require("node:util");require("../../config/env/env.util.cjs");require("../log/log.type.cjs");require("../log/log.util.cjs");const r=require("../../../path.constant-CPGOAxEp.cjs");require("../path/path.util.cjs");require("../storage/storage.util.cjs");exports.clearAllErrorLists=r.clearAllErrorLists;exports.formatCommand=r.formatCommand;exports.getStoredErrorLists=r.getStoredErrorLists;exports.rawCommand=r.rawCommand;exports.resolveCommands=r.resolveCommands;exports.runCommand=r.runCommand;
|
|
@@ -4,7 +4,7 @@ import "node:util";
|
|
|
4
4
|
import "../../config/env/env.util.js";
|
|
5
5
|
import "../log/log.type.js";
|
|
6
6
|
import "../log/log.util.js";
|
|
7
|
-
import {
|
|
7
|
+
import { X as n, Z as l, U as C, Y as f, _ as E, $ as L } from "../../../path.constant-DJq0jtD0.js";
|
|
8
8
|
import "../path/path.util.js";
|
|
9
9
|
import "../storage/storage.util.js";
|
|
10
10
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./command.type.cjs"),r=require("../../../path.constant-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./command.type.cjs"),r=require("../../../path.constant-CPGOAxEp.cjs");exports.E_CommandType=o.E_CommandType;exports.clearAllErrorLists=r.clearAllErrorLists;exports.formatCommand=r.formatCommand;exports.getStoredErrorLists=r.getStoredErrorLists;exports.rawCommand=r.rawCommand;exports.resolveCommands=r.resolveCommands;exports.runCommand=r.runCommand;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E_CommandType as o } from "./command.type.js";
|
|
2
|
-
import {
|
|
2
|
+
import { X as s, Z as e, U as t, Y as d, _ as n, $ as C } from "../../../path.constant-DJq0jtD0.js";
|
|
3
3
|
export {
|
|
4
4
|
o as E_CommandType,
|
|
5
5
|
s as clearAllErrorLists,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var P=Object.defineProperty;var o=Object.getOwnPropertySymbols;var p=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var d=(e,r,s)=>r in e?P(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,y=(e,r)=>{for(var s in r||(r={}))p.call(r,s)&&d(e,s,r[s]);if(o)for(var s of o(r))q.call(r,s)&&d(e,s,r[s]);return e};var x=(e,r)=>{var s={};for(var t in e)p.call(e,t)&&r.indexOf(t)<0&&(s[t]=e[t]);if(e!=null&&o)for(var t of o(e))r.indexOf(t)<0&&q.call(e,t)&&(s[t]=e[t]);return s};var b=(e,r,s)=>new Promise((t,n)=>{var u=c=>{try{l(s.next(c))}catch(f){n(f)}},a=c=>{try{l(s.throw(c))}catch(f){n(f)}},l=c=>c.done?t(c.value):Promise.resolve(c.value).then(u,a);l((s=s.apply(e,r)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("@nestjs/core"),A=require("body-parser"),N=require("compression"),O=require("cookie-parser"),m=require("cors"),i=require("express"),G=require("express-session"),H=require("express-useragent"),I=require("graphql-upload/graphqlUploadExpress.mjs");function S(t){var n=t,{isDev:e,whiteList:r}=n,s=x(n,["isDev","whiteList"]);return y({origin:(u,a)=>{e||!u||r!=null&&r.includes(u!=null?u:"")?a(null,!0):a(new Error("Not allowed by CORS"),!1)},credentials:!0},s)}function M(e){return m(S(e))}function j(e){return G(e)}function C(e){e.set("trust proxy",1),e.use(O()),e.use(i.urlencoded({extended:!0})),e.use(N()),e.use(H.express())}function E(e,r){r&&(Array.isArray(r)?r:[r]).forEach(t=>{e.use(i.static(t))})}function v(e){const r=i();return C(r),E(r,e==null?void 0:e.static),r.use(I()),r}function R(e){return b(this,null,function*(){const r=yield g.NestFactory.create(e.module);return C(r.getHttpAdapter().getInstance()),E(r.getHttpAdapter().getInstance(),e.static),e.filters&&r.useGlobalFilters(...e.filters),e.pipes&&r.useGlobalPipes(...e.pipes),r})}exports.bodyParser=A;exports.express=i;exports.createCors=M;exports.createCorsOptions=S;exports.createExpress=v;exports.createNest=R;exports.createSession=j;
|
|
@@ -1,87 +1,88 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var C = Object.defineProperty;
|
|
2
|
+
var f = Object.getOwnPropertySymbols;
|
|
3
3
|
var d = Object.prototype.hasOwnProperty, i = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var
|
|
4
|
+
var l = (e, r, t) => r in e ? C(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, x = (e, r) => {
|
|
5
5
|
for (var t in r || (r = {}))
|
|
6
|
-
d.call(r, t) &&
|
|
7
|
-
if (
|
|
8
|
-
for (var t of
|
|
9
|
-
i.call(r, t) &&
|
|
6
|
+
d.call(r, t) && l(e, t, r[t]);
|
|
7
|
+
if (f)
|
|
8
|
+
for (var t of f(r))
|
|
9
|
+
i.call(r, t) && l(e, t, r[t]);
|
|
10
10
|
return e;
|
|
11
11
|
};
|
|
12
12
|
var y = (e, r) => {
|
|
13
13
|
var t = {};
|
|
14
14
|
for (var s in e)
|
|
15
15
|
d.call(e, s) && r.indexOf(s) < 0 && (t[s] = e[s]);
|
|
16
|
-
if (e != null &&
|
|
17
|
-
for (var s of
|
|
16
|
+
if (e != null && f)
|
|
17
|
+
for (var s of f(e))
|
|
18
18
|
r.indexOf(s) < 0 && i.call(e, s) && (t[s] = e[s]);
|
|
19
19
|
return t;
|
|
20
20
|
};
|
|
21
|
-
var A = (e, r, t) => new Promise((s,
|
|
21
|
+
var A = (e, r, t) => new Promise((s, o) => {
|
|
22
22
|
var a = (u) => {
|
|
23
23
|
try {
|
|
24
24
|
n(t.next(u));
|
|
25
25
|
} catch (m) {
|
|
26
|
-
|
|
26
|
+
o(m);
|
|
27
27
|
}
|
|
28
|
-
},
|
|
28
|
+
}, c = (u) => {
|
|
29
29
|
try {
|
|
30
30
|
n(t.throw(u));
|
|
31
31
|
} catch (m) {
|
|
32
|
-
|
|
32
|
+
o(m);
|
|
33
33
|
}
|
|
34
|
-
}, n = (u) => u.done ? s(u.value) : Promise.resolve(u.value).then(a,
|
|
34
|
+
}, n = (u) => u.done ? s(u.value) : Promise.resolve(u.value).then(a, c);
|
|
35
35
|
n((t = t.apply(e, r)).next());
|
|
36
36
|
});
|
|
37
37
|
import { NestFactory as N } from "@nestjs/core";
|
|
38
|
-
import { default as
|
|
38
|
+
import { default as T } from "body-parser";
|
|
39
39
|
import P from "compression";
|
|
40
40
|
import S from "cookie-parser";
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import { default as
|
|
44
|
-
import
|
|
45
|
-
import
|
|
41
|
+
import g from "cors";
|
|
42
|
+
import p from "express";
|
|
43
|
+
import { default as W } from "express";
|
|
44
|
+
import G from "express-session";
|
|
45
|
+
import H from "express-useragent";
|
|
46
|
+
import I from "graphql-upload/graphqlUploadExpress.mjs";
|
|
46
47
|
function O(s) {
|
|
47
|
-
var
|
|
48
|
+
var o = s, { isDev: e, whiteList: r } = o, t = y(o, ["isDev", "whiteList"]);
|
|
48
49
|
return x({
|
|
49
|
-
origin: (a,
|
|
50
|
-
e || !a || r != null && r.includes(a != null ? a : "") ?
|
|
50
|
+
origin: (a, c) => {
|
|
51
|
+
e || !a || r != null && r.includes(a != null ? a : "") ? c(null, !0) : c(new Error("Not allowed by CORS"), !1);
|
|
51
52
|
},
|
|
52
53
|
credentials: !0
|
|
53
54
|
}, t);
|
|
54
55
|
}
|
|
55
|
-
function z(e) {
|
|
56
|
-
return G(O(e));
|
|
57
|
-
}
|
|
58
56
|
function B(e) {
|
|
59
|
-
return
|
|
57
|
+
return g(O(e));
|
|
58
|
+
}
|
|
59
|
+
function D(e) {
|
|
60
|
+
return G(e);
|
|
60
61
|
}
|
|
61
|
-
function
|
|
62
|
-
e.set("trust proxy", 1), e.use(S()), e.use(
|
|
62
|
+
function E(e) {
|
|
63
|
+
e.set("trust proxy", 1), e.use(S()), e.use(p.urlencoded({ extended: !0 })), e.use(P()), e.use(H.express());
|
|
63
64
|
}
|
|
64
|
-
function
|
|
65
|
+
function b(e, r) {
|
|
65
66
|
r && (Array.isArray(r) ? r : [r]).forEach((s) => {
|
|
66
|
-
e.use(
|
|
67
|
+
e.use(p.static(s));
|
|
67
68
|
});
|
|
68
69
|
}
|
|
69
|
-
function D(e) {
|
|
70
|
-
const r = l();
|
|
71
|
-
return b(r), C(r, e == null ? void 0 : e.static), r;
|
|
72
|
-
}
|
|
73
70
|
function F(e) {
|
|
71
|
+
const r = p();
|
|
72
|
+
return E(r), b(r, e == null ? void 0 : e.static), r.use(I()), r;
|
|
73
|
+
}
|
|
74
|
+
function J(e) {
|
|
74
75
|
return A(this, null, function* () {
|
|
75
76
|
const r = yield N.create(e.module);
|
|
76
|
-
return
|
|
77
|
+
return E(r.getHttpAdapter().getInstance()), b(r.getHttpAdapter().getInstance(), e.static), e.filters && r.useGlobalFilters(...e.filters), e.pipes && r.useGlobalPipes(...e.pipes), r;
|
|
77
78
|
});
|
|
78
79
|
}
|
|
79
80
|
export {
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
T as bodyParser,
|
|
82
|
+
B as createCors,
|
|
82
83
|
O as createCorsOptions,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
F as createExpress,
|
|
85
|
+
J as createNest,
|
|
86
|
+
D as createSession,
|
|
87
|
+
W as express
|
|
87
88
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var M=Object.defineProperty,x=Object.defineProperties;var C=Object.getOwnPropertyDescriptors;var T=Object.getOwnPropertySymbols;var b=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var R=(c,t,e)=>t in c?M(c,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):c[t]=e,g=(c,t)=>{for(var e in t||(t={}))b.call(t,e)&&R(c,e,t[e]);if(T)for(var e of T(t))I.call(t,e)&&R(c,e,t[e]);return c},S=(c,t)=>x(c,C(t));var p=(c,t,e)=>R(c,typeof t!="symbol"?t+"":t,e);var a=(c,t,e)=>new Promise((r,s)=>{var n=l=>{try{i(e.next(l))}catch(m){s(m)}},u=l=>{try{i(e.throw(l))}catch(m){s(m)}},i=l=>l.done?r(l.value):Promise.resolve(l.value).then(n,u);i((e=e.apply(c,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("date-fns"),F=require("migrate-mongo"),G=require("mongoose"),D=require("mongoose-aggregate-paginate-v2"),A=require("mongoose-paginate-v2"),w=require("uuid"),d=require("../../constant/response-status.cjs"),U=require("../../util/common/common.util.cjs"),f=require("../../util/object/object.util.cjs"),O=require("../../util/string/string.util.cjs"),j=require("../../util/validate/validate.util.cjs"),E=require("../fs/fs.util.cjs"),o=require("../log/log.util.cjs"),y=require("../../../path.constant-
|
|
1
|
+
"use strict";var M=Object.defineProperty,x=Object.defineProperties;var C=Object.getOwnPropertyDescriptors;var T=Object.getOwnPropertySymbols;var b=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var R=(c,t,e)=>t in c?M(c,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):c[t]=e,g=(c,t)=>{for(var e in t||(t={}))b.call(t,e)&&R(c,e,t[e]);if(T)for(var e of T(t))I.call(t,e)&&R(c,e,t[e]);return c},S=(c,t)=>x(c,C(t));var p=(c,t,e)=>R(c,typeof t!="symbol"?t+"":t,e);var a=(c,t,e)=>new Promise((r,s)=>{var n=l=>{try{i(e.next(l))}catch(m){s(m)}},u=l=>{try{i(e.throw(l))}catch(m){s(m)}},i=l=>l.done?r(l.value):Promise.resolve(l.value).then(n,u);i((e=e.apply(c,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("date-fns"),F=require("migrate-mongo"),G=require("mongoose"),D=require("mongoose-aggregate-paginate-v2"),A=require("mongoose-paginate-v2"),w=require("uuid"),d=require("../../constant/response-status.cjs"),U=require("../../util/common/common.util.cjs"),f=require("../../util/object/object.util.cjs"),O=require("../../util/string/string.util.cjs"),j=require("../../util/validate/validate.util.cjs"),E=require("../fs/fs.util.cjs"),o=require("../log/log.util.cjs"),y=require("../../../path.constant-CPGOAxEp.cjs");require("../path/path.util.cjs");const h={getDateTime(c=new Date){return P.format(c,"yyyy-MM-dd HH:mm:ss.SSS")},createGenericFields({returnDateAs:c="string"}={}){const t=c==="string"?h.getDateTime():new Date;return{id:w.v4(),isDel:!1,createdAt:t,updatedAt:t}},applyPlugins(c,t){t.filter(e=>typeof e=="function").forEach(e=>c.plugin(e))},applyMiddlewares(c,t){t.forEach(({method:e,pre:r,post:s})=>{e&&r&&c.pre(e,r),e&&s&&c.post(e,s)})},createGenericSchema(c){return new c.Schema({id:{type:String,default:w.v4,unique:!0},isDel:{type:Boolean,default:!1}},{timestamps:!0})},createSchema({mongoose:c,schema:t,virtuals:e=[],standalone:r=!1}){const s=new c.Schema(t);return e.forEach(({name:n,options:u,get:i})=>{const l=s.virtual(n,u);i&&l.get(i)}),r||s.add(h.createGenericSchema(c)),s},createModel({mongoose:c,name:t,schema:e,pagination:r=!1,aggregate:s=!1,virtuals:n=[],middlewares:u=[]}){if(!t)throw new Error("Model name is required.");if(c.models[t])return c.models[t];const i=h.createSchema({mongoose:c,schema:e,virtuals:n});return h.applyPlugins(i,[r&&A,s&&D]),h.applyMiddlewares(i,u),c.model(t,i)},validator:{isRequired(){return function(c){return a(this,null,function*(){return!j.validate.isEmpty(c)})}},isUnique(c){return function(t){return a(this,null,function*(){if(!Array.isArray(c)||c.length===0)throw new Error("Fields must be a non-empty array of strings.");const e={$or:c.map(s=>({[s]:t}))};return!(yield this.constructor.exists(e))})}},matchesRegex(c){return function(t){return a(this,null,function*(){if(!Array.isArray(c)||c.some(e=>!(e instanceof RegExp)))throw new Error("regexArray must be an array of valid RegExp objects.");return c.every(e=>e.test(t))})}}},migrate:S(g({},F),{setConfig:c=>{const t=`// This file is automatically generated by the Cyberskill CLI.
|
|
2
2
|
module.exports = ${JSON.stringify(c,null,4)}`;E.writeFileSync(y.PATH.MIGRATE_MONGO_CONFIG,t);const e=`
|
|
3
3
|
${y.MIGRATE_MONGO_CONFIG}
|
|
4
4
|
`;E.pathExistsSync(y.PATH.GIT_IGNORE)?E.readFileSync(y.PATH.GIT_IGNORE,"utf-8").split(`
|
|
@@ -42,7 +42,7 @@ import { generateShortId as L, generateSlug as E } from "../../util/string/strin
|
|
|
42
42
|
import { validate as H } from "../../util/validate/validate.util.js";
|
|
43
43
|
import { writeFileSync as x, pathExistsSync as Q, readFileSync as k, appendFileSync as J } from "../fs/fs.util.js";
|
|
44
44
|
import { catchError as o } from "../log/log.util.js";
|
|
45
|
-
import {
|
|
45
|
+
import { F as y, M as C } from "../../../path.constant-DJq0jtD0.js";
|
|
46
46
|
import "../path/path.util.js";
|
|
47
47
|
const g = {
|
|
48
48
|
getDateTime(c = /* @__PURE__ */ new Date()) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./package.type.cjs"),e=require("../../../path.constant-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./package.type.cjs"),e=require("../../../path.constant-CPGOAxEp.cjs");exports.E_PackageType=a.E_PackageType;exports.getLatestPackageVersion=e.getLatestPackageVersion;exports.getPackage=e.getPackage;exports.installDependencies=e.installDependencies;exports.setupPackages=e.setupPackages;exports.updatePackage=e.updatePackage;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E_PackageType as s } from "./package.type.js";
|
|
2
|
-
import {
|
|
2
|
+
import { J as g, K as c, Q as p, R as k, O as o } from "../../../path.constant-DJq0jtD0.js";
|
|
3
3
|
export {
|
|
4
4
|
s as E_PackageType,
|
|
5
5
|
g as getLatestPackageVersion,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("node-fetch");require("../../config/env/env.util.cjs");const e=require("../../../path.constant-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("node-fetch");require("../../config/env/env.util.cjs");const e=require("../../../path.constant-CPGOAxEp.cjs");require("../fs/fs.util.cjs");require("../log/log.util.cjs");require("../path/path.util.cjs");require("./package.type.cjs");exports.getLatestPackageVersion=e.getLatestPackageVersion;exports.getPackage=e.getPackage;exports.installDependencies=e.installDependencies;exports.setupPackages=e.setupPackages;exports.updatePackage=e.updatePackage;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "node-fetch";
|
|
2
2
|
import "../../config/env/env.util.js";
|
|
3
|
-
import {
|
|
3
|
+
import { J as m, K as g, Q as c, R as k, O as n } from "../../../path.constant-DJq0jtD0.js";
|
|
4
4
|
import "../fs/fs.util.js";
|
|
5
5
|
import "../log/log.util.js";
|
|
6
6
|
import "../path/path.util.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../../../path.constant-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../../../path.constant-CPGOAxEp.cjs"),I=require("./path.util.cjs");exports.BUILD_DIRECTORY=_.BUILD_DIRECTORY;exports.COMMIT_LINT_CLI=_.COMMIT_LINT_CLI;exports.COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME=_.COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME;exports.COMMIT_LINT_PACKAGE_NAME=_.COMMIT_LINT_PACKAGE_NAME;exports.CYBERSKILL_CLI=_.CYBERSKILL_CLI;exports.CYBERSKILL_CLI_PATH=_.CYBERSKILL_CLI_PATH;exports.CYBERSKILL_DIRECTORY=_.CYBERSKILL_DIRECTORY;exports.CYBERSKILL_PACKAGE_NAME=_.CYBERSKILL_PACKAGE_NAME;exports.ESLINT_CLI=_.ESLINT_CLI;exports.ESLINT_INSPECT_CLI=_.ESLINT_INSPECT_CLI;exports.ESLINT_INSPECT_PACKAGE_NAME=_.ESLINT_INSPECT_PACKAGE_NAME;exports.ESLINT_PACKAGE_NAME=_.ESLINT_PACKAGE_NAME;exports.GIT_CLI=_.GIT_CLI;exports.GIT_COMMIT_EDITMSG=_.GIT_COMMIT_EDITMSG;exports.GIT_HOOK=_.GIT_HOOK;exports.GIT_IGNORE=_.GIT_IGNORE;exports.LINT_STAGED_CLI=_.LINT_STAGED_CLI;exports.LINT_STAGED_PACKAGE_NAME=_.LINT_STAGED_PACKAGE_NAME;exports.MIGRATE_MONGO_CLI=_.MIGRATE_MONGO_CLI;exports.MIGRATE_MONGO_CONFIG=_.MIGRATE_MONGO_CONFIG;exports.MIGRATE_MONGO_PACKAGE_NAME=_.MIGRATE_MONGO_PACKAGE_NAME;exports.NODE_MODULES=_.NODE_MODULES;exports.NODE_MODULES_INSPECT_CLI=_.NODE_MODULES_INSPECT_CLI;exports.NODE_MODULES_INSPECT_PACKAGE_NAME=_.NODE_MODULES_INSPECT_PACKAGE_NAME;exports.PACKAGE_JSON=_.PACKAGE_JSON;exports.PACKAGE_LOCK_JSON=_.PACKAGE_LOCK_JSON;exports.PATH=_.PATH;exports.PNPM_CLI=_.PNPM_CLI;exports.PNPM_EXEC_CLI=_.PNPM_EXEC_CLI;exports.PNPM_LOCK_YAML=_.PNPM_LOCK_YAML;exports.PUBLIC_DIRECTORY=_.PUBLIC_DIRECTORY;exports.SIMPLE_GIT_HOOKS_PACKAGE_NAME=_.SIMPLE_GIT_HOOKS_PACKAGE_NAME;exports.SIMPLE_GIT_HOOK_CLI=_.SIMPLE_GIT_HOOK_CLI;exports.SIMPLE_GIT_HOOK_JSON=_.SIMPLE_GIT_HOOK_JSON;exports.TSCONFIG_JSON=_.TSCONFIG_JSON;exports.TSC_CLI=_.TSC_CLI;exports.TSC_PACKAGE_NAME=_.TSC_PACKAGE_NAME;exports.TSX_CLI=_.TSX_CLI;exports.VITEST_CLI=_.VITEST_CLI;exports.VITEST_PACKAGE_NAME=_.VITEST_PACKAGE_NAME;exports.WORKING_DIRECTORY=_.WORKING_DIRECTORY;exports.command=_.command;exports.createGitHooksConfig=_.createGitHooksConfig;exports.dirname=I.dirname;exports.join=I.join;exports.path=I.path;exports.resolve=I.resolve;exports.resolveWorkingPath=I.resolveWorkingPath;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { B as E,
|
|
2
|
-
import { dirname as
|
|
1
|
+
import { B as E, m as C, l as a, k as s, g as A, h as N, f as T, C as L, i as O, x as M, w as G, E as S, r as P, e as K, d as R, G as D, n as o, L as e, D as r, M as Y, A as H, N as t, z as B, y as i, a as m, b as n, F as U, s as f, t as p, c as F, P as J, u as V, v as c, S as d, T as g, p as h, o as k, q as l, j as v, V as x, W, I as j, H as X } from "../../../path.constant-DJq0jtD0.js";
|
|
2
|
+
import { dirname as q, join as u, path as w, resolve as y, resolveWorkingPath as z } from "./path.util.js";
|
|
3
3
|
export {
|
|
4
4
|
E as BUILD_DIRECTORY,
|
|
5
5
|
C as COMMIT_LINT_CLI,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
a as COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME,
|
|
7
|
+
s as COMMIT_LINT_PACKAGE_NAME,
|
|
8
|
+
A as CYBERSKILL_CLI,
|
|
9
9
|
N as CYBERSKILL_CLI_PATH,
|
|
10
10
|
T as CYBERSKILL_DIRECTORY,
|
|
11
11
|
L as CYBERSKILL_PACKAGE_NAME,
|
|
12
12
|
O as ESLINT_CLI,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
M as ESLINT_INSPECT_CLI,
|
|
14
|
+
G as ESLINT_INSPECT_PACKAGE_NAME,
|
|
15
|
+
S as ESLINT_PACKAGE_NAME,
|
|
16
|
+
P as GIT_CLI,
|
|
17
17
|
K as GIT_COMMIT_EDITMSG,
|
|
18
18
|
R as GIT_HOOK,
|
|
19
19
|
D as GIT_IGNORE,
|
|
@@ -27,13 +27,12 @@ export {
|
|
|
27
27
|
i as NODE_MODULES_INSPECT_PACKAGE_NAME,
|
|
28
28
|
m as PACKAGE_JSON,
|
|
29
29
|
n as PACKAGE_LOCK_JSON,
|
|
30
|
-
|
|
31
|
-
U as PLAYWRIGHT_PACKAGE_NAME,
|
|
30
|
+
U as PATH,
|
|
32
31
|
f as PNPM_CLI,
|
|
33
32
|
p as PNPM_EXEC_CLI,
|
|
34
33
|
F as PNPM_LOCK_YAML,
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
J as PUBLIC_DIRECTORY,
|
|
35
|
+
V as SIMPLE_GIT_HOOKS_PACKAGE_NAME,
|
|
37
36
|
c as SIMPLE_GIT_HOOK_CLI,
|
|
38
37
|
d as SIMPLE_GIT_HOOK_JSON,
|
|
39
38
|
g as TSCONFIG_JSON,
|
|
@@ -42,12 +41,12 @@ export {
|
|
|
42
41
|
l as TSX_CLI,
|
|
43
42
|
v as VITEST_CLI,
|
|
44
43
|
x as VITEST_PACKAGE_NAME,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
44
|
+
W as WORKING_DIRECTORY,
|
|
45
|
+
j as command,
|
|
46
|
+
X as createGitHooksConfig,
|
|
47
|
+
q as dirname,
|
|
48
|
+
u as join,
|
|
49
|
+
w as path,
|
|
50
|
+
y as resolve,
|
|
51
|
+
z as resolveWorkingPath
|
|
53
52
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("fs-extra");require("../../config/env/env.util.cjs");require("../command/command.type.cjs");const _=require("../../../path.constant-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("fs-extra");require("../../config/env/env.util.cjs");require("../command/command.type.cjs");const _=require("../../../path.constant-CPGOAxEp.cjs");require("../package/package.type.cjs");require("./path.util.cjs");exports.BUILD_DIRECTORY=_.BUILD_DIRECTORY;exports.COMMIT_LINT_CLI=_.COMMIT_LINT_CLI;exports.COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME=_.COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME;exports.COMMIT_LINT_PACKAGE_NAME=_.COMMIT_LINT_PACKAGE_NAME;exports.CYBERSKILL_CLI=_.CYBERSKILL_CLI;exports.CYBERSKILL_CLI_PATH=_.CYBERSKILL_CLI_PATH;exports.CYBERSKILL_DIRECTORY=_.CYBERSKILL_DIRECTORY;exports.CYBERSKILL_PACKAGE_NAME=_.CYBERSKILL_PACKAGE_NAME;exports.ESLINT_CLI=_.ESLINT_CLI;exports.ESLINT_INSPECT_CLI=_.ESLINT_INSPECT_CLI;exports.ESLINT_INSPECT_PACKAGE_NAME=_.ESLINT_INSPECT_PACKAGE_NAME;exports.ESLINT_PACKAGE_NAME=_.ESLINT_PACKAGE_NAME;exports.GIT_CLI=_.GIT_CLI;exports.GIT_COMMIT_EDITMSG=_.GIT_COMMIT_EDITMSG;exports.GIT_HOOK=_.GIT_HOOK;exports.GIT_IGNORE=_.GIT_IGNORE;exports.LINT_STAGED_CLI=_.LINT_STAGED_CLI;exports.LINT_STAGED_PACKAGE_NAME=_.LINT_STAGED_PACKAGE_NAME;exports.MIGRATE_MONGO_CLI=_.MIGRATE_MONGO_CLI;exports.MIGRATE_MONGO_CONFIG=_.MIGRATE_MONGO_CONFIG;exports.MIGRATE_MONGO_PACKAGE_NAME=_.MIGRATE_MONGO_PACKAGE_NAME;exports.NODE_MODULES=_.NODE_MODULES;exports.NODE_MODULES_INSPECT_CLI=_.NODE_MODULES_INSPECT_CLI;exports.NODE_MODULES_INSPECT_PACKAGE_NAME=_.NODE_MODULES_INSPECT_PACKAGE_NAME;exports.PACKAGE_JSON=_.PACKAGE_JSON;exports.PACKAGE_LOCK_JSON=_.PACKAGE_LOCK_JSON;exports.PATH=_.PATH;exports.PNPM_CLI=_.PNPM_CLI;exports.PNPM_EXEC_CLI=_.PNPM_EXEC_CLI;exports.PNPM_LOCK_YAML=_.PNPM_LOCK_YAML;exports.PUBLIC_DIRECTORY=_.PUBLIC_DIRECTORY;exports.SIMPLE_GIT_HOOKS_PACKAGE_NAME=_.SIMPLE_GIT_HOOKS_PACKAGE_NAME;exports.SIMPLE_GIT_HOOK_CLI=_.SIMPLE_GIT_HOOK_CLI;exports.SIMPLE_GIT_HOOK_JSON=_.SIMPLE_GIT_HOOK_JSON;exports.TSCONFIG_JSON=_.TSCONFIG_JSON;exports.TSC_CLI=_.TSC_CLI;exports.TSC_PACKAGE_NAME=_.TSC_PACKAGE_NAME;exports.TSX_CLI=_.TSX_CLI;exports.VITEST_CLI=_.VITEST_CLI;exports.VITEST_PACKAGE_NAME=_.VITEST_PACKAGE_NAME;exports.WORKING_DIRECTORY=_.WORKING_DIRECTORY;exports.command=_.command;exports.createGitHooksConfig=_.createGitHooksConfig;
|
|
@@ -19,7 +19,6 @@ export declare const CYBERSKILL_CLI_PATH = "src/node/cli/index.ts";
|
|
|
19
19
|
export declare const ESLINT_PACKAGE_NAME = "eslint";
|
|
20
20
|
export declare const ESLINT_CLI = "eslint";
|
|
21
21
|
export declare const VITEST_PACKAGE_NAME = "vitest";
|
|
22
|
-
export declare const PLAYWRIGHT_PACKAGE_NAME = "playwright";
|
|
23
22
|
export declare const VITEST_CLI = "vitest";
|
|
24
23
|
export declare const COMMIT_LINT_PACKAGE_NAME = "@commitlint/cli";
|
|
25
24
|
export declare const COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME = "@commitlint/config-conventional";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "fs-extra";
|
|
2
2
|
import "../../config/env/env.util.js";
|
|
3
3
|
import "../command/command.type.js";
|
|
4
|
-
import { B as T,
|
|
4
|
+
import { B as T, m as s, l as L, k as O, g as M, h as G, f as S, C as P, i as K, x as R, w as D, E as o, r as m, e as r, d as t, G as Y, n as i, L as H, D as p, M as B, A as U, N as e, z as F, y as J, a as V, b as c, F as f, s as n, t as d, c as g, P as k, u as x, v as W, S as X, T as b, p as h, o as j, q as l, j as q, V as u, W as v, I as w, H as y } from "../../../path.constant-DJq0jtD0.js";
|
|
5
5
|
import "../package/package.type.js";
|
|
6
6
|
import "./path.util.js";
|
|
7
7
|
export {
|
|
@@ -9,44 +9,43 @@ export {
|
|
|
9
9
|
s as COMMIT_LINT_CLI,
|
|
10
10
|
L as COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME,
|
|
11
11
|
O as COMMIT_LINT_PACKAGE_NAME,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
M as CYBERSKILL_CLI,
|
|
13
|
+
G as CYBERSKILL_CLI_PATH,
|
|
14
14
|
S as CYBERSKILL_DIRECTORY,
|
|
15
15
|
P as CYBERSKILL_PACKAGE_NAME,
|
|
16
16
|
K as ESLINT_CLI,
|
|
17
17
|
R as ESLINT_INSPECT_CLI,
|
|
18
18
|
D as ESLINT_INSPECT_PACKAGE_NAME,
|
|
19
19
|
o as ESLINT_PACKAGE_NAME,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
m as GIT_CLI,
|
|
21
|
+
r as GIT_COMMIT_EDITMSG,
|
|
22
|
+
t as GIT_HOOK,
|
|
23
|
+
Y as GIT_IGNORE,
|
|
24
|
+
i as LINT_STAGED_CLI,
|
|
25
|
+
H as LINT_STAGED_PACKAGE_NAME,
|
|
26
26
|
p as MIGRATE_MONGO_CLI,
|
|
27
27
|
B as MIGRATE_MONGO_CONFIG,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
U as MIGRATE_MONGO_PACKAGE_NAME,
|
|
29
|
+
e as NODE_MODULES,
|
|
30
|
+
F as NODE_MODULES_INSPECT_CLI,
|
|
31
|
+
J as NODE_MODULES_INSPECT_PACKAGE_NAME,
|
|
32
32
|
V as PACKAGE_JSON,
|
|
33
33
|
c as PACKAGE_LOCK_JSON,
|
|
34
34
|
f as PATH,
|
|
35
|
-
n as
|
|
36
|
-
W as PNPM_CLI,
|
|
35
|
+
n as PNPM_CLI,
|
|
37
36
|
d as PNPM_EXEC_CLI,
|
|
38
37
|
g as PNPM_LOCK_YAML,
|
|
39
38
|
k as PUBLIC_DIRECTORY,
|
|
40
39
|
x as SIMPLE_GIT_HOOKS_PACKAGE_NAME,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
40
|
+
W as SIMPLE_GIT_HOOK_CLI,
|
|
41
|
+
X as SIMPLE_GIT_HOOK_JSON,
|
|
42
|
+
b as TSCONFIG_JSON,
|
|
43
|
+
h as TSC_CLI,
|
|
44
|
+
j as TSC_PACKAGE_NAME,
|
|
45
|
+
l as TSX_CLI,
|
|
46
|
+
q as VITEST_CLI,
|
|
47
|
+
u as VITEST_PACKAGE_NAME,
|
|
48
|
+
v as WORKING_DIRECTORY,
|
|
49
|
+
w as command,
|
|
50
|
+
y as createGitHooksConfig
|
|
52
51
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var x=Object.defineProperty;var y=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var _=(i,s,e)=>s in i?x(i,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[s]=e,m=(i,s)=>{for(var e in s||(s={}))v.call(s,e)&&_(i,e,s[e]);if(y)for(var e of y(s))z.call(s,e)&&_(i,e,s[e]);return i};var g=(i,s,e)=>new Promise((t,a)=>{var n=r=>{try{l(e.next(r))}catch(c){a(c)}},o=r=>{try{l(e.throw(r))}catch(c){a(c)}},l=r=>r.done?t(r.value):Promise.resolve(r.value).then(n,o);l((e=e.apply(i,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../fs/fs.util.cjs");require("../../../path.constant-
|
|
1
|
+
"use strict";var x=Object.defineProperty;var y=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable;var _=(i,s,e)=>s in i?x(i,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[s]=e,m=(i,s)=>{for(var e in s||(s={}))v.call(s,e)&&_(i,e,s[e]);if(y)for(var e of y(s))z.call(s,e)&&_(i,e,s[e]);return i};var g=(i,s,e)=>new Promise((t,a)=>{var n=r=>{try{l(e.next(r))}catch(c){a(c)}},o=r=>{try{l(e.throw(r))}catch(c){a(c)}},l=r=>r.done?t(r.value):Promise.resolve(r.value).then(n,o);l((e=e.apply(i,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../fs/fs.util.cjs");require("../../../path.constant-CPGOAxEp.cjs");const T=require("../path/path.util.cjs"),d=require("./upload.type.cjs");function U(i){return g(this,null,function*(){return new Promise((s,e)=>{let t=0;i.on("data",a=>{t+=a.length}),i.on("end",()=>s(t)),i.on("error",e)})})}function L(i,s){const e=i.lastIndexOf(".");if(e===-1)return!1;const t=i.substring(e+1).toLowerCase();return s.includes(t)}function S(i,s,e){const{filename:t,fileSize:a}=i,n=s[e],{allowedExtensions:o,sizeLimit:l}=n;if(!L(t,o))return{isValid:!1,error:`File extension not allowed for ${e.toLowerCase()} files. Allowed extensions: ${o.join(", ")}`};if(a!==void 0&&a>l){const r=Math.round(l/1048576);return{isValid:!1,error:`File size exceeds limit for ${e.toLowerCase()} files. Maximum size: ${r}MB`}}return{isValid:!0}}function C(i){const s={[d.E_UploadType.IMAGE]:{allowedExtensions:["jpg","jpeg","png","gif","webp","svg"],sizeLimit:5242880},[d.E_UploadType.VIDEO]:{allowedExtensions:["mp4","avi","mov","wmv","flv","webm"],sizeLimit:524288e3},[d.E_UploadType.DOCUMENT]:{allowedExtensions:["pdf","doc","docx","txt","rtf"],sizeLimit:10485760},[d.E_UploadType.OTHER]:{allowedExtensions:["zip","rar","tar","gz"],sizeLimit:5242880}};return m(m({},s),i)}function h(i){return g(this,null,function*(){const{path:s,file:e,config:t,type:a}=i;if(!s||typeof s!="string")return{success:!1,message:"Invalid path provided",result:""};if(!e||typeof e!="object")return{success:!1,message:"Invalid file provided",result:""};if(t){const n=[d.E_UploadType.IMAGE,d.E_UploadType.VIDEO,d.E_UploadType.DOCUMENT,d.E_UploadType.OTHER];for(const o of n){if(!t[o]||!Array.isArray(t[o].allowedExtensions)||t[o].allowedExtensions.length===0)return{success:!1,message:`Invalid config for ${o.toLowerCase()} files`,result:""};if(typeof t[o].sizeLimit!="number"||t[o].sizeLimit<=0)return{success:!1,message:`Invalid size limit for ${o.toLowerCase()} files`,result:""}}}try{const n=yield(yield e).file,{filename:o,createReadStream:l}=n;if(t){const p=l(),f=yield U(p),w=S({filename:o,fileSize:f},t,a);if(!w.isValid)return{success:!1,message:w.error||"File validation failed",result:""}}const r=T.dirname(s);E.pathExistsSync(r)||E.mkdirSync(r,{recursive:!0});const c=l(),u=E.createWriteStream(s);return c.pipe(u),yield new Promise((p,f)=>{u.on("finish",()=>p()),u.on("error",f),c.on("error",f)}),{success:!0,message:"File uploaded successfully",result:s}}catch(n){return{success:!1,message:n instanceof Error?n.message:"File upload failed",result:""}}})}exports.createUploadConfig=C;exports.upload=h;
|
|
@@ -26,7 +26,7 @@ var g = (s, i, e) => new Promise((t, a) => {
|
|
|
26
26
|
l((e = e.apply(s, i)).next());
|
|
27
27
|
});
|
|
28
28
|
import { pathExistsSync as L, mkdirSync as C, createWriteStream as I } from "../fs/fs.util.js";
|
|
29
|
-
import "../../../path.constant-
|
|
29
|
+
import "../../../path.constant-DJq0jtD0.js";
|
|
30
30
|
import { dirname as S } from "../path/path.util.js";
|
|
31
31
|
import { E_UploadType as f } from "./upload.type.js";
|
|
32
32
|
function h(s) {
|