mirror of
https://github.com/MeshEnvy/mesh-forge.git
synced 2026-03-28 17:42:55 +01:00
fix: relocate ArtifactType enum to client-safe location to resolve import issues in browser
This commit is contained in:
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Patch
|
||||
|
||||
- Fix Convex server functions being imported in browser by moving ArtifactType enum to client-safe location
|
||||
|
||||
## [0.3.0] - 2025-12-10
|
||||
|
||||
### Minor
|
||||
|
||||
@@ -2,7 +2,7 @@ import { SourceAvailable } from "@/components/SourceAvailable"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { api } from "@/convex/_generated/api"
|
||||
import type { Doc } from "@/convex/_generated/dataModel"
|
||||
import { ArtifactType } from "@/convex/builds"
|
||||
import { ArtifactType } from "@/convex/lib/filename"
|
||||
import { useMutation } from "convex/react"
|
||||
import { useState } from "react"
|
||||
import { toast } from "sonner"
|
||||
|
||||
@@ -2,8 +2,7 @@ import { BuildDownloadButton } from "@/components/BuildDownloadButton"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { TARGETS } from "@/constants/targets"
|
||||
import type { Doc } from "@/convex/_generated/dataModel"
|
||||
import { ArtifactType } from "@/convex/builds"
|
||||
import { getArtifactFilenameBase } from "@/convex/lib/filename"
|
||||
import { ArtifactType, getArtifactFilenameBase } from "@/convex/lib/filename"
|
||||
import modulesData from "@/convex/modules.json"
|
||||
import { getImplicitDependencies, humanizeStatus } from "@/lib/utils"
|
||||
import registryData from "@/public/registry.json"
|
||||
|
||||
@@ -3,15 +3,10 @@ import { v } from "convex/values"
|
||||
import { api, internal } from "./_generated/api"
|
||||
import type { Doc, Id } from "./_generated/dataModel"
|
||||
import { internalMutation, mutation, query } from "./_generated/server"
|
||||
import { getArtifactFilenameBase } from "./lib/filename"
|
||||
import { ArtifactType, getArtifactFilenameBase } from "./lib/filename"
|
||||
import { generateSignedDownloadUrl } from "./lib/r2"
|
||||
import { buildFields } from "./schema"
|
||||
|
||||
export enum ArtifactType {
|
||||
Firmware = "firmware",
|
||||
Source = "source",
|
||||
}
|
||||
|
||||
type BuildUpdateData = {
|
||||
status: string
|
||||
completedAt?: number
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
/**
|
||||
* Artifact type enumeration.
|
||||
* Safe to import in client-side code.
|
||||
*/
|
||||
export enum ArtifactType {
|
||||
Firmware = "firmware",
|
||||
Source = "source",
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates the artifact filename base (without extension) matching the download filename format.
|
||||
* Format: meshtastic-{version}-{target}-{last4hash}-{jobId}-{artifactType}
|
||||
|
||||
Reference in New Issue
Block a user