zero-ai
Version:
Zero Ecotope AI
1,046 lines (482 loc) • 23.4 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>aj - Zero UI框架专用前端文档</title>
<meta name="description" content="前端开发框架,官方地址:http://www.vertx-ui.cn" />
<meta name="keywords" content="zero,zero-ui,vert.x" />
<meta name="keyword" content="zero,zero-ui,vert.x" />
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
<link type="text/css" rel="stylesheet" href="styles/zero.css">
<script src="scripts/nav.js" defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav >
<input type="text" id="nav-search" placeholder="Search" />
<h2><a href="index.html">Home</a></h2><h2><a href="http://www.vertxai.cn/document/doc-web/index.html" target="_blank" class="menu-item" id="website_link" >「Api」Zero Ai</a></h2><h2><a href="http://www.vertxui.cn/document/doc-web/index.html" target="_blank" class="menu-item" id="website_link" >「Api」Zero Ui</a></h2><h2><a href="http://www.vertxui.cn/document/doc-web-extension/index.html" target="_blank" class="menu-item" id="website_link" >「Api」Zero Ui Extension</a></h2><h2><a href="http://www.vertxui.cn" target="_blank" class="menu-item" id="website_link" >「Home」Zero UI</a></h2><h2><a href="http://www.vertxai.cn" target="_blank" class="menu-item" id="website_link" >「Home」Zero Ai</a></h2><h2><a href="http://www.vertxup.cn" target="_blank" class="menu-item" id="website_link" >「Home」Zero Framework</a></h2><h2><a href="http://www.origin-x.cn" target="_blank" class="menu-item" id="website_link" >「Home」Origin X Engine</a></h2><h3>Classes</h3><ul><li><a href="E.html">E</a></li></ul><h3>Modules</h3><ul><li><a href="module-__epic.html">__epic</a></li><li><a href="module-ai.html">ai</a><ul class='methods'><li data-type='method'><a href="module-ai.html#.csv">csv</a></li><li data-type='method'><a href="module-ai.html#.data">data</a></li><li data-type='method'><a href="module-ai.html#.init">init</a></li><li data-type='method'><a href="module-ai.html#.key">key</a></li><li data-type='method'><a href="module-ai.html#.md5">md5</a></li><li data-type='method'><a href="module-ai.html#.str">str</a></li><li data-type='method'><a href="module-ai.html#.sync">sync</a></li><li data-type='method'><a href="module-ai.html#.uk">uk</a></li><li data-type='method'><a href="module-ai.html#.uuid">uuid</a></li></ul></li><li><a href="module-aj.html">aj</a><ul class='methods'><li data-type='method'><a href="module-aj.html#.bundle">bundle</a></li><li data-type='method'><a href="module-aj.html#.init">init</a></li><li data-type='method'><a href="module-aj.html#.mod">mod</a></li><li data-type='method'><a href="module-aj.html#.perm">perm</a></li><li data-type='method'><a href="module-aj.html#.plugin">plugin</a></li><li data-type='method'><a href="module-aj.html#.rs">rs</a></li></ul></li><li><a href="module-art.html">art</a><ul class='methods'><li data-type='method'><a href="module-art.html#.complex">complex</a></li><li data-type='method'><a href="module-art.html#.form">form</a></li></ul></li></ul>
</nav>
<div id="main">
<h1 class="page-title">aj</h1>
<section>
<header>
</header>
<article>
<div class="container-overview">
<dl class="details">
</dl>
<div class="description usertext"><h2>aj命令</h2>
<h3>1. 基本使用</h3>
<p>aj命令的专用语法如下:</p>
<pre class="prettyprint source lang-shell"><code>aj <command> [options1|options2|options3...]
</code></pre>
<h3>2. 命令列表</h3>
<table>
<thead>
<tr>
<th>命令执行</th>
<th style="text-align:left">含义</th>
</tr>
</thead>
<tbody>
<tr>
<td>aj perm</td>
<td style="text-align:left">生成某个角色的权限专用Excel数据文件</td>
</tr>
<tr>
<td>aj rs</td>
<td style="text-align:left">为某个接口直接生成系统所需的权限文件,只针对超级管理员(key = <code>e501b47a-c08b-4c83-b12b-95ad82873e96</code>),<br/>若存在其他额外角色可以继续使用命令 <code>aj perm</code> 从超级管理员中拷贝。</td>
</tr>
<tr>
<td>aj plugin</td>
<td style="text-align:left">「工程命令」生成第三方插件专用初始化命令,可为某个 Maven 插件实现初始化流程,包括代码生成。</td>
</tr>
<tr>
<td>aj mod</td>
<td style="text-align:left">模块化专用命令,根据当前环境中的 <strong>路由规划器</strong> 和 <strong>模块规划器</strong> 自动化重写模块化专用配置文件。</td>
</tr>
<tr>
<td>aj init</td>
<td style="text-align:left">「工程命令」根据后端脚手架初始化Zero后端工程命令。</td>
</tr>
<tr>
<td>aj bundle</td>
<td style="text-align:left">OSGI目录初始化专用命令,可以为某个 OSGI 的 Bundle 按相关规范生成目录结构。</td>
</tr>
</tbody>
</table></div>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id=".bundle"><span class="type-signature">(static) </span>bundle<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description usertext">
<h2><code>aj bundle</code></h2>
<h3>1. 命令</h3>
<pre class="prettyprint source lang-shell"><code>aj bundle -p <path>
</code></pre>
<table>
<thead>
<tr>
<th>短参</th>
<th>全参</th>
<th>类型</th>
<th>默认</th>
<th style="text-align:left">含义</th>
</tr>
</thead>
<tbody>
<tr>
<td>-p</td>
<td>--path</td>
<td>String</td>
<td>无</td>
<td style="text-align:left">生成目录规范的主目录。</td>
</tr>
</tbody>
</table>
<h3>2. 介绍</h3>
<p>使用该命令生成一个 OSGI Bundle 专用的目录结构</p>
<h3>3. 执行</h3>
<pre class="prettyprint source lang-shell"><code>ai bundle -p <path>
[Zero AI] Zero Ecotope AI工具项 : <专用工具>
[Zero AI] HomePage : http://www.vertxai.cn
[Zero AI] Github : https://github.com/silentbalanceyh/vertx-ai.git
[Zero AI] Version : 0.3.25 「确认您的Node版本 ( >= 18.x ) 支持ES6, ES7.」
[Zero AI] AI 系统启动......
[Zero AI] Zero AI 加载输入参数:
{
"path": "."
}
[Zero AI] Bundle规范目录创建:.
[Zero AI] 即将拷贝说明文件:
[Zero AI] (Async)成功将数据写入到文件:./specification.txt!
</code></pre>
</div>
<h4 class="name" id=".init"><span class="type-signature">(static) </span>init<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description usertext">
<h2><code>aj init</code></h2>
<h3>1. 命令</h3>
<pre class="prettyprint source lang-shell"><code>aj init -name <name>
</code></pre>
<table>
<thead>
<tr>
<th>短参</th>
<th>全参</th>
<th>类型</th>
<th>默认</th>
<th style="text-align:left">含义</th>
</tr>
</thead>
<tbody>
<tr>
<td>-n</td>
<td>--name</td>
<td>String</td>
<td>(无)</td>
<td style="text-align:left">项目名称以及目录名称。</td>
</tr>
</tbody>
</table>
<h3>2. 介绍</h3>
<p>zero-scaffold项目脚手架初始化专用命令。</p>
<h3>3. 执行</h3>
<pre class="prettyprint source lang-shell"><code>aj init -name test-demo-api
[Zero AI] Zero AI 代码生成工具 : <标准工具>
[Zero AI] HomePage : http://www.vertxai.cn
[Zero AI] Github : https://github.com/silentbalanceyh/vertx-ai.git
[Zero AI] Version : 0.3.2 「确认您的Node版本 ( >= 14.x ) 支持ES6, ES7.」
[Zero AI] Zero AI 系统启动......
[Zero AI] Zero AI 加载输入参数:
{
"name": "test-demo-api"
}
[Zero AI] 工程构建目录:test-demo-api
Cloning into 'test-demo-api'...
remote: Enumerating objects: 949, done.
remote: Counting objects: 100% (949/949), done.
remote: Compressing objects: 100% (176/176), done.
remote: Total 949 (delta 719), reused 944 (delta 717), pack-reused 0
Receiving objects: 100% (949/949), 1.21 MiB | 1.73 MiB/s, done.
Resolving deltas: 100% (719/719), done.
[Zero AI] 执行工程初始化:test-demo-api
[Zero AI] 工程初始化完成:test-demo-api,您可以开始您的Zero Api之行了!
</code></pre>
</div>
<h4 class="name" id=".mod"><span class="type-signature">(static) </span>mod<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description usertext">
<h2><code>aj mod</code></h2>
<h3>1. 命令</h3>
<pre class="prettyprint source lang-shell"><code>aj mod -p <path> -e <extension> -w <write>
</code></pre>
<table>
<thead>
<tr>
<th>短参</th>
<th>全参</th>
<th>类型</th>
<th>默认</th>
<th style="text-align:left">含义</th>
</tr>
</thead>
<tbody>
<tr>
<td>-p</td>
<td>--path</td>
<td>String</td>
<td>无</td>
<td style="text-align:left">模块化OOB数据专用目录。</td>
</tr>
<tr>
<td>-e</td>
<td>--extension</td>
<td>String</td>
<td><code>.xlsx</code></td>
<td style="text-align:left">模块化OOB数据专用文件后缀。</td>
</tr>
<tr>
<td>-w</td>
<td>--write</td>
<td>String</td>
<td><code>REPLACE</code></td>
<td style="text-align:left">写入模式,<code>REPLACE</code>为替换,<code>APPEND</code>为追加。</td>
</tr>
</tbody>
</table>
<h3>2. 介绍</h3>
<p>此命令为 <code>zero-battery</code> 量身打造的命令,用于自动化生成 <code>initialize.json</code> 文件专用,此文件为模块化连接文件。</p>
<h3>3. 执行</h3>
<pre class="prettyprint source lang-shell"><code>aj mod -p src/main/resources/plugin/norm/oob
[Zero AI] Zero Ecotope AI工具项 : <专用工具>
[Zero AI] HomePage : http://www.vertxai.cn
[Zero AI] Github : https://github.com/silentbalanceyh/vertx-ai.git
[Zero AI] Version : 0.3.27 「确认您的Node版本 ( >= 18.x ) 支持ES6, ES7.」
[Zero AI] AI 系统启动......
[Zero AI] Zero AI 加载输入参数:
{
"path": "src/main/resources/plugin/norm/oob",
"extension": ".xlsx",
"write": "REPLACE"
}
[Zero AI] Zero AI 检索模块目录构造配置信息。
[Zero AI] (Sync)成功将数据写入到文件:/Users/.../ox-norm/src/main/resources/plugin/norm/oob/initialize.json!
</code></pre>
</div>
<h4 class="name" id=".perm"><span class="type-signature">(static) </span>perm<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description usertext">
<h2><code>aj perm</code></h2>
<h3>1. 命令</h3>
<pre class="prettyprint source lang-shell"><code>aj perm -r <role> -i <input>
</code></pre>
<table>
<thead>
<tr>
<th>短参</th>
<th>全参</th>
<th>类型</th>
<th>默认</th>
<th style="text-align:left">含义</th>
</tr>
</thead>
<tbody>
<tr>
<td>-r</td>
<td>--role</td>
<td>String</td>
<td>无</td>
<td style="text-align:left">系统中角色的UUID。</td>
</tr>
<tr>
<td>-i</td>
<td>--input</td>
<td>String</td>
<td>无</td>
<td style="text-align:left">另外一个目录,用来合并新权限。</td>
</tr>
</tbody>
</table>
<h3>2. 介绍</h3>
<p>使用该命令生成某个角色的专用权限文件目录(内置所有Zero Extension标准权限),此命令会直接从单个角色中拷贝</p>
<h3>3. 执行</h3>
<pre class="prettyprint source lang-shell"><code>ai perm -r ccc -i input
[Zero AI] Zero AI 1. 准备生成角色对应权限:ID = "ccc" ...
[Zero AI] Zero AI 2. 生成 Zero Extension 权限...
</code></pre>
</div>
<h4 class="name" id=".plugin"><span class="type-signature">(static) </span>plugin<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description usertext">
<h2><code>aj plugin</code></h2>
<h3>1. 命令</h3>
<pre class="prettyprint source lang-shell"><code>aj plugin -m pbc
</code></pre>
<table>
<thead>
<tr>
<th>短参</th>
<th>全参</th>
<th>类型</th>
<th>默认</th>
<th style="text-align:left">含义</th>
</tr>
</thead>
<tbody>
<tr>
<td>-p</td>
<td>--path</td>
<td>String</td>
<td>无</td>
<td style="text-align:left">根据传入路径设置,如果是<code>.</code>则是当前目录,如果不传则从<code>workspace.json</code>中读取。</td>
</tr>
<tr>
<td>-m</td>
<td>--module</td>
<td>String</td>
<td>无</td>
<td style="text-align:left">模块名称,通常是<code>infix-xxx</code>中的<code>xxx</code>名称。</td>
</tr>
<tr>
<td>-c</td>
<td>--config</td>
<td>String</td>
<td><code>workspace.json</code></td>
<td style="text-align:left">配置文件路径。</td>
</tr>
</tbody>
</table>
<h3>2. 介绍</h3>
<p>使用该命令执行插件项目初始化,设置第三方集成项目模板专用。</p>
<h3>3. 执行</h3>
<pre class="prettyprint source lang-shell"><code>aj plugin -m pbc
# ...省略部分...
[Zero AI] Zero AI 系统启动......
[Zero AI] Zero AI 加载输入参数:
{
"module": "pbc",
"config": "workspace.json"
}
[Zero AI] 「Java环境」,后端工作路径:<工作目录>。
[Zero AI] Zero AI 0. 基础环境......
[Zero AI] Zero AI 工作目录:<工作目录>
[Zero AI] Zero AI 1. 执行Plugin命令......
[Zero AI] Zero AI 1.1. 初始化源代码目录......
[Zero AI] 创建目录:<工作目录>/src/main/java/cn
[Zero AI] 创建目录:<工作目录>/src/main/java/cn/originx
[Zero AI] 创建目录:<工作目录>/src/main/java/cn/originx/pbc
[Zero AI] 创建目录:<工作目录>/src/main/java/cn/originx/pbc/component
[Zero AI] 创建目录:<工作目录>/src/main/java/cn/originx/pbc/cv
[Zero AI] 创建目录:<工作目录>/src/main/java/cn/originx/pbc/error
[Zero AI] 创建目录:<工作目录>/src/main/java/cn/originx/pbc/input
[Zero AI] 创建目录:<工作目录>/src/main/java/cn/originx/pbc/output
[Zero AI] 创建目录:<工作目录>/src/main/java/cn/originx/pbc/refine
[Zero AI] 创建目录:<工作目录>/src/main/java/cn/originx/pbc/plugin
[Zero AI] Zero AI 1.2. 初始化资源目录......
[Zero AI] 创建目录:<工作目录>/src/main/resources/plugin
[Zero AI] 创建目录:<工作目录>/src/main/resources/plugin/pbc
[Zero AI] 创建目录:<工作目录>/src/main/resources/plugin/pbc/annal
[Zero AI] Zero AI 2. 生成代码......
[Zero AI] Zero AI 2.1. backlog日志配置......
[Zero AI] (Sync)成功将数据写入到文件:<工作目录>/src/main/resources/plugin/pbc/annal/infix.xml!
[Zero AI] Zero AI 2.2.1. 「默认」集成配置......
[Zero AI] (Sync)成功将数据写入到文件:<工作目录>/src/main/resources/plugin/pbc/integration.json!
[Zero AI] Zero AI 2.2.2. 「开发」集成配置......
[Zero AI] (Sync)成功将数据写入到文件:<工作目录>/src/main/resources/plugin/pbc/integration-dev.json!
[Zero AI] Zero AI 2.2.3. 「生产」集成配置......
[Zero AI] (Sync)成功将数据写入到文件:<工作目录>/src/main/resources/plugin/pbc/integration-prod.json!
[Zero AI] Zero AI 2.2.4. 基础配置......
[Zero AI] (Sync)成功将数据写入到文件:<工作目录>/src/main/resources/plugin/pbc/configuration.json!
[Zero AI] Zero AI 2.3.1. 常量处理......
[Zero AI] (Sync)成功将数据写入到文件:<工作目录>/src/main/java/cn/originx/pbc/cv/PbCv.java!
[Zero AI] Zero AI 2.3.2. Before/After 插件处理......
[Zero AI] (Sync)成功将数据写入到文件:<工作目录>/src/main/java/cn/originx/pbc/plugin/AbstractPbBefore.java!
[Zero AI] (Sync)成功将数据写入到文件:<工作目录>/src/main/java/cn/originx/pbc/plugin/AbstractPbAfter.java!
[Zero AI] Zero AI 2.3.3. Refine 工具处理......
[Zero AI] (Sync)成功将数据写入到文件:<工作目录>/src/main/java/cn/originx/pbc/refine/PbLog.java!
[Zero AI] (Sync)成功将数据写入到文件:<工作目录>/src/main/java/cn/originx/pbc/refine/PbPin.java!
[Zero AI] (Sync)成功将数据写入到文件:<工作目录>/src/main/java/cn/originx/pbc/refine/Pb.java!
[Zero AI] Zero AI 2.3.4. Error 异常类处理......
[Zero AI] (Sync)成功将数据写入到文件:<工作目录>/src/main/java/cn/originx/pbc/error/_501PbIoNullException.java!
[Zero AI] Zero AI 2.3.5. Component 通道组件......
[Zero AI] (Sync)成功将数据写入到文件:<工作目录>/src/main/java/cn/originx/pbc/component/AbstractPbComponent.java!
[Zero AI] Zero AI 2.3.6. In 组件处理......
[Zero AI] (Sync)成功将数据写入到文件:<工作目录>/src/main/java/cn/originx/pbc/input/PbIn.java!
[Zero AI] (Sync)成功将数据写入到文件:<工作目录>/src/main/java/cn/originx/pbc/input/AbstractPbIn.java!
[Zero AI] Zero AI 2.3.7. Out 组件处理......
[Zero AI] (Sync)成功将数据写入到文件:<工作目录>/src/main/java/cn/originx/pbc/output/PbIo.java!
[Zero AI] (Sync)成功将数据写入到文件:<工作目录>/src/main/java/cn/originx/pbc/output/AbstractPbIo.java!
[Zero AI] (Sync)成功将数据写入到文件:<工作目录>/src/main/java/cn/originx/pbc/output/PbIoAdd.java!
[Zero AI] (Sync)成功将数据写入到文件:<工作目录>/src/main/java/cn/originx/pbc/output/PbIoUpdate.java!
[Zero AI] (Sync)成功将数据写入到文件:<工作目录>/src/main/java/cn/originx/pbc/output/PbIoDelete.java!
[Zero AI] Zero AI 3. 执行完成......
</code></pre>
</div>
<h4 class="name" id=".rs"><span class="type-signature">(static) </span>rs<span class="signature">()</span><span class="type-signature"></span></h4>
<dl class="details">
</dl>
<div class="description usertext">
<h2><code>aj rs</code></h2>
<h3>1. 命令</h3>
<pre class="prettyprint source lang-shell"><code>aj rs -c <config> -o <output>
</code></pre>
<table>
<thead>
<tr>
<th>短参</th>
<th>全参</th>
<th>类型</th>
<th>默认</th>
<th style="text-align:left">含义</th>
</tr>
</thead>
<tbody>
<tr>
<td>-c</td>
<td>--config</td>
<td>String</td>
<td>无</td>
<td style="text-align:left">配置文件路径。</td>
</tr>
<tr>
<td>-o</td>
<td>--output</td>
<td>String</td>
<td>无</td>
<td style="text-align:left">输出目录路径。</td>
</tr>
</tbody>
</table>
<h3>2. 介绍</h3>
<p>此命令为 <code>zero-crud</code> 模块量身打造的命令,最新BUG修复之后,您可以直接使用此命令生成专用 Excel/Json 配置文件,并将此文件数据导入到系统中,即可直接连接 <code>zero-rbac</code> 实现接口的权限授权处理。</p>
<h3>3. 执行</h3>
<pre class="prettyprint source lang-shell"><code>aj rs -c nm-law.json -o .
[Zero AI] Zero Ecotope AI工具项 : <专用工具>
[Zero AI] HomePage : http://www.vertxai.cn
[Zero AI] Github : https://github.com/silentbalanceyh/vertx-ai.git
[Zero AI] Version : 0.3.27 「确认您的Node版本 ( >= 18.x ) 支持ES6, ES7.」
[Zero AI] AI 系统启动......
[Zero AI] Zero AI 加载输入参数:
{
"config": "nm-law.json",
"out": "."
}
[Zero AI] Zero AI 1. 准备生成资源信息..., {"NAME":"法规","MODULE":"doc.law","ID":"nm.law","API":"nm-law","TYPE":"resource.document"}
[Zero AI] Zero AI 2. 生成 Zero Extension 资源文件...
[Zero AI] Zero AI 2.1. 数据加载中,替换原始文件……
[Zero AI] Zero AI 2.2. 分析结果:最大行 - 64,最大列 - 16384。
[Zero AI] Zero AI 2.3. 正在解析表达式......
[Zero AI] Zero AI 2.4. 创建新数据文件......
[Zero AI] Zero AI 执行Worksheet:./nm.law.xlsx。
[Zero AI] Zero AI 3. 资源生成完成...
[Zero AI] Zero AI 4. 准备生成权限信息..., {"NAME":"法规","MODULE":"doc.law","ID":"nm.law","API":"nm-law","TYPE":"resource.document"}
[Zero AI] Zero AI 2.1. 数据加载中,替换原始文件……
[Zero AI] Zero AI 2.2. 分析结果:最大行 - 20,最大列 - 16384。
[Zero AI] Zero AI 2.3. 正在解析表达式......
[Zero AI] Zero AI 2.4. 创建新数据文件......
[Zero AI] Zero AI 执行Worksheet:./falcon.nm.law.xlsx。
[Zero AI] Zero AI 5. 权限文件生成完成...
[Zero AI] Zero AI 执行完成...
[Zero AI] (Async)成功将数据写入到文件:./nm.law.json!
</code></pre>
<h3>4. 配置文件</h3>
<p>此处特殊说明一下输入配置文件的基本格式和内容:</p>
<pre class="prettyprint source lang-json"><code>{
"name": "界面显示的业务模块名称",
"module": "生成资源码、权限码、行为码专用和当前模型绑定的模块名称",
"identifier": "模型的统一标识符,静态和动态都可支持",
"api": "crud接口中的 :actor 参数",
"type": "对应到 S_RESOURCE 中的 TYPE 字段实现资源定义和资源管理专用"
}
</code></pre>
</div>
</article>
</section>
</div>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Sun Jul 23 2023 12:31:31 GMT+0800 (China Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>
<script>prettyPrint();</script>
<script src="scripts/polyfill.js"></script>
<script src="scripts/linenumber.js"></script>
<script src="scripts/search.js" defer></script>
</body>
</html>