freestyle-sandboxes 0.0.7 → 0.0.8
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/dist/index.cjs +2 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.mjs +2 -1
- package/package.json +1 -1
- package/src/index.ts +5 -0
package/dist/index.cjs
CHANGED
|
@@ -46,7 +46,8 @@ class FreestyleSandboxes {
|
|
|
46
46
|
this.client = clientFetch.createClient({
|
|
47
47
|
baseUrl: options.baseUrl ?? "https://api.freestyle.sh",
|
|
48
48
|
headers: {
|
|
49
|
-
Authorization: `Bearer ${options.apiKey}
|
|
49
|
+
Authorization: `Bearer ${options.apiKey}`,
|
|
50
|
+
...options.headers
|
|
50
51
|
}
|
|
51
52
|
});
|
|
52
53
|
}
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.mts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -44,7 +44,8 @@ class FreestyleSandboxes {
|
|
|
44
44
|
this.client = createClient({
|
|
45
45
|
baseUrl: options.baseUrl ?? "https://api.freestyle.sh",
|
|
46
46
|
headers: {
|
|
47
|
-
Authorization: `Bearer ${options.apiKey}
|
|
47
|
+
Authorization: `Bearer ${options.apiKey}`,
|
|
48
|
+
...options.headers
|
|
48
49
|
}
|
|
49
50
|
});
|
|
50
51
|
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -11,11 +11,16 @@ export class FreestyleSandboxes {
|
|
|
11
11
|
* The API key to use for requests.
|
|
12
12
|
*/
|
|
13
13
|
apiKey: string;
|
|
14
|
+
/**
|
|
15
|
+
* Custom Headers to be sent with each request.
|
|
16
|
+
*/
|
|
17
|
+
headers?: Record<string, string>;
|
|
14
18
|
}) {
|
|
15
19
|
this.client = createClient({
|
|
16
20
|
baseUrl: options.baseUrl ?? "https://api.freestyle.sh",
|
|
17
21
|
headers: {
|
|
18
22
|
Authorization: `Bearer ${options.apiKey}`,
|
|
23
|
+
...options.headers,
|
|
19
24
|
},
|
|
20
25
|
});
|
|
21
26
|
}
|