export declare type PackageManangerType = 'npm' | 'yarn'; export declare type BuildEnvironment = 'debug' | 'test' | 'rc' | 'prod'; export interface Config { /** * 类型:docker 默认, miniProgram 小程序 */ type?: 'docker' | 'miniProgram'; /** * 标识 */ name: string; /** * 名称 */ title?: string; install?: PackageManangerType | { type: PackageManangerType; frozenLockfile: boolean; preferOffline: boolean; }; build?: string | { [key in BuildEnvironment]: string; }; upload?: { entry: string; output: { prefix: string; exclude?: string[]; include?: string[]; }; }; publish?: { entry: string; triggerUrl?: string; version?: string; output: { repository: string; files: string[]; /** * 发布路径 */ publicPath: string; /** * 访问路径,不配置的话,采用 publicPath */ publicLocation?: string; server?: { host: string | { [key in BuildEnvironment]?: string; }; location: string; }; }; }; } export interface GitlabTrigger { /** * @example push */ object_kind: string; /** * @example push */ event_name: string; /** * 触发前的 commit * @example ddebd1f5cb6437cebe3f69ac664e99f8f83fe3f6 */ before: string; /** * 触发后的 commit * @example 7a55506ddf2a959a1352b92a5160c89869d55c37 */ after: string; /** * 触发分支 * @example 'refs/heads/master' */ ref: string; /** * 切出代码的 commit * @example 7a55506ddf2a959a1352b92a5160c89869d55c37 */ checkout_sha: string; merge_id?: number; /** * */ message: string | null; /** * 用户 ID * @example 296 */ user_id: number; /** * 用户昵称 */ user_name: string; /** * 用户名 */ user_username: string; /** * 用户邮箱 */ user_email: string; /** * 用户头像 */ user_avatar: string; /** * 项目 ID */ project_id: number; /** * 项目信息 */ project: { id: number; /** * 项目名称 * @example temp */ name: string; description: string; /** * 访问地址 * @example http://gitlab.szy.net/fed/temp */ web_url: string; avatar_url: null; /** * Git SSH 地址 * @example git@gitlab.szy.net:fed/temp.git */ git_ssh_url: string; /** * Git HTTP 地址 */ git_http_url: string; /** * Git 命名空间 */ namespace: string; /** * 可见性级别 */ visibility_level: number; /** * 带命名空间的路径 * @example fed/temp */ path_with_namespace: string; /** * 默认分支 * @example master */ default_branch: string; ci_config_path: string; homepage: string; url: string; ssh_url: string; http_url: string; }; commits: { id: string; message: string; title: string; /** * @example 2021-06-17T11:58:52+08:00 */ timestamp: string; /** * @example http://gitlab.szy.net/fed/temp/-/commit/7a55506ddf2a959a1352b92a5160c89869d55c37 */ url: string; author: { name: string; email: string; }; added: string[]; modified: string[]; removed: string[]; }[]; total_commits_count: number; push_options: { [key: string]: any; }; repository: { /** * @example temp */ name: string; /** * @example git@gitlab.szy.net:fed/temp.git */ url: string; description: string; /** * @example http://gitlab.szy.net/fed/temp */ homepage: string; /** * @example http://gitlab.szy.net/fed/temp */ git_http_url: string; /** * @example git@gitlab.szy.net:fed/temp.git */ git_ssh_url: string; /** * 可见性级别 */ visibility_level: number; }; } export interface Workspace { location: string; workspaceDependencies: string[]; mismatchedWorkspaceDependencies: string[]; } export interface SubPackage { name: string; context: string; config: Config; } export interface CICD { context: string; trigger: GitlabTrigger; config: Config; packages: SubPackage[]; } export interface UploadPackage { private: true; name: string; repository: string; files: string[]; histories?: string[][]; } export interface MiniProject { appid: string; type: 'miniProgram' | 'miniProgramPlugin' | 'miniGame' | 'miniGamePlugin'; projectPath: string; privateKeyPath: string; ignores: string[]; } export * from '../typing';