@sekyuriti/cloak 0.1.0 → 0.1.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/bin/cloak.js +15 -0
  2. package/package.json +1 -1
package/bin/cloak.js CHANGED
@@ -113,6 +113,17 @@ function printHeader() {
113
113
  }
114
114
 
115
115
  function loadConfig() {
116
+ // CI/CD: Use env vars if available (bypasses machine-specific encryption)
117
+ // Note: tier is NOT set here - it's fetched from the server via /license endpoint
118
+ if (process.env.SEKYURITI_CLOAK_API_KEY) {
119
+ return {
120
+ apiKey: process.env.SEKYURITI_CLOAK_API_KEY,
121
+ projectId: process.env.SEKYURITI_CLOAK_PROJECT_ID,
122
+ email: "ci@sekyuriti.build",
123
+ };
124
+ }
125
+
126
+ // Otherwise read from config file
116
127
  try {
117
128
  if (fs.existsSync(CONFIG_FILE)) {
118
129
  const config = JSON.parse(fs.readFileSync(CONFIG_FILE, "utf8"));
@@ -642,6 +653,10 @@ function cmdHelp() {
642
653
  log(" cloak protect app.js --domain-lock example.com,www.example.com");
643
654
  log(" cloak protect app.js --expiration 2025-12-31 --anti-debug");
644
655
  log("");
656
+ log(" CI/CD Environment Variables:");
657
+ log(" SEKYURITI_CLOAK_API_KEY API key (bypasses config file)");
658
+ log(" SEKYURITI_CLOAK_PROJECT_ID Project ID");
659
+ log("");
645
660
  }
646
661
 
647
662
  // ============================================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sekyuriti/cloak",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "JavaScript obfuscation CLI - code never leaves your machine",
5
5
  "main": "src/index.js",
6
6
  "bin": {