@lupinum/nuxt-pdf 0.4.0-beta.3 → 0.4.0-beta.5
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/CHANGELOG.md +34 -0
- package/CONFORMANCE.md +10 -4
- package/README.md +28 -0
- package/dist/agent/AGENTS.md +48 -0
- package/dist/agent/manifest.json +215 -0
- package/dist/agent/pages/docs/examples/supported-behavior.md +75 -0
- package/dist/agent/pages/docs/examples.md +163 -0
- package/dist/agent/pages/docs/getting-started/installation.md +90 -0
- package/dist/agent/pages/docs/getting-started/quickstart.md +126 -0
- package/dist/agent/pages/docs/getting-started.md +61 -0
- package/dist/agent/pages/docs/guides/contents-links-bookmarks.md +123 -0
- package/dist/agent/pages/docs/guides/deployment.md +118 -0
- package/dist/agent/pages/docs/guides/errors-and-debugging.md +90 -0
- package/dist/agent/pages/docs/guides/images-and-fonts.md +102 -0
- package/dist/agent/pages/docs/guides/recipes.md +258 -0
- package/dist/agent/pages/docs/guides/remote-images.md +72 -0
- package/dist/agent/pages/docs/guides/reusable-components.md +81 -0
- package/dist/agent/pages/docs/guides/standalone-node.md +107 -0
- package/dist/agent/pages/docs/guides/svg-graphics.md +165 -0
- package/dist/agent/pages/docs/guides/testing.md +119 -0
- package/dist/agent/pages/docs/learn/document-tree.md +91 -0
- package/dist/agent/pages/docs/learn/runtime-and-data.md +63 -0
- package/dist/agent/pages/docs/learn/styling-and-layout.md +79 -0
- package/dist/agent/pages/docs/learn/templates-and-registry.md +96 -0
- package/dist/agent/pages/docs/reference/composables.md +55 -0
- package/dist/agent/pages/docs/reference/define-pdf.md +96 -0
- package/dist/agent/pages/docs/reference/errors-and-limits.md +89 -0
- package/dist/agent/pages/docs/reference/module-options.md +104 -0
- package/dist/agent/pages/docs/reference/page-sizes.md +54 -0
- package/dist/agent/pages/docs/reference/primitives.md +216 -0
- package/dist/agent/pages/docs/reference/registry.md +185 -0
- package/dist/agent/pages/docs/reference/standalone.md +53 -0
- package/dist/agent/pages/docs/reference/styles.md +176 -0
- package/dist/agent/pages/docs/reference/test-utilities.md +124 -0
- package/dist/build.mjs +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +14 -11
- package/dist/runtime/components/stubs.d.ts +22 -10
- package/dist/runtime/components/stubs.js +22 -27
- package/dist/runtime/server/assets/resolve-asset.js +2 -40
- package/dist/runtime/server/preview.js +1 -1
- package/dist/shared/{nuxt-pdf.DMC_Rdsz.mjs → nuxt-pdf.C-E8MM_K.mjs} +1 -0
- package/dist/shared/{nuxt-pdf.D3hUPqOJ.mjs → nuxt-pdf.CjVyPF31.mjs} +2 -2
- package/dist/test.mjs +1 -1
- package/package.json +17 -13
|
@@ -1,10 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
1
|
+
export declare const PdfCircle: import("vue").DefineComponent<{}, never, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export declare const PdfClipPath: import("vue").DefineComponent<{}, never, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
3
|
+
export declare const PdfDefs: import("vue").DefineComponent<{}, never, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
4
|
+
export declare const PdfDocument: import("vue").DefineComponent<{}, never, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
5
|
+
export declare const PdfEllipse: import("vue").DefineComponent<{}, never, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
export declare const PdfG: import("vue").DefineComponent<{}, never, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
7
|
+
export declare const PdfImage: import("vue").DefineComponent<{}, never, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
export declare const PdfLine: import("vue").DefineComponent<{}, never, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
9
|
+
export declare const PdfLinearGradient: import("vue").DefineComponent<{}, never, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
10
|
+
export declare const PdfLink: import("vue").DefineComponent<{}, never, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
11
|
+
export declare const PdfNote: import("vue").DefineComponent<{}, never, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
12
|
+
export declare const PdfPage: import("vue").DefineComponent<{}, never, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
13
|
+
export declare const PdfPath: import("vue").DefineComponent<{}, never, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
14
|
+
export declare const PdfPolygon: import("vue").DefineComponent<{}, never, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
15
|
+
export declare const PdfPolyline: import("vue").DefineComponent<{}, never, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
16
|
+
export declare const PdfRadialGradient: import("vue").DefineComponent<{}, never, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
17
|
+
export declare const PdfRect: import("vue").DefineComponent<{}, never, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
18
|
+
export declare const PdfStop: import("vue").DefineComponent<{}, never, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
19
|
+
export declare const PdfSvg: import("vue").DefineComponent<{}, never, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
20
|
+
export declare const PdfText: import("vue").DefineComponent<{}, never, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
21
|
+
export declare const PdfTspan: import("vue").DefineComponent<{}, never, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
22
|
+
export declare const PdfView: import("vue").DefineComponent<{}, never, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,29 +1,5 @@
|
|
|
1
1
|
import { defineComponent } from "vue";
|
|
2
2
|
import { NuxtPdfError, PDF_ERROR_CODES } from "../shared/errors.js";
|
|
3
|
-
export const PDF_STUB_NAMES = [
|
|
4
|
-
"PdfCircle",
|
|
5
|
-
"PdfClipPath",
|
|
6
|
-
"PdfDefs",
|
|
7
|
-
"PdfDocument",
|
|
8
|
-
"PdfEllipse",
|
|
9
|
-
"PdfG",
|
|
10
|
-
"PdfImage",
|
|
11
|
-
"PdfLine",
|
|
12
|
-
"PdfLinearGradient",
|
|
13
|
-
"PdfLink",
|
|
14
|
-
"PdfNote",
|
|
15
|
-
"PdfPage",
|
|
16
|
-
"PdfPath",
|
|
17
|
-
"PdfPolygon",
|
|
18
|
-
"PdfPolyline",
|
|
19
|
-
"PdfRadialGradient",
|
|
20
|
-
"PdfRect",
|
|
21
|
-
"PdfStop",
|
|
22
|
-
"PdfSvg",
|
|
23
|
-
"PdfText",
|
|
24
|
-
"PdfTspan",
|
|
25
|
-
"PdfView"
|
|
26
|
-
];
|
|
27
3
|
const stubMessage = (name) => `<${name}> only works inside a discovered pdfs/*.vue template rendered by @lupinum/nuxt-pdf. Move this component under pdfs/, or replace it with ordinary Vue/HTML components.`;
|
|
28
4
|
const createPdfStub = (name) => defineComponent({
|
|
29
5
|
name,
|
|
@@ -32,6 +8,25 @@ const createPdfStub = (name) => defineComponent({
|
|
|
32
8
|
},
|
|
33
9
|
render: () => null
|
|
34
10
|
});
|
|
35
|
-
export const
|
|
36
|
-
|
|
37
|
-
);
|
|
11
|
+
export const PdfCircle = createPdfStub("PdfCircle");
|
|
12
|
+
export const PdfClipPath = createPdfStub("PdfClipPath");
|
|
13
|
+
export const PdfDefs = createPdfStub("PdfDefs");
|
|
14
|
+
export const PdfDocument = createPdfStub("PdfDocument");
|
|
15
|
+
export const PdfEllipse = createPdfStub("PdfEllipse");
|
|
16
|
+
export const PdfG = createPdfStub("PdfG");
|
|
17
|
+
export const PdfImage = createPdfStub("PdfImage");
|
|
18
|
+
export const PdfLine = createPdfStub("PdfLine");
|
|
19
|
+
export const PdfLinearGradient = createPdfStub("PdfLinearGradient");
|
|
20
|
+
export const PdfLink = createPdfStub("PdfLink");
|
|
21
|
+
export const PdfNote = createPdfStub("PdfNote");
|
|
22
|
+
export const PdfPage = createPdfStub("PdfPage");
|
|
23
|
+
export const PdfPath = createPdfStub("PdfPath");
|
|
24
|
+
export const PdfPolygon = createPdfStub("PdfPolygon");
|
|
25
|
+
export const PdfPolyline = createPdfStub("PdfPolyline");
|
|
26
|
+
export const PdfRadialGradient = createPdfStub("PdfRadialGradient");
|
|
27
|
+
export const PdfRect = createPdfStub("PdfRect");
|
|
28
|
+
export const PdfStop = createPdfStub("PdfStop");
|
|
29
|
+
export const PdfSvg = createPdfStub("PdfSvg");
|
|
30
|
+
export const PdfText = createPdfStub("PdfText");
|
|
31
|
+
export const PdfTspan = createPdfStub("PdfTspan");
|
|
32
|
+
export const PdfView = createPdfStub("PdfView");
|
|
@@ -276,29 +276,7 @@ export const loadPdfImageAsset = async (relativePath, options) => {
|
|
|
276
276
|
"The local PDF image was not found in a configured asset root."
|
|
277
277
|
);
|
|
278
278
|
};
|
|
279
|
-
const RESOLVED_IMAGE_CACHE_BYTES = 32 * 1024 * 1024;
|
|
280
|
-
const resolvedImageCache = /* @__PURE__ */ new Map();
|
|
281
|
-
let resolvedImageCacheBytes = 0;
|
|
282
279
|
const embeddedImageCache = /* @__PURE__ */ new WeakMap();
|
|
283
|
-
const rememberResolvedImage = (cacheKey, image) => {
|
|
284
|
-
if (resolvedImageCache.has(cacheKey)) return;
|
|
285
|
-
resolvedImageCache.set(cacheKey, image);
|
|
286
|
-
resolvedImageCacheBytes += image.data.byteLength;
|
|
287
|
-
while (resolvedImageCacheBytes > RESOLVED_IMAGE_CACHE_BYTES && resolvedImageCache.size > 1) {
|
|
288
|
-
const oldest = resolvedImageCache.keys().next().value;
|
|
289
|
-
if (oldest === void 0) break;
|
|
290
|
-
resolvedImageCacheBytes -= resolvedImageCache.get(oldest).data.byteLength;
|
|
291
|
-
resolvedImageCache.delete(oldest);
|
|
292
|
-
}
|
|
293
|
-
};
|
|
294
|
-
const cachedResolvedImage = (cacheKey) => {
|
|
295
|
-
const cached = resolvedImageCache.get(cacheKey);
|
|
296
|
-
if (!cached) return void 0;
|
|
297
|
-
return {
|
|
298
|
-
...cached,
|
|
299
|
-
data: Buffer.from(cached.data)
|
|
300
|
-
};
|
|
301
|
-
};
|
|
302
280
|
const resolveLocalImage = async (source, assets, maxBytes, maxPixels, declaredFormat) => {
|
|
303
281
|
const key = canonicalAssetKey(source);
|
|
304
282
|
const pathFormat = formatFromExtension(key);
|
|
@@ -328,8 +306,8 @@ const resolveLocalImage = async (source, assets, maxBytes, maxPixels, declaredFo
|
|
|
328
306
|
byLimits = /* @__PURE__ */ new Map();
|
|
329
307
|
embeddedImageCache.set(entry, byLimits);
|
|
330
308
|
}
|
|
331
|
-
const
|
|
332
|
-
if (
|
|
309
|
+
const cached = byLimits.get(limitsKey);
|
|
310
|
+
if (cached) return { ...cached, data: Buffer.from(cached.data) };
|
|
333
311
|
const resolved2 = validateImageBytes(
|
|
334
312
|
Buffer.from(entry.dataB64, "base64"),
|
|
335
313
|
maxBytes,
|
|
@@ -339,21 +317,6 @@ const resolveLocalImage = async (source, assets, maxBytes, maxPixels, declaredFo
|
|
|
339
317
|
byLimits.set(limitsKey, resolved2);
|
|
340
318
|
return { ...resolved2, data: Buffer.from(resolved2.data) };
|
|
341
319
|
}
|
|
342
|
-
let fileStat;
|
|
343
|
-
try {
|
|
344
|
-
fileStat = await stat(resolve(entry.root, ...key.split("/")));
|
|
345
|
-
} catch (error) {
|
|
346
|
-
if (isMissingFileError(error)) {
|
|
347
|
-
return invalid(`The local PDF image "${key}" was not found under pdfs/assets.`);
|
|
348
|
-
}
|
|
349
|
-
return invalid("The local PDF image cannot be inspected.", error);
|
|
350
|
-
}
|
|
351
|
-
if (!fileStat.isFile()) {
|
|
352
|
-
return invalid("The local PDF image is not a regular file.");
|
|
353
|
-
}
|
|
354
|
-
const cacheKey = `disk\0${key}\0${fileStat.mtimeMs}\0${fileStat.size}\0${maxBytes}\0${maxPixels}`;
|
|
355
|
-
const cached = cachedResolvedImage(cacheKey);
|
|
356
|
-
if (cached) return cached;
|
|
357
320
|
const loaded = await loadPdfImageAsset(key, {
|
|
358
321
|
roots: [entry.root],
|
|
359
322
|
maxBytes,
|
|
@@ -366,7 +329,6 @@ const resolveLocalImage = async (source, assets, maxBytes, maxPixels, declaredFo
|
|
|
366
329
|
pixels: loaded.pixels,
|
|
367
330
|
width: loaded.width
|
|
368
331
|
});
|
|
369
|
-
rememberResolvedImage(cacheKey, resolved);
|
|
370
332
|
return { ...resolved, data: Buffer.from(resolved.data) };
|
|
371
333
|
};
|
|
372
334
|
const isRemoteCandidate = (source) => /^https?:/i.test(source);
|
|
@@ -233,7 +233,7 @@ const viewerPage = async (template, props, rootPath, scenario, hmrClientPath2 =
|
|
|
233
233
|
}
|
|
234
234
|
return htmlResponse(
|
|
235
235
|
title,
|
|
236
|
-
`<header><h1>${escapeHtml(title)}</h1>${actions}</header>${nav}${body}<script type="module">import { createHotContext } from ${JSON.stringify(hmrClientPath2)};createHotContext('/_pdf').on('nuxt-pdf:update',()=>{
|
|
236
|
+
`<header><h1>${escapeHtml(title)}</h1>${actions}</header>${nav}${body}<script type="module">import { createHotContext } from ${JSON.stringify(hmrClientPath2)};createHotContext('/_pdf').on('nuxt-pdf:update',()=>{location.reload();});<\/script>`
|
|
237
237
|
);
|
|
238
238
|
};
|
|
239
239
|
export const renderPdfPreview = async (registry, request = {}) => {
|
|
@@ -540,6 +540,7 @@ const createPdfSfcPlugin = (options) => ({
|
|
|
540
540
|
if (!filename) return null;
|
|
541
541
|
const kind = options.files.get(filename);
|
|
542
542
|
if (!kind) return null;
|
|
543
|
+
this.addWatchFile(filename);
|
|
543
544
|
return compilePdfSfc(
|
|
544
545
|
await readFile(filename, "utf8"),
|
|
545
546
|
filename,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as pdfStubs from '../../dist/runtime/components/stubs.js';
|
|
2
2
|
import { joinURL } from 'ufo';
|
|
3
3
|
import { Buffer } from 'node:buffer';
|
|
4
4
|
import { pdfImageFormatFromKey, loadPdfImageAsset } from '../../dist/runtime/server/assets/resolve-asset.js';
|
|
@@ -10,7 +10,7 @@ const generateAuthoringTypes = (componentsImport, composablesImport, definePdfIm
|
|
|
10
10
|
|
|
11
11
|
declare module 'vue' {
|
|
12
12
|
interface GlobalComponents {
|
|
13
|
-
${
|
|
13
|
+
${Object.keys(pdfStubs).map((name) => ` ${name}: typeof import(${JSON.stringify(componentsImport)})['${name}']`).join("\n")}
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
package/dist/test.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { mkdir, writeFile, rm, readFile, readdir } from 'node:fs/promises';
|
|
|
10
10
|
import { resolve, dirname, join, relative, basename } from 'node:path';
|
|
11
11
|
import { pathToFileURL, fileURLToPath } from 'node:url';
|
|
12
12
|
import { build } from 'esbuild';
|
|
13
|
-
import { t as templateKeyFromRelativePath, a as discoverPdfImageFiles, b as bundlePdfFonts, c as compilePdfSfc } from './shared/nuxt-pdf.
|
|
13
|
+
import { t as templateKeyFromRelativePath, a as discoverPdfImageFiles, b as bundlePdfFonts, c as compilePdfSfc } from './shared/nuxt-pdf.C-E8MM_K.mjs';
|
|
14
14
|
import { pdfImageFormatFromKey } from '../dist/runtime/server/assets/resolve-asset.js';
|
|
15
15
|
import '@vue/compiler-sfc';
|
|
16
16
|
import '@jridgewell/remapping';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lupinum/nuxt-pdf",
|
|
3
|
-
"version": "0.4.0-beta.
|
|
3
|
+
"version": "0.4.0-beta.5",
|
|
4
4
|
"description": "Author and render PDFs with Vue components in Nuxt",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nuxt",
|
|
@@ -38,7 +38,8 @@
|
|
|
38
38
|
"./server": {
|
|
39
39
|
"types": "./dist/server.d.mts",
|
|
40
40
|
"import": "./dist/server.mjs"
|
|
41
|
-
}
|
|
41
|
+
},
|
|
42
|
+
"./agent-docs": "./dist/agent/AGENTS.md"
|
|
42
43
|
},
|
|
43
44
|
"main": "./dist/module.mjs",
|
|
44
45
|
"types": "./dist/types.d.mts",
|
|
@@ -56,7 +57,7 @@
|
|
|
56
57
|
"node": "^22.14.0 || ^24.0.0 || ^26.0.0"
|
|
57
58
|
},
|
|
58
59
|
"scripts": {
|
|
59
|
-
"prepack": "pnpm build",
|
|
60
|
+
"prepack": "pnpm docs:build && pnpm docs:package",
|
|
60
61
|
"prepublishOnly": "node scripts/block-source-publish.mjs",
|
|
61
62
|
"dev": "npm run dev:prepare && nuxt dev playground",
|
|
62
63
|
"dev:build": "nuxt build playground",
|
|
@@ -67,21 +68,22 @@
|
|
|
67
68
|
"docs:build": "pnpm docs:theme && pnpm build && pnpm --dir docs build",
|
|
68
69
|
"docs:build:vercel": "node scripts/build-docs-vercel.mjs",
|
|
69
70
|
"docs:dev": "pnpm --dir docs dev",
|
|
71
|
+
"docs:onboarding": "node scripts/sync-consumer-onboarding.mjs --write",
|
|
72
|
+
"docs:package": "node scripts/build-agent-docs.mjs",
|
|
70
73
|
"docs:theme": "node scripts/check-docs-theme.mjs",
|
|
71
74
|
"format": "eslint . --fix",
|
|
72
|
-
"format:check": "eslint .",
|
|
73
|
-
"lint": "eslint .",
|
|
75
|
+
"format:check": "node scripts/sync-consumer-onboarding.mjs && eslint .",
|
|
76
|
+
"lint": "node scripts/sync-consumer-onboarding.mjs && eslint .",
|
|
74
77
|
"test": "pnpm test:prepare && vitest run",
|
|
75
78
|
"test:api": "node scripts/check-api-report.mjs",
|
|
76
79
|
"release:notes": "node scripts/write-release-notes.mjs",
|
|
77
|
-
"release:pack": "pnpm build && node scripts/check-release-artifact.mjs release-artifacts",
|
|
78
|
-
"release:prepare": "changelogen --bump --clean",
|
|
79
|
-
"release:verify": "pnpm
|
|
80
|
-
"test:artifact": "node scripts/check-release-artifact.mjs",
|
|
80
|
+
"release:pack": "pnpm docs:build && pnpm docs:package && node scripts/check-release-artifact.mjs release-artifacts",
|
|
81
|
+
"release:prepare": "changelogen --bump --prerelease beta --clean",
|
|
82
|
+
"release:verify": "pnpm check:dependencies && pnpm audit:all && pnpm check:source && pnpm docs:build && pnpm docs:package && node scripts/check-release-artifact.mjs release-artifacts",
|
|
83
|
+
"test:artifact": "pnpm docs:build && pnpm docs:package && node scripts/check-release-artifact.mjs",
|
|
81
84
|
"test:dependencies": "node scripts/check-production-dependencies.mjs",
|
|
82
|
-
"test:docs": "node scripts/check-documentation.mjs && pnpm
|
|
85
|
+
"test:docs": "node scripts/check-documentation.mjs && pnpm --dir docs check",
|
|
83
86
|
"test:package": "node scripts/check-package.mjs",
|
|
84
|
-
"test:package-metadata": "node scripts/check-api-report.mjs",
|
|
85
87
|
"test:performance": "node --expose-gc ./node_modules/vitest/vitest.mjs run --config vitest.performance.config.ts",
|
|
86
88
|
"test:prepare": "pnpm dev:prepare && nuxt prepare test/fixtures/layers",
|
|
87
89
|
"test:production": "pnpm build && vitest run --config vitest.production.config.ts",
|
|
@@ -94,8 +96,10 @@
|
|
|
94
96
|
"test:watch": "vitest watch",
|
|
95
97
|
"typecheck": "pnpm test:prepare && nuxt prepare && vue-tsc --noEmit && nuxt prepare test/fixtures/basic && vue-tsc --noEmit -p test/fixtures/basic/tsconfig.json && pnpm --dir playground exec vue-tsc --noEmit",
|
|
96
98
|
"audit:all": "pnpm audit",
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
+
"check:dependencies": "node scripts/check-dependency-policy.mjs",
|
|
100
|
+
"verify": "pnpm check:dependencies && pnpm audit:all && pnpm check",
|
|
101
|
+
"check": "pnpm check:source && pnpm test:artifact",
|
|
102
|
+
"check:source": "pnpm format:check && pnpm check:vercel && pnpm typecheck && pnpm test:docs && pnpm test:version-headings && pnpm test:workflows && pnpm test:dependencies && pnpm test && pnpm test:production && pnpm test:serverless && pnpm build && pnpm test:api && pnpm dev:build"
|
|
99
103
|
},
|
|
100
104
|
"dependencies": {
|
|
101
105
|
"@jridgewell/remapping": "2.3.5",
|