Skip to content

Commit

Permalink
chore: change bin files
Browse files Browse the repository at this point in the history
  • Loading branch information
pviti committed Feb 15, 2024
1 parent 9168143 commit 77bd4d8
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 11 deletions.
2 changes: 1 addition & 1 deletion bin/dev.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@echo off

node "%~dp0\dev" %*
node "%~dp0\dev" %*
14 changes: 14 additions & 0 deletions bin/dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env node_modules/.bin/ts-node

// eslint-disable-next-line node/shebang, unicorn/prefer-top-level-await
; (async () => {
const oclif = await import('@oclif/core')
await oclif.execute({ development: true, dir: __dirname })
.catch(error => {
if (error.code === 'EEXIT' && error.oclif.exit === 0) { /* command exit (quit) */ }
else
if (error.message === 'HOOK_EXIT') { /* hook exit */ }
else
return oclif.Errors.handle(error)
})
})()
File renamed without changes.
3 changes: 3 additions & 0 deletions bin/old/dev.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off

node "%~dp0\dev" %*
File renamed without changes.
3 changes: 3 additions & 0 deletions bin/old/run.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off

node "%~dp0\run" %*
2 changes: 1 addition & 1 deletion bin/run.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@echo off

node "%~dp0\run" %*
node "%~dp0\run" %*
7 changes: 7 additions & 0 deletions bin/run.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env node

// eslint-disable-next-line unicorn/prefer-top-level-await
(async () => {
const oclif = await import('@oclif/core')
await oclif.execute({ development: false, dir: __dirname })
})()
15 changes: 7 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
"description": "Commerce Layer CLI",
"version": "6.0.0-oclif3.2",
"author": "Pierluigi Viti <pierluigi@commercelayer.io>",
"homepage": "https://github.com/commercelayer/commercelayer-cli",
"repository": "https://github.com/commercelayer/commercelayer-cli",
"bugs": "https://github.com/commercelayer/commercelayer-cli/issues",
"bin": {
"commercelayer": "./bin/run",
"cl": "./bin/run",
"clayer": "./bin/run"
"commercelayer": "./bin/run.js",
"cl": "./bin/run.js",
"clayer": "./bin/run.js"
},
"bugs": "https://github.com/commercelayer/commercelayer-cli/issues",
"engines": {
"node": ">=20.0.0"
},
"files": [
"/bin/run.*",
"/lib",
"/npm-shrinkwrap.json",
"/oclif.manifest.json",
"/.fig/autocomplete/build/*.js"
"/oclif.manifest.json"
],
"homepage": "https://github.com/commercelayer/commercelayer-cli",
"keywords": [
"ecommerce",
"cli",
Expand Down Expand Up @@ -81,7 +81,6 @@
],
"topicSeparator": ":"
},
"repository": "https://github.com/commercelayer/commercelayer-cli",
"scripts": {
"build": "rm -rf lib && tsc -b",
"prepack": "pnpm build && oclif manifest && pnpm readme",
Expand Down
2 changes: 1 addition & 1 deletion src/commands/plugins/latest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ export default class PluginsLatest extends Command {

const formattedOutput = output.sort().join('\n')

this.log()
this.log(formattedOutput)

this.log()

return formattedOutput
Expand Down

0 comments on commit 77bd4d8

Please sign in to comment.