@actions/cache 3.2.4 → 4.0.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 (53) hide show
  1. package/README.md +14 -2
  2. package/lib/cache.d.ts +2 -2
  3. package/lib/cache.js +222 -7
  4. package/lib/cache.js.map +1 -1
  5. package/lib/generated/google/protobuf/timestamp.d.ts +158 -0
  6. package/lib/generated/google/protobuf/timestamp.js +136 -0
  7. package/lib/generated/google/protobuf/timestamp.js.map +1 -0
  8. package/lib/generated/google/protobuf/wrappers.d.ts +307 -0
  9. package/lib/generated/google/protobuf/wrappers.js +614 -0
  10. package/lib/generated/google/protobuf/wrappers.js.map +1 -0
  11. package/lib/generated/results/api/v1/cache.d.ts +378 -0
  12. package/lib/generated/results/api/v1/cache.js +730 -0
  13. package/lib/generated/results/api/v1/cache.js.map +1 -0
  14. package/lib/generated/results/api/v1/cache.twirp.d.ts +53 -0
  15. package/lib/generated/results/api/v1/cache.twirp.js +602 -0
  16. package/lib/generated/results/api/v1/cache.twirp.js.map +1 -0
  17. package/lib/generated/results/entities/v1/cacheentry.d.ts +71 -0
  18. package/lib/generated/results/entities/v1/cacheentry.js +106 -0
  19. package/lib/generated/results/entities/v1/cacheentry.js.map +1 -0
  20. package/lib/generated/results/entities/v1/cachemetadata.d.ts +35 -0
  21. package/lib/generated/results/entities/v1/cachemetadata.js +64 -0
  22. package/lib/generated/results/entities/v1/cachemetadata.js.map +1 -0
  23. package/lib/generated/results/entities/v1/cachescope.d.ts +34 -0
  24. package/lib/generated/results/entities/v1/cachescope.js +63 -0
  25. package/lib/generated/results/entities/v1/cachescope.js.map +1 -0
  26. package/lib/internal/cacheHttpClient.d.ts +1 -3
  27. package/lib/internal/cacheHttpClient.js +30 -36
  28. package/lib/internal/cacheHttpClient.js.map +1 -1
  29. package/lib/internal/cacheUtils.d.ts +2 -1
  30. package/lib/internal/cacheUtils.js +28 -10
  31. package/lib/internal/cacheUtils.js.map +1 -1
  32. package/lib/internal/config.d.ts +3 -0
  33. package/lib/internal/config.js +37 -0
  34. package/lib/internal/config.js.map +1 -0
  35. package/lib/internal/constants.d.ts +1 -0
  36. package/lib/internal/constants.js +2 -1
  37. package/lib/internal/constants.js.map +1 -1
  38. package/lib/internal/shared/cacheTwirpClient.d.ts +6 -0
  39. package/lib/internal/shared/cacheTwirpClient.js +160 -0
  40. package/lib/internal/shared/cacheTwirpClient.js.map +1 -0
  41. package/lib/internal/shared/errors.d.ts +22 -0
  42. package/lib/internal/shared/errors.js +70 -0
  43. package/lib/internal/shared/errors.js.map +1 -0
  44. package/lib/internal/shared/user-agent.d.ts +4 -0
  45. package/lib/internal/shared/user-agent.js +13 -0
  46. package/lib/internal/shared/user-agent.js.map +1 -0
  47. package/lib/internal/uploadUtils.d.ts +60 -0
  48. package/lib/internal/uploadUtils.js +167 -0
  49. package/lib/internal/uploadUtils.js.map +1 -0
  50. package/lib/options.d.ts +12 -0
  51. package/lib/options.js +17 -0
  52. package/lib/options.js.map +1 -1
  53. package/package.json +5 -5
@@ -0,0 +1,378 @@
1
+ import { ServiceType } from "@protobuf-ts/runtime-rpc";
2
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
3
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
4
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
5
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
6
+ import type { PartialMessage } from "@protobuf-ts/runtime";
7
+ import { MessageType } from "@protobuf-ts/runtime";
8
+ import { CacheEntry } from "../../entities/v1/cacheentry";
9
+ import { CacheMetadata } from "../../entities/v1/cachemetadata";
10
+ /**
11
+ * @generated from protobuf message github.actions.results.api.v1.CreateCacheEntryRequest
12
+ */
13
+ export interface CreateCacheEntryRequest {
14
+ /**
15
+ * Scope and other metadata for the cache entry
16
+ *
17
+ * @generated from protobuf field: github.actions.results.entities.v1.CacheMetadata metadata = 1;
18
+ */
19
+ metadata?: CacheMetadata;
20
+ /**
21
+ * An explicit key for a cache entry
22
+ *
23
+ * @generated from protobuf field: string key = 2;
24
+ */
25
+ key: string;
26
+ /**
27
+ * Hash of the compression tool, runner OS and paths cached
28
+ *
29
+ * @generated from protobuf field: string version = 3;
30
+ */
31
+ version: string;
32
+ }
33
+ /**
34
+ * @generated from protobuf message github.actions.results.api.v1.CreateCacheEntryResponse
35
+ */
36
+ export interface CreateCacheEntryResponse {
37
+ /**
38
+ * @generated from protobuf field: bool ok = 1;
39
+ */
40
+ ok: boolean;
41
+ /**
42
+ * SAS URL to upload the cache archive
43
+ *
44
+ * @generated from protobuf field: string signed_upload_url = 2;
45
+ */
46
+ signedUploadUrl: string;
47
+ }
48
+ /**
49
+ * @generated from protobuf message github.actions.results.api.v1.FinalizeCacheEntryUploadRequest
50
+ */
51
+ export interface FinalizeCacheEntryUploadRequest {
52
+ /**
53
+ * Scope and other metadata for the cache entry
54
+ *
55
+ * @generated from protobuf field: github.actions.results.entities.v1.CacheMetadata metadata = 1;
56
+ */
57
+ metadata?: CacheMetadata;
58
+ /**
59
+ * An explicit key for a cache entry
60
+ *
61
+ * @generated from protobuf field: string key = 2;
62
+ */
63
+ key: string;
64
+ /**
65
+ * Size of the cache archive in Bytes
66
+ *
67
+ * @generated from protobuf field: int64 size_bytes = 3;
68
+ */
69
+ sizeBytes: string;
70
+ /**
71
+ * Hash of the compression tool, runner OS and paths cached
72
+ *
73
+ * @generated from protobuf field: string version = 4;
74
+ */
75
+ version: string;
76
+ }
77
+ /**
78
+ * @generated from protobuf message github.actions.results.api.v1.FinalizeCacheEntryUploadResponse
79
+ */
80
+ export interface FinalizeCacheEntryUploadResponse {
81
+ /**
82
+ * @generated from protobuf field: bool ok = 1;
83
+ */
84
+ ok: boolean;
85
+ /**
86
+ * Cache entry database ID
87
+ *
88
+ * @generated from protobuf field: int64 entry_id = 2;
89
+ */
90
+ entryId: string;
91
+ }
92
+ /**
93
+ * @generated from protobuf message github.actions.results.api.v1.GetCacheEntryDownloadURLRequest
94
+ */
95
+ export interface GetCacheEntryDownloadURLRequest {
96
+ /**
97
+ * Scope and other metadata for the cache entry
98
+ *
99
+ * @generated from protobuf field: github.actions.results.entities.v1.CacheMetadata metadata = 1;
100
+ */
101
+ metadata?: CacheMetadata;
102
+ /**
103
+ * An explicit key for a cache entry
104
+ *
105
+ * @generated from protobuf field: string key = 2;
106
+ */
107
+ key: string;
108
+ /**
109
+ * Restore keys used for prefix searching
110
+ *
111
+ * @generated from protobuf field: repeated string restore_keys = 3;
112
+ */
113
+ restoreKeys: string[];
114
+ /**
115
+ * Hash of the compression tool, runner OS and paths cached
116
+ *
117
+ * @generated from protobuf field: string version = 4;
118
+ */
119
+ version: string;
120
+ }
121
+ /**
122
+ * @generated from protobuf message github.actions.results.api.v1.GetCacheEntryDownloadURLResponse
123
+ */
124
+ export interface GetCacheEntryDownloadURLResponse {
125
+ /**
126
+ * @generated from protobuf field: bool ok = 1;
127
+ */
128
+ ok: boolean;
129
+ /**
130
+ * SAS URL to download the cache archive
131
+ *
132
+ * @generated from protobuf field: string signed_download_url = 2;
133
+ */
134
+ signedDownloadUrl: string;
135
+ /**
136
+ * Key or restore key that matches the lookup
137
+ *
138
+ * @generated from protobuf field: string matched_key = 3;
139
+ */
140
+ matchedKey: string;
141
+ }
142
+ /**
143
+ * @generated from protobuf message github.actions.results.api.v1.DeleteCacheEntryRequest
144
+ */
145
+ export interface DeleteCacheEntryRequest {
146
+ /**
147
+ * Scope and other metadata for the cache entry
148
+ *
149
+ * @generated from protobuf field: github.actions.results.entities.v1.CacheMetadata metadata = 1;
150
+ */
151
+ metadata?: CacheMetadata;
152
+ /**
153
+ * An explicit key for a cache entry
154
+ *
155
+ * @generated from protobuf field: string key = 2;
156
+ */
157
+ key: string;
158
+ }
159
+ /**
160
+ * @generated from protobuf message github.actions.results.api.v1.DeleteCacheEntryResponse
161
+ */
162
+ export interface DeleteCacheEntryResponse {
163
+ /**
164
+ * @generated from protobuf field: bool ok = 1;
165
+ */
166
+ ok: boolean;
167
+ /**
168
+ * Cache entry database ID
169
+ *
170
+ * @generated from protobuf field: int64 entry_id = 2;
171
+ */
172
+ entryId: string;
173
+ }
174
+ /**
175
+ * @generated from protobuf message github.actions.results.api.v1.ListCacheEntriesRequest
176
+ */
177
+ export interface ListCacheEntriesRequest {
178
+ /**
179
+ * Scope and other metadata for the cache entry
180
+ *
181
+ * @generated from protobuf field: github.actions.results.entities.v1.CacheMetadata metadata = 1;
182
+ */
183
+ metadata?: CacheMetadata;
184
+ /**
185
+ * An explicit key for a cache entry
186
+ *
187
+ * @generated from protobuf field: string key = 2;
188
+ */
189
+ key: string;
190
+ /**
191
+ * Restore keys used for prefix searching
192
+ *
193
+ * @generated from protobuf field: repeated string restore_keys = 3;
194
+ */
195
+ restoreKeys: string[];
196
+ }
197
+ /**
198
+ * @generated from protobuf message github.actions.results.api.v1.ListCacheEntriesResponse
199
+ */
200
+ export interface ListCacheEntriesResponse {
201
+ /**
202
+ * Cache entries in the defined scope
203
+ *
204
+ * @generated from protobuf field: repeated github.actions.results.entities.v1.CacheEntry entries = 1;
205
+ */
206
+ entries: CacheEntry[];
207
+ }
208
+ /**
209
+ * @generated from protobuf message github.actions.results.api.v1.LookupCacheEntryRequest
210
+ */
211
+ export interface LookupCacheEntryRequest {
212
+ /**
213
+ * Scope and other metadata for the cache entry
214
+ *
215
+ * @generated from protobuf field: github.actions.results.entities.v1.CacheMetadata metadata = 1;
216
+ */
217
+ metadata?: CacheMetadata;
218
+ /**
219
+ * An explicit key for a cache entry
220
+ *
221
+ * @generated from protobuf field: string key = 2;
222
+ */
223
+ key: string;
224
+ /**
225
+ * Restore keys used for prefix searching
226
+ *
227
+ * @generated from protobuf field: repeated string restore_keys = 3;
228
+ */
229
+ restoreKeys: string[];
230
+ /**
231
+ * Hash of the compression tool, runner OS and paths cached
232
+ *
233
+ * @generated from protobuf field: string version = 4;
234
+ */
235
+ version: string;
236
+ }
237
+ /**
238
+ * @generated from protobuf message github.actions.results.api.v1.LookupCacheEntryResponse
239
+ */
240
+ export interface LookupCacheEntryResponse {
241
+ /**
242
+ * Indicates whether the cache entry exists or not
243
+ *
244
+ * @generated from protobuf field: bool exists = 1;
245
+ */
246
+ exists: boolean;
247
+ /**
248
+ * Matched cache entry metadata
249
+ *
250
+ * @generated from protobuf field: github.actions.results.entities.v1.CacheEntry entry = 2;
251
+ */
252
+ entry?: CacheEntry;
253
+ }
254
+ declare class CreateCacheEntryRequest$Type extends MessageType<CreateCacheEntryRequest> {
255
+ constructor();
256
+ create(value?: PartialMessage<CreateCacheEntryRequest>): CreateCacheEntryRequest;
257
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateCacheEntryRequest): CreateCacheEntryRequest;
258
+ internalBinaryWrite(message: CreateCacheEntryRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
259
+ }
260
+ /**
261
+ * @generated MessageType for protobuf message github.actions.results.api.v1.CreateCacheEntryRequest
262
+ */
263
+ export declare const CreateCacheEntryRequest: CreateCacheEntryRequest$Type;
264
+ declare class CreateCacheEntryResponse$Type extends MessageType<CreateCacheEntryResponse> {
265
+ constructor();
266
+ create(value?: PartialMessage<CreateCacheEntryResponse>): CreateCacheEntryResponse;
267
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateCacheEntryResponse): CreateCacheEntryResponse;
268
+ internalBinaryWrite(message: CreateCacheEntryResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
269
+ }
270
+ /**
271
+ * @generated MessageType for protobuf message github.actions.results.api.v1.CreateCacheEntryResponse
272
+ */
273
+ export declare const CreateCacheEntryResponse: CreateCacheEntryResponse$Type;
274
+ declare class FinalizeCacheEntryUploadRequest$Type extends MessageType<FinalizeCacheEntryUploadRequest> {
275
+ constructor();
276
+ create(value?: PartialMessage<FinalizeCacheEntryUploadRequest>): FinalizeCacheEntryUploadRequest;
277
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FinalizeCacheEntryUploadRequest): FinalizeCacheEntryUploadRequest;
278
+ internalBinaryWrite(message: FinalizeCacheEntryUploadRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
279
+ }
280
+ /**
281
+ * @generated MessageType for protobuf message github.actions.results.api.v1.FinalizeCacheEntryUploadRequest
282
+ */
283
+ export declare const FinalizeCacheEntryUploadRequest: FinalizeCacheEntryUploadRequest$Type;
284
+ declare class FinalizeCacheEntryUploadResponse$Type extends MessageType<FinalizeCacheEntryUploadResponse> {
285
+ constructor();
286
+ create(value?: PartialMessage<FinalizeCacheEntryUploadResponse>): FinalizeCacheEntryUploadResponse;
287
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FinalizeCacheEntryUploadResponse): FinalizeCacheEntryUploadResponse;
288
+ internalBinaryWrite(message: FinalizeCacheEntryUploadResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
289
+ }
290
+ /**
291
+ * @generated MessageType for protobuf message github.actions.results.api.v1.FinalizeCacheEntryUploadResponse
292
+ */
293
+ export declare const FinalizeCacheEntryUploadResponse: FinalizeCacheEntryUploadResponse$Type;
294
+ declare class GetCacheEntryDownloadURLRequest$Type extends MessageType<GetCacheEntryDownloadURLRequest> {
295
+ constructor();
296
+ create(value?: PartialMessage<GetCacheEntryDownloadURLRequest>): GetCacheEntryDownloadURLRequest;
297
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetCacheEntryDownloadURLRequest): GetCacheEntryDownloadURLRequest;
298
+ internalBinaryWrite(message: GetCacheEntryDownloadURLRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
299
+ }
300
+ /**
301
+ * @generated MessageType for protobuf message github.actions.results.api.v1.GetCacheEntryDownloadURLRequest
302
+ */
303
+ export declare const GetCacheEntryDownloadURLRequest: GetCacheEntryDownloadURLRequest$Type;
304
+ declare class GetCacheEntryDownloadURLResponse$Type extends MessageType<GetCacheEntryDownloadURLResponse> {
305
+ constructor();
306
+ create(value?: PartialMessage<GetCacheEntryDownloadURLResponse>): GetCacheEntryDownloadURLResponse;
307
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetCacheEntryDownloadURLResponse): GetCacheEntryDownloadURLResponse;
308
+ internalBinaryWrite(message: GetCacheEntryDownloadURLResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
309
+ }
310
+ /**
311
+ * @generated MessageType for protobuf message github.actions.results.api.v1.GetCacheEntryDownloadURLResponse
312
+ */
313
+ export declare const GetCacheEntryDownloadURLResponse: GetCacheEntryDownloadURLResponse$Type;
314
+ declare class DeleteCacheEntryRequest$Type extends MessageType<DeleteCacheEntryRequest> {
315
+ constructor();
316
+ create(value?: PartialMessage<DeleteCacheEntryRequest>): DeleteCacheEntryRequest;
317
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteCacheEntryRequest): DeleteCacheEntryRequest;
318
+ internalBinaryWrite(message: DeleteCacheEntryRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
319
+ }
320
+ /**
321
+ * @generated MessageType for protobuf message github.actions.results.api.v1.DeleteCacheEntryRequest
322
+ */
323
+ export declare const DeleteCacheEntryRequest: DeleteCacheEntryRequest$Type;
324
+ declare class DeleteCacheEntryResponse$Type extends MessageType<DeleteCacheEntryResponse> {
325
+ constructor();
326
+ create(value?: PartialMessage<DeleteCacheEntryResponse>): DeleteCacheEntryResponse;
327
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteCacheEntryResponse): DeleteCacheEntryResponse;
328
+ internalBinaryWrite(message: DeleteCacheEntryResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
329
+ }
330
+ /**
331
+ * @generated MessageType for protobuf message github.actions.results.api.v1.DeleteCacheEntryResponse
332
+ */
333
+ export declare const DeleteCacheEntryResponse: DeleteCacheEntryResponse$Type;
334
+ declare class ListCacheEntriesRequest$Type extends MessageType<ListCacheEntriesRequest> {
335
+ constructor();
336
+ create(value?: PartialMessage<ListCacheEntriesRequest>): ListCacheEntriesRequest;
337
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListCacheEntriesRequest): ListCacheEntriesRequest;
338
+ internalBinaryWrite(message: ListCacheEntriesRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
339
+ }
340
+ /**
341
+ * @generated MessageType for protobuf message github.actions.results.api.v1.ListCacheEntriesRequest
342
+ */
343
+ export declare const ListCacheEntriesRequest: ListCacheEntriesRequest$Type;
344
+ declare class ListCacheEntriesResponse$Type extends MessageType<ListCacheEntriesResponse> {
345
+ constructor();
346
+ create(value?: PartialMessage<ListCacheEntriesResponse>): ListCacheEntriesResponse;
347
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListCacheEntriesResponse): ListCacheEntriesResponse;
348
+ internalBinaryWrite(message: ListCacheEntriesResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
349
+ }
350
+ /**
351
+ * @generated MessageType for protobuf message github.actions.results.api.v1.ListCacheEntriesResponse
352
+ */
353
+ export declare const ListCacheEntriesResponse: ListCacheEntriesResponse$Type;
354
+ declare class LookupCacheEntryRequest$Type extends MessageType<LookupCacheEntryRequest> {
355
+ constructor();
356
+ create(value?: PartialMessage<LookupCacheEntryRequest>): LookupCacheEntryRequest;
357
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: LookupCacheEntryRequest): LookupCacheEntryRequest;
358
+ internalBinaryWrite(message: LookupCacheEntryRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
359
+ }
360
+ /**
361
+ * @generated MessageType for protobuf message github.actions.results.api.v1.LookupCacheEntryRequest
362
+ */
363
+ export declare const LookupCacheEntryRequest: LookupCacheEntryRequest$Type;
364
+ declare class LookupCacheEntryResponse$Type extends MessageType<LookupCacheEntryResponse> {
365
+ constructor();
366
+ create(value?: PartialMessage<LookupCacheEntryResponse>): LookupCacheEntryResponse;
367
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: LookupCacheEntryResponse): LookupCacheEntryResponse;
368
+ internalBinaryWrite(message: LookupCacheEntryResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
369
+ }
370
+ /**
371
+ * @generated MessageType for protobuf message github.actions.results.api.v1.LookupCacheEntryResponse
372
+ */
373
+ export declare const LookupCacheEntryResponse: LookupCacheEntryResponse$Type;
374
+ /**
375
+ * @generated ServiceType for protobuf service github.actions.results.api.v1.CacheService
376
+ */
377
+ export declare const CacheService: ServiceType;
378
+ export {};