@hachej/boring-core 0.1.20 → 0.1.23

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.
@@ -1,4 +1,4 @@
1
- import { C as CoreConfig, W as Workspace, E as ERROR_CODES, M as MemberRole, a as WorkspaceMember, U as User, b as WorkspaceInvite, c as WorkspaceRuntime, d as WorkspaceRuntimeResourceSelector, e as WorkspaceRuntimeResource, f as WorkspaceRuntimeResourceInput, g as CapabilitiesResponse } from './index-COZa03RP.js';
1
+ import { C as CoreConfig, W as Workspace, E as ERROR_CODES, M as MemberRole, a as WorkspaceMember, U as User, b as WorkspaceInvite, c as WorkspaceRuntime, d as WorkspaceRuntimeResourceSelector, e as WorkspaceRuntimeResource, f as WorkspaceRuntimeResourceInput, g as CapabilitiesResponse } from './types-CbMOXLBf.js';
2
2
  import { drizzle } from 'drizzle-orm/postgres-js';
3
3
  import postgres from 'postgres';
4
4
 
@@ -1,12 +1,12 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
3
  import { Component, ReactNode, ErrorInfo } from 'react';
4
- import { R as RuntimeConfig, g as CapabilitiesResponse, a as WorkspaceMember, U as User, W as Workspace, M as MemberRole, S as SessionState } from '../index-COZa03RP.js';
4
+ import { R as RuntimeConfig, g as CapabilitiesResponse, a as WorkspaceMember, U as User, W as Workspace, M as MemberRole, S as SessionState } from '../types-CbMOXLBf.js';
5
5
  import * as _tanstack_react_query from '@tanstack/react-query';
6
6
  import * as better_auth_react from 'better-auth/react';
7
7
  import { createAuthClient } from 'better-auth/react';
8
8
  import * as better_auth from 'better-auth';
9
- export { a as CoreFront, C as CoreFrontAuthPagesOverride, b as CoreFrontProps } from '../CoreFront-CDeLdfb0.js';
9
+ export { a as CoreFront, C as CoreFrontAuthPagesOverride, b as CoreFrontProps } from '../CoreFront-CgAkiEts.js';
10
10
  import { NavigateFunction } from 'react-router-dom';
11
11
  export { TopBarSlotProvider, useTopBarSlot } from './top-bar-slot.js';
12
12
 
@@ -349,6 +349,13 @@ interface AuthClient extends InferAuthClient {
349
349
  }
350
350
  declare function getAuthClient(baseURL?: string): AuthClient;
351
351
 
352
+ interface GoogleAuthButtonProps {
353
+ callbackURL?: string;
354
+ errorCallbackURL?: string;
355
+ onError?: (message?: string) => void;
356
+ }
357
+ declare function GoogleAuthButton({ callbackURL, errorCallbackURL, onError, }: GoogleAuthButtonProps): react_jsx_runtime.JSX.Element;
358
+
352
359
  declare function SignInPage(): react_jsx_runtime.JSX.Element;
353
360
 
354
361
  declare function SignUpPage(): react_jsx_runtime.JSX.Element;
@@ -385,7 +392,9 @@ type RouteMap = {
385
392
  forgotPassword: '/auth/forgot-password';
386
393
  resetPassword: '/auth/reset-password';
387
394
  verifyEmail: '/auth/verify-email';
395
+ authError: '/auth/error';
388
396
  callbackGithub: '/auth/callback/github';
397
+ callbackGoogle: '/auth/callback/google';
389
398
  me: '/me';
390
399
  workspaceMembers: '/w/:id/members';
391
400
  workspaceInvites: '/w/:id/invites';
@@ -455,4 +464,4 @@ declare function sanitizeToolOutput(input: string): string;
455
464
 
456
465
  declare function debounce<T extends (...args: unknown[]) => unknown>(fn: T, ms: number): T;
457
466
 
458
- export { AppErrorBoundary, type AuthClient, AuthGate, type AuthGateProps, AuthProvider, type AuthProviderProps, type Binding, type Breakpoint, ConfigProvider, type ConfigProviderProps, type CoreCommand, type EnrichedMember, ForgotPasswordPage, InviteAcceptPage, InvitesPage, MembersPage, ResetPasswordPage, type RouteMap, SignInPage, SignUpPage, type ThemeApi, ThemeProvider, type ThemeProviderProps, ThemeToggle, type UserIdentity, UserIdentityProvider, type UserIdentityProviderProps, UserMenu, UserSettingsPage, VerifyEmailPage, WorkspaceAuthProvider, type WorkspaceAuthProviderProps, type WorkspaceCommand, WorkspaceSettingsPage, WorkspaceSwitcher, apiFetch, apiFetchJson, buildApiUrl, buildWsUrl, debounce, getApiBase, getAuthClient, getHttpErrorDetail, getWorkspaceCommands, getWsBase, openWebSocket, routeHref, routes, sanitizeMarkdown, sanitizeToolOutput, setApiBase, useBlobUrl, useCapabilities, useChangePassword, useConfig, useConfigLoaded, useCoreCommands, useCurrentWorkspace, useKeyboardShortcuts, useReducedMotion, useSendVerificationEmail, useSession, useSignIn, useSignOut, useSignUp, useTheme, useUser, useVerifyEmail, useViewportBreakpoint, useWorkspaceMembers, useWorkspaceRole };
467
+ export { AppErrorBoundary, type AuthClient, AuthGate, type AuthGateProps, AuthProvider, type AuthProviderProps, type Binding, type Breakpoint, ConfigProvider, type ConfigProviderProps, type CoreCommand, type EnrichedMember, ForgotPasswordPage, GoogleAuthButton, type GoogleAuthButtonProps, InviteAcceptPage, InvitesPage, MembersPage, ResetPasswordPage, type RouteMap, SignInPage, SignUpPage, type ThemeApi, ThemeProvider, type ThemeProviderProps, ThemeToggle, type UserIdentity, UserIdentityProvider, type UserIdentityProviderProps, UserMenu, UserSettingsPage, VerifyEmailPage, WorkspaceAuthProvider, type WorkspaceAuthProviderProps, type WorkspaceCommand, WorkspaceSettingsPage, WorkspaceSwitcher, apiFetch, apiFetchJson, buildApiUrl, buildWsUrl, debounce, getApiBase, getAuthClient, getHttpErrorDetail, getWorkspaceCommands, getWsBase, openWebSocket, routeHref, routes, sanitizeMarkdown, sanitizeToolOutput, setApiBase, useBlobUrl, useCapabilities, useChangePassword, useConfig, useConfigLoaded, useCoreCommands, useCurrentWorkspace, useKeyboardShortcuts, useReducedMotion, useSendVerificationEmail, useSession, useSignIn, useSignOut, useSignUp, useTheme, useUser, useVerifyEmail, useViewportBreakpoint, useWorkspaceMembers, useWorkspaceRole };
@@ -5,6 +5,7 @@ import {
5
5
  ConfigProvider,
6
6
  CoreFront,
7
7
  ForgotPasswordPage,
8
+ GoogleAuthButton,
8
9
  InviteAcceptPage,
9
10
  InvitesPage,
10
11
  MembersPage,
@@ -56,7 +57,7 @@ import {
56
57
  useViewportBreakpoint,
57
58
  useWorkspaceMembers,
58
59
  useWorkspaceRole
59
- } from "../chunk-A5TMALZR.js";
60
+ } from "../chunk-JMCBLJ6W.js";
60
61
  import {
61
62
  TopBarSlotProvider,
62
63
  useTopBarSlot
@@ -70,6 +71,7 @@ export {
70
71
  ConfigProvider,
71
72
  CoreFront,
72
73
  ForgotPasswordPage,
74
+ GoogleAuthButton,
73
75
  InviteAcceptPage,
74
76
  InvitesPage,
75
77
  MembersPage,
@@ -1,4 +1,4 @@
1
- import { C as CoreConfig } from './index-COZa03RP.js';
1
+ import { C as CoreConfig } from './types-CbMOXLBf.js';
2
2
 
3
3
  interface RunMigrationsOptions {
4
4
  migrationsFolder?: string;
@@ -1,7 +1,7 @@
1
- import { U as UserStore, W as WorkspaceStore } from '../../connection-jW1Xwcne.js';
2
- export { D as Database, c as createDatabase } from '../../connection-jW1Xwcne.js';
3
- export { R as RunMigrationsOptions, r as runMigrations } from '../../migrate-D49JsATX.js';
4
- import { U as User, W as Workspace, E as ERROR_CODES, M as MemberRole, a as WorkspaceMember, b as WorkspaceInvite, c as WorkspaceRuntime, d as WorkspaceRuntimeResourceSelector, e as WorkspaceRuntimeResource, f as WorkspaceRuntimeResourceInput } from '../../index-COZa03RP.js';
1
+ import { U as UserStore, W as WorkspaceStore } from '../../connection-AL8KSENV.js';
2
+ export { D as Database, c as createDatabase } from '../../connection-AL8KSENV.js';
3
+ export { R as RunMigrationsOptions, r as runMigrations } from '../../migrate-B4dwdtGP.js';
4
+ import { U as User, W as Workspace, E as ERROR_CODES, M as MemberRole, a as WorkspaceMember, b as WorkspaceInvite, c as WorkspaceRuntime, d as WorkspaceRuntimeResourceSelector, e as WorkspaceRuntimeResource, f as WorkspaceRuntimeResourceInput } from '../../types-CbMOXLBf.js';
5
5
  import { PostgresJsDatabase } from 'drizzle-orm/postgres-js';
6
6
  import 'postgres';
7
7
 
@@ -5,7 +5,7 @@ import {
5
5
  PostgresWorkspaceStore,
6
6
  createDatabase,
7
7
  runMigrations
8
- } from "../../chunk-HSRBZLKT.js";
8
+ } from "../../chunk-C3YMOITB.js";
9
9
  import "../../chunk-H5KU6R6Y.js";
10
10
  import "../../chunk-MLKGABMK.js";
11
11
  export {
@@ -1,15 +1,15 @@
1
- import { L as LoadConfigOptions } from '../authHook-C5ShLjAS.js';
2
- export { A as AuthHookOptions, B as BetterAuthInstance, C as CreateAuthOptions, a as authHook, b as buildRuntimeConfigPayload, c as createAuth, l as loadConfig, v as validateConfig, d as validatePasswordStrength } from '../authHook-C5ShLjAS.js';
1
+ import { L as LoadConfigOptions } from '../authHook-DUqyxueY.js';
2
+ export { A as AuthHookOptions, B as BetterAuthInstance, C as CreateAuthOptions, a as authHook, b as buildRuntimeConfigPayload, c as createAuth, l as loadConfig, v as validateConfig, d as validatePasswordStrength } from '../authHook-DUqyxueY.js';
3
3
  import { z } from 'zod';
4
- import { C as CoreConfig, M as MemberRole, d as WorkspaceRuntimeResourceSelector, e as WorkspaceRuntimeResource, f as WorkspaceRuntimeResourceInput } from '../index-COZa03RP.js';
4
+ import { C as CoreConfig, M as MemberRole, d as WorkspaceRuntimeResourceSelector, e as WorkspaceRuntimeResource, f as WorkspaceRuntimeResourceInput } from '../types-CbMOXLBf.js';
5
5
  import * as fastify from 'fastify';
6
6
  import { FastifyInstance, FastifyPluginAsync, preHandlerHookHandler, FastifyRequest, FastifyReply } from 'fastify';
7
7
  import * as http from 'http';
8
8
  import { IncomingMessage } from 'node:http';
9
- import { C as CreateCoreAppOptions, D as Database, U as UserStore, W as WorkspaceStore, a as WorkspaceProvisioner } from '../connection-jW1Xwcne.js';
10
- export { A as AuthProvider, b as CapabilitiesContributor, P as ProvisionContext, d as ProvisionResult, c as createDatabase } from '../connection-jW1Xwcne.js';
9
+ import { C as CreateCoreAppOptions, D as Database, U as UserStore, W as WorkspaceStore, a as WorkspaceProvisioner } from '../connection-AL8KSENV.js';
10
+ export { A as AuthProvider, b as CapabilitiesContributor, P as ProvisionContext, d as ProvisionResult, c as createDatabase } from '../connection-AL8KSENV.js';
11
11
  import postgres from 'postgres';
12
- export { r as runMigrations } from '../migrate-D49JsATX.js';
12
+ export { r as runMigrations } from '../migrate-B4dwdtGP.js';
13
13
  import 'better-auth';
14
14
  import 'drizzle-orm/postgres-js';
15
15
 
@@ -86,6 +86,16 @@ declare const coreConfigSchema: z.ZodObject<{
86
86
  clientId: string;
87
87
  clientSecret: string;
88
88
  }>>;
89
+ google: z.ZodOptional<z.ZodObject<{
90
+ clientId: z.ZodString;
91
+ clientSecret: z.ZodString;
92
+ }, "strip", z.ZodTypeAny, {
93
+ clientId: string;
94
+ clientSecret: string;
95
+ }, {
96
+ clientId: string;
97
+ clientSecret: string;
98
+ }>>;
89
99
  mail: z.ZodOptional<z.ZodObject<{
90
100
  from: z.ZodString;
91
101
  transportUrl: z.ZodEffects<z.ZodString, string, string>;
@@ -107,6 +117,10 @@ declare const coreConfigSchema: z.ZodObject<{
107
117
  clientId: string;
108
118
  clientSecret: string;
109
119
  } | undefined;
120
+ google?: {
121
+ clientId: string;
122
+ clientSecret: string;
123
+ } | undefined;
110
124
  mail?: {
111
125
  from: string;
112
126
  transportUrl: string;
@@ -120,6 +134,10 @@ declare const coreConfigSchema: z.ZodObject<{
120
134
  clientId: string;
121
135
  clientSecret: string;
122
136
  } | undefined;
137
+ google?: {
138
+ clientId: string;
139
+ clientSecret: string;
140
+ } | undefined;
123
141
  mail?: {
124
142
  from: string;
125
143
  transportUrl: string;
@@ -127,16 +145,19 @@ declare const coreConfigSchema: z.ZodObject<{
127
145
  }>;
128
146
  features: z.ZodObject<{
129
147
  githubOauth: z.ZodBoolean;
148
+ googleOauth: z.ZodBoolean;
130
149
  invitesEnabled: z.ZodBoolean;
131
150
  sendWelcomeEmail: z.ZodBoolean;
132
151
  inviteTtlDays: z.ZodDefault<z.ZodNumber>;
133
152
  }, "strip", z.ZodTypeAny, {
134
153
  githubOauth: boolean;
154
+ googleOauth: boolean;
135
155
  invitesEnabled: boolean;
136
156
  sendWelcomeEmail: boolean;
137
157
  inviteTtlDays: number;
138
158
  }, {
139
159
  githubOauth: boolean;
160
+ googleOauth: boolean;
140
161
  invitesEnabled: boolean;
141
162
  sendWelcomeEmail: boolean;
142
163
  inviteTtlDays?: number | undefined;
@@ -168,6 +189,10 @@ declare const coreConfigSchema: z.ZodObject<{
168
189
  clientId: string;
169
190
  clientSecret: string;
170
191
  } | undefined;
192
+ google?: {
193
+ clientId: string;
194
+ clientSecret: string;
195
+ } | undefined;
171
196
  mail?: {
172
197
  from: string;
173
198
  transportUrl: string;
@@ -175,6 +200,7 @@ declare const coreConfigSchema: z.ZodObject<{
175
200
  };
176
201
  features: {
177
202
  githubOauth: boolean;
203
+ googleOauth: boolean;
178
204
  invitesEnabled: boolean;
179
205
  sendWelcomeEmail: boolean;
180
206
  inviteTtlDays: number;
@@ -216,6 +242,10 @@ declare const coreConfigSchema: z.ZodObject<{
216
242
  clientId: string;
217
243
  clientSecret: string;
218
244
  } | undefined;
245
+ google?: {
246
+ clientId: string;
247
+ clientSecret: string;
248
+ } | undefined;
219
249
  mail?: {
220
250
  from: string;
221
251
  transportUrl: string;
@@ -223,6 +253,7 @@ declare const coreConfigSchema: z.ZodObject<{
223
253
  };
224
254
  features: {
225
255
  githubOauth: boolean;
256
+ googleOauth: boolean;
226
257
  invitesEnabled: boolean;
227
258
  sendWelcomeEmail: boolean;
228
259
  inviteTtlDays?: number | undefined;
@@ -24,11 +24,11 @@ import {
24
24
  requireWorkspaceMember,
25
25
  validateConfig,
26
26
  validatePasswordStrength
27
- } from "../chunk-V5CXMFHP.js";
27
+ } from "../chunk-6D7LEQSL.js";
28
28
  import {
29
29
  createDatabase,
30
30
  runMigrations
31
- } from "../chunk-HSRBZLKT.js";
31
+ } from "../chunk-C3YMOITB.js";
32
32
  import "../chunk-H5KU6R6Y.js";
33
33
  import "../chunk-MLKGABMK.js";
34
34
 
@@ -1 +1,15 @@
1
- export { g as CapabilitiesResponse, h as ConfigFetchError, i as ConfigValidationError, j as CoreCapabilities, C as CoreConfig, E as ERROR_CODES, k as ErrorCode, H as HttpError, J as JsonValue, M as MemberRole, l as RateLimitEndpointOverride, R as RuntimeConfig, m as SessionPayload, S as SessionState, U as User, W as Workspace, b as WorkspaceInvite, a as WorkspaceMember, c as WorkspaceRuntime } from '../index-COZa03RP.js';
1
+ export { g as CapabilitiesResponse, h as ConfigFetchError, i as ConfigValidationError, j as CoreCapabilities, C as CoreConfig, E as ERROR_CODES, k as ErrorCode, H as HttpError, J as JsonValue, M as MemberRole, l as RateLimitEndpointOverride, R as RuntimeConfig, m as SessionPayload, S as SessionState, U as User, W as Workspace, b as WorkspaceInvite, a as WorkspaceMember, c as WorkspaceRuntime } from '../types-CbMOXLBf.js';
2
+
3
+ interface TelemetrySink {
4
+ capture(event: TelemetryEvent): void | Promise<void>;
5
+ flush?(): void | Promise<void>;
6
+ }
7
+ interface TelemetryEvent {
8
+ name: string;
9
+ distinctId?: string;
10
+ properties?: Record<string, unknown>;
11
+ }
12
+ declare const noopTelemetry: TelemetrySink;
13
+ declare function safeCapture(telemetry: TelemetrySink, event: TelemetryEvent): void;
14
+
15
+ export { type TelemetryEvent, type TelemetrySink, noopTelemetry, safeCapture };
@@ -1,3 +1,7 @@
1
+ import {
2
+ noopTelemetry,
3
+ safeCapture
4
+ } from "../chunk-AQBXNPMD.js";
1
5
  import {
2
6
  ConfigFetchError,
3
7
  ConfigValidationError,
@@ -9,5 +13,7 @@ export {
9
13
  ConfigFetchError,
10
14
  ConfigValidationError,
11
15
  ERROR_CODES,
12
- HttpError
16
+ HttpError,
17
+ noopTelemetry,
18
+ safeCapture
13
19
  };
@@ -207,6 +207,10 @@ interface CoreConfig {
207
207
  clientId: string;
208
208
  clientSecret: string;
209
209
  };
210
+ google?: {
211
+ clientId: string;
212
+ clientSecret: string;
213
+ };
210
214
  mail?: {
211
215
  from: string;
212
216
  transportUrl: string;
@@ -216,6 +220,7 @@ interface CoreConfig {
216
220
  };
217
221
  features: {
218
222
  githubOauth: boolean;
223
+ googleOauth: boolean;
219
224
  invitesEnabled: boolean;
220
225
  sendWelcomeEmail: boolean;
221
226
  inviteTtlDays: number;
@@ -228,6 +233,7 @@ interface RuntimeConfig {
228
233
  apiBase: string;
229
234
  features: {
230
235
  githubOauth: boolean;
236
+ googleOauth: boolean;
231
237
  invitesEnabled: boolean;
232
238
  sendWelcomeEmail: boolean;
233
239
  };
@@ -240,11 +246,13 @@ type CoreCapabilities = {
240
246
  features: {
241
247
  invitesEnabled: boolean;
242
248
  githubOauth: boolean;
249
+ googleOauth: boolean;
243
250
  emailFlows: boolean;
244
251
  };
245
252
  auth: {
246
253
  emailPassword: boolean;
247
254
  github: boolean;
255
+ google: boolean;
248
256
  emailVerification: boolean;
249
257
  passwordReset: boolean;
250
258
  magicLink: boolean;
@@ -0,0 +1,12 @@
1
+ CREATE TABLE IF NOT EXISTS "telemetry_events" (
2
+ "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
3
+ "app_id" text NOT NULL,
4
+ "event_name" text NOT NULL,
5
+ "distinct_id" text DEFAULT 'anonymous' NOT NULL,
6
+ "properties" jsonb DEFAULT '{}'::jsonb NOT NULL,
7
+ "created_at" timestamp DEFAULT now() NOT NULL
8
+ );
9
+ --> statement-breakpoint
10
+ CREATE INDEX IF NOT EXISTS "telemetry_events_app_created_at_idx" ON "telemetry_events" USING btree ("app_id", "created_at");
11
+ --> statement-breakpoint
12
+ CREATE INDEX IF NOT EXISTS "telemetry_events_event_name_idx" ON "telemetry_events" USING btree ("event_name");
@@ -71,6 +71,13 @@
71
71
  "when": 1777536000000,
72
72
  "tag": "0009_workspace_runtime_resources",
73
73
  "breakpoints": true
74
+ },
75
+ {
76
+ "idx": 10,
77
+ "version": "7",
78
+ "when": 1779537600000,
79
+ "tag": "0010_telemetry_events",
80
+ "breakpoints": true
74
81
  }
75
82
  ]
76
83
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hachej/boring-core",
3
- "version": "0.1.20",
3
+ "version": "0.1.23",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Foundation package for boring-ui-v2 apps: DB, auth, config, HTTP app factory, and frontend app shell.",
@@ -78,9 +78,9 @@
78
78
  "react-router-dom": "^7.14.2",
79
79
  "smol-toml": "^1.6.1",
80
80
  "zod": "^3.25.76",
81
- "@hachej/boring-ui-kit": "0.1.20",
82
- "@hachej/boring-workspace": "0.1.20",
83
- "@hachej/boring-agent": "0.1.20"
81
+ "@hachej/boring-agent": "0.1.23",
82
+ "@hachej/boring-workspace": "0.1.23",
83
+ "@hachej/boring-ui-kit": "0.1.23"
84
84
  },
85
85
  "devDependencies": {
86
86
  "@testing-library/jest-dom": "^6.9.1",