diff --git a/__tests__/auth.test.ts b/__tests__/auth.test.ts index b981c8b..ac2ab52 100644 --- a/__tests__/auth.test.ts +++ b/__tests__/auth.test.ts @@ -1,5 +1,5 @@ -import * as httpm from '../'; -import * as am from '../auth'; +import * as httpm from '../_out'; +import * as am from '../_out/auth'; describe('auth', () => { beforeEach(() => { diff --git a/__tests__/basics.test.ts b/__tests__/basics.test.ts index ed4a4a0..b67b3f7 100644 --- a/__tests__/basics.test.ts +++ b/__tests__/basics.test.ts @@ -1,4 +1,4 @@ -import * as httpm from '../'; +import * as httpm from '../_out'; import * as path from 'path'; import * as fs from 'fs'; diff --git a/__tests__/keepalive.test.ts b/__tests__/keepalive.test.ts index c7183fe..7d14774 100644 --- a/__tests__/keepalive.test.ts +++ b/__tests__/keepalive.test.ts @@ -1,4 +1,4 @@ -import * as httpm from '../'; +import * as httpm from '../_out'; describe('basics', () => { let _http: httpm.HttpClient; diff --git a/__tests__/proxy.test.ts b/__tests__/proxy.test.ts index e0d81d0..45ef0b0 100644 --- a/__tests__/proxy.test.ts +++ b/__tests__/proxy.test.ts @@ -1,4 +1,4 @@ -import * as pm from '../proxy'; +import * as pm from '../_out/proxy'; import * as url from 'url'; describe('proxy', () => { diff --git a/package-lock.json b/package-lock.json index ffe44e7..aa62741 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3434,6 +3434,19 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, + "nock": { + "version": "11.7.2", + "resolved": "https://registry.npmjs.org/nock/-/nock-11.7.2.tgz", + "integrity": "sha512-7swr5bL1xBZ5FctyubjxEVySXOSebyqcL7Vy1bx1nS9IUqQWj81cmKjVKJLr8fHhtzI1MV8nyCdENA/cGcY1+Q==", + "dev": true, + "requires": { + "debug": "^4.1.0", + "json-stringify-safe": "^5.0.1", + "lodash": "^4.17.13", + "mkdirp": "^0.5.0", + "propagate": "^2.0.0" + } + }, "node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -3787,6 +3800,12 @@ "sisteransi": "^1.0.3" } }, + "propagate": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz", + "integrity": "sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==", + "dev": true + }, "psl": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.7.0.tgz", diff --git a/package.json b/package.json index 652f095..5bc9155 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Actions Http Client", "main": "index.js", "scripts": { - "build": "tsc", + "build": "rm -Rf ./_out && tsc && cp package*.json ./_out && cp *.md ./_out && cp LICENSE ./_out && cp actions.png ./_out", "test": "jest" }, "repository": { @@ -25,6 +25,7 @@ "@types/jest": "^24.0.25", "@types/node": "^13.1.5", "jest": "^24.9.0", + "nock": "^11.7.2", "ts-jest": "^24.3.0", "typescript": "^3.7.4" } diff --git a/tsconfig.json b/tsconfig.json index 9047cdc..560cca0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,5 +8,8 @@ "outDir": "_out", "forceConsistentCasingInFileNames": true }, - "include": ["*.ts"] + "files": [ + "index.ts", + "auth.ts" + ] } \ No newline at end of file