@datadog/pup-wasm 0.0.0 → 2.7.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.
- package/package.json +25 -4
- package/pup_wasm.d.ts +211 -0
- package/pup_wasm.js +1176 -0
- package/pup_wasm_bg.wasm +0 -0
- package/pup_wasm_bg.wasm.d.ts +52 -0
- package/README.md +0 -4
package/package.json
CHANGED
|
@@ -1,8 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datadog/pup-wasm",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Browser WebAssembly build of the Datadog pup CLI
|
|
3
|
+
"version": "2.7.0",
|
|
4
|
+
"description": "Browser WebAssembly build of the Datadog pup CLI",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
|
-
"repository": {
|
|
7
|
-
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/DataDog/pup.git"
|
|
9
|
+
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"main": "pup_wasm.js",
|
|
12
|
+
"module": "pup_wasm.js",
|
|
13
|
+
"types": "pup_wasm.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./pup_wasm.d.ts",
|
|
17
|
+
"import": "./pup_wasm.js",
|
|
18
|
+
"default": "./pup_wasm.js"
|
|
19
|
+
},
|
|
20
|
+
"./pup_wasm_bg.wasm": "./pup_wasm_bg.wasm",
|
|
21
|
+
"./package.json": "./package.json"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"pup_wasm.js",
|
|
25
|
+
"pup_wasm.d.ts",
|
|
26
|
+
"pup_wasm_bg.wasm",
|
|
27
|
+
"pup_wasm_bg.wasm.d.ts"
|
|
28
|
+
]
|
|
8
29
|
}
|
package/pup_wasm.d.ts
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
export class PupClient {
|
|
5
|
+
free(): void;
|
|
6
|
+
[Symbol.dispose](): void;
|
|
7
|
+
/**
|
|
8
|
+
* Get a single dashboard by ID.
|
|
9
|
+
*/
|
|
10
|
+
dashboards_get(dashboard_id: string): Promise<any>;
|
|
11
|
+
/**
|
|
12
|
+
* List all dashboards.
|
|
13
|
+
*/
|
|
14
|
+
dashboards_list(): Promise<any>;
|
|
15
|
+
/**
|
|
16
|
+
* Search events with a JSON body (v2 API).
|
|
17
|
+
*/
|
|
18
|
+
events_search(body_json: string): Promise<any>;
|
|
19
|
+
/**
|
|
20
|
+
* Get a single incident by ID.
|
|
21
|
+
*/
|
|
22
|
+
incidents_get(incident_id: string): Promise<any>;
|
|
23
|
+
/**
|
|
24
|
+
* List incidents.
|
|
25
|
+
*/
|
|
26
|
+
incidents_list(): Promise<any>;
|
|
27
|
+
/**
|
|
28
|
+
* Search logs with a JSON body (v2 API).
|
|
29
|
+
*/
|
|
30
|
+
logs_search(body_json: string): Promise<any>;
|
|
31
|
+
/**
|
|
32
|
+
* List metric names, optionally filtered.
|
|
33
|
+
*/
|
|
34
|
+
metrics_list(filter?: string | null): Promise<any>;
|
|
35
|
+
/**
|
|
36
|
+
* Query timeseries metrics.
|
|
37
|
+
*/
|
|
38
|
+
metrics_query(query: string, from: bigint, to: bigint): Promise<any>;
|
|
39
|
+
/**
|
|
40
|
+
* Create a monitor from a JSON body.
|
|
41
|
+
*/
|
|
42
|
+
monitors_create(body_json: string): Promise<any>;
|
|
43
|
+
/**
|
|
44
|
+
* Delete a monitor by ID.
|
|
45
|
+
*/
|
|
46
|
+
monitors_delete(monitor_id: bigint): Promise<any>;
|
|
47
|
+
/**
|
|
48
|
+
* Get a single monitor by ID.
|
|
49
|
+
*/
|
|
50
|
+
monitors_get(monitor_id: bigint): Promise<any>;
|
|
51
|
+
/**
|
|
52
|
+
* List monitors, optionally filtered by name and/or tags.
|
|
53
|
+
*/
|
|
54
|
+
monitors_list(name?: string | null, tags?: string | null, page_size?: bigint | null): Promise<any>;
|
|
55
|
+
/**
|
|
56
|
+
* Create a new PupClient from options.
|
|
57
|
+
*/
|
|
58
|
+
constructor(opts: PupClientOptions);
|
|
59
|
+
/**
|
|
60
|
+
* Perform a raw DELETE request.
|
|
61
|
+
*/
|
|
62
|
+
raw_delete(path: string): Promise<any>;
|
|
63
|
+
/**
|
|
64
|
+
* Perform a raw GET request to any Datadog API path.
|
|
65
|
+
*/
|
|
66
|
+
raw_get(path: string): Promise<any>;
|
|
67
|
+
/**
|
|
68
|
+
* Perform a raw PATCH request with a JSON body string.
|
|
69
|
+
*/
|
|
70
|
+
raw_patch(path: string, body_json: string): Promise<any>;
|
|
71
|
+
/**
|
|
72
|
+
* Perform a raw POST request with a JSON body string.
|
|
73
|
+
*/
|
|
74
|
+
raw_post(path: string, body_json: string): Promise<any>;
|
|
75
|
+
/**
|
|
76
|
+
* Perform a raw PUT request with a JSON body string.
|
|
77
|
+
*/
|
|
78
|
+
raw_put(path: string, body_json: string): Promise<any>;
|
|
79
|
+
/**
|
|
80
|
+
* Execute any `pup` command (reads, writes, `--jq`, `-o table`, `--file`,
|
|
81
|
+
* piped stdin) against this client's session or token configuration.
|
|
82
|
+
*/
|
|
83
|
+
run_cli(args: string[], stdin?: string | null, files_json?: string | null): Promise<any>;
|
|
84
|
+
/**
|
|
85
|
+
* Get a single SLO by ID.
|
|
86
|
+
*/
|
|
87
|
+
slos_get(slo_id: string): Promise<any>;
|
|
88
|
+
/**
|
|
89
|
+
* List all SLOs.
|
|
90
|
+
*/
|
|
91
|
+
slos_list(): Promise<any>;
|
|
92
|
+
/**
|
|
93
|
+
* Return the pup library version.
|
|
94
|
+
*/
|
|
95
|
+
version(): string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export class PupClientOptions {
|
|
99
|
+
free(): void;
|
|
100
|
+
[Symbol.dispose](): void;
|
|
101
|
+
constructor(site: string);
|
|
102
|
+
get access_token(): string | undefined;
|
|
103
|
+
set access_token(value: string | null | undefined);
|
|
104
|
+
get api_key(): string | undefined;
|
|
105
|
+
set api_key(value: string | null | undefined);
|
|
106
|
+
get app_key(): string | undefined;
|
|
107
|
+
set app_key(value: string | null | undefined);
|
|
108
|
+
/**
|
|
109
|
+
* CSRF token sent as `x-csrf-token` in session mode (needed for writes).
|
|
110
|
+
*/
|
|
111
|
+
get csrf_token(): string | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* CSRF token sent as `x-csrf-token` in session mode (needed for writes).
|
|
114
|
+
*/
|
|
115
|
+
set csrf_token(value: string | null | undefined);
|
|
116
|
+
/**
|
|
117
|
+
* Same-origin base URL: the page origin (e.g. `location.origin`).
|
|
118
|
+
* Authenticates with the session cookie, or with `access_token` as a
|
|
119
|
+
* Bearer token if set. Cannot be combined with `api_key` / `app_key`.
|
|
120
|
+
*/
|
|
121
|
+
get session_origin(): string | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* Same-origin base URL: the page origin (e.g. `location.origin`).
|
|
124
|
+
* Authenticates with the session cookie, or with `access_token` as a
|
|
125
|
+
* Bearer token if set. Cannot be combined with `api_key` / `app_key`.
|
|
126
|
+
*/
|
|
127
|
+
set session_origin(value: string | null | undefined);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Execute `pup` with no credentials (offline `--help`, `version`, `agent schema`,
|
|
132
|
+
* `format`, `docs api`, etc.; API commands return pup's real auth error).
|
|
133
|
+
*/
|
|
134
|
+
export function run_unauthenticated_cli(site: string, args: string[], stdin?: string | null, files_json?: string | null): Promise<any>;
|
|
135
|
+
|
|
136
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
137
|
+
|
|
138
|
+
export interface InitOutput {
|
|
139
|
+
readonly memory: WebAssembly.Memory;
|
|
140
|
+
readonly __wbg_get_pupclientoptions_access_token: (a: number) => [number, number];
|
|
141
|
+
readonly __wbg_get_pupclientoptions_api_key: (a: number) => [number, number];
|
|
142
|
+
readonly __wbg_get_pupclientoptions_app_key: (a: number) => [number, number];
|
|
143
|
+
readonly __wbg_get_pupclientoptions_csrf_token: (a: number) => [number, number];
|
|
144
|
+
readonly __wbg_get_pupclientoptions_session_origin: (a: number) => [number, number];
|
|
145
|
+
readonly __wbg_pupclient_free: (a: number, b: number) => void;
|
|
146
|
+
readonly __wbg_pupclientoptions_free: (a: number, b: number) => void;
|
|
147
|
+
readonly __wbg_set_pupclientoptions_access_token: (a: number, b: number, c: number) => void;
|
|
148
|
+
readonly __wbg_set_pupclientoptions_api_key: (a: number, b: number, c: number) => void;
|
|
149
|
+
readonly __wbg_set_pupclientoptions_app_key: (a: number, b: number, c: number) => void;
|
|
150
|
+
readonly __wbg_set_pupclientoptions_csrf_token: (a: number, b: number, c: number) => void;
|
|
151
|
+
readonly __wbg_set_pupclientoptions_session_origin: (a: number, b: number, c: number) => void;
|
|
152
|
+
readonly pupclient_dashboards_get: (a: number, b: number, c: number) => any;
|
|
153
|
+
readonly pupclient_dashboards_list: (a: number) => any;
|
|
154
|
+
readonly pupclient_events_search: (a: number, b: number, c: number) => any;
|
|
155
|
+
readonly pupclient_incidents_get: (a: number, b: number, c: number) => any;
|
|
156
|
+
readonly pupclient_incidents_list: (a: number) => any;
|
|
157
|
+
readonly pupclient_logs_search: (a: number, b: number, c: number) => any;
|
|
158
|
+
readonly pupclient_metrics_list: (a: number, b: number, c: number) => any;
|
|
159
|
+
readonly pupclient_metrics_query: (a: number, b: number, c: number, d: bigint, e: bigint) => any;
|
|
160
|
+
readonly pupclient_monitors_create: (a: number, b: number, c: number) => any;
|
|
161
|
+
readonly pupclient_monitors_delete: (a: number, b: bigint) => any;
|
|
162
|
+
readonly pupclient_monitors_get: (a: number, b: bigint) => any;
|
|
163
|
+
readonly pupclient_monitors_list: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint) => any;
|
|
164
|
+
readonly pupclient_new: (a: number) => [number, number, number];
|
|
165
|
+
readonly pupclient_raw_delete: (a: number, b: number, c: number) => any;
|
|
166
|
+
readonly pupclient_raw_get: (a: number, b: number, c: number) => any;
|
|
167
|
+
readonly pupclient_raw_patch: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
168
|
+
readonly pupclient_raw_post: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
169
|
+
readonly pupclient_raw_put: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
170
|
+
readonly pupclient_run_cli: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
171
|
+
readonly pupclient_slos_get: (a: number, b: number, c: number) => any;
|
|
172
|
+
readonly pupclient_slos_list: (a: number) => any;
|
|
173
|
+
readonly pupclient_version: (a: number) => [number, number];
|
|
174
|
+
readonly pupclientoptions_new: (a: number, b: number) => number;
|
|
175
|
+
readonly run_unauthenticated_cli: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
176
|
+
readonly wasm_bindgen__closure__destroy__h4fc79221b6076d71: (a: number, b: number) => void;
|
|
177
|
+
readonly wasm_bindgen__closure__destroy__h60fad2bd86e5ae2f: (a: number, b: number) => void;
|
|
178
|
+
readonly wasm_bindgen__convert__closures_____invoke__had8c242e111a30d3: (a: number, b: number, c: any) => [number, number];
|
|
179
|
+
readonly wasm_bindgen__convert__closures_____invoke__h5abb888779803111: (a: number, b: number, c: any, d: any) => void;
|
|
180
|
+
readonly wasm_bindgen__convert__closures_____invoke__he4a633bbbf50ef66: (a: number, b: number) => void;
|
|
181
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
182
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
183
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
184
|
+
readonly __externref_table_alloc: () => number;
|
|
185
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
186
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
187
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
188
|
+
readonly __wbindgen_start: () => void;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
195
|
+
* a precompiled `WebAssembly.Module`.
|
|
196
|
+
*
|
|
197
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
198
|
+
*
|
|
199
|
+
* @returns {InitOutput}
|
|
200
|
+
*/
|
|
201
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
205
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
206
|
+
*
|
|
207
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
208
|
+
*
|
|
209
|
+
* @returns {Promise<InitOutput>}
|
|
210
|
+
*/
|
|
211
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|