@vuepress/utils 2.0.0-rc.26 → 2.0.0-rc.28

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.
Files changed (3) hide show
  1. package/dist/index.d.ts +79 -70
  2. package/dist/index.js +126 -142
  3. package/package.json +25 -31
package/dist/index.d.ts CHANGED
@@ -1,20 +1,20 @@
1
- export { default as debug } from 'debug';
2
- export { default as fs } from 'fs-extra';
3
- export { default as hash } from 'hash-sum';
4
- import { Ora } from 'ora';
5
- export { default as ora } from 'ora';
6
- export { default as colors } from 'picocolors';
7
- export { default as picomatch } from 'picomatch';
8
- import * as tinyglobby from 'tinyglobby';
9
- export { tinyglobby };
10
- export { default as path } from 'upath';
11
- import { HeadConfig, HeadAttrsConfig } from '@vuepress/shared';
1
+ import debug from "debug";
2
+ import fs from "fs-extra";
3
+ import hash from "hash-sum";
4
+ import ora, { Ora } from "ora";
5
+ import colors from "picocolors";
6
+ import picomatch from "picomatch";
7
+ import * as tinyglobby from "tinyglobby";
8
+ import path from "upath";
9
+ import { HeadAttrsConfig, HeadConfig } from "@vuepress/shared";
12
10
 
11
+ //#region src/console/formatMs.d.ts
13
12
  /**
14
13
  * Format millisecond
15
14
  */
16
15
  declare const formatMs: (ms: number) => string;
17
-
16
+ //#endregion
17
+ //#region src/console/logger.d.ts
18
18
  declare const info: (...args: unknown[]) => void;
19
19
  declare const tip: (...args: unknown[]) => void;
20
20
  declare const success: (...args: unknown[]) => void;
@@ -22,18 +22,21 @@ declare const warn: (...args: unknown[]) => void;
22
22
  declare const error: (...args: unknown[]) => void;
23
23
  declare const createError: (message?: string) => Error;
24
24
  declare const logger: {
25
- info: (...args: unknown[]) => void;
26
- tip: (...args: unknown[]) => void;
27
- success: (...args: unknown[]) => void;
28
- warn: (...args: unknown[]) => void;
29
- error: (...args: unknown[]) => void;
30
- createError: (message?: string) => Error;
25
+ info: (...args: unknown[]) => void;
26
+ tip: (...args: unknown[]) => void;
27
+ success: (...args: unknown[]) => void;
28
+ warn: (...args: unknown[]) => void;
29
+ error: (...args: unknown[]) => void;
30
+ createError: (message?: string) => Error;
31
31
  };
32
-
32
+ //#endregion
33
+ //#region src/console/withSpinner.d.ts
33
34
  declare const withSpinner: (msg: string) => <T>(target: (spinner?: Ora) => Promise<T>) => Promise<T>;
34
-
35
+ //#endregion
36
+ //#region src/module/getDirname.d.ts
35
37
  declare const getDirname: (importMetaUrl: string) => string;
36
-
38
+ //#endregion
39
+ //#region src/module/importFile.d.ts
37
40
  /**
38
41
  * A helper for dynamically importing a file path
39
42
  *
@@ -44,79 +47,85 @@ declare const importFile: <T>(filePath: string) => Promise<T>;
44
47
  * A wrapper of `importFile` and returns the default export
45
48
  */
46
49
  declare const importFileDefault: <T>(filePath: string) => Promise<T>;
47
-
50
+ //#endregion
51
+ //#region src/module/isChildPath.d.ts
48
52
  /**
49
53
  * Check if `child` is a sub path of `parent` or not. Return `true` if
50
54
  * they are the same path
51
55
  */
52
56
  declare const isChildPath: (child: string, parent: string) => boolean;
53
-
57
+ //#endregion
58
+ //#region src/module/sanitizeFileName.d.ts
54
59
  declare const sanitizeFileName: (name: string) => string;
55
-
60
+ //#endregion
61
+ //#region src/module/transformPathToFileName.d.ts
56
62
  /**
57
63
  * Transforms a path to a file name, replacing slashes with underscores
58
64
  */
59
65
  declare const transformPathToFileName: (rawPath: string) => string;
60
-
66
+ //#endregion
67
+ //#region src/ssr/renderHead.d.ts
61
68
  /**
62
69
  * Render head config to string
63
70
  */
64
- declare const renderHead: ([tag, attrs, innerHTML,]: HeadConfig) => string;
65
-
71
+ declare const renderHead: ([tag, attrs, innerHTML]: HeadConfig) => string;
72
+ //#endregion
73
+ //#region src/ssr/renderHeadAttrs.d.ts
66
74
  /**
67
75
  * Render head attrs config to string
68
76
  */
69
77
  declare const renderHeadAttrs: (attrs: HeadAttrsConfig) => string;
70
-
78
+ //#endregion
79
+ //#region src/ssr/templateRenderer.d.ts
71
80
  /**
72
81
  * HTML outlets of the template renderer
73
82
  */
74
83
  declare enum TemplateRendererOutlet {
75
- Content = "<!--vuepress-ssr-content-->",
76
- Head = "<!--vuepress-ssr-head-->",
77
- Lang = "{{ lang }}",
78
- Prefetch = "<!--vuepress-ssr-prefetch-->",
79
- Preload = "<!--vuepress-ssr-preload-->",
80
- Scripts = "<!--vuepress-ssr-scripts-->",
81
- Styles = "<!--vuepress-ssr-styles-->",
82
- Version = "{{ version }}"
84
+ Content = "<!--vuepress-ssr-content-->",
85
+ Head = "<!--vuepress-ssr-head-->",
86
+ Lang = "{{ lang }}",
87
+ Prefetch = "<!--vuepress-ssr-prefetch-->",
88
+ Preload = "<!--vuepress-ssr-preload-->",
89
+ Scripts = "<!--vuepress-ssr-scripts-->",
90
+ Styles = "<!--vuepress-ssr-styles-->",
91
+ Version = "{{ version }}"
83
92
  }
84
93
  /**
85
94
  * Context type of the template renderer
86
95
  */
87
96
  interface TemplateRendererContext {
88
- /**
89
- * The rendered page content. Typically to be put inside `<div id="app"></div>`
90
- */
91
- content: string;
92
- /**
93
- * The rendered page head. Typically to be put inside `<head></head>`
94
- */
95
- head: string;
96
- /**
97
- * The language of the page. Typically to be put inside `<html lang="{{ lang }}">`
98
- */
99
- lang: string;
100
- /**
101
- * The rendered prefetch links. Typically to be put inside `<head></head>`
102
- */
103
- prefetch: string;
104
- /**
105
- * The rendered preload links. Typically to be put inside `<head></head>`
106
- */
107
- preload: string;
108
- /**
109
- * The rendered scripts. Typically to be put before `</body>`
110
- */
111
- scripts: string;
112
- /**
113
- * The rendered styles. Typically to be put inside `<head></head>`
114
- */
115
- styles: string;
116
- /**
117
- * The version of VuePress
118
- */
119
- version: string;
97
+ /**
98
+ * The rendered page content. Typically to be put inside `<div id="app"></div>`
99
+ */
100
+ content: string;
101
+ /**
102
+ * The rendered page head. Typically to be put inside `<head></head>`
103
+ */
104
+ head: string;
105
+ /**
106
+ * The language of the page. Typically to be put inside `<html lang="{{ lang }}">`
107
+ */
108
+ lang: string;
109
+ /**
110
+ * The rendered prefetch links. Typically to be put inside `<head></head>`
111
+ */
112
+ prefetch: string;
113
+ /**
114
+ * The rendered preload links. Typically to be put inside `<head></head>`
115
+ */
116
+ preload: string;
117
+ /**
118
+ * The rendered scripts. Typically to be put before `</body>`
119
+ */
120
+ scripts: string;
121
+ /**
122
+ * The rendered styles. Typically to be put inside `<head></head>`
123
+ */
124
+ styles: string;
125
+ /**
126
+ * The version of VuePress
127
+ */
128
+ version: string;
120
129
  }
121
130
  /**
122
131
  * Type of the template renderer function
@@ -126,5 +135,5 @@ type TemplateRenderer = (template: string, context: TemplateRendererContext) =>
126
135
  * The default template renderer implementation
127
136
  */
128
137
  declare const templateRenderer: TemplateRenderer;
129
-
130
- export { type TemplateRenderer, type TemplateRendererContext, TemplateRendererOutlet, createError, error, formatMs, getDirname, importFile, importFileDefault, info, isChildPath, logger, renderHead, renderHeadAttrs, sanitizeFileName, success, templateRenderer, tip, transformPathToFileName, warn, withSpinner };
138
+ //#endregion
139
+ export { TemplateRenderer, TemplateRendererContext, TemplateRendererOutlet, colors, createError, debug, error, formatMs, fs, getDirname, hash, importFile, importFileDefault, info, isChildPath, logger, ora, path, picomatch, renderHead, renderHeadAttrs, sanitizeFileName, success, templateRenderer, tinyglobby, tip, transformPathToFileName, warn, withSpinner };
package/dist/index.js CHANGED
@@ -1,159 +1,143 @@
1
- // src/index.ts
2
1
  import debug from "debug";
3
2
  import fs from "fs-extra";
4
3
  import hash from "hash-sum";
5
- import ora2 from "ora";
6
- import colors2 from "picocolors";
4
+ import ora, { default as ora$1 } from "ora";
5
+ import colors, { default as colors$1 } from "picocolors";
7
6
  import picomatch from "picomatch";
8
7
  import * as tinyglobby from "tinyglobby";
9
- import path3 from "upath";
10
-
11
- // src/console/formatMs.ts
12
- var formatMs = (ms) => {
13
- if (ms < 1e3) return `${ms}ms`;
14
- return `${(ms / 1e3).toFixed(2)}s`;
8
+ import path, { default as path$1 } from "upath";
9
+ import process from "node:process";
10
+ import { fileURLToPath, pathToFileURL } from "node:url";
11
+ //#region src/console/formatMs.ts
12
+ /**
13
+ * Format millisecond
14
+ */
15
+ const formatMs = (ms) => {
16
+ if (ms < 1e3) return `${ms}ms`;
17
+ return `${(ms / 1e3).toFixed(2)}s`;
15
18
  };
16
-
17
- // src/console/logger.ts
18
- import colors from "picocolors";
19
- var info = (...args) => {
20
- console.log(colors.cyan("info"), ...args);
19
+ //#endregion
20
+ //#region src/console/logger.ts
21
+ const info = (...args) => {
22
+ console.log(colors$1.cyan("info"), ...args);
21
23
  };
22
- var tip = (...args) => {
23
- console.log(colors.blue("tip"), ...args);
24
+ const tip = (...args) => {
25
+ console.log(colors$1.blue("tip"), ...args);
24
26
  };
25
- var success = (...args) => {
26
- console.log(colors.green("success"), ...args);
27
+ const success = (...args) => {
28
+ console.log(colors$1.green("success"), ...args);
27
29
  };
28
- var warn = (...args) => {
29
- console.warn(colors.yellow("warning"), ...args);
30
+ const warn = (...args) => {
31
+ console.warn(colors$1.yellow("warning"), ...args);
30
32
  };
31
- var error = (...args) => {
32
- console.error(colors.red("error"), ...args);
33
+ const error = (...args) => {
34
+ console.error(colors$1.red("error"), ...args);
33
35
  };
34
- var createError = (message) => {
35
- error(message);
36
- return new Error(message);
36
+ const createError = (message) => {
37
+ error(message);
38
+ return new Error(message);
37
39
  };
38
- var logger = {
39
- info,
40
- tip,
41
- success,
42
- warn,
43
- error,
44
- createError
40
+ const logger = {
41
+ info,
42
+ tip,
43
+ success,
44
+ warn,
45
+ error,
46
+ createError
45
47
  };
46
-
47
- // src/console/withSpinner.ts
48
- import process from "process";
49
- import ora from "ora";
50
- var withSpinner = (msg) => async (target) => {
51
- if (process.env.DEBUG) {
52
- return target();
53
- }
54
- const start = Date.now();
55
- const spinner = ora();
56
- try {
57
- spinner.start(msg);
58
- const result = await target(spinner);
59
- spinner.succeed(`${msg} - done in ${formatMs(Date.now() - start)}`);
60
- return result;
61
- } catch (e) {
62
- spinner.fail(`${msg} - failed in ${formatMs(Date.now() - start)}`);
63
- throw e;
64
- }
48
+ //#endregion
49
+ //#region src/console/withSpinner.ts
50
+ const withSpinner = (msg) => async (target) => {
51
+ if (process.env.DEBUG) return target();
52
+ const start = Date.now();
53
+ const spinner = ora$1();
54
+ try {
55
+ spinner.start(msg);
56
+ const result = await target(spinner);
57
+ spinner.succeed(`${msg} - done in ${formatMs(Date.now() - start)}`);
58
+ return result;
59
+ } catch (e) {
60
+ spinner.fail(`${msg} - failed in ${formatMs(Date.now() - start)}`);
61
+ throw e;
62
+ }
65
63
  };
66
-
67
- // src/module/getDirname.ts
68
- import { fileURLToPath } from "url";
69
- import path from "upath";
70
- var getDirname = (importMetaUrl) => path.dirname(fileURLToPath(importMetaUrl));
71
-
72
- // src/module/importFile.ts
73
- import { pathToFileURL } from "url";
74
- var importFile = async (filePath) => import(pathToFileURL(filePath).toString());
75
- var importFileDefault = async (filePath) => importFile(filePath).then((m) => m.default);
76
-
77
- // src/module/isChildPath.ts
78
- import path2 from "upath";
79
- var isChildPath = (child, parent) => {
80
- const childPath = path2.normalize(child);
81
- const parentPath = path2.normalize(parent);
82
- if (!path2.win32.isAbsolute(childPath) || !path2.win32.isAbsolute(parentPath)) {
83
- return false;
84
- }
85
- const relativePath = path2.relative(parentPath, childPath);
86
- return relativePath === "" || !relativePath.startsWith("..");
64
+ //#endregion
65
+ //#region src/module/getDirname.ts
66
+ const getDirname = (importMetaUrl) => path$1.dirname(fileURLToPath(importMetaUrl));
67
+ //#endregion
68
+ //#region src/module/importFile.ts
69
+ /**
70
+ * A helper for dynamically importing a file path
71
+ *
72
+ * We need to use `pathToFileURL` to transform file path wo compat with windows
73
+ */
74
+ const importFile = async (filePath) => import(pathToFileURL(filePath).toString());
75
+ /**
76
+ * A wrapper of `importFile` and returns the default export
77
+ */
78
+ const importFileDefault = async (filePath) => importFile(filePath).then((m) => m.default);
79
+ //#endregion
80
+ //#region src/module/isChildPath.ts
81
+ /**
82
+ * Check if `child` is a sub path of `parent` or not. Return `true` if
83
+ * they are the same path
84
+ */
85
+ const isChildPath = (child, parent) => {
86
+ const childPath = path$1.normalize(child);
87
+ const parentPath = path$1.normalize(parent);
88
+ if (!path$1.win32.isAbsolute(childPath) || !path$1.win32.isAbsolute(parentPath)) return false;
89
+ const relativePath = path$1.relative(parentPath, childPath);
90
+ return relativePath === "" || !relativePath.startsWith("..");
87
91
  };
88
-
89
- // src/module/sanitizeFileName.ts
90
- var INVALID_CHAR_REGEX = /[\u0000-\u001F"#$%&*+,:;<=>?[\]^`{|}\u007F]/g;
91
- var DRIVE_LETTER_REGEX = /^[a-z]:/i;
92
- var sanitizeFileName = (name) => {
93
- const driveLetter = DRIVE_LETTER_REGEX.exec(name)?.[0] || "";
94
- return driveLetter + name.slice(driveLetter.length).replace(INVALID_CHAR_REGEX, "_").replace(/^_+/, "");
92
+ //#endregion
93
+ //#region src/module/sanitizeFileName.ts
94
+ const INVALID_CHAR_REGEX = /[\u0000-\u001F"#$%&*+,:;<=>?[\]^`{|}\u007F]/g;
95
+ const DRIVE_LETTER_REGEX = /^[a-z]:/i;
96
+ const sanitizeFileName = (name) => {
97
+ const driveLetter = DRIVE_LETTER_REGEX.exec(name)?.[0] || "";
98
+ return driveLetter + name.slice(driveLetter.length).replace(INVALID_CHAR_REGEX, "_").replace(/^_+/, "");
95
99
  };
96
-
97
- // src/module/transformPathToFileName.ts
98
- var transformPathToFileName = (rawPath) => sanitizeFileName(rawPath.replace(/\//g, "_"));
99
-
100
- // src/ssr/renderHeadAttrs.ts
101
- var renderHeadAttrs = (attrs) => Object.entries(attrs).filter((item) => item[1] !== false).map(
102
- ([key, value]) => value === true ? ` ${key}` : ` ${key}="${attrs[key]}"`
103
- ).join("");
104
-
105
- // src/ssr/renderHead.ts
106
- var renderHead = ([
107
- tag,
108
- attrs,
109
- innerHTML = ""
110
- ]) => {
111
- const openTag = `<${tag}${renderHeadAttrs(attrs)}>`;
112
- if (tag === "link" || tag === "meta" || tag === "base") {
113
- return openTag;
114
- }
115
- return `${openTag}${innerHTML}</${tag}>`;
116
- };
117
-
118
- // src/ssr/templateRenderer.ts
119
- var TemplateRendererOutlet = /* @__PURE__ */ ((TemplateRendererOutlet2) => {
120
- TemplateRendererOutlet2["Content"] = "<!--vuepress-ssr-content-->";
121
- TemplateRendererOutlet2["Head"] = "<!--vuepress-ssr-head-->";
122
- TemplateRendererOutlet2["Lang"] = "{{ lang }}";
123
- TemplateRendererOutlet2["Prefetch"] = "<!--vuepress-ssr-prefetch-->";
124
- TemplateRendererOutlet2["Preload"] = "<!--vuepress-ssr-preload-->";
125
- TemplateRendererOutlet2["Scripts"] = "<!--vuepress-ssr-scripts-->";
126
- TemplateRendererOutlet2["Styles"] = "<!--vuepress-ssr-styles-->";
127
- TemplateRendererOutlet2["Version"] = "{{ version }}";
128
- return TemplateRendererOutlet2;
129
- })(TemplateRendererOutlet || {});
130
- var templateRenderer = (template, { content, head, lang, prefetch, preload, scripts, styles, version }) => template.replace("<!--vuepress-ssr-content-->" /* Content */, () => content).replace("<!--vuepress-ssr-head-->" /* Head */, head).replace("{{ lang }}" /* Lang */, lang).replace("<!--vuepress-ssr-prefetch-->" /* Prefetch */, prefetch).replace("<!--vuepress-ssr-preload-->" /* Preload */, preload).replace("<!--vuepress-ssr-scripts-->" /* Scripts */, scripts).replace("<!--vuepress-ssr-styles-->" /* Styles */, styles).replace("{{ version }}" /* Version */, version);
131
- export {
132
- TemplateRendererOutlet,
133
- colors2 as colors,
134
- createError,
135
- debug,
136
- error,
137
- formatMs,
138
- fs,
139
- getDirname,
140
- hash,
141
- importFile,
142
- importFileDefault,
143
- info,
144
- isChildPath,
145
- logger,
146
- ora2 as ora,
147
- path3 as path,
148
- picomatch,
149
- renderHead,
150
- renderHeadAttrs,
151
- sanitizeFileName,
152
- success,
153
- templateRenderer,
154
- tinyglobby,
155
- tip,
156
- transformPathToFileName,
157
- warn,
158
- withSpinner
100
+ //#endregion
101
+ //#region src/module/transformPathToFileName.ts
102
+ /**
103
+ * Transforms a path to a file name, replacing slashes with underscores
104
+ */
105
+ const transformPathToFileName = (rawPath) => sanitizeFileName(rawPath.replace(/\//g, "_"));
106
+ //#endregion
107
+ //#region src/ssr/renderHeadAttrs.ts
108
+ /**
109
+ * Render head attrs config to string
110
+ */
111
+ const renderHeadAttrs = (attrs) => Object.entries(attrs).filter((item) => item[1] !== false).map(([key, value]) => value === true ? ` ${key}` : ` ${key}="${attrs[key]}"`).join("");
112
+ //#endregion
113
+ //#region src/ssr/renderHead.ts
114
+ /**
115
+ * Render head config to string
116
+ */
117
+ const renderHead = ([tag, attrs, innerHTML = ""]) => {
118
+ const openTag = `<${tag}${renderHeadAttrs(attrs)}>`;
119
+ if (tag === "link" || tag === "meta" || tag === "base") return openTag;
120
+ return `${openTag}${innerHTML}</${tag}>`;
159
121
  };
122
+ //#endregion
123
+ //#region src/ssr/templateRenderer.ts
124
+ /**
125
+ * HTML outlets of the template renderer
126
+ */
127
+ let TemplateRendererOutlet = /* @__PURE__ */ function(TemplateRendererOutlet) {
128
+ TemplateRendererOutlet["Content"] = "<!--vuepress-ssr-content-->";
129
+ TemplateRendererOutlet["Head"] = "<!--vuepress-ssr-head-->";
130
+ TemplateRendererOutlet["Lang"] = "{{ lang }}";
131
+ TemplateRendererOutlet["Prefetch"] = "<!--vuepress-ssr-prefetch-->";
132
+ TemplateRendererOutlet["Preload"] = "<!--vuepress-ssr-preload-->";
133
+ TemplateRendererOutlet["Scripts"] = "<!--vuepress-ssr-scripts-->";
134
+ TemplateRendererOutlet["Styles"] = "<!--vuepress-ssr-styles-->";
135
+ TemplateRendererOutlet["Version"] = "{{ version }}";
136
+ return TemplateRendererOutlet;
137
+ }({});
138
+ /**
139
+ * The default template renderer implementation
140
+ */
141
+ const templateRenderer = (template, { content, head, lang, prefetch, preload, scripts, styles, version }) => template.replace(TemplateRendererOutlet.Content, () => content).replace(TemplateRendererOutlet.Head, head).replace(TemplateRendererOutlet.Lang, lang).replace(TemplateRendererOutlet.Prefetch, prefetch).replace(TemplateRendererOutlet.Preload, preload).replace(TemplateRendererOutlet.Scripts, scripts).replace(TemplateRendererOutlet.Styles, styles).replace(TemplateRendererOutlet.Version, version);
142
+ //#endregion
143
+ export { TemplateRendererOutlet, colors, createError, debug, error, formatMs, fs, getDirname, hash, importFile, importFileDefault, info, isChildPath, logger, ora, path, picomatch, renderHead, renderHeadAttrs, sanitizeFileName, success, templateRenderer, tinyglobby, tip, transformPathToFileName, warn, withSpinner };
package/package.json CHANGED
@@ -1,66 +1,60 @@
1
1
  {
2
2
  "name": "@vuepress/utils",
3
- "version": "2.0.0-rc.26",
3
+ "version": "2.0.0-rc.28",
4
4
  "description": "Utils package of VuePress",
5
5
  "keywords": [
6
- "vuepress",
7
- "utils"
6
+ "utils",
7
+ "vuepress"
8
8
  ],
9
9
  "homepage": "https://github.com/vuepress",
10
10
  "bugs": {
11
11
  "url": "https://github.com/vuepress/core/issues"
12
12
  },
13
+ "license": "MIT",
14
+ "author": "meteorlxy",
13
15
  "repository": {
14
16
  "type": "git",
15
17
  "url": "git+https://github.com/vuepress/core.git"
16
18
  },
17
- "license": "MIT",
18
- "author": "meteorlxy",
19
+ "files": [
20
+ "dist"
21
+ ],
19
22
  "type": "module",
23
+ "main": "./dist/index.js",
24
+ "module": "./dist/index.js",
25
+ "types": "./dist/index.d.ts",
20
26
  "exports": {
21
27
  ".": "./dist/index.js",
22
28
  "./package.json": "./package.json"
23
29
  },
24
- "main": "./dist/index.js",
25
- "module": "./dist/index.js",
26
- "types": "./dist/index.d.ts",
27
- "files": [
28
- "dist"
29
- ],
30
+ "publishConfig": {
31
+ "access": "public"
32
+ },
30
33
  "dependencies": {
31
- "@types/debug": "^4.1.12",
34
+ "@types/debug": "^4.1.13",
32
35
  "@types/fs-extra": "^11.0.4",
33
36
  "@types/hash-sum": "^1.0.2",
34
37
  "@types/picomatch": "^4.0.2",
35
38
  "debug": "^4.4.3",
36
- "fs-extra": "^11.3.2",
39
+ "fs-extra": "^11.3.4",
37
40
  "hash-sum": "^2.0.0",
38
- "ora": "^9.0.0",
41
+ "ora": "^9.3.0",
39
42
  "picocolors": "^1.1.1",
40
- "picomatch": "^4.0.3",
43
+ "picomatch": "^4.0.4",
41
44
  "tinyglobby": "^0.2.15",
42
45
  "upath": "^2.0.1",
43
- "@vuepress/shared": "2.0.0-rc.26"
44
- },
45
- "publishConfig": {
46
- "access": "public"
46
+ "@vuepress/shared": "2.0.0-rc.28"
47
47
  },
48
- "tsup": {
49
- "clean": true,
50
- "dts": "./src/index.ts",
51
- "entry": [
52
- "./src/index.ts"
53
- ],
54
- "format": [
55
- "esm"
56
- ],
57
- "outDir": "./dist",
58
- "sourcemap": false,
48
+ "tsdown": {
49
+ "dts": true,
50
+ "entry": "./src/index.ts",
51
+ "fixedExtension": false,
52
+ "format": "esm",
59
53
  "target": "es2023",
60
54
  "tsconfig": "../../tsconfig.dts.json"
61
55
  },
62
56
  "scripts": {
63
- "build": "tsup",
57
+ "build": "tsdown",
64
58
  "clean": "rimraf dist"
65
59
  }
66
60
  }