@oclif/core 4.3.2 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -2
- package/lib/interfaces/pjson.d.ts +14 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -84,7 +84,25 @@ class LS extends Command {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
LS.run(
|
|
87
|
+
LS.run(process.argv.slice(2), {
|
|
88
|
+
root: import.meta.dirname,
|
|
89
|
+
// Tell oclif what the contents of the package.json are.
|
|
90
|
+
// You could also set these in your package.json but specifying
|
|
91
|
+
// them here is useful if you're attempting to bundle your CLI
|
|
92
|
+
// without a package.json
|
|
93
|
+
pjson: {
|
|
94
|
+
name: 'ls',
|
|
95
|
+
version: '0.0.1',
|
|
96
|
+
oclif: {
|
|
97
|
+
// Tell oclif that this is a single command CLI
|
|
98
|
+
// See: https://oclif.io/docs/command_discovery_strategies
|
|
99
|
+
commands: {
|
|
100
|
+
strategy: 'single',
|
|
101
|
+
target: 'index.js',
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
}).then(
|
|
88
106
|
async () => {
|
|
89
107
|
await flush()
|
|
90
108
|
},
|
|
@@ -116,7 +134,7 @@ const {args, flags} = await Parser.parse(process.argv.slice(2), {
|
|
|
116
134
|
},
|
|
117
135
|
})
|
|
118
136
|
|
|
119
|
-
console.log(`hello ${args.name} from ${flags.
|
|
137
|
+
console.log(`hello ${args.name} from ${flags.from}`)
|
|
120
138
|
```
|
|
121
139
|
|
|
122
140
|
```
|
|
@@ -125,6 +143,8 @@ $ node index.js world --from oclif
|
|
|
125
143
|
hello world from oclif
|
|
126
144
|
```
|
|
127
145
|
|
|
146
|
+
**NOTE** If you're using the `Parser` class, you will not be able to use the builtin `help` and `version` flags since those require the context of an oclif project.
|
|
147
|
+
|
|
128
148
|
🚀 Contributing
|
|
129
149
|
|
|
130
150
|
See the [contributing guide](./CONRTIBUTING.md).
|
|
@@ -241,6 +241,20 @@ export type OclifConfiguration = {
|
|
|
241
241
|
subtopics?: OclifConfiguration['topics'];
|
|
242
242
|
};
|
|
243
243
|
};
|
|
244
|
+
/**
|
|
245
|
+
* Tar flags configuration for different platforms.
|
|
246
|
+
*
|
|
247
|
+
* {
|
|
248
|
+
* "tarFlags": {
|
|
249
|
+
* "win32": "--force-local",
|
|
250
|
+
* "darwin": "--no-xattrs"
|
|
251
|
+
* }
|
|
252
|
+
* }
|
|
253
|
+
*
|
|
254
|
+
*/
|
|
255
|
+
tarFlags?: {
|
|
256
|
+
[platform: string]: string;
|
|
257
|
+
};
|
|
244
258
|
update?: {
|
|
245
259
|
autoupdate?: {
|
|
246
260
|
debounce?: number;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oclif/core",
|
|
3
3
|
"description": "base library for oclif CLIs",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.4.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/oclif/core/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
"semver": "^7.6.3",
|
|
20
20
|
"string-width": "^4.2.3",
|
|
21
21
|
"supports-color": "^8",
|
|
22
|
-
"tinyglobby": "^0.2.
|
|
22
|
+
"tinyglobby": "^0.2.14",
|
|
23
23
|
"widest-line": "^3.1.0",
|
|
24
24
|
"wordwrap": "^1.0.0",
|
|
25
25
|
"wrap-ansi": "^7.0.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@commitlint/config-conventional": "^19",
|
|
29
|
-
"@eslint/compat": "^1.
|
|
29
|
+
"@eslint/compat": "^1.3.0",
|
|
30
30
|
"@oclif/plugin-help": "^6",
|
|
31
31
|
"@oclif/plugin-plugins": "^5",
|
|
32
32
|
"@oclif/prettier-config": "^0.2.1",
|