Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add debug trace for library #159

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ node_modules/
lib/
dist/
**/tests/_temp/**
packages/k8s/tests/test-kind.yaml
packages/k8s/tests/test-kind.yaml
*.tsbuildinfo
49 changes: 16 additions & 33 deletions packages/docker/package-lock.json

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

9 changes: 4 additions & 5 deletions packages/docker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,28 @@
"name": "dockerhooks",
"version": "0.1.0",
"description": "",
"main": "lib/index.js",
"main": "src/index.ts",
"scripts": {
"test": "jest --runInBand",
"build": "npx tsc && npx ncc build"
"build": "npx ncc build --source-map"
},
"author": "",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.9.1",
"@actions/exec": "^1.1.1",
"hooklib": "file:../hooklib",
"shlex": "^2.1.2",
"uuid": "^8.3.2"
},
"devDependencies": {
"@types/jest": "^27.4.1",
"@types/node": "^17.0.23",
"@typescript-eslint/parser": "^5.18.0",
"@vercel/ncc": "^0.33.4",
"@vercel/ncc": "^0.38.1",
"jest": "^27.5.1",
"ts-jest": "^27.1.4",
"ts-node": "^10.7.0",
"tsconfig-paths": "^3.14.1",
"typescript": "^4.6.3"
"typescript": "^4.7.2"
}
}
2 changes: 1 addition & 1 deletion packages/docker/src/dockerCommands/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
Registry,
RunContainerStepArgs,
ServiceContainerInfo
} from 'hooklib/lib'
} from 'hooklib'
import * as path from 'path'
import { env } from 'process'
import { v4 as uuidv4 } from 'uuid'
Expand Down
2 changes: 1 addition & 1 deletion packages/docker/src/hooks/prepare-job.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as core from '@actions/core'
import { ContextPorts, PrepareJobArgs, writeToResponseFile } from 'hooklib/lib'
import { ContextPorts, PrepareJobArgs, writeToResponseFile } from 'hooklib'
import { exit } from 'process'
import { v4 as uuidv4 } from 'uuid'
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/docker/src/hooks/run-container-step.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RunContainerStepArgs } from 'hooklib/lib'
import { RunContainerStepArgs } from 'hooklib'
import { v4 as uuidv4 } from 'uuid'
import {
containerBuild,
Expand Down
2 changes: 1 addition & 1 deletion packages/docker/src/hooks/run-script-step.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RunScriptStepArgs } from 'hooklib/lib'
import { RunScriptStepArgs } from 'hooklib'
import { containerExecStep } from '../dockerCommands'

export async function runScriptStep(
Expand Down
2 changes: 1 addition & 1 deletion packages/docker/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
PrepareJobArgs,
RunContainerStepArgs,
RunScriptStepArgs
} from 'hooklib/lib'
} from 'hooklib'
import { exit } from 'process'
import {
cleanupJob,
Expand Down
10 changes: 6 additions & 4 deletions packages/docker/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./",
"outDir": "./lib",
"rootDir": "./src"
"rootDir": "..",
"outDir": "./lib"
},
"include": [
"./src"
],
"references": [
{ "path": "../hooklib" }
]
}
}
14 changes: 7 additions & 7 deletions packages/hooklib/package-lock.json

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

4 changes: 2 additions & 2 deletions packages/hooklib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"types": "index.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc",
"build": "rm -f tsconfig.tsbuildinfo && tsc --build",
"format": "prettier --write '**/*.ts'",
"format-check": "prettier --check '**/*.ts'",
"lint": "eslint src/**/*.ts"
Expand All @@ -20,7 +20,7 @@
"eslint": "^8.12.0",
"eslint-plugin-github": "^4.3.6",
"prettier": "^2.6.2",
"typescript": "^4.6.3"
"typescript": "^4.7.2"
},
"dependencies": {
"@actions/core": "^1.9.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/hooklib/src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,5 @@ export interface ContainerContext {
}

export interface ContextPorts {
[source: string]: string // source -> target
[source: number]: number // source -> target
}
8 changes: 5 additions & 3 deletions packages/hooklib/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": "./",
"rootDir": "..",
"outDir": "./lib",
"rootDir": "./src"
"declaration": true,
"declarationMap": true,
"composite": true
},
"include": [
"./src"
]
}
}
35 changes: 9 additions & 26 deletions packages/k8s/package-lock.json

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

Loading