hazo_env 0.11.0 → 0.14.0

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.
@@ -22,6 +22,24 @@ export interface DeployStatusResult {
22
22
  lastSwitch?: string;
23
23
  lastBuild?: string;
24
24
  lastBuildStatus?: 'success' | 'failed';
25
+ /**
26
+ * Status of each `config.sidecar_apps` entry (see sidecar.ts) — looked up
27
+ * by exact pm2 process NAME, not by cwd (unlike `live`/`standby` above),
28
+ * since a sidecar's registration is never swapped the way the web app's
29
+ * is. `stale: true` means the process was found but its `pm_cwd` does NOT
30
+ * match the current `live.dir` — i.e. it hasn't been synced onto the
31
+ * current live dir yet, a signal something's wrong (normally `deploy
32
+ * switch`/`deploy rollback`'s own `syncSidecars` call keeps this in
33
+ * sync). Always `[]` when `!stateFound` (same guard as `live`/`standby`).
34
+ */
35
+ sidecars: Array<{
36
+ name: string;
37
+ running: boolean;
38
+ pid?: number;
39
+ pm2Status?: string;
40
+ pm_cwd?: string;
41
+ stale: boolean;
42
+ }>;
25
43
  /** Non-fatal problems encountered while gathering status (pm2 unavailable, unparsable df output, ...). */
26
44
  warnings: string[];
27
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/deploy/status.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAe,MAAM,YAAY,CAAC;AAE3E,+DAA+D;AAC/D,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,+EAA+E;IAC/E,UAAU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,EACpB,MAAM,EAAE,aAAa,EACrB,IAAI,GAAE,gBAAqB,GAC1B,kBAAkB,CAqDpB"}
@@ -42,6 +42,19 @@ function findPm2ProcessForDir(processes, dir) {
42
42
  const target = path.resolve(dir);
43
43
  return processes.find((p) => p.pm2_env?.pm_cwd && path.resolve(p.pm2_env.pm_cwd) === target);
44
44
  }
45
+ /**
46
+ * Find the PM2 process registered under the EXACT name `name` — mirrors
47
+ * `findPm2ProcessForDir`'s shape, but matches by pm2 process `name` rather
48
+ * than `pm_cwd`. Used for `config.sidecar_apps` entries (see sidecar.ts):
49
+ * unlike the web app's own single `<app_name>` registration (which gets
50
+ * fully deleted/recreated on every switch, always under the SAME name),
51
+ * each sidecar is looked up by its stable, never-renamed pm2 name — cwd
52
+ * matching would miss it entirely right after a switch, while it's still
53
+ * registered against the dir that was just demoted.
54
+ */
55
+ function findPm2ProcessByName(processes, name) {
56
+ return processes.find((p) => p.name === name);
57
+ }
45
58
  function dirStatus(role, dir, port, processes) {
46
59
  const proc = findPm2ProcessForDir(processes, dir);
47
60
  const status = proc?.pm2_env?.status;
@@ -162,9 +175,24 @@ export function runStatus(config, runner, opts = {}) {
162
175
  memoryFreeMb,
163
176
  minMemoryMb: config.min_memory_mb,
164
177
  memoryLow,
178
+ sidecars: [],
165
179
  warnings,
166
180
  };
167
181
  }
182
+ const liveDirResolved = path.resolve(state.live_dir);
183
+ const sidecars = config.sidecar_apps.map((name) => {
184
+ const proc = findPm2ProcessByName(processes, name);
185
+ const status = proc?.pm2_env?.status;
186
+ const pmCwd = proc?.pm2_env?.pm_cwd;
187
+ return {
188
+ name,
189
+ running: status === 'online',
190
+ pid: proc?.pid,
191
+ pm2Status: status,
192
+ pm_cwd: pmCwd,
193
+ stale: !!proc && (pmCwd === undefined || path.resolve(pmCwd) !== liveDirResolved),
194
+ };
195
+ });
168
196
  return {
169
197
  appName: config.app_name,
170
198
  stateFound: true,
@@ -177,6 +205,7 @@ export function runStatus(config, runner, opts = {}) {
177
205
  lastSwitch: state.last_switch,
178
206
  lastBuild: state.last_build,
179
207
  lastBuildStatus: state.last_build_status,
208
+ sidecars,
180
209
  warnings,
181
210
  };
182
211
  }
@@ -1,3 +1,4 @@
1
+ import { type SidecarSyncResult } from './sidecar.js';
1
2
  import type { CommandRunner, DeployConfig, DeployState } from './types.js';
2
3
  export interface PostSwitchHookResult {
3
4
  cmd: string;
@@ -12,16 +13,37 @@ export interface RunSwitchResult {
12
13
  stagingPort: number;
13
14
  /** True iff a staging PM2 process was found and stopped (false if it was already stopped/absent). */
14
15
  stagingStopped: boolean;
16
+ /** Set when the staging-delete step (above) failed for a reason other than "not found". */
17
+ stagingDeleteWarning?: string;
18
+ /** Set when `pm2 save` failed after a successful switch (non-fatal — the switch itself already succeeded). */
19
+ pm2SaveWarning?: string;
15
20
  postSwitchHooks: PostSwitchHookResult[];
16
21
  state: DeployState;
22
+ /**
23
+ * Reload-or-recreate results for `config.sidecar_apps` (see sidecar.ts),
24
+ * run unconditionally after the web-app promotion above has already
25
+ * succeeded. A sidecar failure is reported here, never thrown — it must
26
+ * never cause `runSwitch` itself to report failure (the web app has
27
+ * already been promoted by this point).
28
+ */
29
+ sidecars: SidecarSyncResult[];
17
30
  }
18
31
  /** Thrown when there's nothing to switch (no state file yet) or a fatal step fails. */
19
32
  export declare class SwitchAbortError extends Error {
20
33
  constructor(message: string);
21
34
  }
35
+ export interface RunSwitchOptions {
36
+ /**
37
+ * Fix 2: bypass the "standby must have a successful, post-last-switch
38
+ * build" check below. Use only when the operator has independently
39
+ * verified the standby dir is safe to promote (e.g. it was built/verified
40
+ * through some means outside this state file's tracking).
41
+ */
42
+ force?: boolean;
43
+ }
22
44
  /**
23
45
  * Promote the standby directory to live. See this file's header for the
24
46
  * full step-by-step rationale.
25
47
  */
26
- export declare function runSwitch(config: DeployConfig, runner: CommandRunner): RunSwitchResult;
48
+ export declare function runSwitch(config: DeployConfig, runner: CommandRunner, opts?: RunSwitchOptions): RunSwitchResult;
27
49
  //# sourceMappingURL=switch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/deploy/switch.ts"],"names":[],"mappings":"AA8DA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE3E,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,qGAAqG;IACrG,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,oBAAoB,EAAE,CAAC;IACxC,KAAK,EAAE,WAAW,CAAC;CACpB;AAED,uFAAuF;AACvF,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM;CAI5B;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,GAAG,eAAe,CAqFtF"}
1
+ {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/deploy/switch.ts"],"names":[],"mappings":"AA8DA,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE3E,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,qGAAqG;IACrG,cAAc,EAAE,OAAO,CAAC;IACxB,2FAA2F;IAC3F,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,8GAA8G;IAC9G,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,oBAAoB,EAAE,CAAC;IACxC,KAAK,EAAE,WAAW,CAAC;IACnB;;;;;;OAMG;IACH,QAAQ,EAAE,iBAAiB,EAAE,CAAC;CAC/B;AAED,uFAAuF;AACvF,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM;CAI5B;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,GAAE,gBAAqB,GAAG,eAAe,CAkInH"}
@@ -59,6 +59,7 @@
59
59
  import path from 'node:path';
60
60
  import { readState, updateState } from './state.js';
61
61
  import { promoteDirFresh, PromoteDirFreshError } from './pm2-start.js';
62
+ import { syncSidecars } from './sidecar.js';
62
63
  /** Thrown when there's nothing to switch (no state file yet) or a fatal step fails. */
63
64
  export class SwitchAbortError extends Error {
64
65
  constructor(message) {
@@ -70,7 +71,7 @@ export class SwitchAbortError extends Error {
70
71
  * Promote the standby directory to live. See this file's header for the
71
72
  * full step-by-step rationale.
72
73
  */
73
- export function runSwitch(config, runner) {
74
+ export function runSwitch(config, runner, opts = {}) {
74
75
  // Step 1: read state — the ONLY source of truth for which dir is live vs.
75
76
  // standby. Never infer this from the blue/green naming convention here
76
77
  // (see build.ts's header for why that was a critical bug there).
@@ -78,6 +79,23 @@ export function runSwitch(config, runner) {
78
79
  if (!state) {
79
80
  throw new SwitchAbortError(`No deploy state found for "${config.app_name}" — nothing to switch. Run "deploy init" first.`);
80
81
  }
82
+ // Fix 2: refuse to promote standby unless it has had a SUCCESSFUL build
83
+ // since the last switch (or this is the first-ever switch, i.e.
84
+ // last_switch is unset). Without this, a standby dir that crashed
85
+ // mid-build, or was never rebuilt since a prior FAILED attempt, could get
86
+ // promoted to production while the CLI reports "Switch complete." —
87
+ // last_build_status/last_build already exist on the state file for
88
+ // exactly this reason (deploy build always writes them — see build.ts).
89
+ // --force bypasses this one check only (nothing else here is skippable).
90
+ if (!opts.force) {
91
+ const hasSuccessfulRecentBuild = state.last_build_status === 'success' &&
92
+ !!state.last_build &&
93
+ (!state.last_switch || state.last_build > state.last_switch);
94
+ if (!hasSuccessfulRecentBuild) {
95
+ throw new SwitchAbortError(`standby has not had a successful build since the last switch — run "deploy build" first, or pass ` +
96
+ `--force to override.`);
97
+ }
98
+ }
81
99
  const oldLiveDir = path.resolve(state.live_dir);
82
100
  const oldStandbyDir = path.resolve(state.standby_dir);
83
101
  // Step 2: read the new live dir's git ref FIRST, before anything is
@@ -97,6 +115,7 @@ export function runSwitch(config, runner) {
97
115
  // OLD live build back up so production isn't silently left down, and
98
116
  // reports plainly whether that worked.
99
117
  let stagingStopped;
118
+ let stagingDeleteWarning;
100
119
  try {
101
120
  const result = promoteDirFresh(runner, {
102
121
  fromDir: oldLiveDir,
@@ -108,6 +127,7 @@ export function runSwitch(config, runner) {
108
127
  fromLabel: 'the previous live build',
109
128
  });
110
129
  stagingStopped = result.stagingDeleted;
130
+ stagingDeleteWarning = result.stagingDeleteWarning;
111
131
  }
112
132
  catch (e) {
113
133
  if (e instanceof PromoteDirFreshError) {
@@ -139,6 +159,22 @@ export function runSwitch(config, runner) {
139
159
  git_ref: gitRef,
140
160
  pm2_process: config.app_name,
141
161
  });
162
+ // Fix 7: persist the pm2 process list after a successful promotion — see
163
+ // rollback.ts's identical comment for the full rationale. Non-fatal: the
164
+ // switch itself already succeeded, so a failed `pm2 save` is only
165
+ // surfaced as a warning.
166
+ const saveResult = runner.spawn('pm2 save');
167
+ const pm2SaveWarning = saveResult.code !== 0
168
+ ? `"pm2 save" failed after switch (exit ${saveResult.code}): ${saveResult.stderr || saveResult.stdout || 'no output'} — ` +
169
+ `a server reboot's "pm2 resurrect" may restore the OLD pm2 process list even though this switch ` +
170
+ `succeeded. Run "pm2 save" manually.`
171
+ : undefined;
172
+ // Sidecar sync: runs unconditionally after the web app's own promotion
173
+ // has already succeeded (see sidecar.ts's header for why sidecars are
174
+ // never blue-green-swapped the same way). `oldStandbyDir` is the NEW live
175
+ // dir at this point in the function. Never allowed to affect runSwitch's
176
+ // own success/throw behavior — syncSidecars() itself never throws.
177
+ const sidecars = syncSidecars(runner, oldStandbyDir, config.sidecar_apps);
142
178
  return {
143
179
  previousLiveDir: oldLiveDir,
144
180
  newLiveDir: oldStandbyDir,
@@ -146,7 +182,10 @@ export function runSwitch(config, runner) {
146
182
  prodPort: config.prod_port,
147
183
  stagingPort: config.staging_port,
148
184
  stagingStopped,
185
+ stagingDeleteWarning,
186
+ pm2SaveWarning,
149
187
  postSwitchHooks,
150
188
  state: newState,
189
+ sidecars,
151
190
  };
152
191
  }
@@ -34,6 +34,12 @@ export interface DeployConfig {
34
34
  migrate_cmd?: string;
35
35
  /** Shell commands run after a successful switch (indexnow, CDN purge, ...). May be empty. */
36
36
  post_switch_cmds: string[];
37
+ /**
38
+ * Other pm2 app names in the same ecosystem file that move with the live
39
+ * dir but are never blue-green-swapped themselves — see sidecar.ts.
40
+ * Default: []
41
+ */
42
+ sidecar_apps: string[];
37
43
  }
38
44
  /** Result of a single command execution. */
39
45
  export interface CommandResult {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/deploy/types.ts"],"names":[],"mappings":"AAMA,8DAA8D;AAC9D,MAAM,WAAW,YAAY;IAC3B,0GAA0G;IAC1G,QAAQ,EAAE,MAAM,CAAC;IACjB,gHAAgH;IAChH,UAAU,EAAE,MAAM,CAAC;IACnB,yCAA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["../src/doctor.ts"],"names":[],"mappings":"AAcA,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,uEAAuE;IACvE,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,kEAAkE;IAClE,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAMD;;;GAGG;AACH,wBAAsB,MAAM,CAAC,IAAI,GAAE,aAAkB,GAAG,OAAO,CAAC,YAAY,CAAC,CAoS5E"}
1
+ {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAcA,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,uEAAuE;IACvE,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,kEAAkE;IAClE,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAMD;;;GAGG;AACH,wBAAsB,MAAM,CAAC,IAAI,GAAE,aAAkB,GAAG,OAAO,CAAC,YAAY,CAAC,CAoT5E"}
package/dist/doctor.js CHANGED
@@ -128,7 +128,7 @@ export async function doctor(opts = {}) {
128
128
  catch {
129
129
  continue; // already reported as error above
130
130
  }
131
- if (cfg.type === 'sqlite' && cfg.sqlite) {
131
+ if ((cfg.type === 'sqlite' && cfg.sqlite) || (cfg.type === 'pg' && cfg.pg)) {
132
132
  // `createHazoConnect` only exists on hazo_connect's `/server` subpath (the main
133
133
  // `.` export doesn't re-export it) — see hazo_connect/dist/server/index.d.ts.
134
134
  const hazoConnect = await optional_import('hazo_connect/server');
@@ -139,7 +139,7 @@ export async function doctor(opts = {}) {
139
139
  detail: 'install hazo_connect to enable probing',
140
140
  });
141
141
  }
142
- else {
142
+ else if (cfg.type === 'sqlite' && cfg.sqlite) {
143
143
  try {
144
144
  const conn = hazoConnect.createHazoConnect({ type: 'sqlite', sqlite: cfg.sqlite });
145
145
  // The adapter's raw-SQL method is `rawQuery`, not `query` (see
@@ -155,6 +155,24 @@ export async function doctor(opts = {}) {
155
155
  });
156
156
  }
157
157
  }
158
+ else if (cfg.type === 'pg' && cfg.pg) {
159
+ try {
160
+ const conn = hazoConnect.createHazoConnect({
161
+ type: 'pg',
162
+ connectionString: cfg.pg.connectionString,
163
+ ssl: cfg.pg.ssl ?? false,
164
+ });
165
+ await conn.rawQuery('SELECT 1');
166
+ checks.push({ label: `DB probe [db.${env}]`, status: 'ok', detail: 'pg connection OK' });
167
+ }
168
+ catch (e) {
169
+ checks.push({
170
+ label: `DB probe [db.${env}]`,
171
+ status: 'error',
172
+ detail: e instanceof Error ? e.message : String(e),
173
+ });
174
+ }
175
+ }
158
176
  }
159
177
  }
160
178
  }
@@ -1 +1 @@
1
- {"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../src/resolve/connect.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAmB5E;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,GAAE,qBAA0B,GAAG,WAAW,CA4ElF"}
1
+ {"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../src/resolve/connect.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAmB5E;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,GAAE,qBAA0B,GAAG,WAAW,CA+GlF"}
@@ -91,9 +91,44 @@ export function resolveConnectConfig(opts = {}) {
91
91
  const api_key = substitutePlaceholders(rawKey, extraVars);
92
92
  return { type: 'postgrest', postgrest: { base_url, api_key } };
93
93
  }
94
+ if (type === 'pg') {
95
+ const rawConnectionString = section['connection_string'];
96
+ if (!rawConnectionString) {
97
+ throw new HazoConfigError({
98
+ code: 'HAZO_ENV_CONFIG_MISSING_DB_CONNECTION_STRING',
99
+ pkg: 'hazo_env',
100
+ message: `[db.${targetEnv}] is type=pg but has no connection_string.`,
101
+ });
102
+ }
103
+ const connectionString = substitutePlaceholders(rawConnectionString, extraVars);
104
+ // Optional `ssl = require` in [db.<env>] — passed straight through to
105
+ // hazo_connect's pg config. Validated here (not left for hazo_connect to
106
+ // reject) for the same reason the sqlite `driver` key is validated above:
107
+ // a typo fails at config-resolve time with a hazo_env error that names
108
+ // the bad value.
109
+ const rawSsl = section['ssl'];
110
+ let ssl;
111
+ if (rawSsl === undefined) {
112
+ ssl = undefined;
113
+ }
114
+ else if (rawSsl === 'require') {
115
+ ssl = 'require';
116
+ }
117
+ else if (rawSsl === 'false') {
118
+ ssl = false;
119
+ }
120
+ else {
121
+ throw new HazoConfigError({
122
+ code: 'HAZO_ENV_CONFIG_UNKNOWN_SSL_VALUE',
123
+ pkg: 'hazo_env',
124
+ message: `[db.${targetEnv}] has unknown ssl "${rawSsl}". Expected "require" or "false".`,
125
+ });
126
+ }
127
+ return { type: 'pg', pg: ssl === undefined ? { connectionString } : { connectionString, ssl } };
128
+ }
94
129
  throw new HazoConfigError({
95
130
  code: 'HAZO_ENV_CONFIG_UNKNOWN_DB_TYPE',
96
131
  pkg: 'hazo_env',
97
- message: `[db.${targetEnv}] has unknown type "${type}". Expected "sqlite" or "postgrest".`,
132
+ message: `[db.${targetEnv}] has unknown type "${type}". Expected "sqlite", "postgrest", or "pg".`,
98
133
  });
99
134
  }
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/resolve/deploy.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AA6DvD;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,YAAY,CAuDlD"}
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/resolve/deploy.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAiGvD;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,YAAY,CAwDlD"}
@@ -36,11 +36,30 @@ function loadConfig() {
36
36
  });
37
37
  }
38
38
  }
39
- function parseIntOr(value, fallback) {
39
+ /**
40
+ * Parse an INI integer field, applying `fallback` only when the field is
41
+ * ABSENT. A field that IS present but not a valid integer (e.g. `prod_port
42
+ * = abc`) throws a clear `HazoConfigError` instead of silently falling back
43
+ * to the default — matching `db_strategy`'s existing validation below
44
+ * rather than masking a typo as "3000, no error" (Fix 8).
45
+ *
46
+ * Uses `Number(...)` rather than `parseInt`, which deliberately rejects
47
+ * trailing garbage (`parseInt('3000abc', 10)` === 3000; `Number('3000abc')`
48
+ * is NaN) so a value that's only partially numeric is still caught.
49
+ */
50
+ function parseIntField(key, value, fallback) {
40
51
  if (value === undefined)
41
52
  return fallback;
42
- const parsed = parseInt(value, 10);
43
- return Number.isFinite(parsed) ? parsed : fallback;
53
+ const trimmed = value.trim();
54
+ const parsed = Number(trimmed);
55
+ if (trimmed === '' || !Number.isInteger(parsed)) {
56
+ throw new HazoConfigError({
57
+ code: 'HAZO_ENV_CONFIG_INVALID_DEPLOY_INT_FIELD',
58
+ pkg: 'hazo_env',
59
+ message: `[deploy] ${key} "${value}" is invalid. Expected an integer.`,
60
+ });
61
+ }
62
+ return parsed;
44
63
  }
45
64
  /**
46
65
  * Collects `post_switch_cmd`, `post_switch_cmd_2`, `post_switch_cmd_3`, ...
@@ -62,6 +81,23 @@ function collectPostSwitchCmds(section) {
62
81
  }
63
82
  return cmds;
64
83
  }
84
+ /**
85
+ * Parses `sidecar_apps` (comma-separated pm2 app names, e.g.
86
+ * `sidecar_apps = kinstripe-scheduler, kinstripe-pdf-pool`) into a trimmed,
87
+ * empty-entry-free array. Unlike `post_switch_cmd`'s numbered-key
88
+ * collection, this is a single comma-separated value, not a numbered
89
+ * sequence — a plain split/trim/filter. Absent key -> [] (same default as
90
+ * every other list-shaped [deploy] field).
91
+ */
92
+ function collectSidecarApps(section) {
93
+ const raw = section['sidecar_apps'];
94
+ if (typeof raw !== 'string')
95
+ return [];
96
+ return raw
97
+ .split(',')
98
+ .map((s) => s.trim())
99
+ .filter((s) => s.length > 0);
100
+ }
65
101
  const VALID_DB_STRATEGIES = new Set(['auto', 'copy', 'shared']);
66
102
  /**
67
103
  * Resolve the `[deploy]` section of hazo_env_config.ini into a typed
@@ -105,11 +141,11 @@ export function resolveDeployConfig() {
105
141
  return {
106
142
  app_name,
107
143
  dir_suffix,
108
- prod_port: parseIntOr(section['prod_port'], DEFAULTS.prod_port),
109
- staging_port: parseIntOr(section['staging_port'], DEFAULTS.staging_port),
144
+ prod_port: parseIntField('prod_port', section['prod_port'], DEFAULTS.prod_port),
145
+ staging_port: parseIntField('staging_port', section['staging_port'], DEFAULTS.staging_port),
110
146
  health_url: section['health_url'] ?? DEFAULTS.health_url,
111
- min_disk_mb: parseIntOr(section['min_disk_mb'], DEFAULTS.min_disk_mb),
112
- min_memory_mb: parseIntOr(section['min_memory_mb'], DEFAULTS.min_memory_mb),
147
+ min_disk_mb: parseIntField('min_disk_mb', section['min_disk_mb'], DEFAULTS.min_disk_mb),
148
+ min_memory_mb: parseIntField('min_memory_mb', section['min_memory_mb'], DEFAULTS.min_memory_mb),
113
149
  branch: section['branch'] ?? DEFAULTS.branch,
114
150
  db_strategy: db_strategy_raw,
115
151
  build_cmd: section['build_cmd'] ?? DEFAULTS.build_cmd,
@@ -117,5 +153,6 @@ export function resolveDeployConfig() {
117
153
  pre_build_cmd: section['pre_build_cmd'] ?? DEFAULTS.pre_build_cmd,
118
154
  migrate_cmd: section['migrate_cmd'] ?? DEFAULTS.migrate_cmd,
119
155
  post_switch_cmds: collectPostSwitchCmds(section),
156
+ sidecar_apps: collectSidecarApps(section),
120
157
  };
121
158
  }
@@ -10,7 +10,7 @@ export type EnvRoleMap = Record<string, HazoEnvRole>;
10
10
  export type HostHint = 'local' | 'remote' | 'unknown';
11
11
  /** DB configuration for a single environment (from [db.<env>] in INI) */
12
12
  export interface DbEnvConfig {
13
- type: 'sqlite' | 'postgrest';
13
+ type: 'sqlite' | 'postgrest' | 'pg';
14
14
  sqlite?: {
15
15
  database_path: string;
16
16
  /** Which SQLite engine hazo_connect should use. Defaults to 'sql.js' when
@@ -28,6 +28,17 @@ export interface DbEnvConfig {
28
28
  base_url: string;
29
29
  api_key: string;
30
30
  };
31
+ /** Direct Postgres connection (hazo_connect's `pg` dialect — `PgAdapter`,
32
+ * the only dialect exposing a real `.raw()` escape hatch, e.g. for
33
+ * native-tsvector full-text search or `SELECT ... FOR UPDATE SKIP LOCKED`
34
+ * job-claim queries). Distinct from `postgrest`, which fronts Postgres
35
+ * through a PostgREST HTTP layer with no `.raw()` at all. */
36
+ pg?: {
37
+ connectionString: string;
38
+ /** 'require' for TLS (remote/managed Postgres); false (default) for a
39
+ * same-host loopback connection with no TLS. */
40
+ ssl?: boolean | 'require';
41
+ };
31
42
  }
32
43
  /** Files configuration returned by resolveFilesConfig */
33
44
  export interface FilesEnvConfig {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAEA,sDAAsD;AACtD,MAAM,MAAM,OAAO,GAA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AC;QACrB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;KAC9B,CAAC;CACH;AAED,8BAA8B;AAC9B,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,OAAO,CAAC;IACb,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,UAAU,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB;AAED,uCAAuC;AACvC,MAAM,WAAW,qBAAqB;IACpC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hazo_env",
3
- "version": "0.11.0",
3
+ "version": "0.14.0",
4
4
  "description": "Canonical environment resolver — typed env names, per-env DB/file/secret config, doctor and CLI for hazo apps",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -40,14 +40,14 @@
40
40
  "picocolors": "^1.1.1"
41
41
  },
42
42
  "peerDependencies": {
43
- "hazo_core": "^2.4.1",
44
- "hazo_config": "^2.6.0",
45
- "hazo_connect": "^4.3.3",
46
- "hazo_files": "^3.4.0",
47
- "hazo_secure": "^1.8.1",
43
+ "hazo_core": "^2.5.0",
44
+ "hazo_config": "^2.7.2",
45
+ "hazo_connect": "^4.3.5",
46
+ "hazo_files": "^3.7.0",
47
+ "hazo_secure": "^1.9.1",
48
48
  "hazo_audit": "^2.3.0",
49
- "hazo_pdf": "^2.4.0",
50
- "hazo_i18n": "^0.9.0",
49
+ "hazo_pdf": "^2.5.0",
50
+ "hazo_i18n": "^0.17.0",
51
51
  "react": "^18.0.0 || ^19.0.0",
52
52
  "react-dom": "^18.0.0 || ^19.0.0",
53
53
  "next": "^14.0.0 || ^16.0.0"
@@ -91,9 +91,9 @@
91
91
  "@types/react": "^19.0.0",
92
92
  "@types/react-dom": "^19.0.0",
93
93
  "hazo_core": "^2.5.0",
94
- "hazo_config": "^2.6.0",
94
+ "hazo_config": "^2.7.2",
95
95
  "hazo_connect": "^4.3.5",
96
- "hazo_files": "^3.4.0",
96
+ "hazo_files": "^3.7.0",
97
97
  "next": "^16.0.10",
98
98
  "react": "^19.0.0",
99
99
  "react-dom": "^19.0.0",