@cyberskill/shared 1.199.0 → 1.200.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 (879) hide show
  1. package/README.md +2 -0
  2. package/dist/config-B7WSlzSh.js +8 -0
  3. package/dist/config-DDQ9k8fw.cjs +1 -0
  4. package/dist/favicon/android-icon-144x144.png +0 -0
  5. package/dist/favicon/android-icon-192x192.png +0 -0
  6. package/dist/favicon/android-icon-36x36.png +0 -0
  7. package/dist/favicon/android-icon-48x48.png +0 -0
  8. package/dist/favicon/android-icon-72x72.png +0 -0
  9. package/dist/favicon/android-icon-96x96.png +0 -0
  10. package/dist/favicon/apple-icon-114x114.png +0 -0
  11. package/dist/favicon/apple-icon-120x120.png +0 -0
  12. package/dist/favicon/apple-icon-144x144.png +0 -0
  13. package/dist/favicon/apple-icon-152x152.png +0 -0
  14. package/dist/favicon/apple-icon-180x180.png +0 -0
  15. package/dist/favicon/apple-icon-57x57.png +0 -0
  16. package/dist/favicon/apple-icon-60x60.png +0 -0
  17. package/dist/favicon/apple-icon-72x72.png +0 -0
  18. package/dist/favicon/apple-icon-76x76.png +0 -0
  19. package/dist/favicon/apple-icon-precomposed.png +0 -0
  20. package/dist/favicon/apple-icon.png +0 -0
  21. package/dist/favicon/browserconfig.xml +2 -0
  22. package/dist/favicon/favicon-16x16.png +0 -0
  23. package/dist/favicon/favicon-32x32.png +0 -0
  24. package/dist/favicon/favicon-96x96.png +0 -0
  25. package/dist/favicon/favicon.ico +0 -0
  26. package/dist/favicon/manifest.json +41 -0
  27. package/dist/favicon/ms-icon-144x144.png +0 -0
  28. package/dist/favicon/ms-icon-150x150.png +0 -0
  29. package/dist/favicon/ms-icon-310x310.png +0 -0
  30. package/dist/favicon/ms-icon-70x70.png +0 -0
  31. package/dist/magic-string.es-CyLHbrL2.js +871 -0
  32. package/dist/magic-string.es-hjygV5wN.cjs +10 -0
  33. package/dist/path.constant-CFKXX6cG.js +682 -0
  34. package/dist/path.constant-Y6ImOuVK.cjs +2 -0
  35. package/dist/src/config/commitlint/index.cjs +1 -0
  36. package/dist/src/config/commitlint/index.d.ts +5 -0
  37. package/dist/src/config/commitlint/index.js +9 -0
  38. package/dist/src/config/config.type.cjs +1 -0
  39. package/dist/src/config/config.type.d.ts +10 -0
  40. package/dist/src/config/config.type.js +4 -0
  41. package/dist/src/config/config.util.cjs +1 -0
  42. package/dist/src/config/config.util.d.ts +3 -0
  43. package/dist/src/config/config.util.js +60 -0
  44. package/dist/src/config/env/env.constant.cjs +1 -0
  45. package/dist/src/config/env/env.constant.d.ts +1 -0
  46. package/dist/src/config/env/env.constant.js +4 -0
  47. package/dist/src/config/env/env.d.cjs +1 -0
  48. package/dist/src/config/env/env.d.js +1 -0
  49. package/dist/src/config/env/env.type.cjs +1 -0
  50. package/dist/src/config/env/env.type.d.ts +5 -0
  51. package/dist/src/config/env/env.type.js +1 -0
  52. package/dist/src/config/env/env.util.cjs +1 -0
  53. package/dist/src/config/env/env.util.d.ts +3 -0
  54. package/dist/src/config/env/env.util.js +28 -0
  55. package/dist/src/config/env/index.cjs +1 -0
  56. package/dist/src/config/env/index.d.ts +3 -0
  57. package/dist/src/config/env/index.js +7 -0
  58. package/dist/src/config/eslint/index.cjs +1 -0
  59. package/dist/src/config/eslint/index.d.ts +1172 -0
  60. package/dist/src/config/eslint/index.js +29 -0
  61. package/dist/src/config/graphql-codegen/graphql-codegen.type.cjs +1 -0
  62. package/dist/src/config/graphql-codegen/graphql-codegen.type.d.ts +6 -0
  63. package/dist/src/config/graphql-codegen/graphql-codegen.type.js +1 -0
  64. package/dist/src/config/graphql-codegen/graphql-codegen.util.cjs +1 -0
  65. package/dist/src/config/graphql-codegen/graphql-codegen.util.d.ts +3 -0
  66. package/dist/src/config/graphql-codegen/graphql-codegen.util.js +46 -0
  67. package/dist/src/config/graphql-codegen/index.cjs +1 -0
  68. package/dist/src/config/graphql-codegen/index.d.ts +2 -0
  69. package/dist/src/config/graphql-codegen/index.js +4 -0
  70. package/dist/src/config/index.cjs +1 -0
  71. package/dist/src/config/index.d.ts +2 -0
  72. package/dist/src/config/index.js +6 -0
  73. package/dist/src/config/lint-staged/index.cjs +1 -0
  74. package/dist/src/config/lint-staged/index.d.ts +5 -0
  75. package/dist/src/config/lint-staged/index.js +7 -0
  76. package/dist/src/config/vitest/index.cjs +1 -0
  77. package/dist/src/config/vitest/index.d.ts +2 -0
  78. package/dist/src/config/vitest/index.js +6 -0
  79. package/dist/src/config/vitest/vitest.e2e.cjs +1 -0
  80. package/dist/src/config/vitest/vitest.e2e.d.ts +2 -0
  81. package/dist/src/config/vitest/vitest.e2e.js +33 -0
  82. package/dist/src/config/vitest/vitest.unit.cjs +1 -0
  83. package/dist/src/config/vitest/vitest.unit.d.ts +2 -0
  84. package/dist/src/config/vitest/vitest.unit.js +30 -0
  85. package/dist/src/config/vitest/vitest.unit.setup.cjs +508 -0
  86. package/dist/src/config/vitest/vitest.unit.setup.js +31519 -0
  87. package/dist/src/constant/common.cjs +1 -0
  88. package/dist/src/constant/common.d.ts +1 -0
  89. package/dist/src/constant/common.js +4 -0
  90. package/dist/src/constant/index.cjs +1 -0
  91. package/dist/src/constant/index.d.ts +2 -0
  92. package/dist/src/constant/index.js +6 -0
  93. package/dist/src/constant/response-status.cjs +1 -0
  94. package/dist/src/constant/response-status.d.ts +250 -0
  95. package/dist/src/constant/response-status.js +253 -0
  96. package/dist/src/node/apollo-server/apollo-server.type.cjs +1 -0
  97. package/dist/src/node/apollo-server/apollo-server.type.d.ts +8 -0
  98. package/dist/src/node/apollo-server/apollo-server.type.js +1 -0
  99. package/dist/src/node/apollo-server/apollo-server.util.cjs +1 -0
  100. package/dist/src/node/apollo-server/apollo-server.util.d.ts +5 -0
  101. package/dist/src/node/apollo-server/apollo-server.util.js +62 -0
  102. package/dist/src/node/apollo-server/index.cjs +1 -0
  103. package/dist/src/node/apollo-server/index.d.ts +2 -0
  104. package/dist/src/node/apollo-server/index.js +6 -0
  105. package/dist/src/node/cli/cli.util.cjs +6 -0
  106. package/dist/src/node/cli/cli.util.d.ts +2 -0
  107. package/dist/src/node/cli/cli.util.js +171 -0
  108. package/dist/src/node/cli/index.cjs +1 -0
  109. package/dist/src/node/cli/index.d.ts +1 -0
  110. package/dist/src/node/cli/index.js +1 -0
  111. package/dist/src/node/command/command.type.cjs +1 -0
  112. package/dist/src/node/command/command.type.d.ts +26 -0
  113. package/dist/src/node/command/command.type.js +4 -0
  114. package/dist/src/node/command/command.util.cjs +1 -0
  115. package/dist/src/node/command/command.util.d.ts +13 -0
  116. package/dist/src/node/command/command.util.js +17 -0
  117. package/dist/src/node/command/index.cjs +1 -0
  118. package/dist/src/node/command/index.d.ts +2 -0
  119. package/dist/src/node/command/index.js +11 -0
  120. package/dist/src/node/express/express.type.cjs +1 -0
  121. package/dist/src/node/express/express.type.d.ts +24 -0
  122. package/dist/src/node/express/express.type.js +4 -0
  123. package/dist/src/node/express/express.util.cjs +1 -0
  124. package/dist/src/node/express/express.util.d.ts +19 -0
  125. package/dist/src/node/express/express.util.js +87 -0
  126. package/dist/src/node/express/index.cjs +1 -0
  127. package/dist/src/node/express/index.d.ts +2 -0
  128. package/dist/src/node/express/index.js +13 -0
  129. package/dist/src/node/fs/fs.type.cjs +1 -0
  130. package/dist/src/node/fs/fs.type.d.ts +4 -0
  131. package/dist/src/node/fs/fs.type.js +1 -0
  132. package/dist/src/node/fs/fs.util.cjs +1 -0
  133. package/dist/src/node/fs/fs.util.d.ts +10 -0
  134. package/dist/src/node/fs/fs.util.js +67 -0
  135. package/dist/src/node/fs/index.cjs +1 -0
  136. package/dist/src/node/fs/index.d.ts +2 -0
  137. package/dist/src/node/fs/index.js +17 -0
  138. package/dist/src/node/log/index.cjs +1 -0
  139. package/dist/src/node/log/index.d.ts +2 -0
  140. package/dist/src/node/log/index.js +8 -0
  141. package/dist/src/node/log/log.type.cjs +1 -0
  142. package/dist/src/node/log/log.type.d.ts +28 -0
  143. package/dist/src/node/log/log.type.js +4 -0
  144. package/dist/src/node/log/log.util.cjs +1 -0
  145. package/dist/src/node/log/log.util.d.ts +8 -0
  146. package/dist/src/node/log/log.util.js +60 -0
  147. package/dist/src/node/mongo/index.cjs +1 -0
  148. package/dist/src/node/mongo/index.d.ts +3 -0
  149. package/dist/src/node/mongo/index.js +17 -0
  150. package/dist/src/node/mongo/mongo.constant.cjs +1 -0
  151. package/dist/src/node/mongo/mongo.constant.d.ts +1 -0
  152. package/dist/src/node/mongo/mongo.constant.js +4 -0
  153. package/dist/src/node/mongo/mongo.type.cjs +1 -0
  154. package/dist/src/node/mongo/mongo.type.d.ts +156 -0
  155. package/dist/src/node/mongo/mongo.type.js +16 -0
  156. package/dist/src/node/mongo/mongo.util.cjs +5 -0
  157. package/dist/src/node/mongo/mongo.util.d.ts +236 -0
  158. package/dist/src/node/mongo/mongo.util.js +571 -0
  159. package/dist/src/node/package/index.cjs +1 -0
  160. package/dist/src/node/package/index.d.ts +2 -0
  161. package/dist/src/node/package/index.js +10 -0
  162. package/dist/src/node/package/package.type.cjs +1 -0
  163. package/dist/src/node/package/package.type.d.ts +30 -0
  164. package/dist/src/node/package/package.type.js +4 -0
  165. package/dist/src/node/package/package.util.cjs +1 -0
  166. package/dist/src/node/package/package.util.d.ts +11 -0
  167. package/dist/src/node/package/package.util.js +14 -0
  168. package/dist/src/node/path/index.cjs +1 -0
  169. package/dist/src/node/path/index.d.ts +2 -0
  170. package/dist/src/node/path/index.js +53 -0
  171. package/dist/src/node/path/path.constant.cjs +1 -0
  172. package/dist/src/node/path/path.constant.d.ts +92 -0
  173. package/dist/src/node/path/path.constant.js +52 -0
  174. package/dist/src/node/path/path.util.cjs +1 -0
  175. package/dist/src/node/path/path.util.d.ts +6 -0
  176. package/dist/src/node/path/path.util.js +19 -0
  177. package/dist/src/node/storage/index.cjs +1 -0
  178. package/dist/src/node/storage/index.d.ts +1 -0
  179. package/dist/src/node/storage/index.js +4 -0
  180. package/dist/src/node/storage/storage.util.cjs +1 -0
  181. package/dist/src/node/storage/storage.util.d.ts +7 -0
  182. package/dist/src/node/storage/storage.util.js +81 -0
  183. package/dist/src/node/upload/index.cjs +1 -0
  184. package/dist/src/node/upload/index.d.ts +2 -0
  185. package/dist/src/node/upload/index.js +7 -0
  186. package/dist/src/node/upload/upload.type.cjs +1 -0
  187. package/dist/src/node/upload/upload.type.d.ts +36 -0
  188. package/dist/src/node/upload/upload.type.js +4 -0
  189. package/dist/src/node/upload/upload.util.cjs +1 -0
  190. package/dist/src/node/upload/upload.util.d.ts +3 -0
  191. package/dist/src/node/upload/upload.util.js +159 -0
  192. package/dist/src/node/ws/index.cjs +1 -0
  193. package/dist/src/node/ws/index.d.ts +2 -0
  194. package/dist/src/node/ws/index.js +5 -0
  195. package/dist/src/node/ws/ts.util.cjs +1 -0
  196. package/dist/src/node/ws/ts.util.d.ts +4 -0
  197. package/dist/src/node/ws/ts.util.js +15 -0
  198. package/dist/src/node/ws/ws.type.cjs +1 -0
  199. package/dist/src/node/ws/ws.type.d.ts +11 -0
  200. package/dist/src/node/ws/ws.type.js +1 -0
  201. package/dist/src/react/apollo-client/apollo-client.component.cjs +1 -0
  202. package/dist/src/react/apollo-client/apollo-client.component.d.ts +3 -0
  203. package/dist/src/react/apollo-client/apollo-client.component.js +21 -0
  204. package/dist/src/react/apollo-client/apollo-client.constant.cjs +1 -0
  205. package/dist/src/react/apollo-client/apollo-client.constant.d.ts +1 -0
  206. package/dist/src/react/apollo-client/apollo-client.constant.js +4 -0
  207. package/dist/src/react/apollo-client/apollo-client.context.cjs +1 -0
  208. package/dist/src/react/apollo-client/apollo-client.context.d.ts +8 -0
  209. package/dist/src/react/apollo-client/apollo-client.context.js +12 -0
  210. package/dist/src/react/apollo-client/apollo-client.hook.cjs +1 -0
  211. package/dist/src/react/apollo-client/apollo-client.hook.d.ts +2 -0
  212. package/dist/src/react/apollo-client/apollo-client.hook.js +11 -0
  213. package/dist/src/react/apollo-client/apollo-client.type.cjs +1 -0
  214. package/dist/src/react/apollo-client/apollo-client.type.d.ts +12 -0
  215. package/dist/src/react/apollo-client/apollo-client.type.js +1 -0
  216. package/dist/src/react/apollo-client/apollo-client.util.cjs +1 -0
  217. package/dist/src/react/apollo-client/apollo-client.util.d.ts +11 -0
  218. package/dist/src/react/apollo-client/apollo-client.util.js +113 -0
  219. package/dist/src/react/apollo-client/index.cjs +1 -0
  220. package/dist/src/react/apollo-client/index.d.ts +7 -0
  221. package/dist/src/react/apollo-client/index.js +28 -0
  222. package/dist/src/react/apollo-client-nextjs/apollo-client.component.cjs +1 -0
  223. package/dist/src/react/apollo-client-nextjs/apollo-client.component.d.ts +3 -0
  224. package/dist/src/react/apollo-client-nextjs/apollo-client.component.js +32 -0
  225. package/dist/src/react/apollo-client-nextjs/apollo-client.util.cjs +1 -0
  226. package/dist/src/react/apollo-client-nextjs/apollo-client.util.d.ts +3 -0
  227. package/dist/src/react/apollo-client-nextjs/apollo-client.util.js +30 -0
  228. package/dist/src/react/apollo-client-nextjs/index.cjs +1 -0
  229. package/dist/src/react/apollo-client-nextjs/index.d.ts +2 -0
  230. package/dist/src/react/apollo-client-nextjs/index.js +6 -0
  231. package/dist/src/react/apollo-error/apollo-error.component.cjs +1 -0
  232. package/dist/src/react/apollo-error/apollo-error.component.d.ts +2 -0
  233. package/dist/src/react/apollo-error/apollo-error.component.js +29 -0
  234. package/dist/src/react/apollo-error/apollo-error.context.cjs +1 -0
  235. package/dist/src/react/apollo-error/apollo-error.context.d.ts +2 -0
  236. package/dist/src/react/apollo-error/apollo-error.context.js +5 -0
  237. package/dist/src/react/apollo-error/apollo-error.hook.cjs +1 -0
  238. package/dist/src/react/apollo-error/apollo-error.hook.d.ts +1 -0
  239. package/dist/src/react/apollo-error/apollo-error.hook.js +11 -0
  240. package/dist/src/react/apollo-error/apollo-error.module.cjs +1 -0
  241. package/dist/src/react/apollo-error/apollo-error.module.js +17 -0
  242. package/dist/src/react/apollo-error/apollo-error.provider.cjs +1 -0
  243. package/dist/src/react/apollo-error/apollo-error.provider.d.ts +4 -0
  244. package/dist/src/react/apollo-error/apollo-error.provider.js +18 -0
  245. package/dist/src/react/apollo-error/apollo-error.type.cjs +1 -0
  246. package/dist/src/react/apollo-error/apollo-error.type.d.ts +7 -0
  247. package/dist/src/react/apollo-error/apollo-error.type.js +1 -0
  248. package/dist/src/react/apollo-error/apollo-error.util.cjs +1 -0
  249. package/dist/src/react/apollo-error/apollo-error.util.d.ts +3 -0
  250. package/dist/src/react/apollo-error/apollo-error.util.js +11 -0
  251. package/dist/src/react/apollo-error/index.cjs +1 -0
  252. package/dist/src/react/apollo-error/index.d.ts +6 -0
  253. package/dist/src/react/apollo-error/index.js +13 -0
  254. package/dist/src/react/i18next/i18next.hook.cjs +1 -0
  255. package/dist/src/react/i18next/i18next.hook.d.ts +2 -0
  256. package/dist/src/react/i18next/i18next.hook.js +5 -0
  257. package/dist/src/react/i18next/i18next.util.cjs +1 -0
  258. package/dist/src/react/i18next/i18next.util.d.ts +2 -0
  259. package/dist/src/react/i18next/i18next.util.js +8 -0
  260. package/dist/src/react/i18next/index.cjs +1 -0
  261. package/dist/src/react/i18next/index.d.ts +2 -0
  262. package/dist/src/react/i18next/index.js +6 -0
  263. package/dist/src/react/loading/index.cjs +1 -0
  264. package/dist/src/react/loading/index.d.ts +5 -0
  265. package/dist/src/react/loading/index.js +10 -0
  266. package/dist/src/react/loading/loading.component.cjs +6 -0
  267. package/dist/src/react/loading/loading.component.d.ts +3 -0
  268. package/dist/src/react/loading/loading.component.js +55 -0
  269. package/dist/src/react/loading/loading.context.cjs +1 -0
  270. package/dist/src/react/loading/loading.context.d.ts +2 -0
  271. package/dist/src/react/loading/loading.context.js +5 -0
  272. package/dist/src/react/loading/loading.hook.cjs +1 -0
  273. package/dist/src/react/loading/loading.hook.d.ts +1 -0
  274. package/dist/src/react/loading/loading.hook.js +11 -0
  275. package/dist/src/react/loading/loading.module.cjs +1 -0
  276. package/dist/src/react/loading/loading.module.js +27 -0
  277. package/dist/src/react/loading/loading.provider.cjs +1 -0
  278. package/dist/src/react/loading/loading.provider.d.ts +3 -0
  279. package/dist/src/react/loading/loading.provider.js +17 -0
  280. package/dist/src/react/loading/loading.type.cjs +1 -0
  281. package/dist/src/react/loading/loading.type.d.ts +12 -0
  282. package/dist/src/react/loading/loading.type.js +1 -0
  283. package/dist/src/react/log/index.cjs +1 -0
  284. package/dist/src/react/log/index.d.ts +2 -0
  285. package/dist/src/react/log/index.js +5 -0
  286. package/dist/src/react/log/log.type.cjs +1 -0
  287. package/dist/src/react/log/log.type.d.ts +5 -0
  288. package/dist/src/react/log/log.type.js +1 -0
  289. package/dist/src/react/log/log.util.cjs +1 -0
  290. package/dist/src/react/log/log.util.d.ts +7 -0
  291. package/dist/src/react/log/log.util.js +30 -0
  292. package/dist/src/react/next-intl/index.cjs +1 -0
  293. package/dist/src/react/next-intl/index.d.ts +6 -0
  294. package/dist/src/react/next-intl/index.js +13 -0
  295. package/dist/src/react/next-intl/next-intl.constant.cjs +1 -0
  296. package/dist/src/react/next-intl/next-intl.constant.d.ts +12 -0
  297. package/dist/src/react/next-intl/next-intl.constant.js +16 -0
  298. package/dist/src/react/next-intl/next-intl.context.cjs +1 -0
  299. package/dist/src/react/next-intl/next-intl.context.d.ts +2 -0
  300. package/dist/src/react/next-intl/next-intl.context.js +5 -0
  301. package/dist/src/react/next-intl/next-intl.hoc.cjs +1 -0
  302. package/dist/src/react/next-intl/next-intl.hoc.d.ts +10 -0
  303. package/dist/src/react/next-intl/next-intl.hoc.js +35 -0
  304. package/dist/src/react/next-intl/next-intl.hook.cjs +1 -0
  305. package/dist/src/react/next-intl/next-intl.hook.d.ts +4 -0
  306. package/dist/src/react/next-intl/next-intl.hook.js +14 -0
  307. package/dist/src/react/next-intl/next-intl.provider.cjs +1 -0
  308. package/dist/src/react/next-intl/next-intl.provider.d.ts +3 -0
  309. package/dist/src/react/next-intl/next-intl.provider.js +25 -0
  310. package/dist/src/react/next-intl/next-intl.type.cjs +1 -0
  311. package/dist/src/react/next-intl/next-intl.type.d.ts +25 -0
  312. package/dist/src/react/next-intl/next-intl.type.js +1 -0
  313. package/dist/src/react/storage/index.cjs +1 -0
  314. package/dist/src/react/storage/index.d.ts +2 -0
  315. package/dist/src/react/storage/index.js +6 -0
  316. package/dist/src/react/storage/storage.hook.cjs +1 -0
  317. package/dist/src/react/storage/storage.hook.d.ts +6 -0
  318. package/dist/src/react/storage/storage.hook.js +77 -0
  319. package/dist/src/react/storage/storage.util.cjs +1 -0
  320. package/dist/src/react/storage/storage.util.d.ts +6 -0
  321. package/dist/src/react/storage/storage.util.js +60 -0
  322. package/dist/src/react/toast/index.cjs +1 -0
  323. package/dist/src/react/toast/index.d.ts +1 -0
  324. package/dist/src/react/toast/index.js +5 -0
  325. package/dist/src/react/userback/index.cjs +1 -0
  326. package/dist/src/react/userback/index.d.ts +2 -0
  327. package/dist/src/react/userback/index.js +4 -0
  328. package/dist/src/react/userback/userback.component.cjs +1 -0
  329. package/dist/src/react/userback/userback.component.d.ts +2 -0
  330. package/dist/src/react/userback/userback.component.js +54 -0
  331. package/dist/src/react/userback/userback.type.cjs +1 -0
  332. package/dist/src/react/userback/userback.type.d.ts +8 -0
  333. package/dist/src/react/userback/userback.type.js +1 -0
  334. package/dist/src/typescript/common.cjs +1 -0
  335. package/dist/src/typescript/common.d.ts +35 -0
  336. package/dist/src/typescript/common.js +4 -0
  337. package/dist/src/typescript/index.cjs +1 -0
  338. package/dist/src/typescript/index.d.ts +2 -0
  339. package/dist/src/typescript/index.js +4 -0
  340. package/dist/src/typescript/react.cjs +1 -0
  341. package/dist/src/typescript/react.d.ts +5 -0
  342. package/dist/src/typescript/react.js +1 -0
  343. package/dist/src/typescript/style.d.cjs +1 -0
  344. package/dist/src/typescript/style.d.js +1 -0
  345. package/dist/src/util/common/common.type.cjs +1 -0
  346. package/dist/src/util/common/common.type.d.ts +9 -0
  347. package/dist/src/util/common/common.type.js +1 -0
  348. package/dist/src/util/common/common.util.cjs +1 -0
  349. package/dist/src/util/common/common.util.d.ts +26 -0
  350. package/dist/src/util/common/common.util.js +59 -0
  351. package/dist/src/util/common/index.cjs +1 -0
  352. package/dist/src/util/common/index.d.ts +2 -0
  353. package/dist/src/util/common/index.js +7 -0
  354. package/dist/src/util/index.cjs +1 -0
  355. package/dist/src/util/index.d.ts +5 -0
  356. package/dist/src/util/index.js +24 -0
  357. package/dist/src/util/object/index.cjs +1 -0
  358. package/dist/src/util/object/index.d.ts +1 -0
  359. package/dist/src/util/object/index.js +9 -0
  360. package/dist/src/util/object/object.util.cjs +1 -0
  361. package/dist/src/util/object/object.util.d.ts +46 -0
  362. package/dist/src/util/object/object.util.js +77 -0
  363. package/dist/src/util/serializer/index.cjs +1 -0
  364. package/dist/src/util/serializer/index.d.ts +2 -0
  365. package/dist/src/util/serializer/index.js +4 -0
  366. package/dist/src/util/serializer/serializer.type.cjs +1 -0
  367. package/dist/src/util/serializer/serializer.type.d.ts +16 -0
  368. package/dist/src/util/serializer/serializer.type.js +1 -0
  369. package/dist/src/util/serializer/serializer.util.cjs +1 -0
  370. package/dist/src/util/serializer/serializer.util.d.ts +2 -0
  371. package/dist/src/util/serializer/serializer.util.js +75 -0
  372. package/dist/src/util/string/index.cjs +1 -0
  373. package/dist/src/util/string/index.d.ts +2 -0
  374. package/dist/src/util/string/index.js +8 -0
  375. package/dist/src/util/string/string.type.cjs +1 -0
  376. package/dist/src/util/string/string.type.d.ts +8 -0
  377. package/dist/src/util/string/string.type.js +1 -0
  378. package/dist/src/util/string/string.util.cjs +1 -0
  379. package/dist/src/util/string/string.util.d.ts +39 -0
  380. package/dist/src/util/string/string.util.js +64 -0
  381. package/dist/src/util/validate/index.cjs +1 -0
  382. package/dist/src/util/validate/index.d.ts +1 -0
  383. package/dist/src/util/validate/index.js +4 -0
  384. package/dist/src/util/validate/validate.util.cjs +1 -0
  385. package/dist/src/util/validate/validate.util.d.ts +27 -0
  386. package/dist/src/util/validate/validate.util.js +37 -0
  387. package/dist/style.css +1 -0
  388. package/dist/tsconfig.base.json +37 -0
  389. package/package.json +116 -143
  390. package/dist/_tsup-dts-rollup.d.cts +0 -3848
  391. package/dist/_tsup-dts-rollup.d.ts +0 -3848
  392. package/dist/config/commitlint/index.cjs +0 -1
  393. package/dist/config/commitlint/index.d.cts +0 -1
  394. package/dist/config/commitlint/index.d.ts +0 -1
  395. package/dist/config/commitlint/index.js +0 -1
  396. package/dist/config/config.type.cjs +0 -1
  397. package/dist/config/config.type.d.cts +0 -3
  398. package/dist/config/config.type.d.ts +0 -3
  399. package/dist/config/config.type.js +0 -1
  400. package/dist/config/config.util.cjs +0 -1
  401. package/dist/config/config.util.d.cts +0 -1
  402. package/dist/config/config.util.d.ts +0 -1
  403. package/dist/config/config.util.js +0 -1
  404. package/dist/config/env/env.constant.cjs +0 -1
  405. package/dist/config/env/env.constant.d.cts +0 -1
  406. package/dist/config/env/env.constant.d.ts +0 -1
  407. package/dist/config/env/env.constant.js +0 -1
  408. package/dist/config/env/env.d.cjs +0 -1
  409. package/dist/config/env/env.d.d.cts +0 -1
  410. package/dist/config/env/env.d.d.ts +0 -1
  411. package/dist/config/env/env.d.js +0 -0
  412. package/dist/config/env/env.type.cjs +0 -1
  413. package/dist/config/env/env.type.d.cts +0 -1
  414. package/dist/config/env/env.type.d.ts +0 -1
  415. package/dist/config/env/env.type.js +0 -0
  416. package/dist/config/env/env.util.cjs +0 -1
  417. package/dist/config/env/env.util.d.cts +0 -2
  418. package/dist/config/env/env.util.d.ts +0 -2
  419. package/dist/config/env/env.util.js +0 -1
  420. package/dist/config/env/index.cjs +0 -1
  421. package/dist/config/env/index.d.cts +0 -4
  422. package/dist/config/env/index.d.ts +0 -4
  423. package/dist/config/env/index.js +0 -1
  424. package/dist/config/eslint/index.cjs +0 -1
  425. package/dist/config/eslint/index.d.cts +0 -1
  426. package/dist/config/eslint/index.d.ts +0 -1
  427. package/dist/config/eslint/index.js +0 -1
  428. package/dist/config/graphql-codegen/graphql-codegen.type.cjs +0 -1
  429. package/dist/config/graphql-codegen/graphql-codegen.type.d.cts +0 -1
  430. package/dist/config/graphql-codegen/graphql-codegen.type.d.ts +0 -1
  431. package/dist/config/graphql-codegen/graphql-codegen.type.js +0 -0
  432. package/dist/config/graphql-codegen/graphql-codegen.util.cjs +0 -1
  433. package/dist/config/graphql-codegen/graphql-codegen.util.d.cts +0 -1
  434. package/dist/config/graphql-codegen/graphql-codegen.util.d.ts +0 -1
  435. package/dist/config/graphql-codegen/graphql-codegen.util.js +0 -1
  436. package/dist/config/graphql-codegen/index.cjs +0 -1
  437. package/dist/config/graphql-codegen/index.d.cts +0 -2
  438. package/dist/config/graphql-codegen/index.d.ts +0 -2
  439. package/dist/config/graphql-codegen/index.js +0 -1
  440. package/dist/config/index.cjs +0 -1
  441. package/dist/config/index.d.cts +0 -15
  442. package/dist/config/index.d.ts +0 -15
  443. package/dist/config/index.js +0 -1
  444. package/dist/config/lint-staged/index.cjs +0 -1
  445. package/dist/config/lint-staged/index.d.cts +0 -1
  446. package/dist/config/lint-staged/index.d.ts +0 -1
  447. package/dist/config/lint-staged/index.js +0 -1
  448. package/dist/config/vitest/index.cjs +0 -1
  449. package/dist/config/vitest/index.d.cts +0 -2
  450. package/dist/config/vitest/index.d.ts +0 -2
  451. package/dist/config/vitest/index.js +0 -1
  452. package/dist/config/vitest/vitest.e2e.cjs +0 -1
  453. package/dist/config/vitest/vitest.e2e.d.cts +0 -1
  454. package/dist/config/vitest/vitest.e2e.d.ts +0 -1
  455. package/dist/config/vitest/vitest.e2e.js +0 -1
  456. package/dist/config/vitest/vitest.unit.cjs +0 -1
  457. package/dist/config/vitest/vitest.unit.d.cts +0 -1
  458. package/dist/config/vitest/vitest.unit.d.ts +0 -1
  459. package/dist/config/vitest/vitest.unit.js +0 -1
  460. package/dist/config/vitest/vitest.unit.setup.cjs +0 -1
  461. package/dist/config/vitest/vitest.unit.setup.d.cts +0 -1
  462. package/dist/config/vitest/vitest.unit.setup.d.ts +0 -1
  463. package/dist/config/vitest/vitest.unit.setup.js +0 -1
  464. package/dist/constant/common.cjs +0 -1
  465. package/dist/constant/common.d.cts +0 -1
  466. package/dist/constant/common.d.ts +0 -1
  467. package/dist/constant/common.js +0 -1
  468. package/dist/constant/index.cjs +0 -1
  469. package/dist/constant/index.d.cts +0 -2
  470. package/dist/constant/index.d.ts +0 -2
  471. package/dist/constant/index.js +0 -1
  472. package/dist/constant/response-status.cjs +0 -1
  473. package/dist/constant/response-status.d.cts +0 -1
  474. package/dist/constant/response-status.d.ts +0 -1
  475. package/dist/constant/response-status.js +0 -1
  476. package/dist/node/apollo-server/apollo-server.type.cjs +0 -1
  477. package/dist/node/apollo-server/apollo-server.type.d.cts +0 -1
  478. package/dist/node/apollo-server/apollo-server.type.d.ts +0 -1
  479. package/dist/node/apollo-server/apollo-server.type.js +0 -0
  480. package/dist/node/apollo-server/apollo-server.util.cjs +0 -1
  481. package/dist/node/apollo-server/apollo-server.util.d.cts +0 -2
  482. package/dist/node/apollo-server/apollo-server.util.d.ts +0 -2
  483. package/dist/node/apollo-server/apollo-server.util.js +0 -1
  484. package/dist/node/apollo-server/index.cjs +0 -1
  485. package/dist/node/apollo-server/index.d.cts +0 -3
  486. package/dist/node/apollo-server/index.d.ts +0 -3
  487. package/dist/node/apollo-server/index.js +0 -1
  488. package/dist/node/cli/cli.util.cjs +0 -2
  489. package/dist/node/cli/cli.util.d.cts +0 -1
  490. package/dist/node/cli/cli.util.d.ts +0 -1
  491. package/dist/node/cli/cli.util.js +0 -2
  492. package/dist/node/cli/index.cjs +0 -1
  493. package/dist/node/cli/index.d.cts +0 -1
  494. package/dist/node/cli/index.d.ts +0 -1
  495. package/dist/node/cli/index.js +0 -1
  496. package/dist/node/command/command.type.cjs +0 -1
  497. package/dist/node/command/command.type.d.cts +0 -8
  498. package/dist/node/command/command.type.d.ts +0 -8
  499. package/dist/node/command/command.type.js +0 -1
  500. package/dist/node/command/command.util.cjs +0 -1
  501. package/dist/node/command/command.util.d.cts +0 -6
  502. package/dist/node/command/command.util.d.ts +0 -6
  503. package/dist/node/command/command.util.js +0 -1
  504. package/dist/node/command/index.cjs +0 -1
  505. package/dist/node/command/index.d.cts +0 -14
  506. package/dist/node/command/index.d.ts +0 -14
  507. package/dist/node/command/index.js +0 -1
  508. package/dist/node/express/express.type.cjs +0 -1
  509. package/dist/node/express/express.type.d.cts +0 -8
  510. package/dist/node/express/express.type.d.ts +0 -8
  511. package/dist/node/express/express.type.js +0 -1
  512. package/dist/node/express/express.util.cjs +0 -1
  513. package/dist/node/express/express.util.d.cts +0 -7
  514. package/dist/node/express/express.util.d.ts +0 -7
  515. package/dist/node/express/express.util.js +0 -1
  516. package/dist/node/express/index.cjs +0 -1
  517. package/dist/node/express/index.d.cts +0 -15
  518. package/dist/node/express/index.d.ts +0 -15
  519. package/dist/node/express/index.js +0 -1
  520. package/dist/node/fs/fs.type.cjs +0 -1
  521. package/dist/node/fs/fs.type.d.cts +0 -1
  522. package/dist/node/fs/fs.type.d.ts +0 -1
  523. package/dist/node/fs/fs.type.js +0 -0
  524. package/dist/node/fs/fs.util.cjs +0 -1
  525. package/dist/node/fs/fs.util.d.cts +0 -14
  526. package/dist/node/fs/fs.util.d.ts +0 -14
  527. package/dist/node/fs/fs.util.js +0 -1
  528. package/dist/node/fs/index.cjs +0 -1
  529. package/dist/node/fs/index.d.cts +0 -15
  530. package/dist/node/fs/index.d.ts +0 -15
  531. package/dist/node/fs/index.js +0 -1
  532. package/dist/node/index.cjs +0 -1
  533. package/dist/node/index.d.cts +0 -192
  534. package/dist/node/index.d.ts +0 -192
  535. package/dist/node/index.js +0 -1
  536. package/dist/node/log/index.cjs +0 -1
  537. package/dist/node/log/index.d.cts +0 -8
  538. package/dist/node/log/index.d.ts +0 -8
  539. package/dist/node/log/index.js +0 -1
  540. package/dist/node/log/log.type.cjs +0 -1
  541. package/dist/node/log/log.type.d.cts +0 -5
  542. package/dist/node/log/log.type.d.ts +0 -5
  543. package/dist/node/log/log.type.js +0 -1
  544. package/dist/node/log/log.util.cjs +0 -1
  545. package/dist/node/log/log.util.d.cts +0 -3
  546. package/dist/node/log/log.util.d.ts +0 -3
  547. package/dist/node/log/log.util.js +0 -1
  548. package/dist/node/mongo/index.cjs +0 -1
  549. package/dist/node/mongo/index.d.cts +0 -66
  550. package/dist/node/mongo/index.d.ts +0 -66
  551. package/dist/node/mongo/index.js +0 -1
  552. package/dist/node/mongo/mongo.constant.cjs +0 -1
  553. package/dist/node/mongo/mongo.constant.d.cts +0 -1
  554. package/dist/node/mongo/mongo.constant.d.ts +0 -1
  555. package/dist/node/mongo/mongo.constant.js +0 -1
  556. package/dist/node/mongo/mongo.type.cjs +0 -1
  557. package/dist/node/mongo/mongo.type.d.cts +0 -60
  558. package/dist/node/mongo/mongo.type.d.ts +0 -60
  559. package/dist/node/mongo/mongo.type.js +0 -1
  560. package/dist/node/mongo/mongo.util.cjs +0 -1
  561. package/dist/node/mongo/mongo.util.d.cts +0 -5
  562. package/dist/node/mongo/mongo.util.d.ts +0 -5
  563. package/dist/node/mongo/mongo.util.js +0 -1
  564. package/dist/node/package/index.cjs +0 -1
  565. package/dist/node/package/index.d.cts +0 -9
  566. package/dist/node/package/index.d.ts +0 -9
  567. package/dist/node/package/index.js +0 -1
  568. package/dist/node/package/package.type.cjs +0 -1
  569. package/dist/node/package/package.type.d.cts +0 -4
  570. package/dist/node/package/package.type.d.ts +0 -4
  571. package/dist/node/package/package.type.js +0 -1
  572. package/dist/node/package/package.util.cjs +0 -1
  573. package/dist/node/package/package.util.d.cts +0 -5
  574. package/dist/node/package/package.util.d.ts +0 -5
  575. package/dist/node/package/package.util.js +0 -1
  576. package/dist/node/path/index.cjs +0 -1
  577. package/dist/node/path/index.d.cts +0 -49
  578. package/dist/node/path/index.d.ts +0 -49
  579. package/dist/node/path/index.js +0 -1
  580. package/dist/node/path/path.constant.cjs +0 -1
  581. package/dist/node/path/path.constant.d.cts +0 -44
  582. package/dist/node/path/path.constant.d.ts +0 -44
  583. package/dist/node/path/path.constant.js +0 -1
  584. package/dist/node/path/path.util.cjs +0 -1
  585. package/dist/node/path/path.util.d.cts +0 -5
  586. package/dist/node/path/path.util.d.ts +0 -5
  587. package/dist/node/path/path.util.js +0 -1
  588. package/dist/node/storage/index.cjs +0 -1
  589. package/dist/node/storage/index.d.cts +0 -1
  590. package/dist/node/storage/index.d.ts +0 -1
  591. package/dist/node/storage/index.js +0 -1
  592. package/dist/node/storage/storage.util.cjs +0 -1
  593. package/dist/node/storage/storage.util.d.cts +0 -1
  594. package/dist/node/storage/storage.util.d.ts +0 -1
  595. package/dist/node/storage/storage.util.js +0 -1
  596. package/dist/node/upload/index.cjs +0 -1
  597. package/dist/node/upload/index.d.cts +0 -8
  598. package/dist/node/upload/index.d.ts +0 -8
  599. package/dist/node/upload/index.js +0 -1
  600. package/dist/node/upload/upload.type.cjs +0 -1
  601. package/dist/node/upload/upload.type.d.cts +0 -6
  602. package/dist/node/upload/upload.type.d.ts +0 -6
  603. package/dist/node/upload/upload.type.js +0 -1
  604. package/dist/node/upload/upload.util.cjs +0 -1
  605. package/dist/node/upload/upload.util.d.cts +0 -2
  606. package/dist/node/upload/upload.util.d.ts +0 -2
  607. package/dist/node/upload/upload.util.js +0 -1
  608. package/dist/node/ws/index.cjs +0 -1
  609. package/dist/node/ws/index.d.cts +0 -4
  610. package/dist/node/ws/index.d.ts +0 -4
  611. package/dist/node/ws/index.js +0 -1
  612. package/dist/node/ws/ts.util.cjs +0 -1
  613. package/dist/node/ws/ts.util.d.cts +0 -2
  614. package/dist/node/ws/ts.util.d.ts +0 -2
  615. package/dist/node/ws/ts.util.js +0 -1
  616. package/dist/node/ws/ws.type.cjs +0 -1
  617. package/dist/node/ws/ws.type.d.cts +0 -2
  618. package/dist/node/ws/ws.type.d.ts +0 -2
  619. package/dist/node/ws/ws.type.js +0 -0
  620. package/dist/react/apollo-client/apollo-client.component.cjs +0 -1
  621. package/dist/react/apollo-client/apollo-client.component.css +0 -1
  622. package/dist/react/apollo-client/apollo-client.component.d.cts +0 -1
  623. package/dist/react/apollo-client/apollo-client.component.d.ts +0 -1
  624. package/dist/react/apollo-client/apollo-client.component.js +0 -1
  625. package/dist/react/apollo-client/apollo-client.constant.cjs +0 -1
  626. package/dist/react/apollo-client/apollo-client.constant.d.cts +0 -1
  627. package/dist/react/apollo-client/apollo-client.constant.d.ts +0 -1
  628. package/dist/react/apollo-client/apollo-client.constant.js +0 -1
  629. package/dist/react/apollo-client/apollo-client.context.cjs +0 -1
  630. package/dist/react/apollo-client/apollo-client.context.d.cts +0 -2
  631. package/dist/react/apollo-client/apollo-client.context.d.ts +0 -2
  632. package/dist/react/apollo-client/apollo-client.context.js +0 -1
  633. package/dist/react/apollo-client/apollo-client.hook.cjs +0 -1
  634. package/dist/react/apollo-client/apollo-client.hook.d.cts +0 -1
  635. package/dist/react/apollo-client/apollo-client.hook.d.ts +0 -1
  636. package/dist/react/apollo-client/apollo-client.hook.js +0 -1
  637. package/dist/react/apollo-client/apollo-client.type.cjs +0 -1
  638. package/dist/react/apollo-client/apollo-client.type.d.cts +0 -6
  639. package/dist/react/apollo-client/apollo-client.type.d.ts +0 -6
  640. package/dist/react/apollo-client/apollo-client.type.js +0 -0
  641. package/dist/react/apollo-client/apollo-client.util.cjs +0 -1
  642. package/dist/react/apollo-client/apollo-client.util.css +0 -1
  643. package/dist/react/apollo-client/apollo-client.util.d.cts +0 -3
  644. package/dist/react/apollo-client/apollo-client.util.d.ts +0 -3
  645. package/dist/react/apollo-client/apollo-client.util.js +0 -1
  646. package/dist/react/apollo-client/index.cjs +0 -1
  647. package/dist/react/apollo-client/index.css +0 -1
  648. package/dist/react/apollo-client/index.d.cts +0 -26
  649. package/dist/react/apollo-client/index.d.ts +0 -26
  650. package/dist/react/apollo-client/index.js +0 -1
  651. package/dist/react/apollo-client-nextjs/apollo-client.component.cjs +0 -1
  652. package/dist/react/apollo-client-nextjs/apollo-client.component.css +0 -1
  653. package/dist/react/apollo-client-nextjs/apollo-client.component.d.cts +0 -1
  654. package/dist/react/apollo-client-nextjs/apollo-client.component.d.ts +0 -1
  655. package/dist/react/apollo-client-nextjs/apollo-client.component.js +0 -1
  656. package/dist/react/apollo-client-nextjs/apollo-client.util.cjs +0 -1
  657. package/dist/react/apollo-client-nextjs/apollo-client.util.css +0 -1
  658. package/dist/react/apollo-client-nextjs/apollo-client.util.d.cts +0 -1
  659. package/dist/react/apollo-client-nextjs/apollo-client.util.d.ts +0 -1
  660. package/dist/react/apollo-client-nextjs/apollo-client.util.js +0 -1
  661. package/dist/react/apollo-client-nextjs/index.cjs +0 -1
  662. package/dist/react/apollo-client-nextjs/index.css +0 -1
  663. package/dist/react/apollo-client-nextjs/index.d.cts +0 -2
  664. package/dist/react/apollo-client-nextjs/index.d.ts +0 -2
  665. package/dist/react/apollo-client-nextjs/index.js +0 -1
  666. package/dist/react/apollo-error/apollo-error.component.cjs +0 -1
  667. package/dist/react/apollo-error/apollo-error.component.css +0 -1
  668. package/dist/react/apollo-error/apollo-error.component.d.cts +0 -1
  669. package/dist/react/apollo-error/apollo-error.component.d.ts +0 -1
  670. package/dist/react/apollo-error/apollo-error.component.js +0 -1
  671. package/dist/react/apollo-error/apollo-error.context.cjs +0 -1
  672. package/dist/react/apollo-error/apollo-error.context.d.cts +0 -1
  673. package/dist/react/apollo-error/apollo-error.context.d.ts +0 -1
  674. package/dist/react/apollo-error/apollo-error.context.js +0 -1
  675. package/dist/react/apollo-error/apollo-error.hook.cjs +0 -1
  676. package/dist/react/apollo-error/apollo-error.hook.d.cts +0 -1
  677. package/dist/react/apollo-error/apollo-error.hook.d.ts +0 -1
  678. package/dist/react/apollo-error/apollo-error.hook.js +0 -1
  679. package/dist/react/apollo-error/apollo-error.provider.cjs +0 -1
  680. package/dist/react/apollo-error/apollo-error.provider.d.cts +0 -1
  681. package/dist/react/apollo-error/apollo-error.provider.d.ts +0 -1
  682. package/dist/react/apollo-error/apollo-error.provider.js +0 -1
  683. package/dist/react/apollo-error/apollo-error.type.cjs +0 -1
  684. package/dist/react/apollo-error/apollo-error.type.d.cts +0 -2
  685. package/dist/react/apollo-error/apollo-error.type.d.ts +0 -2
  686. package/dist/react/apollo-error/apollo-error.type.js +0 -0
  687. package/dist/react/apollo-error/apollo-error.util.cjs +0 -1
  688. package/dist/react/apollo-error/apollo-error.util.d.cts +0 -2
  689. package/dist/react/apollo-error/apollo-error.util.d.ts +0 -2
  690. package/dist/react/apollo-error/apollo-error.util.js +0 -1
  691. package/dist/react/apollo-error/index.cjs +0 -1
  692. package/dist/react/apollo-error/index.css +0 -1
  693. package/dist/react/apollo-error/index.d.cts +0 -8
  694. package/dist/react/apollo-error/index.d.ts +0 -8
  695. package/dist/react/apollo-error/index.js +0 -1
  696. package/dist/react/i18next/i18next.hook.cjs +0 -1
  697. package/dist/react/i18next/i18next.hook.d.cts +0 -1
  698. package/dist/react/i18next/i18next.hook.d.ts +0 -1
  699. package/dist/react/i18next/i18next.hook.js +0 -1
  700. package/dist/react/i18next/i18next.util.cjs +0 -1
  701. package/dist/react/i18next/i18next.util.d.cts +0 -1
  702. package/dist/react/i18next/i18next.util.d.ts +0 -1
  703. package/dist/react/i18next/i18next.util.js +0 -1
  704. package/dist/react/i18next/index.cjs +0 -1
  705. package/dist/react/i18next/index.d.cts +0 -2
  706. package/dist/react/i18next/index.d.ts +0 -2
  707. package/dist/react/i18next/index.js +0 -1
  708. package/dist/react/index.cjs +0 -1
  709. package/dist/react/index.css +0 -1
  710. package/dist/react/index.d.cts +0 -62
  711. package/dist/react/index.d.ts +0 -62
  712. package/dist/react/index.js +0 -1
  713. package/dist/react/loading/index.cjs +0 -1
  714. package/dist/react/loading/index.css +0 -1
  715. package/dist/react/loading/index.d.cts +0 -6
  716. package/dist/react/loading/index.d.ts +0 -6
  717. package/dist/react/loading/index.js +0 -1
  718. package/dist/react/loading/loading.component.cjs +0 -1
  719. package/dist/react/loading/loading.component.css +0 -1
  720. package/dist/react/loading/loading.component.d.cts +0 -1
  721. package/dist/react/loading/loading.component.d.ts +0 -1
  722. package/dist/react/loading/loading.component.js +0 -1
  723. package/dist/react/loading/loading.context.cjs +0 -1
  724. package/dist/react/loading/loading.context.d.cts +0 -1
  725. package/dist/react/loading/loading.context.d.ts +0 -1
  726. package/dist/react/loading/loading.context.js +0 -1
  727. package/dist/react/loading/loading.hook.cjs +0 -1
  728. package/dist/react/loading/loading.hook.d.cts +0 -1
  729. package/dist/react/loading/loading.hook.d.ts +0 -1
  730. package/dist/react/loading/loading.hook.js +0 -1
  731. package/dist/react/loading/loading.provider.cjs +0 -1
  732. package/dist/react/loading/loading.provider.css +0 -1
  733. package/dist/react/loading/loading.provider.d.cts +0 -1
  734. package/dist/react/loading/loading.provider.d.ts +0 -1
  735. package/dist/react/loading/loading.provider.js +0 -1
  736. package/dist/react/loading/loading.type.cjs +0 -1
  737. package/dist/react/loading/loading.type.d.cts +0 -2
  738. package/dist/react/loading/loading.type.d.ts +0 -2
  739. package/dist/react/loading/loading.type.js +0 -0
  740. package/dist/react/log/index.cjs +0 -1
  741. package/dist/react/log/index.d.cts +0 -3
  742. package/dist/react/log/index.d.ts +0 -3
  743. package/dist/react/log/index.js +0 -1
  744. package/dist/react/log/log.type.cjs +0 -1
  745. package/dist/react/log/log.type.d.cts +0 -1
  746. package/dist/react/log/log.type.d.ts +0 -1
  747. package/dist/react/log/log.type.js +0 -0
  748. package/dist/react/log/log.util.cjs +0 -1
  749. package/dist/react/log/log.util.d.cts +0 -2
  750. package/dist/react/log/log.util.d.ts +0 -2
  751. package/dist/react/log/log.util.js +0 -1
  752. package/dist/react/next-intl/index.cjs +0 -1
  753. package/dist/react/next-intl/index.d.cts +0 -10
  754. package/dist/react/next-intl/index.d.ts +0 -10
  755. package/dist/react/next-intl/index.js +0 -1
  756. package/dist/react/next-intl/next-intl.constant.cjs +0 -1
  757. package/dist/react/next-intl/next-intl.constant.d.cts +0 -1
  758. package/dist/react/next-intl/next-intl.constant.d.ts +0 -1
  759. package/dist/react/next-intl/next-intl.constant.js +0 -1
  760. package/dist/react/next-intl/next-intl.context.cjs +0 -1
  761. package/dist/react/next-intl/next-intl.context.d.cts +0 -1
  762. package/dist/react/next-intl/next-intl.context.d.ts +0 -1
  763. package/dist/react/next-intl/next-intl.context.js +0 -1
  764. package/dist/react/next-intl/next-intl.hoc.cjs +0 -1
  765. package/dist/react/next-intl/next-intl.hoc.d.cts +0 -1
  766. package/dist/react/next-intl/next-intl.hoc.d.ts +0 -1
  767. package/dist/react/next-intl/next-intl.hoc.js +0 -1
  768. package/dist/react/next-intl/next-intl.hook.cjs +0 -1
  769. package/dist/react/next-intl/next-intl.hook.d.cts +0 -2
  770. package/dist/react/next-intl/next-intl.hook.d.ts +0 -2
  771. package/dist/react/next-intl/next-intl.hook.js +0 -1
  772. package/dist/react/next-intl/next-intl.provider.cjs +0 -1
  773. package/dist/react/next-intl/next-intl.provider.d.cts +0 -1
  774. package/dist/react/next-intl/next-intl.provider.d.ts +0 -1
  775. package/dist/react/next-intl/next-intl.provider.js +0 -1
  776. package/dist/react/next-intl/next-intl.type.cjs +0 -1
  777. package/dist/react/next-intl/next-intl.type.d.cts +0 -4
  778. package/dist/react/next-intl/next-intl.type.d.ts +0 -4
  779. package/dist/react/next-intl/next-intl.type.js +0 -0
  780. package/dist/react/storage/index.cjs +0 -1
  781. package/dist/react/storage/index.d.cts +0 -2
  782. package/dist/react/storage/index.d.ts +0 -2
  783. package/dist/react/storage/index.js +0 -1
  784. package/dist/react/storage/storage.hook.cjs +0 -1
  785. package/dist/react/storage/storage.hook.d.cts +0 -1
  786. package/dist/react/storage/storage.hook.d.ts +0 -1
  787. package/dist/react/storage/storage.hook.js +0 -1
  788. package/dist/react/storage/storage.util.cjs +0 -1
  789. package/dist/react/storage/storage.util.d.cts +0 -1
  790. package/dist/react/storage/storage.util.d.ts +0 -1
  791. package/dist/react/storage/storage.util.js +0 -1
  792. package/dist/react/toast/index.cjs +0 -1
  793. package/dist/react/toast/index.d.cts +0 -2
  794. package/dist/react/toast/index.d.ts +0 -2
  795. package/dist/react/toast/index.js +0 -1
  796. package/dist/react/userback/index.cjs +0 -1
  797. package/dist/react/userback/index.d.cts +0 -3
  798. package/dist/react/userback/index.d.ts +0 -3
  799. package/dist/react/userback/index.js +0 -1
  800. package/dist/react/userback/userback.component.cjs +0 -1
  801. package/dist/react/userback/userback.component.d.cts +0 -1
  802. package/dist/react/userback/userback.component.d.ts +0 -1
  803. package/dist/react/userback/userback.component.js +0 -1
  804. package/dist/react/userback/userback.type.cjs +0 -1
  805. package/dist/react/userback/userback.type.d.cts +0 -2
  806. package/dist/react/userback/userback.type.d.ts +0 -2
  807. package/dist/react/userback/userback.type.js +0 -0
  808. package/dist/typescript/common.cjs +0 -1
  809. package/dist/typescript/common.d.cts +0 -6
  810. package/dist/typescript/common.d.ts +0 -6
  811. package/dist/typescript/common.js +0 -1
  812. package/dist/typescript/index.cjs +0 -1
  813. package/dist/typescript/index.d.cts +0 -8
  814. package/dist/typescript/index.d.ts +0 -8
  815. package/dist/typescript/index.js +0 -1
  816. package/dist/typescript/react.cjs +0 -1
  817. package/dist/typescript/react.d.cts +0 -2
  818. package/dist/typescript/react.d.ts +0 -2
  819. package/dist/typescript/react.js +0 -0
  820. package/dist/typescript/style.d.cjs +0 -1
  821. package/dist/typescript/style.d.d.cts +0 -1
  822. package/dist/typescript/style.d.d.ts +0 -1
  823. package/dist/typescript/style.d.js +0 -0
  824. package/dist/util/common/common.type.cjs +0 -1
  825. package/dist/util/common/common.type.d.cts +0 -2
  826. package/dist/util/common/common.type.d.ts +0 -2
  827. package/dist/util/common/common.type.js +0 -0
  828. package/dist/util/common/common.util.cjs +0 -1
  829. package/dist/util/common/common.util.d.cts +0 -4
  830. package/dist/util/common/common.util.d.ts +0 -4
  831. package/dist/util/common/common.util.js +0 -1
  832. package/dist/util/common/index.cjs +0 -1
  833. package/dist/util/common/index.d.cts +0 -6
  834. package/dist/util/common/index.d.ts +0 -6
  835. package/dist/util/common/index.js +0 -1
  836. package/dist/util/index.cjs +0 -1
  837. package/dist/util/index.d.cts +0 -24
  838. package/dist/util/index.d.ts +0 -24
  839. package/dist/util/index.js +0 -1
  840. package/dist/util/object/index.cjs +0 -1
  841. package/dist/util/object/index.d.cts +0 -6
  842. package/dist/util/object/index.d.ts +0 -6
  843. package/dist/util/object/index.js +0 -1
  844. package/dist/util/object/object.util.cjs +0 -1
  845. package/dist/util/object/object.util.d.cts +0 -6
  846. package/dist/util/object/object.util.d.ts +0 -6
  847. package/dist/util/object/object.util.js +0 -1
  848. package/dist/util/serializer/index.cjs +0 -1
  849. package/dist/util/serializer/index.d.cts +0 -5
  850. package/dist/util/serializer/index.d.ts +0 -5
  851. package/dist/util/serializer/index.js +0 -1
  852. package/dist/util/serializer/serializer.type.cjs +0 -1
  853. package/dist/util/serializer/serializer.type.d.cts +0 -4
  854. package/dist/util/serializer/serializer.type.d.ts +0 -4
  855. package/dist/util/serializer/serializer.type.js +0 -0
  856. package/dist/util/serializer/serializer.util.cjs +0 -1
  857. package/dist/util/serializer/serializer.util.d.cts +0 -1
  858. package/dist/util/serializer/serializer.util.d.ts +0 -1
  859. package/dist/util/serializer/serializer.util.js +0 -1
  860. package/dist/util/string/index.cjs +0 -1
  861. package/dist/util/string/index.d.cts +0 -6
  862. package/dist/util/string/index.d.ts +0 -6
  863. package/dist/util/string/index.js +0 -1
  864. package/dist/util/string/string.type.cjs +0 -1
  865. package/dist/util/string/string.type.d.cts +0 -1
  866. package/dist/util/string/string.type.d.ts +0 -1
  867. package/dist/util/string/string.type.js +0 -0
  868. package/dist/util/string/string.util.cjs +0 -1
  869. package/dist/util/string/string.util.d.cts +0 -5
  870. package/dist/util/string/string.util.d.ts +0 -5
  871. package/dist/util/string/string.util.js +0 -1
  872. package/dist/util/validate/index.cjs +0 -1
  873. package/dist/util/validate/index.d.cts +0 -1
  874. package/dist/util/validate/index.d.ts +0 -1
  875. package/dist/util/validate/index.js +0 -1
  876. package/dist/util/validate/validate.util.cjs +0 -1
  877. package/dist/util/validate/validate.util.d.cts +0 -1
  878. package/dist/util/validate/validate.util.d.ts +0 -1
  879. package/dist/util/validate/validate.util.js +0 -1
@@ -1 +0,0 @@
1
- function e(e,t){if(t==null||t>e.length)t=e.length;for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function t(e){if(Array.isArray(e))return e}function n(t){if(Array.isArray(t))return e(t)}function r(e,t,n,r,s,a,c){try{var i=e[a](c);var o=i.value}catch(e){n(e);return}if(i.done){t(o)}else{Promise.resolve(o).then(r,s)}}function s(e){return function(){var t=this,n=arguments;return new Promise(function(s,a){var c=e.apply(t,n);function i(e){r(c,s,a,i,o,"next",e)}function o(e){r(c,s,a,i,o,"throw",e)}i(undefined)})}}function a(e,t){if(!(e instanceof t)){throw new TypeError("Cannot call a class as a function")}}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||false;r.configurable=true;if("value"in r)r.writable=true;Object.defineProperty(e,r.key,r)}}function i(e,t,n){if(t)c(e.prototype,t);if(n)c(e,n);return e}function o(e,t,n){if(t in e){Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true})}else{e[t]=n}return e}function u(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return!!t[Symbol.hasInstance](e)}else{return e instanceof t}}function l(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function f(e,t){var n=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n==null)return;var r=[];var s=true;var a=false;var c,i;try{for(n=n.call(e);!(s=(c=n.next()).done);s=true){r.push(c.value);if(t&&r.length===t)break}}catch(e){a=true;i=e}finally{try{if(!s&&n["return"]!=null)n["return"]()}finally{if(a)throw i}}return r}function E(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function d(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function p(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};var r=Object.keys(n);if(typeof Object.getOwnPropertySymbols==="function"){r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))}r.forEach(function(t){o(e,t,n[t])})}return e}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);if(t){r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}n.push.apply(n,r)}return n}function h(e,t){t=t!=null?t:{};if(Object.getOwnPropertyDescriptors){Object.defineProperties(e,Object.getOwnPropertyDescriptors(t))}else{m(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function y(e,n){return t(e)||f(e,n)||S(e,n)||E()}function v(e){return t(e)||l(e)||S(e)||E()}function g(e){return n(e)||l(e)||S(e)||d()}function O(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function S(t,n){if(!t)return;if(typeof t==="string")return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor)r=t.constructor.name;if(r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,n)}function D(e,t){var n,r,s,a={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},c=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return c.next=i(0),c["throw"]=i(1),c["return"]=i(2),typeof Symbol==="function"&&(c[Symbol.iterator]=function(){return this}),c;function i(e){return function(t){return o([e,t])}}function o(i){if(n)throw new TypeError("Generator is already executing.");while(c&&(c=0,i[0]&&(a=0)),a)try{if(n=1,r&&(s=i[0]&2?r["return"]:i[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,i[1])).done)return s;if(r=0,s)i=[i[0]&2,s.value];switch(i[0]){case 0:case 1:s=i;break;case 4:a.label++;return{value:i[1],done:false};case 5:a.label++;r=i[1];i=[0];continue;case 7:i=a.ops.pop();a.trys.pop();continue;default:if(!(s=a.trys,s=s.length>0&&s[s.length-1])&&(i[0]===6||i[0]===2)){a=0;continue}if(i[0]===3&&(!s||i[1]>s[0]&&i[1]<s[3])){a.label=i[1];break}if(i[0]===6&&a.label<s[1]){a.label=s[1];s=i;break}if(s&&a.label<s[2]){a.label=s[2];a.ops.push(i);break}if(s[2])a.ops.pop();a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e];r=0}finally{n=s=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}}var N=Object.defineProperty;var C=function(e,t,n){return t in e?N(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n};var I=function(e,t){return N(e,"name",{value:t,configurable:!0})};var T=function(e,t,n){return C(e,(typeof t==="undefined"?"undefined":O(t))!="symbol"?t+"":t,n)};import{format as A}from"date-fns";import R from"migrate-mongo";import{Document as b}from"mongoose";import _ from"mongoose-aggregate-paginate-v2";import G from"mongoose-paginate-v2";import{v4 as P}from"uuid";var M={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"}};import w from"unorm";var L=function(e){return e.PRODUCTION="production",e.STAGING="staging",e.DEVELOPMENT="development",e}({});var U={a:["\xe0","\xe1","ạ","ả","\xe3","\xe2","ầ","ấ","ậ","ẩ","ẫ","ă","ằ","ắ","ặ","ẳ","ẵ"],e:["\xe8","\xe9","ẹ","ẻ","ẽ","\xea","ề","ế","ệ","ể","ễ"],i:["\xec","\xed","ị","ỉ","ĩ"],o:["\xf2","\xf3","ọ","ỏ","\xf5","\xf4","ồ","ố","ộ","ổ","ỗ","ơ","ờ","ớ","ợ","ở","ỡ"],u:["\xf9","\xfa","ụ","ủ","ũ","ư","ừ","ứ","ự","ử","ữ"],y:["ỳ","\xfd","ỵ","ỷ","ỹ"],d:["đ"]},k=Object.entries(U).reduce(function(e,t){var n=y(t,2),r=n[0],s=n[1];return e[r.toUpperCase()]=s.map(function(e){return e.toUpperCase()}),e},{});function j(e){e=w.nfkc(e);var t=p({},U,k);var n=true,r=false,s=undefined;try{for(var a=Object.entries(t)[Symbol.iterator](),c;!(n=(c=a.next()).done);n=true){var i=y(c.value,2),o=i[0],u=i[1];var l="[".concat(o).concat(u.join(""),"]"),f="(".concat([o].concat(g(u)).join("|"),")");e=e.replace(new RegExp(l,"g"),f)}}catch(e){r=true;s=e}finally{try{if(!n&&a.return!=null){a.return()}}finally{if(r){throw s}}}return e}I(j,"regexSearchMapper");function F(e){return(typeof e==="undefined"?"undefined":O(e))=="object"&&e!==null&&!Array.isArray(e)}I(F,"isObject");function V(e){return JSON.parse(JSON.stringify(e))}I(V,"deepClone");function x(e,t){return t.reduce(function(e,t){if(e&&(typeof e==="undefined"?"undefined":O(e))=="object"&&t in e)return e[t]},e)}I(x,"getNestedValue");function Y(e,t,n){if(t.length===0)return e;var r=v(t),s=r[0],a=r.slice(1);if(a.length===0)return h(p({},e),o({},s,n));var c=e[s];return h(p({},e),o({},s,Y((typeof c==="undefined"?"undefined":O(c))=="object"&&c!==null?c:{},a,n)))}I(Y,"setNestedValue");import Q from"crypto-js";import q from"slugify";var B=q.default||q;function K(e,t){var n=I(function(e){var n,r;return B(e!==null&&e!==void 0?e:"",p({lower:(n=t===null||t===void 0?void 0:t.lower)!==null&&n!==void 0?n:!0,locale:(r=t===null||t===void 0?void 0:t.locale)!==null&&r!==void 0?r:"vi"},t))},"slugifyWithOptions");if(F(e)){var r={};var s=true,a=false,c=undefined;try{for(var i=Object.entries(e)[Symbol.iterator](),o;!(s=(o=i.next()).done);s=true){var u=y(o.value,2),l=u[0],f=u[1];r[l]=n(f)}}catch(e){a=true;c=e}finally{try{if(!s&&i.return!=null){i.return()}}finally{if(a){throw c}}}return r}return n(e)}I(K,"generateSlug");function H(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:4;return Q.SHA256(e).toString(Q.enc.Hex).slice(0,t)}I(H,"generateShortId");var W={isEmpty:function e(e){return e==null?!0:typeof e=="string"?e.trim().length===0:Array.isArray(e)?e.length===0:(typeof e==="undefined"?"undefined":O(e))=="object"?u(e,Date)?!1:u(e,Map)||u(e,Set)?e.size===0:u(e,WeakMap)||u(e,WeakSet)?!0:ArrayBuffer.isView(e)?e.byteLength===0:Object.keys(e).length===0:!1},isValidIP:function e(e){var t=e.split(".");return t.length===4&&t.every(function(e){return/^\d+$/.test(e)&&Number(e)>=0&&Number(e)<=255})?!0:/^(([a-f\d]{1,4}:){7}[a-f\d]{1,4}|((?:[a-f\d]{1,4}:){1,7}:)|((?:[a-f\d]{1,4}:){1,6}:[a-f\d]{1,4})|::)$/i.test(e)}};import J from"fs-extra";import $ from"path";var X=J.lstatSync,z=J.readdirSync,Z=J.mkdirSync,ee=J.readFileSync,et=J.unlinkSync,en=J.statSync,er=J.createWriteStream,es=J.readJsonSync;function ea(e,t,n){J.writeFileSync(e,t,n!==null&&n!==void 0?n:"utf-8")}I(ea,"writeFileSync");function ec(e,t,n){J.appendFileSync(e,t,n!==null&&n!==void 0?n:"utf-8")}I(ec,"appendFileSync");function ei(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}return t.every(function(e){return J.pathExistsSync(e)})}I(ei,"pathExistsSync");var eo=function(e){return e.Error="error",e.Warning="warning",e}({});import eu from"chalk";import el from"consola";import{GraphQLError as ef}from"graphql";var eE=".cyberskill-storage";import ed from"@dotenvx/dotenvx";import{bool as ep,cleanEnv as em,str as eh}from"envalid";import ey from"os";import ev from"path";import eg from"process";var eO=!1;function eS(){eg.env.NODE_ENV!==L.PRODUCTION&&!eO&&(ed.config(),eO=!0)}I(eS,"loadEnvFile");function eD(){eS();var e=em(eg.env,{CWD:eh({default:eg.cwd()}),DEBUG:ep({default:!1}),CYBERSKILL_STORAGE_DIRECTORY:eh({default:ev.join(ey.homedir(),eE)})});return{CWD:e.CWD,DEBUG:e.DEBUG,CYBERSKILL_STORAGE_DIRECTORY:e.CYBERSKILL_STORAGE_DIRECTORY}}I(eD,"getEnv");var eN=eD();eN.DEBUG||(el.level=4);function eC(e){var t=eu[e];return typeof t=="function"?t:eu.green}I(eC,"chalkKeyword");var eI={silent:el.silent,level:el.level,fatal:el.fatal,error:el.error,warn:el.warn,log:el.log,info:el.info,success:el.success,ready:el.ready,start:el.start,box:el.box,debug:el.debug,trace:el.trace,verbose:el.verbose,printBoxedLog:function e(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"red";if(!(t===null||t===void 0?void 0:t.length)){el.box(eu.green(e));return}t.forEach(function(e){var t=e.file,r=e.position,s=e.rule,a=e.message;el.log("".concat(eu.gray("File:")," ").concat(eu.blue("".concat(t).concat(r?":".concat(r):"")))),s&&el.log(" ".concat(eC(n)("Rule:")," ").concat(s)),el.log(" ".concat(eC(n)("Message:")," ").concat(a))}),el.box(eC(n)("".concat(e," : ").concat(t.length))),el.log(eu.gray("─".repeat(40)))}};function eT(e,t){var n=t!==null&&t!==void 0?t:{},r=n.shouldLog,s=r===void 0?!0:r,a=n.returnValue,c=n.callback,i=u(e,Error)?e:new Error(typeof e=="string"?e:"Unknown error");return s&&eI.error(i.message),c&&typeof c=="function"&&c(i),a||{success:!1,message:i.message,code:M.INTERNAL_SERVER_ERROR.CODE}}I(eT,"catchError");import eA from"fs-extra";var eR=function(e){return e.CLI="CLI",e.STRING="STRING",e.FUNCTION="FUNCTION",e}({});import{exec as eb}from"child_process";import e_ from"process";import*as eG from"util";var eP=function(e){return e.DEPENDENCY="dependencies",e.DEV_DEPENDENCY="devDependencies",e.PEER_DEPENDENCY="peerDependencies",e.BUNDLE_DEPENDENCY="bundleDependencies",e.OPTIONAL_DEPENDENCY="optionalDependencies",e}({});import eM from"node-fetch";var ew=eD();function eL(e){return s(function(){var t,n,r,s;return D(this,function(a){switch(a.label){case 0:a.trys.push([0,3,,4]);return[4,eM("https://registry.npmjs.org/".concat(e,"/latest"))];case 1:t=a.sent();if(!t.ok)throw new Error("Failed to fetch latest version: ".concat(t.status," ").concat(t.statusText));return[4,t.json()];case 2:n=a.sent(),r=n.version;return[2,{success:!0,result:r}];case 3:s=a.sent();return[2,eT(s)];case 4:return[2]}})})()}I(eL,"getLatestPackageVersion");function eU(e){return s(function(){var t,n,r,s,a,c,i,o,u,l,f,E,d,p,m,h,y,v,g,O,S,N,C,I;return D(this,function(D){switch(D.label){case 0:D.trys.push([0,2,,3]);if(!e){if(ei(tj.PACKAGE_JSON)){t=es(tj.PACKAGE_JSON),n=t.name,r=n===void 0?"":n,s=t.version,a=s===void 0?"":s;return[2,{success:!0,result:{name:r,currentVersion:a,latestVersion:a,isCurrentProject:!0,isInstalled:!0,isUpToDate:!0,isDependency:!1,isDevDependency:!1,installedPath:tj.PACKAGE_JSON,file:t}}]}return[2,{success:!0,result:{name:"",currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:!1,isDevDependency:!1,installedPath:"",file:{}}}]}if(!ei(tj.PACKAGE_JSON))return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:e.type===eP.DEPENDENCY,isDevDependency:e.type===eP.DEV_DEPENDENCY,installedPath:"",file:{}}}];c=es(tj.PACKAGE_JSON),i=c.name,o=c.version,u=o===void 0?"":o,l=c.dependencies,f=l===void 0?{}:l,E=c.devDependencies,d=E===void 0?{}:E;if(e.name===i)return[2,{success:!0,result:{name:i,currentVersion:u,latestVersion:u,isCurrentProject:!0,isInstalled:!0,isUpToDate:!0,isDependency:e.type===eP.DEPENDENCY,isDevDependency:e.type===eP.DEV_DEPENDENCY,installedPath:tj.PACKAGE_JSON,file:c}}];p=e.name in f,m=e.name in d;return[4,eL(e.name)];case 1:h=D.sent();if(!h.success)return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:p,isDevDependency:m,installedPath:"",file:{}}}];if(!p&&!m)return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:h.result,isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:e.type===eP.DEPENDENCY,isDevDependency:e.type===eP.DEV_DEPENDENCY,installedPath:"",file:{}}}];g=(v=(y=f[e.name])!==null&&y!==void 0?y:d[e.name])!==null&&v!==void 0?v:"",O=e6(ew.CWD,te,e.name,tr);if(!ei(O))return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:h.result,isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:p,isDevDependency:m,installedPath:"",file:{}}}];S=es(O),N=S.version,C=N===void 0?"":N;return[2,g!==C?{success:!0,result:{name:e.name,currentVersion:C||g,latestVersion:h.result,isCurrentProject:!1,isInstalled:!0,isUpToDate:!1,isDependency:p,isDevDependency:m,installedPath:O,file:S}}:{success:!0,result:{name:e.name,currentVersion:g,latestVersion:h.result,isCurrentProject:!1,isInstalled:!0,isUpToDate:g===h.result,isDependency:p,isDevDependency:m,installedPath:O,file:S}}];case 2:I=D.sent();return[2,eT(I)];case 3:return[2]}})})()}I(eU,"getPackage");function ek(e){return s(function(){var t,n,r,s,a;return D(this,function(c){try{;r=es(tj.PACKAGE_JSON),s=(t=r.dependencies)!==null&&t!==void 0?t:{},a=(n=r.devDependencies)!==null&&n!==void 0?n:{};e.isDependency?s[e.name]=e.latestVersion:e.isDevDependency&&(a[e.name]=e.latestVersion),ea(tj.PACKAGE_JSON,JSON.stringify(r,null,4)),eI.info('Updated "'.concat(e.name,'" to version ').concat(e.latestVersion))}catch(e){eT(e)}return[2]})})()}I(ek,"updatePackage");function ej(){return s(function(){var e,t,n,r,s,a,c,i,o,u,l,f,E;return D(this,function(d){switch(d.label){case 0:d.trys.push([0,12,,13]);e=[{command:I(function(){return tV.pnpmInstallStandard()},"command"),message:"Installing dependencies (standard)"},{command:I(function(){return tV.pnpmInstallLegacy()},"command"),message:"Retrying with legacy peer dependencies"},{command:I(function(){return tV.pnpmInstallForce()},"command"),message:"Retrying with force install"}];t=true,n=false,r=undefined;d.label=1;case 1:d.trys.push([1,9,10,11]);s=e[Symbol.iterator]();d.label=2;case 2:if(!!(t=(a=s.next()).done))return[3,8];c=a.value,i=c.command,o=c.message;d.label=3;case 3:d.trys.push([3,6,,7]);return[4,i()];case 4:u=d.sent();return[4,e0("".concat(o," using: ").concat(u),u)];case 5:d.sent();return[2];case 6:l=d.sent();eT(l);return[3,7];case 7:t=true;return[3,2];case 8:return[3,11];case 9:f=d.sent();n=true;r=f;return[3,11];case 10:try{if(!t&&s.return!=null){s.return()}}finally{if(n){throw r}}return[7];case 11:return[3,13];case 12:E=d.sent();eT(E);return[3,13];case 13:return[2]}})})()}I(ej,"installDependencies");function eF(e,t){return s(function(){var n,r,s,a,c,i,o,u,l,f,E,d,p,m,h,y,v;return D(this,function(O){switch(O.label){case 0:O.trys.push([0,15,,16]);if(!ei(tj.PACKAGE_JSON)){eI.error("package.json not found. Aborting setup.");return[2]}return[4,Promise.all(e.map(eU))];case 1:s=O.sent().filter(function(e){return e.success&&!!e.result&&!e.result.isCurrentProject}).map(function(e){return e.result}),a=s.filter(function(e){return!e.isInstalled}),c=s.filter(function(e){return!e.isUpToDate}),i=[];(t===null||t===void 0?void 0:t.install)&&a.length>0&&(n=i).push.apply(n,g(a.map(ek))),(t===null||t===void 0?void 0:t.update)&&c.length>0&&(r=i).push.apply(r,g(c.map(ek)));o=i.length>0;if(!o)return[3,6];return[4,Promise.all(i)];case 2:O.sent();return[4,ej()];case 3:O.sent();u=["Running ESLint with auto-fix"];return[4,tV.eslintFix()];case 4:return[4,e0.apply(void 0,u.concat([O.sent()]))];case 5:o=O.sent();O.label=6;case 6:o;f=true,E=false,d=undefined;O.label=7;case 7:O.trys.push([7,12,13,14]);p=((l=t===null||t===void 0?void 0:t.callbacks)!==null&&l!==void 0?l:[])[Symbol.iterator]();O.label=8;case 8:if(!!(f=(m=p.next()).done))return[3,11];h=m.value;return[4,h()];case 9:O.sent();O.label=10;case 10:f=true;return[3,8];case 11:return[3,14];case 12:y=O.sent();E=true;d=y;return[3,14];case 13:try{if(!f&&p.return!=null){p.return()}}finally{if(E){throw d}}return[7];case 14:return[3,16];case 15:v=O.sent();eT(v);return[3,16];case 16:return[2]}})})()}I(eF,"setupPackages");import eV from"node-persist";var ex=eD();function eY(){return s(function(){var e;return D(this,function(t){switch(t.label){case 0:e=eV.defaultInstance;if(e)return[3,2];return[4,eV.init({dir:ex.CYBERSKILL_STORAGE_DIRECTORY})];case 1:e=t.sent();t.label=2;case 2:e;return[2]}})})()}I(eY,"initNodePersist");var eQ={get:function e(e){return s(function(){var t,n;return D(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,eY()];case 1:r.sent();return[4,eV.getItem(e)];case 2:return[2,(t=r.sent())!==null&&t!==void 0?t:null];case 3:n=r.sent();return[2,eT(n,{returnValue:null})];case 4:return[2]}})})()},set:function e(e,t){return s(function(){var n;return D(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,eY()];case 1:r.sent();return[4,eV.setItem(e,t)];case 2:r.sent();return[3,4];case 3:n=r.sent();eT(n);return[3,4];case 4:return[2]}})})()},remove:function e(e){return s(function(){var t;return D(this,function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,eY()];case 1:n.sent();return[4,eV.removeItem(e)];case 2:n.sent();return[3,4];case 3:t=n.sent();eT(t);return[3,4];case 4:return[2]}})})()},keys:function e(){return s(function(){var e,t;return D(this,function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,eY()];case 1:n.sent();return[4,eV.keys()];case 2:e=n.sent();return[2,Array.isArray(e)?e:(eI.warn("[Storage:keys] Invalid keys response:",e),[])];case 3:t=n.sent();return[2,eT(t,{returnValue:[]})];case 4:return[2]}})})()},getLogLink:function e(e){return s(function(){return D(this,function(t){try{return[2,"".concat(ex.CYBERSKILL_STORAGE_DIRECTORY," (key: ").concat(e,")")]}catch(e){return[2,eT(e,{returnValue:null})]}return[2]})})()}};var eq=eD(),eB=eG.promisify(eb);function eK(){return s(function(){var e;return D(this,function(t){switch(t.label){case 0:return[4,eU()];case 1:e=t.sent();return[2,e.success?e.result.name:Date.now().toString()]}})})()}I(eK,"getPackageName");function eH(e){return s(function(){var t,n;return D(this,function(r){switch(r.label){case 0:if(e.length===0)return[2];return[4,eK()];case 1:t=r.sent();r.label=2;case 2:r.trys.push([2,4,,5]);return[4,eQ.set(t,e)];case 3:r.sent(),setTimeout(function(){return s(function(){var e;return D(this,function(n){switch(n.label){case 0:return[4,eQ.getLogLink(t)];case 1:e=n.sent();e&&eI.info("\uD83D\uDCC2 Open the error list manually: ".concat(e));return[2]}})})()},0);return[3,5];case 4:n=r.sent();eT(n);return[3,5];case 5:return[2]}})})()}I(eH,"saveErrorListToStorage");function eW(e){var t=[],n=[],r="",s=/^\s*(\d+):(\d+)\s+(error|warning)\s+(.+?)\s+(\S+)$/,a=/^(.+?)\((\d+),(\d+)\):\s+(error|warning)\s+TS\d+:\s+(\S.+)$/,c=/^✖\s+(.*?)\s+\[(.*?)\]$/;e.split("\n").forEach(function(e){if(e.startsWith("/"))r=e.trim();else{var i,o,u,l,f;var E=s.exec(e)||[],d=a.exec(e)||[],p=c.exec(e)||[];var m,h,y,v,g,O;E.length&&r?t.push({file:r,position:"".concat(E[1],":").concat(E[2]),type:E[3]===eo.Error?eo.Error:eo.Warning,message:(m=E===null||E===void 0?void 0:(i=E[4])===null||i===void 0?void 0:i.trim())!==null&&m!==void 0?m:"",rule:(h=E===null||E===void 0?void 0:(o=E[5])===null||o===void 0?void 0:o.trim())!==null&&h!==void 0?h:""}):d.length?t.push({file:(y=d===null||d===void 0?void 0:d[1])!==null&&y!==void 0?y:"",position:"".concat(d[2],":").concat(d[3]),type:d[4]===eo.Error?eo.Error:eo.Warning,message:(v=d===null||d===void 0?void 0:(u=d[5])===null||u===void 0?void 0:u.trim())!==null&&v!==void 0?v:""}):p.length?t.push({file:"commitlint",type:eo.Error,message:(g=p===null||p===void 0?void 0:(l=p[1])===null||l===void 0?void 0:l.trim())!==null&&g!==void 0?g:"",rule:(O=p===null||p===void 0?void 0:(f=p[2])===null||f===void 0?void 0:f.trim())!==null&&O!==void 0?O:""}):n.push(e.trim())}}),t.length&&eH(t),eq.DEBUG&&n.length&&(eI.warn("Unmatched lines:"),n.forEach(function(e){return eI.info(" ".concat(e))}))}I(eW,"parseTextErrors");function eJ(e){try{var t=JSON.parse(e),n=[];t.forEach(function(e){var t=e.filePath,r=e.messages;r.forEach(function(e){var r=e.severity,s=e.line,a=e.column,c=e.ruleId,i=e.message;n.push({type:r===2?eo.Error:eo.Warning,file:t,position:"".concat(s,":").concat(a),rule:c,message:i})})}),n.length&&eH(n)}catch(t){eW(e)}}I(eJ,"parseCommandOutput");function e$(e){return s(function(e){var t,n,r,s,a,c,i,o,u;var l=arguments;return D(this,function(f){switch(f.label){case 0:t=l.length>1&&l[1]!==void 0?l[1]:eJ;n=new AbortController;e_.on("SIGINT",function(){eI.warn("Process interrupted. Terminating..."),n.abort(),e_.exit()});f.label=1;case 1:f.trys.push([1,4,,5]);if(!(typeof e=="string"))return[3,3];return[4,eB(e,{maxBuffer:0x6400000,signal:n.signal})];case 2:r=f.sent(),s=r.stdout,a=r.stderr;[s,a].forEach(function(e){return e&&t(e)});f.label=3;case 3:return[3,5];case 4:c=f.sent();i=c.stdout,o=c.stderr,u=c.message;[i,o].forEach(function(e){return e&&t(e)}),!o&&!i&&eI.error("Command failed: ".concat(u));return[3,5];case 5:return[2]}})}).apply(this,arguments)}I(e$,"executeCommand");function eX(e){return{raw:!0,cmd:e}}I(eX,"rawCommand");function ez(e,t){return(t===null||t===void 0?void 0:t.isCurrentProject)?"".concat(tb," ").concat(tT," ").concat(tp," ").concat(e):"".concat(tb," ").concat(td," ").concat(e)}I(ez,"formatCLI");function eZ(e,t){return typeof e=="function"?ez(e(t),t):(typeof e==="undefined"?"undefined":O(e))=="object"&&(e===null||e===void 0?void 0:e.raw)===!0?e.cmd:typeof e=="string"?ez(e,t):e}I(eZ,"formatCommand");function e0(e,t){return s(function(){var n;return D(this,function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);eI.start("".concat(e)),eq.DEBUG&&eI.info("→ ".concat(t));return[4,e$(t)];case 1:r.sent(),eI.success("".concat(e," done."));return[3,3];case 2:n=r.sent();eT(n);return[3,3];case 3:return[2]}})})()}I(e0,"runCommand");import e1 from"path";var e2=eD(),e4=e1,e3=e4.dirname;function e5(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r;return(r=e4).resolve.apply(r,[e2.CWD].concat(g(t)))}I(e5,"resolveWorkingPath");function e6(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r;return(r=e4).join.apply(r,g(t))}I(e6,"join");var e7=eD(),e8=e7.CWD,e9="@cyberskill/shared",te="node_modules",tt="dist",tn="public",tr="package.json",ts="package-lock.json",ta="tsconfig.json",tc=".gitignore",ti=".simple-git-hooks.json",to="pnpm-lock.yaml",tu=".git/hooks/",tl=".git/COMMIT_EDITMSG",tf=".migrate-mongo.config.js",tE=function(){var e=eA.readJsonSync(e5(tr)).name===e9?e8:e6(e8,te,e9);return e6(e,tt)}(),td="cyberskill",tp="src/node/cli/index.ts",tm="eslint",th="eslint",ty="vitest";var tv="vitest",tg="@commitlint/cli",tO="@commitlint/config-conventional",tS="commitlint",tD="lint-staged",tN="lint-staged",tC="typescript",tI="tsc",tT="tsx",tA="git",tR="pnpm",tb="pnpm exec",t_="simple-git-hooks",tG="simple-git-hooks",tP="@eslint/config-inspector",tM="eslint-config-inspector",tw="node-modules-inspector",tL="node-modules-inspector",tU="migrate-mongo",tk="./node_modules/migrate-mongo/bin/migrate-mongo",tj={CYBERSKILL_DIRECTORY:tE,WORKING_DIRECTORY:e8,PUBLIC_DIRECTORY:e5(tn),TS_CONFIG:e5(ta),GIT_IGNORE:e5(tc),GIT_HOOK:e5(tu),GIT_COMMIT_MSG:e5(tl),SIMPLE_GIT_HOOKS_JSON:e5(ti),PACKAGE_JSON:e5(tr),PACKAGE_LOCK_JSON:e5(ts),PNPM_LOCK_YAML:e5(to),NODE_MODULES:e5(te),MIGRATE_MONGO_CONFIG:e5(tf),LINT_STAGED_CONFIG:e5("".concat(tE,"/config/lint-staged/index.js")),COMMITLINT_CONFIG:e5("".concat(tE,"/config/commitlint/index.js")),VITEST_UNIT_CONFIG:e5("".concat(tE,"/config/vitest/vitest.unit.js")),VITEST_UNIT_SETUP_CONFIG:e5("".concat(tE,"/config/vitest/vitest.unit.setup.js")),VITEST_E2E_CONFIG:e5("".concat(tE,"/config/vitest/vitest.e2e.js"))};function tF(e){var t=e.type,n=e.packages,r=e.command;var a=n===null||n===void 0?void 0:n.reduce(function(e,t){return e.some(function(e){return e.name===t.name})||e.push(t),e},[]);return function(){return s(function(){var e;return D(this,function(n){switch(n.label){case 0:switch(t){case eR.CLI:return[3,1];case eR.STRING:return[3,4]}return[3,5];case 1:e=a===null||a===void 0?void 0:a.length;if(!e)return[3,3];return[4,eF(a,{install:!0})];case 2:e=n.sent();n.label=3;case 3:return[2,(e,eZ(eX("".concat(tb," ").concat(r))))];case 4:return[2,eZ(eX(r))];case 5:throw new Error("Unsupported command type");case 6:return[2]}})})()}}I(tF,"buildCommand");var tV={simpleGitHooks:tF({type:eR.CLI,packages:[{name:t_,type:eP.DEV_DEPENDENCY}],command:tG}),eslintInspect:tF({type:eR.CLI,packages:[{name:tP,type:eP.DEV_DEPENDENCY}],command:tM}),nodeModulesInspect:tF({type:eR.CLI,packages:[{name:tw,type:eP.DEV_DEPENDENCY}],command:tL}),eslintCheck:tF({type:eR.CLI,packages:[{name:tm,type:eP.DEV_DEPENDENCY}],command:"".concat(th," ").concat(tj.WORKING_DIRECTORY," --no-cache")}),eslintFix:tF({type:eR.CLI,packages:[{name:tm,type:eP.DEV_DEPENDENCY}],command:"".concat(th," ").concat(tj.WORKING_DIRECTORY," --fix --no-cache")}),typescriptCheck:tF({type:eR.CLI,packages:[{name:tC,type:eP.DEV_DEPENDENCY}],command:"".concat(tI," -p ").concat(tj.TS_CONFIG," --noEmit")}),testUnit:tF({type:eR.CLI,packages:[{name:ty,type:eP.DEV_DEPENDENCY}],command:"".concat(tv," --config ").concat(tj.VITEST_UNIT_CONFIG)}),testE2e:tF({type:eR.CLI,packages:[{name:ty,type:eP.DEV_DEPENDENCY}],command:"".concat(tv," --config ").concat(tj.VITEST_E2E_CONFIG)}),mongoMigrateCreate:I(function(e){return tF({type:eR.CLI,packages:[{name:tT,type:eP.DEPENDENCY},{name:tU,type:eP.DEPENDENCY}],command:"".concat(tT," ").concat(tk," create ").concat(e," -f ").concat(tj.MIGRATE_MONGO_CONFIG)})()},"mongoMigrateCreate"),mongoMigrateUp:tF({type:eR.CLI,packages:[{name:tT,type:eP.DEPENDENCY},{name:tU,type:eP.DEPENDENCY}],command:"".concat(tT," ").concat(tk," up -f ").concat(tj.MIGRATE_MONGO_CONFIG)}),mongoMigrateDown:tF({type:eR.CLI,packages:[{name:tT,type:eP.DEPENDENCY},{name:tU,type:eP.DEPENDENCY}],command:"".concat(tT," ").concat(tk," down -f ").concat(tj.MIGRATE_MONGO_CONFIG)}),commitLint:tF({type:eR.CLI,packages:[{name:tg,type:eP.DEV_DEPENDENCY},{name:tO,type:eP.DEV_DEPENDENCY}],command:"".concat(tS," --edit ").concat(tj.GIT_COMMIT_MSG," --config ").concat(tj.COMMITLINT_CONFIG)}),lintStaged:tF({type:eR.CLI,packages:[{name:tD,type:eP.DEV_DEPENDENCY}],command:"".concat(tN," --config ").concat(tj.LINT_STAGED_CONFIG)}),configureGitHook:tF({type:eR.STRING,command:"".concat(tA," config core.hooksPath ").concat(tj.GIT_HOOK)}),build:tF({type:eR.STRING,command:"".concat(tR," run --if-present build")}),pnpmInstallStandard:tF({type:eR.STRING,command:"".concat(tR," install --ignore-scripts")}),pnpmInstallLegacy:tF({type:eR.STRING,command:"".concat(tR," install --ignore-scripts --legacy-peer-deps")}),pnpmInstallForce:tF({type:eR.STRING,command:"".concat(tR," install --ignore-scripts --force")}),pnpmPruneStore:tF({type:eR.STRING,command:"".concat(tR," store prune")}),pnpmCleanCache:tF({type:eR.STRING,command:"".concat(tR," cache delete")})};var tx={getDateTime:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Date;return A(e,"yyyy-MM-dd HH:mm:ss.SSS")},createGenericFields:function e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.returnDateAs,n=t===void 0?"string":t;var r=n==="string"?tx.getDateTime():new Date;return{id:P(),isDel:!1,createdAt:r,updatedAt:r}},applyPlugins:function e(e,t){t.filter(function(e){return typeof e=="function"}).forEach(function(t){return e.plugin(t)})},applyMiddlewares:function e(e,t){t.forEach(function(t){var n=t.method,r=t.pre,s=t.post;n&&r&&e.pre(n,r),n&&s&&e.post(n,s)})},createGenericSchema:function e(e){return new e.Schema({id:{type:String,default:P,unique:!0},isDel:{type:Boolean,default:!1}},{timestamps:!0})},createSchema:function e(e){var t=e.mongoose,n=e.schema,r=e.virtuals,s=r===void 0?[]:r,a=e.standalone,c=a===void 0?!1:a;var i=new t.Schema(n);return s.forEach(function(e){var t=e.name,n=e.options,r=e.get;var s=i.virtual(t,n);r&&s.get(r)}),c||i.add(tx.createGenericSchema(t)),i},createModel:function e(e){var t=e.mongoose,n=e.name,r=e.schema,s=e.pagination,a=s===void 0?!1:s,c=e.aggregate,i=c===void 0?!1:c,o=e.virtuals,u=o===void 0?[]:o,l=e.middlewares,f=l===void 0?[]:l;if(!n)throw new Error("Model name is required.");if(t.models[n])return t.models[n];var E=tx.createSchema({mongoose:t,schema:r,virtuals:u});return tx.applyPlugins(E,[a&&G,i&&_]),tx.applyMiddlewares(E,f),t.model(n,E)},validator:{isRequired:function e(){return function(e){return s(function(){return D(this,function(t){return[2,!W.isEmpty(e)]})})()}},isUnique:function e(e){return function(t){return s(function(){var n;return D(this,function(r){switch(r.label){case 0:if(!Array.isArray(e)||e.length===0)throw new Error("Fields must be a non-empty array of strings.");n={$or:e.map(function(e){return o({},e,t)})};return[4,this.constructor.exists(n)];case 1:return[2,!r.sent()]}})}).call(this)}},matchesRegex:function e(e){return function(t){return s(function(){return D(this,function(n){if(!Array.isArray(e)||e.some(function(e){return!u(e,RegExp)}))throw new Error("regexArray must be an array of valid RegExp objects.");return[2,e.every(function(e){return e.test(t)})]})})()}}},migrate:h(p({},R),{setConfig:I(function(e){var t="// This file is automatically generated by the Cyberskill CLI.\nmodule.exports = ".concat(JSON.stringify(e,null,4));ea(tj.MIGRATE_MONGO_CONFIG,t);var n="\n".concat(tf,"\n");ei(tj.GIT_IGNORE)?ee(tj.GIT_IGNORE,"utf-8").split("\n").includes(tf)||ec(tj.GIT_IGNORE,n):ea(tj.GIT_IGNORE,n)},"setConfig")}),regexify:function e(e,t){if(!e)return{};var n=V(e);if(!t||t.length===0)return n;var r=true,s=false,a=undefined;try{for(var c=t[Symbol.iterator](),i;!(r=(i=c.next()).done);r=true){var o=i.value;var u=o.toString().split("."),l=x(n,u);if(typeof l=="string"&&l.length>0){var f={$regex:".*".concat(j(l),".*"),$options:"i"};n=Y(n,u,f)}}}catch(e){s=true;a=e}finally{try{if(!r&&c.return!=null){c.return()}}finally{if(s){throw a}}}return n}},tY=/*#__PURE__*/function(){"use strict";function e(t,n){a(this,e);T(this,"collection");this.collection=t.collection(n)}i(e,[{key:"createOne",value:function e(e){return s(function(){var t,n;return D(this,function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);t=p({},tx.createGenericFields(),e);return[4,this.collection.insertOne(t)];case 1:return[2,r.sent().acknowledged?{success:!0,message:"Document created successfully",result:t}:{success:!1,message:"Document creation failed",code:M.INTERNAL_SERVER_ERROR.CODE}];case 2:n=r.sent();return[2,eT(n)];case 3:return[2]}})}).call(this)}},{key:"createMany",value:function e(e){return s(function(){var t,n,r;return D(this,function(s){switch(s.label){case 0:s.trys.push([0,2,,3]);t=e.map(function(e){return p({},tx.createGenericFields(),e)});return[4,this.collection.insertMany(t)];case 1:n=s.sent();return[2,n.insertedCount===0?{success:!1,message:"No documents were inserted",code:M.INTERNAL_SERVER_ERROR.CODE}:{success:!0,message:"".concat(n.insertedCount," documents created successfully"),result:t}];case 2:r=s.sent();return[2,eT(r)];case 3:return[2]}})}).call(this)}},{key:"findOne",value:function e(e){return s(function(){var t,n;return D(this,function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);return[4,this.collection.findOne(e)];case 1:t=r.sent();return[2,t?{success:!0,message:"Document found",result:t}:{success:!1,message:"Document not found",code:M.NOT_FOUND.CODE}];case 2:n=r.sent();return[2,eT(n)];case 3:return[2]}})}).call(this)}},{key:"findAll",value:function e(){return s(function(){var e,t,n;var r=arguments;return D(this,function(s){switch(s.label){case 0:e=r.length>0&&r[0]!==void 0?r[0]:{};s.label=1;case 1:s.trys.push([1,3,,4]);t={success:!0,message:"Documents retrieved successfully"};return[4,this.collection.find(e).toArray()];case 2:return[2,(t.result=s.sent(),t)];case 3:n=s.sent();return[2,eT(n)];case 4:return[2]}})}).apply(this,arguments)}},{key:"count",value:function e(){return s(function(){var e,t,n;var r=arguments;return D(this,function(s){switch(s.label){case 0:e=r.length>0&&r[0]!==void 0?r[0]:{};s.label=1;case 1:s.trys.push([1,3,,4]);t={success:!0,message:"Count retrieved successfully"};return[4,this.collection.countDocuments(e)];case 2:return[2,(t.result=s.sent(),t)];case 3:n=s.sent();return[2,eT(n)];case 4:return[2]}})}).apply(this,arguments)}},{key:"updateOne",value:function e(e,t){return s(function(){var n,r;return D(this,function(s){switch(s.label){case 0:s.trys.push([0,2,,3]);return[4,this.collection.updateOne(e,{$set:t})];case 1:n=s.sent();return[2,n.matchedCount===0?{success:!1,message:"No documents matched the filter",code:M.INTERNAL_SERVER_ERROR.CODE}:{success:!0,message:"Document updated successfully",result:n}];case 2:r=s.sent();return[2,eT(r)];case 3:return[2]}})}).call(this)}},{key:"updateMany",value:function e(e,t){return s(function(){var n,r;return D(this,function(s){switch(s.label){case 0:s.trys.push([0,2,,3]);return[4,this.collection.updateMany(e,{$set:t})];case 1:n=s.sent();return[2,n.matchedCount===0?{success:!1,message:"No documents matched the filter",code:M.INTERNAL_SERVER_ERROR.CODE}:{success:!0,message:"Documents updated successfully",result:n}];case 2:r=s.sent();return[2,eT(r)];case 3:return[2]}})}).call(this)}},{key:"deleteOne",value:function e(e){return s(function(){var t,n;return D(this,function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);return[4,this.collection.deleteOne(e)];case 1:t=r.sent();return[2,t.deletedCount===0?{success:!1,message:"No documents matched the filter",code:M.INTERNAL_SERVER_ERROR.CODE}:{success:!0,message:"Document deleted successfully",result:t}];case 2:n=r.sent();return[2,eT(n)];case 3:return[2]}})}).call(this)}},{key:"deleteMany",value:function e(e){return s(function(){var t,n;return D(this,function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);return[4,this.collection.deleteMany(e)];case 1:t=r.sent();return[2,t.deletedCount===0?{success:!1,message:"No documents matched the filter",code:M.INTERNAL_SERVER_ERROR.CODE}:{success:!0,message:"Documents deleted successfully",result:t}];case 2:n=r.sent();return[2,eT(n)];case 3:return[2]}})}).call(this)}}]);return e}();I(tY,"MongoController");var tQ=tY,tq=/*#__PURE__*/function(){"use strict";function e(t){a(this,e);T(this,"model");this.model=t}i(e,[{key:"getModelName",value:function e(){return this.model.modelName}},{key:"findOne",value:function e(e){return s(function(){var e,t,n,r,s,a,c;var i=arguments;return D(this,function(o){switch(o.label){case 0:e=i.length>0&&i[0]!==void 0?i[0]:{},t=i.length>1&&i[1]!==void 0?i[1]:{},n=i.length>2&&i[2]!==void 0?i[2]:{},r=i.length>3?i[3]:void 0;o.label=1;case 1:o.trys.push([1,3,,4]);s=this.model.findOne(e,t,n);r&&s.populate(r);return[4,s.exec()];case 2:a=o.sent();return[2,a?{success:!0,result:a}:{success:!1,message:"No ".concat(this.getModelName()," found."),code:M.NOT_FOUND.CODE}];case 3:c=o.sent();return[2,eT(c)];case 4:return[2]}})}).apply(this,arguments)}},{key:"findAll",value:function e(e){return s(function(){var e,t,n,r,s,a,c;var i=arguments;return D(this,function(o){switch(o.label){case 0:e=i.length>0&&i[0]!==void 0?i[0]:{},t=i.length>1&&i[1]!==void 0?i[1]:{},n=i.length>2&&i[2]!==void 0?i[2]:{},r=i.length>3?i[3]:void 0;o.label=1;case 1:o.trys.push([1,3,,4]);s=this.model.find(e,t,n);r&&s.populate(r);a={success:!0};return[4,s.exec()];case 2:return[2,(a.result=o.sent(),a)];case 3:c=o.sent();return[2,eT(c)];case 4:return[2]}})}).apply(this,arguments)}},{key:"findPaging",value:function e(){return s(function(){var e,t,n,r;var s=arguments;return D(this,function(a){switch(a.label){case 0:e=s.length>0&&s[0]!==void 0?s[0]:{},t=s.length>1&&s[1]!==void 0?s[1]:{};a.label=1;case 1:a.trys.push([1,3,,4]);n={success:!0};return[4,this.model.paginate(e,t)];case 2:return[2,(n.result=a.sent(),n)];case 3:r=a.sent();return[2,eT(r)];case 4:return[2]}})}).apply(this,arguments)}},{key:"findPagingAggregate",value:function e(e){return s(function(e){var t,n,r;var s=arguments;return D(this,function(a){switch(a.label){case 0:t=s.length>1&&s[1]!==void 0?s[1]:{};a.label=1;case 1:a.trys.push([1,3,,4]);n={success:!0};return[4,this.model.aggregatePaginate(this.model.aggregate(e),t)];case 2:return[2,(n.result=a.sent(),n)];case 3:r=a.sent();return[2,eT(r)];case 4:return[2]}})}).apply(this,arguments)}},{key:"count",value:function e(){return s(function(){var e,t,n;var r=arguments;return D(this,function(s){switch(s.label){case 0:e=r.length>0&&r[0]!==void 0?r[0]:{};s.label=1;case 1:s.trys.push([1,3,,4]);t={success:!0};return[4,this.model.countDocuments(e)];case 2:return[2,(t.result=s.sent(),t)];case 3:n=s.sent();return[2,eT(n)];case 4:return[2]}})}).apply(this,arguments)}},{key:"createOne",value:function e(e){return s(function(){var t,n;return D(this,function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);t={success:!0};return[4,this.model.create(e)];case 1:return[2,(t.result=r.sent(),t)];case 2:n=r.sent();return[2,eT(n)];case 3:return[2]}})}).call(this)}},{key:"createMany",value:function e(e){return s(function(e){var t,n,r;var s=arguments;return D(this,function(a){switch(a.label){case 0:t=s.length>1&&s[1]!==void 0?s[1]:{};a.label=1;case 1:a.trys.push([1,3,,4]);n={success:!0};return[4,this.model.insertMany(e,t)];case 2:return[2,(n.result=a.sent().map(function(e){return u(e,b)?e.toObject():null}).filter(function(e){return e!==null}),n)];case 3:r=a.sent();return[2,eT(r)];case 4:return[2]}})}).apply(this,arguments)}},{key:"updateOne",value:function e(){return s(function(){var e,t,n,r,s;var a=arguments;return D(this,function(c){switch(c.label){case 0:e=a.length>0&&a[0]!==void 0?a[0]:{},t=a.length>1&&a[1]!==void 0?a[1]:{},n=a.length>2&&a[2]!==void 0?a[2]:{};c.label=1;case 1:c.trys.push([1,3,,4]);return[4,this.model.findOneAndUpdate(e,t,p({new:!0},n)).exec()];case 2:r=c.sent();return[2,r?{success:!0,result:r}:{success:!1,message:"Failed to update ".concat(this.getModelName(),"."),code:M.NOT_FOUND.CODE}];case 3:s=c.sent();return[2,eT(s)];case 4:return[2]}})}).apply(this,arguments)}},{key:"updateMany",value:function e(){return s(function(){var e,t,n,r,s;var a=arguments;return D(this,function(c){switch(c.label){case 0:e=a.length>0&&a[0]!==void 0?a[0]:{},t=a.length>1&&a[1]!==void 0?a[1]:{},n=a.length>2&&a[2]!==void 0?a[2]:{};c.label=1;case 1:c.trys.push([1,3,,4]);r={success:!0};return[4,this.model.updateMany(e,t,n).exec()];case 2:return[2,(r.result=c.sent(),r)];case 3:s=c.sent();return[2,eT(s)];case 4:return[2]}})}).apply(this,arguments)}},{key:"deleteOne",value:function e(){return s(function(){var e,t,n,r;var s=arguments;return D(this,function(a){switch(a.label){case 0:e=s.length>0&&s[0]!==void 0?s[0]:{},t=s.length>1&&s[1]!==void 0?s[1]:{};a.label=1;case 1:a.trys.push([1,3,,4]);return[4,this.model.findOneAndDelete(e,t).exec()];case 2:n=a.sent();return[2,n?{success:!0,result:n}:{success:!1,message:"No ".concat(this.getModelName()," found to delete."),code:M.NOT_FOUND.CODE}];case 3:r=a.sent();return[2,eT(r)];case 4:return[2]}})}).apply(this,arguments)}},{key:"deleteMany",value:function e(){return s(function(){var e,t,n,r;var s=arguments;return D(this,function(a){switch(a.label){case 0:e=s.length>0&&s[0]!==void 0?s[0]:{},t=s.length>1&&s[1]!==void 0?s[1]:{};a.label=1;case 1:a.trys.push([1,3,,4]);return[4,this.model.deleteMany(e,t).exec()];case 2:n=a.sent();return[2,n.deletedCount===0?{success:!1,message:"No documents found to delete.",code:M.NOT_FOUND.CODE}:{success:!0,result:n}];case 3:r=a.sent();return[2,eT(r)];case 4:return[2]}})}).apply(this,arguments)}},{key:"createShortId",value:function e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:4;return s(function(){var n,r,s,a,c;return D(this,function(i){switch(i.label){case 0:i.trys.push([0,6,,7]);n=new Set;r=0;i.label=1;case 1:if(!(r<10))return[3,5];s=H(e,r+t);a=!n.has(s);if(!a)return[3,3];n.add(s);return[4,this.model.exists({shortId:s})];case 2:a=!i.sent();i.label=3;case 3:if(a)return[2,{success:!0,result:s}];i.label=4;case 4:r++;return[3,1];case 5:return[2,{success:!1,message:"Failed to create a unique shortId",code:M.INTERNAL_SERVER_ERROR.CODE}];case 6:c=i.sent();return[2,eT(c)];case 7:return[2]}})}).call(this)}},{key:"createSlugQuery",value:function e(e){var t=e.slug,n=e.field,r=e.isObject,s=e.filter;var a=p({},s!==null&&s!==void 0?s:{});return r?h(p({},a),{$or:[o({},"slug.".concat(n),t),{slugHistory:{$elemMatch:o({},"slug.".concat(n),t)}}]}):h(p({},a),{$or:[{slug:t},{slugHistory:t}]})}},{key:"createUniqueSlug",value:function e(e){return s(function(e){var t,n,r,s,a,c,i;return D(this,function(o){switch(o.label){case 0:t=e.slug,n=e.field,r=e.isObject,s=e.filter;a=K(t),c=a,i=1;o.label=1;case 1:return[4,this.model.exists(this.createSlugQuery({slug:c,field:n,isObject:r,filter:s}))];case 2:if(!o.sent())return[3,4];c="".concat(a,"-").concat(i++);o.label=3;case 3:return[3,1];case 4:return[2,c]}})}).apply(this,arguments)}},{key:"createSlug",value:function e(e){return s(function(e){var t,n,r,a,c,i,o,u,l,f;return D(this,function(E){switch(E.label){case 0:t=this;n=e.field,r=e.from,a=e.filter;E.label=1;case 1:E.trys.push([1,6,,7]);c=r[n];if(!F(c))return[3,3];o={success:!0};u=Object.fromEntries;return[4,Promise.all(Object.entries(c).map(function(e){var n=y(e,2),r=n[0],c=n[1];return s(function(){var e;return D(this,function(t){switch(t.label){case 0:return[4,this.createUniqueSlug({slug:c,field:r,isObject:!0,filter:a})];case 1:e=t.sent();return[2,[r,e]]}})}).call(t)}))];case 2:i=(o.result=u.apply(Object,[E.sent()]),o);return[3,5];case 3:l={success:!0};return[4,this.createUniqueSlug({slug:c,field:n,isObject:!1,filter:a})];case 4:i=(l.result=E.sent(),l);E.label=5;case 5:return[2,i];case 6:f=E.sent();return[2,eT(f)];case 7:return[2]}})}).apply(this,arguments)}},{key:"checkSlug",value:function e(e){return s(function(e){var t,n,r,s,a,c,i,o,u,l,f,E,d,p,m,h;return D(this,function(y){switch(y.label){case 0:t=e.slug,n=e.field,r=e.from,s=e.filter;y.label=1;case 1:y.trys.push([1,12,,13]);a=r[n];if(!F(a))return[3,10];c=true,i=false,o=undefined;y.label=2;case 2:y.trys.push([2,7,8,9]);u=Object.values(a)[Symbol.iterator]();y.label=3;case 3:if(!!(c=(l=u.next()).done))return[3,6];f=l.value;E=K(f);return[4,this.model.exists(this.createSlugQuery({slug:E,field:n,isObject:!0,filter:s}))];case 4:if(y.sent())return[2,{success:!0,result:!0}];y.label=5;case 5:c=true;return[3,3];case 6:return[3,9];case 7:d=y.sent();i=true;o=d;return[3,9];case 8:try{if(!c&&u.return!=null){u.return()}}finally{if(i){throw o}}return[7];case 9:return[2,{success:!0,result:!1}];case 10:p=K(t);m={success:!0};return[4,this.model.exists(this.createSlugQuery({slug:p,field:n,isObject:!1,filter:s}))];case 11:return[2,(m.result=y.sent()!==null,m)];case 12:h=y.sent();return[2,eT(h)];case 13:return[2]}})}).apply(this,arguments)}},{key:"aggregate",value:function e(e){return s(function(){var t,n;return D(this,function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);t={success:!0};return[4,this.model.aggregate(e)];case 1:return[2,(t.result=r.sent(),t)];case 2:n=r.sent();return[2,eT(n)];case 3:return[2]}})}).call(this)}}]);return e}();I(tq,"MongooseController");var tB=tq;export{tQ as MongoController,tB as MongooseController,_ as aggregatePaginate,tx as mongo,G as mongoosePaginate};
@@ -1 +0,0 @@
1
- "use strict";function e(e,t){if(t==null||t>e.length)t=e.length;for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function t(t){if(Array.isArray(t))return e(t)}function n(e,t,n,r,a,o,s){try{var i=e[o](s);var c=i.value}catch(e){n(e);return}if(i.done){t(c)}else{Promise.resolve(c).then(r,a)}}function r(e){return function(){var t=this,r=arguments;return new Promise(function(a,o){var s=e.apply(t,r);function i(e){n(s,a,o,i,c,"next",e)}function c(e){n(s,a,o,i,c,"throw",e)}i(undefined)})}}function a(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return!!t[Symbol.hasInstance](e)}else{return e instanceof t}}function o(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function s(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(e){return t(e)||o(e)||u(e)||s()}function c(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function u(t,n){if(!t)return;if(typeof t==="string")return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor)r=t.constructor.name;if(r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,n)}function l(e,t){var n,r,a,o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},s=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return s.next=i(0),s["throw"]=i(1),s["return"]=i(2),typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function i(e){return function(t){return c([e,t])}}function c(i){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,i[0]&&(o=0)),o)try{if(n=1,r&&(a=i[0]&2?r["return"]:i[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;if(r=0,a)i=[i[0]&2,a.value];switch(i[0]){case 0:case 1:a=i;break;case 4:o.label++;return{value:i[1],done:false};case 5:o.label++;r=i[1];i=[0];continue;case 7:i=o.ops.pop();o.trys.pop();continue;default:if(!(a=o.trys,a=a.length>0&&a[a.length-1])&&(i[0]===6||i[0]===2)){o=0;continue}if(i[0]===3&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(i[0]===6&&o.label<a[1]){o.label=a[1];a=i;break}if(a&&o.label<a[2]){o.label=a[2];o.ops.push(i);break}if(a[2])o.ops.pop();o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e];r=0}finally{n=a=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}}var E=Object.create;var d=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty;var m=function(e,t){return d(e,"name",{value:t,configurable:!0})};var O=function(e,t){for(var n in t)d(e,n,{get:t[n],enumerable:!0})},C=function(e,t,n,r){var a=true,o=false,s=undefined;if(t&&(typeof t==="undefined"?"undefined":c(t))=="object"||typeof t=="function")try{var i=function(){var a=l.value;!D.call(e,a)&&a!==n&&d(e,a,{get:function(){return t[a]},enumerable:!(r=f(t,a))||r.enumerable})};for(var u=p(t)[Symbol.iterator](),l;!(a=(l=u.next()).done);a=true)i()}catch(e){o=true;s=e}finally{try{if(!a&&u.return!=null){u.return()}}finally{if(o){throw s}}}return e};var v=function(e,t,n){return n=e!=null?E(S(e)):{},C(t||!e||!e.__esModule?d(n,"default",{value:e,enumerable:!0}):n,e)},y=function(e){return C(d({},"__esModule",{value:!0}),e)};var I={};O(I,{E_PackageType:function(){return N},getLatestPackageVersion:function(){return tl},getPackage:function(){return tE},installDependencies:function(){return tf},setupPackages:function(){return tp},updatePackage:function(){return td}});module.exports=y(I);var N=function(e){return e.DEPENDENCY="dependencies",e.DEV_DEPENDENCY="devDependencies",e.PEER_DEPENDENCY="peerDependencies",e.BUNDLE_DEPENDENCY="bundleDependencies",e.OPTIONAL_DEPENDENCY="optionalDependencies",e}({});var T=v(require("node-fetch"),1);var g=".cyberskill-storage";var h=v(require("@dotenvx/dotenvx"),1),A=require("envalid"),_=v(require("os"),1),R=v(require("path"),1),P=v(require("process"),1);var G=function(e){return e.PRODUCTION="production",e.STAGING="staging",e.DEVELOPMENT="development",e}({});var M=!1;function L(){P.default.env.NODE_ENV!==G.PRODUCTION&&!M&&(h.default.config(),M=!0)}m(L,"loadEnvFile");function b(){L();var e=(0,A.cleanEnv)(P.default.env,{CWD:(0,A.str)({default:P.default.cwd()}),DEBUG:(0,A.bool)({default:!1}),CYBERSKILL_STORAGE_DIRECTORY:(0,A.str)({default:R.default.join(_.default.homedir(),g)})});return{CWD:e.CWD,DEBUG:e.DEBUG,CYBERSKILL_STORAGE_DIRECTORY:e.CYBERSKILL_STORAGE_DIRECTORY}}m(b,"getEnv");var U=function(e){return e.CLI="CLI",e.STRING="STRING",e.FUNCTION="FUNCTION",e}({});var w=require("child_process"),k=v(require("process"),1),V=v(require("util"),1);var Y=function(e){return e.Error="error",e.Warning="warning",e}({});var F=v(require("chalk"),1),x=v(require("consola"),1),j=require("graphql");var q={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"}};var K=b();K.DEBUG||(x.default.level=4);function B(e){var t=F.default[e];return typeof t=="function"?t:F.default.green}m(B,"chalkKeyword");var Q={silent:x.default.silent,level:x.default.level,fatal:x.default.fatal,error:x.default.error,warn:x.default.warn,log:x.default.log,info:x.default.info,success:x.default.success,ready:x.default.ready,start:x.default.start,box:x.default.box,debug:x.default.debug,trace:x.default.trace,verbose:x.default.verbose,printBoxedLog:function e(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"red";if(!(t===null||t===void 0?void 0:t.length)){x.default.box(F.default.green(e));return}t.forEach(function(e){var t=e.file,r=e.position,a=e.rule,o=e.message;x.default.log("".concat(F.default.gray("File:")," ").concat(F.default.blue("".concat(t).concat(r?":".concat(r):"")))),a&&x.default.log(" ".concat(B(n)("Rule:")," ").concat(a)),x.default.log(" ".concat(B(n)("Message:")," ").concat(o))}),x.default.box(B(n)("".concat(e," : ").concat(t.length))),x.default.log(F.default.gray("─".repeat(40)))}};function H(e,t){var n=t!==null&&t!==void 0?t:{},r=n.shouldLog,o=r===void 0?!0:r,s=n.returnValue,i=n.callback,c=a(e,Error)?e:new Error(typeof e=="string"?e:"Unknown error");return o&&Q.error(c.message),i&&typeof i=="function"&&i(c),s||{success:!1,message:c.message,code:q.INTERNAL_SERVER_ERROR.CODE}}m(H,"catchError");var W=v(require("fs-extra"),1);var J=v(require("path"),1);var $=b(),X=J.default,z=X.dirname;function Z(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r;return(r=X).resolve.apply(r,[$.CWD].concat(i(t)))}m(Z,"resolveWorkingPath");function ee(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r;return(r=X).join.apply(r,i(t))}m(ee,"join");var et=b(),en=et.CWD,er="@cyberskill/shared",ea="node_modules",eo="dist",es="public",ei="package.json",ec="package-lock.json",eu="tsconfig.json",el=".gitignore",eE=".simple-git-hooks.json",ed="pnpm-lock.yaml",ef=".git/hooks/",ep=".git/COMMIT_EDITMSG",eS=".migrate-mongo.config.js",eD=function(){var e=W.default.readJsonSync(Z(ei)).name===er?en:ee(en,ea,er);return ee(e,eo)}(),em="cyberskill",eO="src/node/cli/index.ts",eC="eslint",ev="eslint",ey="vitest";var eI="vitest",eN="@commitlint/cli",eT="@commitlint/config-conventional",eg="commitlint",eh="lint-staged",eA="lint-staged",e_="typescript",eR="tsc",eP="tsx",eG="git",eM="pnpm",eL="pnpm exec",eb="simple-git-hooks",eU="simple-git-hooks",ew="@eslint/config-inspector",ek="eslint-config-inspector",eV="node-modules-inspector",eY="node-modules-inspector",eF="migrate-mongo",ex="./node_modules/migrate-mongo/bin/migrate-mongo",ej={CYBERSKILL_DIRECTORY:eD,WORKING_DIRECTORY:en,PUBLIC_DIRECTORY:Z(es),TS_CONFIG:Z(eu),GIT_IGNORE:Z(el),GIT_HOOK:Z(ef),GIT_COMMIT_MSG:Z(ep),SIMPLE_GIT_HOOKS_JSON:Z(eE),PACKAGE_JSON:Z(ei),PACKAGE_LOCK_JSON:Z(ec),PNPM_LOCK_YAML:Z(ed),NODE_MODULES:Z(ea),MIGRATE_MONGO_CONFIG:Z(eS),LINT_STAGED_CONFIG:Z("".concat(eD,"/config/lint-staged/index.js")),COMMITLINT_CONFIG:Z("".concat(eD,"/config/commitlint/index.js")),VITEST_UNIT_CONFIG:Z("".concat(eD,"/config/vitest/vitest.unit.js")),VITEST_UNIT_SETUP_CONFIG:Z("".concat(eD,"/config/vitest/vitest.unit.setup.js")),VITEST_E2E_CONFIG:Z("".concat(eD,"/config/vitest/vitest.e2e.js"))};function eq(e){var t=e.type,n=e.packages,a=e.command;var o=n===null||n===void 0?void 0:n.reduce(function(e,t){return e.some(function(e){return e.name===t.name})||e.push(t),e},[]);return function(){return r(function(){var e;return l(this,function(n){switch(n.label){case 0:switch(t){case U.CLI:return[3,1];case U.STRING:return[3,4]}return[3,5];case 1:e=o===null||o===void 0?void 0:o.length;if(!e)return[3,3];return[4,tp(o,{install:!0})];case 2:e=n.sent();n.label=3;case 3:return[2,(e,e3(e2("".concat(eL," ").concat(a))))];case 4:return[2,e3(e2(a))];case 5:throw new Error("Unsupported command type");case 6:return[2]}})})()}}m(eq,"buildCommand");var eK={simpleGitHooks:eq({type:U.CLI,packages:[{name:eb,type:N.DEV_DEPENDENCY}],command:eU}),eslintInspect:eq({type:U.CLI,packages:[{name:ew,type:N.DEV_DEPENDENCY}],command:ek}),nodeModulesInspect:eq({type:U.CLI,packages:[{name:eV,type:N.DEV_DEPENDENCY}],command:eY}),eslintCheck:eq({type:U.CLI,packages:[{name:eC,type:N.DEV_DEPENDENCY}],command:"".concat(ev," ").concat(ej.WORKING_DIRECTORY," --no-cache")}),eslintFix:eq({type:U.CLI,packages:[{name:eC,type:N.DEV_DEPENDENCY}],command:"".concat(ev," ").concat(ej.WORKING_DIRECTORY," --fix --no-cache")}),typescriptCheck:eq({type:U.CLI,packages:[{name:e_,type:N.DEV_DEPENDENCY}],command:"".concat(eR," -p ").concat(ej.TS_CONFIG," --noEmit")}),testUnit:eq({type:U.CLI,packages:[{name:ey,type:N.DEV_DEPENDENCY}],command:"".concat(eI," --config ").concat(ej.VITEST_UNIT_CONFIG)}),testE2e:eq({type:U.CLI,packages:[{name:ey,type:N.DEV_DEPENDENCY}],command:"".concat(eI," --config ").concat(ej.VITEST_E2E_CONFIG)}),mongoMigrateCreate:m(function(e){return eq({type:U.CLI,packages:[{name:eP,type:N.DEPENDENCY},{name:eF,type:N.DEPENDENCY}],command:"".concat(eP," ").concat(ex," create ").concat(e," -f ").concat(ej.MIGRATE_MONGO_CONFIG)})()},"mongoMigrateCreate"),mongoMigrateUp:eq({type:U.CLI,packages:[{name:eP,type:N.DEPENDENCY},{name:eF,type:N.DEPENDENCY}],command:"".concat(eP," ").concat(ex," up -f ").concat(ej.MIGRATE_MONGO_CONFIG)}),mongoMigrateDown:eq({type:U.CLI,packages:[{name:eP,type:N.DEPENDENCY},{name:eF,type:N.DEPENDENCY}],command:"".concat(eP," ").concat(ex," down -f ").concat(ej.MIGRATE_MONGO_CONFIG)}),commitLint:eq({type:U.CLI,packages:[{name:eN,type:N.DEV_DEPENDENCY},{name:eT,type:N.DEV_DEPENDENCY}],command:"".concat(eg," --edit ").concat(ej.GIT_COMMIT_MSG," --config ").concat(ej.COMMITLINT_CONFIG)}),lintStaged:eq({type:U.CLI,packages:[{name:eh,type:N.DEV_DEPENDENCY}],command:"".concat(eA," --config ").concat(ej.LINT_STAGED_CONFIG)}),configureGitHook:eq({type:U.STRING,command:"".concat(eG," config core.hooksPath ").concat(ej.GIT_HOOK)}),build:eq({type:U.STRING,command:"".concat(eM," run --if-present build")}),pnpmInstallStandard:eq({type:U.STRING,command:"".concat(eM," install --ignore-scripts")}),pnpmInstallLegacy:eq({type:U.STRING,command:"".concat(eM," install --ignore-scripts --legacy-peer-deps")}),pnpmInstallForce:eq({type:U.STRING,command:"".concat(eM," install --ignore-scripts --force")}),pnpmPruneStore:eq({type:U.STRING,command:"".concat(eM," store prune")}),pnpmCleanCache:eq({type:U.STRING,command:"".concat(eM," cache delete")})};var eB=v(require("node-persist"),1);var eQ=b();function eH(){return r(function(){var e;return l(this,function(t){switch(t.label){case 0:e=eB.default.defaultInstance;if(e)return[3,2];return[4,eB.default.init({dir:eQ.CYBERSKILL_STORAGE_DIRECTORY})];case 1:e=t.sent();t.label=2;case 2:e;return[2]}})})()}m(eH,"initNodePersist");var eW={get:function e(e){return r(function(){var t,n;return l(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,eH()];case 1:r.sent();return[4,eB.default.getItem(e)];case 2:return[2,(t=r.sent())!==null&&t!==void 0?t:null];case 3:n=r.sent();return[2,H(n,{returnValue:null})];case 4:return[2]}})})()},set:function e(e,t){return r(function(){var n;return l(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,eH()];case 1:r.sent();return[4,eB.default.setItem(e,t)];case 2:r.sent();return[3,4];case 3:n=r.sent();H(n);return[3,4];case 4:return[2]}})})()},remove:function e(e){return r(function(){var t;return l(this,function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,eH()];case 1:n.sent();return[4,eB.default.removeItem(e)];case 2:n.sent();return[3,4];case 3:t=n.sent();H(t);return[3,4];case 4:return[2]}})})()},keys:function e(){return r(function(){var e,t;return l(this,function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,eH()];case 1:n.sent();return[4,eB.default.keys()];case 2:e=n.sent();return[2,Array.isArray(e)?e:(Q.warn("[Storage:keys] Invalid keys response:",e),[])];case 3:t=n.sent();return[2,H(t,{returnValue:[]})];case 4:return[2]}})})()},getLogLink:function e(e){return r(function(){return l(this,function(t){try{return[2,"".concat(eQ.CYBERSKILL_STORAGE_DIRECTORY," (key: ").concat(e,")")]}catch(e){return[2,H(e,{returnValue:null})]}return[2]})})()}};var eJ=b(),e$=V.promisify(w.exec);function eX(){return r(function(){var e;return l(this,function(t){switch(t.label){case 0:return[4,tE()];case 1:e=t.sent();return[2,e.success?e.result.name:Date.now().toString()]}})})()}m(eX,"getPackageName");function ez(e){return r(function(){var t,n;return l(this,function(a){switch(a.label){case 0:if(e.length===0)return[2];return[4,eX()];case 1:t=a.sent();a.label=2;case 2:a.trys.push([2,4,,5]);return[4,eW.set(t,e)];case 3:a.sent(),setTimeout(function(){return r(function(){var e;return l(this,function(n){switch(n.label){case 0:return[4,eW.getLogLink(t)];case 1:e=n.sent();e&&Q.info("\uD83D\uDCC2 Open the error list manually: ".concat(e));return[2]}})})()},0);return[3,5];case 4:n=a.sent();H(n);return[3,5];case 5:return[2]}})})()}m(ez,"saveErrorListToStorage");function eZ(e){var t=[],n=[],r="",a=/^\s*(\d+):(\d+)\s+(error|warning)\s+(.+?)\s+(\S+)$/,o=/^(.+?)\((\d+),(\d+)\):\s+(error|warning)\s+TS\d+:\s+(\S.+)$/,s=/^✖\s+(.*?)\s+\[(.*?)\]$/;e.split("\n").forEach(function(e){if(e.startsWith("/"))r=e.trim();else{var i,c,u,l,E;var d=a.exec(e)||[],f=o.exec(e)||[],p=s.exec(e)||[];var S,D,m,O,C,v;d.length&&r?t.push({file:r,position:"".concat(d[1],":").concat(d[2]),type:d[3]===Y.Error?Y.Error:Y.Warning,message:(S=d===null||d===void 0?void 0:(i=d[4])===null||i===void 0?void 0:i.trim())!==null&&S!==void 0?S:"",rule:(D=d===null||d===void 0?void 0:(c=d[5])===null||c===void 0?void 0:c.trim())!==null&&D!==void 0?D:""}):f.length?t.push({file:(m=f===null||f===void 0?void 0:f[1])!==null&&m!==void 0?m:"",position:"".concat(f[2],":").concat(f[3]),type:f[4]===Y.Error?Y.Error:Y.Warning,message:(O=f===null||f===void 0?void 0:(u=f[5])===null||u===void 0?void 0:u.trim())!==null&&O!==void 0?O:""}):p.length?t.push({file:"commitlint",type:Y.Error,message:(C=p===null||p===void 0?void 0:(l=p[1])===null||l===void 0?void 0:l.trim())!==null&&C!==void 0?C:"",rule:(v=p===null||p===void 0?void 0:(E=p[2])===null||E===void 0?void 0:E.trim())!==null&&v!==void 0?v:""}):n.push(e.trim())}}),t.length&&ez(t),eJ.DEBUG&&n.length&&(Q.warn("Unmatched lines:"),n.forEach(function(e){return Q.info(" ".concat(e))}))}m(eZ,"parseTextErrors");function e0(e){try{var t=JSON.parse(e),n=[];t.forEach(function(e){var t=e.filePath,r=e.messages;r.forEach(function(e){var r=e.severity,a=e.line,o=e.column,s=e.ruleId,i=e.message;n.push({type:r===2?Y.Error:Y.Warning,file:t,position:"".concat(a,":").concat(o),rule:s,message:i})})}),n.length&&ez(n)}catch(t){eZ(e)}}m(e0,"parseCommandOutput");function e1(e){return r(function(e){var t,n,r,a,o,s,i,c,u;var E=arguments;return l(this,function(l){switch(l.label){case 0:t=E.length>1&&E[1]!==void 0?E[1]:e0;n=new AbortController;k.default.on("SIGINT",function(){Q.warn("Process interrupted. Terminating..."),n.abort(),k.default.exit()});l.label=1;case 1:l.trys.push([1,4,,5]);if(!(typeof e=="string"))return[3,3];return[4,e$(e,{maxBuffer:0x6400000,signal:n.signal})];case 2:r=l.sent(),a=r.stdout,o=r.stderr;[a,o].forEach(function(e){return e&&t(e)});l.label=3;case 3:return[3,5];case 4:s=l.sent();i=s.stdout,c=s.stderr,u=s.message;[i,c].forEach(function(e){return e&&t(e)}),!c&&!i&&Q.error("Command failed: ".concat(u));return[3,5];case 5:return[2]}})}).apply(this,arguments)}m(e1,"executeCommand");function e2(e){return{raw:!0,cmd:e}}m(e2,"rawCommand");function e4(e,t){return(t===null||t===void 0?void 0:t.isCurrentProject)?"".concat(eL," ").concat(eP," ").concat(eO," ").concat(e):"".concat(eL," ").concat(em," ").concat(e)}m(e4,"formatCLI");function e3(e,t){return typeof e=="function"?e4(e(t),t):(typeof e==="undefined"?"undefined":c(e))=="object"&&(e===null||e===void 0?void 0:e.raw)===!0?e.cmd:typeof e=="string"?e4(e,t):e}m(e3,"formatCommand");function e5(e,t){return r(function(){var n;return l(this,function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);Q.start("".concat(e)),eJ.DEBUG&&Q.info("→ ".concat(t));return[4,e1(t)];case 1:r.sent(),Q.success("".concat(e," done."));return[3,3];case 2:n=r.sent();H(n);return[3,3];case 3:return[2]}})})()}m(e5,"runCommand");var e6=v(require("fs-extra"),1),e7=v(require("path"),1);var e8=e6.default,e9=e8.lstatSync,te=e8.readdirSync,tt=e8.mkdirSync,tn=e8.readFileSync,tr=e8.unlinkSync,ta=e8.statSync,to=e8.createWriteStream,ts=e6.default.readJsonSync;function ti(e,t,n){e6.default.writeFileSync(e,t,n!==null&&n!==void 0?n:"utf-8")}m(ti,"writeFileSync");function tc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}return t.every(function(e){return e6.default.pathExistsSync(e)})}m(tc,"pathExistsSync");var tu=b();function tl(e){return r(function(){var t,n,r,a;return l(this,function(o){switch(o.label){case 0:o.trys.push([0,3,,4]);return[4,(0,T.default)("https://registry.npmjs.org/".concat(e,"/latest"))];case 1:t=o.sent();if(!t.ok)throw new Error("Failed to fetch latest version: ".concat(t.status," ").concat(t.statusText));return[4,t.json()];case 2:n=o.sent(),r=n.version;return[2,{success:!0,result:r}];case 3:a=o.sent();return[2,H(a)];case 4:return[2]}})})()}m(tl,"getLatestPackageVersion");function tE(e){return r(function(){var t,n,r,a,o,s,i,c,u,E,d,f,p,S,D,m,O,C,v,y,I,T,g,h;return l(this,function(l){switch(l.label){case 0:l.trys.push([0,2,,3]);if(!e){if(tc(ej.PACKAGE_JSON)){t=ts(ej.PACKAGE_JSON),n=t.name,r=n===void 0?"":n,a=t.version,o=a===void 0?"":a;return[2,{success:!0,result:{name:r,currentVersion:o,latestVersion:o,isCurrentProject:!0,isInstalled:!0,isUpToDate:!0,isDependency:!1,isDevDependency:!1,installedPath:ej.PACKAGE_JSON,file:t}}]}return[2,{success:!0,result:{name:"",currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:!1,isDevDependency:!1,installedPath:"",file:{}}}]}if(!tc(ej.PACKAGE_JSON))return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:e.type===N.DEPENDENCY,isDevDependency:e.type===N.DEV_DEPENDENCY,installedPath:"",file:{}}}];s=ts(ej.PACKAGE_JSON),i=s.name,c=s.version,u=c===void 0?"":c,E=s.dependencies,d=E===void 0?{}:E,f=s.devDependencies,p=f===void 0?{}:f;if(e.name===i)return[2,{success:!0,result:{name:i,currentVersion:u,latestVersion:u,isCurrentProject:!0,isInstalled:!0,isUpToDate:!0,isDependency:e.type===N.DEPENDENCY,isDevDependency:e.type===N.DEV_DEPENDENCY,installedPath:ej.PACKAGE_JSON,file:s}}];S=e.name in d,D=e.name in p;return[4,tl(e.name)];case 1:m=l.sent();if(!m.success)return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:S,isDevDependency:D,installedPath:"",file:{}}}];if(!S&&!D)return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:m.result,isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:e.type===N.DEPENDENCY,isDevDependency:e.type===N.DEV_DEPENDENCY,installedPath:"",file:{}}}];v=(C=(O=d[e.name])!==null&&O!==void 0?O:p[e.name])!==null&&C!==void 0?C:"",y=ee(tu.CWD,ea,e.name,ei);if(!tc(y))return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:m.result,isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:S,isDevDependency:D,installedPath:"",file:{}}}];I=ts(y),T=I.version,g=T===void 0?"":T;return[2,v!==g?{success:!0,result:{name:e.name,currentVersion:g||v,latestVersion:m.result,isCurrentProject:!1,isInstalled:!0,isUpToDate:!1,isDependency:S,isDevDependency:D,installedPath:y,file:I}}:{success:!0,result:{name:e.name,currentVersion:v,latestVersion:m.result,isCurrentProject:!1,isInstalled:!0,isUpToDate:v===m.result,isDependency:S,isDevDependency:D,installedPath:y,file:I}}];case 2:h=l.sent();return[2,H(h)];case 3:return[2]}})})()}m(tE,"getPackage");function td(e){return r(function(){var t,n,r,a,o;return l(this,function(s){try{;r=ts(ej.PACKAGE_JSON),a=(t=r.dependencies)!==null&&t!==void 0?t:{},o=(n=r.devDependencies)!==null&&n!==void 0?n:{};e.isDependency?a[e.name]=e.latestVersion:e.isDevDependency&&(o[e.name]=e.latestVersion),ti(ej.PACKAGE_JSON,JSON.stringify(r,null,4)),Q.info('Updated "'.concat(e.name,'" to version ').concat(e.latestVersion))}catch(e){H(e)}return[2]})})()}m(td,"updatePackage");function tf(){return r(function(){var e,t,n,r,a,o,s,i,c,u,E,d,f;return l(this,function(l){switch(l.label){case 0:l.trys.push([0,12,,13]);e=[{command:m(function(){return eK.pnpmInstallStandard()},"command"),message:"Installing dependencies (standard)"},{command:m(function(){return eK.pnpmInstallLegacy()},"command"),message:"Retrying with legacy peer dependencies"},{command:m(function(){return eK.pnpmInstallForce()},"command"),message:"Retrying with force install"}];t=true,n=false,r=undefined;l.label=1;case 1:l.trys.push([1,9,10,11]);a=e[Symbol.iterator]();l.label=2;case 2:if(!!(t=(o=a.next()).done))return[3,8];s=o.value,i=s.command,c=s.message;l.label=3;case 3:l.trys.push([3,6,,7]);return[4,i()];case 4:u=l.sent();return[4,e5("".concat(c," using: ").concat(u),u)];case 5:l.sent();return[2];case 6:E=l.sent();H(E);return[3,7];case 7:t=true;return[3,2];case 8:return[3,11];case 9:d=l.sent();n=true;r=d;return[3,11];case 10:try{if(!t&&a.return!=null){a.return()}}finally{if(n){throw r}}return[7];case 11:return[3,13];case 12:f=l.sent();H(f);return[3,13];case 13:return[2]}})})()}m(tf,"installDependencies");function tp(e,t){return r(function(){var n,r,a,o,s,c,u,E,d,f,p,S,D,m,O,C,v;return l(this,function(l){switch(l.label){case 0:l.trys.push([0,15,,16]);if(!tc(ej.PACKAGE_JSON)){Q.error("package.json not found. Aborting setup.");return[2]}return[4,Promise.all(e.map(tE))];case 1:a=l.sent().filter(function(e){return e.success&&!!e.result&&!e.result.isCurrentProject}).map(function(e){return e.result}),o=a.filter(function(e){return!e.isInstalled}),s=a.filter(function(e){return!e.isUpToDate}),c=[];(t===null||t===void 0?void 0:t.install)&&o.length>0&&(n=c).push.apply(n,i(o.map(td))),(t===null||t===void 0?void 0:t.update)&&s.length>0&&(r=c).push.apply(r,i(s.map(td)));u=c.length>0;if(!u)return[3,6];return[4,Promise.all(c)];case 2:l.sent();return[4,tf()];case 3:l.sent();E=["Running ESLint with auto-fix"];return[4,eK.eslintFix()];case 4:return[4,e5.apply(void 0,E.concat([l.sent()]))];case 5:u=l.sent();l.label=6;case 6:u;f=true,p=false,S=undefined;l.label=7;case 7:l.trys.push([7,12,13,14]);D=((d=t===null||t===void 0?void 0:t.callbacks)!==null&&d!==void 0?d:[])[Symbol.iterator]();l.label=8;case 8:if(!!(f=(m=D.next()).done))return[3,11];O=m.value;return[4,O()];case 9:l.sent();l.label=10;case 10:f=true;return[3,8];case 11:return[3,14];case 12:C=l.sent();p=true;S=C;return[3,14];case 13:try{if(!f&&D.return!=null){D.return()}}finally{if(p){throw S}}return[7];case 14:return[3,16];case 15:v=l.sent();H(v);return[3,16];case 16:return[2]}})})()}m(tp,"setupPackages");0&&(module.exports={E_PackageType:E_PackageType,getLatestPackageVersion:getLatestPackageVersion,getPackage:getPackage,installDependencies:installDependencies,setupPackages:setupPackages,updatePackage:updatePackage});
@@ -1,9 +0,0 @@
1
- export { T_PackageJson_alias_1 as T_PackageJson } from '../../_tsup-dts-rollup.cjs';
2
- export { I_PackageInfo_alias_1 as I_PackageInfo } from '../../_tsup-dts-rollup.cjs';
3
- export { E_PackageType_alias_1 as E_PackageType } from '../../_tsup-dts-rollup.cjs';
4
- export { I_PackageInput_alias_1 as I_PackageInput } from '../../_tsup-dts-rollup.cjs';
5
- export { getLatestPackageVersion_alias_1 as getLatestPackageVersion } from '../../_tsup-dts-rollup.cjs';
6
- export { getPackage_alias_1 as getPackage } from '../../_tsup-dts-rollup.cjs';
7
- export { updatePackage_alias_1 as updatePackage } from '../../_tsup-dts-rollup.cjs';
8
- export { installDependencies_alias_1 as installDependencies } from '../../_tsup-dts-rollup.cjs';
9
- export { setupPackages_alias_1 as setupPackages } from '../../_tsup-dts-rollup.cjs';
@@ -1,9 +0,0 @@
1
- export { T_PackageJson_alias_1 as T_PackageJson } from '../../_tsup-dts-rollup.js';
2
- export { I_PackageInfo_alias_1 as I_PackageInfo } from '../../_tsup-dts-rollup.js';
3
- export { E_PackageType_alias_1 as E_PackageType } from '../../_tsup-dts-rollup.js';
4
- export { I_PackageInput_alias_1 as I_PackageInput } from '../../_tsup-dts-rollup.js';
5
- export { getLatestPackageVersion_alias_1 as getLatestPackageVersion } from '../../_tsup-dts-rollup.js';
6
- export { getPackage_alias_1 as getPackage } from '../../_tsup-dts-rollup.js';
7
- export { updatePackage_alias_1 as updatePackage } from '../../_tsup-dts-rollup.js';
8
- export { installDependencies_alias_1 as installDependencies } from '../../_tsup-dts-rollup.js';
9
- export { setupPackages_alias_1 as setupPackages } from '../../_tsup-dts-rollup.js';
@@ -1 +0,0 @@
1
- function e(e,n){if(n==null||n>e.length)n=e.length;for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function n(n){if(Array.isArray(n))return e(n)}function t(e,n,t,r,a,o,s){try{var i=e[o](s);var c=i.value}catch(e){t(e);return}if(i.done){n(c)}else{Promise.resolve(c).then(r,a)}}function r(e){return function(){var n=this,r=arguments;return new Promise(function(a,o){var s=e.apply(n,r);function i(e){t(s,a,o,i,c,"next",e)}function c(e){t(s,a,o,i,c,"throw",e)}i(undefined)})}}function a(e,n){if(n!=null&&typeof Symbol!=="undefined"&&n[Symbol.hasInstance]){return!!n[Symbol.hasInstance](e)}else{return e instanceof n}}function o(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function s(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(e){return n(e)||o(e)||u(e)||s()}function c(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function u(n,t){if(!n)return;if(typeof n==="string")return e(n,t);var r=Object.prototype.toString.call(n).slice(8,-1);if(r==="Object"&&n.constructor)r=n.constructor.name;if(r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(n,t)}function E(e,n){var t,r,a,o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},s=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return s.next=i(0),s["throw"]=i(1),s["return"]=i(2),typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function i(e){return function(n){return c([e,n])}}function c(i){if(t)throw new TypeError("Generator is already executing.");while(s&&(s=0,i[0]&&(o=0)),o)try{if(t=1,r&&(a=i[0]&2?r["return"]:i[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;if(r=0,a)i=[i[0]&2,a.value];switch(i[0]){case 0:case 1:a=i;break;case 4:o.label++;return{value:i[1],done:false};case 5:o.label++;r=i[1];i=[0];continue;case 7:i=o.ops.pop();o.trys.pop();continue;default:if(!(a=o.trys,a=a.length>0&&a[a.length-1])&&(i[0]===6||i[0]===2)){o=0;continue}if(i[0]===3&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(i[0]===6&&o.label<a[1]){o.label=a[1];a=i;break}if(a&&o.label<a[2]){o.label=a[2];o.ops.push(i);break}if(a[2])o.ops.pop();o.trys.pop();continue}i=n.call(e,o)}catch(e){i=[6,e];r=0}finally{t=a=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}}var l=Object.defineProperty;var d=function(e,n){return l(e,"name",{value:n,configurable:!0})};var p=function(e){return e.DEPENDENCY="dependencies",e.DEV_DEPENDENCY="devDependencies",e.PEER_DEPENDENCY="peerDependencies",e.BUNDLE_DEPENDENCY="bundleDependencies",e.OPTIONAL_DEPENDENCY="optionalDependencies",e}({});import f from"node-fetch";var m=".cyberskill-storage";import S from"@dotenvx/dotenvx";import{bool as D,cleanEnv as O,str as C}from"envalid";import I from"os";import N from"path";import T from"process";var y=function(e){return e.PRODUCTION="production",e.STAGING="staging",e.DEVELOPMENT="development",e}({});var v=!1;function h(){T.env.NODE_ENV!==y.PRODUCTION&&!v&&(S.config(),v=!0)}d(h,"loadEnvFile");function A(){h();var e=O(T.env,{CWD:C({default:T.cwd()}),DEBUG:D({default:!1}),CYBERSKILL_STORAGE_DIRECTORY:C({default:N.join(I.homedir(),m)})});return{CWD:e.CWD,DEBUG:e.DEBUG,CYBERSKILL_STORAGE_DIRECTORY:e.CYBERSKILL_STORAGE_DIRECTORY}}d(A,"getEnv");var g=function(e){return e.CLI="CLI",e.STRING="STRING",e.FUNCTION="FUNCTION",e}({});import{exec as _}from"child_process";import R from"process";import*as G from"util";var P=function(e){return e.Error="error",e.Warning="warning",e}({});import M from"chalk";import L from"consola";import{GraphQLError as b}from"graphql";var U={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"}};var w=A();w.DEBUG||(L.level=4);function k(e){var n=M[e];return typeof n=="function"?n:M.green}d(k,"chalkKeyword");var V={silent:L.silent,level:L.level,fatal:L.fatal,error:L.error,warn:L.warn,log:L.log,info:L.info,success:L.success,ready:L.ready,start:L.start,box:L.box,debug:L.debug,trace:L.trace,verbose:L.verbose,printBoxedLog:function e(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"red";if(!(n===null||n===void 0?void 0:n.length)){L.box(M.green(e));return}n.forEach(function(e){var n=e.file,r=e.position,a=e.rule,o=e.message;L.log("".concat(M.gray("File:")," ").concat(M.blue("".concat(n).concat(r?":".concat(r):"")))),a&&L.log(" ".concat(k(t)("Rule:")," ").concat(a)),L.log(" ".concat(k(t)("Message:")," ").concat(o))}),L.box(k(t)("".concat(e," : ").concat(n.length))),L.log(M.gray("─".repeat(40)))}};function Y(e,n){var t=n!==null&&n!==void 0?n:{},r=t.shouldLog,o=r===void 0?!0:r,s=t.returnValue,i=t.callback,c=a(e,Error)?e:new Error(typeof e=="string"?e:"Unknown error");return o&&V.error(c.message),i&&typeof i=="function"&&i(c),s||{success:!1,message:c.message,code:U.INTERNAL_SERVER_ERROR.CODE}}d(Y,"catchError");import F from"fs-extra";import x from"path";var j=A(),K=x,B=K.dirname;function Q(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}var r;return(r=K).resolve.apply(r,[j.CWD].concat(i(n)))}d(Q,"resolveWorkingPath");function H(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}var r;return(r=K).join.apply(r,i(n))}d(H,"join");var q=A(),W=q.CWD,J="@cyberskill/shared",$="node_modules",X="dist",z="public",Z="package.json",ee="package-lock.json",en="tsconfig.json",et=".gitignore",er=".simple-git-hooks.json",ea="pnpm-lock.yaml",eo=".git/hooks/",es=".git/COMMIT_EDITMSG",ei=".migrate-mongo.config.js",ec=function(){var e=F.readJsonSync(Q(Z)).name===J?W:H(W,$,J);return H(e,X)}(),eu="cyberskill",eE="src/node/cli/index.ts",el="eslint",ed="eslint",ep="vitest";var ef="vitest",em="@commitlint/cli",eS="@commitlint/config-conventional",eD="commitlint",eO="lint-staged",eC="lint-staged",eI="typescript",eN="tsc",eT="tsx",ey="git",ev="pnpm",eh="pnpm exec",eA="simple-git-hooks",eg="simple-git-hooks",e_="@eslint/config-inspector",eR="eslint-config-inspector",eG="node-modules-inspector",eP="node-modules-inspector",eM="migrate-mongo",eL="./node_modules/migrate-mongo/bin/migrate-mongo",eb={CYBERSKILL_DIRECTORY:ec,WORKING_DIRECTORY:W,PUBLIC_DIRECTORY:Q(z),TS_CONFIG:Q(en),GIT_IGNORE:Q(et),GIT_HOOK:Q(eo),GIT_COMMIT_MSG:Q(es),SIMPLE_GIT_HOOKS_JSON:Q(er),PACKAGE_JSON:Q(Z),PACKAGE_LOCK_JSON:Q(ee),PNPM_LOCK_YAML:Q(ea),NODE_MODULES:Q($),MIGRATE_MONGO_CONFIG:Q(ei),LINT_STAGED_CONFIG:Q("".concat(ec,"/config/lint-staged/index.js")),COMMITLINT_CONFIG:Q("".concat(ec,"/config/commitlint/index.js")),VITEST_UNIT_CONFIG:Q("".concat(ec,"/config/vitest/vitest.unit.js")),VITEST_UNIT_SETUP_CONFIG:Q("".concat(ec,"/config/vitest/vitest.unit.setup.js")),VITEST_E2E_CONFIG:Q("".concat(ec,"/config/vitest/vitest.e2e.js"))};function eU(e){var n=e.type,t=e.packages,a=e.command;var o=t===null||t===void 0?void 0:t.reduce(function(e,n){return e.some(function(e){return e.name===n.name})||e.push(n),e},[]);return function(){return r(function(){var e;return E(this,function(t){switch(t.label){case 0:switch(n){case g.CLI:return[3,1];case g.STRING:return[3,4]}return[3,5];case 1:e=o===null||o===void 0?void 0:o.length;if(!e)return[3,3];return[4,no(o,{install:!0})];case 2:e=t.sent();t.label=3;case 3:return[2,(e,e$(eW("".concat(eh," ").concat(a))))];case 4:return[2,e$(eW(a))];case 5:throw new Error("Unsupported command type");case 6:return[2]}})})()}}d(eU,"buildCommand");var ew={simpleGitHooks:eU({type:g.CLI,packages:[{name:eA,type:p.DEV_DEPENDENCY}],command:eg}),eslintInspect:eU({type:g.CLI,packages:[{name:e_,type:p.DEV_DEPENDENCY}],command:eR}),nodeModulesInspect:eU({type:g.CLI,packages:[{name:eG,type:p.DEV_DEPENDENCY}],command:eP}),eslintCheck:eU({type:g.CLI,packages:[{name:el,type:p.DEV_DEPENDENCY}],command:"".concat(ed," ").concat(eb.WORKING_DIRECTORY," --no-cache")}),eslintFix:eU({type:g.CLI,packages:[{name:el,type:p.DEV_DEPENDENCY}],command:"".concat(ed," ").concat(eb.WORKING_DIRECTORY," --fix --no-cache")}),typescriptCheck:eU({type:g.CLI,packages:[{name:eI,type:p.DEV_DEPENDENCY}],command:"".concat(eN," -p ").concat(eb.TS_CONFIG," --noEmit")}),testUnit:eU({type:g.CLI,packages:[{name:ep,type:p.DEV_DEPENDENCY}],command:"".concat(ef," --config ").concat(eb.VITEST_UNIT_CONFIG)}),testE2e:eU({type:g.CLI,packages:[{name:ep,type:p.DEV_DEPENDENCY}],command:"".concat(ef," --config ").concat(eb.VITEST_E2E_CONFIG)}),mongoMigrateCreate:d(function(e){return eU({type:g.CLI,packages:[{name:eT,type:p.DEPENDENCY},{name:eM,type:p.DEPENDENCY}],command:"".concat(eT," ").concat(eL," create ").concat(e," -f ").concat(eb.MIGRATE_MONGO_CONFIG)})()},"mongoMigrateCreate"),mongoMigrateUp:eU({type:g.CLI,packages:[{name:eT,type:p.DEPENDENCY},{name:eM,type:p.DEPENDENCY}],command:"".concat(eT," ").concat(eL," up -f ").concat(eb.MIGRATE_MONGO_CONFIG)}),mongoMigrateDown:eU({type:g.CLI,packages:[{name:eT,type:p.DEPENDENCY},{name:eM,type:p.DEPENDENCY}],command:"".concat(eT," ").concat(eL," down -f ").concat(eb.MIGRATE_MONGO_CONFIG)}),commitLint:eU({type:g.CLI,packages:[{name:em,type:p.DEV_DEPENDENCY},{name:eS,type:p.DEV_DEPENDENCY}],command:"".concat(eD," --edit ").concat(eb.GIT_COMMIT_MSG," --config ").concat(eb.COMMITLINT_CONFIG)}),lintStaged:eU({type:g.CLI,packages:[{name:eO,type:p.DEV_DEPENDENCY}],command:"".concat(eC," --config ").concat(eb.LINT_STAGED_CONFIG)}),configureGitHook:eU({type:g.STRING,command:"".concat(ey," config core.hooksPath ").concat(eb.GIT_HOOK)}),build:eU({type:g.STRING,command:"".concat(ev," run --if-present build")}),pnpmInstallStandard:eU({type:g.STRING,command:"".concat(ev," install --ignore-scripts")}),pnpmInstallLegacy:eU({type:g.STRING,command:"".concat(ev," install --ignore-scripts --legacy-peer-deps")}),pnpmInstallForce:eU({type:g.STRING,command:"".concat(ev," install --ignore-scripts --force")}),pnpmPruneStore:eU({type:g.STRING,command:"".concat(ev," store prune")}),pnpmCleanCache:eU({type:g.STRING,command:"".concat(ev," cache delete")})};import ek from"node-persist";var eV=A();function eY(){return r(function(){var e;return E(this,function(n){switch(n.label){case 0:e=ek.defaultInstance;if(e)return[3,2];return[4,ek.init({dir:eV.CYBERSKILL_STORAGE_DIRECTORY})];case 1:e=n.sent();n.label=2;case 2:e;return[2]}})})()}d(eY,"initNodePersist");var eF={get:function e(e){return r(function(){var n,t;return E(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,eY()];case 1:r.sent();return[4,ek.getItem(e)];case 2:return[2,(n=r.sent())!==null&&n!==void 0?n:null];case 3:t=r.sent();return[2,Y(t,{returnValue:null})];case 4:return[2]}})})()},set:function e(e,n){return r(function(){var t;return E(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,eY()];case 1:r.sent();return[4,ek.setItem(e,n)];case 2:r.sent();return[3,4];case 3:t=r.sent();Y(t);return[3,4];case 4:return[2]}})})()},remove:function e(e){return r(function(){var n;return E(this,function(t){switch(t.label){case 0:t.trys.push([0,3,,4]);return[4,eY()];case 1:t.sent();return[4,ek.removeItem(e)];case 2:t.sent();return[3,4];case 3:n=t.sent();Y(n);return[3,4];case 4:return[2]}})})()},keys:function e(){return r(function(){var e,n;return E(this,function(t){switch(t.label){case 0:t.trys.push([0,3,,4]);return[4,eY()];case 1:t.sent();return[4,ek.keys()];case 2:e=t.sent();return[2,Array.isArray(e)?e:(V.warn("[Storage:keys] Invalid keys response:",e),[])];case 3:n=t.sent();return[2,Y(n,{returnValue:[]})];case 4:return[2]}})})()},getLogLink:function e(e){return r(function(){return E(this,function(n){try{return[2,"".concat(eV.CYBERSKILL_STORAGE_DIRECTORY," (key: ").concat(e,")")]}catch(e){return[2,Y(e,{returnValue:null})]}return[2]})})()}};var ex=A(),ej=G.promisify(_);function eK(){return r(function(){var e;return E(this,function(n){switch(n.label){case 0:return[4,nt()];case 1:e=n.sent();return[2,e.success?e.result.name:Date.now().toString()]}})})()}d(eK,"getPackageName");function eB(e){return r(function(){var n,t;return E(this,function(a){switch(a.label){case 0:if(e.length===0)return[2];return[4,eK()];case 1:n=a.sent();a.label=2;case 2:a.trys.push([2,4,,5]);return[4,eF.set(n,e)];case 3:a.sent(),setTimeout(function(){return r(function(){var e;return E(this,function(t){switch(t.label){case 0:return[4,eF.getLogLink(n)];case 1:e=t.sent();e&&V.info("\uD83D\uDCC2 Open the error list manually: ".concat(e));return[2]}})})()},0);return[3,5];case 4:t=a.sent();Y(t);return[3,5];case 5:return[2]}})})()}d(eB,"saveErrorListToStorage");function eQ(e){var n=[],t=[],r="",a=/^\s*(\d+):(\d+)\s+(error|warning)\s+(.+?)\s+(\S+)$/,o=/^(.+?)\((\d+),(\d+)\):\s+(error|warning)\s+TS\d+:\s+(\S.+)$/,s=/^✖\s+(.*?)\s+\[(.*?)\]$/;e.split("\n").forEach(function(e){if(e.startsWith("/"))r=e.trim();else{var i,c,u,E,l;var d=a.exec(e)||[],p=o.exec(e)||[],f=s.exec(e)||[];var m,S,D,O,C,I;d.length&&r?n.push({file:r,position:"".concat(d[1],":").concat(d[2]),type:d[3]===P.Error?P.Error:P.Warning,message:(m=d===null||d===void 0?void 0:(i=d[4])===null||i===void 0?void 0:i.trim())!==null&&m!==void 0?m:"",rule:(S=d===null||d===void 0?void 0:(c=d[5])===null||c===void 0?void 0:c.trim())!==null&&S!==void 0?S:""}):p.length?n.push({file:(D=p===null||p===void 0?void 0:p[1])!==null&&D!==void 0?D:"",position:"".concat(p[2],":").concat(p[3]),type:p[4]===P.Error?P.Error:P.Warning,message:(O=p===null||p===void 0?void 0:(u=p[5])===null||u===void 0?void 0:u.trim())!==null&&O!==void 0?O:""}):f.length?n.push({file:"commitlint",type:P.Error,message:(C=f===null||f===void 0?void 0:(E=f[1])===null||E===void 0?void 0:E.trim())!==null&&C!==void 0?C:"",rule:(I=f===null||f===void 0?void 0:(l=f[2])===null||l===void 0?void 0:l.trim())!==null&&I!==void 0?I:""}):t.push(e.trim())}}),n.length&&eB(n),ex.DEBUG&&t.length&&(V.warn("Unmatched lines:"),t.forEach(function(e){return V.info(" ".concat(e))}))}d(eQ,"parseTextErrors");function eH(e){try{var n=JSON.parse(e),t=[];n.forEach(function(e){var n=e.filePath,r=e.messages;r.forEach(function(e){var r=e.severity,a=e.line,o=e.column,s=e.ruleId,i=e.message;t.push({type:r===2?P.Error:P.Warning,file:n,position:"".concat(a,":").concat(o),rule:s,message:i})})}),t.length&&eB(t)}catch(n){eQ(e)}}d(eH,"parseCommandOutput");function eq(e){return r(function(e){var n,t,r,a,o,s,i,c,u;var l=arguments;return E(this,function(E){switch(E.label){case 0:n=l.length>1&&l[1]!==void 0?l[1]:eH;t=new AbortController;R.on("SIGINT",function(){V.warn("Process interrupted. Terminating..."),t.abort(),R.exit()});E.label=1;case 1:E.trys.push([1,4,,5]);if(!(typeof e=="string"))return[3,3];return[4,ej(e,{maxBuffer:0x6400000,signal:t.signal})];case 2:r=E.sent(),a=r.stdout,o=r.stderr;[a,o].forEach(function(e){return e&&n(e)});E.label=3;case 3:return[3,5];case 4:s=E.sent();i=s.stdout,c=s.stderr,u=s.message;[i,c].forEach(function(e){return e&&n(e)}),!c&&!i&&V.error("Command failed: ".concat(u));return[3,5];case 5:return[2]}})}).apply(this,arguments)}d(eq,"executeCommand");function eW(e){return{raw:!0,cmd:e}}d(eW,"rawCommand");function eJ(e,n){return(n===null||n===void 0?void 0:n.isCurrentProject)?"".concat(eh," ").concat(eT," ").concat(eE," ").concat(e):"".concat(eh," ").concat(eu," ").concat(e)}d(eJ,"formatCLI");function e$(e,n){return typeof e=="function"?eJ(e(n),n):(typeof e==="undefined"?"undefined":c(e))=="object"&&(e===null||e===void 0?void 0:e.raw)===!0?e.cmd:typeof e=="string"?eJ(e,n):e}d(e$,"formatCommand");function eX(e,n){return r(function(){var t;return E(this,function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);V.start("".concat(e)),ex.DEBUG&&V.info("→ ".concat(n));return[4,eq(n)];case 1:r.sent(),V.success("".concat(e," done."));return[3,3];case 2:t=r.sent();Y(t);return[3,3];case 3:return[2]}})})()}d(eX,"runCommand");import ez from"fs-extra";import eZ from"path";var e0=ez.lstatSync,e1=ez.readdirSync,e2=ez.mkdirSync,e4=ez.readFileSync,e3=ez.unlinkSync,e5=ez.statSync,e6=ez.createWriteStream,e7=ez.readJsonSync;function e8(e,n,t){ez.writeFileSync(e,n,t!==null&&t!==void 0?t:"utf-8")}d(e8,"writeFileSync");function e9(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}return n.every(function(e){return ez.pathExistsSync(e)})}d(e9,"pathExistsSync");var ne=A();function nn(e){return r(function(){var n,t,r,a;return E(this,function(o){switch(o.label){case 0:o.trys.push([0,3,,4]);return[4,f("https://registry.npmjs.org/".concat(e,"/latest"))];case 1:n=o.sent();if(!n.ok)throw new Error("Failed to fetch latest version: ".concat(n.status," ").concat(n.statusText));return[4,n.json()];case 2:t=o.sent(),r=t.version;return[2,{success:!0,result:r}];case 3:a=o.sent();return[2,Y(a)];case 4:return[2]}})})()}d(nn,"getLatestPackageVersion");function nt(e){return r(function(){var n,t,r,a,o,s,i,c,u,l,d,f,m,S,D,O,C,I,N,T,y,v,h,A;return E(this,function(E){switch(E.label){case 0:E.trys.push([0,2,,3]);if(!e){if(e9(eb.PACKAGE_JSON)){n=e7(eb.PACKAGE_JSON),t=n.name,r=t===void 0?"":t,a=n.version,o=a===void 0?"":a;return[2,{success:!0,result:{name:r,currentVersion:o,latestVersion:o,isCurrentProject:!0,isInstalled:!0,isUpToDate:!0,isDependency:!1,isDevDependency:!1,installedPath:eb.PACKAGE_JSON,file:n}}]}return[2,{success:!0,result:{name:"",currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:!1,isDevDependency:!1,installedPath:"",file:{}}}]}if(!e9(eb.PACKAGE_JSON))return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:e.type===p.DEPENDENCY,isDevDependency:e.type===p.DEV_DEPENDENCY,installedPath:"",file:{}}}];s=e7(eb.PACKAGE_JSON),i=s.name,c=s.version,u=c===void 0?"":c,l=s.dependencies,d=l===void 0?{}:l,f=s.devDependencies,m=f===void 0?{}:f;if(e.name===i)return[2,{success:!0,result:{name:i,currentVersion:u,latestVersion:u,isCurrentProject:!0,isInstalled:!0,isUpToDate:!0,isDependency:e.type===p.DEPENDENCY,isDevDependency:e.type===p.DEV_DEPENDENCY,installedPath:eb.PACKAGE_JSON,file:s}}];S=e.name in d,D=e.name in m;return[4,nn(e.name)];case 1:O=E.sent();if(!O.success)return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:S,isDevDependency:D,installedPath:"",file:{}}}];if(!S&&!D)return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:O.result,isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:e.type===p.DEPENDENCY,isDevDependency:e.type===p.DEV_DEPENDENCY,installedPath:"",file:{}}}];N=(I=(C=d[e.name])!==null&&C!==void 0?C:m[e.name])!==null&&I!==void 0?I:"",T=H(ne.CWD,$,e.name,Z);if(!e9(T))return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:O.result,isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:S,isDevDependency:D,installedPath:"",file:{}}}];y=e7(T),v=y.version,h=v===void 0?"":v;return[2,N!==h?{success:!0,result:{name:e.name,currentVersion:h||N,latestVersion:O.result,isCurrentProject:!1,isInstalled:!0,isUpToDate:!1,isDependency:S,isDevDependency:D,installedPath:T,file:y}}:{success:!0,result:{name:e.name,currentVersion:N,latestVersion:O.result,isCurrentProject:!1,isInstalled:!0,isUpToDate:N===O.result,isDependency:S,isDevDependency:D,installedPath:T,file:y}}];case 2:A=E.sent();return[2,Y(A)];case 3:return[2]}})})()}d(nt,"getPackage");function nr(e){return r(function(){var n,t,r,a,o;return E(this,function(s){try{;r=e7(eb.PACKAGE_JSON),a=(n=r.dependencies)!==null&&n!==void 0?n:{},o=(t=r.devDependencies)!==null&&t!==void 0?t:{};e.isDependency?a[e.name]=e.latestVersion:e.isDevDependency&&(o[e.name]=e.latestVersion),e8(eb.PACKAGE_JSON,JSON.stringify(r,null,4)),V.info('Updated "'.concat(e.name,'" to version ').concat(e.latestVersion))}catch(e){Y(e)}return[2]})})()}d(nr,"updatePackage");function na(){return r(function(){var e,n,t,r,a,o,s,i,c,u,l,p,f;return E(this,function(E){switch(E.label){case 0:E.trys.push([0,12,,13]);e=[{command:d(function(){return ew.pnpmInstallStandard()},"command"),message:"Installing dependencies (standard)"},{command:d(function(){return ew.pnpmInstallLegacy()},"command"),message:"Retrying with legacy peer dependencies"},{command:d(function(){return ew.pnpmInstallForce()},"command"),message:"Retrying with force install"}];n=true,t=false,r=undefined;E.label=1;case 1:E.trys.push([1,9,10,11]);a=e[Symbol.iterator]();E.label=2;case 2:if(!!(n=(o=a.next()).done))return[3,8];s=o.value,i=s.command,c=s.message;E.label=3;case 3:E.trys.push([3,6,,7]);return[4,i()];case 4:u=E.sent();return[4,eX("".concat(c," using: ").concat(u),u)];case 5:E.sent();return[2];case 6:l=E.sent();Y(l);return[3,7];case 7:n=true;return[3,2];case 8:return[3,11];case 9:p=E.sent();t=true;r=p;return[3,11];case 10:try{if(!n&&a.return!=null){a.return()}}finally{if(t){throw r}}return[7];case 11:return[3,13];case 12:f=E.sent();Y(f);return[3,13];case 13:return[2]}})})()}d(na,"installDependencies");function no(e,n){return r(function(){var t,r,a,o,s,c,u,l,d,p,f,m,S,D,O,C,I;return E(this,function(E){switch(E.label){case 0:E.trys.push([0,15,,16]);if(!e9(eb.PACKAGE_JSON)){V.error("package.json not found. Aborting setup.");return[2]}return[4,Promise.all(e.map(nt))];case 1:a=E.sent().filter(function(e){return e.success&&!!e.result&&!e.result.isCurrentProject}).map(function(e){return e.result}),o=a.filter(function(e){return!e.isInstalled}),s=a.filter(function(e){return!e.isUpToDate}),c=[];(n===null||n===void 0?void 0:n.install)&&o.length>0&&(t=c).push.apply(t,i(o.map(nr))),(n===null||n===void 0?void 0:n.update)&&s.length>0&&(r=c).push.apply(r,i(s.map(nr)));u=c.length>0;if(!u)return[3,6];return[4,Promise.all(c)];case 2:E.sent();return[4,na()];case 3:E.sent();l=["Running ESLint with auto-fix"];return[4,ew.eslintFix()];case 4:return[4,eX.apply(void 0,l.concat([E.sent()]))];case 5:u=E.sent();E.label=6;case 6:u;p=true,f=false,m=undefined;E.label=7;case 7:E.trys.push([7,12,13,14]);S=((d=n===null||n===void 0?void 0:n.callbacks)!==null&&d!==void 0?d:[])[Symbol.iterator]();E.label=8;case 8:if(!!(p=(D=S.next()).done))return[3,11];O=D.value;return[4,O()];case 9:E.sent();E.label=10;case 10:p=true;return[3,8];case 11:return[3,14];case 12:C=E.sent();f=true;m=C;return[3,14];case 13:try{if(!p&&S.return!=null){S.return()}}finally{if(f){throw m}}return[7];case 14:return[3,16];case 15:I=E.sent();Y(I);return[3,16];case 16:return[2]}})})()}d(no,"setupPackages");export{p as E_PackageType,nn as getLatestPackageVersion,nt as getPackage,na as installDependencies,no as setupPackages,nr as updatePackage};
@@ -1 +0,0 @@
1
- "use strict";function e(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}var n=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var t=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var u=function(e,r){for(var t in r)n(e,t,{get:r[t],enumerable:!0})},a=function(u,a,c,i){var f=true,p=false,l=undefined;if(a&&(typeof a==="undefined"?"undefined":e(a))=="object"||typeof a=="function")try{var E=function(){var e=y.value;!o.call(u,e)&&e!==c&&n(u,e,{get:function(){return a[e]},enumerable:!(i=r(a,e))||i.enumerable})};for(var d=t(a)[Symbol.iterator](),y;!(f=(y=d.next()).done);f=true)E()}catch(e){p=true;l=e}finally{try{if(!f&&d.return!=null){d.return()}}finally{if(p){throw l}}}return u};var c=function(e){return a(n({},"__esModule",{value:!0}),e)};var i={};u(i,{E_PackageType:function(){return f}});module.exports=c(i);var f=function(e){return e.DEPENDENCY="dependencies",e.DEV_DEPENDENCY="devDependencies",e.PEER_DEPENDENCY="peerDependencies",e.BUNDLE_DEPENDENCY="bundleDependencies",e.OPTIONAL_DEPENDENCY="optionalDependencies",e}({});0&&(module.exports={E_PackageType:E_PackageType});
@@ -1,4 +0,0 @@
1
- export { T_PackageJson_alias_2 as T_PackageJson } from '../../_tsup-dts-rollup.cjs';
2
- export { I_PackageInfo_alias_2 as I_PackageInfo } from '../../_tsup-dts-rollup.cjs';
3
- export { E_PackageType_alias_2 as E_PackageType } from '../../_tsup-dts-rollup.cjs';
4
- export { I_PackageInput_alias_2 as I_PackageInput } from '../../_tsup-dts-rollup.cjs';
@@ -1,4 +0,0 @@
1
- export { T_PackageJson_alias_2 as T_PackageJson } from '../../_tsup-dts-rollup.js';
2
- export { I_PackageInfo_alias_2 as I_PackageInfo } from '../../_tsup-dts-rollup.js';
3
- export { E_PackageType_alias_2 as E_PackageType } from '../../_tsup-dts-rollup.js';
4
- export { I_PackageInput_alias_2 as I_PackageInput } from '../../_tsup-dts-rollup.js';
@@ -1 +0,0 @@
1
- var e=function(e){return e.DEPENDENCY="dependencies",e.DEV_DEPENDENCY="devDependencies",e.PEER_DEPENDENCY="peerDependencies",e.BUNDLE_DEPENDENCY="bundleDependencies",e.OPTIONAL_DEPENDENCY="optionalDependencies",e}({});export{e as E_PackageType};
@@ -1 +0,0 @@
1
- "use strict";function e(e,t){if(t==null||t>e.length)t=e.length;for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function t(t){if(Array.isArray(t))return e(t)}function n(e,t,n,r,a,o,s){try{var i=e[o](s);var c=i.value}catch(e){n(e);return}if(i.done){t(c)}else{Promise.resolve(c).then(r,a)}}function r(e){return function(){var t=this,r=arguments;return new Promise(function(a,o){var s=e.apply(t,r);function i(e){n(s,a,o,i,c,"next",e)}function c(e){n(s,a,o,i,c,"throw",e)}i(undefined)})}}function a(e,t){if(t!=null&&typeof Symbol!=="undefined"&&t[Symbol.hasInstance]){return!!t[Symbol.hasInstance](e)}else{return e instanceof t}}function o(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function s(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(e){return t(e)||o(e)||u(e)||s()}function c(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function u(t,n){if(!t)return;if(typeof t==="string")return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor)r=t.constructor.name;if(r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,n)}function l(e,t){var n,r,a,o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},s=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return s.next=i(0),s["throw"]=i(1),s["return"]=i(2),typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function i(e){return function(t){return c([e,t])}}function c(i){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,i[0]&&(o=0)),o)try{if(n=1,r&&(a=i[0]&2?r["return"]:i[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;if(r=0,a)i=[i[0]&2,a.value];switch(i[0]){case 0:case 1:a=i;break;case 4:o.label++;return{value:i[1],done:false};case 5:o.label++;r=i[1];i=[0];continue;case 7:i=o.ops.pop();o.trys.pop();continue;default:if(!(a=o.trys,a=a.length>0&&a[a.length-1])&&(i[0]===6||i[0]===2)){o=0;continue}if(i[0]===3&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(i[0]===6&&o.label<a[1]){o.label=a[1];a=i;break}if(a&&o.label<a[2]){o.label=a[2];o.ops.push(i);break}if(a[2])o.ops.pop();o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e];r=0}finally{n=a=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}}var E=Object.create;var d=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty;var m=function(e,t){return d(e,"name",{value:t,configurable:!0})};var O=function(e,t){for(var n in t)d(e,n,{get:t[n],enumerable:!0})},C=function(e,t,n,r){var a=true,o=false,s=undefined;if(t&&(typeof t==="undefined"?"undefined":c(t))=="object"||typeof t=="function")try{var i=function(){var a=l.value;!D.call(e,a)&&a!==n&&d(e,a,{get:function(){return t[a]},enumerable:!(r=f(t,a))||r.enumerable})};for(var u=p(t)[Symbol.iterator](),l;!(a=(l=u.next()).done);a=true)i()}catch(e){o=true;s=e}finally{try{if(!a&&u.return!=null){u.return()}}finally{if(o){throw s}}}return e};var v=function(e,t,n){return n=e!=null?E(S(e)):{},C(t||!e||!e.__esModule?d(n,"default",{value:e,enumerable:!0}):n,e)},y=function(e){return C(d({},"__esModule",{value:!0}),e)};var I={};O(I,{getLatestPackageVersion:function(){return tl},getPackage:function(){return tE},installDependencies:function(){return tf},setupPackages:function(){return tp},updatePackage:function(){return td}});module.exports=y(I);var N=v(require("node-fetch"),1);var T=".cyberskill-storage";var g=v(require("@dotenvx/dotenvx"),1),h=require("envalid"),A=v(require("os"),1),_=v(require("path"),1),R=v(require("process"),1);var G=function(e){return e.PRODUCTION="production",e.STAGING="staging",e.DEVELOPMENT="development",e}({});var P=!1;function M(){R.default.env.NODE_ENV!==G.PRODUCTION&&!P&&(g.default.config(),P=!0)}m(M,"loadEnvFile");function L(){M();var e=(0,h.cleanEnv)(R.default.env,{CWD:(0,h.str)({default:R.default.cwd()}),DEBUG:(0,h.bool)({default:!1}),CYBERSKILL_STORAGE_DIRECTORY:(0,h.str)({default:_.default.join(A.default.homedir(),T)})});return{CWD:e.CWD,DEBUG:e.DEBUG,CYBERSKILL_STORAGE_DIRECTORY:e.CYBERSKILL_STORAGE_DIRECTORY}}m(L,"getEnv");var b=function(e){return e.CLI="CLI",e.STRING="STRING",e.FUNCTION="FUNCTION",e}({});var U=require("child_process"),w=v(require("process"),1),k=v(require("util"),1);var V=function(e){return e.Error="error",e.Warning="warning",e}({});var Y=v(require("chalk"),1),F=v(require("consola"),1),x=require("graphql");var j={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"}};var q=L();q.DEBUG||(F.default.level=4);function K(e){var t=Y.default[e];return typeof t=="function"?t:Y.default.green}m(K,"chalkKeyword");var B={silent:F.default.silent,level:F.default.level,fatal:F.default.fatal,error:F.default.error,warn:F.default.warn,log:F.default.log,info:F.default.info,success:F.default.success,ready:F.default.ready,start:F.default.start,box:F.default.box,debug:F.default.debug,trace:F.default.trace,verbose:F.default.verbose,printBoxedLog:function e(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"red";if(!(t===null||t===void 0?void 0:t.length)){F.default.box(Y.default.green(e));return}t.forEach(function(e){var t=e.file,r=e.position,a=e.rule,o=e.message;F.default.log("".concat(Y.default.gray("File:")," ").concat(Y.default.blue("".concat(t).concat(r?":".concat(r):"")))),a&&F.default.log(" ".concat(K(n)("Rule:")," ").concat(a)),F.default.log(" ".concat(K(n)("Message:")," ").concat(o))}),F.default.box(K(n)("".concat(e," : ").concat(t.length))),F.default.log(Y.default.gray("─".repeat(40)))}};function Q(e,t){var n=t!==null&&t!==void 0?t:{},r=n.shouldLog,o=r===void 0?!0:r,s=n.returnValue,i=n.callback,c=a(e,Error)?e:new Error(typeof e=="string"?e:"Unknown error");return o&&B.error(c.message),i&&typeof i=="function"&&i(c),s||{success:!1,message:c.message,code:j.INTERNAL_SERVER_ERROR.CODE}}m(Q,"catchError");var H=function(e){return e.DEPENDENCY="dependencies",e.DEV_DEPENDENCY="devDependencies",e.PEER_DEPENDENCY="peerDependencies",e.BUNDLE_DEPENDENCY="bundleDependencies",e.OPTIONAL_DEPENDENCY="optionalDependencies",e}({});var W=v(require("fs-extra"),1);var J=v(require("path"),1);var $=L(),X=J.default,z=X.dirname;function Z(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r;return(r=X).resolve.apply(r,[$.CWD].concat(i(t)))}m(Z,"resolveWorkingPath");function ee(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r;return(r=X).join.apply(r,i(t))}m(ee,"join");var et=L(),en=et.CWD,er="@cyberskill/shared",ea="node_modules",eo="dist",es="public",ei="package.json",ec="package-lock.json",eu="tsconfig.json",el=".gitignore",eE=".simple-git-hooks.json",ed="pnpm-lock.yaml",ef=".git/hooks/",ep=".git/COMMIT_EDITMSG",eS=".migrate-mongo.config.js",eD=function(){var e=W.default.readJsonSync(Z(ei)).name===er?en:ee(en,ea,er);return ee(e,eo)}(),em="cyberskill",eO="src/node/cli/index.ts",eC="eslint",ev="eslint",ey="vitest";var eI="vitest",eN="@commitlint/cli",eT="@commitlint/config-conventional",eg="commitlint",eh="lint-staged",eA="lint-staged",e_="typescript",eR="tsc",eG="tsx",eP="git",eM="pnpm",eL="pnpm exec",eb="simple-git-hooks",eU="simple-git-hooks",ew="@eslint/config-inspector",ek="eslint-config-inspector",eV="node-modules-inspector",eY="node-modules-inspector",eF="migrate-mongo",ex="./node_modules/migrate-mongo/bin/migrate-mongo",ej={CYBERSKILL_DIRECTORY:eD,WORKING_DIRECTORY:en,PUBLIC_DIRECTORY:Z(es),TS_CONFIG:Z(eu),GIT_IGNORE:Z(el),GIT_HOOK:Z(ef),GIT_COMMIT_MSG:Z(ep),SIMPLE_GIT_HOOKS_JSON:Z(eE),PACKAGE_JSON:Z(ei),PACKAGE_LOCK_JSON:Z(ec),PNPM_LOCK_YAML:Z(ed),NODE_MODULES:Z(ea),MIGRATE_MONGO_CONFIG:Z(eS),LINT_STAGED_CONFIG:Z("".concat(eD,"/config/lint-staged/index.js")),COMMITLINT_CONFIG:Z("".concat(eD,"/config/commitlint/index.js")),VITEST_UNIT_CONFIG:Z("".concat(eD,"/config/vitest/vitest.unit.js")),VITEST_UNIT_SETUP_CONFIG:Z("".concat(eD,"/config/vitest/vitest.unit.setup.js")),VITEST_E2E_CONFIG:Z("".concat(eD,"/config/vitest/vitest.e2e.js"))};function eq(e){var t=e.type,n=e.packages,a=e.command;var o=n===null||n===void 0?void 0:n.reduce(function(e,t){return e.some(function(e){return e.name===t.name})||e.push(t),e},[]);return function(){return r(function(){var e;return l(this,function(n){switch(n.label){case 0:switch(t){case b.CLI:return[3,1];case b.STRING:return[3,4]}return[3,5];case 1:e=o===null||o===void 0?void 0:o.length;if(!e)return[3,3];return[4,tp(o,{install:!0})];case 2:e=n.sent();n.label=3;case 3:return[2,(e,e3(e2("".concat(eL," ").concat(a))))];case 4:return[2,e3(e2(a))];case 5:throw new Error("Unsupported command type");case 6:return[2]}})})()}}m(eq,"buildCommand");var eK={simpleGitHooks:eq({type:b.CLI,packages:[{name:eb,type:H.DEV_DEPENDENCY}],command:eU}),eslintInspect:eq({type:b.CLI,packages:[{name:ew,type:H.DEV_DEPENDENCY}],command:ek}),nodeModulesInspect:eq({type:b.CLI,packages:[{name:eV,type:H.DEV_DEPENDENCY}],command:eY}),eslintCheck:eq({type:b.CLI,packages:[{name:eC,type:H.DEV_DEPENDENCY}],command:"".concat(ev," ").concat(ej.WORKING_DIRECTORY," --no-cache")}),eslintFix:eq({type:b.CLI,packages:[{name:eC,type:H.DEV_DEPENDENCY}],command:"".concat(ev," ").concat(ej.WORKING_DIRECTORY," --fix --no-cache")}),typescriptCheck:eq({type:b.CLI,packages:[{name:e_,type:H.DEV_DEPENDENCY}],command:"".concat(eR," -p ").concat(ej.TS_CONFIG," --noEmit")}),testUnit:eq({type:b.CLI,packages:[{name:ey,type:H.DEV_DEPENDENCY}],command:"".concat(eI," --config ").concat(ej.VITEST_UNIT_CONFIG)}),testE2e:eq({type:b.CLI,packages:[{name:ey,type:H.DEV_DEPENDENCY}],command:"".concat(eI," --config ").concat(ej.VITEST_E2E_CONFIG)}),mongoMigrateCreate:m(function(e){return eq({type:b.CLI,packages:[{name:eG,type:H.DEPENDENCY},{name:eF,type:H.DEPENDENCY}],command:"".concat(eG," ").concat(ex," create ").concat(e," -f ").concat(ej.MIGRATE_MONGO_CONFIG)})()},"mongoMigrateCreate"),mongoMigrateUp:eq({type:b.CLI,packages:[{name:eG,type:H.DEPENDENCY},{name:eF,type:H.DEPENDENCY}],command:"".concat(eG," ").concat(ex," up -f ").concat(ej.MIGRATE_MONGO_CONFIG)}),mongoMigrateDown:eq({type:b.CLI,packages:[{name:eG,type:H.DEPENDENCY},{name:eF,type:H.DEPENDENCY}],command:"".concat(eG," ").concat(ex," down -f ").concat(ej.MIGRATE_MONGO_CONFIG)}),commitLint:eq({type:b.CLI,packages:[{name:eN,type:H.DEV_DEPENDENCY},{name:eT,type:H.DEV_DEPENDENCY}],command:"".concat(eg," --edit ").concat(ej.GIT_COMMIT_MSG," --config ").concat(ej.COMMITLINT_CONFIG)}),lintStaged:eq({type:b.CLI,packages:[{name:eh,type:H.DEV_DEPENDENCY}],command:"".concat(eA," --config ").concat(ej.LINT_STAGED_CONFIG)}),configureGitHook:eq({type:b.STRING,command:"".concat(eP," config core.hooksPath ").concat(ej.GIT_HOOK)}),build:eq({type:b.STRING,command:"".concat(eM," run --if-present build")}),pnpmInstallStandard:eq({type:b.STRING,command:"".concat(eM," install --ignore-scripts")}),pnpmInstallLegacy:eq({type:b.STRING,command:"".concat(eM," install --ignore-scripts --legacy-peer-deps")}),pnpmInstallForce:eq({type:b.STRING,command:"".concat(eM," install --ignore-scripts --force")}),pnpmPruneStore:eq({type:b.STRING,command:"".concat(eM," store prune")}),pnpmCleanCache:eq({type:b.STRING,command:"".concat(eM," cache delete")})};var eB=v(require("node-persist"),1);var eQ=L();function eH(){return r(function(){var e;return l(this,function(t){switch(t.label){case 0:e=eB.default.defaultInstance;if(e)return[3,2];return[4,eB.default.init({dir:eQ.CYBERSKILL_STORAGE_DIRECTORY})];case 1:e=t.sent();t.label=2;case 2:e;return[2]}})})()}m(eH,"initNodePersist");var eW={get:function e(e){return r(function(){var t,n;return l(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,eH()];case 1:r.sent();return[4,eB.default.getItem(e)];case 2:return[2,(t=r.sent())!==null&&t!==void 0?t:null];case 3:n=r.sent();return[2,Q(n,{returnValue:null})];case 4:return[2]}})})()},set:function e(e,t){return r(function(){var n;return l(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,eH()];case 1:r.sent();return[4,eB.default.setItem(e,t)];case 2:r.sent();return[3,4];case 3:n=r.sent();Q(n);return[3,4];case 4:return[2]}})})()},remove:function e(e){return r(function(){var t;return l(this,function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,eH()];case 1:n.sent();return[4,eB.default.removeItem(e)];case 2:n.sent();return[3,4];case 3:t=n.sent();Q(t);return[3,4];case 4:return[2]}})})()},keys:function e(){return r(function(){var e,t;return l(this,function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,eH()];case 1:n.sent();return[4,eB.default.keys()];case 2:e=n.sent();return[2,Array.isArray(e)?e:(B.warn("[Storage:keys] Invalid keys response:",e),[])];case 3:t=n.sent();return[2,Q(t,{returnValue:[]})];case 4:return[2]}})})()},getLogLink:function e(e){return r(function(){return l(this,function(t){try{return[2,"".concat(eQ.CYBERSKILL_STORAGE_DIRECTORY," (key: ").concat(e,")")]}catch(e){return[2,Q(e,{returnValue:null})]}return[2]})})()}};var eJ=L(),e$=k.promisify(U.exec);function eX(){return r(function(){var e;return l(this,function(t){switch(t.label){case 0:return[4,tE()];case 1:e=t.sent();return[2,e.success?e.result.name:Date.now().toString()]}})})()}m(eX,"getPackageName");function ez(e){return r(function(){var t,n;return l(this,function(a){switch(a.label){case 0:if(e.length===0)return[2];return[4,eX()];case 1:t=a.sent();a.label=2;case 2:a.trys.push([2,4,,5]);return[4,eW.set(t,e)];case 3:a.sent(),setTimeout(function(){return r(function(){var e;return l(this,function(n){switch(n.label){case 0:return[4,eW.getLogLink(t)];case 1:e=n.sent();e&&B.info("\uD83D\uDCC2 Open the error list manually: ".concat(e));return[2]}})})()},0);return[3,5];case 4:n=a.sent();Q(n);return[3,5];case 5:return[2]}})})()}m(ez,"saveErrorListToStorage");function eZ(e){var t=[],n=[],r="",a=/^\s*(\d+):(\d+)\s+(error|warning)\s+(.+?)\s+(\S+)$/,o=/^(.+?)\((\d+),(\d+)\):\s+(error|warning)\s+TS\d+:\s+(\S.+)$/,s=/^✖\s+(.*?)\s+\[(.*?)\]$/;e.split("\n").forEach(function(e){if(e.startsWith("/"))r=e.trim();else{var i,c,u,l,E;var d=a.exec(e)||[],f=o.exec(e)||[],p=s.exec(e)||[];var S,D,m,O,C,v;d.length&&r?t.push({file:r,position:"".concat(d[1],":").concat(d[2]),type:d[3]===V.Error?V.Error:V.Warning,message:(S=d===null||d===void 0?void 0:(i=d[4])===null||i===void 0?void 0:i.trim())!==null&&S!==void 0?S:"",rule:(D=d===null||d===void 0?void 0:(c=d[5])===null||c===void 0?void 0:c.trim())!==null&&D!==void 0?D:""}):f.length?t.push({file:(m=f===null||f===void 0?void 0:f[1])!==null&&m!==void 0?m:"",position:"".concat(f[2],":").concat(f[3]),type:f[4]===V.Error?V.Error:V.Warning,message:(O=f===null||f===void 0?void 0:(u=f[5])===null||u===void 0?void 0:u.trim())!==null&&O!==void 0?O:""}):p.length?t.push({file:"commitlint",type:V.Error,message:(C=p===null||p===void 0?void 0:(l=p[1])===null||l===void 0?void 0:l.trim())!==null&&C!==void 0?C:"",rule:(v=p===null||p===void 0?void 0:(E=p[2])===null||E===void 0?void 0:E.trim())!==null&&v!==void 0?v:""}):n.push(e.trim())}}),t.length&&ez(t),eJ.DEBUG&&n.length&&(B.warn("Unmatched lines:"),n.forEach(function(e){return B.info(" ".concat(e))}))}m(eZ,"parseTextErrors");function e0(e){try{var t=JSON.parse(e),n=[];t.forEach(function(e){var t=e.filePath,r=e.messages;r.forEach(function(e){var r=e.severity,a=e.line,o=e.column,s=e.ruleId,i=e.message;n.push({type:r===2?V.Error:V.Warning,file:t,position:"".concat(a,":").concat(o),rule:s,message:i})})}),n.length&&ez(n)}catch(t){eZ(e)}}m(e0,"parseCommandOutput");function e1(e){return r(function(e){var t,n,r,a,o,s,i,c,u;var E=arguments;return l(this,function(l){switch(l.label){case 0:t=E.length>1&&E[1]!==void 0?E[1]:e0;n=new AbortController;w.default.on("SIGINT",function(){B.warn("Process interrupted. Terminating..."),n.abort(),w.default.exit()});l.label=1;case 1:l.trys.push([1,4,,5]);if(!(typeof e=="string"))return[3,3];return[4,e$(e,{maxBuffer:0x6400000,signal:n.signal})];case 2:r=l.sent(),a=r.stdout,o=r.stderr;[a,o].forEach(function(e){return e&&t(e)});l.label=3;case 3:return[3,5];case 4:s=l.sent();i=s.stdout,c=s.stderr,u=s.message;[i,c].forEach(function(e){return e&&t(e)}),!c&&!i&&B.error("Command failed: ".concat(u));return[3,5];case 5:return[2]}})}).apply(this,arguments)}m(e1,"executeCommand");function e2(e){return{raw:!0,cmd:e}}m(e2,"rawCommand");function e4(e,t){return(t===null||t===void 0?void 0:t.isCurrentProject)?"".concat(eL," ").concat(eG," ").concat(eO," ").concat(e):"".concat(eL," ").concat(em," ").concat(e)}m(e4,"formatCLI");function e3(e,t){return typeof e=="function"?e4(e(t),t):(typeof e==="undefined"?"undefined":c(e))=="object"&&(e===null||e===void 0?void 0:e.raw)===!0?e.cmd:typeof e=="string"?e4(e,t):e}m(e3,"formatCommand");function e5(e,t){return r(function(){var n;return l(this,function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);B.start("".concat(e)),eJ.DEBUG&&B.info("→ ".concat(t));return[4,e1(t)];case 1:r.sent(),B.success("".concat(e," done."));return[3,3];case 2:n=r.sent();Q(n);return[3,3];case 3:return[2]}})})()}m(e5,"runCommand");var e6=v(require("fs-extra"),1),e7=v(require("path"),1);var e8=e6.default,e9=e8.lstatSync,te=e8.readdirSync,tt=e8.mkdirSync,tn=e8.readFileSync,tr=e8.unlinkSync,ta=e8.statSync,to=e8.createWriteStream,ts=e6.default.readJsonSync;function ti(e,t,n){e6.default.writeFileSync(e,t,n!==null&&n!==void 0?n:"utf-8")}m(ti,"writeFileSync");function tc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}return t.every(function(e){return e6.default.pathExistsSync(e)})}m(tc,"pathExistsSync");var tu=L();function tl(e){return r(function(){var t,n,r,a;return l(this,function(o){switch(o.label){case 0:o.trys.push([0,3,,4]);return[4,(0,N.default)("https://registry.npmjs.org/".concat(e,"/latest"))];case 1:t=o.sent();if(!t.ok)throw new Error("Failed to fetch latest version: ".concat(t.status," ").concat(t.statusText));return[4,t.json()];case 2:n=o.sent(),r=n.version;return[2,{success:!0,result:r}];case 3:a=o.sent();return[2,Q(a)];case 4:return[2]}})})()}m(tl,"getLatestPackageVersion");function tE(e){return r(function(){var t,n,r,a,o,s,i,c,u,E,d,f,p,S,D,m,O,C,v,y,I,N,T,g;return l(this,function(l){switch(l.label){case 0:l.trys.push([0,2,,3]);if(!e){if(tc(ej.PACKAGE_JSON)){t=ts(ej.PACKAGE_JSON),n=t.name,r=n===void 0?"":n,a=t.version,o=a===void 0?"":a;return[2,{success:!0,result:{name:r,currentVersion:o,latestVersion:o,isCurrentProject:!0,isInstalled:!0,isUpToDate:!0,isDependency:!1,isDevDependency:!1,installedPath:ej.PACKAGE_JSON,file:t}}]}return[2,{success:!0,result:{name:"",currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:!1,isDevDependency:!1,installedPath:"",file:{}}}]}if(!tc(ej.PACKAGE_JSON))return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:e.type===H.DEPENDENCY,isDevDependency:e.type===H.DEV_DEPENDENCY,installedPath:"",file:{}}}];s=ts(ej.PACKAGE_JSON),i=s.name,c=s.version,u=c===void 0?"":c,E=s.dependencies,d=E===void 0?{}:E,f=s.devDependencies,p=f===void 0?{}:f;if(e.name===i)return[2,{success:!0,result:{name:i,currentVersion:u,latestVersion:u,isCurrentProject:!0,isInstalled:!0,isUpToDate:!0,isDependency:e.type===H.DEPENDENCY,isDevDependency:e.type===H.DEV_DEPENDENCY,installedPath:ej.PACKAGE_JSON,file:s}}];S=e.name in d,D=e.name in p;return[4,tl(e.name)];case 1:m=l.sent();if(!m.success)return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:S,isDevDependency:D,installedPath:"",file:{}}}];if(!S&&!D)return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:m.result,isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:e.type===H.DEPENDENCY,isDevDependency:e.type===H.DEV_DEPENDENCY,installedPath:"",file:{}}}];v=(C=(O=d[e.name])!==null&&O!==void 0?O:p[e.name])!==null&&C!==void 0?C:"",y=ee(tu.CWD,ea,e.name,ei);if(!tc(y))return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:m.result,isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:S,isDevDependency:D,installedPath:"",file:{}}}];I=ts(y),N=I.version,T=N===void 0?"":N;return[2,v!==T?{success:!0,result:{name:e.name,currentVersion:T||v,latestVersion:m.result,isCurrentProject:!1,isInstalled:!0,isUpToDate:!1,isDependency:S,isDevDependency:D,installedPath:y,file:I}}:{success:!0,result:{name:e.name,currentVersion:v,latestVersion:m.result,isCurrentProject:!1,isInstalled:!0,isUpToDate:v===m.result,isDependency:S,isDevDependency:D,installedPath:y,file:I}}];case 2:g=l.sent();return[2,Q(g)];case 3:return[2]}})})()}m(tE,"getPackage");function td(e){return r(function(){var t,n,r,a,o;return l(this,function(s){try{;r=ts(ej.PACKAGE_JSON),a=(t=r.dependencies)!==null&&t!==void 0?t:{},o=(n=r.devDependencies)!==null&&n!==void 0?n:{};e.isDependency?a[e.name]=e.latestVersion:e.isDevDependency&&(o[e.name]=e.latestVersion),ti(ej.PACKAGE_JSON,JSON.stringify(r,null,4)),B.info('Updated "'.concat(e.name,'" to version ').concat(e.latestVersion))}catch(e){Q(e)}return[2]})})()}m(td,"updatePackage");function tf(){return r(function(){var e,t,n,r,a,o,s,i,c,u,E,d,f;return l(this,function(l){switch(l.label){case 0:l.trys.push([0,12,,13]);e=[{command:m(function(){return eK.pnpmInstallStandard()},"command"),message:"Installing dependencies (standard)"},{command:m(function(){return eK.pnpmInstallLegacy()},"command"),message:"Retrying with legacy peer dependencies"},{command:m(function(){return eK.pnpmInstallForce()},"command"),message:"Retrying with force install"}];t=true,n=false,r=undefined;l.label=1;case 1:l.trys.push([1,9,10,11]);a=e[Symbol.iterator]();l.label=2;case 2:if(!!(t=(o=a.next()).done))return[3,8];s=o.value,i=s.command,c=s.message;l.label=3;case 3:l.trys.push([3,6,,7]);return[4,i()];case 4:u=l.sent();return[4,e5("".concat(c," using: ").concat(u),u)];case 5:l.sent();return[2];case 6:E=l.sent();Q(E);return[3,7];case 7:t=true;return[3,2];case 8:return[3,11];case 9:d=l.sent();n=true;r=d;return[3,11];case 10:try{if(!t&&a.return!=null){a.return()}}finally{if(n){throw r}}return[7];case 11:return[3,13];case 12:f=l.sent();Q(f);return[3,13];case 13:return[2]}})})()}m(tf,"installDependencies");function tp(e,t){return r(function(){var n,r,a,o,s,c,u,E,d,f,p,S,D,m,O,C,v;return l(this,function(l){switch(l.label){case 0:l.trys.push([0,15,,16]);if(!tc(ej.PACKAGE_JSON)){B.error("package.json not found. Aborting setup.");return[2]}return[4,Promise.all(e.map(tE))];case 1:a=l.sent().filter(function(e){return e.success&&!!e.result&&!e.result.isCurrentProject}).map(function(e){return e.result}),o=a.filter(function(e){return!e.isInstalled}),s=a.filter(function(e){return!e.isUpToDate}),c=[];(t===null||t===void 0?void 0:t.install)&&o.length>0&&(n=c).push.apply(n,i(o.map(td))),(t===null||t===void 0?void 0:t.update)&&s.length>0&&(r=c).push.apply(r,i(s.map(td)));u=c.length>0;if(!u)return[3,6];return[4,Promise.all(c)];case 2:l.sent();return[4,tf()];case 3:l.sent();E=["Running ESLint with auto-fix"];return[4,eK.eslintFix()];case 4:return[4,e5.apply(void 0,E.concat([l.sent()]))];case 5:u=l.sent();l.label=6;case 6:u;f=true,p=false,S=undefined;l.label=7;case 7:l.trys.push([7,12,13,14]);D=((d=t===null||t===void 0?void 0:t.callbacks)!==null&&d!==void 0?d:[])[Symbol.iterator]();l.label=8;case 8:if(!!(f=(m=D.next()).done))return[3,11];O=m.value;return[4,O()];case 9:l.sent();l.label=10;case 10:f=true;return[3,8];case 11:return[3,14];case 12:C=l.sent();p=true;S=C;return[3,14];case 13:try{if(!f&&D.return!=null){D.return()}}finally{if(p){throw S}}return[7];case 14:return[3,16];case 15:v=l.sent();Q(v);return[3,16];case 16:return[2]}})})()}m(tp,"setupPackages");0&&(module.exports={getLatestPackageVersion:getLatestPackageVersion,getPackage:getPackage,installDependencies:installDependencies,setupPackages:setupPackages,updatePackage:updatePackage});
@@ -1,5 +0,0 @@
1
- export { getLatestPackageVersion_alias_2 as getLatestPackageVersion } from '../../_tsup-dts-rollup.cjs';
2
- export { getPackage_alias_2 as getPackage } from '../../_tsup-dts-rollup.cjs';
3
- export { updatePackage_alias_2 as updatePackage } from '../../_tsup-dts-rollup.cjs';
4
- export { installDependencies_alias_2 as installDependencies } from '../../_tsup-dts-rollup.cjs';
5
- export { setupPackages_alias_2 as setupPackages } from '../../_tsup-dts-rollup.cjs';
@@ -1,5 +0,0 @@
1
- export { getLatestPackageVersion_alias_2 as getLatestPackageVersion } from '../../_tsup-dts-rollup.js';
2
- export { getPackage_alias_2 as getPackage } from '../../_tsup-dts-rollup.js';
3
- export { updatePackage_alias_2 as updatePackage } from '../../_tsup-dts-rollup.js';
4
- export { installDependencies_alias_2 as installDependencies } from '../../_tsup-dts-rollup.js';
5
- export { setupPackages_alias_2 as setupPackages } from '../../_tsup-dts-rollup.js';
@@ -1 +0,0 @@
1
- function e(e,n){if(n==null||n>e.length)n=e.length;for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function n(n){if(Array.isArray(n))return e(n)}function t(e,n,t,r,a,o,s){try{var i=e[o](s);var c=i.value}catch(e){t(e);return}if(i.done){n(c)}else{Promise.resolve(c).then(r,a)}}function r(e){return function(){var n=this,r=arguments;return new Promise(function(a,o){var s=e.apply(n,r);function i(e){t(s,a,o,i,c,"next",e)}function c(e){t(s,a,o,i,c,"throw",e)}i(undefined)})}}function a(e,n){if(n!=null&&typeof Symbol!=="undefined"&&n[Symbol.hasInstance]){return!!n[Symbol.hasInstance](e)}else{return e instanceof n}}function o(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function s(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(e){return n(e)||o(e)||u(e)||s()}function c(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function u(n,t){if(!n)return;if(typeof n==="string")return e(n,t);var r=Object.prototype.toString.call(n).slice(8,-1);if(r==="Object"&&n.constructor)r=n.constructor.name;if(r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(n,t)}function E(e,n){var t,r,a,o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},s=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return s.next=i(0),s["throw"]=i(1),s["return"]=i(2),typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function i(e){return function(n){return c([e,n])}}function c(i){if(t)throw new TypeError("Generator is already executing.");while(s&&(s=0,i[0]&&(o=0)),o)try{if(t=1,r&&(a=i[0]&2?r["return"]:i[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;if(r=0,a)i=[i[0]&2,a.value];switch(i[0]){case 0:case 1:a=i;break;case 4:o.label++;return{value:i[1],done:false};case 5:o.label++;r=i[1];i=[0];continue;case 7:i=o.ops.pop();o.trys.pop();continue;default:if(!(a=o.trys,a=a.length>0&&a[a.length-1])&&(i[0]===6||i[0]===2)){o=0;continue}if(i[0]===3&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(i[0]===6&&o.label<a[1]){o.label=a[1];a=i;break}if(a&&o.label<a[2]){o.label=a[2];o.ops.push(i);break}if(a[2])o.ops.pop();o.trys.pop();continue}i=n.call(e,o)}catch(e){i=[6,e];r=0}finally{t=a=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}}var l=Object.defineProperty;var d=function(e,n){return l(e,"name",{value:n,configurable:!0})};import p from"node-fetch";var f=".cyberskill-storage";import m from"@dotenvx/dotenvx";import{bool as S,cleanEnv as D,str as O}from"envalid";import C from"os";import I from"path";import N from"process";var T=function(e){return e.PRODUCTION="production",e.STAGING="staging",e.DEVELOPMENT="development",e}({});var y=!1;function v(){N.env.NODE_ENV!==T.PRODUCTION&&!y&&(m.config(),y=!0)}d(v,"loadEnvFile");function h(){v();var e=D(N.env,{CWD:O({default:N.cwd()}),DEBUG:S({default:!1}),CYBERSKILL_STORAGE_DIRECTORY:O({default:I.join(C.homedir(),f)})});return{CWD:e.CWD,DEBUG:e.DEBUG,CYBERSKILL_STORAGE_DIRECTORY:e.CYBERSKILL_STORAGE_DIRECTORY}}d(h,"getEnv");var A=function(e){return e.CLI="CLI",e.STRING="STRING",e.FUNCTION="FUNCTION",e}({});import{exec as g}from"child_process";import _ from"process";import*as R from"util";var G=function(e){return e.Error="error",e.Warning="warning",e}({});import P from"chalk";import M from"consola";import{GraphQLError as L}from"graphql";var b={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"}};var U=h();U.DEBUG||(M.level=4);function w(e){var n=P[e];return typeof n=="function"?n:P.green}d(w,"chalkKeyword");var k={silent:M.silent,level:M.level,fatal:M.fatal,error:M.error,warn:M.warn,log:M.log,info:M.info,success:M.success,ready:M.ready,start:M.start,box:M.box,debug:M.debug,trace:M.trace,verbose:M.verbose,printBoxedLog:function e(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"red";if(!(n===null||n===void 0?void 0:n.length)){M.box(P.green(e));return}n.forEach(function(e){var n=e.file,r=e.position,a=e.rule,o=e.message;M.log("".concat(P.gray("File:")," ").concat(P.blue("".concat(n).concat(r?":".concat(r):"")))),a&&M.log(" ".concat(w(t)("Rule:")," ").concat(a)),M.log(" ".concat(w(t)("Message:")," ").concat(o))}),M.box(w(t)("".concat(e," : ").concat(n.length))),M.log(P.gray("─".repeat(40)))}};function V(e,n){var t=n!==null&&n!==void 0?n:{},r=t.shouldLog,o=r===void 0?!0:r,s=t.returnValue,i=t.callback,c=a(e,Error)?e:new Error(typeof e=="string"?e:"Unknown error");return o&&k.error(c.message),i&&typeof i=="function"&&i(c),s||{success:!1,message:c.message,code:b.INTERNAL_SERVER_ERROR.CODE}}d(V,"catchError");var Y=function(e){return e.DEPENDENCY="dependencies",e.DEV_DEPENDENCY="devDependencies",e.PEER_DEPENDENCY="peerDependencies",e.BUNDLE_DEPENDENCY="bundleDependencies",e.OPTIONAL_DEPENDENCY="optionalDependencies",e}({});import F from"fs-extra";import x from"path";var j=h(),K=x,B=K.dirname;function Q(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}var r;return(r=K).resolve.apply(r,[j.CWD].concat(i(n)))}d(Q,"resolveWorkingPath");function H(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}var r;return(r=K).join.apply(r,i(n))}d(H,"join");var q=h(),W=q.CWD,J="@cyberskill/shared",$="node_modules",X="dist",z="public",Z="package.json",ee="package-lock.json",en="tsconfig.json",et=".gitignore",er=".simple-git-hooks.json",ea="pnpm-lock.yaml",eo=".git/hooks/",es=".git/COMMIT_EDITMSG",ei=".migrate-mongo.config.js",ec=function(){var e=F.readJsonSync(Q(Z)).name===J?W:H(W,$,J);return H(e,X)}(),eu="cyberskill",eE="src/node/cli/index.ts",el="eslint",ed="eslint",ep="vitest";var ef="vitest",em="@commitlint/cli",eS="@commitlint/config-conventional",eD="commitlint",eO="lint-staged",eC="lint-staged",eI="typescript",eN="tsc",eT="tsx",ey="git",ev="pnpm",eh="pnpm exec",eA="simple-git-hooks",eg="simple-git-hooks",e_="@eslint/config-inspector",eR="eslint-config-inspector",eG="node-modules-inspector",eP="node-modules-inspector",eM="migrate-mongo",eL="./node_modules/migrate-mongo/bin/migrate-mongo",eb={CYBERSKILL_DIRECTORY:ec,WORKING_DIRECTORY:W,PUBLIC_DIRECTORY:Q(z),TS_CONFIG:Q(en),GIT_IGNORE:Q(et),GIT_HOOK:Q(eo),GIT_COMMIT_MSG:Q(es),SIMPLE_GIT_HOOKS_JSON:Q(er),PACKAGE_JSON:Q(Z),PACKAGE_LOCK_JSON:Q(ee),PNPM_LOCK_YAML:Q(ea),NODE_MODULES:Q($),MIGRATE_MONGO_CONFIG:Q(ei),LINT_STAGED_CONFIG:Q("".concat(ec,"/config/lint-staged/index.js")),COMMITLINT_CONFIG:Q("".concat(ec,"/config/commitlint/index.js")),VITEST_UNIT_CONFIG:Q("".concat(ec,"/config/vitest/vitest.unit.js")),VITEST_UNIT_SETUP_CONFIG:Q("".concat(ec,"/config/vitest/vitest.unit.setup.js")),VITEST_E2E_CONFIG:Q("".concat(ec,"/config/vitest/vitest.e2e.js"))};function eU(e){var n=e.type,t=e.packages,a=e.command;var o=t===null||t===void 0?void 0:t.reduce(function(e,n){return e.some(function(e){return e.name===n.name})||e.push(n),e},[]);return function(){return r(function(){var e;return E(this,function(t){switch(t.label){case 0:switch(n){case A.CLI:return[3,1];case A.STRING:return[3,4]}return[3,5];case 1:e=o===null||o===void 0?void 0:o.length;if(!e)return[3,3];return[4,no(o,{install:!0})];case 2:e=t.sent();t.label=3;case 3:return[2,(e,e$(eW("".concat(eh," ").concat(a))))];case 4:return[2,e$(eW(a))];case 5:throw new Error("Unsupported command type");case 6:return[2]}})})()}}d(eU,"buildCommand");var ew={simpleGitHooks:eU({type:A.CLI,packages:[{name:eA,type:Y.DEV_DEPENDENCY}],command:eg}),eslintInspect:eU({type:A.CLI,packages:[{name:e_,type:Y.DEV_DEPENDENCY}],command:eR}),nodeModulesInspect:eU({type:A.CLI,packages:[{name:eG,type:Y.DEV_DEPENDENCY}],command:eP}),eslintCheck:eU({type:A.CLI,packages:[{name:el,type:Y.DEV_DEPENDENCY}],command:"".concat(ed," ").concat(eb.WORKING_DIRECTORY," --no-cache")}),eslintFix:eU({type:A.CLI,packages:[{name:el,type:Y.DEV_DEPENDENCY}],command:"".concat(ed," ").concat(eb.WORKING_DIRECTORY," --fix --no-cache")}),typescriptCheck:eU({type:A.CLI,packages:[{name:eI,type:Y.DEV_DEPENDENCY}],command:"".concat(eN," -p ").concat(eb.TS_CONFIG," --noEmit")}),testUnit:eU({type:A.CLI,packages:[{name:ep,type:Y.DEV_DEPENDENCY}],command:"".concat(ef," --config ").concat(eb.VITEST_UNIT_CONFIG)}),testE2e:eU({type:A.CLI,packages:[{name:ep,type:Y.DEV_DEPENDENCY}],command:"".concat(ef," --config ").concat(eb.VITEST_E2E_CONFIG)}),mongoMigrateCreate:d(function(e){return eU({type:A.CLI,packages:[{name:eT,type:Y.DEPENDENCY},{name:eM,type:Y.DEPENDENCY}],command:"".concat(eT," ").concat(eL," create ").concat(e," -f ").concat(eb.MIGRATE_MONGO_CONFIG)})()},"mongoMigrateCreate"),mongoMigrateUp:eU({type:A.CLI,packages:[{name:eT,type:Y.DEPENDENCY},{name:eM,type:Y.DEPENDENCY}],command:"".concat(eT," ").concat(eL," up -f ").concat(eb.MIGRATE_MONGO_CONFIG)}),mongoMigrateDown:eU({type:A.CLI,packages:[{name:eT,type:Y.DEPENDENCY},{name:eM,type:Y.DEPENDENCY}],command:"".concat(eT," ").concat(eL," down -f ").concat(eb.MIGRATE_MONGO_CONFIG)}),commitLint:eU({type:A.CLI,packages:[{name:em,type:Y.DEV_DEPENDENCY},{name:eS,type:Y.DEV_DEPENDENCY}],command:"".concat(eD," --edit ").concat(eb.GIT_COMMIT_MSG," --config ").concat(eb.COMMITLINT_CONFIG)}),lintStaged:eU({type:A.CLI,packages:[{name:eO,type:Y.DEV_DEPENDENCY}],command:"".concat(eC," --config ").concat(eb.LINT_STAGED_CONFIG)}),configureGitHook:eU({type:A.STRING,command:"".concat(ey," config core.hooksPath ").concat(eb.GIT_HOOK)}),build:eU({type:A.STRING,command:"".concat(ev," run --if-present build")}),pnpmInstallStandard:eU({type:A.STRING,command:"".concat(ev," install --ignore-scripts")}),pnpmInstallLegacy:eU({type:A.STRING,command:"".concat(ev," install --ignore-scripts --legacy-peer-deps")}),pnpmInstallForce:eU({type:A.STRING,command:"".concat(ev," install --ignore-scripts --force")}),pnpmPruneStore:eU({type:A.STRING,command:"".concat(ev," store prune")}),pnpmCleanCache:eU({type:A.STRING,command:"".concat(ev," cache delete")})};import ek from"node-persist";var eV=h();function eY(){return r(function(){var e;return E(this,function(n){switch(n.label){case 0:e=ek.defaultInstance;if(e)return[3,2];return[4,ek.init({dir:eV.CYBERSKILL_STORAGE_DIRECTORY})];case 1:e=n.sent();n.label=2;case 2:e;return[2]}})})()}d(eY,"initNodePersist");var eF={get:function e(e){return r(function(){var n,t;return E(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,eY()];case 1:r.sent();return[4,ek.getItem(e)];case 2:return[2,(n=r.sent())!==null&&n!==void 0?n:null];case 3:t=r.sent();return[2,V(t,{returnValue:null})];case 4:return[2]}})})()},set:function e(e,n){return r(function(){var t;return E(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,eY()];case 1:r.sent();return[4,ek.setItem(e,n)];case 2:r.sent();return[3,4];case 3:t=r.sent();V(t);return[3,4];case 4:return[2]}})})()},remove:function e(e){return r(function(){var n;return E(this,function(t){switch(t.label){case 0:t.trys.push([0,3,,4]);return[4,eY()];case 1:t.sent();return[4,ek.removeItem(e)];case 2:t.sent();return[3,4];case 3:n=t.sent();V(n);return[3,4];case 4:return[2]}})})()},keys:function e(){return r(function(){var e,n;return E(this,function(t){switch(t.label){case 0:t.trys.push([0,3,,4]);return[4,eY()];case 1:t.sent();return[4,ek.keys()];case 2:e=t.sent();return[2,Array.isArray(e)?e:(k.warn("[Storage:keys] Invalid keys response:",e),[])];case 3:n=t.sent();return[2,V(n,{returnValue:[]})];case 4:return[2]}})})()},getLogLink:function e(e){return r(function(){return E(this,function(n){try{return[2,"".concat(eV.CYBERSKILL_STORAGE_DIRECTORY," (key: ").concat(e,")")]}catch(e){return[2,V(e,{returnValue:null})]}return[2]})})()}};var ex=h(),ej=R.promisify(g);function eK(){return r(function(){var e;return E(this,function(n){switch(n.label){case 0:return[4,nt()];case 1:e=n.sent();return[2,e.success?e.result.name:Date.now().toString()]}})})()}d(eK,"getPackageName");function eB(e){return r(function(){var n,t;return E(this,function(a){switch(a.label){case 0:if(e.length===0)return[2];return[4,eK()];case 1:n=a.sent();a.label=2;case 2:a.trys.push([2,4,,5]);return[4,eF.set(n,e)];case 3:a.sent(),setTimeout(function(){return r(function(){var e;return E(this,function(t){switch(t.label){case 0:return[4,eF.getLogLink(n)];case 1:e=t.sent();e&&k.info("\uD83D\uDCC2 Open the error list manually: ".concat(e));return[2]}})})()},0);return[3,5];case 4:t=a.sent();V(t);return[3,5];case 5:return[2]}})})()}d(eB,"saveErrorListToStorage");function eQ(e){var n=[],t=[],r="",a=/^\s*(\d+):(\d+)\s+(error|warning)\s+(.+?)\s+(\S+)$/,o=/^(.+?)\((\d+),(\d+)\):\s+(error|warning)\s+TS\d+:\s+(\S.+)$/,s=/^✖\s+(.*?)\s+\[(.*?)\]$/;e.split("\n").forEach(function(e){if(e.startsWith("/"))r=e.trim();else{var i,c,u,E,l;var d=a.exec(e)||[],p=o.exec(e)||[],f=s.exec(e)||[];var m,S,D,O,C,I;d.length&&r?n.push({file:r,position:"".concat(d[1],":").concat(d[2]),type:d[3]===G.Error?G.Error:G.Warning,message:(m=d===null||d===void 0?void 0:(i=d[4])===null||i===void 0?void 0:i.trim())!==null&&m!==void 0?m:"",rule:(S=d===null||d===void 0?void 0:(c=d[5])===null||c===void 0?void 0:c.trim())!==null&&S!==void 0?S:""}):p.length?n.push({file:(D=p===null||p===void 0?void 0:p[1])!==null&&D!==void 0?D:"",position:"".concat(p[2],":").concat(p[3]),type:p[4]===G.Error?G.Error:G.Warning,message:(O=p===null||p===void 0?void 0:(u=p[5])===null||u===void 0?void 0:u.trim())!==null&&O!==void 0?O:""}):f.length?n.push({file:"commitlint",type:G.Error,message:(C=f===null||f===void 0?void 0:(E=f[1])===null||E===void 0?void 0:E.trim())!==null&&C!==void 0?C:"",rule:(I=f===null||f===void 0?void 0:(l=f[2])===null||l===void 0?void 0:l.trim())!==null&&I!==void 0?I:""}):t.push(e.trim())}}),n.length&&eB(n),ex.DEBUG&&t.length&&(k.warn("Unmatched lines:"),t.forEach(function(e){return k.info(" ".concat(e))}))}d(eQ,"parseTextErrors");function eH(e){try{var n=JSON.parse(e),t=[];n.forEach(function(e){var n=e.filePath,r=e.messages;r.forEach(function(e){var r=e.severity,a=e.line,o=e.column,s=e.ruleId,i=e.message;t.push({type:r===2?G.Error:G.Warning,file:n,position:"".concat(a,":").concat(o),rule:s,message:i})})}),t.length&&eB(t)}catch(n){eQ(e)}}d(eH,"parseCommandOutput");function eq(e){return r(function(e){var n,t,r,a,o,s,i,c,u;var l=arguments;return E(this,function(E){switch(E.label){case 0:n=l.length>1&&l[1]!==void 0?l[1]:eH;t=new AbortController;_.on("SIGINT",function(){k.warn("Process interrupted. Terminating..."),t.abort(),_.exit()});E.label=1;case 1:E.trys.push([1,4,,5]);if(!(typeof e=="string"))return[3,3];return[4,ej(e,{maxBuffer:0x6400000,signal:t.signal})];case 2:r=E.sent(),a=r.stdout,o=r.stderr;[a,o].forEach(function(e){return e&&n(e)});E.label=3;case 3:return[3,5];case 4:s=E.sent();i=s.stdout,c=s.stderr,u=s.message;[i,c].forEach(function(e){return e&&n(e)}),!c&&!i&&k.error("Command failed: ".concat(u));return[3,5];case 5:return[2]}})}).apply(this,arguments)}d(eq,"executeCommand");function eW(e){return{raw:!0,cmd:e}}d(eW,"rawCommand");function eJ(e,n){return(n===null||n===void 0?void 0:n.isCurrentProject)?"".concat(eh," ").concat(eT," ").concat(eE," ").concat(e):"".concat(eh," ").concat(eu," ").concat(e)}d(eJ,"formatCLI");function e$(e,n){return typeof e=="function"?eJ(e(n),n):(typeof e==="undefined"?"undefined":c(e))=="object"&&(e===null||e===void 0?void 0:e.raw)===!0?e.cmd:typeof e=="string"?eJ(e,n):e}d(e$,"formatCommand");function eX(e,n){return r(function(){var t;return E(this,function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);k.start("".concat(e)),ex.DEBUG&&k.info("→ ".concat(n));return[4,eq(n)];case 1:r.sent(),k.success("".concat(e," done."));return[3,3];case 2:t=r.sent();V(t);return[3,3];case 3:return[2]}})})()}d(eX,"runCommand");import ez from"fs-extra";import eZ from"path";var e0=ez.lstatSync,e1=ez.readdirSync,e2=ez.mkdirSync,e4=ez.readFileSync,e3=ez.unlinkSync,e5=ez.statSync,e6=ez.createWriteStream,e7=ez.readJsonSync;function e8(e,n,t){ez.writeFileSync(e,n,t!==null&&t!==void 0?t:"utf-8")}d(e8,"writeFileSync");function e9(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}return n.every(function(e){return ez.pathExistsSync(e)})}d(e9,"pathExistsSync");var ne=h();function nn(e){return r(function(){var n,t,r,a;return E(this,function(o){switch(o.label){case 0:o.trys.push([0,3,,4]);return[4,p("https://registry.npmjs.org/".concat(e,"/latest"))];case 1:n=o.sent();if(!n.ok)throw new Error("Failed to fetch latest version: ".concat(n.status," ").concat(n.statusText));return[4,n.json()];case 2:t=o.sent(),r=t.version;return[2,{success:!0,result:r}];case 3:a=o.sent();return[2,V(a)];case 4:return[2]}})})()}d(nn,"getLatestPackageVersion");function nt(e){return r(function(){var n,t,r,a,o,s,i,c,u,l,d,p,f,m,S,D,O,C,I,N,T,y,v,h;return E(this,function(E){switch(E.label){case 0:E.trys.push([0,2,,3]);if(!e){if(e9(eb.PACKAGE_JSON)){n=e7(eb.PACKAGE_JSON),t=n.name,r=t===void 0?"":t,a=n.version,o=a===void 0?"":a;return[2,{success:!0,result:{name:r,currentVersion:o,latestVersion:o,isCurrentProject:!0,isInstalled:!0,isUpToDate:!0,isDependency:!1,isDevDependency:!1,installedPath:eb.PACKAGE_JSON,file:n}}]}return[2,{success:!0,result:{name:"",currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:!1,isDevDependency:!1,installedPath:"",file:{}}}]}if(!e9(eb.PACKAGE_JSON))return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:e.type===Y.DEPENDENCY,isDevDependency:e.type===Y.DEV_DEPENDENCY,installedPath:"",file:{}}}];s=e7(eb.PACKAGE_JSON),i=s.name,c=s.version,u=c===void 0?"":c,l=s.dependencies,d=l===void 0?{}:l,p=s.devDependencies,f=p===void 0?{}:p;if(e.name===i)return[2,{success:!0,result:{name:i,currentVersion:u,latestVersion:u,isCurrentProject:!0,isInstalled:!0,isUpToDate:!0,isDependency:e.type===Y.DEPENDENCY,isDevDependency:e.type===Y.DEV_DEPENDENCY,installedPath:eb.PACKAGE_JSON,file:s}}];m=e.name in d,S=e.name in f;return[4,nn(e.name)];case 1:D=E.sent();if(!D.success)return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:m,isDevDependency:S,installedPath:"",file:{}}}];if(!m&&!S)return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:D.result,isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:e.type===Y.DEPENDENCY,isDevDependency:e.type===Y.DEV_DEPENDENCY,installedPath:"",file:{}}}];I=(C=(O=d[e.name])!==null&&O!==void 0?O:f[e.name])!==null&&C!==void 0?C:"",N=H(ne.CWD,$,e.name,Z);if(!e9(N))return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:D.result,isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:m,isDevDependency:S,installedPath:"",file:{}}}];T=e7(N),y=T.version,v=y===void 0?"":y;return[2,I!==v?{success:!0,result:{name:e.name,currentVersion:v||I,latestVersion:D.result,isCurrentProject:!1,isInstalled:!0,isUpToDate:!1,isDependency:m,isDevDependency:S,installedPath:N,file:T}}:{success:!0,result:{name:e.name,currentVersion:I,latestVersion:D.result,isCurrentProject:!1,isInstalled:!0,isUpToDate:I===D.result,isDependency:m,isDevDependency:S,installedPath:N,file:T}}];case 2:h=E.sent();return[2,V(h)];case 3:return[2]}})})()}d(nt,"getPackage");function nr(e){return r(function(){var n,t,r,a,o;return E(this,function(s){try{;r=e7(eb.PACKAGE_JSON),a=(n=r.dependencies)!==null&&n!==void 0?n:{},o=(t=r.devDependencies)!==null&&t!==void 0?t:{};e.isDependency?a[e.name]=e.latestVersion:e.isDevDependency&&(o[e.name]=e.latestVersion),e8(eb.PACKAGE_JSON,JSON.stringify(r,null,4)),k.info('Updated "'.concat(e.name,'" to version ').concat(e.latestVersion))}catch(e){V(e)}return[2]})})()}d(nr,"updatePackage");function na(){return r(function(){var e,n,t,r,a,o,s,i,c,u,l,p,f;return E(this,function(E){switch(E.label){case 0:E.trys.push([0,12,,13]);e=[{command:d(function(){return ew.pnpmInstallStandard()},"command"),message:"Installing dependencies (standard)"},{command:d(function(){return ew.pnpmInstallLegacy()},"command"),message:"Retrying with legacy peer dependencies"},{command:d(function(){return ew.pnpmInstallForce()},"command"),message:"Retrying with force install"}];n=true,t=false,r=undefined;E.label=1;case 1:E.trys.push([1,9,10,11]);a=e[Symbol.iterator]();E.label=2;case 2:if(!!(n=(o=a.next()).done))return[3,8];s=o.value,i=s.command,c=s.message;E.label=3;case 3:E.trys.push([3,6,,7]);return[4,i()];case 4:u=E.sent();return[4,eX("".concat(c," using: ").concat(u),u)];case 5:E.sent();return[2];case 6:l=E.sent();V(l);return[3,7];case 7:n=true;return[3,2];case 8:return[3,11];case 9:p=E.sent();t=true;r=p;return[3,11];case 10:try{if(!n&&a.return!=null){a.return()}}finally{if(t){throw r}}return[7];case 11:return[3,13];case 12:f=E.sent();V(f);return[3,13];case 13:return[2]}})})()}d(na,"installDependencies");function no(e,n){return r(function(){var t,r,a,o,s,c,u,l,d,p,f,m,S,D,O,C,I;return E(this,function(E){switch(E.label){case 0:E.trys.push([0,15,,16]);if(!e9(eb.PACKAGE_JSON)){k.error("package.json not found. Aborting setup.");return[2]}return[4,Promise.all(e.map(nt))];case 1:a=E.sent().filter(function(e){return e.success&&!!e.result&&!e.result.isCurrentProject}).map(function(e){return e.result}),o=a.filter(function(e){return!e.isInstalled}),s=a.filter(function(e){return!e.isUpToDate}),c=[];(n===null||n===void 0?void 0:n.install)&&o.length>0&&(t=c).push.apply(t,i(o.map(nr))),(n===null||n===void 0?void 0:n.update)&&s.length>0&&(r=c).push.apply(r,i(s.map(nr)));u=c.length>0;if(!u)return[3,6];return[4,Promise.all(c)];case 2:E.sent();return[4,na()];case 3:E.sent();l=["Running ESLint with auto-fix"];return[4,ew.eslintFix()];case 4:return[4,eX.apply(void 0,l.concat([E.sent()]))];case 5:u=E.sent();E.label=6;case 6:u;p=true,f=false,m=undefined;E.label=7;case 7:E.trys.push([7,12,13,14]);S=((d=n===null||n===void 0?void 0:n.callbacks)!==null&&d!==void 0?d:[])[Symbol.iterator]();E.label=8;case 8:if(!!(p=(D=S.next()).done))return[3,11];O=D.value;return[4,O()];case 9:E.sent();E.label=10;case 10:p=true;return[3,8];case 11:return[3,14];case 12:C=E.sent();f=true;m=C;return[3,14];case 13:try{if(!p&&S.return!=null){S.return()}}finally{if(f){throw m}}return[7];case 14:return[3,16];case 15:I=E.sent();V(I);return[3,16];case 16:return[2]}})})()}d(no,"setupPackages");export{nn as getLatestPackageVersion,nt as getPackage,na as installDependencies,no as setupPackages,nr as updatePackage};
@@ -1 +0,0 @@
1
- "use strict";function e(e,n){if(n==null||n>e.length)n=e.length;for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function n(n){if(Array.isArray(n))return e(n)}function t(e,n,t,r,a,o,i){try{var c=e[o](i);var u=c.value}catch(e){t(e);return}if(c.done){n(u)}else{Promise.resolve(u).then(r,a)}}function r(e){return function(){var n=this,r=arguments;return new Promise(function(a,o){var i=e.apply(n,r);function c(e){t(i,a,o,c,u,"next",e)}function u(e){t(i,a,o,c,u,"throw",e)}c(undefined)})}}function a(e,n,t){if(n in e){Object.defineProperty(e,n,{value:t,enumerable:true,configurable:true,writable:true})}else{e[n]=t}return e}function o(e,n){if(n!=null&&typeof Symbol!=="undefined"&&n[Symbol.hasInstance]){return!!n[Symbol.hasInstance](e)}else{return e instanceof n}}function i(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};var r=Object.keys(t);if(typeof Object.getOwnPropertySymbols==="function"){r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))}r.forEach(function(n){a(e,n,t[n])})}return e}function s(e){return n(e)||i(e)||l(e)||c()}function E(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function l(n,t){if(!n)return;if(typeof n==="string")return e(n,t);var r=Object.prototype.toString.call(n).slice(8,-1);if(r==="Object"&&n.constructor)r=n.constructor.name;if(r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(n,t)}function _(e,n){var t,r,a,o={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=c(0),i["throw"]=c(1),i["return"]=c(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(e){return function(n){return u([e,n])}}function u(c){if(t)throw new TypeError("Generator is already executing.");while(i&&(i=0,c[0]&&(o=0)),o)try{if(t=1,r&&(a=c[0]&2?r["return"]:c[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,c[1])).done)return a;if(r=0,a)c=[c[0]&2,a.value];switch(c[0]){case 0:case 1:a=c;break;case 4:o.label++;return{value:c[1],done:false};case 5:o.label++;r=c[1];c=[0];continue;case 7:c=o.ops.pop();o.trys.pop();continue;default:if(!(a=o.trys,a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){o=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){o.label=c[1];break}if(c[0]===6&&o.label<a[1]){o.label=a[1];a=c;break}if(a&&o.label<a[2]){o.label=a[2];o.ops.push(c);break}if(a[2])o.ops.pop();o.trys.pop();continue}c=n.call(e,o)}catch(e){c=[6,e];r=0}finally{t=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}}var f=Object.create;var I=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty;var N=function(e,n){return I(e,"name",{value:n,configurable:!0})};var T=function(e,n){for(var t in n)I(e,t,{get:n[t],enumerable:!0})},A=function(e,n,t,r){var a=true,o=false,i=undefined;if(n&&(typeof n==="undefined"?"undefined":E(n))=="object"||typeof n=="function")try{var c=function(){var a=s.value;!S.call(e,a)&&a!==t&&I(e,a,{get:function(){return n[a]},enumerable:!(r=C(n,a))||r.enumerable})};for(var u=d(n)[Symbol.iterator](),s;!(a=(s=u.next()).done);a=true)c()}catch(e){o=true;i=e}finally{try{if(!a&&u.return!=null){u.return()}}finally{if(o){throw i}}}return e};var p=function(e,n,t){return t=e!=null?f(O(e)):{},A(n||!e||!e.__esModule?I(t,"default",{value:e,enumerable:!0}):t,e)},D=function(e){return A(I({},"__esModule",{value:!0}),e)};var m={};T(m,{BUILD_DIRECTORY:function(){return ej},COMMIT_LINT_CLI:function(){return e9},COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME:function(){return e8},COMMIT_LINT_PACKAGE_NAME:function(){return e7},CYBERSKILL_CLI:function(){return e0},CYBERSKILL_CLI_PATH:function(){return e1},CYBERSKILL_DIRECTORY:function(){return eZ},CYBERSKILL_PACKAGE_NAME:function(){return eF},ESLINT_CLI:function(){return e4},ESLINT_INSPECT_CLI:function(){return nl},ESLINT_INSPECT_PACKAGE_NAME:function(){return nE},ESLINT_PACKAGE_NAME:function(){return e2},GIT_CLI:function(){return no},GIT_COMMIT_EDITMSG:function(){return e$},GIT_HOOK:function(){return eX},GIT_IGNORE:function(){return eW},LINT_STAGED_CLI:function(){return nn},LINT_STAGED_PACKAGE_NAME:function(){return ne},MIGRATE_MONGO_CLI:function(){return nC},MIGRATE_MONGO_CONFIG:function(){return ez},MIGRATE_MONGO_PACKAGE_NAME:function(){return nI},NODE_MODULES:function(){return ek},NODE_MODULES_INSPECT_CLI:function(){return nf},NODE_MODULES_INSPECT_PACKAGE_NAME:function(){return n_},PACKAGE_JSON:function(){return eB},PACKAGE_LOCK_JSON:function(){return ex},PATH:function(){return nd},PLAYWRIGHT_PACKAGE_NAME:function(){return e5},PNPM_CLI:function(){return ni},PNPM_EXEC_CLI:function(){return nc},PNPM_LOCK_YAML:function(){return eQ},PUBLIC_DIRECTORY:function(){return eH},SIMPLE_GIT_HOOKS_PACKAGE_NAME:function(){return nu},SIMPLE_GIT_HOOK_CLI:function(){return ns},SIMPLE_GIT_HOOK_JSON:function(){return eJ},TSCONFIG_JSON:function(){return eq},TSC_CLI:function(){return nr},TSC_PACKAGE_NAME:function(){return nt},TSX_CLI:function(){return na},VITEST_CLI:function(){return e6},VITEST_PACKAGE_NAME:function(){return e3},WORKING_DIRECTORY:function(){return eV},command:function(){return nN},createGitHooksConfig:function(){return nO},dirname:function(){return eb},join:function(){return eY},path:function(){return eg},resolve:function(){return eK},resolveWorkingPath:function(){return eU}});module.exports=D(m);var G=p(require("fs-extra"),1);var P=".cyberskill-storage";var L=p(require("@dotenvx/dotenvx"),1),v=require("envalid"),M=p(require("os"),1),y=p(require("path"),1),R=p(require("process"),1);var h=function(e){return e.PRODUCTION="production",e.STAGING="staging",e.DEVELOPMENT="development",e}({});var g=!1;function b(){R.default.env.NODE_ENV!==h.PRODUCTION&&!g&&(L.default.config(),g=!0)}N(b,"loadEnvFile");function U(){b();var e=(0,v.cleanEnv)(R.default.env,{CWD:(0,v.str)({default:R.default.cwd()}),DEBUG:(0,v.bool)({default:!1}),CYBERSKILL_STORAGE_DIRECTORY:(0,v.str)({default:y.default.join(M.default.homedir(),P)})});return{CWD:e.CWD,DEBUG:e.DEBUG,CYBERSKILL_STORAGE_DIRECTORY:e.CYBERSKILL_STORAGE_DIRECTORY}}N(U,"getEnv");var K=function(e){return e.CLI="CLI",e.STRING="STRING",e.FUNCTION="FUNCTION",e}({});var Y=require("child_process"),w=p(require("process"),1),V=p(require("util"),1);var F=function(e){return e.Error="error",e.Warning="warning",e}({});var k=p(require("chalk"),1),j=p(require("consola"),1),H=require("graphql");var B={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"}};var x=U();x.DEBUG||(j.default.level=4);function q(e){var n=k.default[e];return typeof n=="function"?n:k.default.green}N(q,"chalkKeyword");var W={silent:j.default.silent,level:j.default.level,fatal:j.default.fatal,error:j.default.error,warn:j.default.warn,log:j.default.log,info:j.default.info,success:j.default.success,ready:j.default.ready,start:j.default.start,box:j.default.box,debug:j.default.debug,trace:j.default.trace,verbose:j.default.verbose,printBoxedLog:function e(e,n){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"red";if(!(n===null||n===void 0?void 0:n.length)){j.default.box(k.default.green(e));return}n.forEach(function(e){var n=e.file,r=e.position,a=e.rule,o=e.message;j.default.log("".concat(k.default.gray("File:")," ").concat(k.default.blue("".concat(n).concat(r?":".concat(r):"")))),a&&j.default.log(" ".concat(q(t)("Rule:")," ").concat(a)),j.default.log(" ".concat(q(t)("Message:")," ").concat(o))}),j.default.box(q(t)("".concat(e," : ").concat(n.length))),j.default.log(k.default.gray("─".repeat(40)))}};function J(e,n){var t=n!==null&&n!==void 0?n:{},r=t.shouldLog,a=r===void 0?!0:r,i=t.returnValue,c=t.callback,u=o(e,Error)?e:new Error(typeof e=="string"?e:"Unknown error");return a&&W.error(u.message),c&&typeof c=="function"&&c(u),i||{success:!1,message:u.message,code:B.INTERNAL_SERVER_ERROR.CODE}}N(J,"catchError");var Q=function(e){return e.DEPENDENCY="dependencies",e.DEV_DEPENDENCY="devDependencies",e.PEER_DEPENDENCY="peerDependencies",e.BUNDLE_DEPENDENCY="bundleDependencies",e.OPTIONAL_DEPENDENCY="optionalDependencies",e}({});var X=p(require("node-fetch"),1);var $=p(require("fs-extra"),1),z=p(require("path"),1);var Z=$.default,ee=Z.lstatSync,en=Z.readdirSync,et=Z.mkdirSync,er=Z.readFileSync,ea=Z.unlinkSync,eo=Z.statSync,ei=Z.createWriteStream,ec=$.default.readJsonSync;function eu(e,n,t){$.default.writeFileSync(e,n,t!==null&&t!==void 0?t:"utf-8")}N(eu,"writeFileSync");function es(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}return n.every(function(e){return $.default.pathExistsSync(e)})}N(es,"pathExistsSync");var eE=U();function el(e){return r(function(){var n,t,r,a;return _(this,function(o){switch(o.label){case 0:o.trys.push([0,3,,4]);return[4,(0,X.default)("https://registry.npmjs.org/".concat(e,"/latest"))];case 1:n=o.sent();if(!n.ok)throw new Error("Failed to fetch latest version: ".concat(n.status," ").concat(n.statusText));return[4,n.json()];case 2:t=o.sent(),r=t.version;return[2,{success:!0,result:r}];case 3:a=o.sent();return[2,J(a)];case 4:return[2]}})})()}N(el,"getLatestPackageVersion");function e_(e){return r(function(){var n,t,r,a,o,i,c,u,s,E,l,f,I,C,d,O,S,N,T,A,p,D,m,G;return _(this,function(_){switch(_.label){case 0:_.trys.push([0,2,,3]);if(!e){if(es(nd.PACKAGE_JSON)){n=ec(nd.PACKAGE_JSON),t=n.name,r=t===void 0?"":t,a=n.version,o=a===void 0?"":a;return[2,{success:!0,result:{name:r,currentVersion:o,latestVersion:o,isCurrentProject:!0,isInstalled:!0,isUpToDate:!0,isDependency:!1,isDevDependency:!1,installedPath:nd.PACKAGE_JSON,file:n}}]}return[2,{success:!0,result:{name:"",currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:!1,isDevDependency:!1,installedPath:"",file:{}}}]}if(!es(nd.PACKAGE_JSON))return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:e.type===Q.DEPENDENCY,isDevDependency:e.type===Q.DEV_DEPENDENCY,installedPath:"",file:{}}}];i=ec(nd.PACKAGE_JSON),c=i.name,u=i.version,s=u===void 0?"":u,E=i.dependencies,l=E===void 0?{}:E,f=i.devDependencies,I=f===void 0?{}:f;if(e.name===c)return[2,{success:!0,result:{name:c,currentVersion:s,latestVersion:s,isCurrentProject:!0,isInstalled:!0,isUpToDate:!0,isDependency:e.type===Q.DEPENDENCY,isDevDependency:e.type===Q.DEV_DEPENDENCY,installedPath:nd.PACKAGE_JSON,file:i}}];C=e.name in l,d=e.name in I;return[4,el(e.name)];case 1:O=_.sent();if(!O.success)return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:C,isDevDependency:d,installedPath:"",file:{}}}];if(!C&&!d)return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:O.result,isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:e.type===Q.DEPENDENCY,isDevDependency:e.type===Q.DEV_DEPENDENCY,installedPath:"",file:{}}}];T=(N=(S=l[e.name])!==null&&S!==void 0?S:I[e.name])!==null&&N!==void 0?N:"",A=eY(eE.CWD,ek,e.name,eB);if(!es(A))return[2,{success:!0,result:{name:e.name,currentVersion:"",latestVersion:O.result,isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:C,isDevDependency:d,installedPath:"",file:{}}}];p=ec(A),D=p.version,m=D===void 0?"":D;return[2,T!==m?{success:!0,result:{name:e.name,currentVersion:m||T,latestVersion:O.result,isCurrentProject:!1,isInstalled:!0,isUpToDate:!1,isDependency:C,isDevDependency:d,installedPath:A,file:p}}:{success:!0,result:{name:e.name,currentVersion:T,latestVersion:O.result,isCurrentProject:!1,isInstalled:!0,isUpToDate:T===O.result,isDependency:C,isDevDependency:d,installedPath:A,file:p}}];case 2:G=_.sent();return[2,J(G)];case 3:return[2]}})})()}N(e_,"getPackage");function ef(e){return r(function(){var n,t,r,a,o;return _(this,function(i){try{;r=ec(nd.PACKAGE_JSON),a=(n=r.dependencies)!==null&&n!==void 0?n:{},o=(t=r.devDependencies)!==null&&t!==void 0?t:{};e.isDependency?a[e.name]=e.latestVersion:e.isDevDependency&&(o[e.name]=e.latestVersion),eu(nd.PACKAGE_JSON,JSON.stringify(r,null,4)),W.info('Updated "'.concat(e.name,'" to version ').concat(e.latestVersion))}catch(e){J(e)}return[2]})})()}N(ef,"updatePackage");function eI(){return r(function(){var e,n,t,r,a,o,i,c,u,s,E,l,f;return _(this,function(_){switch(_.label){case 0:_.trys.push([0,12,,13]);e=[{command:N(function(){return nN.pnpmInstallStandard()},"command"),message:"Installing dependencies (standard)"},{command:N(function(){return nN.pnpmInstallLegacy()},"command"),message:"Retrying with legacy peer dependencies"},{command:N(function(){return nN.pnpmInstallForce()},"command"),message:"Retrying with force install"}];n=true,t=false,r=undefined;_.label=1;case 1:_.trys.push([1,9,10,11]);a=e[Symbol.iterator]();_.label=2;case 2:if(!!(n=(o=a.next()).done))return[3,8];i=o.value,c=i.command,u=i.message;_.label=3;case 3:_.trys.push([3,6,,7]);return[4,c()];case 4:s=_.sent();return[4,ey("".concat(u," using: ").concat(s),s)];case 5:_.sent();return[2];case 6:E=_.sent();J(E);return[3,7];case 7:n=true;return[3,2];case 8:return[3,11];case 9:l=_.sent();t=true;r=l;return[3,11];case 10:try{if(!n&&a.return!=null){a.return()}}finally{if(t){throw r}}return[7];case 11:return[3,13];case 12:f=_.sent();J(f);return[3,13];case 13:return[2]}})})()}N(eI,"installDependencies");function eC(e,n){return r(function(){var t,r,a,o,i,c,u,E,l,f,I,C,d,O,S,N,T;return _(this,function(_){switch(_.label){case 0:_.trys.push([0,15,,16]);if(!es(nd.PACKAGE_JSON)){W.error("package.json not found. Aborting setup.");return[2]}return[4,Promise.all(e.map(e_))];case 1:a=_.sent().filter(function(e){return e.success&&!!e.result&&!e.result.isCurrentProject}).map(function(e){return e.result}),o=a.filter(function(e){return!e.isInstalled}),i=a.filter(function(e){return!e.isUpToDate}),c=[];(n===null||n===void 0?void 0:n.install)&&o.length>0&&(t=c).push.apply(t,s(o.map(ef))),(n===null||n===void 0?void 0:n.update)&&i.length>0&&(r=c).push.apply(r,s(i.map(ef)));u=c.length>0;if(!u)return[3,6];return[4,Promise.all(c)];case 2:_.sent();return[4,eI()];case 3:_.sent();E=["Running ESLint with auto-fix"];return[4,nN.eslintFix()];case 4:return[4,ey.apply(void 0,E.concat([_.sent()]))];case 5:u=_.sent();_.label=6;case 6:u;f=true,I=false,C=undefined;_.label=7;case 7:_.trys.push([7,12,13,14]);d=((l=n===null||n===void 0?void 0:n.callbacks)!==null&&l!==void 0?l:[])[Symbol.iterator]();_.label=8;case 8:if(!!(f=(O=d.next()).done))return[3,11];S=O.value;return[4,S()];case 9:_.sent();_.label=10;case 10:f=true;return[3,8];case 11:return[3,14];case 12:N=_.sent();I=true;C=N;return[3,14];case 13:try{if(!f&&d.return!=null){d.return()}}finally{if(I){throw C}}return[7];case 14:return[3,16];case 15:T=_.sent();J(T);return[3,16];case 16:return[2]}})})()}N(eC,"setupPackages");var ed=p(require("node-persist"),1);var eO=U();function eS(){return r(function(){var e;return _(this,function(n){switch(n.label){case 0:e=ed.default.defaultInstance;if(e)return[3,2];return[4,ed.default.init({dir:eO.CYBERSKILL_STORAGE_DIRECTORY})];case 1:e=n.sent();n.label=2;case 2:e;return[2]}})})()}N(eS,"initNodePersist");var eN={get:function e(e){return r(function(){var n,t;return _(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,eS()];case 1:r.sent();return[4,ed.default.getItem(e)];case 2:return[2,(n=r.sent())!==null&&n!==void 0?n:null];case 3:t=r.sent();return[2,J(t,{returnValue:null})];case 4:return[2]}})})()},set:function e(e,n){return r(function(){var t;return _(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,eS()];case 1:r.sent();return[4,ed.default.setItem(e,n)];case 2:r.sent();return[3,4];case 3:t=r.sent();J(t);return[3,4];case 4:return[2]}})})()},remove:function e(e){return r(function(){var n;return _(this,function(t){switch(t.label){case 0:t.trys.push([0,3,,4]);return[4,eS()];case 1:t.sent();return[4,ed.default.removeItem(e)];case 2:t.sent();return[3,4];case 3:n=t.sent();J(n);return[3,4];case 4:return[2]}})})()},keys:function e(){return r(function(){var e,n;return _(this,function(t){switch(t.label){case 0:t.trys.push([0,3,,4]);return[4,eS()];case 1:t.sent();return[4,ed.default.keys()];case 2:e=t.sent();return[2,Array.isArray(e)?e:(W.warn("[Storage:keys] Invalid keys response:",e),[])];case 3:n=t.sent();return[2,J(n,{returnValue:[]})];case 4:return[2]}})})()},getLogLink:function e(e){return r(function(){return _(this,function(n){try{return[2,"".concat(eO.CYBERSKILL_STORAGE_DIRECTORY," (key: ").concat(e,")")]}catch(e){return[2,J(e,{returnValue:null})]}return[2]})})()}};var eT=U(),eA=V.promisify(Y.exec);function ep(){return r(function(){var e;return _(this,function(n){switch(n.label){case 0:return[4,e_()];case 1:e=n.sent();return[2,e.success?e.result.name:Date.now().toString()]}})})()}N(ep,"getPackageName");function eD(e){return r(function(){var n,t;return _(this,function(a){switch(a.label){case 0:if(e.length===0)return[2];return[4,ep()];case 1:n=a.sent();a.label=2;case 2:a.trys.push([2,4,,5]);return[4,eN.set(n,e)];case 3:a.sent(),setTimeout(function(){return r(function(){var e;return _(this,function(t){switch(t.label){case 0:return[4,eN.getLogLink(n)];case 1:e=t.sent();e&&W.info("\uD83D\uDCC2 Open the error list manually: ".concat(e));return[2]}})})()},0);return[3,5];case 4:t=a.sent();J(t);return[3,5];case 5:return[2]}})})()}N(eD,"saveErrorListToStorage");function em(e){var n=[],t=[],r="",a=/^\s*(\d+):(\d+)\s+(error|warning)\s+(.+?)\s+(\S+)$/,o=/^(.+?)\((\d+),(\d+)\):\s+(error|warning)\s+TS\d+:\s+(\S.+)$/,i=/^✖\s+(.*?)\s+\[(.*?)\]$/;e.split("\n").forEach(function(e){if(e.startsWith("/"))r=e.trim();else{var c,u,s,E,l;var _=a.exec(e)||[],f=o.exec(e)||[],I=i.exec(e)||[];var C,d,O,S,N,T;_.length&&r?n.push({file:r,position:"".concat(_[1],":").concat(_[2]),type:_[3]===F.Error?F.Error:F.Warning,message:(C=_===null||_===void 0?void 0:(c=_[4])===null||c===void 0?void 0:c.trim())!==null&&C!==void 0?C:"",rule:(d=_===null||_===void 0?void 0:(u=_[5])===null||u===void 0?void 0:u.trim())!==null&&d!==void 0?d:""}):f.length?n.push({file:(O=f===null||f===void 0?void 0:f[1])!==null&&O!==void 0?O:"",position:"".concat(f[2],":").concat(f[3]),type:f[4]===F.Error?F.Error:F.Warning,message:(S=f===null||f===void 0?void 0:(s=f[5])===null||s===void 0?void 0:s.trim())!==null&&S!==void 0?S:""}):I.length?n.push({file:"commitlint",type:F.Error,message:(N=I===null||I===void 0?void 0:(E=I[1])===null||E===void 0?void 0:E.trim())!==null&&N!==void 0?N:"",rule:(T=I===null||I===void 0?void 0:(l=I[2])===null||l===void 0?void 0:l.trim())!==null&&T!==void 0?T:""}):t.push(e.trim())}}),n.length&&eD(n),eT.DEBUG&&t.length&&(W.warn("Unmatched lines:"),t.forEach(function(e){return W.info(" ".concat(e))}))}N(em,"parseTextErrors");function eG(e){try{var n=JSON.parse(e),t=[];n.forEach(function(e){var n=e.filePath,r=e.messages;r.forEach(function(e){var r=e.severity,a=e.line,o=e.column,i=e.ruleId,c=e.message;t.push({type:r===2?F.Error:F.Warning,file:n,position:"".concat(a,":").concat(o),rule:i,message:c})})}),t.length&&eD(t)}catch(n){em(e)}}N(eG,"parseCommandOutput");function eP(e){return r(function(e){var n,t,r,a,o,i,c,u,s;var E=arguments;return _(this,function(l){switch(l.label){case 0:n=E.length>1&&E[1]!==void 0?E[1]:eG;t=new AbortController;w.default.on("SIGINT",function(){W.warn("Process interrupted. Terminating..."),t.abort(),w.default.exit()});l.label=1;case 1:l.trys.push([1,4,,5]);if(!(typeof e=="string"))return[3,3];return[4,eA(e,{maxBuffer:0x6400000,signal:t.signal})];case 2:r=l.sent(),a=r.stdout,o=r.stderr;[a,o].forEach(function(e){return e&&n(e)});l.label=3;case 3:return[3,5];case 4:i=l.sent();c=i.stdout,u=i.stderr,s=i.message;[c,u].forEach(function(e){return e&&n(e)}),!u&&!c&&W.error("Command failed: ".concat(s));return[3,5];case 5:return[2]}})}).apply(this,arguments)}N(eP,"executeCommand");function eL(e){return{raw:!0,cmd:e}}N(eL,"rawCommand");function ev(e,n){return(n===null||n===void 0?void 0:n.isCurrentProject)?"".concat(nc," ").concat(na," ").concat(e1," ").concat(e):"".concat(nc," ").concat(e0," ").concat(e)}N(ev,"formatCLI");function eM(e,n){return typeof e=="function"?ev(e(n),n):(typeof e==="undefined"?"undefined":E(e))=="object"&&(e===null||e===void 0?void 0:e.raw)===!0?e.cmd:typeof e=="string"?ev(e,n):e}N(eM,"formatCommand");function ey(e,n){return r(function(){var t;return _(this,function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);W.start("".concat(e)),eT.DEBUG&&W.info("→ ".concat(n));return[4,eP(n)];case 1:r.sent(),W.success("".concat(e," done."));return[3,3];case 2:t=r.sent();J(t);return[3,3];case 3:return[2]}})})()}N(ey,"runCommand");var eR=p(require("path"),1);var eh=U(),eg=eR.default,eb=eg.dirname;function eU(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}var r;return(r=eg).resolve.apply(r,[eh.CWD].concat(s(n)))}N(eU,"resolveWorkingPath");function eK(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}var r;return(r=eg).resolve.apply(r,s(n))}N(eK,"resolve");function eY(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++){n[t]=arguments[t]}var r;return(r=eg).join.apply(r,s(n))}N(eY,"join");var ew=U(),eV=ew.CWD,eF="@cyberskill/shared",ek="node_modules",ej="dist",eH="public",eB="package.json",ex="package-lock.json",eq="tsconfig.json",eW=".gitignore",eJ=".simple-git-hooks.json",eQ="pnpm-lock.yaml",eX=".git/hooks/",e$=".git/COMMIT_EDITMSG",ez=".migrate-mongo.config.js",eZ=function(){var e=G.default.readJsonSync(eU(eB)).name===eF?eV:eY(eV,ek,eF);return eY(e,ej)}(),e0="cyberskill",e1="src/node/cli/index.ts",e2="eslint",e4="eslint",e3="vitest",e5="playwright",e6="vitest",e7="@commitlint/cli",e8="@commitlint/config-conventional",e9="commitlint",ne="lint-staged",nn="lint-staged",nt="typescript",nr="tsc",na="tsx",no="git",ni="pnpm",nc="pnpm exec",nu="simple-git-hooks",ns="simple-git-hooks",nE="@eslint/config-inspector",nl="eslint-config-inspector",n_="node-modules-inspector",nf="node-modules-inspector",nI="migrate-mongo",nC="./node_modules/migrate-mongo/bin/migrate-mongo",nd={CYBERSKILL_DIRECTORY:eZ,WORKING_DIRECTORY:eV,PUBLIC_DIRECTORY:eU(eH),TS_CONFIG:eU(eq),GIT_IGNORE:eU(eW),GIT_HOOK:eU(eX),GIT_COMMIT_MSG:eU(e$),SIMPLE_GIT_HOOKS_JSON:eU(eJ),PACKAGE_JSON:eU(eB),PACKAGE_LOCK_JSON:eU(ex),PNPM_LOCK_YAML:eU(eQ),NODE_MODULES:eU(ek),MIGRATE_MONGO_CONFIG:eU(ez),LINT_STAGED_CONFIG:eU("".concat(eZ,"/config/lint-staged/index.js")),COMMITLINT_CONFIG:eU("".concat(eZ,"/config/commitlint/index.js")),VITEST_UNIT_CONFIG:eU("".concat(eZ,"/config/vitest/vitest.unit.js")),VITEST_UNIT_SETUP_CONFIG:eU("".concat(eZ,"/config/vitest/vitest.unit.setup.js")),VITEST_E2E_CONFIG:eU("".concat(eZ,"/config/vitest/vitest.e2e.js"))};function nO(e){var n=e.isCurrentProject;return u({"pre-commit":nn,"commit-msg":e9},n&&{"pre-push":eL("".concat(no," pull"))})}N(nO,"createGitHooksConfig");function nS(e){var n=e.type,t=e.packages,a=e.command;var o=t===null||t===void 0?void 0:t.reduce(function(e,n){return e.some(function(e){return e.name===n.name})||e.push(n),e},[]);return function(){return r(function(){var e;return _(this,function(t){switch(t.label){case 0:switch(n){case K.CLI:return[3,1];case K.STRING:return[3,4]}return[3,5];case 1:e=o===null||o===void 0?void 0:o.length;if(!e)return[3,3];return[4,eC(o,{install:!0})];case 2:e=t.sent();t.label=3;case 3:return[2,(e,eM(eL("".concat(nc," ").concat(a))))];case 4:return[2,eM(eL(a))];case 5:throw new Error("Unsupported command type");case 6:return[2]}})})()}}N(nS,"buildCommand");var nN={simpleGitHooks:nS({type:K.CLI,packages:[{name:nu,type:Q.DEV_DEPENDENCY}],command:ns}),eslintInspect:nS({type:K.CLI,packages:[{name:nE,type:Q.DEV_DEPENDENCY}],command:nl}),nodeModulesInspect:nS({type:K.CLI,packages:[{name:n_,type:Q.DEV_DEPENDENCY}],command:nf}),eslintCheck:nS({type:K.CLI,packages:[{name:e2,type:Q.DEV_DEPENDENCY}],command:"".concat(e4," ").concat(nd.WORKING_DIRECTORY," --no-cache")}),eslintFix:nS({type:K.CLI,packages:[{name:e2,type:Q.DEV_DEPENDENCY}],command:"".concat(e4," ").concat(nd.WORKING_DIRECTORY," --fix --no-cache")}),typescriptCheck:nS({type:K.CLI,packages:[{name:nt,type:Q.DEV_DEPENDENCY}],command:"".concat(nr," -p ").concat(nd.TS_CONFIG," --noEmit")}),testUnit:nS({type:K.CLI,packages:[{name:e3,type:Q.DEV_DEPENDENCY}],command:"".concat(e6," --config ").concat(nd.VITEST_UNIT_CONFIG)}),testE2e:nS({type:K.CLI,packages:[{name:e3,type:Q.DEV_DEPENDENCY}],command:"".concat(e6," --config ").concat(nd.VITEST_E2E_CONFIG)}),mongoMigrateCreate:N(function(e){return nS({type:K.CLI,packages:[{name:na,type:Q.DEPENDENCY},{name:nI,type:Q.DEPENDENCY}],command:"".concat(na," ").concat(nC," create ").concat(e," -f ").concat(nd.MIGRATE_MONGO_CONFIG)})()},"mongoMigrateCreate"),mongoMigrateUp:nS({type:K.CLI,packages:[{name:na,type:Q.DEPENDENCY},{name:nI,type:Q.DEPENDENCY}],command:"".concat(na," ").concat(nC," up -f ").concat(nd.MIGRATE_MONGO_CONFIG)}),mongoMigrateDown:nS({type:K.CLI,packages:[{name:na,type:Q.DEPENDENCY},{name:nI,type:Q.DEPENDENCY}],command:"".concat(na," ").concat(nC," down -f ").concat(nd.MIGRATE_MONGO_CONFIG)}),commitLint:nS({type:K.CLI,packages:[{name:e7,type:Q.DEV_DEPENDENCY},{name:e8,type:Q.DEV_DEPENDENCY}],command:"".concat(e9," --edit ").concat(nd.GIT_COMMIT_MSG," --config ").concat(nd.COMMITLINT_CONFIG)}),lintStaged:nS({type:K.CLI,packages:[{name:ne,type:Q.DEV_DEPENDENCY}],command:"".concat(nn," --config ").concat(nd.LINT_STAGED_CONFIG)}),configureGitHook:nS({type:K.STRING,command:"".concat(no," config core.hooksPath ").concat(nd.GIT_HOOK)}),build:nS({type:K.STRING,command:"".concat(ni," run --if-present build")}),pnpmInstallStandard:nS({type:K.STRING,command:"".concat(ni," install --ignore-scripts")}),pnpmInstallLegacy:nS({type:K.STRING,command:"".concat(ni," install --ignore-scripts --legacy-peer-deps")}),pnpmInstallForce:nS({type:K.STRING,command:"".concat(ni," install --ignore-scripts --force")}),pnpmPruneStore:nS({type:K.STRING,command:"".concat(ni," store prune")}),pnpmCleanCache:nS({type:K.STRING,command:"".concat(ni," cache delete")})};0&&(module.exports={BUILD_DIRECTORY:BUILD_DIRECTORY,COMMIT_LINT_CLI:COMMIT_LINT_CLI,COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME:COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME,COMMIT_LINT_PACKAGE_NAME:COMMIT_LINT_PACKAGE_NAME,CYBERSKILL_CLI:CYBERSKILL_CLI,CYBERSKILL_CLI_PATH:CYBERSKILL_CLI_PATH,CYBERSKILL_DIRECTORY:CYBERSKILL_DIRECTORY,CYBERSKILL_PACKAGE_NAME:CYBERSKILL_PACKAGE_NAME,ESLINT_CLI:ESLINT_CLI,ESLINT_INSPECT_CLI:ESLINT_INSPECT_CLI,ESLINT_INSPECT_PACKAGE_NAME:ESLINT_INSPECT_PACKAGE_NAME,ESLINT_PACKAGE_NAME:ESLINT_PACKAGE_NAME,GIT_CLI:GIT_CLI,GIT_COMMIT_EDITMSG:GIT_COMMIT_EDITMSG,GIT_HOOK:GIT_HOOK,GIT_IGNORE:GIT_IGNORE,LINT_STAGED_CLI:LINT_STAGED_CLI,LINT_STAGED_PACKAGE_NAME:LINT_STAGED_PACKAGE_NAME,MIGRATE_MONGO_CLI:MIGRATE_MONGO_CLI,MIGRATE_MONGO_CONFIG:MIGRATE_MONGO_CONFIG,MIGRATE_MONGO_PACKAGE_NAME:MIGRATE_MONGO_PACKAGE_NAME,NODE_MODULES:NODE_MODULES,NODE_MODULES_INSPECT_CLI:NODE_MODULES_INSPECT_CLI,NODE_MODULES_INSPECT_PACKAGE_NAME:NODE_MODULES_INSPECT_PACKAGE_NAME,PACKAGE_JSON:PACKAGE_JSON,PACKAGE_LOCK_JSON:PACKAGE_LOCK_JSON,PATH:PATH,PLAYWRIGHT_PACKAGE_NAME:PLAYWRIGHT_PACKAGE_NAME,PNPM_CLI:PNPM_CLI,PNPM_EXEC_CLI:PNPM_EXEC_CLI,PNPM_LOCK_YAML:PNPM_LOCK_YAML,PUBLIC_DIRECTORY:PUBLIC_DIRECTORY,SIMPLE_GIT_HOOKS_PACKAGE_NAME:SIMPLE_GIT_HOOKS_PACKAGE_NAME,SIMPLE_GIT_HOOK_CLI:SIMPLE_GIT_HOOK_CLI,SIMPLE_GIT_HOOK_JSON:SIMPLE_GIT_HOOK_JSON,TSCONFIG_JSON:TSCONFIG_JSON,TSC_CLI:TSC_CLI,TSC_PACKAGE_NAME:TSC_PACKAGE_NAME,TSX_CLI:TSX_CLI,VITEST_CLI:VITEST_CLI,VITEST_PACKAGE_NAME:VITEST_PACKAGE_NAME,WORKING_DIRECTORY:WORKING_DIRECTORY,command:command,createGitHooksConfig:createGitHooksConfig,dirname:dirname,join:join,path:path,resolve:resolve,resolveWorkingPath:resolveWorkingPath});