rcf-protocol 1.2.0 → 1.2.1

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/cli/index.js +11 -2
  2. package/package.json +1 -1
package/dist/cli/index.js CHANGED
@@ -52,8 +52,17 @@ program
52
52
  });
53
53
  program
54
54
  .command('audit [directory]')
55
- .description('Generate an RCF Audit Report')
56
- .action(async (directory = '.') => {
55
+ .description('Generate an RCF Audit Report (Premium Feature)')
56
+ .option('-k, --license-key <key>', 'RCF Audit License Key')
57
+ .action(async (directory = '.', options) => {
58
+ const licenseKey = options.licenseKey || process.env.RCF_LICENSE_KEY;
59
+ const uuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/;
60
+ if (!licenseKey || !licenseKey.startsWith('RCF-AUDIT-') || !uuidRegex.test(licenseKey.replace('RCF-AUDIT-', ''))) {
61
+ console.log(chalk_1.default.red("❌ RCF-PL ERROR: The 'audit' command is a premium feature."));
62
+ console.log(chalk_1.default.yellow(" Please provide a valid RCF-AUDIT license key via -k/--license-key or RCF_LICENSE_KEY env variable."));
63
+ console.log(chalk_1.default.blue(" Visit https://rcf.aliyev.site to obtain a license."));
64
+ process.exit(1);
65
+ }
57
66
  const parser = new MarkerParser_1.MarkerParser();
58
67
  const results = await parser.scan(directory);
59
68
  const auditReport = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rcf-protocol",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "RCF Protocol SDK for TypeScript/JavaScript",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",