Fix datapack packaging (#1044)

This commit is contained in:
Geometrically
2023-03-12 19:01:01 -07:00
committed by GitHub
parent 6d9779a497
commit e838fe30de
4 changed files with 23 additions and 36 deletions

View File

@@ -435,12 +435,6 @@
margin-bottom: var(--spacing-card-md); margin-bottom: var(--spacing-card-md);
} }
} }
//> .label:first-child :where(> :first-child, .label__title),
//> label:first-child :where(> :first-child, .label__title),
//> .adjacent-input:first-child :where(> :first-child, .label__title) {
// margin-block-start: 0;
//}
} }
.universal-card { .universal-card {

View File

@@ -137,7 +137,9 @@ export const createDataPackVersion = async function (
primaryZipReader.file('quilt.mod.json', JSON.stringify(quiltModJson)) primaryZipReader.file('quilt.mod.json', JSON.stringify(quiltModJson))
} }
if (loaders.includes('forge')) { if (loaders.includes('forge')) {
primaryZipReader.file('META-INF/mods.toml', TOML.stringify(forgeModsToml)) console.log(forgeModsToml)
console.log(TOML.stringify(forgeModsToml, { newline: '\n' }))
primaryZipReader.file('META-INF/mods.toml', TOML.stringify(forgeModsToml, { newline: '\n' }))
} }
if (!newForge && loaders.includes('forge')) { if (!newForge && loaders.includes('forge')) {

View File

@@ -256,9 +256,6 @@ export default defineNuxtConfig({
children: [], children: [],
}) })
}, },
'app:created'() {
console.log('beforeeeee')
},
}, },
runtimeConfig: { runtimeConfig: {
apiBaseUrl: process.env.BASE_URL ?? getApiUrl(), apiBaseUrl: process.env.BASE_URL ?? getApiUrl(),

View File

@@ -1123,19 +1123,7 @@ export default defineNuxtComponent({
}) })
} }
const [versions, featuredVersions, dependencies] = await Promise.all([ const newEditedVersions = await this.resetProjectVersions()
useBaseFetch(`project/${this.version.project_id}/version`, this.$defaultHeaders()),
useBaseFetch(
`project/${this.version.project_id}/version?featured=true`,
this.$defaultHeaders()
),
useBaseFetch(`project/${this.version.project_id}/dependencies`, this.$defaultHeaders()),
])
const newEditedVersions = this.$computeVersions(versions, this.members)
this.$emit('update:versions', newEditedVersions)
this.$emit('update:featuredVersions', this.$computeVersions(featuredVersions, this.members))
this.$emit('update:dependencies', dependencies)
await this.$router.replace( await this.$router.replace(
`/${this.project.project_type}/${ `/${this.project.project_type}/${
@@ -1240,19 +1228,7 @@ export default defineNuxtComponent({
}, },
}) })
const [versions, featuredVersions, dependencies] = await Promise.all([ await this.resetProjectVersions()
useBaseFetch(`project/${this.version.project_id}/version`, this.$defaultHeaders()),
useBaseFetch(
`project/${this.version.project_id}/version?featured=true`,
this.$defaultHeaders()
),
useBaseFetch(`project/${this.version.project_id}/dependencies`, this.$defaultHeaders()),
])
const newCreatedVersions = this.$computeVersions(versions, this.members)
this.$emit('update:versions', newCreatedVersions)
this.$emit('update:featuredVersions', this.$computeVersions(featuredVersions, this.members))
this.$emit('update:dependencies', dependencies)
await this.$router.push( await this.$router.push(
`/${this.project.project_type}/${ `/${this.project.project_type}/${
@@ -1268,6 +1244,7 @@ export default defineNuxtComponent({
...this.$defaultHeaders(), ...this.$defaultHeaders(),
}) })
await this.resetProjectVersions()
await this.$router.replace(`/${this.project.project_type}/${this.project.id}/versions`) await this.$router.replace(`/${this.project.project_type}/${this.project.id}/versions`)
stopLoading() stopLoading()
}, },
@@ -1323,6 +1300,23 @@ export default defineNuxtComponent({
stopLoading() stopLoading()
this.shouldPreventActions = false this.shouldPreventActions = false
}, },
async resetProjectVersions() {
const [versions, featuredVersions, dependencies] = await Promise.all([
useBaseFetch(`project/${this.version.project_id}/version`, this.$defaultHeaders()),
useBaseFetch(
`project/${this.version.project_id}/version?featured=true`,
this.$defaultHeaders()
),
useBaseFetch(`project/${this.version.project_id}/dependencies`, this.$defaultHeaders()),
])
const newCreatedVersions = this.$computeVersions(versions, this.members)
this.$emit('update:versions', newCreatedVersions)
this.$emit('update:featuredVersions', this.$computeVersions(featuredVersions, this.members))
this.$emit('update:dependencies', dependencies)
return newCreatedVersions
},
}, },
}) })
</script> </script>