@digital-herd/content-hub-cli 1.0.7 → 1.1.1

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.
@@ -1 +1 @@
1
- var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.globalCommandConfig=exports.setGlobalConfig=void 0;let getCliConfig_js_1=require("./getCliConfig.js"),ContenthubService_js_1=__importDefault(require("../services/ContenthubService.js")),logger_js_1=__importDefault(require("./logger.js")),setGlobalConfig=e=>(e.option("-e, --environment <environment>","environment id specified in the config file"),e),globalCommandConfig=(exports.setGlobalConfig=setGlobalConfig,async e=>{var n=await(0,getCliConfig_js_1.getCliConfig)();let o=e.environment||n.mainEnvironment;console.log(n,e),o||(logger_js_1.default.error("environment not specified -e or --environment"),process.exit(-1));var e=n.environments.find(e=>e.name===o),i=(e||(logger_js_1.default.error(`environment ${o} not found`),process.exit(-1)),new ContenthubService_js_1.default(e.domain,e.apiToken));return await i.validateClient(),{config:n,environment:e,contenthubService:i}});exports.globalCommandConfig=globalCommandConfig;
1
+ var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.globalCommandConfig=exports.setGlobalConfig=void 0;let getCliConfig_js_1=require("./getCliConfig.js"),ContenthubService_js_1=__importDefault(require("../services/ContenthubService.js")),logger_js_1=__importDefault(require("./logger.js")),setGlobalConfig=e=>(e.option("-e, --environment <environment>","environment id specified in the config file"),e),globalCommandConfig=(exports.setGlobalConfig=setGlobalConfig,async e=>{var n=await(0,getCliConfig_js_1.getCliConfig)();let o=e.environment||n.mainEnvironment;o||(logger_js_1.default.error("environment not specified -e or --environment"),process.exit(-1));var e=n.environments.find(e=>e.name===o),i=(e||(logger_js_1.default.error(`environment ${o} not found`),process.exit(-1)),new ContenthubService_js_1.default(e.domain,e.apiToken));return await i.validateClient(),{config:n,environment:e,contenthubService:i}});exports.globalCommandConfig=globalCommandConfig;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@digital-herd/content-hub-cli",
3
3
  "description": "CLI tools for managing Sitecore Content Hub external components and scripts",
4
- "version": "1.0.7",
4
+ "version": "1.1.1",
5
5
  "type": "commonjs",
6
6
  "main": "./lib/index.js",
7
7
  "types": "./lib/index.d.ts",