rcf-protocol 1.2.0 → 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.
package/README.md CHANGED
@@ -21,6 +21,8 @@ npm install -D rcf-protocol
21
21
  - **Standardized Markers Check**: Identify `[RCF:PUBLIC]`, `[RCF:PROTECTED]`, `[RCF:RESTRICTED]`, and `[RCF:NOTICE]` markers in your codebase.
22
22
  - **Header Validation**: Ensure files have the required `NOTICE: This file is protected under RCF-PL v1.1` header.
23
23
  - **Automated Scanning**: Quickly scan projects for compliance.
24
+ - **RCF-Audit (Premium)**: Generate cryptographically signed compliance reports for enterprise auditing.
25
+
24
26
 
25
27
  ## CLI Usage
26
28
 
@@ -32,6 +34,9 @@ rcf-cli .
32
34
 
33
35
  # Scan with custom ignore list (in addition to .rcfignore)
34
36
  rcf-cli . --ignore node_modules,dist,.git
37
+
38
+ # Generate an RCF-Audit Report (Requires License)
39
+ rcf-cli audit . --license-key YOUR_RCF_AUDIT_KEY
35
40
  ```
36
41
 
37
42
  ## Markers Reference
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.2",
4
4
  "description": "RCF Protocol SDK for TypeScript/JavaScript",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",