@cyberskill/shared 1.127.0 → 1.129.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 (201) hide show
  1. package/README.md +2 -2
  2. package/dist/_tsup-dts-rollup.d.cts +57 -44
  3. package/dist/_tsup-dts-rollup.d.ts +57 -44
  4. package/dist/configs/commitlint/index.cjs +1 -1
  5. package/dist/configs/commitlint/index.js +1 -1
  6. package/dist/configs/config.util.cjs +1 -1
  7. package/dist/configs/config.util.js +1 -1
  8. package/dist/configs/index.cjs +1 -1
  9. package/dist/configs/index.js +1 -1
  10. package/dist/index.cjs +1 -1
  11. package/dist/index.d.cts +6 -5
  12. package/dist/index.d.ts +6 -5
  13. package/dist/index.js +1 -1
  14. package/dist/{nodejs → node}/apollo-server/apollo-server.util.cjs +1 -1
  15. package/dist/{nodejs → node}/apollo-server/apollo-server.util.js +1 -1
  16. package/dist/{nodejs → node}/apollo-server/index.cjs +1 -1
  17. package/dist/{nodejs → node}/apollo-server/index.js +1 -1
  18. package/dist/node/cli/cli.util.cjs +2 -0
  19. package/dist/node/cli/cli.util.js +2 -0
  20. package/dist/node/cli/index.cjs +1 -0
  21. package/dist/node/cli/index.js +1 -0
  22. package/dist/node/command/command.util.cjs +1 -0
  23. package/dist/node/command/command.util.js +1 -0
  24. package/dist/node/command/index.cjs +1 -0
  25. package/dist/node/command/index.js +1 -0
  26. package/dist/{nodejs → node}/express/express.util.cjs +1 -1
  27. package/dist/{nodejs → node}/express/express.util.js +1 -1
  28. package/dist/{nodejs → node}/express/index.cjs +1 -1
  29. package/dist/{nodejs → node}/express/index.js +1 -1
  30. package/dist/node/fs/fs.util.cjs +1 -0
  31. package/dist/node/fs/fs.util.js +1 -0
  32. package/dist/node/fs/index.cjs +1 -0
  33. package/dist/node/fs/index.js +1 -0
  34. package/dist/node/index.cjs +1 -0
  35. package/dist/{nodejs → node}/index.d.cts +6 -5
  36. package/dist/{nodejs → node}/index.d.ts +6 -5
  37. package/dist/node/index.js +1 -0
  38. package/dist/node/mongo/index.cjs +1 -0
  39. package/dist/node/mongo/index.js +1 -0
  40. package/dist/node/mongo/mongo.util.cjs +1 -0
  41. package/dist/node/mongo/mongo.util.js +1 -0
  42. package/dist/node/package/index.cjs +1 -0
  43. package/dist/{nodejs → node}/package/index.d.cts +5 -5
  44. package/dist/{nodejs → node}/package/index.d.ts +5 -5
  45. package/dist/node/package/index.js +1 -0
  46. package/dist/node/package/package.type.cjs +1 -0
  47. package/dist/node/package/package.type.d.cts +4 -0
  48. package/dist/node/package/package.type.d.ts +4 -0
  49. package/dist/node/package/package.type.js +1 -0
  50. package/dist/node/package/package.util.cjs +1 -0
  51. package/dist/{nodejs → node}/package/package.util.d.cts +2 -2
  52. package/dist/{nodejs → node}/package/package.util.d.ts +2 -2
  53. package/dist/node/package/package.util.js +1 -0
  54. package/dist/node/path/index.cjs +1 -0
  55. package/dist/{nodejs → node}/path/index.d.cts +1 -0
  56. package/dist/{nodejs → node}/path/index.d.ts +1 -0
  57. package/dist/node/path/index.js +1 -0
  58. package/dist/node/path/path.constant.cjs +1 -0
  59. package/dist/{nodejs → node}/path/path.constant.d.cts +1 -0
  60. package/dist/{nodejs → node}/path/path.constant.d.ts +1 -0
  61. package/dist/node/path/path.constant.js +1 -0
  62. package/dist/node/storage/index.cjs +1 -0
  63. package/dist/node/storage/index.js +1 -0
  64. package/dist/node/storage/storage.util.cjs +1 -0
  65. package/dist/node/storage/storage.util.js +1 -0
  66. package/dist/react/index.cjs +1 -1
  67. package/dist/react/index.js +1 -1
  68. package/dist/react/next-intl/index.cjs +1 -1
  69. package/dist/react/next-intl/index.js +1 -1
  70. package/dist/react/next-intl/next-intl.provider.cjs +1 -1
  71. package/dist/react/next-intl/next-intl.provider.js +1 -1
  72. package/dist/react/storage/index.cjs +1 -1
  73. package/dist/react/storage/index.js +1 -1
  74. package/dist/react/storage/storage.hook.cjs +1 -1
  75. package/dist/react/storage/storage.hook.js +1 -1
  76. package/dist/react/storage/storage.util.cjs +1 -1
  77. package/dist/react/storage/storage.util.js +1 -1
  78. package/dist/react/vitest/index.cjs +1 -1
  79. package/dist/react/vitest/index.js +1 -1
  80. package/dist/react/vitest/vitest.unit.cjs +1 -1
  81. package/dist/react/vitest/vitest.unit.js +1 -1
  82. package/package.json +75 -74
  83. package/public/wiki/convention.md +1 -1
  84. package/dist/nodejs/cli/cli.util.cjs +0 -2
  85. package/dist/nodejs/cli/cli.util.js +0 -2
  86. package/dist/nodejs/cli/index.cjs +0 -1
  87. package/dist/nodejs/cli/index.js +0 -1
  88. package/dist/nodejs/command/command.util.cjs +0 -1
  89. package/dist/nodejs/command/command.util.js +0 -1
  90. package/dist/nodejs/command/index.cjs +0 -1
  91. package/dist/nodejs/command/index.js +0 -1
  92. package/dist/nodejs/fs/fs.util.cjs +0 -1
  93. package/dist/nodejs/fs/fs.util.js +0 -1
  94. package/dist/nodejs/fs/index.cjs +0 -1
  95. package/dist/nodejs/fs/index.js +0 -1
  96. package/dist/nodejs/index.cjs +0 -1
  97. package/dist/nodejs/index.js +0 -1
  98. package/dist/nodejs/mongo/index.cjs +0 -1
  99. package/dist/nodejs/mongo/index.js +0 -1
  100. package/dist/nodejs/mongo/mongo.util.cjs +0 -1
  101. package/dist/nodejs/mongo/mongo.util.js +0 -1
  102. package/dist/nodejs/package/index.cjs +0 -1
  103. package/dist/nodejs/package/index.js +0 -1
  104. package/dist/nodejs/package/package.constant.cjs +0 -1
  105. package/dist/nodejs/package/package.constant.d.cts +0 -1
  106. package/dist/nodejs/package/package.constant.d.ts +0 -1
  107. package/dist/nodejs/package/package.constant.js +0 -1
  108. package/dist/nodejs/package/package.type.cjs +0 -1
  109. package/dist/nodejs/package/package.type.d.cts +0 -3
  110. package/dist/nodejs/package/package.type.d.ts +0 -3
  111. package/dist/nodejs/package/package.type.js +0 -0
  112. package/dist/nodejs/package/package.util.cjs +0 -1
  113. package/dist/nodejs/package/package.util.js +0 -1
  114. package/dist/nodejs/path/index.cjs +0 -1
  115. package/dist/nodejs/path/index.js +0 -1
  116. package/dist/nodejs/path/path.constant.cjs +0 -1
  117. package/dist/nodejs/path/path.constant.js +0 -1
  118. package/dist/nodejs/storage/index.cjs +0 -1
  119. package/dist/nodejs/storage/index.js +0 -1
  120. package/dist/nodejs/storage/storage.util.cjs +0 -1
  121. package/dist/nodejs/storage/storage.util.js +0 -1
  122. /package/dist/{nodejs → node}/apollo-server/apollo-server.type.cjs +0 -0
  123. /package/dist/{nodejs → node}/apollo-server/apollo-server.type.d.cts +0 -0
  124. /package/dist/{nodejs → node}/apollo-server/apollo-server.type.d.ts +0 -0
  125. /package/dist/{nodejs → node}/apollo-server/apollo-server.type.js +0 -0
  126. /package/dist/{nodejs → node}/apollo-server/apollo-server.util.d.cts +0 -0
  127. /package/dist/{nodejs → node}/apollo-server/apollo-server.util.d.ts +0 -0
  128. /package/dist/{nodejs → node}/apollo-server/index.d.cts +0 -0
  129. /package/dist/{nodejs → node}/apollo-server/index.d.ts +0 -0
  130. /package/dist/{nodejs → node}/cli/cli.util.d.cts +0 -0
  131. /package/dist/{nodejs → node}/cli/cli.util.d.ts +0 -0
  132. /package/dist/{nodejs → node}/cli/index.d.cts +0 -0
  133. /package/dist/{nodejs → node}/cli/index.d.ts +0 -0
  134. /package/dist/{nodejs → node}/command/command.type.cjs +0 -0
  135. /package/dist/{nodejs → node}/command/command.type.d.cts +0 -0
  136. /package/dist/{nodejs → node}/command/command.type.d.ts +0 -0
  137. /package/dist/{nodejs → node}/command/command.type.js +0 -0
  138. /package/dist/{nodejs → node}/command/command.util.d.cts +0 -0
  139. /package/dist/{nodejs → node}/command/command.util.d.ts +0 -0
  140. /package/dist/{nodejs → node}/command/index.d.cts +0 -0
  141. /package/dist/{nodejs → node}/command/index.d.ts +0 -0
  142. /package/dist/{nodejs → node}/express/express.type.cjs +0 -0
  143. /package/dist/{nodejs → node}/express/express.type.d.cts +0 -0
  144. /package/dist/{nodejs → node}/express/express.type.d.ts +0 -0
  145. /package/dist/{nodejs → node}/express/express.type.js +0 -0
  146. /package/dist/{nodejs → node}/express/express.util.d.cts +0 -0
  147. /package/dist/{nodejs → node}/express/express.util.d.ts +0 -0
  148. /package/dist/{nodejs → node}/express/index.d.cts +0 -0
  149. /package/dist/{nodejs → node}/express/index.d.ts +0 -0
  150. /package/dist/{nodejs → node}/fs/fs.type.cjs +0 -0
  151. /package/dist/{nodejs → node}/fs/fs.type.d.cts +0 -0
  152. /package/dist/{nodejs → node}/fs/fs.type.d.ts +0 -0
  153. /package/dist/{nodejs → node}/fs/fs.type.js +0 -0
  154. /package/dist/{nodejs → node}/fs/fs.util.d.cts +0 -0
  155. /package/dist/{nodejs → node}/fs/fs.util.d.ts +0 -0
  156. /package/dist/{nodejs → node}/fs/index.d.cts +0 -0
  157. /package/dist/{nodejs → node}/fs/index.d.ts +0 -0
  158. /package/dist/{nodejs → node}/log/index.cjs +0 -0
  159. /package/dist/{nodejs → node}/log/index.d.cts +0 -0
  160. /package/dist/{nodejs → node}/log/index.d.ts +0 -0
  161. /package/dist/{nodejs → node}/log/index.js +0 -0
  162. /package/dist/{nodejs → node}/log/log.type.cjs +0 -0
  163. /package/dist/{nodejs → node}/log/log.type.d.cts +0 -0
  164. /package/dist/{nodejs → node}/log/log.type.d.ts +0 -0
  165. /package/dist/{nodejs → node}/log/log.type.js +0 -0
  166. /package/dist/{nodejs → node}/log/log.util.cjs +0 -0
  167. /package/dist/{nodejs → node}/log/log.util.d.cts +0 -0
  168. /package/dist/{nodejs → node}/log/log.util.d.ts +0 -0
  169. /package/dist/{nodejs → node}/log/log.util.js +0 -0
  170. /package/dist/{nodejs → node}/mongo/index.d.cts +0 -0
  171. /package/dist/{nodejs → node}/mongo/index.d.ts +0 -0
  172. /package/dist/{nodejs → node}/mongo/mongo.constant.cjs +0 -0
  173. /package/dist/{nodejs → node}/mongo/mongo.constant.d.cts +0 -0
  174. /package/dist/{nodejs → node}/mongo/mongo.constant.d.ts +0 -0
  175. /package/dist/{nodejs → node}/mongo/mongo.constant.js +0 -0
  176. /package/dist/{nodejs → node}/mongo/mongo.type.cjs +0 -0
  177. /package/dist/{nodejs → node}/mongo/mongo.type.d.cts +0 -0
  178. /package/dist/{nodejs → node}/mongo/mongo.type.d.ts +0 -0
  179. /package/dist/{nodejs → node}/mongo/mongo.type.js +0 -0
  180. /package/dist/{nodejs → node}/mongo/mongo.util.d.cts +0 -0
  181. /package/dist/{nodejs → node}/mongo/mongo.util.d.ts +0 -0
  182. /package/dist/{nodejs → node}/path/path.util.cjs +0 -0
  183. /package/dist/{nodejs → node}/path/path.util.d.cts +0 -0
  184. /package/dist/{nodejs → node}/path/path.util.d.ts +0 -0
  185. /package/dist/{nodejs → node}/path/path.util.js +0 -0
  186. /package/dist/{nodejs → node}/storage/index.d.cts +0 -0
  187. /package/dist/{nodejs → node}/storage/index.d.ts +0 -0
  188. /package/dist/{nodejs → node}/storage/storage.util.d.cts +0 -0
  189. /package/dist/{nodejs → node}/storage/storage.util.d.ts +0 -0
  190. /package/dist/{nodejs → node}/ws/index.cjs +0 -0
  191. /package/dist/{nodejs → node}/ws/index.d.cts +0 -0
  192. /package/dist/{nodejs → node}/ws/index.d.ts +0 -0
  193. /package/dist/{nodejs → node}/ws/index.js +0 -0
  194. /package/dist/{nodejs → node}/ws/ts.util.cjs +0 -0
  195. /package/dist/{nodejs → node}/ws/ts.util.d.cts +0 -0
  196. /package/dist/{nodejs → node}/ws/ts.util.d.ts +0 -0
  197. /package/dist/{nodejs → node}/ws/ts.util.js +0 -0
  198. /package/dist/{nodejs → node}/ws/ws.type.cjs +0 -0
  199. /package/dist/{nodejs → node}/ws/ws.type.d.cts +0 -0
  200. /package/dist/{nodejs → node}/ws/ws.type.d.ts +0 -0
  201. /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>;
@@ -236,6 +222,12 @@ export { COMMIT_LINT_CLI as COMMIT_LINT_CLI_alias_1 }
236
222
  export { COMMIT_LINT_CLI as COMMIT_LINT_CLI_alias_2 }
237
223
  export { COMMIT_LINT_CLI as COMMIT_LINT_CLI_alias_3 }
238
224
 
225
+ declare const COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME = "@commitlint/config-conventional";
226
+ export { COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME }
227
+ export { COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME as COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME_alias_1 }
228
+ export { COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME as COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME_alias_2 }
229
+ export { COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME as COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME_alias_3 }
230
+
239
231
  declare const COMMIT_LINT_PACKAGE_NAME = "@commitlint/cli";
240
232
  export { COMMIT_LINT_PACKAGE_NAME }
241
233
  export { COMMIT_LINT_PACKAGE_NAME as COMMIT_LINT_PACKAGE_NAME_alias_1 }
@@ -322,7 +314,7 @@ export { CYBERSKILL_CLI as CYBERSKILL_CLI_alias_1 }
322
314
  export { CYBERSKILL_CLI as CYBERSKILL_CLI_alias_2 }
323
315
  export { CYBERSKILL_CLI as CYBERSKILL_CLI_alias_3 }
324
316
 
325
- declare const CYBERSKILL_CLI_PATH = "src/nodejs/cli/index.ts";
317
+ declare const CYBERSKILL_CLI_PATH = "src/node/cli/index.ts";
326
318
  export { CYBERSKILL_CLI_PATH }
327
319
  export { CYBERSKILL_CLI_PATH as CYBERSKILL_CLI_PATH_alias_1 }
328
320
  export { CYBERSKILL_CLI_PATH as CYBERSKILL_CLI_PATH_alias_2 }
@@ -362,6 +354,7 @@ export { deepMerge as deepMerge_alias_3 }
362
354
 
363
355
  declare const _default: {
364
356
  extends: string[];
357
+ ignores: ((message: string) => boolean)[];
365
358
  };
366
359
  export { _default as commitlintConfig }
367
360
  export { _default as commitlintConfig_alias_1 }
@@ -1559,6 +1552,18 @@ export { E_IssueType as E_IssueType_alias_1 }
1559
1552
  export { E_IssueType as E_IssueType_alias_2 }
1560
1553
  export { E_IssueType as E_IssueType_alias_3 }
1561
1554
 
1555
+ declare enum E_PackageType {
1556
+ DEPENDENCY = "dependencies",
1557
+ DEV_DEPENDENCY = "devDependencies",
1558
+ PEER_DEPENDENCY = "peerDependencies",
1559
+ BUNDLE_DEPENDENCY = "bundleDependencies",
1560
+ OPTIONAL_DEPENDENCY = "optionalDependencies"
1561
+ }
1562
+ export { E_PackageType }
1563
+ export { E_PackageType as E_PackageType_alias_1 }
1564
+ export { E_PackageType as E_PackageType_alias_2 }
1565
+ export { E_PackageType as E_PackageType_alias_3 }
1566
+
1562
1567
  declare const ESLINT_CLI = "eslint";
1563
1568
  export { ESLINT_CLI }
1564
1569
  export { ESLINT_CLI as ESLINT_CLI_alias_1 }
@@ -1667,7 +1672,7 @@ export { getLatestPackageVersion as getLatestPackageVersion_alias_1 }
1667
1672
  export { getLatestPackageVersion as getLatestPackageVersion_alias_2 }
1668
1673
  export { getLatestPackageVersion as getLatestPackageVersion_alias_3 }
1669
1674
 
1670
- declare function getPackage(packageName: string): I_GetPackage | false;
1675
+ declare function getPackage(inputPackage: I_PackageInput): Promise<I_PackageInfo>;
1671
1676
  export { getPackage }
1672
1677
  export { getPackage as getPackage_alias_1 }
1673
1678
  export { getPackage as getPackage_alias_2 }
@@ -1760,17 +1765,6 @@ declare interface I_BaseCorsOptions {
1760
1765
  whiteList?: string[];
1761
1766
  }
1762
1767
 
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
1768
  declare interface I_Children {
1775
1769
  children: T_Children;
1776
1770
  }
@@ -1792,7 +1786,6 @@ export { I_Command as I_Command_alias_2 }
1792
1786
  export { I_Command as I_Command_alias_3 }
1793
1787
 
1794
1788
  declare interface I_CommandContext {
1795
- isRemote: boolean;
1796
1789
  isCurrentProject: boolean;
1797
1790
  }
1798
1791
  export { I_CommandContext }
@@ -1894,18 +1887,6 @@ export { I_GenericDocument as I_GenericDocument_alias_1 }
1894
1887
  export { I_GenericDocument as I_GenericDocument_alias_2 }
1895
1888
  export { I_GenericDocument as I_GenericDocument_alias_3 }
1896
1889
 
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
1890
  declare interface I_GraphqlCodegenConfig {
1910
1891
  uri: string;
1911
1892
  from: string;
@@ -2168,6 +2149,32 @@ export { I_NextIntlProviderProps as I_NextIntlProviderProps_alias_1 }
2168
2149
  export { I_NextIntlProviderProps as I_NextIntlProviderProps_alias_2 }
2169
2150
  export { I_NextIntlProviderProps as I_NextIntlProviderProps_alias_3 }
2170
2151
 
2152
+ declare interface I_PackageInfo {
2153
+ name: string;
2154
+ currentVersion: string;
2155
+ latestVersion: string;
2156
+ isCurrentProject: boolean;
2157
+ isInstalled: boolean;
2158
+ isUpToDate: boolean;
2159
+ isDependency: boolean;
2160
+ isDevDependency: boolean;
2161
+ installedPath: string;
2162
+ file: T_PackageJson;
2163
+ }
2164
+ export { I_PackageInfo }
2165
+ export { I_PackageInfo as I_PackageInfo_alias_1 }
2166
+ export { I_PackageInfo as I_PackageInfo_alias_2 }
2167
+ export { I_PackageInfo as I_PackageInfo_alias_3 }
2168
+
2169
+ declare interface I_PackageInput {
2170
+ name: string;
2171
+ type?: E_PackageType;
2172
+ }
2173
+ export { I_PackageInput }
2174
+ export { I_PackageInput as I_PackageInput_alias_1 }
2175
+ export { I_PackageInput as I_PackageInput_alias_2 }
2176
+ export { I_PackageInput as I_PackageInput_alias_3 }
2177
+
2171
2178
  declare type I_Return<T = void, E = unknown> = I_ReturnSuccess<T, E> | I_ReturnFailure;
2172
2179
  export { I_Return }
2173
2180
  export { I_Return as I_Return_alias_1 }
@@ -2718,7 +2725,7 @@ export { resolve as resolve_alias_1 }
2718
2725
  export { resolve as resolve_alias_2 }
2719
2726
  export { resolve as resolve_alias_3 }
2720
2727
 
2721
- declare function resolveCommands(input: T_CommandMapInput, context?: Partial<I_CommandContext>): Promise<{
2728
+ declare function resolveCommands(input: T_CommandMapInput): Promise<{
2722
2729
  [k: string]: string | I_Command_2;
2723
2730
  }>;
2724
2731
  export { resolveCommands }
@@ -3014,7 +3021,7 @@ export { setGlobalApolloErrorCallback as setGlobalApolloErrorCallback_alias_1 }
3014
3021
  export { setGlobalApolloErrorCallback as setGlobalApolloErrorCallback_alias_2 }
3015
3022
  export { setGlobalApolloErrorCallback as setGlobalApolloErrorCallback_alias_3 }
3016
3023
 
3017
- declare function setupPackages(packages: string[], options?: {
3024
+ declare function setupPackages(packages: I_PackageInput[], options?: {
3018
3025
  update?: boolean;
3019
3026
  postInstallActions?: (() => Promise<void>)[];
3020
3027
  }): Promise<void>;
@@ -3268,7 +3275,7 @@ declare interface T_PackageJson {
3268
3275
  version?: string;
3269
3276
  dependencies?: Record<string, string>;
3270
3277
  devDependencies?: Record<string, string>;
3271
- [key: string]: any;
3278
+ [key: string]: unknown;
3272
3279
  }
3273
3280
  export { T_PackageJson }
3274
3281
  export { T_PackageJson as T_PackageJson_alias_1 }
@@ -3442,6 +3449,12 @@ export { unlinkSync as unlinkSync_alias_1 }
3442
3449
  export { unlinkSync as unlinkSync_alias_2 }
3443
3450
  export { unlinkSync as unlinkSync_alias_3 }
3444
3451
 
3452
+ declare function updatePackage(packageInfo: I_PackageInfo): Promise<void>;
3453
+ export { updatePackage }
3454
+ export { updatePackage as updatePackage_alias_1 }
3455
+ export { updatePackage as updatePackage_alias_2 }
3456
+ export { updatePackage as updatePackage_alias_3 }
3457
+
3445
3458
  declare function useApolloError(): I_ApolloErrorContext_2;
3446
3459
  export { useApolloError }
3447
3460
  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>;
@@ -236,6 +222,12 @@ export { COMMIT_LINT_CLI as COMMIT_LINT_CLI_alias_1 }
236
222
  export { COMMIT_LINT_CLI as COMMIT_LINT_CLI_alias_2 }
237
223
  export { COMMIT_LINT_CLI as COMMIT_LINT_CLI_alias_3 }
238
224
 
225
+ declare const COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME = "@commitlint/config-conventional";
226
+ export { COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME }
227
+ export { COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME as COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME_alias_1 }
228
+ export { COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME as COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME_alias_2 }
229
+ export { COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME as COMMIT_LINT_CONVENTIONAL_CONFIG_PACKAGE_NAME_alias_3 }
230
+
239
231
  declare const COMMIT_LINT_PACKAGE_NAME = "@commitlint/cli";
240
232
  export { COMMIT_LINT_PACKAGE_NAME }
241
233
  export { COMMIT_LINT_PACKAGE_NAME as COMMIT_LINT_PACKAGE_NAME_alias_1 }
@@ -322,7 +314,7 @@ export { CYBERSKILL_CLI as CYBERSKILL_CLI_alias_1 }
322
314
  export { CYBERSKILL_CLI as CYBERSKILL_CLI_alias_2 }
323
315
  export { CYBERSKILL_CLI as CYBERSKILL_CLI_alias_3 }
324
316
 
325
- declare const CYBERSKILL_CLI_PATH = "src/nodejs/cli/index.ts";
317
+ declare const CYBERSKILL_CLI_PATH = "src/node/cli/index.ts";
326
318
  export { CYBERSKILL_CLI_PATH }
327
319
  export { CYBERSKILL_CLI_PATH as CYBERSKILL_CLI_PATH_alias_1 }
328
320
  export { CYBERSKILL_CLI_PATH as CYBERSKILL_CLI_PATH_alias_2 }
@@ -362,6 +354,7 @@ export { deepMerge as deepMerge_alias_3 }
362
354
 
363
355
  declare const _default: {
364
356
  extends: string[];
357
+ ignores: ((message: string) => boolean)[];
365
358
  };
366
359
  export { _default as commitlintConfig }
367
360
  export { _default as commitlintConfig_alias_1 }
@@ -1559,6 +1552,18 @@ export { E_IssueType as E_IssueType_alias_1 }
1559
1552
  export { E_IssueType as E_IssueType_alias_2 }
1560
1553
  export { E_IssueType as E_IssueType_alias_3 }
1561
1554
 
1555
+ declare enum E_PackageType {
1556
+ DEPENDENCY = "dependencies",
1557
+ DEV_DEPENDENCY = "devDependencies",
1558
+ PEER_DEPENDENCY = "peerDependencies",
1559
+ BUNDLE_DEPENDENCY = "bundleDependencies",
1560
+ OPTIONAL_DEPENDENCY = "optionalDependencies"
1561
+ }
1562
+ export { E_PackageType }
1563
+ export { E_PackageType as E_PackageType_alias_1 }
1564
+ export { E_PackageType as E_PackageType_alias_2 }
1565
+ export { E_PackageType as E_PackageType_alias_3 }
1566
+
1562
1567
  declare const ESLINT_CLI = "eslint";
1563
1568
  export { ESLINT_CLI }
1564
1569
  export { ESLINT_CLI as ESLINT_CLI_alias_1 }
@@ -1667,7 +1672,7 @@ export { getLatestPackageVersion as getLatestPackageVersion_alias_1 }
1667
1672
  export { getLatestPackageVersion as getLatestPackageVersion_alias_2 }
1668
1673
  export { getLatestPackageVersion as getLatestPackageVersion_alias_3 }
1669
1674
 
1670
- declare function getPackage(packageName: string): I_GetPackage | false;
1675
+ declare function getPackage(inputPackage: I_PackageInput): Promise<I_PackageInfo>;
1671
1676
  export { getPackage }
1672
1677
  export { getPackage as getPackage_alias_1 }
1673
1678
  export { getPackage as getPackage_alias_2 }
@@ -1760,17 +1765,6 @@ declare interface I_BaseCorsOptions {
1760
1765
  whiteList?: string[];
1761
1766
  }
1762
1767
 
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
1768
  declare interface I_Children {
1775
1769
  children: T_Children;
1776
1770
  }
@@ -1792,7 +1786,6 @@ export { I_Command as I_Command_alias_2 }
1792
1786
  export { I_Command as I_Command_alias_3 }
1793
1787
 
1794
1788
  declare interface I_CommandContext {
1795
- isRemote: boolean;
1796
1789
  isCurrentProject: boolean;
1797
1790
  }
1798
1791
  export { I_CommandContext }
@@ -1894,18 +1887,6 @@ export { I_GenericDocument as I_GenericDocument_alias_1 }
1894
1887
  export { I_GenericDocument as I_GenericDocument_alias_2 }
1895
1888
  export { I_GenericDocument as I_GenericDocument_alias_3 }
1896
1889
 
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
1890
  declare interface I_GraphqlCodegenConfig {
1910
1891
  uri: string;
1911
1892
  from: string;
@@ -2168,6 +2149,32 @@ export { I_NextIntlProviderProps as I_NextIntlProviderProps_alias_1 }
2168
2149
  export { I_NextIntlProviderProps as I_NextIntlProviderProps_alias_2 }
2169
2150
  export { I_NextIntlProviderProps as I_NextIntlProviderProps_alias_3 }
2170
2151
 
2152
+ declare interface I_PackageInfo {
2153
+ name: string;
2154
+ currentVersion: string;
2155
+ latestVersion: string;
2156
+ isCurrentProject: boolean;
2157
+ isInstalled: boolean;
2158
+ isUpToDate: boolean;
2159
+ isDependency: boolean;
2160
+ isDevDependency: boolean;
2161
+ installedPath: string;
2162
+ file: T_PackageJson;
2163
+ }
2164
+ export { I_PackageInfo }
2165
+ export { I_PackageInfo as I_PackageInfo_alias_1 }
2166
+ export { I_PackageInfo as I_PackageInfo_alias_2 }
2167
+ export { I_PackageInfo as I_PackageInfo_alias_3 }
2168
+
2169
+ declare interface I_PackageInput {
2170
+ name: string;
2171
+ type?: E_PackageType;
2172
+ }
2173
+ export { I_PackageInput }
2174
+ export { I_PackageInput as I_PackageInput_alias_1 }
2175
+ export { I_PackageInput as I_PackageInput_alias_2 }
2176
+ export { I_PackageInput as I_PackageInput_alias_3 }
2177
+
2171
2178
  declare type I_Return<T = void, E = unknown> = I_ReturnSuccess<T, E> | I_ReturnFailure;
2172
2179
  export { I_Return }
2173
2180
  export { I_Return as I_Return_alias_1 }
@@ -2718,7 +2725,7 @@ export { resolve as resolve_alias_1 }
2718
2725
  export { resolve as resolve_alias_2 }
2719
2726
  export { resolve as resolve_alias_3 }
2720
2727
 
2721
- declare function resolveCommands(input: T_CommandMapInput, context?: Partial<I_CommandContext>): Promise<{
2728
+ declare function resolveCommands(input: T_CommandMapInput): Promise<{
2722
2729
  [k: string]: string | I_Command_2;
2723
2730
  }>;
2724
2731
  export { resolveCommands }
@@ -3014,7 +3021,7 @@ export { setGlobalApolloErrorCallback as setGlobalApolloErrorCallback_alias_1 }
3014
3021
  export { setGlobalApolloErrorCallback as setGlobalApolloErrorCallback_alias_2 }
3015
3022
  export { setGlobalApolloErrorCallback as setGlobalApolloErrorCallback_alias_3 }
3016
3023
 
3017
- declare function setupPackages(packages: string[], options?: {
3024
+ declare function setupPackages(packages: I_PackageInput[], options?: {
3018
3025
  update?: boolean;
3019
3026
  postInstallActions?: (() => Promise<void>)[];
3020
3027
  }): Promise<void>;
@@ -3268,7 +3275,7 @@ declare interface T_PackageJson {
3268
3275
  version?: string;
3269
3276
  dependencies?: Record<string, string>;
3270
3277
  devDependencies?: Record<string, string>;
3271
- [key: string]: any;
3278
+ [key: string]: unknown;
3272
3279
  }
3273
3280
  export { T_PackageJson }
3274
3281
  export { T_PackageJson as T_PackageJson_alias_1 }
@@ -3442,6 +3449,12 @@ export { unlinkSync as unlinkSync_alias_1 }
3442
3449
  export { unlinkSync as unlinkSync_alias_2 }
3443
3450
  export { unlinkSync as unlinkSync_alias_3 }
3444
3451
 
3452
+ declare function updatePackage(packageInfo: I_PackageInfo): Promise<void>;
3453
+ export { updatePackage }
3454
+ export { updatePackage as updatePackage_alias_1 }
3455
+ export { updatePackage as updatePackage_alias_2 }
3456
+ export { updatePackage as updatePackage_alias_3 }
3457
+
3445
3458
  declare function useApolloError(): I_ApolloErrorContext_2;
3446
3459
  export { useApolloError }
3447
3460
  export { useApolloError as useApolloError_alias_1 }
@@ -1 +1 @@
1
- "use strict";function e(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}var r=Object.defineProperty;var t=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var u=function(e,t){for(var n in t)r(e,n,{get:t[n],enumerable:!0})},a=function(u,a,f,i){var c=true,l=false,y=undefined;if(a&&(typeof a==="undefined"?"undefined":e(a))=="object"||typeof a=="function")try{var v=function(){var e=p.value;!o.call(u,e)&&e!==f&&r(u,e,{get:function(){return a[e]},enumerable:!(i=t(a,e))||i.enumerable})};for(var d=n(a)[Symbol.iterator](),p;!(c=(p=d.next()).done);c=true)v()}catch(e){l=true;y=e}finally{try{if(!c&&d.return!=null){d.return()}}finally{if(l){throw y}}}return u};var f=function(e){return a(r({},"__esModule",{value:!0}),e)};var i={};u(i,{default:function(){return c}});module.exports=f(i);var c={extends:["@commitlint/config-conventional"]};
1
+ "use strict";function e(e){"@swc/helpers - typeof";return e&&typeof Symbol!=="undefined"&&e.constructor===Symbol?"symbol":typeof e}var r=Object.defineProperty;var t=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var u=function(e,t){for(var n in t)r(e,n,{get:t[n],enumerable:!0})},f=function(u,f,i,a){var c=true,l=false,y=undefined;if(f&&(typeof f==="undefined"?"undefined":e(f))=="object"||typeof f=="function")try{var v=function(){var e=p.value;!o.call(u,e)&&e!==i&&r(u,e,{get:function(){return f[e]},enumerable:!(a=t(f,e))||a.enumerable})};for(var d=n(f)[Symbol.iterator](),p;!(c=(p=d.next()).done);c=true)v()}catch(e){l=true;y=e}finally{try{if(!c&&d.return!=null){d.return()}}finally{if(l){throw y}}}return u};var i=function(e){return f(r({},"__esModule",{value:!0}),e)};var a={};u(a,{default:function(){return c}});module.exports=i(a);var c={extends:["@commitlint/config-conventional"],ignores:[function(e){return e.includes("[\uD83D\uDE80 CI - Deploy]")}]};
@@ -1 +1 @@
1
- var e={extends:["@commitlint/config-conventional"]};export{e as default};
1
+ var n={extends:["@commitlint/config-conventional"],ignores:[function(n){return n.includes("[\uD83D\uDE80 CI - Deploy]")}]};export{n as default};
@@ -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 tR}});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=S(require("fs-extra"),1);var x=".cyberskill-storage";var Y=S(require("@dotenvx/dotenvx"),1),M=require("envalid"),V=S(require("os"),1),F=S(require("path"),1),q=S(require("process"),1);var K=!1;function B(){K||(Y.default.config(),K=!0)}N(B,"loadEnvFile");function J(){B();var e=(0,M.cleanEnv)(q.default.env,{CWD:(0,M.str)({default:q.default.cwd()}),DEBUG:(0,M.bool)({default:!1}),CYBERSKILL_STORAGE_DIRECTORY:(0,M.str)({default:F.default.join(V.default.homedir(),x)})});return{CWD:e.CWD,DEBUG:e.DEBUG,CYBERSKILL_STORAGE_DIRECTORY:e.CYBERSKILL_STORAGE_DIRECTORY}}N(J,"getEnv");var W=function(e){return e.CLI="CLI",e.STRING="STRING",e.FUNCTION="FUNCTION",e}({});var H=require("child_process"),$=S(require("process"),1),z=S(require("util"),1);var Q=function(e){return e.Error="error",e.Warning="warning",e}({});var X=S(require("chalk"),1),Z=S(require("consola"),1),ee=require("graphql");var et=J();et.DEBUG||(Z.default.level=4);function en(e){var t=X.default[e];return typeof t=="function"?t:X.default.green}N(en,"chalkKeyword");var er={silent:Z.default.silent,level:Z.default.level,fatal:Z.default.fatal,error:Z.default.error,warn:Z.default.warn,log:Z.default.log,info:Z.default.info,success:Z.default.success,ready:Z.default.ready,start:Z.default.start,box:Z.default.box,debug:Z.default.debug,trace:Z.default.trace,verbose:Z.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)){Z.default.box(X.default.green(e));return}t.forEach(function(e){var t=e.file,r=e.position,a=e.rule,o=e.message;Z.default.log("".concat(X.default.gray("File:")," ").concat(X.default.blue("".concat(t).concat(r?":".concat(r):"")))),a&&Z.default.log(" ".concat(en(n)("Rule:")," ").concat(a)),Z.default.log(" ".concat(en(n)("Message:")," ").concat(o))}),Z.default.box(en(n)("".concat(e," : ").concat(t.length))),Z.default.log(X.default.gray("─".repeat(40)))}};var ea=function(e){return e.DEPENDENCY="dependencies",e.DEV_DEPENDENCY="devDependencies",e.PEER_DEPENDENCY="peerDependencies",e.BUNDLE_DEPENDENCY="bundleDependencies",e.OPTIONAL_DEPENDENCY="optionalDependencies",e}({});var eo=S(require("node-fetch"),1);var ei=S(require("fs-extra"),1),ec=S(require("path"),1);var es=ei.default,eu=es.lstatSync,el=es.readdirSync,ef=es.mkdirSync,ed=es.readFileSync,ep=es.unlinkSync,em=es.statSync,ev=ei.default.readJsonSync;function ey(e,t,n){ei.default.writeFileSync(e,t,n!==null&&n!==void 0?n:"utf-8")}N(ey,"writeFileSync");function eg(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}return t.every(function(e){return ei.default.pathExistsSync(e)})}N(eg,"pathExistsSync");var eE=J();function eh(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,eo.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 er.error('Failed to fetch version for "'.concat(e,'": ').concat(a.message)),a;case 4:return[2]}})})()}N(eh,"getLatestPackageVersion");function e_(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(!eg(t_.PACKAGE_JSON))return[2,{name:e.name,currentVersion:"",latestVersion:"",isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:e.type===ea.DEPENDENCY,isDevDependency:e.type===ea.DEV_DEPENDENCY,installedPath:"",file:{}}];t=ev(t_.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===ea.DEPENDENCY,isDevDependency:e.type===ea.DEV_DEPENDENCY,installedPath:t_.PACKAGE_JSON,file:t}];u=e.name in i,l=e.name in s;return[4,eh(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===ea.DEPENDENCY,isDevDependency:e.type===ea.DEV_DEPENDENCY,installedPath:"",file:{}}];m=(p=(d=i[e.name])!==null&&d!==void 0?d:s[e.name])!==null&&p!==void 0?p:"",v=eq(eE.CWD,eW,e.name,e$);if(!eg(v))return[2,{name:e.name,currentVersion:"",latestVersion:f,isCurrentProject:!1,isInstalled:!1,isUpToDate:!1,isDependency:u,isDevDependency:l,installedPath:"",file:{}}];y=ev(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 er.error('Error getting package "'.concat(e.name,'": ').concat(_.message)),_;case 3:return[2]}})})()}N(e_,"getPackage");function eI(e){return /*#__PURE__*/a(function(){var t,n,r,a,o;return g(this,function(i){try{;r=ev(t_.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),ey(t_.PACKAGE_JSON,JSON.stringify(r,null,4)),er.info('Updated "'.concat(e.name,'" to version ').concat(e.latestVersion))}catch(t){throw er.error('Error updating package "'.concat(e.name,'": ').concat(t.message)),t}return[2]})})()}N(eI,"updatePackage");function eb(){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 tb.pnpmInstallStandard()},"command"),message:"Installing dependencies (standard)"},{command:N(function(){return tb.pnpmInstallLegacy()},"command"),message:"Retrying with legacy peer dependencies"},{command:N(function(){return tb.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,ex("".concat(s," using: ").concat(u),u)];case 5:p.sent();return[2];case 6:l=p.sent();er.warn("Installation attempt failed: ".concat(s)),er.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 er.error("Failed to install dependencies: ".concat(d.message)),d;case 13:return[2]}})})()}N(eb,"installDependencies");function eD(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(!eg(t_.PACKAGE_JSON)){er.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(e_))];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(eI))];case 3:p.sent();return[4,eb()];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 er.error('Failed to setup "'.concat(e.map(function(e){return e.name}).join(", "),'": ').concat(d.message)),d;case 15:return[2]}})})()}N(eD,"setupPackages");var eC=S(require("node-persist"),1);var eN=J();function eO(){return /*#__PURE__*/a(function(){var e;return g(this,function(t){switch(t.label){case 0:e=eC.default.defaultInstance;if(e)return[3,2];return[4,eC.default.init({dir:eN.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(eO,"initNodePersist");var eT={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,eO()];case 1:r.sent();return[4,eC.default.getItem(e)];case 2:return[2,(t=r.sent())!==null&&t!==void 0?t:null];case 3:n=r.sent();return[2,(er.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,eO()];case 1:r.sent();return[4,eC.default.setItem(e,t)];case 2:r.sent();return[3,4];case 3:n=r.sent();er.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,eO()];case 1:n.sent();return[4,eC.default.removeItem(e)];case 2:n.sent();return[3,4];case 3:t=n.sent();er.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,eO()];case 1:n.sent();return[4,eC.default.keys()];case 2:e=n.sent();return[2,Array.isArray(e)?e:(er.warn("[Storage:keys] Invalid keys response:",e),[])];case 3:t=n.sent();return[2,(er.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(eN.CYBERSKILL_STORAGE_DIRECTORY," (key: ").concat(e,")")]}catch(e){return[2,(er.error("[Storage:getLogLink] Error getting log link:",e),null)]}return[2]})})()}};var eS=J(),ew=z.promisify(H.exec);function eP(e){return"error_list:".concat(e)}N(eP,"getErrorListKey");function eG(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=eP(t);o.label=1;case 1:o.trys.push([1,3,,4]);return[4,eT.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,eT.getLogLink(n)];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:r=o.sent();er.error("Failed to save errors: ".concat(r.message));return[3,4];case 4:return[2]}})})()}N(eG,"saveErrorListToStorage");function eR(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]===Q.Error?Q.Error:Q.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]===Q.Error?Q.Error:Q.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:Q.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&&eG(t),eS.DEBUG&&n.length&&(er.warn("Unmatched lines:"),n.forEach(function(e){return er.info(" ".concat(e))}))}N(eR,"parseTextErrors");function ek(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?Q.Error:Q.Warning,file:t,position:"".concat(a,":").concat(o),rule:i,message:c})})}),n.length&&eG(n)}catch(t){eR(e)}}N(ek,"parseCommandOutput");function eA(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]:ek;n=new AbortController;$.default.on("SIGINT",function(){er.warn("Process interrupted. Terminating..."),n.abort(),$.default.exit()});f.label=1;case 1:f.trys.push([1,4,,5]);if(!(typeof e=="string"))return[3,3];return[4,ew(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&&er.error("Command failed: ".concat(u));return[3,5];case 5:return[2]}})}).apply(this,arguments)}N(eA,"executeCommand");function eL(e){return{raw:!0,cmd:e}}N(eL,"rawCommand");function ej(e,t){return(t===null||t===void 0?void 0:t.isCurrentProject)?"".concat(tf," ").concat(ts," ").concat(e6," ").concat(e):"".concat(tf," ").concat(e5," ").concat(e)}N(ej,"formatCLI");function eU(e,t){return typeof e=="function"?ej(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"?ej(e,t):e}N(eU,"formatCommand");function ex(e,t){return /*#__PURE__*/a(function(){var n;return g(this,function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);er.start("".concat(e)),eS.DEBUG&&er.info("→ ".concat(t));return[4,eA(t)];case 1:r.sent(),er.success("".concat(e," done."));return[3,3];case 2:n=r.sent();throw er.error("".concat(e," failed: ").concat(n.message)),n;case 3:return[2]}})})()}N(ex,"runCommand");var eY=S(require("path"),1);var eM=J(),eV=eY.default;function eF(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r;return(r=eV).resolve.apply(r,[eM.CWD].concat(m(t)))}N(eF,"resolveWorkingPath");function eq(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r;return(r=eV).join.apply(r,m(t))}N(eq,"join");var eK=J(),eB=eK.CWD,eJ="@cyberskill/shared",eW="node_modules",eH="dist",e$="package.json",ez="package-lock.json",eQ="tsconfig.json",eX=".gitignore",eZ=".simple-git-hooks.json",e0="pnpm-lock.yaml",e1=".git/hooks/",e2=".git/COMMIT_EDITMSG",e3=".migrate-mongo.config.js",e4=function(){var e=U.default.readJsonSync(eF(e$)).name===eJ?eB:eq(eB,eW,eJ);return eq(e,eH)}(),e5="cyberskill",e6="src/node/cli/index.ts",e7="eslint",e8="eslint",e9="vitest";var te="vitest",tt="@commitlint/cli",tn="@commitlint/config-conventional",tr="commitlint",ta="lint-staged",to="lint-staged",ti="typescript",tc="tsc",ts="tsx",tu="git",tl="pnpm",tf="pnpm exec",td="simple-git-hooks",tp="simple-git-hooks",tm="@eslint/config-inspector",tv="eslint-config-inspector",ty="node-modules-inspector",tg="node-modules-inspector",tE="migrate-mongo",th="./node_modules/migrate-mongo/bin/migrate-mongo",t_={CYBERSKILL_DIRECTORY:e4,WORKING_DIRECTORY:eB,TS_CONFIG:eF(eQ),GIT_IGNORE:eF(eX),GIT_HOOK:eF(e1),GIT_COMMIT_MSG:eF(e2),SIMPLE_GIT_HOOKS_JSON:eF(eZ),PACKAGE_JSON:eF(e$),PACKAGE_LOCK_JSON:eF(ez),PNPM_LOCK_YAML:eF(e0),NODE_MODULES:eF(eW),MIGRATE_MONGO_CONFIG:eF(e3),LINT_STAGED_CONFIG:eF("".concat(e4,"/configs/lint-staged/index.js")),COMMITLINT_CONFIG:eF("".concat(e4,"/configs/commitlint/index.js")),UNIT_TEST_CONFIG:eF("".concat(e4,"/react/vitest/vitest.unit.js")),UNIT_TEST_SETUP_CONFIG:eF("".concat(e4,"/react/vitest/vitest.unit.setup.js")),E2E_TEST_CONFIG:eF("".concat(e4,"/react/vitest/vitest.e2e.js"))};function tI(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,eD(o,{update:!0})];case 2:e=n.sent();n.label=3;case 3:return[2,(e,eU(eL("".concat(tf," ").concat(r))))];case 4:return[2,eU(eL(r))];case 5:throw new Error("Unsupported command type");case 6:return[2]}})})()}}N(tI,"buildCommand");var tb={simpleGitHooks:tI({type:W.CLI,packages:[{name:td,type:ea.DEV_DEPENDENCY}],command:tp}),eslintInspect:tI({type:W.CLI,packages:[{name:tm,type:ea.DEV_DEPENDENCY}],command:tv}),nodeModulesInspect:tI({type:W.CLI,packages:[{name:ty,type:ea.DEV_DEPENDENCY}],command:tg}),eslintCheck:tI({type:W.CLI,packages:[{name:e7,type:ea.DEV_DEPENDENCY}],command:"".concat(e8," ").concat(t_.WORKING_DIRECTORY," --no-cache")}),eslintFix:tI({type:W.CLI,packages:[{name:e7,type:ea.DEV_DEPENDENCY}],command:"".concat(e8," ").concat(t_.WORKING_DIRECTORY," --fix --no-cache")}),typescriptCheck:tI({type:W.CLI,packages:[{name:ti,type:ea.DEPENDENCY}],command:"".concat(tc," -p ").concat(t_.TS_CONFIG," --noEmit")}),testUnit:tI({type:W.CLI,packages:[{name:e9,type:ea.DEV_DEPENDENCY}],command:"".concat(te," --config ").concat(t_.UNIT_TEST_CONFIG)}),testE2e:tI({type:W.CLI,packages:[{name:e9,type:ea.DEV_DEPENDENCY}],command:"".concat(te," --config ").concat(t_.E2E_TEST_CONFIG)}),mongoMigrateCreate:N(function(e){return tI({type:W.CLI,packages:[{name:tE,type:ea.DEPENDENCY}],command:"".concat(ts," ").concat(th," create ").concat(e," -f ").concat(t_.MIGRATE_MONGO_CONFIG)})()},"mongoMigrateCreate"),mongoMigrateUp:tI({type:W.CLI,packages:[{name:tE,type:ea.DEPENDENCY}],command:"".concat(ts," ").concat(th," up -f ").concat(t_.MIGRATE_MONGO_CONFIG)}),mongoMigrateDown:tI({type:W.CLI,packages:[{name:tE,type:ea.DEPENDENCY}],command:"".concat(ts," ").concat(th," down -f ").concat(t_.MIGRATE_MONGO_CONFIG)}),commitLint:tI({type:W.CLI,packages:[{name:tt,type:ea.DEV_DEPENDENCY},{name:tn,type:ea.DEV_DEPENDENCY}],command:"".concat(tr," --edit ").concat(t_.GIT_COMMIT_MSG," --config ").concat(t_.COMMITLINT_CONFIG)}),lintStaged:tI({type:W.CLI,packages:[{name:ta,type:ea.DEV_DEPENDENCY}],command:"".concat(to," --config ").concat(t_.LINT_STAGED_CONFIG)}),configureGitHook:tI({type:W.STRING,command:"".concat(tu," config core.hooksPath ").concat(t_.GIT_HOOK)}),stageBuildDirectory:tI({type:W.STRING,command:"".concat(tu," add ").concat(eH)}),build:tI({type:W.STRING,command:"".concat(tl," run build")}),pnpmInstallStandard:tI({type:W.STRING,command:"".concat(tl," install")}),pnpmInstallLegacy:tI({type:W.STRING,command:"".concat(tl," install --legacy-peer-deps")}),pnpmInstallForce:tI({type:W.STRING,command:"".concat(tl," install --force")})};function tD(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:[t_.UNIT_TEST_SETUP_CONFIG]}},e))}N(tD,"vitestUnit");function tC(e){return(typeof e==="undefined"?"undefined":v(e))=="object"&&e!==null&&!Array.isArray(e)}N(tC,"isObject");function tN(){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(tC(h)){r[E]=tN(tC(_)?_:{},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(tN,"deepMerge");var tO=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 tT=S(require("globals"),1),tS=[{languageOptions:{globals:l({},tT.node,tT.browser)},rules:{"perfectionist/sort-imports":["error",{internalPattern:["^#.*","^@/.*"]}],"dot-notation":"off"},ignores:["build","dist"]}];var tw;var tP=N(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}var r=tN.apply(void 0,[tS].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"),tG=(tw={},o(tw,tO.ESLINT,function(e){return tP(e)}),o(tw,tO.COMMITLINT,function(e){return tN(e)}),o(tw,tO.LINT_STAGED,function(e){return tN(e)}),o(tw,tO.VITEST_REACT_UNIT,function(e){return tD(e)}),o(tw,tO.VITEST_REACT_E2E,function(e){return A(e)}),tw);function tR(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=tG[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(tR,"mergeConfigs");0&&(module.exports={mergeConfigs:mergeConfigs});