Commit 93572ff3 authored by jiaxu.yan's avatar jiaxu.yan

feat: 菜单修改

parent d84a03c8
> 1%
last 2 versions
not dead
not ie 11
const fs = require('fs');
const path = require('path');
const { execSync } = require('child_process');
const scopes = fs
.readdirSync(path.resolve(__dirname, 'src'), { withFileTypes: true })
.filter((dirent) => dirent.isDirectory())
.map((dirent) => dirent.name.replace(/s$/, ''));
// precomputed scope
const scopeComplete = execSync('git status --porcelain || true')
.toString()
.trim()
.split('\n')
.find((r) => ~r.indexOf('M src'))
?.replace(/(\/)/g, '%%')
?.match(/src%%((\w|-)*)/)?.[1]
?.replace(/s$/, '');
/** @type {import('cz-git').UserConfig} */
module.exports = {
ignores: [(commit) => commit.includes('init')],
extends: ['@commitlint/config-conventional'],
rules: {
'body-leading-blank': [2, 'always'],
'footer-leading-blank': [1, 'always'],
'header-max-length': [2, 'always', 108],
'subject-empty': [2, 'never'],
'type-empty': [2, 'never'],
'subject-case': [0],
'type-enum': [
2,
'always',
[
'feat',
'fix',
'perf',
'style',
'docs',
'test',
'refactor',
'build',
'ci',
'chore',
'revert',
'wip',
'workflow',
'types',
'release',
],
],
},
prompt: {
/** @use `pnpm commit :f` */
alias: {
f: 'docs: fix typos',
r: 'docs: update README',
s: 'style: update code format',
b: 'build: bump dependencies',
c: 'chore: update config',
},
customScopesAlign: !scopeComplete ? 'top' : 'bottom',
defaultScope: scopeComplete,
scopes: [...scopes, 'mock'],
allowEmptyIssuePrefixs: false,
allowCustomIssuePrefixs: false,
// English
typesAppend: [
{ value: 'wip', name: 'wip: work in process' },
{ value: 'workflow', name: 'workflow: workflow improvements' },
{ value: 'types', name: 'types: type definition file changes' },
],
// 中英文对照版
// messages: {
// type: '选择你要提交的类型 :',
// scope: '选择一个提交范围 (可选):',
// customScope: '请输入自定义的提交范围 :',
// subject: '填写简短精炼的变更描述 :\n',
// body: '填写更加详细的变更描述 (可选)。使用 "|" 换行 :\n',
// breaking: '列举非兼容性重大的变更 (可选)。使用 "|" 换行 :\n',
// footerPrefixsSelect: '选择关联issue前缀 (可选):',
// customFooterPrefixs: '输入自定义issue前缀 :',
// footer: '列举关联issue (可选) 例如: #31, #I3244 :\n',
// confirmCommit: '是否提交或修改commit ?',
// },
// types: [
// { value: 'feat', name: 'feat: 新增功能' },
// { value: 'fix', name: 'fix: 修复缺陷' },
// { value: 'docs', name: 'docs: 文档变更' },
// { value: 'style', name: 'style: 代码格式' },
// { value: 'refactor', name: 'refactor: 代码重构' },
// { value: 'perf', name: 'perf: 性能优化' },
// { value: 'test', name: 'test: 添加疏漏测试或已有测试改动' },
// { value: 'build', name: 'build: 构建流程、外部依赖变更 (如升级 npm 包、修改打包配置等)' },
// { value: 'ci', name: 'ci: 修改 CI 配置、脚本' },
// { value: 'revert', name: 'revert: 回滚 commit' },
// { value: 'chore', name: 'chore: 对构建过程或辅助工具和库的更改 (不影响源文件、测试用例)' },
// { value: 'wip', name: 'wip: 正在开发中' },
// { value: 'workflow', name: 'workflow: 工作流程改进' },
// { value: 'types', name: 'types: 类型定义文件修改' },
// ],
// emptyScopesAlias: 'empty: 不填写',
// customScopesAlias: 'custom: 自定义',
},
};
node_modules/
dist/
.vscode/
# spa-title
VITE_GLOB_APP_TITLE = Vben Admin
# Whether to open mock
VITE_USE_MOCK = true
# public path
VITE_PUBLIC_PATH = /
# Whether to enable gzip or brotli compression
# Optional: gzip | brotli | none
# If you need multiple forms, you can use `,` to separate
VITE_BUILD_COMPRESS = 'none'
# Basic interface address SPA
VITE_GLOB_API_URL = /basic-api
# File upload address, optional
# It can be forwarded by nginx or write the actual address directly
VITE_GLOB_UPLOAD_URL = /upload
# Interface prefix
VITE_GLOB_API_URL_PREFIX =
VITE_ENABLE_ANALYZE = true
# Whether to open mock
VITE_USE_MOCK = true
# public path
VITE_PUBLIC_PATH = /
# Basic interface address SPA
VITE_GLOB_API_URL = /basic-api
# File upload address, optional
VITE_GLOB_UPLOAD_URL = /upload
# Interface prefix
VITE_GLOB_API_URL_PREFIX =
# Whether to open mock
VITE_USE_MOCK = false
# public path
VITE_PUBLIC_PATH = /
# timeout(seconds)
VITE_TIMEOUT = 15
# Delete console
VITE_DROP_CONSOLE = true
# Whether to enable gzip or brotli compression
# Optional: gzip | brotli | none
# If you need multiple forms, you can use `,` to separate
VITE_BUILD_COMPRESS = 'none'
VITE_GLOB_API_URL = "__vg_base_url"
# File upload address, optional
# It can be forwarded by nginx or write the actual address directly
VITE_GLOB_UPLOAD_URL = /files/upload
# Interface prefix
VITE_GLOB_API_URL_PREFIX =
# Whether to open mock
VITE_USE_MOCK = true
# public path
VITE_PUBLIC_PATH = /
# Whether to enable gzip or brotli compression
# Optional: gzip | brotli | none
# If you need multiple forms, you can use `,` to separate
VITE_BUILD_COMPRESS = 'none'
# Basic interface address SPA
VITE_GLOB_API_URL = /basic-api
# File upload address, optional
# It can be forwarded by nginx or write the actual address directly
VITE_GLOB_UPLOAD_URL = /upload
# Interface prefix
VITE_GLOB_API_URL_PREFIX =
NODE_ENV = production
# Whether to open mock
VITE_USE_MOCK = true
# public path
VITE_PUBLIC_PATH = /
# Whether to enable gzip or brotli compression
# Optional: gzip | brotli | none
# If you need multiple forms, you can use `,` to separate
VITE_BUILD_COMPRESS = 'none'
# Basic interface address SPA
VITE_GLOB_API_URL = /basic-api
# File upload address, optional
# It can be forwarded by nginx or write the actual address directly
VITE_GLOB_UPLOAD_URL = /upload
# Interface prefix
VITE_GLOB_API_URL_PREFIX =
*.sh
node_modules
*.md
*.woff
*.ttf
.vscode
.idea
dist
/public
/docs
.husky
.local
/bin
Dockerfile
package.json
module.exports = {
root: true,
extends: ['@vben'],
rules: {
'no-undef': 'off',
},
};
# https://docs.github.com/cn/get-started/getting-started-with-git/configuring-git-to-handle-line-endings
# Automatically normalize line endings (to LF) for all text-based files.
* text=auto eol=lf
# Declare files that will always have CRLF line endings on checkout.
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
# Denote all files that are truly binary and should not be modified.
*.{ico,png,jpg,jpeg,gif,webp,svg,woff,woff2} binary
\ No newline at end of file
node_modules
.DS_Store
dist
.cache
.turbo
tests/server/static
tests/server/static/upload
.local
# local env files
.env.local
.env.*.local
.eslintcache
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
# .vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
package-lock.json
pnpm-lock.yaml
.history
ports:
- port: 3344
onOpen: open-preview
tasks:
- init: pnpm install
command: pnpm run dev
public-hoist-pattern[]=husky
public-hoist-pattern[]=*eslint*
public-hoist-pattern[]=*prettier*
public-hoist-pattern[]=lint-staged
public-hoist-pattern[]=*stylelint*
public-hoist-pattern[]=@commitlint/cli
public-hoist-pattern[]=@vben/eslint-config
package-manager-strict=false
dist
.local
.output.js
node_modules
**/*.svg
**/*.sh
public
.npmrc
*-lock.yaml
module.exports = {
printWidth: 100,
semi: true,
vueIndentScriptAndStyle: true,
singleQuote: true,
trailingComma: 'all',
proseWrap: 'never',
htmlWhitespaceSensitivity: 'strict',
endOfLine: 'auto',
plugins: ['prettier-plugin-packagejson'],
overrides: [
{
files: '.*rc',
options: {
parser: 'json',
},
},
],
};
module.exports = {
root: true,
extends: ['@vben/stylelint-config'],
};
> @vben/eslint-config@1.0.0 stub /Users/yanjiaxu/紫光云/vue-vben-admin/internal/eslint-config > @vben/eslint-config@1.0.0 stub /Users/yanjiaxu/紫光云/web-progeam/internal/eslint-config
> pnpm unbuild --stub > pnpm unbuild --stub
ℹ Stubbing eslint-config ℹ Stubbing eslint-config
......
module.exports = require("/Users/yanjiaxu/紫光云/vue-vben-admin/node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/lib/index.js")(null, { module.exports = require("/Users/yanjiaxu/紫光云/web-progeam/node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/lib/index.js")(null, {
"esmResolve": true, "esmResolve": true,
"interopDefault": true, "interopDefault": true,
"alias": { "alias": {
"@vben/eslint-config": "/Users/yanjiaxu/紫光云/vue-vben-admin/internal/eslint-config" "@vben/eslint-config": "/Users/yanjiaxu/紫光云/web-progeam/internal/eslint-config"
} }
})("/Users/yanjiaxu/紫光云/vue-vben-admin/internal/eslint-config/src/index.ts") })("/Users/yanjiaxu/紫光云/web-progeam/internal/eslint-config/src/index.ts")
\ No newline at end of file \ No newline at end of file
export * from "/Users/yanjiaxu/紫光云/vue-vben-admin/internal/eslint-config/src/index"; export * from "/Users/yanjiaxu/紫光云/web-progeam/internal/eslint-config/src/index";
export { default } from "/Users/yanjiaxu/紫光云/vue-vben-admin/internal/eslint-config/src/index"; export { default } from "/Users/yanjiaxu/紫光云/web-progeam/internal/eslint-config/src/index";
\ No newline at end of file \ No newline at end of file
import jiti from "file:///Users/yanjiaxu/%E7%B4%AB%E5%85%89%E4%BA%91/vue-vben-admin/node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/lib/index.js"; import jiti from "file:///Users/yanjiaxu/%E7%B4%AB%E5%85%89%E4%BA%91/web-progeam/node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/lib/index.js";
/** @type {import("/Users/yanjiaxu/紫光云/vue-vben-admin/internal/eslint-config/src/index")} */ /** @type {import("/Users/yanjiaxu/紫光云/web-progeam/internal/eslint-config/src/index")} */
const _module = jiti(null, { const _module = jiti(null, {
"esmResolve": true, "esmResolve": true,
"interopDefault": true, "interopDefault": true,
"alias": { "alias": {
"@vben/eslint-config": "/Users/yanjiaxu/紫光云/vue-vben-admin/internal/eslint-config" "@vben/eslint-config": "/Users/yanjiaxu/紫光云/web-progeam/internal/eslint-config"
} }
})("/Users/yanjiaxu/紫光云/vue-vben-admin/internal/eslint-config/src/index.ts"); })("/Users/yanjiaxu/紫光云/web-progeam/internal/eslint-config/src/index.ts");
export default _module; export default _module;
\ No newline at end of file
module.exports = require("/Users/yanjiaxu/紫光云/vue-vben-admin/node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/lib/index.js")(null, { module.exports = require("/Users/yanjiaxu/紫光云/web-progeam/node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/lib/index.js")(null, {
"esmResolve": true, "esmResolve": true,
"interopDefault": true, "interopDefault": true,
"alias": { "alias": {
"@vben/eslint-config": "/Users/yanjiaxu/紫光云/vue-vben-admin/internal/eslint-config" "@vben/eslint-config": "/Users/yanjiaxu/紫光云/web-progeam/internal/eslint-config"
} }
})("/Users/yanjiaxu/紫光云/vue-vben-admin/internal/eslint-config/src/strict.ts") })("/Users/yanjiaxu/紫光云/web-progeam/internal/eslint-config/src/strict.ts")
\ No newline at end of file \ No newline at end of file
export * from "/Users/yanjiaxu/紫光云/vue-vben-admin/internal/eslint-config/src/strict"; export * from "/Users/yanjiaxu/紫光云/web-progeam/internal/eslint-config/src/strict";
export { default } from "/Users/yanjiaxu/紫光云/vue-vben-admin/internal/eslint-config/src/strict"; export { default } from "/Users/yanjiaxu/紫光云/web-progeam/internal/eslint-config/src/strict";
\ No newline at end of file \ No newline at end of file
import jiti from "file:///Users/yanjiaxu/%E7%B4%AB%E5%85%89%E4%BA%91/vue-vben-admin/node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/lib/index.js"; import jiti from "file:///Users/yanjiaxu/%E7%B4%AB%E5%85%89%E4%BA%91/web-progeam/node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/lib/index.js";
/** @type {import("/Users/yanjiaxu/紫光云/vue-vben-admin/internal/eslint-config/src/strict")} */ /** @type {import("/Users/yanjiaxu/紫光云/web-progeam/internal/eslint-config/src/strict")} */
const _module = jiti(null, { const _module = jiti(null, {
"esmResolve": true, "esmResolve": true,
"interopDefault": true, "interopDefault": true,
"alias": { "alias": {
"@vben/eslint-config": "/Users/yanjiaxu/紫光云/vue-vben-admin/internal/eslint-config" "@vben/eslint-config": "/Users/yanjiaxu/紫光云/web-progeam/internal/eslint-config"
} }
})("/Users/yanjiaxu/紫光云/vue-vben-admin/internal/eslint-config/src/strict.ts"); })("/Users/yanjiaxu/紫光云/web-progeam/internal/eslint-config/src/strict.ts");
export default _module; export default _module;
\ No newline at end of file
> @vben/stylelint-config@1.0.0 stub /Users/yanjiaxu/紫光云/vue-vben-admin/internal/stylelint-config > @vben/stylelint-config@1.0.0 stub /Users/yanjiaxu/紫光云/web-progeam/internal/stylelint-config
> pnpm unbuild --stub > pnpm unbuild --stub
ℹ Stubbing stylelint-config ℹ Stubbing stylelint-config
......
module.exports = require("/Users/yanjiaxu/紫光云/vue-vben-admin/node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/lib/index.js")(null, { module.exports = require("/Users/yanjiaxu/紫光云/web-progeam/node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/lib/index.js")(null, {
"esmResolve": true, "esmResolve": true,
"interopDefault": true, "interopDefault": true,
"alias": { "alias": {
"@vben/stylelint-config": "/Users/yanjiaxu/紫光云/vue-vben-admin/internal/stylelint-config" "@vben/stylelint-config": "/Users/yanjiaxu/紫光云/web-progeam/internal/stylelint-config"
} }
})("/Users/yanjiaxu/紫光云/vue-vben-admin/internal/stylelint-config/src/index.ts") })("/Users/yanjiaxu/紫光云/web-progeam/internal/stylelint-config/src/index.ts")
\ No newline at end of file \ No newline at end of file
export * from "/Users/yanjiaxu/紫光云/vue-vben-admin/internal/stylelint-config/src/index"; export * from "/Users/yanjiaxu/紫光云/web-progeam/internal/stylelint-config/src/index";
export { default } from "/Users/yanjiaxu/紫光云/vue-vben-admin/internal/stylelint-config/src/index"; export { default } from "/Users/yanjiaxu/紫光云/web-progeam/internal/stylelint-config/src/index";
\ No newline at end of file \ No newline at end of file
import jiti from "file:///Users/yanjiaxu/%E7%B4%AB%E5%85%89%E4%BA%91/vue-vben-admin/node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/lib/index.js"; import jiti from "file:///Users/yanjiaxu/%E7%B4%AB%E5%85%89%E4%BA%91/web-progeam/node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/lib/index.js";
/** @type {import("/Users/yanjiaxu/紫光云/vue-vben-admin/internal/stylelint-config/src/index")} */ /** @type {import("/Users/yanjiaxu/紫光云/web-progeam/internal/stylelint-config/src/index")} */
const _module = jiti(null, { const _module = jiti(null, {
"esmResolve": true, "esmResolve": true,
"interopDefault": true, "interopDefault": true,
"alias": { "alias": {
"@vben/stylelint-config": "/Users/yanjiaxu/紫光云/vue-vben-admin/internal/stylelint-config" "@vben/stylelint-config": "/Users/yanjiaxu/紫光云/web-progeam/internal/stylelint-config"
} }
})("/Users/yanjiaxu/紫光云/vue-vben-admin/internal/stylelint-config/src/index.ts"); })("/Users/yanjiaxu/紫光云/web-progeam/internal/stylelint-config/src/index.ts");
export default _module; export default _module;
\ No newline at end of file
> @vben/vite-config@1.0.0 stub /Users/yanjiaxu/紫光云/vue-vben-admin/internal/vite-config > @vben/vite-config@1.0.0 stub /Users/yanjiaxu/紫光云/web-progeam/internal/vite-config
> pnpm unbuild --stub > pnpm unbuild --stub
ℹ Stubbing vite-config ℹ Stubbing vite-config
......
module.exports = require("/Users/yanjiaxu/紫光云/vue-vben-admin/node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/lib/index.js")(null, { module.exports = require("/Users/yanjiaxu/紫光云/web-progeam/node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/lib/index.js")(null, {
"esmResolve": true, "esmResolve": true,
"interopDefault": true, "interopDefault": true,
"alias": { "alias": {
"@vben/vite-config": "/Users/yanjiaxu/紫光云/vue-vben-admin/internal/vite-config" "@vben/vite-config": "/Users/yanjiaxu/紫光云/web-progeam/internal/vite-config"
} }
})("/Users/yanjiaxu/紫光云/vue-vben-admin/internal/vite-config/src/index.ts") })("/Users/yanjiaxu/紫光云/web-progeam/internal/vite-config/src/index.ts")
\ No newline at end of file \ No newline at end of file
export * from "/Users/yanjiaxu/紫光云/vue-vben-admin/internal/vite-config/src/index"; export * from "/Users/yanjiaxu/紫光云/web-progeam/internal/vite-config/src/index";
import jiti from "file:///Users/yanjiaxu/%E7%B4%AB%E5%85%89%E4%BA%91/vue-vben-admin/node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/lib/index.js"; import jiti from "file:///Users/yanjiaxu/%E7%B4%AB%E5%85%89%E4%BA%91/web-progeam/node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/lib/index.js";
/** @type {import("/Users/yanjiaxu/紫光云/vue-vben-admin/internal/vite-config/src/index")} */ /** @type {import("/Users/yanjiaxu/紫光云/web-progeam/internal/vite-config/src/index")} */
const _module = jiti(null, { const _module = jiti(null, {
"esmResolve": true, "esmResolve": true,
"interopDefault": true, "interopDefault": true,
"alias": { "alias": {
"@vben/vite-config": "/Users/yanjiaxu/紫光云/vue-vben-admin/internal/vite-config" "@vben/vite-config": "/Users/yanjiaxu/紫光云/web-progeam/internal/vite-config"
} }
})("/Users/yanjiaxu/紫光云/vue-vben-admin/internal/vite-config/src/index.ts"); })("/Users/yanjiaxu/紫光云/web-progeam/internal/vite-config/src/index.ts");
export const defineApplicationConfig = _module.defineApplicationConfig; export const defineApplicationConfig = _module.defineApplicationConfig;
export const definePackageConfig = _module.definePackageConfig; export const definePackageConfig = _module.definePackageConfig;
\ No newline at end of file
"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.modifierNames = exports.foregroundColorNames = exports.default = exports.colorNames = exports.backgroundColorNames = void 0;const ANSI_BACKGROUND_OFFSET = 10;
const wrapAnsi16 = (offset = 0) => (code) => `\u001B[${code + offset}m`;
const wrapAnsi256 = (offset = 0) => (code) => `\u001B[${38 + offset};5;${code}m`;
const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
const styles = {
modifier: {
reset: [0, 0],
// 21 isn't widely supported and 22 does the same thing
bold: [1, 22],
dim: [2, 22],
italic: [3, 23],
underline: [4, 24],
overline: [53, 55],
inverse: [7, 27],
hidden: [8, 28],
strikethrough: [9, 29]
},
color: {
black: [30, 39],
red: [31, 39],
green: [32, 39],
yellow: [33, 39],
blue: [34, 39],
magenta: [35, 39],
cyan: [36, 39],
white: [37, 39],
// Bright color
blackBright: [90, 39],
gray: [90, 39], // Alias of `blackBright`
grey: [90, 39], // Alias of `blackBright`
redBright: [91, 39],
greenBright: [92, 39],
yellowBright: [93, 39],
blueBright: [94, 39],
magentaBright: [95, 39],
cyanBright: [96, 39],
whiteBright: [97, 39]
},
bgColor: {
bgBlack: [40, 49],
bgRed: [41, 49],
bgGreen: [42, 49],
bgYellow: [43, 49],
bgBlue: [44, 49],
bgMagenta: [45, 49],
bgCyan: [46, 49],
bgWhite: [47, 49],
// Bright color
bgBlackBright: [100, 49],
bgGray: [100, 49], // Alias of `bgBlackBright`
bgGrey: [100, 49], // Alias of `bgBlackBright`
bgRedBright: [101, 49],
bgGreenBright: [102, 49],
bgYellowBright: [103, 49],
bgBlueBright: [104, 49],
bgMagentaBright: [105, 49],
bgCyanBright: [106, 49],
bgWhiteBright: [107, 49]
}
};
const modifierNames = exports.modifierNames = Object.keys(styles.modifier);
const foregroundColorNames = exports.foregroundColorNames = Object.keys(styles.color);
const backgroundColorNames = exports.backgroundColorNames = Object.keys(styles.bgColor);
const colorNames = exports.colorNames = [...foregroundColorNames, ...backgroundColorNames];
function assembleStyles() {
const codes = new Map();
for (const [groupName, group] of Object.entries(styles)) {
for (const [styleName, style] of Object.entries(group)) {
styles[styleName] = {
open: `\u001B[${style[0]}m`,
close: `\u001B[${style[1]}m`
};
group[styleName] = styles[styleName];
codes.set(style[0], style[1]);
}
Object.defineProperty(styles, groupName, {
value: group,
enumerable: false
});
}
Object.defineProperty(styles, 'codes', {
value: codes,
enumerable: false
});
styles.color.close = '\u001B[39m';
styles.bgColor.close = '\u001B[49m';
styles.color.ansi = wrapAnsi16();
styles.color.ansi256 = wrapAnsi256();
styles.color.ansi16m = wrapAnsi16m();
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js
Object.defineProperties(styles, {
rgbToAnsi256: {
value(red, green, blue) {
// We use the extended greyscale palette here, with the exception of
// black and white. normal palette only has 4 greyscale shades.
if (red === green && green === blue) {
if (red < 8) {
return 16;
}
if (red > 248) {
return 231;
}
return Math.round((red - 8) / 247 * 24) + 232;
}
return 16 +
36 * Math.round(red / 255 * 5) +
6 * Math.round(green / 255 * 5) +
Math.round(blue / 255 * 5);
},
enumerable: false
},
hexToRgb: {
value(hex) {
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
if (!matches) {
return [0, 0, 0];
}
let [colorString] = matches;
if (colorString.length === 3) {
colorString = [...colorString].map((character) => character + character).join('');
}
const integer = Number.parseInt(colorString, 16);
return [
/* eslint-disable no-bitwise */
integer >> 16 & 0xFF,
integer >> 8 & 0xFF,
integer & 0xFF
/* eslint-enable no-bitwise */];
},
enumerable: false
},
hexToAnsi256: {
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
enumerable: false
},
ansi256ToAnsi: {
value(code) {
if (code < 8) {
return 30 + code;
}
if (code < 16) {
return 90 + (code - 8);
}
let red;
let green;
let blue;
if (code >= 232) {
red = ((code - 232) * 10 + 8) / 255;
green = red;
blue = red;
} else {
code -= 16;
const remainder = code % 36;
red = Math.floor(code / 36) / 5;
green = Math.floor(remainder / 6) / 5;
blue = remainder % 6 / 5;
}
const value = Math.max(red, green, blue) * 2;
if (value === 0) {
return 30;
}
// eslint-disable-next-line no-bitwise
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
if (value === 2) {
result += 60;
}
return result;
},
enumerable: false
},
rgbToAnsi: {
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
enumerable: false
},
hexToAnsi: {
value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
enumerable: false
}
});
return styles;
}
const ansiStyles = assembleStyles();var _default = exports.default =
ansiStyles; /* v7-28b0a5febe3644a0 */
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _unbuild = require("unbuild");var _default = exports.default =
(0, _unbuild.defineBuildConfig)({
clean: true,
entries: ['src/index', 'src/strict'],
declaration: true,
rollup: {
emitCJS: true
}
}); /* v7-3111e0eb06a3fb7d */
\ No newline at end of file
"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.isIgnoredByIgnoreFilesSync = exports.isIgnoredByIgnoreFiles = exports.isGitIgnoredSync = exports.isGitIgnored = exports.GITIGNORE_FILES_PATTERN = void 0;var _nodeProcess = _interopRequireDefault(require("node:process"));
var _nodeFs = _interopRequireDefault(require("node:fs"));
var _nodePath = _interopRequireDefault(require("node:path"));
var _fastGlob = _interopRequireDefault(require("fast-glob"));
var _ignore = _interopRequireDefault(require("ignore"));
var _slash = _interopRequireDefault(require("slash"));
var _utilities = require("./utilities.js");function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
const ignoreFilesGlobOptions = {
ignore: [
'**/node_modules',
'**/flow-typed',
'**/coverage',
'**/.git'],
absolute: true,
dot: true
};
const GITIGNORE_FILES_PATTERN = exports.GITIGNORE_FILES_PATTERN = '**/.gitignore';
const applyBaseToPattern = (pattern, base) => (0, _utilities.isNegativePattern)(pattern) ?
'!' + _nodePath.default.posix.join(base, pattern.slice(1)) :
_nodePath.default.posix.join(base, pattern);
const parseIgnoreFile = (file, cwd) => {
const base = (0, _slash.default)(_nodePath.default.relative(cwd, _nodePath.default.dirname(file.filePath)));
return file.content.
split(/\r?\n/).
filter((line) => line && !line.startsWith('#')).
map((pattern) => applyBaseToPattern(pattern, base));
};
const toRelativePath = (fileOrDirectory, cwd) => {
cwd = (0, _slash.default)(cwd);
if (_nodePath.default.isAbsolute(fileOrDirectory)) {
if ((0, _slash.default)(fileOrDirectory).startsWith(cwd)) {
return _nodePath.default.relative(cwd, fileOrDirectory);
}
throw new Error(`Path ${fileOrDirectory} is not in cwd ${cwd}`);
}
return fileOrDirectory;
};
const getIsIgnoredPredicate = (files, cwd) => {
const patterns = files.flatMap((file) => parseIgnoreFile(file, cwd));
const ignores = (0, _ignore.default)().add(patterns);
return (fileOrDirectory) => {
fileOrDirectory = (0, _utilities.toPath)(fileOrDirectory);
fileOrDirectory = toRelativePath(fileOrDirectory, cwd);
return fileOrDirectory ? ignores.ignores((0, _slash.default)(fileOrDirectory)) : false;
};
};
const normalizeOptions = (options = {}) => ({
cwd: (0, _utilities.toPath)(options.cwd) || _nodeProcess.default.cwd(),
suppressErrors: Boolean(options.suppressErrors),
deep: typeof options.deep === 'number' ? options.deep : Number.POSITIVE_INFINITY
});
const isIgnoredByIgnoreFiles = async (patterns, options) => {
const { cwd, suppressErrors, deep } = normalizeOptions(options);
const paths = await (0, _fastGlob.default)(patterns, { cwd, suppressErrors, deep, ...ignoreFilesGlobOptions });
const files = await Promise.all(
paths.map(async (filePath) => ({
filePath,
content: await _nodeFs.default.promises.readFile(filePath, 'utf8')
}))
);
return getIsIgnoredPredicate(files, cwd);
};exports.isIgnoredByIgnoreFiles = isIgnoredByIgnoreFiles;
const isIgnoredByIgnoreFilesSync = (patterns, options) => {
const { cwd, suppressErrors, deep } = normalizeOptions(options);
const paths = _fastGlob.default.sync(patterns, { cwd, suppressErrors, deep, ...ignoreFilesGlobOptions });
const files = paths.map((filePath) => ({
filePath,
content: _nodeFs.default.readFileSync(filePath, 'utf8')
}));
return getIsIgnoredPredicate(files, cwd);
};exports.isIgnoredByIgnoreFilesSync = isIgnoredByIgnoreFilesSync;
const isGitIgnored = (options) => isIgnoredByIgnoreFiles(GITIGNORE_FILES_PATTERN, options);exports.isGitIgnored = isGitIgnored;
const isGitIgnoredSync = (options) => isIgnoredByIgnoreFilesSync(GITIGNORE_FILES_PATTERN, options);exports.isGitIgnoredSync = isGitIgnoredSync; /* v7-0eff28242bf3ace2 */
\ No newline at end of file
"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.isDynamicPattern = exports.globbySync = exports.globbyStream = exports.globby = exports.generateGlobTasksSync = exports.generateGlobTasks = void 0;Object.defineProperty(exports, "isGitIgnored", { enumerable: true, get: function () {return _ignore.isGitIgnored;} });Object.defineProperty(exports, "isGitIgnoredSync", { enumerable: true, get: function () {return _ignore.isGitIgnoredSync;} });var _nodeFs = _interopRequireDefault(require("node:fs"));
var _nodePath = _interopRequireDefault(require("node:path"));
var _merge = _interopRequireDefault(require("merge2"));
var _fastGlob = _interopRequireDefault(require("fast-glob"));
var _dirGlob = _interopRequireDefault(require("dir-glob"));
var _ignore = require("./ignore.js");
var _utilities = require("./utilities.js");function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
const assertPatternsInput = (patterns) => {
if (patterns.some((pattern) => typeof pattern !== 'string')) {
throw new TypeError('Patterns must be a string or an array of strings');
}
};
const toPatternsArray = (patterns) => {
patterns = [...new Set([patterns].flat())];
assertPatternsInput(patterns);
return patterns;
};
const checkCwdOption = (options) => {
if (!options.cwd) {
return;
}
let stat;
try {
stat = _nodeFs.default.statSync(options.cwd);
} catch {
return;
}
if (!stat.isDirectory()) {
throw new Error('The `cwd` option must be a path to a directory');
}
};
const normalizeOptions = (options = {}) => {
options = {
...options,
ignore: options.ignore || [],
expandDirectories: options.expandDirectories === undefined ?
true :
options.expandDirectories,
cwd: (0, _utilities.toPath)(options.cwd)
};
checkCwdOption(options);
return options;
};
const normalizeArguments = (fn) => async (patterns, options) => fn(toPatternsArray(patterns), normalizeOptions(options));
const normalizeArgumentsSync = (fn) => (patterns, options) => fn(toPatternsArray(patterns), normalizeOptions(options));
const getIgnoreFilesPatterns = (options) => {
const { ignoreFiles, gitignore } = options;
const patterns = ignoreFiles ? toPatternsArray(ignoreFiles) : [];
if (gitignore) {
patterns.push(_ignore.GITIGNORE_FILES_PATTERN);
}
return patterns;
};
const getFilter = async (options) => {
const ignoreFilesPatterns = getIgnoreFilesPatterns(options);
return createFilterFunction(
ignoreFilesPatterns.length > 0 && (await (0, _ignore.isIgnoredByIgnoreFiles)(ignoreFilesPatterns, options))
);
};
const getFilterSync = (options) => {
const ignoreFilesPatterns = getIgnoreFilesPatterns(options);
return createFilterFunction(
ignoreFilesPatterns.length > 0 && (0, _ignore.isIgnoredByIgnoreFilesSync)(ignoreFilesPatterns, options)
);
};
const createFilterFunction = (isIgnored) => {
const seen = new Set();
return (fastGlobResult) => {
const path = fastGlobResult.path || fastGlobResult;
const pathKey = _nodePath.default.normalize(path);
const seenOrIgnored = seen.has(pathKey) || isIgnored && isIgnored(path);
seen.add(pathKey);
return !seenOrIgnored;
};
};
const unionFastGlobResults = (results, filter) => results.flat().filter((fastGlobResult) => filter(fastGlobResult));
const unionFastGlobStreams = (streams, filter) => (0, _merge.default)(streams).pipe(new _utilities.FilterStream((fastGlobResult) => filter(fastGlobResult)));
const convertNegativePatterns = (patterns, options) => {
const tasks = [];
while (patterns.length > 0) {
const index = patterns.findIndex((pattern) => (0, _utilities.isNegativePattern)(pattern));
if (index === -1) {
tasks.push({ patterns, options });
break;
}
const ignorePattern = patterns[index].slice(1);
for (const task of tasks) {
task.options.ignore.push(ignorePattern);
}
if (index !== 0) {
tasks.push({
patterns: patterns.slice(0, index),
options: {
...options,
ignore: [
...options.ignore,
ignorePattern]
}
});
}
patterns = patterns.slice(index + 1);
}
return tasks;
};
const getDirGlobOptions = (options, cwd) => ({
...(cwd ? { cwd } : {}),
...(Array.isArray(options) ? { files: options } : options)
});
const generateTasks = async (patterns, options) => {
const globTasks = convertNegativePatterns(patterns, options);
const { cwd, expandDirectories } = options;
if (!expandDirectories) {
return globTasks;
}
const patternExpandOptions = getDirGlobOptions(expandDirectories, cwd);
const ignoreExpandOptions = cwd ? { cwd } : undefined;
return Promise.all(
globTasks.map(async (task) => {
let { patterns, options } = task;
[
patterns,
options.ignore] =
await Promise.all([
(0, _dirGlob.default)(patterns, patternExpandOptions),
(0, _dirGlob.default)(options.ignore, ignoreExpandOptions)]
);
return { patterns, options };
})
);
};
const generateTasksSync = (patterns, options) => {
const globTasks = convertNegativePatterns(patterns, options);
const { cwd, expandDirectories } = options;
if (!expandDirectories) {
return globTasks;
}
const patternExpandOptions = getDirGlobOptions(expandDirectories, cwd);
const ignoreExpandOptions = cwd ? { cwd } : undefined;
return globTasks.map((task) => {
let { patterns, options } = task;
patterns = _dirGlob.default.sync(patterns, patternExpandOptions);
options.ignore = _dirGlob.default.sync(options.ignore, ignoreExpandOptions);
return { patterns, options };
});
};
const globby = exports.globby = normalizeArguments(async (patterns, options) => {
const [
tasks,
filter] =
await Promise.all([
generateTasks(patterns, options),
getFilter(options)]
);
const results = await Promise.all(tasks.map((task) => (0, _fastGlob.default)(task.patterns, task.options)));
return unionFastGlobResults(results, filter);
});
const globbySync = exports.globbySync = normalizeArgumentsSync((patterns, options) => {
const tasks = generateTasksSync(patterns, options);
const filter = getFilterSync(options);
const results = tasks.map((task) => _fastGlob.default.sync(task.patterns, task.options));
return unionFastGlobResults(results, filter);
});
const globbyStream = exports.globbyStream = normalizeArgumentsSync((patterns, options) => {
const tasks = generateTasksSync(patterns, options);
const filter = getFilterSync(options);
const streams = tasks.map((task) => _fastGlob.default.stream(task.patterns, task.options));
return unionFastGlobStreams(streams, filter);
});
const isDynamicPattern = exports.isDynamicPattern = normalizeArgumentsSync(
(patterns, options) => patterns.some((pattern) => _fastGlob.default.isDynamicPattern(pattern, options))
);
const generateGlobTasks = exports.generateGlobTasks = normalizeArguments(generateTasks);
const generateGlobTasksSync = exports.generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync); /* v7-5fbae7b710226867 */
\ No newline at end of file
"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.toPath = exports.isNegativePattern = exports.FilterStream = void 0;var _nodeUrl = require("node:url");
var _nodeStream = require("node:stream");
const toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, _nodeUrl.fileURLToPath)(urlOrPath) : urlOrPath;exports.toPath = toPath;
class FilterStream extends _nodeStream.Transform {
constructor(filter) {
super({
objectMode: true,
transform(data, encoding, callback) {
callback(undefined, filter(data) ? data : undefined);
}
});
}
}exports.FilterStream = FilterStream;
const isNegativePattern = (pattern) => pattern[0] === '!';exports.isNegativePattern = isNegativePattern; /* v7-259a918aa3543465 */
\ No newline at end of file
"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.default = prettyBytes;const BYTE_UNITS = [
'B',
'kB',
'MB',
'GB',
'TB',
'PB',
'EB',
'ZB',
'YB'];
const BIBYTE_UNITS = [
'B',
'KiB',
'MiB',
'GiB',
'TiB',
'PiB',
'EiB',
'ZiB',
'YiB'];
const BIT_UNITS = [
'b',
'kbit',
'Mbit',
'Gbit',
'Tbit',
'Pbit',
'Ebit',
'Zbit',
'Ybit'];
const BIBIT_UNITS = [
'b',
'kibit',
'Mibit',
'Gibit',
'Tibit',
'Pibit',
'Eibit',
'Zibit',
'Yibit'];
/*
Formats the given number using `Number#toLocaleString`.
- If locale is a string, the value is expected to be a locale-key (for example: `de`).
- If locale is true, the system default locale is used for translation.
- If no value for locale is specified, the number is returned unmodified.
*/
const toLocaleString = (number, locale, options) => {
let result = number;
if (typeof locale === 'string' || Array.isArray(locale)) {
result = number.toLocaleString(locale, options);
} else if (locale === true || options !== undefined) {
result = number.toLocaleString(undefined, options);
}
return result;
};
function prettyBytes(number, options) {
if (!Number.isFinite(number)) {
throw new TypeError(`Expected a finite number, got ${typeof number}: ${number}`);
}
options = {
bits: false,
binary: false,
space: true,
...options
};
const UNITS = options.bits ?
options.binary ? BIBIT_UNITS : BIT_UNITS :
options.binary ? BIBYTE_UNITS : BYTE_UNITS;
const separator = options.space ? ' ' : '';
if (options.signed && number === 0) {
return ` 0${separator}${UNITS[0]}`;
}
const isNegative = number < 0;
const prefix = isNegative ? '-' : options.signed ? '+' : '';
if (isNegative) {
number = -number;
}
let localeOptions;
if (options.minimumFractionDigits !== undefined) {
localeOptions = { minimumFractionDigits: options.minimumFractionDigits };
}
if (options.maximumFractionDigits !== undefined) {
localeOptions = { maximumFractionDigits: options.maximumFractionDigits, ...localeOptions };
}
if (number < 1) {
const numberString = toLocaleString(number, options.locale, localeOptions);
return prefix + numberString + separator + UNITS[0];
}
const exponent = Math.min(Math.floor(options.binary ? Math.log(number) / Math.log(1024) : Math.log10(number) / 3), UNITS.length - 1);
number /= (options.binary ? 1024 : 1000) ** exponent;
if (!localeOptions) {
number = number.toPrecision(3);
}
const numberString = toLocaleString(Number(number), options.locale, localeOptions);
const unit = UNITS[exponent];
return prefix + numberString + separator + unit;
} /* v7-a4da9a491bb897bd */
\ No newline at end of file
"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.default = slash;function slash(path) {
const isExtendedLengthPath = /^\\\\\?\\/.test(path);
const hasNonAscii = /[^\u0000-\u0080]+/.test(path); // eslint-disable-line no-control-regex
if (isExtendedLengthPath || hasNonAscii) {
return path;
}
return path.replace(/\\/g, '/');
} /* v7-56da1c6249207534 */
\ No newline at end of file
This diff is collapsed.
"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.stringEncaseCRLFWithFirstIndex = stringEncaseCRLFWithFirstIndex;exports.stringReplaceAll = stringReplaceAll; // TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.
function stringReplaceAll(string, substring, replacer) {
let index = string.indexOf(substring);
if (index === -1) {
return string;
}
const substringLength = substring.length;
let endIndex = 0;
let returnValue = '';
do {
returnValue += string.slice(endIndex, index) + substring + replacer;
endIndex = index + substringLength;
index = string.indexOf(substring, endIndex);
} while (index !== -1);
returnValue += string.slice(endIndex);
return returnValue;
}
function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
let endIndex = 0;
let returnValue = '';
do {
const gotCR = string[index - 1] === '\r';
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? '\r\n' : '\n') + postfix;
endIndex = index + 1;
index = string.indexOf('\n', endIndex);
} while (index !== -1);
returnValue += string.slice(endIndex);
return returnValue;
} /* v7-255e1aba69efb0ea */
\ No newline at end of file
"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _unbuild = require("unbuild");var _default = exports.default =
(0, _unbuild.defineBuildConfig)({
clean: true,
entries: ['src/index'],
declaration: true,
rollup: {
emitCJS: true
}
}); /* v7-e617738d05bbbbdb */
\ No newline at end of file
This diff is collapsed.
"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _unbuild = require("unbuild");var _default = exports.default =
(0, _unbuild.defineBuildConfig)({
clean: true,
entries: ['src/index'],
declaration: true,
rollup: {
emitCJS: true
}
}); /* v7-e617738d05bbbbdb */
\ No newline at end of file
import type { AppRouteModule } from '@/router/types'; import type { AppRouteModule } from '@/router/types';
import { LAYOUT } from '@/router/constant'; import { LAYOUT } from '@/router/constant';
import { t } from '@/hooks/web/useI18n';
const steps: AppRouteModule = { const biddingManagement: AppRouteModule = {
path: '/steps', path: '/biddingManagement',
name: 'StepsDemo', name: 'BiddingManagement',
component: LAYOUT, component: LAYOUT,
redirect: '/steps/index', redirect: '/biddingManagement/index',
meta: { meta: {
orderNo: 90000,
hideChildrenInMenu: true, hideChildrenInMenu: true,
icon: 'whh:paintroll', icon: '',
title: t('routes.demo.steps.page'), orderNo: 3,
title: '招标管理',
}, },
children: [ children: [
{ {
path: 'index', path: 'index',
name: 'StepsDemoPage', name: 'biddingManagement',
component: () => import('@/views/demo/steps/index.vue'), component: () => import('@/views/dashboard/analysis/index.vue'),
meta: { meta: {
title: t('routes.demo.steps.page'), // affix: true,
icon: 'whh:paintroll', title: '招标管理',
hideMenu: true, orderNo: 3,
}, },
}, },
], ],
}; };
export default steps; export default biddingManagement;
import type { AppRouteModule } from '@/router/types';
import { LAYOUT } from '@/router/constant';
const changeSignature: AppRouteModule = {
path: '/changeSignature',
name: 'changeSignature',
component: LAYOUT,
redirect: '/changeSignature/index',
meta: {
hideChildrenInMenu: true,
icon: '',
orderNo: 5,
title: '变更签证管理',
},
children: [
{
path: 'index',
name: 'changeSignature',
component: () => import('@/views/dashboard/analysis/index.vue'),
meta: {
// affix: true,
title: '变更签证管理',
orderNo: 5,
},
},
],
};
export default changeSignature;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment