@suitegeezus/suitecloud-cli 3.1.6-2 → 3.1.6-4
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 +8 -8
- package/package.json +1 -1
- package/src/CLI.js +16 -14
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
# SuiteCloud CLI for Node.js
|
|
4
4
|
<p>
|
|
5
|
-
<a href="https://www.npmjs.com/package/@
|
|
6
|
-
<img src="https://img.shields.io/npm/dm/@
|
|
7
|
-
<img src="https://img.shields.io/npm/v/@
|
|
5
|
+
<a href="https://www.npmjs.com/package/@suitegeezus/suitecloud-cli">
|
|
6
|
+
<img src="https://img.shields.io/npm/dm/@suitegeezus/suitecloud-cli.svg" alt="npm-cli"/>
|
|
7
|
+
<img src="https://img.shields.io/npm/v/@suitegeezus/suitecloud-cli.svg" alt="npm-cli"/>
|
|
8
8
|
</a>
|
|
9
9
|
</p>
|
|
10
10
|
|
|
@@ -37,12 +37,12 @@ npm install -g --acceptSuiteCloudSDKLicense @suitegeezus/suitecloud-cli
|
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
CLI for Node.js is available from within any directory by running `
|
|
40
|
+
CLI for Node.js is available from within any directory by running `sdf`.
|
|
41
41
|
|
|
42
42
|
## Usage
|
|
43
43
|
CLI for Node.js uses the following syntax:
|
|
44
44
|
```
|
|
45
|
-
|
|
45
|
+
sdf <command> <option> <argument>
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
### Commands
|
|
@@ -66,7 +66,7 @@ suitecloud <command> <option> <argument>
|
|
|
66
66
|
|
|
67
67
|
To check the help for a specific command, run the following command:
|
|
68
68
|
```
|
|
69
|
-
|
|
69
|
+
sdf {command} -h
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
Read the detailed documentation for all the commands in [SuiteCloud CLI for Node.js Reference](https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/chapter_155931263126.html).
|
|
@@ -79,12 +79,12 @@ Read the detailed documentation for all the commands in [SuiteCloud CLI for Node
|
|
|
79
79
|
|
|
80
80
|
Create a new project in an empty folder by running the following command:
|
|
81
81
|
```
|
|
82
|
-
|
|
82
|
+
sdf project:create -i
|
|
83
83
|
```
|
|
84
84
|
|
|
85
85
|
After you create a project, configure a NetSuite account, by running the following command within the project folder:
|
|
86
86
|
```
|
|
87
|
-
|
|
87
|
+
sdf account:setup
|
|
88
88
|
```
|
|
89
89
|
|
|
90
90
|
## Release Notes & Documentation
|
package/package.json
CHANGED
package/src/CLI.js
CHANGED
|
@@ -157,7 +157,7 @@ module.exports = class CLI {
|
|
|
157
157
|
.option(
|
|
158
158
|
`${INTERACTIVE_ALIAS}, ${INTERACTIVE_OPTION}`,
|
|
159
159
|
NodeTranslationService.getMessage(INTERACTIVE_OPTION_DESCRIPTION),
|
|
160
|
-
this._validateInteractive(commandMetadataList[thirdArgument]
|
|
160
|
+
this._validateInteractive(commandMetadataList[thirdArgument]?.options)
|
|
161
161
|
)
|
|
162
162
|
.helpOption(`${HELP_ALIAS}, ${HELP_OPTION}`, NodeTranslationService.getMessage(COMMAND_OPTIONS.HELP))
|
|
163
163
|
.addHelpCommand(`${HELP_COMMAND} ${COMMAND_ALIAS}`, NodeTranslationService.getMessage(COMMAND_OPTIONS.HELP))
|
|
@@ -187,19 +187,21 @@ module.exports = class CLI {
|
|
|
187
187
|
|
|
188
188
|
_validateInteractive(additionalOptions) {
|
|
189
189
|
let additionalAllowed = 0;
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
190
|
+
if( additionalOptions) {
|
|
191
|
+
const ubiquitousValuesThatAreInteractive = Object.values(UBIQUITOUS_OPTIONS)
|
|
192
|
+
.concat(Object.values(additionalOptions))
|
|
193
|
+
.filter((o) => o.allowInteractive)
|
|
194
|
+
.map((o) => ({
|
|
195
|
+
name: o.name,
|
|
196
|
+
additionalAllowed: o.type === "SINGLE" ? 2 : 1
|
|
197
|
+
}))
|
|
198
|
+
process.argv.forEach((arg) => {
|
|
199
|
+
const mactchingOption = ubiquitousValuesThatAreInteractive.find(
|
|
200
|
+
(o) => (`--${o.name}` === arg)
|
|
201
|
+
);
|
|
202
|
+
additionalAllowed += mactchingOption?.additionalAllowed || 0;
|
|
203
|
+
});
|
|
204
|
+
}
|
|
203
205
|
return ()=> {
|
|
204
206
|
if (process.argv.length > (4 + additionalAllowed)) {
|
|
205
207
|
// There are more options apart from -i or --interactive
|