Skip to content

Commit

Permalink
support binary, webpack outputs, update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
aeschli committed Jul 12, 2021
1 parent 9733b9f commit 62f6c36
Show file tree
Hide file tree
Showing 21 changed files with 3,734 additions and 230 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
on: [push]

name: Tests

jobs:
build:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install root project dependencies
run: yarn
- name: Buold root project
run: yarn compile
- name: Install sample project dependencies
run: yarn
working-directory: ./sample
- name: Run tests
uses: GabrielBB/[email protected]
with:
run: yarn test
6 changes: 5 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
.vscode/
lib/test/
lib/*.map
lib/**/*.map
src/
polyfill/
build/
.github/
.eslintrc
.gitignore
webpack.config.js
20 changes: 20 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch via NPM",
"request": "launch",
"runtimeArgs": [
"test"
],
"runtimeExecutable": "npm",
"skipFiles": [
"<node_internals>/**"
],
"type": "pwa-node"
}
]
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@

0.5.0 / 2021-07-12
==================
* support binary content (XHRResponse.body)
* updated to [email protected], [email protected]
* webpacked, stripping out debug and dependencies
* tests

0.4.0 / 2020-06-17
==================
* support for browser ('browser' in package.json)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# node-request-light
A light weight nodejs request library with proxy support. Intended to be used by VSCode extensions
A lightweight request library with proxy support. Intended to be used by VSCode extensions
37 changes: 37 additions & 0 deletions api.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export interface XHROptions {
type?: string;
url: string;
user?: string;
password?: string;
headers?: Headers;
timeout?: number;
data?: string;
strictSSL?: boolean;
followRedirects?: number;
}

export interface XHRResponse {
readonly responseText: string;
readonly body: Uint8Array;
readonly status: number;
readonly headers: Headers;
}

export interface XHRRequest {
(options: XHROptions): Promise<XHRResponse>
}

export interface XHRConfigure {
(proxyUrl: string, strictSSL: boolean): void;
}

export type Headers = { [header: string]: string | string[] | undefined };

export declare const configure: XHRConfigure;
export declare const xhr: XHRRequest;

export declare function getErrorStatusDescription(status: number): string;
Loading

0 comments on commit 62f6c36

Please sign in to comment.