npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

zl-pipeline

v1.1.9

Published

[IN DEVELOPMENT] 一个线性的的可编辑流水线工具(页面)

Downloads

269

Readme

ZL-Pipeline

A single-line Pipeline component package (Under Development)

Introduction

Language: [ENGLISH] | [中文]

ZL-Pipeline supports English (enUS) and 简体中文(zhCN)

ZL-Pipeline is a modern pipeline front-end UI with edit function inspired by Jenkins Blue Ocean built with Element Plus on Vue 3 + TypeScript.

Compared with Jenkins Blue Ocean, ZL-Pipeline is more light-weighted, modernized and flexible.

ZL-Pipeline is still under-development now, please test carefully before production deployment.

Preview

overall

Pipeline View

edit

Node Edit View

Install

Quick Install

Use any package manager to install, for example, use NPM:

npm i zl-pipeline

Dependencies

All needed dependencies are listed below, these packages will be automatically installed with zl-pipeline:

"dependencies": {
    "file-saver": "^2.0.5"
}

If you want to develop ZL-Pipeline locally, you need to install these devDependencies:

"devDependencies": {
    "@element-plus/icons-vue": "^2.3.1",
    "@tsconfig/node20": "^20.1.4",
    "@types/file-saver": "^2.0.7",
    "@types/node": "^20.14.5",
    "@vitejs/plugin-vue": "^5.1.4",
    "@vue/tsconfig": "^0.5.1",
    "element-plus": "^2.8.1",
    "less": "^4.2.0",
    "npm-run-all2": "^6.2.0",
    "typescript": "~5.4.0",
    "unplugin-auto-import": "^0.18.3",
    "unplugin-icons": "^0.19.3",
    "unplugin-vue-components": "^0.27.4",
    "vite": "^5.3.1",
    "vite-plugin-dts": "^4.2.2",
    "vue": "^3.4.29",
    "vue-router": "^4.3.3",
    "vue-tsc": "^2.0.21"
}

Usage

Import

You can import ZL-Pipeline default fonts by import globally using following CSS.

For Apple users, ZL-Pipeline will use -apple-system font by default

// Google Fonts
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+SC:wght@400;700&display=swap" rel="stylesheet">

// Mirror
<link href="https://fonts.loli.net/css?family=Noto+Sans+SC:wght@400;700&display=swap" rel="stylesheet">

Only ZL-Pipeline module is necessary, ElementPlus does not need to be imported:

// main.ts
import './assets/main.css'

import { createApp } from 'vue'
// Import ZL-Pipeline CSS
import 'zl-pipeline/dist/style.css'
import App from './App.vue'

const app = createApp(App)

app.mount('#app')

ZL-Pipeline supports Tree-Shaking, its eazy to import single component:

<script setup lang="ts">
    /* Import in script */
    import { ZLPipeline, ZLPipelineManage } from 'zl-pipeline'
</script>
<template>
    /* Use in template, some variables are hidden */
    
    <ZLPipeline 
    :pipelineVisible="pipelineVis" 
    :bShowEditModeButton="true" 
    :bAllowEditPopover="false"
    :graphData="pipelineData" 
    :pipelineMeta="pipelineMeta"
    lang="enUS"
    @onClose="closePipeline" 
    @onClickOpenNode="openNodePop"
    @onClickOpenStatus="openStatusPop"
    />

    <ZLPipelineManage 
    :pipelineVisible="manageVis" 
    :pipelineMeta="pipelineMeta" 
    :graphData="pipelineManageData"
    lang="enUS"
    @onClose="closeManage" 
    @onClickOpenNode="openNodePop"
    />

    <ZLPipelineNodePop 
    :popMeta="nodeMeta" 
    :popVisible="popNodeVis" 
    :gameTypeOptions="gameTypes"
    :gameChildNodesOptions="gameChild" 
    lang="enUS"
    @onClose="closeNodePop" 
    />
    
    <ZLPipelineStatusPop 
    :popMeta="popMeta" 
    :popStatusList="popStatusList" 
    :popVisible="popVis" 
    @onClose="closeStatusPop" 
    />
</template>

Available Input Data & Callbacks

There are 4 types of components available in ZL-Pipeline:

  • ZLPipeline : Main pipeline with adjustable edit nodes / view nodes function.
  • ZLPipelineManage : Manage pipeline with no live status shown but can edit pipeline nodes.
  • ZLPipeline-StatusPop : Show pipeline node status.
  • ZLPipeline-NodePop : Modify pipeline childnodes.

All of them will receive some certain typed data:

Input:

  • :pipelineVisible :
    • Type: Boolean
    • Desc: Control pipeline display
    • Available: ZLPipeline / ZLPipelineManage
  • :popVisible :
    • Type: Boolean
    • Desc: Control popover display
    • Available: ZLPipeline-StatusPop / ZLPipelineManage-NodePop
  • :popMeta :
    • Type: Object<popMetaStatus>
    • Desc: Popover metadata for StatusPop (e.g. Title)
    • Available: ZLPipeline-StatusPop
  • :popMeta :
    • Type: inputGraphData
    • Desc: Popover metadata for NodePop (e.g. Title)
    • Available: ZLPipeline-NodePop
  • :popStatusList :
    • Type: Object<popStatusList>
    • Desc: Popover status data for StatusPop
    • Available: ZLPipeline-StatusPop
  • :bShowEditModeButton :
    • Type: Boolean
    • Desc: Control show pipeline edit mode button
    • Available: ZLPipeline
  • :bAllowEditPopover :
    • Type: Boolean
    • Desc: Control show pipeline edit popover
    • Available: ZLPipeline
  • :graphData :
    • Type: Array<inputGraphData>
    • Desc: Pipeline full data
    • Available: ZLPipeline / ZLPipelineManage
  • :pipelineMeta :
    • Type: inputPipelineMetaData
    • Desc: Pipeline metadata (e.g. Title)
    • Available: ZLPipeline / ZLPipelineManage
  • :gameChildNodesOptions :
    • Type: Array<inputChildNodeObj>
    • Desc: Edit node popover's child nodes list
    • Available: ZLPipeline-NodePop
  • :gameTypeOptions :
    • Type: Array<string>
    • Desc: Edit node popover's child nodes game types list
    • Available: ZLPipeline-NodePop
  • lang :
    • Type: String
    • Desc: Language selection (Now support zhCN and enUS)
    • Available: All Except ZLPipeline-NodePop

Output (Callback):

  • @onClose :
    • Type: Callback
    • Desc: Emit when user click close button
    • Available: All Components
  • @onChange :
    • Type: Callback
    • Desc: Emit when user change any data (need further development)
    • Available: All Components
  • @onSubmit :
    • Type: Callback
    • Desc: Emit when user click any submit button (need further development)
    • Available: All Components
  • @onClickOpenNode :
    • Type: Callback
    • Desc: Emit when user click any node
    • Available: ZLPipeline / ZLPipelineManage
  • @onClickOpenStatus :
    • Type: Callback
    • Desc: Emit when user click any node status
    • Available: ZLPipeline

Data Structure

inputGraphData

inputGraphData is a special data structure defined in ZLPipeline to show Pipeline view:

[
    {
        name: string
        description: string
        status: string
        // Status: success / running / waiting / failed / paused
        is_enable: boolean
        child: {
            name: string
            script: string
            description: string
            status: string
            is_enable: boolean
            order: number
            game_type: Array<string>
        }
        result: {
            title: string
            time: string
            data: {
                msg: string
                impact: Array<any>
                advice: string
            }
        }
    },
    {
        // Other Nodes
    }
]

popMetaStatus is a special data structure defined in ZLPipeline-StatusPop metadata:

{
    title: string
}

popStatusList is a special data structure defined in ZLPipeline-StatusPop to show results:

[
    {
        title: string
        time: string
        data: {
            msg: string
            impact: Array<any>
            advice: string
        }
    },
    {
        // Other Status
    }
]

inputChildNodeObj is a special data structure defined in ZLPipeline-StatusPop to define available child node list:

{
    label: string,
    value: string
}

Author: Tyuwwe

Date: 2024/11/11