Skip to content

boiler plate labeling #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ STRIPE_PRODUCT_PREMIUM_YEARLY_PRICE_ID=price_premium_yearly_price_id_here
# Development/Testing Flags, for convenience
SKIP_OTP=true
EMAIL_USE_CONSOLE=true
GCP_USE_FAKE_GCS_SERVER=true
USE_MOCK_GCP_STORAGE=true
LABELER_SKIP_CLOUD_TASK=true
16 changes: 11 additions & 5 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
{
"workspace": [
"./packages/app",
"./packages/core"
"./packages/core",
"./packages/db",
"./packages/settings",
"./packages/storage",
"./packages/labeler",
"./packages/manifests",
"./packages/coreApiTypes"
],
"nodeModulesDir": "auto",
"lock": false,
"tasks": {
"dev:app": "deno task --config ./packages/app/deno.json dev",
"dev:core": "deno task --config ./packages/core/deno.json dev",
"dev:runner": "deno task --config ./packages/runner/deno.json dev",
"dev:labeler": "deno task --config ./packages/labeler/deno.json dev",
"build:app": "deno task --config ./packages/app/deno.json build",
"build:core": "deno task --config ./packages/core/deno.json build",
"test": "STRIPE_USE_MOCK=true GCP_USE_FAKE_GCS_SERVER=true deno test -A",
"build:labeler": "deno task --config ./packages/labeler/deno.json build",
"test": "STRIPE_USE_MOCK=true USE_MOCK_GCP_STORAGE=true deno test -A",
"db:docker": "docker container rm stackcore-pg --force || true && docker run --name stackcore-pg -e POSTGRES_PASSWORD=password -e POSTGRES_USER=user -e POSTGRES_DB=core -p 5432:5432 -d postgres:17",
"db:migrate": "deno task --config ./packages/core/deno.json migrate -A",
"stripe:create-products": "deno run -A --env-file=.env ./packages/core/src/stripe/scripts/createProducts.ts",
"db:migrate": "deno run -A ./packages/db/src/scripts/migrate.ts",
"stripe:cli": "docker run --rm -it --env-file=.env stripe/stripe-cli:latest",
"stripe:forward": "deno task stripe:cli listen --forward-to http://host.docker.internal:4000/billing/webhook",
"stripe:mock": "docker run --rm -it -p 12111-12112:12111-12112 stripe/stripe-mock:latest",
Expand Down
4 changes: 2 additions & 2 deletions packages/app/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"@radix-ui/react-slot": "npm:@radix-ui/react-slot@^1.2.3",
"@radix-ui/react-tabs": "npm:@radix-ui/react-tabs@^1.1.12",
"@radix-ui/react-tooltip": "npm:@radix-ui/react-tooltip@^1.2.7",
"@stackcore/core/responses": "../core/src/api/responseType.ts",
"@stackcore/core/manifest": "../core/src/manifest/types.ts",
"@stackcore/coreApiTypes": "../coreApiTypes/src/index.ts",
"@stackcore/manifests": "../manifests/src/index.ts",
"@deno/vite-plugin": "npm:@deno/vite-plugin@^1.0.4",
"@tailwindcss/vite": "npm:@tailwindcss/vite@^4.1.8",
"@tanstack/react-table": "npm:@tanstack/react-table@^8.21.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { useState } from "react";
import { useSearchParams } from "react-router";
import type {
AuditManifest,
DependencyManifest,
} from "@stackcore/core/manifest";
import type { AuditManifest, DependencyManifest } from "@stackcore/manifests";
import { SidebarProvider, SidebarTrigger } from "../shadcn/Sidebar.tsx";
import { FileExplorerSidebar } from "./components/FileExplorerSidebar.tsx";
import BreadcrumbNav from "./components/BreadcrumNav.tsx";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { useEffect, useState } from "react";
import { Link } from "react-router";
import type {
AuditManifest,
DependencyManifest,
} from "@stackcore/core/manifest";
import type { AuditManifest, DependencyManifest } from "@stackcore/manifests";
import {
Sidebar,
SidebarContent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Link, useSearchParams } from "react-router";
import type { DependencyManifest } from "@stackcore/core/manifest";
import type { DependencyManifest } from "@stackcore/manifests";
import {
DropdownMenu,
DropdownMenuContent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Link, useSearchParams } from "react-router";
import type { DependencyManifest } from "@stackcore/core/manifest";
import type { DependencyManifest } from "@stackcore/manifests";
import {
DropdownMenu,
DropdownMenuContent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
metricDependencyCount,
metricDependentCount,
metricLinesCount,
} from "@stackcore/core/manifest";
} from "@stackcore/manifests";
import {
Tooltip,
TooltipContent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import type {
AuditManifest,
DependencyManifest,
} from "@stackcore/core/manifest";
import type { AuditManifest, DependencyManifest } from "@stackcore/manifests";
import {
Sheet,
SheetContent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
metricDependencyCount,
metricDependentCount,
metricLinesCount,
} from "@stackcore/core/manifest";
} from "@stackcore/manifests";
import { Alert, AlertDescription } from "../../../shadcn/Alert.tsx";

export default function Metrics(props: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import type {
AuditManifest,
DependencyManifest,
} from "@stackcore/core/manifest";
import type { AuditManifest, DependencyManifest } from "@stackcore/manifests";
import {
Sheet,
SheetContent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type {
metricDependentCount,
metricLinesCount,
SymbolType,
} from "@stackcore/core/manifest";
} from "@stackcore/manifests";
import {
getCollapsedSymbolNodeLabel,
getExpandedSymbolNodeLabel,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ import type {
ElementDefinition,
NodeDefinition,
} from "cytoscape";
import type {
AuditManifest,
DependencyManifest,
} from "@stackcore/core/manifest";
import type { AuditManifest, DependencyManifest } from "@stackcore/manifests";
import {
getCollapsedFileNodeLabel,
getExpandedFileNodeLabel,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type {
metricDependentCount,
metricLinesCount,
SymbolType,
} from "@stackcore/core/manifest";
} from "@stackcore/manifests";
import {
getCollapsedSymbolNodeLabel,
getExpandedSymbolNodeLabel,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {
metricDependencyCount,
metricDependentCount,
metricLinesCount,
} from "@stackcore/core/manifest";
} from "@stackcore/manifests";

export interface NapiNodeData {
id: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
symbolTypeRecord,
symbolTypeStruct,
symbolTypeVariable,
} from "@stackcore/core/manifest";
} from "@stackcore/manifests";
import type {
Collection,
Core,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { AuditManifest } from "@stackcore/core/manifest";
import type { AuditManifest } from "@stackcore/manifests";

/**
* Calculates the optimal width and height for a node based on its label text.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
metricDependencyCount,
metricDependentCount,
metricLinesCount,
} from "@stackcore/core/manifest";
} from "@stackcore/manifests";

/**
* Extracts metric severity levels from an audit manifest for visualization.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type {
AuditManifest,
DependencyManifest,
Metric,
} from "@stackcore/core/manifest";
} from "@stackcore/manifests";
import type { NapiNodeData } from "../elements/types.ts";
import { mainLayout } from "../layout/index.ts";
import { getCytoscapeStylesheet } from "../styles/index.ts";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
symbolTypeRecord,
symbolTypeStruct,
symbolTypeVariable,
} from "@stackcore/core/manifest";
} from "@stackcore/manifests";
import type { NapiNodeData, SymbolNapiNodeData } from "../elements/types.ts";

interface CytoscapeStyles {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
symbolTypeFunction,
symbolTypeStruct,
symbolTypeVariable,
} from "@stackcore/core/manifest";
} from "@stackcore/manifests";
import type {
Collection,
Core,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {
AuditManifest,
DependencyManifest,
Metric,
} from "@stackcore/core/manifest";
} from "@stackcore/manifests";
import MetricsExtension from "../components/controls/ControlExtensions/MetricsExtension.tsx";
import { useTheme } from "../../../contexts/ThemeProvider.tsx";
import FiltersExtension from "../components/controls/ControlExtensions/FiltersExtension.tsx";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type {
AuditManifest,
DependencyManifest,
Metric,
} from "@stackcore/core/manifest";
} from "@stackcore/manifests";
import { useTheme } from "../../../contexts/ThemeProvider.tsx";

export default function ProjectVisualizer(props: VisualizerContext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ import { useNavigate, useSearchParams } from "react-router";
import type { VisualizerContext } from "../DependencyVisualizer.tsx";
import SymbolDetailsPane from "../components/detailsPanes/SymbolDetailsPane.tsx";
import { useTheme } from "../../../contexts/ThemeProvider.tsx";
import type {
AuditManifest,
DependencyManifest,
} from "@stackcore/core/manifest";
import type { AuditManifest, DependencyManifest } from "@stackcore/manifests";
import { SymbolDependencyVisualizer } from "../cytoscape/symbolDependencyVisualizer/index.ts";

export default function SymbolVisualizer(
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/contexts/Workspace.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createContext, useContext, useEffect, useState } from "react";
import { toast } from "sonner";
import { useCoreApi } from "./CoreApi.tsx";
import { WorkspaceApiTypes } from "@stackcore/core/responses";
import { WorkspaceApiTypes } from "@stackcore/coreApiTypes";

export type Workspace =
WorkspaceApiTypes.GetWorkspacesResponse["results"][number];
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
Settings,
Users,
} from "lucide-react";
import { ProjectApiTypes } from "@stackcore/core/responses";
import { ProjectApiTypes } from "@stackcore/coreApiTypes";

type Project = ProjectApiTypes.GetProjectsResponse["results"][number];

Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/pages/invitations/claim.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Link, useSearchParams } from "react-router";
import { InvitationApiTypes } from "@stackcore/core/responses";
import { InvitationApiTypes } from "@stackcore/coreApiTypes";
import { useCoreApi } from "../../contexts/CoreApi.tsx";
import { toast } from "sonner";
import { useEffect, useState } from "react";
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/pages/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
FormLabel,
FormMessage,
} from "../components/shadcn/Form.tsx";
import { AuthApiTypes } from "@stackcore/core/responses";
import { AuthApiTypes } from "@stackcore/coreApiTypes";

export default function LoginPage() {
const navigate = useNavigate();
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/pages/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import { Copy, Key, Loader, Plus, Trash, User } from "lucide-react";
import { z } from "zod";
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import { TokenApiTypes } from "@stackcore/core/responses";
import { TokenApiTypes } from "@stackcore/coreApiTypes";

type Token = {
id: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/pages/projects/add.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
FormLabel,
FormMessage,
} from "../../components/shadcn/Form.tsx";
import { ProjectApiTypes } from "@stackcore/core/responses";
import { ProjectApiTypes } from "@stackcore/coreApiTypes";
import {
Tabs,
TabsContent,
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/pages/projects/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
import { DataTablePagination } from "../../components/shadcn/Datatablepagination.tsx";
import { toast } from "sonner";
import { PencilRuler, Plus } from "lucide-react";
import { ProjectApiTypes } from "@stackcore/core/responses";
import { ProjectApiTypes } from "@stackcore/coreApiTypes";
import { Separator } from "../../components/shadcn/Separator.tsx";

type Project = {
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/pages/projects/project/base.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Outlet, useNavigate, useParams } from "react-router";
import { useEffect, useState } from "react";
import { Skeleton } from "../../../components/shadcn/Skeleton.tsx";
import { ProjectApiTypes } from "@stackcore/core/responses";
import { ProjectApiTypes } from "@stackcore/coreApiTypes";
import { toast } from "sonner";
import { useCoreApi } from "../../../contexts/CoreApi.tsx";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
import { DataTablePagination } from "../../../../components/shadcn/Datatablepagination.tsx";
import { toast } from "sonner";
import { Eye, Plus, ScrollText } from "lucide-react";
import { ManifestApiTypes } from "@stackcore/core/responses";
import { ManifestApiTypes } from "@stackcore/coreApiTypes";
import { Separator } from "../../../../components/shadcn/Separator.tsx";
import { useCoreApi } from "../../../../contexts/CoreApi.tsx";
import type { ProjectPageContext } from "../base.tsx";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import { useEffect, useState } from "react";
import { useParams } from "react-router";
import { useCoreApi } from "../../../../contexts/CoreApi.tsx";
import { ManifestApiTypes } from "@stackcore/core/responses";
import type {
AuditManifest,
DependencyManifest,
} from "@stackcore/core/manifest";
import { ManifestApiTypes } from "@stackcore/coreApiTypes";
import type { AuditManifest, DependencyManifest } from "@stackcore/manifests";
import { Loader } from "lucide-react";
import DependencyVisualizer from "../../../../components/DependencyVisualizer/DependencyVisualizer.tsx";

Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/pages/projects/project/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
FormLabel,
FormMessage,
} from "../../../components/shadcn/Form.tsx";
import { ProjectApiTypes } from "@stackcore/core/responses";
import { ProjectApiTypes } from "@stackcore/coreApiTypes";
import {
Tabs,
TabsContent,
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/pages/workspaces/add.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
FormLabel,
FormMessage,
} from "../../components/shadcn/Form.tsx";
import { WorkspaceApiTypes } from "@stackcore/core/responses";
import { WorkspaceApiTypes } from "@stackcore/coreApiTypes";

export default function AddWorkspacePage() {
const navigate = useNavigate();
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/pages/workspaces/workspace/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from "../../../components/shadcn/Card.tsx";
import { Badge } from "../../../components/shadcn/Badge.tsx";
import { Skeleton } from "../../../components/shadcn/Skeleton.tsx";
import { MemberApiTypes, WorkspaceApiTypes } from "@stackcore/core/responses";
import { MemberApiTypes, WorkspaceApiTypes } from "@stackcore/coreApiTypes";
import { zodResolver } from "@hookform/resolvers/zod";
import { Loader, Trash } from "lucide-react";
import { Button } from "../../../components/shadcn/Button.tsx";
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/pages/workspaces/workspace/members.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import {
SelectTrigger,
SelectValue,
} from "../../../components/shadcn/Select.tsx";
import { InvitationApiTypes, MemberApiTypes } from "@stackcore/core/responses";
import { InvitationApiTypes, MemberApiTypes } from "@stackcore/coreApiTypes";
import { useOutletContext } from "react-router";
import type { WorkspacePageContext } from "./index.tsx";
import { Separator } from "../../../components/shadcn/Separator.tsx";
Expand Down
Loading