@curaious/uno 0.1.12 → 0.1.13

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.
Files changed (2) hide show
  1. package/bin/cli.js +17 -0
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -6,6 +6,7 @@ const fs = require('fs');
6
6
 
7
7
  const DEPLOYMENTS_DIR = path.join(__dirname, '..', 'deployments');
8
8
  const COMPOSE_FILE = path.join(DEPLOYMENTS_DIR, 'docker-compose.yaml');
9
+ const PACKAGE_JSON = path.join(__dirname, '..', 'package.json');
9
10
 
10
11
  const CYAN = '\x1b[36m';
11
12
  const GREEN = '\x1b[32m';
@@ -54,9 +55,25 @@ function runDockerCompose(args, options = {}) {
54
55
 
55
56
  log(`\n${DIM}Running: docker ${composeArgs.join(' ')}${RESET}\n`);
56
57
 
58
+ // Read version from package.json and construct full image name
59
+ let env = { ...process.env };
60
+ if (fs.existsSync(PACKAGE_JSON)) {
61
+ try {
62
+ const pkg = JSON.parse(fs.readFileSync(PACKAGE_JSON, 'utf8'));
63
+ if (pkg.version && !env.UNO_IMAGE) {
64
+ // Only set UNO_IMAGE if it's not already set (allows manual override)
65
+ env.UNO_IMAGE = `praveenraj9495/uno-gateway:${pkg.version}`;
66
+ log(`${DIM}Using Uno version: ${pkg.version}${RESET}\n`);
67
+ }
68
+ } catch (err) {
69
+ // If we can't read package.json, continue without version
70
+ }
71
+ }
72
+
57
73
  const proc = spawn('docker', composeArgs, {
58
74
  stdio: 'inherit',
59
75
  cwd: DEPLOYMENTS_DIR,
76
+ env: env,
60
77
  ...options
61
78
  });
62
79
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curaious/uno",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "Uno - AI Gateway and Agent Framework",
5
5
  "bin": {
6
6
  "uno": "./bin/cli.js"