@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.
Files changed (3) hide show
  1. package/README.md +8 -8
  2. package/package.json +1 -1
  3. 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/@oracle/suitecloud-cli">
6
- <img src="https://img.shields.io/npm/dm/@oracle/suitecloud-cli.svg" alt="npm-cli"/>
7
- <img src="https://img.shields.io/npm/v/@oracle/suitecloud-cli.svg" alt="npm-cli"/>
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 `suitecloud`.
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
- suitecloud <command> <option> <argument>
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
- suitecloud {command} -h
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
- suitecloud project:create -i
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
- suitecloud account:setup
87
+ sdf account:setup
88
88
  ```
89
89
 
90
90
  ## Release Notes & Documentation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suitegeezus/suitecloud-cli",
3
- "version": "3.1.6-2",
3
+ "version": "3.1.6-4",
4
4
  "license": "UPL-1.0",
5
5
  "description": "SuiteCloud CLI for Node.js",
6
6
  "keywords": [
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].options)
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
- const ubiquitousValuesThatAreInteractive = Object.values(UBIQUITOUS_OPTIONS)
191
- .concat(Object.values(additionalOptions))
192
- .filter((o)=>o.allowInteractive)
193
- .map((o)=>({
194
- name: o.name,
195
- additionalAllowed: o.type === "SINGLE" ? 2 : 1
196
- }))
197
- process.argv.forEach((arg)=>{
198
- const mactchingOption = ubiquitousValuesThatAreInteractive.find(
199
- (o)=>(`--${o.name}` === arg)
200
- );
201
- additionalAllowed += mactchingOption?.additionalAllowed || 0;
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