Compare commits

...

20 Commits

Author SHA1 Message Date
bcomnes
238fd68774 1.1.7 2022-06-17 15:27:31 +00:00
Bret Comnes
d093da534e Merge pull request #89 from bcomnes/dependabot/npm_and_yarn/actions/core-1.9.0
chore(deps): bump @actions/core from 1.8.2 to 1.9.0
2022-06-17 09:26:21 -06:00
dependabot[bot]
c5dbf20c79 chore(deps): bump @actions/core from 1.8.2 to 1.9.0
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.8.2 to 1.9.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-16 03:05:58 +00:00
Bret Comnes
64e5c39322 Merge pull request #88 from rogerahuntley/stealdog.neocities.org
Update README.md
2022-06-13 19:33:27 -06:00
Bret Comnes
c6717e2bf3 Update README.md 2022-06-13 19:33:10 -06:00
Roger Huntley II
6a484414dd Update README.md
add stealdog.neocities.org to the readme
2022-06-13 18:11:49 -07:00
Bret Comnes
511266073a Merge pull request #87 from bcomnes/dependabot/npm_and_yarn/npm-run-all2-6.0.0
chore(deps-dev): bump npm-run-all2 from 5.0.2 to 6.0.0
2022-06-12 21:11:12 -06:00
dependabot[bot]
bab9d12e07 chore(deps-dev): bump npm-run-all2 from 5.0.2 to 6.0.0
Bumps [npm-run-all2](https://github.com/bcomnes/npm-run-all2) from 5.0.2 to 6.0.0.
- [Release notes](https://github.com/bcomnes/npm-run-all2/releases)
- [Changelog](https://github.com/bcomnes/npm-run-all2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bcomnes/npm-run-all2/compare/v5.0.2...v6.0.0)

---
updated-dependencies:
- dependency-name: npm-run-all2
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-13 03:05:01 +00:00
Bret Comnes
86e9b5be1e Merge pull request #85 from lime360/patch-1
please add me
2022-06-06 12:08:30 -06:00
lime360 entertainment
0b897bb2ca please add me
i promise pls add meeeeeeeee
2022-06-05 22:50:18 +03:00
bcomnes
d695e9db92 1.1.6 2022-05-26 16:33:32 +00:00
Bret Comnes
6f434f896b Merge pull request #84 from bcomnes/dependabot/npm_and_yarn/vercel/ncc-0.34.0
chore(deps-dev): bump @vercel/ncc from 0.33.4 to 0.34.0
2022-05-26 10:32:12 -06:00
dependabot[bot]
e7dcb26c51 chore(deps-dev): bump @vercel/ncc from 0.33.4 to 0.34.0
Bumps [@vercel/ncc](https://github.com/vercel/ncc) from 0.33.4 to 0.34.0.
- [Release notes](https://github.com/vercel/ncc/releases)
- [Commits](https://github.com/vercel/ncc/compare/0.33.4...0.34.0)

---
updated-dependencies:
- dependency-name: "@vercel/ncc"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-26 03:37:52 +00:00
Bret Comnes
8a28acd357 Merge pull request #83 from bcomnes/dependabot/npm_and_yarn/actions/core-1.8.2
chore(deps): bump @actions/core from 1.8.1 to 1.8.2
2022-05-15 21:20:44 -06:00
dependabot[bot]
b507e3b391 chore(deps): bump @actions/core from 1.8.1 to 1.8.2
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.8.1 to 1.8.2.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-16 03:04:55 +00:00
Bret Comnes
2abb3f996d Merge pull request #82 from bcomnes/dependabot/npm_and_yarn/actions/core-1.8.1 2022-05-13 09:32:00 -06:00
dependabot[bot]
f16012dd28 chore(deps): bump @actions/core from 1.8.0 to 1.8.1
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-13 03:05:07 +00:00
Bret Comnes
bfa04d557b Update test.yml 2022-05-06 12:24:13 -06:00
Bret Comnes
30f412734d Update release.yml 2022-05-06 12:24:00 -06:00
Bret Comnes
ec2b7132bb Update neocities.yml 2022-05-06 12:23:44 -06:00
8 changed files with 455 additions and 262 deletions

View File

@@ -23,7 +23,7 @@ jobs:
# Set up any tools and build steps here # Set up any tools and build steps here
# This example uses a Node.js toolchain to build a site # This example uses a Node.js toolchain to build a site
- name: Use Node.js - name: Use Node.js
uses: actions/setup-node@v3.1.1 uses: actions/setup-node@v3
with: with:
node-version: ${{ env.node_version }} node-version: ${{ env.node_version }}
- run: npm i - run: npm i

View File

@@ -23,7 +23,7 @@ jobs:
with: with:
# fetch full history so things like auto-changelog work properly # fetch full history so things like auto-changelog work properly
fetch-depth: 0 fetch-depth: 0
- uses: actions/setup-node@v3.1.1 - uses: actions/setup-node@v3
with: with:
node-version: ${{ env.node_version }} node-version: ${{ env.node_version }}
# setting a registry enables the NODE_AUTH_TOKEN env variable where we can set an npm token. REQUIRED # setting a registry enables the NODE_AUTH_TOKEN env variable where we can set an npm token. REQUIRED

View File

@@ -17,7 +17,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node }} - name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3.1.1 uses: actions/setup-node@v3
with: with:
node-version: ${{ matrix.node }} node-version: ${{ matrix.node }}
- run: npm i - run: npm i

View File

@@ -7,7 +7,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
## [v1.1.5](https://github.com/bcomnes/deploy-to-neocities/compare/v1.1.4...v1.1.5) ## [v1.1.7](https://github.com/bcomnes/deploy-to-neocities/compare/v1.1.6...v1.1.7)
### Merged
- chore(deps): bump @actions/core from 1.8.2 to 1.9.0 [`#89`](https://github.com/bcomnes/deploy-to-neocities/pull/89)
- Update README.md [`#88`](https://github.com/bcomnes/deploy-to-neocities/pull/88)
- chore(deps-dev): bump npm-run-all2 from 5.0.2 to 6.0.0 [`#87`](https://github.com/bcomnes/deploy-to-neocities/pull/87)
- please add me [`#85`](https://github.com/bcomnes/deploy-to-neocities/pull/85)
## [v1.1.6](https://github.com/bcomnes/deploy-to-neocities/compare/v1.1.5...v1.1.6) - 2022-05-26
### Merged
- chore(deps-dev): bump @vercel/ncc from 0.33.4 to 0.34.0 [`#84`](https://github.com/bcomnes/deploy-to-neocities/pull/84)
- chore(deps): bump @actions/core from 1.8.1 to 1.8.2 [`#83`](https://github.com/bcomnes/deploy-to-neocities/pull/83)
### Commits
- Merge pull request #82 from bcomnes/dependabot/npm_and_yarn/actions/core-1.8.1 [`2abb3f9`](https://github.com/bcomnes/deploy-to-neocities/commit/2abb3f996d5b9af84eb44488cfb74e307ad8574d)
- chore(deps): bump @actions/core from 1.8.0 to 1.8.1 [`f16012d`](https://github.com/bcomnes/deploy-to-neocities/commit/f16012dd28b1a06080fa8fefeb28da6cb44b3c2e)
- Update test.yml [`bfa04d5`](https://github.com/bcomnes/deploy-to-neocities/commit/bfa04d557bd13931d6b441e2455b525dc076ed26)
## [v1.1.5](https://github.com/bcomnes/deploy-to-neocities/compare/v1.1.4...v1.1.5) - 2022-05-06
### Merged ### Merged

View File

@@ -136,6 +136,8 @@ None.
- https://andri.dk/blog/2021/deploy-static-websites-anywhere - https://andri.dk/blog/2021/deploy-static-websites-anywhere
- https://github.com/PersonMeetup/frontiercorps ([frontiercorps.neocities.org](https://frontiercorps.neocities.org/)) - https://github.com/PersonMeetup/frontiercorps ([frontiercorps.neocities.org](https://frontiercorps.neocities.org/))
- https://github.com/riastrad/cyberbspace ([cyberb.space](https://cyberb.space)) - https://github.com/riastrad/cyberbspace ([cyberb.space](https://cyberb.space))
- https://github.com/lime360/lime360.neocities.org ([lime360.neocities.org](https://lime360.neocities.org/))
- https://github.com/rogerahuntley/neocities-site ([stealdog.neocities.org](https://stealdog.neocities.org))
- ...PR your site when you set it up! - ...PR your site when you set it up!
## See also ## See also

675
dist/index.js vendored
View File

@@ -425,6 +425,13 @@ Object.defineProperty(exports, "summary", ({ enumerable: true, get: function ()
*/ */
var summary_2 = __nccwpck_require__(1327); var summary_2 = __nccwpck_require__(1327);
Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } })); Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } }));
/**
* Path exports
*/
var path_utils_1 = __nccwpck_require__(2981);
Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } }));
Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } }));
Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } }));
//# sourceMappingURL=core.js.map //# sourceMappingURL=core.js.map
/***/ }), /***/ }),
@@ -494,8 +501,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
}; };
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.OidcClient = void 0; exports.OidcClient = void 0;
const http_client_1 = __nccwpck_require__(9925); const http_client_1 = __nccwpck_require__(6255);
const auth_1 = __nccwpck_require__(3702); const auth_1 = __nccwpck_require__(5526);
const core_1 = __nccwpck_require__(2186); const core_1 = __nccwpck_require__(2186);
class OidcClient { class OidcClient {
static createHttpClient(allowRetry = true, maxRetry = 10) { static createHttpClient(allowRetry = true, maxRetry = 10) {
@@ -562,6 +569,71 @@ exports.OidcClient = OidcClient;
/***/ }), /***/ }),
/***/ 2981:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0;
const path = __importStar(__nccwpck_require__(1017));
/**
* toPosixPath converts the given path to the posix form. On Windows, \\ will be
* replaced with /.
*
* @param pth. Path to transform.
* @return string Posix path.
*/
function toPosixPath(pth) {
return pth.replace(/[\\]/g, '/');
}
exports.toPosixPath = toPosixPath;
/**
* toWin32Path converts the given path to the win32 form. On Linux, / will be
* replaced with \\.
*
* @param pth. Path to transform.
* @return string Win32 path.
*/
function toWin32Path(pth) {
return pth.replace(/[/]/g, '\\');
}
exports.toWin32Path = toWin32Path;
/**
* toPlatformPath converts the given path to a platform-specific path. It does
* this by replacing instances of / and \ with the platform-specific path
* separator.
*
* @param pth The path to platformize.
* @return string The platform-specific path.
*/
function toPlatformPath(pth) {
return pth.replace(/[/\\]/g, path.sep);
}
exports.toPlatformPath = toPlatformPath;
//# sourceMappingURL=path-utils.js.map
/***/ }),
/***/ 1327: /***/ 1327:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
@@ -899,28 +971,41 @@ exports.toCommandProperties = toCommandProperties;
/***/ }), /***/ }),
/***/ 3702: /***/ 5526:
/***/ ((__unused_webpack_module, exports) => { /***/ (function(__unused_webpack_module, exports) {
"use strict"; "use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0;
class BasicCredentialHandler { class BasicCredentialHandler {
constructor(username, password) { constructor(username, password) {
this.username = username; this.username = username;
this.password = password; this.password = password;
} }
prepareRequest(options) { prepareRequest(options) {
options.headers['Authorization'] = if (!options.headers) {
'Basic ' + throw Error('The request has no headers');
Buffer.from(this.username + ':' + this.password).toString('base64'); }
options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`;
} }
// This handler cannot handle 401 // This handler cannot handle 401
canHandleAuthentication(response) { canHandleAuthentication() {
return false; return false;
} }
handleAuthentication(httpClient, requestInfo, objs) { handleAuthentication() {
return null; return __awaiter(this, void 0, void 0, function* () {
throw new Error('not implemented');
});
} }
} }
exports.BasicCredentialHandler = BasicCredentialHandler; exports.BasicCredentialHandler = BasicCredentialHandler;
@@ -931,14 +1016,19 @@ class BearerCredentialHandler {
// currently implements pre-authorization // currently implements pre-authorization
// TODO: support preAuth = false where it hooks on 401 // TODO: support preAuth = false where it hooks on 401
prepareRequest(options) { prepareRequest(options) {
options.headers['Authorization'] = 'Bearer ' + this.token; if (!options.headers) {
throw Error('The request has no headers');
}
options.headers['Authorization'] = `Bearer ${this.token}`;
} }
// This handler cannot handle 401 // This handler cannot handle 401
canHandleAuthentication(response) { canHandleAuthentication() {
return false; return false;
} }
handleAuthentication(httpClient, requestInfo, objs) { handleAuthentication() {
return null; return __awaiter(this, void 0, void 0, function* () {
throw new Error('not implemented');
});
} }
} }
exports.BearerCredentialHandler = BearerCredentialHandler; exports.BearerCredentialHandler = BearerCredentialHandler;
@@ -949,32 +1039,66 @@ class PersonalAccessTokenCredentialHandler {
// currently implements pre-authorization // currently implements pre-authorization
// TODO: support preAuth = false where it hooks on 401 // TODO: support preAuth = false where it hooks on 401
prepareRequest(options) { prepareRequest(options) {
options.headers['Authorization'] = if (!options.headers) {
'Basic ' + Buffer.from('PAT:' + this.token).toString('base64'); throw Error('The request has no headers');
}
options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`;
} }
// This handler cannot handle 401 // This handler cannot handle 401
canHandleAuthentication(response) { canHandleAuthentication() {
return false; return false;
} }
handleAuthentication(httpClient, requestInfo, objs) { handleAuthentication() {
return null; return __awaiter(this, void 0, void 0, function* () {
throw new Error('not implemented');
});
} }
} }
exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;
//# sourceMappingURL=auth.js.map
/***/ }), /***/ }),
/***/ 9925: /***/ 6255:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict"; "use strict";
/* eslint-disable @typescript-eslint/no-explicit-any */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
const http = __nccwpck_require__(3685); exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0;
const https = __nccwpck_require__(5687); const http = __importStar(__nccwpck_require__(3685));
const pm = __nccwpck_require__(6443); const https = __importStar(__nccwpck_require__(5687));
let tunnel; const pm = __importStar(__nccwpck_require__(9835));
const tunnel = __importStar(__nccwpck_require__(4294));
var HttpCodes; var HttpCodes;
(function (HttpCodes) { (function (HttpCodes) {
HttpCodes[HttpCodes["OK"] = 200] = "OK"; HttpCodes[HttpCodes["OK"] = 200] = "OK";
@@ -1019,7 +1143,7 @@ var MediaTypes;
* @param serverUrl The server URL where the request will be sent. For example, https://api.github.com * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
*/ */
function getProxyUrl(serverUrl) { function getProxyUrl(serverUrl) {
let proxyUrl = pm.getProxyUrl(new URL(serverUrl)); const proxyUrl = pm.getProxyUrl(new URL(serverUrl));
return proxyUrl ? proxyUrl.href : ''; return proxyUrl ? proxyUrl.href : '';
} }
exports.getProxyUrl = getProxyUrl; exports.getProxyUrl = getProxyUrl;
@@ -1052,20 +1176,22 @@ class HttpClientResponse {
this.message = message; this.message = message;
} }
readBody() { readBody() {
return new Promise(async (resolve, reject) => { return __awaiter(this, void 0, void 0, function* () {
let output = Buffer.alloc(0); return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
this.message.on('data', (chunk) => { let output = Buffer.alloc(0);
output = Buffer.concat([output, chunk]); this.message.on('data', (chunk) => {
}); output = Buffer.concat([output, chunk]);
this.message.on('end', () => { });
resolve(output.toString()); this.message.on('end', () => {
}); resolve(output.toString());
});
}));
}); });
} }
} }
exports.HttpClientResponse = HttpClientResponse; exports.HttpClientResponse = HttpClientResponse;
function isHttps(requestUrl) { function isHttps(requestUrl) {
let parsedUrl = new URL(requestUrl); const parsedUrl = new URL(requestUrl);
return parsedUrl.protocol === 'https:'; return parsedUrl.protocol === 'https:';
} }
exports.isHttps = isHttps; exports.isHttps = isHttps;
@@ -1108,141 +1234,169 @@ class HttpClient {
} }
} }
options(requestUrl, additionalHeaders) { options(requestUrl, additionalHeaders) {
return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); return __awaiter(this, void 0, void 0, function* () {
return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});
});
} }
get(requestUrl, additionalHeaders) { get(requestUrl, additionalHeaders) {
return this.request('GET', requestUrl, null, additionalHeaders || {}); return __awaiter(this, void 0, void 0, function* () {
return this.request('GET', requestUrl, null, additionalHeaders || {});
});
} }
del(requestUrl, additionalHeaders) { del(requestUrl, additionalHeaders) {
return this.request('DELETE', requestUrl, null, additionalHeaders || {}); return __awaiter(this, void 0, void 0, function* () {
return this.request('DELETE', requestUrl, null, additionalHeaders || {});
});
} }
post(requestUrl, data, additionalHeaders) { post(requestUrl, data, additionalHeaders) {
return this.request('POST', requestUrl, data, additionalHeaders || {}); return __awaiter(this, void 0, void 0, function* () {
return this.request('POST', requestUrl, data, additionalHeaders || {});
});
} }
patch(requestUrl, data, additionalHeaders) { patch(requestUrl, data, additionalHeaders) {
return this.request('PATCH', requestUrl, data, additionalHeaders || {}); return __awaiter(this, void 0, void 0, function* () {
return this.request('PATCH', requestUrl, data, additionalHeaders || {});
});
} }
put(requestUrl, data, additionalHeaders) { put(requestUrl, data, additionalHeaders) {
return this.request('PUT', requestUrl, data, additionalHeaders || {}); return __awaiter(this, void 0, void 0, function* () {
return this.request('PUT', requestUrl, data, additionalHeaders || {});
});
} }
head(requestUrl, additionalHeaders) { head(requestUrl, additionalHeaders) {
return this.request('HEAD', requestUrl, null, additionalHeaders || {}); return __awaiter(this, void 0, void 0, function* () {
return this.request('HEAD', requestUrl, null, additionalHeaders || {});
});
} }
sendStream(verb, requestUrl, stream, additionalHeaders) { sendStream(verb, requestUrl, stream, additionalHeaders) {
return this.request(verb, requestUrl, stream, additionalHeaders); return __awaiter(this, void 0, void 0, function* () {
return this.request(verb, requestUrl, stream, additionalHeaders);
});
} }
/** /**
* Gets a typed object from an endpoint * Gets a typed object from an endpoint
* Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise
*/ */
async getJson(requestUrl, additionalHeaders = {}) { getJson(requestUrl, additionalHeaders = {}) {
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); return __awaiter(this, void 0, void 0, function* () {
let res = await this.get(requestUrl, additionalHeaders); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
return this._processResponse(res, this.requestOptions); const res = yield this.get(requestUrl, additionalHeaders);
return this._processResponse(res, this.requestOptions);
});
} }
async postJson(requestUrl, obj, additionalHeaders = {}) { postJson(requestUrl, obj, additionalHeaders = {}) {
let data = JSON.stringify(obj, null, 2); return __awaiter(this, void 0, void 0, function* () {
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const data = JSON.stringify(obj, null, 2);
additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
let res = await this.post(requestUrl, data, additionalHeaders); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
return this._processResponse(res, this.requestOptions); const res = yield this.post(requestUrl, data, additionalHeaders);
return this._processResponse(res, this.requestOptions);
});
} }
async putJson(requestUrl, obj, additionalHeaders = {}) { putJson(requestUrl, obj, additionalHeaders = {}) {
let data = JSON.stringify(obj, null, 2); return __awaiter(this, void 0, void 0, function* () {
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const data = JSON.stringify(obj, null, 2);
additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
let res = await this.put(requestUrl, data, additionalHeaders); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
return this._processResponse(res, this.requestOptions); const res = yield this.put(requestUrl, data, additionalHeaders);
return this._processResponse(res, this.requestOptions);
});
} }
async patchJson(requestUrl, obj, additionalHeaders = {}) { patchJson(requestUrl, obj, additionalHeaders = {}) {
let data = JSON.stringify(obj, null, 2); return __awaiter(this, void 0, void 0, function* () {
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); const data = JSON.stringify(obj, null, 2);
additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
let res = await this.patch(requestUrl, data, additionalHeaders); additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
return this._processResponse(res, this.requestOptions); const res = yield this.patch(requestUrl, data, additionalHeaders);
return this._processResponse(res, this.requestOptions);
});
} }
/** /**
* Makes a raw http request. * Makes a raw http request.
* All other methods such as get, post, patch, and request ultimately call this. * All other methods such as get, post, patch, and request ultimately call this.
* Prefer get, del, post and patch * Prefer get, del, post and patch
*/ */
async request(verb, requestUrl, data, headers) { request(verb, requestUrl, data, headers) {
if (this._disposed) { return __awaiter(this, void 0, void 0, function* () {
throw new Error('Client has already been disposed.'); if (this._disposed) {
} throw new Error('Client has already been disposed.');
let parsedUrl = new URL(requestUrl);
let info = this._prepareRequest(verb, parsedUrl, headers);
// Only perform retries on reads since writes may not be idempotent.
let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1
? this._maxRetries + 1
: 1;
let numTries = 0;
let response;
while (numTries < maxTries) {
response = await this.requestRaw(info, data);
// Check if it's an authentication challenge
if (response &&
response.message &&
response.message.statusCode === HttpCodes.Unauthorized) {
let authenticationHandler;
for (let i = 0; i < this.handlers.length; i++) {
if (this.handlers[i].canHandleAuthentication(response)) {
authenticationHandler = this.handlers[i];
break;
}
}
if (authenticationHandler) {
return authenticationHandler.handleAuthentication(this, info, data);
}
else {
// We have received an unauthorized response but have no handlers to handle it.
// Let the response return to the caller.
return response;
}
} }
let redirectsRemaining = this._maxRedirects; const parsedUrl = new URL(requestUrl);
while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 && let info = this._prepareRequest(verb, parsedUrl, headers);
this._allowRedirects && // Only perform retries on reads since writes may not be idempotent.
redirectsRemaining > 0) { const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb)
const redirectUrl = response.message.headers['location']; ? this._maxRetries + 1
if (!redirectUrl) { : 1;
// if there's no location to redirect to, we won't let numTries = 0;
break; let response;
} do {
let parsedRedirectUrl = new URL(redirectUrl); response = yield this.requestRaw(info, data);
if (parsedUrl.protocol == 'https:' && // Check if it's an authentication challenge
parsedUrl.protocol != parsedRedirectUrl.protocol && if (response &&
!this._allowRedirectDowngrade) { response.message &&
throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); response.message.statusCode === HttpCodes.Unauthorized) {
} let authenticationHandler;
// we need to finish reading the response before reassigning response for (const handler of this.handlers) {
// which will leak the open socket. if (handler.canHandleAuthentication(response)) {
await response.readBody(); authenticationHandler = handler;
// strip authorization header if redirected to a different hostname break;
if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {
for (let header in headers) {
// header names are case insensitive
if (header.toLowerCase() === 'authorization') {
delete headers[header];
} }
} }
if (authenticationHandler) {
return authenticationHandler.handleAuthentication(this, info, data);
}
else {
// We have received an unauthorized response but have no handlers to handle it.
// Let the response return to the caller.
return response;
}
} }
// let's make the request with the new redirectUrl let redirectsRemaining = this._maxRedirects;
info = this._prepareRequest(verb, parsedRedirectUrl, headers); while (response.message.statusCode &&
response = await this.requestRaw(info, data); HttpRedirectCodes.includes(response.message.statusCode) &&
redirectsRemaining--; this._allowRedirects &&
} redirectsRemaining > 0) {
if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) { const redirectUrl = response.message.headers['location'];
// If not a retry code, return immediately instead of retrying if (!redirectUrl) {
return response; // if there's no location to redirect to, we won't
} break;
numTries += 1; }
if (numTries < maxTries) { const parsedRedirectUrl = new URL(redirectUrl);
await response.readBody(); if (parsedUrl.protocol === 'https:' &&
await this._performExponentialBackoff(numTries); parsedUrl.protocol !== parsedRedirectUrl.protocol &&
} !this._allowRedirectDowngrade) {
} throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');
return response; }
// we need to finish reading the response before reassigning response
// which will leak the open socket.
yield response.readBody();
// strip authorization header if redirected to a different hostname
if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {
for (const header in headers) {
// header names are case insensitive
if (header.toLowerCase() === 'authorization') {
delete headers[header];
}
}
}
// let's make the request with the new redirectUrl
info = this._prepareRequest(verb, parsedRedirectUrl, headers);
response = yield this.requestRaw(info, data);
redirectsRemaining--;
}
if (!response.message.statusCode ||
!HttpResponseRetryCodes.includes(response.message.statusCode)) {
// If not a retry code, return immediately instead of retrying
return response;
}
numTries += 1;
if (numTries < maxTries) {
yield response.readBody();
yield this._performExponentialBackoff(numTries);
}
} while (numTries < maxTries);
return response;
});
} }
/** /**
* Needs to be called if keepAlive is set to true in request options. * Needs to be called if keepAlive is set to true in request options.
@@ -1259,14 +1413,22 @@ class HttpClient {
* @param data * @param data
*/ */
requestRaw(info, data) { requestRaw(info, data) {
return new Promise((resolve, reject) => { return __awaiter(this, void 0, void 0, function* () {
let callbackForResult = function (err, res) { return new Promise((resolve, reject) => {
if (err) { function callbackForResult(err, res) {
reject(err); if (err) {
reject(err);
}
else if (!res) {
// If `err` is not passed, then `res` must be passed.
reject(new Error('Unknown error'));
}
else {
resolve(res);
}
} }
resolve(res); this.requestRawWithCallback(info, data, callbackForResult);
}; });
this.requestRawWithCallback(info, data, callbackForResult);
}); });
} }
/** /**
@@ -1276,21 +1438,24 @@ class HttpClient {
* @param onResult * @param onResult
*/ */
requestRawWithCallback(info, data, onResult) { requestRawWithCallback(info, data, onResult) {
let socket;
if (typeof data === 'string') { if (typeof data === 'string') {
if (!info.options.headers) {
info.options.headers = {};
}
info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');
} }
let callbackCalled = false; let callbackCalled = false;
let handleResult = (err, res) => { function handleResult(err, res) {
if (!callbackCalled) { if (!callbackCalled) {
callbackCalled = true; callbackCalled = true;
onResult(err, res); onResult(err, res);
} }
}; }
let req = info.httpModule.request(info.options, (msg) => { const req = info.httpModule.request(info.options, (msg) => {
let res = new HttpClientResponse(msg); const res = new HttpClientResponse(msg);
handleResult(null, res); handleResult(undefined, res);
}); });
let socket;
req.on('socket', sock => { req.on('socket', sock => {
socket = sock; socket = sock;
}); });
@@ -1299,12 +1464,12 @@ class HttpClient {
if (socket) { if (socket) {
socket.end(); socket.end();
} }
handleResult(new Error('Request timeout: ' + info.options.path), null); handleResult(new Error(`Request timeout: ${info.options.path}`));
}); });
req.on('error', function (err) { req.on('error', function (err) {
// err has statusCode property // err has statusCode property
// res should have headers // res should have headers
handleResult(err, null); handleResult(err);
}); });
if (data && typeof data === 'string') { if (data && typeof data === 'string') {
req.write(data, 'utf8'); req.write(data, 'utf8');
@@ -1325,7 +1490,7 @@ class HttpClient {
* @param serverUrl The server URL where the request will be sent. For example, https://api.github.com * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
*/ */
getAgent(serverUrl) { getAgent(serverUrl) {
let parsedUrl = new URL(serverUrl); const parsedUrl = new URL(serverUrl);
return this._getAgent(parsedUrl); return this._getAgent(parsedUrl);
} }
_prepareRequest(method, requestUrl, headers) { _prepareRequest(method, requestUrl, headers) {
@@ -1349,21 +1514,19 @@ class HttpClient {
info.options.agent = this._getAgent(info.parsedUrl); info.options.agent = this._getAgent(info.parsedUrl);
// gives handlers an opportunity to participate // gives handlers an opportunity to participate
if (this.handlers) { if (this.handlers) {
this.handlers.forEach(handler => { for (const handler of this.handlers) {
handler.prepareRequest(info.options); handler.prepareRequest(info.options);
}); }
} }
return info; return info;
} }
_mergeHeaders(headers) { _mergeHeaders(headers) {
const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});
if (this.requestOptions && this.requestOptions.headers) { if (this.requestOptions && this.requestOptions.headers) {
return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers)); return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));
} }
return lowercaseKeys(headers || {}); return lowercaseKeys(headers || {});
} }
_getExistingOrDefaultHeader(additionalHeaders, header, _default) { _getExistingOrDefaultHeader(additionalHeaders, header, _default) {
const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});
let clientHeader; let clientHeader;
if (this.requestOptions && this.requestOptions.headers) { if (this.requestOptions && this.requestOptions.headers) {
clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; clientHeader = lowercaseKeys(this.requestOptions.headers)[header];
@@ -1372,8 +1535,8 @@ class HttpClient {
} }
_getAgent(parsedUrl) { _getAgent(parsedUrl) {
let agent; let agent;
let proxyUrl = pm.getProxyUrl(parsedUrl); const proxyUrl = pm.getProxyUrl(parsedUrl);
let useProxy = proxyUrl && proxyUrl.hostname; const useProxy = proxyUrl && proxyUrl.hostname;
if (this._keepAlive && useProxy) { if (this._keepAlive && useProxy) {
agent = this._proxyAgent; agent = this._proxyAgent;
} }
@@ -1381,29 +1544,22 @@ class HttpClient {
agent = this._agent; agent = this._agent;
} }
// if agent is already assigned use that agent. // if agent is already assigned use that agent.
if (!!agent) { if (agent) {
return agent; return agent;
} }
const usingSsl = parsedUrl.protocol === 'https:'; const usingSsl = parsedUrl.protocol === 'https:';
let maxSockets = 100; let maxSockets = 100;
if (!!this.requestOptions) { if (this.requestOptions) {
maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;
} }
if (useProxy) { // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis.
// If using proxy, need tunnel if (proxyUrl && proxyUrl.hostname) {
if (!tunnel) {
tunnel = __nccwpck_require__(4294);
}
const agentOptions = { const agentOptions = {
maxSockets: maxSockets, maxSockets,
keepAlive: this._keepAlive, keepAlive: this._keepAlive,
proxy: { proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && {
...((proxyUrl.username || proxyUrl.password) && { proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`
proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` })), { host: proxyUrl.hostname, port: proxyUrl.port })
}),
host: proxyUrl.hostname,
port: proxyUrl.port
}
}; };
let tunnelAgent; let tunnelAgent;
const overHttps = proxyUrl.protocol === 'https:'; const overHttps = proxyUrl.protocol === 'https:';
@@ -1418,7 +1574,7 @@ class HttpClient {
} }
// if reusing agent across request and tunneling agent isn't assigned create a new agent // if reusing agent across request and tunneling agent isn't assigned create a new agent
if (this._keepAlive && !agent) { if (this._keepAlive && !agent) {
const options = { keepAlive: this._keepAlive, maxSockets: maxSockets }; const options = { keepAlive: this._keepAlive, maxSockets };
agent = usingSsl ? new https.Agent(options) : new http.Agent(options); agent = usingSsl ? new https.Agent(options) : new http.Agent(options);
this._agent = agent; this._agent = agent;
} }
@@ -1437,109 +1593,117 @@ class HttpClient {
return agent; return agent;
} }
_performExponentialBackoff(retryNumber) { _performExponentialBackoff(retryNumber) {
retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); return __awaiter(this, void 0, void 0, function* () {
const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
return new Promise(resolve => setTimeout(() => resolve(), ms)); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);
return new Promise(resolve => setTimeout(() => resolve(), ms));
});
} }
static dateTimeDeserializer(key, value) { _processResponse(res, options) {
if (typeof value === 'string') { return __awaiter(this, void 0, void 0, function* () {
let a = new Date(value); return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
if (!isNaN(a.valueOf())) { const statusCode = res.message.statusCode || 0;
return a; const response = {
} statusCode,
} result: null,
return value; headers: {}
} };
async _processResponse(res, options) { // not found leads to null obj returned
return new Promise(async (resolve, reject) => { if (statusCode === HttpCodes.NotFound) {
const statusCode = res.message.statusCode; resolve(response);
const response = { }
statusCode: statusCode, // get the result from the body
result: null, function dateTimeDeserializer(key, value) {
headers: {} if (typeof value === 'string') {
}; const a = new Date(value);
// not found leads to null obj returned if (!isNaN(a.valueOf())) {
if (statusCode == HttpCodes.NotFound) { return a;
resolve(response); }
} }
let obj; return value;
let contents; }
// get the result from the body let obj;
try { let contents;
contents = await res.readBody(); try {
if (contents && contents.length > 0) { contents = yield res.readBody();
if (options && options.deserializeDates) { if (contents && contents.length > 0) {
obj = JSON.parse(contents, HttpClient.dateTimeDeserializer); if (options && options.deserializeDates) {
obj = JSON.parse(contents, dateTimeDeserializer);
}
else {
obj = JSON.parse(contents);
}
response.result = obj;
}
response.headers = res.message.headers;
}
catch (err) {
// Invalid resource (contents not json); leaving result obj null
}
// note that 3xx redirects are handled by the http layer.
if (statusCode > 299) {
let msg;
// if exception/error in body, attempt to get better error
if (obj && obj.message) {
msg = obj.message;
}
else if (contents && contents.length > 0) {
// it may be the case that the exception is in the body message as string
msg = contents;
} }
else { else {
obj = JSON.parse(contents); msg = `Failed request: (${statusCode})`;
} }
response.result = obj; const err = new HttpClientError(msg, statusCode);
} err.result = response.result;
response.headers = res.message.headers; reject(err);
}
catch (err) {
// Invalid resource (contents not json); leaving result obj null
}
// note that 3xx redirects are handled by the http layer.
if (statusCode > 299) {
let msg;
// if exception/error in body, attempt to get better error
if (obj && obj.message) {
msg = obj.message;
}
else if (contents && contents.length > 0) {
// it may be the case that the exception is in the body message as string
msg = contents;
} }
else { else {
msg = 'Failed request: (' + statusCode + ')'; resolve(response);
} }
let err = new HttpClientError(msg, statusCode); }));
err.result = response.result;
reject(err);
}
else {
resolve(response);
}
}); });
} }
} }
exports.HttpClient = HttpClient; exports.HttpClient = HttpClient;
const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});
//# sourceMappingURL=index.js.map
/***/ }), /***/ }),
/***/ 6443: /***/ 9835:
/***/ ((__unused_webpack_module, exports) => { /***/ ((__unused_webpack_module, exports) => {
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.checkBypass = exports.getProxyUrl = void 0;
function getProxyUrl(reqUrl) { function getProxyUrl(reqUrl) {
let usingSsl = reqUrl.protocol === 'https:'; const usingSsl = reqUrl.protocol === 'https:';
let proxyUrl;
if (checkBypass(reqUrl)) { if (checkBypass(reqUrl)) {
return proxyUrl; return undefined;
} }
let proxyVar; const proxyVar = (() => {
if (usingSsl) { if (usingSsl) {
proxyVar = process.env['https_proxy'] || process.env['HTTPS_PROXY']; return process.env['https_proxy'] || process.env['HTTPS_PROXY'];
}
else {
return process.env['http_proxy'] || process.env['HTTP_PROXY'];
}
})();
if (proxyVar) {
return new URL(proxyVar);
} }
else { else {
proxyVar = process.env['http_proxy'] || process.env['HTTP_PROXY']; return undefined;
} }
if (proxyVar) {
proxyUrl = new URL(proxyVar);
}
return proxyUrl;
} }
exports.getProxyUrl = getProxyUrl; exports.getProxyUrl = getProxyUrl;
function checkBypass(reqUrl) { function checkBypass(reqUrl) {
if (!reqUrl.hostname) { if (!reqUrl.hostname) {
return false; return false;
} }
let noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';
if (!noProxy) { if (!noProxy) {
return false; return false;
} }
@@ -1555,12 +1719,12 @@ function checkBypass(reqUrl) {
reqPort = 443; reqPort = 443;
} }
// Format the request hostname and hostname with port // Format the request hostname and hostname with port
let upperReqHosts = [reqUrl.hostname.toUpperCase()]; const upperReqHosts = [reqUrl.hostname.toUpperCase()];
if (typeof reqPort === 'number') { if (typeof reqPort === 'number') {
upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);
} }
// Compare request host against noproxy // Compare request host against noproxy
for (let upperNoProxyItem of noProxy for (const upperNoProxyItem of noProxy
.split(',') .split(',')
.map(x => x.trim().toUpperCase()) .map(x => x.trim().toUpperCase())
.filter(x => x)) { .filter(x => x)) {
@@ -1571,7 +1735,7 @@ function checkBypass(reqUrl) {
return false; return false;
} }
exports.checkBypass = checkBypass; exports.checkBypass = checkBypass;
//# sourceMappingURL=proxy.js.map
/***/ }), /***/ }),
@@ -6158,6 +6322,11 @@ class Minimatch {
this.options = options this.options = options
this.set = [] this.set = []
this.pattern = pattern this.pattern = pattern
this.windowsPathsNoEscape = !!options.windowsPathsNoEscape ||
options.allowWindowsEscape === false
if (this.windowsPathsNoEscape) {
this.pattern = this.pattern.replace(/\\/g, '/')
}
this.regexp = null this.regexp = null
this.negate = false this.negate = false
this.comment = false this.comment = false

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@@ -1,13 +1,13 @@
{ {
"name": "deploy-to-neocities", "name": "deploy-to-neocities",
"description": "Github Action to deplpoy a folder to Neocities.org", "description": "Github Action to deplpoy a folder to Neocities.org",
"version": "1.1.5", "version": "1.1.7",
"author": "Bret Comnes <bcomnes@gmail.com> (https://bret.io/)", "author": "Bret Comnes <bcomnes@gmail.com> (https://bret.io/)",
"bugs": { "bugs": {
"url": "https://github.com/bcomnes/deploy-to-neocities/issues" "url": "https://github.com/bcomnes/deploy-to-neocities/issues"
}, },
"dependencies": { "dependencies": {
"@actions/core": "1.8.0", "@actions/core": "1.9.0",
"async-neocities": "2.1.1", "async-neocities": "2.1.1",
"minimatch": "^5.0.0", "minimatch": "^5.0.0",
"ms": "2.1.3", "ms": "2.1.3",
@@ -15,13 +15,13 @@
}, },
"devDependencies": { "devDependencies": {
"@siteup/cli": "^2.0.0", "@siteup/cli": "^2.0.0",
"@vercel/ncc": "^0.33.1", "@vercel/ncc": "^0.34.0",
"auto-changelog": "^2.0.0", "auto-changelog": "^2.0.0",
"browser-sync": "^2.27.7", "browser-sync": "^2.27.7",
"dependency-check": "^4.1.0", "dependency-check": "^4.1.0",
"gh-release": "^6.0.0", "gh-release": "^6.0.0",
"mkdirp": "^1.0.4", "mkdirp": "^1.0.4",
"npm-run-all2": "^5.0.2", "npm-run-all2": "^6.0.0",
"standard": "^17.0.0" "standard": "^17.0.0"
}, },
"homepage": "https://github.com/bcomnes/deploy-to-neocities#readme", "homepage": "https://github.com/bcomnes/deploy-to-neocities#readme",