@cyberskill/shared 1.201.0 → 1.201.1

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.
Files changed (49) hide show
  1. package/dist/magic-string.es-D_iPNVbJ.cjs +10 -0
  2. package/dist/magic-string.es-cELbkQ5L.js +901 -0
  3. package/dist/{path.constant-Y6ImOuVK.cjs → path.constant-BT9ilH7U.cjs} +2 -2
  4. package/dist/{path.constant-CFKXX6cG.js → path.constant-C43rx8PK.js} +58 -59
  5. package/dist/src/config/vitest/vitest.unit.cjs +1 -1
  6. package/dist/src/config/vitest/vitest.unit.js +1 -1
  7. package/dist/src/config/vitest/vitest.unit.setup.cjs +1 -1
  8. package/dist/src/config/vitest/vitest.unit.setup.js +1 -1
  9. package/dist/src/node/cli/cli.util.cjs +1 -1
  10. package/dist/src/node/cli/cli.util.js +15 -15
  11. package/dist/src/node/command/command.util.cjs +1 -1
  12. package/dist/src/node/command/command.util.js +1 -1
  13. package/dist/src/node/command/index.cjs +1 -1
  14. package/dist/src/node/command/index.js +1 -1
  15. package/dist/src/node/mongo/mongo.util.cjs +1 -1
  16. package/dist/src/node/mongo/mongo.util.js +1 -1
  17. package/dist/src/node/package/index.cjs +1 -1
  18. package/dist/src/node/package/index.js +1 -1
  19. package/dist/src/node/package/package.util.cjs +1 -1
  20. package/dist/src/node/package/package.util.js +1 -1
  21. package/dist/src/node/path/index.cjs +1 -1
  22. package/dist/src/node/path/index.js +20 -21
  23. package/dist/src/node/path/path.constant.cjs +1 -1
  24. package/dist/src/node/path/path.constant.d.ts +0 -1
  25. package/dist/src/node/path/path.constant.js +25 -26
  26. package/dist/src/node/upload/upload.util.cjs +1 -1
  27. package/dist/src/node/upload/upload.util.js +1 -1
  28. package/dist/src/react/apollo-client/apollo-client.util.cjs +1 -1
  29. package/dist/src/react/apollo-client/apollo-client.util.js +29 -29
  30. package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.component.cjs +1 -0
  31. package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.component.d.ts +3 -0
  32. package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.component.js +20 -0
  33. package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.cjs +1 -0
  34. package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.d.ts +6 -0
  35. package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.js +6 -0
  36. package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.util.cjs +1 -0
  37. package/dist/src/react/apollo-client-nextjs/{apollo-client.util.d.ts → apollo-client-nextjs.util.d.ts} +1 -1
  38. package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.util.js +24 -0
  39. package/dist/src/react/apollo-client-nextjs/index.cjs +1 -1
  40. package/dist/src/react/apollo-client-nextjs/index.d.ts +2 -2
  41. package/dist/src/react/apollo-client-nextjs/index.js +4 -4
  42. package/package.json +7 -5
  43. package/dist/magic-string.es-CyLHbrL2.js +0 -871
  44. package/dist/magic-string.es-hjygV5wN.cjs +0 -10
  45. package/dist/src/react/apollo-client-nextjs/apollo-client.component.cjs +0 -1
  46. package/dist/src/react/apollo-client-nextjs/apollo-client.component.d.ts +0 -3
  47. package/dist/src/react/apollo-client-nextjs/apollo-client.component.js +0 -33
  48. package/dist/src/react/apollo-client-nextjs/apollo-client.util.cjs +0 -1
  49. 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 O } from "yargs/helpers";
21
- import R from "yargs/yargs";
22
- import { g as _, Y as l, a0 as s, J as i, O as G, C as f, R as q, H as o, X as T, $ as N, S as j, I as D } from "../../../path.constant-CFKXX6cG.js";
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 q, F as o, U as T, _ as N, S as j, H as D } from "../../../path.constant-C43rx8PK.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 A } from "../log/log.util.js";
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 F = "@cyberskill/shared", H = "module", U = "1.200.0", K = "CyberSkill Shared", J = "Stephen Cheng", Y = "MIT", $ = "https://github.com/cyberskill-world/shared#readme", V = { type: "git", url: "git+https://github.com/cyberskill-world/shared.git" }, W = { 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-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" } }, X = { cyberskill: "dist/src/node/cli/index.js" }, Q = ["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-ws": "6.0.5", i18next: "25.2.1", 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/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", playwright: "1.53.1", postcss: "8.5.6", "postcss-modules": "6.0.1", 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: F,
28
+ const A = "@cyberskill/shared", H = "module", U = "1.201.0", 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-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/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: J,
34
- license: Y,
35
- homepage: $,
36
- repository: V,
37
- bugs: W,
33
+ author: $,
34
+ license: J,
35
+ homepage: V,
36
+ repository: W,
37
+ bugs: Y,
38
38
  exports: z,
39
- bin: X,
40
- files: Q,
39
+ bin: Q,
40
+ files: X,
41
41
  scripts: Z,
42
42
  dependencies: ee,
43
43
  devDependencies: te,
@@ -152,7 +152,7 @@ ${j}
152
152
  }
153
153
  t(null, null, function* () {
154
154
  try {
155
- yield R(O(x.argv)).scriptName(_).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", {
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
- A(e), x.exit(1);
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-Y6ImOuVK.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;
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-BT9ilH7U.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 { Y as n, _ as l, X as C, Z as f, $ as E, a0 as L } from "../../../path.constant-CFKXX6cG.js";
7
+ import { X as n, Z as l, U as C, Y as f, _ as E, $ as L } from "../../../path.constant-C43rx8PK.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-Y6ImOuVK.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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./command.type.cjs"),r=require("../../../path.constant-BT9ilH7U.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 { Y as s, _ as e, X as t, Z as d, $ as n, a0 as C } from "../../../path.constant-CFKXX6cG.js";
2
+ import { X as s, Z as e, U as t, Y as d, _ as n, $ as C } from "../../../path.constant-C43rx8PK.js";
3
3
  export {
4
4
  o as E_CommandType,
5
5
  s as clearAllErrorLists,
@@ -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-Y6ImOuVK.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.
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-BT9ilH7U.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 { H as y, M as C } from "../../../path.constant-CFKXX6cG.js";
45
+ import { F as y, M as C } from "../../../path.constant-C43rx8PK.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-Y6ImOuVK.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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./package.type.cjs"),e=require("../../../path.constant-BT9ilH7U.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 { K as g, O as c, R as p, U as k, Q as o } from "../../../path.constant-CFKXX6cG.js";
2
+ import { J as g, K as c, Q as p, R as k, O as o } from "../../../path.constant-C43rx8PK.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-Y6ImOuVK.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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("node-fetch");require("../../config/env/env.util.cjs");const e=require("../../../path.constant-BT9ilH7U.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 { K as m, O as g, R as c, U as k, Q as n } from "../../../path.constant-CFKXX6cG.js";
3
+ import { J as m, K as g, Q as c, R as k, O as n } from "../../../path.constant-C43rx8PK.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-Y6ImOuVK.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.PLAYWRIGHT_PACKAGE_NAME=_.PLAYWRIGHT_PACKAGE_NAME;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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../../../path.constant-BT9ilH7U.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, n as C, m as A, l as a, g as s, h as N, f as T, C as L, i as O, y as G, x as M, E as P, s as S, e as K, d as R, G as D, o, L as e, F as r, M as Y, D as H, N as t, A as B, z as i, a as m, b as n, H as J, j as U, t as f, u as p, c as F, P as V, v as W, w as c, S as d, T as g, q as h, p as k, r as l, k as v, V as x, W as j, J as X, I as b } from "../../../path.constant-CFKXX6cG.js";
2
- import { dirname as u, join as w, path as y, resolve as z, resolveWorkingPath as Q } from "./path.util.js";
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-C43rx8PK.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
- A as COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME,
7
- a as COMMIT_LINT_PACKAGE_NAME,
8
- s as CYBERSKILL_CLI,
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
- G as ESLINT_INSPECT_CLI,
14
- M as ESLINT_INSPECT_PACKAGE_NAME,
15
- P as ESLINT_PACKAGE_NAME,
16
- S as GIT_CLI,
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
- J as PATH,
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
- V as PUBLIC_DIRECTORY,
36
- W as SIMPLE_GIT_HOOKS_PACKAGE_NAME,
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
- j as WORKING_DIRECTORY,
46
- X as command,
47
- b as createGitHooksConfig,
48
- u as dirname,
49
- w as join,
50
- y as path,
51
- z as resolve,
52
- Q as resolveWorkingPath
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-Y6ImOuVK.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.PLAYWRIGHT_PACKAGE_NAME=_.PLAYWRIGHT_PACKAGE_NAME;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;
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-BT9ilH7U.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, n as s, m as L, l as O, g as G, h as M, f as S, C as P, i as K, y as R, x as D, E as o, s as Y, e as m, d as r, G as t, o as H, L as i, F as p, M as B, D as J, N as U, A as e, z as F, a as V, b as c, H as f, j as n, t as W, u as d, c as g, P as k, v as x, w as X, S as b, T as h, q as j, p as l, r as q, k as u, V as v, W as w, J as y, I as z } from "../../../path.constant-CFKXX6cG.js";
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-C43rx8PK.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
- G as CYBERSKILL_CLI,
13
- M as CYBERSKILL_CLI_PATH,
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
- Y as GIT_CLI,
21
- m as GIT_COMMIT_EDITMSG,
22
- r as GIT_HOOK,
23
- t as GIT_IGNORE,
24
- H as LINT_STAGED_CLI,
25
- i as LINT_STAGED_PACKAGE_NAME,
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
- J as MIGRATE_MONGO_PACKAGE_NAME,
29
- U as NODE_MODULES,
30
- e as NODE_MODULES_INSPECT_CLI,
31
- F as NODE_MODULES_INSPECT_PACKAGE_NAME,
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 PLAYWRIGHT_PACKAGE_NAME,
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
- X as SIMPLE_GIT_HOOK_CLI,
42
- b as SIMPLE_GIT_HOOK_JSON,
43
- h as TSCONFIG_JSON,
44
- j as TSC_CLI,
45
- l as TSC_PACKAGE_NAME,
46
- q as TSX_CLI,
47
- u as VITEST_CLI,
48
- v as VITEST_PACKAGE_NAME,
49
- w as WORKING_DIRECTORY,
50
- y as command,
51
- z as createGitHooksConfig
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-Y6ImOuVK.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;
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-BT9ilH7U.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-CFKXX6cG.js";
29
+ import "../../../path.constant-C43rx8PK.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) {
@@ -1 +1 @@
1
- "use strict";var N=Object.defineProperty;var w=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var d=(t,e,n)=>e in t?N(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,T=(t,e)=>{for(var n in e||(e={}))R.call(e,n)&&d(t,n,e[n]);if(w)for(var n of w(e))G.call(e,n)&&d(t,n,e[n]);return t};var U=(t,e,n)=>d(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("@apollo/client/core/core.cjs"),m=require("@apollo/client/link/core/core.cjs"),P=require("@apollo/client/link/error/error.cjs"),S=require("@apollo/client/link/http/http.cjs"),H=require("@apollo/client/link/remove-typename/remove-typename.cjs"),I=require("@apollo/client/link/subscriptions/subscriptions.cjs"),x=require("@apollo/client/utilities/utilities.cjs"),F=require("graphql-ws"),q=require("react");require("../apollo-error/apollo-error.context.cjs");const M=require("../apollo-error/apollo-error.util.cjs"),c=require("../log/log.util.cjs"),h=require("react-hot-toast"),C=require("./apollo-client.constant.cjs");class D extends m.ApolloLink{constructor(){super(...arguments);U(this,"count",0)}request(n,r){const g=Date.now();return this.count+=1,r(n).map(_=>{const p=Date.now()-g,a=n.operationName||"Unnamed";return c.log.info(`[Apollo] #${this.count}: ${a} (${p}ms)`),_})}}function j(t){const{uri:e,wsUrl:n,customLinks:r}=t,g=new D,_=P.onError(({graphQLErrors:o,networkError:i,protocolErrors:s,operation:f})=>{var b,y;const v=(f==null?void 0:f.operationName)||"Unknown";if(o&&o.forEach(({message:l,locations:u,path:L})=>{c.log.error(`[GraphQL error] ${v}: ${l}, Location: ${JSON.stringify(u,null,4)}, Path: ${L}`)}),s&&s.forEach(({message:l,extensions:u})=>{c.log.error(`[Protocol error]: ${l}, Extensions: ${JSON.stringify(u,null,4)}`)}),i&&c.log.error(`[Network error]: ${i}`),o||s||i){const l=((b=o==null?void 0:o[0])==null?void 0:b.message)||((y=s==null?void 0:s[0])==null?void 0:y.message)||(i==null?void 0:i.message)||"Unexpected error",u=new k.ApolloError({graphQLErrors:o||[],protocolErrors:s||[],clientErrors:[],networkError:i||null,errorMessage:l,extraInfo:{operation:f}});h.toast.error(L=>q.createElement(q.Fragment,null,l," ",q.createElement("button",{type:"button",onClick:()=>{setTimeout(()=>{M.showGlobalApolloError(u)},0),h.toast.dismiss(L.id)}},"Show Details")))}}),p=H.removeTypenameFromVariables();e||c.log.warn(`[Apollo] No GraphQL URI provided — using "${C.GRAPHQL_URI_DEFAULT}" as default`);const a=new S.HttpLink({uri:e!=null?e:C.GRAPHQL_URI_DEFAULT,credentials:"include"}),A=n?new I.GraphQLWsLink(F.createClient({url:n})):m.ApolloLink.empty(),$=A instanceof m.ApolloLink?m.split(({query:o})=>{const i=x.getMainDefinition(o);return i.kind==="OperationDefinition"&&i.operation==="subscription"},A,a):a;return $===a&&n&&c.log.warn("[Apollo] WS URL is set, but subscriptions fallback to HTTP. Check your wsLink config."),[g,_,p,...r!=null?r:[],$]}function O(t={}){const e=m.from(j(t));return new k.ApolloClient(T({link:e,cache:new k.InMemoryCache},t))}exports.DevLoggerLink=D;exports.createApolloLinks=j;exports.getClient=O;
1
+ "use strict";var N=Object.defineProperty;var h=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var d=(t,e,n)=>e in t?N(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,w=(t,e)=>{for(var n in e||(e={}))R.call(e,n)&&d(t,n,e[n]);if(h)for(var n of h(e))x.call(e,n)&&d(t,n,e[n]);return t};var T=(t,e,n)=>d(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("@apollo/client/core/core.cjs"),m=require("@apollo/client/link/core/core.cjs"),G=require("@apollo/client/link/error/error.cjs"),P=require("@apollo/client/link/http/http.cjs"),S=require("@apollo/client/link/remove-typename/remove-typename.cjs"),H=require("@apollo/client/link/subscriptions/subscriptions.cjs"),I=require("@apollo/client/utilities/utilities.cjs"),F=require("graphql-ws"),k=require("react"),M=require("../apollo-error/apollo-error.util.cjs"),c=require("../log/log.util.cjs"),U=require("react-hot-toast"),v=require("./apollo-client.constant.cjs");class C extends m.ApolloLink{constructor(){super(...arguments);T(this,"count",0)}request(n,r){const g=Date.now();return this.count+=1,r(n).map(_=>{const p=Date.now()-g,a=n.operationName||"Unnamed";return c.log.info(`[Apollo] #${this.count}: ${a} (${p}ms)`),_})}}function D(t){const{uri:e,wsUrl:n,customLinks:r}=t,g=new C,_=G.onError(({graphQLErrors:o,networkError:i,protocolErrors:s,operation:f})=>{var $,y;const j=(f==null?void 0:f.operationName)||"Unknown";if(o&&o.forEach(({message:l,locations:u,path:L})=>{c.log.error(`[GraphQL error] ${j}: ${l}, Location: ${JSON.stringify(u,null,4)}, Path: ${L}`)}),s&&s.forEach(({message:l,extensions:u})=>{c.log.error(`[Protocol error]: ${l}, Extensions: ${JSON.stringify(u,null,4)}`)}),i&&c.log.error(`[Network error]: ${i}`),o||s||i){const l=(($=o==null?void 0:o[0])==null?void 0:$.message)||((y=s==null?void 0:s[0])==null?void 0:y.message)||(i==null?void 0:i.message)||"Unexpected error",u=new q.ApolloError({graphQLErrors:o||[],protocolErrors:s||[],clientErrors:[],networkError:i||null,errorMessage:l,extraInfo:{operation:f}});U.toast.error(L=>k.createElement(k.Fragment,null,l," ",k.createElement("button",{type:"button",className:"text-blue-500 hover:text-blue-700",onClick:()=>{setTimeout(()=>{M.showGlobalApolloError(u)},0),U.toast.dismiss(L.id)}},"Show Details")))}}),p=S.removeTypenameFromVariables();e||c.log.warn(`[Apollo] No GraphQL URI provided — using "${v.GRAPHQL_URI_DEFAULT}" as default`);const a=new P.HttpLink({uri:e!=null?e:v.GRAPHQL_URI_DEFAULT,credentials:"include"}),A=n?new H.GraphQLWsLink(F.createClient({url:n})):m.ApolloLink.empty(),b=A instanceof m.ApolloLink?m.split(({query:o})=>{const i=I.getMainDefinition(o);return i.kind==="OperationDefinition"&&i.operation==="subscription"},A,a):a;return b===a&&n&&c.log.warn("[Apollo] WS URL is set, but subscriptions fallback to HTTP. Check your wsLink config."),[g,_,p,...r!=null?r:[],b]}function O(t={}){const e=m.from(D(t));return new q.ApolloClient(w({link:e,cache:new q.InMemoryCache},t))}exports.DevLoggerLink=C;exports.createApolloLinks=D;exports.getClient=O;
@@ -1,17 +1,17 @@
1
- var v = Object.defineProperty;
2
- var U = Object.getOwnPropertySymbols;
3
- var x = Object.prototype.hasOwnProperty, G = Object.prototype.propertyIsEnumerable;
4
- var k = (t, e, n) => e in t ? v(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, h = (t, e) => {
1
+ var C = Object.defineProperty;
2
+ var y = Object.getOwnPropertySymbols;
3
+ var T = Object.prototype.hasOwnProperty, G = Object.prototype.propertyIsEnumerable;
4
+ var k = (t, e, n) => e in t ? C(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, N = (t, e) => {
5
5
  for (var n in e || (e = {}))
6
- x.call(e, n) && k(t, n, e[n]);
7
- if (U)
8
- for (var n of U(e))
6
+ T.call(e, n) && k(t, n, e[n]);
7
+ if (y)
8
+ for (var n of y(e))
9
9
  G.call(e, n) && k(t, n, e[n]);
10
10
  return t;
11
11
  };
12
- var D = (t, e, n) => k(t, typeof e != "symbol" ? e + "" : e, n);
12
+ var U = (t, e, n) => k(t, typeof e != "symbol" ? e + "" : e, n);
13
13
  import { ApolloError as R, ApolloClient as I, InMemoryCache as P } from "@apollo/client/core/core.cjs";
14
- import { ApolloLink as g, split as S, from as _ } from "@apollo/client/link/core/core.cjs";
14
+ import { ApolloLink as b, split as S, from as _ } from "@apollo/client/link/core/core.cjs";
15
15
  import { onError as F } from "@apollo/client/link/error/error.cjs";
16
16
  import { HttpLink as H } from "@apollo/client/link/http/http.cjs";
17
17
  import { removeTypenameFromVariables as M } from "@apollo/client/link/remove-typename/remove-typename.cjs";
@@ -19,15 +19,14 @@ import { GraphQLWsLink as O } from "@apollo/client/link/subscriptions/subscripti
19
19
  import { getMainDefinition as J } from "@apollo/client/utilities/utilities.cjs";
20
20
  import { createClient as W } from "graphql-ws";
21
21
  import $ from "react";
22
- import "../apollo-error/apollo-error.context.js";
23
22
  import { showGlobalApolloError as q } from "../apollo-error/apollo-error.util.js";
24
23
  import { log as l } from "../log/log.util.js";
25
- import { toast as N } from "react-hot-toast";
26
- import { GRAPHQL_URI_DEFAULT as C } from "./apollo-client.constant.js";
27
- class V extends g {
24
+ import { toast as x } from "react-hot-toast";
25
+ import { GRAPHQL_URI_DEFAULT as D } from "./apollo-client.constant.js";
26
+ class V extends b {
28
27
  constructor() {
29
28
  super(...arguments);
30
- D(this, "count", 0);
29
+ U(this, "count", 0);
31
30
  }
32
31
  request(n, a) {
33
32
  const u = Date.now();
@@ -39,18 +38,18 @@ class V extends g {
39
38
  }
40
39
  function j(t) {
41
40
  const { uri: e, wsUrl: n, customLinks: a } = t, u = new V(), p = F(({ graphQLErrors: o, networkError: i, protocolErrors: m, operation: r }) => {
42
- var b, y;
43
- const T = (r == null ? void 0 : r.operationName) || "Unknown";
41
+ var A, h;
42
+ const v = (r == null ? void 0 : r.operationName) || "Unknown";
44
43
  if (o && o.forEach(({ message: s, locations: f, path: L }) => {
45
44
  l.error(
46
- `[GraphQL error] ${T}: ${s}, Location: ${JSON.stringify(f, null, 4)}, Path: ${L}`
45
+ `[GraphQL error] ${v}: ${s}, Location: ${JSON.stringify(f, null, 4)}, Path: ${L}`
47
46
  );
48
47
  }), m && m.forEach(({ message: s, extensions: f }) => {
49
48
  l.error(
50
49
  `[Protocol error]: ${s}, Extensions: ${JSON.stringify(f, null, 4)}`
51
50
  );
52
51
  }), i && l.error(`[Network error]: ${i}`), o || m || i) {
53
- const s = ((b = o == null ? void 0 : o[0]) == null ? void 0 : b.message) || ((y = m == null ? void 0 : m[0]) == null ? void 0 : y.message) || (i == null ? void 0 : i.message) || "Unexpected error", f = new R({
52
+ const s = ((A = o == null ? void 0 : o[0]) == null ? void 0 : A.message) || ((h = m == null ? void 0 : m[0]) == null ? void 0 : h.message) || (i == null ? void 0 : i.message) || "Unexpected error", f = new R({
54
53
  graphQLErrors: o || [],
55
54
  protocolErrors: m || [],
56
55
  clientErrors: [],
@@ -60,33 +59,34 @@ function j(t) {
60
59
  operation: r
61
60
  }
62
61
  });
63
- N.error((L) => /* @__PURE__ */ $.createElement($.Fragment, null, s, " ", /* @__PURE__ */ $.createElement(
62
+ x.error((L) => /* @__PURE__ */ $.createElement($.Fragment, null, s, " ", /* @__PURE__ */ $.createElement(
64
63
  "button",
65
64
  {
66
65
  type: "button",
66
+ className: "text-blue-500 hover:text-blue-700",
67
67
  onClick: () => {
68
68
  setTimeout(() => {
69
69
  q(f);
70
- }, 0), N.dismiss(L.id);
70
+ }, 0), x.dismiss(L.id);
71
71
  }
72
72
  },
73
73
  "Show Details"
74
74
  )));
75
75
  }
76
76
  }), d = M();
77
- e || l.warn(`[Apollo] No GraphQL URI provided — using "${C}" as default`);
77
+ e || l.warn(`[Apollo] No GraphQL URI provided — using "${D}" as default`);
78
78
  const c = new H({
79
- uri: e != null ? e : C,
79
+ uri: e != null ? e : D,
80
80
  credentials: "include"
81
- }), w = n ? new O(W({ url: n })) : g.empty(), A = w instanceof g ? S(
81
+ }), g = n ? new O(W({ url: n })) : b.empty(), w = g instanceof b ? S(
82
82
  ({ query: o }) => {
83
83
  const i = J(o);
84
84
  return i.kind === "OperationDefinition" && i.operation === "subscription";
85
85
  },
86
- w,
86
+ g,
87
87
  c
88
88
  ) : c;
89
- return A === c && n && l.warn("[Apollo] WS URL is set, but subscriptions fallback to HTTP. Check your wsLink config."), [
89
+ return w === c && n && l.warn("[Apollo] WS URL is set, but subscriptions fallback to HTTP. Check your wsLink config."), [
90
90
  u,
91
91
  // 🪵 custom logger
92
92
  p,
@@ -95,13 +95,13 @@ function j(t) {
95
95
  // 🧼 cleans up __typename
96
96
  ...a != null ? a : [],
97
97
  // 🔗 custom links
98
- A
98
+ w
99
99
  // 📡 HTTP vs WS routing
100
100
  ];
101
101
  }
102
- function le(t = {}) {
102
+ function se(t = {}) {
103
103
  const e = _(j(t));
104
- return new I(h({
104
+ return new I(N({
105
105
  link: e,
106
106
  cache: new P()
107
107
  }, t));
@@ -109,5 +109,5 @@ function le(t = {}) {
109
109
  export {
110
110
  V as DevLoggerLink,
111
111
  j as createApolloLinks,
112
- le as getClient
112
+ se as getClient
113
113
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@apollo/client-integration-nextjs"),e=require("react"),n=require("../apollo-error/apollo-error.component.cjs");require("../apollo-error/apollo-error.context.cjs");const c=require("../apollo-error/apollo-error.provider.cjs"),i=require("react-hot-toast"),a=require("./apollo-client-nextjs.util.cjs");function p({options:r,children:o}){const t=e.useMemo(()=>()=>a.getClient(r||{}),[r]);return e.createElement(e.Fragment,null,e.createElement(c.ApolloErrorProvider,null,e.createElement(l.ApolloNextAppProvider,{makeClient:t},o),e.createElement(n.ApolloErrorComponent,null)),e.createElement(i.Toaster,{position:"top-right"}))}exports.ApolloProvider=p;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ import { I_ApolloProviderProps } from '../apollo-client/index.js';
3
+ export declare function ApolloProvider({ options, children, }: I_ApolloProviderProps): React.JSX.Element;