@alauda/doom 0.14.15 → 0.14.16

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/lib/cli/export.js CHANGED
@@ -96,6 +96,6 @@ export const exportCommand = new Command('export')
96
96
  const sidebarItems = themeConfig.sidebar['/'];
97
97
  await exportPdf(sidebarItems);
98
98
  }
99
- // close the server
99
+ logger.ready('Closing the server');
100
100
  process.exit(0);
101
101
  });
@@ -6,7 +6,7 @@ import { logger } from '@rspress/shared/logger';
6
6
  import { transformerMetaHighlight, transformerMetaWordHighlight, transformerNotationDiff, transformerNotationErrorLevel, transformerNotationFocus, transformerNotationHighlight, transformerNotationWordHighlight, transformerRemoveNotationEscape, } from '@shikijs/transformers';
7
7
  import rehypeRaw from 'rehype-raw';
8
8
  import { apiPlugin, autoSidebarPlugin, createTransformerCallouts, directivesPlugin, globalPlugin, mermaidPlugin, permissionPlugin, replacePlugin, shikiPlugin, } from '../plugins/index.js';
9
- import { normalizeVersion } from '../shared/index.js';
9
+ import {} from '../shared/index.js';
10
10
  import { pkgResolve, resolveStaticConfig } from '../utils/index.js';
11
11
  import { CWD, DEFAULT_CONFIG_NAME, DEFAULT_EXTENSIONS, I18N_FILE, SITES_FILE, YAML_EXTENSIONS, } from './constants.js';
12
12
  const DEFAULT_LOGO = '/logo.svg';
@@ -167,13 +167,13 @@ export async function loadConfig(root, { config: configFile, base, prefix, v: ve
167
167
  config.sites = await resolveStaticConfig(sitesConfigFilePath);
168
168
  }
169
169
  }
170
- const normalizedVersion = normalizeVersion(version);
170
+ version ||= '';
171
171
  const commonConfig = getCommonConfig({
172
172
  config,
173
173
  configFilePath,
174
174
  root,
175
175
  base,
176
- version: normalizedVersion,
176
+ version,
177
177
  download,
178
178
  ignore,
179
179
  force,
@@ -213,11 +213,10 @@ export async function loadConfig(root, { config: configFile, base, prefix, v: ve
213
213
  mergedConfig.i18nSourcePath = path.resolve(mergedConfig.root, I18N_FILE);
214
214
  }
215
215
  if (mergedConfig.outDir) {
216
- mergedConfig.outDir =
217
- addTrailingSlash(mergedConfig.outDir) + normalizedVersion;
216
+ mergedConfig.outDir = addTrailingSlash(mergedConfig.outDir) + version;
218
217
  }
219
218
  else {
220
- mergedConfig.outDir = `dist${normalizedVersion === 'unversioned' ? `${base}unversioned` : base}`;
219
+ mergedConfig.outDir = `dist${version === 'unversioned' ? `${base}unversioned` : base}`;
221
220
  }
222
221
  if (mergedConfig.builderConfig?.server?.open === true) {
223
222
  mergedConfig.builderConfig.server.open = mergedConfig.base;
@@ -1,7 +1,7 @@
1
1
  import fs from 'node:fs';
2
2
  import path from 'node:path';
3
3
  import { addTrailingSlash } from '@rspress/core';
4
- import { ACP_BASE, normalizeVersion, } from '../../shared/index.js';
4
+ import { ACP_BASE } from '../../shared/index.js';
5
5
  import { baseResolve, pkgResolve } from '../../utils/index.js';
6
6
  const globalComponentsDir = baseResolve('global');
7
7
  const componentsDir = baseResolve('runtime/components');
@@ -33,7 +33,7 @@ export const globalPlugin = ({ version, download, }) => {
33
33
  sites: config.sites?.map((site) => ({
34
34
  ...site,
35
35
  base: addTrailingSlash(site.base || (site.name === 'acp' ? ACP_BASE : '')),
36
- version: normalizeVersion(site.version),
36
+ version: site.version,
37
37
  })),
38
38
  }, null, isProd ? 0 : 2)}`,
39
39
  };
@@ -1,4 +1,3 @@
1
- export declare const normalizeVersion: (version?: string) => string;
2
1
  export declare const removeBothEndsSlashes: (str?: string) => string;
3
2
  export declare const getPdfName: (lang: string, userBase?: string, title?: string) => string;
4
3
  export declare const DOC_PATTERN: RegExp;
@@ -1,5 +1,3 @@
1
- const PLAIN_VERSION_PATTERN = /^(\d+\.)*\d+$/;
2
- export const normalizeVersion = (version = '') => PLAIN_VERSION_PATTERN.test(version) ? `v${version}` : version;
3
1
  export const removeBothEndsSlashes = (str) => str?.replace(/^\/|\/$/g, '') || '';
4
2
  export const getPdfName = (lang, userBase, title) => `${removeBothEndsSlashes(userBase) || title || 'exported'}-${lang}.pdf`;
5
3
  export const DOC_PATTERN = /\.mdx?$/;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alauda/doom",
3
- "version": "0.14.15",
3
+ "version": "0.14.16",
4
4
  "type": "module",
5
5
  "description": "Doctor Doom making docs.",
6
6
  "repository": {
@@ -43,10 +43,10 @@
43
43
  "translate": "yarn doom translate fixture-docs"
44
44
  },
45
45
  "dependencies": {
46
- "@inquirer/prompts": "^7.3.3",
46
+ "@inquirer/prompts": "^7.4.0",
47
47
  "@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0",
48
48
  "@playwright/browser-chromium": "^1.51.0",
49
- "@rspress/core": "1.43.3",
49
+ "@rspress/core": "1.43.5",
50
50
  "@shikijs/transformers": "^3.2.1",
51
51
  "chokidar": "^4.0.3",
52
52
  "cli-progress": "^3.12.0",
@@ -56,7 +56,7 @@
56
56
  "es-toolkit": "^1.33.0",
57
57
  "fs-extra": "^11.3.0",
58
58
  "html-tag-names": "^2.1.0",
59
- "mermaid": "^11.4.1",
59
+ "mermaid": "^11.5.0",
60
60
  "openai": "^5.0.0-beta.0",
61
61
  "openapi-types": "^12.1.3",
62
62
  "p-ratelimit": "^1.0.1",
@@ -79,8 +79,8 @@
79
79
  },
80
80
  "devDependencies": {
81
81
  "@eslint/js": "^9.22.0",
82
- "@swc-node/register": "^1.10.9",
83
- "@swc/core": "1.11.8",
82
+ "@swc-node/register": "^1.10.10",
83
+ "@swc/core": "1.11.9",
84
84
  "@types/cli-progress": "^3.11.6",
85
85
  "@types/ejs": "^3.1.5",
86
86
  "@types/fs-extra": "^11.0.4",
@@ -91,7 +91,7 @@
91
91
  "@types/swagger2openapi": "^7.0.4",
92
92
  "@unts/patch-package": "^8.1.1",
93
93
  "eslint": "^9.22.0",
94
- "lint-staged": "^15.4.3",
94
+ "lint-staged": "^15.5.0",
95
95
  "npm-run-all2": "^7.0.2",
96
96
  "prettier": "^3.5.3",
97
97
  "prettier-plugin-pkg": "^0.18.1",