@tachyon-gg/railway-deploy 0.2.8 → 0.2.9

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/README.md CHANGED
@@ -122,9 +122,9 @@ registry_credentials: # For private container registries
122
122
  #### Build
123
123
 
124
124
  ```yaml
125
- builder: NIXPACKS # RAILPACK (default), DOCKERFILE, NIXPACKS, HEROKU, PAKETO
125
+ builder: NIXPACKS # RAILPACK (default), NIXPACKS, HEROKU, PAKETO
126
126
  build_command: npm run build # Custom build command
127
- dockerfile_path: Dockerfile.prod # Path to Dockerfile (when builder is DOCKERFILE)
127
+ dockerfile_path: Dockerfile.prod # Path to Dockerfile (uses Railpack with Dockerfile)
128
128
  root_directory: /packages/api # Root directory (monorepo support)
129
129
  watch_patterns: # File patterns that trigger deploys
130
130
  - /packages/api/src/**
package/dist/index.js CHANGED
@@ -37574,7 +37574,7 @@ ${issues}`);
37574
37574
  }
37575
37575
  }
37576
37576
  var VALID_RESTART_POLICIES = ["ALWAYS", "NEVER", "ON_FAILURE"];
37577
- var VALID_BUILDERS = ["RAILPACK", "DOCKERFILE", "NIXPACKS", "HEROKU", "PAKETO"];
37577
+ var VALID_BUILDERS = ["RAILPACK", "NIXPACKS", "HEROKU", "PAKETO"];
37578
37578
  var CRON_FIELD_PATTERN = /^(\*|[0-9]+(-[0-9]+)?(,[0-9]+(-[0-9]+)?)*)(\/[0-9]+)?$/;
37579
37579
  var DOMAIN_PATTERN = /^(\*\.)?[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
37580
37580
  function validateResolvedService(name, service) {
@@ -38440,11 +38440,13 @@ function createClient(token) {
38440
38440
  const baseClient = new GraphQLClient(RAILWAY_API, {
38441
38441
  headers: {
38442
38442
  Authorization: `Bearer ${token}`
38443
- },
38444
- signal: AbortSignal.timeout(30000)
38443
+ }
38445
38444
  });
38446
38445
  const originalRequest = baseClient.request.bind(baseClient);
38447
- baseClient.request = (...args) => withRetry(() => originalRequest(...args));
38446
+ baseClient.request = (...args) => withRetry(() => {
38447
+ baseClient.requestConfig.signal = AbortSignal.timeout(120000);
38448
+ return originalRequest(...args);
38449
+ });
38448
38450
  return baseClient;
38449
38451
  }
38450
38452
 
@@ -39234,6 +39236,25 @@ Apply results:`);
39234
39236
  }
39235
39237
 
39236
39238
  // src/reconcile/apply.ts
39239
+ function extractErrorMessage(err) {
39240
+ if (!(err instanceof Error))
39241
+ return String(err);
39242
+ const msg = err.message;
39243
+ try {
39244
+ const parsed = "response" in err ? err.response : undefined;
39245
+ if (parsed && typeof parsed === "object" && parsed !== null) {
39246
+ const resp = parsed;
39247
+ const gqlMessage = resp.errors?.[0]?.message;
39248
+ if (gqlMessage && gqlMessage !== "Problem processing request") {
39249
+ return gqlMessage;
39250
+ }
39251
+ }
39252
+ } catch {}
39253
+ const match = msg.match(/"message":"([^"]+)"/);
39254
+ if (match)
39255
+ return match[1];
39256
+ return msg;
39257
+ }
39237
39258
  function green2(text, noColor) {
39238
39259
  return noColor ? text : `\x1B[32m${text}\x1B[0m`;
39239
39260
  }
@@ -39263,7 +39284,7 @@ async function applyChangeset(client, changeset, projectId, environmentId, optio
39263
39284
  applied.push(change);
39264
39285
  console.log(` ${green2("✓", noColor)} ${changeLabel(change)}`);
39265
39286
  } catch (err) {
39266
- const message = err instanceof Error ? err.message : String(err);
39287
+ const message = extractErrorMessage(err);
39267
39288
  failed.push({ change, error: message });
39268
39289
  console.log(` ${red2("✗", noColor)} ${changeLabel(change)} — ${message}`);
39269
39290
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tachyon-gg/railway-deploy",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",