@xrystal/core 3.55.69 → 3.55.74

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.
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env bash
2
+ # Telepresence OSS client (~2.31.x) — bundled with @xrystal/core (no external repo)
3
+ set -euo pipefail
4
+
5
+ VERSION="${TELEPRESENCE_VERSION:-2.31.2}"
6
+ DEST="${TELEPRESENCE_BIN:-${HOME}/.local/bin/telepresence}"
7
+
8
+ case "$(uname -s)-$(uname -m)" in
9
+ Darwin-arm64) ASSET=telepresence-darwin-arm64 ;;
10
+ Darwin-x86_64) ASSET=telepresence-darwin-amd64 ;;
11
+ Linux-x86_64) ASSET=telepresence-linux-amd64 ;;
12
+ Linux-aarch64|Linux-arm64) ASSET=telepresence-linux-arm64 ;;
13
+ *)
14
+ echo "Unsupported platform: $(uname -s) $(uname -m)" >&2
15
+ exit 1
16
+ ;;
17
+ esac
18
+
19
+ URL="https://github.com/telepresenceio/telepresence/releases/download/v${VERSION}/${ASSET}"
20
+ mkdir -p "$(dirname "$DEST")"
21
+ echo "Downloading Telepresence v${VERSION} (${ASSET})..."
22
+ curl -fsSL "$URL" -o "$DEST"
23
+ chmod +x "$DEST"
24
+ "$DEST" version
25
+ echo
26
+ echo "Installed: $DEST"
27
+ echo "Add to PATH if needed: export PATH=\"${HOME}/.local/bin:\$PATH\""
@@ -1,4 +1,4 @@
1
- FROM oven/bun:1.1-alpine AS builder
1
+ FROM oven/bun:1.4-alpine AS builder
2
2
  ARG SERVICE_PATH
3
3
  WORKDIR /app
4
4
 
@@ -13,7 +13,7 @@ ARG OUTPUT_DIR=x
13
13
  ENV ROOT_FOLDER_PATH=${OUTPUT_DIR}
14
14
  RUN bun run build
15
15
 
16
- FROM oven/bun:1.1-alpine
16
+ FROM oven/bun:1.4-alpine
17
17
  ARG OUTPUT_DIR=x
18
18
  ENV ROOT_FOLDER_PATH=${OUTPUT_DIR}
19
19
  WORKDIR /app
@@ -1,6 +1,6 @@
1
1
  ARG SERVICE_PATH
2
2
 
3
- FROM oven/bun:1.1-alpine AS base
3
+ FROM oven/bun:1.4-alpine AS base
4
4
  ARG SERVICE_PATH
5
5
  WORKDIR /app
6
6
 
@@ -9,7 +9,7 @@ COPY ${SERVICE_PATH}/package.json ${SERVICE_PATH}/bun.lockb* ./
9
9
  RUN --mount=type=cache,id=bun,target=/root/.bun/install/cache \
10
10
  bun install
11
11
 
12
- FROM oven/bun:1.1-alpine AS release
12
+ FROM oven/bun:1.4-alpine AS release
13
13
  ARG SERVICE_PATH
14
14
  WORKDIR /app
15
15
 
@@ -8,7 +8,7 @@ services:
8
8
  args:
9
9
  SERVICE_PATH: .
10
10
  env_file:
11
- - ../environments/.global.env
12
- - ../environments/.dev.env
11
+ - ../environments/.env.telepresence
12
+ - ../environments/.env.local
13
13
  ports:
14
14
  - "${PORT:-3000}:3000"
@@ -9,7 +9,7 @@ services:
9
9
  SERVICE_PATH: .
10
10
  OUTPUT_DIR: x
11
11
  env_file:
12
- - ../environments/.global.env
12
+ - ../environments/.env.telepresence
13
13
  - ../environments/.prod.env
14
14
  environment:
15
15
  NODE_ENV: production
@@ -1,90 +0,0 @@
1
- import fs from 'node:fs'
2
- import path from 'node:path'
3
- import { fileURLToPath } from 'node:url'
4
-
5
- import { getCliConfigInfraDir } from './xrystal-config.mjs'
6
-
7
- const __dirname = path.dirname(fileURLToPath(import.meta.url))
8
- const HELPERS_DIR = 'scripts/helpers'
9
-
10
- function infraRootHasHelpers(root) {
11
- if (!root) return false
12
- return fs.existsSync(path.join(root, HELPERS_DIR))
13
- }
14
-
15
- /** Walk cwd → parents; sibling `-infrastructure-` next to each ancestor folder. */
16
- export function walkUpForInfraRoot(start = process.cwd(), { maxDepth = 12 } = {}) {
17
- let dir = path.resolve(start)
18
- for (let depth = 0; depth < maxDepth; depth += 1) {
19
- const sibling = path.join(path.dirname(dir), '-infrastructure-')
20
- if (infraRootHasHelpers(sibling)) return sibling
21
-
22
- const parent = path.dirname(dir)
23
- if (parent === dir) break
24
- dir = parent
25
- }
26
- return null
27
- }
28
-
29
- export function listInfraRootCandidates(start = process.cwd()) {
30
- const seen = new Set()
31
- const out = []
32
-
33
- const push = (value) => {
34
- const resolved = value ? path.resolve(String(value)) : null
35
- if (!resolved || seen.has(resolved)) return
36
- seen.add(resolved)
37
- out.push(resolved)
38
- }
39
-
40
- push(process.env.XRYSTAL_INFRA_DIR)
41
- push(process.env.XRYSTAL_INFRA_ROOT)
42
- push(getCliConfigInfraDir())
43
- push(walkUpForInfraRoot(start))
44
- push(path.resolve(start, '../-infrastructure-'))
45
- push(path.resolve(start, '../../-infrastructure-'))
46
- push(path.resolve(__dirname, '../../../..', '-infrastructure-'))
47
-
48
- return out
49
- }
50
-
51
- function findHelperScriptUnderRoot(root, name) {
52
- const base = path.join(root, HELPERS_DIR)
53
- const direct = path.join(base, name)
54
- if (fs.existsSync(direct)) return direct
55
-
56
- let entries
57
- try {
58
- entries = fs.readdirSync(base, { withFileTypes: true })
59
- } catch {
60
- return null
61
- }
62
- for (const ent of entries) {
63
- if (!ent.isDirectory()) continue
64
- const nested = path.join(base, ent.name, name)
65
- if (fs.existsSync(nested)) return nested
66
- }
67
- return null
68
- }
69
-
70
- /** Resolve a script under -infrastructure-/scripts/helpers (incl. domain subdirs). */
71
- export function resolveInfraHelperScript(name, { cwd = process.cwd() } = {}) {
72
- for (const root of listInfraRootCandidates(cwd)) {
73
- const script = findHelperScriptUnderRoot(root, name)
74
- if (script) return script
75
- }
76
- return null
77
- }
78
-
79
- export function formatInfraResolveHint({ cliName = 'xry', cwd = process.cwd() } = {}) {
80
- const walked = walkUpForInfraRoot(cwd)
81
- const lines = [
82
- 'Set infra repo path (one of):',
83
- ` ${cliName} config infra /path/to/-infrastructure-`,
84
- ' export XRYSTAL_INFRA_DIR=/path/to/-infrastructure-',
85
- ]
86
- if (walked) {
87
- lines.push(` detected near cwd: ${walked}`)
88
- }
89
- return lines.join('\n')
90
- }