@greenarmor/ges 1.1.7 → 1.2.0

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/dist/cli.js CHANGED
@@ -17,12 +17,12 @@ import { controlCommand } from "./commands/control.js";
17
17
  import { fixCommand } from "./commands/fix.js";
18
18
  import { hooksCommand } from "./commands/hooks.js";
19
19
  import { dashboardCommand } from "./commands/dashboard.js";
20
- import { GESF_VERSION } from "@greenarmor/ges-core";
20
+ import { CLI_VERSION } from "./utils/version.js";
21
21
  const program = new Command();
22
22
  program
23
23
  .name("ges")
24
24
  .description("Green Engineering Standard Framework - Compliance-as-Code CLI")
25
- .version(GESF_VERSION);
25
+ .version(CLI_VERSION);
26
26
  program.addCommand(initCommand);
27
27
  program.addCommand(auditCommand);
28
28
  program.addCommand(scoreCommand);
@@ -1,6 +1,7 @@
1
1
  import { Command } from "commander";
2
2
  import { findProjectRoot, readJsonFile } from "../utils/project.js";
3
- import { GESF_VERSION, GES_DIR } from "@greenarmor/ges-core";
3
+ import { CLI_VERSION } from "../utils/version.js";
4
+ import { GES_DIR } from "@greenarmor/ges-core";
4
5
  import { showNextStepsMenu } from "../utils/next-steps.js";
5
6
  import * as fs from "node:fs";
6
7
  import * as path from "node:path";
@@ -51,7 +52,7 @@ export const doctorCommand = new Command("doctor")
51
52
  checks.push({ name: "Frameworks", status: "OK", detail: config.frameworks.join(", ") });
52
53
  }
53
54
  }
54
- checks.push({ name: "GESF Version", status: "OK", detail: GESF_VERSION });
55
+ checks.push({ name: "GESF Version", status: "OK", detail: CLI_VERSION });
55
56
  for (const check of checks) {
56
57
  const icon = check.status === "OK" ? "✓" : check.status === "WARN" ? "!" : "✗";
57
58
  const line = ` [${icon}] ${check.name}`;
@@ -1,6 +1,7 @@
1
1
  import { Command } from "commander";
2
2
  import { input, select, checkbox } from "../utils/prompts.js";
3
- import { PROJECT_TYPES, FRAMEWORKS, DEFAULT_FRAMEWORKS, GESF_VERSION, GES_DIR, COMPLIANCE_DIR, SECURITY_DIR, CONTROLS_DIR, POLICIES_DIR, CHECKLISTS_DIR, DOCS_DIR, REPORTS_DIR, } from "@greenarmor/ges-core";
3
+ import { PROJECT_TYPES, FRAMEWORKS, DEFAULT_FRAMEWORKS, GES_DIR, COMPLIANCE_DIR, SECURITY_DIR, CONTROLS_DIR, POLICIES_DIR, CHECKLISTS_DIR, DOCS_DIR, REPORTS_DIR, } from "@greenarmor/ges-core";
4
+ import { CLI_VERSION } from "../utils/version.js";
4
5
  import { getPacksForProjectType } from "@greenarmor/ges-policy-engine";
5
6
  import { generateComplianceDocs, generateSecurityDocs, generateConfigJson, generateMetadataJson, generateFrameworkVersionJson, generateScoreJson, } from "@greenarmor/ges-doc-generator";
6
7
  import { generateAllWorkflows } from "@greenarmor/ges-cicd-generator";
@@ -15,7 +16,7 @@ export const initCommand = new Command("init")
15
16
  .option("-f, --frameworks <frameworks>", "Comma-separated frameworks")
16
17
  .option("--force", "Re-initialize even if GESF is already set up")
17
18
  .action(async (options) => {
18
- console.log("\n Green Engineering Standard Framework (GESF) v" + GESF_VERSION);
19
+ console.log("\n Green Engineering Standard Framework (GESF) v" + CLI_VERSION);
19
20
  console.log(" ─────────────────────────────────────────────\n");
20
21
  const gesDir = path.join(process.cwd(), GES_DIR);
21
22
  if (fs.existsSync(gesDir)) {
@@ -71,7 +72,7 @@ export const initCommand = new Command("init")
71
72
  privacy_controls: { required: true, level: "mandatory" },
72
73
  },
73
74
  created_at: now,
74
- version: GESF_VERSION,
75
+ version: CLI_VERSION,
75
76
  };
76
77
  const dirs = [GES_DIR, COMPLIANCE_DIR, SECURITY_DIR, CONTROLS_DIR, POLICIES_DIR, CHECKLISTS_DIR, DOCS_DIR, REPORTS_DIR];
77
78
  for (const dir of dirs) {
@@ -1,10 +1,10 @@
1
1
  import { Command } from "commander";
2
- import { GESF_VERSION } from "@greenarmor/ges-core";
2
+ import { CLI_VERSION } from "../utils/version.js";
3
3
  import { showNextStepsMenu } from "../utils/next-steps.js";
4
4
  export const updateCommand = new Command("update")
5
5
  .description("Check for GESF updates")
6
6
  .action(async () => {
7
- console.log(`\n GESF Version: ${GESF_VERSION}`);
7
+ console.log(`\n GESF Version: ${CLI_VERSION}`);
8
8
  console.log(" Update check: Run 'npm update -g @greenarmor/ges' or 'pnpm update -g @greenarmor/ges'\n");
9
9
  await showNextStepsMenu("update");
10
10
  });
@@ -0,0 +1 @@
1
+ export declare const CLI_VERSION: string;
@@ -0,0 +1,8 @@
1
+ import { createRequire } from "node:module";
2
+ import * as url from "node:url";
3
+ import * as path from "node:path";
4
+ const __filename = url.fileURLToPath(import.meta.url);
5
+ const __dirname = path.dirname(__filename);
6
+ const require = createRequire(import.meta.url);
7
+ const pkg = require(path.join(__dirname, "..", "..", "package.json"));
8
+ export const CLI_VERSION = pkg.version;
package/package.json CHANGED
@@ -1,34 +1,24 @@
1
1
  {
2
- "name": "@greenarmor/ges",
3
- "version": "1.1.7",
4
- "description": "Green Engineering Standard Framework - Compliance-as-Code CLI",
5
- "type": "module",
6
- "main": "./dist/index.js",
7
- "types": "./dist/index.d.ts",
8
2
  "bin": {
9
3
  "ges": "./dist/cli.js"
10
4
  },
11
- "files": [
12
- "dist",
13
- "LICENSE",
14
- "README.md"
15
- ],
16
5
  "dependencies": {
17
- "@greenarmor/ges-audit-engine": "1.1.5",
18
- "@greenarmor/ges-cicd-generator": "1.1.5",
19
- "@greenarmor/ges-compliance-engine": "1.1.5",
20
- "@greenarmor/ges-core": "1.1.5",
21
- "@greenarmor/ges-doc-generator": "1.1.5",
22
- "@greenarmor/ges-policy-engine": "1.1.5",
23
- "@greenarmor/ges-report-generator": "1.1.5",
24
- "@greenarmor/ges-rules-engine": "1.1.5",
25
- "@greenarmor/ges-scanner-integration": "1.1.5",
26
- "@greenarmor/ges-scoring-engine": "1.1.5",
27
- "@greenarmor/ges-mcp-server": "1.1.5",
28
- "@greenarmor/ges-git-hooks": "1.1.5",
29
- "@greenarmor/ges-web-dashboard": "1.1.5",
6
+ "@greenarmor/ges-audit-engine": "1.2.0",
7
+ "@greenarmor/ges-cicd-generator": "1.2.0",
8
+ "@greenarmor/ges-compliance-engine": "1.2.0",
9
+ "@greenarmor/ges-core": "1.2.0",
10
+ "@greenarmor/ges-doc-generator": "1.2.0",
11
+ "@greenarmor/ges-git-hooks": "1.2.0",
12
+ "@greenarmor/ges-mcp-server": "1.2.0",
13
+ "@greenarmor/ges-policy-engine": "1.2.0",
14
+ "@greenarmor/ges-report-generator": "1.2.0",
15
+ "@greenarmor/ges-rules-engine": "1.2.0",
16
+ "@greenarmor/ges-scanner-integration": "1.2.0",
17
+ "@greenarmor/ges-scoring-engine": "1.2.0",
18
+ "@greenarmor/ges-web-dashboard": "1.2.0",
30
19
  "commander": "^13.0.0"
31
20
  },
21
+ "description": "Green Engineering Standard Framework - Compliance-as-Code CLI",
32
22
  "devDependencies": {
33
23
  "@types/node": "^22.0.0",
34
24
  "typescript": "^6.0.0",
@@ -37,6 +27,12 @@
37
27
  "engines": {
38
28
  "node": ">=20.0.0"
39
29
  },
30
+ "files": [
31
+ "dist",
32
+ "LICENSE",
33
+ "README.md"
34
+ ],
35
+ "homepage": "https://github.com/greenarmor/gesf",
40
36
  "keywords": [
41
37
  "compliance",
42
38
  "gdpr",
@@ -49,11 +45,15 @@
49
45
  "compliance-as-code"
50
46
  ],
51
47
  "license": "MIT",
48
+ "main": "./dist/index.js",
49
+ "name": "@greenarmor/ges",
52
50
  "repository": {
53
51
  "type": "git",
54
52
  "url": "https://github.com/greenarmor/gesf"
55
53
  },
56
- "homepage": "https://github.com/greenarmor/gesf",
54
+ "type": "module",
55
+ "types": "./dist/index.d.ts",
56
+ "version": "1.2.0",
57
57
  "scripts": {
58
58
  "build": "tsc",
59
59
  "clean": "rm -rf dist tsconfig.tsbuildinfo",