Skip to content

Commit ef7e666

Browse files
authored
JS lib docs (stack-auth#444)
1 parent 9a75d60 commit ef7e666

File tree

36 files changed

+1144
-152
lines changed

36 files changed

+1144
-152
lines changed

apps/backend/sentry.client.config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44

55
import * as Sentry from "@sentry/nextjs";
66
import { getBrowserCompatibilityReport } from "@stackframe/stack-shared/dist/utils/browser-compat";
7-
import { getPublicEnvVar } from "@stackframe/stack-shared/dist/utils/env";
87
import { sentryBaseConfig } from "@stackframe/stack-shared/dist/utils/sentry";
98
import { nicify } from "@stackframe/stack-shared/dist/utils/strings";
109

1110
Sentry.init({
1211
...sentryBaseConfig,
1312

14-
dsn: getPublicEnvVar("NEXT_PUBLIC_SENTRY_DSN"),
13+
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
1514

1615
enabled: process.env.NODE_ENV !== "development" && !process.env.CI,
1716

apps/backend/src/app/api/latest/auth/oauth/authorize/[provider_id]/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { checkApiKeySet } from "@/lib/api-keys";
2-
import { Tenancy, getSoleTenancyFromProject } from "@/lib/tenancies";
2+
import { getSoleTenancyFromProject } from "@/lib/tenancies";
33
import { decodeAccessToken, oauthCookieSchema } from "@/lib/tokens";
44
import { getProvider } from "@/oauth";
55
import { prismaClient } from "@/prisma-client";

apps/dashboard/sentry.client.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
// The config you add here will be used whenever a users loads a page in their browser.
33
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
44

5+
import { getPublicEnvVar } from "@/lib/env";
56
import * as Sentry from "@sentry/nextjs";
67
import { getBrowserCompatibilityReport } from "@stackframe/stack-shared/dist/utils/browser-compat";
7-
import { getPublicEnvVar } from "@stackframe/stack-shared/dist/utils/env";
88
import { sentryBaseConfig } from "@stackframe/stack-shared/dist/utils/sentry";
99
import { nicify } from "@stackframe/stack-shared/dist/utils/strings";
1010
import posthog from "posthog-js";

apps/dashboard/src/app/(main)/(protected)/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import Loading from "@/app/loading";
44
import { useStackApp, useUser } from "@stackframe/stack";
5-
import { getPublicEnvVar } from '@stackframe/stack-shared/dist/utils/env';
5+
import { getPublicEnvVar } from '@/lib/env';
66
import { runAsynchronouslyWithAlert } from "@stackframe/stack-shared/dist/utils/promises";
77
import { useEffect } from "react";
88

apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/providers.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"use client";
22
import { FormDialog } from "@/components/form-dialog";
33
import { InputField, SwitchField } from "@/components/form-fields";
4-
import type { AdminProject } from "@stackframe/stack";
4+
import { getPublicEnvVar } from '@/lib/env';
5+
import { AdminProject } from "@stackframe/stack";
56
import { yupBoolean, yupObject, yupString } from "@stackframe/stack-shared/dist/schema-fields";
6-
import { getPublicEnvVar } from '@stackframe/stack-shared/dist/utils/env';
77
import { sharedProviders } from "@stackframe/stack-shared/dist/utils/oauth";
88
import { ActionDialog, Badge, BrandIcons, InlineCode, Label, SimpleTooltip, Typography } from "@stackframe/stack-ui";
99
import clsx from "clsx";

apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/emails/page-client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import { FormDialog } from "@/components/form-dialog";
44
import { InputField, SelectField } from "@/components/form-fields";
55
import { useRouter } from "@/components/router";
66
import { SettingCard, SettingText } from "@/components/settings";
7+
import { getPublicEnvVar } from "@/lib/env";
78
import { AdminEmailConfig, AdminProject } from "@stackframe/stack";
89
import { Reader } from "@stackframe/stack-emails/dist/editor/email-builder/index";
910
import { EMAIL_TEMPLATES_METADATA, convertEmailSubjectVariables, convertEmailTemplateMetadataExampleValues, convertEmailTemplateVariables, validateEmailTemplateContent } from "@stackframe/stack-emails/dist/utils";
1011
import { EmailTemplateType } from "@stackframe/stack-shared/dist/interface/crud/email-templates";
1112
import { strictEmailSchema } from "@stackframe/stack-shared/dist/schema-fields";
12-
import { getPublicEnvVar } from "@stackframe/stack-shared/dist/utils/env";
1313
import { throwErr } from "@stackframe/stack-shared/dist/utils/errors";
1414
import { deepPlainEquals } from "@stackframe/stack-shared/dist/utils/objects";
1515
import { ActionCell, ActionDialog, Alert, Button, Card, SimpleTooltip, Typography, useToast } from "@stackframe/stack-ui";

apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/project-settings/page-client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { InputField, SwitchField } from "@/components/form-fields";
33
import { StyledLink } from "@/components/link";
44
import { FormSettingCard, SettingCard, SettingSwitch, SettingText } from "@/components/settings";
5-
import { getPublicEnvVar } from '@stackframe/stack-shared/dist/utils/env';
5+
import { getPublicEnvVar } from '@/lib/env';
66
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionDialog, Alert, Button, Typography } from "@stackframe/stack-ui";
77
import * as yup from "yup";
88
import { PageLayout } from "../page-layout";

apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/sidebar-layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Link } from "@/components/link";
55
import { Logo } from "@/components/logo";
66
import { ProjectSwitcher } from "@/components/project-switcher";
77
import ThemeToggle from "@/components/theme-toggle";
8-
import { getPublicEnvVar } from '@stackframe/stack-shared/dist/utils/env';
8+
import { getPublicEnvVar } from '@/lib/env';
99
import { cn } from "@/lib/utils";
1010
import { AdminProject, UserButton, useUser } from "@stackframe/stack";
1111
import { EMAIL_TEMPLATES_METADATA } from "@stackframe/stack-emails/dist/utils";

apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/webhooks/[endpointId]/page-client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use client";
22

33
import { SettingCard } from "@/components/settings";
4-
import { getPublicEnvVar } from '@stackframe/stack-shared/dist/utils/env';
4+
import { getPublicEnvVar } from '@/lib/env';
55
import { Alert, Badge, Button, CopyButton, Label, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Typography } from "@stackframe/stack-ui";
66
import { ChevronLeft, ChevronRight } from "lucide-react";
77
import { useMemo, useState } from "react";

apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/webhooks/page-client.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { FormDialog, SmartFormDialog } from "@/components/form-dialog";
44
import { InputField } from "@/components/form-fields";
55
import { useRouter } from "@/components/router";
66
import { SettingCard } from "@/components/settings";
7+
import { getPublicEnvVar } from '@/lib/env';
78
import { urlSchema } from "@stackframe/stack-shared/dist/schema-fields";
8-
import { getPublicEnvVar } from '@stackframe/stack-shared/dist/utils/env';
99
import { ActionCell, ActionDialog, Alert, Button, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Typography } from "@stackframe/stack-ui";
1010
import { useState } from "react";
1111
import { SvixProvider, useEndpoints, useSvix } from "svix-react";

0 commit comments

Comments
 (0)