@alfresco/adf-cli 9.1.0-17125993488 → 9.1.0-27413620102
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/bin/adf-cli +15 -3
- package/package.json +11 -14
- package/resources/license-collector.cjs +192 -0
- package/scripts/audit.d.ts.map +1 -1
- package/scripts/audit.js +64 -13
- package/scripts/audit.js.map +1 -1
- package/scripts/changelog.d.ts.map +1 -1
- package/scripts/changelog.js +96 -29
- package/scripts/changelog.js.map +1 -1
- package/scripts/check-cs-env.d.ts.map +1 -1
- package/scripts/check-cs-env.js +55 -15
- package/scripts/check-cs-env.js.map +1 -1
- package/scripts/check-plugin-env.d.ts.map +1 -1
- package/scripts/check-plugin-env.js +66 -13
- package/scripts/check-plugin-env.js.map +1 -1
- package/scripts/index.d.ts +0 -2
- package/scripts/index.d.ts.map +1 -1
- package/scripts/index.js +0 -2
- package/scripts/index.js.map +1 -1
- package/scripts/init-aae-env.d.ts +0 -1
- package/scripts/init-aae-env.d.ts.map +1 -1
- package/scripts/init-aae-env.js +91 -27
- package/scripts/init-aae-env.js.map +1 -1
- package/scripts/init-acs-env.d.ts.map +1 -1
- package/scripts/init-acs-env.js +264 -124
- package/scripts/init-acs-env.js.map +1 -1
- package/scripts/init-aps-env.d.ts.map +1 -1
- package/scripts/init-aps-env.js +177 -85
- package/scripts/init-aps-env.js.map +1 -1
- package/scripts/licenses.d.ts.map +1 -1
- package/scripts/licenses.js +76 -70
- package/scripts/licenses.js.map +1 -1
- package/scripts/plugins/check-env.js +6 -1
- package/scripts/plugins/check-env.js.map +1 -1
- package/scripts/plugins/governance-check-plugin.js +3 -0
- package/scripts/plugins/governance-check-plugin.js.map +1 -1
- package/scripts/plugins/governance-health.js +2 -0
- package/scripts/plugins/governance-health.js.map +1 -1
- package/scripts/plugins/plugin-config.js +2 -0
- package/scripts/plugins/plugin-config.js.map +1 -1
- package/scripts/plugins/process-automation-check-plugin.js +3 -0
- package/scripts/plugins/process-automation-check-plugin.js.map +1 -1
- package/scripts/plugins/process-automation-health.js +4 -2
- package/scripts/plugins/process-automation-health.js.map +1 -1
- package/scripts/plugins/process-service-check-plugin.js +3 -0
- package/scripts/plugins/process-service-check-plugin.js.map +1 -1
- package/scripts/plugins/process-services-health.js +4 -2
- package/scripts/plugins/process-services-health.js.map +1 -1
- package/scripts/docker.d.ts +0 -39
- package/scripts/docker.d.ts.map +0 -1
- package/scripts/docker.js +0 -192
- package/scripts/docker.js.map +0 -1
- package/scripts/exec.d.ts +0 -30
- package/scripts/exec.d.ts.map +0 -1
- package/scripts/exec.js +0 -56
- package/scripts/exec.js.map +0 -1
package/bin/adf-cli
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const { parseArgs } = require('node:util');
|
|
3
3
|
const { resolve, join } = require('node:path');
|
|
4
4
|
const { readFileSync, existsSync } = require('node:fs');
|
|
5
5
|
const { argv, exit, env, cwd } = require('node:process');
|
|
@@ -10,10 +10,22 @@ function printHelp() {
|
|
|
10
10
|
console.log(`${name} v${version}`);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
const
|
|
14
|
-
|
|
13
|
+
const { values, positionals } = parseArgs({
|
|
14
|
+
args: argv.slice(2),
|
|
15
|
+
options: {
|
|
16
|
+
verbose: {
|
|
17
|
+
type: 'boolean'
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
allowPositionals: true,
|
|
21
|
+
strict: false
|
|
15
22
|
});
|
|
16
23
|
|
|
24
|
+
const args = {
|
|
25
|
+
...values,
|
|
26
|
+
_: positionals
|
|
27
|
+
};
|
|
28
|
+
|
|
17
29
|
if (args._.length === 0) {
|
|
18
30
|
printHelp();
|
|
19
31
|
exit(1);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfresco/adf-cli",
|
|
3
3
|
"description": "Alfresco ADF cli and utils",
|
|
4
|
-
"version": "9.1.0-
|
|
4
|
+
"version": "9.1.0-27413620102",
|
|
5
5
|
"author": "Hyland Software, Inc. and its affiliates",
|
|
6
6
|
"bin": {
|
|
7
7
|
"adf-cli": "bin/adf-cli",
|
|
@@ -14,19 +14,10 @@
|
|
|
14
14
|
"bugs": {
|
|
15
15
|
"url": "https://github.com/Alfresco/alfresco-ng2-components/issues"
|
|
16
16
|
},
|
|
17
|
-
"scripts": {
|
|
18
|
-
"build": "tsc -p tsconfig.json",
|
|
19
|
-
"develop": "tsc -p tsconfig.json --watch",
|
|
20
|
-
"dist": "rm -rf ../../dist/libs/cli && npm run build && cp -R ./bin ../../dist/libs/cli && cp -R ./resources ../../dist/libs/cli && cp -R ./templates ../../dist/libs/cli && cp ./package.json ../../dist/libs/cli"
|
|
21
|
-
},
|
|
22
17
|
"dependencies": {
|
|
23
|
-
"@alfresco/js-api": ">=
|
|
24
|
-
"
|
|
25
|
-
"ejs": "^3.1.9",
|
|
26
|
-
"license-checker": "^25.0.1",
|
|
18
|
+
"@alfresco/js-api": ">=9.6.0-27413620102",
|
|
19
|
+
"ejs": "^3.1.10",
|
|
27
20
|
"node-fetch": "^2.7.0",
|
|
28
|
-
"rxjs": "7.8.2",
|
|
29
|
-
"shelljs": "^0.8.3",
|
|
30
21
|
"spdx-license-list": "^5.0.0"
|
|
31
22
|
},
|
|
32
23
|
"keywords": [
|
|
@@ -36,7 +27,13 @@
|
|
|
36
27
|
"devDependencies": {
|
|
37
28
|
"@types/ejs": "^3.1.2",
|
|
38
29
|
"@types/node": "^20.1.7",
|
|
39
|
-
"@types/shelljs": "^0.8.12",
|
|
40
30
|
"typescript": "^4.9.5"
|
|
31
|
+
},
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "tsc -p tsconfig.json",
|
|
34
|
+
"develop": "tsc -p tsconfig.json --watch",
|
|
35
|
+
"dist": "rm -rf ../../dist/libs/cli && npm run build && cp -R ./bin ../../dist/libs/cli && cp -R ./resources ../../dist/libs/cli && cp -R ./templates ../../dist/libs/cli && cp ./package.json ../../dist/libs/cli",
|
|
36
|
+
"link": "npm run dist && cd ../../dist/libs/cli && npm link",
|
|
37
|
+
"unlink": "cd ../../dist/libs/cli && npm unlink"
|
|
41
38
|
}
|
|
42
|
-
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const fs = require('node:fs');
|
|
19
|
+
const path = require('node:path');
|
|
20
|
+
|
|
21
|
+
function readJson(filePath) {
|
|
22
|
+
return JSON.parse(fs.readFileSync(filePath, 'utf8'));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function resolvePackageJson(packageName, fromDirectory) {
|
|
26
|
+
try {
|
|
27
|
+
return require.resolve(`${packageName}/package.json`, {
|
|
28
|
+
paths: [fromDirectory]
|
|
29
|
+
});
|
|
30
|
+
} catch {
|
|
31
|
+
return '';
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function getRepositoryUrl(repository) {
|
|
36
|
+
if (typeof repository === 'string') {
|
|
37
|
+
return repository;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (repository && typeof repository === 'object' && typeof repository.url === 'string') {
|
|
41
|
+
return repository.url;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return '';
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function getRawLicenseExpression(packageJson) {
|
|
48
|
+
if (typeof packageJson.license === 'string' && packageJson.license.trim()) {
|
|
49
|
+
return packageJson.license.trim();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (packageJson.license && typeof packageJson.license === 'object' && typeof packageJson.license.type === 'string') {
|
|
53
|
+
return packageJson.license.type.trim();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (Array.isArray(packageJson.licenses)) {
|
|
57
|
+
const values = packageJson.licenses
|
|
58
|
+
.map((entry) => {
|
|
59
|
+
if (typeof entry === 'string') {
|
|
60
|
+
return entry.trim();
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (entry && typeof entry === 'object' && typeof entry.type === 'string') {
|
|
64
|
+
return entry.type.trim();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return '';
|
|
68
|
+
})
|
|
69
|
+
.filter(Boolean);
|
|
70
|
+
|
|
71
|
+
if (values.length > 0) {
|
|
72
|
+
return values.join(' OR ');
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return 'UNKNOWN';
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function extractLicenseTokens(rawExpression) {
|
|
80
|
+
const tokens = (rawExpression || '').match(/[A-Za-z0-9-.+]+/g) || [];
|
|
81
|
+
const operators = new Set(['AND', 'OR', 'WITH']);
|
|
82
|
+
|
|
83
|
+
return tokens.map((token) => token.toUpperCase()).filter((token) => !operators.has(token));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function hasDeniedLicense(rawExpression, denyList) {
|
|
87
|
+
const licenseTokens = extractLicenseTokens(rawExpression);
|
|
88
|
+
|
|
89
|
+
return denyList.some((rule) => {
|
|
90
|
+
const normalizedRule = (rule || '').trim().toUpperCase();
|
|
91
|
+
if (!normalizedRule) {
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Treat common copyleft family keywords as SPDX id prefixes.
|
|
96
|
+
if (normalizedRule === 'GPL' || normalizedRule === 'LGPL' || normalizedRule === 'AGPL') {
|
|
97
|
+
return licenseTokens.some((token) => token === normalizedRule || token.startsWith(`${normalizedRule}-`));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Support explicit wildcard rules like "GPL-*".
|
|
101
|
+
if (normalizedRule.endsWith('*')) {
|
|
102
|
+
const prefix = normalizedRule.slice(0, -1);
|
|
103
|
+
return prefix.length > 0 && licenseTokens.some((token) => token.startsWith(prefix));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Otherwise require exact SPDX token match.
|
|
107
|
+
return licenseTokens.includes(normalizedRule);
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function getDependencyNames(packageJson) {
|
|
112
|
+
return Array.from(new Set([...Object.keys(packageJson.dependencies || {}), ...Object.keys(packageJson.optionalDependencies || {})]));
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function collectProductionLicenses(packagePath, options = {}) {
|
|
116
|
+
const packageJsonFile = readJson(packagePath);
|
|
117
|
+
const mainDependencies = getDependencyNames(packageJsonFile);
|
|
118
|
+
const packageDirectory = path.dirname(packagePath);
|
|
119
|
+
const missingRepositories = options.missingRepositories || {};
|
|
120
|
+
const denyList = options.denyList || [];
|
|
121
|
+
|
|
122
|
+
const queue = mainDependencies.map((name) => ({
|
|
123
|
+
name,
|
|
124
|
+
fromDirectory: packageDirectory
|
|
125
|
+
}));
|
|
126
|
+
|
|
127
|
+
const visited = new Set();
|
|
128
|
+
const packages = [];
|
|
129
|
+
const deniedPackages = [];
|
|
130
|
+
|
|
131
|
+
for (const current of queue) {
|
|
132
|
+
const packageJsonPath = resolvePackageJson(current.name, current.fromDirectory);
|
|
133
|
+
|
|
134
|
+
if (!packageJsonPath || !fs.existsSync(packageJsonPath)) {
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const currentPackage = readJson(packageJsonPath);
|
|
139
|
+
const name = currentPackage.name || current.name;
|
|
140
|
+
const version = currentPackage.version || 'unknown';
|
|
141
|
+
const packageFolder = path.dirname(packageJsonPath);
|
|
142
|
+
const uniqueKey = `${name}@${version}:${packageFolder}`;
|
|
143
|
+
|
|
144
|
+
if (visited.has(uniqueKey)) {
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
visited.add(uniqueKey);
|
|
148
|
+
|
|
149
|
+
const rawLicenseExpression = getRawLicenseExpression(currentPackage);
|
|
150
|
+
const packageKey = `${name}@${version}`;
|
|
151
|
+
const repository = getRepositoryUrl(currentPackage.repository) || missingRepositories[name] || '';
|
|
152
|
+
|
|
153
|
+
const record = {
|
|
154
|
+
key: packageKey,
|
|
155
|
+
name,
|
|
156
|
+
version,
|
|
157
|
+
repository,
|
|
158
|
+
rawLicenseExpression,
|
|
159
|
+
dependencies: currentPackage.dependencies || {},
|
|
160
|
+
optionalDependencies: currentPackage.optionalDependencies || {}
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
packages.push(record);
|
|
164
|
+
|
|
165
|
+
if (hasDeniedLicense(rawLicenseExpression, denyList)) {
|
|
166
|
+
deniedPackages.push(`${packageKey}: ${rawLicenseExpression}`);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
const dependencies = getDependencyNames(currentPackage);
|
|
170
|
+
for (const dependencyName of dependencies) {
|
|
171
|
+
queue.push({
|
|
172
|
+
name: dependencyName,
|
|
173
|
+
fromDirectory: packageFolder
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
packages.sort((a, b) => {
|
|
179
|
+
const nameCompare = a.name.localeCompare(b.name);
|
|
180
|
+
if (nameCompare !== 0) {
|
|
181
|
+
return nameCompare;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
return a.version.localeCompare(b.version);
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
return { packages, deniedPackages };
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
module.exports = {
|
|
191
|
+
collectProductionLicenses
|
|
192
|
+
};
|
package/scripts/audit.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../../../lib/cli/scripts/audit.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;GAeG;
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../../../lib/cli/scripts/audit.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;GAeG;AAcH;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,oBA0H/D"}
|
package/scripts/audit.js
CHANGED
|
@@ -51,13 +51,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
51
51
|
})();
|
|
52
52
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
53
|
exports.default = main;
|
|
54
|
-
const
|
|
54
|
+
const node_child_process_1 = require("node:child_process");
|
|
55
55
|
const ejs = __importStar(require("ejs"));
|
|
56
56
|
const path = __importStar(require("path"));
|
|
57
57
|
const fs = __importStar(require("fs"));
|
|
58
58
|
const node_process_1 = require("node:process");
|
|
59
|
-
const
|
|
60
|
-
const program = new commander_1.Command();
|
|
59
|
+
const node_util_1 = require("node:util");
|
|
61
60
|
/**
|
|
62
61
|
* Audit report command
|
|
63
62
|
*
|
|
@@ -66,17 +65,37 @@ const program = new commander_1.Command();
|
|
|
66
65
|
* @returns void
|
|
67
66
|
*/
|
|
68
67
|
function main(_args, workingDir) {
|
|
69
|
-
program
|
|
70
|
-
.description('Generate an audit report')
|
|
71
|
-
.usage('audit [options]')
|
|
72
|
-
.option('-p, --package <path>', 'Path to package file (default: package.json in working directory)')
|
|
73
|
-
.option('-d, --outDir <dir>', 'Ouput directory (default: working directory)')
|
|
74
|
-
.parse(node_process_1.argv);
|
|
75
68
|
if (node_process_1.argv.includes('-h') || node_process_1.argv.includes('--help')) {
|
|
76
|
-
|
|
69
|
+
console.log(`
|
|
70
|
+
Usage: audit [options]
|
|
71
|
+
|
|
72
|
+
Generate an audit report
|
|
73
|
+
|
|
74
|
+
Options:
|
|
75
|
+
-p, --package <path> Path to package file (default: package.json in working directory)
|
|
76
|
+
-d, --outDir <dir> Output directory (default: working directory)
|
|
77
|
+
-h, --help Display help for command
|
|
78
|
+
`);
|
|
77
79
|
(0, node_process_1.exit)(0);
|
|
78
80
|
}
|
|
79
|
-
const
|
|
81
|
+
const { values } = (0, node_util_1.parseArgs)({
|
|
82
|
+
args: node_process_1.argv.slice(2),
|
|
83
|
+
options: {
|
|
84
|
+
package: {
|
|
85
|
+
type: 'string',
|
|
86
|
+
short: 'p'
|
|
87
|
+
},
|
|
88
|
+
outDir: {
|
|
89
|
+
type: 'string',
|
|
90
|
+
short: 'd'
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
allowPositionals: true
|
|
94
|
+
});
|
|
95
|
+
const options = {
|
|
96
|
+
package: values.package,
|
|
97
|
+
outDir: values.outDir
|
|
98
|
+
};
|
|
80
99
|
let packagePath = path.resolve(workingDir, 'package.json');
|
|
81
100
|
if (options.package) {
|
|
82
101
|
packagePath = path.resolve(options.package);
|
|
@@ -94,8 +113,40 @@ function main(_args, workingDir) {
|
|
|
94
113
|
// eslint-disable-next-line no-console
|
|
95
114
|
console.log(`Running audit on ${packagePath}`);
|
|
96
115
|
const packageJson = JSON.parse(fs.readFileSync(packagePath).toString());
|
|
97
|
-
|
|
98
|
-
const
|
|
116
|
+
// Run in the directory containing the package.json
|
|
117
|
+
const packageDir = path.dirname(packagePath);
|
|
118
|
+
// Use spawnSync with array arguments for safer command execution (prevents shell injection)
|
|
119
|
+
// Cross-platform: npm is available on PATH on all platforms (Windows, macOS, Linux)
|
|
120
|
+
const result = (0, node_child_process_1.spawnSync)('npm', ['audit', '--json', '--prod'], {
|
|
121
|
+
cwd: packageDir,
|
|
122
|
+
encoding: 'utf-8',
|
|
123
|
+
// shell: false is the default and more secure (no shell interpretation)
|
|
124
|
+
shell: false,
|
|
125
|
+
// Set maxBuffer to handle large audit outputs
|
|
126
|
+
maxBuffer: 10 * 1024 * 1024 // 10MB
|
|
127
|
+
});
|
|
128
|
+
let jsonAudit;
|
|
129
|
+
// npm audit returns non-zero exit code when vulnerabilities are found
|
|
130
|
+
// We still want to parse the JSON output in this case
|
|
131
|
+
if (result.error) {
|
|
132
|
+
console.error('Failed to run npm audit:', result.error.message);
|
|
133
|
+
reject(result.error);
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
const auditOutput = result.stdout;
|
|
137
|
+
if (!auditOutput) {
|
|
138
|
+
console.error('npm audit produced no output');
|
|
139
|
+
reject(new Error('npm audit produced no output'));
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
try {
|
|
143
|
+
jsonAudit = JSON.parse(auditOutput);
|
|
144
|
+
}
|
|
145
|
+
catch (parseError) {
|
|
146
|
+
console.error('Failed to parse npm audit output');
|
|
147
|
+
reject(parseError);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
99
150
|
ejs.renderFile(templatePath, {
|
|
100
151
|
jsonAudit,
|
|
101
152
|
projVersion: packageJson.version,
|
package/scripts/audit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../../../lib/cli/scripts/audit.ts"],"names":[],"mappings":";;AAEA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../../../lib/cli/scripts/audit.ts"],"names":[],"mappings":";;AAEA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqB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],"mappings":";AAEA;;;;;;;;;;;;;;;GAeG;
|
|
1
|
+
{"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../../../../lib/cli/scripts/changelog.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;GAeG;AAwJH;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,oBAiI/D"}
|
package/scripts/changelog.js
CHANGED
|
@@ -53,13 +53,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
53
53
|
exports.default = main;
|
|
54
54
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
55
55
|
const node_process_1 = require("node:process");
|
|
56
|
-
const
|
|
56
|
+
const node_util_1 = require("node:util");
|
|
57
|
+
const node_child_process_1 = require("node:child_process");
|
|
57
58
|
const path = __importStar(require("path"));
|
|
58
|
-
const commander_1 = require("commander");
|
|
59
59
|
const logger_1 = require("./logger");
|
|
60
60
|
const fs = __importStar(require("fs"));
|
|
61
61
|
const ejs = __importStar(require("ejs"));
|
|
62
|
-
const program = new commander_1.Command();
|
|
63
62
|
/**
|
|
64
63
|
* Get the remote URL for the cloned git repository
|
|
65
64
|
*
|
|
@@ -67,9 +66,19 @@ const program = new commander_1.Command();
|
|
|
67
66
|
* @returns URL pointing to the git remote
|
|
68
67
|
*/
|
|
69
68
|
function getRemote(workingDir) {
|
|
70
|
-
|
|
71
|
-
const
|
|
72
|
-
|
|
69
|
+
// Use spawnSync with array arguments for safer command execution (prevents shell injection)
|
|
70
|
+
const result = (0, node_child_process_1.spawnSync)('git', ['config', '--get', 'remote.origin.url'], {
|
|
71
|
+
cwd: workingDir,
|
|
72
|
+
encoding: 'utf-8',
|
|
73
|
+
shell: false
|
|
74
|
+
});
|
|
75
|
+
if (result.error) {
|
|
76
|
+
throw new Error(`Failed to get git remote: ${result.error.message}`);
|
|
77
|
+
}
|
|
78
|
+
if (result.status !== 0) {
|
|
79
|
+
throw new Error(`git config command failed with exit code ${result.status}: ${result.stderr}`);
|
|
80
|
+
}
|
|
81
|
+
return result.stdout.trim();
|
|
73
82
|
}
|
|
74
83
|
/**
|
|
75
84
|
* Get the list of commits based on the configuration options
|
|
@@ -85,14 +94,14 @@ function getCommits(options) {
|
|
|
85
94
|
if (!authorFilter) {
|
|
86
95
|
authorFilter = `bot|Alfresco Build User`;
|
|
87
96
|
}
|
|
97
|
+
// Build git command arguments array for safe execution (prevents shell injection)
|
|
88
98
|
const args = [
|
|
89
|
-
|
|
90
|
-
`log`,
|
|
99
|
+
'log',
|
|
91
100
|
options.range,
|
|
92
|
-
|
|
93
|
-
|
|
101
|
+
'--no-merges',
|
|
102
|
+
'--first-parent',
|
|
94
103
|
// this format is needed to allow parsing all characters in the commit message and safely convert to JSON
|
|
95
|
-
|
|
104
|
+
'--format={ ^@^hash^@^: ^@^%h^@^, ^@^author^@^: ^@^%an^@^, ^@^author_email^@^: ^@^%ae^@^, ^@^date^@^: ^@^%ad^@^, ^@^subject^@^: ^@^%s^@^ }'
|
|
96
105
|
];
|
|
97
106
|
if (options.max !== undefined) {
|
|
98
107
|
args.push(`--max-count=${options.max}`);
|
|
@@ -100,8 +109,20 @@ function getCommits(options) {
|
|
|
100
109
|
if (options.skip !== undefined) {
|
|
101
110
|
args.push(`--skip=${options.skip}`);
|
|
102
111
|
}
|
|
103
|
-
|
|
104
|
-
|
|
112
|
+
// Use spawnSync with array arguments for safer command execution
|
|
113
|
+
const result = (0, node_child_process_1.spawnSync)('git', args, {
|
|
114
|
+
cwd: options.dir,
|
|
115
|
+
encoding: 'utf-8',
|
|
116
|
+
shell: false,
|
|
117
|
+
maxBuffer: 10 * 1024 * 1024 // 10MB to handle large git logs
|
|
118
|
+
});
|
|
119
|
+
if (result.error) {
|
|
120
|
+
throw new Error(`Failed to get git commits: ${result.error.message}`);
|
|
121
|
+
}
|
|
122
|
+
if (result.status !== 0) {
|
|
123
|
+
throw new Error(`git log command failed with exit code ${result.status}: ${result.stderr}`);
|
|
124
|
+
}
|
|
125
|
+
let log = result.stdout;
|
|
105
126
|
// https://stackoverflow.com/a/13928240/14644447
|
|
106
127
|
log = JSON.stringify(log.trim()).slice(1, -1).replace(/\^@\^/gm, '"');
|
|
107
128
|
if (log.endsWith(',')) {
|
|
@@ -140,25 +161,71 @@ function commitAuthorAllowed(commit, authorFilter) {
|
|
|
140
161
|
* @returns void
|
|
141
162
|
*/
|
|
142
163
|
function main(_args, workingDir) {
|
|
143
|
-
program
|
|
144
|
-
.description('Generate changelog report for two branches of git repository')
|
|
145
|
-
.version('0.0.1', '-v, --version')
|
|
146
|
-
.usage('changelog [options]')
|
|
147
|
-
.option('-r, --range <range>', 'Commit range, e.g. origin/master..develop', 'origin/master..develop')
|
|
148
|
-
.option('-d, --dir <dir>', 'Working directory (default: working directory)')
|
|
149
|
-
.option('-m, --max <number>', 'Limit the number of commits to output')
|
|
150
|
-
.option('-o, --output <dir>', 'Output directory, will use console output if not defined')
|
|
151
|
-
.option('--skip <number>', 'Skip number commits before starting to show the commit output')
|
|
152
|
-
.option('-f, --format <format>', 'Output format (md, html)', 'md')
|
|
153
|
-
.option('-e --exclude <string>', 'Exclude authors from the output, comma-delimited list')
|
|
154
|
-
.parse(node_process_1.argv);
|
|
155
164
|
if (node_process_1.argv.includes('-h') || node_process_1.argv.includes('--help')) {
|
|
156
|
-
|
|
165
|
+
console.log(`
|
|
166
|
+
Usage: changelog [options]
|
|
167
|
+
|
|
168
|
+
Generate changelog report for two branches of git repository
|
|
169
|
+
|
|
170
|
+
Options:
|
|
171
|
+
-v, --version Output the version number
|
|
172
|
+
-r, --range <range> Commit range, e.g. origin/master..develop (default: "origin/master..develop")
|
|
173
|
+
-d, --dir <dir> Working directory (default: working directory)
|
|
174
|
+
-m, --max <number> Limit the number of commits to output
|
|
175
|
+
-o, --output <dir> Output directory, will use console output if not defined
|
|
176
|
+
--skip <number> Skip number commits before starting to show the commit output
|
|
177
|
+
-f, --format <format> Output format (md, html) (default: "md")
|
|
178
|
+
-e, --exclude <string> Exclude authors from the output, comma-delimited list
|
|
179
|
+
-h, --help Display help for command
|
|
180
|
+
`);
|
|
181
|
+
(0, node_process_1.exit)(0);
|
|
182
|
+
}
|
|
183
|
+
if (node_process_1.argv.includes('-v') || node_process_1.argv.includes('--version')) {
|
|
184
|
+
console.log('0.0.1');
|
|
157
185
|
(0, node_process_1.exit)(0);
|
|
158
186
|
}
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
|
|
187
|
+
const { values } = (0, node_util_1.parseArgs)({
|
|
188
|
+
args: node_process_1.argv.slice(2),
|
|
189
|
+
options: {
|
|
190
|
+
range: {
|
|
191
|
+
type: 'string',
|
|
192
|
+
short: 'r',
|
|
193
|
+
default: 'origin/master..develop'
|
|
194
|
+
},
|
|
195
|
+
dir: {
|
|
196
|
+
type: 'string',
|
|
197
|
+
short: 'd'
|
|
198
|
+
},
|
|
199
|
+
max: {
|
|
200
|
+
type: 'string',
|
|
201
|
+
short: 'm'
|
|
202
|
+
},
|
|
203
|
+
output: {
|
|
204
|
+
type: 'string',
|
|
205
|
+
short: 'o'
|
|
206
|
+
},
|
|
207
|
+
skip: {
|
|
208
|
+
type: 'string'
|
|
209
|
+
},
|
|
210
|
+
format: {
|
|
211
|
+
type: 'string',
|
|
212
|
+
short: 'f',
|
|
213
|
+
default: 'md'
|
|
214
|
+
},
|
|
215
|
+
exclude: {
|
|
216
|
+
type: 'string',
|
|
217
|
+
short: 'e'
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
allowPositionals: true
|
|
221
|
+
});
|
|
222
|
+
const dir = path.resolve(values.dir || workingDir);
|
|
223
|
+
const range = values.range;
|
|
224
|
+
const skip = values.skip ? parseInt(values.skip, 10) : undefined;
|
|
225
|
+
const max = values.max ? parseInt(values.max, 10) : undefined;
|
|
226
|
+
const format = values.format;
|
|
227
|
+
const output = values.output;
|
|
228
|
+
const exclude = values.exclude;
|
|
162
229
|
const remote = getRemote(dir);
|
|
163
230
|
let repo_url = remote;
|
|
164
231
|
if (repo_url.endsWith('.git')) {
|
package/scripts/changelog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changelog.js","sourceRoot":"","sources":["../../../../lib/cli/scripts/changelog.ts"],"names":[],"mappings":";;AAEA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"changelog.js","sourceRoot":"","sources":["../../../../lib/cli/scripts/changelog.ts"],"names":[],"mappings":";;AAEA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+JH,uBAiIC;AA9RD,yDAAyD;AAEzD,+CAA0C;AAC1C,yCAAsC;AACtC,2DAA+C;AAC/C,2CAA6B;AAC7B,qCAAkC;AAClC,uCAAyB;AACzB,yCAA2B;AAiC3B;;;;;GAKG;AACH,SAAS,SAAS,CAAC,UAAkB;IACjC,4FAA4F;IAC5F,MAAM,MAAM,GAAG,IAAA,8BAAS,EAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,mBAAmB,CAAC,EAAE;QACtE,GAAG,EAAE,UAAU;QACf,QAAQ,EAAE,OAAO;QACjB,KAAK,EAAE,KAAK;KACf,CAAC,CAAC;IAEH,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,6BAA6B,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,4CAA4C,MAAM,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;IACnG,CAAC;IAED,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;AAChC,CAAC;AAED;;;;;GAKG;AACH,SAAS,UAAU,CAAC,OAAoB;I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AC,CACJ,CAAC;IACN,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-cs-env.d.ts","sourceRoot":"","sources":["../../../../lib/cli/scripts/check-cs-env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;
|
|
1
|
+
{"version":3,"file":"check-cs-env.d.ts","sourceRoot":"","sources":["../../../../lib/cli/scripts/check-cs-env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAoBH;;GAEG;AACH,wBAA8B,IAAI,kBA6DjC"}
|