cnpmcore 4.10.0 → 4.11.1

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 (296) hide show
  1. package/dist/app/common/FileUtil.js +1 -1
  2. package/dist/app/common/PackageUtil.d.ts +1 -1
  3. package/dist/app/common/adapter/BugVersionStore.d.ts +1 -1
  4. package/dist/app/common/adapter/NFSAdapter.js +1 -1
  5. package/dist/app/common/adapter/NPMRegistry.d.ts +1 -1
  6. package/dist/app/common/adapter/NPMRegistry.js +1 -1
  7. package/dist/app/common/adapter/binary/AbstractBinary.d.ts +2 -2
  8. package/dist/app/common/adapter/binary/ApiBinary.d.ts +1 -1
  9. package/dist/app/common/adapter/binary/ApiBinary.js +2 -2
  10. package/dist/app/common/adapter/binary/BucketBinary.d.ts +2 -2
  11. package/dist/app/common/adapter/binary/BucketBinary.js +3 -3
  12. package/dist/app/common/adapter/binary/ChromeForTestingBinary.d.ts +1 -1
  13. package/dist/app/common/adapter/binary/ChromeForTestingBinary.js +2 -2
  14. package/dist/app/common/adapter/binary/CypressBinary.d.ts +1 -1
  15. package/dist/app/common/adapter/binary/CypressBinary.js +2 -2
  16. package/dist/app/common/adapter/binary/EdgedriverBinary.d.ts +1 -1
  17. package/dist/app/common/adapter/binary/EdgedriverBinary.js +2 -2
  18. package/dist/app/common/adapter/binary/ElectronBinary.d.ts +3 -3
  19. package/dist/app/common/adapter/binary/ElectronBinary.js +4 -4
  20. package/dist/app/common/adapter/binary/FirefoxBinary.d.ts +2 -2
  21. package/dist/app/common/adapter/binary/FirefoxBinary.js +3 -3
  22. package/dist/app/common/adapter/binary/GithubBinary.d.ts +2 -2
  23. package/dist/app/common/adapter/binary/GithubBinary.js +7 -7
  24. package/dist/app/common/adapter/binary/ImageminBinary.d.ts +2 -2
  25. package/dist/app/common/adapter/binary/ImageminBinary.js +3 -3
  26. package/dist/app/common/adapter/binary/NodeBinary.d.ts +2 -2
  27. package/dist/app/common/adapter/binary/NodeBinary.js +3 -3
  28. package/dist/app/common/adapter/binary/NodePreGypBinary.d.ts +2 -2
  29. package/dist/app/common/adapter/binary/NodePreGypBinary.js +3 -3
  30. package/dist/app/common/adapter/binary/NwjsBinary.d.ts +2 -2
  31. package/dist/app/common/adapter/binary/NwjsBinary.js +4 -4
  32. package/dist/app/common/adapter/binary/PlaywrightBinary.d.ts +1 -1
  33. package/dist/app/common/adapter/binary/PlaywrightBinary.js +2 -2
  34. package/dist/app/common/adapter/binary/PrismaBinary.d.ts +2 -2
  35. package/dist/app/common/adapter/binary/PrismaBinary.js +3 -3
  36. package/dist/app/common/adapter/binary/PuppeteerBinary.d.ts +1 -1
  37. package/dist/app/common/adapter/binary/PuppeteerBinary.js +2 -2
  38. package/dist/app/common/adapter/binary/SqlcipherBinary.d.ts +1 -1
  39. package/dist/app/common/adapter/binary/SqlcipherBinary.js +2 -2
  40. package/dist/app/common/adapter/changesStream/AbstractChangesStream.d.ts +2 -2
  41. package/dist/app/common/adapter/changesStream/CnpmcoreChangesStream.d.ts +2 -2
  42. package/dist/app/common/adapter/changesStream/CnpmcoreChangesStream.js +2 -2
  43. package/dist/app/common/adapter/changesStream/CnpmjsorgChangesStream.d.ts +2 -2
  44. package/dist/app/common/adapter/changesStream/CnpmjsorgChangesStream.js +2 -2
  45. package/dist/app/common/adapter/changesStream/NpmChangesStream.d.ts +2 -2
  46. package/dist/app/common/adapter/changesStream/NpmChangesStream.js +2 -2
  47. package/dist/app/common/typing.d.ts +1 -1
  48. package/dist/app/core/entity/Binary.d.ts +2 -2
  49. package/dist/app/core/entity/Binary.js +2 -2
  50. package/dist/app/core/entity/Change.d.ts +2 -2
  51. package/dist/app/core/entity/Change.js +2 -2
  52. package/dist/app/core/entity/Dist.d.ts +2 -2
  53. package/dist/app/core/entity/Dist.js +2 -2
  54. package/dist/app/core/entity/Hook.d.ts +3 -3
  55. package/dist/app/core/entity/Hook.js +2 -2
  56. package/dist/app/core/entity/HookEvent.d.ts +1 -1
  57. package/dist/app/core/entity/HookEvent.js +1 -1
  58. package/dist/app/core/entity/Package.d.ts +3 -3
  59. package/dist/app/core/entity/Package.js +4 -4
  60. package/dist/app/core/entity/PackageTag.d.ts +2 -2
  61. package/dist/app/core/entity/PackageTag.js +2 -2
  62. package/dist/app/core/entity/PackageVersion.d.ts +3 -3
  63. package/dist/app/core/entity/PackageVersion.js +3 -3
  64. package/dist/app/core/entity/PackageVersionBlock.d.ts +2 -2
  65. package/dist/app/core/entity/PackageVersionBlock.js +2 -2
  66. package/dist/app/core/entity/PackageVersionFile.d.ts +3 -3
  67. package/dist/app/core/entity/PackageVersionFile.js +2 -2
  68. package/dist/app/core/entity/PackageVersionManifest.d.ts +2 -2
  69. package/dist/app/core/entity/PackageVersionManifest.js +2 -2
  70. package/dist/app/core/entity/ProxyCache.d.ts +3 -3
  71. package/dist/app/core/entity/ProxyCache.js +3 -3
  72. package/dist/app/core/entity/Registry.d.ts +3 -3
  73. package/dist/app/core/entity/Registry.js +2 -2
  74. package/dist/app/core/entity/Scope.d.ts +2 -2
  75. package/dist/app/core/entity/Scope.js +2 -2
  76. package/dist/app/core/entity/SqlRange.js +1 -1
  77. package/dist/app/core/entity/Task.d.ts +4 -4
  78. package/dist/app/core/entity/Task.js +6 -6
  79. package/dist/app/core/entity/Token.d.ts +2 -2
  80. package/dist/app/core/entity/Token.js +2 -2
  81. package/dist/app/core/entity/User.d.ts +2 -2
  82. package/dist/app/core/entity/User.js +3 -3
  83. package/dist/app/core/entity/WebauthnCredential.d.ts +2 -2
  84. package/dist/app/core/entity/WebauthnCredential.js +2 -2
  85. package/dist/app/core/event/BugVersionFixHandler.js +2 -2
  86. package/dist/app/core/event/CacheCleaner.js +1 -1
  87. package/dist/app/core/event/ChangesStream.d.ts +4 -4
  88. package/dist/app/core/event/ChangesStream.js +4 -4
  89. package/dist/app/core/event/StoreManifest.js +3 -3
  90. package/dist/app/core/event/SyncESPackage.d.ts +1 -1
  91. package/dist/app/core/event/SyncESPackage.js +1 -1
  92. package/dist/app/core/event/SyncPackageVersionFile.js +2 -2
  93. package/dist/app/core/event/TotalHandler.d.ts +1 -1
  94. package/dist/app/core/event/TotalHandler.js +1 -1
  95. package/dist/app/core/event/index.d.ts +1 -1
  96. package/dist/app/core/service/BinarySyncerService.d.ts +5 -5
  97. package/dist/app/core/service/BinarySyncerService.js +10 -10
  98. package/dist/app/core/service/BugVersionService.d.ts +1 -1
  99. package/dist/app/core/service/BugVersionService.js +3 -3
  100. package/dist/app/core/service/CacheService.d.ts +2 -2
  101. package/dist/app/core/service/CacheService.js +1 -1
  102. package/dist/app/core/service/ChangesStreamService.d.ts +3 -3
  103. package/dist/app/core/service/ChangesStreamService.js +8 -8
  104. package/dist/app/core/service/CreateHookTriggerService.d.ts +2 -2
  105. package/dist/app/core/service/CreateHookTriggerService.js +6 -6
  106. package/dist/app/core/service/FixNoPaddingVersionService.js +1 -1
  107. package/dist/app/core/service/HomeService.d.ts +1 -1
  108. package/dist/app/core/service/HomeService.js +2 -2
  109. package/dist/app/core/service/HookManageService.d.ts +2 -2
  110. package/dist/app/core/service/HookManageService.js +1 -1
  111. package/dist/app/core/service/HookTriggerService.d.ts +3 -3
  112. package/dist/app/core/service/HookTriggerService.js +3 -3
  113. package/dist/app/core/service/PackageManagerService.d.ts +7 -7
  114. package/dist/app/core/service/PackageManagerService.js +8 -8
  115. package/dist/app/core/service/PackageSearchService.d.ts +4 -4
  116. package/dist/app/core/service/PackageSearchService.js +2 -2
  117. package/dist/app/core/service/PackageSyncerService.d.ts +6 -6
  118. package/dist/app/core/service/PackageSyncerService.js +7 -7
  119. package/dist/app/core/service/PackageVersionFileService.d.ts +4 -4
  120. package/dist/app/core/service/PackageVersionFileService.js +5 -5
  121. package/dist/app/core/service/PackageVersionService.d.ts +1 -1
  122. package/dist/app/core/service/PackageVersionService.js +2 -2
  123. package/dist/app/core/service/ProxyCacheService.d.ts +5 -5
  124. package/dist/app/core/service/ProxyCacheService.js +7 -7
  125. package/dist/app/core/service/RegistryManagerService.d.ts +3 -3
  126. package/dist/app/core/service/RegistryManagerService.js +5 -5
  127. package/dist/app/core/service/ScopeManagerService.d.ts +3 -3
  128. package/dist/app/core/service/ScopeManagerService.js +2 -2
  129. package/dist/app/core/service/TaskService.d.ts +7 -7
  130. package/dist/app/core/service/TaskService.js +2 -2
  131. package/dist/app/core/service/TokenService.d.ts +3 -3
  132. package/dist/app/core/service/TokenService.js +6 -6
  133. package/dist/app/core/service/UserService.d.ts +6 -6
  134. package/dist/app/core/service/UserService.js +7 -7
  135. package/dist/app/core/util/EntityUtil.d.ts +1 -1
  136. package/dist/app/infra/AuthAdapter.d.ts +1 -1
  137. package/dist/app/infra/NFSClientAdapter.d.ts +1 -1
  138. package/dist/app/infra/QueueAdapter.d.ts +1 -1
  139. package/dist/app/infra/SearchAdapter.d.ts +1 -1
  140. package/dist/app/port/UserRoleManager.d.ts +3 -3
  141. package/dist/app/port/UserRoleManager.js +1 -1
  142. package/dist/app/port/config.d.ts +3 -3
  143. package/dist/app/port/config.js +1 -1
  144. package/dist/app/port/controller/AbstractController.d.ts +8 -8
  145. package/dist/app/port/controller/AbstractController.js +4 -4
  146. package/dist/app/port/controller/AccessController.d.ts +1 -1
  147. package/dist/app/port/controller/AccessController.js +3 -3
  148. package/dist/app/port/controller/BinarySyncController.d.ts +2 -2
  149. package/dist/app/port/controller/BinarySyncController.js +4 -4
  150. package/dist/app/port/controller/ChangesStreamController.d.ts +1 -1
  151. package/dist/app/port/controller/ChangesStreamController.js +1 -1
  152. package/dist/app/port/controller/DownloadController.d.ts +1 -1
  153. package/dist/app/port/controller/DownloadController.js +3 -3
  154. package/dist/app/port/controller/HomeController.d.ts +2 -2
  155. package/dist/app/port/controller/HomeController.js +1 -1
  156. package/dist/app/port/controller/HookController.d.ts +5 -5
  157. package/dist/app/port/controller/HookController.js +2 -2
  158. package/dist/app/port/controller/PackageBlockController.d.ts +2 -2
  159. package/dist/app/port/controller/PackageBlockController.js +4 -4
  160. package/dist/app/port/controller/PackageSyncController.d.ts +5 -5
  161. package/dist/app/port/controller/PackageSyncController.js +5 -5
  162. package/dist/app/port/controller/PackageTagController.d.ts +1 -1
  163. package/dist/app/port/controller/PackageTagController.js +3 -3
  164. package/dist/app/port/controller/PackageVersionFileController.d.ts +1 -1
  165. package/dist/app/port/controller/PackageVersionFileController.js +5 -5
  166. package/dist/app/port/controller/ProxyCacheController.d.ts +2 -2
  167. package/dist/app/port/controller/ProxyCacheController.js +4 -4
  168. package/dist/app/port/controller/RegistryController.d.ts +3 -3
  169. package/dist/app/port/controller/RegistryController.js +3 -3
  170. package/dist/app/port/controller/ScopeController.d.ts +2 -2
  171. package/dist/app/port/controller/ScopeController.js +3 -3
  172. package/dist/app/port/controller/TokenController.d.ts +2 -2
  173. package/dist/app/port/controller/TokenController.js +2 -2
  174. package/dist/app/port/controller/UserController.d.ts +2 -2
  175. package/dist/app/port/controller/UserController.js +4 -4
  176. package/dist/app/port/controller/admin/PaddingVersionController.d.ts +1 -1
  177. package/dist/app/port/controller/admin/PaddingVersionController.js +1 -1
  178. package/dist/app/port/controller/convertor/HookConvertor.d.ts +4 -4
  179. package/dist/app/port/controller/package/DownloadPackageVersionTar.d.ts +2 -2
  180. package/dist/app/port/controller/package/DownloadPackageVersionTar.js +3 -3
  181. package/dist/app/port/controller/package/RemovePackageVersionController.d.ts +1 -1
  182. package/dist/app/port/controller/package/RemovePackageVersionController.js +2 -2
  183. package/dist/app/port/controller/package/SavePackageVersionController.d.ts +1 -1
  184. package/dist/app/port/controller/package/SavePackageVersionController.js +3 -3
  185. package/dist/app/port/controller/package/SearchPackageController.d.ts +2 -2
  186. package/dist/app/port/controller/package/SearchPackageController.js +3 -3
  187. package/dist/app/port/controller/package/ShowPackageController.d.ts +1 -1
  188. package/dist/app/port/controller/package/ShowPackageController.js +5 -5
  189. package/dist/app/port/controller/package/ShowPackageVersionController.d.ts +1 -1
  190. package/dist/app/port/controller/package/ShowPackageVersionController.js +6 -6
  191. package/dist/app/port/controller/package/UpdatePackageController.d.ts +1 -1
  192. package/dist/app/port/controller/package/UpdatePackageController.js +2 -2
  193. package/dist/app/port/middleware/AdminAccess.js +1 -1
  194. package/dist/app/port/middleware/AlwaysAuth.js +1 -1
  195. package/dist/app/port/middleware/ErrorHandler.js +1 -1
  196. package/dist/app/port/middleware/index.js +3 -3
  197. package/dist/app/port/schedule/CheckProxyCacheUpdateWorker.js +2 -2
  198. package/dist/app/port/schedule/CheckRecentlyUpdatedPackages.js +2 -2
  199. package/dist/app/port/schedule/CleanTempDir.js +1 -1
  200. package/dist/app/port/schedule/CreateSyncBinaryTask.js +1 -1
  201. package/dist/app/port/schedule/CreateTriggerHookWorker.js +1 -1
  202. package/dist/app/port/schedule/SyncBinaryWorker.js +1 -1
  203. package/dist/app/port/schedule/SyncPackageWorker.js +1 -1
  204. package/dist/app/port/schedule/SyncProxyCacheWorker.js +1 -1
  205. package/dist/app/port/schedule/TriggerHookWorker.js +1 -1
  206. package/dist/app/port/schedule/UpdateTotalData.js +3 -3
  207. package/dist/app/port/typebox.d.ts +2 -2
  208. package/dist/app/port/typebox.js +3 -3
  209. package/dist/app/port/webauth/WebauthController.d.ts +2 -2
  210. package/dist/app/port/webauth/WebauthController.js +4 -4
  211. package/dist/app/repository/BinaryRepository.d.ts +2 -2
  212. package/dist/app/repository/BinaryRepository.js +3 -3
  213. package/dist/app/repository/ChangeRepository.d.ts +3 -3
  214. package/dist/app/repository/ChangeRepository.js +2 -2
  215. package/dist/app/repository/DistRepository.d.ts +2 -2
  216. package/dist/app/repository/HookRepository.d.ts +2 -2
  217. package/dist/app/repository/HookRepository.js +2 -2
  218. package/dist/app/repository/PackageRepository.d.ts +8 -8
  219. package/dist/app/repository/PackageRepository.js +7 -7
  220. package/dist/app/repository/PackageVersionBlockRepository.d.ts +3 -3
  221. package/dist/app/repository/PackageVersionBlockRepository.js +3 -3
  222. package/dist/app/repository/PackageVersionDownloadRepository.d.ts +2 -2
  223. package/dist/app/repository/PackageVersionDownloadRepository.js +1 -1
  224. package/dist/app/repository/PackageVersionFileRepository.d.ts +2 -2
  225. package/dist/app/repository/PackageVersionFileRepository.js +4 -4
  226. package/dist/app/repository/PackageVersionRepository.d.ts +3 -3
  227. package/dist/app/repository/PackageVersionRepository.js +2 -2
  228. package/dist/app/repository/ProxyCacheRepository.d.ts +5 -5
  229. package/dist/app/repository/ProxyCacheRepository.js +4 -4
  230. package/dist/app/repository/RegistryRepository.d.ts +4 -4
  231. package/dist/app/repository/RegistryRepository.js +4 -4
  232. package/dist/app/repository/ScopeRepository.d.ts +4 -4
  233. package/dist/app/repository/ScopeRepository.js +4 -4
  234. package/dist/app/repository/SearchRepository.d.ts +1 -1
  235. package/dist/app/repository/TaskRepository.d.ts +8 -8
  236. package/dist/app/repository/TaskRepository.js +4 -4
  237. package/dist/app/repository/TotalRepository.d.ts +1 -1
  238. package/dist/app/repository/TotalRepository.js +2 -2
  239. package/dist/app/repository/UserRepository.d.ts +4 -4
  240. package/dist/app/repository/UserRepository.js +6 -6
  241. package/dist/app/repository/model/Binary.d.ts +1 -1
  242. package/dist/app/repository/model/Binary.js +1 -1
  243. package/dist/app/repository/model/Change.d.ts +1 -1
  244. package/dist/app/repository/model/Change.js +1 -1
  245. package/dist/app/repository/model/Dist.d.ts +1 -1
  246. package/dist/app/repository/model/Dist.js +1 -1
  247. package/dist/app/repository/model/HistoryTask.d.ts +2 -2
  248. package/dist/app/repository/model/HistoryTask.js +1 -1
  249. package/dist/app/repository/model/Hook.d.ts +2 -2
  250. package/dist/app/repository/model/Hook.js +1 -1
  251. package/dist/app/repository/model/Maintainer.d.ts +1 -1
  252. package/dist/app/repository/model/Maintainer.js +1 -1
  253. package/dist/app/repository/model/Package.d.ts +1 -1
  254. package/dist/app/repository/model/Package.js +2 -2
  255. package/dist/app/repository/model/PackageDep.d.ts +1 -1
  256. package/dist/app/repository/model/PackageDep.js +1 -1
  257. package/dist/app/repository/model/PackageTag.d.ts +1 -1
  258. package/dist/app/repository/model/PackageTag.js +1 -1
  259. package/dist/app/repository/model/PackageVersion.d.ts +1 -1
  260. package/dist/app/repository/model/PackageVersion.js +3 -3
  261. package/dist/app/repository/model/PackageVersionBlock.d.ts +1 -1
  262. package/dist/app/repository/model/PackageVersionBlock.js +1 -1
  263. package/dist/app/repository/model/PackageVersionDownload.d.ts +1 -1
  264. package/dist/app/repository/model/PackageVersionDownload.js +1 -1
  265. package/dist/app/repository/model/PackageVersionFile.d.ts +1 -1
  266. package/dist/app/repository/model/PackageVersionFile.js +2 -2
  267. package/dist/app/repository/model/PackageVersionManifest.d.ts +1 -1
  268. package/dist/app/repository/model/PackageVersionManifest.js +1 -1
  269. package/dist/app/repository/model/ProxyCache.d.ts +2 -2
  270. package/dist/app/repository/model/ProxyCache.js +1 -1
  271. package/dist/app/repository/model/Registry.d.ts +2 -2
  272. package/dist/app/repository/model/Registry.js +1 -1
  273. package/dist/app/repository/model/Scope.d.ts +1 -1
  274. package/dist/app/repository/model/Scope.js +1 -1
  275. package/dist/app/repository/model/Task.d.ts +2 -2
  276. package/dist/app/repository/model/Task.js +1 -1
  277. package/dist/app/repository/model/Token.d.ts +1 -1
  278. package/dist/app/repository/model/Token.js +1 -1
  279. package/dist/app/repository/model/TokenPackage.d.ts +1 -1
  280. package/dist/app/repository/model/TokenPackage.js +1 -1
  281. package/dist/app/repository/model/Total.d.ts +1 -1
  282. package/dist/app/repository/model/Total.js +1 -1
  283. package/dist/app/repository/model/User.d.ts +1 -1
  284. package/dist/app/repository/model/User.js +1 -1
  285. package/dist/app/repository/model/WebauthnCredential.d.ts +1 -1
  286. package/dist/app/repository/model/WebauthnCredential.js +1 -1
  287. package/dist/app/repository/util/EntityProperty.js +1 -1
  288. package/dist/app/repository/util/ModelConvertor.d.ts +1 -1
  289. package/dist/app/repository/util/ModelConvertor.js +1 -1
  290. package/dist/app.js +1 -1
  291. package/dist/config/binaries.d.ts +5 -1
  292. package/dist/config/binaries.js +6 -3
  293. package/dist/config/config.default.d.ts +1 -1
  294. package/dist/config/config.default.js +3 -3
  295. package/dist/config/config.unittest.js +1 -1
  296. package/package.json +3 -2
@@ -12,12 +12,12 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
12
  };
13
13
  import { Context, HTTPController, HTTPMethod, HTTPMethodEnum, HTTPParam, Inject, } from '@eggjs/tegg';
14
14
  import { NotFoundError } from 'egg-errors';
15
- import { AbstractController } from '../AbstractController.js';
16
- import { FULLNAME_REG_STRING, getScopeAndName, } from '../../../common/PackageUtil.js';
17
- import { isSyncWorkerRequest } from '../../../common/SyncUtil.js';
18
- import { Spec } from '../../../port/typebox.js';
19
- import { ABBREVIATED_META_TYPE, SyncMode } from '../../../common/constants.js';
20
- import { DIST_NAMES } from '../../../core/entity/Package.js';
15
+ import { AbstractController } from "../AbstractController.js";
16
+ import { FULLNAME_REG_STRING, getScopeAndName, } from "../../../common/PackageUtil.js";
17
+ import { isSyncWorkerRequest } from "../../../common/SyncUtil.js";
18
+ import { Spec } from "../../../port/typebox.js";
19
+ import { ABBREVIATED_META_TYPE, SyncMode } from "../../../common/constants.js";
20
+ import { DIST_NAMES } from "../../../core/entity/Package.js";
21
21
  let ShowPackageVersionController = class ShowPackageVersionController extends AbstractController {
22
22
  async show(ctx, fullname, versionSpec) {
23
23
  // https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md#full-metadata-format
@@ -1,6 +1,6 @@
1
1
  import { type EggContext } from '@eggjs/tegg';
2
2
  import { type Static } from '@eggjs/typebox-validate/typebox';
3
- import { AbstractController } from '../AbstractController.js';
3
+ import { AbstractController } from '../AbstractController.ts';
4
4
  declare const MaintainerDataRule: import("@eggjs/typebox-validate/typebox").TObject<{
5
5
  maintainers: import("@eggjs/typebox-validate/typebox").TArray<import("@eggjs/typebox-validate/typebox").TObject<{
6
6
  name: import("@eggjs/typebox-validate/typebox").TString;
@@ -13,8 +13,8 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
13
13
  import { BadRequestError, UnprocessableEntityError } from 'egg-errors';
14
14
  import { Context, HTTPBody, HTTPController, HTTPMethod, HTTPMethodEnum, HTTPParam, Inject, } from '@eggjs/tegg';
15
15
  import { Type } from '@eggjs/typebox-validate/typebox';
16
- import { AbstractController } from '../AbstractController.js';
17
- import { FULLNAME_REG_STRING } from '../../../common/PackageUtil.js';
16
+ import { AbstractController } from "../AbstractController.js";
17
+ import { FULLNAME_REG_STRING } from "../../../common/PackageUtil.js";
18
18
  const MaintainerDataRule = Type.Object({
19
19
  maintainers: Type.Array(Type.Object({
20
20
  name: Type.String({ minLength: 1, maxLength: 100 }),
@@ -1,5 +1,5 @@
1
1
  import { ForbiddenError } from 'egg-errors';
2
- import { UserRoleManager } from '../UserRoleManager.js';
2
+ import { UserRoleManager } from "../UserRoleManager.js";
3
3
  export async function AdminAccess(ctx, next) {
4
4
  const userRoleManager = await ctx.getEggObject(UserRoleManager);
5
5
  const isAdmin = await userRoleManager.isAdmin(ctx);
@@ -1,4 +1,4 @@
1
- import { UserRoleManager } from '../UserRoleManager.js';
1
+ import { UserRoleManager } from "../UserRoleManager.js";
2
2
  export async function AlwaysAuth(ctx, next) {
3
3
  if (ctx.app.config.cnpmcore.alwaysAuth) {
4
4
  // ignore login request: `PUT /-/user/org.couchdb.user::username`
@@ -1,4 +1,4 @@
1
- import { PackageSyncerService } from '../../core/service/PackageSyncerService.js';
1
+ import { PackageSyncerService } from "../../core/service/PackageSyncerService.js";
2
2
  const DEFAULT_SERVER_ERROR_STATUS = 500;
3
3
  export async function ErrorHandler(ctx, next) {
4
4
  try {
@@ -5,9 +5,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { Middleware } from '@eggjs/tegg';
8
- import { AlwaysAuth } from './AlwaysAuth.js';
9
- import { ErrorHandler } from './ErrorHandler.js';
10
- import { Tracing } from './Tracing.js';
8
+ import { AlwaysAuth } from "./AlwaysAuth.js";
9
+ import { ErrorHandler } from "./ErrorHandler.js";
10
+ import { Tracing } from "./Tracing.js";
11
11
  let MiddlewareController = class MiddlewareController {
12
12
  };
13
13
  MiddlewareController = __decorate([
@@ -9,8 +9,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  };
10
10
  import { Schedule, ScheduleType } from '@eggjs/tegg/schedule';
11
11
  import { Inject } from '@eggjs/tegg';
12
- import { SyncMode } from '../../common/constants.js';
13
- import { isPkgManifest } from '../../core/entity/Package.js';
12
+ import { SyncMode } from "../../common/constants.js";
13
+ import { isPkgManifest } from "../../core/entity/Package.js";
14
14
  let CheckProxyCacheUpdateWorker = class CheckProxyCacheUpdateWorker {
15
15
  async subscribe() {
16
16
  if (this.config.cnpmcore.syncMode !== SyncMode.proxy)
@@ -9,8 +9,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  };
10
10
  import { Schedule, ScheduleType, } from '@eggjs/tegg/schedule';
11
11
  import { Inject } from '@eggjs/tegg';
12
- import { getScopeAndName } from '../../common/PackageUtil.js';
13
- import { SyncMode } from '../../common/constants.js';
12
+ import { getScopeAndName } from "../../common/PackageUtil.js";
13
+ import { SyncMode } from "../../common/constants.js";
14
14
  // https://github.com/cnpm/cnpmcore/issues/9
15
15
  let CheckRecentlyUpdatedPackages = class CheckRecentlyUpdatedPackages {
16
16
  async subscribe() {
@@ -11,7 +11,7 @@ import { access, rm } from 'node:fs/promises';
11
11
  import path from 'node:path';
12
12
  import { Schedule, ScheduleType } from '@eggjs/tegg/schedule';
13
13
  import { Inject } from '@eggjs/tegg';
14
- import dayjs from '../../common/dayjs.js';
14
+ import dayjs from "../../common/dayjs.js";
15
15
  let CleanTempDir = class CleanTempDir {
16
16
  async subscribe() {
17
17
  const downloadDir = path.join(this.config.dataDir, 'downloads');
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  };
10
10
  import { Schedule, ScheduleType, } from '@eggjs/tegg/schedule';
11
11
  import { Inject } from '@eggjs/tegg';
12
- import binaries, {} from '../../../config/binaries.js';
12
+ import binaries, {} from "../../../config/binaries.js";
13
13
  let CreateSyncBinaryTask = class CreateSyncBinaryTask {
14
14
  async subscribe() {
15
15
  if (!this.config.cnpmcore.enableSyncBinary)
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  };
10
10
  import { Schedule, ScheduleType, } from '@eggjs/tegg/schedule';
11
11
  import { Inject } from '@eggjs/tegg';
12
- import { TaskType } from '../../common/enum/Task.js';
12
+ import { TaskType } from "../../common/enum/Task.js";
13
13
  let executingCount = 0;
14
14
  let CreateTriggerHookWorker = class CreateTriggerHookWorker {
15
15
  async subscribe() {
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  };
10
10
  import { Schedule, ScheduleType, } from '@eggjs/tegg/schedule';
11
11
  import { Inject } from '@eggjs/tegg';
12
- import { isTimeoutError } from '../../common/ErrorUtil.js';
12
+ import { isTimeoutError } from "../../common/ErrorUtil.js";
13
13
  let SyncBinaryWorker = class SyncBinaryWorker {
14
14
  async subscribe() {
15
15
  if (!this.config.cnpmcore.enableSyncBinary)
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  };
10
10
  import { Schedule, ScheduleType, } from '@eggjs/tegg/schedule';
11
11
  import { Inject } from '@eggjs/tegg';
12
- import { SyncMode } from '../../common/constants.js';
12
+ import { SyncMode } from "../../common/constants.js";
13
13
  let executingCount = 0;
14
14
  let SyncPackageWorker = class SyncPackageWorker {
15
15
  async subscribe() {
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  };
10
10
  import { Schedule, ScheduleType, } from '@eggjs/tegg/schedule';
11
11
  import { Inject } from '@eggjs/tegg';
12
- import { SyncMode } from '../../common/constants.js';
12
+ import { SyncMode } from "../../common/constants.js";
13
13
  let executingCount = 0;
14
14
  let SyncProxyCacheWorker = class SyncProxyCacheWorker {
15
15
  async subscribe() {
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  };
10
10
  import { Schedule, ScheduleType, } from '@eggjs/tegg/schedule';
11
11
  import { Inject } from '@eggjs/tegg';
12
- import { TaskType } from '../../common/enum/Task.js';
12
+ import { TaskType } from "../../common/enum/Task.js";
13
13
  let executingCount = 0;
14
14
  let TriggerHookWorker = class TriggerHookWorker {
15
15
  async subscribe() {
@@ -9,9 +9,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  };
10
10
  import { Schedule, ScheduleType, } from '@eggjs/tegg/schedule';
11
11
  import { Inject } from '@eggjs/tegg';
12
- import { TaskType } from '../../common/enum/Task.js';
13
- import { GLOBAL_WORKER } from '../../common/constants.js';
14
- import dayjs from '../../common/dayjs.js';
12
+ import { TaskType } from "../../common/enum/Task.js";
13
+ import { GLOBAL_WORKER } from "../../common/constants.js";
14
+ import dayjs from "../../common/dayjs.js";
15
15
  let UpdateTotalData = class UpdateTotalData {
16
16
  // 计算下载量相关信息,不区分不同 changesStream
17
17
  async calculateDownloadInfo() {
@@ -1,7 +1,7 @@
1
1
  import { type Static } from '@eggjs/typebox-validate/typebox';
2
2
  import type { Ajv } from '@eggjs/typebox-validate';
3
- import { RegistryType } from '../common/enum/Registry.js';
4
- import { HookType } from '../common/enum/Hook.js';
3
+ import { RegistryType } from '../common/enum/Registry.ts';
4
+ import { HookType } from '../common/enum/Hook.ts';
5
5
  export declare const Name: import("@eggjs/typebox-validate/typebox").TString;
6
6
  export declare const Url: import("@eggjs/typebox-validate/typebox").TString;
7
7
  export declare const Secret: import("@eggjs/typebox-validate/typebox").TString;
@@ -2,9 +2,9 @@ import { Type } from '@eggjs/typebox-validate/typebox';
2
2
  import semver from 'semver';
3
3
  import npa from 'npm-package-arg';
4
4
  import { uniq } from 'lodash-es';
5
- import { RegistryType } from '../common/enum/Registry.js';
6
- import { HookType } from '../common/enum/Hook.js';
7
- import binaryConfig, {} from '../../config/binaries.js';
5
+ import { RegistryType } from "../common/enum/Registry.js";
6
+ import { HookType } from "../common/enum/Hook.js";
7
+ import binaryConfig, {} from "../../config/binaries.js";
8
8
  export const Name = Type.String({
9
9
  transform: ['trim'],
10
10
  });
@@ -3,8 +3,8 @@ import type { EggAppConfig, EggLogger } from 'egg';
3
3
  import '@eggjs/typebox-validate';
4
4
  import { type Static } from '@eggjs/typebox-validate/typebox';
5
5
  import type { PublicKeyCredentialCreationOptionsJSON, PublicKeyCredentialRequestOptionsJSON } from '@simplewebauthn/typescript-types';
6
- import type { UserService } from '../../core/service/UserService.js';
7
- import { MiddlewareController } from '../middleware/index.js';
6
+ import type { UserService } from '../../core/service/UserService.ts';
7
+ import { MiddlewareController } from '../middleware/index.ts';
8
8
  declare const LoginRequestRule: import("@eggjs/typebox-validate/typebox").TObject<{
9
9
  hostname: import("@eggjs/typebox-validate/typebox").TOptional<import("@eggjs/typebox-validate/typebox").TString>;
10
10
  }>;
@@ -17,10 +17,10 @@ import { ForbiddenError, NotFoundError } from 'egg-errors';
17
17
  import { createHash } from 'node:crypto';
18
18
  import base64url from 'base64url';
19
19
  import { generateAuthenticationOptions, generateRegistrationOptions, verifyAuthenticationResponse, verifyRegistrationResponse, } from '@simplewebauthn/server';
20
- import { LoginResultCode, WanStatusCode } from '../../common/enum/User.js';
21
- import { MiddlewareController } from '../middleware/index.js';
22
- import { decryptRSA, genRSAKeys } from '../../common/CryptoUtil.js';
23
- import { getBrowserTypeForWebauthn } from '../../common/UserUtil.js';
20
+ import { LoginResultCode, WanStatusCode } from "../../common/enum/User.js";
21
+ import { MiddlewareController } from "../middleware/index.js";
22
+ import { decryptRSA, genRSAKeys } from "../../common/CryptoUtil.js";
23
+ import { getBrowserTypeForWebauthn } from "../../common/UserUtil.js";
24
24
  const LoginRequestRule = Type.Object({
25
25
  // cli 所在机器的 hostname,最新版本 npm cli 已经不会上报 hostname
26
26
  hostname: Type.Optional(Type.String({ minLength: 1, maxLength: 100 })),
@@ -1,5 +1,5 @@
1
- import { Binary as BinaryEntity } from '../core/entity/Binary.js';
2
- import { AbstractRepository } from './AbstractRepository.js';
1
+ import { Binary as BinaryEntity } from '../core/entity/Binary.ts';
2
+ import { AbstractRepository } from './AbstractRepository.ts';
3
3
  export declare class BinaryRepository extends AbstractRepository {
4
4
  private readonly Binary;
5
5
  saveBinary(binary: BinaryEntity): Promise<void>;
@@ -8,9 +8,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { AccessLevel, Inject, SingletonProto } from '@eggjs/tegg';
11
- import { ModelConvertor } from './util/ModelConvertor.js';
12
- import { Binary as BinaryEntity } from '../core/entity/Binary.js';
13
- import { AbstractRepository } from './AbstractRepository.js';
11
+ import { ModelConvertor } from "./util/ModelConvertor.js";
12
+ import { Binary as BinaryEntity } from "../core/entity/Binary.js";
13
+ import { AbstractRepository } from "./AbstractRepository.js";
14
14
  let BinaryRepository = class BinaryRepository extends AbstractRepository {
15
15
  async saveBinary(binary) {
16
16
  if (binary.id) {
@@ -1,6 +1,6 @@
1
- import type { Change as ChangeModel } from './model/Change.js';
2
- import type { Change as ChangeEntity } from '../core/entity/Change.js';
3
- import { AbstractRepository } from './AbstractRepository.js';
1
+ import type { Change as ChangeModel } from './model/Change.ts';
2
+ import type { Change as ChangeEntity } from '../core/entity/Change.ts';
3
+ import { AbstractRepository } from './AbstractRepository.ts';
4
4
  export declare class ChangeRepository extends AbstractRepository {
5
5
  private readonly Change;
6
6
  addChange(change: ChangeEntity): Promise<void>;
@@ -8,8 +8,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { AccessLevel, Inject, SingletonProto } from '@eggjs/tegg';
11
- import { ModelConvertor } from './util/ModelConvertor.js';
12
- import { AbstractRepository } from './AbstractRepository.js';
11
+ import { ModelConvertor } from "./util/ModelConvertor.js";
12
+ import { AbstractRepository } from "./AbstractRepository.js";
13
13
  let ChangeRepository = class ChangeRepository extends AbstractRepository {
14
14
  async addChange(change) {
15
15
  await ModelConvertor.convertEntityToModel(change, this.Change);
@@ -1,5 +1,5 @@
1
- import type { PackageJSONType } from './PackageRepository.js';
2
- import type { Dist } from '../core/entity/Dist.js';
1
+ import type { PackageJSONType } from './PackageRepository.ts';
2
+ import type { Dist } from '../core/entity/Dist.ts';
3
3
  export declare class DistRepository {
4
4
  private readonly packageRepository;
5
5
  private readonly nfsAdapter;
@@ -1,5 +1,5 @@
1
- import { Hook } from '../core/entity/Hook.js';
2
- import type { HookType } from '../common/enum/Hook.js';
1
+ import { Hook } from '../core/entity/Hook.ts';
2
+ import type { HookType } from '../common/enum/Hook.ts';
3
3
  export interface UpdateHookCommand {
4
4
  hookId: string;
5
5
  endpoint: string;
@@ -8,8 +8,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { AccessLevel, Inject, SingletonProto } from '@eggjs/tegg';
11
- import { Hook } from '../core/entity/Hook.js';
12
- import { ModelConvertor } from './util/ModelConvertor.js';
11
+ import { Hook } from "../core/entity/Hook.js";
12
+ import { ModelConvertor } from "./util/ModelConvertor.js";
13
13
  let HookRepository = class HookRepository {
14
14
  async saveHook(hook) {
15
15
  if (hook.id) {
@@ -1,11 +1,11 @@
1
- import { Package as PackageEntity } from '../core/entity/Package.js';
2
- import { PackageVersion as PackageVersionEntity } from '../core/entity/PackageVersion.js';
3
- import type { PackageVersionManifest as PackageVersionManifestEntity } from '../core/entity/PackageVersionManifest.js';
4
- import type { PackageVersionManifest as PackageVersionManifestModel } from './model/PackageVersionManifest.js';
5
- import { PackageTag as PackageTagEntity } from '../core/entity/PackageTag.js';
6
- import { User as UserEntity } from '../core/entity/User.js';
7
- import { AbstractRepository } from './AbstractRepository.js';
8
- import type { BugVersionPackages } from '../core/entity/BugVersion.js';
1
+ import { Package as PackageEntity } from '../core/entity/Package.ts';
2
+ import { PackageVersion as PackageVersionEntity } from '../core/entity/PackageVersion.ts';
3
+ import type { PackageVersionManifest as PackageVersionManifestEntity } from '../core/entity/PackageVersionManifest.ts';
4
+ import type { PackageVersionManifest as PackageVersionManifestModel } from './model/PackageVersionManifest.ts';
5
+ import { PackageTag as PackageTagEntity } from '../core/entity/PackageTag.ts';
6
+ import { User as UserEntity } from '../core/entity/User.ts';
7
+ import { AbstractRepository } from './AbstractRepository.ts';
8
+ import type { BugVersionPackages } from '../core/entity/BugVersion.ts';
9
9
  export type PackageManifestType = Pick<PackageJSONType, PackageJSONPickKey> & {
10
10
  _id: string;
11
11
  _rev: string;
@@ -14,13 +14,13 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
14
14
  };
15
15
  var _PackageRepository_instances, _PackageRepository_convertPackageModelToEntity;
16
16
  import { AccessLevel, Inject, SingletonProto } from '@eggjs/tegg';
17
- import { Package as PackageEntity } from '../core/entity/Package.js';
18
- import { ModelConvertor } from './util/ModelConvertor.js';
19
- import { PackageVersion as PackageVersionEntity } from '../core/entity/PackageVersion.js';
20
- import { Dist as DistEntity } from '../core/entity/Dist.js';
21
- import { PackageTag as PackageTagEntity } from '../core/entity/PackageTag.js';
22
- import { User as UserEntity } from '../core/entity/User.js';
23
- import { AbstractRepository } from './AbstractRepository.js';
17
+ import { Package as PackageEntity } from "../core/entity/Package.js";
18
+ import { ModelConvertor } from "./util/ModelConvertor.js";
19
+ import { PackageVersion as PackageVersionEntity } from "../core/entity/PackageVersion.js";
20
+ import { Dist as DistEntity } from "../core/entity/Dist.js";
21
+ import { PackageTag as PackageTagEntity } from "../core/entity/PackageTag.js";
22
+ import { User as UserEntity } from "../core/entity/User.js";
23
+ import { AbstractRepository } from "./AbstractRepository.js";
24
24
  let PackageRepository = class PackageRepository extends AbstractRepository {
25
25
  constructor() {
26
26
  super(...arguments);
@@ -1,6 +1,6 @@
1
- import type { PackageVersionBlock as PackageVersionBlockModel } from './model/PackageVersionBlock.js';
2
- import { PackageVersionBlock as PackageVersionBlockEntity } from '../core/entity/PackageVersionBlock.js';
3
- import { AbstractRepository } from './AbstractRepository.js';
1
+ import type { PackageVersionBlock as PackageVersionBlockModel } from './model/PackageVersionBlock.ts';
2
+ import { PackageVersionBlock as PackageVersionBlockEntity } from '../core/entity/PackageVersionBlock.ts';
3
+ import { AbstractRepository } from './AbstractRepository.ts';
4
4
  export declare class PackageVersionBlockRepository extends AbstractRepository {
5
5
  private readonly PackageVersionBlock;
6
6
  savePackageVersionBlock(block: PackageVersionBlockEntity): Promise<void>;
@@ -8,9 +8,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { AccessLevel, Inject, SingletonProto } from '@eggjs/tegg';
11
- import { ModelConvertor } from './util/ModelConvertor.js';
12
- import { PackageVersionBlock as PackageVersionBlockEntity } from '../core/entity/PackageVersionBlock.js';
13
- import { AbstractRepository } from './AbstractRepository.js';
11
+ import { ModelConvertor } from "./util/ModelConvertor.js";
12
+ import { PackageVersionBlock as PackageVersionBlockEntity } from "../core/entity/PackageVersionBlock.js";
13
+ import { AbstractRepository } from "./AbstractRepository.js";
14
14
  let PackageVersionBlockRepository = class PackageVersionBlockRepository extends AbstractRepository {
15
15
  async savePackageVersionBlock(block) {
16
16
  if (block.id) {
@@ -1,5 +1,5 @@
1
- import { AbstractRepository } from './AbstractRepository.js';
2
- import type { PackageVersionDownload as PackageVersionDownloadModel } from './model/PackageVersionDownload.js';
1
+ import { AbstractRepository } from './AbstractRepository.ts';
2
+ import type { PackageVersionDownload as PackageVersionDownloadModel } from './model/PackageVersionDownload.ts';
3
3
  export declare class PackageVersionDownloadRepository extends AbstractRepository {
4
4
  private readonly PackageVersionDownload;
5
5
  plus(packageId: string, version: string, counter: number): Promise<void>;
@@ -8,7 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { AccessLevel, Inject, SingletonProto } from '@eggjs/tegg';
11
- import { AbstractRepository } from './AbstractRepository.js';
11
+ import { AbstractRepository } from "./AbstractRepository.js";
12
12
  let PackageVersionDownloadRepository = class PackageVersionDownloadRepository extends AbstractRepository {
13
13
  async plus(packageId, version, counter) {
14
14
  const now = new Date();
@@ -1,5 +1,5 @@
1
- import { PackageVersionFile as PackageVersionFileEntity } from '../core/entity/PackageVersionFile.js';
2
- import { AbstractRepository } from './AbstractRepository.js';
1
+ import { PackageVersionFile as PackageVersionFileEntity } from '../core/entity/PackageVersionFile.ts';
2
+ import { AbstractRepository } from './AbstractRepository.ts';
3
3
  export declare class PackageVersionFileRepository extends AbstractRepository {
4
4
  private readonly PackageVersionFile;
5
5
  private readonly Dist;
@@ -8,10 +8,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { AccessLevel, Inject, SingletonProto } from '@eggjs/tegg';
11
- import { ModelConvertor } from './util/ModelConvertor.js';
12
- import { Dist as DistEntity } from '../core/entity/Dist.js';
13
- import { PackageVersionFile as PackageVersionFileEntity } from '../core/entity/PackageVersionFile.js';
14
- import { AbstractRepository } from './AbstractRepository.js';
11
+ import { ModelConvertor } from "./util/ModelConvertor.js";
12
+ import { Dist as DistEntity } from "../core/entity/Dist.js";
13
+ import { PackageVersionFile as PackageVersionFileEntity } from "../core/entity/PackageVersionFile.js";
14
+ import { AbstractRepository } from "./AbstractRepository.js";
15
15
  let PackageVersionFileRepository = class PackageVersionFileRepository extends AbstractRepository {
16
16
  async createPackageVersionFile(file) {
17
17
  await this.PackageVersionFile.transaction(async (transaction) => {
@@ -1,6 +1,6 @@
1
- import type { PaddingSemVer } from '../core/entity/PaddingSemVer.js';
2
- import { PackageVersion } from '../core/entity/PackageVersion.js';
3
- import type { SqlRange } from '../core/entity/SqlRange.js';
1
+ import type { PaddingSemVer } from '../core/entity/PaddingSemVer.ts';
2
+ import { PackageVersion } from '../core/entity/PackageVersion.ts';
3
+ import type { SqlRange } from '../core/entity/SqlRange.ts';
4
4
  export declare class PackageVersionRepository {
5
5
  private readonly Package;
6
6
  private readonly PackageVersion;
@@ -8,8 +8,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { AccessLevel, Inject, SingletonProto } from '@eggjs/tegg';
11
- import { PackageVersion } from '../core/entity/PackageVersion.js';
12
- import { ModelConvertor } from './util/ModelConvertor.js';
11
+ import { PackageVersion } from "../core/entity/PackageVersion.js";
12
+ import { ModelConvertor } from "./util/ModelConvertor.js";
13
13
  let PackageVersionRepository = class PackageVersionRepository {
14
14
  async findHaveNotPaddingVersion(id) {
15
15
  if (!id) {
@@ -1,8 +1,8 @@
1
- import type { ProxyCache as ProxyModeCachedFilesModel } from './model/ProxyCache.js';
2
- import { ProxyCache as ProxyCacheEntity } from '../core/entity/ProxyCache.js';
3
- import { AbstractRepository } from './AbstractRepository.js';
4
- import type { DIST_NAMES } from '../core/entity/Package.js';
5
- import { type PageOptions, type PageResult } from '../core/util/EntityUtil.js';
1
+ import type { ProxyCache as ProxyModeCachedFilesModel } from './model/ProxyCache.ts';
2
+ import { ProxyCache as ProxyCacheEntity } from '../core/entity/ProxyCache.ts';
3
+ import { AbstractRepository } from './AbstractRepository.ts';
4
+ import type { DIST_NAMES } from '../core/entity/Package.ts';
5
+ import { type PageOptions, type PageResult } from '../core/util/EntityUtil.ts';
6
6
  export declare class ProxyCacheRepository extends AbstractRepository {
7
7
  private readonly ProxyCache;
8
8
  saveProxyCache(proxyCacheEntity: ProxyCacheEntity): Promise<ProxyModeCachedFilesModel>;
@@ -8,10 +8,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { AccessLevel, Inject, SingletonProto } from '@eggjs/tegg';
11
- import { ModelConvertor } from './util/ModelConvertor.js';
12
- import { ProxyCache as ProxyCacheEntity } from '../core/entity/ProxyCache.js';
13
- import { AbstractRepository } from './AbstractRepository.js';
14
- import { EntityUtil, } from '../core/util/EntityUtil.js';
11
+ import { ModelConvertor } from "./util/ModelConvertor.js";
12
+ import { ProxyCache as ProxyCacheEntity } from "../core/entity/ProxyCache.js";
13
+ import { AbstractRepository } from "./AbstractRepository.js";
14
+ import { EntityUtil, } from "../core/util/EntityUtil.js";
15
15
  let ProxyCacheRepository = class ProxyCacheRepository extends AbstractRepository {
16
16
  async saveProxyCache(proxyCacheEntity) {
17
17
  let model = proxyCacheEntity.version
@@ -1,7 +1,7 @@
1
- import { Registry as RegistryEntity } from '../core/entity/Registry.js';
2
- import { AbstractRepository } from './AbstractRepository.js';
3
- import type { Registry as RegistryModel } from './model/Registry.js';
4
- import { type PageOptions, type PageResult } from '../core/util/EntityUtil.js';
1
+ import { Registry as RegistryEntity } from '../core/entity/Registry.ts';
2
+ import { AbstractRepository } from './AbstractRepository.ts';
3
+ import type { Registry as RegistryModel } from './model/Registry.ts';
4
+ import { type PageOptions, type PageResult } from '../core/util/EntityUtil.ts';
5
5
  export declare class RegistryRepository extends AbstractRepository {
6
6
  private readonly Registry;
7
7
  listRegistries(page: PageOptions): Promise<PageResult<RegistryEntity>>;
@@ -8,10 +8,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { AccessLevel, Inject, SingletonProto } from '@eggjs/tegg';
11
- import { ModelConvertor } from './util/ModelConvertor.js';
12
- import { Registry as RegistryEntity } from '../core/entity/Registry.js';
13
- import { AbstractRepository } from './AbstractRepository.js';
14
- import { EntityUtil, } from '../core/util/EntityUtil.js';
11
+ import { ModelConvertor } from "./util/ModelConvertor.js";
12
+ import { Registry as RegistryEntity } from "../core/entity/Registry.js";
13
+ import { AbstractRepository } from "./AbstractRepository.js";
14
+ import { EntityUtil, } from "../core/util/EntityUtil.js";
15
15
  let RegistryRepository = class RegistryRepository extends AbstractRepository {
16
16
  async listRegistries(page) {
17
17
  const { offset, limit } = EntityUtil.convertPageOptionsToLimitOption(page);
@@ -1,7 +1,7 @@
1
- import { AbstractRepository } from './AbstractRepository.js';
2
- import type { Scope as ScopeModel } from './model/Scope.js';
3
- import { Scope } from '../core/entity/Scope.js';
4
- import { type PageOptions, type PageResult } from '../core/util/EntityUtil.js';
1
+ import { AbstractRepository } from './AbstractRepository.ts';
2
+ import type { Scope as ScopeModel } from './model/Scope.ts';
3
+ import { Scope } from '../core/entity/Scope.ts';
4
+ import { type PageOptions, type PageResult } from '../core/util/EntityUtil.ts';
5
5
  export declare class ScopeRepository extends AbstractRepository {
6
6
  private readonly Scope;
7
7
  countByRegistryId(registryId: string): Promise<number>;
@@ -8,10 +8,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { AccessLevel, Inject, SingletonProto } from '@eggjs/tegg';
11
- import { ModelConvertor } from './util/ModelConvertor.js';
12
- import { AbstractRepository } from './AbstractRepository.js';
13
- import { Scope } from '../core/entity/Scope.js';
14
- import { EntityUtil, } from '../core/util/EntityUtil.js';
11
+ import { ModelConvertor } from "./util/ModelConvertor.js";
12
+ import { AbstractRepository } from "./AbstractRepository.js";
13
+ import { Scope } from "../core/entity/Scope.js";
14
+ import { EntityUtil, } from "../core/util/EntityUtil.js";
15
15
  let ScopeRepository = class ScopeRepository extends AbstractRepository {
16
16
  async countByRegistryId(registryId) {
17
17
  return await this.Scope.find({ registryId }).count();
@@ -1,5 +1,5 @@
1
1
  import type { estypes } from '@elastic/elasticsearch';
2
- import type { AuthorType, CnpmcorePatchInfo, PackageManifestType } from './PackageRepository.js';
2
+ import type { AuthorType, CnpmcorePatchInfo, PackageManifestType } from './PackageRepository.ts';
3
3
  export type SearchJSONPickKey = '_rev' | 'name' | 'description' | 'keywords' | 'license' | 'maintainers' | 'dist-tags' | '_source_registry_name';
4
4
  export type SearchMappingType = Pick<PackageManifestType, SearchJSONPickKey> & CnpmcorePatchInfo & {
5
5
  scope: string;