mirror of
https://github.com/bitbaum/accountkit.git
synced 2026-12-04 04:37:08 +01:00
* feat(auth): CommonJS build of ./auth/password; reset form asks for the new password once, in the same field as sign-up * feat(auth): PasswordField as its own entry for products with their own pages * fix(styles): the eye's room applies to any input in the box * feat(auth): ./auth/hash, bcrypt over SHA-256 with verify-and-rehash of old hashes * feat(auth): PasswordField accepts name and placeholder
19 lines
641 B
JavaScript
19 lines
641 B
JavaScript
// CommonJS copies of the entries a CommonJS backend needs. ./auth/password is
|
|
// two constants and one function with no imports; ./auth/hash imports only
|
|
// node:crypto. Both come from the same src files as the ESM build, so the
|
|
// copies cannot differ from it.
|
|
import { copyFileSync } from "node:fs";
|
|
import { build } from "esbuild";
|
|
|
|
for (const name of ["password", "hash"]) {
|
|
await build({
|
|
entryPoints: [`src/auth/${name}.ts`],
|
|
outfile: `dist/auth/${name}.cjs`,
|
|
format: "cjs",
|
|
platform: "node",
|
|
target: "es2022",
|
|
logLevel: "warning",
|
|
});
|
|
copyFileSync(`dist/auth/${name}.d.ts`, `dist/auth/${name}.d.cts`);
|
|
}
|