Skip to content

Commit

Permalink
[NEW] Proxy support (#120)
Browse files Browse the repository at this point in the history
* Use fetch-with-proxy
  • Loading branch information
mrsimpson committed Oct 7, 2021
1 parent 204171c commit 9b81bf7
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 8 deletions.
25 changes: 22 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"chokidar": "^3.3.1",
"cli-ux": "^5.3.1",
"conf": "^6.1.0",
"fetch-with-proxy": "^3.0.1",
"figures": "^3.0.0",
"form-data": "^2.5.0",
"fs-extra": "^8.1.0",
Expand All @@ -32,7 +33,6 @@
"indent-string": "^4.0.0",
"inquirer": "^6.5.0",
"inquirer-checkbox-plus-prompt": "^1.0.1",
"node-fetch": "^2.6.0",
"open": "^6.4.0",
"pascal-case": "^2.0.1",
"pascalcase": "^0.1.1",
Expand Down
2 changes: 1 addition & 1 deletion src/commands/submit.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Command, flags } from '@oclif/command';
import chalk from 'chalk';
import cli from 'cli-ux';
import fetch from 'fetch-with-proxy';
import * as FormData from 'form-data';
import * as fs from 'fs';
import * as fuzzy from 'fuzzy';
import * as inquirer from 'inquirer';
import fetch from 'node-fetch';
import { Response } from 'node-fetch';

import { ICompilerDiagnostic } from '@rocket.chat/apps-compiler/definition';
Expand Down
2 changes: 1 addition & 1 deletion src/misc/deployHelpers.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Command from '@oclif/command';
import chalk from 'chalk';
import cli from 'cli-ux';
import fetch from 'fetch-with-proxy';
import * as FormData from 'form-data';
import * as fs from 'fs';
import fetch from 'node-fetch';
import { Response } from 'node-fetch';

import { AppPackager, FolderDetails } from '.';
Expand Down
2 changes: 1 addition & 1 deletion src/misc/variousUtils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fetch from 'fetch-with-proxy';
import * as fs from 'fs';
import fetch from 'node-fetch';

import { IAppCategory } from './interfaces';

Expand Down
3 changes: 3 additions & 0 deletions src/typings/fetch-with-proxy/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declare module "fetch-with-proxy" {
export default function fetch(url: any, options?: any): Promise<import("node-fetch").Response>;
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"importHelpers": true,
"outDir": "./lib",
"rootDirs": [ "./src" ],
"typeRoots": [ "./node_modules/@types" ]
"typeRoots": [ "./node_modules/@types", "./src/typings" ]
},
"include": [
"./src/**/*"
Expand Down

0 comments on commit 9b81bf7

Please sign in to comment.