picgo 1.5.9 → 1.5.11
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/CODEOWNERS +1 -0
- package/.github/funding.yml +1 -0
- package/.node-version +1 -0
- package/CHANGELOG.md +38 -0
- package/README.md +14 -0
- package/dist/index.cjs.js +2 -2
- package/dist/index.esm.js +2 -2
- package/dist/utils/common.d.ts +14 -0
- package/package.json +1 -1
package/dist/utils/common.d.ts
CHANGED
|
@@ -3,7 +3,21 @@
|
|
|
3
3
|
import { IImgSize, IPathTransformedImgInfo, IPluginNameType, ILogger, IPicGo } from '../types';
|
|
4
4
|
export declare const isUrl: (url: string) => boolean;
|
|
5
5
|
export declare const isUrlEncode: (url: string) => boolean;
|
|
6
|
+
/**
|
|
7
|
+
* just encode the url with encodeURI
|
|
8
|
+
*/
|
|
6
9
|
export declare const handleUrlEncode: (url: string) => string;
|
|
10
|
+
/**
|
|
11
|
+
* @param urlPath the url path need to be encoded safely
|
|
12
|
+
* @returns the safely encoded url path
|
|
13
|
+
*
|
|
14
|
+
* for example:
|
|
15
|
+
*
|
|
16
|
+
* /a b/, /c d.jpg -> /a%20b/c%20d.jpg
|
|
17
|
+
*
|
|
18
|
+
* /a/b, /c#d.jpg -> /a/b/c%23d.jpg
|
|
19
|
+
*/
|
|
20
|
+
export declare const handleUrlPathSafeEncode: (...urlPathList: string[]) => string;
|
|
7
21
|
export declare const getImageSize: (file: Buffer) => IImgSize;
|
|
8
22
|
export declare const getFSFile: (filePath: string) => Promise<IPathTransformedImgInfo>;
|
|
9
23
|
export declare const getURLFile: (url: string, ctx: IPicGo) => Promise<IPathTransformedImgInfo>;
|