@exposify/next 0.0.3 → 0.0.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/dist/config.d.cts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { LoginField, ProposedField } from '@exposify/core';
2
- import { A as ActionField } from './fields-olvyFnxj.cjs';
2
+ import { A as ActionField, M as ManifestSupabase } from './manifest-DZQCvzQy.cjs';
3
3
 
4
- /** What the generator writes to the manifest. */
5
- type FoundLogin = {
4
+ /** One request of a login: a Server Action, or a POST route handler. */
5
+ type FoundStep = {
6
6
  kind: "action";
7
7
  key: string;
8
8
  export: string;
@@ -16,6 +16,13 @@ type FoundLogin = {
16
16
  fields: LoginField[];
17
17
  body: "json" | "form";
18
18
  };
19
+ /** What the generator writes to the manifest: the login, and its second step when it has one. */
20
+ type FoundLogin = FoundStep & {
21
+ /** The first step takes no password: an email or phone number, then the code. */
22
+ passwordless?: boolean;
23
+ /** The second step: the code. */
24
+ verify?: FoundStep;
25
+ };
19
26
 
20
27
  interface FoundPage {
21
28
  file: string;
@@ -103,6 +110,40 @@ interface InlineAction {
103
110
  line: number;
104
111
  }
105
112
 
113
+ /** How someone signs in: what Connect offers in its place. */
114
+ type SupabaseMethod = "password" | "email-code" | "social" | "totp" | "other";
115
+ /** Where a sign-in call runs; "unknown" counts as server (wrongly calling server code browser code would skip the app's checks silently). */
116
+ type SignInSide = "browser" | "server" | "unknown";
117
+ interface SupabaseSignIn {
118
+ method: SupabaseMethod;
119
+ /** The call as written: `signInWithPassword`, `mfa.verify`, `<Auth />`. */
120
+ call: string;
121
+ /** `signInWithOAuth({ provider: "github" })`'s provider, when it's a literal. */
122
+ provider?: string;
123
+ file: string;
124
+ line: number;
125
+ side: SignInSide;
126
+ /** Why that side, for `inspect` and the dashboard: `"use client"`, `a Server Action`. */
127
+ why: string;
128
+ /** The Server Action it's in (`file#export`), on the server. */
129
+ action?: string;
130
+ /** The route handler it's in, on the server. */
131
+ route?: string;
132
+ }
133
+ interface FoundSupabase {
134
+ /** `@supabase/auth-helpers-nextjs` without `@supabase/ssr`: an older cookie format, warned about, not supported. */
135
+ authHelpers?: boolean;
136
+ signIns: SupabaseSignIn[];
137
+ /**
138
+ * Routes that finish a sign-in started elsewhere (`exchangeCodeForSession`,
139
+ * `verifyOtp({ token_hash })`): reported, since their checks don't run for
140
+ * Connect's sign-ins, but never the login.
141
+ */
142
+ callbacks: string[];
143
+ /** `cookieOptions: { name }` or `auth: { storageKey }`, when the app names its session cookie. */
144
+ cookieName?: string;
145
+ }
146
+
106
147
  interface GenerateOptions {
107
148
  /** Output file, relative to the project root. Default: exposify.generated.ts (.js without a tsconfig.json). */
108
149
  out?: string;
@@ -167,6 +208,11 @@ interface Discovery {
167
208
  /** The app's own login, for Connect with no code (login.ts); the other candidates, for `inspect`. */
168
209
  login?: FoundLogin;
169
210
  loginOthers?: FoundLogin[];
211
+ /** Supabase Auth with `@supabase/ssr` (supabase.ts): where users sign in, and which sign-ins Connect makes on Supabase directly. */
212
+ supabase?: {
213
+ found: FoundSupabase;
214
+ choice: ManifestSupabase;
215
+ };
170
216
  }
171
217
  interface GenerateResult {
172
218
  /** Absolute path written. */
package/dist/config.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { LoginField, ProposedField } from '@exposify/core';
2
- import { A as ActionField } from './fields-olvyFnxj.js';
2
+ import { A as ActionField, M as ManifestSupabase } from './manifest-DZQCvzQy.js';
3
3
 
4
- /** What the generator writes to the manifest. */
5
- type FoundLogin = {
4
+ /** One request of a login: a Server Action, or a POST route handler. */
5
+ type FoundStep = {
6
6
  kind: "action";
7
7
  key: string;
8
8
  export: string;
@@ -16,6 +16,13 @@ type FoundLogin = {
16
16
  fields: LoginField[];
17
17
  body: "json" | "form";
18
18
  };
19
+ /** What the generator writes to the manifest: the login, and its second step when it has one. */
20
+ type FoundLogin = FoundStep & {
21
+ /** The first step takes no password: an email or phone number, then the code. */
22
+ passwordless?: boolean;
23
+ /** The second step: the code. */
24
+ verify?: FoundStep;
25
+ };
19
26
 
20
27
  interface FoundPage {
21
28
  file: string;
@@ -103,6 +110,40 @@ interface InlineAction {
103
110
  line: number;
104
111
  }
105
112
 
113
+ /** How someone signs in: what Connect offers in its place. */
114
+ type SupabaseMethod = "password" | "email-code" | "social" | "totp" | "other";
115
+ /** Where a sign-in call runs; "unknown" counts as server (wrongly calling server code browser code would skip the app's checks silently). */
116
+ type SignInSide = "browser" | "server" | "unknown";
117
+ interface SupabaseSignIn {
118
+ method: SupabaseMethod;
119
+ /** The call as written: `signInWithPassword`, `mfa.verify`, `<Auth />`. */
120
+ call: string;
121
+ /** `signInWithOAuth({ provider: "github" })`'s provider, when it's a literal. */
122
+ provider?: string;
123
+ file: string;
124
+ line: number;
125
+ side: SignInSide;
126
+ /** Why that side, for `inspect` and the dashboard: `"use client"`, `a Server Action`. */
127
+ why: string;
128
+ /** The Server Action it's in (`file#export`), on the server. */
129
+ action?: string;
130
+ /** The route handler it's in, on the server. */
131
+ route?: string;
132
+ }
133
+ interface FoundSupabase {
134
+ /** `@supabase/auth-helpers-nextjs` without `@supabase/ssr`: an older cookie format, warned about, not supported. */
135
+ authHelpers?: boolean;
136
+ signIns: SupabaseSignIn[];
137
+ /**
138
+ * Routes that finish a sign-in started elsewhere (`exchangeCodeForSession`,
139
+ * `verifyOtp({ token_hash })`): reported, since their checks don't run for
140
+ * Connect's sign-ins, but never the login.
141
+ */
142
+ callbacks: string[];
143
+ /** `cookieOptions: { name }` or `auth: { storageKey }`, when the app names its session cookie. */
144
+ cookieName?: string;
145
+ }
146
+
106
147
  interface GenerateOptions {
107
148
  /** Output file, relative to the project root. Default: exposify.generated.ts (.js without a tsconfig.json). */
108
149
  out?: string;
@@ -167,6 +208,11 @@ interface Discovery {
167
208
  /** The app's own login, for Connect with no code (login.ts); the other candidates, for `inspect`. */
168
209
  login?: FoundLogin;
169
210
  loginOthers?: FoundLogin[];
211
+ /** Supabase Auth with `@supabase/ssr` (supabase.ts): where users sign in, and which sign-ins Connect makes on Supabase directly. */
212
+ supabase?: {
213
+ found: FoundSupabase;
214
+ choice: ManifestSupabase;
215
+ };
170
216
  }
171
217
  interface GenerateResult {
172
218
  /** Absolute path written. */