2.0.5 • Published 2 years ago

umi-plugin-oss v2.0.5

Weekly downloads
1
License
MIT
Repository
github
Last release
2 years ago

umi-plugin-oss

NPM version NPM downloads Build Status Coverage Status License

Add Umi 3.0 support

Just add a plugin into your Umi project, automatically upload productions to OSS@AliCloud !

Usage

$ npm install umi-plugin-oss --save-dev
or
$ yarn add umi-plugin-oss --dev

Add umi-plugin-oss into .umirc.js or config.js of your UmiJS project. UmiJS - Plugin usage

export default {
  oss: Options,
}

Options

Overview

interface Options {
  accessKeyId?: string;
  accessKeySecret?: string;
  acl?: ACLType | ACLRule;
  bijection?: boolean;
  bucket?: {
    cname?: boolean;
    endpoint?: string;
    internal?: boolean;
    name?: string;
    region?: string;
  };
  headers?: {
    'Cache-Control'?: string;
    'Content-Disposition'?: string;
    'Content-Encoding'?: string;
    'Expires'?: string;
    'x-oss-object-acl'?: ACLType;
    'x-oss-server-side-encryption'?: 'AES256' | 'KMS';
    'x-oss-server-side-encryption-key-id'?: string;
    [key: string]: string;
  };
  ignore?: {
    extname?: string[];
    existsInOss?: boolean;
    sizeBetween?: Array<[number, number]>;
  };
  prefix?: string;
  secure?: boolean;
  stsToken?: string;
  timeout?: number;
  waitBeforeDelete?: number;
  waitBeforeUpload?: number;
}

type ACLType = 'public-read-write' | 'public-read' | 'private';

interface ACLRule {
  private?: RegExp | string[];
  publicRead?: RegExp | string[];
  publicReadWrite?: RegExp | string[];
  else?: ACLType;
}

Example

Visit it at examples/base

2.0.5

2 years ago

2.0.4

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

1.2.0

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.2-3

5 years ago

0.1.2-2

5 years ago

0.1.2-0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago