主要功能: - 修改RequirementModal支持12个订单班选择 - 添加OrderClassIconMap图标映射组件 - Store中添加selectedOrderClass状态管理 - WorkflowPage支持传递orderClass参数 - web_result添加URL参数切换功能 - 创建order-class-handler.js动态处理页面主题 技术改进: - 创建软链接关联订单班数据目录 - 生成wenlu.json和food.json数据结构 - 删除重复的web_result目录 - 添加测试页面test-order-class.html 影响范围: - 展会策划系统现支持12个订单班 - 结果展示页面自动适配不同订单班主题 - 用户可选择不同行业生成对应方案 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
139 lines
3.7 KiB
TypeScript
139 lines
3.7 KiB
TypeScript
/* eslint-disable @typescript-eslint/unified-signatures */
|
|
import {Options as LocatePathOptions} from 'locate-path';
|
|
|
|
declare const stop: unique symbol;
|
|
|
|
declare namespace findUp {
|
|
interface Options extends LocatePathOptions {}
|
|
|
|
type StopSymbol = typeof stop;
|
|
|
|
type Match = string | StopSymbol | undefined;
|
|
}
|
|
|
|
declare const findUp: {
|
|
sync: {
|
|
/**
|
|
Synchronously check if a path exists.
|
|
|
|
@param path - Path to the file or directory.
|
|
@returns Whether the path exists.
|
|
|
|
@example
|
|
```
|
|
import findUp = require('find-up');
|
|
|
|
console.log(findUp.sync.exists('/Users/sindresorhus/unicorn.png'));
|
|
//=> true
|
|
```
|
|
*/
|
|
exists: (path: string) => boolean;
|
|
|
|
/**
|
|
Synchronously find a file or directory by walking up parent directories.
|
|
|
|
@param name - Name of the file or directory to find. Can be multiple.
|
|
@returns The first path found (by respecting the order of `name`s) or `undefined` if none could be found.
|
|
*/
|
|
(name: string | readonly string[], options?: findUp.Options): string | undefined;
|
|
|
|
/**
|
|
Synchronously find a file or directory by walking up parent directories.
|
|
|
|
@param matcher - Called for each directory in the search. Return a path or `findUp.stop` to stop the search.
|
|
@returns The first path found or `undefined` if none could be found.
|
|
|
|
@example
|
|
```
|
|
import path = require('path');
|
|
import findUp = require('find-up');
|
|
|
|
console.log(findUp.sync(directory => {
|
|
const hasUnicorns = findUp.sync.exists(path.join(directory, 'unicorn.png'));
|
|
return hasUnicorns && directory;
|
|
}, {type: 'directory'}));
|
|
//=> '/Users/sindresorhus'
|
|
```
|
|
*/
|
|
(matcher: (directory: string) => findUp.Match, options?: findUp.Options): string | undefined;
|
|
};
|
|
|
|
/**
|
|
Check if a path exists.
|
|
|
|
@param path - Path to a file or directory.
|
|
@returns Whether the path exists.
|
|
|
|
@example
|
|
```
|
|
import findUp = require('find-up');
|
|
|
|
(async () => {
|
|
console.log(await findUp.exists('/Users/sindresorhus/unicorn.png'));
|
|
//=> true
|
|
})();
|
|
```
|
|
*/
|
|
exists: (path: string) => Promise<boolean>;
|
|
|
|
/**
|
|
Return this in a `matcher` function to stop the search and force `findUp` to immediately return `undefined`.
|
|
*/
|
|
readonly stop: findUp.StopSymbol;
|
|
|
|
/**
|
|
Find a file or directory by walking up parent directories.
|
|
|
|
@param name - Name of the file or directory to find. Can be multiple.
|
|
@returns The first path found (by respecting the order of `name`s) or `undefined` if none could be found.
|
|
|
|
@example
|
|
```
|
|
// /
|
|
// └── Users
|
|
// └── sindresorhus
|
|
// ├── unicorn.png
|
|
// └── foo
|
|
// └── bar
|
|
// ├── baz
|
|
// └── example.js
|
|
|
|
// example.js
|
|
import findUp = require('find-up');
|
|
|
|
(async () => {
|
|
console.log(await findUp('unicorn.png'));
|
|
//=> '/Users/sindresorhus/unicorn.png'
|
|
|
|
console.log(await findUp(['rainbow.png', 'unicorn.png']));
|
|
//=> '/Users/sindresorhus/unicorn.png'
|
|
})();
|
|
```
|
|
*/
|
|
(name: string | readonly string[], options?: findUp.Options): Promise<string | undefined>;
|
|
|
|
/**
|
|
Find a file or directory by walking up parent directories.
|
|
|
|
@param matcher - Called for each directory in the search. Return a path or `findUp.stop` to stop the search.
|
|
@returns The first path found or `undefined` if none could be found.
|
|
|
|
@example
|
|
```
|
|
import path = require('path');
|
|
import findUp = require('find-up');
|
|
|
|
(async () => {
|
|
console.log(await findUp(async directory => {
|
|
const hasUnicorns = await findUp.exists(path.join(directory, 'unicorn.png'));
|
|
return hasUnicorns && directory;
|
|
}, {type: 'directory'}));
|
|
//=> '/Users/sindresorhus'
|
|
})();
|
|
```
|
|
*/
|
|
(matcher: (directory: string) => (findUp.Match | Promise<findUp.Match>), options?: findUp.Options): Promise<string | undefined>;
|
|
};
|
|
|
|
export = findUp;
|