@cyberskill/shared 2.28.0 → 3.1.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 (363) hide show
  1. package/dist/config/commitlint/index.js +1 -0
  2. package/dist/config/commitlint/index.js.map +1 -0
  3. package/dist/config/config.test.unit.d.ts +1 -0
  4. package/dist/config/config.type.js +1 -0
  5. package/dist/config/config.type.js.map +1 -0
  6. package/dist/config/config.type.test.unit.d.ts +1 -0
  7. package/dist/config/config.util.js +25 -33
  8. package/dist/config/config.util.js.map +1 -0
  9. package/dist/config/env/env.constant.js +1 -0
  10. package/dist/config/env/env.constant.js.map +1 -0
  11. package/dist/config/env/env.util.js +1 -0
  12. package/dist/config/env/env.util.js.map +1 -0
  13. package/dist/config/env/index.js +1 -0
  14. package/dist/config/env/index.js.map +1 -0
  15. package/dist/config/eslint/index.d.ts +4 -0
  16. package/dist/config/eslint/index.js +5 -12
  17. package/dist/config/eslint/index.js.map +1 -0
  18. package/dist/config/graphql-codegen/graphql-codegen.util.js +29 -33
  19. package/dist/config/graphql-codegen/graphql-codegen.util.js.map +1 -0
  20. package/dist/config/graphql-codegen/index.js +1 -0
  21. package/dist/config/graphql-codegen/index.js.map +1 -0
  22. package/dist/config/index.js +1 -0
  23. package/dist/config/index.js.map +1 -0
  24. package/dist/config/lint-staged/index.js +1 -0
  25. package/dist/config/lint-staged/index.js.map +1 -0
  26. package/dist/config/storybook/index.js +1 -0
  27. package/dist/config/storybook/index.js.map +1 -0
  28. package/dist/config/storybook/storybook.main.js +1 -0
  29. package/dist/config/storybook/storybook.main.js.map +1 -0
  30. package/dist/config/storybook/storybook.preview.js +11 -13
  31. package/dist/config/storybook/storybook.preview.js.map +1 -0
  32. package/dist/config/vitest/index.js +1 -0
  33. package/dist/config/vitest/index.js.map +1 -0
  34. package/dist/config/vitest/vitest.e2e.js +2 -1
  35. package/dist/config/vitest/vitest.e2e.js.map +1 -0
  36. package/dist/config/vitest/vitest.unit.js +20 -8
  37. package/dist/config/vitest/vitest.unit.js.map +1 -0
  38. package/dist/constant/common.js +2 -1
  39. package/dist/constant/common.js.map +1 -0
  40. package/dist/constant/constant.test.unit.d.ts +1 -0
  41. package/dist/constant/index.js +1 -0
  42. package/dist/constant/index.js.map +1 -0
  43. package/dist/constant/response-status.js +1 -0
  44. package/dist/constant/response-status.js.map +1 -0
  45. package/dist/node/apollo-server/apollo-server.util.js +22 -48
  46. package/dist/node/apollo-server/apollo-server.util.js.map +1 -0
  47. package/dist/node/apollo-server/index.js +1 -0
  48. package/dist/node/apollo-server/index.js.map +1 -0
  49. package/dist/node/cli/index.js +110 -165
  50. package/dist/node/cli/index.js.map +1 -0
  51. package/dist/node/command/command.test.unit.d.ts +1 -0
  52. package/dist/node/command/command.type.js +1 -0
  53. package/dist/node/command/command.type.js.map +1 -0
  54. package/dist/node/command/command.util.js +142 -169
  55. package/dist/node/command/command.util.js.map +1 -0
  56. package/dist/node/command/index.js +1 -0
  57. package/dist/node/command/index.js.map +1 -0
  58. package/dist/node/express/express.type.d.ts +4 -0
  59. package/dist/node/express/express.util.js +56 -71
  60. package/dist/node/express/express.util.js.map +1 -0
  61. package/dist/node/express/index.js +1 -0
  62. package/dist/node/express/index.js.map +1 -0
  63. package/dist/node/fs/fs.test.unit.d.ts +1 -0
  64. package/dist/node/fs/fs.util.js +46 -60
  65. package/dist/node/fs/fs.util.js.map +1 -0
  66. package/dist/node/fs/index.js +1 -0
  67. package/dist/node/fs/index.js.map +1 -0
  68. package/dist/node/log/index.js +1 -0
  69. package/dist/node/log/index.js.map +1 -0
  70. package/dist/node/log/log.test.unit.d.ts +1 -0
  71. package/dist/node/log/log.type.js +1 -0
  72. package/dist/node/log/log.type.js.map +1 -0
  73. package/dist/node/log/log.util.js +30 -30
  74. package/dist/node/log/log.util.js.map +1 -0
  75. package/dist/node/mongo/index.d.ts +2 -0
  76. package/dist/node/mongo/index.js +21 -12
  77. package/dist/node/mongo/index.js.map +1 -0
  78. package/dist/node/mongo/mongo.constant.js +1 -0
  79. package/dist/node/mongo/mongo.constant.js.map +1 -0
  80. package/dist/node/mongo/mongo.controller.d.ts +5 -315
  81. package/dist/node/mongo/mongo.controller.mongoose.d.ts +234 -0
  82. package/dist/node/mongo/mongo.controller.mongoose.js +468 -0
  83. package/dist/node/mongo/mongo.controller.mongoose.js.map +1 -0
  84. package/dist/node/mongo/mongo.controller.native.d.ts +84 -0
  85. package/dist/node/mongo/mongo.controller.native.js +214 -0
  86. package/dist/node/mongo/mongo.controller.native.js.map +1 -0
  87. package/dist/node/mongo/mongo.dynamic-populate.d.ts +61 -0
  88. package/dist/node/mongo/mongo.dynamic-populate.js +197 -0
  89. package/dist/node/mongo/mongo.dynamic-populate.js.map +1 -0
  90. package/dist/node/mongo/mongo.populate.d.ts +15 -0
  91. package/dist/node/mongo/mongo.populate.js +269 -0
  92. package/dist/node/mongo/mongo.populate.js.map +1 -0
  93. package/dist/node/mongo/mongo.type.js +1 -0
  94. package/dist/node/mongo/mongo.type.js.map +1 -0
  95. package/dist/node/mongo/mongo.util.d.ts +52 -0
  96. package/dist/node/mongo/mongo.util.js +111 -409
  97. package/dist/node/mongo/mongo.util.js.map +1 -0
  98. package/dist/node/package/index.js +1 -0
  99. package/dist/node/package/index.js.map +1 -0
  100. package/dist/node/package/package.test.unit.d.ts +1 -0
  101. package/dist/node/package/package.type.js +1 -0
  102. package/dist/node/package/package.type.js.map +1 -0
  103. package/dist/node/package/package.util.js +197 -226
  104. package/dist/node/package/package.util.js.map +1 -0
  105. package/dist/node/path/index.js +27 -25
  106. package/dist/node/path/index.js.map +1 -0
  107. package/dist/node/path/path.constant.d.ts +2 -0
  108. package/dist/node/path/path.constant.js +131 -150
  109. package/dist/node/path/path.constant.js.map +1 -0
  110. package/dist/node/path/path.util.js +1 -0
  111. package/dist/node/path/path.util.js.map +1 -0
  112. package/dist/node/storage/index.js +1 -0
  113. package/dist/node/storage/index.js.map +1 -0
  114. package/dist/node/storage/storage.constant.js +1 -0
  115. package/dist/node/storage/storage.constant.js.map +1 -0
  116. package/dist/node/storage/storage.util.js +111 -158
  117. package/dist/node/storage/storage.util.js.map +1 -0
  118. package/dist/node/upload/index.js +1 -0
  119. package/dist/node/upload/index.js.map +1 -0
  120. package/dist/node/upload/upload.constant.js +1 -0
  121. package/dist/node/upload/upload.constant.js.map +1 -0
  122. package/dist/node/upload/upload.type.js +1 -0
  123. package/dist/node/upload/upload.type.js.map +1 -0
  124. package/dist/node/upload/upload.util.js +120 -150
  125. package/dist/node/upload/upload.util.js.map +1 -0
  126. package/dist/node/ws/index.d.ts +1 -1
  127. package/dist/node/ws/index.js +2 -1
  128. package/dist/node/ws/index.js.map +1 -0
  129. package/dist/node/ws/ws.util.js +46 -0
  130. package/dist/node/ws/ws.util.js.map +1 -0
  131. package/dist/node_modules/.pnpm/{vitest@4.0.18_@types_node@25.3.0_jiti@2.6.1_jsdom@28.1.0_@noble_hashes@1.8.0__sass@1.97.3_tsx@4.21.0_yaml@2.8.2 → vitest@4.0.18_@types_node@25.3.3_jiti@2.6.1_jsdom@28.1.0_@noble_hashes@1.8.0__sass@1.97.3_tsx@4.21.0_yaml@2.8.2}/node_modules/vitest/dist/config.js +1 -0
  132. package/dist/node_modules/.pnpm/vitest@4.0.18_@types_node@25.3.3_jiti@2.6.1_jsdom@28.1.0_@noble_hashes@1.8.0__sass@1.97.3_tsx@4.21.0_yaml@2.8.2/node_modules/vitest/dist/config.js.map +1 -0
  133. package/dist/react/apollo-client/apollo-client.component.js +5 -4
  134. package/dist/react/apollo-client/apollo-client.component.js.map +1 -0
  135. package/dist/react/apollo-client/apollo-client.constant.js +1 -0
  136. package/dist/react/apollo-client/apollo-client.constant.js.map +1 -0
  137. package/dist/react/apollo-client/apollo-client.context.js +1 -0
  138. package/dist/react/apollo-client/apollo-client.context.js.map +1 -0
  139. package/dist/react/apollo-client/apollo-client.module.scss.js +1 -0
  140. package/dist/react/apollo-client/apollo-client.module.scss.js.map +1 -0
  141. package/dist/react/apollo-client/apollo-client.util.js +52 -58
  142. package/dist/react/apollo-client/apollo-client.util.js.map +1 -0
  143. package/dist/react/apollo-client/index.js +1 -0
  144. package/dist/react/apollo-client/index.js.map +1 -0
  145. package/dist/react/apollo-client/links/index.js +1 -0
  146. package/dist/react/apollo-client/links/index.js.map +1 -0
  147. package/dist/react/apollo-client/links/upload.js +72 -74
  148. package/dist/react/apollo-client/links/upload.js.map +1 -0
  149. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.component.js +1 -0
  150. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.component.js.map +1 -0
  151. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.rsc.js +1 -0
  152. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.rsc.js.map +1 -0
  153. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.util.js +12 -18
  154. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.util.js.map +1 -0
  155. package/dist/react/apollo-client-nextjs/index.js +1 -0
  156. package/dist/react/apollo-client-nextjs/index.js.map +1 -0
  157. package/dist/react/apollo-error/apollo-error.component.js +62 -23
  158. package/dist/react/apollo-error/apollo-error.component.js.map +1 -0
  159. package/dist/react/apollo-error/apollo-error.context.js +1 -0
  160. package/dist/react/apollo-error/apollo-error.context.js.map +1 -0
  161. package/dist/react/apollo-error/apollo-error.hook.js +1 -0
  162. package/dist/react/apollo-error/apollo-error.hook.js.map +1 -0
  163. package/dist/react/apollo-error/apollo-error.module.scss.js +7 -6
  164. package/dist/react/apollo-error/apollo-error.module.scss.js.map +1 -0
  165. package/dist/react/apollo-error/apollo-error.provider.js +1 -0
  166. package/dist/react/apollo-error/apollo-error.provider.js.map +1 -0
  167. package/dist/react/apollo-error/apollo-error.test.unit.d.ts +1 -0
  168. package/dist/react/apollo-error/apollo-error.util.js +7 -6
  169. package/dist/react/apollo-error/apollo-error.util.js.map +1 -0
  170. package/dist/react/apollo-error/index.js +1 -0
  171. package/dist/react/apollo-error/index.js.map +1 -0
  172. package/dist/react/i18next/i18next.hook.js +1 -0
  173. package/dist/react/i18next/i18next.hook.js.map +1 -0
  174. package/dist/react/i18next/i18next.util.js +1 -0
  175. package/dist/react/i18next/i18next.util.js.map +1 -0
  176. package/dist/react/i18next/index.js +1 -0
  177. package/dist/react/i18next/index.js.map +1 -0
  178. package/dist/react/loading/index.js +1 -0
  179. package/dist/react/loading/index.js.map +1 -0
  180. package/dist/react/loading/loading.component.js +31 -46
  181. package/dist/react/loading/loading.component.js.map +1 -0
  182. package/dist/react/loading/loading.context.js +1 -0
  183. package/dist/react/loading/loading.context.js.map +1 -0
  184. package/dist/react/loading/loading.hook.js +1 -0
  185. package/dist/react/loading/loading.hook.js.map +1 -0
  186. package/dist/react/loading/loading.module.scss.js +1 -0
  187. package/dist/react/loading/loading.module.scss.js.map +1 -0
  188. package/dist/react/loading/loading.provider.js +1 -0
  189. package/dist/react/loading/loading.provider.js.map +1 -0
  190. package/dist/react/log/index.js +1 -0
  191. package/dist/react/log/index.js.map +1 -0
  192. package/dist/react/log/log.util.js +5 -4
  193. package/dist/react/log/log.util.js.map +1 -0
  194. package/dist/react/next-intl/index.js +1 -0
  195. package/dist/react/next-intl/index.js.map +1 -0
  196. package/dist/react/next-intl/next-intl.constant.js +1 -0
  197. package/dist/react/next-intl/next-intl.constant.js.map +1 -0
  198. package/dist/react/next-intl/next-intl.context.js +1 -0
  199. package/dist/react/next-intl/next-intl.context.js.map +1 -0
  200. package/dist/react/next-intl/next-intl.hoc.js +14 -22
  201. package/dist/react/next-intl/next-intl.hoc.js.map +1 -0
  202. package/dist/react/next-intl/next-intl.hook.js +1 -0
  203. package/dist/react/next-intl/next-intl.hook.js.map +1 -0
  204. package/dist/react/next-intl/next-intl.provider.js +8 -7
  205. package/dist/react/next-intl/next-intl.provider.js.map +1 -0
  206. package/dist/react/storage/index.js +1 -0
  207. package/dist/react/storage/index.js.map +1 -0
  208. package/dist/react/storage/storage.hook.js +44 -59
  209. package/dist/react/storage/storage.hook.js.map +1 -0
  210. package/dist/react/storage/storage.test.unit.d.ts +1 -0
  211. package/dist/react/storage/storage.util.js +29 -53
  212. package/dist/react/storage/storage.util.js.map +1 -0
  213. package/dist/react/toast/index.js +1 -0
  214. package/dist/react/toast/index.js.map +1 -0
  215. package/dist/react/userback/index.js +1 -0
  216. package/dist/react/userback/index.js.map +1 -0
  217. package/dist/react/userback/userback.component.js +19 -42
  218. package/dist/react/userback/userback.component.js.map +1 -0
  219. package/dist/style.css +1 -1
  220. package/dist/typescript/common.type.js +1 -0
  221. package/dist/typescript/common.type.js.map +1 -0
  222. package/dist/typescript/index.js +1 -0
  223. package/dist/typescript/index.js.map +1 -0
  224. package/dist/typescript/typescript.test.unit.d.ts +1 -0
  225. package/dist/util/common/common.util.d.ts +2 -0
  226. package/dist/util/common/common.util.js +30 -37
  227. package/dist/util/common/common.util.js.map +1 -0
  228. package/dist/util/common/index.js +1 -0
  229. package/dist/util/common/index.js.map +1 -0
  230. package/dist/util/index.js +11 -9
  231. package/dist/util/index.js.map +1 -0
  232. package/dist/util/object/index.js +1 -0
  233. package/dist/util/object/index.js.map +1 -0
  234. package/dist/util/object/object.util.js +73 -76
  235. package/dist/util/object/object.util.js.map +1 -0
  236. package/dist/util/serializer/index.js +1 -0
  237. package/dist/util/serializer/index.js.map +1 -0
  238. package/dist/util/serializer/serializer.util.js +1 -0
  239. package/dist/util/serializer/serializer.util.js.map +1 -0
  240. package/dist/util/string/index.js +5 -3
  241. package/dist/util/string/index.js.map +1 -0
  242. package/dist/util/string/string.util.d.ts +12 -0
  243. package/dist/util/string/string.util.js +64 -44
  244. package/dist/util/string/string.util.js.map +1 -0
  245. package/dist/util/validate/index.js +1 -0
  246. package/dist/util/validate/index.js.map +1 -0
  247. package/dist/util/validate/validate.util.js +1 -0
  248. package/dist/util/validate/validate.util.js.map +1 -0
  249. package/package.json +76 -96
  250. package/public/tsconfig.base.json +7 -3
  251. package/README.md +0 -470
  252. package/dist/config/commitlint/index.cjs +0 -1
  253. package/dist/config/config.type.cjs +0 -1
  254. package/dist/config/config.util.cjs +0 -1
  255. package/dist/config/env/env.constant.cjs +0 -1
  256. package/dist/config/env/env.util.cjs +0 -1
  257. package/dist/config/env/index.cjs +0 -1
  258. package/dist/config/eslint/index.cjs +0 -1
  259. package/dist/config/graphql-codegen/graphql-codegen.util.cjs +0 -1
  260. package/dist/config/graphql-codegen/index.cjs +0 -1
  261. package/dist/config/index.cjs +0 -1
  262. package/dist/config/lint-staged/index.cjs +0 -1
  263. package/dist/config/storybook/index.cjs +0 -1
  264. package/dist/config/storybook/storybook.main.cjs +0 -1
  265. package/dist/config/storybook/storybook.preview.cjs +0 -1
  266. package/dist/config/vitest/index.cjs +0 -1
  267. package/dist/config/vitest/vitest.e2e.cjs +0 -1
  268. package/dist/config/vitest/vitest.unit.cjs +0 -1
  269. package/dist/constant/common.cjs +0 -1
  270. package/dist/constant/index.cjs +0 -1
  271. package/dist/constant/response-status.cjs +0 -1
  272. package/dist/node/apollo-server/apollo-server.util.cjs +0 -1
  273. package/dist/node/apollo-server/index.cjs +0 -1
  274. package/dist/node/cli/index.cjs +0 -3
  275. package/dist/node/command/command.type.cjs +0 -1
  276. package/dist/node/command/command.util.cjs +0 -2
  277. package/dist/node/command/index.cjs +0 -1
  278. package/dist/node/express/express.util.cjs +0 -1
  279. package/dist/node/express/index.cjs +0 -1
  280. package/dist/node/fs/fs.util.cjs +0 -4
  281. package/dist/node/fs/index.cjs +0 -1
  282. package/dist/node/log/index.cjs +0 -1
  283. package/dist/node/log/log.type.cjs +0 -1
  284. package/dist/node/log/log.util.cjs +0 -1
  285. package/dist/node/mongo/index.cjs +0 -1
  286. package/dist/node/mongo/mongo.constant.cjs +0 -1
  287. package/dist/node/mongo/mongo.controller.cjs +0 -1
  288. package/dist/node/mongo/mongo.controller.js +0 -956
  289. package/dist/node/mongo/mongo.type.cjs +0 -1
  290. package/dist/node/mongo/mongo.util.cjs +0 -2
  291. package/dist/node/package/index.cjs +0 -1
  292. package/dist/node/package/package.type.cjs +0 -1
  293. package/dist/node/package/package.util.cjs +0 -1
  294. package/dist/node/path/index.cjs +0 -1
  295. package/dist/node/path/path.constant.cjs +0 -1
  296. package/dist/node/path/path.util.cjs +0 -1
  297. package/dist/node/storage/index.cjs +0 -1
  298. package/dist/node/storage/storage.constant.cjs +0 -1
  299. package/dist/node/storage/storage.util.cjs +0 -1
  300. package/dist/node/upload/index.cjs +0 -1
  301. package/dist/node/upload/upload.constant.cjs +0 -1
  302. package/dist/node/upload/upload.type.cjs +0 -1
  303. package/dist/node/upload/upload.util.cjs +0 -1
  304. package/dist/node/ws/index.cjs +0 -1
  305. package/dist/node/ws/ts.util.cjs +0 -1
  306. package/dist/node/ws/ts.util.js +0 -68
  307. package/dist/node_modules/.pnpm/vitest@4.0.18_@types_node@25.3.0_jiti@2.6.1_jsdom@28.1.0_@noble_hashes@1.8.0__sass@1.97.3_tsx@4.21.0_yaml@2.8.2/node_modules/vitest/dist/config.cjs +0 -1
  308. package/dist/react/apollo-client/apollo-client.component.cjs +0 -1
  309. package/dist/react/apollo-client/apollo-client.constant.cjs +0 -1
  310. package/dist/react/apollo-client/apollo-client.context.cjs +0 -1
  311. package/dist/react/apollo-client/apollo-client.module.scss.cjs +0 -1
  312. package/dist/react/apollo-client/apollo-client.util.cjs +0 -1
  313. package/dist/react/apollo-client/index.cjs +0 -1
  314. package/dist/react/apollo-client/links/index.cjs +0 -1
  315. package/dist/react/apollo-client/links/upload.cjs +0 -1
  316. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.component.cjs +0 -1
  317. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.rsc.cjs +0 -1
  318. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.util.cjs +0 -1
  319. package/dist/react/apollo-client-nextjs/index.cjs +0 -1
  320. package/dist/react/apollo-error/apollo-error.component.cjs +0 -1
  321. package/dist/react/apollo-error/apollo-error.context.cjs +0 -1
  322. package/dist/react/apollo-error/apollo-error.hook.cjs +0 -1
  323. package/dist/react/apollo-error/apollo-error.module.scss.cjs +0 -1
  324. package/dist/react/apollo-error/apollo-error.provider.cjs +0 -1
  325. package/dist/react/apollo-error/apollo-error.util.cjs +0 -1
  326. package/dist/react/apollo-error/index.cjs +0 -1
  327. package/dist/react/i18next/i18next.hook.cjs +0 -1
  328. package/dist/react/i18next/i18next.util.cjs +0 -1
  329. package/dist/react/i18next/index.cjs +0 -1
  330. package/dist/react/loading/index.cjs +0 -1
  331. package/dist/react/loading/loading.component.cjs +0 -6
  332. package/dist/react/loading/loading.context.cjs +0 -1
  333. package/dist/react/loading/loading.hook.cjs +0 -1
  334. package/dist/react/loading/loading.module.scss.cjs +0 -1
  335. package/dist/react/loading/loading.provider.cjs +0 -1
  336. package/dist/react/log/index.cjs +0 -1
  337. package/dist/react/log/log.util.cjs +0 -1
  338. package/dist/react/next-intl/index.cjs +0 -1
  339. package/dist/react/next-intl/next-intl.constant.cjs +0 -1
  340. package/dist/react/next-intl/next-intl.context.cjs +0 -1
  341. package/dist/react/next-intl/next-intl.hoc.cjs +0 -1
  342. package/dist/react/next-intl/next-intl.hook.cjs +0 -1
  343. package/dist/react/next-intl/next-intl.provider.cjs +0 -1
  344. package/dist/react/storage/index.cjs +0 -1
  345. package/dist/react/storage/storage.hook.cjs +0 -1
  346. package/dist/react/storage/storage.util.cjs +0 -1
  347. package/dist/react/toast/index.cjs +0 -1
  348. package/dist/react/userback/index.cjs +0 -1
  349. package/dist/react/userback/userback.component.cjs +0 -1
  350. package/dist/typescript/common.type.cjs +0 -1
  351. package/dist/typescript/index.cjs +0 -1
  352. package/dist/util/common/common.util.cjs +0 -1
  353. package/dist/util/common/index.cjs +0 -1
  354. package/dist/util/index.cjs +0 -1
  355. package/dist/util/object/index.cjs +0 -1
  356. package/dist/util/object/object.util.cjs +0 -1
  357. package/dist/util/serializer/index.cjs +0 -1
  358. package/dist/util/serializer/serializer.util.cjs +0 -1
  359. package/dist/util/string/index.cjs +0 -1
  360. package/dist/util/string/string.util.cjs +0 -1
  361. package/dist/util/validate/index.cjs +0 -1
  362. package/dist/util/validate/validate.util.cjs +0 -1
  363. /package/dist/node/ws/{ts.util.d.ts → ws.util.d.ts} +0 -0
package/README.md DELETED
@@ -1,470 +0,0 @@
1
- <div align="center">
2
- <img src="https://res.cloudinary.com/cyberskill/image/upload/v1742786793/cyberskill/favicon/favicon-96x96.png" width="96" height="96" alt="CyberSkill Logo">
3
-
4
- # CyberSkill Shared
5
-
6
- **Enterprise-grade utility library for consistent, scalable development across CyberSkill projects**
7
-
8
- [![📦 npm version](https://img.shields.io/npm/v/@cyberskill/shared?style=for-the-badge&logo=npm)](https://npmjs.com/package/@cyberskill/shared)
9
- [![📥 npm downloads](https://img.shields.io/npm/dm/@cyberskill/shared?style=for-the-badge&logo=npm)](https://npmjs.com/package/@cyberskill/shared)
10
- [![📚 JSDoc Documentation](https://img.shields.io/badge/JSDoc-Documentation-blue?style=for-the-badge&logo=javascript)](https://www.jsdocs.io/package/@cyberskill/shared)
11
- [![📄 License: MIT](https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge&logo=opensourceinitiative)](LICENSE)
12
-
13
- </div>
14
-
15
- ---
16
-
17
- ## 📋 Table of Contents
18
-
19
- - [Overview](#-overview)
20
- - [Key Features](#-key-features)
21
- - [Architecture](#️-architecture)
22
- - [Installation](#-installation)
23
- - [Quick Start](#-quick-start)
24
- - [API Reference](#-api-reference)
25
- - [Development](#️-development)
26
- - [Contributing](#-contributing)
27
- - [Support](#-support)
28
- - [License](#-license)
29
-
30
- ---
31
-
32
- ## 🎯 Overview
33
-
34
- CyberSkill Shared is a comprehensive, enterprise-grade utility library designed to standardize development practices across CyberSkill projects. Built with TypeScript-first architecture, it provides a robust foundation of utilities, configurations, and components that ensure consistency, maintainability, and developer productivity at scale.
35
-
36
- ### 🏆 Why Choose CyberSkill Shared?
37
-
38
- | Feature | Benefit |
39
- | ---------------------- | ------------------------------------------------------- |
40
- | **🔄 Consistency** | Standardized patterns and utilities across all projects |
41
- | **⚡ Productivity** | Pre-built solutions for common development tasks |
42
- | **🛡️ Reliability** | Type-safe implementations with comprehensive testing |
43
- | **📈 Scalability** | Modular architecture that grows with your needs |
44
- | **🔧 Maintainability** | Well-documented, clean, and extensible codebase |
45
- | **🚀 Performance** | Optimized for production with minimal bundle impact |
46
- | **🔒 Security** | Built-in security best practices and validation |
47
-
48
- ### 🎯 Target Use Cases
49
-
50
- - **Enterprise Applications**: Large-scale applications requiring consistency and maintainability
51
- - **Microservices**: Distributed systems needing shared utilities and configurations
52
- - **Full-Stack Development**: Projects spanning frontend and backend with shared logic
53
- - **Team Collaboration**: Development teams requiring standardized tooling and patterns
54
- - **Rapid Prototyping**: Quick development with pre-built, tested components
55
-
56
- ---
57
-
58
- ## ✨ Key Features
59
-
60
- ### 🛠️ Core Utilities & Helpers
61
-
62
- <details>
63
- <summary><strong>🔧 Utility Functions</strong></summary>
64
-
65
- - **Type-safe utilities** for common operations
66
- - **Object manipulation** and validation helpers
67
- - **String processing** and formatting functions
68
- - **Serialization** and data transformation tools
69
- - **Validation** frameworks with comprehensive error handling
70
-
71
- </details>
72
-
73
- <details>
74
- <summary><strong>⚙️ Configuration Management</strong></summary>
75
-
76
- - **Environment configuration** with type safety and validation
77
- - **ESLint configurations** for consistent code quality across projects
78
- - **Testing setups** for unit, integration, and e2e tests
79
- - **Build tool configurations** optimized for performance and DX
80
- - **Git hooks** and commit message validation
81
-
82
- </details>
83
-
84
- <details>
85
- <summary><strong>🌐 Node.js Integration</strong></summary>
86
-
87
- - **Express.js utilities** for API development with middleware support
88
- - **MongoDB integration** with advanced query builders and validation
89
- - **WebSocket management** tools for real-time applications
90
- - **File system operations** with enhanced error handling and validation
91
- - **CLI development** utilities for command-line applications
92
- - **Package management** with dependency resolution and updates
93
-
94
- </details>
95
-
96
- <details>
97
- <summary><strong>⚛️ React Ecosystem</strong></summary>
98
-
99
- - **Apollo Client** integration with error handling and caching
100
- - **Internationalization** (i18n) support for multi-language applications
101
- - **Loading states** and user feedback components
102
- - **Storage management** hooks and utilities for client-side persistence
103
- - **Toast notifications** system with customizable themes
104
- - **User feedback** integration for product improvement
105
-
106
- </details>
107
-
108
- <details>
109
- <summary><strong>📝 TypeScript Excellence</strong></summary>
110
-
111
- - **Comprehensive type definitions** for all utilities and components
112
- - **React component types** with proper prop validation
113
- - **Utility type helpers** for advanced TypeScript patterns
114
- - **Style declaration files** for CSS-in-JS solutions
115
- - **Generic type support** for flexible, reusable components
116
-
117
- </details>
118
-
119
- ---
120
-
121
- ## 🏗️ Architecture
122
-
123
- ### 📁 Project Structure
124
-
125
- ```text
126
- shared/
127
- ├── 📁 public/ # Static assets and configuration
128
- │ ├── favicon/ # Application icons and manifest
129
- │ └── tsconfig.base.json # Base TypeScript configuration
130
- ├── 📁 src/
131
- │ ├── 📁 config/ # Application configuration
132
- │ │ ├── commitlint/ # Git commit message validation
133
- │ │ ├── eslint/ # Code quality and style rules
134
- │ │ ├── env/ # Environment variable management
135
- │ │ ├── graphql-codegen/ # GraphQL code generation setup
136
- │ │ ├── lint-staged/ # Pre-commit code quality checks
137
- │ │ └── vitest/ # Testing framework configuration
138
- │ ├── 📁 constant/ # Shared constants and enums
139
- │ ├── 📁 node/ # Node.js utilities and modules
140
- │ │ ├── apollo-server/ # Apollo Server integration helpers
141
- │ │ ├── cli/ # Command-line interface utilities
142
- │ │ ├── command/ # Command execution and management
143
- │ │ ├── express/ # Express.js framework utilities
144
- │ │ ├── fs/ # File system operations
145
- │ │ ├── log/ # Structured logging and error handling
146
- │ │ ├── mongo/ # MongoDB ODM and query builders
147
- │ │ ├── package/ # Package management and dependency resolution
148
- │ │ ├── path/ # Path manipulation and resolution
149
- │ │ ├── storage/ # Data persistence and caching
150
- │ │ ├── upload/ # File upload handling and validation
151
- │ │ └── ws/ # WebSocket connection management
152
- │ ├── 📁 react/ # React utilities and components
153
- │ │ ├── apollo-client/ # Apollo Client setup and configuration
154
- │ │ ├── apollo-error/ # GraphQL error handling and display
155
- │ │ ├── i18next/ # Internationalization framework
156
- │ │ ├── loading/ # Loading state management and UI
157
- │ │ ├── log/ # Client-side logging utilities
158
- │ │ ├── next-intl/ # Next.js internationalization
159
- │ │ ├── storage/ # Browser storage management
160
- │ │ ├── toast/ # Toast notification system
161
- │ │ └── userback/ # User feedback and analytics
162
- │ ├── 📁 typescript/ # TypeScript type definitions
163
- │ └── 📁 util/ # Utility functions and helpers
164
- │ ├── common/ # Common utility types and functions
165
- │ ├── object/ # Object manipulation and transformation
166
- │ ├── serializer/ # Data serialization and deserialization
167
- │ ├── string/ # String processing and formatting
168
- │ └── validate/ # Data validation and sanitization
169
- ├── 📄 package.json # Project manifest and dependencies
170
- ├── 📄 tsconfig.json # TypeScript compiler configuration
171
- ├── 📄 eslint.config.js # ESLint configuration
172
- ├── 📄 vite.config.ts # Vite build tool configuration
173
- └── 📄 README.md # Project documentation
174
- ```
175
-
176
- ---
177
-
178
- ## 🚀 Installation
179
-
180
- ### Prerequisites
181
-
182
- - **Node.js**: 18.0.0 or higher
183
- - **pnpm**: 8.0.0 or higher (recommended)
184
- - **TypeScript**: 5.0.0 or higher
185
-
186
- ### Package Installation
187
-
188
- ```bash
189
- # Using pnpm (recommended)
190
- pnpm add @cyberskill/shared
191
-
192
- # Using npm
193
- npm install @cyberskill/shared
194
-
195
- # Using yarn
196
- yarn add @cyberskill/shared
197
- ```
198
-
199
- ### TypeScript Configuration
200
-
201
- Add to your `tsconfig.json`:
202
-
203
- ```json
204
- {
205
- "compilerOptions": {
206
- "baseUrl": ".",
207
- "paths": {
208
- "@cyberskill/shared/*": ["node_modules/@cyberskill/shared/src/*"]
209
- }
210
- }
211
- }
212
- ```
213
-
214
- ---
215
-
216
- ## 🏃 Quick Start
217
-
218
- ### Basic Usage
219
-
220
- ```typescript
221
- import {
222
- catchError,
223
- formatCurrency,
224
- isEmpty,
225
- validateEmail
226
- } from '@cyberskill/shared';
227
-
228
- // Email validation
229
- const isValidEmail = validateEmail('user@example.com');
230
- console.log(isValidEmail); // true
231
-
232
- // Currency formatting
233
- const formattedPrice = formatCurrency(1234.56, 'USD');
234
- console.log(formattedPrice); // "$1,234.56"
235
-
236
- // Empty value checking
237
- const isEmptyValue = isEmpty(null); // true
238
- const hasValue = isEmpty('hello'); // false
239
-
240
- // Error handling
241
- try {
242
- // Your code here
243
- }
244
- catch (error) {
245
- const handledError = catchError(error);
246
- console.log(handledError.message);
247
- }
248
- ```
249
-
250
- ### React Integration
251
-
252
- ```tsx
253
- import {
254
- ApolloProvider,
255
- LoadingProvider,
256
- useApolloError,
257
- useLoading
258
- } from '@cyberskill/shared';
259
- import * as React from 'react';
260
-
261
- // Main application wrapper
262
- /**
263
- *
264
- */
265
- // eslint-disable-next-line react-refresh/only-export-components
266
- function App() {
267
- return (
268
- <ApolloProvider options={{ uri: 'https://api.example.com/graphql' }}>
269
- <LoadingProvider>
270
- <MyApplication />
271
- </LoadingProvider>
272
- </ApolloProvider>
273
- );
274
- }
275
-
276
- // Component with loading and error handling
277
- /**
278
- *
279
- */
280
- // eslint-disable-next-line react-refresh/only-export-components
281
- function MyComponent() {
282
- const { showLoading, hideLoading } = useLoading();
283
- const { showError } = useApolloError();
284
-
285
- const handleAsyncOperation = async () => {
286
- try {
287
- showLoading();
288
- // Your async operation
289
- await someAsyncTask();
290
- }
291
- catch (error) {
292
- showError(error);
293
- }
294
- finally {
295
- hideLoading();
296
- }
297
- };
298
-
299
- return (
300
- <div>
301
- <button type="button" onClick={handleAsyncOperation}>
302
- Perform Operation
303
- </button>
304
- </div>
305
- );
306
- }
307
- ```
308
-
309
- ### Node.js Integration
310
-
311
- ```typescript
312
- import {
313
- createCorsOptions,
314
- mongo,
315
- RESPONSE_STATUS,
316
- throwError
317
- } from '@cyberskill/shared';
318
- // Express.js setup with CORS
319
- import express from 'express';
320
-
321
- const app = express();
322
-
323
- const corsOptions = createCorsOptions({
324
- isDev: process.env.NODE_ENV === 'development',
325
- whiteList: ['https://example.com', 'https://api.example.com']
326
- });
327
-
328
- app.use(cors(corsOptions));
329
-
330
- // MongoDB integration
331
- const mongoose = await mongo.connect({
332
- uri: process.env.MONGODB_URI,
333
- options: {
334
- maxPoolSize: 10,
335
- serverSelectionTimeoutMS: 5000
336
- }
337
- });
338
-
339
- // Error handling
340
- app.use('/api/users', (req, res, next) => {
341
- try {
342
- // Your route logic
343
- }
344
- catch (error) {
345
- throwError({
346
- message: 'User operation failed',
347
- status: RESPONSE_STATUS.INTERNAL_SERVER_ERROR,
348
- type: 'rest'
349
- });
350
- }
351
- });
352
- ```
353
-
354
- ---
355
-
356
- ## 🛠️ Development
357
-
358
- ### Quick Setup
359
-
360
- ```bash
361
- # Clone the repository
362
- git clone https://github.com/cyberskill-world/shared.git
363
- cd shared
364
-
365
- # Install dependencies
366
- pnpm install
367
-
368
- # Build the project
369
- pnpm run build
370
-
371
- # Start development mode
372
- pnpm run dev
373
- ```
374
-
375
- ### Available Scripts
376
-
377
- | Command | Description | Usage |
378
- | ------------------- | -------------------------------------- | ------------ |
379
- | `pnpm run dev` | Start development mode with hot reload | Development |
380
- | `pnpm run build` | Build for production | Production |
381
- | `pnpm run lint` | Check for linting issues | Code Quality |
382
- | `pnpm run lint:fix` | Fix linting issues automatically | Code Quality |
383
- | `pnpm run test` | Run tests | Testing |
384
- | `pnpm run inspect` | Inspect project dependencies | Analysis |
385
- | `pnpm run reset` | Reset project state | Maintenance |
386
- | `pnpm run ready` | Prepare project for development | Setup |
387
-
388
- For detailed development guidelines, code standards, and contribution workflow, see our [Contributing Guide](CONTRIBUTING.md).
389
-
390
- ---
391
-
392
- ## 🤝 Contributing
393
-
394
- We welcome contributions from the community! Please read our [Contributing Guide](CONTRIBUTING.md) for detailed information about our development process, code standards, and contribution workflow.
395
-
396
- ### Quick Start for Contributors
397
-
398
- 1. **Fork** the repository
399
- 2. **Create** a feature branch (`git checkout -b feature/amazing-feature`)
400
- 3. **Make** your changes following our standards
401
- 4. **Test** your changes thoroughly
402
- 5. **Commit** with conventional commit messages
403
- 6. **Push** to your branch and create a Pull Request
404
-
405
- For complete guidelines, see [CONTRIBUTING.md](CONTRIBUTING.md).
406
-
407
- ---
408
-
409
- ## 🆘 Support
410
-
411
- ### Getting Help
412
-
413
- - **🐛 Issues**: [GitHub Issues](https://github.com/cyberskill-world/shared/issues)
414
- - **💬 Discussions**: [GitHub Discussions](https://github.com/cyberskill-world/shared/discussions)
415
- - **📧 Email**: [support@cyberskill.world](mailto:support@cyberskill.world)
416
-
417
- ### Community Resources
418
-
419
- - **📚 API Reference**: [JSDocs](https://www.jsdocs.io/package/@cyberskill/shared)
420
-
421
- ### Migration Support
422
-
423
- - **📋 Changelog**: [Release Notes](https://github.com/cyberskill-world/shared/releases)
424
-
425
- ---
426
-
427
- ## 📄 License
428
-
429
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
430
-
431
- **MIT License Benefits:**
432
-
433
- - ✅ Commercial use allowed
434
- - ✅ Modification permitted
435
- - ✅ Distribution allowed
436
- - ✅ Private use allowed
437
- - ✅ No warranty provided
438
- - ✅ No liability for damages
439
-
440
- ---
441
-
442
- ## 🏢 About CyberSkill
443
-
444
- CyberSkill JSC is a leading technology company focused on building innovative solutions for the cybersecurity industry. Our shared libraries and tools help developers create secure, scalable, and maintainable applications that meet enterprise-grade standards.
445
-
446
- ### Company Information
447
-
448
- - **🌐 Website**: [https://cyberskill.world](https://cyberskill.world)
449
- - **🐙 GitHub**: [https://github.com/cyberskill-world](https://github.com/cyberskill-world)
450
- - **📧 Contact**: [hello@cyberskill.world](mailto:hello@cyberskill.world)
451
-
452
- ### Our Mission
453
-
454
- To provide developers with the tools and utilities they need to build secure, scalable, and maintainable applications that protect users and organizations in an increasingly complex digital landscape.
455
-
456
- ---
457
-
458
- <div align="center">
459
- <p>Made with ❤️ by the <a href="https://github.com/cyberskill-world">CyberSkill Team</a></p>
460
-
461
- <p>
462
- <a href="https://cyberskill.world">Website</a>
463
- <a href="https://github.com/cyberskill-world/shared/issues">Issues</a>
464
- <a href="https://github.com/cyberskill-world/shared/discussions">Discussions</a>
465
- </p>
466
-
467
- <p>
468
- <sub>If this project helps you, please consider giving us a ⭐ on GitHub!</sub>
469
- </p>
470
- </div>
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={extends:["@commitlint/config-conventional"],ignores:[e=>e.includes("[🚀 CI - Deploy]")]};exports.default=t;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.E_ConfigType=(t=>(t.ESLINT="eslint",t.COMMITLINT="commitlint",t.LINT_STAGED="lint-staged",t.VITEST_REACT_E2E="vitest-react-e2e",t.VITEST_REACT_UNIT="vitest-react-unit",t))(exports.E_ConfigType||{});
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@antfu/eslint-config"),i=require("./config.type.cjs"),o=require("./eslint/index.cjs"),_=require("./vitest/vitest.e2e.cjs"),l=require("./vitest/vitest.unit.cjs"),a=require("../util/object/object.util.cjs");var f=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,E=(e,n)=>{var t={};for(var r in e)y.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&f)for(var r of f(e))n.indexOf(r)<0&&u.call(e,r)&&(t[r]=e[r]);return t};const p=(...e)=>{const t=a.deepMerge(...Array.isArray(o.default)?o.default:[o.default],...e),{ignores:r}=t,g=E(t,["ignores"]);return s({stylistic:{semi:!0,indent:4},formatters:!0,yaml:!1,react:!0},g,...Array.isArray(r)?[{ignores:r}]:[])},T={[i.E_ConfigType.ESLINT]:e=>p(e),[i.E_ConfigType.COMMITLINT]:e=>a.deepMerge(e),[i.E_ConfigType.LINT_STAGED]:e=>a.deepMerge(e),[i.E_ConfigType.VITEST_REACT_UNIT]:e=>l.vitestUnit(e),[i.E_ConfigType.VITEST_REACT_E2E]:e=>_.vitestE2E(e)};function d(e,...n){const t=T[e];if(!n||n.length===0)return t({});if(!t)throw new Error(`Unknown config type: ${e}`);return t(...n)}exports.mergeConfigs=d;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=".cyberskill-storage";exports.CYBERSKILL_STORAGE_DIRECTORY=e;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("@dotenvx/dotenvx"),n=require("envalid"),i=require("node:os"),a=require("node:path"),r=require("node:process"),l=require("./env.constant.cjs"),u=require("../../typescript/common.type.cjs");let t=!1;const d=n.makeValidator(e=>typeof e=="boolean"?e:typeof e=="string");function o(){r.env.NODE_ENV!==u.E_Environment.PRODUCTION&&!t&&(E.config(),t=!0)}function s(){o();const e=n.cleanEnv(r.env,{CWD:n.str({default:r.cwd()}),DEBUG:d({default:!1}),CYBERSKILL_STORAGE_DIRECTORY:n.str({default:a.join(i.homedir(),l.CYBERSKILL_STORAGE_DIRECTORY)})});return{CWD:e.CWD,DEBUG:e.DEBUG,CYBERSKILL_STORAGE_DIRECTORY:e.CYBERSKILL_STORAGE_DIRECTORY}}exports.getEnv=s;exports.loadEnvFile=o;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./env.constant.cjs"),e=require("./env.util.cjs");exports.CYBERSKILL_STORAGE_DIRECTORY=t.CYBERSKILL_STORAGE_DIRECTORY;exports.getEnv=e.getEnv;exports.loadEnvFile=e.loadEnvFile;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("globals");function u(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const n=u(i);var c=Object.defineProperty,a=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,l=(t,e,r)=>e in t?c(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,s=(t,e)=>{for(var r in e||(e={}))f.call(e,r)&&l(t,r,e[r]);if(a)for(var r of a(e))p.call(e,r)&&l(t,r,e[r]);return t};const d=[{languageOptions:{globals:s(s({},n.node),n.browser)},rules:{"perfectionist/sort-imports":["error",{internalPattern:["^#.*","^@/.*"]}],"dot-notation":"off"},ignores:["**/node_modules/**","**/.git/**","build","dist",".agent"]}];exports.default=d;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@eddeee888/gcg-typescript-resolver-files"),l=require("../env/env.util.cjs");var u=Object.defineProperty,f=Object.defineProperties,g=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,a=(t,e,r)=>e in t?u(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,n=(t,e)=>{for(var r in e||(e={}))_.call(e,r)&&a(t,r,e[r]);if(i)for(var r of i(e))v.call(e,r)&&a(t,r,e[r]);return t},d=(t,e)=>f(t,g(e));l.loadEnvFile();function m({uri:t,from:e,to:r,target:o="client"}){const s=o==="client",p=o==="server";return d(n({schema:t,ignoreNoDocuments:!0,overwrite:!0},s&&{documents:[e]}),{generates:n(n({},s&&{[r]:{preset:"client",presetConfig:{fragmentMasking:!1,persistedDocuments:!0},config:{useTypeImports:!0,namingConvention:"keep"}}}),p&&{[r]:c.defineConfig()})})}exports.createGraphqlCodegenConfig=m;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./graphql-codegen.util.cjs");exports.createGraphqlCodegenConfig=e.createGraphqlCodegenConfig;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./config.type.cjs"),r=require("./config.util.cjs");Object.defineProperty(exports,"E_ConfigType",{enumerable:!0,get:()=>e.E_ConfigType});exports.mergeConfigs=r.mergeConfigs;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"*.ts":()=>"tsc --noEmit","*":["eslint --fix --no-cache"]};exports.default=e;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./storybook.main.cjs"),e=require("./storybook.preview.cjs");exports.storybookMain=o.storybookMain;exports.storybookPreview=e.storybookPreview;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../../util/object/object.util.cjs");function e(o){const t={stories:["../src/**/*.stories.@(js|jsx|mjs|ts|tsx|mdx)"],addons:["@storybook/addon-essentials","@storybook/addon-interactions","@storybook/addon-links"],framework:{name:"@storybook/react-vite",options:{}}};return s.deepMerge(t,o)}exports.storybookMain=e;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var l=Object.defineProperty,n=Object.defineProperties,p=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,s=(e,r,t)=>r in e?l(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,a=(e,r)=>{for(var t in r||(r={}))c.call(r,t)&&s(e,t,r[t]);if(o)for(var t of o(r))f.call(r,t)&&s(e,t,r[t]);return e},i=(e,r)=>n(e,p(r));function u(e){const r={parameters:{controls:{matchers:{color:/(background|color)$/i,date:/Date$/i}},backgrounds:{default:"light",values:[{name:"light",value:"#ffffff"},{name:"dark",value:"#333333"}]}}};return i(a(a({},r),e),{parameters:a(a({},r.parameters),e==null?void 0:e.parameters)})}exports.storybookPreview=u;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./vitest.e2e.cjs"),e=require("./vitest.unit.cjs");exports.vitestE2E=t.vitestE2E;exports.vitestUnit=e.vitestUnit;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@vitejs/plugin-react-swc"),i=require("../../node_modules/.pnpm/vitest@4.0.18_@types_node@25.3.0_jiti@2.6.1_jsdom@28.1.0_@noble_hashes@1.8.0__sass@1.97.3_tsx@4.21.0_yaml@2.8.2/node_modules/vitest/dist/config.cjs"),o=require("../../util/object/object.util.cjs");function n(e){const r={plugins:[t()],test:{include:["**/*.test.e2e.?(c|m)[jt]s?(x)"],browser:{enabled:!0,provider:"playwright",instances:[{browser:"chromium"},{browser:"firefox"},{browser:"webkit"}]}}};return i.defineConfig(o.deepMerge(r,e))}exports.vitestE2E=n;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@vitejs/plugin-react-swc"),n=require("../../node_modules/.pnpm/vitest@4.0.18_@types_node@25.3.0_jiti@2.6.1_jsdom@28.1.0_@noble_hashes@1.8.0__sass@1.97.3_tsx@4.21.0_yaml@2.8.2/node_modules/vitest/dist/config.cjs"),s=require("../../util/object/object.util.cjs");function r(e){const t={plugins:[i()],test:{globals:!0,environment:"jsdom",pool:"vmThreads",include:["**/*.test.unit.?(c|m)[jt]s?(x)"],setupFiles:["./vitest.unit.setup.ts"]}};return n.defineConfig(s.deepMerge(t,e))}exports.vitestUnit=r;
@@ -1 +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"),e=require("./response-status.cjs");exports.IS_BROWSER=S.IS_BROWSER;exports.RESPONSE_STATUS=e.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";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("@apollo/server"),S=require("@apollo/server/plugin/drainHttpServer"),u=require("@apollo/server/plugin/landingPage/default"),_=require("../log/log.util.cjs");var P=Object.defineProperty,i=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,v=(r,e,l)=>e in r?P(r,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[e]=l,y=(r,e)=>{for(var l in e||(e={}))g.call(e,l)&&v(r,l,e[l]);if(i)for(var l of i(e))h.call(e,l)&&v(r,l,e[l]);return r},c=(r,e,l)=>new Promise((p,o)=>{var s=t=>{try{a(l.next(t))}catch(n){o(n)}},d=t=>{try{a(l.throw(t))}catch(n){o(n)}},a=t=>t.done?p(t.value):Promise.resolve(t.value).then(s,d);a((l=l.apply(r,e)).next())});function m(r){return new f.ApolloServer(y({schema:r.schema,plugins:[r.isDev?u.ApolloServerPluginLandingPageLocalDefault():u.ApolloServerPluginLandingPageProductionDefault(),S.ApolloServerPluginDrainHttpServer({httpServer:r.server}),...r.drainServer?[{serverWillStart(){return c(this,null,function*(){return{drainServer(){return c(this,null,function*(){var e;(e=r.drainServer)==null||e.call(r),_.log.info("Apollo Server drainServer hook called")})}}})}}]:[]]},r.isDev&&{introspection:!0,includeStacktraceInErrorResponses:!0}))}exports.createApolloServer=m;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./apollo-server.util.cjs"),r=require("@as-integrations/express5");exports.createApolloServer=e.createApolloServer;Object.defineProperty(exports,"expressMiddleware",{enumerable:!0,get:()=>r.expressMiddleware});
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";const d=require("node:process"),I=require("yargs/helpers"),T=require("yargs/yargs"),e=require("../command/command.util.cjs"),y=require("../package/package.util.cjs"),a=require("../fs/fs.util.cjs"),v=require("../path/path.util.cjs"),n=require("../path/path.constant.cjs"),u=require("../log/log.util.cjs"),f=require("../log/log.type.cjs");var t=(i,r,o)=>new Promise((l,p)=>{var A=c=>{try{m(o.next(c))}catch(g){p(g)}},S=c=>{try{m(o.throw(c))}catch(g){p(g)}},m=c=>c.done?l(c.value):Promise.resolve(c.value).then(A,S);m((o=o.apply(i,r)).next())});function M(){try{return JSON.parse(a.readFileSync(v.resolve(__dirname,"../../../package.json"),"utf-8")).version}catch(i){return"1.0.0"}}function E(){return t(this,null,function*(){a.pathExistsSync(n.PATH.TS_CONFIG)?yield e.runCommand("Performing TypeScript validation",yield n.command.typescriptCheck()):u.log.warn("No TypeScript configuration found. Skipping type check.")})}function C(i=!1){return t(this,null,function*(){const r=i?yield n.command.eslintFix():yield n.command.eslintCheck(),o=i?"Running ESLint with auto-fix":"Running ESLint check";try{yield e.runCommand(o,r,{timeout:6e4,throwOnError:!0})}catch(l){l.code==="ETIMEDOUT"||l.killed||l.signal==="SIGTERM"?(u.log.warn("Lint check timed out. Retrying with debug mode enabled..."),d.env.DEBUG="true",yield e.runCommand(`${o} (Debug Mode)`,r)):u.catchError(l)}})}function h(i,r){if(!r.length)return;const o=i==="Errors"?"red":"yellow";u.log.printBoxedLog(i==="Errors"?"✖ Errors":"⚠ Warnings",r,o)}function s(){return t(this,null,function*(){setTimeout(()=>t(null,null,function*(){const i=(yield e.getStoredErrorLists())||[],r=i.filter(l=>l.type===f.E_IssueType.Error),o=i.filter(l=>l.type===f.E_IssueType.Warning);!r.length&&!o.length?u.log.printBoxedLog("✔ NO ISSUES FOUND",[],"green"):(h("Warnings",o),h("Errors",r),r.length>0&&d.exit(1))}),0)})}function G(){return t(this,null,function*(){yield e.clearAllErrorLists();const i=yield y.getPackage({name:n.CYBERSKILL_PACKAGE_NAME});if(!i.success){u.log.error("Failed to retrieve package information. Aborting lint-staged.");return}i.result.isCurrentProject&&(yield e.runCommand(`Building package: ${n.CYBERSKILL_PACKAGE_NAME}`,yield n.command.build())),yield e.runCommand("Executing lint-staged",yield n.command.lintStaged()),s()})}function L(){return t(this,null,function*(){yield e.runCommand("Inspecting ESLint configuration",yield n.command.eslintInspect())})}function P(){return t(this,null,function*(){yield e.clearAllErrorLists(),yield E(),yield C(),s()})}function b(){return t(this,null,function*(){yield e.clearAllErrorLists(),yield E(),yield C(!0),s()})}function O(){return t(this,null,function*(){yield e.clearAllErrorLists(),yield e.runCommand("Validating commit message",yield n.command.commitLint()),s()})}function _(){return t(this,null,function*(){yield e.runCommand("Configuring Git hooks",yield n.command.configureGitHook()),a.removeSync(n.PATH.GIT_HOOK);const i=yield e.resolveCommands(n.createGitHooksConfig);a.writeFileSync(n.PATH.SIMPLE_GIT_HOOKS_JSON,JSON.stringify(i,null,4)),a.addGitIgnoreEntry(n.PATH.GIT_IGNORE,n.SIMPLE_GIT_HOOK_JSON),yield e.runCommand("Setting up simple-git-hooks",yield n.command.simpleGitHooks())})}function k(){return t(this,null,function*(){try{yield e.runCommand(`Checking for ${n.AG_KIT_PACKAGE_NAME}`,`pnpm list -g ${n.AG_KIT_PACKAGE_NAME}`)}catch(i){yield e.runCommand(`Installing ${n.AG_KIT_PACKAGE_NAME} globally`,`pnpm i -g ${n.AG_KIT_PACKAGE_NAME}`)}a.pathExistsSync(n.PATH.DOT_AGENT)?yield e.runCommand("Updating AI agent","ag-kit update -y"):yield e.runCommand("Initializing AI agent","ag-kit init"),a.addGitIgnoreEntry(n.PATH.GIT_IGNORE,n.DOT_AGENT)})}function D(){return t(this,null,function*(){yield y.installDependencies(),yield _()})}function N(){return t(this,null,function*(){a.removeSync(n.PATH.NODE_MODULES,n.PATH.PNPM_LOCK_YAML),yield e.runCommand("Pruning pnpm store",yield n.command.pnpmPruneStore()),yield e.runCommand("Clearing pnpm cache",yield n.command.pnpmCleanCache()),yield y.installDependencies(),yield _(),yield k()})}function R(){return t(this,null,function*(){yield e.runCommand("Inspecting project dependencies",yield n.command.nodeModulesInspect())})}function B(){return t(this,null,function*(){yield e.runCommand("Running unit tests",yield n.command.testUnit())})}function K(){return t(this,null,function*(){yield e.runCommand("Running end-to-end tests",yield n.command.testE2e())})}function w(i){return t(this,null,function*(){yield e.runCommand("Creating MongoDB migration",yield n.command.mongoMigrateCreate(i))})}function H(){return t(this,null,function*(){yield e.runCommand("Running MongoDB migrations",yield n.command.mongoMigrateUp())})}function q(){return t(this,null,function*(){yield e.runCommand("Rolling back MongoDB migration",yield n.command.mongoMigrateDown())})}function x(){return t(this,null,function*(){yield e.runCommand("Starting Storybook development server",yield n.command.storybookDev())})}function U(){return t(this,null,function*(){yield e.runCommand("Building Storybook",yield n.command.storybookBuild())})}t(null,null,function*(){try{yield T(I.hideBin(d.argv)).scriptName(n.CYBERSKILL_CLI).usage("$0 <command> [options]").command("ai:setup","Setup AI agent environment",k).command("lint","Check code for linting issues",P).command("lint:fix","Fix linting issues automatically",b).command("lint:inspect","View active ESLint configuration",L).command("lint-staged","Run lint checks on staged files",G).command("commitlint","Validate commit message format",O).command("ready","Initialize project and dependencies",D).command("reset","Reset the project and reinstall dependencies",N).command("inspect","Analyze installed project dependencies",R).command("test:unit","Run unit test suite",B).command("test:e2e","Run end-to-end test suite",K).command("mongo:migrate:create <name>","Create a MongoDB migration",i=>i.positional("name",{describe:"Migration name",type:"string"}),i=>t(null,null,function*(){if(!i.name){u.log.error("Migration name is required.");return}yield w(i.name)})).command("mongo:migrate:up","Apply all MongoDB migrations",H).command("mongo:migrate:down","Rollback last MongoDB migration",q).command("storybook:dev","Start Storybook development server",x).command("storybook:build","Build Storybook for production",U).demandCommand(1,"Please specify a valid command.").strict().help().alias("h","help").alias("v","version").version(M()).epilog(`💡 Tip: Use "--help" with any command to see options
3
- `).parse()}catch(i){u.catchError(i),d.exit(1)}});
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.E_CommandType=(e=>(e.CLI="CLI",e.STRING="STRING",e.FUNCTION="FUNCTION",e))(exports.E_CommandType||{});
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("node:child_process"),p=require("node:process"),M=require("node:util"),E=require("../storage/storage.util.cjs"),b=require("../package/package.util.cjs"),h=require("../path/path.constant.cjs"),g=require("../log/log.type.cjs"),c=require("../log/log.util.cjs"),j=require("../../config/env/env.util.cjs");function B(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const A=B(M);var f=(e,r,t)=>new Promise((o,s)=>{var i=u=>{try{n(t.next(u))}catch(a){s(a)}},l=u=>{try{n(t.throw(u))}catch(a){s(a)}},n=u=>u.done?o(u.value):Promise.resolve(u.value).then(i,l);n((t=t.apply(e,r)).next())});const K=A.promisify(D.exec);function _(){return f(this,null,function*(){const e=yield b.getPackage();return e.success?e.result.name:Date.now().toString()})}function k(e){return f(this,null,function*(){if(e.length===0)return;const r=yield _();try{const o=[...yield O(),...e];yield E.storage.set(r,o),setTimeout(()=>f(null,null,function*(){const s=yield E.storage.getLogLink(r);s&&c.log.info(`📂 Open the error list manually: ${s}`)}),0)}catch(t){c.catchError(t)}})}function O(){return f(this,null,function*(){try{const e=yield _(),r=yield E.storage.get(e);return r!=null?r:[]}catch(e){return c.catchError(e,{returnValue:[]})}})}function R(){return f(this,null,function*(){try{const e=yield _();yield E.storage.remove(e)}catch(e){c.catchError(e)}})}function G(e){return f(this,null,function*(){const r=[],t=[];let o="";const s=/^\s*(\d+):(\d+)\s+(error|warning)\s+(.+?)\s+(\S+)$/,i=/^(.+?)\((\d+),(\d+)\):\s+(error|warning)\s+TS\d+:\s+(\S.+)$/,l=/^✖\s+(.*?)\s+\[(.*?)\]$/;e.split(`
2
- `).forEach(n=>{var u,a,v,C,$,I,P,L,w,T,S;if(n.startsWith("/"))o=n.trim();else{const d=s.exec(n)||[],m=i.exec(n)||[],y=l.exec(n)||[];d.length&&o?r.push({file:o,position:`${d[1]}:${d[2]}`,type:d[3]===g.E_IssueType.Error?g.E_IssueType.Error:g.E_IssueType.Warning,message:(a=(u=d==null?void 0:d[4])==null?void 0:u.trim())!=null?a:"",rule:(C=(v=d==null?void 0:d[5])==null?void 0:v.trim())!=null?C:""}):m.length?r.push({file:($=m==null?void 0:m[1])!=null?$:"",position:`${m[2]}:${m[3]}`,type:m[4]===g.E_IssueType.Error?g.E_IssueType.Error:g.E_IssueType.Warning,message:(P=(I=m==null?void 0:m[5])==null?void 0:I.trim())!=null?P:""}):y.length?r.push({file:"commitlint",type:g.E_IssueType.Error,message:(w=(L=y==null?void 0:y[1])==null?void 0:L.trim())!=null?w:"",rule:(S=(T=y==null?void 0:y[2])==null?void 0:T.trim())!=null?S:""}):t.push(n.trim())}}),r.length&&(yield k(r)),j.getEnv().DEBUG&&t.length&&(c.log.warn("Unmatched lines:"),t.forEach(n=>c.log.info(` ${n}`)))})}function N(e){return f(this,null,function*(){try{const r=JSON.parse(e),t=[];r.forEach(({filePath:o,messages:s})=>{s.forEach(({severity:i,line:l,column:n,ruleId:u,message:a})=>{t.push({type:i===2?g.E_IssueType.Error:g.E_IssueType.Warning,file:o,position:`${l}:${n}`,rule:u,message:a})})}),t.length&&(yield k(t))}catch(r){yield G(e)}})}function W(e){return f(this,arguments,function*(r,t=N,o={}){const s=new AbortController;p.on("SIGINT",()=>{c.log.warn("Process interrupted. Terminating..."),s.abort(),p.exit()});try{if(typeof r=="string"){const{stdout:i,stderr:l}=yield K(r,{maxBuffer:104857600,signal:s.signal,timeout:o.timeout});yield Promise.all([i,l].map(n=>n&&t(n)))}}catch(i){const{stdout:l,stderr:n,message:u}=i;yield Promise.all([l,n].map(a=>a&&t(a))),!n&&!l&&c.log.error(`Command failed: ${u}`)}})}function U(e){return{raw:!0,cmd:e}}function x(e,r){return r!=null&&r.isCurrentProject?`${h.PNPM_EXEC_CLI} ${h.TSX_CLI} ${h.CYBERSKILL_CLI_PATH} ${e}`:`${h.PNPM_EXEC_CLI} ${h.CYBERSKILL_CLI} ${e}`}function q(e,r){return typeof e=="function"?x(e(r),r):typeof e=="object"&&(e==null?void 0:e.raw)===!0?e.cmd:typeof e=="string"?x(e,r):e}function X(e){return f(this,null,function*(){const r=yield b.getPackage({name:h.CYBERSKILL_PACKAGE_NAME});if(r.success){const t={isCurrentProject:r.result.isCurrentProject},o=typeof e=="function"?e(t):e;return Object.fromEntries(Object.entries(o).map(([s,i])=>[s,q(i,t)]))}})}function Y(e,r){return f(this,arguments,function*(t,o,s={}){let i;try{const l=Date.now();c.log.start(`${t}`),j.getEnv().DEBUG?c.log.info(`→ ${o}`):i=setInterval(()=>{const n=Math.floor((Date.now()-l)/1e3);n>0&&p.stdout.write(`\r⏳ ${t}... ${n}s`)},100),yield W(o,N,s),i&&(clearInterval(i),p.stdout.write("\r\x1B[K")),c.log.success(`${t} done.`)}catch(l){if(i&&(clearInterval(i),p.stdout.write("\r\x1B[K")),s.throwOnError)throw l;c.catchError(l)}})}exports.clearAllErrorLists=R;exports.formatCommand=q;exports.getStoredErrorLists=O;exports.rawCommand=U;exports.resolveCommands=X;exports.runCommand=Y;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./command.type.cjs"),r=require("./command.util.cjs");Object.defineProperty(exports,"E_CommandType",{enumerable:!0,get:()=>e.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";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("@nestjs/core"),m=require("compression"),h=require("cookie-parser"),w=require("cors"),c=require("express"),q=require("express-session"),x=require("express-useragent"),b=require("graphql-upload/graphqlUploadExpress.mjs"),g=require("helmet");var S=Object.defineProperty,u=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,d=(e,r,t)=>r in e?S(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,E=(e,r)=>{for(var t in r||(r={}))v.call(r,t)&&d(e,t,r[t]);if(u)for(var t of u(r))p.call(r,t)&&d(e,t,r[t]);return e},C=(e,r)=>{var t={};for(var s in e)v.call(e,s)&&r.indexOf(s)<0&&(t[s]=e[s]);if(e!=null&&u)for(var s of u(e))r.indexOf(s)<0&&p.call(e,s)&&(t[s]=e[s]);return t},N=(e,r,t)=>new Promise((s,a)=>{var n=i=>{try{o(t.next(i))}catch(f){a(f)}},l=i=>{try{o(t.throw(i))}catch(f){a(f)}},o=i=>i.done?s(i.value):Promise.resolve(i.value).then(n,l);o((t=t.apply(e,r)).next())});function y(e){var r=e,{isDev:t,whiteList:s}=r,a=C(r,["isDev","whiteList"]);return E({origin:(n,l)=>{t||!n||s!=null&&s.includes(n!=null?n:"")?l(null,!0):l(new Error("Not allowed by CORS"),!1)},credentials:!0},a)}function j(e){return w(y(e))}function A(e){return q(e)}function _(e,r=!1){e.set("trust proxy",1),e.use(g({crossOriginEmbedderPolicy:r?!1:void 0,contentSecurityPolicy:r?!1:void 0})),e.use(h()),e.use(c.urlencoded({extended:!0})),e.use(m()),e.use(x.express())}function O(e,r){r&&(Array.isArray(r)?r:[r]).forEach(s=>{e.use(`/${s}`,c.static(s))})}function I(e){const r=c();return _(r,e==null?void 0:e.isDev),O(r,e==null?void 0:e.static),r.use(b()),r}function D(e){return N(this,null,function*(){const r=yield P.NestFactory.create(e.module);return _(r.getHttpAdapter().getInstance(),e.isDev),O(r.getHttpAdapter().getInstance(),e.static),e.filters&&r.useGlobalFilters(...e.filters),e.pipes&&r.useGlobalPipes(...e.pipes),r})}exports.express=c;exports.createCors=j;exports.createCorsOptions=y;exports.createExpress=I;exports.createNest=D;exports.createSession=A;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./express.util.cjs"),r=require("express"),t=require("body-parser");exports.createCors=e.createCors;exports.createCorsOptions=e.createCorsOptions;exports.createExpress=e.createExpress;exports.createNest=e.createNest;exports.createSession=e.createSession;Object.defineProperty(exports,"Router",{enumerable:!0,get:()=>r.Router});exports.express=r;exports.bodyParser=t;
@@ -1,4 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("fs-extra"),m=require("node:path");var _=Object.defineProperty,c=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,l=(n,e,r)=>e in n?_(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,O=(n,e)=>{for(var r in e||(e={}))f.call(e,r)&&l(n,r,e[r]);if(c)for(var r of c(e))S.call(e,r)&&l(n,r,e[r]);return n},g=(n,e)=>{var r={};for(var t in n)f.call(n,t)&&e.indexOf(t)<0&&(r[t]=n[t]);if(n!=null&&c)for(var t of c(n))e.indexOf(t)<0&&S.call(n,t)&&(r[t]=n[t]);return r};const E=i,{lstatSync:w,readdirSync:x,mkdirSync:F,readFileSync:s,unlinkSync:b,statSync:u,createWriteStream:j}=i,h=i.readJsonSync;function d(n,e,r){i.writeFileSync(n,e,r!=null?r:"utf-8")}function p(n,e,r){i.appendFileSync(n,e,r!=null?r:"utf-8")}function y(...n){return n.every(e=>i.pathExistsSync(e))}function J(...n){n.forEach(e=>{y(e)&&i.removeSync(e)})}function P(n,e,r={}){const t=r,{extensions:a}=t,v=g(t,["extensions"]);i.copySync(n,e,O({filter:o=>u(o).isDirectory()||!a||a.length===0?!0:a.includes(m.extname(o))},v))}function k(n,e){const r=`
2
- ${e}
3
- `;y(n)?s(n,"utf-8").split(`
4
- `).includes(e)||p(n,r):d(n,r)}exports.addGitIgnoreEntry=k;exports.appendFileSync=p;exports.copySync=P;exports.createWriteStream=j;exports.fs=E;exports.lstatSync=w;exports.mkdirSync=F;exports.pathExistsSync=y;exports.readFileSync=s;exports.readJsonSync=h;exports.readdirSync=x;exports.removeSync=J;exports.statSync=u;exports.unlinkSync=b;exports.writeFileSync=d;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./fs.util.cjs");exports.addGitIgnoreEntry=e.addGitIgnoreEntry;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 e=require("./log.type.cjs"),r=require("./log.util.cjs");Object.defineProperty(exports,"E_IssueType",{enumerable:!0,get:()=>e.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"});exports.E_IssueType=(r=>(r.Error="error",r.Warning="warning",r))(exports.E_IssueType||{});