diff --git a/bin/index.js b/bin/index.js index 5b46508..bfb679e 100755 --- a/bin/index.js +++ b/bin/index.js @@ -2,6 +2,7 @@ const { Commander } = require('..') const chalk = require('chalk') const process = require('node:process'); +const { version, repository } = require('../package.json'); process.noDeprecation = true const {emitWarning} = process; @@ -63,6 +64,7 @@ try { console.log(chalk.hex('#00c895').bold("╚══██║██║ ██║██║ ██╔═██║██║ ██╔╝ ██║ ██╔═██╗ ╚██╔╝ ███ ██║╚██╝██║██╔╝ ")) console.log(chalk.hex('#00c895').bold("█████║╚█████╔╝█████╗██║ ██║╚████╗████╗ ██║ ██║ ██║ ██║ ██║ ╚╝ ██║█████╗")) console.log(chalk.hex('#00c895').bold("╚════╝ ╚════╝ ╚════╝╚═╝ ╚═╝ ╚═══╝╚═══╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚════╝")) + console.log(`v${version} - ${repository.url}`) console.log("") commander.init(); diff --git a/package.json b/package.json index e085106..b3be1eb 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,10 @@ "name": "stm", "version": "0.0.42", "description": "Solace Try-Me Command Line Tool", + "repository": { + "type": "git", + "url": "https://github.com/SolaceLabs/solace-tryme-cli" + }, "keywords": [ "solace", "tryme", diff --git a/public/feedportal b/public/feedportal index 43f0342..7f302d7 160000 --- a/public/feedportal +++ b/public/feedportal @@ -1 +1 @@ -Subproject commit 43f034215c86f597dc8765d78953675ff5735af0 +Subproject commit 7f302d7ab89cfd3eeefc24d0dc25dfd86af0a857 diff --git a/src/common/publish-client.ts b/src/common/publish-client.ts index 185a98d..e423ae7 100644 --- a/src/common/publish-client.ts +++ b/src/common/publish-client.ts @@ -5,7 +5,6 @@ import { STM_CLIENT_CONNECTED, STM_CLIENT_DISCONNECTED, STM_EVENT_PUBLISHED } fr import { getDefaultClientName, getType } from "../utils/defaults"; import { VisualizeClient } from "./visualize-client"; import { randomUUID } from "crypto"; -import { create } from 'domain'; const { uuid } = require('uuidv4'); const logLevelMap:Map = new Map([ @@ -195,14 +194,10 @@ export class SolaceClient extends VisualizeClient { } } else { - if (payloadType === 'text') - message.setSdtContainer(solace.SDTField.create(solace.SDTFieldType.STRING, "")); - else { + if (payloadType === 'text') { message.setSdtContainer(solace.SDTField.create(solace.SDTFieldType.STRING, "")); - // message.setBinaryAttachment(""); - // const encoder = new TextEncoder(); - // const result = encoder.encode(""); - // message.setBinaryAttachment(Buffer.from([0x00, 0x00, 0x00, 0x00, 0x00])); + } else { + message.setBinaryAttachment(""); } } diff --git a/src/utils/defaults.ts b/src/utils/defaults.ts index b44f1d1..b315472 100644 --- a/src/utils/defaults.ts +++ b/src/utils/defaults.ts @@ -144,7 +144,7 @@ export const defaultMessageConfig:any = { // userCos: NOT CONSIDERED // userData: NOT CONSIDERED userPropertyMap: undefined, - payloadType: "text", + payloadType: "TEXT", outputMode: 'DEFAULT', pretty: false } @@ -408,7 +408,7 @@ export const getType = (message:solace.Message) => { } var currentHomeDir = require('os').homedir(); -var currentStmHome = currentHomeDir; +var currentStmHome = `${currentHomeDir}/.stm`; if (process.env.STM_HOME) { currentStmHome = process.env.STM_HOME;