hazo_auth 10.14.0 → 10.15.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.
- package/cli-src/cli/init.ts +8 -0
- package/cli-src/cli/init_db.ts +10 -0
- package/cli-src/cli/validate.ts +9 -0
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +7 -0
- package/dist/cli/init_db.d.ts.map +1 -1
- package/dist/cli/init_db.js +9 -0
- package/dist/cli/validate.d.ts.map +1 -1
- package/dist/cli/validate.js +8 -0
- package/dist/server/routes/library_photos.d.ts +2 -2
- package/package.json +7 -5
package/cli-src/cli/init.ts
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
// file_description: init command for hazo_auth
|
|
2
2
|
// Creates directories and copies config files to consuming projects
|
|
3
3
|
|
|
4
|
+
import { createRequire } from "node:module";
|
|
4
5
|
import { fileURLToPath } from "url";
|
|
5
6
|
import * as fs from "fs";
|
|
6
7
|
import * as path from "path";
|
|
7
8
|
|
|
8
9
|
// section: esm_shim
|
|
10
|
+
// package.json declares "type": "module" and bin/hazo_auth.mjs runs this file
|
|
11
|
+
// through tsx, so a bare require() here is a ReferenceError, not a fallback.
|
|
12
|
+
// better-sqlite3 is loaded lazily below (it is optional — only SQLite projects
|
|
13
|
+
// install it), and createRequire is what makes a lazy CommonJS load legal
|
|
14
|
+
// from ESM.
|
|
15
|
+
const require = createRequire(import.meta.url);
|
|
16
|
+
|
|
9
17
|
// ESM-compatible __dirname shim
|
|
10
18
|
const __filename = fileURLToPath(import.meta.url);
|
|
11
19
|
const __dirname = path.dirname(__filename);
|
package/cli-src/cli/init_db.ts
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
// file_description: CLI command to initialize SQLite database with hazo_auth schema
|
|
2
2
|
// Can be run standalone via: npx hazo_auth init-db
|
|
3
3
|
|
|
4
|
+
import { createRequire } from "node:module";
|
|
4
5
|
import * as fs from "fs";
|
|
5
6
|
import * as path from "path";
|
|
6
7
|
import { SQLITE_SCHEMA } from "../lib/schema/sqlite_schema.js";
|
|
7
8
|
|
|
9
|
+
// section: esm_shim
|
|
10
|
+
// package.json declares "type": "module" and bin/hazo_auth.mjs runs this file
|
|
11
|
+
// through tsx, so it is ESM: a bare require() is a ReferenceError, not a
|
|
12
|
+
// fallback. The better-sqlite3 loads below are deliberately lazy (the
|
|
13
|
+
// dependency is optional — only SQLite projects install it), which is why they
|
|
14
|
+
// are require() calls rather than static imports, and createRequire is what
|
|
15
|
+
// makes a lazy CommonJS load legal from ESM.
|
|
16
|
+
const require = createRequire(import.meta.url);
|
|
17
|
+
|
|
8
18
|
// section: helpers
|
|
9
19
|
|
|
10
20
|
/**
|
package/cli-src/cli/validate.ts
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
// file_description: validation logic for hazo_auth setup verification
|
|
2
2
|
// This module contains all the validation checks that can be run via CLI or programmatically
|
|
3
3
|
|
|
4
|
+
import { createRequire } from "node:module";
|
|
4
5
|
import * as fs from "fs";
|
|
5
6
|
import * as path from "path";
|
|
6
7
|
|
|
8
|
+
// section: esm_shim
|
|
9
|
+
// package.json declares "type": "module" and bin/hazo_auth.mjs runs this file
|
|
10
|
+
// through tsx, so a bare require() here is a ReferenceError, not a fallback.
|
|
11
|
+
// The better-sqlite3 load below is deliberately lazy (the dependency is
|
|
12
|
+
// optional), and createRequire is what makes a lazy CommonJS load legal
|
|
13
|
+
// from ESM.
|
|
14
|
+
const require = createRequire(import.meta.url);
|
|
15
|
+
|
|
7
16
|
// section: types
|
|
8
17
|
type CheckStatus = "pass" | "fail" | "warn";
|
|
9
18
|
|
package/dist/cli/init.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/cli/init.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/cli/init.ts"],"names":[],"mappings":"AA4JA,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAqPjD"}
|
package/dist/cli/init.js
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
// file_description: init command for hazo_auth
|
|
2
2
|
// Creates directories and copies config files to consuming projects
|
|
3
|
+
import { createRequire } from "node:module";
|
|
3
4
|
import { fileURLToPath } from "url";
|
|
4
5
|
import * as fs from "fs";
|
|
5
6
|
import * as path from "path";
|
|
6
7
|
// section: esm_shim
|
|
8
|
+
// package.json declares "type": "module" and bin/hazo_auth.mjs runs this file
|
|
9
|
+
// through tsx, so a bare require() here is a ReferenceError, not a fallback.
|
|
10
|
+
// better-sqlite3 is loaded lazily below (it is optional — only SQLite projects
|
|
11
|
+
// install it), and createRequire is what makes a lazy CommonJS load legal
|
|
12
|
+
// from ESM.
|
|
13
|
+
const require = createRequire(import.meta.url);
|
|
7
14
|
// ESM-compatible __dirname shim
|
|
8
15
|
const __filename = fileURLToPath(import.meta.url);
|
|
9
16
|
const __dirname = path.dirname(__filename);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init_db.d.ts","sourceRoot":"","sources":["../../src/cli/init_db.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init_db.d.ts","sourceRoot":"","sources":["../../src/cli/init_db.ts"],"names":[],"mappings":"AAkFA,wBAAgB,cAAc,IAAI,IAAI,CAuErC"}
|
package/dist/cli/init_db.js
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
// file_description: CLI command to initialize SQLite database with hazo_auth schema
|
|
2
2
|
// Can be run standalone via: npx hazo_auth init-db
|
|
3
|
+
import { createRequire } from "node:module";
|
|
3
4
|
import * as fs from "fs";
|
|
4
5
|
import * as path from "path";
|
|
5
6
|
import { SQLITE_SCHEMA } from "../lib/schema/sqlite_schema.js";
|
|
7
|
+
// section: esm_shim
|
|
8
|
+
// package.json declares "type": "module" and bin/hazo_auth.mjs runs this file
|
|
9
|
+
// through tsx, so it is ESM: a bare require() is a ReferenceError, not a
|
|
10
|
+
// fallback. The better-sqlite3 loads below are deliberately lazy (the
|
|
11
|
+
// dependency is optional — only SQLite projects install it), which is why they
|
|
12
|
+
// are require() calls rather than static imports, and createRequire is what
|
|
13
|
+
// makes a lazy CommonJS load legal from ESM.
|
|
14
|
+
const require = createRequire(import.meta.url);
|
|
6
15
|
// section: helpers
|
|
7
16
|
/**
|
|
8
17
|
* Reads sqlite_path from the config file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/cli/validate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/cli/validate.ts"],"names":[],"mappings":"AAgBA,KAAK,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAE5C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB,CAAC;AA20BF,wBAAgB,cAAc,IAAI,iBAAiB,CA8FlD"}
|
package/dist/cli/validate.js
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
// file_description: validation logic for hazo_auth setup verification
|
|
2
2
|
// This module contains all the validation checks that can be run via CLI or programmatically
|
|
3
|
+
import { createRequire } from "node:module";
|
|
3
4
|
import * as fs from "fs";
|
|
4
5
|
import * as path from "path";
|
|
6
|
+
// section: esm_shim
|
|
7
|
+
// package.json declares "type": "module" and bin/hazo_auth.mjs runs this file
|
|
8
|
+
// through tsx, so a bare require() here is a ReferenceError, not a fallback.
|
|
9
|
+
// The better-sqlite3 load below is deliberately lazy (the dependency is
|
|
10
|
+
// optional), and createRequire is what makes a lazy CommonJS load legal
|
|
11
|
+
// from ESM.
|
|
12
|
+
const require = createRequire(import.meta.url);
|
|
5
13
|
// section: constants
|
|
6
14
|
const REQUIRED_CONFIG_FILES = [
|
|
7
15
|
"config/hazo_auth_config.ini",
|
|
@@ -11,11 +11,11 @@ export declare function GET(request: NextRequest): Promise<NextResponse<{
|
|
|
11
11
|
has_more: boolean;
|
|
12
12
|
total_pages: number;
|
|
13
13
|
};
|
|
14
|
-
source: "
|
|
14
|
+
source: "node_modules" | "project";
|
|
15
15
|
}> | NextResponse<{
|
|
16
16
|
success: boolean;
|
|
17
17
|
categories: string[];
|
|
18
|
-
source: "
|
|
18
|
+
source: "node_modules" | "project" | null;
|
|
19
19
|
}> | NextResponse<{
|
|
20
20
|
error: string;
|
|
21
21
|
}>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hazo_auth",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.15.0",
|
|
4
4
|
"description": "Zero-config authentication UI components for Next.js with RBAC, OAuth, scope-based multi-tenancy, and invitations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"authentication",
|
|
@@ -221,7 +221,8 @@
|
|
|
221
221
|
"demo:create": "tsx --conditions react-server scripts/demo.ts create",
|
|
222
222
|
"demo:delete": "tsx --conditions react-server scripts/demo.ts delete",
|
|
223
223
|
"test": "cross-env NODE_ENV=test jest --runInBand",
|
|
224
|
-
"test:watch": "cross-env NODE_ENV=test jest --watch"
|
|
224
|
+
"test:watch": "cross-env NODE_ENV=test jest --watch",
|
|
225
|
+
"test:vitest": "vitest run"
|
|
225
226
|
},
|
|
226
227
|
"dependencies": {
|
|
227
228
|
"@radix-ui/react-accordion": "^1.2.0",
|
|
@@ -271,7 +272,7 @@
|
|
|
271
272
|
},
|
|
272
273
|
"peerDependencies": {
|
|
273
274
|
"hazo_config": "^2.4.1",
|
|
274
|
-
"hazo_connect": "^
|
|
275
|
+
"hazo_connect": "^4.0.0",
|
|
275
276
|
"hazo_core": "^1.3.0",
|
|
276
277
|
"hazo_logs": "^2.1.1",
|
|
277
278
|
"hazo_notify": "^6.1.4",
|
|
@@ -354,7 +355,7 @@
|
|
|
354
355
|
"eslint-plugin-storybook": "^10.0.6",
|
|
355
356
|
"hazo_api": "^2.6.0",
|
|
356
357
|
"hazo_config": "^2.4.2",
|
|
357
|
-
"hazo_connect": "^
|
|
358
|
+
"hazo_connect": "^4.0.0",
|
|
358
359
|
"hazo_core": "^1.3.1",
|
|
359
360
|
"hazo_logs": "^2.2.0",
|
|
360
361
|
"hazo_notify": "^6.1.5",
|
|
@@ -378,6 +379,7 @@
|
|
|
378
379
|
"tailwindcss": "^4.2.4",
|
|
379
380
|
"ts-jest": "^29.4.5",
|
|
380
381
|
"tsx": "^4.20.6",
|
|
381
|
-
"typescript": "^5.7.2"
|
|
382
|
+
"typescript": "^5.7.2",
|
|
383
|
+
"vitest": "^4.1.5"
|
|
382
384
|
}
|
|
383
385
|
}
|