qarpeo 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/chunks/tools.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import { useRuntimeConfig } from 'nuxt/server';
|
|
|
11
11
|
import { mkdir, writeFile, readFile } from 'node:fs/promises';
|
|
12
12
|
import { defu } from 'defu';
|
|
13
13
|
|
|
14
|
-
const version = "0.3.
|
|
14
|
+
const version = "0.3.2";
|
|
15
15
|
|
|
16
16
|
function resolveBindingName(service, override, defaultName) {
|
|
17
17
|
if (override && typeof override === "string") {
|
package/dist/module.mjs
CHANGED
|
@@ -1057,8 +1057,9 @@ async function setupAliases(options, nuxt, resolver) {
|
|
|
1057
1057
|
nuxt.options.alias["@comark/vue"] = resolve(comarkVueDir, "dist/index.js");
|
|
1058
1058
|
const comarkDir = resolvePkgDir("comark");
|
|
1059
1059
|
nuxt.options.alias["comark/utils"] = resolve(comarkDir, "dist/utils/index.js");
|
|
1060
|
-
nuxt.options.alias["comark/render"] = resolve(comarkDir, "dist/render.js");
|
|
1061
|
-
nuxt.options.alias["comark/
|
|
1060
|
+
nuxt.options.alias["comark/render/html"] = resolve(comarkDir, "dist/render/html.js");
|
|
1061
|
+
nuxt.options.alias["comark/render"] = resolve(comarkDir, "dist/render/index.js");
|
|
1062
|
+
nuxt.options.alias["comark/parse"] = resolve(comarkDir, "dist/index.js");
|
|
1062
1063
|
nuxt.options.alias["comark/plugins/shiki"] = resolve(comarkDir, "dist/plugins/shiki.js");
|
|
1063
1064
|
nuxt.options.alias["comark/plugins/shiki.js"] = resolve(comarkDir, "dist/plugins/shiki.js");
|
|
1064
1065
|
nuxt.options.alias["comark/internal"] = resolve(comarkDir, "dist/internal");
|
|
@@ -1835,8 +1836,9 @@ async function setupNitro(options, nuxt, resolver, logger) {
|
|
|
1835
1836
|
try {
|
|
1836
1837
|
const comarkDir = resolvePkgDir("comark");
|
|
1837
1838
|
nitroConfig.alias["comark/utils"] = resolve(comarkDir, "dist/utils/index.js");
|
|
1838
|
-
nitroConfig.alias["comark/render"] = resolve(comarkDir, "dist/render.js");
|
|
1839
|
-
nitroConfig.alias["comark/
|
|
1839
|
+
nitroConfig.alias["comark/render/html"] = resolve(comarkDir, "dist/render/html.js");
|
|
1840
|
+
nitroConfig.alias["comark/render"] = resolve(comarkDir, "dist/render/index.js");
|
|
1841
|
+
nitroConfig.alias["comark/parse"] = resolve(comarkDir, "dist/index.js");
|
|
1840
1842
|
nitroConfig.alias["comark/plugins/shiki"] = resolve(comarkDir, "dist/plugins/shiki.js");
|
|
1841
1843
|
nitroConfig.alias["comark/plugins/shiki.js"] = resolve(comarkDir, "dist/plugins/shiki.js");
|
|
1842
1844
|
nitroConfig.alias["comark/internal"] = resolve(comarkDir, "dist/internal");
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
cmsCollectionTbl,
|
|
8
8
|
cmsEntryTbl
|
|
9
9
|
} from "./common.mjs";
|
|
10
|
+
import { getCMSEntry } from "./queries.mjs";
|
|
10
11
|
const userTbl = (e) => resolveTableName("user", e);
|
|
11
12
|
export function isReferenceValue(v) {
|
|
12
13
|
return !!v && typeof v === "object" && !Array.isArray(v) && typeof v.collectionId === "string" && typeof v.slug === "string";
|
|
@@ -86,7 +87,6 @@ async function resolveReferenceInput(event, input, defaultTargetCollectionId, fi
|
|
|
86
87
|
});
|
|
87
88
|
}
|
|
88
89
|
if (filter && Object.keys(filter).length > 0) {
|
|
89
|
-
const { getCMSEntry } = await import("./queries.mjs");
|
|
90
90
|
const fullEntry = await getCMSEntry(event, collectionId, resolved.id, { preview: true });
|
|
91
91
|
if (fullEntry) {
|
|
92
92
|
for (const [key, expected] of Object.entries(filter)) {
|
|
@@ -210,7 +210,6 @@ export async function resolveReference(event, ref) {
|
|
|
210
210
|
if (!collectionId) return null;
|
|
211
211
|
const slugOrId = ref.id || ref.slug;
|
|
212
212
|
if (!slugOrId) return null;
|
|
213
|
-
const { getCMSEntry } = await import("./queries.mjs");
|
|
214
213
|
return getCMSEntry(event, collectionId, slugOrId);
|
|
215
214
|
}
|
|
216
215
|
export async function populateReferenceFields(event, entry, populate) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createError } from "nuxt/server";
|
|
2
2
|
import { getCMSDb, getCMSTenantId, cmsEntryTbl, cmsRevisionTbl } from "./common.mjs";
|
|
3
|
+
import { updateCMSEntry } from "./mutations.mjs";
|
|
3
4
|
export async function pruneRevisions(event, entryId, max) {
|
|
4
5
|
const db = getCMSDb(event);
|
|
5
6
|
await db.prepare(
|
|
@@ -51,7 +52,6 @@ export async function restoreCMSRevision(event, entryId, revisionId) {
|
|
|
51
52
|
delete meta._ast;
|
|
52
53
|
delete meta._toc;
|
|
53
54
|
delete meta._nav;
|
|
54
|
-
const { updateCMSEntry } = await import("./mutations.mjs");
|
|
55
55
|
return await updateCMSEntry(event, entryId, {
|
|
56
56
|
title: rev.title,
|
|
57
57
|
contentMd: rev.content_md,
|