@cyberskill/shared 1.208.0 → 1.209.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.
Files changed (202) hide show
  1. package/dist/config-CwzVfkkX.js +6 -0
  2. package/dist/index-BG1UznTl.js +628 -0
  3. package/dist/{magic-string.es-C6Zk6wMx.js → magic-string.es-BQ9KnLz-.js} +105 -117
  4. package/dist/src/config/config.type.d.ts +1 -1
  5. package/dist/src/config/config.util.d.ts +1 -1
  6. package/dist/src/config/config.util.js +48 -7
  7. package/dist/src/config/env/env.util.js +10 -10
  8. package/dist/src/config/eslint/index.js +4 -15
  9. package/dist/src/config/graphql-codegen/graphql-codegen.util.js +30 -39
  10. package/dist/src/config/index.js +1 -1
  11. package/dist/src/config/vitest/vitest.e2e.js +9 -19
  12. package/dist/src/config/vitest/vitest.unit.js +11 -22
  13. package/dist/src/config/vitest/vitest.unit.setup.js +9339 -9868
  14. package/dist/src/constant/common.js +1 -1
  15. package/dist/src/node/apollo-server/apollo-server.util.js +23 -54
  16. package/dist/src/node/cli/index.d.ts +2 -1
  17. package/dist/src/node/cli/index.js +108 -1
  18. package/dist/src/node/command/command.util.js +9 -10
  19. package/dist/src/node/command/index.js +1 -1
  20. package/dist/src/node/express/express.util.js +39 -77
  21. package/dist/src/node/express/index.js +9 -9
  22. package/dist/src/node/fs/fs.util.js +40 -59
  23. package/dist/src/node/log/index.js +6 -6
  24. package/dist/src/node/log/log.util.js +32 -33
  25. package/dist/src/node/mongo/mongo.util.js +381 -457
  26. package/dist/src/node/package/index.js +3 -3
  27. package/dist/src/node/package/package.util.js +2 -2
  28. package/dist/src/node/path/index.js +30 -30
  29. package/dist/src/node/path/path.constant.js +30 -30
  30. package/dist/src/node/storage/storage.util.js +40 -70
  31. package/dist/src/node/upload/index.js +1 -1
  32. package/dist/src/node/upload/upload.util.js +125 -6
  33. package/dist/src/react/apollo-client/apollo-client.component.js +15 -13
  34. package/dist/src/react/apollo-client/apollo-client.type.d.ts +1 -1
  35. package/dist/src/react/apollo-client/apollo-client.util.js +66 -81
  36. package/dist/src/react/apollo-client/index.js +25 -26
  37. package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.component.js +7 -8
  38. package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.util.js +11 -21
  39. package/dist/src/react/apollo-error/apollo-error.component.js +7 -7
  40. package/dist/src/react/apollo-error/apollo-error.util.js +7 -7
  41. package/dist/src/react/loading/loading.component.js +24 -45
  42. package/dist/src/react/loading/loading.provider.d.ts +1 -1
  43. package/dist/src/react/log/log.util.js +9 -9
  44. package/dist/src/react/next-intl/next-intl.hoc.d.ts +1 -1
  45. package/dist/src/react/next-intl/next-intl.hoc.js +17 -29
  46. package/dist/src/react/next-intl/next-intl.provider.js +18 -19
  47. package/dist/src/react/next-intl/next-intl.type.d.ts +1 -1
  48. package/dist/src/react/storage/storage.hook.js +37 -53
  49. package/dist/src/react/storage/storage.util.js +25 -50
  50. package/dist/src/react/userback/userback.component.js +16 -43
  51. package/dist/src/typescript/index.d.ts +2 -2
  52. package/dist/src/typescript/index.js +2 -2
  53. package/dist/src/typescript/style.d.js +1 -1
  54. package/dist/src/util/common/common.util.js +14 -25
  55. package/dist/src/util/object/object.util.d.ts +1 -1
  56. package/dist/src/util/object/object.util.js +39 -49
  57. package/dist/src/util/string/string.util.js +40 -53
  58. package/dist/style.css +1 -1
  59. package/package.json +43 -76
  60. package/dist/config-B7WSlzSh.js +0 -8
  61. package/dist/config-DDQ9k8fw.cjs +0 -1
  62. package/dist/config.util-Ci2CZDut.cjs +0 -1
  63. package/dist/config.util-DKBwEBKR.js +0 -61
  64. package/dist/favicon/android-icon-144x144.png +0 -0
  65. package/dist/favicon/android-icon-192x192.png +0 -0
  66. package/dist/favicon/android-icon-36x36.png +0 -0
  67. package/dist/favicon/android-icon-48x48.png +0 -0
  68. package/dist/favicon/android-icon-72x72.png +0 -0
  69. package/dist/favicon/android-icon-96x96.png +0 -0
  70. package/dist/favicon/apple-icon-114x114.png +0 -0
  71. package/dist/favicon/apple-icon-120x120.png +0 -0
  72. package/dist/favicon/apple-icon-144x144.png +0 -0
  73. package/dist/favicon/apple-icon-152x152.png +0 -0
  74. package/dist/favicon/apple-icon-180x180.png +0 -0
  75. package/dist/favicon/apple-icon-57x57.png +0 -0
  76. package/dist/favicon/apple-icon-60x60.png +0 -0
  77. package/dist/favicon/apple-icon-72x72.png +0 -0
  78. package/dist/favicon/apple-icon-76x76.png +0 -0
  79. package/dist/favicon/apple-icon-precomposed.png +0 -0
  80. package/dist/favicon/apple-icon.png +0 -0
  81. package/dist/favicon/browserconfig.xml +0 -2
  82. package/dist/favicon/favicon-16x16.png +0 -0
  83. package/dist/favicon/favicon-32x32.png +0 -0
  84. package/dist/favicon/favicon-96x96.png +0 -0
  85. package/dist/favicon/favicon.ico +0 -0
  86. package/dist/favicon/manifest.json +0 -41
  87. package/dist/favicon/ms-icon-144x144.png +0 -0
  88. package/dist/favicon/ms-icon-150x150.png +0 -0
  89. package/dist/favicon/ms-icon-310x310.png +0 -0
  90. package/dist/favicon/ms-icon-70x70.png +0 -0
  91. package/dist/log.type-CMvG6Box.cjs +0 -1
  92. package/dist/log.type-DTOvZHyz.js +0 -4
  93. package/dist/magic-string.es-CjWtD8Pa.cjs +0 -10
  94. package/dist/path.constant-CWtb99gS.cjs +0 -2
  95. package/dist/path.constant-CvSr0Rrx.js +0 -682
  96. package/dist/src/config/commitlint/index.cjs +0 -1
  97. package/dist/src/config/config.util.cjs +0 -1
  98. package/dist/src/config/env/env.constant.cjs +0 -1
  99. package/dist/src/config/env/env.d.cjs +0 -1
  100. package/dist/src/config/env/env.d.js +0 -1
  101. package/dist/src/config/env/env.util.cjs +0 -1
  102. package/dist/src/config/env/index.cjs +0 -1
  103. package/dist/src/config/eslint/index.cjs +0 -1
  104. package/dist/src/config/graphql-codegen/graphql-codegen.util.cjs +0 -1
  105. package/dist/src/config/graphql-codegen/index.cjs +0 -1
  106. package/dist/src/config/index.cjs +0 -1
  107. package/dist/src/config/lint-staged/index.cjs +0 -1
  108. package/dist/src/config/vitest/index.cjs +0 -1
  109. package/dist/src/config/vitest/vitest.e2e.cjs +0 -1
  110. package/dist/src/config/vitest/vitest.unit.cjs +0 -1
  111. package/dist/src/config/vitest/vitest.unit.setup.cjs +0 -508
  112. package/dist/src/constant/common.cjs +0 -1
  113. package/dist/src/constant/index.cjs +0 -1
  114. package/dist/src/constant/response-status.cjs +0 -1
  115. package/dist/src/node/apollo-server/apollo-server.util.cjs +0 -1
  116. package/dist/src/node/apollo-server/index.cjs +0 -1
  117. package/dist/src/node/cli/cli.util.cjs +0 -6
  118. package/dist/src/node/cli/cli.util.d.ts +0 -2
  119. package/dist/src/node/cli/cli.util.js +0 -171
  120. package/dist/src/node/cli/index.cjs +0 -1
  121. package/dist/src/node/command/command.util.cjs +0 -1
  122. package/dist/src/node/command/index.cjs +0 -1
  123. package/dist/src/node/express/express.util.cjs +0 -1
  124. package/dist/src/node/express/index.cjs +0 -1
  125. package/dist/src/node/fs/fs.util.cjs +0 -1
  126. package/dist/src/node/fs/index.cjs +0 -1
  127. package/dist/src/node/log/index.cjs +0 -1
  128. package/dist/src/node/log/log.util.cjs +0 -1
  129. package/dist/src/node/mongo/index.cjs +0 -1
  130. package/dist/src/node/mongo/mongo.constant.cjs +0 -1
  131. package/dist/src/node/mongo/mongo.util.cjs +0 -5
  132. package/dist/src/node/package/index.cjs +0 -1
  133. package/dist/src/node/package/package.util.cjs +0 -1
  134. package/dist/src/node/path/index.cjs +0 -1
  135. package/dist/src/node/path/path.constant.cjs +0 -1
  136. package/dist/src/node/path/path.util.cjs +0 -1
  137. package/dist/src/node/storage/index.cjs +0 -1
  138. package/dist/src/node/storage/storage.util.cjs +0 -1
  139. package/dist/src/node/upload/index.cjs +0 -1
  140. package/dist/src/node/upload/upload.util.cjs +0 -1
  141. package/dist/src/node/ws/index.cjs +0 -1
  142. package/dist/src/node/ws/ts.util.cjs +0 -1
  143. package/dist/src/react/apollo-client/apollo-client.component.cjs +0 -1
  144. package/dist/src/react/apollo-client/apollo-client.constant.cjs +0 -1
  145. package/dist/src/react/apollo-client/apollo-client.context.cjs +0 -1
  146. package/dist/src/react/apollo-client/apollo-client.hook.cjs +0 -1
  147. package/dist/src/react/apollo-client/apollo-client.util.cjs +0 -1
  148. package/dist/src/react/apollo-client/index.cjs +0 -1
  149. package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.component.cjs +0 -1
  150. package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.rsc.cjs +0 -1
  151. package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.util.cjs +0 -1
  152. package/dist/src/react/apollo-client-nextjs/index.cjs +0 -1
  153. package/dist/src/react/apollo-error/apollo-error.component.cjs +0 -1
  154. package/dist/src/react/apollo-error/apollo-error.context.cjs +0 -1
  155. package/dist/src/react/apollo-error/apollo-error.hook.cjs +0 -1
  156. package/dist/src/react/apollo-error/apollo-error.provider.cjs +0 -1
  157. package/dist/src/react/apollo-error/apollo-error.util.cjs +0 -1
  158. package/dist/src/react/apollo-error/index.cjs +0 -1
  159. package/dist/src/react/i18next/i18next.hook.cjs +0 -1
  160. package/dist/src/react/i18next/i18next.util.cjs +0 -1
  161. package/dist/src/react/i18next/index.cjs +0 -1
  162. package/dist/src/react/loading/index.cjs +0 -1
  163. package/dist/src/react/loading/loading.component.cjs +0 -6
  164. package/dist/src/react/loading/loading.context.cjs +0 -1
  165. package/dist/src/react/loading/loading.hook.cjs +0 -1
  166. package/dist/src/react/loading/loading.provider.cjs +0 -1
  167. package/dist/src/react/log/index.cjs +0 -1
  168. package/dist/src/react/log/log.util.cjs +0 -1
  169. package/dist/src/react/next-intl/index.cjs +0 -1
  170. package/dist/src/react/next-intl/next-intl.constant.cjs +0 -1
  171. package/dist/src/react/next-intl/next-intl.context.cjs +0 -1
  172. package/dist/src/react/next-intl/next-intl.hoc.cjs +0 -1
  173. package/dist/src/react/next-intl/next-intl.hook.cjs +0 -1
  174. package/dist/src/react/next-intl/next-intl.provider.cjs +0 -1
  175. package/dist/src/react/storage/index.cjs +0 -1
  176. package/dist/src/react/storage/storage.hook.cjs +0 -1
  177. package/dist/src/react/storage/storage.util.cjs +0 -1
  178. package/dist/src/react/toast/index.cjs +0 -1
  179. package/dist/src/react/userback/index.cjs +0 -1
  180. package/dist/src/react/userback/userback.component.cjs +0 -1
  181. package/dist/src/typescript/common.cjs +0 -1
  182. package/dist/src/typescript/common.js +0 -4
  183. package/dist/src/typescript/index.cjs +0 -1
  184. package/dist/src/typescript/react.cjs +0 -1
  185. package/dist/src/typescript/react.js +0 -1
  186. package/dist/src/typescript/style.d.cjs +0 -1
  187. package/dist/src/util/common/common.util.cjs +0 -1
  188. package/dist/src/util/common/index.cjs +0 -1
  189. package/dist/src/util/index.cjs +0 -1
  190. package/dist/src/util/object/index.cjs +0 -1
  191. package/dist/src/util/object/object.util.cjs +0 -1
  192. package/dist/src/util/serializer/index.cjs +0 -1
  193. package/dist/src/util/serializer/serializer.util.cjs +0 -1
  194. package/dist/src/util/string/index.cjs +0 -1
  195. package/dist/src/util/string/string.util.cjs +0 -1
  196. package/dist/src/util/validate/index.cjs +0 -1
  197. package/dist/src/util/validate/validate.util.cjs +0 -1
  198. package/dist/tsconfig.base.json +0 -37
  199. package/dist/upload.util-CE3MjBdh.cjs +0 -1
  200. package/dist/upload.util-D4aUdmPo.js +0 -160
  201. /package/dist/src/typescript/{common.d.ts → common.type.d.ts} +0 -0
  202. /package/dist/src/typescript/{react.d.ts → react.type.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- const e = typeof window != "undefined";
1
+ const e = typeof window < "u";
2
2
  export {
3
3
  e as IS_BROWSER
4
4
  };
@@ -1,62 +1,31 @@
1
- var f = Object.defineProperty;
2
- var S = Object.getOwnPropertySymbols;
3
- var g = Object.prototype.hasOwnProperty, p = Object.prototype.propertyIsEnumerable;
4
- var c = (r, l, e) => l in r ? f(r, l, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[l] = e, u = (r, l) => {
5
- for (var e in l || (l = {}))
6
- g.call(l, e) && c(r, e, l[e]);
7
- if (S)
8
- for (var e of S(l))
9
- p.call(l, e) && c(r, e, l[e]);
10
- return r;
11
- };
12
- var t = (r, l, e) => new Promise((n, v) => {
13
- var d = (a) => {
14
- try {
15
- o(e.next(a));
16
- } catch (i) {
17
- v(i);
18
- }
19
- }, m = (a) => {
20
- try {
21
- o(e.throw(a));
22
- } catch (i) {
23
- v(i);
24
- }
25
- }, o = (a) => a.done ? n(a.value) : Promise.resolve(a.value).then(d, m);
26
- o((e = e.apply(r, l)).next());
27
- });
28
- import { ApolloServer as s } from "@apollo/server";
29
- import { expressMiddleware as M } from "@apollo/server/express4";
30
- import { ApolloServerPluginDrainHttpServer as A } from "@apollo/server/plugin/drainHttpServer";
31
- import { ApolloServerPluginLandingPageLocalDefault as P, ApolloServerPluginLandingPageProductionDefault as D } from "@apollo/server/plugin/landingPage/default";
32
- import { log as h } from "../log/log.util.js";
33
- function E(r) {
34
- return new s(u({
1
+ import { ApolloServer as e } from "@apollo/server";
2
+ import { expressMiddleware as d } from "@apollo/server/express4";
3
+ import { ApolloServerPluginDrainHttpServer as l } from "@apollo/server/plugin/drainHttpServer";
4
+ import { ApolloServerPluginLandingPageLocalDefault as o, ApolloServerPluginLandingPageProductionDefault as a } from "@apollo/server/plugin/landingPage/default";
5
+ import { log as n } from "../log/log.util.js";
6
+ function c(r) {
7
+ return new e({
35
8
  schema: r.schema,
36
9
  plugins: [
37
- r.isDev ? P() : D(),
38
- A({ httpServer: r.server }),
10
+ r.isDev ? o() : a(),
11
+ l({ httpServer: r.server }),
39
12
  ...r.drainServer ? [{
40
- serverWillStart() {
41
- return t(this, null, function* () {
42
- return {
43
- drainServer() {
44
- return t(this, null, function* () {
45
- var n;
46
- (n = r.drainServer) == null || n.call(r), h.info("Apollo Server drainServer hook called");
47
- });
48
- }
49
- };
50
- });
13
+ async serverWillStart() {
14
+ return {
15
+ async drainServer() {
16
+ r.drainServer?.(), n.info("Apollo Server drainServer hook called");
17
+ }
18
+ };
51
19
  }
52
20
  }] : []
53
- ]
54
- }, r.isDev && {
55
- introspection: !0,
56
- includeStacktraceInErrorResponses: !0
57
- }));
21
+ ],
22
+ ...r.isDev && {
23
+ introspection: !0,
24
+ includeStacktraceInErrorResponses: !0
25
+ }
26
+ });
58
27
  }
59
28
  export {
60
- E as createApolloServer,
61
- M as expressMiddleware
29
+ c as createApolloServer,
30
+ d as expressMiddleware
62
31
  };
@@ -1 +1,2 @@
1
- export * from './cli.util.js';
1
+ #!/usr/bin/env node
2
+ export {};
@@ -1 +1,108 @@
1
- import "./cli.util.js";
1
+ #!/usr/bin/env node
2
+ import g from "node:process";
3
+ import { hideBin as C } from "yargs/helpers";
4
+ import L from "yargs/yargs";
5
+ import { C as M, c as r, r as t, a as i, g as _, b as l, i as f, P as e, d as O, e as R, S as p, f as G } from "../../../index-BG1UznTl.js";
6
+ import { removeSync as y, readFileSync as E, pathExistsSync as h, writeFileSync as u, appendFileSync as N } from "../fs/fs.util.js";
7
+ import { resolve as P } from "../path/path.util.js";
8
+ import { log as s, catchError as T } from "../log/log.util.js";
9
+ import { E_IssueType as d } from "../log/index.js";
10
+ function D() {
11
+ try {
12
+ return JSON.parse(
13
+ E(P(__dirname, "../../../package.json"), "utf-8")
14
+ ).version;
15
+ } catch {
16
+ return "1.0.0";
17
+ }
18
+ }
19
+ async function S() {
20
+ h(e.TS_CONFIG) ? await t("Performing TypeScript validation", await i.typescriptCheck()) : s.warn("No TypeScript configuration found. Skipping type check.");
21
+ }
22
+ async function k(n = !1) {
23
+ n ? await t("Running ESLint with auto-fix", await i.eslintFix()) : await t("Running ESLint check", await i.eslintCheck());
24
+ }
25
+ function w(n, a) {
26
+ if (!a.length)
27
+ return;
28
+ const o = n === "Errors" ? "red" : "yellow";
29
+ s.printBoxedLog(n === "Errors" ? "✖ Errors" : "⚠ Warnings", a, o);
30
+ }
31
+ async function c() {
32
+ setTimeout(async () => {
33
+ const n = await O(), a = n.filter((m) => m.type === d.Error), o = n.filter((m) => m.type === d.Warning);
34
+ !a.length && !o.length ? s.printBoxedLog("✔ NO ISSUES FOUND", [], "green") : (w("Warnings", o), w("Errors", a), a.length > 0 && g.exit(1));
35
+ }, 0);
36
+ }
37
+ async function v() {
38
+ await r();
39
+ const n = await _({ name: l });
40
+ if (!n.success) {
41
+ s.error("Failed to retrieve package information. Aborting lint-staged.");
42
+ return;
43
+ }
44
+ n.result.isCurrentProject && await t(`Building package: ${l}`, await i.build()), await t("Executing lint-staged", await i.lintStaged()), c();
45
+ }
46
+ async function B() {
47
+ await t("Inspecting ESLint configuration", await i.eslintInspect());
48
+ }
49
+ async function x() {
50
+ await r(), await Promise.all([S(), k()]), c();
51
+ }
52
+ async function A() {
53
+ await r(), await Promise.all([S(), k(!0)]), c();
54
+ }
55
+ async function F() {
56
+ await r(), await t("Validating commit message", await i.commitLint()), c();
57
+ }
58
+ async function I() {
59
+ await t("Configuring Git hooks", await i.configureGitHook()), y(e.GIT_HOOK);
60
+ const n = await R(G);
61
+ u(e.SIMPLE_GIT_HOOKS_JSON, JSON.stringify(n, null, 4));
62
+ const a = `
63
+ ${p}
64
+ `;
65
+ h(e.GIT_IGNORE) ? E(e.GIT_IGNORE, "utf-8").split(`
66
+ `).includes(p) || N(e.GIT_IGNORE, a) : u(e.GIT_IGNORE, a), await t("Setting up simple-git-hooks", await i.simpleGitHooks());
67
+ }
68
+ async function H() {
69
+ await f(), await I();
70
+ }
71
+ async function U() {
72
+ y(e.NODE_MODULES, e.PNPM_LOCK_YAML), await t("Pruning pnpm store", await i.pnpmPruneStore()), await t("Clearing pnpm cache", await i.pnpmCleanCache()), await f(), await I();
73
+ }
74
+ async function b() {
75
+ await t("Inspecting project dependencies", await i.nodeModulesInspect());
76
+ }
77
+ async function K() {
78
+ await t("Running unit tests", await i.testUnit());
79
+ }
80
+ async function j() {
81
+ await t("Running end-to-end tests", await i.testE2e());
82
+ }
83
+ async function J(n) {
84
+ await t("Creating MongoDB migration", await i.mongoMigrateCreate(n));
85
+ }
86
+ async function V() {
87
+ await t("Running MongoDB migrations", await i.mongoMigrateUp());
88
+ }
89
+ async function W() {
90
+ await t("Rolling back MongoDB migration", await i.mongoMigrateDown());
91
+ }
92
+ (async () => {
93
+ try {
94
+ await L(C(g.argv)).scriptName(M).usage("$0 <command> [options]").command("lint", "Check code for linting issues", x).command("lint:fix", "Fix linting issues automatically", A).command("lint:inspect", "View active ESLint configuration", B).command("lint-staged", "Run lint checks on staged files", v).command("commitlint", "Validate commit message format", F).command("ready", "Initialize project and dependencies", H).command("reset", "Reset the project and reinstall dependencies", U).command("inspect", "Analyze installed project dependencies", b).command("test:unit", "Run unit test suite", K).command("test:e2e", "Run end-to-end test suite", j).command("mongo:migrate:create <name>", "Create a MongoDB migration", (n) => n.positional("name", {
95
+ describe: "Migration name",
96
+ type: "string"
97
+ }), async (n) => {
98
+ if (!n.name) {
99
+ s.error("Migration name is required.");
100
+ return;
101
+ }
102
+ await J(n.name);
103
+ }).command("mongo:migrate:up", "Apply all MongoDB migrations", V).command("mongo:migrate:down", "Rollback last MongoDB migration", W).demandCommand(1, "Please specify a valid command.").strict().help().alias("h", "help").alias("v", "version").version(D()).epilog(`💡 Tip: Use "--help" with any command to see options
104
+ `).parse();
105
+ } catch (n) {
106
+ T(n), g.exit(1);
107
+ }
108
+ })();
@@ -1,17 +1,16 @@
1
1
  import "node:child_process";
2
2
  import "node:process";
3
3
  import "node:util";
4
+ import { c as d, k as n, d as l, j as C, e as c, r as f } from "../../../index-BG1UznTl.js";
5
+ import "../log/index.js";
6
+ import "../storage/storage.util.js";
4
7
  import "../../config/env/env.util.js";
5
- import "../../../log.type-DTOvZHyz.js";
6
8
  import "../log/log.util.js";
7
- import { Z as n, $ as l, Y as C, _ as f, a0 as E, a1 as L } from "../../../path.constant-CvSr0Rrx.js";
8
- import "../path/path.util.js";
9
- import "../storage/storage.util.js";
10
9
  export {
11
- n as clearAllErrorLists,
12
- l as formatCommand,
13
- C as getStoredErrorLists,
14
- f as rawCommand,
15
- E as resolveCommands,
16
- L as runCommand
10
+ d as clearAllErrorLists,
11
+ n as formatCommand,
12
+ l as getStoredErrorLists,
13
+ C as rawCommand,
14
+ c as resolveCommands,
15
+ f as runCommand
17
16
  };
@@ -1,4 +1,4 @@
1
- import { X as s, Z as m, $ as o, Y as e, _ as d, a0 as n, a1 as t } from "../../../path.constant-CvSr0Rrx.js";
1
+ import { l as s, c as m, k as o, d as e, j as d, e as n, r as t } from "../../../index-BG1UznTl.js";
2
2
  export {
3
3
  s as E_CommandType,
4
4
  m as clearAllErrorLists,
@@ -1,88 +1,50 @@
1
- var C = Object.defineProperty;
2
- var f = Object.getOwnPropertySymbols;
3
- var d = Object.prototype.hasOwnProperty, i = Object.prototype.propertyIsEnumerable;
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
- for (var t in r || (r = {}))
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
- return e;
11
- };
12
- var y = (e, r) => {
13
- var t = {};
14
- for (var s in e)
15
- d.call(e, s) && r.indexOf(s) < 0 && (t[s] = e[s]);
16
- if (e != null && f)
17
- for (var s of f(e))
18
- r.indexOf(s) < 0 && i.call(e, s) && (t[s] = e[s]);
19
- return t;
20
- };
21
- var A = (e, r, t) => new Promise((s, o) => {
22
- var a = (u) => {
23
- try {
24
- n(t.next(u));
25
- } catch (m) {
26
- o(m);
27
- }
28
- }, c = (u) => {
29
- try {
30
- n(t.throw(u));
31
- } catch (m) {
32
- o(m);
33
- }
34
- }, n = (u) => u.done ? s(u.value) : Promise.resolve(u.value).then(a, c);
35
- n((t = t.apply(e, r)).next());
36
- });
37
- import { NestFactory as N } from "@nestjs/core";
38
- import { default as T } from "body-parser";
39
- import P from "compression";
40
- import S from "cookie-parser";
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";
47
- function O(s) {
48
- var o = s, { isDev: e, whiteList: r } = o, t = y(o, ["isDev", "whiteList"]);
49
- return x({
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);
1
+ import { NestFactory as a } from "@nestjs/core";
2
+ import { default as O } from "body-parser";
3
+ import c from "compression";
4
+ import f from "cookie-parser";
5
+ import p from "cors";
6
+ import s from "express";
7
+ import { default as M } from "express";
8
+ import m from "express-session";
9
+ import l from "express-useragent";
10
+ import d from "graphql-upload/graphqlUploadExpress.mjs";
11
+ function x({ isDev: e, whiteList: r, ...o }) {
12
+ return {
13
+ origin: (t, i) => {
14
+ e || !t || r?.includes(t ?? "") ? i(null, !0) : i(new Error("Not allowed by CORS"), !1);
52
15
  },
53
- credentials: !0
54
- }, t);
16
+ credentials: !0,
17
+ ...o
18
+ };
55
19
  }
56
- function B(e) {
57
- return g(O(e));
20
+ function P(e) {
21
+ return p(x(e));
58
22
  }
59
- function D(e) {
60
- return G(e);
23
+ function S(e) {
24
+ return m(e);
61
25
  }
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());
26
+ function n(e) {
27
+ e.set("trust proxy", 1), e.use(f()), e.use(s.urlencoded({ extended: !0 })), e.use(c()), e.use(l.express());
64
28
  }
65
- function b(e, r) {
66
- r && (Array.isArray(r) ? r : [r]).forEach((s) => {
67
- e.use(p.static(s));
29
+ function u(e, r) {
30
+ r && (Array.isArray(r) ? r : [r]).forEach((t) => {
31
+ e.use(s.static(t));
68
32
  });
69
33
  }
70
- function F(e) {
71
- const r = p();
72
- return E(r), b(r, e == null ? void 0 : e.static), r.use(I()), r;
34
+ function h(e) {
35
+ const r = s();
36
+ return n(r), u(r, e?.static), r.use(d()), r;
73
37
  }
74
- function J(e) {
75
- return A(this, null, function* () {
76
- const r = yield N.create(e.module);
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;
78
- });
38
+ async function G(e) {
39
+ const r = await a.create(e.module);
40
+ return n(r.getHttpAdapter().getInstance()), u(r.getHttpAdapter().getInstance(), e.static), e.filters && r.useGlobalFilters(...e.filters), e.pipes && r.useGlobalPipes(...e.pipes), r;
79
41
  }
80
42
  export {
81
- T as bodyParser,
82
- B as createCors,
83
- O as createCorsOptions,
84
- F as createExpress,
85
- J as createNest,
86
- D as createSession,
87
- W as express
43
+ O as bodyParser,
44
+ P as createCors,
45
+ x as createCorsOptions,
46
+ h as createExpress,
47
+ G as createNest,
48
+ S as createSession,
49
+ M as express
88
50
  };
@@ -1,13 +1,13 @@
1
- import { Router as s, default as t } from "express";
2
- import { createCors as a, createCorsOptions as p, createExpress as c, createNest as f, createSession as x } from "./express.util.js";
1
+ import { createCors as s, createCorsOptions as t, createExpress as o, createNest as a, createSession as p } from "./express.util.js";
2
+ import { Router as f, default as x } from "express";
3
3
  import { default as m } from "body-parser";
4
4
  export {
5
- s as Router,
5
+ f as Router,
6
6
  m as bodyParser,
7
- a as createCors,
8
- p as createCorsOptions,
9
- c as createExpress,
10
- f as createNest,
11
- x as createSession,
12
- t as express
7
+ s as createCors,
8
+ t as createCorsOptions,
9
+ o as createExpress,
10
+ a as createNest,
11
+ p as createSession,
12
+ x as express
13
13
  };
@@ -1,67 +1,48 @@
1
- var m = Object.defineProperty;
2
- var y = Object.getOwnPropertySymbols;
3
- var u = Object.prototype.hasOwnProperty, a = Object.prototype.propertyIsEnumerable;
4
- var f = (n, e, r) => e in n ? m(n, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[e] = r, s = (n, e) => {
5
- for (var r in e || (e = {}))
6
- u.call(e, r) && f(n, r, e[r]);
7
- if (y)
8
- for (var r of y(e))
9
- a.call(e, r) && f(n, r, e[r]);
10
- return n;
11
- };
12
- var d = (n, e) => {
13
- var r = {};
14
- for (var c in n)
15
- u.call(n, c) && e.indexOf(c) < 0 && (r[c] = n[c]);
16
- if (n != null && y)
17
- for (var c of y(n))
18
- e.indexOf(c) < 0 && a.call(n, c) && (r[c] = n[c]);
19
- return r;
20
- };
21
- import t from "fs-extra";
22
- import o from "node:path";
23
- const v = t, {
24
- lstatSync: k,
25
- readdirSync: w,
26
- mkdirSync: J,
27
- readFileSync: g,
28
- unlinkSync: D,
29
- statSync: x,
30
- createWriteStream: W
31
- } = t, b = t.readJsonSync;
32
- function j(n, e, r) {
33
- t.writeFileSync(n, e, r != null ? r : "utf-8");
1
+ import e from "fs-extra";
2
+ import y from "node:path";
3
+ const a = e, {
4
+ lstatSync: p,
5
+ readdirSync: d,
6
+ mkdirSync: l,
7
+ readFileSync: m,
8
+ unlinkSync: x,
9
+ statSync: S,
10
+ createWriteStream: F
11
+ } = e, E = e.readJsonSync;
12
+ function h(t, n, r) {
13
+ e.writeFileSync(t, n, r ?? "utf-8");
34
14
  }
35
- function q(n, e, r) {
36
- t.appendFileSync(n, e, r != null ? r : "utf-8");
15
+ function v(t, n, r) {
16
+ e.appendFileSync(t, n, r ?? "utf-8");
37
17
  }
38
- function F(...n) {
39
- return n.every((e) => t.pathExistsSync(e));
18
+ function s(...t) {
19
+ return t.every((n) => e.pathExistsSync(n));
40
20
  }
41
- function z(...n) {
42
- n.forEach((e) => {
43
- F(e) && t.removeSync(e);
21
+ function k(...t) {
22
+ t.forEach((n) => {
23
+ s(n) && e.removeSync(n);
44
24
  });
45
25
  }
46
- function A(n, e, r = {}) {
47
- const i = r, { extensions: c } = i, l = d(i, ["extensions"]);
48
- t.copySync(n, e, s({
49
- filter: (S) => x(S).isDirectory() || !c || c.length === 0 ? !0 : c.includes(o.extname(S))
50
- }, l));
26
+ function w(t, n, r = {}) {
27
+ const { extensions: c, ...o } = r;
28
+ e.copySync(t, n, {
29
+ filter: (i) => S(i).isDirectory() || !c || c.length === 0 ? !0 : c.includes(y.extname(i)),
30
+ ...o
31
+ });
51
32
  }
52
33
  export {
53
- q as appendFileSync,
54
- A as copySync,
55
- W as createWriteStream,
56
- v as fs,
57
- k as lstatSync,
58
- J as mkdirSync,
59
- F as pathExistsSync,
60
- g as readFileSync,
61
- b as readJsonSync,
62
- w as readdirSync,
63
- z as removeSync,
64
- x as statSync,
65
- D as unlinkSync,
66
- j as writeFileSync
34
+ v as appendFileSync,
35
+ w as copySync,
36
+ F as createWriteStream,
37
+ a as fs,
38
+ p as lstatSync,
39
+ l as mkdirSync,
40
+ s as pathExistsSync,
41
+ m as readFileSync,
42
+ E as readJsonSync,
43
+ d as readdirSync,
44
+ k as removeSync,
45
+ S as statSync,
46
+ x as unlinkSync,
47
+ h as writeFileSync
67
48
  };
@@ -1,8 +1,8 @@
1
- import { E as e } from "../../../log.type-DTOvZHyz.js";
2
- import { catchError as E, log as p, throwError as s } from "./log.util.js";
1
+ import { catchError as a, log as g, throwError as c } from "./log.util.js";
2
+ var o = /* @__PURE__ */ ((r) => (r.Error = "error", r.Warning = "warning", r))(o || {});
3
3
  export {
4
- e as E_IssueType,
5
- E as catchError,
6
- p as log,
7
- s as throwError
4
+ o as E_IssueType,
5
+ a as catchError,
6
+ g as log,
7
+ c as throwError
8
8
  };
@@ -1,26 +1,25 @@
1
- import c from "chalk";
1
+ import l from "chalk";
2
2
  import r from "consola";
3
- import { GraphQLError as h } from "graphql";
4
- import { getEnv as R } from "../../config/env/env.util.js";
5
- import { RESPONSE_STATUS as E } from "../../constant/response-status.js";
6
- const i = R();
7
- function u({
8
- message: o,
9
- status: e = E.INTERNAL_SERVER_ERROR,
10
- type: t = "graphql"
3
+ import { GraphQLError as E } from "graphql";
4
+ import { RESPONSE_STATUS as f } from "../../constant/response-status.js";
5
+ import { getEnv as i } from "../../config/env/env.util.js";
6
+ const h = i();
7
+ function d({
8
+ message: e,
9
+ status: o = f.INTERNAL_SERVER_ERROR,
10
+ type: n = "graphql"
11
11
  }) {
12
- var n;
13
- const l = (n = o != null ? o : e.MESSAGE) != null ? n : "Internal server error";
14
- throw t === "graphql" ? new h(l, {
15
- extensions: { code: e.CODE }
16
- }) : new Error(l);
12
+ const t = e ?? o.MESSAGE ?? "Internal server error";
13
+ throw n === "graphql" ? new E(t, {
14
+ extensions: { code: o.CODE }
15
+ }) : new Error(t);
17
16
  }
18
- i.DEBUG || (r.level = 4);
19
- function f(o) {
20
- const e = c[o];
21
- return typeof e == "function" ? e : c.green;
17
+ h.DEBUG || (r.level = 4);
18
+ function c(e) {
19
+ const o = l[e];
20
+ return typeof o == "function" ? o : l.green;
22
21
  }
23
- const $ = {
22
+ const R = {
24
23
  silent: r.silent,
25
24
  level: r.level,
26
25
  fatal: r.fatal,
@@ -35,26 +34,26 @@ const $ = {
35
34
  debug: r.debug,
36
35
  trace: r.trace,
37
36
  verbose: r.verbose,
38
- printBoxedLog(o, e, t = "red") {
39
- if (!(e != null && e.length)) {
40
- r.box(c.green(o));
37
+ printBoxedLog(e, o, n = "red") {
38
+ if (!o?.length) {
39
+ r.box(l.green(e));
41
40
  return;
42
41
  }
43
- e.forEach(({ file: l, position: n, rule: a, message: g }) => {
44
- r.log(`${c.gray("File:")} ${c.blue(`${l}${n ? `:${n}` : ""}`)}`), a && r.log(` ${f(t)("Rule:")} ${a}`), r.log(` ${f(t)("Message:")} ${g}`);
45
- }), r.box(f(t)(`${o} : ${e.length}`)), r.log(c.gray("─".repeat(40)));
42
+ o.forEach(({ file: t, position: a, rule: s, message: g }) => {
43
+ r.log(`${l.gray("File:")} ${l.blue(`${t}${a ? `:${a}` : ""}`)}`), s && r.log(` ${c(n)("Rule:")} ${s}`), r.log(` ${c(n)("Message:")} ${g}`);
44
+ }), r.box(c(n)(`${e} : ${o.length}`)), r.log(l.gray("─".repeat(40)));
46
45
  }
47
46
  };
48
- function v(o, e) {
49
- const { shouldLog: t = !0, returnValue: l, callback: n } = e != null ? e : {}, a = o instanceof Error ? o : new Error(typeof o == "string" ? o : "Unknown error");
50
- return t && $.error(a.message), n && typeof n == "function" && n(a), l || {
47
+ function w(e, o) {
48
+ const { shouldLog: n = !0, returnValue: t, callback: a } = o ?? {}, s = e instanceof Error ? e : new Error(typeof e == "string" ? e : "Unknown error");
49
+ return n && R.error(s.message), a && typeof a == "function" && a(s), t || {
51
50
  success: !1,
52
- message: a.message,
53
- code: E.INTERNAL_SERVER_ERROR.CODE
51
+ message: s.message,
52
+ code: f.INTERNAL_SERVER_ERROR.CODE
54
53
  };
55
54
  }
56
55
  export {
57
- v as catchError,
58
- $ as log,
59
- u as throwError
56
+ w as catchError,
57
+ R as log,
58
+ d as throwError
60
59
  };