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

flowengine-util

v0.0.41-feat.2

Published

* 基于 typescript 的常用函数库。 * Flowengine组件开发SDK。

Downloads

4

Readme

FlowEngine工具库

  • 基于 typescript 的常用函数库。
  • Flowengine组件开发SDK。

安装

npm set registry http://npm.4paradigm.com
npm i automl-util --save

使用FlowEngineSDK

1、组件配置态本地开发说明

基本说明

SDK方法执行依赖运行时URL携带参数,本地开发时需在URL携带必要参数。

例如:localhost:8080/?type=running&templateId=1&workspaceId=1&componentId=113&engineKey=bug-verify-1&rootPath=/automl-engine/93/automl/v1

| 属性 | 说明 | 示例值 | | ------------- | ------------------------------------------ | --------------------------- | | type | 组件配置态运行环境 (FlowEngine、Developer) | running/editing | | templateId | 模板ID | 1 | | componentId | 组件ID | 1 | | workspaceId | 工作区ID | 1 | | rootPath | API地址 | /automl-engine/93/automl/v1 |

获取组件数据

import { FlowEngineSDK } from 'automl-util';

const component = await FlowEngineSDK.Component();
const data = component.get();
console.log(data)
// data => 获取组件配置信息(组件yaml中的solution)

保存组件数据

import { FlowEngineSDK } from 'automl-util';

const component = await FlowEngineSDK.Component();
const resp = await component.save({}) => 
// 保存组件配置信息(组件yaml中的solution)参数传入Object对象(非字符串)

2、组件运行态本地开发说明

基本说明

SDK方法执行依赖运行时URL携带参数,本地开发时需在URL携带必要参数。

例如:localhost:8080/?type=running&instanceId=1&workspaceId=1

| 属性 | 说明 | 示例值 | | ------------- | ------------------------------------------ | ----------------------------| | instanceId | FlowEngine实例ID | 1 | | workspaceId | 工作区ID | 1 |

获取FlowEngine系统参数

import { FlowEngineSDK } from 'automl-util';

const engine = await FlowEngineSDK.Engine();
const systemParam = engine.getSystemParam();
console.log(systemParam);

// systemParam => 组件内获取FlowEngine系统参数

// 系统参数示例结构
interface ISystemParamDto {
    instanceId: number; // 实例ID
    selfLearnerUrl: string; // 自学习服务路径
    batchPredictorUrl: string; // 批量预估服务路径
    engineId: number; // 引擎ID
    engineTemplateId: number; // 模板ID
    engineDataInfo: IEngineDataInfo; // 引擎使用数据组信息
    template: ITemplate; // 引擎模板详细信息
    engineKey: string; // EngineKey
    engineName: string; // Engine名称
    isTemplateDebug: boolean; // 是否开启模板查看权限
    workspaceId: number; // WorkspaceId
    versionName: string; // 引擎版本名称
    isTemplateComplex: boolean; // 是否单表模式
    runningENV: "aio"; // 运行环境 
    systemTime: number; // 系统当前时间
}

组件跳转FlowEngine页面

import { FlowEngineSDK } from 'automl-util';

const message = await FlowEngineSDK.EngineMessage();
message.redirectToRoot();
// => 跳转到FlowEngine首页

message.redirectTo({
    url:"/template"
});
// => 跳转到FlowEngine指定路径