@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 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=typeof window!="undefined";exports.IS_BROWSER=e;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("./common.cjs"),t=require("./response-status.cjs");exports.IS_BROWSER=S.IS_BROWSER;exports.RESPONSE_STATUS=t.RESPONSE_STATUS;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E={GRAPHQL_PARSE_FAILED:{CODE:"GRAPHQL_PARSE_FAILED",MESSAGE:"The GraphQL operation string contains a syntax error."},GRAPHQL_VALIDATION_FAILED:{CODE:"GRAPHQL_VALIDATION_FAILED",MESSAGE:"The GraphQL operation is not valid against the server's schema."},BAD_USER_INPUT:{CODE:"BAD_USER_INPUT",MESSAGE:"The GraphQL operation includes an invalid value for a field argument."},PERSISTED_QUERY_NOT_FOUND:{CODE:"PERSISTED_QUERY_NOT_FOUND",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the query was not in the APQ cache."},PERSISTED_QUERY_NOT_SUPPORTED:{CODE:"PERSISTED_QUERY_NOT_SUPPORTED",MESSAGE:"A client sent the hash of a query string to execute via automatic persisted queries, but the server has disabled APQ."},OPERATION_RESOLUTION_FAILURE:{CODE:"OPERATION_RESOLUTION_FAILURE",MESSAGE:"The request was parsed successfully and is valid against the server's schema, but the server couldn't resolve which operation to run. This occurs when a request containing multiple named operations doesn't specify which operation to run (i.e.,operationName), or if the named operation isn't included in the request."},CONTINUE:{CODE:100,MESSAGE:"Continue"},SWITCHING_PROTOCOLS:{CODE:101,MESSAGE:"Switching Protocols"},PROCESSING:{CODE:102,MESSAGE:"Processing"},OK:{CODE:200,MESSAGE:"OK"},CREATED:{CODE:201,MESSAGE:"Created"},ACCEPTED:{CODE:202,MESSAGE:"Accepted"},NON_AUTHORITATIVE_INFORMATION:{CODE:203,MESSAGE:"Non Authoritative Information"},NO_CONTENT:{CODE:204,MESSAGE:"No Content"},RESET_CONTENT:{CODE:205,MESSAGE:"Reset Content"},PARTIAL_CONTENT:{CODE:206,MESSAGE:"Partial Content"},MULTI_STATUS:{CODE:207,MESSAGE:"Multi-Status"},MULTIPLE_CHOICES:{CODE:300,MESSAGE:"Multiple Choices"},MOVED_PERMANENTLY:{CODE:301,MESSAGE:"Moved Permanently"},MOVED_TEMPORARILY:{CODE:302,MESSAGE:"Moved Temporarily"},SEE_OTHER:{CODE:303,MESSAGE:"See Other"},NOT_MODIFIED:{CODE:304,MESSAGE:"Not Modified"},USE_PROXY:{CODE:305,MESSAGE:"Use Proxy"},TEMPORARY_REDIRECT:{CODE:307,MESSAGE:"Temporary Redirect"},PERMANENT_REDIRECT:{CODE:308,MESSAGE:"Permanent Redirect"},BAD_REQUEST:{CODE:400,MESSAGE:"Bad Request"},UNAUTHORIZED:{CODE:401,MESSAGE:"Unauthorized"},PAYMENT_REQUIRED:{CODE:402,MESSAGE:"Payment Required"},FORBIDDEN:{CODE:403,MESSAGE:"Forbidden"},NOT_FOUND:{CODE:404,MESSAGE:"Not Found"},METHOD_NOT_ALLOWED:{CODE:405,MESSAGE:"Method Not Allowed"},NOT_ACCEPTABLE:{CODE:406,MESSAGE:"Not Acceptable"},PROXY_AUTHENTICATION_REQUIRED:{CODE:407,MESSAGE:"Proxy Authentication Required"},REQUEST_TIMEOUT:{CODE:408,MESSAGE:"Request Timeout"},CONFLICT:{CODE:409,MESSAGE:"Conflict"},GONE:{CODE:410,MESSAGE:"Gone"},LENGTH_REQUIRED:{CODE:411,MESSAGE:"Length Required"},PRECONDITION_FAILED:{CODE:412,MESSAGE:"Precondition Failed"},REQUEST_TOO_LONG:{CODE:413,MESSAGE:"Request Entity Too Large"},REQUEST_URI_TOO_LONG:{CODE:414,MESSAGE:"Request-URI Too Long"},UNSUPPORTED_MEDIA_TYPE:{CODE:415,MESSAGE:"Unsupported Media Type"},REQUESTED_RANGE_NOT_SATISFIABLE:{CODE:416,MESSAGE:"Requested Range Not Satisfiable"},EXPECTATION_FAILED:{CODE:417,MESSAGE:"Expectation Failed"},IM_A_TEAPOT:{CODE:418,MESSAGE:"I'm a teapot"},INSUFFICIENT_SPACE_ON_RESOURCE:{CODE:419,MESSAGE:"Insufficient Space on Resource"},METHOD_FAILURE:{CODE:420,MESSAGE:"Method Failure"},MISDIRECTED_REQUEST:{CODE:421,MESSAGE:"Misdirected Request"},UNPROCESSABLE_ENTITY:{CODE:422,MESSAGE:"Unprocessable Entity"},LOCKED:{CODE:423,MESSAGE:"Locked"},FAILED_DEPENDENCY:{CODE:424,MESSAGE:"Failed Dependency"},PRECONDITION_REQUIRED:{CODE:428,MESSAGE:"Precondition Required"},TOO_MANY_REQUESTS:{CODE:429,MESSAGE:"Too Many Requests"},REQUEST_HEADER_FIELDS_TOO_LARGE:{CODE:431,MESSAGE:"Request Header Fields Too Large"},UNAVAILABLE_FOR_LEGAL_REASONS:{CODE:451,MESSAGE:"Unavailable For Legal Reasons"},INTERNAL_SERVER_ERROR:{CODE:500,MESSAGE:"Internal Server Error"},NOT_IMPLEMENTED:{CODE:501,MESSAGE:"Not Implemented"},BAD_GATEWAY:{CODE:502,MESSAGE:"Bad Gateway"},SERVICE_UNAVAILABLE:{CODE:503,MESSAGE:"Service Unavailable"},GATEWAY_TIMEOUT:{CODE:504,MESSAGE:"Gateway Timeout"},HTTP_VERSION_NOT_SUPPORTED:{CODE:505,MESSAGE:"HTTP Version Not Supported"},INSUFFICIENT_STORAGE:{CODE:507,MESSAGE:"Insufficient Storage"},NETWORK_AUTHENTICATION_REQUIRED:{CODE:511,MESSAGE:"Network Authentication Required"}};exports.RESPONSE_STATUS=E;
@@ -1 +0,0 @@
1
- "use strict";var p=Object.defineProperty;var o=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var v=(e,l,r)=>l in e?p(e,l,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[l]=r,d=(e,l)=>{for(var r in l||(l={}))P.call(l,r)&&v(e,r,l[r]);if(o)for(var r of o(l))f.call(l,r)&&v(e,r,l[r]);return e};var i=(e,l,r)=>new Promise((a,c)=>{var S=t=>{try{n(r.next(t))}catch(u){c(u)}},g=t=>{try{n(r.throw(t))}catch(u){c(u)}},n=t=>t.done?a(t.value):Promise.resolve(t.value).then(S,g);n((r=r.apply(e,l)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("@apollo/server"),q=require("@apollo/server/express4"),y=require("@apollo/server/plugin/drainHttpServer"),s=require("@apollo/server/plugin/landingPage/default"),D=require("../log/log.util.cjs");function _(e){return new A.ApolloServer(d({schema:e.schema,plugins:[e.isDev?s.ApolloServerPluginLandingPageLocalDefault():s.ApolloServerPluginLandingPageProductionDefault(),y.ApolloServerPluginDrainHttpServer({httpServer:e.server}),...e.drainServer?[{serverWillStart(){return i(this,null,function*(){return{drainServer(){return i(this,null,function*(){var a;(a=e.drainServer)==null||a.call(e),D.log.info("Apollo Server drainServer hook called")})}}})}}]:[]]},e.isDev&&{introspection:!0,includeStacktraceInErrorResponses:!0}))}Object.defineProperty(exports,"expressMiddleware",{enumerable:!0,get:()=>q.expressMiddleware});exports.createApolloServer=_;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./apollo-server.util.cjs"),r=require("@apollo/server/express4");exports.createApolloServer=e.createApolloServer;Object.defineProperty(exports,"expressMiddleware",{enumerable:!0,get:()=>r.expressMiddleware});
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";var s=(t,i,n)=>new Promise((a,g)=>{var w=o=>{try{l(n.next(o))}catch(p){g(p)}},h=o=>{try{l(n.throw(o))}catch(p){g(p)}},l=o=>o.done?a(o.value):Promise.resolve(o.value).then(w,h);l((n=n.apply(t,i)).next())});const m=require("node:process"),q=require("yargs/helpers"),k=require("yargs/yargs"),e=require("../../../path.constant-CWtb99gS.cjs"),r=require("../fs/fs.util.cjs"),u=require("../../../log.type-CMvG6Box.cjs"),c=require("../log/log.util.cjs");require("../path/path.util.cjs");const C="@cyberskill/shared",v="module",E="1.207.0",S="CyberSkill Shared",_="Stephen Cheng",b="MIT",I="https://github.com/cyberskill-world/shared#readme",L={type:"git",url:"git+https://github.com/cyberskill-world/shared.git"},T={url:"https://github.com/cyberskill-world/shared/issues"},M={"./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"}},P={cyberskill:"dist/src/node/cli/index.js"},A=["dist","public"],O={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"},G={"@antfu/eslint-config":"4.16.2","@apollo/client":"3.13.8","@apollo/client-integration-nextjs":"0.12.2","@apollo/server":"4.12.2","@dotenvx/dotenvx":"1.45.2","@eddeee888/gcg-typescript-resolver-files":"0.12.1","@eslint-react/eslint-plugin":"1.52.2","@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","apollo-upload-client":"18.0.1","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","eslint-plugin-format":"1.0.1","eslint-plugin-react-hooks":"5.2.0","eslint-plugin-react-refresh":"0.4.20",express:"4.21.2","express-session":"1.18.1","express-useragent":"1.0.15","fs-extra":"11.3.0",globals:"16.3.0",graphql:"16.11.0","graphql-upload":"17.0.0","graphql-ws":"6.0.5",i18next:"25.3.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.4","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.6.0",slugify:"1.6.6",unorm:"1.6.0",uuid:"11.1.0",vite:"7.0.2",ws:"8.18.3",yargs:"18.0.0"},R={"@commitlint/cli":"19.8.1","@commitlint/config-conventional":"19.8.1","@eslint/config-inspector":"1.1.0","@microsoft/api-extractor":"7.52.8","@next/eslint-plugin-next":"15.3.5","@testing-library/jest-dom":"6.6.3","@testing-library/react":"16.3.0","@types/apollo-upload-client":"18.0.0","@types/body-parser":"1.19.6","@types/compression":"1.8.1","@types/cookie-parser":"1.4.9","@types/cors":"2.8.19","@types/crypto-js":"4.2.2","@types/express":"4.17.21","@types/express-session":"1.18.2","@types/express-useragent":"1.0.5","@types/fs-extra":"11.0.4","@types/graphql-upload":"17.0.0","@types/migrate-mongo":"10.0.5","@types/node":"24.0.10","@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.1","eslint-config-next":"15.3.5",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.2","vite-plugin-dts":"4.5.4",vitest:"3.2.4"},H={access:"public",registry:"https://registry.npmjs.org/"},N={name:C,type:v,version:E,description:S,author:_,license:b,homepage:I,repository:L,bugs:T,exports:M,bin:P,files:A,scripts:O,dependencies:G,devDependencies:R,publishConfig:H};function y(){return s(this,null,function*(){r.pathExistsSync(e.PATH.TS_CONFIG)?yield e.runCommand("Performing TypeScript validation",yield e.command.typescriptCheck()):c.log.warn("No TypeScript configuration found. Skipping type check.")})}function f(t=!1){return s(this,null,function*(){t?yield e.runCommand("Running ESLint with auto-fix",yield e.command.eslintFix()):yield e.runCommand("Running ESLint check",yield e.command.eslintCheck())})}function x(t,i){if(!i.length)return;const n=t==="Errors"?"red":"yellow";c.log.printBoxedLog(t==="Errors"?"✖ Errors":"⚠ Warnings",i,n)}function d(){return s(this,null,function*(){setTimeout(()=>s(null,null,function*(){const t=yield e.getStoredErrorLists(),i=t.filter(a=>a.type===u.E_IssueType.Error),n=t.filter(a=>a.type===u.E_IssueType.Warning);!i.length&&!n.length?c.log.printBoxedLog("✔ NO ISSUES FOUND",[],"green"):(x("Warnings",n),x("Errors",i),i.length>0&&m.exit(1))}),0)})}function D(){return s(this,null,function*(){yield e.clearAllErrorLists();const t=yield e.getPackage({name:e.CYBERSKILL_PACKAGE_NAME});if(!t.success){c.log.error("Failed to retrieve package information. Aborting lint-staged.");return}t.result.isCurrentProject&&(yield e.runCommand(`Building package: ${e.CYBERSKILL_PACKAGE_NAME}`,yield e.command.build())),yield e.runCommand("Executing lint-staged",yield e.command.lintStaged()),d()})}function B(){return s(this,null,function*(){yield e.runCommand("Inspecting ESLint configuration",yield e.command.eslintInspect())})}function F(){return s(this,null,function*(){yield e.clearAllErrorLists(),yield Promise.all([y(),f()]),d()})}function K(){return s(this,null,function*(){yield e.clearAllErrorLists(),yield Promise.all([y(),f(!0)]),d()})}function U(){return s(this,null,function*(){yield e.clearAllErrorLists(),yield e.runCommand("Validating commit message",yield e.command.commitLint()),d()})}function j(){return s(this,null,function*(){yield e.runCommand("Configuring Git hooks",yield e.command.configureGitHook()),r.removeSync(e.PATH.GIT_HOOK);const t=yield e.resolveCommands(e.createGitHooksConfig);r.writeFileSync(e.PATH.SIMPLE_GIT_HOOKS_JSON,JSON.stringify(t,null,4));const i=`
3
- ${e.SIMPLE_GIT_HOOK_JSON}
4
- `;r.pathExistsSync(e.PATH.GIT_IGNORE)?r.readFileSync(e.PATH.GIT_IGNORE,"utf-8").split(`
5
- `).includes(e.SIMPLE_GIT_HOOK_JSON)||r.appendFileSync(e.PATH.GIT_IGNORE,i):r.writeFileSync(e.PATH.GIT_IGNORE,i),yield e.runCommand("Setting up simple-git-hooks",yield e.command.simpleGitHooks())})}function J(){return s(this,null,function*(){yield e.installDependencies(),yield j()})}function Y(){return s(this,null,function*(){r.removeSync(e.PATH.NODE_MODULES,e.PATH.PNPM_LOCK_YAML),yield e.runCommand("Pruning pnpm store",yield e.command.pnpmPruneStore()),yield e.runCommand("Clearing pnpm cache",yield e.command.pnpmCleanCache()),yield e.installDependencies(),yield j()})}function $(){return s(this,null,function*(){yield e.runCommand("Inspecting project dependencies",yield e.command.nodeModulesInspect())})}function V(){return s(this,null,function*(){yield e.runCommand("Running unit tests",yield e.command.testUnit())})}function W(){return s(this,null,function*(){yield e.runCommand("Running end-to-end tests",yield e.command.testE2e())})}function z(t){return s(this,null,function*(){yield e.runCommand("Creating MongoDB migration",yield e.command.mongoMigrateCreate(t))})}function Q(){return s(this,null,function*(){yield e.runCommand("Running MongoDB migrations",yield e.command.mongoMigrateUp())})}function X(){return s(this,null,function*(){yield e.runCommand("Rolling back MongoDB migration",yield e.command.mongoMigrateDown())})}s(null,null,function*(){try{yield k(q.hideBin(m.argv)).scriptName(e.CYBERSKILL_CLI).usage("$0 <command> [options]").command("lint","Check code for linting issues",F).command("lint:fix","Fix linting issues automatically",K).command("lint:inspect","View active ESLint configuration",B).command("lint-staged","Run lint checks on staged files",D).command("commitlint","Validate commit message format",U).command("ready","Initialize project and dependencies",J).command("reset","Reset the project and reinstall dependencies",Y).command("inspect","Analyze installed project dependencies",$).command("test:unit","Run unit test suite",V).command("test:e2e","Run end-to-end test suite",W).command("mongo:migrate:create <name>","Create a MongoDB migration",t=>t.positional("name",{describe:"Migration name",type:"string"}),t=>s(null,null,function*(){if(!t.name){c.log.error("Migration name is required.");return}yield z(t.name)})).command("mongo:migrate:up","Apply all MongoDB migrations",Q).command("mongo:migrate:down","Rollback last MongoDB migration",X).demandCommand(1,"Please specify a valid command.").strict().help().alias("h","help").alias("v","version").version(N.version).epilog(`💡 Tip: Use "--help" with any command to see options
6
- `).parse()}catch(t){c.catchError(t),m.exit(1)}});
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
@@ -1,171 +0,0 @@
1
- #!/usr/bin/env node
2
- var L = (e, n) => () => (n || e((n = { exports: {} }).exports, n), n.exports);
3
- var t = (e, n, r) => new Promise((a, y) => {
4
- var I = (c) => {
5
- try {
6
- g(r.next(c));
7
- } catch (m) {
8
- y(m);
9
- }
10
- }, M = (c) => {
11
- try {
12
- g(r.throw(c));
13
- } catch (m) {
14
- y(m);
15
- }
16
- }, g = (c) => c.done ? a(c.value) : Promise.resolve(c.value).then(I, M);
17
- g((r = r.apply(e, n)).next());
18
- });
19
- import x from "node:process";
20
- import { hideBin as O } from "yargs/helpers";
21
- import R from "yargs/yargs";
22
- import { g as _, Z as l, a1 as s, I as i, O as G, C as f, R as k, F as o, Y as T, a0 as N, S as j, H as D } from "../../../path.constant-CvSr0Rrx.js";
23
- import { removeSync as v, pathExistsSync as b, writeFileSync as w, readFileSync as P, appendFileSync as B } from "../fs/fs.util.js";
24
- import { E as h } from "../../../log.type-DTOvZHyz.js";
25
- import { log as d, catchError as F } from "../log/log.util.js";
26
- import "../path/path.util.js";
27
- var fe = L((u) => {
28
- const A = "@cyberskill/shared", H = "module", U = "1.207.0", K = "CyberSkill Shared", Y = "Stephen Cheng", J = "MIT", V = "https://github.com/cyberskill-world/shared#readme", W = { type: "git", url: "git+https://github.com/cyberskill-world/shared.git" }, $ = { 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" } }, Z = { cyberskill: "dist/src/node/cli/index.js" }, Q = ["dist", "public"], X = { 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.2", "@apollo/client": "3.13.8", "@apollo/client-integration-nextjs": "0.12.2", "@apollo/server": "4.12.2", "@dotenvx/dotenvx": "1.45.2", "@eddeee888/gcg-typescript-resolver-files": "0.12.1", "@eslint-react/eslint-plugin": "1.52.2", "@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", "apollo-upload-client": "18.0.1", "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", "eslint-plugin-format": "1.0.1", "eslint-plugin-react-hooks": "5.2.0", "eslint-plugin-react-refresh": "0.4.20", express: "4.21.2", "express-session": "1.18.1", "express-useragent": "1.0.15", "fs-extra": "11.3.0", globals: "16.3.0", graphql: "16.11.0", "graphql-upload": "17.0.0", "graphql-ws": "6.0.5", i18next: "25.3.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.4", "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.6.0", slugify: "1.6.6", unorm: "1.6.0", uuid: "11.1.0", vite: "7.0.2", ws: "8.18.3", yargs: "18.0.0" }, te = { "@commitlint/cli": "19.8.1", "@commitlint/config-conventional": "19.8.1", "@eslint/config-inspector": "1.1.0", "@microsoft/api-extractor": "7.52.8", "@next/eslint-plugin-next": "15.3.5", "@testing-library/jest-dom": "6.6.3", "@testing-library/react": "16.3.0", "@types/apollo-upload-client": "18.0.0", "@types/body-parser": "1.19.6", "@types/compression": "1.8.1", "@types/cookie-parser": "1.4.9", "@types/cors": "2.8.19", "@types/crypto-js": "4.2.2", "@types/express": "4.17.21", "@types/express-session": "1.18.2", "@types/express-useragent": "1.0.5", "@types/fs-extra": "11.0.4", "@types/graphql-upload": "17.0.0", "@types/migrate-mongo": "10.0.5", "@types/node": "24.0.10", "@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.1", "eslint-config-next": "15.3.5", 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.2", "vite-plugin-dts": "4.5.4", vitest: "3.2.4" }, se = { access: "public", registry: "https://registry.npmjs.org/" }, ie = {
29
- name: A,
30
- type: H,
31
- version: U,
32
- description: K,
33
- author: Y,
34
- license: J,
35
- homepage: V,
36
- repository: W,
37
- bugs: $,
38
- exports: z,
39
- bin: Z,
40
- files: Q,
41
- scripts: X,
42
- dependencies: ee,
43
- devDependencies: te,
44
- publishConfig: se
45
- };
46
- function E() {
47
- return t(this, null, function* () {
48
- b(o.TS_CONFIG) ? yield s("Performing TypeScript validation", yield i.typescriptCheck()) : d.warn("No TypeScript configuration found. Skipping type check.");
49
- });
50
- }
51
- function S(e = !1) {
52
- return t(this, null, function* () {
53
- e ? yield s("Running ESLint with auto-fix", yield i.eslintFix()) : yield s("Running ESLint check", yield i.eslintCheck());
54
- });
55
- }
56
- function q(e, n) {
57
- if (!n.length)
58
- return;
59
- const r = e === "Errors" ? "red" : "yellow";
60
- d.printBoxedLog(e === "Errors" ? "✖ Errors" : "⚠ Warnings", n, r);
61
- }
62
- function p() {
63
- return t(this, null, function* () {
64
- setTimeout(() => t(null, null, function* () {
65
- const e = yield T(), n = e.filter((a) => a.type === h.Error), r = e.filter((a) => a.type === h.Warning);
66
- !n.length && !r.length ? d.printBoxedLog("✔ NO ISSUES FOUND", [], "green") : (q("Warnings", r), q("Errors", n), n.length > 0 && x.exit(1));
67
- }), 0);
68
- });
69
- }
70
- function ne() {
71
- return t(this, null, function* () {
72
- yield l();
73
- const e = yield G({ name: f });
74
- if (!e.success) {
75
- d.error("Failed to retrieve package information. Aborting lint-staged.");
76
- return;
77
- }
78
- e.result.isCurrentProject && (yield s(`Building package: ${f}`, yield i.build())), yield s("Executing lint-staged", yield i.lintStaged()), p();
79
- });
80
- }
81
- function re() {
82
- return t(this, null, function* () {
83
- yield s("Inspecting ESLint configuration", yield i.eslintInspect());
84
- });
85
- }
86
- function oe() {
87
- return t(this, null, function* () {
88
- yield l(), yield Promise.all([E(), S()]), p();
89
- });
90
- }
91
- function ce() {
92
- return t(this, null, function* () {
93
- yield l(), yield Promise.all([E(), S(!0)]), p();
94
- });
95
- }
96
- function ae() {
97
- return t(this, null, function* () {
98
- yield l(), yield s("Validating commit message", yield i.commitLint()), p();
99
- });
100
- }
101
- function C() {
102
- return t(this, null, function* () {
103
- yield s("Configuring Git hooks", yield i.configureGitHook()), v(o.GIT_HOOK);
104
- const e = yield N(D);
105
- w(o.SIMPLE_GIT_HOOKS_JSON, JSON.stringify(e, null, 4));
106
- const n = `
107
- ${j}
108
- `;
109
- b(o.GIT_IGNORE) ? P(o.GIT_IGNORE, "utf-8").split(`
110
- `).includes(j) || B(o.GIT_IGNORE, n) : w(o.GIT_IGNORE, n), yield s("Setting up simple-git-hooks", yield i.simpleGitHooks());
111
- });
112
- }
113
- function de() {
114
- return t(this, null, function* () {
115
- yield k(), yield C();
116
- });
117
- }
118
- function le() {
119
- return t(this, null, function* () {
120
- v(o.NODE_MODULES, o.PNPM_LOCK_YAML), yield s("Pruning pnpm store", yield i.pnpmPruneStore()), yield s("Clearing pnpm cache", yield i.pnpmCleanCache()), yield k(), yield C();
121
- });
122
- }
123
- function pe() {
124
- return t(this, null, function* () {
125
- yield s("Inspecting project dependencies", yield i.nodeModulesInspect());
126
- });
127
- }
128
- function ge() {
129
- return t(this, null, function* () {
130
- yield s("Running unit tests", yield i.testUnit());
131
- });
132
- }
133
- function me() {
134
- return t(this, null, function* () {
135
- yield s("Running end-to-end tests", yield i.testE2e());
136
- });
137
- }
138
- function xe(e) {
139
- return t(this, null, function* () {
140
- yield s("Creating MongoDB migration", yield i.mongoMigrateCreate(e));
141
- });
142
- }
143
- function ue() {
144
- return t(this, null, function* () {
145
- yield s("Running MongoDB migrations", yield i.mongoMigrateUp());
146
- });
147
- }
148
- function ye() {
149
- return t(this, null, function* () {
150
- yield s("Rolling back MongoDB migration", yield i.mongoMigrateDown());
151
- });
152
- }
153
- t(null, null, function* () {
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", {
156
- describe: "Migration name",
157
- type: "string"
158
- }), (e) => t(null, null, function* () {
159
- if (!e.name) {
160
- d.error("Migration name is required.");
161
- return;
162
- }
163
- yield xe(e.name);
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
- `).parse();
166
- } catch (e) {
167
- F(e), x.exit(1);
168
- }
169
- });
170
- });
171
- export default fe();
@@ -1 +0,0 @@
1
- "use strict";require("./cli.util.cjs");
@@ -1 +0,0 @@
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.type-CMvG6Box.cjs");require("../log/log.util.cjs");const r=require("../../../path.constant-CWtb99gS.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 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../path.constant-CWtb99gS.cjs");exports.E_CommandType=r.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 +0,0 @@
1
- "use strict";var P=Object.defineProperty;var o=Object.getOwnPropertySymbols;var p=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var d=(e,r,s)=>r in e?P(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,y=(e,r)=>{for(var s in r||(r={}))p.call(r,s)&&d(e,s,r[s]);if(o)for(var s of o(r))q.call(r,s)&&d(e,s,r[s]);return e};var x=(e,r)=>{var s={};for(var t in e)p.call(e,t)&&r.indexOf(t)<0&&(s[t]=e[t]);if(e!=null&&o)for(var t of o(e))r.indexOf(t)<0&&q.call(e,t)&&(s[t]=e[t]);return s};var b=(e,r,s)=>new Promise((t,n)=>{var u=c=>{try{l(s.next(c))}catch(f){n(f)}},a=c=>{try{l(s.throw(c))}catch(f){n(f)}},l=c=>c.done?t(c.value):Promise.resolve(c.value).then(u,a);l((s=s.apply(e,r)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("@nestjs/core"),A=require("body-parser"),N=require("compression"),O=require("cookie-parser"),m=require("cors"),i=require("express"),G=require("express-session"),H=require("express-useragent"),I=require("graphql-upload/graphqlUploadExpress.mjs");function S(t){var n=t,{isDev:e,whiteList:r}=n,s=x(n,["isDev","whiteList"]);return y({origin:(u,a)=>{e||!u||r!=null&&r.includes(u!=null?u:"")?a(null,!0):a(new Error("Not allowed by CORS"),!1)},credentials:!0},s)}function M(e){return m(S(e))}function j(e){return G(e)}function C(e){e.set("trust proxy",1),e.use(O()),e.use(i.urlencoded({extended:!0})),e.use(N()),e.use(H.express())}function E(e,r){r&&(Array.isArray(r)?r:[r]).forEach(t=>{e.use(i.static(t))})}function v(e){const r=i();return C(r),E(r,e==null?void 0:e.static),r.use(I()),r}function R(e){return b(this,null,function*(){const r=yield g.NestFactory.create(e.module);return C(r.getHttpAdapter().getInstance()),E(r.getHttpAdapter().getInstance(),e.static),e.filters&&r.useGlobalFilters(...e.filters),e.pipes&&r.useGlobalPipes(...e.pipes),r})}exports.bodyParser=A;exports.express=i;exports.createCors=M;exports.createCorsOptions=S;exports.createExpress=v;exports.createNest=R;exports.createSession=j;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("express"),e=require("./express.util.cjs"),s=require("body-parser");Object.defineProperty(exports,"Router",{enumerable:!0,get:()=>r.Router});exports.express=r;exports.createCors=e.createCors;exports.createCorsOptions=e.createCorsOptions;exports.createExpress=e.createExpress;exports.createNest=e.createNest;exports.createSession=e.createSession;exports.bodyParser=s;
@@ -1 +0,0 @@
1
- "use strict";var F=Object.defineProperty;var y=Object.getOwnPropertySymbols;var u=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;var a=(e,n,c)=>n in e?F(e,n,{enumerable:!0,configurable:!0,writable:!0,value:c}):e[n]=c,d=(e,n)=>{for(var c in n||(n={}))u.call(n,c)&&a(e,c,n[c]);if(y)for(var c of y(n))s.call(n,c)&&a(e,c,n[c]);return e};var l=(e,n)=>{var c={};for(var r in e)u.call(e,r)&&n.indexOf(r)<0&&(c[r]=e[r]);if(e!=null&&y)for(var r of y(e))n.indexOf(r)<0&&s.call(e,r)&&(c[r]=e[r]);return c};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("fs-extra"),p=require("node:path"),x=t,{lstatSync:v,readdirSync:E,mkdirSync:h,readFileSync:k,unlinkSync:g,statSync:f,createWriteStream:w}=t,J=t.readJsonSync;function b(e,n,c){t.writeFileSync(e,n,c!=null?c:"utf-8")}function q(e,n,c){t.appendFileSync(e,n,c!=null?c:"utf-8")}function o(...e){return e.every(n=>t.pathExistsSync(n))}function W(...e){e.forEach(n=>{o(n)&&t.removeSync(n)})}function j(e,n,c={}){const S=c,{extensions:r}=S,m=l(S,["extensions"]);t.copySync(e,n,d({filter:i=>f(i).isDirectory()||!r||r.length===0?!0:r.includes(p.extname(i))},m))}exports.appendFileSync=q;exports.copySync=j;exports.createWriteStream=w;exports.fs=x;exports.lstatSync=v;exports.mkdirSync=h;exports.pathExistsSync=o;exports.readFileSync=k;exports.readJsonSync=J;exports.readdirSync=E;exports.removeSync=W;exports.statSync=f;exports.unlinkSync=g;exports.writeFileSync=b;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./fs.util.cjs");exports.appendFileSync=e.appendFileSync;exports.copySync=e.copySync;exports.createWriteStream=e.createWriteStream;exports.fs=e.fs;exports.lstatSync=e.lstatSync;exports.mkdirSync=e.mkdirSync;exports.pathExistsSync=e.pathExistsSync;exports.readFileSync=e.readFileSync;exports.readJsonSync=e.readJsonSync;exports.readdirSync=e.readdirSync;exports.removeSync=e.removeSync;exports.statSync=e.statSync;exports.unlinkSync=e.unlinkSync;exports.writeFileSync=e.writeFileSync;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../../log.type-CMvG6Box.cjs"),r=require("./log.util.cjs");exports.E_IssueType=o.E_IssueType;exports.catchError=r.catchError;exports.log=r.log;exports.throwError=r.throwError;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("chalk"),r=require("consola"),u=require("graphql"),i=require("../../config/env/env.util.cjs"),E=require("../../constant/response-status.cjs"),h=i.getEnv();function R({message:o,status:e=E.RESPONSE_STATUS.INTERNAL_SERVER_ERROR,type:t="graphql"}){var n;const c=(n=o!=null?o:e.MESSAGE)!=null?n:"Internal server error";throw t==="graphql"?new u.GraphQLError(c,{extensions:{code:e.CODE}}):new Error(c)}h.DEBUG||(r.level=4);function g(o){const e=a[o];return typeof e=="function"?e:a.green}const f={silent:r.silent,level:r.level,fatal:r.fatal,error:r.error,warn:r.warn,log:r.log,info:r.info,success:r.success,ready:r.ready,start:r.start,box:r.box,debug:r.debug,trace:r.trace,verbose:r.verbose,printBoxedLog(o,e,t="red"){if(!(e!=null&&e.length)){r.box(a.green(o));return}e.forEach(({file:c,position:n,rule:l,message:s})=>{r.log(`${a.gray("File:")} ${a.blue(`${c}${n?`:${n}`:""}`)}`),l&&r.log(` ${g(t)("Rule:")} ${l}`),r.log(` ${g(t)("Message:")} ${s}`)}),r.box(g(t)(`${o} : ${e.length}`)),r.log(a.gray("─".repeat(40)))}};function S(o,e){const{shouldLog:t=!0,returnValue:c,callback:n}=e!=null?e:{},l=o instanceof Error?o:new Error(typeof o=="string"?o:"Unknown error");return t&&f.error(l.message),n&&typeof n=="function"&&n(l),c||{success:!1,message:l.message,code:E.RESPONSE_STATUS.INTERNAL_SERVER_ERROR.CODE}}exports.catchError=S;exports.log=f;exports.throwError=R;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./mongo.constant.cjs"),n=require("mongodb"),t=require("mongoose"),e=require("./mongo.util.cjs"),s=require("mongoose-aggregate-paginate-v2"),g=require("mongoose-paginate-v2");class l extends n.Db{}class c extends t.Document{}class _ extends t.Model{}class a extends n.Collection{}exports.MONGO_MIGRATE_OPTIONS=r.MONGO_MIGRATE_OPTIONS;exports.MongoController=e.MongoController;exports.MongooseController=e.MongooseController;exports.mongo=e.mongo;exports.aggregatePaginate=s;exports.mongoosePaginate=g;exports.C_Collection=a;exports.C_Db=l;exports.C_Document=c;exports.C_Model=_;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O="MONGO_MIGRATE_OPTIONS";exports.MONGO_MIGRATE_OPTIONS=O;
@@ -1,5 +0,0 @@
1
- "use strict";var x=Object.defineProperty,C=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var b=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var R=(c,t,e)=>t in c?x(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(p)for(var e of p(t))I.call(t,e)&&R(c,e,t[e]);return c},S=(c,t)=>C(c,M(t));var T=(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(h){s(h)}},u=l=>{try{i(e.throw(l))}catch(h){s(h)}},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("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"),m=require("../../../path.constant-CWtb99gS.cjs");require("../path/path.util.cjs");const y={createGenericFields(){return{id:w.v4(),isDel:!1,createdAt:new Date,updatedAt:new Date}},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(y.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=y.createSchema({mongoose:c,schema:e,virtuals:n});return y.applyPlugins(i,[r&&A,s&&D]),y.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({},P),{setConfig:c=>{const t=`// This file is automatically generated by the Cyberskill CLI.
2
- module.exports = ${JSON.stringify(c,null,4)}`;E.writeFileSync(m.PATH.MIGRATE_MONGO_CONFIG,t);const e=`
3
- ${m.MIGRATE_MONGO_CONFIG}
4
- `;E.pathExistsSync(m.PATH.GIT_IGNORE)?E.readFileSync(m.PATH.GIT_IGNORE,"utf-8").split(`
5
- `).includes(m.MIGRATE_MONGO_CONFIG)||E.appendFileSync(m.PATH.GIT_IGNORE,e):E.writeFileSync(m.PATH.GIT_IGNORE,e)}}),regexify(c,t){if(!c)return{};let e=f.deepClone(c);if(!t||t.length===0)return e;for(const r of t){const s=r.toString().split("."),n=f.getNestedValue(e,s);if(typeof n=="string"&&n.length>0){const u={$regex:`.*${U.regexSearchMapper(n)}.*`,$options:"i"};e=f.setNestedValue(e,s,u)}}return e}};class F{constructor(t,e){T(this,"collection");this.collection=t.collection(e)}createOne(t){return a(this,null,function*(){try{const e=g(g({},y.createGenericFields()),t);return(yield this.collection.insertOne(e)).acknowledged?{success:!0,message:"Document created successfully",result:e}:{success:!1,message:"Document creation failed",code:d.RESPONSE_STATUS.INTERNAL_SERVER_ERROR.CODE}}catch(e){return o.catchError(e)}})}createMany(t){return a(this,null,function*(){try{const e=t.map(s=>g(g({},y.createGenericFields()),s)),r=yield this.collection.insertMany(e);return r.insertedCount===0?{success:!1,message:"No documents were inserted",code:d.RESPONSE_STATUS.INTERNAL_SERVER_ERROR.CODE}:{success:!0,message:`${r.insertedCount} documents created successfully`,result:e}}catch(e){return o.catchError(e)}})}findOne(t){return a(this,null,function*(){try{const e=yield this.collection.findOne(t);return e?{success:!0,message:"Document found",result:e}:{success:!1,message:"Document not found",code:d.RESPONSE_STATUS.NOT_FOUND.CODE}}catch(e){return o.catchError(e)}})}findAll(){return a(this,arguments,function*(t={}){try{return{success:!0,message:"Documents retrieved successfully",result:yield this.collection.find(t).toArray()}}catch(e){return o.catchError(e)}})}count(){return a(this,arguments,function*(t={}){try{return{success:!0,message:"Count retrieved successfully",result:yield this.collection.countDocuments(t)}}catch(e){return o.catchError(e)}})}updateOne(t,e){return a(this,null,function*(){try{const r=yield this.collection.updateOne(t,{$set:e});return r.matchedCount===0?{success:!1,message:"No documents matched the filter",code:d.RESPONSE_STATUS.INTERNAL_SERVER_ERROR.CODE}:{success:!0,message:"Document updated successfully",result:r}}catch(r){return o.catchError(r)}})}updateMany(t,e){return a(this,null,function*(){try{const r=yield this.collection.updateMany(t,{$set:e});return r.matchedCount===0?{success:!1,message:"No documents matched the filter",code:d.RESPONSE_STATUS.INTERNAL_SERVER_ERROR.CODE}:{success:!0,message:"Documents updated successfully",result:r}}catch(r){return o.catchError(r)}})}deleteOne(t){return a(this,null,function*(){try{const e=yield this.collection.deleteOne(t);return e.deletedCount===0?{success:!1,message:"No documents matched the filter",code:d.RESPONSE_STATUS.INTERNAL_SERVER_ERROR.CODE}:{success:!0,message:"Document deleted successfully",result:e}}catch(e){return o.catchError(e)}})}deleteMany(t){return a(this,null,function*(){try{const e=yield this.collection.deleteMany(t);return e.deletedCount===0?{success:!1,message:"No documents matched the filter",code:d.RESPONSE_STATUS.INTERNAL_SERVER_ERROR.CODE}:{success:!0,message:"Documents deleted successfully",result:e}}catch(e){return o.catchError(e)}})}}class ${constructor(t){this.model=t}getModelName(){return this.model.modelName}findOne(){return a(this,arguments,function*(t={},e={},r={},s){try{const n=this.model.findOne(t,e,r);s&&n.populate(s);const u=yield n.exec();return u?{success:!0,result:u}:{success:!1,message:`No ${this.getModelName()} found.`,code:d.RESPONSE_STATUS.NOT_FOUND.CODE}}catch(n){return o.catchError(n)}})}findAll(){return a(this,arguments,function*(t={},e={},r={},s){try{const n=this.model.find(t,e,r);return s&&n.populate(s),{success:!0,result:yield n.exec()}}catch(n){return o.catchError(n)}})}findPaging(){return a(this,arguments,function*(t={},e={}){try{return{success:!0,result:yield this.model.paginate(t,e)}}catch(r){return o.catchError(r)}})}findPagingAggregate(r){return a(this,arguments,function*(t,e={}){try{return{success:!0,result:yield this.model.aggregatePaginate(this.model.aggregate(t),e)}}catch(s){return o.catchError(s)}})}count(){return a(this,arguments,function*(t={}){try{return{success:!0,result:yield this.model.countDocuments(t)}}catch(e){return o.catchError(e)}})}createOne(t){return a(this,null,function*(){try{return{success:!0,result:yield this.model.create(t)}}catch(e){return o.catchError(e)}})}createMany(r){return a(this,arguments,function*(t,e={}){try{return{success:!0,result:(yield this.model.insertMany(t,e)).map(u=>u instanceof G.Document?u.toObject():null).filter(u=>u!==null)}}catch(s){return o.catchError(s)}})}updateOne(){return a(this,arguments,function*(t={},e={},r={}){try{const s=yield this.model.findOneAndUpdate(t,e,g({new:!0},r)).exec();return s?{success:!0,result:s}:{success:!1,message:`Failed to update ${this.getModelName()}.`,code:d.RESPONSE_STATUS.NOT_FOUND.CODE}}catch(s){return o.catchError(s)}})}updateMany(){return a(this,arguments,function*(t={},e={},r={}){try{return{success:!0,result:yield this.model.updateMany(t,e,r).exec()}}catch(s){return o.catchError(s)}})}deleteOne(){return a(this,arguments,function*(t={},e={}){try{const r=yield this.model.findOneAndDelete(t,e).exec();return r?{success:!0,result:r}:{success:!1,message:`No ${this.getModelName()} found to delete.`,code:d.RESPONSE_STATUS.NOT_FOUND.CODE}}catch(r){return o.catchError(r)}})}deleteMany(){return a(this,arguments,function*(t={},e={}){try{const r=yield this.model.deleteMany(t,e).exec();return r.deletedCount===0?{success:!1,message:"No documents found to delete.",code:d.RESPONSE_STATUS.NOT_FOUND.CODE}:{success:!0,result:r}}catch(r){return o.catchError(r)}})}createShortId(t,e=4){return a(this,null,function*(){try{const s=new Set;for(let n=0;n<10;n++){const u=O.generateShortId(t,n+e);if(!s.has(u)&&(s.add(u),!(yield this.model.exists({shortId:u}))))return{success:!0,result:u}}return{success:!1,message:"Failed to create a unique shortId",code:d.RESPONSE_STATUS.INTERNAL_SERVER_ERROR.CODE}}catch(r){return o.catchError(r)}})}createSlugQuery({slug:t,field:e,isObject:r,filter:s}){const n=g({},s!=null?s:{});return r?S(g({},n),{$or:[{[`slug.${e}`]:t},{slugHistory:{$elemMatch:{[`slug.${e}`]:t}}}]}):S(g({},n),{$or:[{slug:t},{slugHistory:t}]})}createUniqueSlug(n){return a(this,arguments,function*({slug:t,field:e,isObject:r,filter:s}){const u=O.generateSlug(t);let i=u,l=1;for(;yield this.model.exists(this.createSlugQuery({slug:i,field:e,isObject:r,filter:s}));)i=`${u}-${l++}`;return i})}createSlug(s){return a(this,arguments,function*({field:t,from:e,filter:r}){try{const n=e[t];return f.isObject(n)?{success:!0,result:Object.fromEntries(yield Promise.all(Object.entries(n).map(q=>a(this,[q],function*([h,_]){const N=yield this.createUniqueSlug({slug:_,field:h,isObject:!0,filter:r});return[h,N]}))))}:{success:!0,result:yield this.createUniqueSlug({slug:n,field:t,isObject:!1,filter:r})}}catch(n){return o.catchError(n)}})}checkSlug(n){return a(this,arguments,function*({slug:t,field:e,from:r,filter:s}){try{const u=r[e];if(f.isObject(u)){for(const _ of Object.values(u)){const q=O.generateSlug(_);if(yield this.model.exists(this.createSlugQuery({slug:q,field:e,isObject:!0,filter:s})))return{success:!0,result:!0}}return{success:!0,result:!1}}const l=O.generateSlug(t);return{success:!0,result:(yield this.model.exists(this.createSlugQuery({slug:l,field:e,isObject:!1,filter:s})))!==null}}catch(u){return o.catchError(u)}})}aggregate(t){return a(this,null,function*(){try{return{success:!0,result:yield this.model.aggregate(t)}}catch(e){return o.catchError(e)}})}}exports.aggregatePaginate=D;exports.mongoosePaginate=A;exports.MongoController=F;exports.MongooseController=$;exports.mongo=y;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../path.constant-CWtb99gS.cjs");exports.E_PackageType=e.E_PackageType;exports.getLatestPackageVersion=e.getLatestPackageVersion;exports.getPackage=e.getPackage;exports.installDependencies=e.installDependencies;exports.setupPackages=e.setupPackages;exports.updatePackage=e.updatePackage;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("node-fetch");require("../../config/env/env.util.cjs");const e=require("../../../path.constant-CWtb99gS.cjs");require("../fs/fs.util.cjs");require("../log/log.util.cjs");require("../path/path.util.cjs");exports.getLatestPackageVersion=e.getLatestPackageVersion;exports.getPackage=e.getPackage;exports.installDependencies=e.installDependencies;exports.setupPackages=e.setupPackages;exports.updatePackage=e.updatePackage;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../../../path.constant-CWtb99gS.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 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("fs-extra");require("../../config/env/env.util.cjs");const _=require("../../../path.constant-CWtb99gS.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;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("node:path"),o=require("../../config/env/env.util.cjs"),t=o.getEnv(),n=r,i=n.dirname;function s(...e){return n.resolve(t.CWD,...e)}function c(...e){return n.resolve(...e)}function u(...e){return n.join(...e)}exports.dirname=i;exports.join=u;exports.path=n;exports.resolve=c;exports.resolveWorkingPath=s;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./storage.util.cjs");exports.storage=e.storage;
@@ -1 +0,0 @@
1
- "use strict";var a=(r,t,n)=>new Promise((g,y)=>{var h=e=>{try{i(n.next(e))}catch(u){y(u)}},E=e=>{try{i(n.throw(e))}catch(u){y(u)}},i=e=>e.done?g(e.value):Promise.resolve(e.value).then(h,E);i((n=n.apply(r,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("node-persist"),_=require("../../config/env/env.util.cjs"),c=require("../log/log.util.cjs"),l=_.getEnv();function s(){return a(this,null,function*(){o.defaultInstance||(yield o.init({dir:l.CYBERSKILL_STORAGE_DIRECTORY}))})}const w={get(r){return a(this,null,function*(){try{yield s();const t=yield o.getItem(r);return t!=null?t:null}catch(t){return c.catchError(t,{returnValue:null})}})},set(r,t){return a(this,null,function*(){try{yield s(),yield o.setItem(r,t)}catch(n){c.catchError(n)}})},remove(r){return a(this,null,function*(){try{yield s(),yield o.removeItem(r)}catch(t){c.catchError(t)}})},keys(){return a(this,null,function*(){try{yield s();const r=yield o.keys();return Array.isArray(r)?r:(c.log.warn("[Storage:keys] Invalid keys response:",r),[])}catch(r){return c.catchError(r,{returnValue:[]})}})},getLogLink(r){return a(this,null,function*(){try{return`${l.CYBERSKILL_STORAGE_DIRECTORY} (key: ${r})`}catch(t){return c.catchError(t,{returnValue:null})}})}};exports.storage=w;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../upload.util-CE3MjBdh.cjs");exports.E_UploadType=e.E_UploadType;exports.createUploadConfig=e.createUploadConfig;exports.upload=e.upload;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../fs/fs.util.cjs");require("../../../path.constant-CWtb99gS.cjs");require("../path/path.util.cjs");const e=require("../../../upload.util-CE3MjBdh.cjs");exports.createUploadConfig=e.createUploadConfig;exports.upload=e.upload;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ts.util.cjs");exports.createWSServer=e.createWSServer;exports.initGraphQLWS=e.initGraphQLWS;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("graphql-ws/use/ws"),t=require("ws");function c(e){return new t.WebSocketServer({server:e.server,path:e.path})}function n(e){return r.useServer({schema:e.schema},e.server)}exports.createWSServer=c;exports.initGraphQLWS=n;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@apollo/client/react/react.cjs"),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.context.cjs"),p=require("./apollo-client.util.cjs");function s({options:r,children:t}){const o=e.useMemo(()=>p.getClient(r||{}),[r]);return e.createElement(e.Fragment,null,e.createElement(c.ApolloErrorProvider,null,e.createElement(a.ApolloClientProvider,{client:o},e.createElement(l.ApolloProvider,{client:o},t)),e.createElement(n.ApolloErrorComponent,null)),e.createElement(i.Toaster,{position:"top-right"}))}exports.ApolloProvider=s;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="/graphql";exports.GRAPHQL_URI_DEFAULT=e;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=e.createContext(null);function n({client:o,children:l}){return e.createElement(t,{value:o},l)}exports.ApolloClientContext=t;exports.ApolloClientProvider=n;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),o=require("./apollo-client.context.cjs");function l(){const e=t.use(o.ApolloClientContext);if(!e)throw new Error("useApolloClient must be used within an ApolloClientProvider");return e}exports.useApolloClient=l;
@@ -1 +0,0 @@
1
- "use strict";var j=Object.defineProperty;var w=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var L=(t,e,n)=>e in t?j(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,U=(t,e)=>{for(var n in e||(e={}))R.call(e,n)&&L(t,n,e[n]);if(w)for(var n of w(e))x.call(e,n)&&L(t,n,e[n]);return t};var h=(t,e,n)=>L(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("@apollo/client/core/core.cjs"),f=require("@apollo/client/link/core/core.cjs"),G=require("@apollo/client/link/error/error.cjs"),P=require("@apollo/client/link/remove-typename/remove-typename.cjs"),S=require("@apollo/client/link/subscriptions/subscriptions.cjs"),I=require("@apollo/client/utilities/utilities.cjs"),F=require("apollo-upload-client/createUploadLink.mjs"),H=require("graphql-ws"),q=require("react"),M=require("../apollo-error/apollo-error.util.cjs"),c=require("../log/log.util.cjs"),T=require("react-hot-toast"),v=require("./apollo-client.constant.cjs");class C extends f.ApolloLink{constructor(){super(...arguments);h(this,"count",0)}request(n,r){const g=Date.now();return this.count+=1,r(n).map(d=>{const p=Date.now()-g,a=n.operationName||"Unnamed";return c.log.info(`[Apollo] #${this.count}: ${a} (${p}ms)`),d})}}function D(t){const{uri:e,wsUrl:n,customLinks:r}=t,g=new C,d=G.onError(({graphQLErrors:o,networkError:i,protocolErrors:s,operation:m})=>{var y,$;const N=(m==null?void 0:m.operationName)||"Unknown";if(o&&o.forEach(({message:l,locations:u,path:_})=>{c.log.error(`[GraphQL error] ${N}: ${l}, Location: ${JSON.stringify(u,null,4)}, Path: ${_}`)}),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=((y=o==null?void 0:o[0])==null?void 0:y.message)||(($=s==null?void 0:s[0])==null?void 0:$.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:m}});typeof window!="undefined"&&T.toast.error(_=>q.createElement(q.Fragment,null,l," ",q.createElement("button",{type:"button",className:"text-blue-500 hover:text-blue-700",onClick:()=>{setTimeout(()=>{M.showGlobalApolloError(u)},0),T.toast.dismiss(_.id)}},"Show Details")))}}),p=P.removeTypenameFromVariables();e||c.log.warn(`[Apollo] No GraphQL URI provided — using "${v.GRAPHQL_URI_DEFAULT}" as default`);const a=F({uri:e!=null?e:v.GRAPHQL_URI_DEFAULT,credentials:"include",headers:{"apollo-require-preflight":"true"}}),A=n?new S.GraphQLWsLink(H.createClient({url:n})):f.ApolloLink.empty(),b=A instanceof f.ApolloLink?f.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,d,p,...r!=null?r:[],b]}function O(t={}){const e=f.from(D(t));return new k.ApolloClient(U({link:e,cache:new k.InMemoryCache},t))}exports.DevLoggerLink=C;exports.createApolloLinks=D;exports.getClient=O;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./apollo-client.component.cjs"),o=require("./apollo-client.constant.cjs"),t=require("./apollo-client.context.cjs");require("react");const r=require("./apollo-client.util.cjs"),n=require("@apollo/client/cache/cache.cjs"),e=require("@apollo/client/react/hooks/hooks.cjs");exports.ApolloProvider=u.ApolloProvider;exports.GRAPHQL_URI_DEFAULT=o.GRAPHQL_URI_DEFAULT;exports.ApolloClientContext=t.ApolloClientContext;exports.ApolloClientProvider=t.ApolloClientProvider;exports.DevLoggerLink=r.DevLoggerLink;exports.createApolloLinks=r.createApolloLinks;exports.getClient=r.getClient;Object.defineProperty(exports,"makeVar",{enumerable:!0,get:()=>n.makeVar});Object.defineProperty(exports,"useApolloClient",{enumerable:!0,get:()=>e.useApolloClient});Object.defineProperty(exports,"useBackgroundQuery",{enumerable:!0,get:()=>e.useBackgroundQuery});Object.defineProperty(exports,"useFragment",{enumerable:!0,get:()=>e.useFragment});Object.defineProperty(exports,"useLazyQuery",{enumerable:!0,get:()=>e.useLazyQuery});Object.defineProperty(exports,"useLoadableQuery",{enumerable:!0,get:()=>e.useLoadableQuery});Object.defineProperty(exports,"useMutation",{enumerable:!0,get:()=>e.useMutation});Object.defineProperty(exports,"useQuery",{enumerable:!0,get:()=>e.useQuery});Object.defineProperty(exports,"useQueryRefHandlers",{enumerable:!0,get:()=>e.useQueryRefHandlers});Object.defineProperty(exports,"useReactiveVar",{enumerable:!0,get:()=>e.useReactiveVar});Object.defineProperty(exports,"useReadQuery",{enumerable:!0,get:()=>e.useReadQuery});Object.defineProperty(exports,"useSubscription",{enumerable:!0,get:()=>e.useSubscription});Object.defineProperty(exports,"useSuspenseFragment",{enumerable:!0,get:()=>e.useSuspenseFragment});Object.defineProperty(exports,"useSuspenseQuery",{enumerable:!0,get:()=>e.useSuspenseQuery});
@@ -1 +0,0 @@
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;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@apollo/client-integration-nextjs"),l=require("./apollo-client-nextjs.util.cjs"),i=(e={})=>t.registerApolloClient(()=>l.getClient(e));exports.makeClient=i;
@@ -1 +0,0 @@
1
- "use strict";var i=Object.defineProperty;var l=Object.getOwnPropertySymbols;var a=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;var o=(t,e,n)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,r=(t,e)=>{for(var n in e||(e={}))a.call(e,n)&&o(t,n,e[n]);if(l)for(var n of l(e))s.call(e,n)&&o(t,n,e[n]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@apollo/client-integration-nextjs"),u=require("@apollo/client/link/core/core.cjs"),C=require("../apollo-client/apollo-client.util.cjs");function g(t={}){const e=u.from(C.createApolloLinks(t));return new c.ApolloClient(r({link:e,cache:new c.InMemoryCache},t))}exports.getClient=g;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./apollo-client-nextjs.component.cjs"),t=require("./apollo-client-nextjs.util.cjs");exports.ApolloProvider=e.ApolloProvider;exports.getClient=t.getClient;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),s=require("./apollo-error.context.cjs"),t={"modal-backdrop":"_modal-backdrop_8fveh_1","modal-content":"_modal-content_8fveh_11","btn-close":"_btn-close_8fveh_22","error-title":"_error-title_8fveh_36","btn-retry":"_btn-retry_8fveh_41","error-details":"_error-details_8fveh_54"};function m(){const o=e.use(s.ApolloErrorContext),r=o==null?void 0:o.error;if(!r)return null;const n=(c,l)=>l!=null&&l.length?e.createElement("div",null,e.createElement("strong",null,c,":"),e.createElement("ul",null,l.map(a=>e.createElement("li",{key:a.message},a.message)))):null;return e.createElement("div",{className:t["modal-backdrop"]},e.createElement("div",{className:t["modal-content"]},e.createElement("button",{type:"button",className:t["btn-close"],onClick:o.hideError},"✕"),e.createElement("div",{className:t["error-title"]},e.createElement("button",{type:"button",className:t["btn-retry"],onClick:()=>window.location.reload()},"Reload")," ",r.message),e.createElement("div",{className:t["error-details"]},r.networkError&&e.createElement("pre",{className:"network"},e.createElement("strong",null,"Network Error:")," ",r.networkError.message),n("GraphQL Errors",[...r.graphQLErrors]),n("Protocol Errors",[...r.protocolErrors]),n("Client Errors",[...r.clientErrors]),r.extraInfo&&e.createElement("pre",{className:"extra"},e.createElement("strong",null,"Extra Info:")," ",JSON.stringify(r.extraInfo,null,4)))))}exports.ApolloErrorComponent=m;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),t=o.createContext(void 0);exports.ApolloErrorContext=t;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),e=require("./apollo-error.context.cjs");function t(){const r=o.use(e.ApolloErrorContext);if(!r)throw new Error("useApolloError must be used within ApolloErrorProvider");return r}exports.useApolloError=t;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),c=require("./apollo-error.context.cjs"),a=require("./apollo-error.util.cjs");function n({children:l}){const[e,o]=r.useState(null);r.useEffect(()=>{a.setGlobalApolloErrorCallback(o)},[]);const t=r.useMemo(()=>({error:e,showError:o,hideError:()=>o(null)}),[e]);return r.createElement(c.ApolloErrorContext,{value:t},l)}exports.ApolloErrorProvider=n;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let l=null;function r(o){l=o}function t(o){l==null||l(o)}exports.setGlobalApolloErrorCallback=r;exports.showGlobalApolloError=t;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./apollo-error.component.cjs"),l=require("./apollo-error.context.cjs"),e=require("./apollo-error.hook.cjs"),t=require("./apollo-error.provider.cjs"),r=require("./apollo-error.util.cjs");exports.ApolloErrorComponent=o.ApolloErrorComponent;exports.ApolloErrorContext=l.ApolloErrorContext;exports.useApolloError=e.useApolloError;exports.ApolloErrorProvider=t.ApolloErrorProvider;exports.setGlobalApolloErrorCallback=r.setGlobalApolloErrorCallback;exports.showGlobalApolloError=r.showGlobalApolloError;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react-i18next"),t=e.useTranslation;exports.useTranslateI18next=t;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("i18next"),n=require("react-i18next");function i(t){return e.use(n.initReactI18next).init(t)}exports.initI18next=i;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./i18next.hook.cjs"),t=require("./i18next.util.cjs");exports.useTranslateI18next=e.useTranslateI18next;exports.initI18next=t.initI18next;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./loading.component.cjs"),e=require("./loading.context.cjs"),n=require("./loading.hook.cjs"),i=require("./loading.provider.cjs");exports.Loading=o.Loading;exports.LoadingContext=e.LoadingContext;exports.useLoading=n.useLoading;exports.LoadingProvider=i.LoadingProvider;
@@ -1,6 +0,0 @@
1
- "use strict";var E=Object.defineProperty;var l=Object.getOwnPropertySymbols;var m=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;var d=(e,t,n)=>t in e?E(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,g=(e,t)=>{for(var n in t||(t={}))m.call(t,n)&&d(e,n,t[n]);if(l)for(var n of l(t))u.call(t,n)&&d(e,n,t[n]);return e};var f=(e,t)=>{var n={};for(var o in e)m.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&l)for(var o of l(e))t.indexOf(o)<0&&u.call(e,o)&&(n[o]=e[o]);return n};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("clsx"),c=require("react"),b="_full_b1d9o_1",y="_block_b1d9o_2",L="_container_b1d9o_40",N="_ring_b1d9o_50",h="_message_b1d9o_74",r={full:b,block:y,container:L,ring:N,message:h};function p(){if(document.getElementById("noscroll-style"))return;const e=document.createElement("style");e.id="noscroll-style",e.innerHTML=`
2
- .noscroll {
3
- overflow: hidden !important;
4
- height: 100vh !important;
5
- }
6
- `,document.head.appendChild(e)}function k(x){var s=x,{full:e=!1,className:t="",message:n="Loading"}=s,o=f(s,["full","className","message"]);c.useEffect(()=>{if(e){document.body.classList.add("noscroll");const i=_=>_.preventDefault();return document.addEventListener("contextmenu",i),()=>{document.body.classList.remove("noscroll"),document.removeEventListener("contextmenu",i)}}},[e]),c.useEffect(()=>{p()},[]);function a(){return c.createElement("div",g({className:r.container},o),c.createElement("div",{className:r.ring}),c.createElement("div",{className:r.ring}),c.createElement("div",{className:r.ring}),c.createElement("div",{className:r.ring}),n&&c.createElement("div",{className:r.message},n))}return e?c.createElement("div",{className:v(r.full,t)},a()):c.createElement("div",{className:v(r.block,t)},a())}exports.Loading=k;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),e=t.createContext(void 0);exports.LoadingContext=e;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),o=require("./loading.context.cjs");function n(){const e=t.use(o.LoadingContext);if(!e)throw new Error("useLoading must be used within a LoadingProvider");return e}exports.useLoading=n;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),d=require("./loading.component.cjs"),u=require("./loading.context.cjs");function g({children:l}){const[o,a]=e.useState(!1),[t,n]=e.useState(!1),s=e.useCallback((r=!1)=>{a(!0),n(r)},[]),i=e.useCallback(()=>{a(!1),n(!1)},[]),c=e.useMemo(()=>({isLoading:o,isGlobalLoading:t,showLoading:s,hideLoading:i}),[o,t,s,i]);return e.createElement(u.LoadingContext,{value:c},o?e.createElement(d.Loading,{full:t}):l)}exports.LoadingProvider=g;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./log.util.cjs");exports.catchError=r.catchError;exports.log=r.log;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("consola/browser"),t=require("../../constant/response-status.cjs"),n={silent:o.consola.silent,level:o.consola.level,fatal:o.consola.fatal,error:o.consola.error,warn:o.consola.warn,log:o.consola.log,info:o.consola.info,success:o.consola.success,ready:o.consola.ready,start:o.consola.start,box:o.consola.box,debug:o.consola.debug,trace:o.consola.trace,verbose:o.consola.verbose};function u(e,r){const{shouldLog:l=!0,returnValue:a,callback:s}=r!=null?r:{},c=e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error");return l&&n.error(c.message),s&&typeof s=="function"&&s(c),a||{success:!1,message:c.message,code:t.RESPONSE_STATUS.INTERNAL_SERVER_ERROR.CODE}}exports.catchError=u;exports.log=n;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./next-intl.constant.cjs"),n=require("./next-intl.context.cjs"),r=require("./next-intl.hoc.cjs"),t=require("./next-intl.hook.cjs"),_=require("./next-intl.provider.cjs");exports.NEXT_INTL_DEFAULT_LANGUAGE=e.NEXT_INTL_DEFAULT_LANGUAGE;exports.NextIntlContext=n.NextIntlContext;exports.withNextIntl=r.withNextIntl;exports.useNextIntl=t.useNextIntl;exports.useTranslateNextIntl=t.useTranslateNextIntl;exports.NextIntlProvider=_.NextIntlProvider;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("date-fns/locale"),r={label:"English",value:"en",flag:"🇺🇸",adapterLocale:e.enUS,icon:"flagpack:gb-nir",numberFormat:{code:"en-US",currency:"USD"},timezone:"America/New_York"};exports.NEXT_INTL_DEFAULT_LANGUAGE=r;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),e=t.createContext(void 0);exports.NextIntlContext=e;
@@ -1 +0,0 @@
1
- "use strict";var d=Object.defineProperty;var c=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var r=(n,e,t)=>e in n?d(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,_=(n,e)=>{for(var t in e||(e={}))f.call(e,t)&&r(n,t,e[t]);if(c)for(var t of c(e))v.call(e,t)&&r(n,t,e[t]);return n};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("next-intl"),I=require("react"),q=require("../log/log.util.cjs"),E=require("./next-intl.constant.cjs"),w=require("./next-intl.hook.cjs");function y(n){const e=t=>{var o,a;const{currentLanguage:l}=w.useNextIntl(),{messages:i,languages:m}=t,s="en",u=i[(l==null?void 0:l.value)||s],x=(a=(o=m.find(N=>N.value===(l==null?void 0:l.value)))==null?void 0:o.timezone)!=null?a:E.NEXT_INTL_DEFAULT_LANGUAGE.timezone;return i?I.createElement(h.NextIntlClientProvider,{locale:(l==null?void 0:l.value)||s,messages:u||null,timeZone:x},I.createElement(n,_({},t))):(q.log.warn(`Missing messages for language: ${(l==null?void 0:l.value)||s}`),null)};return e.displayName=`withNextIntl(${n.displayName||n.name||"Component"})`,e}exports.withNextIntl=y;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("next-intl"),n=require("react"),r=require("./next-intl.context.cjs");function s(){const t=n.use(r.NextIntlContext);if(!t)throw new Error("useNextIntl must be used within a NextIntlProvider");return t}const o=e.useTranslations;exports.useNextIntl=s;exports.useTranslateNextIntl=o;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),u=require("../storage/storage.hook.cjs");require("localforage");require("../log/log.util.cjs");const s=require("./next-intl.constant.cjs"),_=require("./next-intl.context.cjs"),l=require("./next-intl.hoc.cjs");function i({children:n}){return e.createElement(e.Fragment,null,n)}const x=l.withNextIntl(i);function I({children:n,languages:t,messages:o}){const{value:r,set:c}=u.useStorage("lang",t[0]),a=e.useMemo(()=>({languages:t,currentLanguage:r!=null?r:s.NEXT_INTL_DEFAULT_LANGUAGE,setCurrentLanguage:c}),[t,c,r]);return e.createElement(_.NextIntlContext,{value:a},e.createElement(x,{languages:t,messages:o},n))}exports.NextIntlProvider=I;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./storage.hook.cjs"),r=require("./storage.util.cjs");exports.useStorage=e.useStorage;exports.storage=r.storage;