piclist 1.8.8 → 1.8.10

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.
Files changed (52) hide show
  1. package/.eslintrc.js +1 -0
  2. package/CHANGELOG.md +19 -0
  3. package/dist/core/Lifecycle.d.ts +5 -1
  4. package/dist/core/PicGo.d.ts +2 -2
  5. package/dist/index.cjs.js +2 -2
  6. package/dist/index.esm.js +2 -2
  7. package/dist/lib/Commander.d.ts +1 -1
  8. package/dist/lib/LifecyclePlugins.d.ts +1 -1
  9. package/dist/lib/Logger.d.ts +1 -1
  10. package/dist/lib/PluginHandler.d.ts +1 -1
  11. package/dist/lib/PluginLoader.d.ts +1 -1
  12. package/dist/lib/Request.d.ts +2 -2
  13. package/dist/plugins/beforetransformer/compress.d.ts +1 -1
  14. package/dist/plugins/beforetransformer/watermark.d.ts +1 -1
  15. package/dist/plugins/beforeupload/buildInRename.d.ts +1 -1
  16. package/dist/plugins/commander/config.d.ts +1 -1
  17. package/dist/plugins/commander/i18n.d.ts +1 -1
  18. package/dist/plugins/commander/index.d.ts +1 -1
  19. package/dist/plugins/commander/init.d.ts +1 -1
  20. package/dist/plugins/commander/pluginHandler.d.ts +1 -1
  21. package/dist/plugins/commander/proxy.d.ts +1 -1
  22. package/dist/plugins/commander/setting.d.ts +1 -1
  23. package/dist/plugins/commander/upload.d.ts +1 -1
  24. package/dist/plugins/commander/use.d.ts +1 -1
  25. package/dist/plugins/transformer/base64.d.ts +1 -1
  26. package/dist/plugins/transformer/index.d.ts +1 -1
  27. package/dist/plugins/transformer/path.d.ts +1 -1
  28. package/dist/plugins/uploader/aliyun.d.ts +1 -1
  29. package/dist/plugins/uploader/awss3plist.d.ts +1 -1
  30. package/dist/plugins/uploader/github.d.ts +1 -1
  31. package/dist/plugins/uploader/imgur.d.ts +1 -1
  32. package/dist/plugins/uploader/index.d.ts +1 -1
  33. package/dist/plugins/uploader/local.d.ts +1 -1
  34. package/dist/plugins/uploader/lsky.d.ts +1 -1
  35. package/dist/plugins/uploader/qiniu.d.ts +1 -1
  36. package/dist/plugins/uploader/s3/uploader.d.ts +6 -7
  37. package/dist/plugins/uploader/s3/utils.d.ts +2 -2
  38. package/dist/plugins/uploader/sftp.d.ts +1 -1
  39. package/dist/plugins/uploader/smms.d.ts +1 -1
  40. package/dist/plugins/uploader/tcyun.d.ts +1 -1
  41. package/dist/plugins/uploader/telegraph.d.ts +1 -1
  42. package/dist/plugins/uploader/upyun.d.ts +1 -1
  43. package/dist/plugins/uploader/webdav.d.ts +1 -1
  44. package/dist/types/index.d.ts +4 -4
  45. package/dist/utils/common.d.ts +1 -1
  46. package/dist/utils/createContext.d.ts +1 -1
  47. package/dist/utils/db.d.ts +2 -2
  48. package/dist/utils/getClipboardImage.d.ts +1 -1
  49. package/dist/utils/initUtils.d.ts +1 -1
  50. package/dist/utils/interfaces.d.ts +2 -2
  51. package/dist/utils/sshClient.d.ts +1 -1
  52. package/package.json +156 -155
@@ -1,6 +1,6 @@
1
1
  import { Command } from 'commander';
2
2
  import { type Inquirer } from 'inquirer';
3
- import { type IPlugin, type ICommander, type IPicGo } from '../types';
3
+ import type { IPlugin, ICommander, IPicGo } from '../types';
4
4
  export declare class Commander implements ICommander {
5
5
  private readonly name;
6
6
  static currentPlugin: string | null;
@@ -1,4 +1,4 @@
1
- import { type IPlugin, type ILifecyclePlugins } from '../types';
1
+ import type { IPlugin, ILifecyclePlugins } from '../types';
2
2
  export declare class LifecyclePlugins implements ILifecyclePlugins {
3
3
  static currentPlugin: string | null;
4
4
  private readonly list;
@@ -1,4 +1,4 @@
1
- import { type ILogArgvType, type ILogArgvTypeWithError, type ILogger, type IPicGo } from '../types';
1
+ import type { ILogArgvType, ILogArgvTypeWithError, ILogger, IPicGo } from '../types';
2
2
  export declare class Logger implements ILogger {
3
3
  private readonly level;
4
4
  private readonly ctx;
@@ -1,4 +1,4 @@
1
- import { type IProcessEnv, type IPluginHandler, type IPluginHandlerOptions, type IPicGo, type IPluginHandlerResult } from '../types';
1
+ import type { IProcessEnv, IPluginHandler, IPluginHandlerOptions, IPicGo, IPluginHandlerResult } from '../types';
2
2
  export declare class PluginHandler implements IPluginHandler {
3
3
  private readonly ctx;
4
4
  constructor(ctx: IPicGo);
@@ -1,4 +1,4 @@
1
- import { type IPicGo, type IPicGoPlugin, type IPluginLoader, type IPicGoPluginInterface } from '../types/index';
1
+ import type { IPicGo, IPicGoPlugin, IPluginLoader, IPicGoPluginInterface } from '../types/index';
2
2
  /**
3
3
  * Local plugin loader, file system is required
4
4
  */
@@ -1,5 +1,5 @@
1
- import { type AxiosRequestConfig } from 'axios';
2
- import { type IPicGo, type IRequestConfig, type IOldReqOptions, type IResponse, type IRequest } from '../types';
1
+ import type { AxiosRequestConfig } from 'axios';
2
+ import type { IPicGo, IRequestConfig, IOldReqOptions, IResponse, IRequest } from '../types';
3
3
  export declare class Request implements IRequest {
4
4
  private readonly ctx;
5
5
  private proxy;
@@ -1,4 +1,4 @@
1
- import { type IPicGo, type IPluginConfig } from '../../types';
1
+ import type { IPicGo, IPluginConfig } from '../../types';
2
2
  declare const _default: {
3
3
  config: (ctx: IPicGo) => IPluginConfig[];
4
4
  };
@@ -1,4 +1,4 @@
1
- import { type IPicGo, type IPluginConfig } from '../../types';
1
+ import type { IPicGo, IPluginConfig } from '../../types';
2
2
  declare const _default: {
3
3
  config: (ctx: IPicGo) => IPluginConfig[];
4
4
  };
@@ -1,4 +1,4 @@
1
- import { type IPicGo, type IPluginConfig } from '../../types';
1
+ import type { IPicGo, IPluginConfig } from '../../types';
2
2
  declare const _default: {
3
3
  config: (ctx: IPicGo) => IPluginConfig[];
4
4
  };
@@ -1,3 +1,3 @@
1
- import { type IPlugin } from '../../types';
1
+ import type { IPlugin } from '../../types';
2
2
  declare const config: IPlugin;
3
3
  export default config;
@@ -1,3 +1,3 @@
1
- import { type IPlugin } from '../../types';
1
+ import type { IPlugin } from '../../types';
2
2
  declare const i18n: IPlugin;
3
3
  export default i18n;
@@ -1,3 +1,3 @@
1
- import { type IPicGo } from '../../types';
1
+ import type { IPicGo } from '../../types';
2
2
  declare const _default: (ctx: IPicGo) => void;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { type IPlugin } from '../../types';
1
+ import type { IPlugin } from '../../types';
2
2
  declare const init: IPlugin;
3
3
  export default init;
@@ -1,3 +1,3 @@
1
- import { type IPlugin } from '../../types';
1
+ import type { IPlugin } from '../../types';
2
2
  declare const pluginHandler: IPlugin;
3
3
  export default pluginHandler;
@@ -1,3 +1,3 @@
1
- import { type IPlugin } from '../../types';
1
+ import type { IPlugin } from '../../types';
2
2
  declare const proxy: IPlugin;
3
3
  export default proxy;
@@ -1,4 +1,4 @@
1
- import { type IPicGo } from '../../types';
1
+ import type { IPicGo } from '../../types';
2
2
  declare const setting: {
3
3
  handle: (ctx: IPicGo) => void;
4
4
  };
@@ -1,3 +1,3 @@
1
- import { type IPlugin } from '../../types';
1
+ import type { IPlugin } from '../../types';
2
2
  declare const upload: IPlugin;
3
3
  export default upload;
@@ -1,3 +1,3 @@
1
- import { type IPlugin } from '../../types';
1
+ import type { IPlugin } from '../../types';
2
2
  declare const use: IPlugin;
3
3
  export default use;
@@ -1,4 +1,4 @@
1
- import { type IPicGo } from '../../types';
1
+ import type { IPicGo } from '../../types';
2
2
  declare const _default: {
3
3
  handle: (ctx: IPicGo) => Promise<IPicGo>;
4
4
  };
@@ -1,3 +1,3 @@
1
- import { type IPicGoPlugin } from '../../types';
1
+ import type { IPicGoPlugin } from '../../types';
2
2
  declare const buildInTransformers: IPicGoPlugin;
3
3
  export default buildInTransformers;
@@ -1,4 +1,4 @@
1
- import { type IPicGo } from '../../types';
1
+ import type { IPicGo } from '../../types';
2
2
  declare const _default: {
3
3
  handle: (ctx: IPicGo) => Promise<IPicGo>;
4
4
  };
@@ -1,2 +1,2 @@
1
- import { type IPicGo } from '../../types';
1
+ import type { IPicGo } from '../../types';
2
2
  export default function register(ctx: IPicGo): void;
@@ -1,2 +1,2 @@
1
- import { IPicGo } from "../../types";
1
+ import type { IPicGo } from '../../types';
2
2
  export default function register(ctx: IPicGo): void;
@@ -1,2 +1,2 @@
1
- import { type IPicGo } from '../../types';
1
+ import type { IPicGo } from '../../types';
2
2
  export default function register(ctx: IPicGo): void;
@@ -1,2 +1,2 @@
1
- import { type IPicGo } from '../../types';
1
+ import type { IPicGo } from '../../types';
2
2
  export default function register(ctx: IPicGo): void;
@@ -1,3 +1,3 @@
1
- import { type IPicGoPlugin } from '../../types';
1
+ import type { IPicGoPlugin } from '../../types';
2
2
  declare const buildInUploaders: IPicGoPlugin;
3
3
  export default buildInUploaders;
@@ -1,2 +1,2 @@
1
- import { type IPicGo } from '../../types';
1
+ import type { IPicGo } from '../../types';
2
2
  export default function register(ctx: IPicGo): void;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { IPicGo } from '../../types';
2
+ import type { IPicGo } from '../../types';
3
3
  export interface IMGTYPE {
4
4
  imgUrl?: string;
5
5
  type?: string;
@@ -1,2 +1,2 @@
1
- import { type IPicGo } from '../../types';
1
+ import type { IPicGo } from '../../types';
2
2
  export default function register(ctx: IPicGo): void;
@@ -1,5 +1,4 @@
1
- import { S3Client } from "@aws-sdk/client-s3";
2
- import { IAwsS3PListUserConfig, IImgInfo } from "../../../types";
1
+ import type { IAwsS3PListUserConfig, IImgInfo } from '../../../types';
3
2
  export interface IUploadResult {
4
3
  index: number;
5
4
  key: string;
@@ -8,9 +7,9 @@ export interface IUploadResult {
8
7
  versionId?: string;
9
8
  eTag?: string;
10
9
  }
11
- declare function createS3Client(opts: IAwsS3PListUserConfig): S3Client;
12
- interface createUploadTaskOpts {
13
- client: S3Client;
10
+ declare function createS3Client(opts: IAwsS3PListUserConfig): any;
11
+ interface ICreateUploadTaskOpts {
12
+ client: any;
14
13
  bucketName: string;
15
14
  path: string;
16
15
  item: IImgInfo;
@@ -18,8 +17,8 @@ interface createUploadTaskOpts {
18
17
  acl: string;
19
18
  urlPrefix?: string;
20
19
  }
21
- declare function createUploadTask(opts: createUploadTaskOpts): Promise<IUploadResult>;
22
- declare function getFileURL(opts: createUploadTaskOpts, eTag: string, versionId: string): Promise<string>;
20
+ declare function createUploadTask(opts: ICreateUploadTaskOpts): Promise<IUploadResult>;
21
+ declare function getFileURL(opts: ICreateUploadTaskOpts, eTag: string, versionId: string): Promise<string>;
23
22
  declare const _default: {
24
23
  createS3Client: typeof createS3Client;
25
24
  createUploadTask: typeof createUploadTask;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
- import { HttpsProxyAgent, HttpProxyAgent } from "hpagent";
3
- import { IImgInfo } from "../../../types";
2
+ import { HttpsProxyAgent, HttpProxyAgent } from 'hpagent';
3
+ import type { IImgInfo } from '../../../types';
4
4
  export declare function formatPath(info: IImgInfo, format?: string): string;
5
5
  export declare function extractInfo(info: IImgInfo): Promise<{
6
6
  body?: Buffer;
@@ -1,2 +1,2 @@
1
- import { type IPicGo } from '../../types';
1
+ import type { IPicGo } from '../../types';
2
2
  export default function register(ctx: IPicGo): void;
@@ -1,2 +1,2 @@
1
- import { type IPicGo } from '../../types';
1
+ import type { IPicGo } from '../../types';
2
2
  export default function register(ctx: IPicGo): void;
@@ -1,4 +1,4 @@
1
- import { type IPicGo } from '../../types';
1
+ import type { IPicGo } from '../../types';
2
2
  export interface ISignature {
3
3
  signature: string;
4
4
  appId: string;
@@ -1,2 +1,2 @@
1
- import { type IPicGo } from '../../types';
1
+ import type { IPicGo } from '../../types';
2
2
  export default function register(ctx: IPicGo): void;
@@ -1,2 +1,2 @@
1
- import { type IPicGo } from '../../types';
1
+ import type { IPicGo } from '../../types';
2
2
  export default function register(ctx: IPicGo): void;
@@ -1,2 +1,2 @@
1
- import { type IPicGo } from '../../types';
1
+ import type { IPicGo } from '../../types';
2
2
  export default function register(ctx: IPicGo): void;
@@ -1,9 +1,9 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="node" />
3
- import { type Command } from 'commander';
4
- import { type Inquirer } from 'inquirer';
5
- import { type FormatEnum, type GravityEnum } from 'sharp';
6
- import { type IRequestPromiseOptions } from './oldRequest';
3
+ import type { Command } from 'commander';
4
+ import type { Inquirer } from 'inquirer';
5
+ import type { FormatEnum, GravityEnum } from 'sharp';
6
+ import type { IRequestPromiseOptions } from './oldRequest';
7
7
  export interface IPicGo extends NodeJS.EventEmitter {
8
8
  /**
9
9
  * picgo configPath
@@ -1,9 +1,9 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="node" />
3
3
  /// <reference types="node" />
4
- import { type IImgSize, type IPathTransformedImgInfo, type IPluginNameType, type ILogger, type IPicGo, type IBuildInCompressOptions, type IBuildInWaterMarkOptions } from '../types';
5
4
  import sharp from 'sharp';
6
5
  import crypto from 'crypto';
6
+ import type { IImgSize, IPathTransformedImgInfo, IPluginNameType, ILogger, IPicGo, IBuildInCompressOptions, IBuildInWaterMarkOptions } from '../types';
7
7
  export declare function randomStringGenerator(length: number): string;
8
8
  export declare function renameFileNameWithTimestamp(oldName: string): string;
9
9
  export declare function renameFileNameWithRandomString(oldName: string, length?: number): string;
@@ -1,4 +1,4 @@
1
- import { type IPicGo } from '../types';
1
+ import type { IPicGo } from '../types';
2
2
  /**
3
3
  * create an unique context for each upload process
4
4
  * @param ctx
@@ -1,5 +1,5 @@
1
- import { type IConfig, type IPicGo } from '../types';
2
- import { type IJSON } from '@picgo/store/dist/types';
1
+ import type { IConfig, IPicGo } from '../types';
2
+ import type { IJSON } from '@picgo/store/dist/types';
3
3
  declare class DB {
4
4
  private readonly ctx;
5
5
  private readonly db;
@@ -1,4 +1,4 @@
1
- import { type IPicGo, type IClipboardImage } from '../types';
1
+ import type { IPicGo, IClipboardImage } from '../types';
2
2
  export type Platform = 'darwin' | 'win32' | 'win10' | 'linux' | 'wsl';
3
3
  declare const getClipboardImage: (ctx: IPicGo) => Promise<IClipboardImage>;
4
4
  export default getClipboardImage;
@@ -1,4 +1,4 @@
1
- import { type IPicGo, type IOptions } from '../types';
1
+ import type { IPicGo, IOptions } from '../types';
2
2
  /**
3
3
  * Generate template files to destination files.
4
4
  * @param {PicGo} ctx
@@ -1,8 +1,8 @@
1
1
  /** This file is deprecated */
2
2
  /// <reference types="node" />
3
- import { type PicGo } from '../core/PicGo';
3
+ import type { PicGo } from '../core/PicGo';
4
4
  import type LifecyclePlugins from '../lib/LifecyclePlugins';
5
- import { type IWebdavPlistConfig } from '../types';
5
+ import type { IWebdavPlistConfig } from '../types';
6
6
  /**
7
7
  * for plugin config
8
8
  */
@@ -1,5 +1,5 @@
1
1
  import { NodeSSH } from 'node-ssh-no-cpu-features';
2
- import { type ISftpPlistConfig } from '../types';
2
+ import type { ISftpPlistConfig } from '../types';
3
3
  declare class SSHClient {
4
4
  private static _instance;
5
5
  private static _client;