jfrog-workers 0.18.0 → 0.19.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 (2) hide show
  1. package/dist/index.d.ts +39 -2
  2. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -1,4 +1,41 @@
1
- import { AxiosInstance } from "axios";
1
+ import { AxiosInstance, AxiosRequestConfig } from "axios";
2
+ export interface ExtendedAxios {
3
+ /**
4
+ * Triggers an HTTP GET request and does not wait for the response (fire-and-forget).
5
+ * Note: completion is not guaranteed. If the target server ties request processing to the client connection, it may abort the work when the client disconnects.
6
+ */
7
+ getAndForget: <D = any, P = any>(url: string, config?: AxiosRequestConfig<D, P>) => void;
8
+ /**
9
+ * Triggers an HTTP PUT request and does not wait for the response (fire-and-forget).
10
+ * Note: completion is not guaranteed. If the target server ties request processing to the client connection, it may abort the work when the client disconnects.
11
+ */
12
+ putAndForget: <D = any, P = any>(url: string, data?: D, config?: AxiosRequestConfig<D, P>) => void;
13
+ /**
14
+ * Triggers an HTTP POST request and does not wait for the response (fire-and-forget).
15
+ * Note: completion is not guaranteed. If the target server ties request processing to the client connection, it may abort the work when the client disconnects.
16
+ */
17
+ postAndForget: <D = any, P = any>(url: string, data?: D, config?: AxiosRequestConfig<D, P>) => void;
18
+ /**
19
+ * Triggers an HTTP DELETE request and does not wait for the response (fire-and-forget).
20
+ * Note: completion is not guaranteed. If the target server ties request processing to the client connection, it may abort the work when the client disconnects.
21
+ */
22
+ deleteAndForget: <D = any, P = any>(url: string, config?: AxiosRequestConfig<D, P>) => void;
23
+ /**
24
+ * Triggers an HTTP HEAD request and does not wait for the response (fire-and-forget).
25
+ * Note: completion is not guaranteed. If the target server ties request processing to the client connection, it may abort the work when the client disconnects.
26
+ */
27
+ headAndForget: <D = any, P = any>(url: string, config?: AxiosRequestConfig<D, P>) => void;
28
+ /**
29
+ * Triggers an HTTP PATCH request and does not wait for the response (fire-and-forget).
30
+ * Note: completion is not guaranteed. If the target server ties request processing to the client connection, it may abort the work when the client disconnects.
31
+ */
32
+ patchAndForget: <D = any, P = any>(url: string, data?: D, config?: AxiosRequestConfig<D, P>) => void;
33
+ /**
34
+ * Triggers an HTTP REQUEST and does not wait for the response (fire-and-forget).
35
+ * Note: completion is not guaranteed. If the target server ties request processing to the client connection, it may abort the work when the client disconnects.
36
+ */
37
+ requestAndForget: <D = any, P = any>(config: AxiosRequestConfig<D, P>) => void;
38
+ }
2
39
  /**
3
40
  * Response returned by JFrog platform API
4
41
  */
@@ -73,7 +110,7 @@ export interface PlatformClients {
73
110
  /**
74
111
  * HTTP client (axios) to perform requests to the outside
75
112
  */
76
- axios: Pick<AxiosInstance, 'get' | 'put' | 'post' | 'delete' | 'head' | 'patch' | 'request'>;
113
+ axios: Pick<AxiosInstance, 'get' | 'put' | 'post' | 'delete' | 'head' | 'patch' | 'request'> & ExtendedAxios;
77
114
  }
78
115
  export interface PlatformSecrets {
79
116
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jfrog-workers",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "description": "JFrog workers interfaces",
5
5
  "homepage": "https://github.com/jfrog/workers-sample",
6
6
  "contributors": [
@@ -33,7 +33,7 @@
33
33
  "url": "git+https://github.com/jfrog/workers-sample.git"
34
34
  },
35
35
  "dependencies": {
36
- "axios": "1.19.0"
36
+ "axios": "1.20.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "typescript": "^7.0.2"