@stainless-api/github-internal
Advanced tools
Comparing version
@@ -536,3 +536,3 @@ "use strict"; | ||
'X-Stainless-Runtime': 'deno', | ||
'X-Stainless-Runtime-Version': Deno.version, | ||
'X-Stainless-Runtime-Version': typeof Deno.version === 'string' ? Deno.version : Deno.version?.deno ?? 'unknown', | ||
}; | ||
@@ -794,3 +794,3 @@ } | ||
function debug(action, ...args) { | ||
if (typeof process !== 'undefined' && process.env['DEBUG'] === 'true') { | ||
if (typeof process !== 'undefined' && process?.env?.['DEBUG'] === 'true') { | ||
console.log(`GitHub:DEBUG:${action}`, ...args); | ||
@@ -797,0 +797,0 @@ } |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -4,0 +4,0 @@ exports.InternalServerError = exports.RateLimitError = exports.UnprocessableEntityError = exports.ConflictError = exports.NotFoundError = exports.PermissionDeniedError = exports.AuthenticationError = exports.BadRequestError = exports.APIConnectionTimeoutError = exports.APIConnectionError = exports.APIUserAbortError = exports.APIError = exports.GitHubError = void 0; |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
@@ -4,0 +4,0 @@ if (k2 === undefined) k2 = k; |
{ | ||
"name": "@stainless-api/github-internal", | ||
"version": "0.0.1-alpha.0", | ||
"version": "0.0.1-alpha.1", | ||
"description": "The official TypeScript library for the GitHub API", | ||
@@ -11,3 +11,3 @@ "author": "GitHub <dev-feedback@stainlessapi.com>", | ||
"license": "Apache-2.0", | ||
"packageManager": "yarn@1.22.21", | ||
"packageManager": "yarn@1.22.22", | ||
"files": [ | ||
@@ -30,3 +30,2 @@ "*" | ||
"agentkeepalive": "^4.2.1", | ||
"digest-fetch": "^1.3.0", | ||
"form-data-encoder": "1.7.2", | ||
@@ -33,0 +32,0 @@ "formdata-node": "^4.3.2", |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -4,0 +4,0 @@ exports.NumberedPage = exports.ErrorsPage = void 0; |
@@ -5,3 +5,3 @@ # GitHub Node API Library | ||
> [!WARNING] | ||
> [!WARNING] | ||
> This SDK is intended for internal usage, is not affiliated with GitHub and | ||
@@ -15,5 +15,3 @@ > does not cover the whole API. | ||
```sh | ||
npm install --save @stainless-api/github-internal | ||
# or | ||
yarn add @stainless-api/github-internal | ||
npm install @stainless-api/github-internal | ||
``` | ||
@@ -75,3 +73,3 @@ | ||
.create({ owner: 'github', repo: 'docs', title: 'My first issue!' }) | ||
.catch((err) => { | ||
.catch(async (err) => { | ||
if (err instanceof GitHub.APIError) { | ||
@@ -168,4 +166,48 @@ console.log(err.status); // 400 | ||
## Customizing the fetch client | ||
### Making custom/undocumented requests | ||
This library is typed for convenient access to the documented API. If you need to access undocumented | ||
endpoints, params, or response properties, the library can still be used. | ||
#### Undocumented endpoints | ||
To make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs. | ||
Options on the client, such as retries, will be respected when making these requests. | ||
```ts | ||
await client.post('/some/path', { | ||
body: { some_prop: 'foo' }, | ||
query: { some_query_arg: 'bar' }, | ||
}); | ||
``` | ||
#### Undocumented request params | ||
To make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented | ||
parameter. This library doesn't validate at runtime that the request matches the type, so any extra values you | ||
send will be sent as-is. | ||
```ts | ||
client.foo.create({ | ||
foo: 'my_param', | ||
bar: 12, | ||
// @ts-expect-error baz is not yet public | ||
baz: 'undocumented option', | ||
}); | ||
``` | ||
For requests with the `GET` verb, any extra params will be in the query, all other requests will send the | ||
extra param in the body. | ||
If you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request | ||
options. | ||
#### Undocumented response properties | ||
To access undocumented response properties, you may access the response object with `// @ts-expect-error` on | ||
the response object, or cast the response object to the requisite type. Like the request params, we do not | ||
validate or strip extra properties from the response from the API. | ||
### Customizing the fetch client | ||
By default, this library uses `node-fetch` in Node, and expects a global `fetch` function in other environments. | ||
@@ -185,4 +227,6 @@ | ||
To do the inverse, add `import "@stainless-api/github-internal/shims/node"` (which does import polyfills). | ||
This can also be useful if you are getting the wrong TypeScript types for `Response` - more details [here](https://github.com/stainless-api/github-node/tree/main/src/_shims#readme). | ||
This can also be useful if you are getting the wrong TypeScript types for `Response` ([more details](https://github.com/stainless-api/github-node/tree/main/src/_shims#readme)). | ||
### Logging and middleware | ||
You may also provide a custom `fetch` function when instantiating the client, | ||
@@ -196,3 +240,3 @@ which can be used to inspect or alter the `Request` or `Response` before/after each request: | ||
const client = new GitHub({ | ||
fetch: async (url: RequestInfo, init?: RequestInfo): Promise<Response> => { | ||
fetch: async (url: RequestInfo, init?: RequestInit): Promise<Response> => { | ||
console.log('About to make a request', url, init); | ||
@@ -209,3 +253,3 @@ const response = await fetch(url, init); | ||
## Configuring an HTTP(S) Agent (e.g., for proxies) | ||
### Configuring an HTTP(S) Agent (e.g., for proxies) | ||
@@ -219,3 +263,3 @@ By default, this library uses a stable agent for all http/https requests to reuse TCP connections, eliminating many TCP & TLS handshakes and shaving around 100ms off most requests. | ||
import http from 'http'; | ||
import HttpsProxyAgent from 'https-proxy-agent'; | ||
import { HttpsProxyAgent } from 'https-proxy-agent'; | ||
@@ -228,9 +272,11 @@ // Configure the default for all requests: | ||
// Override per-request: | ||
await github.repos.issues.create({ owner: 'github', repo: 'docs', title: 'My first issue!' }, { | ||
baseURL: 'http://localhost:8080/test-api', | ||
httpAgent: new http.Agent({ keepAlive: false }), | ||
}) | ||
await github.repos.issues.create( | ||
{ owner: 'github', repo: 'docs', title: 'My first issue!' }, | ||
{ | ||
httpAgent: new http.Agent({ keepAlive: false }), | ||
}, | ||
); | ||
``` | ||
## Semantic Versioning | ||
## Semantic versioning | ||
@@ -237,0 +283,0 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions: |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -4,0 +4,0 @@ exports.APIResource = void 0; |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
@@ -4,0 +4,0 @@ if (k2 === undefined) k2 = k; |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
@@ -4,0 +4,0 @@ if (k2 === undefined) k2 = k; |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -4,0 +4,0 @@ exports.Commits = void 0; |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -4,0 +4,0 @@ exports.Contributors = void 0; |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -4,0 +4,0 @@ exports.Forks = void 0; |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
@@ -4,0 +4,0 @@ if (k2 === undefined) k2 = k; |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -4,0 +4,0 @@ exports.Refs = exports.Git = void 0; |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -4,0 +4,0 @@ exports.Refs = void 0; |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -4,0 +4,0 @@ exports.Topics = exports.Teams = exports.Tags = exports.Pulls = exports.Languages = exports.LFS = exports.Issues = exports.Git = exports.Repos = exports.Forks = exports.Contributors = exports.Commits = exports.Codeowners = exports.CodeownerErrorsErrorsPage = void 0; |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -4,0 +4,0 @@ exports.Issues = void 0; |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -4,0 +4,0 @@ exports.Languages = void 0; |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -4,0 +4,0 @@ exports.LFS = void 0; |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -4,0 +4,0 @@ exports.Pulls = void 0; |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
@@ -4,0 +4,0 @@ if (k2 === undefined) k2 = k; |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -4,0 +4,0 @@ exports.ProtectionStates = exports.Tags = void 0; |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -4,0 +4,0 @@ exports.ProtectionStates = void 0; |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
@@ -4,0 +4,0 @@ if (k2 === undefined) k2 = k; |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -4,0 +4,0 @@ exports.Teams = void 0; |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -4,0 +4,0 @@ exports.Topics = void 0; |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=shared.js.map |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -4,0 +4,0 @@ exports.TopLevel = void 0; |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -4,0 +4,0 @@ exports.Repos = exports.Users = void 0; |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -4,0 +4,0 @@ exports.Repos = void 0; |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
@@ -4,0 +4,0 @@ if (k2 === undefined) k2 = k; |
@@ -805,3 +805,4 @@ import { VERSION } from './version'; | ||
'X-Stainless-Runtime': 'deno', | ||
'X-Stainless-Runtime-Version': Deno.version, | ||
'X-Stainless-Runtime-Version': | ||
typeof Deno.version === 'string' ? Deno.version : Deno.version?.deno ?? 'unknown', | ||
}; | ||
@@ -1063,3 +1064,3 @@ } | ||
export function debug(action: string, ...args: any[]) { | ||
if (typeof process !== 'undefined' && process.env['DEBUG'] === 'true') { | ||
if (typeof process !== 'undefined' && process?.env?.['DEBUG'] === 'true') { | ||
console.log(`GitHub:DEBUG:${action}`, ...args); | ||
@@ -1066,0 +1067,0 @@ } |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ import { castToError, Headers } from './core'; |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ import * as Core from './core'; |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ import { AbstractPage, Response, APIClient, FinalRequestOptions, PageInfo } from './core'; |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ import type { GitHub } from './index'; |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ export * from './shared'; |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ import * as Core from "../../core"; |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ import * as Core from "../../core"; |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ import * as Core from "../../core"; |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ import * as Core from "../../core"; |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ import { APIResource } from "../../../resource"; |
@@ -1,4 +0,4 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
export { Git } from './git'; | ||
export { GitRef, RefRetrieveParams, RefDeleteParams, Refs } from './refs'; |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ import * as Core from "../../../core"; |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ export { |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ import * as Core from "../../core"; |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ import * as Core from "../../core"; |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ import * as Core from "../../core"; |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ import * as Core from "../../core"; |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ import * as Core from "../../core"; |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ export { Tag, TagListResponse, TagListParams, Tags } from './tags'; |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ import * as Core from "../../../core"; |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ import * as Core from "../../../core"; |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ import * as Core from "../../core"; |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ import * as Core from "../../core"; |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ import * as TopLevelAPI from "./top-level"; |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ export { PublicUser, SimpleUser, UserListResponse, UserListParams, Users } from './users'; |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ import * as Core from "../../core"; |
@@ -1,2 +0,2 @@ | ||
// File generated from our OpenAPI spec by Stainless. | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
@@ -3,0 +3,0 @@ import * as Core from "../../core"; |
@@ -105,3 +105,3 @@ import { type RequestOptions } from './core'; | ||
name?: string | null | undefined, | ||
options: FilePropertyBag | undefined = {}, | ||
options?: FilePropertyBag | undefined, | ||
): Promise<FileLike> { | ||
@@ -111,2 +111,5 @@ // If it's a promise, resolve it. | ||
// Use the file's options if there isn't one provided | ||
options ??= isFileLike(value) ? { lastModified: value.lastModified, type: value.type } : {}; | ||
if (isResponseLike(value)) { | ||
@@ -113,0 +116,0 @@ const blob = await value.blob(); |
@@ -1,1 +0,1 @@ | ||
export const VERSION = '0.0.1-alpha.0'; // x-release-please-version | ||
export const VERSION = '0.0.1-alpha.1'; // x-release-please-version |
@@ -43,5 +43,7 @@ "use strict"; | ||
*/ | ||
async function toFile(value, name, options = {}) { | ||
async function toFile(value, name, options) { | ||
// If it's a promise, resolve it. | ||
value = await value; | ||
// Use the file's options if there isn't one provided | ||
options ?? (options = (0, exports.isFileLike)(value) ? { lastModified: value.lastModified, type: value.type } : {}); | ||
if ((0, exports.isResponseLike)(value)) { | ||
@@ -48,0 +50,0 @@ const blob = await value.blob(); |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.0.1-alpha.0"; | ||
export declare const VERSION = "0.0.1-alpha.1"; | ||
//# sourceMappingURL=version.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.VERSION = void 0; | ||
exports.VERSION = '0.0.1-alpha.0'; // x-release-please-version | ||
exports.VERSION = '0.0.1-alpha.1'; // x-release-please-version | ||
//# sourceMappingURL=version.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
936563
1.07%8
-11.11%333
0.3%17764
0.04%301
18.04%- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed