Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
OR13 committed Aug 10, 2024
1 parent 4cf4c53 commit 02eac18
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 44 deletions.
12 changes: 6 additions & 6 deletions src/action/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import * as core from '@actions/core'
import cli from '../cli'

async function run() {
try {
if (process.env.GITHUB_ACTION) {
if (process.env.GITHUB_ACTION) {
try {
console.warn('todo github action')
} else {
await cli.init()
} catch (error) {
core.setFailed((error as Error).message)
}
} catch (error) {
core.setFailed((error as Error).message)
} else {
await cli.init()
}
}

Expand Down
29 changes: 0 additions & 29 deletions src/cli/cose/diagnostic/diagnose.ts

This file was deleted.

6 changes: 0 additions & 6 deletions src/cli/cose/diagnostic/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import jose from './jose'
const init = () => {
yargs.scriptName('✨')

// jose
yargs.command(jose)

yargs.help().alias('help', 'h').demandCommand().argv
Expand Down
File renamed without changes.
27 changes: 27 additions & 0 deletions src/cli/jose/key/generate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import fs from "fs"
import path from "path"

interface RequestDiagnose {
input: string // path to input file
output?: string // path to output file
}

const generate = async (argv: RequestDiagnose) => {
// const { input, output } = argv

// const payload = fs.readFileSync(path.resolve(process.cwd(), input))
// // TODO: use @transmute/edn
// const edn = await cose.cbor.diagnose(payload)
// if (output) {
// fs.writeFileSync(
// path.resolve(process.cwd(), output),
// edn
// )
// } else {
// console.info(edn)
// }
console.log('todo jose key generate')

}

export default generate
6 changes: 6 additions & 0 deletions src/cli/jose/key/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import generate from "./generate"


const key = { generate }

export default key
4 changes: 2 additions & 2 deletions src/cli/cose/module.ts → src/cli/jose/module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


import diagnostic from "./key"
import key from "./key"

export const action = `jose`

Expand All @@ -9,7 +9,7 @@ export const command = `${action} <resource> <action>`
export const describe = `${action} operations`

const resources = {
diagnostic
key
}

export const handler = async function (argv) {
Expand Down

0 comments on commit 02eac18

Please sign in to comment.