UNPKG

zero-ai

Version:
1,880 lines (1,090 loc) 37.7 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>ai - 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">ai</h1> <section> <header> </header> <article> <div class="container-overview"> <dl class="details"> </dl> <div class="description usertext"><h2>ai命令</h2> <h3>1. 基本使用</h3> <p>ai命令的专用语法如下:</p> <pre class="prettyprint source lang-shell"><code>ai &lt;command> [options1|options2|options3...] </code></pre> <h3>2. 命令列表</h3> <blockquote> <p>若命令带了 <code>(M)</code>,则表示 MacOS 系统中,会将生成结果直接拷贝到剪切板中随后可直接粘贴。</p> </blockquote> <table> <thead> <tr> <th>命令执行</th> <th style="text-align:left">含义</th> </tr> </thead> <tbody> <tr> <td>ai uuid</td> <td style="text-align:left">(M) 随机生成一定数量的UUID字符串</td> </tr> <tr> <td>ai csv</td> <td style="text-align:left">读取数据文件中的Array数组数据,然后转换成csv的文件格式输出。</td> </tr> <tr> <td>ai uk</td> <td style="text-align:left">检查数据文件中的 Data 数据是否符合唯一性约束,可直接针对批量数据执行唯一性检查。</td> </tr> <tr> <td>ai data</td> <td style="text-align:left">专用数据生成器,可根据您的输入生成两个格式的Json数据:<code>Object/Array</code></td> </tr> <tr> <td>ai key</td> <td style="text-align:left">为输入数据中的Array或Object追加<code>UUID</code>格式的字段,字段可配置,默认为<code>field = key</code>属性。</td> </tr> <tr> <td>ai str</td> <td style="text-align:left">(M) 生成随机字符串。</td> </tr> <tr> <td>ai md5</td> <td style="text-align:left">(M) 针对输入字符串进行符合 Zero 规范的 MD5 加密处理。</td> </tr> <tr> <td>ai init</td> <td style="text-align:left">「工程命令」Zero前端工程初始化专用命令。</td> </tr> <tr> <td>ai sync</td> <td style="text-align:left">「工程命令」Zero前端工程框架同步专用命令(更新Zero Ui框架专用)。</td> </tr> </tbody> </table> <h3>3. 数据通用格式</h3> <p><strong>带data节点</strong></p> <pre class="prettyprint source lang-json"><code>{ &quot;data&quot;: [ { &quot;name&quot;: &quot;Lang1&quot;, &quot;email&quot;: &quot;lang.yu1@hpe.com&quot; }, { &quot;name&quot;: &quot;Lang2&quot;, &quot;email&quot;: &quot;lang.yu2@hpe.com&quot; } ] } </code></pre> <p><strong>直接格式</strong></p> <pre class="prettyprint source lang-json"><code>[ { &quot;name&quot;: &quot;Lang1&quot;, &quot;email&quot;: &quot;lang.yu1@hpe.com&quot; }, { &quot;name&quot;: &quot;Lang2&quot;, &quot;email&quot;: &quot;lang.yu2@hpe.com&quot; } ] </code></pre></div> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id=".csv"><span class="type-signature">(static) </span>csv<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description usertext"> <h2><code>ai csv</code></h2> <h3>1. 命令</h3> <pre class="prettyprint source lang-shell"><code>ai csv -p &lt;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> <tr> <td>-c</td> <td>--config</td> <td>String</td> <td>null</td> <td style="text-align:left">配置文件路径。</td> </tr> <tr> <td>-s</td> <td>--separator</td> <td>String</td> <td><code>,</code></td> <td style="text-align:left">Csv文件的分隔符设置。</td> </tr> </tbody> </table> <h3>2. 介绍</h3> <p>使用该命令将读取的Array数组数据转换成csv的文件格式</p> <h3>3. 执行</h3> <pre class="prettyprint source lang-shell"><code>ai csv -p csv.json # ...省略部分... [Zero AI] Zero AI 系统启动...... [Zero AI] Zero AI 加载输入参数: { &quot;path&quot;: &quot;csv.json&quot;, &quot;config&quot;: null, &quot;separator&quot;: &quot;,&quot; } [Zero AI] 使用分隔符:, [Zero AI] (Async)成功将数据写入到文件:./9bfe660a-d1be-48af-914f-97d996278086.csv! </code></pre> <p>输出的格式如下</p> <pre class="prettyprint source lang-csv"><code>name,email Lang1,lang.yu1@hpe.com Lang2,lang.yu2@hpe.com </code></pre> <h3>4. 特殊说明</h3> <h4>4.1. 数据文件格式</h4> <p>「通用(略)」数据部分必须对等,从第一个元素开始执行所有的字段解析,如果字段不匹配则直接跳过。</p> <h4>4.2. 带mapping配置文件</h4> <p><strong>csv.zero</strong></p> <pre class="prettyprint source lang-shell"><code># KV; 为文件前缀 KV; name=Name,email=Email </code></pre> <p><strong>多余的输出</strong></p> <pre class="prettyprint source lang-shell"><code>....... [Zero AI] 映射配置数据: { &quot;name&quot;: &quot;Name&quot;, &quot;email&quot;: &quot;Email&quot; } [Zero AI] 使用分隔符:, [Zero AI] 字段执行转换:name -> Name [Zero AI] 字段执行转换:email -> Email ....... </code></pre> <p><strong>最终数据</strong></p> <pre class="prettyprint source lang-csv"><code>Name,Email Lang1,lang.yu1@hpe.com Lang2,lang.yu2@hpe.com </code></pre> </div> <h4 class="name" id=".data"><span class="type-signature">(static) </span>data<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description usertext"> <h2><code>ai data</code></h2> <h3>1. 命令</h3> <pre class="prettyprint source lang-shell"><code>ai data -c &lt;config> </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>--out</td> <td>String</td> <td><code>.</code></td> <td style="text-align:left">输出目录文件路径,文件名随机UUID。</td> </tr> <tr> <td>-j</td> <td>--json</td> <td>Boolean</td> <td>false</td> <td style="text-align:left">是否生成Object数据格式,true则生成,否则生成Array格式。</td> </tr> <tr> <td>-n</td> <td>--number</td> <td>Number</td> <td>23</td> <td style="text-align:left">只有<code>json = false</code>时生效,生成Array的数据条数。</td> </tr> </tbody> </table> <h3>2. 介绍</h3> <p>根据规则随机生成数据Object/Array的专用命令。</p> <h3>3. 执行</h3> <pre class="prettyprint source lang-shell"><code>ai data -c data.zero -j true # ...省略部分... [Zero AI] Zero AI 系统启动...... [Zero AI] Zero AI 加载输入参数: { &quot;config&quot;: &quot;data.zero&quot;, &quot;out&quot;: &quot;.&quot;, &quot;json&quot;: &quot;true&quot;, &quot;number&quot;: 23 } [Zero AI] 处理过后的完整配置信息: { &quot;number&quot;: 23, &quot;json&quot;: &quot;true&quot;, &quot;config&quot;: { &quot;key&quot;: &quot;Guid&quot;, &quot;code&quot;: &quot;Code&quot;, &quot;array1&quot;: [ &quot;A&quot;, &quot;B&quot;, &quot;C&quot; ], &quot;fixed&quot;: &quot;$FIXED:测试值&quot;, &quot;date1&quot;: &quot;ISO&quot; } } [Zero AI] (Async)成功将数据写入到文件:./4f945df8-9d27-4169-9b18-d6d6385a310c.json! </code></pre> <h3>4. 生成器设置</h3> <h4>4.1. 生成器说明</h4> <table> <thead> <tr> <th>生成规则</th> <th style="text-align:left">说明</th> </tr> </thead> <tbody> <tr> <td>[]</td> <td style="text-align:left">从数组中随机读取一个元素执行赋值。</td> </tr> <tr> <td>$FIX:X</td> <td style="text-align:left">生成固定值<code>X</code>赋值给记录中的属性。</td> </tr> <tr> <td>Guid</td> <td style="text-align:left">随机生成UUID字符串。</td> </tr> <tr> <td>Code</td> <td style="text-align:left">系统编码字符串(只支持大写和点操作符27个字符),生成长度为6。</td> </tr> <tr> <td>HeadCount</td> <td style="text-align:left">企业内部员工数量。</td> </tr> <tr> <td>Mobile</td> <td style="text-align:left">手机号码。</td> </tr> <tr> <td>Phone</td> <td style="text-align:left">座机号码。</td> </tr> <tr> <td>Http</td> <td style="text-align:left">生成<code>http://</code>链接。</td> </tr> <tr> <td>Https</td> <td style="text-align:left">生成<code>https://</code>链接。</td> </tr> <tr> <td>Ftp</td> <td style="text-align:left">生成<code>ftp://</code>链接。</td> </tr> <tr> <td>Domain</td> <td style="text-align:left">生成随机域名。</td> </tr> <tr> <td>Protocol</td> <td style="text-align:left">随机生成协议。</td> </tr> <tr> <td>IP</td> <td style="text-align:left">随机生成IP地址。</td> </tr> <tr> <td>Bool</td> <td style="text-align:left">随机布尔值。</td> </tr> <tr> <td>Color</td> <td style="text-align:left">随机Web色彩:<code>#xxxxxx</code>格式。</td> </tr> <tr> <td>Version</td> <td style="text-align:left">生成版本号(通常是软件版本号)。</td> </tr> <tr> <td>Percent</td> <td style="text-align:left">随机百分数。</td> </tr> <tr> <td>Zip</td> <td style="text-align:left">随机邮编。</td> </tr> <tr> <td>Email</td> <td style="text-align:left">随机电子信箱。</td> </tr> <tr> <td>Region</td> <td style="text-align:left">随机区域信息。</td> </tr> <tr> <td>Province</td> <td style="text-align:left">随机省会信息。</td> </tr> <tr> <td>City</td> <td style="text-align:left">随机城市信息。</td> </tr> <tr> <td>CityFull</td> <td style="text-align:left">随机城市全称,带区域。</td> </tr> <tr> <td>County</td> <td style="text-align:left">随机二级县。</td> </tr> <tr> <td>CountyFull</td> <td style="text-align:left">随机二级县全称。</td> </tr> <tr> <td>Tld</td> <td style="text-align:left">随机顶级域名。</td> </tr> <tr> <td>CnName</td> <td style="text-align:left">随机姓名。</td> </tr> <tr> <td>CnFirst</td> <td style="text-align:left">随机姓。</td> </tr> <tr> <td>CnCompany</td> <td style="text-align:left">随机公司。</td> </tr> <tr> <td>CnDept</td> <td style="text-align:left">随机部门。</td> </tr> <tr> <td>CnSection</td> <td style="text-align:left">随机科室。</td> </tr> <tr> <td>CnScope</td> <td style="text-align:left">随机范围。</td> </tr> <tr> <td>CnAddress</td> <td style="text-align:left">随机地址。</td> </tr> <tr> <td>CnText</td> <td style="text-align:left">随机段落文字。</td> </tr> <tr> <td>CnSentence</td> <td style="text-align:left">随机句子。</td> </tr> <tr> <td>CnTitle</td> <td style="text-align:left">随机标题。</td> </tr> <tr> <td>CnGender</td> <td style="text-align:left">随机性别。</td> </tr> <tr> <td>EnName</td> <td style="text-align:left">随机姓名。</td> </tr> <tr> <td>EnFirst</td> <td style="text-align:left">随机 First Name。</td> </tr> <tr> <td>EnLast</td> <td style="text-align:left">随机 Last Name。</td> </tr> <tr> <td>EnCompany</td> <td style="text-align:left">随机公司。</td> </tr> <tr> <td>EnDept</td> <td style="text-align:left">随机部门。</td> </tr> <tr> <td>EnSection</td> <td style="text-align:left">随机科室。</td> </tr> <tr> <td>EnScope</td> <td style="text-align:left">随机范围。</td> </tr> <tr> <td>EnAddress</td> <td style="text-align:left">随机地址。</td> </tr> <tr> <td>EnText</td> <td style="text-align:left">随机段落文字。</td> </tr> <tr> <td>EnSentence</td> <td style="text-align:left">随机句子。</td> </tr> <tr> <td>EnTitle</td> <td style="text-align:left">随机标题。</td> </tr> <tr> <td>EnGender</td> <td style="text-align:left">随机性别。</td> </tr> <tr> <td>Iso</td> <td style="text-align:left">ISO时间格式。</td> </tr> <tr> <td>Now</td> <td style="text-align:left">当前时间格式。</td> </tr> <tr> <td>Date</td> <td style="text-align:left">日期。</td> </tr> <tr> <td>DateTime</td> <td style="text-align:left">日期/时间。</td> </tr> <tr> <td>Time</td> <td style="text-align:left">时间。</td> </tr> <tr> <td>NumberX</td> <td style="text-align:left">随机数字。</td> </tr> <tr> <td>EnStringX</td> <td style="text-align:left">随机字符串。</td> </tr> <tr> <td>CnStringX</td> <td style="text-align:left">随机字符串。</td> </tr> </tbody> </table> <ul> <li><code>En/Cn</code>前缀分别代表中文和英文。</li> <li><code>NumberX, EnStringX, CnStringX</code>可使用数字当后缀,数值表示长度,从<code>1 - 10</code></li> </ul> <h4>4.2. data.zero例子</h4> <p><strong>配置文件</strong></p> <pre class="prettyprint source lang-shell"><code>P; key=Guid noArray=[&quot;A&quot;,&quot;B&quot;,&quot;C&quot;] noFixed=$FIXED:测试值 code=Code headCount=HeadCount mobile=Mobile phone=Phone http=Http https=Https ftp=Ftp domain=Domain protocol=Protocol ip=IP bool=Bool color=Color version=Version percent=Percent zip=Zip email=Email region=Region province=Province city=City city2=CityFull county=County countyFull=CountyFull tld=Tld cnName=CnName cnFirst=CnFirst cnCompany=CnCompany cnDept=CnDept cnSection=CnSection cnScope=CnScope cnAddress=CnAddress cnText=CnText cnSentence=CnSentence cnTitle=CnTitle cnGender=CnGender enName=EnName enFirst=EnFirst enLast=EnLast enCompany=EnCompany enDept=EnDept enSection=EnSection enScope=EnScope enAddress=EnAddress enText=EnText enSentence=EnSentence enTitle=EnTitle enGender=EnGender iso=Iso now=Now date=Date datetime=DateTime time=Time </code></pre> <p><strong>数据内容</strong></p> <pre class="prettyprint source lang-json"><code>{ &quot;data&quot;: { &quot;key&quot;: &quot;23121742-2dab-4ac6-b578-2f6720410cfb&quot;, &quot;noArray&quot;: &quot;C&quot;, &quot;noFixed&quot;: &quot;测试值&quot;, &quot;code&quot;: &quot;KPEX.T&quot;, &quot;headCount&quot;: 929, &quot;mobile&quot;: &quot;18488562585&quot;, &quot;phone&quot;: &quot;(012) 4610 1140&quot;, &quot;http&quot;: &quot;http://atrtyq.lu/oqkpau&quot;, &quot;https&quot;: &quot;https://qpvpuuvfk.do/hrfmjfp&quot;, &quot;ftp&quot;: &quot;ftp://osonkoesp.bf/tzghunec&quot;, &quot;domain&quot;: &quot;vqjxomib.hk&quot;, &quot;protocol&quot;: &quot;mid&quot;, &quot;ip&quot;: &quot;64.198.160.131&quot;, &quot;bool&quot;: false, &quot;color&quot;: &quot;#f2d779&quot;, &quot;version&quot;: &quot;3.569&quot;, &quot;percent&quot;: &quot;0.09&quot;, &quot;zip&quot;: &quot;664855&quot;, &quot;email&quot;: &quot;w.omwjnhtfyg@ydjyl.ml&quot;, &quot;region&quot;: &quot;华南&quot;, &quot;province&quot;: &quot;山东省&quot;, &quot;city&quot;: &quot;来宾市&quot;, &quot;city2&quot;: &quot;台湾 基隆市&quot;, &quot;county&quot;: &quot;普兰店市&quot;, &quot;countyFull&quot;: &quot;吉林省 辽源市 东辽县&quot;, &quot;tld&quot;: &quot;gi&quot;, &quot;cnName&quot;: &quot;梁桂英&quot;, &quot;cnFirst&quot;: &quot;&quot;, &quot;cnCompany&quot;: &quot;除成地界记头布公司&quot;, &quot;cnDept&quot;: &quot;形东严克部&quot;, &quot;cnSection&quot;: &quot;及着系科室&quot;, &quot;cnScope&quot;: &quot;范围效教对&quot;, &quot;cnAddress&quot;: &quot;华南湖南省 郴州市 临武县克加头被&quot;, &quot;cnText&quot;: &quot;地量好和儿县国主然格作提阶行。见快油个革想除当术取且可强地及至接院......&quot;, &quot;cnSentence&quot;: &quot;每光越主识比习接问织眼导社连且到教。&quot;, &quot;cnTitle&quot;: &quot;来却后市定越下较&quot;, &quot;cnGender&quot;: &quot;&quot;, &quot;enName&quot;: &quot;Matthew Clark&quot;, &quot;enFirst&quot;: &quot;Frank&quot;, &quot;enLast&quot;: &quot;Allen&quot;, &quot;enCompany&quot;: &quot;Rvo Ynfg Ickxlfloy Vuux Company&quot;, &quot;enDept&quot;: &quot;Wnqxdzhse Ysericfry Vfewslfgdf Wqlxd Department&quot;, &quot;enSection&quot;: &quot;Vxdialugp Rdwicyvh Section&quot;, &quot;enScope&quot;: &quot;Scope: 持太&quot;, &quot;enAddress&quot;: &quot;Sandra, State Hinp, Street Martinez&quot;, &quot;enText&quot;: &quot;Nlebzn thwuouuth holdtxltqm npqb fzlsr smhjohs .......&quot;, &quot;enSentence&quot;: &quot;Ufhnqddg eikesnc xawwb vsmuvop qhorlgvel .......&quot;, &quot;enTitle&quot;: &quot;Feyv Apareaaif Ygnddotmr Jryvw&quot;, &quot;enGender&quot;: &quot;Female&quot;, &quot;iso&quot;: &quot;2021-03-16T09:54:43.442Z&quot;, &quot;now&quot;: &quot;2021-03-16 17:54:43&quot;, &quot;date&quot;: &quot;1988-11-05&quot;, &quot;datetime&quot;: &quot;1989-04-05 17:40:52&quot;, &quot;time&quot;: &quot;23:16:00&quot; } } </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>ai init</code></h2> <h3>1. 命令</h3> <pre class="prettyprint source lang-shell"><code>ai init -name &lt;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>vertx-ui项目脚手架初始化专用命令。</p> <h3>3. 执行</h3> <pre class="prettyprint source lang-shell"><code>ai init -name test-demo [Zero AI] Zero AI 代码生成工具 : &lt;标准工具> [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 加载输入参数: { &quot;name&quot;: &quot;test-demo&quot; } [Zero AI] 工程构建目录:test-demo Cloning into 'test-demo'... remote: Enumerating objects: 888, done. remote: Counting objects: 100% (888/888), done. remote: Compressing objects: 100% (538/538), done. remote: Total 36593 (delta 445), reused 610 (delta 339), pack-reused 35705 Receiving objects: 100% (36593/36593), 29.09 MiB | 151.00 KiB/s, done. Resolving deltas: 100% (24009/24009), done. [Zero AI] 执行工程初始化:test-demo [Zero AI] (Sync)成功将数据写入到文件:test-demo/package.json! [Zero AI] 执行后期处理:...... [Zero AI] 资源清理中:rm -rf test-demo/.zero/* [Zero AI] 资源清理中:rm -rf test-demo/document/doc-web/* [Zero AI] 资源清理中:rm -rf test-demo/document/doc-web-extension/* [Zero AI] 资源清理中:rm -rf test-demo/guide/ [Zero AI] 资源清理中:rm -rf test-demo/_config.yml [Zero AI] 资源清理中:rm -rf test-demo/CNAME [Zero AI] 资源清理中:rm -rf test-demo/data.json [Zero AI] 资源清理中:rm -rf test-demo/LICENSE [Zero AI] 资源清理中:rm -rf test-demo/package-lock.json [Zero AI] 资源清理中:rm -rf test-demo/yarn.lock [Zero AI] 工程初始化完成:test-demo,您可以开始您的Zero Ui之行了! </code></pre> </div> <h4 class="name" id=".key"><span class="type-signature">(static) </span>key<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description usertext"> <h2><code>ai key</code></h2> <h3>1. 命令</h3> <pre class="prettyprint source lang-shell"><code>ai key -p &lt;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> <tr> <td>-f</td> <td>--field</td> <td>String</td> <td>key</td> <td style="text-align:left">追加的UUID的字段名。</td> </tr> </tbody> </table> <h3>2. 介绍</h3> <p>使用该命令针对数据中的所有节点追加<code>field = key</code>的UUID值。</p> <h3>3. 执行</h3> <pre class="prettyprint source lang-shell"><code>ai key -p key # ...省略部分... [Zero AI] Zero AI 系统启动...... [Zero AI] Zero AI 加载输入参数: { &quot;path&quot;: &quot;key&quot;, &quot;field&quot;: &quot;key&quot; } [Zero AI] (Async)成功将数据写入到文件:key/key2.json! [Zero AI] (Async)成功将数据写入到文件:key/key3.json! [Zero AI] (Async)成功将数据写入到文件:key/key1.json! </code></pre> </div> <h4 class="name" id=".md5"><span class="type-signature">(static) </span>md5<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description usertext"> <h2><code>ai md5</code></h2> <h3>1. 命令</h3> <pre class="prettyprint source lang-shell"><code>ai md5 -i &lt;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>-i</td> <td>--input</td> <td>String</td> <td></td> <td style="text-align:left">输入需要MD5加密的原始字符串。</td> </tr> </tbody> </table> <h3>2. 介绍</h3> <p>使用该命令加密输入字符串,如果平台支持还会拷贝到剪切板中,目前支持的操作系统:</p> <ul> <li><code>darwin</code>:MacOs苹果操作系统</li> </ul> <h3>3. 执行</h3> <pre class="prettyprint source lang-shell"><code>ai md5 -i smaveapp lang@LangYus-MacBook-Pro [Zero AI] Zero AI 代码生成工具 : &lt;标准工具> [Zero AI] HomePage : http://www.vertxai.cn [Zero AI] Github : https://github.com/silentbalanceyh/vertx-ai.git [Zero AI] Version : 0.3.19 「确认您的Node版本 ( >= 14.x ) 支持ES6, ES7.」 [Zero AI] Zero AI 系统启动...... [Zero AI] Zero AI 加载输入参数: { &quot;input&quot;: &quot;smaveapp&quot; } [Zero AI] 当前操作系统:darwin 443196C59BF602102141607D992702EE [Zero AI] 加密的字符串已经成功拷贝到剪切板中! </code></pre> </div> <h4 class="name" id=".str"><span class="type-signature">(static) </span>str<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description usertext"> <h2><code>ai str</code></h2> <h3>1. 命令</h3> <pre class="prettyprint source lang-shell"><code>ai str -n &lt;N> -l &lt;N> </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>--number</td> <td>Number</td> <td>1</td> <td style="text-align:left">指定需要生成随机字符串的数量,默认生成1个随机字符串值,<code>\n</code>符号分割。</td> </tr> <tr> <td>-l</td> <td>--length</td> <td>Number</td> <td>64</td> <td style="text-align:left">指定随机字符串长度,默认长度64。</td> </tr> </tbody> </table> <h3>2. 执行</h3> <p>使用该命令生成指定数量的随机字符串,如果平台支持还会拷贝到剪切板中,目前支持的操作系统:</p> <ul> <li><code>darwin</code>:MacOs苹果操作系统</li> </ul> <h3>3. 执行</h3> <pre class="prettyprint source lang-shell"><code>ai str lang@LangYus-MacBook-Pro [Zero AI] Zero AI 代码生成工具 : &lt;标准工具> [Zero AI] HomePage : http://www.vertxai.cn [Zero AI] Github : https://github.com/silentbalanceyh/vertx-ai.git [Zero AI] Version : 0.3.5 「确认您的Node版本 ( >= 14.x ) 支持ES6, ES7.」 [Zero AI] Zero AI 系统启动...... [Zero AI] Zero AI 加载输入参数: { &quot;number&quot;: 1, &quot;length&quot;: 64 } [Zero AI] 随机字符串,生成数量:1,长度:64 [Zero AI] 当前操作系统:darwin 5lTe8OsBsi8bw6PbVlS0aftyAfjsmEGjiwXXWpL5IEM3px6ZiM8Vz2nKnnqHFDnv [Zero AI] 生成的随机字符串已经全部成功拷贝到剪切板中! </code></pre> </div> <h4 class="name" id=".sync"><span class="type-signature">(static) </span>sync<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description usertext"> <h2><code>ai sync</code></h2> <h3>1. 命令</h3> <pre class="prettyprint source lang-shell"><code>ai sync -p &lt;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>此命令用于从前端直接更新最新的 Zero Ui 框架部分代码,且在前端新版脚手架中,Zero Ui部分的框架代码全部位于 <code>.gitignore</code> 文件中不作为源代码提交。</p> <h3>3. 执行</h3> <pre class="prettyprint source lang-shell"><code>ai sync [Zero AI] Zero Ecotope AI工具项 : &lt;标准工具> [Zero AI] HomePage : http://www.vertxai.cn [Zero AI] Github : https://github.com/silentbalanceyh/vertx-ai.git [Zero AI] Version : 0.3.30 「确认您的Node版本 ( >= 18.x ) 支持ES6, ES7.」 [Zero AI] AI 系统启动...... [Zero AI] Zero AI 加载输入参数: { &quot;path&quot;: &quot;.zero&quot; } [Zero AI] 发现存在旧代码,正在删除:.zero/scaffold-ui [Zero AI] 拉取最新代码:.zero/scaffold-ui Cloning into '.zero/scaffold-ui'... remote: Enumerating objects: 4932, done. remote: Counting objects: 100% (4932/4932), done. remote: Compressing objects: 100% (4045/4045), done. remote: Total 4932 (delta 677), reused 4644 (delta 499), pack-reused 0 Receiving objects: 100% (4932/4932), 11.34 MiB | 2.12 MiB/s, done. Resolving deltas: 100% (677/677), done. [Zero AI] 开始更新主框架:...... [Zero AI] 处理目录:run-default.sh [Zero AI] 处理目录:run-doc.sh [Zero AI] 处理目录:run-zero.sh [Zero AI] 处理目录:run-zero.bat [Zero AI] 处理目录:run-update.sh [Zero AI] 处理目录:document/ [Zero AI] 处理目录:scripts/ [Zero AI] 处理目录:config/ [Zero AI] 处理目录:src/cab/cn/cerebration/ [Zero AI] 处理目录:src/cab/cn/extension/ [Zero AI] 处理目录:src/cab/cn/economy/ [Zero AI] 处理目录:src/cab/cn/shared.json [Zero AI] 处理目录:src/economy/ [Zero AI] 处理目录:src/entity@em/ [Zero AI] 处理目录:src/extension/ [Zero AI] 处理目录:src/environment/ [Zero AI] 处理目录:src/skin/index.d.ts [Zero AI] 处理目录:src/skin/index.entry.js [Zero AI] 处理目录:src/skin/index.js [Zero AI] 处理目录:src/skin/plot.fn.mix.attr.js [Zero AI] 处理目录:src/skin/plot.fn.of.document.js [Zero AI] 处理目录:src/skin/wait._.v.locale.definition.js [Zero AI] 处理目录:src/skin/wait.fn.skin.initialize.js [Zero AI] 处理目录:src/skin/aroma-library/index.js [Zero AI] 处理目录:src/skin/aroma-library/__.theme.shared/ [Zero AI] 处理目录:src/style/@old/ [Zero AI] 处理目录:src/style/connect/ [Zero AI] 处理目录:src/style/macrocosm/index.scss [Zero AI] 处理目录:src/style/macrocosm/mod.screen.scss [Zero AI] 处理目录:src/style/microcosm/ [Zero AI] 处理目录:src/style/uca/ [Zero AI] 处理目录:src/style/unstable/ [Zero AI] 处理目录:src/style/ux@legacy/ [Zero AI] 处理目录:src/ui/ [Zero AI] 处理目录:src/unfold/ [Zero AI] 处理目录:src/upper/ [Zero AI] 处理目录:src/utter/ [Zero AI] 处理目录:src/ux/ [Zero AI] 处理目录:src/zero/ [Zero AI] 处理目录:src/zest@web/ [Zero AI] 处理目录:src/zion/ [Zero AI] 处理目录:src/zither@em/ [Zero AI] 处理目录:src/zodiac/ [Zero AI] 处理目录:src/zoe@em/ [Zero AI] 处理目录:src/zone/ [Zero AI] 处理目录:src/index.js [Zero AI] 主框架更新完成:.zero/scaffold-ui! </code></pre> </div> <h4 class="name" id=".uk"><span class="type-signature">(static) </span>uk<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description usertext"> <h2><code>ai uk</code></h2> <h3>1. 命令</h3> <pre class="prettyprint source lang-shell"><code>ai uk -p &lt;path> -f &lt;field> </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> <tr> <td>-f</td> <td>--field</td> <td>String</td> <td>(无)</td> <td style="text-align:left">待检查的字段名,字段可使用<code>field1,field2,field3</code>格式检查多个字段。</td> </tr> </tbody> </table> <h3>2. 介绍</h3> <p>使用该命令检查数据文件中的数据是否包含重复属性<code>field = value</code>键值对。</p> <h3>3. 执行</h3> <pre class="prettyprint source lang-shell"><code>ai uk -p uk.json -f name # ...省略部分... [Zero AI] Zero AI 系统启动...... [Zero AI] Zero AI 加载输入参数: { &quot;path&quot;: &quot;uk.json&quot;, &quot;field&quot;: &quot;name&quot; } [Zero AI] 检查字段:[&quot;name&quot;] [Zero AI] 字段出现重复值:name = Lang2 [Zero AI] 系统检查重复值完成! </code></pre> </div> <h4 class="name" id=".uuid"><span class="type-signature">(static) </span>uuid<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> </dl> <div class="description usertext"> <h2><code>ai uuid</code></h2> <h3>1. 命令</h3> <pre class="prettyprint source lang-shell"><code>ai uuid -n &lt;N> </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>--number</td> <td>Number</td> <td>20</td> <td style="text-align:left">指定需要生成UUID值的数量,默认生成20个UUID字符串值,<code>\n</code>符号分割。</td> </tr> </tbody> </table> <h3>2. 介绍</h3> <p>使用该命令生成指定数量的UUID字符串,如果平台支持还会拷贝到剪切板中,目前支持的操作系统:</p> <ul> <li><code>darwin</code>:MacOs苹果操作系统</li> </ul> <h3>3. 执行</h3> <pre class="prettyprint source lang-shell"><code>ai uuid -n 3 # ...省略部分... [Zero AI] Zero AI 系统启动...... [Zero AI] 命令参数: { &quot;number&quot;: &quot;3&quot; } [Zero AI] UUID生成器,生成数量:3 [Zero AI] 当前操作系统:darwin 14ea44ed-5d9a-406a-9912-d95d8f6a8411 5d27ca30-3e74-4a8a-a149-e8d40677d542 a1ddb2ce-eabf-4a95-968d-8e4655207f44 [Zero AI] 生成的UUID已经全部成功拷贝到剪切板中! </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>