Skip to content

Commit

Permalink
TN-6665: Upgrade to latest version of dependencies to resolve securit…
Browse files Browse the repository at this point in the history
…y vulnerabilities (#191)
  • Loading branch information
qmucolli authored Jan 23, 2025
1 parent 0a1bb44 commit bb2d5cf
Show file tree
Hide file tree
Showing 20 changed files with 3,047 additions and 1,967 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Node with Github Registry
uses: actions/setup-node@v1
with:
node-version: '16'
node-version: '20'
registry-url: https://npm.pkg.github.com/celonis
scope: '@celonis'

Expand Down Expand Up @@ -56,8 +56,3 @@ jobs:
name: Checkout Master
with:
fetch-depth: '0'

- uses: tool3/bump@v1
name: Bump patch version
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '16'
node-version: '20'
- name: Yarn Install
run: yarn install
- name: Yarn Build
Expand Down
43 changes: 23 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@celonis/content-cli",
"version": "0.12.0",
"version": "0.13.0",
"description": "CLI Tool to help manage content in Celonis EMS",
"main": "content-cli.js",
"bin": {
Expand All @@ -14,31 +14,34 @@
"lint": "tslint -p .",
"test": "jest"
},
"engines": {
"node": ">=18.20.5"
},
"dependencies": {
"@datadog/datadog-ci": "^0.17.12",
"adm-zip": "^0.4.14",
"axios": "1.6.2",
"commander": "^6.0.0",
"form-data": "4.0.0",
"openid-client": "^5.6.1",
"hpagent": "^1.2.0",
"semver": "^7.3.2",
"valid-url": "^1.0.9",
"winston": "^3.1.0",
"yaml": "2.2.2"
"@datadog/datadog-ci": "2.48.0",
"adm-zip": "0.5.16",
"axios": "1.7.9",
"commander": "13.1.0",
"form-data": "4.0.1",
"openid-client": "5.6.1",
"hpagent": "1.2.0",
"semver": "7.6.3",
"valid-url": "1.0.9",
"winston": "3.17.0",
"yaml": "2.7.0"
},
"devDependencies": {
"@types/adm-zip": "^0.4.34",
"@types/jest": "29.5.11",
"@types/adm-zip": "0.5.7",
"@types/jest": "29.5.14",
"@types/node": "20.10.4",
"jest": "29.7.0",
"lint-staged": "^9.5.0",
"prettier": "^1.19.1",
"ts-jest": "29.1.1",
"lint-staged": "15.4.1",
"prettier": "3.4.2",
"ts-jest": "29.2.5",
"ts-node": "10.9.2",
"tslint": "^5.20.1",
"tslint-config-prettier": "^1.18.0",
"tslint-consistent-codestyle": "^1.16.0",
"tslint": "5.20.1",
"tslint-config-prettier": "1.18.0",
"tslint-consistent-codestyle": "1.16.0",
"typescript": "5.3.3"
},
"lint-staged": {
Expand Down
13 changes: 6 additions & 7 deletions src/content-cli-analyze.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { ContextInitializer } from "./util/context-initializer";
import { logger } from "./util/logger";
import { ActionFlowCommand } from "./commands/action-flow.command";
import commander = require("commander");

type CommanderStatic = commander.CommanderStatic;
import { program } from "./util/program";
import { Command } from "commander";

class Analyze {
public static actionFlows(program: CommanderStatic): CommanderStatic {
public static actionFlows(program: Command): Command {
program
.command("action-flows")
.description("Analyze Action Flows dependencies for a certain package")
Expand All @@ -32,12 +31,12 @@ ContextInitializer.initContext()
});

if (!process.argv.slice(2).length) {
commander.outputHelp();
program.outputHelp();
process.exit(1);
}

function getAllCommands(): void {
Analyze.actionFlows(commander);
Analyze.actionFlows(program);

commander.parse(process.argv);
program.parse(process.argv);
}
29 changes: 14 additions & 15 deletions src/content-cli-config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import {ConfigCommand} from "./commands/config.command";
import commander = require("commander");
import { program } from "./util/program";
import {logger} from "./util/logger";
import {ContextInitializer} from "./util/context-initializer";

type CommanderStatic = commander.CommanderStatic;
import { Command } from "commander";

export class Config {
public static list(program: CommanderStatic): CommanderStatic {
public static list(program: Command): Command {
program
.command("list")
.description("Command to list active packages that can be exported")
Expand All @@ -23,7 +22,7 @@ export class Config {
return program;
}

public static listVariables(program: CommanderStatic): CommanderStatic {
public static listVariables(program: Command): Command {
program
.command("variables")
.description("Commands related to variable configs")
Expand All @@ -41,7 +40,7 @@ export class Config {
return program;
}

public static export(program: CommanderStatic): CommanderStatic {
public static export(program: Command): Command {
program
.command("export")
.description("Command to export package configs")
Expand All @@ -56,7 +55,7 @@ export class Config {
return program;
}

public static import(program: CommanderStatic): CommanderStatic {
public static import(program: Command): Command {
program
.command("import")
.description("Command to import package configs")
Expand All @@ -71,7 +70,7 @@ export class Config {
return program;
}

public static diff(program: CommanderStatic): CommanderStatic {
public static diff(program: Command): Command {
program
.command("diff")
.description("Command to diff configs of packages")
Expand All @@ -89,12 +88,12 @@ export class Config {
}

const loadAllCommands = () => {
Config.list(commander);
Config.listVariables(commander);
Config.export(commander);
Config.import(commander);
Config.diff(commander)
commander.parse(process.argv);
Config.list(program);
Config.listVariables(program);
Config.export(program);
Config.import(program);
Config.diff(program)
program.parse(process.argv);
};

ContextInitializer.initContext()
Expand All @@ -104,6 +103,6 @@ ContextInitializer.initContext()
});

if (!process.argv.slice(2).length) {
commander.outputHelp();
program.outputHelp();
process.exit(1);
}
20 changes: 10 additions & 10 deletions src/content-cli-export.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import * as commander from "commander";
import { CommanderStatic } from "commander";
import { Command } from "commander";
import { PackageCommand } from "./commands/package.command";
import { logger } from "./util/logger";
import { DataPoolCommand } from "./commands/data-pool.command";
import { ContextInitializer } from "./util/context-initializer";
import { ActionFlowCommand } from "./commands/action-flow.command";
import { program } from "./util/program";

export class Export {
public static packages(program: CommanderStatic): CommanderStatic {
public static packages(program: Command): Command {
program
.command("packages")
.description("Command to export all given packages")
Expand All @@ -23,7 +23,7 @@ export class Export {
return program;
}

public static dataPool(program: CommanderStatic): CommanderStatic {
public static dataPool(program: Command): Command {
program
.command("data-pool")
.description("Command to export a data pool")
Expand All @@ -38,7 +38,7 @@ export class Export {
return program;
}

public static actionFlows(program: CommanderStatic): CommanderStatic {
public static actionFlows(program: Command): Command {
program
.command("action-flows")
.description("Command to export all Action Flows in a package with their objects and dependencies")
Expand All @@ -65,14 +65,14 @@ ContextInitializer.initContext()
});

if (!process.argv.slice(2).length) {
commander.outputHelp();
program.outputHelp();
process.exit(1);
}

function getAllCommands(): void {
Export.packages(commander);
Export.dataPool(commander);
Export.actionFlows(commander);
Export.packages(program);
Export.dataPool(program);
Export.actionFlows(program);

commander.parse(process.argv);
program.parse(process.argv);
}
12 changes: 6 additions & 6 deletions src/content-cli-get.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { ConnectionCommand } from "./commands/connection.command";

import commander = require("commander");
import { ContextInitializer } from "./util/context-initializer";
import { logger } from "./util/logger";
type CommanderStatic = commander.CommanderStatic;
import { program } from "./util/program";
import { Command } from "commander";

class Get {
public static connection(program: CommanderStatic): CommanderStatic {
public static connection(program: Command): Command {
program
.command("connection")
.description("Programmatically read properties of your connections")
Expand All @@ -23,14 +23,14 @@ class Get {

ContextInitializer.initContext()
.then(() => {
Get.connection(commander);
commander.parse(process.argv);
Get.connection(program);
program.parse(process.argv);
})
.catch(e => {
logger.error(e);
});

if (!process.argv.slice(2).length) {
commander.outputHelp();
program.outputHelp();
process.exit(1);
}
19 changes: 10 additions & 9 deletions src/content-cli-import.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import * as commander from "commander";
import { CommanderStatic } from "commander";
import { Command } from "commander";
import { PackageCommand } from "./commands/package.command";
import { DataPoolCommand } from "./commands/data-pool.command";
import { ContextInitializer } from "./util/context-initializer";
import { logger } from "./util/logger";
import { ActionFlowCommand } from "./commands/action-flow.command";
import { program } from "./util/program";

export class Import {
public static packages(program: CommanderStatic): CommanderStatic {
public static packages(program: Command): Command {
program
.command("packages")
.description("Command to import all given packages")
Expand All @@ -28,7 +29,7 @@ export class Import {
return program;
}

public static dataPools(program: CommanderStatic): CommanderStatic {
public static dataPools(program: Command): Command {
program
.command("data-pools")
.description("Command to batch import multiple data pools with their objects and dependencies")
Expand All @@ -43,7 +44,7 @@ export class Import {
return program;
}

public static actionFlows(program: CommanderStatic): CommanderStatic {
public static actionFlows(program: Command): Command {
program
.command("action-flows")
.description("Command to import all Action Flows in a package with their objects and dependencies")
Expand Down Expand Up @@ -72,14 +73,14 @@ ContextInitializer.initContext()
});

if (!process.argv.slice(2).length) {
commander.outputHelp();
program.outputHelp();
process.exit(1);
}

function getAllCommands(): void {
Import.packages(commander);
Import.dataPools(commander);
Import.actionFlows(commander);
Import.packages(program);
Import.dataPools(program);
Import.actionFlows(program);

commander.parse(process.argv);
program.parse(process.argv);
}
Loading

0 comments on commit bb2d5cf

Please sign in to comment.