I am trying to work with the SDF extension for VS ...
# sdf
e
I am trying to work with the SDF extension for VS Code. My main hangup is Validate - in Eclipse, and I presume WebStorm, you were able to Validate the project as a standalone command, independent from the Deploy task. Is this possible? Plus, even when I try to validate via Node CLI in the Terminal, I get:
suitecloud project:validate
The validation process has finished.
But, I know that when I try to deploy the validation fails. How can I perform a true “Validate” task either via the VS Code extension or Node CLI?
a
you can try
project:validate --server
There is also
project:deploy --dryrun
-> This will not actually deploy, but will show you what changes will be made to your account if you actually deploy.
For VSCode, we have released the initial versions. In future we will add more enhancements.
e
Thanks, @Ali Syed (NS DevTools QA)… however, I cannot get dryrun to work. Do you know if I’m doing something wrong? (Likely!)
error: unknown option '--dryrun'
Doesn’t seem to be an option for me? Here’s -h (help) detail for deploy:
Copy code
Usage: suitecloud project:deploy [options]

Deploys the folder containing the project. The project folder is zipped before deployment, only including the files and folders referenced in the deploy.xml file.

Options:
  --accountspecificvalues <argument>  Indicate how to handle the presence of account-specific values in an account customization project. If there are account-specific values in the project, enter WARNING to
                                      continue with the deployment process, or ERROR to stop it. If the option is not specified, the default value is ERROR. It only applies to account customization projects.
  --applycontentprotection            Apply the content protection settings from the hiding.xml and locking.xml files. It only applies to SuiteApps.
  -i, --interactive                   Run the project:deploy command in interactive mode.
  --log <argument>                    Sets the deployment log file location, as either a directory or a file name. If it is a directory, a default log file is generated in the specified location. If a log
                                      file already exists in the specified location, deployment log details are appended to that existing file.
  --validate                          Validate the project before deploying. If an error ocurrs during the deployment, the process is stopped.
  -h, --help                          display help for command
a
Maybe you need to update the cli. The latest one is 1.3.1 You can check your version by running
suitecloud --version
e
1.1.2
aha
Q: how do i update? I ran the following, but afterwards it still returns 1.1.2 as the version of CLI:
npm install -g @oracle/suitecloud-cli
a
This should work. You can also try npm install -g @oracle/suitecloud-cli@1.3.1
e
i think i need to be out of my local directory and under my original install location, trying this now
do you know exactly where i need to execute this command? i think it installed suitecloud under my project…? thanks, not expert in node
a
Also try unistalling and reinstalling. npm uninstall -g @oracle/suitecloud-cli npm install -g @oracle/suitecloud-cli The location doesn't matter as you are passing global flag. -g
e
aargh. i hate this. this isn’t even NS! This is Node. I’ll try. thanks so much for your help!! i’ll report back
a
No worries.
e
???? check this out
i just uninstalled again. closed all open windows of VS Code. Ran “--version” and get 1.1.2. I don’t understand how suitecloud command even runs???
i can’t seem to update suitecloud-cli… i need some help here
a
Can you try another terminal?
e
THANK YOU FOR YOUR PROFESSIONALISM, PATIENCE AND HELP @Ali Syed (NS DevTools QA). This article helped, along with totally uninstalling and reinstalling (a few times, maybe) and modifying my PATH a whole lot… not sure what is up, but ultimately I do have 1.3.1 now… https://github.com/oracle/netsuite-suitecloud-sdk/issues/233
question: now that I have CLI updated, is there a DRYRUN option through the command palette? Or is that what you said earlier is still in the works for VS Code?
a
Dryrun is not available for vscode extension. It's available in nodecli. You can use combination of both while you are in vscode.
Like for dryrun you can execute the command. And use command palette for other things.
e
correct. another question: how do i switch between accounts in CLI? so, I am downloading from the SBX, but want to dryrun against the PRD account?
account:setup, got it
I love the way Eclipse would allow you to select the account (Deploy to Account…) - I believe WebStorm does as well. That would be a nice feature of the “interactive” mode, so as to avoid mistakes when switching between accounts… Either way, this is AWESOME> I love VS Code and a) cannot use Eclipse any longer, and b) do not with to switch to WebStorm. I think this will hold me over until the next time