Skip to content

Commit 3594247

Browse files
Updated dependencies, workflows script, tests & gitignore file
1 parent c4de33d commit 3594247

8 files changed

+93
-51
lines changed

.eslintrc.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"plugins": ["@typescript-eslint"],
1515
"rules": {
1616
"@typescript-eslint/no-explicit-any": "off",
17-
"semi": ["error"],
18-
"quotes": ["error", "single", { "avoidEscape": true }],
17+
"semi": ["error", "always"],
18+
"quotes": ["error", "single"],
1919
"arrow-parens": ["error", "as-needed"],
2020
"no-multiple-empty-lines": ["error", { "max": 1 }]
2121
},

.github/workflows/testing - main pull request.yml

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ jobs:
3434
steps:
3535
- name: Checkout
3636
uses: actions/checkout@main
37+
with:
38+
ref: ${{ github.event.pull_request.head.sha }}
3739
- name: Use latest pnpm
3840
uses: pnpm/action-setup@master
3941
- name: Use Node.js ${{ matrix.node-version }}

.gitignore

+26
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,30 @@
1+
# main
2+
.pnpm-store/
13
node_modules/
24
build/
5+
6+
# .env
7+
.env
8+
.env.local
9+
.env.development.local
10+
.env.test.local
11+
.env.production.local
12+
13+
# tests
314
coverage/
15+
16+
# logs
17+
logs/
18+
log/
19+
*.log
20+
npm-debug.log*
21+
pnpm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*
24+
25+
# temp directory
26+
.temp/
27+
.tmp/
28+
29+
# os
430
.DS_Store

dist/index.js

+22-9
Original file line numberDiff line numberDiff line change
@@ -520,8 +520,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
520520
};
521521
Object.defineProperty(exports, "__esModule", ({ value: true }));
522522
exports.OidcClient = void 0;
523-
const http_client_1 = __nccwpck_require__(6372);
524-
const auth_1 = __nccwpck_require__(8603);
523+
const http_client_1 = __nccwpck_require__(6634);
524+
const auth_1 = __nccwpck_require__(2177);
525525
const core_1 = __nccwpck_require__(9093);
526526
class OidcClient {
527527
static createHttpClient(allowRetry = true, maxRetry = 10) {
@@ -987,7 +987,7 @@ exports.toCommandProperties = toCommandProperties;
987987

988988
/***/ }),
989989

990-
/***/ 8603:
990+
/***/ 2177:
991991
/***/ (function(__unused_webpack_module, exports) {
992992

993993

@@ -1074,7 +1074,7 @@ exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHand
10741074

10751075
/***/ }),
10761076

1077-
/***/ 6372:
1077+
/***/ 6634:
10781078
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
10791079

10801080

@@ -1115,7 +1115,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
11151115
exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0;
11161116
const http = __importStar(__nccwpck_require__(3685));
11171117
const https = __importStar(__nccwpck_require__(5687));
1118-
const pm = __importStar(__nccwpck_require__(2067));
1118+
const pm = __importStar(__nccwpck_require__(4318));
11191119
const tunnel = __importStar(__nccwpck_require__(4225));
11201120
const undici_1 = __nccwpck_require__(7181);
11211121
var HttpCodes;
@@ -1640,7 +1640,7 @@ class HttpClient {
16401640
}
16411641
const usingSsl = parsedUrl.protocol === 'https:';
16421642
proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, ((proxyUrl.username || proxyUrl.password) && {
1643-
token: `${proxyUrl.username}:${proxyUrl.password}`
1643+
token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString('base64')}`
16441644
})));
16451645
this._proxyAgentDispatcher = proxyAgent;
16461646
if (usingSsl && this._ignoreSslError) {
@@ -1732,7 +1732,7 @@ const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCa
17321732

17331733
/***/ }),
17341734

1735-
/***/ 2067:
1735+
/***/ 4318:
17361736
/***/ ((__unused_webpack_module, exports) => {
17371737

17381738

@@ -1753,11 +1753,11 @@ function getProxyUrl(reqUrl) {
17531753
})();
17541754
if (proxyVar) {
17551755
try {
1756-
return new URL(proxyVar);
1756+
return new DecodedURL(proxyVar);
17571757
}
17581758
catch (_a) {
17591759
if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))
1760-
return new URL(`http://${proxyVar}`);
1760+
return new DecodedURL(`http://${proxyVar}`);
17611761
}
17621762
}
17631763
else {
@@ -1816,6 +1816,19 @@ function isLoopbackAddress(host) {
18161816
hostLower.startsWith('[::1]') ||
18171817
hostLower.startsWith('[0:0:0:0:0:0:0:1]'));
18181818
}
1819+
class DecodedURL extends URL {
1820+
constructor(url, base) {
1821+
super(url, base);
1822+
this._decodedUsername = decodeURIComponent(super.username);
1823+
this._decodedPassword = decodeURIComponent(super.password);
1824+
}
1825+
get username() {
1826+
return this._decodedUsername;
1827+
}
1828+
get password() {
1829+
return this._decodedPassword;
1830+
}
1831+
}
18191832
//# sourceMappingURL=proxy.js.map
18201833

18211834
/***/ }),

dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "secrets-vars-to-env-file-action",
3-
"version": "1.2.4",
3+
"version": "1.2.5",
44
"description": "Export GitHub secrets & vars to environment variables & specified file",
55
"type": "module",
66
"main": "build/index.js",
@@ -26,7 +26,7 @@
2626
"@typescript-eslint/eslint-plugin": "^7.18.0",
2727
"@typescript-eslint/parser": "^7.18.0",
2828
"@vercel/ncc": "^0.38.1",
29-
"eslint": "8.57.0",
29+
"eslint": "8.57.1",
3030
"eslint-config-prettier": "^9.1.0",
3131
"jest": "^29.7.0",
3232
"prettier": "^3.3.3",

pnpm-lock.yaml

+34-34
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/e2e.test.ts test/e2e/e2e.test.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
import { describe, beforeAll, beforeEach, afterEach, afterAll, test, expect } from '@jest/globals';
12
import fs from 'fs';
23
import * as core from '@actions/core';
3-
import { mockCoreModule } from './mocks/implementations.js';
4-
import { mockInputs, mockRunnerScriptEnvs } from './mocks/helpers.js';
4+
import { mockCoreModule } from '../mocks/implementations.js';
5+
import { mockInputs, mockRunnerScriptEnvs } from '../mocks/helpers.js';
56

67
describe('secrets-vars-to-env-file-action e2e', () => {
78
let coreModule: typeof core;
@@ -56,7 +57,7 @@ describe('secrets-vars-to-env-file-action e2e', () => {
5657

5758
test('e2e', async () => {
5859
try {
59-
const { default: index } = await import('../src/index.js');
60+
const { default: index } = await import('../../src/index.js');
6061
await index;
6162

6263
expect(true).toBe(true);

0 commit comments

Comments
 (0)