Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ What the package gives a property:
- **Validation and normalization.** `acme.com/about`, `https://www.Acme.com` and `@acme.com` all become `acme.com`. Any LinkedIn URL, `in/x` or bare handle becomes the canonical URL. A link in a name box is refused as spam. Names are never "corrected" (McDonald stays McDonald).
- **Company from a work email.** A blank company domain is filled from the signup email unless it is a personal or relay mailbox (gmail, proton, passmail and so on).
- **Signup form fields.** As an HTML string for server-rendered pages, and as a React component, with the right `autocomplete` tokens so browsers fill them.
- **Storage on whatever the property already runs:** postgres.js, node-postgres, libSQL/Turso, or supabase-js on the server. Either its own `user_profiles` table, or the columns added to an existing `profiles`/`users` table.
- **Storage on whatever the property already runs:** postgres.js, Bun SQL, node-postgres, libSQL/Turso, @profullstack/libsql-pg, bun:sqlite, better-sqlite3, or supabase-js on the server. Either its own `user_profiles` table, or the columns added to an existing `profiles`/`users` table.
- **`GET`/`PUT`/`PATCH /api/v1/me/profile`** handlers on Web-standard Request/Response, for Next and Hono alike.
- **A CLI and an MCP server** (`profile`), including `profile export` in contract order.

Expand Down
9 changes: 7 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ export interface StoreOptions {
table?: string;
key?: string;
keyType?: string;
/** Force the SQL dialect for a client that could be either. */
dialect?: "postgres" | "sqlite";
}
export interface ProfileStore {
readonly table: string;
Expand All @@ -105,14 +107,17 @@ export interface ProfileStore {
}>;
all(opts?: { limit?: number; since?: string | null }): AsyncGenerator<Profile>;
}
/** postgres.js sql, a pg Pool/Client, an @libsql/client, a server-side supabase-js client, or a DbAdapter. */
/**
* postgres.js or Bun SQL, a pg Pool/Client, @libsql/client or @profullstack/libsql-pg,
* bun:sqlite or better-sqlite3, a server-side supabase-js client, or a DbAdapter.
*/
export function createProfileStore(db: unknown, options?: StoreOptions): ProfileStore;
export function migrate(
dbOrStore: unknown,
options?: StoreOptions,
): Promise<{ created: boolean; added: string[] }>;
export function schemaSql(options?: StoreOptions & { dialect?: "postgres" | "sqlite" }): string;
export function adapt(db: unknown): DbAdapter | { dialect: "supabase"; client: unknown };
export function adapt(db: unknown, dialect?: "postgres" | "sqlite"): DbAdapter | { dialect: "supabase"; client: unknown };

export interface SessionUser {
id: string | number;
Expand Down
193 changes: 191 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 45 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,47 @@
{
"name": "@profullstack/profile",
"version": "0.1.0",
"version": "0.1.1",
"type": "module",
"description": "One user profile for every property: email, first_name, last_name, company_domain, job_title, linkedin_url. Validation, signup form fields, storage on Postgres/Turso/Supabase, HTTP handlers, CSV export, CLI and MCP.",
"keywords": ["profile", "signup", "user-profile", "lead", "postgres", "turso", "libsql", "supabase", "mcp"],
"keywords": [
"profile",
"signup",
"user-profile",
"lead",
"postgres",
"turso",
"libsql",
"supabase",
"mcp"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/profullstack/profile.git"
},
"homepage": "https://github.com/profullstack/profile#readme",
"exports": {
".": { "types": "./index.d.ts", "import": "./src/index.js" },
"./react": { "types": "./react.d.ts", "import": "./src/react.js" },
"./cli": { "import": "./src/cli.js" }
".": {
"types": "./index.d.ts",
"import": "./src/index.js"
},
"./react": {
"types": "./react.d.ts",
"import": "./src/react.js"
},
"./cli": {
"import": "./src/cli.js"
}
},
"bin": { "profile": "./src/cli.js" },
"files": ["src", "index.d.ts", "react.d.ts", "README.md"],
"bin": {
"profile": "./src/cli.js"
},
"files": [
"src",
"index.d.ts",
"react.d.ts",
"README.md"
],
"scripts": {
"test": "node --test test/*.test.js"
},
Expand All @@ -26,15 +51,24 @@
"react": ">=18"
},
"peerDependenciesMeta": {
"@libsql/client": { "optional": true },
"postgres": { "optional": true },
"react": { "optional": true }
"@libsql/client": {
"optional": true
},
"postgres": {
"optional": true
},
"react": {
"optional": true
}
},
"devDependencies": {
"@libsql/client": "^0.15.15",
"@profullstack/libsql-pg": "^0.1.4",
"postgres": "^3.4.7",
"react": "^19.1.0",
"react-dom": "^19.1.0"
},
"engines": { "node": ">=20" }
"engines": {
"node": ">=20"
}
}
2 changes: 1 addition & 1 deletion src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
csvRow,
} from "./index.js";

const VERSION = "0.1.0";
const VERSION = "0.1.1";

const USAGE = `profile - signup profile fields (${COLUMNS.join(", ")})

Expand Down
Loading
Loading