@cyberskill/shared 1.209.0 → 1.211.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 (358) hide show
  1. package/dist/config/commitlint/index.cjs +1 -0
  2. package/dist/config/config.type.cjs +1 -0
  3. package/dist/config/config.type.js +4 -0
  4. package/dist/config/config.util.cjs +1 -0
  5. package/dist/config/config.util.js +58 -0
  6. package/dist/config/env/env.constant.cjs +1 -0
  7. package/dist/config/env/env.util.cjs +1 -0
  8. package/dist/config/env/env.util.js +29 -0
  9. package/dist/config/env/index.cjs +1 -0
  10. package/dist/config/eslint/index.cjs +1 -0
  11. package/dist/config/eslint/index.js +26 -0
  12. package/dist/config/graphql-codegen/graphql-codegen.util.cjs +1 -0
  13. package/dist/config/graphql-codegen/graphql-codegen.util.js +42 -0
  14. package/dist/config/graphql-codegen/index.cjs +1 -0
  15. package/dist/config/index.cjs +1 -0
  16. package/dist/config/index.js +6 -0
  17. package/dist/config/lint-staged/index.cjs +1 -0
  18. package/dist/config/vitest/index.cjs +1 -0
  19. package/dist/config/vitest/vitest.e2e.cjs +1 -0
  20. package/dist/config/vitest/vitest.e2e.js +30 -0
  21. package/dist/config/vitest/vitest.unit.cjs +1 -0
  22. package/dist/config/vitest/vitest.unit.js +26 -0
  23. package/dist/constant/common.cjs +1 -0
  24. package/dist/constant/common.js +4 -0
  25. package/dist/constant/index.cjs +1 -0
  26. package/dist/constant/response-status.cjs +1 -0
  27. package/dist/node/apollo-server/apollo-server.util.cjs +1 -0
  28. package/dist/node/apollo-server/apollo-server.util.js +56 -0
  29. package/dist/node/apollo-server/index.cjs +1 -0
  30. package/dist/node/cli/index.cjs +6 -0
  31. package/dist/node/cli/index.js +160 -0
  32. package/dist/node/command/command.type.cjs +1 -0
  33. package/dist/node/command/command.type.js +4 -0
  34. package/dist/node/command/command.util.cjs +2 -0
  35. package/dist/node/command/command.util.js +175 -0
  36. package/dist/node/command/index.cjs +1 -0
  37. package/dist/node/command/index.js +11 -0
  38. package/dist/node/express/express.util.cjs +1 -0
  39. package/dist/node/express/express.util.js +81 -0
  40. package/dist/node/express/index.cjs +1 -0
  41. package/dist/node/fs/fs.util.cjs +1 -0
  42. package/dist/node/fs/fs.util.js +63 -0
  43. package/dist/node/fs/index.cjs +1 -0
  44. package/dist/node/log/index.cjs +1 -0
  45. package/dist/node/log/index.js +8 -0
  46. package/dist/node/log/log.type.cjs +1 -0
  47. package/dist/node/log/log.type.js +4 -0
  48. package/dist/node/log/log.util.cjs +1 -0
  49. package/dist/node/log/log.util.js +60 -0
  50. package/dist/node/mongo/index.cjs +1 -0
  51. package/dist/node/mongo/index.js +17 -0
  52. package/dist/node/mongo/mongo.constant.cjs +1 -0
  53. package/dist/node/mongo/mongo.type.cjs +1 -0
  54. package/dist/node/mongo/mongo.type.js +16 -0
  55. package/dist/node/mongo/mongo.util.cjs +5 -0
  56. package/dist/node/mongo/mongo.util.js +556 -0
  57. package/dist/node/package/index.cjs +1 -0
  58. package/dist/node/package/index.js +10 -0
  59. package/dist/node/package/package.type.cjs +1 -0
  60. package/dist/node/package/package.type.js +4 -0
  61. package/dist/node/package/package.util.cjs +1 -0
  62. package/dist/node/package/package.util.js +254 -0
  63. package/dist/node/path/index.cjs +1 -0
  64. package/dist/node/path/index.js +52 -0
  65. package/dist/node/path/path.constant.cjs +1 -0
  66. package/dist/node/path/path.constant.js +295 -0
  67. package/dist/node/path/path.util.cjs +1 -0
  68. package/dist/node/storage/index.cjs +1 -0
  69. package/dist/node/storage/storage.util.cjs +1 -0
  70. package/dist/node/storage/storage.util.js +81 -0
  71. package/dist/node/upload/index.cjs +1 -0
  72. package/dist/node/upload/index.js +7 -0
  73. package/dist/node/upload/upload.type.cjs +1 -0
  74. package/dist/node/upload/upload.type.js +4 -0
  75. package/dist/node/upload/upload.util.cjs +1 -0
  76. package/dist/node/upload/upload.util.js +154 -0
  77. package/dist/node/ws/index.cjs +1 -0
  78. package/dist/node/ws/ts.util.cjs +1 -0
  79. package/dist/node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.13_@vitest_browser@3.2.4_jiti@2.4.2_j_cac3da623d5688a51c0b1a2270e144db/node_modules/vitest/dist/config.cjs +1 -0
  80. package/dist/{config-CwzVfkkX.js → node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.13_@vitest_browser@3.2.4_jiti@2.4.2_j_cac3da623d5688a51c0b1a2270e144db/node_modules/vitest/dist/config.js} +1 -1
  81. package/dist/react/apollo-client/apollo-client.component.cjs +1 -0
  82. package/dist/{src/react → react}/apollo-client/apollo-client.component.js +9 -12
  83. package/dist/react/apollo-client/apollo-client.constant.cjs +1 -0
  84. package/dist/react/apollo-client/apollo-client.context.cjs +1 -0
  85. package/dist/{src/react → react}/apollo-client/apollo-client.context.js +2 -2
  86. package/dist/react/apollo-client/apollo-client.util.cjs +1 -0
  87. package/dist/react/apollo-client/apollo-client.util.js +111 -0
  88. package/dist/react/apollo-client/index.cjs +1 -0
  89. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.component.cjs +1 -0
  90. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.rsc.cjs +1 -0
  91. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.util.cjs +1 -0
  92. package/dist/react/apollo-client-nextjs/apollo-client-nextjs.util.js +21 -0
  93. package/dist/react/apollo-client-nextjs/index.cjs +1 -0
  94. package/dist/react/apollo-error/apollo-error.component.cjs +1 -0
  95. package/dist/{src/react → react}/apollo-error/apollo-error.component.js +5 -12
  96. package/dist/react/apollo-error/apollo-error.context.cjs +1 -0
  97. package/dist/react/apollo-error/apollo-error.hook.cjs +1 -0
  98. package/dist/react/apollo-error/apollo-error.module.scss.cjs +1 -0
  99. package/dist/react/apollo-error/apollo-error.module.scss.js +11 -0
  100. package/dist/react/apollo-error/apollo-error.provider.cjs +1 -0
  101. package/dist/{src/react → react}/apollo-error/apollo-error.provider.js +2 -2
  102. package/dist/react/apollo-error/apollo-error.util.cjs +1 -0
  103. package/dist/{src/react → react}/apollo-error/apollo-error.util.js +1 -1
  104. package/dist/react/apollo-error/index.cjs +1 -0
  105. package/dist/react/i18next/i18next.hook.cjs +1 -0
  106. package/dist/react/i18next/i18next.util.cjs +1 -0
  107. package/dist/react/i18next/index.cjs +1 -0
  108. package/dist/react/loading/index.cjs +1 -0
  109. package/dist/react/loading/loading.component.cjs +6 -0
  110. package/dist/react/loading/loading.component.js +51 -0
  111. package/dist/react/loading/loading.context.cjs +1 -0
  112. package/dist/react/loading/loading.hook.cjs +1 -0
  113. package/dist/react/loading/loading.module.scss.cjs +1 -0
  114. package/dist/react/loading/loading.module.scss.js +15 -0
  115. package/dist/react/loading/loading.provider.cjs +1 -0
  116. package/dist/react/loading/loading.provider.js +17 -0
  117. package/dist/react/log/index.cjs +1 -0
  118. package/dist/react/log/log.util.cjs +1 -0
  119. package/dist/{src/react → react}/log/log.util.js +4 -4
  120. package/dist/react/next-intl/index.cjs +1 -0
  121. package/dist/react/next-intl/next-intl.constant.cjs +1 -0
  122. package/dist/react/next-intl/next-intl.context.cjs +1 -0
  123. package/dist/react/next-intl/next-intl.hoc.cjs +1 -0
  124. package/dist/react/next-intl/next-intl.hoc.js +32 -0
  125. package/dist/react/next-intl/next-intl.hook.cjs +1 -0
  126. package/dist/react/next-intl/next-intl.provider.cjs +1 -0
  127. package/dist/react/next-intl/next-intl.provider.js +23 -0
  128. package/dist/react/storage/index.cjs +1 -0
  129. package/dist/react/storage/storage.hook.cjs +1 -0
  130. package/dist/react/storage/storage.hook.js +77 -0
  131. package/dist/react/storage/storage.util.cjs +1 -0
  132. package/dist/react/storage/storage.util.js +60 -0
  133. package/dist/react/toast/index.cjs +1 -0
  134. package/dist/react/userback/index.cjs +1 -0
  135. package/dist/react/userback/userback.component.cjs +1 -0
  136. package/dist/react/userback/userback.component.js +51 -0
  137. package/dist/style.css +1 -1
  138. package/dist/typescript/common.type.cjs +1 -0
  139. package/dist/typescript/index.cjs +1 -0
  140. package/dist/typescript/index.js +4 -0
  141. package/dist/util/common/common.util.cjs +1 -0
  142. package/dist/util/common/common.util.js +56 -0
  143. package/dist/util/common/index.cjs +1 -0
  144. package/dist/util/index.cjs +1 -0
  145. package/dist/util/object/index.cjs +1 -0
  146. package/dist/util/object/object.util.cjs +1 -0
  147. package/dist/util/object/object.util.js +73 -0
  148. package/dist/util/serializer/index.cjs +1 -0
  149. package/dist/util/serializer/serializer.util.cjs +1 -0
  150. package/dist/util/string/index.cjs +1 -0
  151. package/dist/util/string/string.util.cjs +1 -0
  152. package/dist/util/string/string.util.js +61 -0
  153. package/dist/util/validate/index.cjs +1 -0
  154. package/dist/util/validate/validate.util.cjs +1 -0
  155. package/package.json +103 -69
  156. package/dist/index-BG1UznTl.js +0 -628
  157. package/dist/magic-string.es-BQ9KnLz-.js +0 -659
  158. package/dist/src/config/config.util.js +0 -50
  159. package/dist/src/config/env/env.util.js +0 -29
  160. package/dist/src/config/eslint/index.js +0 -18
  161. package/dist/src/config/graphql-codegen/graphql-codegen.util.js +0 -37
  162. package/dist/src/config/index.js +0 -5
  163. package/dist/src/config/vitest/vitest.e2e.js +0 -23
  164. package/dist/src/config/vitest/vitest.unit.js +0 -19
  165. package/dist/src/config/vitest/vitest.unit.setup.js +0 -30990
  166. package/dist/src/constant/common.js +0 -4
  167. package/dist/src/node/apollo-server/apollo-server.util.js +0 -31
  168. package/dist/src/node/cli/index.js +0 -108
  169. package/dist/src/node/command/command.util.js +0 -16
  170. package/dist/src/node/command/index.js +0 -10
  171. package/dist/src/node/express/express.util.js +0 -50
  172. package/dist/src/node/fs/fs.util.js +0 -48
  173. package/dist/src/node/log/index.js +0 -8
  174. package/dist/src/node/log/log.util.js +0 -59
  175. package/dist/src/node/mongo/index.js +0 -26
  176. package/dist/src/node/mongo/mongo.util.js +0 -488
  177. package/dist/src/node/package/index.js +0 -9
  178. package/dist/src/node/package/package.util.js +0 -13
  179. package/dist/src/node/path/index.js +0 -52
  180. package/dist/src/node/path/path.constant.js +0 -49
  181. package/dist/src/node/storage/storage.util.js +0 -51
  182. package/dist/src/node/upload/index.js +0 -6
  183. package/dist/src/node/upload/upload.util.js +0 -127
  184. package/dist/src/react/apollo-client/apollo-client.hook.js +0 -11
  185. package/dist/src/react/apollo-client/apollo-client.util.js +0 -101
  186. package/dist/src/react/apollo-client-nextjs/apollo-client-nextjs.util.js +0 -14
  187. package/dist/src/react/loading/loading.component.js +0 -40
  188. package/dist/src/react/loading/loading.provider.js +0 -17
  189. package/dist/src/react/next-intl/next-intl.hoc.js +0 -23
  190. package/dist/src/react/next-intl/next-intl.provider.js +0 -24
  191. package/dist/src/react/storage/storage.hook.js +0 -61
  192. package/dist/src/react/storage/storage.util.js +0 -35
  193. package/dist/src/react/userback/userback.component.js +0 -27
  194. package/dist/src/typescript/style.d.js +0 -1
  195. package/dist/src/util/common/common.util.js +0 -48
  196. package/dist/src/util/object/object.util.js +0 -67
  197. package/dist/src/util/string/string.util.js +0 -51
  198. /package/dist/{src/config → config}/commitlint/index.d.ts +0 -0
  199. /package/dist/{src/config → config}/commitlint/index.js +0 -0
  200. /package/dist/{src/config → config}/config.type.d.ts +0 -0
  201. /package/dist/{src/config → config}/config.util.d.ts +0 -0
  202. /package/dist/{src/config → config}/env/env.constant.d.ts +0 -0
  203. /package/dist/{src/config → config}/env/env.constant.js +0 -0
  204. /package/dist/{src/config → config}/env/env.type.d.ts +0 -0
  205. /package/dist/{src/config → config}/env/env.util.d.ts +0 -0
  206. /package/dist/{src/config → config}/env/index.d.ts +0 -0
  207. /package/dist/{src/config → config}/env/index.js +0 -0
  208. /package/dist/{src/config → config}/eslint/index.d.ts +0 -0
  209. /package/dist/{src/config → config}/graphql-codegen/graphql-codegen.type.d.ts +0 -0
  210. /package/dist/{src/config → config}/graphql-codegen/graphql-codegen.util.d.ts +0 -0
  211. /package/dist/{src/config → config}/graphql-codegen/index.d.ts +0 -0
  212. /package/dist/{src/config → config}/graphql-codegen/index.js +0 -0
  213. /package/dist/{src/config → config}/index.d.ts +0 -0
  214. /package/dist/{src/config → config}/lint-staged/index.d.ts +0 -0
  215. /package/dist/{src/config → config}/lint-staged/index.js +0 -0
  216. /package/dist/{src/config → config}/vitest/index.d.ts +0 -0
  217. /package/dist/{src/config → config}/vitest/index.js +0 -0
  218. /package/dist/{src/config → config}/vitest/vitest.e2e.d.ts +0 -0
  219. /package/dist/{src/config → config}/vitest/vitest.unit.d.ts +0 -0
  220. /package/dist/{src/constant → constant}/common.d.ts +0 -0
  221. /package/dist/{src/constant → constant}/index.d.ts +0 -0
  222. /package/dist/{src/constant → constant}/index.js +0 -0
  223. /package/dist/{src/constant → constant}/response-status.d.ts +0 -0
  224. /package/dist/{src/constant → constant}/response-status.js +0 -0
  225. /package/dist/{src/node → node}/apollo-server/apollo-server.type.d.ts +0 -0
  226. /package/dist/{src/node → node}/apollo-server/apollo-server.util.d.ts +0 -0
  227. /package/dist/{src/node → node}/apollo-server/index.d.ts +0 -0
  228. /package/dist/{src/node → node}/apollo-server/index.js +0 -0
  229. /package/dist/{src/node → node}/cli/index.d.ts +0 -0
  230. /package/dist/{src/node → node}/command/command.type.d.ts +0 -0
  231. /package/dist/{src/node → node}/command/command.util.d.ts +0 -0
  232. /package/dist/{src/node → node}/command/index.d.ts +0 -0
  233. /package/dist/{src/node → node}/express/express.type.d.ts +0 -0
  234. /package/dist/{src/node → node}/express/express.util.d.ts +0 -0
  235. /package/dist/{src/node → node}/express/index.d.ts +0 -0
  236. /package/dist/{src/node → node}/express/index.js +0 -0
  237. /package/dist/{src/node → node}/fs/fs.type.d.ts +0 -0
  238. /package/dist/{src/node → node}/fs/fs.util.d.ts +0 -0
  239. /package/dist/{src/node → node}/fs/index.d.ts +0 -0
  240. /package/dist/{src/node → node}/fs/index.js +0 -0
  241. /package/dist/{src/node → node}/log/index.d.ts +0 -0
  242. /package/dist/{src/node → node}/log/log.type.d.ts +0 -0
  243. /package/dist/{src/node → node}/log/log.util.d.ts +0 -0
  244. /package/dist/{src/node → node}/mongo/index.d.ts +0 -0
  245. /package/dist/{src/node → node}/mongo/mongo.constant.d.ts +0 -0
  246. /package/dist/{src/node → node}/mongo/mongo.constant.js +0 -0
  247. /package/dist/{src/node → node}/mongo/mongo.type.d.ts +0 -0
  248. /package/dist/{src/node → node}/mongo/mongo.util.d.ts +0 -0
  249. /package/dist/{src/node → node}/package/index.d.ts +0 -0
  250. /package/dist/{src/node → node}/package/package.type.d.ts +0 -0
  251. /package/dist/{src/node → node}/package/package.util.d.ts +0 -0
  252. /package/dist/{src/node → node}/path/index.d.ts +0 -0
  253. /package/dist/{src/node → node}/path/path.constant.d.ts +0 -0
  254. /package/dist/{src/node → node}/path/path.util.d.ts +0 -0
  255. /package/dist/{src/node → node}/path/path.util.js +0 -0
  256. /package/dist/{src/node → node}/storage/index.d.ts +0 -0
  257. /package/dist/{src/node → node}/storage/index.js +0 -0
  258. /package/dist/{src/node → node}/storage/storage.util.d.ts +0 -0
  259. /package/dist/{src/node → node}/upload/index.d.ts +0 -0
  260. /package/dist/{src/node → node}/upload/upload.type.d.ts +0 -0
  261. /package/dist/{src/node → node}/upload/upload.util.d.ts +0 -0
  262. /package/dist/{src/node → node}/ws/index.d.ts +0 -0
  263. /package/dist/{src/node → node}/ws/index.js +0 -0
  264. /package/dist/{src/node → node}/ws/ts.util.d.ts +0 -0
  265. /package/dist/{src/node → node}/ws/ts.util.js +0 -0
  266. /package/dist/{src/node → node}/ws/ws.type.d.ts +0 -0
  267. /package/dist/{src/react → react}/apollo-client/apollo-client.component.d.ts +0 -0
  268. /package/dist/{src/react → react}/apollo-client/apollo-client.constant.d.ts +0 -0
  269. /package/dist/{src/react → react}/apollo-client/apollo-client.constant.js +0 -0
  270. /package/dist/{src/react → react}/apollo-client/apollo-client.context.d.ts +0 -0
  271. /package/dist/{src/react → react}/apollo-client/apollo-client.hook.d.ts +0 -0
  272. /package/dist/{src/react → react}/apollo-client/apollo-client.type.d.ts +0 -0
  273. /package/dist/{src/react → react}/apollo-client/apollo-client.util.d.ts +0 -0
  274. /package/dist/{src/react → react}/apollo-client/index.d.ts +0 -0
  275. /package/dist/{src/react → react}/apollo-client/index.js +0 -0
  276. /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.component.d.ts +0 -0
  277. /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.component.js +0 -0
  278. /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.rsc.d.ts +0 -0
  279. /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.rsc.js +0 -0
  280. /package/dist/{src/react → react}/apollo-client-nextjs/apollo-client-nextjs.util.d.ts +0 -0
  281. /package/dist/{src/react → react}/apollo-client-nextjs/index.d.ts +0 -0
  282. /package/dist/{src/react → react}/apollo-client-nextjs/index.js +0 -0
  283. /package/dist/{src/react → react}/apollo-error/apollo-error.component.d.ts +0 -0
  284. /package/dist/{src/react → react}/apollo-error/apollo-error.context.d.ts +0 -0
  285. /package/dist/{src/react → react}/apollo-error/apollo-error.context.js +0 -0
  286. /package/dist/{src/react → react}/apollo-error/apollo-error.hook.d.ts +0 -0
  287. /package/dist/{src/react → react}/apollo-error/apollo-error.hook.js +0 -0
  288. /package/dist/{src/react → react}/apollo-error/apollo-error.provider.d.ts +0 -0
  289. /package/dist/{src/react → react}/apollo-error/apollo-error.type.d.ts +0 -0
  290. /package/dist/{src/react → react}/apollo-error/apollo-error.util.d.ts +0 -0
  291. /package/dist/{src/react → react}/apollo-error/index.d.ts +0 -0
  292. /package/dist/{src/react → react}/apollo-error/index.js +0 -0
  293. /package/dist/{src/react → react}/i18next/i18next.hook.d.ts +0 -0
  294. /package/dist/{src/react → react}/i18next/i18next.hook.js +0 -0
  295. /package/dist/{src/react → react}/i18next/i18next.util.d.ts +0 -0
  296. /package/dist/{src/react → react}/i18next/i18next.util.js +0 -0
  297. /package/dist/{src/react → react}/i18next/index.d.ts +0 -0
  298. /package/dist/{src/react → react}/i18next/index.js +0 -0
  299. /package/dist/{src/react → react}/loading/index.d.ts +0 -0
  300. /package/dist/{src/react → react}/loading/index.js +0 -0
  301. /package/dist/{src/react → react}/loading/loading.component.d.ts +0 -0
  302. /package/dist/{src/react → react}/loading/loading.context.d.ts +0 -0
  303. /package/dist/{src/react → react}/loading/loading.context.js +0 -0
  304. /package/dist/{src/react → react}/loading/loading.hook.d.ts +0 -0
  305. /package/dist/{src/react → react}/loading/loading.hook.js +0 -0
  306. /package/dist/{src/react → react}/loading/loading.provider.d.ts +0 -0
  307. /package/dist/{src/react → react}/loading/loading.type.d.ts +0 -0
  308. /package/dist/{src/react → react}/log/index.d.ts +0 -0
  309. /package/dist/{src/react → react}/log/index.js +0 -0
  310. /package/dist/{src/react → react}/log/log.type.d.ts +0 -0
  311. /package/dist/{src/react → react}/log/log.util.d.ts +0 -0
  312. /package/dist/{src/react → react}/next-intl/index.d.ts +0 -0
  313. /package/dist/{src/react → react}/next-intl/index.js +0 -0
  314. /package/dist/{src/react → react}/next-intl/next-intl.constant.d.ts +0 -0
  315. /package/dist/{src/react → react}/next-intl/next-intl.constant.js +0 -0
  316. /package/dist/{src/react → react}/next-intl/next-intl.context.d.ts +0 -0
  317. /package/dist/{src/react → react}/next-intl/next-intl.context.js +0 -0
  318. /package/dist/{src/react → react}/next-intl/next-intl.hoc.d.ts +0 -0
  319. /package/dist/{src/react → react}/next-intl/next-intl.hook.d.ts +0 -0
  320. /package/dist/{src/react → react}/next-intl/next-intl.hook.js +0 -0
  321. /package/dist/{src/react → react}/next-intl/next-intl.provider.d.ts +0 -0
  322. /package/dist/{src/react → react}/next-intl/next-intl.type.d.ts +0 -0
  323. /package/dist/{src/react → react}/storage/index.d.ts +0 -0
  324. /package/dist/{src/react → react}/storage/index.js +0 -0
  325. /package/dist/{src/react → react}/storage/storage.hook.d.ts +0 -0
  326. /package/dist/{src/react → react}/storage/storage.util.d.ts +0 -0
  327. /package/dist/{src/react → react}/toast/index.d.ts +0 -0
  328. /package/dist/{src/react → react}/toast/index.js +0 -0
  329. /package/dist/{src/react → react}/userback/index.d.ts +0 -0
  330. /package/dist/{src/react → react}/userback/index.js +0 -0
  331. /package/dist/{src/react → react}/userback/userback.component.d.ts +0 -0
  332. /package/dist/{src/react → react}/userback/userback.type.d.ts +0 -0
  333. /package/dist/{src/typescript → typescript}/common.type.d.ts +0 -0
  334. /package/dist/{src/typescript/index.js → typescript/common.type.js} +0 -0
  335. /package/dist/{src/typescript → typescript}/index.d.ts +0 -0
  336. /package/dist/{src/typescript → typescript}/react.type.d.ts +0 -0
  337. /package/dist/{src/util → util}/common/common.type.d.ts +0 -0
  338. /package/dist/{src/util → util}/common/common.util.d.ts +0 -0
  339. /package/dist/{src/util → util}/common/index.d.ts +0 -0
  340. /package/dist/{src/util → util}/common/index.js +0 -0
  341. /package/dist/{src/util → util}/index.d.ts +0 -0
  342. /package/dist/{src/util → util}/index.js +0 -0
  343. /package/dist/{src/util → util}/object/index.d.ts +0 -0
  344. /package/dist/{src/util → util}/object/index.js +0 -0
  345. /package/dist/{src/util → util}/object/object.util.d.ts +0 -0
  346. /package/dist/{src/util → util}/serializer/index.d.ts +0 -0
  347. /package/dist/{src/util → util}/serializer/index.js +0 -0
  348. /package/dist/{src/util → util}/serializer/serializer.type.d.ts +0 -0
  349. /package/dist/{src/util → util}/serializer/serializer.util.d.ts +0 -0
  350. /package/dist/{src/util → util}/serializer/serializer.util.js +0 -0
  351. /package/dist/{src/util → util}/string/index.d.ts +0 -0
  352. /package/dist/{src/util → util}/string/index.js +0 -0
  353. /package/dist/{src/util → util}/string/string.type.d.ts +0 -0
  354. /package/dist/{src/util → util}/string/string.util.d.ts +0 -0
  355. /package/dist/{src/util → util}/validate/index.d.ts +0 -0
  356. /package/dist/{src/util → util}/validate/index.js +0 -0
  357. /package/dist/{src/util → util}/validate/validate.util.d.ts +0 -0
  358. /package/dist/{src/util → util}/validate/validate.util.js +0 -0
@@ -0,0 +1 @@
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;
@@ -0,0 +1 @@
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||{});
@@ -0,0 +1,4 @@
1
+ var T = /* @__PURE__ */ ((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))(T || {});
2
+ export {
3
+ T as E_ConfigType
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@antfu/eslint-config"),i=require("./config.type.cjs"),y=require("./eslint/index.cjs"),p=require("./vitest/vitest.e2e.cjs"),u=require("./vitest/vitest.unit.cjs"),s=require("../util/object/object.util.cjs");var g=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,d=(e,n)=>{var t={};for(var r in e)E.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&g)for(var r of g(e))n.indexOf(r)<0&&T.call(e,r)&&(t[r]=e[r]);return t};const c=(...e)=>{const t=s.deepMerge(y.default,...e.map(o=>o)),{ignores:r}=t,f=d(t,["ignores"]),a=Array.isArray(r)&&r.every(o=>typeof o=="string")?{ignores:r}:void 0,_=[f,...a?[a]:[]];return l({stylistic:{semi:!0,indent:4,quotes:"single"},formatters:{css:!0,html:!0,markdown:"prettier"},yaml:!1,react:!0},..._)},m={[i.E_ConfigType.ESLINT]:e=>c(e),[i.E_ConfigType.COMMITLINT]:e=>s.deepMerge(e),[i.E_ConfigType.LINT_STAGED]:e=>s.deepMerge(e),[i.E_ConfigType.VITEST_REACT_UNIT]:e=>u.vitestUnit(e),[i.E_ConfigType.VITEST_REACT_E2E]:e=>p.vitestE2E(e)};function v(e,...n){const t=m[e];if(!n||n.length===0)return t({});if(!t)throw new Error(`Unknown config type: ${e}`);return t(...n)}exports.mergeConfigs=v;
@@ -0,0 +1,58 @@
1
+ import g from "@antfu/eslint-config";
2
+ import { E_ConfigType as o } from "./config.type.js";
3
+ import l from "./eslint/index.js";
4
+ import { vitestE2E as y } from "./vitest/vitest.e2e.js";
5
+ import { vitestUnit as E } from "./vitest/vitest.unit.js";
6
+ import { deepMerge as a } from "../util/object/object.util.js";
7
+ var f = Object.getOwnPropertySymbols, _ = Object.prototype.hasOwnProperty, T = Object.prototype.propertyIsEnumerable, d = (r, n) => {
8
+ var e = {};
9
+ for (var t in r)
10
+ _.call(r, t) && n.indexOf(t) < 0 && (e[t] = r[t]);
11
+ if (r != null && f)
12
+ for (var t of f(r))
13
+ n.indexOf(t) < 0 && T.call(r, t) && (e[t] = r[t]);
14
+ return e;
15
+ };
16
+ const v = (...r) => {
17
+ const e = a(
18
+ l,
19
+ ...r.map((i) => i)
20
+ ), { ignores: t } = e, m = d(e, ["ignores"]), s = Array.isArray(t) && t.every((i) => typeof i == "string") ? { ignores: t } : void 0, p = [
21
+ m,
22
+ ...s ? [s] : []
23
+ ];
24
+ return g(
25
+ {
26
+ stylistic: {
27
+ semi: !0,
28
+ indent: 4,
29
+ quotes: "single"
30
+ },
31
+ formatters: {
32
+ css: !0,
33
+ html: !0,
34
+ markdown: "prettier"
35
+ },
36
+ yaml: !1,
37
+ react: !0
38
+ },
39
+ ...p
40
+ );
41
+ }, c = {
42
+ [o.ESLINT]: (r) => v(r),
43
+ [o.COMMITLINT]: (r) => a(r),
44
+ [o.LINT_STAGED]: (r) => a(r),
45
+ [o.VITEST_REACT_UNIT]: (r) => E(r),
46
+ [o.VITEST_REACT_E2E]: (r) => y(r)
47
+ };
48
+ function u(r, ...n) {
49
+ const e = c[r];
50
+ if (!n || n.length === 0)
51
+ return e({});
52
+ if (!e)
53
+ throw new Error(`Unknown config type: ${r}`);
54
+ return e(...n);
55
+ }
56
+ export {
57
+ u as mergeConfigs
58
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=".cyberskill-storage";exports.CYBERSKILL_STORAGE_DIRECTORY=e;
@@ -0,0 +1 @@
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;
@@ -0,0 +1,29 @@
1
+ import n from "@dotenvx/dotenvx";
2
+ import { cleanEnv as E, str as r, makeValidator as f } from "envalid";
3
+ import i from "node:os";
4
+ import a from "node:path";
5
+ import o from "node:process";
6
+ import { CYBERSKILL_STORAGE_DIRECTORY as m } from "./env.constant.js";
7
+ import { E_Environment as R } from "../../typescript/common.type.js";
8
+ let t = !1;
9
+ const l = f((e) => typeof e == "boolean" ? e : typeof e == "string");
10
+ function d() {
11
+ o.env.NODE_ENV !== R.PRODUCTION && !t && (n.config(), t = !0);
12
+ }
13
+ function p() {
14
+ d();
15
+ const e = E(o.env, {
16
+ CWD: r({ default: o.cwd() }),
17
+ DEBUG: l({ default: !1 }),
18
+ CYBERSKILL_STORAGE_DIRECTORY: r({ default: a.join(i.homedir(), m) })
19
+ });
20
+ return {
21
+ CWD: e.CWD,
22
+ DEBUG: e.DEBUG,
23
+ CYBERSKILL_STORAGE_DIRECTORY: e.CYBERSKILL_STORAGE_DIRECTORY
24
+ };
25
+ }
26
+ export {
27
+ p as getEnv,
28
+ d as loadEnvFile
29
+ };
@@ -0,0 +1 @@
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;
@@ -0,0 +1 @@
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:["build","dist"]}];exports.default=d;
@@ -0,0 +1,26 @@
1
+ import * as t from "globals";
2
+ var l = Object.defineProperty, a = Object.getOwnPropertySymbols, i = Object.prototype.hasOwnProperty, p = Object.prototype.propertyIsEnumerable, n = (o, r, e) => r in o ? l(o, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[r] = e, s = (o, r) => {
3
+ for (var e in r || (r = {}))
4
+ i.call(r, e) && n(o, e, r[e]);
5
+ if (a)
6
+ for (var e of a(r))
7
+ p.call(r, e) && n(o, e, r[e]);
8
+ return o;
9
+ };
10
+ const f = [
11
+ {
12
+ languageOptions: {
13
+ globals: s(s({}, t.node), t.browser)
14
+ },
15
+ rules: {
16
+ "perfectionist/sort-imports": ["error", {
17
+ internalPattern: ["^#.*", "^@/.*"]
18
+ }],
19
+ "dot-notation": "off"
20
+ },
21
+ ignores: ["build", "dist"]
22
+ }
23
+ ];
24
+ export {
25
+ f as default
26
+ };
@@ -0,0 +1 @@
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,o=(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:n="client"}){const s=n==="client",p=n==="server";return d(o({schema:t,ignoreNoDocuments:!0,overwrite:!0},s&&{documents:[e]}),{generates:o(o({},s&&{[r]:{preset:"client",presetConfig:{fragmentMasking:!1,persistedDocuments:!0},config:{useTypeImports:!0}}}),p&&{[r]:c.defineConfig()})})}exports.createGraphqlCodegenConfig=m;
@@ -0,0 +1,42 @@
1
+ import { defineConfig as c } from "@eddeee888/gcg-typescript-resolver-files";
2
+ import { loadEnvFile as f } from "../env/env.util.js";
3
+ var l = Object.defineProperty, u = Object.defineProperties, _ = Object.getOwnPropertyDescriptors, i = Object.getOwnPropertySymbols, m = Object.prototype.hasOwnProperty, v = Object.prototype.propertyIsEnumerable, p = (t, e, r) => e in t ? l(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, o = (t, e) => {
4
+ for (var r in e || (e = {}))
5
+ m.call(e, r) && p(t, r, e[r]);
6
+ if (i)
7
+ for (var r of i(e))
8
+ v.call(e, r) && p(t, r, e[r]);
9
+ return t;
10
+ }, g = (t, e) => u(t, _(e));
11
+ f();
12
+ function P({
13
+ uri: t,
14
+ from: e,
15
+ to: r,
16
+ target: n = "client"
17
+ }) {
18
+ const s = n === "client", a = n === "server";
19
+ return g(o({
20
+ schema: t,
21
+ ignoreNoDocuments: !0,
22
+ overwrite: !0
23
+ }, s && { documents: [e] }), {
24
+ generates: o(o({}, s && {
25
+ [r]: {
26
+ preset: "client",
27
+ presetConfig: {
28
+ fragmentMasking: !1,
29
+ persistedDocuments: !0
30
+ },
31
+ config: {
32
+ useTypeImports: !0
33
+ }
34
+ }
35
+ }), a && {
36
+ [r]: c()
37
+ })
38
+ });
39
+ }
40
+ export {
41
+ P as createGraphqlCodegenConfig
42
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./graphql-codegen.util.cjs");exports.createGraphqlCodegenConfig=e.createGraphqlCodegenConfig;
@@ -0,0 +1 @@
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;
@@ -0,0 +1,6 @@
1
+ import { E_ConfigType as r } from "./config.type.js";
2
+ import { mergeConfigs as g } from "./config.util.js";
3
+ export {
4
+ r as E_ConfigType,
5
+ g as mergeConfigs
6
+ };
@@ -0,0 +1 @@
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;
@@ -0,0 +1 @@
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;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@vitejs/plugin-react-swc"),s=require("../../node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.13_@vitest_browser@3.2.4_jiti@2.4.2_j_cac3da623d5688a51c0b1a2270e144db/node_modules/vitest/dist/config.cjs");var a=Object.defineProperty,o=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,i=(t,r,e)=>r in t?a(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e,p=(t,r)=>{for(var e in r||(r={}))u.call(r,e)&&i(t,e,r[e]);if(o)for(var e of o(r))l.call(r,e)&&i(t,e,r[e]);return t};function c(t){return s.defineConfig(p({plugins:[n()],test:{include:["**/*.test.e2e.?(c|m)[jt]s?(x)"],browser:{enabled:!0,provider:"playwright",instances:[{browser:"chromium"},{browser:"firefox"},{browser:"webkit"}]}}},t))}exports.vitestE2E=c;
@@ -0,0 +1,30 @@
1
+ import n from "@vitejs/plugin-react-swc";
2
+ import { defineConfig as a } from "../../node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.13_@vitest_browser@3.2.4_jiti@2.4.2_j_cac3da623d5688a51c0b1a2270e144db/node_modules/vitest/dist/config.js";
3
+ var p = Object.defineProperty, o = Object.getOwnPropertySymbols, s = Object.prototype.hasOwnProperty, f = Object.prototype.propertyIsEnumerable, i = (t, r, e) => r in t ? p(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e, l = (t, r) => {
4
+ for (var e in r || (r = {}))
5
+ s.call(r, e) && i(t, e, r[e]);
6
+ if (o)
7
+ for (var e of o(r))
8
+ f.call(r, e) && i(t, e, r[e]);
9
+ return t;
10
+ };
11
+ function m(t) {
12
+ return a(l({
13
+ plugins: [n()],
14
+ test: {
15
+ include: ["**/*.test.e2e.?(c|m)[jt]s?(x)"],
16
+ browser: {
17
+ enabled: !0,
18
+ provider: "playwright",
19
+ instances: [
20
+ { browser: "chromium" },
21
+ { browser: "firefox" },
22
+ { browser: "webkit" }
23
+ ]
24
+ }
25
+ }
26
+ }, t));
27
+ }
28
+ export {
29
+ m as vitestE2E
30
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@vitejs/plugin-react-swc"),a=require("../../node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.13_@vitest_browser@3.2.4_jiti@2.4.2_j_cac3da623d5688a51c0b1a2270e144db/node_modules/vitest/dist/config.cjs"),s=require("../../node/path/path.constant.cjs");var u=Object.defineProperty,n=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,o=(t,e,r)=>e in t?u(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,c=(t,e)=>{for(var r in e||(e={}))l.call(e,r)&&o(t,r,e[r]);if(n)for(var r of n(e))p.call(e,r)&&o(t,r,e[r]);return t};function _(t){return a.defineConfig(c({plugins:[i()],test:{globals:!0,environment:"jsdom",pool:"vmThreads",include:["**/*.test.unit.?(c|m)[jt]s?(x)"],setupFiles:[s.PATH.VITEST_UNIT_SETUP_CONFIG]}},t))}exports.vitestUnit=_;
@@ -0,0 +1,26 @@
1
+ import i from "@vitejs/plugin-react-swc";
2
+ import { defineConfig as p } from "../../node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.13_@vitest_browser@3.2.4_jiti@2.4.2_j_cac3da623d5688a51c0b1a2270e144db/node_modules/vitest/dist/config.js";
3
+ import { PATH as a } from "../../node/path/path.constant.js";
4
+ var s = Object.defineProperty, o = Object.getOwnPropertySymbols, l = Object.prototype.hasOwnProperty, f = Object.prototype.propertyIsEnumerable, n = (t, r, e) => r in t ? s(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e, m = (t, r) => {
5
+ for (var e in r || (r = {}))
6
+ l.call(r, e) && n(t, e, r[e]);
7
+ if (o)
8
+ for (var e of o(r))
9
+ f.call(r, e) && n(t, e, r[e]);
10
+ return t;
11
+ };
12
+ function v(t) {
13
+ return p(m({
14
+ plugins: [i()],
15
+ test: {
16
+ globals: !0,
17
+ environment: "jsdom",
18
+ pool: "vmThreads",
19
+ include: ["**/*.test.unit.?(c|m)[jt]s?(x)"],
20
+ setupFiles: [a.VITEST_UNIT_SETUP_CONFIG]
21
+ }
22
+ }, t));
23
+ }
24
+ export {
25
+ v as vitestUnit
26
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=typeof window!="undefined";exports.IS_BROWSER=e;
@@ -0,0 +1,4 @@
1
+ const e = typeof window != "undefined";
2
+ export {
3
+ e as IS_BROWSER
4
+ };
@@ -0,0 +1 @@
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;
@@ -0,0 +1 @@
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;
@@ -0,0 +1 @@
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;
@@ -0,0 +1,56 @@
1
+ import { ApolloServer as s } from "@apollo/server";
2
+ import { ApolloServerPluginDrainHttpServer as m } from "@apollo/server/plugin/drainHttpServer";
3
+ import { ApolloServerPluginLandingPageLocalDefault as d, ApolloServerPluginLandingPageProductionDefault as S } from "@apollo/server/plugin/landingPage/default";
4
+ import { log as P } from "../log/log.util.js";
5
+ var _ = Object.defineProperty, i = Object.getOwnPropertySymbols, h = Object.prototype.hasOwnProperty, y = Object.prototype.propertyIsEnumerable, u = (r, e, l) => e in r ? _(r, e, { enumerable: !0, configurable: !0, writable: !0, value: l }) : r[e] = l, g = (r, e) => {
6
+ for (var l in e || (e = {}))
7
+ h.call(e, l) && u(r, l, e[l]);
8
+ if (i)
9
+ for (var l of i(e))
10
+ y.call(e, l) && u(r, l, e[l]);
11
+ return r;
12
+ }, v = (r, e, l) => new Promise((p, o) => {
13
+ var c = (t) => {
14
+ try {
15
+ a(l.next(t));
16
+ } catch (n) {
17
+ o(n);
18
+ }
19
+ }, f = (t) => {
20
+ try {
21
+ a(l.throw(t));
22
+ } catch (n) {
23
+ o(n);
24
+ }
25
+ }, a = (t) => t.done ? p(t.value) : Promise.resolve(t.value).then(c, f);
26
+ a((l = l.apply(r, e)).next());
27
+ });
28
+ function E(r) {
29
+ return new s(g({
30
+ schema: r.schema,
31
+ plugins: [
32
+ r.isDev ? d() : S(),
33
+ m({ httpServer: r.server }),
34
+ ...r.drainServer ? [{
35
+ serverWillStart() {
36
+ return v(this, null, function* () {
37
+ return {
38
+ drainServer() {
39
+ return v(this, null, function* () {
40
+ var e;
41
+ (e = r.drainServer) == null || e.call(r), P.info("Apollo Server drainServer hook called");
42
+ });
43
+ }
44
+ };
45
+ });
46
+ }
47
+ }] : []
48
+ ]
49
+ }, r.isDev && {
50
+ introspection: !0,
51
+ includeStacktraceInErrorResponses: !0
52
+ }));
53
+ }
54
+ export {
55
+ E as createApolloServer
56
+ };
@@ -0,0 +1 @@
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});
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ "use strict";const g=require("node:process"),k=require("yargs/helpers"),L=require("yargs/yargs"),i=require("../command/command.util.cjs"),p=require("../package/package.util.cjs"),l=require("../fs/fs.util.cjs"),P=require("../path/path.util.cjs"),n=require("../path/path.constant.cjs"),s=require("../log/log.util.cjs"),f=require("../log/log.type.cjs");var t=(e,o,r)=>new Promise((c,y)=>{var _=a=>{try{m(r.next(a))}catch(d){y(d)}},I=a=>{try{m(r.throw(a))}catch(d){y(d)}},m=a=>a.done?c(a.value):Promise.resolve(a.value).then(_,I);m((r=r.apply(e,o)).next())});function T(){try{return JSON.parse(l.readFileSync(P.resolve(__dirname,"../../../package.json"),"utf-8")).version}catch(e){return"1.0.0"}}function C(){return t(this,null,function*(){l.pathExistsSync(n.PATH.TS_CONFIG)?yield i.runCommand("Performing TypeScript validation",yield n.command.typescriptCheck()):s.log.warn("No TypeScript configuration found. Skipping type check.")})}function E(e=!1){return t(this,null,function*(){e?yield i.runCommand("Running ESLint with auto-fix",yield n.command.eslintFix()):yield i.runCommand("Running ESLint check",yield n.command.eslintCheck())})}function h(e,o){if(!o.length)return;const r=e==="Errors"?"red":"yellow";s.log.printBoxedLog(e==="Errors"?"✖ Errors":"⚠ Warnings",o,r)}function u(){return t(this,null,function*(){setTimeout(()=>t(null,null,function*(){const e=yield i.getStoredErrorLists(),o=e.filter(c=>c.type===f.E_IssueType.Error),r=e.filter(c=>c.type===f.E_IssueType.Warning);!o.length&&!r.length?s.log.printBoxedLog("✔ NO ISSUES FOUND",[],"green"):(h("Warnings",r),h("Errors",o),o.length>0&&g.exit(1))}),0)})}function A(){return t(this,null,function*(){yield i.clearAllErrorLists();const e=yield p.getPackage({name:n.CYBERSKILL_PACKAGE_NAME});if(!e.success){s.log.error("Failed to retrieve package information. Aborting lint-staged.");return}e.result.isCurrentProject&&(yield i.runCommand(`Building package: ${n.CYBERSKILL_PACKAGE_NAME}`,yield n.command.build())),yield i.runCommand("Executing lint-staged",yield n.command.lintStaged()),u()})}function M(){return t(this,null,function*(){yield i.runCommand("Inspecting ESLint configuration",yield n.command.eslintInspect())})}function O(){return t(this,null,function*(){yield i.clearAllErrorLists(),yield Promise.all([C(),E()]),u()})}function v(){return t(this,null,function*(){yield i.clearAllErrorLists(),yield Promise.all([C(),E(!0)]),u()})}function G(){return t(this,null,function*(){yield i.clearAllErrorLists(),yield i.runCommand("Validating commit message",yield n.command.commitLint()),u()})}function S(){return t(this,null,function*(){yield i.runCommand("Configuring Git hooks",yield n.command.configureGitHook()),l.removeSync(n.PATH.GIT_HOOK);const e=yield i.resolveCommands(n.createGitHooksConfig);l.writeFileSync(n.PATH.SIMPLE_GIT_HOOKS_JSON,JSON.stringify(e,null,4));const o=`
3
+ ${n.SIMPLE_GIT_HOOK_JSON}
4
+ `;l.pathExistsSync(n.PATH.GIT_IGNORE)?l.readFileSync(n.PATH.GIT_IGNORE,"utf-8").split(`
5
+ `).includes(n.SIMPLE_GIT_HOOK_JSON)||l.appendFileSync(n.PATH.GIT_IGNORE,o):l.writeFileSync(n.PATH.GIT_IGNORE,o),yield i.runCommand("Setting up simple-git-hooks",yield n.command.simpleGitHooks())})}function R(){return t(this,null,function*(){yield p.installDependencies(),yield S()})}function N(){return t(this,null,function*(){l.removeSync(n.PATH.NODE_MODULES,n.PATH.PNPM_LOCK_YAML),yield i.runCommand("Pruning pnpm store",yield n.command.pnpmPruneStore()),yield i.runCommand("Clearing pnpm cache",yield n.command.pnpmCleanCache()),yield p.installDependencies(),yield S()})}function H(){return t(this,null,function*(){yield i.runCommand("Inspecting project dependencies",yield n.command.nodeModulesInspect())})}function w(){return t(this,null,function*(){yield i.runCommand("Running unit tests",yield n.command.testUnit())})}function D(){return t(this,null,function*(){yield i.runCommand("Running end-to-end tests",yield n.command.testE2e())})}function B(e){return t(this,null,function*(){yield i.runCommand("Creating MongoDB migration",yield n.command.mongoMigrateCreate(e))})}function x(){return t(this,null,function*(){yield i.runCommand("Running MongoDB migrations",yield n.command.mongoMigrateUp())})}function q(){return t(this,null,function*(){yield i.runCommand("Rolling back MongoDB migration",yield n.command.mongoMigrateDown())})}t(null,null,function*(){try{yield L(k.hideBin(g.argv)).scriptName(n.CYBERSKILL_CLI).usage("$0 <command> [options]").command("lint","Check code for linting issues",O).command("lint:fix","Fix linting issues automatically",v).command("lint:inspect","View active ESLint configuration",M).command("lint-staged","Run lint checks on staged files",A).command("commitlint","Validate commit message format",G).command("ready","Initialize project and dependencies",R).command("reset","Reset the project and reinstall dependencies",N).command("inspect","Analyze installed project dependencies",H).command("test:unit","Run unit test suite",w).command("test:e2e","Run end-to-end test suite",D).command("mongo:migrate:create <name>","Create a MongoDB migration",e=>e.positional("name",{describe:"Migration name",type:"string"}),e=>t(null,null,function*(){if(!e.name){s.log.error("Migration name is required.");return}yield B(e.name)})).command("mongo:migrate:up","Apply all MongoDB migrations",x).command("mongo:migrate:down","Rollback last MongoDB migration",q).demandCommand(1,"Please specify a valid command.").strict().help().alias("h","help").alias("v","version").version(T()).epilog(`💡 Tip: Use "--help" with any command to see options
6
+ `).parse()}catch(e){s.catchError(e),g.exit(1)}});
@@ -0,0 +1,160 @@
1
+ #!/usr/bin/env node
2
+ import p from "node:process";
3
+ import { hideBin as N } from "yargs/helpers";
4
+ import P from "yargs/yargs";
5
+ import { clearAllErrorLists as u, runCommand as i, getStoredErrorLists as T, resolveCommands as w } from "../command/command.util.js";
6
+ import { getPackage as D, installDependencies as I } from "../package/package.util.js";
7
+ import { removeSync as C, readFileSync as _, pathExistsSync as L, writeFileSync as y, appendFileSync as B } from "../fs/fs.util.js";
8
+ import { resolve as x } from "../path/path.util.js";
9
+ import { CYBERSKILL_CLI as A, command as t, CYBERSKILL_PACKAGE_NAME as h, PATH as l, SIMPLE_GIT_HOOK_JSON as E, createGitHooksConfig as F } from "../path/path.constant.js";
10
+ import { log as a, catchError as H } from "../log/log.util.js";
11
+ import { E_IssueType as S } from "../log/log.type.js";
12
+ var e = (n, o, r) => new Promise((c, f) => {
13
+ var R = (s) => {
14
+ try {
15
+ m(r.next(s));
16
+ } catch (g) {
17
+ f(g);
18
+ }
19
+ }, G = (s) => {
20
+ try {
21
+ m(r.throw(s));
22
+ } catch (g) {
23
+ f(g);
24
+ }
25
+ }, m = (s) => s.done ? c(s.value) : Promise.resolve(s.value).then(R, G);
26
+ m((r = r.apply(n, o)).next());
27
+ });
28
+ function U() {
29
+ try {
30
+ return JSON.parse(
31
+ _(x(__dirname, "../../../package.json"), "utf-8")
32
+ ).version;
33
+ } catch (n) {
34
+ return "1.0.0";
35
+ }
36
+ }
37
+ function M() {
38
+ return e(this, null, function* () {
39
+ L(l.TS_CONFIG) ? yield i("Performing TypeScript validation", yield t.typescriptCheck()) : a.warn("No TypeScript configuration found. Skipping type check.");
40
+ });
41
+ }
42
+ function O(n = !1) {
43
+ return e(this, null, function* () {
44
+ n ? yield i("Running ESLint with auto-fix", yield t.eslintFix()) : yield i("Running ESLint check", yield t.eslintCheck());
45
+ });
46
+ }
47
+ function k(n, o) {
48
+ if (!o.length)
49
+ return;
50
+ const r = n === "Errors" ? "red" : "yellow";
51
+ a.printBoxedLog(n === "Errors" ? "✖ Errors" : "⚠ Warnings", o, r);
52
+ }
53
+ function d() {
54
+ return e(this, null, function* () {
55
+ setTimeout(() => e(null, null, function* () {
56
+ const n = yield T(), o = n.filter((c) => c.type === S.Error), r = n.filter((c) => c.type === S.Warning);
57
+ !o.length && !r.length ? a.printBoxedLog("✔ NO ISSUES FOUND", [], "green") : (k("Warnings", r), k("Errors", o), o.length > 0 && p.exit(1));
58
+ }), 0);
59
+ });
60
+ }
61
+ function K() {
62
+ return e(this, null, function* () {
63
+ yield u();
64
+ const n = yield D({ name: h });
65
+ if (!n.success) {
66
+ a.error("Failed to retrieve package information. Aborting lint-staged.");
67
+ return;
68
+ }
69
+ n.result.isCurrentProject && (yield i(`Building package: ${h}`, yield t.build())), yield i("Executing lint-staged", yield t.lintStaged()), d();
70
+ });
71
+ }
72
+ function b() {
73
+ return e(this, null, function* () {
74
+ yield i("Inspecting ESLint configuration", yield t.eslintInspect());
75
+ });
76
+ }
77
+ function j() {
78
+ return e(this, null, function* () {
79
+ yield u(), yield Promise.all([M(), O()]), d();
80
+ });
81
+ }
82
+ function J() {
83
+ return e(this, null, function* () {
84
+ yield u(), yield Promise.all([M(), O(!0)]), d();
85
+ });
86
+ }
87
+ function V() {
88
+ return e(this, null, function* () {
89
+ yield u(), yield i("Validating commit message", yield t.commitLint()), d();
90
+ });
91
+ }
92
+ function v() {
93
+ return e(this, null, function* () {
94
+ yield i("Configuring Git hooks", yield t.configureGitHook()), C(l.GIT_HOOK);
95
+ const n = yield w(F);
96
+ y(l.SIMPLE_GIT_HOOKS_JSON, JSON.stringify(n, null, 4));
97
+ const o = `
98
+ ${E}
99
+ `;
100
+ L(l.GIT_IGNORE) ? _(l.GIT_IGNORE, "utf-8").split(`
101
+ `).includes(E) || B(l.GIT_IGNORE, o) : y(l.GIT_IGNORE, o), yield i("Setting up simple-git-hooks", yield t.simpleGitHooks());
102
+ });
103
+ }
104
+ function W() {
105
+ return e(this, null, function* () {
106
+ yield I(), yield v();
107
+ });
108
+ }
109
+ function Y() {
110
+ return e(this, null, function* () {
111
+ C(l.NODE_MODULES, l.PNPM_LOCK_YAML), yield i("Pruning pnpm store", yield t.pnpmPruneStore()), yield i("Clearing pnpm cache", yield t.pnpmCleanCache()), yield I(), yield v();
112
+ });
113
+ }
114
+ function $() {
115
+ return e(this, null, function* () {
116
+ yield i("Inspecting project dependencies", yield t.nodeModulesInspect());
117
+ });
118
+ }
119
+ function z() {
120
+ return e(this, null, function* () {
121
+ yield i("Running unit tests", yield t.testUnit());
122
+ });
123
+ }
124
+ function q() {
125
+ return e(this, null, function* () {
126
+ yield i("Running end-to-end tests", yield t.testE2e());
127
+ });
128
+ }
129
+ function Q(n) {
130
+ return e(this, null, function* () {
131
+ yield i("Creating MongoDB migration", yield t.mongoMigrateCreate(n));
132
+ });
133
+ }
134
+ function X() {
135
+ return e(this, null, function* () {
136
+ yield i("Running MongoDB migrations", yield t.mongoMigrateUp());
137
+ });
138
+ }
139
+ function Z() {
140
+ return e(this, null, function* () {
141
+ yield i("Rolling back MongoDB migration", yield t.mongoMigrateDown());
142
+ });
143
+ }
144
+ e(null, null, function* () {
145
+ try {
146
+ yield P(N(p.argv)).scriptName(A).usage("$0 <command> [options]").command("lint", "Check code for linting issues", j).command("lint:fix", "Fix linting issues automatically", J).command("lint:inspect", "View active ESLint configuration", b).command("lint-staged", "Run lint checks on staged files", K).command("commitlint", "Validate commit message format", V).command("ready", "Initialize project and dependencies", W).command("reset", "Reset the project and reinstall dependencies", Y).command("inspect", "Analyze installed project dependencies", $).command("test:unit", "Run unit test suite", z).command("test:e2e", "Run end-to-end test suite", q).command("mongo:migrate:create <name>", "Create a MongoDB migration", (n) => n.positional("name", {
147
+ describe: "Migration name",
148
+ type: "string"
149
+ }), (n) => e(null, null, function* () {
150
+ if (!n.name) {
151
+ a.error("Migration name is required.");
152
+ return;
153
+ }
154
+ yield Q(n.name);
155
+ })).command("mongo:migrate:up", "Apply all MongoDB migrations", X).command("mongo:migrate:down", "Rollback last MongoDB migration", Z).demandCommand(1, "Please specify a valid command.").strict().help().alias("h", "help").alias("v", "version").version(U()).epilog(`💡 Tip: Use "--help" with any command to see options
156
+ `).parse();
157
+ } catch (n) {
158
+ H(n), p.exit(1);
159
+ }
160
+ });
@@ -0,0 +1 @@
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||{});
@@ -0,0 +1,4 @@
1
+ var N = /* @__PURE__ */ ((I) => (I.CLI = "CLI", I.STRING = "STRING", I.FUNCTION = "FUNCTION", I))(N || {});
2
+ export {
3
+ N as E_CommandType
4
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("node:child_process"),b=require("node:process"),q=require("node:util"),y=require("../storage/storage.util.cjs"),j=require("../package/package.util.cjs"),p=require("../path/path.constant.cjs"),a=require("../log/log.type.cjs"),u=require("../log/log.util.cjs"),M=require("../../config/env/env.util.cjs");function A(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 D=A(q);var h=(e,r,t)=>new Promise((o,i)=>{var l=s=>{try{n(t.next(s))}catch(f){i(f)}},c=s=>{try{n(t.throw(s))}catch(f){i(f)}},n=s=>s.done?o(s.value):Promise.resolve(s.value).then(l,c);n((t=t.apply(e,r)).next())});const k=M.getEnv(),B=D.promisify(N.exec);function E(){return h(this,null,function*(){const e=yield j.getPackage();return e.success?e.result.name:Date.now().toString()})}function O(e){return h(this,null,function*(){if(e.length===0)return;const r=yield E();try{yield y.storage.set(r,e),setTimeout(()=>h(null,null,function*(){const t=yield y.storage.getLogLink(r);t&&u.log.info(`📂 Open the error list manually: ${t}`)}),0)}catch(t){u.catchError(t)}})}function R(){return h(this,null,function*(){try{const e=yield E(),r=yield y.storage.get(e);return r!=null?r:[]}catch(e){return u.catchError(e,{returnValue:[]})}})}function G(){return h(this,null,function*(){try{const e=yield E();yield y.storage.remove(e)}catch(e){u.catchError(e)}})}function K(e){const r=[],t=[];let o="";const i=/^\s*(\d+):(\d+)\s+(error|warning)\s+(.+?)\s+(\S+)$/,l=/^(.+?)\((\d+),(\d+)\):\s+(error|warning)\s+TS\d+:\s+(\S.+)$/,c=/^✖\s+(.*?)\s+\[(.*?)\]$/;e.split(`
2
+ `).forEach(n=>{var s,f,_,v,C,$,L,P,I,T,S;if(n.startsWith("/"))o=n.trim();else{const g=i.exec(n)||[],d=l.exec(n)||[],m=c.exec(n)||[];g.length&&o?r.push({file:o,position:`${g[1]}:${g[2]}`,type:g[3]===a.E_IssueType.Error?a.E_IssueType.Error:a.E_IssueType.Warning,message:(f=(s=g==null?void 0:g[4])==null?void 0:s.trim())!=null?f:"",rule:(v=(_=g==null?void 0:g[5])==null?void 0:_.trim())!=null?v:""}):d.length?r.push({file:(C=d==null?void 0:d[1])!=null?C:"",position:`${d[2]}:${d[3]}`,type:d[4]===a.E_IssueType.Error?a.E_IssueType.Error:a.E_IssueType.Warning,message:(L=($=d==null?void 0:d[5])==null?void 0:$.trim())!=null?L:""}):m.length?r.push({file:"commitlint",type:a.E_IssueType.Error,message:(I=(P=m==null?void 0:m[1])==null?void 0:P.trim())!=null?I:"",rule:(S=(T=m==null?void 0:m[2])==null?void 0:T.trim())!=null?S:""}):t.push(n.trim())}}),r.length&&O(r),k.DEBUG&&t.length&&(u.log.warn("Unmatched lines:"),t.forEach(n=>u.log.info(` ${n}`)))}function W(e){try{const r=JSON.parse(e),t=[];r.forEach(({filePath:o,messages:i})=>{i.forEach(({severity:l,line:c,column:n,ruleId:s,message:f})=>{t.push({type:l===2?a.E_IssueType.Error:a.E_IssueType.Warning,file:o,position:`${c}:${n}`,rule:s,message:f})})}),t.length&&O(t)}catch(r){K(e)}}function U(e){return h(this,arguments,function*(r,t=W){const o=new AbortController;b.on("SIGINT",()=>{u.log.warn("Process interrupted. Terminating..."),o.abort(),b.exit()});try{if(typeof r=="string"){const{stdout:i,stderr:l}=yield B(r,{maxBuffer:104857600,signal:o.signal});[i,l].forEach(c=>c&&t(c))}}catch(i){const{stdout:l,stderr:c,message:n}=i;[l,c].forEach(s=>s&&t(s)),!c&&!l&&u.log.error(`Command failed: ${n}`)}})}function X(e){return{raw:!0,cmd:e}}function w(e,r){return r!=null&&r.isCurrentProject?`${p.PNPM_EXEC_CLI} ${p.TSX_CLI} ${p.CYBERSKILL_CLI_PATH} ${e}`:`${p.PNPM_EXEC_CLI} ${p.CYBERSKILL_CLI} ${e}`}function x(e,r){return typeof e=="function"?w(e(r),r):typeof e=="object"&&(e==null?void 0:e.raw)===!0?e.cmd:typeof e=="string"?w(e,r):e}function Y(e){return h(this,null,function*(){const r=yield j.getPackage({name:p.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(([i,l])=>[i,x(l,t)]))}})}function z(e,r){return h(this,null,function*(){try{u.log.start(`${e}`),k.DEBUG&&u.log.info(`→ ${r}`),yield U(r),u.log.success(`${e} done.`)}catch(t){u.catchError(t)}})}exports.clearAllErrorLists=G;exports.formatCommand=x;exports.getStoredErrorLists=R;exports.rawCommand=X;exports.resolveCommands=Y;exports.runCommand=z;