Skip to content

Commit

Permalink
feat: Replace @oclif/command to @oclif/core library (#553)
Browse files Browse the repository at this point in the history
  • Loading branch information
congminh1254 authored Jan 28, 2025
1 parent 22179ec commit aed470b
Show file tree
Hide file tree
Showing 234 changed files with 26,915 additions and 9,687 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist/
tmp/
coverage/
15 changes: 6 additions & 9 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ globals:
plugins:
- promise
- unicorn
- node
- n

extends:
- 'eslint:recommended'
- 'plugin:promise/recommended'
- 'plugin:unicorn/recommended'
- 'plugin:node/recommended'
- 'plugin:n/recommended'
- 'prettier'

rules:

Expand Down Expand Up @@ -124,11 +125,7 @@ rules:
no-shadow-restricted-names: error
# Turn on someday, just use null everywhere if we can
no-undefined: off
# We allow some unused args
no-unused-vars:
- error
-
args: after-used
no-unused-vars: error
no-use-before-define: error

### NODE AND COMMONJS
Expand Down Expand Up @@ -328,8 +325,8 @@ rules:
unicorn/no-new-buffer: error

### NODE
node/no-deprecated-api: error
node/exports-style:
n/no-deprecated-api: error
n/exports-style:
- error
- module.exports

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,6 @@ typings/
#Intelij Idea
*.iml
.idea

# Oclif Build files
tmp/
9 changes: 9 additions & 0 deletions .glf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"inputs": ["./package.json"],
"output": "./LICENSE-THIRD-PARTY.txt",
"lineEnding": "lf",
"replace": {
"[email protected]": "./LICENSE.MIT",
"[email protected]": "./LICENSE.MIT"
}
}
3 changes: 3 additions & 0 deletions .mocharc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
recursive: true
timeout: '10000'
reporter: 'spec'
6 changes: 1 addition & 5 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
{
"tabWidth": 2,
"useTabs": true,
"singleQuote": true
}
"@oclif/prettier-config"
7,760 changes: 7,688 additions & 72 deletions LICENSE-THIRD-PARTY.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ Avatar URL: 'https://app.box.com/api/avatar/large/77777'
* [`box tokens`](docs/tokens.md) - Get a token. Returns the service account token by default
* [`box trash`](docs/trash.md) - List all items in trash
* [`box users`](docs/users.md) - List all Box users
* [`box version`](docs/version.md)
* [`box watermarking`](docs/watermarking.md) - Apply a watermark on an item
* [`box web-links`](docs/web-links.md) - Manage web links
* [`box webhooks`](docs/webhooks.md) - List all webhooks
Expand Down
9 changes: 6 additions & 3 deletions bin/run
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env node

require('@oclif/command').run()
.then(require('@oclif/command/flush'))
.catch(require('@oclif/errors/handle'))
const { handle } = require('@oclif/core/errors');
const flush = require('@oclif/core/flush');

require('@oclif/core').run()
.then(flush)
.catch(handle);
26 changes: 26 additions & 0 deletions docs/version.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
`box version`
=============



* [`box version`](#box-version)

## `box version`

```
USAGE
$ box version [--json] [--verbose]
FLAGS
--verbose Show additional information about the CLI.
GLOBAL FLAGS
--json Format output as json.
FLAG DESCRIPTIONS
--verbose Show additional information about the CLI.
Additionally shows the architecture, node version, operating system, and versions of plugins that the CLI is using.
```

_See code: [@oclif/plugin-version](https://github.com/oclif/plugin-version/blob/v2.2.16/src/commands/version.js)_
Loading

0 comments on commit aed470b

Please sign in to comment.