@artus-cli/plugin-npmcheckupdate
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

artus-cli/plugin-npmcheckupdate

A artus-cli plugin be used to display upgrade info

NPM version NPM quality NPM download Continuous Integration Test coverage Oss Insight Analytics

Install

$ npm i @artus-cli/plugin-npmcheckupdate 

Usage

// plugin.ts

export default {
  npmcheckupdate: {
    enable: true,
    package: '@artus-cli/plugin-npmcheckupdate',
  },
};

Configuration

export interface NpmCheckUpdateConfig {
  /** unpkg url, default is https://unpkg.com/ */
  unpkgUrl?: string;
  /** the file be used to cache last update info */
  cacheFile?: string;
  /** check inerval with local cache, default is 1 day */
  checkInterval?: string | number;
  /** upgrade policy, canbe major/minor/patch or dist-tags, default is latest */
  upgradePolicy?: 'major' | 'minor' | 'patch' | DistTag;
  /** whether enable CheckUpdateCommand, default is true */
  enableCommand?: boolean;
  /** whether enable intercept in all command? default is true */
  enableInterceptor?: boolean | ((cmd: typeof Command) => boolean);
  /** the position of upgrade info, default is after */
  upgradeInfoPrintPosition?: 'before' | 'after';
  /** customize your special upgrade info */
  upgradeInfoHooks?: {
    /** customize contents only */
    contents?: (upgradeInfo: UpgradeInfo, contents: string[]) => string | string[];
    /** customize all info */
    fullContents?: (upgradeInfo: UpgradeInfo, fullContents: string[]) => string | string[];
  };
}

/@artus-cli/plugin-npmcheckupdate/

    Package Sidebar

    Install

    npm i @artus-cli/plugin-npmcheckupdate

    Weekly Downloads

    0

    Version

    1.1.2

    License

    MIT

    Unpacked Size

    21.6 kB

    Total Files

    18

    Last publish

    Collaborators

    • thonatos
    • wanghx
    • atian25