@underlingscloud/cli 0.2.3 → 0.2.4

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.
@@ -21,14 +21,14 @@ const run = async (commandParts) => {
21
21
  if (!(0, auth_1.isAuthenticated)()) {
22
22
  console.error(chalk_1.default.red('Error: You are not logged in.'));
23
23
  console.log('Run "underlings auth login" to authenticate.');
24
- return;
24
+ process.exit(1);
25
25
  }
26
26
  const token = (0, auth_1.getAuthToken)();
27
27
  // Read service config
28
28
  if (!(0, config_1.hasServiceConfig)()) {
29
29
  console.error(chalk_1.default.red('Error: No ulservice.json (or ccservice.json) found in the current directory.'));
30
30
  console.log('Please run "underlings service init" to configure this directory as a service.');
31
- return;
31
+ process.exit(1);
32
32
  }
33
33
  let config;
34
34
  try {
@@ -36,11 +36,11 @@ const run = async (commandParts) => {
36
36
  }
37
37
  catch (e) {
38
38
  console.error(chalk_1.default.red('Error reading service config file.'));
39
- return;
39
+ process.exit(1);
40
40
  }
41
41
  if (!config.service) {
42
42
  console.error(chalk_1.default.red('Error: Invalid service config. Missing "service" identifier.'));
43
- return;
43
+ process.exit(1);
44
44
  }
45
45
  // Get git branch
46
46
  let branch;
@@ -49,11 +49,11 @@ const run = async (commandParts) => {
49
49
  }
50
50
  catch (e) {
51
51
  console.error(chalk_1.default.red('Error: Could not determine git branch. Are you in a git repository?'));
52
- return;
52
+ process.exit(1);
53
53
  }
54
54
  if (!branch) {
55
55
  console.error(chalk_1.default.red('Error: Current branch is empty.'));
56
- return;
56
+ process.exit(1);
57
57
  }
58
58
  console.log(chalk_1.default.dim(`Detected branch: ${branch}`));
59
59
  // Fetch service variables
@@ -85,7 +85,7 @@ const run = async (commandParts) => {
85
85
  else {
86
86
  console.error(chalk_1.default.red('Failed to fetch variables:'), msg);
87
87
  }
88
- return;
88
+ process.exit(1);
89
89
  }
90
90
  // Execute command
91
91
  const [cmd, ...args] = commandParts;
@@ -219,10 +219,6 @@ async function fetchServiceVariables(serviceSlug, branch, token) {
219
219
  if (v.valueType === 'SERVICE_URL' && granularOverride) {
220
220
  envMap[v.key] = granularOverride;
221
221
  }
222
- else if (v.valueType === 'SERVICE_URL' && overrideProxyUrl) {
223
- // Fallback to legacy global proxy if set
224
- envMap[v.key] = overrideProxyUrl;
225
- }
226
222
  else {
227
223
  envMap[v.key] = v.value;
228
224
  }
package/dist/constants.js CHANGED
@@ -13,10 +13,14 @@ const setLocalMode = (local) => {
13
13
  };
14
14
  exports.setLocalMode = setLocalMode;
15
15
  const getApiUrl = () => {
16
+ if (process.env.UL_API_URL)
17
+ return process.env.UL_API_URL;
16
18
  return isLocalMode ? LOCAL_API_URL : PRODUCTION_API_URL;
17
19
  };
18
20
  exports.getApiUrl = getApiUrl;
19
21
  const getAuthUrl = () => {
22
+ if (process.env.UL_AUTH_URL)
23
+ return process.env.UL_AUTH_URL;
20
24
  return isLocalMode ? LOCAL_AUTH_URL : PRODUCTION_AUTH_URL;
21
25
  };
22
26
  exports.getAuthUrl = getAuthUrl;
package/package.json CHANGED
@@ -1,40 +1,41 @@
1
1
  {
2
- "name": "@underlingscloud/cli",
3
- "version": "0.2.3",
4
- "description": "Underlings Developer Utilities CLI",
5
- "main": "dist/index.js",
6
- "bin": {
7
- "underlings": "dist/index.js"
8
- },
9
- "scripts": {
10
- "build": "tsc",
11
- "dev": "tsx src/index.ts"
12
- },
13
- "dependencies": {
14
- "axios": "^1.6.0",
15
- "chalk": "^4.1.2",
16
- "commander": "^11.1.0",
17
- "conf": "^10.2.0",
18
- "cross-spawn": "^7.0.3",
19
- "open": "^9.1.0",
20
- "prompts": "^2.4.2"
21
- },
22
- "devDependencies": {
23
- "@types/cross-spawn": "^6.0.6",
24
- "@types/prompts": "^2.4.9",
25
- "typescript": "^5.0.0",
26
- "tsx": "^4.0.0"
27
- },
28
- "files": [
29
- "dist"
30
- ],
31
- "publishConfig": {
32
- "access": "public"
33
- },
34
- "repository": {
35
- "type": "git",
36
- "url": "https://github.com/underlings/ul-mono.git",
37
- "directory": "packages/cli"
38
- },
39
- "license": "MIT"
40
- }
2
+ "name": "@underlingscloud/cli",
3
+ "version": "0.2.4",
4
+ "description": "Underlings Developer Utilities CLI",
5
+ "main": "dist/index.js",
6
+ "bin": {
7
+ "underlings": "dist/index.js"
8
+ },
9
+ "scripts": {
10
+ "build": "tsc",
11
+ "dev": "tsx src/index.ts"
12
+ },
13
+ "dependencies": {
14
+ "axios": "^1.6.0",
15
+ "chalk": "^4.1.2",
16
+ "commander": "^11.1.0",
17
+ "conf": "^10.2.0",
18
+ "cross-spawn": "^7.0.3",
19
+ "open": "^9.1.0",
20
+ "prompts": "^2.4.2"
21
+ },
22
+ "devDependencies": {
23
+ "@types/cross-spawn": "^6.0.6",
24
+ "@types/prompts": "^2.4.9",
25
+ "typescript": "^5.0.0",
26
+ "tsx": "^4.0.0"
27
+ },
28
+ "files": [
29
+ "dist"
30
+ ],
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "https://github.com/underlings/ul-mono.git",
37
+ "directory": "packages/cli"
38
+ },
39
+ "license": "MIT",
40
+ "packageManager": "pnpm@10.28.2"
41
+ }