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.
@@ -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>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "picgo",
3
- "version": "1.5.9",
3
+ "version": "1.5.11",
4
4
  "description": "A tool for picture uploading",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",