hazo_env 0.10.2 → 0.10.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.
- package/CHANGE_LOG.md +33 -0
- package/dist/cli.js +0 -0
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +6 -2
- package/dist/locales/locales/en.json +1 -0
- package/package.json +10 -8
package/CHANGE_LOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# hazo_env — Change Log
|
|
2
2
|
|
|
3
|
+
## 0.10.4 — 2026-10-11
|
|
4
|
+
|
|
5
|
+
Bug fix: `hazo-env doctor --probe`'s SQLite DB-probe check crashed with
|
|
6
|
+
`hazoConnect.createHazoConnect is not a function` on every project. Two bugs, both in
|
|
7
|
+
`src/doctor.ts`:
|
|
8
|
+
|
|
9
|
+
- It dynamically imported the bare `hazo_connect` package, but `createHazoConnect` only
|
|
10
|
+
exists on hazo_connect's `/server` subpath export (the main `.` export doesn't re-export
|
|
11
|
+
it) — fixed to import `hazo_connect/server`.
|
|
12
|
+
- It then called the resulting connection's `.query('SELECT 1')`, but
|
|
13
|
+
`HazoConnectAdapter`'s raw-SQL method is `rawQuery`, not `query` — fixed the call and its
|
|
14
|
+
inline type.
|
|
15
|
+
|
|
16
|
+
Found while running the Phase 3A ticket 01 checklist's "Run `hazo-env doctor --probe` in
|
|
17
|
+
dev" step against Quizaboo — verified: probe now reports `✓ DB probe [db.dev]` against a
|
|
18
|
+
real SQLite file instead of erroring.
|
|
19
|
+
|
|
20
|
+
## 0.10.3 — 2026-10-10
|
|
21
|
+
|
|
22
|
+
Packaging fix, no behavior change. `package.json`'s `exports` map only declared an `import`
|
|
23
|
+
condition for `.` and `./client`, so any CommonJS-style `require()` resolution (Node's CJS
|
|
24
|
+
loader, or a bundler/tool — e.g. `tsx` — that falls back to CJS-style resolution for a plain
|
|
25
|
+
`.ts` file) failed with `ERR_PACKAGE_PATH_NOT_EXPORTED`, even on Node versions that support
|
|
26
|
+
`require(esm)`. Added a `require` condition alongside `import` for both subpaths, pointing at
|
|
27
|
+
the same compiled ESM file — Node 22's `require(esm)` support resolves that correctly since
|
|
28
|
+
neither entry point uses top-level `await`. Verified directly: both
|
|
29
|
+
`node -e "require('hazo_env')"` and `import ... from "hazo_env"` now resolve.
|
|
30
|
+
|
|
31
|
+
Found while building Quizaboo's question-bank seed script (a standalone `tsx` script, not
|
|
32
|
+
run through Next's bundler); not fully resolved end-to-end for that case — `hazo_core`'s
|
|
33
|
+
`./client` subpath export has the identical gap and is still unfixed, so a transitive import
|
|
34
|
+
through it still fails the same way. That's a separate package's fix, left as a follow-up.
|
|
35
|
+
|
|
3
36
|
## 0.10.2 — 2026-09-19
|
|
4
37
|
|
|
5
38
|
Pure plumbing — no behavior change. Future-proofs hazo_env for the workspace's i18n adoption
|
package/dist/cli.js
CHANGED
|
File without changes
|
package/dist/doctor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,CAoS5E"}
|
package/dist/doctor.js
CHANGED
|
@@ -129,7 +129,9 @@ export async function doctor(opts = {}) {
|
|
|
129
129
|
continue; // already reported as error above
|
|
130
130
|
}
|
|
131
131
|
if (cfg.type === 'sqlite' && cfg.sqlite) {
|
|
132
|
-
|
|
132
|
+
// `createHazoConnect` only exists on hazo_connect's `/server` subpath (the main
|
|
133
|
+
// `.` export doesn't re-export it) — see hazo_connect/dist/server/index.d.ts.
|
|
134
|
+
const hazoConnect = await optional_import('hazo_connect/server');
|
|
133
135
|
if (!hazoConnect) {
|
|
134
136
|
checks.push({
|
|
135
137
|
label: `DB probe [db.${env}]`,
|
|
@@ -140,7 +142,9 @@ export async function doctor(opts = {}) {
|
|
|
140
142
|
else {
|
|
141
143
|
try {
|
|
142
144
|
const conn = hazoConnect.createHazoConnect({ type: 'sqlite', sqlite: cfg.sqlite });
|
|
143
|
-
|
|
145
|
+
// The adapter's raw-SQL method is `rawQuery`, not `query` (see
|
|
146
|
+
// hazo_connect/dist/types.d.ts's HazoConnectAdapter interface).
|
|
147
|
+
await conn.rawQuery('SELECT 1');
|
|
144
148
|
checks.push({ label: `DB probe [db.${env}]`, status: 'ok', detail: cfg.sqlite.database_path });
|
|
145
149
|
}
|
|
146
150
|
catch (e) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hazo_env",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.4",
|
|
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",
|
|
@@ -8,11 +8,13 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
|
-
"import": "./dist/index.js"
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"require": "./dist/index.js"
|
|
12
13
|
},
|
|
13
14
|
"./client": {
|
|
14
15
|
"types": "./dist/index.client.d.ts",
|
|
15
|
-
"import": "./dist/index.client.js"
|
|
16
|
+
"import": "./dist/index.client.js",
|
|
17
|
+
"require": "./dist/index.client.js"
|
|
16
18
|
},
|
|
17
19
|
"./package.json": "./package.json"
|
|
18
20
|
},
|
|
@@ -38,14 +40,14 @@
|
|
|
38
40
|
"picocolors": "^1.1.1"
|
|
39
41
|
},
|
|
40
42
|
"peerDependencies": {
|
|
41
|
-
"hazo_core": "^2.4.
|
|
43
|
+
"hazo_core": "^2.4.1",
|
|
42
44
|
"hazo_config": "^2.6.0",
|
|
43
|
-
"hazo_connect": "^4.3.
|
|
45
|
+
"hazo_connect": "^4.3.3",
|
|
44
46
|
"hazo_files": "^3.4.0",
|
|
45
47
|
"hazo_secure": "^1.8.1",
|
|
46
48
|
"hazo_audit": "^2.3.0",
|
|
47
49
|
"hazo_pdf": "^2.4.0",
|
|
48
|
-
"hazo_i18n": "^0.
|
|
50
|
+
"hazo_i18n": "^0.9.0",
|
|
49
51
|
"react": "^18.0.0 || ^19.0.0",
|
|
50
52
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
51
53
|
"next": "^14.0.0 || ^16.0.0"
|
|
@@ -88,9 +90,9 @@
|
|
|
88
90
|
"@types/node": "^22.10.0",
|
|
89
91
|
"@types/react": "^19.0.0",
|
|
90
92
|
"@types/react-dom": "^19.0.0",
|
|
91
|
-
"hazo_core": "^2.4.
|
|
93
|
+
"hazo_core": "^2.4.1",
|
|
92
94
|
"hazo_config": "^2.6.0",
|
|
93
|
-
"hazo_connect": "^4.3.
|
|
95
|
+
"hazo_connect": "^4.3.3",
|
|
94
96
|
"hazo_files": "^3.4.0",
|
|
95
97
|
"next": "^16.0.10",
|
|
96
98
|
"react": "^19.0.0",
|