From 313772edcecddc6ccb98c7e4347147951a17562a Mon Sep 17 00:00:00 2001 From: Hui Song Date: Tue, 16 Oct 2018 22:04:57 +0200 Subject: [PATCH] fix uploading bugs --- README.md | 4 +++- src/cirrusCommands.ts | 4 ++++ src/cirrusProject.ts | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 35b7bf8..d456fb9 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,9 @@ An offline IDE for customising SuperOffice CRM with its CRMScript langange * Download/update CRMScripts from the remote tenant into a local project. Command "Cirrus: Download scripts to the current folder". NB: Your local changes may be overwritten. * Editing the meta-information and script source code * Create new scripts inside the local project + * Delete a script * Upload scripts into the tenant. Command "Cirrus: Upload all in the current folder". + * Execute the Script opened in the current editor. Command "Cirrus: Execute the current script". Results will be shown in OUTPUT->CRMSCript - CRMScript editor * Syntax highlighting * Auto-completion of variables with candidate functions @@ -23,7 +25,7 @@ An offline IDE for customising SuperOffice CRM with its CRMScript langange # Install -- ```git clone https://huis@bitbucket.org/cirrusproject/vscode-crmscript.git``` +- ```git clone https://github.com/SuperOffice/vscode-crmscript``` - ```cd vscode-crmscript``` - ```npm install``` - Open VS Code from this folder (e.g., ```code .```) diff --git a/src/cirrusCommands.ts b/src/cirrusCommands.ts index c08a6d1..2b516ca 100644 --- a/src/cirrusCommands.ts +++ b/src/cirrusCommands.ts @@ -75,6 +75,10 @@ export function executeCurrentScript(){ vscode.window.showErrorMessage("The active editor is not for a valid CRMScript") return } + if(!meta.ejscriptId){ + vscode.window.showErrorMessage("Please download the latest scripts before execution") + return + } api.executeScript(meta, (res)=>{ if(!outputchannel) outputchannel = vscode.window.createOutputChannel("CRMScript") diff --git a/src/cirrusProject.ts b/src/cirrusProject.ts index 7b67231..821b2c7 100644 --- a/src/cirrusProject.ts +++ b/src/cirrusProject.ts @@ -116,6 +116,7 @@ export class CrmScriptProject{ if(newhash != meta.baseFileHash) //uploadScriptSource(meta, this.toRemoteText(content)); uploadScriptSource(meta, content, (res)=>{ + console.log(res) meta.uniqueIdentifier = res.UniqueIdentifier meta.baseFileHash = md5(res.Source) this.saveMeta()