learn-secrets-sdk 1.11.17 → 1.11.18

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.
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ #!/usr/bin/env node
2
3
  import "./chunk-Y6FXYEAI.mjs";
3
4
 
4
5
  // src/cli/index.ts
package/package.json CHANGED
@@ -1,16 +1,15 @@
1
1
  {
2
2
  "name": "learn-secrets-sdk",
3
- "version": "1.11.17",
3
+ "version": "1.11.18",
4
4
  "description": "Secrets management SDK for static sites with Learn platform",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "bin": {
9
- "learn-secrets": "./bin/learn-secrets.cjs"
9
+ "learn-secrets": "./dist/cli/index.mjs"
10
10
  },
11
11
  "files": [
12
12
  "dist",
13
- "bin",
14
13
  "secrets.template.json"
15
14
  ],
16
15
  "repository": {
@@ -39,7 +38,7 @@
39
38
  "typescript": "^5.0.0"
40
39
  },
41
40
  "scripts": {
42
- "build": "tsup src/index.ts --format esm --dts && tsup src/browser-global.ts --format iife --no-splitting && tsup src/cli/index.ts --format esm --dts --out-dir dist/cli --external commander",
41
+ "build": "tsup src/index.ts --format esm --dts && tsup src/browser-global.ts --format iife --no-splitting && tsup src/cli/index.ts --format esm --dts --out-dir dist/cli --external commander && node -e \"const fs=require('fs');const f='dist/cli/index.mjs';fs.writeFileSync(f,'#!/usr/bin/env node\\n'+fs.readFileSync(f,'utf8'));fs.chmodSync(f,0o755);\"",
43
42
  "prepublishOnly": "npm run build"
44
43
  }
45
44
  }
@@ -1,20 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- // Entry point for the learn-secrets CLI
4
- // This file is executed when running: learn-secrets <command>
5
-
6
- // Check Node version
7
- const nodeVersion = process.versions.node;
8
- const majorVersion = parseInt(nodeVersion.split('.')[0], 10);
9
-
10
- if (majorVersion < 16) {
11
- console.error('Error: Node.js 16 or higher is required');
12
- console.error(`You are running Node.js ${nodeVersion}`);
13
- process.exit(1);
14
- }
15
-
16
- // Run the CLI (ESM module)
17
- import('../dist/cli/index.mjs').catch((err) => {
18
- console.error('Failed to load CLI:', err.message);
19
- process.exit(1);
20
- });