picgo 1.5.11 → 1.6.0
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/.github/workflows/release.yml +60 -0
- package/.node-version +1 -1
- package/CHANGELOG.md +10 -0
- package/README.md +1 -1
- package/dist/core/Lifecycle.d.ts +14 -15
- package/dist/core/PicGo.d.ts +48 -49
- package/dist/i18n/en.d.ts +2 -2
- package/dist/i18n/index.d.ts +18 -18
- package/dist/i18n/zh-CN.d.ts +97 -97
- package/dist/i18n/zh-TW.d.ts +2 -2
- package/dist/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +10 -10
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -0
- package/dist/lib/Commander.d.ts +22 -22
- package/dist/lib/LifecyclePlugins.d.ts +17 -17
- package/dist/lib/Logger.d.ts +19 -19
- package/dist/lib/PluginHandler.d.ts +10 -10
- package/dist/lib/PluginLoader.d.ts +27 -27
- package/dist/lib/Request.d.ts +12 -12
- package/dist/plugins/commander/config.d.ts +3 -3
- package/dist/plugins/commander/i18n.d.ts +3 -3
- package/dist/plugins/commander/index.d.ts +3 -3
- package/dist/plugins/commander/init.d.ts +3 -3
- package/dist/plugins/commander/pluginHandler.d.ts +3 -3
- package/dist/plugins/commander/proxy.d.ts +3 -3
- package/dist/plugins/commander/setting.d.ts +5 -5
- package/dist/plugins/commander/upload.d.ts +3 -3
- package/dist/plugins/commander/use.d.ts +3 -3
- package/dist/plugins/transformer/base64.d.ts +5 -5
- package/dist/plugins/transformer/index.d.ts +3 -3
- package/dist/plugins/transformer/path.d.ts +5 -5
- package/dist/plugins/uploader/aliyun.d.ts +2 -2
- package/dist/plugins/uploader/github.d.ts +2 -2
- package/dist/plugins/uploader/imgur.d.ts +2 -2
- package/dist/plugins/uploader/index.d.ts +3 -3
- package/dist/plugins/uploader/qiniu.d.ts +2 -2
- package/dist/plugins/uploader/smms.d.ts +2 -2
- package/dist/plugins/uploader/tcyun.d.ts +8 -8
- package/dist/plugins/uploader/upyun.d.ts +2 -2
- package/dist/types/index.d.ts +540 -542
- package/dist/types/oldRequest.d.ts +19 -19
- package/dist/utils/common.d.ts +118 -120
- package/dist/utils/createContext.d.ts +6 -6
- package/dist/utils/db.d.ts +15 -15
- package/dist/utils/enum.d.ts +27 -27
- package/dist/utils/eventBus.d.ts +3 -4
- package/dist/utils/getClipboardImage.d.ts +4 -4
- package/dist/utils/initUtils.d.ts +26 -26
- package/dist/utils/interfaces.d.ts +202 -203
- package/dist/utils/static.d.ts +1 -1
- package/eslint.config.js +134 -0
- package/package.json +39 -37
- package/rollup.config.js +59 -66
- package/.eslintignore +0 -2
- package/.eslintrc.js +0 -25
- package/.github/workflows/alpha.yml +0 -22
- package/.github/workflows/main.yml +0 -22
- package/.github/workflows/manually.yml +0 -19
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export
|
|
2
|
-
export interface IHeaders {
|
|
3
|
-
[key: string]: any;
|
|
4
|
-
}
|
|
5
|
-
export interface IRequestPromiseOptions {
|
|
6
|
-
baseUrl?: string | undefined;
|
|
7
|
-
url?: string;
|
|
8
|
-
method?: IMethod;
|
|
9
|
-
formData?: {
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
} | undefined;
|
|
12
|
-
qs?: any;
|
|
13
|
-
json?: boolean;
|
|
14
|
-
body?: any;
|
|
15
|
-
resolveWithFullResponse?: boolean;
|
|
16
|
-
headers?: IHeaders;
|
|
17
|
-
proxy?: any;
|
|
18
|
-
timeout?: number;
|
|
19
|
-
}
|
|
1
|
+
export type IMethod = 'get' | 'GET' | 'delete' | 'DELETE' | 'head' | 'HEAD' | 'options' | 'OPTIONS' | 'post' | 'POST' | 'put' | 'PUT' | 'patch' | 'PATCH' | 'purge' | 'PURGE' | 'link' | 'LINK' | 'unlink' | 'UNLINK';
|
|
2
|
+
export interface IHeaders {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}
|
|
5
|
+
export interface IRequestPromiseOptions {
|
|
6
|
+
baseUrl?: string | undefined;
|
|
7
|
+
url?: string;
|
|
8
|
+
method?: IMethod;
|
|
9
|
+
formData?: {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
} | undefined;
|
|
12
|
+
qs?: any;
|
|
13
|
+
json?: boolean;
|
|
14
|
+
body?: any;
|
|
15
|
+
resolveWithFullResponse?: boolean;
|
|
16
|
+
headers?: IHeaders;
|
|
17
|
+
proxy?: any;
|
|
18
|
+
timeout?: number;
|
|
19
|
+
}
|
package/dist/utils/common.d.ts
CHANGED
|
@@ -1,120 +1,118 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* /a
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export declare const
|
|
21
|
-
export declare const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
*
|
|
111
|
-
* config
|
|
112
|
-
*
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
export declare const
|
|
117
|
-
export declare
|
|
118
|
-
export declare const
|
|
119
|
-
export declare const isDev: () => boolean;
|
|
120
|
-
export declare const isProd: () => boolean;
|
|
1
|
+
import { IImgSize, IPathTransformedImgInfo, IPluginNameType, ILogger, IPicGo } from '../types';
|
|
2
|
+
export declare const isUrl: (url: string) => boolean;
|
|
3
|
+
export declare const isUrlEncode: (url: string) => boolean;
|
|
4
|
+
/**
|
|
5
|
+
* just encode the url with encodeURI
|
|
6
|
+
*/
|
|
7
|
+
export declare const handleUrlEncode: (url: string) => string;
|
|
8
|
+
/**
|
|
9
|
+
* @param urlPath the url path need to be encoded safely
|
|
10
|
+
* @returns the safely encoded url path
|
|
11
|
+
*
|
|
12
|
+
* for example:
|
|
13
|
+
*
|
|
14
|
+
* /a b/, /c d.jpg -> /a%20b/c%20d.jpg
|
|
15
|
+
*
|
|
16
|
+
* /a/b, /c#d.jpg -> /a/b/c%23d.jpg
|
|
17
|
+
*/
|
|
18
|
+
export declare const handleUrlPathSafeEncode: (...urlPathList: string[]) => string;
|
|
19
|
+
export declare const getImageSize: (file: Buffer) => IImgSize;
|
|
20
|
+
export declare const getFSFile: (filePath: string) => Promise<IPathTransformedImgInfo>;
|
|
21
|
+
export declare const getURLFile: (url: string, ctx: IPicGo) => Promise<IPathTransformedImgInfo>;
|
|
22
|
+
/**
|
|
23
|
+
* detect the input string's type
|
|
24
|
+
* for example
|
|
25
|
+
* 1. @xxx/picgo-plugin-xxx -> scope
|
|
26
|
+
* 2. picgo-plugin-xxx -> normal
|
|
27
|
+
* 3. xxx -> simple
|
|
28
|
+
* 4. not exists or is a path -> unknown
|
|
29
|
+
* @param name
|
|
30
|
+
*/
|
|
31
|
+
export declare const getPluginNameType: (name: string) => IPluginNameType;
|
|
32
|
+
/**
|
|
33
|
+
* detect the input string is a simple plugin name or not
|
|
34
|
+
* for example
|
|
35
|
+
* 1. xxx -> true
|
|
36
|
+
* 2. /Usr/xx/xxxx/picgo-plugin-xxx -> false
|
|
37
|
+
* @param name pluginNameOrPath
|
|
38
|
+
*/
|
|
39
|
+
export declare const isSimpleName: (nameOrPath: string) => boolean;
|
|
40
|
+
/**
|
|
41
|
+
* streamline the full plugin name to a simple one
|
|
42
|
+
* for example:
|
|
43
|
+
* 1. picgo-plugin-xxx -> xxx
|
|
44
|
+
* 2. @xxx/picgo-plugin-yyy -> yyy
|
|
45
|
+
* @param name pluginFullName
|
|
46
|
+
*/
|
|
47
|
+
export declare const handleStreamlinePluginName: (name: string) => string;
|
|
48
|
+
/**
|
|
49
|
+
* complete plugin name to full name
|
|
50
|
+
* for example:
|
|
51
|
+
* 1. xxx -> picgo-plugin-xxx
|
|
52
|
+
* 2. picgo-plugin-xxx -> picgo-plugin-xxx
|
|
53
|
+
* @param name pluginSimpleName
|
|
54
|
+
* @param scope pluginScope
|
|
55
|
+
*/
|
|
56
|
+
export declare const handleCompletePluginName: (name: string, scope?: string) => string;
|
|
57
|
+
/**
|
|
58
|
+
* handle install/uninstall/update plugin name or path
|
|
59
|
+
* for example
|
|
60
|
+
* 1. picgo-plugin-xxx -> picgo-plugin-xxx
|
|
61
|
+
* 2. @xxx/picgo-plugin-xxx -> @xxx/picgo-plugin-xxx
|
|
62
|
+
* 3. xxx -> picgo-plugin-xxx
|
|
63
|
+
* 4. ./xxxx/picgo-plugin-xxx -> /absolutePath/.../xxxx/picgo-plugin-xxx
|
|
64
|
+
* 5. /absolutePath/.../picgo-plugin-xxx -> /absolutePath/.../picgo-plugin-xxx
|
|
65
|
+
* @param nameOrPath pluginName or pluginPath
|
|
66
|
+
*/
|
|
67
|
+
export declare const getProcessPluginName: (nameOrPath: string, logger?: ILogger | Console) => string;
|
|
68
|
+
/**
|
|
69
|
+
* get the normal plugin name
|
|
70
|
+
* for example:
|
|
71
|
+
* 1. picgo-plugin-xxx -> picgo-plugin-xxx
|
|
72
|
+
* 2. @xxx/picgo-plugin-xxx -> @xxx/picgo-plugin-xxx
|
|
73
|
+
* 3. ./xxxx/picgo-plugin-xxx -> picgo-plugin-xxx
|
|
74
|
+
* 4. /absolutePath/.../picgo-plugin-xxx -> picgo-plugin-xxx
|
|
75
|
+
* 5. an exception: [package.json's name] !== [folder name]
|
|
76
|
+
* then use [package.json's name], usually match the scope package.
|
|
77
|
+
* 6. if plugin name has version: picgo-plugin-xxx@x.x.x then remove the version
|
|
78
|
+
* @param nameOrPath
|
|
79
|
+
*/
|
|
80
|
+
export declare const getNormalPluginName: (nameOrPath: string, logger?: ILogger | Console) => string;
|
|
81
|
+
/**
|
|
82
|
+
* handle transform the path to unix style
|
|
83
|
+
* for example
|
|
84
|
+
* 1. C:\\xxx\\xxx -> C:/xxx/xxx
|
|
85
|
+
* 2. /xxx/xxx -> /xxx/xxx
|
|
86
|
+
* @param path
|
|
87
|
+
*/
|
|
88
|
+
export declare const handleUnixStylePath: (pathStr: string) => string;
|
|
89
|
+
/**
|
|
90
|
+
* remove plugin version when register plugin name
|
|
91
|
+
* 1. picgo-plugin-xxx@1.0.0 -> picgo-plugin-xxx
|
|
92
|
+
* 2. @xxx/picgo-plugin-xxx@1.0.0 -> @xxx/picgo-plugin-xxx
|
|
93
|
+
* @param nameOrPath
|
|
94
|
+
* @param scope
|
|
95
|
+
*/
|
|
96
|
+
export declare const removePluginVersion: (nameOrPath: string, scope?: boolean) => string;
|
|
97
|
+
/**
|
|
98
|
+
* the config black item list which won't be setted
|
|
99
|
+
* only can be got
|
|
100
|
+
*/
|
|
101
|
+
export declare const configBlackList: never[];
|
|
102
|
+
/**
|
|
103
|
+
* check some config key is in blackList
|
|
104
|
+
* @param key
|
|
105
|
+
*/
|
|
106
|
+
export declare const isConfigKeyInBlackList: (key: string) => boolean;
|
|
107
|
+
/**
|
|
108
|
+
* check the input config is valid
|
|
109
|
+
* config must be object such as { xxx: 'xxx' }
|
|
110
|
+
* && can't be array
|
|
111
|
+
* @param config
|
|
112
|
+
* @returns
|
|
113
|
+
*/
|
|
114
|
+
export declare const isInputConfigValid: (config: any) => boolean;
|
|
115
|
+
export declare function safeParse<T>(str: string): T | string;
|
|
116
|
+
export declare const forceNumber: (num?: string | number) => number;
|
|
117
|
+
export declare const isDev: () => boolean;
|
|
118
|
+
export declare const isProd: () => boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IPicGo } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* create an unique context for each upload process
|
|
4
|
-
* @param ctx
|
|
5
|
-
*/
|
|
6
|
-
export declare const createContext: (ctx: IPicGo) => IPicGo;
|
|
1
|
+
import { IPicGo } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* create an unique context for each upload process
|
|
4
|
+
* @param ctx
|
|
5
|
+
*/
|
|
6
|
+
export declare const createContext: (ctx: IPicGo) => IPicGo;
|
package/dist/utils/db.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { IConfig, IPicGo } from '../types';
|
|
2
|
-
import { IJSON } from '@picgo/store/dist/types';
|
|
3
|
-
declare class DB {
|
|
4
|
-
private readonly ctx;
|
|
5
|
-
private readonly db;
|
|
6
|
-
constructor(ctx: IPicGo);
|
|
7
|
-
read(flush?: boolean): IJSON;
|
|
8
|
-
get(key?: string): any;
|
|
9
|
-
set(key: string, value: any): void;
|
|
10
|
-
has(key: string): boolean;
|
|
11
|
-
unset(key: string, value: any): boolean;
|
|
12
|
-
saveConfig(config: Partial<IConfig>): void;
|
|
13
|
-
removeConfig(config: IConfig): void;
|
|
14
|
-
}
|
|
15
|
-
export default DB;
|
|
1
|
+
import { IConfig, IPicGo } from '../types';
|
|
2
|
+
import { IJSON } from '@picgo/store/dist/types';
|
|
3
|
+
declare class DB {
|
|
4
|
+
private readonly ctx;
|
|
5
|
+
private readonly db;
|
|
6
|
+
constructor(ctx: IPicGo);
|
|
7
|
+
read(flush?: boolean): IJSON;
|
|
8
|
+
get(key?: string): any;
|
|
9
|
+
set(key: string, value: any): void;
|
|
10
|
+
has(key: string): boolean;
|
|
11
|
+
unset(key: string, value: any): boolean;
|
|
12
|
+
saveConfig(config: Partial<IConfig>): void;
|
|
13
|
+
removeConfig(config: IConfig): void;
|
|
14
|
+
}
|
|
15
|
+
export default DB;
|
package/dist/utils/enum.d.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
export declare enum ILogType {
|
|
2
|
-
success = "success",
|
|
3
|
-
info = "info",
|
|
4
|
-
warn = "warn",
|
|
5
|
-
error = "error"
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* these events will be catched by users
|
|
9
|
-
*/
|
|
10
|
-
export declare enum IBuildInEvent {
|
|
11
|
-
UPLOAD_PROGRESS = "uploadProgress",
|
|
12
|
-
FAILED = "failed",
|
|
13
|
-
BEFORE_TRANSFORM = "beforeTransform",
|
|
14
|
-
BEFORE_UPLOAD = "beforeUpload",
|
|
15
|
-
AFTER_UPLOAD = "afterUpload",
|
|
16
|
-
FINISHED = "finished",
|
|
17
|
-
INSTALL = "install",
|
|
18
|
-
UNINSTALL = "uninstall",
|
|
19
|
-
UPDATE = "update",
|
|
20
|
-
NOTIFICATION = "notification"
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* these events will be catched only by picgo
|
|
24
|
-
*/
|
|
25
|
-
export declare enum IBusEvent {
|
|
26
|
-
CONFIG_CHANGE = "CONFIG_CHANGE"
|
|
27
|
-
}
|
|
1
|
+
export declare enum ILogType {
|
|
2
|
+
success = "success",
|
|
3
|
+
info = "info",
|
|
4
|
+
warn = "warn",
|
|
5
|
+
error = "error"
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* these events will be catched by users
|
|
9
|
+
*/
|
|
10
|
+
export declare enum IBuildInEvent {
|
|
11
|
+
UPLOAD_PROGRESS = "uploadProgress",
|
|
12
|
+
FAILED = "failed",
|
|
13
|
+
BEFORE_TRANSFORM = "beforeTransform",
|
|
14
|
+
BEFORE_UPLOAD = "beforeUpload",
|
|
15
|
+
AFTER_UPLOAD = "afterUpload",
|
|
16
|
+
FINISHED = "finished",
|
|
17
|
+
INSTALL = "install",
|
|
18
|
+
UNINSTALL = "uninstall",
|
|
19
|
+
UPDATE = "update",
|
|
20
|
+
NOTIFICATION = "notification"
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* these events will be catched only by picgo
|
|
24
|
+
*/
|
|
25
|
+
export declare enum IBusEvent {
|
|
26
|
+
CONFIG_CHANGE = "CONFIG_CHANGE"
|
|
27
|
+
}
|
package/dist/utils/eventBus.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export { eventBus };
|
|
1
|
+
import { EventEmitter } from 'events';
|
|
2
|
+
declare const eventBus: EventEmitter<[never]>;
|
|
3
|
+
export { eventBus };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IPicGo, IClipboardImage } from '../types';
|
|
2
|
-
export
|
|
3
|
-
declare const getClipboardImage: (ctx: IPicGo) => Promise<IClipboardImage>;
|
|
4
|
-
export default getClipboardImage;
|
|
1
|
+
import { IPicGo, IClipboardImage } from '../types';
|
|
2
|
+
export type Platform = 'darwin' | 'win32' | 'win10' | 'linux' | 'wsl';
|
|
3
|
+
declare const getClipboardImage: (ctx: IPicGo) => Promise<IClipboardImage>;
|
|
4
|
+
export default getClipboardImage;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { IPicGo, IOptions } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Generate template files to destination files.
|
|
4
|
-
* @param {PicGo} ctx
|
|
5
|
-
* @param {IOptions} options
|
|
6
|
-
*/
|
|
7
|
-
declare const generate: (ctx: IPicGo, options: IOptions) => Promise<any>;
|
|
8
|
-
/**
|
|
9
|
-
* Return the filters' result
|
|
10
|
-
* @param ctx PicGo
|
|
11
|
-
* @param exp condition expression
|
|
12
|
-
* @param data options data
|
|
13
|
-
*/
|
|
14
|
-
declare const filters: (ctx: IPicGo, exp: any, data: any) => boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Render files to a virtual tree object
|
|
17
|
-
* @param {array} files
|
|
18
|
-
*/
|
|
19
|
-
declare const render: (files: string[], source: string, options: any) => any;
|
|
20
|
-
/**
|
|
21
|
-
* Write rendered files' content to real file
|
|
22
|
-
* @param {string} dir
|
|
23
|
-
* @param {object} files
|
|
24
|
-
*/
|
|
25
|
-
declare const writeFileTree: (dir: string, files: any) => void;
|
|
26
|
-
export { filters, generate, render, writeFileTree };
|
|
1
|
+
import { IPicGo, IOptions } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Generate template files to destination files.
|
|
4
|
+
* @param {PicGo} ctx
|
|
5
|
+
* @param {IOptions} options
|
|
6
|
+
*/
|
|
7
|
+
declare const generate: (ctx: IPicGo, options: IOptions) => Promise<any>;
|
|
8
|
+
/**
|
|
9
|
+
* Return the filters' result
|
|
10
|
+
* @param ctx PicGo
|
|
11
|
+
* @param exp condition expression
|
|
12
|
+
* @param data options data
|
|
13
|
+
*/
|
|
14
|
+
declare const filters: (ctx: IPicGo, exp: any, data: any) => boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Render files to a virtual tree object
|
|
17
|
+
* @param {array} files
|
|
18
|
+
*/
|
|
19
|
+
declare const render: (files: string[], source: string, options: any) => any;
|
|
20
|
+
/**
|
|
21
|
+
* Write rendered files' content to real file
|
|
22
|
+
* @param {string} dir
|
|
23
|
+
* @param {object} files
|
|
24
|
+
*/
|
|
25
|
+
declare const writeFileTree: (dir: string, files: any) => void;
|
|
26
|
+
export { filters, generate, render, writeFileTree };
|