piclist 0.8.14 → 1.0.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.
Files changed (52) hide show
  1. package/.eslintrc.js +4 -1
  2. package/dist/core/Lifecycle.d.ts +1 -1
  3. package/dist/core/PicGo.d.ts +1 -1
  4. package/dist/i18n/en.d.ts +1 -1
  5. package/dist/i18n/index.d.ts +4 -4
  6. package/dist/i18n/zh-CN.d.ts +4 -2
  7. package/dist/i18n/zh-TW.d.ts +1 -1
  8. package/dist/index.cjs.js +2 -2
  9. package/dist/index.esm.js +2 -2
  10. package/dist/lib/Commander.d.ts +2 -2
  11. package/dist/lib/LifecyclePlugins.d.ts +1 -1
  12. package/dist/lib/Logger.d.ts +1 -1
  13. package/dist/lib/PluginHandler.d.ts +1 -1
  14. package/dist/lib/PluginLoader.d.ts +1 -1
  15. package/dist/lib/Request.d.ts +2 -2
  16. package/dist/plugins/beforetransformer/compress.d.ts +1 -1
  17. package/dist/plugins/beforetransformer/watermark.d.ts +1 -1
  18. package/dist/plugins/beforeupload/buildInRename.d.ts +1 -1
  19. package/dist/plugins/commander/config.d.ts +1 -1
  20. package/dist/plugins/commander/i18n.d.ts +1 -1
  21. package/dist/plugins/commander/index.d.ts +1 -1
  22. package/dist/plugins/commander/init.d.ts +1 -1
  23. package/dist/plugins/commander/pluginHandler.d.ts +1 -1
  24. package/dist/plugins/commander/proxy.d.ts +1 -1
  25. package/dist/plugins/commander/setting.d.ts +1 -1
  26. package/dist/plugins/commander/upload.d.ts +1 -1
  27. package/dist/plugins/commander/use.d.ts +1 -1
  28. package/dist/plugins/transformer/base64.d.ts +1 -1
  29. package/dist/plugins/transformer/index.d.ts +1 -1
  30. package/dist/plugins/transformer/path.d.ts +1 -1
  31. package/dist/plugins/uploader/aliyun.d.ts +1 -1
  32. package/dist/plugins/uploader/github.d.ts +1 -1
  33. package/dist/plugins/uploader/imgur.d.ts +1 -1
  34. package/dist/plugins/uploader/index.d.ts +1 -1
  35. package/dist/plugins/uploader/local.d.ts +1 -1
  36. package/dist/plugins/uploader/qiniu.d.ts +1 -1
  37. package/dist/plugins/uploader/sftp.d.ts +1 -1
  38. package/dist/plugins/uploader/smms.d.ts +1 -1
  39. package/dist/plugins/uploader/tcyun.d.ts +1 -1
  40. package/dist/plugins/uploader/upyun.d.ts +1 -1
  41. package/dist/plugins/uploader/webdav.d.ts +1 -1
  42. package/dist/types/index.d.ts +37 -49
  43. package/dist/types/oldRequest.d.ts +3 -7
  44. package/dist/utils/common.d.ts +1 -1
  45. package/dist/utils/createContext.d.ts +1 -1
  46. package/dist/utils/db.d.ts +2 -2
  47. package/dist/utils/getClipboardImage.d.ts +2 -2
  48. package/dist/utils/initUtils.d.ts +1 -1
  49. package/dist/utils/interfaces.d.ts +9 -13
  50. package/dist/utils/sshClient.d.ts +1 -1
  51. package/package.json +28 -38
  52. package/rollup.config.js +2 -2
@@ -1,6 +1,6 @@
1
1
  import { Command } from 'commander';
2
- import { Inquirer } from 'inquirer';
3
- import { IPlugin, ICommander, IPicGo } from '../types';
2
+ import { type Inquirer } from 'inquirer';
3
+ import { type IPlugin, type ICommander, type 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 { IPlugin, ILifecyclePlugins } from '../types';
1
+ import { type IPlugin, type 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 { ILogArgvType, ILogArgvTypeWithError, ILogger, IPicGo } from '../types';
1
+ import { type ILogArgvType, type ILogArgvTypeWithError, type ILogger, type 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 { IProcessEnv, IPluginHandler, IPluginHandlerOptions, IPicGo, IPluginHandlerResult } from '../types';
1
+ import { type IProcessEnv, type IPluginHandler, type IPluginHandlerOptions, type IPicGo, type 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 { IPicGo, IPicGoPlugin, IPluginLoader, IPicGoPluginInterface } from '../types/index';
1
+ import { type IPicGo, type IPicGoPlugin, type IPluginLoader, type IPicGoPluginInterface } from '../types/index';
2
2
  /**
3
3
  * Local plugin loader, file system is required
4
4
  */
@@ -1,5 +1,5 @@
1
- import { AxiosRequestConfig } from 'axios';
2
- import { IPicGo, IRequestConfig, IOldReqOptions, IResponse, IRequest } from '../types';
1
+ import { type AxiosRequestConfig } from 'axios';
2
+ import { type IPicGo, type IRequestConfig, type IOldReqOptions, type IResponse, type 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 { IPicGo, IPluginConfig } from '../../types';
1
+ import { type IPicGo, type IPluginConfig } from '../../types';
2
2
  declare const _default: {
3
3
  config: (ctx: IPicGo) => IPluginConfig[];
4
4
  };
@@ -1,4 +1,4 @@
1
- import { IPicGo, IPluginConfig } from '../../types';
1
+ import { type IPicGo, type IPluginConfig } from '../../types';
2
2
  declare const _default: {
3
3
  config: (ctx: IPicGo) => IPluginConfig[];
4
4
  };
@@ -1,4 +1,4 @@
1
- import { IPicGo, IPluginConfig } from '../../types';
1
+ import { type IPicGo, type IPluginConfig } from '../../types';
2
2
  declare const _default: {
3
3
  config: (ctx: IPicGo) => IPluginConfig[];
4
4
  };
@@ -1,3 +1,3 @@
1
- import { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { IPicGo } from '../../types';
1
+ import { type IPicGo } from '../../types';
2
2
  export default function register(ctx: IPicGo): void;
@@ -1,3 +1,3 @@
1
- import { 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 { 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 { 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,4 +1,4 @@
1
- import { 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 { 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,9 +1,9 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="node" />
3
- import { Command } from 'commander';
4
- import { Inquirer } from 'inquirer';
5
- import { FormatEnum, GravityEnum } from 'sharp';
6
- import { IRequestPromiseOptions } from './oldRequest';
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';
7
7
  export interface IPicGo extends NodeJS.EventEmitter {
8
8
  /**
9
9
  * picgo configPath
@@ -161,37 +161,37 @@ export interface IPluginLoader {
161
161
  export interface IRequestOld {
162
162
  request: import('axios').AxiosInstance;
163
163
  }
164
- export declare type IOldReqOptions = Omit<IRequestPromiseOptions & {
164
+ export type IOldReqOptions = Omit<IRequestPromiseOptions & {
165
165
  url: string;
166
166
  }, 'auth'>;
167
- export declare type IOldReqOptionsWithFullResponse = IOldReqOptions & {
167
+ export type IOldReqOptionsWithFullResponse = IOldReqOptions & {
168
168
  resolveWithFullResponse: true;
169
169
  };
170
- export declare type IOldReqOptionsWithJSON = IOldReqOptions & {
170
+ export type IOldReqOptionsWithJSON = IOldReqOptions & {
171
171
  json: true;
172
172
  };
173
173
  /**
174
174
  * for PicGo new request api, the response will be json format
175
175
  */
176
- export declare type IReqOptions<T = any> = AxiosRequestConfig<T> & {
176
+ export type IReqOptions<T = any> = AxiosRequestConfig<T> & {
177
177
  resolveWithFullResponse: true;
178
178
  };
179
179
  /**
180
180
  * for PicGo new request api, the response will be Buffer
181
181
  */
182
- export declare type IReqOptionsWithArrayBufferRes<T = any> = IReqOptions<T> & {
182
+ export type IReqOptionsWithArrayBufferRes<T = any> = IReqOptions<T> & {
183
183
  responseType: 'arraybuffer';
184
184
  };
185
185
  /**
186
186
  * for PicGo new request api, the response will be just response data. (not statusCode, headers, etc.)
187
187
  */
188
- export declare type IReqOptionsWithBodyResOnly<T = any> = AxiosRequestConfig<T>;
189
- export declare type IFullResponse<T = any, U = any> = AxiosResponse<T, U> & {
188
+ export type IReqOptionsWithBodyResOnly<T = any> = AxiosRequestConfig<T>;
189
+ export type IFullResponse<T = any, U = any> = AxiosResponse<T, U> & {
190
190
  statusCode: number;
191
191
  body: T;
192
192
  };
193
- declare type AxiosResponse<T = any, U = any> = import('axios').AxiosResponse<T, U>;
194
- declare type AxiosRequestConfig<T = any> = import('axios').AxiosRequestConfig<T>;
193
+ type AxiosResponse<T = any, U = any> = import('axios').AxiosResponse<T, U>;
194
+ type AxiosRequestConfig<T = any> = import('axios').AxiosRequestConfig<T>;
195
195
  interface IRequestOptionsWithFullResponse {
196
196
  resolveWithFullResponse: true;
197
197
  }
@@ -205,7 +205,7 @@ interface IRequestOptionsWithResponseTypeArrayBuffer {
205
205
  * T is the response data type
206
206
  * U is the config type
207
207
  */
208
- export declare type IResponse<T, U> = U extends IRequestOptionsWithFullResponse ? IFullResponse<T, U> : U extends IRequestOptionsWithJSON ? T : U extends IRequestOptionsWithResponseTypeArrayBuffer ? Buffer : U extends IOldReqOptionsWithFullResponse ? IFullResponse<T, U> : U extends IOldReqOptionsWithJSON ? T : U extends IOldReqOptions ? string : U extends IReqOptionsWithBodyResOnly ? T : string;
208
+ export type IResponse<T, U> = U extends IRequestOptionsWithFullResponse ? IFullResponse<T, U> : U extends IRequestOptionsWithJSON ? T : U extends IRequestOptionsWithResponseTypeArrayBuffer ? Buffer : U extends IOldReqOptionsWithFullResponse ? IFullResponse<T, U> : U extends IOldReqOptionsWithJSON ? T : U extends IOldReqOptions ? string : U extends IReqOptionsWithBodyResOnly ? T : string;
209
209
  /**
210
210
  * the old request lib will be removed in v1.5.0+
211
211
  * the request options have the following properties
@@ -213,18 +213,14 @@ export declare type IResponse<T, U> = U extends IRequestOptionsWithFullResponse
213
213
  export interface IRequestLibOnlyOptions {
214
214
  proxy?: string;
215
215
  body?: any;
216
- formData?: {
217
- [key: string]: any;
218
- } | undefined;
219
- form?: {
220
- [key: string]: any;
221
- } | string | undefined;
222
- }
223
- export declare type IRequestConfig<T> = T extends IRequestLibOnlyOptions ? IOldReqOptions : AxiosRequestConfig;
216
+ formData?: Record<string, any> | undefined;
217
+ form?: Record<string, any> | string | undefined;
218
+ }
219
+ export type IRequestConfig<T> = T extends IRequestLibOnlyOptions ? IOldReqOptions : AxiosRequestConfig;
224
220
  export interface IRequest {
225
221
  request: <T, U extends (IRequestConfig<U> extends IOldReqOptions ? IOldReqOptions : IRequestConfig<U> extends AxiosRequestConfig ? AxiosRequestConfig : never)>(config: U) => Promise<IResponse<T, U>>;
226
222
  }
227
- export declare type ILogColor = 'blue' | 'green' | 'yellow' | 'red';
223
+ export type ILogColor = 'blue' | 'green' | 'yellow' | 'red';
228
224
  /**
229
225
  * for uploading image info
230
226
  */
@@ -241,12 +237,8 @@ export interface IImgInfo {
241
237
  export interface IPathTransformedImgInfo extends IImgInfo {
242
238
  success: boolean;
243
239
  }
244
- export interface IStringKeyMap<T> {
245
- [key: string]: T extends T ? T : any;
246
- }
247
- export interface ICLIConfigs {
248
- [module: string]: IStringKeyMap<any>;
249
- }
240
+ export type IStringKeyMap<T> = Record<string, T extends T ? T : any>;
241
+ export type ICLIConfigs = Record<string, IStringKeyMap<any>>;
250
242
  /** SM.MS 图床配置项 */
251
243
  export interface ISmmsConfig {
252
244
  token: string;
@@ -287,6 +279,10 @@ export interface IUpyunConfig {
287
279
  path: string;
288
280
  /** 加速域名,注意要加 `http://` 或者 `https://` */
289
281
  url: string;
282
+ /** 防盗链密钥 */
283
+ antiLeechToken: string;
284
+ /** 防盗链过期时间,单位为秒 */
285
+ expireTime: number;
290
286
  }
291
287
  /** 腾讯云图床配置项 */
292
288
  export interface ITcyunConfig {
@@ -402,9 +398,7 @@ export interface IConfig {
402
398
  proxy?: string;
403
399
  [others: string]: any;
404
400
  };
405
- picgoPlugins: {
406
- [pluginName: string]: boolean;
407
- };
401
+ picgoPlugins: Record<string, boolean>;
408
402
  debug?: boolean;
409
403
  silent?: boolean;
410
404
  settings?: {
@@ -429,7 +423,7 @@ export interface IPlugin {
429
423
  config?: (ctx: IPicGo) => IPluginConfig[];
430
424
  [propName: string]: any;
431
425
  }
432
- export declare type IPluginNameType = 'simple' | 'scope' | 'normal' | 'unknown';
426
+ export type IPluginNameType = 'simple' | 'scope' | 'normal' | 'unknown';
433
427
  export interface IPluginProcessResult {
434
428
  success: boolean;
435
429
  /**
@@ -457,7 +451,7 @@ export interface IPluginHandlerOptions {
457
451
  /**
458
452
  * for picgo npm plugins
459
453
  */
460
- export declare type IPicGoPlugin = (ctx: IPicGo) => IPicGoPluginInterface;
454
+ export type IPicGoPlugin = (ctx: IPicGo) => IPicGoPluginInterface;
461
455
  /**
462
456
  * interfaces for PicGo plugin
463
457
  */
@@ -518,9 +512,7 @@ export interface IImgSize {
518
512
  /**
519
513
  * for initUtils
520
514
  */
521
- export interface IFileTree {
522
- [filePath: string]: string | Buffer;
523
- }
515
+ export type IFileTree = Record<string, string | Buffer>;
524
516
  export interface IOptions {
525
517
  template: string;
526
518
  dest: string;
@@ -545,13 +537,11 @@ export interface IClipboardImage {
545
537
  /**
546
538
  * for install command environment variable
547
539
  */
548
- export interface IProcessEnv {
549
- [propName: string]: Undefinable<string>;
550
- }
551
- export declare type ILogArgvType = string | number;
552
- export declare type ILogArgvTypeWithError = ILogArgvType | Error;
553
- export declare type Nullable<T> = T | null;
554
- export declare type Undefinable<T> = T | undefined;
540
+ export type IProcessEnv = Record<string, Undefinable<string>>;
541
+ export type ILogArgvType = string | number;
542
+ export type ILogArgvTypeWithError = ILogArgvType | Error;
543
+ export type Nullable<T> = T | null;
544
+ export type Undefinable<T> = T | undefined;
555
545
  export interface ILogger {
556
546
  success: (...msg: ILogArgvType[]) => void;
557
547
  info: (...msg: ILogArgvType[]) => void;
@@ -563,9 +553,7 @@ export interface IConfigChangePayload<T> {
563
553
  configName: string;
564
554
  value: T;
565
555
  }
566
- export interface ILocale {
567
- [key: string]: any;
568
- }
556
+ export type ILocale = Record<string, any>;
569
557
  export interface II18nManager {
570
558
  /**
571
559
  * translate text
@@ -591,8 +579,8 @@ export interface II18nManager {
591
579
  */
592
580
  getLanguageList: () => string[];
593
581
  }
594
- export declare type availableConvertFormat = keyof FormatEnum;
595
- export declare type availableWatermarkPosition = keyof GravityEnum;
582
+ export type availableConvertFormat = keyof FormatEnum;
583
+ export type availableWatermarkPosition = keyof GravityEnum;
596
584
  export interface IBuildInWaterMarkOptions {
597
585
  isAddWatermark?: boolean;
598
586
  watermarkType?: 'text' | 'image';
@@ -1,14 +1,10 @@
1
- export declare 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
- }
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 type IHeaders = Record<string, any>;
5
3
  export interface IRequestPromiseOptions {
6
4
  baseUrl?: string | undefined;
7
5
  url?: string;
8
6
  method?: IMethod;
9
- formData?: {
10
- [key: string]: any;
11
- } | undefined;
7
+ formData?: Record<string, any> | undefined;
12
8
  qs?: any;
13
9
  json?: boolean;
14
10
  body?: any;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="node" />
3
- import { IImgSize, IPathTransformedImgInfo, IPluginNameType, ILogger, IPicGo, IBuildInCompressOptions, IBuildInWaterMarkOptions } from '../types';
3
+ import { type IImgSize, type IPathTransformedImgInfo, type IPluginNameType, type ILogger, type IPicGo, type IBuildInCompressOptions, type IBuildInWaterMarkOptions } from '../types';
4
4
  import sharp from 'sharp';
5
5
  export declare function randomStringGenerator(length: number): string;
6
6
  export declare function renameFileNameWithTimestamp(oldName: string): string;
@@ -1,4 +1,4 @@
1
- import { 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 { IConfig, IPicGo } from '../types';
2
- import { IJSON } from '@picgo/store/dist/types';
1
+ import { type IConfig, type 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 { IPicGo, IClipboardImage } from '../types';
2
- export declare type Platform = 'darwin' | 'win32' | 'win10' | 'linux' | 'wsl';
1
+ import { type IPicGo, type IClipboardImage } from '../types';
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 { IPicGo, IOptions } from '../types';
1
+ import { type IPicGo, type 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 { PicGo } from '../core/PicGo';
4
- import LifecyclePlugins from '../lib/LifecyclePlugins';
5
- import { IWebdavPlistConfig } from '../types';
3
+ import { type PicGo } from '../core/PicGo';
4
+ import type LifecyclePlugins from '../lib/LifecyclePlugins';
5
+ import { type IWebdavPlistConfig } from '../types';
6
6
  /**
7
7
  * for plugin config
8
8
  */
@@ -139,9 +139,7 @@ export interface IConfig {
139
139
  transformer?: string;
140
140
  proxy: string;
141
141
  };
142
- picgoPlugins: {
143
- [propName: string]: boolean;
144
- };
142
+ picgoPlugins: Record<string, boolean>;
145
143
  debug?: boolean;
146
144
  silent?: boolean;
147
145
  settings?: {
@@ -196,10 +194,8 @@ export interface IClipboardImage {
196
194
  /**
197
195
  * for install command environment variable
198
196
  */
199
- export interface IProcessEnv {
200
- [propName: string]: Undefinable<string>;
201
- }
202
- export declare type ILogArgvType = string | number;
203
- export declare type ILogArgvTypeWithError = ILogArgvType | Error;
204
- export declare type Nullable<T> = T | null;
205
- export declare type Undefinable<T> = T | undefined;
197
+ export type IProcessEnv = Record<string, Undefinable<string>>;
198
+ export type ILogArgvType = string | number;
199
+ export type ILogArgvTypeWithError = ILogArgvType | Error;
200
+ export type Nullable<T> = T | null;
201
+ export type Undefinable<T> = T | undefined;
@@ -1,5 +1,5 @@
1
1
  import { NodeSSH } from 'node-ssh-no-cpu-features';
2
- import { ISftpPlistConfig } from '../types';
2
+ import { type ISftpPlistConfig } from '../types';
3
3
  declare class SSHClient {
4
4
  private static _instance;
5
5
  private static _client;