@cyberskill/shared 1.127.0 → 1.128.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 (199) hide show
  1. package/README.md +2 -2
  2. package/dist/_tsup-dts-rollup.d.cts +50 -44
  3. package/dist/_tsup-dts-rollup.d.ts +50 -44
  4. package/dist/configs/config.util.cjs +1 -1
  5. package/dist/configs/config.util.js +1 -1
  6. package/dist/configs/index.cjs +1 -1
  7. package/dist/configs/index.js +1 -1
  8. package/dist/index.cjs +1 -1
  9. package/dist/index.d.cts +5 -5
  10. package/dist/index.d.ts +5 -5
  11. package/dist/index.js +1 -1
  12. package/dist/{nodejs → node}/apollo-server/apollo-server.util.cjs +1 -1
  13. package/dist/{nodejs → node}/apollo-server/apollo-server.util.js +1 -1
  14. package/dist/{nodejs → node}/apollo-server/index.cjs +1 -1
  15. package/dist/{nodejs → node}/apollo-server/index.js +1 -1
  16. package/dist/node/cli/cli.util.cjs +2 -0
  17. package/dist/node/cli/cli.util.js +2 -0
  18. package/dist/node/cli/index.cjs +1 -0
  19. package/dist/node/cli/index.js +1 -0
  20. package/dist/node/command/command.util.cjs +1 -0
  21. package/dist/node/command/command.util.js +1 -0
  22. package/dist/node/command/index.cjs +1 -0
  23. package/dist/node/command/index.js +1 -0
  24. package/dist/{nodejs → node}/express/express.util.cjs +1 -1
  25. package/dist/{nodejs → node}/express/express.util.js +1 -1
  26. package/dist/{nodejs → node}/express/index.cjs +1 -1
  27. package/dist/{nodejs → node}/express/index.js +1 -1
  28. package/dist/node/fs/fs.util.cjs +1 -0
  29. package/dist/node/fs/fs.util.js +1 -0
  30. package/dist/node/fs/index.cjs +1 -0
  31. package/dist/node/fs/index.js +1 -0
  32. package/dist/node/index.cjs +1 -0
  33. package/dist/{nodejs → node}/index.d.cts +5 -5
  34. package/dist/{nodejs → node}/index.d.ts +5 -5
  35. package/dist/node/index.js +1 -0
  36. package/dist/node/mongo/index.cjs +1 -0
  37. package/dist/node/mongo/index.js +1 -0
  38. package/dist/node/mongo/mongo.util.cjs +1 -0
  39. package/dist/node/mongo/mongo.util.js +1 -0
  40. package/dist/node/package/index.cjs +1 -0
  41. package/dist/{nodejs → node}/package/index.d.cts +5 -5
  42. package/dist/{nodejs → node}/package/index.d.ts +5 -5
  43. package/dist/node/package/index.js +1 -0
  44. package/dist/node/package/package.type.cjs +1 -0
  45. package/dist/node/package/package.type.d.cts +4 -0
  46. package/dist/node/package/package.type.d.ts +4 -0
  47. package/dist/node/package/package.type.js +1 -0
  48. package/dist/node/package/package.util.cjs +1 -0
  49. package/dist/{nodejs → node}/package/package.util.d.cts +2 -2
  50. package/dist/{nodejs → node}/package/package.util.d.ts +2 -2
  51. package/dist/node/package/package.util.js +1 -0
  52. package/dist/node/path/index.cjs +1 -0
  53. package/dist/node/path/index.js +1 -0
  54. package/dist/node/path/path.constant.cjs +1 -0
  55. package/dist/node/path/path.constant.js +1 -0
  56. package/dist/node/storage/index.cjs +1 -0
  57. package/dist/node/storage/index.js +1 -0
  58. package/dist/node/storage/storage.util.cjs +1 -0
  59. package/dist/node/storage/storage.util.js +1 -0
  60. package/dist/react/index.cjs +1 -1
  61. package/dist/react/index.js +1 -1
  62. package/dist/react/next-intl/index.cjs +1 -1
  63. package/dist/react/next-intl/index.js +1 -1
  64. package/dist/react/next-intl/next-intl.provider.cjs +1 -1
  65. package/dist/react/next-intl/next-intl.provider.js +1 -1
  66. package/dist/react/storage/index.cjs +1 -1
  67. package/dist/react/storage/index.js +1 -1
  68. package/dist/react/storage/storage.hook.cjs +1 -1
  69. package/dist/react/storage/storage.hook.js +1 -1
  70. package/dist/react/storage/storage.util.cjs +1 -1
  71. package/dist/react/storage/storage.util.js +1 -1
  72. package/dist/react/vitest/index.cjs +1 -1
  73. package/dist/react/vitest/index.js +1 -1
  74. package/dist/react/vitest/vitest.unit.cjs +1 -1
  75. package/dist/react/vitest/vitest.unit.js +1 -1
  76. package/package.json +74 -74
  77. package/public/wiki/convention.md +1 -1
  78. package/dist/nodejs/cli/cli.util.cjs +0 -2
  79. package/dist/nodejs/cli/cli.util.js +0 -2
  80. package/dist/nodejs/cli/index.cjs +0 -1
  81. package/dist/nodejs/cli/index.js +0 -1
  82. package/dist/nodejs/command/command.util.cjs +0 -1
  83. package/dist/nodejs/command/command.util.js +0 -1
  84. package/dist/nodejs/command/index.cjs +0 -1
  85. package/dist/nodejs/command/index.js +0 -1
  86. package/dist/nodejs/fs/fs.util.cjs +0 -1
  87. package/dist/nodejs/fs/fs.util.js +0 -1
  88. package/dist/nodejs/fs/index.cjs +0 -1
  89. package/dist/nodejs/fs/index.js +0 -1
  90. package/dist/nodejs/index.cjs +0 -1
  91. package/dist/nodejs/index.js +0 -1
  92. package/dist/nodejs/mongo/index.cjs +0 -1
  93. package/dist/nodejs/mongo/index.js +0 -1
  94. package/dist/nodejs/mongo/mongo.util.cjs +0 -1
  95. package/dist/nodejs/mongo/mongo.util.js +0 -1
  96. package/dist/nodejs/package/index.cjs +0 -1
  97. package/dist/nodejs/package/index.js +0 -1
  98. package/dist/nodejs/package/package.constant.cjs +0 -1
  99. package/dist/nodejs/package/package.constant.d.cts +0 -1
  100. package/dist/nodejs/package/package.constant.d.ts +0 -1
  101. package/dist/nodejs/package/package.constant.js +0 -1
  102. package/dist/nodejs/package/package.type.cjs +0 -1
  103. package/dist/nodejs/package/package.type.d.cts +0 -3
  104. package/dist/nodejs/package/package.type.d.ts +0 -3
  105. package/dist/nodejs/package/package.type.js +0 -0
  106. package/dist/nodejs/package/package.util.cjs +0 -1
  107. package/dist/nodejs/package/package.util.js +0 -1
  108. package/dist/nodejs/path/index.cjs +0 -1
  109. package/dist/nodejs/path/index.js +0 -1
  110. package/dist/nodejs/path/path.constant.cjs +0 -1
  111. package/dist/nodejs/path/path.constant.js +0 -1
  112. package/dist/nodejs/storage/index.cjs +0 -1
  113. package/dist/nodejs/storage/index.js +0 -1
  114. package/dist/nodejs/storage/storage.util.cjs +0 -1
  115. package/dist/nodejs/storage/storage.util.js +0 -1
  116. /package/dist/{nodejs → node}/apollo-server/apollo-server.type.cjs +0 -0
  117. /package/dist/{nodejs → node}/apollo-server/apollo-server.type.d.cts +0 -0
  118. /package/dist/{nodejs → node}/apollo-server/apollo-server.type.d.ts +0 -0
  119. /package/dist/{nodejs → node}/apollo-server/apollo-server.type.js +0 -0
  120. /package/dist/{nodejs → node}/apollo-server/apollo-server.util.d.cts +0 -0
  121. /package/dist/{nodejs → node}/apollo-server/apollo-server.util.d.ts +0 -0
  122. /package/dist/{nodejs → node}/apollo-server/index.d.cts +0 -0
  123. /package/dist/{nodejs → node}/apollo-server/index.d.ts +0 -0
  124. /package/dist/{nodejs → node}/cli/cli.util.d.cts +0 -0
  125. /package/dist/{nodejs → node}/cli/cli.util.d.ts +0 -0
  126. /package/dist/{nodejs → node}/cli/index.d.cts +0 -0
  127. /package/dist/{nodejs → node}/cli/index.d.ts +0 -0
  128. /package/dist/{nodejs → node}/command/command.type.cjs +0 -0
  129. /package/dist/{nodejs → node}/command/command.type.d.cts +0 -0
  130. /package/dist/{nodejs → node}/command/command.type.d.ts +0 -0
  131. /package/dist/{nodejs → node}/command/command.type.js +0 -0
  132. /package/dist/{nodejs → node}/command/command.util.d.cts +0 -0
  133. /package/dist/{nodejs → node}/command/command.util.d.ts +0 -0
  134. /package/dist/{nodejs → node}/command/index.d.cts +0 -0
  135. /package/dist/{nodejs → node}/command/index.d.ts +0 -0
  136. /package/dist/{nodejs → node}/express/express.type.cjs +0 -0
  137. /package/dist/{nodejs → node}/express/express.type.d.cts +0 -0
  138. /package/dist/{nodejs → node}/express/express.type.d.ts +0 -0
  139. /package/dist/{nodejs → node}/express/express.type.js +0 -0
  140. /package/dist/{nodejs → node}/express/express.util.d.cts +0 -0
  141. /package/dist/{nodejs → node}/express/express.util.d.ts +0 -0
  142. /package/dist/{nodejs → node}/express/index.d.cts +0 -0
  143. /package/dist/{nodejs → node}/express/index.d.ts +0 -0
  144. /package/dist/{nodejs → node}/fs/fs.type.cjs +0 -0
  145. /package/dist/{nodejs → node}/fs/fs.type.d.cts +0 -0
  146. /package/dist/{nodejs → node}/fs/fs.type.d.ts +0 -0
  147. /package/dist/{nodejs → node}/fs/fs.type.js +0 -0
  148. /package/dist/{nodejs → node}/fs/fs.util.d.cts +0 -0
  149. /package/dist/{nodejs → node}/fs/fs.util.d.ts +0 -0
  150. /package/dist/{nodejs → node}/fs/index.d.cts +0 -0
  151. /package/dist/{nodejs → node}/fs/index.d.ts +0 -0
  152. /package/dist/{nodejs → node}/log/index.cjs +0 -0
  153. /package/dist/{nodejs → node}/log/index.d.cts +0 -0
  154. /package/dist/{nodejs → node}/log/index.d.ts +0 -0
  155. /package/dist/{nodejs → node}/log/index.js +0 -0
  156. /package/dist/{nodejs → node}/log/log.type.cjs +0 -0
  157. /package/dist/{nodejs → node}/log/log.type.d.cts +0 -0
  158. /package/dist/{nodejs → node}/log/log.type.d.ts +0 -0
  159. /package/dist/{nodejs → node}/log/log.type.js +0 -0
  160. /package/dist/{nodejs → node}/log/log.util.cjs +0 -0
  161. /package/dist/{nodejs → node}/log/log.util.d.cts +0 -0
  162. /package/dist/{nodejs → node}/log/log.util.d.ts +0 -0
  163. /package/dist/{nodejs → node}/log/log.util.js +0 -0
  164. /package/dist/{nodejs → node}/mongo/index.d.cts +0 -0
  165. /package/dist/{nodejs → node}/mongo/index.d.ts +0 -0
  166. /package/dist/{nodejs → node}/mongo/mongo.constant.cjs +0 -0
  167. /package/dist/{nodejs → node}/mongo/mongo.constant.d.cts +0 -0
  168. /package/dist/{nodejs → node}/mongo/mongo.constant.d.ts +0 -0
  169. /package/dist/{nodejs → node}/mongo/mongo.constant.js +0 -0
  170. /package/dist/{nodejs → node}/mongo/mongo.type.cjs +0 -0
  171. /package/dist/{nodejs → node}/mongo/mongo.type.d.cts +0 -0
  172. /package/dist/{nodejs → node}/mongo/mongo.type.d.ts +0 -0
  173. /package/dist/{nodejs → node}/mongo/mongo.type.js +0 -0
  174. /package/dist/{nodejs → node}/mongo/mongo.util.d.cts +0 -0
  175. /package/dist/{nodejs → node}/mongo/mongo.util.d.ts +0 -0
  176. /package/dist/{nodejs → node}/path/index.d.cts +0 -0
  177. /package/dist/{nodejs → node}/path/index.d.ts +0 -0
  178. /package/dist/{nodejs → node}/path/path.constant.d.cts +0 -0
  179. /package/dist/{nodejs → node}/path/path.constant.d.ts +0 -0
  180. /package/dist/{nodejs → node}/path/path.util.cjs +0 -0
  181. /package/dist/{nodejs → node}/path/path.util.d.cts +0 -0
  182. /package/dist/{nodejs → node}/path/path.util.d.ts +0 -0
  183. /package/dist/{nodejs → node}/path/path.util.js +0 -0
  184. /package/dist/{nodejs → node}/storage/index.d.cts +0 -0
  185. /package/dist/{nodejs → node}/storage/index.d.ts +0 -0
  186. /package/dist/{nodejs → node}/storage/storage.util.d.cts +0 -0
  187. /package/dist/{nodejs → node}/storage/storage.util.d.ts +0 -0
  188. /package/dist/{nodejs → node}/ws/index.cjs +0 -0
  189. /package/dist/{nodejs → node}/ws/index.d.cts +0 -0
  190. /package/dist/{nodejs → node}/ws/index.d.ts +0 -0
  191. /package/dist/{nodejs → node}/ws/index.js +0 -0
  192. /package/dist/{nodejs → node}/ws/ts.util.cjs +0 -0
  193. /package/dist/{nodejs → node}/ws/ts.util.d.cts +0 -0
  194. /package/dist/{nodejs → node}/ws/ts.util.d.ts +0 -0
  195. /package/dist/{nodejs → node}/ws/ts.util.js +0 -0
  196. /package/dist/{nodejs → node}/ws/ws.type.cjs +0 -0
  197. /package/dist/{nodejs → node}/ws/ws.type.d.cts +0 -0
  198. /package/dist/{nodejs → node}/ws/ws.type.d.ts +0 -0
  199. /package/dist/{nodejs → node}/ws/ws.type.js +0 -0
package/README.md CHANGED
@@ -56,7 +56,7 @@ pnpm install @cyberskill/shared
56
56
  | `pnpm run lint` | Check for linting issues ✅ |
57
57
  | `pnpm run lint:fix` | Fix linting issues 🔧 |
58
58
  | `pnpm run lint:inspect` | Inspect linting config 🧐 |
59
- | `pnpm run setup` | Project setup 🏗️ |
59
+ | `pnpm run prepare` | Project prepare 🏗️ |
60
60
  | `pnpm run reset` | Reset the project ♻️ |
61
61
  | `pnpm run inspect` | Inspect the project dependencies 🔍 |
62
62
 
@@ -69,7 +69,7 @@ pnpm install @cyberskill/shared
69
69
  ├──src/
70
70
  ├── configs/ → App configuration files
71
71
  ├── constants/ → Static values used across the app
72
- ├── nodejs/ → NodeJS modules
72
+ ├── node/ → NodeJS modules
73
73
  ├── react/ → ReactJS modules
74
74
  ├── styles/ → Global and component-specific styles
75
75
  ├── typescript/ → TypeScript types and interfaces
@@ -184,20 +184,6 @@ export { C_Model as C_Model_alias_1 }
184
184
  export { C_Model as C_Model_alias_2 }
185
185
  export { C_Model as C_Model_alias_3 }
186
186
 
187
- declare const CHECK_PACKAGE_EMPTY_RESULT: I_CheckPackage;
188
- export { CHECK_PACKAGE_EMPTY_RESULT }
189
- export { CHECK_PACKAGE_EMPTY_RESULT as CHECK_PACKAGE_EMPTY_RESULT_alias_1 }
190
- export { CHECK_PACKAGE_EMPTY_RESULT as CHECK_PACKAGE_EMPTY_RESULT_alias_2 }
191
- export { CHECK_PACKAGE_EMPTY_RESULT as CHECK_PACKAGE_EMPTY_RESULT_alias_3 }
192
-
193
- declare function checkPackage(packageName: string, options?: {
194
- update?: boolean;
195
- }): Promise<I_CheckPackage>;
196
- export { checkPackage }
197
- export { checkPackage as checkPackage_alias_1 }
198
- export { checkPackage as checkPackage_alias_2 }
199
- export { checkPackage as checkPackage_alias_3 }
200
-
201
187
  declare function clearAllErrorLists(): Promise<void>;
202
188
  export { clearAllErrorLists }
203
189
  export { clearAllErrorLists as clearAllErrorLists_alias_1 }
@@ -211,7 +197,6 @@ declare const command: {
211
197
  eslintCheck: () => Promise<string>;
212
198
  eslintFix: () => Promise<string>;
213
199
  typescriptCheck: () => Promise<string>;
214
- configureGitHook: () => Promise<string>;
215
200
  testUnit: () => Promise<string>;
216
201
  testE2e: () => Promise<string>;
217
202
  mongoMigrateCreate: (migrateName: string) => Promise<string>;
@@ -219,6 +204,7 @@ declare const command: {
219
204
  mongoMigrateDown: () => Promise<string>;
220
205
  commitLint: () => Promise<string>;
221
206
  lintStaged: () => Promise<string>;
207
+ configureGitHook: () => Promise<string>;
222
208
  stageBuildDirectory: () => Promise<string>;
223
209
  build: () => Promise<string>;
224
210
  pnpmInstallStandard: () => Promise<string>;
@@ -322,7 +308,7 @@ export { CYBERSKILL_CLI as CYBERSKILL_CLI_alias_1 }
322
308
  export { CYBERSKILL_CLI as CYBERSKILL_CLI_alias_2 }
323
309
  export { CYBERSKILL_CLI as CYBERSKILL_CLI_alias_3 }
324
310
 
325
- declare const CYBERSKILL_CLI_PATH = "src/nodejs/cli/index.ts";
311
+ declare const CYBERSKILL_CLI_PATH = "src/node/cli/index.ts";
326
312
  export { CYBERSKILL_CLI_PATH }
327
313
  export { CYBERSKILL_CLI_PATH as CYBERSKILL_CLI_PATH_alias_1 }
328
314
  export { CYBERSKILL_CLI_PATH as CYBERSKILL_CLI_PATH_alias_2 }
@@ -1559,6 +1545,18 @@ export { E_IssueType as E_IssueType_alias_1 }
1559
1545
  export { E_IssueType as E_IssueType_alias_2 }
1560
1546
  export { E_IssueType as E_IssueType_alias_3 }
1561
1547
 
1548
+ declare enum E_PackageType {
1549
+ DEPENDENCY = "dependencies",
1550
+ DEV_DEPENDENCY = "devDependencies",
1551
+ PEER_DEPENDENCY = "peerDependencies",
1552
+ BUNDLE_DEPENDENCY = "bundleDependencies",
1553
+ OPTIONAL_DEPENDENCY = "optionalDependencies"
1554
+ }
1555
+ export { E_PackageType }
1556
+ export { E_PackageType as E_PackageType_alias_1 }
1557
+ export { E_PackageType as E_PackageType_alias_2 }
1558
+ export { E_PackageType as E_PackageType_alias_3 }
1559
+
1562
1560
  declare const ESLINT_CLI = "eslint";
1563
1561
  export { ESLINT_CLI }
1564
1562
  export { ESLINT_CLI as ESLINT_CLI_alias_1 }
@@ -1667,7 +1665,7 @@ export { getLatestPackageVersion as getLatestPackageVersion_alias_1 }
1667
1665
  export { getLatestPackageVersion as getLatestPackageVersion_alias_2 }
1668
1666
  export { getLatestPackageVersion as getLatestPackageVersion_alias_3 }
1669
1667
 
1670
- declare function getPackage(packageName: string): I_GetPackage | false;
1668
+ declare function getPackage(inputPackage: I_PackageInput): Promise<I_PackageInfo>;
1671
1669
  export { getPackage }
1672
1670
  export { getPackage as getPackage_alias_1 }
1673
1671
  export { getPackage as getPackage_alias_2 }
@@ -1760,17 +1758,6 @@ declare interface I_BaseCorsOptions {
1760
1758
  whiteList?: string[];
1761
1759
  }
1762
1760
 
1763
- declare interface I_CheckPackage {
1764
- isCurrentProject: boolean;
1765
- installedPath: string;
1766
- file: T_PackageJson;
1767
- isUpToDate: boolean;
1768
- }
1769
- export { I_CheckPackage }
1770
- export { I_CheckPackage as I_CheckPackage_alias_1 }
1771
- export { I_CheckPackage as I_CheckPackage_alias_2 }
1772
- export { I_CheckPackage as I_CheckPackage_alias_3 }
1773
-
1774
1761
  declare interface I_Children {
1775
1762
  children: T_Children;
1776
1763
  }
@@ -1792,7 +1779,6 @@ export { I_Command as I_Command_alias_2 }
1792
1779
  export { I_Command as I_Command_alias_3 }
1793
1780
 
1794
1781
  declare interface I_CommandContext {
1795
- isRemote: boolean;
1796
1782
  isCurrentProject: boolean;
1797
1783
  }
1798
1784
  export { I_CommandContext }
@@ -1894,18 +1880,6 @@ export { I_GenericDocument as I_GenericDocument_alias_1 }
1894
1880
  export { I_GenericDocument as I_GenericDocument_alias_2 }
1895
1881
  export { I_GenericDocument as I_GenericDocument_alias_3 }
1896
1882
 
1897
- declare interface I_GetPackage {
1898
- path: string;
1899
- file: T_PackageJson;
1900
- isCurrentProject: boolean;
1901
- isDepend: boolean;
1902
- isDevDepend: boolean;
1903
- }
1904
- export { I_GetPackage }
1905
- export { I_GetPackage as I_GetPackage_alias_1 }
1906
- export { I_GetPackage as I_GetPackage_alias_2 }
1907
- export { I_GetPackage as I_GetPackage_alias_3 }
1908
-
1909
1883
  declare interface I_GraphqlCodegenConfig {
1910
1884
  uri: string;
1911
1885
  from: string;
@@ -2168,6 +2142,32 @@ export { I_NextIntlProviderProps as I_NextIntlProviderProps_alias_1 }
2168
2142
  export { I_NextIntlProviderProps as I_NextIntlProviderProps_alias_2 }
2169
2143
  export { I_NextIntlProviderProps as I_NextIntlProviderProps_alias_3 }
2170
2144
 
2145
+ declare interface I_PackageInfo {
2146
+ name: string;
2147
+ currentVersion: string;
2148
+ latestVersion: string;
2149
+ isCurrentProject: boolean;
2150
+ isInstalled: boolean;
2151
+ isUpToDate: boolean;
2152
+ isDependency: boolean;
2153
+ isDevDependency: boolean;
2154
+ installedPath: string;
2155
+ file: T_PackageJson;
2156
+ }
2157
+ export { I_PackageInfo }
2158
+ export { I_PackageInfo as I_PackageInfo_alias_1 }
2159
+ export { I_PackageInfo as I_PackageInfo_alias_2 }
2160
+ export { I_PackageInfo as I_PackageInfo_alias_3 }
2161
+
2162
+ declare interface I_PackageInput {
2163
+ name: string;
2164
+ type?: E_PackageType;
2165
+ }
2166
+ export { I_PackageInput }
2167
+ export { I_PackageInput as I_PackageInput_alias_1 }
2168
+ export { I_PackageInput as I_PackageInput_alias_2 }
2169
+ export { I_PackageInput as I_PackageInput_alias_3 }
2170
+
2171
2171
  declare type I_Return<T = void, E = unknown> = I_ReturnSuccess<T, E> | I_ReturnFailure;
2172
2172
  export { I_Return }
2173
2173
  export { I_Return as I_Return_alias_1 }
@@ -2718,7 +2718,7 @@ export { resolve as resolve_alias_1 }
2718
2718
  export { resolve as resolve_alias_2 }
2719
2719
  export { resolve as resolve_alias_3 }
2720
2720
 
2721
- declare function resolveCommands(input: T_CommandMapInput, context?: Partial<I_CommandContext>): Promise<{
2721
+ declare function resolveCommands(input: T_CommandMapInput): Promise<{
2722
2722
  [k: string]: string | I_Command_2;
2723
2723
  }>;
2724
2724
  export { resolveCommands }
@@ -3014,7 +3014,7 @@ export { setGlobalApolloErrorCallback as setGlobalApolloErrorCallback_alias_1 }
3014
3014
  export { setGlobalApolloErrorCallback as setGlobalApolloErrorCallback_alias_2 }
3015
3015
  export { setGlobalApolloErrorCallback as setGlobalApolloErrorCallback_alias_3 }
3016
3016
 
3017
- declare function setupPackages(packages: string[], options?: {
3017
+ declare function setupPackages(packages: I_PackageInput[], options?: {
3018
3018
  update?: boolean;
3019
3019
  postInstallActions?: (() => Promise<void>)[];
3020
3020
  }): Promise<void>;
@@ -3268,7 +3268,7 @@ declare interface T_PackageJson {
3268
3268
  version?: string;
3269
3269
  dependencies?: Record<string, string>;
3270
3270
  devDependencies?: Record<string, string>;
3271
- [key: string]: any;
3271
+ [key: string]: unknown;
3272
3272
  }
3273
3273
  export { T_PackageJson }
3274
3274
  export { T_PackageJson as T_PackageJson_alias_1 }
@@ -3442,6 +3442,12 @@ export { unlinkSync as unlinkSync_alias_1 }
3442
3442
  export { unlinkSync as unlinkSync_alias_2 }
3443
3443
  export { unlinkSync as unlinkSync_alias_3 }
3444
3444
 
3445
+ declare function updatePackage(packageInfo: I_PackageInfo): Promise<void>;
3446
+ export { updatePackage }
3447
+ export { updatePackage as updatePackage_alias_1 }
3448
+ export { updatePackage as updatePackage_alias_2 }
3449
+ export { updatePackage as updatePackage_alias_3 }
3450
+
3445
3451
  declare function useApolloError(): I_ApolloErrorContext_2;
3446
3452
  export { useApolloError }
3447
3453
  export { useApolloError as useApolloError_alias_1 }
@@ -184,20 +184,6 @@ export { C_Model as C_Model_alias_1 }
184
184
  export { C_Model as C_Model_alias_2 }
185
185
  export { C_Model as C_Model_alias_3 }
186
186
 
187
- declare const CHECK_PACKAGE_EMPTY_RESULT: I_CheckPackage;
188
- export { CHECK_PACKAGE_EMPTY_RESULT }
189
- export { CHECK_PACKAGE_EMPTY_RESULT as CHECK_PACKAGE_EMPTY_RESULT_alias_1 }
190
- export { CHECK_PACKAGE_EMPTY_RESULT as CHECK_PACKAGE_EMPTY_RESULT_alias_2 }
191
- export { CHECK_PACKAGE_EMPTY_RESULT as CHECK_PACKAGE_EMPTY_RESULT_alias_3 }
192
-
193
- declare function checkPackage(packageName: string, options?: {
194
- update?: boolean;
195
- }): Promise<I_CheckPackage>;
196
- export { checkPackage }
197
- export { checkPackage as checkPackage_alias_1 }
198
- export { checkPackage as checkPackage_alias_2 }
199
- export { checkPackage as checkPackage_alias_3 }
200
-
201
187
  declare function clearAllErrorLists(): Promise<void>;
202
188
  export { clearAllErrorLists }
203
189
  export { clearAllErrorLists as clearAllErrorLists_alias_1 }
@@ -211,7 +197,6 @@ declare const command: {
211
197
  eslintCheck: () => Promise<string>;
212
198
  eslintFix: () => Promise<string>;
213
199
  typescriptCheck: () => Promise<string>;
214
- configureGitHook: () => Promise<string>;
215
200
  testUnit: () => Promise<string>;
216
201
  testE2e: () => Promise<string>;
217
202
  mongoMigrateCreate: (migrateName: string) => Promise<string>;
@@ -219,6 +204,7 @@ declare const command: {
219
204
  mongoMigrateDown: () => Promise<string>;
220
205
  commitLint: () => Promise<string>;
221
206
  lintStaged: () => Promise<string>;
207
+ configureGitHook: () => Promise<string>;
222
208
  stageBuildDirectory: () => Promise<string>;
223
209
  build: () => Promise<string>;
224
210
  pnpmInstallStandard: () => Promise<string>;
@@ -322,7 +308,7 @@ export { CYBERSKILL_CLI as CYBERSKILL_CLI_alias_1 }
322
308
  export { CYBERSKILL_CLI as CYBERSKILL_CLI_alias_2 }
323
309
  export { CYBERSKILL_CLI as CYBERSKILL_CLI_alias_3 }
324
310
 
325
- declare const CYBERSKILL_CLI_PATH = "src/nodejs/cli/index.ts";
311
+ declare const CYBERSKILL_CLI_PATH = "src/node/cli/index.ts";
326
312
  export { CYBERSKILL_CLI_PATH }
327
313
  export { CYBERSKILL_CLI_PATH as CYBERSKILL_CLI_PATH_alias_1 }
328
314
  export { CYBERSKILL_CLI_PATH as CYBERSKILL_CLI_PATH_alias_2 }
@@ -1559,6 +1545,18 @@ export { E_IssueType as E_IssueType_alias_1 }
1559
1545
  export { E_IssueType as E_IssueType_alias_2 }
1560
1546
  export { E_IssueType as E_IssueType_alias_3 }
1561
1547
 
1548
+ declare enum E_PackageType {
1549
+ DEPENDENCY = "dependencies",
1550
+ DEV_DEPENDENCY = "devDependencies",
1551
+ PEER_DEPENDENCY = "peerDependencies",
1552
+ BUNDLE_DEPENDENCY = "bundleDependencies",
1553
+ OPTIONAL_DEPENDENCY = "optionalDependencies"
1554
+ }
1555
+ export { E_PackageType }
1556
+ export { E_PackageType as E_PackageType_alias_1 }
1557
+ export { E_PackageType as E_PackageType_alias_2 }
1558
+ export { E_PackageType as E_PackageType_alias_3 }
1559
+
1562
1560
  declare const ESLINT_CLI = "eslint";
1563
1561
  export { ESLINT_CLI }
1564
1562
  export { ESLINT_CLI as ESLINT_CLI_alias_1 }
@@ -1667,7 +1665,7 @@ export { getLatestPackageVersion as getLatestPackageVersion_alias_1 }
1667
1665
  export { getLatestPackageVersion as getLatestPackageVersion_alias_2 }
1668
1666
  export { getLatestPackageVersion as getLatestPackageVersion_alias_3 }
1669
1667
 
1670
- declare function getPackage(packageName: string): I_GetPackage | false;
1668
+ declare function getPackage(inputPackage: I_PackageInput): Promise<I_PackageInfo>;
1671
1669
  export { getPackage }
1672
1670
  export { getPackage as getPackage_alias_1 }
1673
1671
  export { getPackage as getPackage_alias_2 }
@@ -1760,17 +1758,6 @@ declare interface I_BaseCorsOptions {
1760
1758
  whiteList?: string[];
1761
1759
  }
1762
1760
 
1763
- declare interface I_CheckPackage {
1764
- isCurrentProject: boolean;
1765
- installedPath: string;
1766
- file: T_PackageJson;
1767
- isUpToDate: boolean;
1768
- }
1769
- export { I_CheckPackage }
1770
- export { I_CheckPackage as I_CheckPackage_alias_1 }
1771
- export { I_CheckPackage as I_CheckPackage_alias_2 }
1772
- export { I_CheckPackage as I_CheckPackage_alias_3 }
1773
-
1774
1761
  declare interface I_Children {
1775
1762
  children: T_Children;
1776
1763
  }
@@ -1792,7 +1779,6 @@ export { I_Command as I_Command_alias_2 }
1792
1779
  export { I_Command as I_Command_alias_3 }
1793
1780
 
1794
1781
  declare interface I_CommandContext {
1795
- isRemote: boolean;
1796
1782
  isCurrentProject: boolean;
1797
1783
  }
1798
1784
  export { I_CommandContext }
@@ -1894,18 +1880,6 @@ export { I_GenericDocument as I_GenericDocument_alias_1 }
1894
1880
  export { I_GenericDocument as I_GenericDocument_alias_2 }
1895
1881
  export { I_GenericDocument as I_GenericDocument_alias_3 }
1896
1882
 
1897
- declare interface I_GetPackage {
1898
- path: string;
1899
- file: T_PackageJson;
1900
- isCurrentProject: boolean;
1901
- isDepend: boolean;
1902
- isDevDepend: boolean;
1903
- }
1904
- export { I_GetPackage }
1905
- export { I_GetPackage as I_GetPackage_alias_1 }
1906
- export { I_GetPackage as I_GetPackage_alias_2 }
1907
- export { I_GetPackage as I_GetPackage_alias_3 }
1908
-
1909
1883
  declare interface I_GraphqlCodegenConfig {
1910
1884
  uri: string;
1911
1885
  from: string;
@@ -2168,6 +2142,32 @@ export { I_NextIntlProviderProps as I_NextIntlProviderProps_alias_1 }
2168
2142
  export { I_NextIntlProviderProps as I_NextIntlProviderProps_alias_2 }
2169
2143
  export { I_NextIntlProviderProps as I_NextIntlProviderProps_alias_3 }
2170
2144
 
2145
+ declare interface I_PackageInfo {
2146
+ name: string;
2147
+ currentVersion: string;
2148
+ latestVersion: string;
2149
+ isCurrentProject: boolean;
2150
+ isInstalled: boolean;
2151
+ isUpToDate: boolean;
2152
+ isDependency: boolean;
2153
+ isDevDependency: boolean;
2154
+ installedPath: string;
2155
+ file: T_PackageJson;
2156
+ }
2157
+ export { I_PackageInfo }
2158
+ export { I_PackageInfo as I_PackageInfo_alias_1 }
2159
+ export { I_PackageInfo as I_PackageInfo_alias_2 }
2160
+ export { I_PackageInfo as I_PackageInfo_alias_3 }
2161
+
2162
+ declare interface I_PackageInput {
2163
+ name: string;
2164
+ type?: E_PackageType;
2165
+ }
2166
+ export { I_PackageInput }
2167
+ export { I_PackageInput as I_PackageInput_alias_1 }
2168
+ export { I_PackageInput as I_PackageInput_alias_2 }
2169
+ export { I_PackageInput as I_PackageInput_alias_3 }
2170
+
2171
2171
  declare type I_Return<T = void, E = unknown> = I_ReturnSuccess<T, E> | I_ReturnFailure;
2172
2172
  export { I_Return }
2173
2173
  export { I_Return as I_Return_alias_1 }
@@ -2718,7 +2718,7 @@ export { resolve as resolve_alias_1 }
2718
2718
  export { resolve as resolve_alias_2 }
2719
2719
  export { resolve as resolve_alias_3 }
2720
2720
 
2721
- declare function resolveCommands(input: T_CommandMapInput, context?: Partial<I_CommandContext>): Promise<{
2721
+ declare function resolveCommands(input: T_CommandMapInput): Promise<{
2722
2722
  [k: string]: string | I_Command_2;
2723
2723
  }>;
2724
2724
  export { resolveCommands }
@@ -3014,7 +3014,7 @@ export { setGlobalApolloErrorCallback as setGlobalApolloErrorCallback_alias_1 }
3014
3014
  export { setGlobalApolloErrorCallback as setGlobalApolloErrorCallback_alias_2 }
3015
3015
  export { setGlobalApolloErrorCallback as setGlobalApolloErrorCallback_alias_3 }
3016
3016
 
3017
- declare function setupPackages(packages: string[], options?: {
3017
+ declare function setupPackages(packages: I_PackageInput[], options?: {
3018
3018
  update?: boolean;
3019
3019
  postInstallActions?: (() => Promise<void>)[];
3020
3020
  }): Promise<void>;
@@ -3268,7 +3268,7 @@ declare interface T_PackageJson {
3268
3268
  version?: string;
3269
3269
  dependencies?: Record<string, string>;
3270
3270
  devDependencies?: Record<string, string>;
3271
- [key: string]: any;
3271
+ [key: string]: unknown;
3272
3272
  }
3273
3273
  export { T_PackageJson }
3274
3274
  export { T_PackageJson as T_PackageJson_alias_1 }
@@ -3442,6 +3442,12 @@ export { unlinkSync as unlinkSync_alias_1 }
3442
3442
  export { unlinkSync as unlinkSync_alias_2 }
3443
3443
  export { unlinkSync as unlinkSync_alias_3 }
3444
3444
 
3445
+ declare function updatePackage(packageInfo: I_PackageInfo): Promise<void>;
3446
+ export { updatePackage }
3447
+ export { updatePackage as updatePackage_alias_1 }
3448
+ export { updatePackage as updatePackage_alias_2 }
3449
+ export { updatePackage as updatePackage_alias_3 }
3450
+
3445
3451
  declare function useApolloError(): I_ApolloErrorContext_2;
3446
3452
  export { useApolloError }
3447
3453
  export { useApolloError as useApolloError_alias_1 }
@@ -1 +1 @@
1
- "use strict";function e(e,t){if(t==null||t>e.length)t=e.length;for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function t(e){if(Array.isArray(e))return e}function r(t){if(Array.isArray(t))return e(t)}function n(e,t,r,n,o,a,i){try{var c=e[a](i);var u=c.value}catch(e){r(e);return}if(c.done){t(u)}else{Promise.resolve(u).then(n,o)}}function o(e){return function(){var t=this,r=arguments;return new Promise(function(o,a){var i=e.apply(t,r);function c(e){n(i,o,a,c,u,"next",e)}function u(e){n(i,o,a,c,u,"throw",e)}c(undefined)})}}function a(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}function i(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function c(e,t){var r=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r==null)return;var n=[];var o=true;var a=false;var i,c;try{for(r=r.call(e);!(o=(i=r.next()).done);o=true){n.push(i.value);if(t&&n.length===t)break}}catch(e){a=true;c=e}finally{try{if(!o&&r["return"]!=null)r["return"]()}finally{if(a)throw c}}return n}function u(){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 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 l(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};var n=Object.keys(r);if(typeof Object.getOwnPropertySymbols==="function"){n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))}n.forEach(function(t){a(e,t,r[t])})}return e}function f(e,t){if(e==null)return{};var r=d(e,t);var n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++){n=a[o];if(t.indexOf(n)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,n))continue;r[n]=e[n]}}return r}function d(e,t){if(e==null)return{};var r={};var n=Object.keys(e);var o,a;for(a=0;a<n.length;a++){o=n[a];if(t.indexOf(o)>=0)continue;r[o]=e[o]}return r}function v(e,r){return t(e)||c(e,r)||y(e,r)||u()}function p(e){return r(e)||i(e)||y(e)||s()}function g(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function y(t,r){if(!t)return;if(typeof t==="string")return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor)n=t.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,r)}function m(e,t){var r,n,o,a={label:0,sent:function(){if(o[0]&1)throw o[1];return o[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(t){return u([e,t])}}function u(c){if(r)throw new TypeError("Generator is already executing.");while(i&&(i=0,c[0]&&(a=0)),a)try{if(r=1,n&&(o=c[0]&2?n["return"]:c[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;if(n=0,o)c=[c[0]&2,o.value];switch(c[0]){case 0:case 1:o=c;break;case 4:a.label++;return{value:c[1],done:false};case 5:a.label++;n=c[1];c=[0];continue;case 7:c=a.ops.pop();a.trys.pop();continue;default:if(!(o=a.trys,o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){a=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(c[0]===6&&a.label<o[1]){a.label=o[1];o=c;break}if(o&&a.label<o[2]){a.label=o[2];a.ops.push(c);break}if(o[2])a.ops.pop();a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e];n=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}}var h=void 0;var b=Object.create;var I=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty;var w=function(e,t){return I(e,"name",{value:t,configurable:!0})};var C=function(e,t){for(var r in t)I(e,r,{get:t[r],enumerable:!0})},_=function(e,t,r,n){var o=true,a=false,i=undefined;if(t&&(typeof t==="undefined"?"undefined":g(t))=="object"||typeof t=="function")try{var c=function(){var o=s.value;!S.call(e,o)&&o!==r&&I(e,o,{get:function(){return t[o]},enumerable:!(n=E(t,o))||n.enumerable})};for(var u=T(t)[Symbol.iterator](),s;!(o=(s=u.next()).done);o=true)c()}catch(e){a=true;i=e}finally{try{if(!o&&u.return!=null){u.return()}}finally{if(a){throw i}}}return e};var G=function(e,t,r){return r=e!=null?b(O(e)):{},_(t||!e||!e.__esModule?I(r,"default",{value:e,enumerable:!0}):r,e)},N=function(e){return _(I({},"__esModule",{value:!0}),e)};var L={};C(L,{mergeConfigs:function(){return tj}});module.exports=N(L);var j=G(require("@antfu/eslint-config"),1);var k=G(require("@vitejs/plugin-react-swc"),1),R=require("vitest/config");function A(e){return(0,R.defineConfig)(l({plugins:[(0,k.default)()],test:{include:["**/*.test.e2e.?(c|m)[jt]s?(x)"],browser:{enabled:!0,provider:"playwright",instances:[{browser:"chromium"},{browser:"firefox"},{browser:"webkit"}]}}},e))}w(A,"vitestE2E");var D=G(require("@vitejs/plugin-react-swc"),1),x=require("vitest/config");var P=".cyberskill-storage";var M=G(require("@dotenvx/dotenvx"),1),F=require("envalid"),U=G(require("os"),1),q=G(require("path"),1),K=G(require("process"),1);var Y=!1;function B(){Y||(M.default.config(),Y=!0)}w(B,"loadEnvFile");function W(){B();var e=(0,F.cleanEnv)(K.default.env,{CWD:(0,F.str)({default:K.default.cwd()}),DEBUG:(0,F.bool)({default:!1}),CYBERSKILL_STORAGE_DIRECTORY:(0,F.str)({default:q.default.join(U.default.homedir(),P)})});return{CWD:e.CWD,DEBUG:e.DEBUG,CYBERSKILL_STORAGE_DIRECTORY:e.CYBERSKILL_STORAGE_DIRECTORY}}w(W,"getEnv");var J=function(e){return e.CLI="CLI",e.STRING="STRING",e.FUNCTION="FUNCTION",e}({});var H=require("child_process"),V=G(require("process"),1),$=G(require("util"),1);var z=function(e){return e.Error="error",e.Warning="warning",e}({});var Q=G(require("chalk"),1),X=G(require("consola"),1),Z=require("graphql");var ee=W();ee.DEBUG||(X.default.level=4);function et(e){var t=Q.default[e];return typeof t=="function"?t:Q.default.green}w(et,"chalkKeyword");var er={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 r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"red";if(!(t===null||t===void 0?void 0:t.length)){X.default.box(Q.default.green(e));return}t.forEach(function(e){var t=e.file,n=e.position,o=e.rule,a=e.message;X.default.log("".concat(Q.default.gray("File:")," ").concat(Q.default.blue("".concat(t).concat(n?":".concat(n):"")))),o&&X.default.log(" ".concat(et(r)("Rule:")," ").concat(o)),X.default.log(" ".concat(et(r)("Message:")," ").concat(a))}),X.default.box(et(r)("".concat(e," : ").concat(t.length))),X.default.log(Q.default.gray("─".repeat(40)))}};var en={isCurrentProject:!1,installedPath:"",file:{},isUpToDate:!1};var eo=G(require("node-fetch"),1);var ea=G(require("fs-extra"),1);var ei=ea.default,ec=ei.lstatSync,eu=ei.readdirSync,es=ei.mkdirSync,el=ei.readFileSync,ef=ei.unlinkSync,ed=ei.statSync,ev=ea.default.readJsonSync;function ep(e,t,r){ea.default.writeFileSync(e,t,r!==null&&r!==void 0?r:"utf-8")}w(ep,"writeFileSync");function eg(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}return t.every(function(e){return ea.default.pathExistsSync(e)})}w(eg,"pathExistsSync");var ey=W();function em(e){var t=eq(ey.CWD,eH);if(!eg(t))return!1;try{var r=ev(t),n=r.name,o=r.dependencies,a=o===void 0?{}:o,i=r.devDependencies,c=i===void 0?{}:i,u=n===e,s=e in a,l=e in c;return u||s||l?{path:t,file:r,isCurrentProject:u,isDepend:s,isDevDepend:l}:!1}catch(e){return er.warn("Failed to read package.json: ".concat(e.message)),!1}}w(em,"getPackage");function eh(e){return o(function(){var t,r,n,o;return m(this,function(a){switch(a.label){case 0:a.trys.push([0,3,,4]);return[4,(0,eo.default)("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:r=a.sent(),n=r.version;return[2,n];case 3:o=a.sent();throw er.error('Failed to fetch version for "'.concat(e,'": ').concat(o.message)),o;case 4:return[2]}})})()}w(eh,"getLatestPackageVersion");function eb(e,t){return o(function(){var r,n,o,a,i,c,u,s,f,d,v,p,g,y,h,b,I,E,T,O,S;return m(this,function(m){switch(m.label){case 0:m.trys.push([0,4,,5]);r=em(e);if(!r)return[2,l({},en)];u=r.path,s=r.file,f=r.isCurrentProject,d=r.isDepend,v=r.isDevDepend,p=(n=s.dependencies)!==null&&n!==void 0?n:{},g=(o=s.devDependencies)!==null&&o!==void 0?o:{},y=f?(a=s.version)!==null&&a!==void 0?a:"0.0.0":d?(i=p[e])!==null&&i!==void 0?i:"0.0.0":v?(c=g[e])!==null&&c!==void 0?c:"0.0.0":"0.0.0";if(!f)return[3,1];I=y;return[3,3];case 1:return[4,eh(e)];case 2:I=m.sent();m.label=3;case 3:h=I,b=f||y===h;if(!b&&(t===null||t===void 0?void 0:t.update)){;T=d?"dependencies":v?"devDependencies":null;T&&((E=s[T])===null||E===void 0?void 0:E[e])!==h&&(s[T]=(O=s[T])!==null&&O!==void 0?O:{},s[T][e]=h,ep(u,JSON.stringify(s,null,4)),er.info('Updated "'.concat(e,'" to version ').concat(h)))}return[2,{isCurrentProject:f,installedPath:u,file:s,isUpToDate:b}];case 4:S=m.sent();return[2,(er.error('Error checking package "'.concat(e,'": ').concat(S.message)),l({},en))];case 5:return[2]}})})()}w(eb,"checkPackage");function eI(){return o(function(){var e,t,r,n,o,a,i,c,u,s,l,f;return m(this,function(d){switch(d.label){case 0:e=[{command:w(function(){return tE.pnpmInstallStandard()},"command"),message:"Installing dependencies (standard)"},{command:w(function(){return tE.pnpmInstallLegacy()},"command"),message:"Retrying with legacy peer dependencies"},{command:w(function(){return tE.pnpmInstallForce()},"command"),message:"Retrying with force install"}];t=true,r=false,n=undefined;d.label=1;case 1:d.trys.push([1,9,10,11]);o=e[Symbol.iterator]();d.label=2;case 2:if(!!(t=(a=o.next()).done))return[3,8];i=a.value,c=i.command,u=i.message;d.label=3;case 3:d.trys.push([3,6,,7]);return[4,c()];case 4:s=d.sent();return[4,ex("".concat(u," using: ").concat(s),s)];case 5:d.sent();return[2];case 6:l=d.sent();er.warn("Installation attempt failed: ".concat(u)),er.error("Details: ".concat(l.message));return[3,7];case 7:t=true;return[3,2];case 8:return[3,11];case 9:f=d.sent();r=true;n=f;return[3,11];case 10:try{if(!t&&o.return!=null){o.return()}}finally{if(r){throw n}}return[7];case 11:throw new Error("All dependency installation strategies failed.")}})})()}w(eI,"installDependencies");function eE(e,t){return o(function(){var r,n,o,a,i,c,u,s,f,d,v;return m(this,function(g){switch(g.label){case 0:if(!eg(th.PACKAGE_JSON)){er.error("package.json not found. Aborting setup.");return[2]}g.label=1;case 1:g.trys.push([1,13,,14]);r=p(new Set(e)).sort();return[4,Promise.all(r.map(function(e){return eb(e,l({},(t===null||t===void 0?void 0:t.update)&&{update:t.update}))}))];case 2:n=g.sent().every(function(e){return e.isUpToDate});if(n)return[3,4];return[4,eI()];case 3:n=g.sent();g.label=4;case 4:n;a=true,i=false,c=undefined;g.label=5;case 5:g.trys.push([5,10,11,12]);u=((o=t===null||t===void 0?void 0:t.postInstallActions)!==null&&o!==void 0?o:[])[Symbol.iterator]();g.label=6;case 6:if(!!(a=(s=u.next()).done))return[3,9];f=s.value;return[4,f()];case 7:g.sent();g.label=8;case 8:a=true;return[3,6];case 9:return[3,12];case 10:d=g.sent();i=true;c=d;return[3,12];case 11:try{if(!a&&u.return!=null){u.return()}}finally{if(i){throw c}}return[7];case 12:return[3,14];case 13:v=g.sent();throw er.error('Failed to setup "'.concat(e.join(", "),'": ').concat(v.message)),v;case 14:return[2]}})})()}w(eE,"setupPackages");var eT=G(require("node-persist"),1);var eO=W();function eS(){return o(function(){var e;return m(this,function(t){switch(t.label){case 0:e=eT.default.defaultInstance;if(e)return[3,2];return[4,eT.default.init({dir:eO.CYBERSKILL_STORAGE_DIRECTORY,stringify:JSON.stringify,parse:JSON.parse,encoding:"utf8",logging:!1,forgiveParseErrors:!0})];case 1:e=t.sent();t.label=2;case 2:e;return[2]}})})()}w(eS,"initNodePersist");var ew={get:function e(e){return o(function(){var t,r;return m(this,function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,eS()];case 1:n.sent();return[4,eT.default.getItem(e)];case 2:return[2,(t=n.sent())!==null&&t!==void 0?t:null];case 3:r=n.sent();return[2,(er.error('[Storage:get] Error getting key "'.concat(e,'":'),r),null)];case 4:return[2]}})})()},set:function e(e,t){return o(function(){var r;return m(this,function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,eS()];case 1:n.sent();return[4,eT.default.setItem(e,t)];case 2:n.sent();return[3,4];case 3:r=n.sent();er.error('[Storage:set] Error setting key "'.concat(e,'":'),r);return[3,4];case 4:return[2]}})})()},remove:function e(e){return o(function(){var t;return m(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,eS()];case 1:r.sent();return[4,eT.default.removeItem(e)];case 2:r.sent();return[3,4];case 3:t=r.sent();er.error('[Storage:remove] Error removing key "'.concat(e,'":'),t);return[3,4];case 4:return[2]}})})()},keys:function e(){return o(function(){var e,t;return m(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,eS()];case 1:r.sent();return[4,eT.default.keys()];case 2:e=r.sent();return[2,Array.isArray(e)?e:(er.warn("[Storage:keys] Invalid keys response:",e),[])];case 3:t=r.sent();return[2,(er.error("[Storage:keys] Error getting keys:",t),[])];case 4:return[2]}})})()},getLogLink:function e(e){return o(function(){return m(this,function(t){try{return[2,"".concat(eO.CYBERSKILL_STORAGE_DIRECTORY," (key: ").concat(e,")")]}catch(e){return[2,(er.error("[Storage:getLogLink] Error getting log link:",e),null)]}return[2]})})()}};var eC=W(),e_=$.promisify(H.exec);function eG(e){return"error_list:".concat(e)}w(eG,"getErrorListKey");function eN(e){return o(function(){var t,r,n;return m(this,function(a){switch(a.label){case 0:if(e.length===0)return[2];t=Date.now(),r=eG(t);a.label=1;case 1:a.trys.push([1,3,,4]);return[4,ew.set(r,{errors:e,timestamp:t})];case 2:a.sent(),setTimeout(function(){return o(function(){var e;return m(this,function(t){switch(t.label){case 0:return[4,ew.getLogLink(r)];case 1:e=t.sent();e&&er.info("\uD83D\uDCC2 Open the error list manually: ".concat(e));return[2]}})})()},10);return[3,4];case 3:n=a.sent();er.error("Failed to save errors: ".concat(n.message));return[3,4];case 4:return[2]}})})()}w(eN,"saveErrorListToStorage");function eL(e){var t=[],r=[],n="",o=/^\s*(\d+):(\d+)\s+(error|warning)\s+(.+?)\s+(\S+)$/,a=/^(.+?)\((\d+),(\d+)\):\s+(error|warning)\s+TS\d+:\s+(\S.+)$/,i=/^✖\s+(.*?)\s+\[(.*?)\]$/;e.split("\n").forEach(function(e){if(e.startsWith("/"))n=e.trim();else{var c,u,s,l,f;var d=o.exec(e)||[],v=a.exec(e)||[],p=i.exec(e)||[];var g,y,m,h,b,I;d.length&&n?t.push({file:n,position:"".concat(d[1],":").concat(d[2]),type:d[3]===z.Error?z.Error:z.Warning,message:(g=d===null||d===void 0?void 0:(c=d[4])===null||c===void 0?void 0:c.trim())!==null&&g!==void 0?g:"",rule:(y=d===null||d===void 0?void 0:(u=d[5])===null||u===void 0?void 0:u.trim())!==null&&y!==void 0?y:""}):v.length?t.push({file:(m=v===null||v===void 0?void 0:v[1])!==null&&m!==void 0?m:"",position:"".concat(v[2],":").concat(v[3]),type:v[4]===z.Error?z.Error:z.Warning,message:(h=v===null||v===void 0?void 0:(s=v[5])===null||s===void 0?void 0:s.trim())!==null&&h!==void 0?h:""}):p.length?t.push({file:"commitlint",type:z.Error,message:(b=p===null||p===void 0?void 0:(l=p[1])===null||l===void 0?void 0:l.trim())!==null&&b!==void 0?b:"",rule:(I=p===null||p===void 0?void 0:(f=p[2])===null||f===void 0?void 0:f.trim())!==null&&I!==void 0?I:""}):r.push(e.trim())}}),t.length&&eN(t),eC.DEBUG&&r.length&&(er.warn("Unmatched lines:"),r.forEach(function(e){return er.info(" ".concat(e))}))}w(eL,"parseTextErrors");function ej(e){try{var t=JSON.parse(e),r=[];t.forEach(function(e){var t=e.filePath,n=e.messages;n.forEach(function(e){var n=e.severity,o=e.line,a=e.column,i=e.ruleId,c=e.message;r.push({type:n===2?z.Error:z.Warning,file:t,position:"".concat(o,":").concat(a),rule:i,message:c})})}),r.length&&eN(r)}catch(t){eL(e)}}w(ej,"parseCommandOutput");function ek(e){return o(function(e){var t,r,n,o,a,i,c,u,s;var l=arguments;return m(this,function(f){switch(f.label){case 0:t=l.length>1&&l[1]!==void 0?l[1]:ej;r=new AbortController;V.default.on("SIGINT",function(){er.warn("Process interrupted. Terminating..."),r.abort(),V.default.exit()});f.label=1;case 1:f.trys.push([1,4,,5]);if(!(typeof e=="string"))return[3,3];return[4,e_(e,{maxBuffer:0x6400000,signal:r.signal})];case 2:n=f.sent(),o=n.stdout,a=n.stderr;[o,a].forEach(function(e){return e&&t(e)});f.label=3;case 3:return[3,5];case 4:i=f.sent();c=i.stdout,u=i.stderr,s=i.message;[c,u].forEach(function(e){return e&&t(e)}),!u&&!c&&er.error("Command failed: ".concat(s));return[3,5];case 5:return[2]}})}).apply(this,arguments)}w(ek,"executeCommand");function eR(e){return{raw:!0,cmd:e}}w(eR,"rawCommand");function eA(e,t){return(t===null||t===void 0?void 0:t.isRemote)?"".concat(ts," ").concat(eB," ").concat(e):(t===null||t===void 0?void 0:t.isCurrentProject)?"".concat(ts," ").concat(ti," ").concat(e4," ").concat(e):"".concat(ts," ").concat(e3," ").concat(e)}w(eA,"formatCLI");function eD(e,t){return typeof e=="function"?eA(e(t),t):(typeof e==="undefined"?"undefined":g(e))=="object"&&(e===null||e===void 0?void 0:e.raw)===!0?e.cmd:typeof e=="string"?eA(e,t):e}w(eD,"formatCommand");function ex(e,t){return o(function(){var r;return m(this,function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);er.start("".concat(e)),eC.DEBUG&&er.info("→ ".concat(t));return[4,ek(t)];case 1:n.sent(),er.success("".concat(e," done."));return[3,3];case 2:r=n.sent();throw er.error("".concat(e," failed: ").concat(r.message)),r;case 3:return[2]}})})()}w(ex,"runCommand");var eP=G(require("path"),1);var eM=W(),eF=eP.default;function eU(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}var n;return(n=eF).resolve.apply(n,[eM.CWD].concat(p(t)))}w(eU,"resolveWorkingPath");function eq(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}var n;return(n=eF).join.apply(n,p(t))}w(eq,"join");var eK=W(),eY=eK.CWD,eB="@cyberskill/shared",eW="node_modules",eJ="dist",eH="package.json",eV="package-lock.json",e$="tsconfig.json",ez=".gitignore",eQ=".simple-git-hooks.json",eX="pnpm-lock.yaml",eZ=".git/hooks/",e0=".git/COMMIT_EDITMSG",e1=".migrate-mongo.config.js",e2=eq(eY,eW,eB,eJ),e3="cyberskill",e4="src/nodejs/cli/index.ts",e5="eslint",e6="eslint",e8="vitest",e7="playwright",e9="vitest",te="@commitlint/cli",tt="commitlint",tr="lint-staged",tn="lint-staged",to="typescript",ta="tsc",ti="tsx",tc="git",tu="pnpm",ts="pnpm exec",tl="simple-git-hooks",tf="simple-git-hooks",td="@eslint/config-inspector",tv="eslint-config-inspector",tp="node-modules-inspector",tg="node-modules-inspector",ty="migrate-mongo",tm="./node_modules/migrate-mongo/bin/migrate-mongo",th={CYBERSKILL_DIRECTORY:e2,WORKING_DIRECTORY:eY,TS_CONFIG:eU(e$),GIT_IGNORE:eU(ez),GIT_HOOK:eU(eZ),GIT_COMMIT_MSG:eU(e0),SIMPLE_GIT_HOOKS_JSON:eU(eQ),PACKAGE_JSON:eU(eH),PACKAGE_LOCK_JSON:eU(eV),PNPM_LOCK_YAML:eU(eX),NODE_MODULES:eU(eW),MIGRATE_MONGO_CONFIG:eU(e1),LINT_STAGED_CONFIG:eU("".concat(e2,"/configs/lint-staged/index.js")),COMMITLINT_CONFIG:eU("".concat(e2,"/configs/commitlint/index.js")),UNIT_TEST_CONFIG:eU("".concat(e2,"/react/vitest/vitest.unit.js")),UNIT_TEST_SETUP_CONFIG:eU("".concat(e2,"/react/vitest/vitest.unit.setup.js")),E2E_TEST_CONFIG:eU("".concat(e2,"/react/vitest/vitest.e2e.js"))};function tb(e,t,r){return o(function(){return m(this,function(n){switch(n.label){case 0:if(!t)throw new Error("'first' argument is undefined");switch(e){case J.CLI:return[3,1];case J.STRING:return[3,3]}return[3,4];case 1:return[4,eE(t.split(" "),{update:!0})];case 2:return[2,(n.sent(),eD(eR("".concat(ts," ").concat(r))))];case 3:return[2,eD(eR(t))];case 4:throw new Error("Unsupported command type");case 5:return[2]}})})()}w(tb,"buildCommand");function tI(e,t,r){return function(){return o(function(){return m(this,function(n){return[2,tb(e,t,r)]})})()}}w(tI,"commandFactory");var tE={simpleGitHooks:tI(J.CLI,tl,tf),eslintInspect:tI(J.CLI,td,tv),nodeModulesInspect:tI(J.CLI,tp,tg),eslintCheck:tI(J.CLI,e5,"".concat(e6," ").concat(th.WORKING_DIRECTORY," --no-cache")),eslintFix:tI(J.CLI,e5,"".concat(e6," ").concat(th.WORKING_DIRECTORY," --fix --no-cache")),typescriptCheck:tI(J.CLI,to,"".concat(ta," -p ").concat(th.TS_CONFIG," --noEmit")),configureGitHook:tI(J.STRING,"".concat(tc," config core.hooksPath ").concat(th.GIT_HOOK)),testUnit:tI(J.CLI,e8,"".concat(e9," --config ").concat(th.UNIT_TEST_CONFIG)),testE2e:tI(J.CLI,"".concat(e8," ").concat(e7),"".concat(e9," --config ").concat(th.E2E_TEST_CONFIG)),mongoMigrateCreate:w(function(e){return tI(J.CLI,ty,"".concat(ti," ").concat(tm," create ").concat(e," -f ").concat(th.MIGRATE_MONGO_CONFIG))()},"mongoMigrateCreate"),mongoMigrateUp:tI(J.CLI,ty,"".concat(ti," ").concat(tm," up -f ").concat(th.MIGRATE_MONGO_CONFIG)),mongoMigrateDown:tI(J.CLI,ty,"".concat(ti," ").concat(tm," down -f ").concat(th.MIGRATE_MONGO_CONFIG)),commitLint:tI(J.CLI,te,"".concat(tt," --edit ").concat(th.GIT_COMMIT_MSG," --config ").concat(th.COMMITLINT_CONFIG)),lintStaged:tI(J.CLI,tr,"".concat(tn," --config ").concat(th.LINT_STAGED_CONFIG)),stageBuildDirectory:tI(J.STRING,"".concat(tc," add ").concat(eJ)),build:tI(J.STRING,"".concat(tu," run build")),pnpmInstallStandard:tI(J.STRING,"".concat(tu," install")),pnpmInstallLegacy:tI(J.STRING,"".concat(tu," install --legacy-peer-deps")),pnpmInstallForce:tI(J.STRING,"".concat(tu," install --force"))};function tT(e){return(0,x.defineConfig)(l({plugins:[(0,D.default)()],test:{globals:!0,environment:"jsdom",pool:"vmThreads",include:["**/*.test.unit.?(c|m)[jt]s?(x)"],setupFiles:[th.UNIT_TEST_SETUP_CONFIG]}},e))}w(tT,"vitestUnit");function tO(e){return(typeof e==="undefined"?"undefined":g(e))=="object"&&e!==null&&!Array.isArray(e)}w(tO,"isObject");function tS(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}var n={};var o=true,a=false,i=undefined,c=true,u=false,s=undefined;try{for(var l=t.flat()[Symbol.iterator](),f;!(c=(f=l.next()).done);c=true){var d=f.value;try{for(var g=Object.entries(d)[Symbol.iterator](),y;!(o=(y=g.next()).done);o=true){var m=v(y.value,2),h=m[0],b=m[1];var I=n[h];if(Array.isArray(b)){var E=Array.isArray(I)?I:[];n[h]=p(new Set(p(E).concat(p(b))));continue}if(tO(b)){n[h]=tS(tO(I)?I:{},b);continue}n[h]=b}}catch(e){a=true;i=e}finally{try{if(!o&&g.return!=null){g.return()}}finally{if(a){throw i}}}}}catch(e){u=true;s=e}finally{try{if(!c&&l.return!=null){l.return()}}finally{if(u){throw s}}}return n}w(tS,"deepMerge");var tw=function(e){return e.ESLINT="eslint",e.COMMITLINT="commitlint",e.LINT_STAGED="lint-staged",e.VITEST_REACT_E2E="vitest-react-e2e",e.VITEST_REACT_UNIT="vitest-react-unit",e}({});var tC=G(require("globals"),1),t_=[{languageOptions:{globals:l({},tC.node,tC.browser)},rules:{"perfectionist/sort-imports":["error",{internalPattern:["^#.*","^@/.*"]}],"dot-notation":"off"},ignores:["build","dist"]}];var tG;var tN=w(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++){t[r]=arguments[r]}var n=tS.apply(void 0,[t_].concat(p(t.map(function(e){return e})))),o=n.ignores,a=f(n,["ignores"]),i=Array.isArray(o)&&o.every(function(e){return typeof e=="string"})?{ignores:o}:void 0,c=[a].concat(p(i?[i]:[]));return(0,j.default).apply(h,[{stylistic:{semi:!0,indent:4,quotes:"single"},formatters:{css:!0,html:!0,markdown:"prettier"},yaml:!1,react:!0}].concat(p(c)))},"handleESLint"),tL=(tG={},a(tG,tw.ESLINT,function(e){return tN(e)}),a(tG,tw.COMMITLINT,function(e){return tS(e)}),a(tG,tw.LINT_STAGED,function(e){return tS(e)}),a(tG,tw.VITEST_REACT_UNIT,function(e){return tT(e)}),a(tG,tw.VITEST_REACT_E2E,function(e){return A(e)}),tG);function tj(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++){r[n-1]=arguments[n]}var o=tL[e];if(!o)throw new Error("Unknown config type: ".concat(e));return o.apply(void 0,p(r))}w(tj,"mergeConfigs");0&&(module.exports={mergeConfigs:mergeConfigs});
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(e){if(Array.isArray(e))return e}function n(t){if(Array.isArray(t))return e(t)}function r(e,t,n,r,a,o,i){try{var c=e[o](i);var s=c.value}catch(e){n(e);return}if(c.done){t(s)}else{Promise.resolve(s).then(r,a)}}function a(e){return function(){var t=this,n=arguments;return new Promise(function(a,o){var i=e.apply(t,n);function c(e){r(i,a,o,c,s,"next",e)}function s(e){r(i,a,o,c,s,"throw",e)}c(undefined)})}}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 i(e){if(typeof Symbol!=="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function c(e,t){var n=e==null?null:typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n==null)return;var r=[];var a=true;var o=false;var i,c;try{for(n=n.call(e);!(a=(i=n.next()).done);a=true){r.push(i.value);if(t&&r.length===t)break}}catch(e){o=true;c=e}finally{try{if(!a&&n["return"]!=null)n["return"]()}finally{if(o)throw c}}return r}function s(){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 u(){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 l(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 f(e,t){if(e==null)return{};var n=d(e,t);var r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++){r=o[a];if(t.indexOf(r)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,r))continue;n[r]=e[r]}}return n}function d(e,t){if(e==null)return{};var n={};var r=Object.keys(e);var a,o;for(o=0;o<r.length;o++){a=r[o];if(t.indexOf(a)>=0)continue;n[a]=e[a]}return n}function p(e,n){return t(e)||c(e,n)||y(e,n)||s()}function m(e){return n(e)||i(e)||y(e)||u()}function v(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}function y(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 g(e,t){var n,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(t){return s([e,t])}}function s(c){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,c[0]&&(o=0)),o)try{if(n=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=t.call(e,o)}catch(e){c=[6,e];r=0}finally{n=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}}var E=void 0;var h=Object.create;var _=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var D=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var N=function(e,t){return _(e,"name",{value:t,configurable:!0})};var O=function(e,t){for(var n in t)_(e,n,{get:t[n],enumerable:!0})},T=function(e,t,n,r){var a=true,o=false,i=undefined;if(t&&(typeof t==="undefined"?"undefined":v(t))=="object"||typeof t=="function")try{var c=function(){var a=u.value;!C.call(e,a)&&a!==n&&_(e,a,{get:function(){return t[a]},enumerable:!(r=I(t,a))||r.enumerable})};for(var s=b(t)[Symbol.iterator](),u;!(a=(u=s.next()).done);a=true)c()}catch(e){o=true;i=e}finally{try{if(!a&&s.return!=null){s.return()}}finally{if(o){throw i}}}return e};var S=function(e,t,n){return n=e!=null?h(D(e)):{},T(t||!e||!e.__esModule?_(n,"default",{value:e,enumerable:!0}):n,e)},w=function(e){return T(_({},"__esModule",{value:!0}),e)};var P={};O(P,{mergeConfigs:function(){return tw}});module.exports=w(P);var G=S(require("@antfu/eslint-config"),1);var R=S(require("@vitejs/plugin-react-swc"),1),k=require("vitest/config");function A(e){return(0,k.defineConfig)(l({plugins:[(0,R.default)()],test:{include:["**/*.test.e2e.?(c|m)[jt]s?(x)"],browser:{enabled:!0,provider:"playwright",instances:[{browser:"chromium"},{browser:"firefox"},{browser:"webkit"}]}}},e))}N(A,"vitestE2E");var L=S(require("@vitejs/plugin-react-swc"),1),j=require("vitest/config");var U=".cyberskill-storage";var x=S(require("@dotenvx/dotenvx"),1),Y=require("envalid"),M=S(require("os"),1),V=S(require("path"),1),F=S(require("process"),1);var K=!1;function q(){K||(x.default.config(),K=!0)}N(q,"loadEnvFile");function B(){q();var e=(0,Y.cleanEnv)(F.default.env,{CWD:(0,Y.str)({default:F.default.cwd()}),DEBUG:(0,Y.bool)({default:!1}),CYBERSKILL_STORAGE_DIRECTORY:(0,Y.str)({default:V.default.join(M.default.homedir(),U)})});return{CWD:e.CWD,DEBUG:e.DEBUG,CYBERSKILL_STORAGE_DIRECTORY:e.CYBERSKILL_STORAGE_DIRECTORY}}N(B,"getEnv");var W=function(e){return e.CLI="CLI",e.STRING="STRING",e.FUNCTION="FUNCTION",e}({});var J=require("child_process"),H=S(require("process"),1),$=S(require("util"),1);var z=function(e){return e.Error="error",e.Warning="warning",e}({});var Q=S(require("chalk"),1),X=S(require("consola"),1),Z=require("graphql");var ee=B();ee.DEBUG||(X.default.level=4);function et(e){var t=Q.default[e];return typeof t=="function"?t:Q.default.green}N(et,"chalkKeyword");var en={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(Q.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(Q.default.gray("File:")," ").concat(Q.default.blue("".concat(t).concat(r?":".concat(r):"")))),a&&X.default.log(" ".concat(et(n)("Rule:")," ").concat(a)),X.default.log(" ".concat(et(n)("Message:")," ").concat(o))}),X.default.box(et(n)("".concat(e," : ").concat(t.length))),X.default.log(Q.default.gray("─".repeat(40)))}};var er=function(e){return e.DEPENDENCY="dependencies",e.DEV_DEPENDENCY="devDependencies",e.PEER_DEPENDENCY="peerDependencies",e.BUNDLE_DEPENDENCY="bundleDependencies",e.OPTIONAL_DEPENDENCY="optionalDependencies",e}({});var ea=S(require("node-fetch"),1);var eo=S(require("fs-extra"),1);var ei=eo.default,ec=ei.lstatSync,es=ei.readdirSync,eu=ei.mkdirSync,el=ei.readFileSync,ef=ei.unlinkSync,ed=ei.statSync,ep=eo.default.readJsonSync;function em(e,t,n){eo.default.writeFileSync(e,t,n!==null&&n!==void 0?n:"utf-8")}N(em,"writeFileSync");function ev(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}return t.every(function(e){return eo.default.pathExistsSync(e)})}N(ev,"pathExistsSync");var ey=B();function eg(e){return /*#__PURE__*/a(function(){var t,n,r,a;return g(this,function(o){switch(o.label){case 0:o.trys.push([0,3,,4]);return[4,(0,ea.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,r];case 3:a=o.sent();throw en.error('Failed to fetch version for "'.concat(e,'": ').concat(a.message)),a;case 4:return[2]}})})()}N(eg,"getLatestPackageVersion");function eE(e){return /*#__PURE__*/a(function(){var t,n,r,a,o,i,c,s,u,l,f,d,p,m,v,y,E,h,_;return g(this,function(g){switch(g.label){case 0:g.trys.push([0,2,,3]);if(!ev(tg.PACKAGE_JSON))return[2,{name:e.name,currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:e.type===er.DEPENDENCY,isDevDependency:e.type===er.DEV_DEPENDENCY,installedPath:"",file:{}}];t=ep(tg.PACKAGE_JSON),n=t.name,r=t.version,a=r===void 0?"":r,o=t.dependencies,i=o===void 0?{}:o,c=t.devDependencies,s=c===void 0?{}:c;if(e.name===n)return[2,{name:n,currentVersion:a,latestVersion:a,isCurrentProject:!0,isInstalled:!0,isUpToDate:!0,isDependency:e.type===er.DEPENDENCY,isDevDependency:e.type===er.DEV_DEPENDENCY,installedPath:tg.PACKAGE_JSON,file:t}];u=e.name in i,l=e.name in s;return[4,eg(e.name)];case 1:f=g.sent();if(!u&&!l)return[2,{name:e.name,currentVersion:"",latestVersion:f,isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:e.type===er.DEPENDENCY,isDevDependency:e.type===er.DEV_DEPENDENCY,installedPath:"",file:{}}];m=(p=(d=i[e.name])!==null&&d!==void 0?d:s[e.name])!==null&&p!==void 0?p:"",v=eV(ey.CWD,eB,e.name,eJ);if(!ev(v))return[2,{name:e.name,currentVersion:"",latestVersion:f,isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:u,isDevDependency:l,installedPath:"",file:{}}];y=ep(v),E=y.version,h=E===void 0?"":E;return[2,m!==h?{name:e.name,currentVersion:h||m,latestVersion:f,isCurrentProject:!1,isInstalled:!0,isUpToDate:!1,isDependency:u,isDevDependency:l,installedPath:v,file:y}:{name:e.name,currentVersion:m,latestVersion:f,isCurrentProject:!1,isInstalled:!0,isUpToDate:m===f,isDependency:u,isDevDependency:l,installedPath:v,file:y}];case 2:_=g.sent();throw en.error('Error getting package "'.concat(e.name,'": ').concat(_.message)),_;case 3:return[2]}})})()}N(eE,"getPackage");function eh(e){return /*#__PURE__*/a(function(){var t,n,r,a,o;return g(this,function(i){try{;r=ep(tg.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),em(tg.PACKAGE_JSON,JSON.stringify(r,null,4)),en.info('Updated "'.concat(e.name,'" to version ').concat(e.latestVersion))}catch(t){throw en.error('Error updating package "'.concat(e.name,'": ').concat(t.message)),t}return[2]})})()}N(eh,"updatePackage");function e_(){return /*#__PURE__*/a(function(){var e,t,n,r,a,o,i,c,s,u,l,f,d;return g(this,function(p){switch(p.label){case 0:p.trys.push([0,12,,13]);e=[{command:N(function(){return th.pnpmInstallStandard()},"command"),message:"Installing dependencies (standard)"},{command:N(function(){return th.pnpmInstallLegacy()},"command"),message:"Retrying with legacy peer dependencies"},{command:N(function(){return th.pnpmInstallForce()},"command"),message:"Retrying with force install"}];t=true,n=false,r=undefined;p.label=1;case 1:p.trys.push([1,9,10,11]);a=e[Symbol.iterator]();p.label=2;case 2:if(!!(t=(o=a.next()).done))return[3,8];i=o.value,c=i.command,s=i.message;p.label=3;case 3:p.trys.push([3,6,,7]);return[4,c()];case 4:u=p.sent();return[4,ej("".concat(s," using: ").concat(u),u)];case 5:p.sent();return[2];case 6:l=p.sent();en.warn("Installation attempt failed: ".concat(s)),en.error("Details: ".concat(l.message));return[3,7];case 7:t=true;return[3,2];case 8:return[3,11];case 9:f=p.sent();n=true;r=f;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:d=p.sent();throw en.error("Failed to install dependencies: ".concat(d.message)),d;case 13:return[2]}})})()}N(e_,"installDependencies");function eI(e,t){return /*#__PURE__*/a(function(){var n,r,a,o,i,c,s,u,l,f,d;return g(this,function(p){switch(p.label){case 0:if(!ev(tg.PACKAGE_JSON)){en.error("package.json not found. Aborting setup.");return[2]}p.label=1;case 1:p.trys.push([1,14,,15]);return[4,Promise.all(e.map(eE))];case 2:n=p.sent().filter(function(e){return!e.isCurrentProject&&(!e.isInstalled||!e.isUpToDate)});r=n.length>0;if(!r)return[3,5];return[4,Promise.all(n.map(eh))];case 3:p.sent();return[4,e_()];case 4:r=p.sent();p.label=5;case 5:r;o=true,i=false,c=undefined;p.label=6;case 6:p.trys.push([6,11,12,13]);s=((a=t===null||t===void 0?void 0:t.postInstallActions)!==null&&a!==void 0?a:[])[Symbol.iterator]();p.label=7;case 7:if(!!(o=(u=s.next()).done))return[3,10];l=u.value;return[4,l()];case 8:p.sent();p.label=9;case 9:o=true;return[3,7];case 10:return[3,13];case 11:f=p.sent();i=true;c=f;return[3,13];case 12:try{if(!o&&s.return!=null){s.return()}}finally{if(i){throw c}}return[7];case 13:return[3,15];case 14:d=p.sent();throw en.error('Failed to setup "'.concat(e.map(function(e){return e.name}).join(", "),'": ').concat(d.message)),d;case 15:return[2]}})})()}N(eI,"setupPackages");var eb=S(require("node-persist"),1);var eD=B();function eC(){return /*#__PURE__*/a(function(){var e;return g(this,function(t){switch(t.label){case 0:e=eb.default.defaultInstance;if(e)return[3,2];return[4,eb.default.init({dir:eD.CYBERSKILL_STORAGE_DIRECTORY,stringify:JSON.stringify,parse:JSON.parse,encoding:"utf8",logging:!1,forgiveParseErrors:!0})];case 1:e=t.sent();t.label=2;case 2:e;return[2]}})})()}N(eC,"initNodePersist");var eN={get:function e(e){return /*#__PURE__*/a(function(){var t,n;return g(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,eC()];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,(en.error('[Storage:get] Error getting key "'.concat(e,'":'),n),null)];case 4:return[2]}})})()},set:function e(e,t){return /*#__PURE__*/a(function(){var n;return g(this,function(r){switch(r.label){case 0:r.trys.push([0,3,,4]);return[4,eC()];case 1:r.sent();return[4,eb.default.setItem(e,t)];case 2:r.sent();return[3,4];case 3:n=r.sent();en.error('[Storage:set] Error setting key "'.concat(e,'":'),n);return[3,4];case 4:return[2]}})})()},remove:function e(e){return /*#__PURE__*/a(function(){var t;return g(this,function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,eC()];case 1:n.sent();return[4,eb.default.removeItem(e)];case 2:n.sent();return[3,4];case 3:t=n.sent();en.error('[Storage:remove] Error removing key "'.concat(e,'":'),t);return[3,4];case 4:return[2]}})})()},keys:function e(){return /*#__PURE__*/a(function(){var e,t;return g(this,function(n){switch(n.label){case 0:n.trys.push([0,3,,4]);return[4,eC()];case 1:n.sent();return[4,eb.default.keys()];case 2:e=n.sent();return[2,Array.isArray(e)?e:(en.warn("[Storage:keys] Invalid keys response:",e),[])];case 3:t=n.sent();return[2,(en.error("[Storage:keys] Error getting keys:",t),[])];case 4:return[2]}})})()},getLogLink:function e(e){return /*#__PURE__*/a(function(){return g(this,function(t){try{return[2,"".concat(eD.CYBERSKILL_STORAGE_DIRECTORY," (key: ").concat(e,")")]}catch(e){return[2,(en.error("[Storage:getLogLink] Error getting log link:",e),null)]}return[2]})})()}};var eO=B(),eT=$.promisify(J.exec);function eS(e){return"error_list:".concat(e)}N(eS,"getErrorListKey");function ew(e){return /*#__PURE__*/a(function(){var t,n,r;return g(this,function(o){switch(o.label){case 0:if(e.length===0)return[2];t=Date.now(),n=eS(t);o.label=1;case 1:o.trys.push([1,3,,4]);return[4,eN.set(n,{errors:e,timestamp:t})];case 2:o.sent(),setTimeout(function(){return /*#__PURE__*/a(function(){var e;return g(this,function(t){switch(t.label){case 0:return[4,eN.getLogLink(n)];case 1:e=t.sent();e&&en.info("\uD83D\uDCC2 Open the error list manually: ".concat(e));return[2]}})})()},10);return[3,4];case 3:r=o.sent();en.error("Failed to save errors: ".concat(r.message));return[3,4];case 4:return[2]}})})()}N(ew,"saveErrorListToStorage");function eP(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.+)$/,i=/^✖\s+(.*?)\s+\[(.*?)\]$/;e.split("\n").forEach(function(e){if(e.startsWith("/"))r=e.trim();else{var c,s,u,l,f;var d=a.exec(e)||[],p=o.exec(e)||[],m=i.exec(e)||[];var v,y,g,E,h,_;d.length&&r?t.push({file:r,position:"".concat(d[1],":").concat(d[2]),type:d[3]===z.Error?z.Error:z.Warning,message:(v=d===null||d===void 0?void 0:(c=d[4])===null||c===void 0?void 0:c.trim())!==null&&v!==void 0?v:"",rule:(y=d===null||d===void 0?void 0:(s=d[5])===null||s===void 0?void 0:s.trim())!==null&&y!==void 0?y:""}):p.length?t.push({file:(g=p===null||p===void 0?void 0:p[1])!==null&&g!==void 0?g:"",position:"".concat(p[2],":").concat(p[3]),type:p[4]===z.Error?z.Error:z.Warning,message:(E=p===null||p===void 0?void 0:(u=p[5])===null||u===void 0?void 0:u.trim())!==null&&E!==void 0?E:""}):m.length?t.push({file:"commitlint",type:z.Error,message:(h=m===null||m===void 0?void 0:(l=m[1])===null||l===void 0?void 0:l.trim())!==null&&h!==void 0?h:"",rule:(_=m===null||m===void 0?void 0:(f=m[2])===null||f===void 0?void 0:f.trim())!==null&&_!==void 0?_:""}):n.push(e.trim())}}),t.length&&ew(t),eO.DEBUG&&n.length&&(en.warn("Unmatched lines:"),n.forEach(function(e){return en.info(" ".concat(e))}))}N(eP,"parseTextErrors");function eG(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,i=e.ruleId,c=e.message;n.push({type:r===2?z.Error:z.Warning,file:t,position:"".concat(a,":").concat(o),rule:i,message:c})})}),n.length&&ew(n)}catch(t){eP(e)}}N(eG,"parseCommandOutput");function eR(e){return /*#__PURE__*/a(function(e){var t,n,r,a,o,i,c,s,u;var l=arguments;return g(this,function(f){switch(f.label){case 0:t=l.length>1&&l[1]!==void 0?l[1]:eG;n=new AbortController;H.default.on("SIGINT",function(){en.warn("Process interrupted. Terminating..."),n.abort(),H.default.exit()});f.label=1;case 1:f.trys.push([1,4,,5]);if(!(typeof e=="string"))return[3,3];return[4,eT(e,{maxBuffer:0x6400000,signal:n.signal})];case 2:r=f.sent(),a=r.stdout,o=r.stderr;[a,o].forEach(function(e){return e&&t(e)});f.label=3;case 3:return[3,5];case 4:i=f.sent();c=i.stdout,s=i.stderr,u=i.message;[c,s].forEach(function(e){return e&&t(e)}),!s&&!c&&en.error("Command failed: ".concat(u));return[3,5];case 5:return[2]}})}).apply(this,arguments)}N(eR,"executeCommand");function ek(e){return{raw:!0,cmd:e}}N(ek,"rawCommand");function eA(e,t){return(t===null||t===void 0?void 0:t.isCurrentProject)?"".concat(ts," ").concat(to," ").concat(e4," ").concat(e):"".concat(ts," ").concat(e3," ").concat(e)}N(eA,"formatCLI");function eL(e,t){return typeof e=="function"?eA(e(t),t):(typeof e==="undefined"?"undefined":v(e))=="object"&&(e===null||e===void 0?void 0:e.raw)===!0?e.cmd:typeof e=="string"?eA(e,t):e}N(eL,"formatCommand");function ej(e,t){return /*#__PURE__*/a(function(){var n;return g(this,function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);en.start("".concat(e)),eO.DEBUG&&en.info("→ ".concat(t));return[4,eR(t)];case 1:r.sent(),en.success("".concat(e," done."));return[3,3];case 2:n=r.sent();throw en.error("".concat(e," failed: ").concat(n.message)),n;case 3:return[2]}})})()}N(ej,"runCommand");var eU=S(require("path"),1);var ex=B(),eY=eU.default;function eM(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r;return(r=eY).resolve.apply(r,[ex.CWD].concat(m(t)))}N(eM,"resolveWorkingPath");function eV(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r;return(r=eY).join.apply(r,m(t))}N(eV,"join");var eF=B(),eK=eF.CWD,eq="@cyberskill/shared",eB="node_modules",eW="dist",eJ="package.json",eH="package-lock.json",e$="tsconfig.json",ez=".gitignore",eQ=".simple-git-hooks.json",eX="pnpm-lock.yaml",eZ=".git/hooks/",e0=".git/COMMIT_EDITMSG",e1=".migrate-mongo.config.js",e2=eV(eK,eB,eq,eW),e3="cyberskill",e4="src/node/cli/index.ts",e5="eslint",e6="eslint",e7="vitest";var e8="vitest",e9="@commitlint/cli",te="commitlint",tt="lint-staged",tn="lint-staged",tr="typescript",ta="tsc",to="tsx",ti="git",tc="pnpm",ts="pnpm exec",tu="simple-git-hooks",tl="simple-git-hooks",tf="@eslint/config-inspector",td="eslint-config-inspector",tp="node-modules-inspector",tm="node-modules-inspector",tv="migrate-mongo",ty="./node_modules/migrate-mongo/bin/migrate-mongo",tg={CYBERSKILL_DIRECTORY:e2,WORKING_DIRECTORY:eK,TS_CONFIG:eM(e$),GIT_IGNORE:eM(ez),GIT_HOOK:eM(eZ),GIT_COMMIT_MSG:eM(e0),SIMPLE_GIT_HOOKS_JSON:eM(eQ),PACKAGE_JSON:eM(eJ),PACKAGE_LOCK_JSON:eM(eH),PNPM_LOCK_YAML:eM(eX),NODE_MODULES:eM(eB),MIGRATE_MONGO_CONFIG:eM(e1),LINT_STAGED_CONFIG:eM("".concat(e2,"/configs/lint-staged/index.js")),COMMITLINT_CONFIG:eM("".concat(e2,"/configs/commitlint/index.js")),UNIT_TEST_CONFIG:eM("".concat(e2,"/react/vitest/vitest.unit.js")),UNIT_TEST_SETUP_CONFIG:eM("".concat(e2,"/react/vitest/vitest.unit.setup.js")),E2E_TEST_CONFIG:eM("".concat(e2,"/react/vitest/vitest.e2e.js"))};function tE(e){var t=e.type,n=e.packages,r=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 /*#__PURE__*/a(function(){var e;return g(this,function(n){switch(n.label){case 0:switch(t){case W.CLI:return[3,1];case W.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,eI(o,{update:!0})];case 2:e=n.sent();n.label=3;case 3:return[2,(e,eL(ek("".concat(ts," ").concat(r))))];case 4:return[2,eL(ek(r))];case 5:throw new Error("Unsupported command type");case 6:return[2]}})})()}}N(tE,"buildCommand");var th={simpleGitHooks:tE({type:W.CLI,packages:[{name:tu,type:er.DEV_DEPENDENCY}],command:tl}),eslintInspect:tE({type:W.CLI,packages:[{name:tf,type:er.DEV_DEPENDENCY}],command:td}),nodeModulesInspect:tE({type:W.CLI,packages:[{name:tp,type:er.DEV_DEPENDENCY}],command:tm}),eslintCheck:tE({type:W.CLI,packages:[{name:e5,type:er.DEV_DEPENDENCY}],command:"".concat(e6," ").concat(tg.WORKING_DIRECTORY," --no-cache")}),eslintFix:tE({type:W.CLI,packages:[{name:e5,type:er.DEV_DEPENDENCY}],command:"".concat(e6," ").concat(tg.WORKING_DIRECTORY," --fix --no-cache")}),typescriptCheck:tE({type:W.CLI,packages:[{name:tr,type:er.DEPENDENCY}],command:"".concat(ta," -p ").concat(tg.TS_CONFIG," --noEmit")}),testUnit:tE({type:W.CLI,packages:[{name:e7,type:er.DEV_DEPENDENCY}],command:"".concat(e8," --config ").concat(tg.UNIT_TEST_CONFIG)}),testE2e:tE({type:W.CLI,packages:[{name:e7,type:er.DEV_DEPENDENCY}],command:"".concat(e8," --config ").concat(tg.E2E_TEST_CONFIG)}),mongoMigrateCreate:N(function(e){return tE({type:W.CLI,packages:[{name:tv,type:er.DEPENDENCY}],command:"".concat(to," ").concat(ty," create ").concat(e," -f ").concat(tg.MIGRATE_MONGO_CONFIG)})()},"mongoMigrateCreate"),mongoMigrateUp:tE({type:W.CLI,packages:[{name:tv,type:er.DEPENDENCY}],command:"".concat(to," ").concat(ty," up -f ").concat(tg.MIGRATE_MONGO_CONFIG)}),mongoMigrateDown:tE({type:W.CLI,packages:[{name:tv,type:er.DEPENDENCY}],command:"".concat(to," ").concat(ty," down -f ").concat(tg.MIGRATE_MONGO_CONFIG)}),commitLint:tE({type:W.CLI,packages:[{name:e9,type:er.DEV_DEPENDENCY}],command:"".concat(te," --edit ").concat(tg.GIT_COMMIT_MSG," --config ").concat(tg.COMMITLINT_CONFIG)}),lintStaged:tE({type:W.CLI,packages:[{name:tt,type:er.DEV_DEPENDENCY}],command:"".concat(tn," --config ").concat(tg.LINT_STAGED_CONFIG)}),configureGitHook:tE({type:W.STRING,command:"".concat(ti," config core.hooksPath ").concat(tg.GIT_HOOK)}),stageBuildDirectory:tE({type:W.STRING,command:"".concat(ti," add ").concat(eW)}),build:tE({type:W.STRING,command:"".concat(tc," run build")}),pnpmInstallStandard:tE({type:W.STRING,command:"".concat(tc," install")}),pnpmInstallLegacy:tE({type:W.STRING,command:"".concat(tc," install --legacy-peer-deps")}),pnpmInstallForce:tE({type:W.STRING,command:"".concat(tc," install --force")})};function t_(e){return(0,j.defineConfig)(l({plugins:[(0,L.default)()],test:{globals:!0,environment:"jsdom",pool:"vmThreads",include:["**/*.test.unit.?(c|m)[jt]s?(x)"],setupFiles:[tg.UNIT_TEST_SETUP_CONFIG]}},e))}N(t_,"vitestUnit");function tI(e){return(typeof e==="undefined"?"undefined":v(e))=="object"&&e!==null&&!Array.isArray(e)}N(tI,"isObject");function tb(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r={};var a=true,o=false,i=undefined,c=true,s=false,u=undefined;try{for(var l=t.flat()[Symbol.iterator](),f;!(c=(f=l.next()).done);c=true){var d=f.value;try{for(var v=Object.entries(d)[Symbol.iterator](),y;!(a=(y=v.next()).done);a=true){var g=p(y.value,2),E=g[0],h=g[1];var _=r[E];if(Array.isArray(h)){var I=Array.isArray(_)?_:[];r[E]=m(new Set(m(I).concat(m(h))));continue}if(tI(h)){r[E]=tb(tI(_)?_:{},h);continue}r[E]=h}}catch(e){o=true;i=e}finally{try{if(!a&&v.return!=null){v.return()}}finally{if(o){throw i}}}}}catch(e){s=true;u=e}finally{try{if(!c&&l.return!=null){l.return()}}finally{if(s){throw u}}}return r}N(tb,"deepMerge");var tD=function(e){return e.ESLINT="eslint",e.COMMITLINT="commitlint",e.LINT_STAGED="lint-staged",e.VITEST_REACT_E2E="vitest-react-e2e",e.VITEST_REACT_UNIT="vitest-react-unit",e}({});var tC=S(require("globals"),1),tN=[{languageOptions:{globals:l({},tC.node,tC.browser)},rules:{"perfectionist/sort-imports":["error",{internalPattern:["^#.*","^@/.*"]}],"dot-notation":"off"},ignores:["build","dist"]}];var tO;var tT=N(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r=tb.apply(void 0,[tN].concat(m(t.map(function(e){return e})))),a=r.ignores,o=f(r,["ignores"]),i=Array.isArray(a)&&a.every(function(e){return typeof e=="string"})?{ignores:a}:void 0,c=[o].concat(m(i?[i]:[]));return(0,G.default).apply(E,[{stylistic:{semi:!0,indent:4,quotes:"single"},formatters:{css:!0,html:!0,markdown:"prettier"},yaml:!1,react:!0}].concat(m(c)))},"handleESLint"),tS=(tO={},o(tO,tD.ESLINT,function(e){return tT(e)}),o(tO,tD.COMMITLINT,function(e){return tb(e)}),o(tO,tD.LINT_STAGED,function(e){return tb(e)}),o(tO,tD.VITEST_REACT_UNIT,function(e){return t_(e)}),o(tO,tD.VITEST_REACT_E2E,function(e){return A(e)}),tO);function tw(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++){n[r-1]=arguments[r]}var a=tS[e];if(!n||n.length===0)return a({});if(!a)throw new Error("Unknown config type: ".concat(e));return a.apply(void 0,m(n))}N(tw,"mergeConfigs");0&&(module.exports={mergeConfigs:mergeConfigs});