@rio-cloud/rio-license-checker 1.2.1 → 1.2.2

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.
Files changed (2) hide show
  1. package/dist/index.mjs +1 -12
  2. package/package.json +9 -12
package/dist/index.mjs CHANGED
@@ -7,7 +7,6 @@ import logger from "loglevel";
7
7
  import { GetObjectCommand, PutObjectCommand, S3Client } from "@aws-sdk/client-s3";
8
8
  import { GetParameterCommand, SSMClient } from "@aws-sdk/client-ssm";
9
9
  import { $, fs as fs$1, path as path$1 } from "zx";
10
-
11
10
  //#region src/s3/license-bucket.ts
12
11
  let ossLicensesBucketName;
13
12
  const OSS_LICENSES_BUCKET_NAME_SSM_PARAMETER = "/config/oss-licenses/bucket-name";
@@ -54,7 +53,6 @@ const uploadLicenseReport = async (accountName, serviceName, type, report) => {
54
53
  });
55
54
  await s3Client.send(putObjectCommand);
56
55
  };
57
-
58
56
  //#endregion
59
57
  //#region src/cli/downloadWhitelistFileCommand.ts
60
58
  const downloadWhitelistFileCommand = new Command("download-whitelist").description("Download the license whitelist (experimental)").addOption(new Option("-t, --type <type>", "Type of the license check. (only supports \"npm-frontend-bundled\" for now)").makeOptionMandatory(true).choices(["npm-frontend-bundled"])).option("-d, --directory <directory>", "Directory to save the downloaded whitelist file to", process.cwd()).option("-v, --verbose", "Enable debug logging", false).action(async ({ type, directory, verbose }) => {
@@ -72,7 +70,6 @@ const saveWhitelistFile = async (directory, checkType, content) => {
72
70
  await fs.promises.writeFile(filePath, content, "utf8");
73
71
  return filePath;
74
72
  };
75
-
76
73
  //#endregion
77
74
  //#region src/types.ts
78
75
  var LicenseCheckError = class extends Error {
@@ -92,7 +89,6 @@ const automaticWhitelists = [
92
89
  "npm-frontend",
93
90
  "gradle"
94
91
  ];
95
-
96
92
  //#endregion
97
93
  //#region src/integrations/license-checker-gradle.ts
98
94
  const normalizeLicenseReport = (report) => {
@@ -147,7 +143,6 @@ const discoverGradleWrapper = async (directory) => {
147
143
  if (fs$1.existsSync(path$1.join(directory, "..", "gradlew"))) return "../gradlew";
148
144
  throw new LicenseCheckError(`Could not find gradle wrapper in ${directory} or the parent directory. Please ensure that the gradle wrapper is present.`);
149
145
  };
150
-
151
146
  //#endregion
152
147
  //#region src/integrations/license-checker-npm.ts
153
148
  const resolveLicenseCheckerPath = () => {
@@ -174,7 +169,6 @@ const callNpmLicenseChecker = async ({ directory, licenseWhitelist, excludePacka
174
169
  if (result.exitCode !== 0) throw new LicenseCheckError(result.stderr.trimEnd());
175
170
  return result.stdout;
176
171
  };
177
-
178
172
  //#endregion
179
173
  //#region src/cli/validations.ts
180
174
  const validateAccountName = (accountName) => {
@@ -183,7 +177,6 @@ const validateAccountName = (accountName) => {
183
177
  const validateServiceName = (serviceName) => {
184
178
  if (!serviceName.match(/^[a-zA-Z0-9-_]+$/)) throw new CliArgsError("Service name must only contain alphanumeric characters, hyphens and underscores");
185
179
  };
186
-
187
180
  //#endregion
188
181
  //#region src/cli/runCheckCommand.ts
189
182
  const runCheckCommand = new Command("run-check").summary("(default) Run an automated license check and optionally upload the report to S3").description("This is the default command to be used for backend and \"traditional\" frontend projects.\n\nWill download the whitelist, then perform the check and upload the report in one single step.").addOption(new Option("-t, --type <type>", "Type of the license check").makeOptionMandatory(true).choices(automaticWhitelists)).option("-a, --account-name <account>", "Account / context name").option("-s, --service-name <service>", "Service name").option("-d, --directory <directory>", "Directory of the project to check licenses for", process.cwd()).option("-u, --upload", "Upload license report to S3", false).option("-v, --verbose", "Enable debug logging", false).action(async (options) => {
@@ -239,7 +232,6 @@ const readIgnorePackages = (directory) => {
239
232
  if (fs.existsSync(ignorePackagesFile)) ignorePackages = fs.readFileSync(ignorePackagesFile, "utf8").split("\n").filter((line) => line.trim() !== "");
240
233
  return ignorePackages;
241
234
  };
242
-
243
235
  //#endregion
244
236
  //#region src/cli/uploadReportCommand.ts
245
237
  const uploadReportCommand = new Command("upload-report").description("Upload a license report (placeholder)").addOption(new Option("-t, --type <type>", "Type of the license check. (only supports \"npm-frontend-bundled\" for now)").makeOptionMandatory(true).choices(["npm-frontend-bundled"])).addOption(new Option("-a, --account-name <account>", "Account / context name").makeOptionMandatory(true)).addOption(new Option("-s, --service-name <service>", "Service name").makeOptionMandatory(true)).addOption(new Option("-r, --report-file <file>", "Path to the license report file").makeOptionMandatory(true)).option("-v, --verbose", "Enable debug logging", false).action(async ({ type, accountName, serviceName, reportFile, verbose }) => {
@@ -251,7 +243,6 @@ const uploadReportCommand = new Command("upload-report").description("Upload a l
251
243
  await uploadLicenseReport(accountName, serviceName, type, reportFileContent);
252
244
  logger.info(`Uploaded license report for ${accountName}/${serviceName}_${type}`);
253
245
  });
254
-
255
246
  //#endregion
256
247
  //#region src/cli.ts
257
248
  const wrapCommand = (command) => command.exitOverride((error) => {
@@ -262,7 +253,6 @@ const cli = (args) => {
262
253
  program.name("npx @rio-cloud/rio-license-checker").addCommand(wrapCommand(runCheckCommand), { isDefault: true }).addCommand(wrapCommand(downloadWhitelistFileCommand)).addCommand(wrapCommand(uploadReportCommand)).addHelpText("after", `\n"run-check" is the default command if you don't specify one.\nRun "npx @rio-cloud/rio-license-checker help run-check" for details.`);
263
254
  return program.parseAsync(args);
264
255
  };
265
-
266
256
  //#endregion
267
257
  //#region src/index.ts
268
258
  try {
@@ -280,6 +270,5 @@ try {
280
270
  process.exit(1);
281
271
  }
282
272
  }
283
-
284
273
  //#endregion
285
- export { };
274
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rio-cloud/rio-license-checker",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -22,7 +22,8 @@
22
22
  "release": "npm run test && npm run bump",
23
23
  "release:alpha": "npm run release -- -- --prerelease alpha",
24
24
  "release:dry-run": "npm run release -- -- --dry-run",
25
- "release:push": "echo '✅ pushing release' && git push origin main --follow-tags"
25
+ "release:push": "echo '✅ pushing release' && git push origin main --follow-tags",
26
+ "release:publish": "./scripts/publish.sh"
26
27
  },
27
28
  "bin": {
28
29
  "rio-license-checker": "dist/index.mjs"
@@ -31,15 +32,15 @@
31
32
  "dist"
32
33
  ],
33
34
  "dependencies": {
34
- "@aws-sdk/client-s3": "3.993.0",
35
- "@aws-sdk/client-ssm": "3.993.0",
35
+ "@aws-sdk/client-s3": "3.1016.0",
36
+ "@aws-sdk/client-ssm": "3.1016.0",
36
37
  "commander": "14.0.3",
37
38
  "license-checker-rseidelsohn": "4.4.2",
38
39
  "loglevel": "1.9.2",
39
40
  "zx": "8.8.5"
40
41
  },
41
42
  "devDependencies": {
42
- "@biomejs/biome": "2.4.2",
43
+ "@biomejs/biome": "2.4.7",
43
44
  "@rio-cloud/biome-config-claid": "1.0.0",
44
45
  "@tsconfig/node22": "22.0.5",
45
46
  "@types/jest": "30.0.0",
@@ -49,21 +50,17 @@
49
50
  "aws-sdk-client-mock-jest": "4.1.0",
50
51
  "chalk": "5.6.2",
51
52
  "commit-and-tag-version": "12.6.1",
52
- "tsdown": "0.20.3",
53
+ "tsdown": "0.21.3",
53
54
  "typescript": "5.9.3",
54
55
  "vitest": "4.0.18"
55
56
  },
56
- "overrides": {
57
- "glob": ">=10.5.0",
58
- "minimatch": ">=10.2.1"
59
- },
60
57
  "commit-and-tag-version": {
61
58
  "commitUrlFormat": "https://bitbucket.collaboration-man.com/projects/RIODEV/repos/rio-license-checker/commits/{{hash}}",
62
59
  "compareUrlFormat": "{{host}}/projects/RIODEV/repos/rio-license-checker/compare/commits?targetBranch=refs%2Ftags%2F{{previousTag}}&sourceBranch=refs%2Ftags%2F{{currentTag}}",
63
60
  "issueUrlFormat": "https://jira.collaboration-man.com/browse/{{id}}"
64
61
  },
65
62
  "engines": {
66
- "node": ">= 20.x",
67
- "npm": "10.x || 11.x"
63
+ "node": ">=24",
64
+ "npm": ">=11"
68
65
  }
69
66
  }