@celonis/content-cli 1.0.3 → 1.0.4

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.
package/content-cli.js CHANGED
@@ -36,26 +36,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
36
36
  logger_1.logger.error(`Node version ${process.version} not supported. Please upgrade your node version to ${requiredVersion}`);
37
37
  process.exit(1);
38
38
  }
39
- function configureGlobalConfigurationOptions() {
40
- return __awaiter(this, void 0, void 0, function* () {
41
- const program = new commander_1.Command();
42
- const currentCliVersion = yield version_1.VersionUtils.getCurrentCliVersion();
43
- program.version(currentCliVersion);
44
- program.option("-q, --quietmode", "Reduce output to a minimum", false);
45
- program.option("-p, --profile [profile]");
46
- program.option("--debug", "Print debug messages", false);
47
- program.option("--dev", "Development Mode", false);
48
- program.parseOptions(process.argv);
49
- if (!program.opts().quietmode) {
50
- console.log(`Content CLI - (C) Copyright 2025 - Celonis SE - Version ${currentCliVersion}`);
51
- console.log();
52
- }
53
- if (program.opts().debug) {
54
- logger_1.logger.transports.forEach(t => {
55
- t.level = "debug";
56
- });
57
- }
58
- return program;
39
+ // Global configuration options
40
+ const program = new commander_1.Command();
41
+ program.version(version_1.VersionUtils.getCurrentCliVersion());
42
+ program.option("-q, --quietmode", "Reduce output to a minimum", false);
43
+ program.option("-p, --profile [profile]");
44
+ program.option("--debug", "Print debug messages", false);
45
+ program.option("--dev", "Development Mode", false);
46
+ program.parseOptions(process.argv);
47
+ if (!program.opts().quietmode) {
48
+ console.log(`Content CLI - (C) Copyright 2025 - Celonis SE - Version ${version_1.VersionUtils.getCurrentCliVersion()}`);
49
+ console.log();
50
+ }
51
+ if (program.opts().debug) {
52
+ logger_1.logger.transports.forEach(t => {
53
+ t.level = "debug";
59
54
  });
60
55
  }
61
56
  /**
@@ -69,7 +64,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
69
64
  }
70
65
  function run() {
71
66
  return __awaiter(this, void 0, void 0, function* () {
72
- const program = yield configureGlobalConfigurationOptions();
73
67
  const context = new cli_context_1.Context(program.opts());
74
68
  yield context.init();
75
69
  const moduleHandler = new module_handler_1.ModuleHandler(program, context);
@@ -1,36 +1,20 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
1
  (function (factory) {
11
2
  if (typeof module === "object" && typeof module.exports === "object") {
12
3
  var v = factory(require, exports);
13
4
  if (v !== undefined) module.exports = v;
14
5
  }
15
6
  else if (typeof define === "function" && define.amd) {
16
- define(["require", "exports", "fs", "find-up"], factory);
7
+ define(["require", "exports"], factory);
17
8
  }
18
9
  })(function (require, exports) {
19
10
  "use strict";
20
11
  Object.defineProperty(exports, "__esModule", { value: true });
21
12
  exports.VersionUtils = void 0;
22
- const fs = require("fs");
23
- const findUp = require("find-up");
13
+ // tslint:disable-next-line:no-var-requires
14
+ const { version } = require("./../../package.json");
24
15
  class VersionUtils {
25
16
  static getCurrentCliVersion() {
26
- return __awaiter(this, void 0, void 0, function* () {
27
- const packageJsonPath = yield findUp("package.json");
28
- if (!packageJsonPath) {
29
- throw new Error("Could not find package.json");
30
- }
31
- const pkg = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
32
- return pkg.version;
33
- });
17
+ return version;
34
18
  }
35
19
  }
36
20
  exports.VersionUtils = VersionUtils;
@@ -1,3 +1,3 @@
1
1
  export declare class VersionUtils {
2
- static getCurrentCliVersion(): Promise<string>;
2
+ static getCurrentCliVersion(): string;
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celonis/content-cli",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "CLI Tool to help manage content in Celonis Platform",
5
5
  "main": "content-cli.js",
6
6
  "bin": {
@@ -24,7 +24,6 @@
24
24
  "commander": "13.1.0",
25
25
  "form-data": "4.0.1",
26
26
  "openid-client": "5.6.1",
27
- "find-up": "4.1.0",
28
27
  "hpagent": "1.2.0",
29
28
  "semver": "7.6.3",
30
29
  "valid-url": "1.0.9",