jokalala-cli 0.2.21 → 0.2.22
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 +12 -12
- package/bin/jokalala +1 -1
- package/package.json +50 -50
- package/scripts/postinstall.js +58 -58
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
# jokalala-cli
|
|
2
|
-
|
|
3
|
-
Enterprise-oriented static security scanner (Rust binary via npm optional deps).
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
npx jokalala-cli@latest scan --help
|
|
7
|
-
npx jokalala-cli@latest scan src/ --no-llm --fail-on high
|
|
8
|
-
```
|
|
9
|
-
|
|
10
|
-
Docs: [Quickstart](https://github.com/jkalala/jokalala/blob/main/docs/cli/QUICKSTART.md)
|
|
11
|
-
|
|
12
|
-
Requires Node 18+. Set `JOKALALA_API_KEY` for cloud analyze, or let the CLI auto-start `@jokalala/analyzer-engine` / local service.
|
|
1
|
+
# jokalala-cli
|
|
2
|
+
|
|
3
|
+
Enterprise-oriented static security scanner (Rust binary via npm optional deps).
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npx jokalala-cli@latest scan --help
|
|
7
|
+
npx jokalala-cli@latest scan src/ --no-llm --fail-on high
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
Docs: [Quickstart](https://github.com/jkalala/jokalala/blob/main/docs/cli/QUICKSTART.md)
|
|
11
|
+
|
|
12
|
+
Requires Node 18+. Set `JOKALALA_API_KEY` for cloud analyze, or let the CLI auto-start `@jokalala/analyzer-engine` / local service.
|
package/bin/jokalala
CHANGED
package/package.json
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "jokalala-cli",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "Jokalala Static Code Analyzer - Enterprise-grade security scanning CLI",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"security",
|
|
7
|
-
"static-analysis",
|
|
8
|
-
"vulnerability",
|
|
9
|
-
"scanner",
|
|
10
|
-
"cli",
|
|
11
|
-
"sast",
|
|
12
|
-
"code-analysis"
|
|
13
|
-
],
|
|
14
|
-
"author": "Jokalala Tecnologias",
|
|
15
|
-
"license": "MIT",
|
|
16
|
-
"repository": {
|
|
17
|
-
"type": "git",
|
|
18
|
-
"url": "https://github.com/jkalala/jokalala.git",
|
|
19
|
-
"directory": "cli-rust"
|
|
20
|
-
},
|
|
21
|
-
"homepage": "https://jokalala.com",
|
|
22
|
-
"bugs": {
|
|
23
|
-
"url": "https://github.com/jkalala/jokalala/issues"
|
|
24
|
-
},
|
|
25
|
-
"bin": {
|
|
26
|
-
"jokalala": "bin/jokalala"
|
|
27
|
-
},
|
|
28
|
-
"files": [
|
|
29
|
-
"bin",
|
|
30
|
-
"scripts",
|
|
31
|
-
"README.md",
|
|
32
|
-
"LICENSE"
|
|
33
|
-
],
|
|
34
|
-
"engines": {
|
|
35
|
-
"node": ">=18"
|
|
36
|
-
},
|
|
37
|
-
"publishConfig": {
|
|
38
|
-
"access": "public"
|
|
39
|
-
},
|
|
40
|
-
"scripts": {
|
|
41
|
-
"postinstall": "node scripts/postinstall.js"
|
|
42
|
-
},
|
|
43
|
-
"optionalDependencies": {
|
|
44
|
-
"@jokalala-cli/cli-win32-x64": "0.2.
|
|
45
|
-
"@jokalala-cli/cli-darwin-x64": "0.2.
|
|
46
|
-
"@jokalala-cli/cli-darwin-arm64": "0.2.
|
|
47
|
-
"@jokalala-cli/cli-linux-x64": "0.2.
|
|
48
|
-
"@jokalala-cli/cli-linux-arm64": "0.2.
|
|
49
|
-
}
|
|
50
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "jokalala-cli",
|
|
3
|
+
"version": "0.2.22",
|
|
4
|
+
"description": "Jokalala Static Code Analyzer - Enterprise-grade security scanning CLI",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"security",
|
|
7
|
+
"static-analysis",
|
|
8
|
+
"vulnerability",
|
|
9
|
+
"scanner",
|
|
10
|
+
"cli",
|
|
11
|
+
"sast",
|
|
12
|
+
"code-analysis"
|
|
13
|
+
],
|
|
14
|
+
"author": "Jokalala Tecnologias",
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/jkalala/jokalala.git",
|
|
19
|
+
"directory": "cli-rust"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://jokalala.com",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/jkalala/jokalala/issues"
|
|
24
|
+
},
|
|
25
|
+
"bin": {
|
|
26
|
+
"jokalala": "bin/jokalala"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"bin",
|
|
30
|
+
"scripts",
|
|
31
|
+
"README.md",
|
|
32
|
+
"LICENSE"
|
|
33
|
+
],
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=18"
|
|
36
|
+
},
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public"
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"postinstall": "node scripts/postinstall.js"
|
|
42
|
+
},
|
|
43
|
+
"optionalDependencies": {
|
|
44
|
+
"@jokalala-cli/cli-win32-x64": "0.2.22",
|
|
45
|
+
"@jokalala-cli/cli-darwin-x64": "0.2.22",
|
|
46
|
+
"@jokalala-cli/cli-darwin-arm64": "0.2.22",
|
|
47
|
+
"@jokalala-cli/cli-linux-x64": "0.2.22",
|
|
48
|
+
"@jokalala-cli/cli-linux-arm64": "0.2.22"
|
|
49
|
+
}
|
|
50
|
+
}
|
package/scripts/postinstall.js
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Post-install script to verify the platform binary is available.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
const fs = require('fs')
|
|
8
|
-
const path = require('path')
|
|
9
|
-
|
|
10
|
-
const PLATFORMS = {
|
|
11
|
-
'win32-x64': '@jokalala-cli/cli-win32-x64',
|
|
12
|
-
'darwin-x64': '@jokalala-cli/cli-darwin-x64',
|
|
13
|
-
'darwin-arm64': '@jokalala-cli/cli-darwin-arm64',
|
|
14
|
-
'linux-x64': '@jokalala-cli/cli-linux-x64',
|
|
15
|
-
'linux-arm64': '@jokalala-cli/cli-linux-arm64',
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function checkInstallation() {
|
|
19
|
-
const platformKey = `${process.platform}-${process.arch}`
|
|
20
|
-
const packageName = PLATFORMS[platformKey]
|
|
21
|
-
|
|
22
|
-
if (!packageName) {
|
|
23
|
-
console.warn(`\nJokalala CLI: Unsupported platform ${platformKey}`)
|
|
24
|
-
console.warn(` Supported platforms: ${Object.keys(PLATFORMS).join(', ')}`)
|
|
25
|
-
console.warn(
|
|
26
|
-
' You may need to build from source: cargo install --path cli-rust\n'
|
|
27
|
-
)
|
|
28
|
-
return
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
try {
|
|
32
|
-
const packagePath = require.resolve(`${packageName}/package.json`)
|
|
33
|
-
const packageDir = path.dirname(packagePath)
|
|
34
|
-
const binaryName =
|
|
35
|
-
process.platform === 'win32' ? 'jokalala.exe' : 'jokalala'
|
|
36
|
-
const binaryPath = path.join(packageDir, 'bin', binaryName)
|
|
37
|
-
|
|
38
|
-
if (fs.existsSync(binaryPath)) {
|
|
39
|
-
if (process.platform !== 'win32') {
|
|
40
|
-
try {
|
|
41
|
-
fs.chmodSync(binaryPath, 0o755)
|
|
42
|
-
} catch {
|
|
43
|
-
// Ignore chmod errors on read-only installs
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
console.log(`Jokalala CLI installed successfully for ${platformKey}`)
|
|
47
|
-
} else {
|
|
48
|
-
console.warn(`\nJokalala CLI: Binary not found at ${binaryPath}`)
|
|
49
|
-
console.warn(' Try reinstalling: npm install -g jokalala-cli\n')
|
|
50
|
-
}
|
|
51
|
-
} catch {
|
|
52
|
-
console.warn(`\nJokalala CLI: Platform package ${packageName} not found`)
|
|
53
|
-
console.warn(" This can happen with npm's optional dependency handling.")
|
|
54
|
-
console.warn(' Try: npm install -g jokalala-cli --force\n')
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
checkInstallation()
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Post-install script to verify the platform binary is available.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const fs = require('fs')
|
|
8
|
+
const path = require('path')
|
|
9
|
+
|
|
10
|
+
const PLATFORMS = {
|
|
11
|
+
'win32-x64': '@jokalala-cli/cli-win32-x64',
|
|
12
|
+
'darwin-x64': '@jokalala-cli/cli-darwin-x64',
|
|
13
|
+
'darwin-arm64': '@jokalala-cli/cli-darwin-arm64',
|
|
14
|
+
'linux-x64': '@jokalala-cli/cli-linux-x64',
|
|
15
|
+
'linux-arm64': '@jokalala-cli/cli-linux-arm64',
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function checkInstallation() {
|
|
19
|
+
const platformKey = `${process.platform}-${process.arch}`
|
|
20
|
+
const packageName = PLATFORMS[platformKey]
|
|
21
|
+
|
|
22
|
+
if (!packageName) {
|
|
23
|
+
console.warn(`\nJokalala CLI: Unsupported platform ${platformKey}`)
|
|
24
|
+
console.warn(` Supported platforms: ${Object.keys(PLATFORMS).join(', ')}`)
|
|
25
|
+
console.warn(
|
|
26
|
+
' You may need to build from source: cargo install --path cli-rust\n'
|
|
27
|
+
)
|
|
28
|
+
return
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
try {
|
|
32
|
+
const packagePath = require.resolve(`${packageName}/package.json`)
|
|
33
|
+
const packageDir = path.dirname(packagePath)
|
|
34
|
+
const binaryName =
|
|
35
|
+
process.platform === 'win32' ? 'jokalala.exe' : 'jokalala'
|
|
36
|
+
const binaryPath = path.join(packageDir, 'bin', binaryName)
|
|
37
|
+
|
|
38
|
+
if (fs.existsSync(binaryPath)) {
|
|
39
|
+
if (process.platform !== 'win32') {
|
|
40
|
+
try {
|
|
41
|
+
fs.chmodSync(binaryPath, 0o755)
|
|
42
|
+
} catch {
|
|
43
|
+
// Ignore chmod errors on read-only installs
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
console.log(`Jokalala CLI installed successfully for ${platformKey}`)
|
|
47
|
+
} else {
|
|
48
|
+
console.warn(`\nJokalala CLI: Binary not found at ${binaryPath}`)
|
|
49
|
+
console.warn(' Try reinstalling: npm install -g jokalala-cli\n')
|
|
50
|
+
}
|
|
51
|
+
} catch {
|
|
52
|
+
console.warn(`\nJokalala CLI: Platform package ${packageName} not found`)
|
|
53
|
+
console.warn(" This can happen with npm's optional dependency handling.")
|
|
54
|
+
console.warn(' Try: npm install -g jokalala-cli --force\n')
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
checkInstallation()
|