@cyberskill/shared 2.19.1 → 2.21.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 (68) hide show
  1. package/dist/config/storybook/index.cjs +1 -0
  2. package/dist/config/storybook/index.d.ts +2 -0
  3. package/dist/config/storybook/index.js +6 -0
  4. package/dist/config/storybook/storybook.main.cjs +1 -0
  5. package/dist/config/storybook/storybook.main.d.ts +17 -0
  6. package/dist/config/storybook/storybook.main.js +18 -0
  7. package/dist/config/storybook/storybook.preview.cjs +1 -0
  8. package/dist/config/storybook/storybook.preview.d.ts +18 -0
  9. package/dist/config/storybook/storybook.preview.js +39 -0
  10. package/dist/config/vitest/vitest.e2e.cjs +1 -1
  11. package/dist/config/vitest/vitest.e2e.js +6 -6
  12. package/dist/config/vitest/vitest.unit.cjs +1 -1
  13. package/dist/config/vitest/vitest.unit.js +5 -5
  14. package/dist/node/cli/index.cjs +2 -2
  15. package/dist/node/cli/index.js +51 -41
  16. package/dist/node/express/express.util.cjs +1 -1
  17. package/dist/node/express/express.util.js +21 -21
  18. package/dist/node/mongo/mongo-controller.test.unit.d.ts +1 -0
  19. package/dist/node/mongo/mongo.test.unit.d.ts +1 -0
  20. package/dist/node/mongo/mongo.type.d.ts +2 -2
  21. package/dist/node/mongo/mongo.util.cjs +2 -2
  22. package/dist/node/mongo/mongo.util.d.ts +847 -147
  23. package/dist/node/mongo/mongo.util.js +70 -68
  24. package/dist/node/path/index.cjs +1 -1
  25. package/dist/node/path/index.js +27 -25
  26. package/dist/node/path/path.constant.cjs +1 -1
  27. package/dist/node/path/path.constant.d.ts +6 -0
  28. package/dist/node/path/path.constant.js +171 -143
  29. package/dist/node/path/path.test.unit.d.ts +1 -0
  30. package/dist/node/path/path.util.d.ts +2 -2
  31. package/dist/node/storage/index.cjs +1 -1
  32. package/dist/node/storage/index.d.ts +2 -0
  33. package/dist/node/storage/index.js +7 -2
  34. package/dist/node/storage/storage.constant.cjs +1 -0
  35. package/dist/node/storage/storage.constant.d.ts +4 -0
  36. package/dist/node/storage/storage.constant.js +7 -0
  37. package/dist/node/storage/storage.type.d.ts +14 -0
  38. package/dist/node/storage/storage.util.cjs +1 -1
  39. package/dist/node/storage/storage.util.d.ts +1 -1
  40. package/dist/node/storage/storage.util.js +160 -50
  41. package/dist/react/loading/loading.component.cjs +2 -2
  42. package/dist/react/loading/loading.component.js +32 -19
  43. package/dist/react/loading/loading.test.unit.d.ts +1 -0
  44. package/dist/react/loading/loading.type.d.ts +2 -1
  45. package/dist/util/common/common.test.unit.d.ts +1 -0
  46. package/dist/util/common/common.util.cjs +1 -1
  47. package/dist/util/common/common.util.js +14 -15
  48. package/dist/util/index.cjs +1 -1
  49. package/dist/util/index.js +16 -15
  50. package/dist/util/object/index.cjs +1 -1
  51. package/dist/util/object/index.js +4 -3
  52. package/dist/util/object/object.test.unit.d.ts +1 -0
  53. package/dist/util/object/object.util.cjs +1 -1
  54. package/dist/util/object/object.util.d.ts +10 -30
  55. package/dist/util/object/object.util.js +102 -69
  56. package/dist/util/serializer/serializer.test.unit.d.ts +1 -0
  57. package/dist/util/serializer/serializer.util.cjs +1 -1
  58. package/dist/util/serializer/serializer.util.js +19 -16
  59. package/dist/util/string/string.test.unit.d.ts +1 -0
  60. package/dist/util/string/string.util.cjs +1 -1
  61. package/dist/util/string/string.util.d.ts +4 -3
  62. package/dist/util/string/string.util.js +32 -41
  63. package/dist/util/validate/validate.test.unit.d.ts +1 -0
  64. package/dist/util/validate/validate.util.cjs +1 -1
  65. package/dist/util/validate/validate.util.js +9 -9
  66. package/package.json +49 -52
  67. /package/dist/node_modules/.pnpm/{vitest@4.0.9_@types_debug@4.1.12_@types_node@24.10.1_jiti@2.6.1_jsdom@27.2.0_sass@1.94.0_tsx@4.20.6_yaml@2.8.1 → vitest@4.0.16_@types_node@25.0.3_jiti@2.6.1_jsdom@27.3.0_sass@1.97.0_tsx@4.21.0_yaml@2.8.2}/node_modules/vitest/dist/config.cjs +0 -0
  68. /package/dist/node_modules/.pnpm/{vitest@4.0.9_@types_debug@4.1.12_@types_node@24.10.1_jiti@2.6.1_jsdom@27.2.0_sass@1.94.0_tsx@4.20.6_yaml@2.8.1 → vitest@4.0.16_@types_node@25.0.3_jiti@2.6.1_jsdom@27.3.0_sass@1.97.0_tsx@4.21.0_yaml@2.8.2}/node_modules/vitest/dist/config.js +0 -0
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./storybook.main.cjs"),e=require("./storybook.preview.cjs");exports.storybookMain=o.storybookMain;exports.storybookPreview=e.storybookPreview;
@@ -0,0 +1,2 @@
1
+ export * from './storybook.main.js';
2
+ export * from './storybook.preview.js';
@@ -0,0 +1,6 @@
1
+ import { storybookMain as e } from "./storybook.main.js";
2
+ import { storybookPreview as b } from "./storybook.preview.js";
3
+ export {
4
+ e as storybookMain,
5
+ b as storybookPreview
6
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../../util/object/object.util.cjs");function e(o){const t={stories:["../src/**/*.stories.@(js|jsx|mjs|ts|tsx|mdx)"],addons:["@storybook/addon-essentials","@storybook/addon-interactions","@storybook/addon-links"],framework:{name:"@storybook/react-vite",options:{}}};return s.deepMerge(t,o)}exports.storybookMain=e;
@@ -0,0 +1,17 @@
1
+ import { StorybookConfig } from '@storybook/react-vite';
2
+ /**
3
+ * Creates a Storybook main configuration for React projects using Vite.
4
+ * This function generates a Storybook configuration specifically designed for React applications
5
+ * with Vite as the build tool. It includes essential addons and framework settings.
6
+ *
7
+ * The configuration includes:
8
+ * - React Vite framework integration
9
+ * - Essential Storybook addons (docs, controls, actions, viewport, backgrounds)
10
+ * - Story file pattern matching
11
+ * - Vite configuration support
12
+ * - Configurable options merging
13
+ *
14
+ * @param options - Additional Storybook configuration options to merge with the base config.
15
+ * @returns A Storybook configuration object optimized for React with Vite.
16
+ */
17
+ export declare function storybookMain(options?: Partial<StorybookConfig>): StorybookConfig;
@@ -0,0 +1,18 @@
1
+ import { deepMerge as s } from "../../util/object/object.util.js";
2
+ function n(o) {
3
+ return s({
4
+ stories: ["../src/**/*.stories.@(js|jsx|mjs|ts|tsx|mdx)"],
5
+ addons: [
6
+ "@storybook/addon-essentials",
7
+ "@storybook/addon-interactions",
8
+ "@storybook/addon-links"
9
+ ],
10
+ framework: {
11
+ name: "@storybook/react-vite",
12
+ options: {}
13
+ }
14
+ }, o);
15
+ }
16
+ export {
17
+ n as storybookMain
18
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var l=Object.defineProperty,n=Object.defineProperties,p=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,s=(e,r,t)=>r in e?l(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,a=(e,r)=>{for(var t in r||(r={}))c.call(r,t)&&s(e,t,r[t]);if(o)for(var t of o(r))f.call(r,t)&&s(e,t,r[t]);return e},i=(e,r)=>n(e,p(r));function u(e){const r={parameters:{controls:{matchers:{color:/(background|color)$/i,date:/Date$/i}},backgrounds:{default:"light",values:[{name:"light",value:"#ffffff"},{name:"dark",value:"#333333"}]}}};return i(a(a({},r),e),{parameters:a(a({},r.parameters),e==null?void 0:e.parameters)})}exports.storybookPreview=u;
@@ -0,0 +1,18 @@
1
+ import { Preview } from '@storybook/react';
2
+ /**
3
+ * Creates a Storybook preview configuration for React projects.
4
+ * This function generates a preview configuration that provides default parameters
5
+ * and decorators for Storybook stories. It sets up common controls, backgrounds,
6
+ * and viewport settings for consistent story rendering.
7
+ *
8
+ * The configuration includes:
9
+ * - Default control parameters for common props
10
+ * - Background color options
11
+ * - Viewport presets for responsive testing
12
+ * - Actions configuration for event handlers
13
+ * - Configurable options merging
14
+ *
15
+ * @param options - Additional preview configuration options to merge with the base config.
16
+ * @returns A Storybook preview configuration object.
17
+ */
18
+ export declare function storybookPreview(options?: Partial<Preview>): Preview;
@@ -0,0 +1,39 @@
1
+ var s = Object.defineProperty, n = Object.defineProperties, l = Object.getOwnPropertyDescriptors, o = Object.getOwnPropertySymbols, f = Object.prototype.hasOwnProperty, c = Object.prototype.propertyIsEnumerable, p = (e, r, a) => r in e ? s(e, r, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[r] = a, t = (e, r) => {
2
+ for (var a in r || (r = {}))
3
+ f.call(r, a) && p(e, a, r[a]);
4
+ if (o)
5
+ for (var a of o(r))
6
+ c.call(r, a) && p(e, a, r[a]);
7
+ return e;
8
+ }, _ = (e, r) => n(e, l(r));
9
+ function i(e) {
10
+ const r = {
11
+ parameters: {
12
+ controls: {
13
+ matchers: {
14
+ color: /(background|color)$/i,
15
+ date: /Date$/i
16
+ }
17
+ },
18
+ backgrounds: {
19
+ default: "light",
20
+ values: [
21
+ {
22
+ name: "light",
23
+ value: "#ffffff"
24
+ },
25
+ {
26
+ name: "dark",
27
+ value: "#333333"
28
+ }
29
+ ]
30
+ }
31
+ }
32
+ };
33
+ return _(t(t({}, r), e), {
34
+ parameters: t(t({}, r.parameters), e == null ? void 0 : e.parameters)
35
+ });
36
+ }
37
+ export {
38
+ i as storybookPreview
39
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@vitejs/plugin-react-swc"),i=require("lodash-es"),o=require("../../node_modules/.pnpm/vitest@4.0.9_@types_debug@4.1.12_@types_node@24.10.1_jiti@2.6.1_jsdom@27.2.0_sass@1.94.0_tsx@4.20.6_yaml@2.8.1/node_modules/vitest/dist/config.cjs");function s(e){const r={plugins:[t()],test:{include:["**/*.test.e2e.?(c|m)[jt]s?(x)"],browser:{enabled:!0,provider:"playwright",instances:[{browser:"chromium"},{browser:"firefox"},{browser:"webkit"}]}}};return o.defineConfig(i.merge(r,e))}exports.vitestE2E=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@vitejs/plugin-react-swc"),i=require("../../node_modules/.pnpm/vitest@4.0.16_@types_node@25.0.3_jiti@2.6.1_jsdom@27.3.0_sass@1.97.0_tsx@4.21.0_yaml@2.8.2/node_modules/vitest/dist/config.cjs"),o=require("../../util/object/object.util.cjs");function n(e){const r={plugins:[t()],test:{include:["**/*.test.e2e.?(c|m)[jt]s?(x)"],browser:{enabled:!0,provider:"playwright",instances:[{browser:"chromium"},{browser:"firefox"},{browser:"webkit"}]}}};return i.defineConfig(o.deepMerge(r,e))}exports.vitestE2E=n;
@@ -1,8 +1,8 @@
1
1
  import t from "@vitejs/plugin-react-swc";
2
- import { merge as o } from "lodash-es";
3
- import { defineConfig as i } from "../../node_modules/.pnpm/vitest@4.0.9_@types_debug@4.1.12_@types_node@24.10.1_jiti@2.6.1_jsdom@27.2.0_sass@1.94.0_tsx@4.20.6_yaml@2.8.1/node_modules/vitest/dist/config.js";
4
- function f(r) {
5
- const e = {
2
+ import { defineConfig as o } from "../../node_modules/.pnpm/vitest@4.0.16_@types_node@25.0.3_jiti@2.6.1_jsdom@27.3.0_sass@1.97.0_tsx@4.21.0_yaml@2.8.2/node_modules/vitest/dist/config.js";
3
+ import { deepMerge as i } from "../../util/object/object.util.js";
4
+ function m(e) {
5
+ const r = {
6
6
  plugins: [t()],
7
7
  test: {
8
8
  include: ["**/*.test.e2e.?(c|m)[jt]s?(x)"],
@@ -17,8 +17,8 @@ function f(r) {
17
17
  }
18
18
  }
19
19
  };
20
- return i(o(e, r));
20
+ return o(i(r, e));
21
21
  }
22
22
  export {
23
- f as vitestE2E
23
+ m as vitestE2E
24
24
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@vitejs/plugin-react-swc"),n=require("lodash-es"),s=require("../../node_modules/.pnpm/vitest@4.0.9_@types_debug@4.1.12_@types_node@24.10.1_jiti@2.6.1_jsdom@27.2.0_sass@1.94.0_tsx@4.20.6_yaml@2.8.1/node_modules/vitest/dist/config.cjs");function r(e){const t={plugins:[i()],test:{globals:!0,environment:"jsdom",pool:"vmThreads",include:["**/*.test.unit.?(c|m)[jt]s?(x)"],setupFiles:["./vitest.unit.setup.ts"]}};return s.defineConfig(n.merge(t,e))}exports.vitestUnit=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@vitejs/plugin-react-swc"),n=require("../../node_modules/.pnpm/vitest@4.0.16_@types_node@25.0.3_jiti@2.6.1_jsdom@27.3.0_sass@1.97.0_tsx@4.21.0_yaml@2.8.2/node_modules/vitest/dist/config.cjs"),s=require("../../util/object/object.util.cjs");function r(e){const t={plugins:[i()],test:{globals:!0,environment:"jsdom",pool:"vmThreads",include:["**/*.test.unit.?(c|m)[jt]s?(x)"],setupFiles:["./vitest.unit.setup.ts"]}};return n.defineConfig(s.deepMerge(t,e))}exports.vitestUnit=r;
@@ -1,7 +1,7 @@
1
1
  import i from "@vitejs/plugin-react-swc";
2
- import { merge as o } from "lodash-es";
3
- import { defineConfig as n } from "../../node_modules/.pnpm/vitest@4.0.9_@types_debug@4.1.12_@types_node@24.10.1_jiti@2.6.1_jsdom@27.2.0_sass@1.94.0_tsx@4.20.6_yaml@2.8.1/node_modules/vitest/dist/config.js";
4
- function u(t) {
2
+ import { defineConfig as o } from "../../node_modules/.pnpm/vitest@4.0.16_@types_node@25.0.3_jiti@2.6.1_jsdom@27.3.0_sass@1.97.0_tsx@4.21.0_yaml@2.8.2/node_modules/vitest/dist/config.js";
3
+ import { deepMerge as n } from "../../util/object/object.util.js";
4
+ function p(t) {
5
5
  const e = {
6
6
  plugins: [i()],
7
7
  test: {
@@ -12,8 +12,8 @@ function u(t) {
12
12
  setupFiles: ["./vitest.unit.setup.ts"]
13
13
  }
14
14
  };
15
- return n(o(e, t));
15
+ return o(n(e, t));
16
16
  }
17
17
  export {
18
- u as vitestUnit
18
+ p as vitestUnit
19
19
  };
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- "use strict";const g=require("node:process"),k=require("yargs/helpers"),L=require("yargs/yargs"),i=require("../command/command.util.cjs"),p=require("../package/package.util.cjs"),l=require("../fs/fs.util.cjs"),P=require("../path/path.util.cjs"),n=require("../path/path.constant.cjs"),s=require("../log/log.util.cjs"),f=require("../log/log.type.cjs");var t=(e,o,r)=>new Promise((c,y)=>{var _=a=>{try{m(r.next(a))}catch(d){y(d)}},I=a=>{try{m(r.throw(a))}catch(d){y(d)}},m=a=>a.done?c(a.value):Promise.resolve(a.value).then(_,I);m((r=r.apply(e,o)).next())});function T(){try{return JSON.parse(l.readFileSync(P.resolve(__dirname,"../../../package.json"),"utf-8")).version}catch(e){return"1.0.0"}}function C(){return t(this,null,function*(){l.pathExistsSync(n.PATH.TS_CONFIG)?yield i.runCommand("Performing TypeScript validation",yield n.command.typescriptCheck()):s.log.warn("No TypeScript configuration found. Skipping type check.")})}function E(e=!1){return t(this,null,function*(){e?yield i.runCommand("Running ESLint with auto-fix",yield n.command.eslintFix()):yield i.runCommand("Running ESLint check",yield n.command.eslintCheck())})}function h(e,o){if(!o.length)return;const r=e==="Errors"?"red":"yellow";s.log.printBoxedLog(e==="Errors"?"✖ Errors":"⚠ Warnings",o,r)}function u(){return t(this,null,function*(){setTimeout(()=>t(null,null,function*(){const e=yield i.getStoredErrorLists(),o=e.filter(c=>c.type===f.E_IssueType.Error),r=e.filter(c=>c.type===f.E_IssueType.Warning);!o.length&&!r.length?s.log.printBoxedLog("✔ NO ISSUES FOUND",[],"green"):(h("Warnings",r),h("Errors",o),o.length>0&&g.exit(1))}),0)})}function A(){return t(this,null,function*(){yield i.clearAllErrorLists();const e=yield p.getPackage({name:n.CYBERSKILL_PACKAGE_NAME});if(!e.success){s.log.error("Failed to retrieve package information. Aborting lint-staged.");return}e.result.isCurrentProject&&(yield i.runCommand(`Building package: ${n.CYBERSKILL_PACKAGE_NAME}`,yield n.command.build())),yield i.runCommand("Executing lint-staged",yield n.command.lintStaged()),u()})}function M(){return t(this,null,function*(){yield i.runCommand("Inspecting ESLint configuration",yield n.command.eslintInspect())})}function O(){return t(this,null,function*(){yield i.clearAllErrorLists(),yield Promise.all([C(),E()]),u()})}function v(){return t(this,null,function*(){yield i.clearAllErrorLists(),yield Promise.all([C(),E(!0)]),u()})}function G(){return t(this,null,function*(){yield i.clearAllErrorLists(),yield i.runCommand("Validating commit message",yield n.command.commitLint()),u()})}function S(){return t(this,null,function*(){yield i.runCommand("Configuring Git hooks",yield n.command.configureGitHook()),l.removeSync(n.PATH.GIT_HOOK);const e=yield i.resolveCommands(n.createGitHooksConfig);l.writeFileSync(n.PATH.SIMPLE_GIT_HOOKS_JSON,JSON.stringify(e,null,4));const o=`
2
+ "use strict";const g=require("node:process"),I=require("yargs/helpers"),v=require("yargs/yargs"),i=require("../command/command.util.cjs"),y=require("../package/package.util.cjs"),l=require("../fs/fs.util.cjs"),L=require("../path/path.util.cjs"),n=require("../path/path.constant.cjs"),s=require("../log/log.util.cjs"),f=require("../log/log.type.cjs");var t=(e,o,r)=>new Promise((c,p)=>{var k=a=>{try{m(r.next(a))}catch(d){p(d)}},_=a=>{try{m(r.throw(a))}catch(d){p(d)}},m=a=>a.done?c(a.value):Promise.resolve(a.value).then(k,_);m((r=r.apply(e,o)).next())});function P(){try{return JSON.parse(l.readFileSync(L.resolve(__dirname,"../../../package.json"),"utf-8")).version}catch(e){return"1.0.0"}}function C(){return t(this,null,function*(){l.pathExistsSync(n.PATH.TS_CONFIG)?yield i.runCommand("Performing TypeScript validation",yield n.command.typescriptCheck()):s.log.warn("No TypeScript configuration found. Skipping type check.")})}function S(e=!1){return t(this,null,function*(){e?yield i.runCommand("Running ESLint with auto-fix",yield n.command.eslintFix()):yield i.runCommand("Running ESLint check",yield n.command.eslintCheck())})}function h(e,o){if(!o.length)return;const r=e==="Errors"?"red":"yellow";s.log.printBoxedLog(e==="Errors"?"✖ Errors":"⚠ Warnings",o,r)}function u(){return t(this,null,function*(){setTimeout(()=>t(null,null,function*(){const e=yield i.getStoredErrorLists(),o=e.filter(c=>c.type===f.E_IssueType.Error),r=e.filter(c=>c.type===f.E_IssueType.Warning);!o.length&&!r.length?s.log.printBoxedLog("✔ NO ISSUES FOUND",[],"green"):(h("Warnings",r),h("Errors",o),o.length>0&&g.exit(1))}),0)})}function T(){return t(this,null,function*(){yield i.clearAllErrorLists();const e=yield y.getPackage({name:n.CYBERSKILL_PACKAGE_NAME});if(!e.success){s.log.error("Failed to retrieve package information. Aborting lint-staged.");return}e.result.isCurrentProject&&(yield i.runCommand(`Building package: ${n.CYBERSKILL_PACKAGE_NAME}`,yield n.command.build())),yield i.runCommand("Executing lint-staged",yield n.command.lintStaged()),u()})}function A(){return t(this,null,function*(){yield i.runCommand("Inspecting ESLint configuration",yield n.command.eslintInspect())})}function M(){return t(this,null,function*(){yield i.clearAllErrorLists(),yield Promise.all([C(),S()]),u()})}function O(){return t(this,null,function*(){yield i.clearAllErrorLists(),yield Promise.all([C(),S(!0)]),u()})}function G(){return t(this,null,function*(){yield i.clearAllErrorLists(),yield i.runCommand("Validating commit message",yield n.command.commitLint()),u()})}function E(){return t(this,null,function*(){yield i.runCommand("Configuring Git hooks",yield n.command.configureGitHook()),l.removeSync(n.PATH.GIT_HOOK);const e=yield i.resolveCommands(n.createGitHooksConfig);l.writeFileSync(n.PATH.SIMPLE_GIT_HOOKS_JSON,JSON.stringify(e,null,4));const o=`
3
3
  ${n.SIMPLE_GIT_HOOK_JSON}
4
4
  `;l.pathExistsSync(n.PATH.GIT_IGNORE)?l.readFileSync(n.PATH.GIT_IGNORE,"utf-8").split(`
5
- `).includes(n.SIMPLE_GIT_HOOK_JSON)||l.appendFileSync(n.PATH.GIT_IGNORE,o):l.writeFileSync(n.PATH.GIT_IGNORE,o),yield i.runCommand("Setting up simple-git-hooks",yield n.command.simpleGitHooks())})}function R(){return t(this,null,function*(){yield p.installDependencies(),yield S()})}function N(){return t(this,null,function*(){l.removeSync(n.PATH.NODE_MODULES,n.PATH.PNPM_LOCK_YAML),yield i.runCommand("Pruning pnpm store",yield n.command.pnpmPruneStore()),yield i.runCommand("Clearing pnpm cache",yield n.command.pnpmCleanCache()),yield p.installDependencies(),yield S()})}function H(){return t(this,null,function*(){yield i.runCommand("Inspecting project dependencies",yield n.command.nodeModulesInspect())})}function w(){return t(this,null,function*(){yield i.runCommand("Running unit tests",yield n.command.testUnit())})}function D(){return t(this,null,function*(){yield i.runCommand("Running end-to-end tests",yield n.command.testE2e())})}function B(e){return t(this,null,function*(){yield i.runCommand("Creating MongoDB migration",yield n.command.mongoMigrateCreate(e))})}function x(){return t(this,null,function*(){yield i.runCommand("Running MongoDB migrations",yield n.command.mongoMigrateUp())})}function q(){return t(this,null,function*(){yield i.runCommand("Rolling back MongoDB migration",yield n.command.mongoMigrateDown())})}t(null,null,function*(){try{yield L(k.hideBin(g.argv)).scriptName(n.CYBERSKILL_CLI).usage("$0 <command> [options]").command("lint","Check code for linting issues",O).command("lint:fix","Fix linting issues automatically",v).command("lint:inspect","View active ESLint configuration",M).command("lint-staged","Run lint checks on staged files",A).command("commitlint","Validate commit message format",G).command("ready","Initialize project and dependencies",R).command("reset","Reset the project and reinstall dependencies",N).command("inspect","Analyze installed project dependencies",H).command("test:unit","Run unit test suite",w).command("test:e2e","Run end-to-end test suite",D).command("mongo:migrate:create <name>","Create a MongoDB migration",e=>e.positional("name",{describe:"Migration name",type:"string"}),e=>t(null,null,function*(){if(!e.name){s.log.error("Migration name is required.");return}yield B(e.name)})).command("mongo:migrate:up","Apply all MongoDB migrations",x).command("mongo:migrate:down","Rollback last MongoDB migration",q).demandCommand(1,"Please specify a valid command.").strict().help().alias("h","help").alias("v","version").version(T()).epilog(`💡 Tip: Use "--help" with any command to see options
5
+ `).includes(n.SIMPLE_GIT_HOOK_JSON)||l.appendFileSync(n.PATH.GIT_IGNORE,o):l.writeFileSync(n.PATH.GIT_IGNORE,o),yield i.runCommand("Setting up simple-git-hooks",yield n.command.simpleGitHooks())})}function R(){return t(this,null,function*(){yield y.installDependencies(),yield E()})}function N(){return t(this,null,function*(){l.removeSync(n.PATH.NODE_MODULES,n.PATH.PNPM_LOCK_YAML),yield i.runCommand("Pruning pnpm store",yield n.command.pnpmPruneStore()),yield i.runCommand("Clearing pnpm cache",yield n.command.pnpmCleanCache()),yield y.installDependencies(),yield E()})}function b(){return t(this,null,function*(){yield i.runCommand("Inspecting project dependencies",yield n.command.nodeModulesInspect())})}function B(){return t(this,null,function*(){yield i.runCommand("Running unit tests",yield n.command.testUnit())})}function H(){return t(this,null,function*(){yield i.runCommand("Running end-to-end tests",yield n.command.testE2e())})}function D(e){return t(this,null,function*(){yield i.runCommand("Creating MongoDB migration",yield n.command.mongoMigrateCreate(e))})}function w(){return t(this,null,function*(){yield i.runCommand("Running MongoDB migrations",yield n.command.mongoMigrateUp())})}function x(){return t(this,null,function*(){yield i.runCommand("Rolling back MongoDB migration",yield n.command.mongoMigrateDown())})}function q(){return t(this,null,function*(){yield i.runCommand("Starting Storybook development server",yield n.command.storybookDev())})}function F(){return t(this,null,function*(){yield i.runCommand("Building Storybook",yield n.command.storybookBuild())})}t(null,null,function*(){try{yield v(I.hideBin(g.argv)).scriptName(n.CYBERSKILL_CLI).usage("$0 <command> [options]").command("lint","Check code for linting issues",M).command("lint:fix","Fix linting issues automatically",O).command("lint:inspect","View active ESLint configuration",A).command("lint-staged","Run lint checks on staged files",T).command("commitlint","Validate commit message format",G).command("ready","Initialize project and dependencies",R).command("reset","Reset the project and reinstall dependencies",N).command("inspect","Analyze installed project dependencies",b).command("test:unit","Run unit test suite",B).command("test:e2e","Run end-to-end test suite",H).command("mongo:migrate:create <name>","Create a MongoDB migration",e=>e.positional("name",{describe:"Migration name",type:"string"}),e=>t(null,null,function*(){if(!e.name){s.log.error("Migration name is required.");return}yield D(e.name)})).command("mongo:migrate:up","Apply all MongoDB migrations",w).command("mongo:migrate:down","Rollback last MongoDB migration",x).command("storybook:dev","Start Storybook development server",q).command("storybook:build","Build Storybook for production",F).demandCommand(1,"Please specify a valid command.").strict().help().alias("h","help").alias("v","version").version(P()).epilog(`💡 Tip: Use "--help" with any command to see options
6
6
  `).parse()}catch(e){s.catchError(e),g.exit(1)}});
@@ -1,114 +1,114 @@
1
1
  #!/usr/bin/env node
2
- import p from "node:process";
3
- import { hideBin as N } from "yargs/helpers";
4
- import P from "yargs/yargs";
5
- import { clearAllErrorLists as u, runCommand as i, getStoredErrorLists as T, resolveCommands as w } from "../command/command.util.js";
6
- import { getPackage as D, installDependencies as I } from "../package/package.util.js";
7
- import { removeSync as C, readFileSync as _, pathExistsSync as L, writeFileSync as y, appendFileSync as B } from "../fs/fs.util.js";
8
- import { resolve as x } from "../path/path.util.js";
9
- import { CYBERSKILL_CLI as A, command as t, CYBERSKILL_PACKAGE_NAME as h, PATH as l, SIMPLE_GIT_HOOK_JSON as E, createGitHooksConfig as F } from "../path/path.constant.js";
10
- import { log as a, catchError as H } from "../log/log.util.js";
2
+ import y from "node:process";
3
+ import { hideBin as b } from "yargs/helpers";
4
+ import B from "yargs/yargs";
5
+ import { clearAllErrorLists as a, runCommand as i, getStoredErrorLists as N, resolveCommands as P } from "../command/command.util.js";
6
+ import { getPackage as D, installDependencies as v } from "../package/package.util.js";
7
+ import { removeSync as I, readFileSync as C, pathExistsSync as _, writeFileSync as f, appendFileSync as T } from "../fs/fs.util.js";
8
+ import { resolve as w } from "../path/path.util.js";
9
+ import { CYBERSKILL_CLI as x, command as t, CYBERSKILL_PACKAGE_NAME as h, PATH as l, SIMPLE_GIT_HOOK_JSON as k, createGitHooksConfig as A } from "../path/path.constant.js";
10
+ import { log as u, catchError as F } from "../log/log.util.js";
11
11
  import { E_IssueType as S } from "../log/log.type.js";
12
- var e = (n, o, r) => new Promise((c, f) => {
12
+ var e = (n, o, r) => new Promise((c, p) => {
13
13
  var R = (s) => {
14
14
  try {
15
15
  m(r.next(s));
16
16
  } catch (g) {
17
- f(g);
17
+ p(g);
18
18
  }
19
19
  }, G = (s) => {
20
20
  try {
21
21
  m(r.throw(s));
22
22
  } catch (g) {
23
- f(g);
23
+ p(g);
24
24
  }
25
25
  }, m = (s) => s.done ? c(s.value) : Promise.resolve(s.value).then(R, G);
26
26
  m((r = r.apply(n, o)).next());
27
27
  });
28
- function U() {
28
+ function H() {
29
29
  try {
30
30
  return JSON.parse(
31
- _(x(__dirname, "../../../package.json"), "utf-8")
31
+ C(w(__dirname, "../../../package.json"), "utf-8")
32
32
  ).version;
33
33
  } catch (n) {
34
34
  return "1.0.0";
35
35
  }
36
36
  }
37
- function M() {
37
+ function L() {
38
38
  return e(this, null, function* () {
39
- L(l.TS_CONFIG) ? yield i("Performing TypeScript validation", yield t.typescriptCheck()) : a.warn("No TypeScript configuration found. Skipping type check.");
39
+ _(l.TS_CONFIG) ? yield i("Performing TypeScript validation", yield t.typescriptCheck()) : u.warn("No TypeScript configuration found. Skipping type check.");
40
40
  });
41
41
  }
42
- function O(n = !1) {
42
+ function M(n = !1) {
43
43
  return e(this, null, function* () {
44
44
  n ? yield i("Running ESLint with auto-fix", yield t.eslintFix()) : yield i("Running ESLint check", yield t.eslintCheck());
45
45
  });
46
46
  }
47
- function k(n, o) {
47
+ function E(n, o) {
48
48
  if (!o.length)
49
49
  return;
50
50
  const r = n === "Errors" ? "red" : "yellow";
51
- a.printBoxedLog(n === "Errors" ? "✖ Errors" : "⚠ Warnings", o, r);
51
+ u.printBoxedLog(n === "Errors" ? "✖ Errors" : "⚠ Warnings", o, r);
52
52
  }
53
53
  function d() {
54
54
  return e(this, null, function* () {
55
55
  setTimeout(() => e(null, null, function* () {
56
- const n = yield T(), o = n.filter((c) => c.type === S.Error), r = n.filter((c) => c.type === S.Warning);
57
- !o.length && !r.length ? a.printBoxedLog("✔ NO ISSUES FOUND", [], "green") : (k("Warnings", r), k("Errors", o), o.length > 0 && p.exit(1));
56
+ const n = yield N(), o = n.filter((c) => c.type === S.Error), r = n.filter((c) => c.type === S.Warning);
57
+ !o.length && !r.length ? u.printBoxedLog("✔ NO ISSUES FOUND", [], "green") : (E("Warnings", r), E("Errors", o), o.length > 0 && y.exit(1));
58
58
  }), 0);
59
59
  });
60
60
  }
61
- function K() {
61
+ function U() {
62
62
  return e(this, null, function* () {
63
- yield u();
63
+ yield a();
64
64
  const n = yield D({ name: h });
65
65
  if (!n.success) {
66
- a.error("Failed to retrieve package information. Aborting lint-staged.");
66
+ u.error("Failed to retrieve package information. Aborting lint-staged.");
67
67
  return;
68
68
  }
69
69
  n.result.isCurrentProject && (yield i(`Building package: ${h}`, yield t.build())), yield i("Executing lint-staged", yield t.lintStaged()), d();
70
70
  });
71
71
  }
72
- function b() {
72
+ function K() {
73
73
  return e(this, null, function* () {
74
74
  yield i("Inspecting ESLint configuration", yield t.eslintInspect());
75
75
  });
76
76
  }
77
77
  function j() {
78
78
  return e(this, null, function* () {
79
- yield u(), yield Promise.all([M(), O()]), d();
79
+ yield a(), yield Promise.all([L(), M()]), d();
80
80
  });
81
81
  }
82
82
  function J() {
83
83
  return e(this, null, function* () {
84
- yield u(), yield Promise.all([M(), O(!0)]), d();
84
+ yield a(), yield Promise.all([L(), M(!0)]), d();
85
85
  });
86
86
  }
87
87
  function V() {
88
88
  return e(this, null, function* () {
89
- yield u(), yield i("Validating commit message", yield t.commitLint()), d();
89
+ yield a(), yield i("Validating commit message", yield t.commitLint()), d();
90
90
  });
91
91
  }
92
- function v() {
92
+ function O() {
93
93
  return e(this, null, function* () {
94
- yield i("Configuring Git hooks", yield t.configureGitHook()), C(l.GIT_HOOK);
95
- const n = yield w(F);
96
- y(l.SIMPLE_GIT_HOOKS_JSON, JSON.stringify(n, null, 4));
94
+ yield i("Configuring Git hooks", yield t.configureGitHook()), I(l.GIT_HOOK);
95
+ const n = yield P(A);
96
+ f(l.SIMPLE_GIT_HOOKS_JSON, JSON.stringify(n, null, 4));
97
97
  const o = `
98
- ${E}
98
+ ${k}
99
99
  `;
100
- L(l.GIT_IGNORE) ? _(l.GIT_IGNORE, "utf-8").split(`
101
- `).includes(E) || B(l.GIT_IGNORE, o) : y(l.GIT_IGNORE, o), yield i("Setting up simple-git-hooks", yield t.simpleGitHooks());
100
+ _(l.GIT_IGNORE) ? C(l.GIT_IGNORE, "utf-8").split(`
101
+ `).includes(k) || T(l.GIT_IGNORE, o) : f(l.GIT_IGNORE, o), yield i("Setting up simple-git-hooks", yield t.simpleGitHooks());
102
102
  });
103
103
  }
104
104
  function W() {
105
105
  return e(this, null, function* () {
106
- yield I(), yield v();
106
+ yield v(), yield O();
107
107
  });
108
108
  }
109
109
  function Y() {
110
110
  return e(this, null, function* () {
111
- C(l.NODE_MODULES, l.PNPM_LOCK_YAML), yield i("Pruning pnpm store", yield t.pnpmPruneStore()), yield i("Clearing pnpm cache", yield t.pnpmCleanCache()), yield I(), yield v();
111
+ I(l.NODE_MODULES, l.PNPM_LOCK_YAML), yield i("Pruning pnpm store", yield t.pnpmPruneStore()), yield i("Clearing pnpm cache", yield t.pnpmCleanCache()), yield v(), yield O();
112
112
  });
113
113
  }
114
114
  function $() {
@@ -141,20 +141,30 @@ function Z() {
141
141
  yield i("Rolling back MongoDB migration", yield t.mongoMigrateDown());
142
142
  });
143
143
  }
144
+ function nn() {
145
+ return e(this, null, function* () {
146
+ yield i("Starting Storybook development server", yield t.storybookDev());
147
+ });
148
+ }
149
+ function en() {
150
+ return e(this, null, function* () {
151
+ yield i("Building Storybook", yield t.storybookBuild());
152
+ });
153
+ }
144
154
  e(null, null, function* () {
145
155
  try {
146
- yield P(N(p.argv)).scriptName(A).usage("$0 <command> [options]").command("lint", "Check code for linting issues", j).command("lint:fix", "Fix linting issues automatically", J).command("lint:inspect", "View active ESLint configuration", b).command("lint-staged", "Run lint checks on staged files", K).command("commitlint", "Validate commit message format", V).command("ready", "Initialize project and dependencies", W).command("reset", "Reset the project and reinstall dependencies", Y).command("inspect", "Analyze installed project dependencies", $).command("test:unit", "Run unit test suite", z).command("test:e2e", "Run end-to-end test suite", q).command("mongo:migrate:create <name>", "Create a MongoDB migration", (n) => n.positional("name", {
156
+ yield B(b(y.argv)).scriptName(x).usage("$0 <command> [options]").command("lint", "Check code for linting issues", j).command("lint:fix", "Fix linting issues automatically", J).command("lint:inspect", "View active ESLint configuration", K).command("lint-staged", "Run lint checks on staged files", U).command("commitlint", "Validate commit message format", V).command("ready", "Initialize project and dependencies", W).command("reset", "Reset the project and reinstall dependencies", Y).command("inspect", "Analyze installed project dependencies", $).command("test:unit", "Run unit test suite", z).command("test:e2e", "Run end-to-end test suite", q).command("mongo:migrate:create <name>", "Create a MongoDB migration", (n) => n.positional("name", {
147
157
  describe: "Migration name",
148
158
  type: "string"
149
159
  }), (n) => e(null, null, function* () {
150
160
  if (!n.name) {
151
- a.error("Migration name is required.");
161
+ u.error("Migration name is required.");
152
162
  return;
153
163
  }
154
164
  yield Q(n.name);
155
- })).command("mongo:migrate:up", "Apply all MongoDB migrations", X).command("mongo:migrate:down", "Rollback last MongoDB migration", Z).demandCommand(1, "Please specify a valid command.").strict().help().alias("h", "help").alias("v", "version").version(U()).epilog(`💡 Tip: Use "--help" with any command to see options
165
+ })).command("mongo:migrate:up", "Apply all MongoDB migrations", X).command("mongo:migrate:down", "Rollback last MongoDB migration", Z).command("storybook:dev", "Start Storybook development server", nn).command("storybook:build", "Build Storybook for production", en).demandCommand(1, "Please specify a valid command.").strict().help().alias("h", "help").alias("v", "version").version(H()).epilog(`💡 Tip: Use "--help" with any command to see options
156
166
  `).parse();
157
167
  } catch (n) {
158
- H(n), p.exit(1);
168
+ F(n), y.exit(1);
159
169
  }
160
170
  });
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("@nestjs/core"),P=require("compression"),h=require("cookie-parser"),m=require("cors"),c=require("express"),q=require("express-session"),x=require("express-useragent"),b=require("graphql-upload/graphqlUploadExpress.mjs");var g=Object.defineProperty,l=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,p=(e,r,t)=>r in e?g(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,S=(e,r)=>{for(var t in r||(r={}))v.call(r,t)&&p(e,t,r[t]);if(l)for(var t of l(r))d.call(r,t)&&p(e,t,r[t]);return e},E=(e,r)=>{var t={};for(var s in e)v.call(e,s)&&r.indexOf(s)<0&&(t[s]=e[s]);if(e!=null&&l)for(var s of l(e))r.indexOf(s)<0&&d.call(e,s)&&(t[s]=e[s]);return t},C=(e,r,t)=>new Promise((s,a)=>{var i=n=>{try{o(t.next(n))}catch(f){a(f)}},u=n=>{try{o(t.throw(n))}catch(f){a(f)}},o=n=>n.done?s(n.value):Promise.resolve(n.value).then(i,u);o((t=t.apply(e,r)).next())});function y(e){var r=e,{isDev:t,whiteList:s}=r,a=E(r,["isDev","whiteList"]);return S({origin:(i,u)=>{t||!i||s!=null&&s.includes(i!=null?i:"")?u(null,!0):u(new Error("Not allowed by CORS"),!1)},credentials:!0},a)}function N(e){return m(y(e))}function j(e){return q(e)}function _(e){e.set("trust proxy",1),e.use(h()),e.use(c.urlencoded({extended:!0})),e.use(P()),e.use(x.express())}function O(e,r){r&&(Array.isArray(r)?r:[r]).forEach(s=>{e.use(`/${s}`,c.static(s))})}function A(e){const r=c();return _(r),O(r,e==null?void 0:e.static),r.use(b()),r}function I(e){return C(this,null,function*(){const r=yield w.NestFactory.create(e.module);return _(r.getHttpAdapter().getInstance()),O(r.getHttpAdapter().getInstance(),e.static),e.filters&&r.useGlobalFilters(...e.filters),e.pipes&&r.useGlobalPipes(...e.pipes),r})}exports.express=c;exports.createCors=N;exports.createCorsOptions=y;exports.createExpress=A;exports.createNest=I;exports.createSession=j;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("@nestjs/core"),P=require("compression"),h=require("cookie-parser"),m=require("cors"),c=require("express"),x=require("express-session"),q=require("express-useragent"),b=require("graphql-upload/graphqlUploadExpress.mjs");var g=Object.defineProperty,l=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,p=(e,r,t)=>r in e?g(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,S=(e,r)=>{for(var t in r||(r={}))v.call(r,t)&&p(e,t,r[t]);if(l)for(var t of l(r))d.call(r,t)&&p(e,t,r[t]);return e},E=(e,r)=>{var t={};for(var s in e)v.call(e,s)&&r.indexOf(s)<0&&(t[s]=e[s]);if(e!=null&&l)for(var s of l(e))r.indexOf(s)<0&&d.call(e,s)&&(t[s]=e[s]);return t},C=(e,r,t)=>new Promise((s,a)=>{var i=n=>{try{o(t.next(n))}catch(f){a(f)}},u=n=>{try{o(t.throw(n))}catch(f){a(f)}},o=n=>n.done?s(n.value):Promise.resolve(n.value).then(i,u);o((t=t.apply(e,r)).next())});function y(e){var r=e,{isDev:t,whiteList:s}=r,a=E(r,["isDev","whiteList"]);return S({origin:(i,u)=>{t||!i||s!=null&&s.includes(i!=null?i:"")?u(null,!0):u(new Error("Not allowed by CORS"),!1)},credentials:!0},a)}function N(e){return m(y(e))}function j(e){return x(e)}function _(e){e.set("trust proxy",1),e.use(h()),e.use(c.urlencoded({extended:!0})),e.use(P()),e.use(q.express())}function O(e,r){r&&(Array.isArray(r)?r:[r]).forEach(s=>{e.use(`/${s}`,c.static(s))})}function A(e){const r=c();return _(r),O(r,e==null?void 0:e.static),r.use(b()),r}function I(e){return C(this,null,function*(){const r=yield w.NestFactory.create(e.module);return _(r.getHttpAdapter().getInstance()),O(r.getHttpAdapter().getInstance(),e.static),e.filters&&r.useGlobalFilters(...e.filters),e.pipes&&r.useGlobalPipes(...e.pipes),r})}exports.express=c;exports.createCors=N;exports.createCorsOptions=y;exports.createExpress=A;exports.createNest=I;exports.createSession=j;
@@ -4,10 +4,10 @@ import O from "cookie-parser";
4
4
  import h from "cors";
5
5
  import c from "express";
6
6
  import { default as B } from "express";
7
- import P from "express-session";
8
- import x from "express-useragent";
7
+ import x from "express-session";
8
+ import { express as P } from "express-useragent";
9
9
  import b from "graphql-upload/graphqlUploadExpress.mjs";
10
- var g = Object.defineProperty, l = Object.getOwnPropertySymbols, m = Object.prototype.hasOwnProperty, v = Object.prototype.propertyIsEnumerable, p = (e, r, t) => r in e ? g(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, E = (e, r) => {
10
+ var E = Object.defineProperty, l = Object.getOwnPropertySymbols, m = Object.prototype.hasOwnProperty, v = Object.prototype.propertyIsEnumerable, p = (e, r, t) => r in e ? E(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, g = (e, r) => {
11
11
  for (var t in r || (r = {}))
12
12
  m.call(r, t) && p(e, t, r[t]);
13
13
  if (l)
@@ -23,59 +23,59 @@ var g = Object.defineProperty, l = Object.getOwnPropertySymbols, m = Object.prot
23
23
  r.indexOf(s) < 0 && v.call(e, s) && (t[s] = e[s]);
24
24
  return t;
25
25
  }, A = (e, r, t) => new Promise((s, a) => {
26
- var i = (n) => {
26
+ var n = (i) => {
27
27
  try {
28
- f(t.next(n));
28
+ f(t.next(i));
29
29
  } catch (u) {
30
30
  a(u);
31
31
  }
32
- }, o = (n) => {
32
+ }, o = (i) => {
33
33
  try {
34
- f(t.throw(n));
34
+ f(t.throw(i));
35
35
  } catch (u) {
36
36
  a(u);
37
37
  }
38
- }, f = (n) => n.done ? s(n.value) : Promise.resolve(n.value).then(i, o);
38
+ }, f = (i) => i.done ? s(i.value) : Promise.resolve(i.value).then(n, o);
39
39
  f((t = t.apply(e, r)).next());
40
40
  });
41
41
  function I(e) {
42
42
  var r = e, { isDev: t, whiteList: s } = r, a = S(r, ["isDev", "whiteList"]);
43
- return E({
44
- origin: (i, o) => {
45
- t || !i || s != null && s.includes(i != null ? i : "") ? o(null, !0) : o(new Error("Not allowed by CORS"), !1);
43
+ return g({
44
+ origin: (n, o) => {
45
+ t || !n || s != null && s.includes(n != null ? n : "") ? o(null, !0) : o(new Error("Not allowed by CORS"), !1);
46
46
  },
47
47
  credentials: !0
48
48
  }, a);
49
49
  }
50
- function q(e) {
50
+ function $(e) {
51
51
  return h(I(e));
52
52
  }
53
- function M(e) {
54
- return P(e);
53
+ function q(e) {
54
+ return x(e);
55
55
  }
56
56
  function d(e) {
57
- e.set("trust proxy", 1), e.use(O()), e.use(c.urlencoded({ extended: !0 })), e.use(w()), e.use(x.express());
57
+ e.set("trust proxy", 1), e.use(O()), e.use(c.urlencoded({ extended: !0 })), e.use(w()), e.use(P());
58
58
  }
59
59
  function _(e, r) {
60
60
  r && (Array.isArray(r) ? r : [r]).forEach((s) => {
61
61
  e.use(`/${s}`, c.static(s));
62
62
  });
63
63
  }
64
- function U(e) {
64
+ function M(e) {
65
65
  const r = c();
66
66
  return d(r), _(r, e == null ? void 0 : e.static), r.use(b()), r;
67
67
  }
68
- function V(e) {
68
+ function U(e) {
69
69
  return A(this, null, function* () {
70
70
  const r = yield y.create(e.module);
71
71
  return d(r.getHttpAdapter().getInstance()), _(r.getHttpAdapter().getInstance(), e.static), e.filters && r.useGlobalFilters(...e.filters), e.pipes && r.useGlobalPipes(...e.pipes), r;
72
72
  });
73
73
  }
74
74
  export {
75
- q as createCors,
75
+ $ as createCors,
76
76
  I as createCorsOptions,
77
- U as createExpress,
78
- V as createNest,
79
- M as createSession,
77
+ M as createExpress,
78
+ U as createNest,
79
+ q as createSession,
80
80
  B as express
81
81
  };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { DeleteResult, Filter, InsertManyResult, InsertOneResult, OptionalUnlessRequiredId, UpdateResult, WithId, Collection, Db } from 'mongodb';
2
- import { AggregatePaginateModel, AggregatePaginateResult, ClientSession, ErrorHandlingMiddlewareFunction, ErrorHandlingMiddlewareWithOption, FilterQuery, InsertManyOptions, PaginateModel, PaginateOptions, PaginateResult, PipelineStage, PopulateOption, PopulateOptions, PostMiddlewareFunction, PreMiddlewareFunction, PreSaveMiddlewareFunction, ProjectionType, QueryOptions, QueryWithHelpers, Schema, SchemaDefinition, UpdateQuery, UpdateWriteOpResult, default as mongoose, Document, Model } from 'mongoose';
2
+ import { AggregatePaginateModel, AggregatePaginateResult, ClientSession, ErrorHandlingMiddlewareFunction, ErrorHandlingMiddlewareWithOption, InsertManyOptions, PaginateModel, PaginateOptions, PaginateResult, PipelineStage, PopulateOption, PopulateOptions, PostMiddlewareFunction, PreMiddlewareFunction, PreSaveMiddlewareFunction, ProjectionType, QueryFilter, QueryOptions, QueryWithHelpers, Schema, SchemaDefinition, UpdateQuery, UpdateWriteOpResult, default as mongoose, Document, Model } from 'mongoose';
3
3
  export declare class C_Db extends Db {
4
4
  }
5
5
  export type T_Filter<T> = Filter<T>;
@@ -17,7 +17,7 @@ export declare class C_Collection<T extends Partial<C_Document>> extends Collect
17
17
  }
18
18
  export interface I_ExtendedModel<T extends Partial<C_Document>> extends Model<T>, PaginateModel<T>, AggregatePaginateModel<T> {
19
19
  }
20
- export type T_FilterQuery<T> = FilterQuery<T>;
20
+ export type T_FilterQuery<T> = QueryFilter<T>;
21
21
  export type T_ProjectionType<T> = ProjectionType<T>;
22
22
  export type T_QueryOptions<T> = QueryOptions<T>;
23
23
  export type T_PaginateOptions = PaginateOptions;