mirror of
https://github.com/MeshEnvy/mesh-forge.git
synced 2026-06-28 22:11:31 +02:00
refactor: add version to plugin slug for build hashing
This commit is contained in:
+4
-1
@@ -29,7 +29,10 @@ export const getAll = query({
|
||||
export const incrementFlashCount = internalMutation({
|
||||
args: { slugs: v.array(v.string()) },
|
||||
handler: async (ctx, args) => {
|
||||
for (const slug of args.slugs) {
|
||||
for (const pluginSpec of args.slugs) {
|
||||
// Extract slug from "slug@version" format, or use as-is if no @ present
|
||||
const slug = pluginSpec.split('@')[0]
|
||||
|
||||
const existing = await ctx.db
|
||||
.query('plugins')
|
||||
.withIndex('by_slug', (q) => q.eq('slug', slug))
|
||||
|
||||
@@ -147,9 +147,15 @@ export default function BuildNew() {
|
||||
setIsFlashing(true)
|
||||
setErrorMessage(null)
|
||||
try {
|
||||
const pluginsEnabled = Object.keys(pluginConfig).filter(
|
||||
const enabledSlugs = Object.keys(pluginConfig).filter(
|
||||
(id) => pluginConfig[id] === true
|
||||
)
|
||||
const pluginsEnabled = enabledSlugs.map((slug) => {
|
||||
const plugin = (registryData as Record<string, { version: string }>)[
|
||||
slug
|
||||
]
|
||||
return `${slug}@${plugin.version}`
|
||||
})
|
||||
const result = await ensureBuildFromConfig({
|
||||
target: selectedTarget,
|
||||
version: selectedVersion,
|
||||
|
||||
Reference in New Issue
Block a user