bcbd1bdb22
Integ / changes (push) Has been skipped
Pre-commit / pre-commit (push) Failing after 1s
CLI exit codes / changes (push) Has been skipped
Test (Install) / changes (push) Has been skipped
Test (Python) / changes (push) Has been skipped
Test (TypeScript) / changes (push) Has been skipped
CLI exit codes / cli-gate (push) Has been cancelled
Test (Install) / test-install-gate (push) Has been cancelled
Integ / integ-gate (push) Has been cancelled
Test (Python) / test-python-gate (push) Has been cancelled
Test (TypeScript) / test-typescript-gate (push) Has been cancelled
Test (Install) / python-minimal (3.12) (push) Has been cancelled
Test (Install) / python-minimal (3.11) (push) Has been cancelled
Test (Install) / python-extra (agno, mirage.agents.agno) (push) Has been cancelled
Test (Install) / python-extra (chroma, mirage.resource.chroma) (push) Has been cancelled
Test (Install) / python-extra (pdf, mirage.core.filetype.pdf) (push) Has been cancelled
Integ / integ (push) Has been cancelled
Integ / integ-database (push) Has been cancelled
Integ / integ-database-ts (push) Has been cancelled
Integ / integ-data (push) Has been cancelled
Integ / integ-ssh (push) Has been cancelled
Integ / integ-ssh-ts (push) Has been cancelled
Test (Python) / audit (push) Has been cancelled
Test (TypeScript) / test (push) Has been cancelled
Test (TypeScript) / python-fs-shim (push) Has been cancelled
CLI exit codes / Python CLI (push) Has been cancelled
CLI exit codes / TypeScript CLI (push) Has been cancelled
CLI exit codes / Cross-language snapshot interop (push) Has been cancelled
Test (Python) / test (push) Has been cancelled
Test (Python) / import-isolation (deepagents, openai, mirage.agents.openai_agents) (push) Has been cancelled
Test (Python) / import-isolation (deepagents, pydantic-ai, mirage.agents.pydantic_ai) (push) Has been cancelled
Integ / integ-ts (push) Has been cancelled
Integ / integ-fuse (push) Has been cancelled
Test (Install) / python-extra (databricks, mirage.resource.databricks_volume) (push) Has been cancelled
Test (Install) / python-extra (deepagents, mirage.agents.langchain) (push) Has been cancelled
Test (Install) / python-extra (email, mirage.resource.email) (push) Has been cancelled
Test (Install) / python-extra (fuse, mirage.fuse.mount) (push) Has been cancelled
Test (Install) / python-extra (hdf5, mirage.core.filetype.hdf5) (push) Has been cancelled
Test (Install) / python-extra (hf, mirage.resource.hf_buckets) (push) Has been cancelled
Test (Install) / python-extra (lancedb, mirage.resource.lancedb) (push) Has been cancelled
Test (Install) / python-extra (langfuse, mirage.resource.langfuse) (push) Has been cancelled
Test (Install) / python-extra (mongodb, mirage.resource.mongodb) (push) Has been cancelled
Test (Install) / python-extra (nextcloud, mirage.resource.nextcloud) (push) Has been cancelled
Test (Install) / python-extra (openai, mirage.agents.openai_agents) (push) Has been cancelled
Test (Install) / python-extra (openhands, mirage.agents.openhands, 3.12) (push) Has been cancelled
Test (Install) / python-extra (parquet, mirage.core.filetype.parquet) (push) Has been cancelled
Test (Install) / python-extra (postgres, mirage.resource.postgres) (push) Has been cancelled
Test (Install) / python-extra (pydantic-ai, mirage.agents.pydantic_ai) (push) Has been cancelled
Test (Install) / python-extra (qdrant, mirage.resource.qdrant) (push) Has been cancelled
Test (Install) / python-extra (redis, mirage.resource.redis) (push) Has been cancelled
Test (Install) / python-extra (s3, mirage.resource.s3) (push) Has been cancelled
Test (Install) / python-extra (ssh, mirage.resource.ssh) (push) Has been cancelled
Test (Install) / ts-minimal (push) Has been cancelled
55 lines
1.8 KiB
Bash
Executable File
55 lines
1.8 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Source this file to export every key from .env.development as a shell env var.
|
|
# Works from any cwd. Resolves .env.development relative to this script's location.
|
|
# Parses dotenv format directly (no shell evaluation), so values containing
|
|
# `&`, `$`, `(`, etc. don't trip the shell parser.
|
|
#
|
|
# Usage:
|
|
# source typescript/scripts/load-env.sh # zsh / bash, from repo root
|
|
# . typescript/scripts/load-env.sh # POSIX-compatible
|
|
#
|
|
# After sourcing, run any example from any directory:
|
|
# pnpm tsx ../examples/typescript/trello/trello_fuse.ts
|
|
|
|
# Resolve script-relative path (zsh + bash compatible).
|
|
if [ -n "${BASH_SOURCE[0]:-}" ]; then
|
|
__HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
elif [ -n "${(%):-%x}" ]; then
|
|
__HERE="$(cd "$(dirname "${(%):-%x}")" && pwd)"
|
|
else
|
|
echo "load-env: cannot determine script location (must be sourced)" >&2
|
|
return 1 2>/dev/null || exit 1
|
|
fi
|
|
__ENV="$(cd "$__HERE/../.." && pwd)/.env.development"
|
|
unset __HERE
|
|
if [ ! -f "$__ENV" ]; then
|
|
echo "load-env: $__ENV not found" >&2
|
|
unset __ENV
|
|
return 1 2>/dev/null || exit 1
|
|
fi
|
|
|
|
# Parse dotenv lines: KEY=VALUE, skip comments / blanks. Strip optional
|
|
# matching surrounding quotes. No shell evaluation, so values containing
|
|
# `&`, `$`, `(`, etc. are safe.
|
|
__count=0
|
|
while IFS= read -r __line || [ -n "$__line" ]; do
|
|
case "$__line" in
|
|
''|'#'*) continue ;;
|
|
esac
|
|
__key="${__line%%=*}"
|
|
__val="${__line#*=}"
|
|
case "$__key" in
|
|
*[!A-Za-z0-9_]*|'') continue ;;
|
|
esac
|
|
# Strip matching wrapping quotes.
|
|
case "$__val" in
|
|
\"*\") __val="${__val#\"}"; __val="${__val%\"}" ;;
|
|
\'*\') __val="${__val#\'}"; __val="${__val%\'}" ;;
|
|
esac
|
|
export "$__key=$__val"
|
|
__count=$((__count + 1))
|
|
done < "$__ENV"
|
|
|
|
echo "loaded $__count vars from $__ENV"
|
|
unset __ENV __line __key __val __count
|