@push.rocks/smartregistry 1.1.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 (52) hide show
  1. package/dist_ts/00_commitinfo_data.d.ts +8 -0
  2. package/dist_ts/00_commitinfo_data.js +9 -0
  3. package/dist_ts/classes.smartregistry.d.ts +45 -0
  4. package/dist_ts/classes.smartregistry.js +113 -0
  5. package/dist_ts/core/classes.authmanager.d.ts +108 -0
  6. package/dist_ts/core/classes.authmanager.js +315 -0
  7. package/dist_ts/core/classes.baseregistry.d.ts +28 -0
  8. package/dist_ts/core/classes.baseregistry.js +6 -0
  9. package/dist_ts/core/classes.registrystorage.d.ts +109 -0
  10. package/dist_ts/core/classes.registrystorage.js +226 -0
  11. package/dist_ts/core/index.d.ts +7 -0
  12. package/dist_ts/core/index.js +10 -0
  13. package/dist_ts/core/interfaces.core.d.ts +142 -0
  14. package/dist_ts/core/interfaces.core.js +5 -0
  15. package/dist_ts/index.d.ts +8 -0
  16. package/dist_ts/index.js +13 -0
  17. package/dist_ts/npm/classes.npmregistry.d.ts +36 -0
  18. package/dist_ts/npm/classes.npmregistry.js +717 -0
  19. package/dist_ts/npm/index.d.ts +5 -0
  20. package/dist_ts/npm/index.js +6 -0
  21. package/dist_ts/npm/interfaces.npm.d.ts +245 -0
  22. package/dist_ts/npm/interfaces.npm.js +6 -0
  23. package/dist_ts/oci/classes.ociregistry.d.ts +43 -0
  24. package/dist_ts/oci/classes.ociregistry.js +565 -0
  25. package/dist_ts/oci/index.d.ts +5 -0
  26. package/dist_ts/oci/index.js +6 -0
  27. package/dist_ts/oci/interfaces.oci.d.ts +103 -0
  28. package/dist_ts/oci/interfaces.oci.js +5 -0
  29. package/dist_ts/paths.d.ts +1 -0
  30. package/dist_ts/paths.js +3 -0
  31. package/dist_ts/plugins.d.ts +6 -0
  32. package/dist_ts/plugins.js +9 -0
  33. package/npmextra.json +18 -0
  34. package/package.json +49 -0
  35. package/readme.hints.md +3 -0
  36. package/readme.md +486 -0
  37. package/ts/00_commitinfo_data.ts +8 -0
  38. package/ts/classes.smartregistry.ts +129 -0
  39. package/ts/core/classes.authmanager.ts +388 -0
  40. package/ts/core/classes.baseregistry.ts +36 -0
  41. package/ts/core/classes.registrystorage.ts +270 -0
  42. package/ts/core/index.ts +11 -0
  43. package/ts/core/interfaces.core.ts +159 -0
  44. package/ts/index.ts +16 -0
  45. package/ts/npm/classes.npmregistry.ts +890 -0
  46. package/ts/npm/index.ts +6 -0
  47. package/ts/npm/interfaces.npm.ts +263 -0
  48. package/ts/oci/classes.ociregistry.ts +734 -0
  49. package/ts/oci/index.ts +6 -0
  50. package/ts/oci/interfaces.oci.ts +101 -0
  51. package/ts/paths.ts +5 -0
  52. package/ts/plugins.ts +11 -0
@@ -0,0 +1,6 @@
1
+ /**
2
+ * NPM Registry module exports
3
+ */
4
+
5
+ export { NpmRegistry } from './classes.npmregistry.js';
6
+ export * from './interfaces.npm.js';
@@ -0,0 +1,263 @@
1
+ /**
2
+ * NPM Registry interfaces and types
3
+ * Based on npm registry API specification
4
+ */
5
+
6
+ /**
7
+ * NPM package version metadata
8
+ */
9
+ export interface INpmVersion {
10
+ name: string;
11
+ version: string;
12
+ description?: string;
13
+ main?: string;
14
+ dependencies?: Record<string, string>;
15
+ devDependencies?: Record<string, string>;
16
+ peerDependencies?: Record<string, string>;
17
+ optionalDependencies?: Record<string, string>;
18
+ bundleDependencies?: string[];
19
+ bin?: Record<string, string> | string;
20
+ scripts?: Record<string, string>;
21
+ engines?: Record<string, string>;
22
+ keywords?: string[];
23
+ author?: INpmPerson | string;
24
+ maintainers?: INpmPerson[];
25
+ contributors?: INpmPerson[];
26
+ license?: string;
27
+ repository?: INpmRepository;
28
+ bugs?: string | { url?: string; email?: string };
29
+ homepage?: string;
30
+ readme?: string;
31
+ dist: INpmDist;
32
+ _id: string;
33
+ _nodeVersion?: string;
34
+ _npmVersion?: string;
35
+ _npmUser?: INpmPerson;
36
+ [key: string]: any; // Allow additional fields
37
+ }
38
+
39
+ /**
40
+ * Distribution information for a version
41
+ */
42
+ export interface INpmDist {
43
+ /** URL to the tarball */
44
+ tarball: string;
45
+ /** SHA-1 hash */
46
+ shasum: string;
47
+ /** Subresource Integrity hash (SHA-512) */
48
+ integrity?: string;
49
+ /** Number of files in the package */
50
+ fileCount?: number;
51
+ /** Total size when unpacked */
52
+ unpackedSize?: number;
53
+ /** PGP signature */
54
+ 'npm-signature'?: string;
55
+ }
56
+
57
+ /**
58
+ * Person (author, maintainer, contributor)
59
+ */
60
+ export interface INpmPerson {
61
+ name: string;
62
+ email?: string;
63
+ url?: string;
64
+ }
65
+
66
+ /**
67
+ * Repository information
68
+ */
69
+ export interface INpmRepository {
70
+ type: string;
71
+ url: string;
72
+ directory?: string;
73
+ }
74
+
75
+ /**
76
+ * Packument (package document) - the full package metadata
77
+ */
78
+ export interface IPackument {
79
+ _id: string;
80
+ _rev?: string;
81
+ name: string;
82
+ description?: string;
83
+ 'dist-tags': Record<string, string>;
84
+ versions: Record<string, INpmVersion>;
85
+ time?: Record<string, string>; // created, modified, and version timestamps
86
+ maintainers?: INpmPerson[];
87
+ author?: INpmPerson | string;
88
+ repository?: INpmRepository;
89
+ readme?: string;
90
+ readmeFilename?: string;
91
+ homepage?: string;
92
+ keywords?: string[];
93
+ bugs?: string | { url?: string; email?: string };
94
+ license?: string;
95
+ users?: Record<string, boolean>; // Users who starred the package
96
+ [key: string]: any;
97
+ }
98
+
99
+ /**
100
+ * Abbreviated packument for npm install
101
+ */
102
+ export interface IAbbreviatedPackument {
103
+ name: string;
104
+ 'modified': string;
105
+ 'dist-tags': Record<string, string>;
106
+ versions: Record<string, {
107
+ name: string;
108
+ version: string;
109
+ dist: INpmDist;
110
+ dependencies?: Record<string, string>;
111
+ [key: string]: any;
112
+ }>;
113
+ }
114
+
115
+ /**
116
+ * Publish request body
117
+ */
118
+ export interface IPublishRequest {
119
+ _id: string;
120
+ name: string;
121
+ description?: string;
122
+ 'dist-tags': Record<string, string>;
123
+ versions: Record<string, INpmVersion>;
124
+ _attachments: Record<string, {
125
+ content_type: string;
126
+ data: string; // Base64 encoded
127
+ length: number;
128
+ }>;
129
+ readme?: string;
130
+ maintainers?: INpmPerson[];
131
+ [key: string]: any;
132
+ }
133
+
134
+ /**
135
+ * Search result item
136
+ */
137
+ export interface ISearchResult {
138
+ package: {
139
+ name: string;
140
+ version: string;
141
+ description?: string;
142
+ keywords?: string[];
143
+ date?: string;
144
+ links?: {
145
+ npm?: string;
146
+ homepage?: string;
147
+ repository?: string;
148
+ bugs?: string;
149
+ };
150
+ author?: INpmPerson;
151
+ publisher?: INpmPerson;
152
+ maintainers?: INpmPerson[];
153
+ };
154
+ score: {
155
+ final: number;
156
+ detail: {
157
+ quality: number;
158
+ popularity: number;
159
+ maintenance: number;
160
+ };
161
+ };
162
+ searchScore: number;
163
+ flags?: {
164
+ unstable?: boolean;
165
+ insecure?: boolean;
166
+ };
167
+ }
168
+
169
+ /**
170
+ * Search response
171
+ */
172
+ export interface ISearchResponse {
173
+ objects: ISearchResult[];
174
+ total: number;
175
+ time: string;
176
+ }
177
+
178
+ /**
179
+ * NPM token information
180
+ */
181
+ export interface INpmToken {
182
+ token: string; // UUID
183
+ key: string; // SHA-512 hash for identification
184
+ cidr_whitelist?: string[];
185
+ readonly: boolean;
186
+ created: string; // ISO-8601
187
+ updated: string; // ISO-8601
188
+ }
189
+
190
+ /**
191
+ * Token creation request
192
+ */
193
+ export interface ITokenCreateRequest {
194
+ password: string;
195
+ readonly?: boolean;
196
+ cidr_whitelist?: string[];
197
+ }
198
+
199
+ /**
200
+ * Token list response
201
+ */
202
+ export interface ITokenListResponse {
203
+ objects: Array<{
204
+ token: string; // Masked
205
+ key: string;
206
+ cidr_whitelist?: string[];
207
+ readonly: boolean;
208
+ created: string;
209
+ updated: string;
210
+ }>;
211
+ total: number;
212
+ urls: {
213
+ next?: string;
214
+ };
215
+ }
216
+
217
+ /**
218
+ * User authentication request
219
+ */
220
+ export interface IUserAuthRequest {
221
+ name: string;
222
+ password: string;
223
+ }
224
+
225
+ /**
226
+ * User profile
227
+ */
228
+ export interface IUserProfile {
229
+ _id: string;
230
+ name: string;
231
+ email?: string;
232
+ type: 'user';
233
+ roles?: string[];
234
+ date: string; // ISO-8601
235
+ }
236
+
237
+ /**
238
+ * Dist-tag operations
239
+ */
240
+ export interface IDistTagUpdate {
241
+ [tag: string]: string; // tag -> version
242
+ }
243
+
244
+ /**
245
+ * NPM error codes
246
+ */
247
+ export type TNpmErrorCode =
248
+ | 'ENOTFOUND'
249
+ | 'E404'
250
+ | 'EPUBLISHCONFLICT'
251
+ | 'EUNAUTHORIZED'
252
+ | 'EFORBIDDEN'
253
+ | 'EINTERNAL'
254
+ | 'EBADREQUEST';
255
+
256
+ /**
257
+ * NPM error response
258
+ */
259
+ export interface INpmError {
260
+ error: string;
261
+ reason?: string;
262
+ statusCode?: number;
263
+ }