hazo_admin 0.6.0 → 0.6.1
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 +18 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -234,6 +234,23 @@ import { createJobQueue } from 'hazo_jobs';
|
|
|
234
234
|
registerIssueArchiveJob(jobQueue, { getHazoConnect, archiveAfterMonths: 3 });
|
|
235
235
|
```
|
|
236
236
|
|
|
237
|
+
### `createIssueStoreFromConnect(adapter)` — PostgREST-native store (v0.6.0)
|
|
238
|
+
|
|
239
|
+
Use this factory when the consuming app connects via a PostgREST adapter (no direct SQL access). It builds the same `IssueStore` interface using `createCrudService` + `adapter.claimRows` so no raw SQL is issued.
|
|
240
|
+
|
|
241
|
+
```ts
|
|
242
|
+
import { createIssueStoreFromConnect } from 'hazo_admin';
|
|
243
|
+
|
|
244
|
+
// In your route handler or service bootstrap:
|
|
245
|
+
const store = await createIssueStoreFromConnect(adapter);
|
|
246
|
+
// store implements the full IssueStore interface
|
|
247
|
+
const { issue, isNew } = await store.createOrBumpIssue({ ... });
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
**Capability sniff:** if the adapter exposes a `.raw()` method (i.e. it is a direct-DB adapter), `createIssueStoreFromConnect` transparently delegates to `createIssueStore` instead. This lets callers use a single factory regardless of adapter type.
|
|
251
|
+
|
|
252
|
+
**Async:** returns a `Promise<IssueStore>` (lazy `hazo_connect/server` import on the CRUD path).
|
|
253
|
+
|
|
237
254
|
---
|
|
238
255
|
|
|
239
256
|
## v0.2.0 Breaking changes
|
|
@@ -258,7 +275,7 @@ Consumers of this endpoint (e.g. `EnvMigrationPanel`) must read the `role` field
|
|
|
258
275
|
|
|
259
276
|
| Import path | Contents | Server-safe |
|
|
260
277
|
|---|---|---|
|
|
261
|
-
| `hazo_admin` | `adminGate`, `withAdminGate`, `HAZO_ADMIN_PERMISSIONS`, `AdminGateResult`, `createIssueStore`, `registerIssueType`, `getIssueType`, `listIssueTypes`, `loadIssueRoutingConfig`, `registerIssueArchiveJob`, `ADMIN_ISSUE_ARCHIVE_JOB_TYPE` | Server only |
|
|
278
|
+
| `hazo_admin` | `adminGate`, `withAdminGate`, `HAZO_ADMIN_PERMISSIONS`, `AdminGateResult`, `createIssueStore`, `createIssueStoreFromConnect`, `registerIssueType`, `getIssueType`, `listIssueTypes`, `loadIssueRoutingConfig`, `registerIssueArchiveJob`, `ADMIN_ISSUE_ARCHIVE_JOB_TYPE` | Server only |
|
|
262
279
|
| `hazo_admin/client` | `HAZO_ADMIN_PERMISSIONS`, `registerIssueCardRenderer`, `getIssueCardRenderer`, `listIssueCardRenderers`, `DefaultIssueCard`, types | Yes |
|
|
263
280
|
| `hazo_admin/api` | `createAdminPresetRoutes` | Server only |
|
|
264
281
|
| `hazo_admin/jobs` | `ENV_MIGRATE_JOB_TYPE`, `envMigrateJobHandler` | Server only (no React) |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hazo_admin",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Standard site-admin package — auth-gated admin shell + panel kit + drop-in /admin preset",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -56,11 +56,11 @@
|
|
|
56
56
|
"react": "^18.0.0 || ^19.0.0",
|
|
57
57
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
58
58
|
"next": "^14.0.0 || ^16.0.0",
|
|
59
|
-
"hazo_auth": "^10.
|
|
59
|
+
"hazo_auth": "^10.4.1",
|
|
60
60
|
"hazo_logs": "^2.0.2",
|
|
61
61
|
"hazo_debug": "^3.1.1",
|
|
62
62
|
"hazo_connect": "^3.7.0",
|
|
63
|
-
"hazo_config": "^2.
|
|
63
|
+
"hazo_config": "^2.3.0",
|
|
64
64
|
"hazo_api": "^2.3.1",
|
|
65
65
|
"hazo_files": "^3.0.0",
|
|
66
66
|
"hazo_jobs": "^0.12.0",
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
"@types/react-dom": "^19.0.0",
|
|
133
133
|
"hazo_core": "^1.2.0",
|
|
134
134
|
"hazo_ui": "^4.4.0",
|
|
135
|
-
"hazo_auth": "^10.
|
|
135
|
+
"hazo_auth": "^10.4.1",
|
|
136
136
|
"hazo_testing": "^0.3.1",
|
|
137
137
|
"react": "^19.0.0",
|
|
138
138
|
"react-dom": "^19.0.0",
|