Skip to content

Commit db62b23

Browse files
authored
chore: update deps and file organization (#348)
1 parent 69ea22f commit db62b23

File tree

9 files changed

+230
-203
lines changed

9 files changed

+230
-203
lines changed

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,4 +160,4 @@ branding:
160160

161161
runs:
162162
using: 'node16'
163-
main: 'dist/index.js'
163+
main: 'dist/main/index.js'

dist/index.js renamed to dist/main/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 212 additions & 170 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Github Action: Deploy to Google Cloud Run",
55
"main": "dist/index.js",
66
"scripts": {
7-
"build": "ncc build -m src/index.ts",
7+
"build": "ncc build -m src/main.ts -o dist/main",
88
"lint": "eslint src/ tests/ --ext .ts,.tsx",
99
"format": "eslint src/ tests/ --ext .ts,.tsx --fix",
1010
"test": "mocha -r ts-node/register -t 150s 'tests/unit/*.test.ts' --exit",
@@ -29,9 +29,9 @@
2929
},
3030
"homepage": "https://github.com/google-github-actions/deploy-cloudrun#readme",
3131
"dependencies": {
32-
"@actions/core": "^1.7.0",
32+
"@actions/core": "^1.8.2",
3333
"@actions/exec": "^1.1.1",
34-
"@actions/tool-cache": "^1.7.2",
34+
"@actions/tool-cache": "^2.0.1",
3535
"@google-github-actions/actions-utils": "^0.3.0",
3636
"@google-github-actions/setup-cloud-sdk": "^0.5.0"
3737
},
@@ -40,23 +40,23 @@
4040
"@types/js-yaml": "^4.0.5",
4141
"@types/lodash": "^4.14.182",
4242
"@types/mocha": "^9.1.1",
43-
"@types/node": "^17.0.31",
43+
"@types/node": "^17.0.33",
4444
"@types/sinon": "^10.0.11",
45-
"@typescript-eslint/eslint-plugin": "^5.21.0",
46-
"@typescript-eslint/parser": "^5.21.0",
45+
"@typescript-eslint/eslint-plugin": "^5.23.0",
46+
"@typescript-eslint/parser": "^5.23.0",
4747
"@vercel/ncc": "^0.33.4",
4848
"chai": "^4.3.6",
49-
"eslint": "^8.14.0",
49+
"eslint": "^8.15.0",
5050
"eslint-config-prettier": "^8.5.0",
5151
"eslint-plugin-prettier": "^4.0.0",
5252
"google-auth-library": "^8.0.2",
5353
"googleapis": "^100.0.0",
5454
"lodash": "^4.17.21",
5555
"mocha": "^10.0.0",
5656
"prettier": "^2.6.2",
57-
"sinon": "^13.0.2",
57+
"sinon": "^14.0.0",
5858
"ts-node": "^10.7.0",
5959
"typescript": "^4.6.4",
60-
"yaml": "^2.0.1"
60+
"yaml": "^2.1.0"
6161
}
6262
}

src/index.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,3 +265,7 @@ export function setActionOutputs(outputs: DeployCloudRunOutputs): void {
265265
core.setOutput(key, outputs[key as keyof DeployCloudRunOutputs]);
266266
});
267267
}
268+
269+
if (require.main === module) {
270+
run();
271+
}

src/output-parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { DeployCloudRunOutputs } from './deploy-cloudrun';
17+
import { DeployCloudRunOutputs } from './main';
1818
import { run_v1 } from 'googleapis';
1919
import { errorMessage, presence } from '@google-github-actions/actions-utils';
2020

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import * as core from '@actions/core';
2020
import * as exec from '@actions/exec';
2121
import * as setupGcloud from '@google-github-actions/setup-cloud-sdk';
2222
import { expect } from 'chai';
23-
import { run, kvToString } from '../../src/deploy-cloudrun';
23+
import { run, kvToString } from '../../src/main';
2424

2525
// These are mock data for github actions inputs, where camel case is expected.
2626
const fakeInputs: { [key: string]: string } = {

tests/unit/output-parser.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
parseDeployResponse,
2222
ParseInputs,
2323
} from '../../src/output-parser';
24-
import { DeployCloudRunOutputs } from '../../src/deploy-cloudrun';
24+
import { DeployCloudRunOutputs } from '../../src/main';
2525

2626
describe('#output-parser', () => {
2727
describe('#parseUpdateTrafficResponse', () => {

0 commit comments

Comments
 (0)