nuxt-studio 1.3.1 → 1.3.3
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/README.md +5 -5
- package/dist/app/engine-compile-CsVoR5aC.js +47 -0
- package/dist/app/index-BNGZo_v7.js +1 -0
- package/dist/app/{index-DPJS0mlQ.js → index-BemYRVDN.js} +2 -2
- package/dist/app/index-D-57dgKD.js +1 -0
- package/dist/app/index-DHS_I0O0.js +2 -0
- package/dist/app/main-DIc-1QZK.js +44 -0
- package/dist/app/main-PbQDqQ97.js +44 -0
- package/dist/app/main.d.ts +20 -19
- package/dist/app/main.js +1 -1
- package/dist/app/rehype-B5jXSQHB.js +1 -0
- package/dist/app/rehype-C7dZfu6l.js +1 -0
- package/dist/app/service-worker.d.ts +18 -18
- package/dist/app/shared.d.ts +19 -18
- package/dist/app/shiki-B5XDhU_3.js +1 -0
- package/dist/app/shiki-BLgMZ_FB.js +1 -0
- package/dist/app/wasm--yL7jHw-.js +1 -0
- package/dist/module/module.json +1 -1
- package/dist/module/module.mjs +17 -20
- package/dist/module/runtime/host.js +2 -2
- package/dist/module/runtime/server/routes/ai/analyze.post.js +1 -1
- package/dist/module/runtime/server/routes/auth/github.get.js +4 -4
- package/dist/module/runtime/server/routes/auth/gitlab.get.js +4 -4
- package/dist/module/runtime/server/routes/auth/google.get.js +5 -5
- package/dist/module/runtime/server/routes/auth/sso.get.js +5 -5
- package/dist/module/runtime/server/utils/auth.js +2 -2
- package/dist/module/runtime/server/utils/object.d.ts +1 -0
- package/dist/module/runtime/server/utils/object.js +14 -0
- package/dist/module/runtime/utils/document/compare.js +1 -1
- package/dist/module/runtime/utils/document/generate.js +9 -7
- package/dist/module/runtime/utils/document/index.d.ts +1 -1
- package/dist/module/runtime/utils/document/index.js +1 -1
- package/dist/module/runtime/utils/document/schema.d.ts +1 -1
- package/dist/module/runtime/utils/document/schema.js +4 -1
- package/package.json +20 -16
- package/dist/app/index-BR26Sfgr.js +0 -2
- package/dist/app/index-C-y2greB.js +0 -2
- package/dist/app/index-CS_mI4k2.js +0 -2
- package/dist/app/index-Cl-ktQMQ.js +0 -1
- package/dist/app/main--P1Cc3W1.js +0 -90
- package/dist/app/main-BJNMrnKc.js +0 -90
- package/dist/app/main-D38hv2hq.js +0 -90
- package/dist/app/main-DKqH6k_9.js +0 -69
- package/dist/app/shared-Bk3qBOVF.js +0 -1
- package/dist/app/shared-cDYJuGWk.js +0 -1
package/dist/module/module.json
CHANGED
package/dist/module/module.mjs
CHANGED
|
@@ -38,7 +38,7 @@ async function getAssetsStorageTemplate(assetsStorage, _nuxt) {
|
|
|
38
38
|
].join("\n");
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
const version = "1.3.
|
|
41
|
+
const version = "1.3.3";
|
|
42
42
|
|
|
43
43
|
function setupDevMode(nuxt, runtime, assetsStorage) {
|
|
44
44
|
nuxt.options.nitro.storage = {
|
|
@@ -111,7 +111,7 @@ function validateAuthConfig(options) {
|
|
|
111
111
|
const missingProviderEnv = provider === "github" ? !hasGitHubAuth : !hasGitLabAuth;
|
|
112
112
|
if (missingProviderEnv) {
|
|
113
113
|
logger$1.warn([
|
|
114
|
-
`
|
|
114
|
+
`In order to use Studio in production mode, you need to setup authentication:`,
|
|
115
115
|
"- Read more on `https://nuxt.studio/auth-providers`",
|
|
116
116
|
`- Alternatively, you can disable studio by setting \`$production: { studio: false }\` in your \`nuxt.config.ts\``
|
|
117
117
|
].join("\n"));
|
|
@@ -144,9 +144,9 @@ const module$1 = defineNuxtModule({
|
|
|
144
144
|
},
|
|
145
145
|
repository: {
|
|
146
146
|
provider: "github",
|
|
147
|
-
owner:
|
|
148
|
-
repo:
|
|
149
|
-
branch:
|
|
147
|
+
owner: void 0,
|
|
148
|
+
repo: void 0,
|
|
149
|
+
branch: void 0,
|
|
150
150
|
rootDir: "",
|
|
151
151
|
private: true
|
|
152
152
|
},
|
|
@@ -197,12 +197,12 @@ const module$1 = defineNuxtModule({
|
|
|
197
197
|
options.dev = false;
|
|
198
198
|
}
|
|
199
199
|
const isProdBuild = nuxt.options.dev === false && nuxt.options._prepare === false;
|
|
200
|
-
if (isProdBuild
|
|
201
|
-
const
|
|
202
|
-
if (
|
|
203
|
-
options.repository = defu(
|
|
204
|
-
logger.info(`Auto-detected repository from CI environment: ${detected.provider}:${detected.owner}/${detected.repo}#${detected.branch}`);
|
|
200
|
+
if (isProdBuild) {
|
|
201
|
+
const detectedRepo = detectRepositoryFromCI();
|
|
202
|
+
if (detectedRepo) {
|
|
203
|
+
options.repository = defu(detectedRepo, options.repository);
|
|
205
204
|
}
|
|
205
|
+
logger.info(`Using repository: ${options.repository?.provider}:${options.repository?.owner}/${options.repository?.repo}#${options.repository?.branch}`);
|
|
206
206
|
}
|
|
207
207
|
if (isProdBuild && !options.repository?.owner && !options.repository?.repo) {
|
|
208
208
|
throw new Error("Repository owner and repository name are required");
|
|
@@ -309,12 +309,7 @@ const module$1 = defineNuxtModule({
|
|
|
309
309
|
"nuxt-studio > debug",
|
|
310
310
|
"nuxt-studio > extend"
|
|
311
311
|
];
|
|
312
|
-
config.build ||= {};
|
|
313
|
-
config.build.target = "es2020";
|
|
314
312
|
});
|
|
315
|
-
nuxt.options.nitro.esbuild ||= {};
|
|
316
|
-
nuxt.options.nitro.esbuild.options ||= {};
|
|
317
|
-
nuxt.options.nitro.esbuild.options.target = "es2020";
|
|
318
313
|
addPlugin(process.env.STUDIO_DEV_SERVER ? runtime("./plugins/studio.client.dev") : runtime("./plugins/studio.client"));
|
|
319
314
|
const assetsStorage = createStorage({
|
|
320
315
|
driver: fsDriver({
|
|
@@ -371,11 +366,13 @@ const module$1 = defineNuxtModule({
|
|
|
371
366
|
route: "/__nuxt_studio/ai/generate",
|
|
372
367
|
handler: runtime("./server/routes/ai/generate.post")
|
|
373
368
|
});
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
369
|
+
if (options.ai?.experimental?.collectionContext) {
|
|
370
|
+
addServerHandler({
|
|
371
|
+
method: "post",
|
|
372
|
+
route: "/__nuxt_studio/ai/analyze",
|
|
373
|
+
handler: runtime("./server/routes/ai/analyze.post")
|
|
374
|
+
});
|
|
375
|
+
}
|
|
379
376
|
}
|
|
380
377
|
}
|
|
381
378
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref } from "vue";
|
|
2
2
|
import { ensure } from "./utils/ensure.js";
|
|
3
3
|
import { getCollectionByFilePath, generateIdFromFsPath, generateRecordDeletion, generateRecordInsert, generateFsPathFromId, getCollectionById } from "./utils/collection.js";
|
|
4
|
-
import { applyCollectionSchema, isDocumentMatchingContent, generateDocumentFromContent, generateContentFromDocument, areDocumentsEqual, pickReservedKeysFromDocument,
|
|
4
|
+
import { applyCollectionSchema, isDocumentMatchingContent, generateDocumentFromContent, generateContentFromDocument, areDocumentsEqual, pickReservedKeysFromDocument, cleanDataKeys, sanitizeDocumentTree } from "./utils/document/index.js";
|
|
5
5
|
import { getHostStyles, getSidebarWidth, adjustFixedElements } from "./utils/sidebar.js";
|
|
6
6
|
import { clearError, getAppManifest, queryCollection, queryCollectionItemSurroundings, queryCollectionNavigation, queryCollectionSearchSections, useRuntimeConfig } from "#imports";
|
|
7
7
|
import { collections } from "#content/preview";
|
|
@@ -210,7 +210,7 @@ export function useStudioHost(user, repository) {
|
|
|
210
210
|
areEqual: (document1, document2) => areDocumentsEqual(document1, document2),
|
|
211
211
|
isMatchingContent: async (content, document2) => isDocumentMatchingContent(content, document2),
|
|
212
212
|
pickReservedKeys: (document2) => pickReservedKeysFromDocument(document2),
|
|
213
|
-
|
|
213
|
+
cleanDataKeys: (document2) => cleanDataKeys(document2),
|
|
214
214
|
detectActives: () => {
|
|
215
215
|
const wrappers = document.querySelectorAll("[data-content-id]");
|
|
216
216
|
return Array.from(wrappers).map((wrapper) => {
|
|
@@ -4,7 +4,6 @@ import { eventHandler, createError, useSession, getRequestProtocol, readBody } f
|
|
|
4
4
|
import { consola } from "consola";
|
|
5
5
|
import { useRuntimeConfig } from "#imports";
|
|
6
6
|
import { queryCollection } from "@nuxt/content/server";
|
|
7
|
-
import { generateContentFromDocument } from "../../../utils/document/generate.js";
|
|
8
7
|
import {
|
|
9
8
|
detectContentType,
|
|
10
9
|
analyzeArchitecture,
|
|
@@ -87,6 +86,7 @@ export default eventHandler(async (event) => {
|
|
|
87
86
|
}
|
|
88
87
|
let excerpt = "";
|
|
89
88
|
try {
|
|
89
|
+
const { generateContentFromDocument } = await import("../../../utils/document/generate.js");
|
|
90
90
|
const rawContent = await generateContentFromDocument(document);
|
|
91
91
|
if (rawContent) {
|
|
92
92
|
excerpt = rawContent;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { eventHandler, getQuery, sendRedirect, createError, getRequestURL, deleteCookie, getCookie } from "h3";
|
|
2
|
-
import { withQuery } from "ufo";
|
|
3
|
-
import { defu } from "defu";
|
|
4
1
|
import { useRuntimeConfig } from "#imports";
|
|
2
|
+
import { createError, deleteCookie, eventHandler, getCookie, getQuery, getRequestURL, sendRedirect } from "h3";
|
|
3
|
+
import { withQuery } from "ufo";
|
|
5
4
|
import { generateOAuthState, requestAccessToken, validateOAuthState } from "../../utils/auth.js";
|
|
6
5
|
import { setInternalStudioUserSession } from "../../utils/session.js";
|
|
6
|
+
import { mergeConfig } from "../../utils/object.js";
|
|
7
7
|
export default eventHandler(async (event) => {
|
|
8
8
|
const studioConfig = useRuntimeConfig(event).studio;
|
|
9
|
-
const config =
|
|
9
|
+
const config = mergeConfig(studioConfig?.auth?.github, {
|
|
10
10
|
clientId: process.env.STUDIO_GITHUB_CLIENT_ID,
|
|
11
11
|
clientSecret: process.env.STUDIO_GITHUB_CLIENT_SECRET,
|
|
12
12
|
redirectURL: process.env.STUDIO_GITHUB_REDIRECT_URL,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import { useRuntimeConfig } from "#imports";
|
|
2
|
+
import { createError, deleteCookie, eventHandler, getCookie, getQuery, getRequestURL, sendRedirect } from "h3";
|
|
1
3
|
import { FetchError } from "ofetch";
|
|
2
|
-
import { eventHandler, getQuery, sendRedirect, createError, getRequestURL, deleteCookie, getCookie } from "h3";
|
|
3
4
|
import { withQuery } from "ufo";
|
|
4
|
-
import { defu } from "defu";
|
|
5
|
-
import { useRuntimeConfig } from "#imports";
|
|
6
5
|
import { generateOAuthState, validateOAuthState } from "../../utils/auth.js";
|
|
7
6
|
import { setInternalStudioUserSession } from "../../utils/session.js";
|
|
7
|
+
import { mergeConfig } from "../../utils/object.js";
|
|
8
8
|
export default eventHandler(async (event) => {
|
|
9
9
|
const studioConfig = useRuntimeConfig(event).studio;
|
|
10
10
|
const instanceUrl = studioConfig?.auth?.gitlab?.instanceUrl || "https://gitlab.com";
|
|
11
|
-
const config =
|
|
11
|
+
const config = mergeConfig(studioConfig?.auth?.gitlab, {
|
|
12
12
|
applicationId: process.env.STUDIO_GITLAB_APPLICATION_ID,
|
|
13
13
|
applicationSecret: process.env.STUDIO_GITLAB_APPLICATION_SECRET,
|
|
14
14
|
redirectURL: process.env.STUDIO_GITLAB_REDIRECT_URL,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { eventHandler, createError, getQuery, sendRedirect, getRequestURL, getCookie, deleteCookie } from "h3";
|
|
2
|
-
import { withQuery } from "ufo";
|
|
3
|
-
import { defu } from "defu";
|
|
4
1
|
import { useRuntimeConfig } from "#imports";
|
|
5
2
|
import { consola } from "consola";
|
|
3
|
+
import { createError, deleteCookie, eventHandler, getCookie, getQuery, getRequestURL, sendRedirect } from "h3";
|
|
4
|
+
import { withQuery } from "ufo";
|
|
6
5
|
import { generateOAuthState, requestAccessToken, validateOAuthState } from "../../utils/auth.js";
|
|
7
6
|
import { setInternalStudioUserSession } from "../../utils/session.js";
|
|
7
|
+
import { mergeConfig } from "../../utils/object.js";
|
|
8
8
|
const logger = consola.withTag("Nuxt Studio");
|
|
9
9
|
export default eventHandler(async (event) => {
|
|
10
10
|
const studioConfig = useRuntimeConfig(event).studio;
|
|
11
|
-
const config =
|
|
11
|
+
const config = mergeConfig(studioConfig?.auth?.google, {
|
|
12
12
|
clientId: process.env.STUDIO_GOOGLE_CLIENT_ID,
|
|
13
13
|
clientSecret: process.env.STUDIO_GOOGLE_CLIENT_SECRET,
|
|
14
14
|
redirectURL: process.env.STUDIO_GOOGLE_REDIRECT_URL,
|
|
@@ -101,7 +101,7 @@ export default eventHandler(async (event) => {
|
|
|
101
101
|
if (!moderators.includes(user.email)) {
|
|
102
102
|
if (import.meta.dev && moderators.length === 0) {
|
|
103
103
|
logger.warn([
|
|
104
|
-
"
|
|
104
|
+
"No moderators defined. Moderators are required for Google authentication.",
|
|
105
105
|
"Please set the `STUDIO_GOOGLE_MODERATORS` environment variable to a comma-separated list of email addresses of the moderators."
|
|
106
106
|
].join("\n"));
|
|
107
107
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { eventHandler, createError, getQuery, sendRedirect, getRequestURL, getCookie, deleteCookie } from "h3";
|
|
2
|
-
import { withQuery } from "ufo";
|
|
3
|
-
import { defu } from "defu";
|
|
4
1
|
import { useRuntimeConfig } from "#imports";
|
|
5
|
-
import {
|
|
2
|
+
import { createError, deleteCookie, eventHandler, getCookie, getQuery, getRequestURL, sendRedirect } from "h3";
|
|
3
|
+
import { withQuery } from "ufo";
|
|
4
|
+
import { consumePKCECodeVerifier, generateCodeChallenge, generateOAuthState, generatePKCECodeVerifier, requestAccessToken, validateOAuthState } from "../../utils/auth.js";
|
|
6
5
|
import { setInternalStudioUserSession } from "../../utils/session.js";
|
|
6
|
+
import { mergeConfig } from "../../utils/object.js";
|
|
7
7
|
export default eventHandler(async (event) => {
|
|
8
8
|
const studioConfig = useRuntimeConfig(event).studio;
|
|
9
|
-
const config =
|
|
9
|
+
const config = mergeConfig(studioConfig?.auth?.sso, {
|
|
10
10
|
serverUrl: process.env.STUDIO_SSO_URL,
|
|
11
11
|
clientId: process.env.STUDIO_SSO_CLIENT_ID,
|
|
12
12
|
clientSecret: process.env.STUDIO_SSO_CLIENT_SECRET,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getCookie, deleteCookie, setCookie, getRequestProtocol, createError } from "h3";
|
|
1
|
+
import { createError, deleteCookie, getCookie, getRequestProtocol, setCookie } from "h3";
|
|
3
2
|
import { FetchError } from "ofetch";
|
|
3
|
+
import { getRandomValues } from "uncrypto";
|
|
4
4
|
export async function requestAccessToken(url, options) {
|
|
5
5
|
const headers = {
|
|
6
6
|
"Content-Type": "application/x-www-form-urlencoded",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mergeConfig<T>(config: T | undefined, defaults: Partial<T>): T;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createDefu } from "defu";
|
|
2
|
+
const customDefu = createDefu((obj, key, value) => {
|
|
3
|
+
if (obj[key] === "" && value !== void 0 && value !== null && value !== "") {
|
|
4
|
+
obj[key] = value;
|
|
5
|
+
return true;
|
|
6
|
+
}
|
|
7
|
+
if (obj[key] !== void 0 && obj[key] !== null) {
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
return false;
|
|
11
|
+
});
|
|
12
|
+
export function mergeConfig(config, defaults) {
|
|
13
|
+
return customDefu(defaults, config || {});
|
|
14
|
+
}
|
|
@@ -5,7 +5,7 @@ import { compressTree } from "@nuxt/content/runtime";
|
|
|
5
5
|
import { generateDocumentFromContent } from "./generate.js";
|
|
6
6
|
import { removeLastStylesFromTree } from "./tree.js";
|
|
7
7
|
export async function isDocumentMatchingContent(content, document) {
|
|
8
|
-
const generatedDocument = await generateDocumentFromContent(document.id, content);
|
|
8
|
+
const generatedDocument = await generateDocumentFromContent(document.id, content, { compress: true, preserveLinkAttributes: true });
|
|
9
9
|
if (generatedDocument.extension === ContentFileExtension.Markdown) {
|
|
10
10
|
const { body: generatedBody, ...generatedDocumentData } = generatedDocument;
|
|
11
11
|
const { body: documentBody, ...documentData } = document;
|
|
@@ -8,7 +8,7 @@ import destr from "destr";
|
|
|
8
8
|
import { parseFrontMatter, stringifyFrontMatter } from "remark-mdc";
|
|
9
9
|
import { useHostMeta } from "../../composables/useMeta.js";
|
|
10
10
|
import { addPageTypeFields, generateStemFromId, getFileExtension } from "./utils.js";
|
|
11
|
-
import {
|
|
11
|
+
import { cleanDataKeys } from "./schema.js";
|
|
12
12
|
import { remarkEmojiPlugin } from "nuxt-studio/app/utils";
|
|
13
13
|
const logger = consola.withTag("Nuxt Studio");
|
|
14
14
|
export async function generateDocumentFromContent(id, content, options = { compress: true }) {
|
|
@@ -83,9 +83,11 @@ export async function generateDocumentFromMarkdownContent(id, content, options =
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
if (!options.preserveLinkAttributes) {
|
|
87
|
+
visit(document.body, (node) => node.type === "element" && node.tag === "a", (node) => {
|
|
88
|
+
Reflect.deleteProperty(node.props, "rel");
|
|
89
|
+
});
|
|
90
|
+
}
|
|
89
91
|
let body = document.body;
|
|
90
92
|
if (options.compress && document.body.type === "root") {
|
|
91
93
|
body = compressTree(document.body);
|
|
@@ -121,21 +123,21 @@ export async function generateContentFromDocument(document) {
|
|
|
121
123
|
return null;
|
|
122
124
|
}
|
|
123
125
|
export async function generateContentFromYAMLDocument(document) {
|
|
124
|
-
return await stringifyFrontMatter(
|
|
126
|
+
return await stringifyFrontMatter(cleanDataKeys(document), "", {
|
|
125
127
|
prefix: "",
|
|
126
128
|
suffix: "",
|
|
127
129
|
lineWidth: 0
|
|
128
130
|
});
|
|
129
131
|
}
|
|
130
132
|
export async function generateContentFromJSONDocument(document) {
|
|
131
|
-
return JSON.stringify(
|
|
133
|
+
return JSON.stringify(cleanDataKeys(document), null, 2);
|
|
132
134
|
}
|
|
133
135
|
export async function generateContentFromMarkdownDocument(document) {
|
|
134
136
|
const body = document.body.type === "minimark" ? decompressTree(document.body) : document.body;
|
|
135
137
|
visit(body, (node) => node.type === "element" && node.tag === "a", (node) => {
|
|
136
138
|
Reflect.deleteProperty(node.props, "rel");
|
|
137
139
|
});
|
|
138
|
-
const markdown = await stringifyMarkdown(body,
|
|
140
|
+
const markdown = await stringifyMarkdown(body, cleanDataKeys(document), {
|
|
139
141
|
frontMatter: {
|
|
140
142
|
options: {
|
|
141
143
|
lineWidth: 0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { applyCollectionSchema, pickReservedKeysFromDocument,
|
|
1
|
+
export { applyCollectionSchema, pickReservedKeysFromDocument, cleanDataKeys, reservedKeys, } from './schema.js';
|
|
2
2
|
export { isDocumentMatchingContent, areDocumentsEqual, } from './compare.js';
|
|
3
3
|
export { generateDocumentFromContent, generateDocumentFromMarkdownContent, generateDocumentFromYAMLContent, generateDocumentFromJSONContent, generateContentFromDocument, generateContentFromMarkdownDocument, generateContentFromYAMLDocument, generateContentFromJSONDocument, } from './generate.js';
|
|
4
4
|
export { addPageTypeFields, parseDocumentId, generatePathFromStem, generateStemFromId, generateTitleFromPath, getFileExtension, } from './utils.js';
|
|
@@ -3,4 +3,4 @@ import type { DatabaseItem } from 'nuxt-studio/app';
|
|
|
3
3
|
export declare const reservedKeys: string[];
|
|
4
4
|
export declare function applyCollectionSchema(id: string, collectionInfo: CollectionInfo, document: CollectionItemBase): DatabaseItem;
|
|
5
5
|
export declare function pickReservedKeysFromDocument(document: DatabaseItem): DatabaseItem;
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function cleanDataKeys(document: DatabaseItem): DatabaseItem;
|
|
@@ -31,7 +31,7 @@ export function applyCollectionSchema(id, collectionInfo, document) {
|
|
|
31
31
|
export function pickReservedKeysFromDocument(document) {
|
|
32
32
|
return pick(document, reservedKeys);
|
|
33
33
|
}
|
|
34
|
-
export function
|
|
34
|
+
export function cleanDataKeys(document) {
|
|
35
35
|
const result = omit(document, reservedKeys);
|
|
36
36
|
if (result.navigation === true) {
|
|
37
37
|
Reflect.deleteProperty(result, "navigation");
|
|
@@ -57,6 +57,9 @@ export function removeReservedKeysFromDocument(document) {
|
|
|
57
57
|
if (result[key] === null) {
|
|
58
58
|
Reflect.deleteProperty(result, key);
|
|
59
59
|
}
|
|
60
|
+
if (Array.isArray(result[key]) && result[key].length === 0) {
|
|
61
|
+
Reflect.deleteProperty(result, key);
|
|
62
|
+
}
|
|
60
63
|
}
|
|
61
64
|
return result;
|
|
62
65
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-studio",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"description": "Nuxt Studio for Nuxt Content",
|
|
5
5
|
"private": false,
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/nuxt-content/studio.git"
|
|
8
|
+
"url": "git+https://github.com/nuxt-content/nuxt-studio.git"
|
|
9
9
|
},
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"type": "module",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"types": "./dist/app/main.d.ts",
|
|
16
16
|
"default": "./dist/app/main.js"
|
|
17
17
|
},
|
|
18
|
+
"./app/*": "./dist/app/*",
|
|
18
19
|
"./app/utils": {
|
|
19
20
|
"types": "./dist/app/shared.d.ts",
|
|
20
21
|
"default": "./dist/app/shared.js"
|
|
@@ -47,12 +48,12 @@
|
|
|
47
48
|
"clean": "rm -rf dist .nuxt .output node_modules docs/node_modules docs/.output docs/.data docs/.nuxt playground/docus/node_modules playground/docus/.output playground/docus/.data playground/docus/.nuxt playground/minimal/node_modules playground/minimal/.output playground/minimal/.data playground/minimal/.nuxt pnpm-lock.yaml"
|
|
48
49
|
},
|
|
49
50
|
"dependencies": {
|
|
50
|
-
"@ai-sdk/gateway": "^3.0.
|
|
51
|
-
"@ai-sdk/vue": "^3.0.
|
|
52
|
-
"@iconify-json/lucide": "^1.2.
|
|
51
|
+
"@ai-sdk/gateway": "^3.0.42",
|
|
52
|
+
"@ai-sdk/vue": "^3.0.82",
|
|
53
|
+
"@iconify-json/lucide": "^1.2.90",
|
|
53
54
|
"@nuxtjs/mdc": "^0.20.1",
|
|
54
|
-
"@vueuse/core": "^14.2.
|
|
55
|
-
"ai": "^6.0.
|
|
55
|
+
"@vueuse/core": "^14.2.1",
|
|
56
|
+
"ai": "^6.0.82",
|
|
56
57
|
"defu": "^6.1.4",
|
|
57
58
|
"destr": "^2.0.5",
|
|
58
59
|
"js-yaml": "^4.1.1",
|
|
@@ -66,21 +67,21 @@
|
|
|
66
67
|
},
|
|
67
68
|
"devDependencies": {
|
|
68
69
|
"@gitbeaker/core": "^43.8.0",
|
|
69
|
-
"@iconify-json/simple-icons": "^1.2.
|
|
70
|
+
"@iconify-json/simple-icons": "^1.2.70",
|
|
70
71
|
"@nuxt/content": "^3.11.2",
|
|
71
|
-
"@nuxt/eslint-config": "^1.
|
|
72
|
-
"@nuxt/kit": "^4.3.
|
|
72
|
+
"@nuxt/eslint-config": "^1.15.1",
|
|
73
|
+
"@nuxt/kit": "^4.3.1",
|
|
73
74
|
"@nuxt/module-builder": "^1.0.2",
|
|
74
75
|
"@nuxt/ui": "^4.4.0",
|
|
75
76
|
"@octokit/types": "^16.0.0",
|
|
76
|
-
"@release-it/conventional-changelog": "^10.0.
|
|
77
|
+
"@release-it/conventional-changelog": "^10.0.5",
|
|
77
78
|
"@tailwindcss/typography": "^0.5.19",
|
|
78
79
|
"@tiptap/extension-emoji": "^3.19.0",
|
|
79
80
|
"@types/js-yaml": "^4.0.9",
|
|
80
|
-
"@unhead/vue": "^2.1.
|
|
81
|
+
"@unhead/vue": "^2.1.4",
|
|
81
82
|
"@unpic/vue": "^1.0.0",
|
|
82
83
|
"@vitejs/plugin-vue": "^6.0.4",
|
|
83
|
-
"eslint": "^
|
|
84
|
+
"eslint": "^10.0.0",
|
|
84
85
|
"idb-keyval": "^6.2.2",
|
|
85
86
|
"minimark": "^0.2.0",
|
|
86
87
|
"modern-monaco": "^0.3.7",
|
|
@@ -92,11 +93,14 @@
|
|
|
92
93
|
"vite-plugin-dts": "^4.5.4",
|
|
93
94
|
"vite-plugin-libcss": "^1.1.2",
|
|
94
95
|
"vitest": "^4.0.18",
|
|
95
|
-
"vue": "^3.5.
|
|
96
|
-
"vue-router": "^
|
|
96
|
+
"vue": "^3.5.28",
|
|
97
|
+
"vue-router": "^5.0.2",
|
|
97
98
|
"vue-tsc": "^3.2.4"
|
|
98
99
|
},
|
|
99
|
-
"
|
|
100
|
+
"resolutions": {
|
|
101
|
+
"minimark": "^0.2.0"
|
|
102
|
+
},
|
|
103
|
+
"packageManager": "pnpm@10.29.3",
|
|
100
104
|
"keywords": [
|
|
101
105
|
"nuxt",
|
|
102
106
|
"content",
|