Skip to content

Commit

Permalink
Fixing CLI pathing + Version bumping
Browse files Browse the repository at this point in the history
  • Loading branch information
PicoCreator committed Jun 29, 2022
1 parent daffb0b commit b6edb4e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "uilicious-cli",
"version": "5.1.8",
"version": "5.1.9",
"description": "Uilicious CLI toolchain",
"main": "uilicious-cli.js",
"keywords": [
Expand Down
12 changes: 10 additions & 2 deletions src/cli-command/project/run.js
Expand Up @@ -152,6 +152,14 @@ class TestRunnerSession {
webstudioURL = argv.apiHost.split("/api/")[0]+"/webstudio"
}

// Normalize ending slash
if( webstudioURL.endsWith("/") ) {
webstudioURL.slice(0, webstudioURL.length - 1)
}
if( privateSnippetURL != null && privateSnippetURL.endsWith("/") ) {
privateSnippetURL.slice(0, privateSnippetURL.length - 1)
}

// Get the full project listing (after login)
let projectObj = await SpaceAndProjectApi.findProject(argv.project);
let projectID = projectObj._oid;
Expand Down Expand Up @@ -681,12 +689,12 @@ class TestRunnerSession {
if( this.testCodeDir == null ) {
resultMsg.push(`> See full results at : ${this.webstudioURL}/project/${this.projectID}/editor/${this.uriEncodedScriptPath}?testRunId=${this.testID}`)
}
resultMsg.push(`> See result snippet at : ${this.privateSnippetURL}${this.testID}`)
resultMsg.push(`> See result snippet at : ${this.privateSnippetURL}/${this.testID}`)
resultMsg.push(">")

// Or json
this.jsonOutputObj.webstudioURL = `${this.webstudioURL}/project/${this.projectID}/editor/${this.uriEncodedScriptPath}?testRunId=${this.testID}`;
this.jsonOutputObj.snippetURL = `${this.privateSnippetURL}${this.testID}`;
this.jsonOutputObj.snippetURL = `${this.privateSnippetURL}/${this.testID}`;
} else {

// This is the on-premise version !!!
Expand Down
2 changes: 1 addition & 1 deletion src/version.js
@@ -1 +1 @@
module.exports = "5.1.8"
module.exports = "5.1.9"

0 comments on commit b6edb4e

Please sign in to comment.