@qiwi/semantic-release-gh-pages-plugin
Version:
gh-pages publishing plugin for semantic-release
470 lines (412 loc) • 11.3 kB
JavaScript
/**
* Flowtype definitions for index
* Generated by Flowgen from a Typescript Definition
* Flowgen v1.21.0
*/
declare module "@qiwi/semantic-release-gh-pages-plugin/target/es6/defaults.js" {
/**
* @module semantic-release-gh-pages-plugin
*/
declare export var PLUGIN_PATH: "@qiwi/semantic-release-gh-pages-plugin";
declare export var DEFAULT_BRANCH: "gh-pages";
declare export var DEFAULT_SRC: "docs";
declare export var DEFAULT_DST: ".";
declare export var DEFAULT_MSG: "docs updated <%= nextRelease.gitTag %>";
declare export var DEFAULT_ENTERPRISE: false;
declare export var DEFAULT_PULL_TAGS_BRANCH: "master";
declare export var DEFAULT_PATTERN: "**/*";
}
declare module "@qiwi/semantic-release-gh-pages-plugin/target/es6/interface.js" {
import type { BranchSpec, Context } from "semantic-release";
declare export interface ILogger {
log: (message: string, ...vars: any[]) => void;
error: (message: string, ...vars: any[]) => void;
}
declare export type TAnyMap = {
[key: string]: any,
};
declare export type TStringMap = {
[key: string]: string,
};
declare export type TContext = {
...Context,
...{
env: TStringMap,
branch?: Exclude<BranchSpec, string>,
cwd: string,
options: {
...TAnyMap,
...{
publish?: Array<any>,
verifyConditions?: Array<any>,
...
},
},
...
},
};
declare export interface IGhpagesPluginConfig {
src: string;
dst: string;
ciBranch: string;
docsBranch: string;
pullTagsBranch?: string;
msg: string;
repo: string;
token?: string;
enterprise?: boolean;
dotfiles?: boolean;
add?: boolean;
pattern?: string;
}
declare export type IPushOpts = {
message: string,
logger: ILogger,
env: TAnyMap,
cwd: string,
...
} & IGhpagesPluginConfig;
}
declare module "@qiwi/semantic-release-gh-pages-plugin/target/es6/util.js" {
import type { ICallable } from "@qiwi/substrate-types";
declare export var catchToSmth: (
fn: ICallable,
smth?: any
) => (...args: any[]) => any;
declare export var anyDefined: (...args: any[]) => any;
declare export var isDirectory: (path: string) => any;
}
declare module "@qiwi/semantic-release-gh-pages-plugin/target/es6/config.js" {
import type {
IGhpagesPluginConfig,
TAnyMap,
TContext,
} from "@qiwi/semantic-release-gh-pages-plugin/target/es6/interface.js";
declare export {
DEFAULT_BRANCH,
DEFAULT_SRC,
DEFAULT_MSG,
DEFAULT_DST,
DEFAULT_ENTERPRISE,
PLUGIN_PATH,
DEFAULT_PULL_TAGS_BRANCH,
DEFAULT_PATTERN,
} from "@qiwi/semantic-release-gh-pages-plugin/target/es6/defaults.js";
declare export var GITIO_REPO_PATTERN: RegExp;
/**
* @private
*/
declare export var extractRepoName: (repoUrl: string) => string;
/**
* @private
*/
declare export var extractRepoDomain: (repoUrl: string) => string;
/**
* @private
*/
declare export var extractRepoToken: (repoUrl: string) => string;
/**
* @private
*/
declare export var getRepoUrl: (
pluginConfig: TAnyMap,
context: TContext,
enterprise: boolean
) => Promise<string>;
/**
* @private
*/
declare export var getUrlFromPackage: () => string;
/**
* @private
*/
declare export var getToken: (env: TAnyMap, repoUrl: string) => string | void;
/**
* @private
*/
declare export var reassembleRepoUrl: (
redirectedUrl: string,
context: TContext
) => string | void;
/**
* @private
*/
declare export var resolveConfig: (
pluginConfig: TAnyMap,
context: TContext,
path?: string,
step?: string
) => Promise<IGhpagesPluginConfig>;
/**
* @private
*/
declare export var resolveOptions: (
pluginConfig: TAnyMap,
context: TContext,
path?: string,
step?: string
) => TAnyMap;
}
declare module "@qiwi/semantic-release-gh-pages-plugin/target/es6/ghpages.js" {
import type { IPushOpts } from "@qiwi/semantic-release-gh-pages-plugin/target/es6/interface.js";
/**
* @private
*/
declare export var OK: {
status: string,
...
};
/**
* @private
*/
declare export var pullTags: (opts: IPushOpts) => Promise<any>;
/**
* @private
*/
declare export var pushPages: (opts: IPushOpts) => Promise<mixed>;
/**
* @private
*/
declare export var _publish: (opts: IPushOpts) => Promise<mixed>;
/**
* @private
*/
declare export var publish: (opts: IPushOpts) => Promise<mixed>;
}
declare module "@qiwi/semantic-release-gh-pages-plugin/target/es6/tpl.js" {
import type {
ILogger,
TAnyMap,
} from "@qiwi/semantic-release-gh-pages-plugin/target/es6/interface.js";
/**
* @private
*/
declare export var render: (
template: string,
context: TAnyMap,
logger: ILogger
) => string;
}
declare module "@qiwi/semantic-release-gh-pages-plugin/target/es6/index.js" {
import type { TContext } from "@qiwi/semantic-release-gh-pages-plugin/target/es6/interface.js";
declare export * from "@qiwi/semantic-release-gh-pages-plugin/target/es6/defaults.js";
declare export var verifyConditions: (
pluginConfig: any,
context: TContext
) => Promise<void>;
declare export var publish: (
pluginConfig: any,
context: TContext
) => Promise<mixed>;
declare var _default: {
verifyConditions: (pluginConfig: any, context: TContext) => Promise<void>,
publish: (pluginConfig: any, context: TContext) => Promise<mixed>,
...
};
declare export default typeof _default;
}
declare module "@qiwi/semantic-release-gh-pages-plugin" {
declare export * from "@qiwi/semantic-release-gh-pages-plugin/target/es6/index.js";
}
declare module "@qiwi/semantic-release-gh-pages-plugin/target/es5/defaults.js" {
/**
* @module semantic-release-gh-pages-plugin
*/
declare export var PLUGIN_PATH: "@qiwi/semantic-release-gh-pages-plugin";
declare export var DEFAULT_BRANCH: "gh-pages";
declare export var DEFAULT_SRC: "docs";
declare export var DEFAULT_DST: ".";
declare export var DEFAULT_MSG: "docs updated <%= nextRelease.gitTag %>";
declare export var DEFAULT_ENTERPRISE: false;
declare export var DEFAULT_PULL_TAGS_BRANCH: "master";
declare export var DEFAULT_PATTERN: "**/*";
}
declare module "@qiwi/semantic-release-gh-pages-plugin/target/es5/interface.js" {
import type { BranchSpec, Context } from "semantic-release";
declare export interface ILogger {
log: (message: string, ...vars: any[]) => void;
error: (message: string, ...vars: any[]) => void;
}
declare export type TAnyMap = {
[key: string]: any,
};
declare export type TStringMap = {
[key: string]: string,
};
declare export type TContext = {
...Context,
...{
env: TStringMap,
branch?: Exclude<BranchSpec, string>,
cwd: string,
options: {
...TAnyMap,
...{
publish?: Array<any>,
verifyConditions?: Array<any>,
...
},
},
...
},
};
declare export interface IGhpagesPluginConfig {
src: string;
dst: string;
ciBranch: string;
docsBranch: string;
pullTagsBranch?: string;
msg: string;
repo: string;
token?: string;
enterprise?: boolean;
dotfiles?: boolean;
add?: boolean;
pattern?: string;
}
declare export type IPushOpts = {
message: string,
logger: ILogger,
env: TAnyMap,
cwd: string,
...
} & IGhpagesPluginConfig;
}
declare module "@qiwi/semantic-release-gh-pages-plugin/target/es5/util.js" {
import type { ICallable } from "@qiwi/substrate-types";
declare export var catchToSmth: (
fn: ICallable,
smth?: any
) => (...args: any[]) => any;
declare export var anyDefined: (...args: any[]) => any;
declare export var isDirectory: (path: string) => any;
}
declare module "@qiwi/semantic-release-gh-pages-plugin/target/es5/config.js" {
import type {
IGhpagesPluginConfig,
TAnyMap,
TContext,
} from "@qiwi/semantic-release-gh-pages-plugin/target/es5/interface.js";
declare export {
DEFAULT_BRANCH,
DEFAULT_SRC,
DEFAULT_MSG,
DEFAULT_DST,
DEFAULT_ENTERPRISE,
PLUGIN_PATH,
DEFAULT_PULL_TAGS_BRANCH,
DEFAULT_PATTERN,
} from "@qiwi/semantic-release-gh-pages-plugin/target/es5/defaults.js";
declare export var GITIO_REPO_PATTERN: RegExp;
/**
* @private
*/
declare export var extractRepoName: (repoUrl: string) => string;
/**
* @private
*/
declare export var extractRepoDomain: (repoUrl: string) => string;
/**
* @private
*/
declare export var extractRepoToken: (repoUrl: string) => string;
/**
* @private
*/
declare export var getRepoUrl: (
pluginConfig: TAnyMap,
context: TContext,
enterprise: boolean
) => Promise<string>;
/**
* @private
*/
declare export var getUrlFromPackage: () => string;
/**
* @private
*/
declare export var getToken: (env: TAnyMap, repoUrl: string) => string | void;
/**
* @private
*/
declare export var reassembleRepoUrl: (
redirectedUrl: string,
context: TContext
) => string | void;
/**
* @private
*/
declare export var resolveConfig: (
pluginConfig: TAnyMap,
context: TContext,
path?: string,
step?: string
) => Promise<IGhpagesPluginConfig>;
/**
* @private
*/
declare export var resolveOptions: (
pluginConfig: TAnyMap,
context: TContext,
path?: string,
step?: string
) => TAnyMap;
}
declare module "@qiwi/semantic-release-gh-pages-plugin/target/es5/ghpages.js" {
import type { IPushOpts } from "@qiwi/semantic-release-gh-pages-plugin/target/es5/interface.js";
/**
* @private
*/
declare export var OK: {
status: string,
...
};
/**
* @private
*/
declare export var pullTags: (opts: IPushOpts) => Promise<any>;
/**
* @private
*/
declare export var pushPages: (opts: IPushOpts) => Promise<mixed>;
/**
* @private
*/
declare export var _publish: (opts: IPushOpts) => Promise<mixed>;
/**
* @private
*/
declare export var publish: (opts: IPushOpts) => Promise<mixed>;
}
declare module "@qiwi/semantic-release-gh-pages-plugin/target/es5/tpl.js" {
import type {
ILogger,
TAnyMap,
} from "@qiwi/semantic-release-gh-pages-plugin/target/es5/interface.js";
/**
* @private
*/
declare export var render: (
template: string,
context: TAnyMap,
logger: ILogger
) => string;
}
declare module "@qiwi/semantic-release-gh-pages-plugin/target/es5/index.js" {
import type { TContext } from "@qiwi/semantic-release-gh-pages-plugin/target/es5/interface.js";
declare export * from "@qiwi/semantic-release-gh-pages-plugin/target/es5/defaults.js";
declare export var verifyConditions: (
pluginConfig: any,
context: TContext
) => Promise<void>;
declare export var publish: (
pluginConfig: any,
context: TContext
) => Promise<mixed>;
declare var _default: {
verifyConditions: (pluginConfig: any, context: TContext) => Promise<void>,
publish: (pluginConfig: any, context: TContext) => Promise<mixed>,
...
};
declare export default typeof _default;
}