juno-code 1.0.13 → 1.0.15
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/dist/bin/cli.js +7 -6
- package/dist/bin/cli.js.map +1 -1
- package/dist/bin/cli.mjs +7 -6
- package/dist/bin/cli.mjs.map +1 -1
- package/dist/bin/juno-code.sh +66 -0
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/dist/templates/scripts/bootstrap.sh +189 -0
- package/dist/templates/scripts/install_requirements.sh +126 -25
- package/package.json +5 -2
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
# juno-code.sh
|
|
4
|
+
#
|
|
5
|
+
# Purpose: Shell wrapper for juno-code CLI
|
|
6
|
+
#
|
|
7
|
+
# This script integrates bootstrap.sh with the main CLI entry point.
|
|
8
|
+
# When users run 'juno-code', this wrapper:
|
|
9
|
+
# 1. Checks if project is initialized (.juno_task exists)
|
|
10
|
+
# 2. If initialized: Runs bootstrap.sh to ensure Python environment is ready
|
|
11
|
+
# 3. Executes the actual TypeScript CLI with all arguments
|
|
12
|
+
#
|
|
13
|
+
# Architecture: juno-code = shell-shim + juno-code logic
|
|
14
|
+
#
|
|
15
|
+
# Created by: juno-code build system
|
|
16
|
+
# Auto-generated during npm build
|
|
17
|
+
|
|
18
|
+
set -euo pipefail
|
|
19
|
+
|
|
20
|
+
# Get the directory where this script is located
|
|
21
|
+
# IMPORTANT: Resolve symlinks first (npm creates symlinks in /usr/local/bin or /opt/homebrew/bin)
|
|
22
|
+
# We need the real path to find cli.mjs in the same directory
|
|
23
|
+
if [ -L "${BASH_SOURCE[0]}" ]; then
|
|
24
|
+
# Follow the symlink to get the real script location
|
|
25
|
+
REAL_SCRIPT="$(readlink "${BASH_SOURCE[0]}")"
|
|
26
|
+
# If it's a relative symlink, make it absolute relative to the symlink location
|
|
27
|
+
if [[ "$REAL_SCRIPT" != /* ]]; then
|
|
28
|
+
REAL_SCRIPT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && cd "$(dirname "$REAL_SCRIPT")" && pwd)/$(basename "$REAL_SCRIPT")"
|
|
29
|
+
fi
|
|
30
|
+
SCRIPT_DIR="$(cd "$(dirname "$REAL_SCRIPT")" && pwd)"
|
|
31
|
+
else
|
|
32
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
# Path to the actual CLI entrypoint (Node.js)
|
|
36
|
+
CLI_ENTRYPOINT="${SCRIPT_DIR}/cli.mjs"
|
|
37
|
+
|
|
38
|
+
# Path to bootstrap.sh (should be in .juno_task/scripts after init)
|
|
39
|
+
BOOTSTRAP_SCRIPT=".juno_task/scripts/bootstrap.sh"
|
|
40
|
+
|
|
41
|
+
# Main execution flow
|
|
42
|
+
main() {
|
|
43
|
+
# Check if we're in an initialized juno-code project
|
|
44
|
+
if [ -d ".juno_task" ] && [ -f "$BOOTSTRAP_SCRIPT" ]; then
|
|
45
|
+
# Project is initialized - use bootstrap.sh to setup environment and run CLI
|
|
46
|
+
# Bootstrap.sh will:
|
|
47
|
+
# 1. Check if we're in a venv
|
|
48
|
+
# 2. Check if .venv_juno exists, create if needed
|
|
49
|
+
# 3. Activate venv if needed
|
|
50
|
+
# 4. Execute the command we pass to it
|
|
51
|
+
|
|
52
|
+
# Make sure bootstrap script is executable
|
|
53
|
+
chmod +x "$BOOTSTRAP_SCRIPT" 2>/dev/null || true
|
|
54
|
+
|
|
55
|
+
# Delegate to bootstrap.sh with node CLI as the command to execute
|
|
56
|
+
# Bootstrap will setup environment then exec our CLI
|
|
57
|
+
exec "$BOOTSTRAP_SCRIPT" node "$CLI_ENTRYPOINT" "$@"
|
|
58
|
+
else
|
|
59
|
+
# Not initialized or bootstrap missing - run CLI directly
|
|
60
|
+
# This allows 'juno-code init' to work without bootstrap
|
|
61
|
+
exec node "$CLI_ENTRYPOINT" "$@"
|
|
62
|
+
fi
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
# Run main with all arguments
|
|
66
|
+
main "$@"
|
package/dist/index.js
CHANGED
|
@@ -75,7 +75,7 @@ var __export = (target, all) => {
|
|
|
75
75
|
exports.version = void 0;
|
|
76
76
|
var init_version = __esm({
|
|
77
77
|
"src/version.ts"() {
|
|
78
|
-
exports.version = "1.0.
|
|
78
|
+
exports.version = "1.0.15";
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
function isHeadlessEnvironment() {
|
|
@@ -10980,7 +10980,8 @@ var MCPConfigLoader = class {
|
|
|
10980
10980
|
});
|
|
10981
10981
|
if (serverConfig.env) {
|
|
10982
10982
|
for (const [envKey, envValue] of Object.entries(serverConfig.env)) {
|
|
10983
|
-
|
|
10983
|
+
const isUrl = /^[a-z][a-z0-9+.-]*:\/\//i.test(envValue);
|
|
10984
|
+
if (!isUrl && envValue.includes("/") && !path5__namespace.isAbsolute(envValue)) {
|
|
10984
10985
|
serverConfig.env[envKey] = path5__namespace.resolve(configDir, "..", envValue);
|
|
10985
10986
|
}
|
|
10986
10987
|
}
|