aiot-toolkit 1.2.0-alpha.5 → 1.2.0-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "use strict";const ora=require("ora"),chalk=require("chalk"),inquirer=require("inquirer"),axios=require("axios"),fs=require("fs"),fsExtra=require("fs-extra"),path=require("path"),DIFY_API_BASE_URL="https://mify-be.pt.xiaomi.com",API_PATH="/api/v1/chat-messages",API_KEY="app-f4yeq6almP6pVZd0YVFZ2ZcG",headers={Authorization:`Bearer ${API_KEY}`,"Content-Type":"application/json"},mockData={project_name:"WeatherApp",package_name:"com.example.weatherapp",page_content:{home:'<template>\n <div class="page">\n <div class="header">\n <text class="title">天气预报</text>\n </div>\n <div class="location-bar">\n <text class="location-text">{{locationName}}</text>\n <input type="button" class="location-btn" value="切换城市" onclick="switchCity" />\n </div>\n <div class="current-weather">\n <text class="temp">{{currentTemp}}°</text>\n <text class="weather-desc">{{weatherDesc}}</text>\n <text class="high-low">{{lowTemp}}° / {{highTemp}}°</text>\n </div>\n <div class="weather-detail">\n <div class="detail-item">\n <text class="detail-label">湿度</text>\n <text class="detail-value">{{humidity}}%</text>\n </div>\n <div class="detail-item">\n <text class="detail-label">风力</text>\n <text class="detail-value">{{windLevel}}</text>\n </div>\n <div class="detail-item">\n <text class="detail-label">气压</text>\n <text class="detail-value">{{pressure}}hPa</text>\n </div>\n </div>\n <text class="forecast-title">未来天气预报</text>\n <list class="forecast-list">\n <list-item type="forecast" for="{{forecastData}}" class="forecast-item">\n <text class="day">{{$item.day}}</text>\n <text class="forecast-temp">{{$item.lowTemp}}° / {{$item.highTemp}}°</text>\n <text class="forecast-desc">{{$item.desc}}</text>\n </list-item>\n </list>\n <div class="footer">\n <input type="button" class="refresh-btn" value="刷新" onclick="refreshWeather" />\n <input type="button" class="settings-btn" value="设置" onclick="goToSettings" />\n </div>\n </div>\n</template>\n\n<style>\n .page {\n flex-direction: column;\n background-color: #f5f5f5;\n width: 100%;\n }\n .header {\n height: 120px;\n width: 100%;\n background-color: #2196f3;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n }\n .title {\n font-size: 40px;\n color: #ffffff;\n font-weight: bold;\n }\n .location-bar {\n padding: 20px;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n background-color: #ffffff;\n margin: 10px 0;\n }\n .location-text {\n font-size: 34px;\n color: #333333;\n font-weight: bold;\n }\n .location-btn {\n background-color: #2196f3;\n color: #ffffff;\n font-size: 28px;\n padding: 10px 20px;\n border-radius: 4px;\n }\n .current-weather {\n padding: 40px;\n background-color: #ffffff;\n flex-direction: column;\n align-items: center;\n margin-bottom: 10px;\n }\n .temp {\n font-size: 90px;\n color: #333333;\n font-weight: bold;\n }\n .weather-desc {\n font-size: 34px;\n color: #666666;\n margin: 10px 0;\n }\n .high-low {\n font-size: 30px;\n color: #888888;\n }\n .weather-detail {\n flex-direction: row;\n justify-content: space-around;\n background-color: #ffffff;\n padding: 20px;\n margin-bottom: 10px;\n }\n .detail-item {\n flex-direction: column;\n align-items: center;\n }\n .detail-label {\n font-size: 28px;\n color: #888888;\n margin-bottom: 10px;\n }\n .detail-value {\n font-size: 32px;\n color: #333333;\n font-weight: bold;\n }\n .forecast-title {\n font-size: 34px;\n color: #333333;\n font-weight: bold;\n margin: 20px;\n }\n .forecast-list {\n background-color: #ffffff;\n padding: 10px 0;\n }\n .forecast-item {\n height: 100px;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding: 0 20px;\n border-bottom-width: 1px;\n border-bottom-color: #eeeeee;\n }\n .day {\n font-size: 30px;\n color: #333333;\n width: 100px;\n }\n .forecast-temp {\n font-size: 28px;\n color: #666666;\n }\n .forecast-desc {\n font-size: 28px;\n color: #888888;\n width: 120px;\n text-align: right;\n }\n .footer {\n flex-direction: row;\n justify-content: center;\n margin-top: 20px;\n margin-bottom: 20px;\n }\n .refresh-btn, .settings-btn {\n background-color: #2196f3;\n color: #ffffff;\n font-size: 28px;\n padding: 10px 30px;\n border-radius: 4px;\n margin: 0 10px;\n }\n</style>\n\n<script>\n export default {\n data: {\n locationName: \'北京\',\n currentTemp: 25,\n weatherDesc: \'晴\',\n lowTemp: 20,\n highTemp: 30,\n humidity: 45,\n windLevel: \'3级\',\n pressure: 1013,\n forecastData: [\n { day: \'明天\', lowTemp: 19, highTemp: 28, desc: \'多云\' },\n { day: \'后天\', lowTemp: 18, highTemp: 27, desc: \'小雨\' },\n { day: \'周三\', lowTemp: 16, highTemp: 24, desc: \'阵雨\' },\n { day: \'周四\', lowTemp: 15, highTemp: 26, desc: \'晴\' },\n { day: \'周五\', lowTemp: 17, highTemp: 28, desc: \'晴\' }\n ]\n },\n onInit() {\n this.getWeatherData()\n },\n getWeatherData() {\n // 在实际项目中,这里应该调用天气API获取真实的数据\n console.log(\'Getting weather data...\')\n // 模拟网络请求延迟\n setTimeout(() => {\n console.log(\'Weather data updated\')\n }, 1000)\n },\n switchCity() {\n // 跳转到城市选择页面\n this.$router.push({\n uri: \'city\'\n })\n },\n refreshWeather() {\n this.getWeatherData()\n },\n goToSettings() {\n // 跳转到设置页面\n this.$router.push({\n uri: \'settings\'\n })\n }\n }\n<\/script>',city:'<template>\n <div class="page">\n <div class="header">\n <text class="title">选择城市</text>\n </div>\n <div class="search-bar">\n <input type="text" class="search-input" placeholder="搜索城市" onchange="onSearch" />\n </div>\n <div class="hot-cities">\n <text class="section-title">热门城市</text>\n <div class="city-grid">\n <div class="city-item" for="{{hotCities}}" onclick="selectCity($item)">\n <text class="city-name">{{$item.name}}</text>\n </div>\n </div>\n </div>\n <list class="city-list">\n <list-item type="city" for="{{cityGroups}}" class="city-group">\n <text class="group-title">{{$item.initial}}</text>\n <div class="cities">\n <div class="city-row" for="{{$item.cities}}" onclick="selectCity($item)">\n <text class="city-name">{{$item.name}}</text>\n </div>\n </div>\n </list-item>\n </list>\n <div class="footer">\n <input type="button" class="back-btn" value="返回" onclick="goBack" />\n </div>\n </div>\n</template>\n\n<style>\n .page {\n flex-direction: column;\n background-color: #f5f5f5;\n width: 100%;\n }\n .header {\n height: 100px;\n width: 100%;\n background-color: #2196f3;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n }\n .title {\n font-size: 36px;\n color: #ffffff;\n font-weight: bold;\n }\n .search-bar {\n padding: 20px;\n background-color: #ffffff;\n margin-bottom: 10px;\n }\n .search-input {\n width: 100%;\n height: 80px;\n border: 1px solid #dddddd;\n border-radius: 4px;\n font-size: 30px;\n padding: 0 20px;\n }\n .hot-cities {\n background-color: #ffffff;\n padding: 20px;\n margin-bottom: 10px;\n }\n .section-title {\n font-size: 32px;\n color: #333333;\n font-weight: bold;\n margin-bottom: 20px;\n }\n .city-grid {\n flex-direction: row;\n flex-wrap: wrap;\n }\n .city-item {\n width: 23%;\n height: 80px;\n background-color: #f5f5f5;\n margin: 1%;\n justify-content: center;\n align-items: center;\n border-radius: 4px;\n }\n .city-name {\n font-size: 28px;\n color: #333333;\n }\n .city-list {\n background-color: #ffffff;\n flex: 1;\n }\n .city-group {\n flex-direction: column;\n }\n .group-title {\n font-size: 30px;\n color: #2196f3;\n background-color: #f5f5f5;\n padding: 10px 20px;\n }\n .cities {\n flex-direction: column;\n }\n .city-row {\n height: 90px;\n padding: 0 20px;\n justify-content: flex-start;\n align-items: center;\n border-bottom-width: 1px;\n border-bottom-color: #eeeeee;\n }\n .footer {\n padding: 20px;\n justify-content: center;\n }\n .back-btn {\n background-color: #2196f3;\n color: #ffffff;\n font-size: 30px;\n padding: 10px 40px;\n border-radius: 4px;\n }\n</style>\n\n<script>\n export default {\n data: {\n searchText: \'\',\n hotCities: [\n { id: 1, name: \'北京\' },\n { id: 2, name: \'上海\' },\n { id: 3, name: \'广州\' },\n { id: 4, name: \'深圳\' },\n { id: 5, name: \'杭州\' },\n { id: 6, name: \'南京\' },\n { id: 7, name: \'武汉\' },\n { id: 8, name: \'成都\' }\n ],\n cityGroups: [\n {\n initial: \'A\',\n cities: [\n { id: 101, name: \'安庆\' },\n { id: 102, name: \'鞍山\' }\n ]\n },\n {\n initial: \'B\',\n cities: [\n { id: 1, name: \'北京\' },\n { id: 201, name: \'保定\' },\n { id: 202, name: \'宝鸡\' }\n ]\n },\n {\n initial: \'C\',\n cities: [\n { id: 301, name: \'长沙\' },\n { id: 302, name: \'长春\' },\n { id: 8, name: \'成都\' }\n ]\n },\n {\n initial: \'G\',\n cities: [\n { id: 3, name: \'广州\' },\n { id: 401, name: \'贵阳\' }\n ]\n }\n ]\n },\n onSearch(e) {\n this.searchText = e.value\n // 在实际项目中,这里应该根据搜索文本过滤城市列表\n console.log(\'Search text:\', this.searchText)\n },\n selectCity(city) {\n // 选择城市后返回主页并更新城市\n this.$router.back({\n params: {\n city: city\n }\n })\n },\n goBack() {\n this.$router.back()\n }\n }\n<\/script>',settings:'<template>\n <div class="page">\n <div class="header">\n <text class="title">设置</text>\n </div>\n <list class="settings-list">\n <list-item type="setting" class="setting-item">\n <text class="setting-label">温度单位</text>\n <div class="unit-toggle">\n <div class="unit-option {{tempUnit === \'c\' ? \'active\' : \'\'}}" onclick="setTempUnit(\'c\')">\n <text class="unit-text {{tempUnit === \'c\' ? \'active-text\' : \'\'}}">°C</text>\n </div>\n <div class="unit-option {{tempUnit === \'f\' ? \'active\' : \'\'}}" onclick="setTempUnit(\'f\')">\n <text class="unit-text {{tempUnit === \'f\' ? \'active-text\' : \'\'}}">°F</text>\n </div>\n </div>\n </list-item>\n <list-item type="setting" class="setting-item">\n <text class="setting-label">自动更新</text>\n <switch class="setting-switch" checked="{{autoUpdate}}" onchange="toggleAutoUpdate"></switch>\n </list-item>\n <list-item type="setting" class="setting-item">\n <text class="setting-label">更新频率</text>\n <div class="frequency-select">\n <text class="frequency-value">{{updateFrequency}}分钟</text>\n <div class="frequency-buttons">\n <input type="button" class="frequency-btn" value="-" onclick="decreaseFrequency" />\n <input type="button" class="frequency-btn" value="+" onclick="increaseFrequency" />\n </div>\n </div>\n </list-item>\n <list-item type="setting" class="setting-item">\n <text class="setting-label">天气预警通知</text>\n <switch class="setting-switch" checked="{{weatherAlert}}" onchange="toggleWeatherAlert"></switch>\n </list-item>\n <list-item type="setting" class="setting-item">\n <text class="setting-label">背景颜色</text>\n <div class="color-options">\n <div class="color-option {{themeColor === \'blue\' ? \'color-selected\' : \'\'}}" style="background-color: #2196f3;" onclick="setThemeColor(\'blue\')"></div>\n <div class="color-option {{themeColor === \'green\' ? \'color-selected\' : \'\'}}" style="background-color: #4caf50;" onclick="setThemeColor(\'green\')"></div>\n <div class="color-option {{themeColor === \'orange\' ? \'color-selected\' : \'\'}}" style="background-color: #ff9800;" onclick="setThemeColor(\'orange\')"></div>\n <div class="color-option {{themeColor === \'purple\' ? \'color-selected\' : \'\'}}" style="background-color: #9c27b0;" onclick="setThemeColor(\'purple\')"></div>\n </div>\n </list-item>\n </list>\n <div class="footer">\n <input type="button" class="save-btn" value="保存设置" onclick="saveSettings" />\n <input type="button" class="back-btn" value="返回" onclick="goBack" />\n </div>\n </div>\n</template>\n\n<style>\n .page {\n flex-direction: column;\n background-color: #f5f5f5;\n width: 100%;\n }\n .header {\n height: 100px;\n width: 100%;\n background-color: #2196f3;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n }\n .title {\n font-size: 36px;\n color: #ffffff;\n font-weight: bold;\n }\n .settings-list {\n margin-top: 10px;\n background-color: #ffffff;\n }\n .setting-item {\n height: 100px;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding: 0 20px;\n border-bottom-width: 1px;\n border-bottom-color: #eeeeee;\n }\n .setting-label {\n font-size: 32px;\n color: #333333;\n }\n .unit-toggle {\n flex-direction: row;\n width: 180px;\n height: 60px;\n border-radius: 30px;\n background-color: #eeeeee;\n overflow: hidden;\n }\n .unit-option {\n flex: 1;\n justify-content: center;\n align-items: center;\n }\n .unit-text {\n font-size: 28px;\n color: #666666;\n }\n .active {\n background-color: #2196f3;\n }\n .active-text {\n color: #ffffff;\n }\n .setting-switch {\n width: 100px;\n }\n .frequency-select {\n flex-direction: row;\n align-items: center;\n }\n .frequency-value {\n font-size: 30px;\n color: #666666;\n margin-right: 20px;\n }\n .frequency-buttons {\n flex-direction: row;\n }\n .frequency-btn {\n width: 60px;\n height: 60px;\n background-color: #2196f3;\n color: #ffffff;\n font-size: 36px;\n border-radius: 30px;\n margin: 0 5px;\n text-align: center;\n }\n .color-options {\n flex-direction: row;\n }\n .color-option {\n width: 50px;\n height: 50px;\n border-radius: 25px;\n margin: 0 5px;\n border: 2px solid transparent;\n }\n .color-selected {\n border-color: #333333;\n }\n .footer {\n flex-direction: row;\n justify-content: center;\n margin-top: 40px;\n margin-bottom: 20px;\n }\n .save-btn, .back-btn {\n background-color: #2196f3;\n color: #ffffff;\n font-size: 30px;\n padding: 10px 30px;\n border-radius: 4px;\n margin: 0 10px;\n }\n</style>\n\n<script>\n export default {\n data: {\n tempUnit: \'c\',\n autoUpdate: true,\n updateFrequency: 30,\n weatherAlert: true,\n themeColor: \'blue\'\n },\n onInit() {\n // 从存储加载设置\n this.loadSettings()\n },\n loadSettings() {\n // 在实际项目中,这里应该从本地存储加载用户设置\n console.log(\'Loading settings...\')\n },\n setTempUnit(unit) {\n this.tempUnit = unit\n },\n toggleAutoUpdate(e) {\n this.autoUpdate = e.checked\n },\n increaseFrequency() {\n if (this.updateFrequency < 120) {\n this.updateFrequency += 15\n }\n },\n decreaseFrequency() {\n if (this.updateFrequency > 15) {\n this.updateFrequency -= 15\n }\n },\n toggleWeatherAlert(e) {\n this.weatherAlert = e.checked\n },\n setThemeColor(color) {\n this.themeColor = color\n },\n saveSettings() {\n // 在实际项目中,这里应该将设置保存到本地存储\n console.log(\'Saving settings:\', {\n tempUnit: this.tempUnit,\n autoUpdate: this.autoUpdate,\n updateFrequency: this.updateFrequency,\n weatherAlert: this.weatherAlert,\n themeColor: this.themeColor\n })\n \n // 显示保存成功提示\n this.$app.$def.showToast(\'设置已保存\')\n \n // 返回主页\n setTimeout(() => {\n this.$router.back()\n }, 1500)\n },\n goBack() {\n this.$router.back()\n }\n }\n<\/script>'},manifest:{package:"com.example.weatherapp",name:"WeatherApp",versionName:"1.0.0",versionCode:1,minPlatformVersion:1070,icon:"/common/images/logo.png",features:[],permissions:[{origin:"*"}],config:{logLevel:"debug",designWidth:750},router:{entry:"home",pages:{home:{component:"index"},city:{component:"index"},settings:{component:"index"}}},display:{titleBarBackgroundColor:"#2196f3",titleBarTextColor:"#ffffff",menu:!0,pages:{home:{titleBarText:"天气预报",menu:!1},city:{titleBarText:"选择城市"},settings:{titleBarText:"设置"}}}}},mockFiles=[{id:"cbb08670-6e8d-4230-9d04-9d1206b928ba",name:"Cyber_User.png",size:562298,extension:"png",mime_type:"image/png",created_by:"be6afaf3-63ef-42b3-9137-84b326c29e73",created_at:1746777496},{id:"e8d2827e-318b-4885-9def-3abf39af3cb2",name:"拍照解题-手机解题快应用.pdf",size:502150,extension:"pdf",mime_type:"application/pdf",created_by:"be6afaf3-63ef-42b3-9137-84b326c29e73",created_at:1746777522}],postDataParams={inputs:{image:[{type:"image",transfer_method:"local_file",upload_file_id:"b3c5bee5-3a1a-4ec3-83c6-5d50f8ea8430"},{type:"image",transfer_method:"local_file",upload_file_id:"983603f3-341b-436a-8457-f2c81b708b1e"}]},response_mode:"blocking",conversation_id:"",user:"test",query:"query",files:[{type:"document",transfer_method:"local_file",upload_file_id:"ce9680ab-bf48-453e-87d2-05c0a57441e6"}]};function convertToJsonArray(n){return n.split(",").map((n=>{const[e,t]=n.split(":");return{[e]:t}}))}async function postData(n,e){const t={inputs:{image:[]},response_mode:"blocking",conversation_id:"",user:"aiot-toolkit",query:n,files:[]};if(e&&e.length>1){convertToJsonArray(e).forEach((n=>{const e=Object.keys(n)[0],i=n[e];e.startsWith("image/")&&t.inputs.image.push({type:"image",transfer_method:"local_file",upload_file_id:i}),e.startsWith("application/")&&t.files.push({type:"document",transfer_method:"local_file",upload_file_id:i})})),t.user="IDE"}try{const n=await axios.post(`${DIFY_API_BASE_URL+API_PATH}`,t,{headers:headers});return writeAnswerToFile(n.data.answer,"/home/lvxin/work/gerrit/aiot-toolkit/answer.log"),cleanJSON(n.data.answer)}catch(n){console.error("POST Error:",n.response?n.response.data:n.message)}}const sleep=n=>new Promise((e=>setTimeout(e,n)));function writeAnswerToFile(n,e){fs.writeFile(e,n,{flag:"a"},(n=>{}))}function extractJSON(n){try{var e;const t=null===(e=(n=n.replace(/```/g,"").trim()).match(/{[\s\S]*}/))||void 0===e?void 0:e[0];if(!t)throw new Error("No JSON content found");const i=t.replace(/,\s*}/g,"}").replace(/,\s*]/g,"]");return JSON.parse(i)}catch(n){throw console.error("Error extracting JSON:",n),new Error("Failed to extract valid JSON")}}function cleanJSON(n){try{let e=extractJSON(n);const t=e.page_content;for(const[n,e]of Object.entries(t))t[n]=e.replace(/\\n/g,"\n").replace(/\\"/g,'"').replace(/\\t/g,"\t");let i;return i="string"==typeof e.manifest?JSON.parse(e.manifest.replace(/\\"/g,'"')):e.manifest,{project_name:e.project_name,package_name:e.package_name,page_content:t,manifest:i}}catch(n){return console.error("\nError parsing JSON:",n),null}}function replacePage(n,e,t,i){for(const[n,i]of Object.entries(t)){const t=path.join(e,"src",n,"index.ux");fs.mkdirSync(path.dirname(t),{recursive:!0}),fs.writeFileSync(t,i)}n.icon="/Common/logo.png";const o=path.join(e,"src","manifest.json");fs.mkdirSync(path.dirname(o),{recursive:!0});const a=JSON.stringify(n,null,2);fs.writeFileSync(o,a)}async function ai(n){let e=n.prompt;if(!e){const n=`\n ${chalk.bold.green("快应用智能编程助手\n")}\n ${chalk.cyan("您好!我是快应用智能编程助手,专注于为您创建高质量的快应用项目文件。\n")}\n ${chalk.yellow("您可以试试这样说:")}\n ${chalk.magenta(" 做一个天气快应用")}\n ${chalk.magenta(" 做一个计算器手表快应用")}\n ${chalk.magenta(" 做一个滴答清单手环快应用")}\n `;console.log(n);e=(await inquirer.prompt({type:"input",name:"prompt",message:"请输入您的需求:",prefix:"",validate:n=>n.length>0||"请输入您的需求!"})).prompt}const t=ora({spinner:"dots"});t.start(),setInterval((()=>{}),1e3);const i=await postData(e,n.files);if(!i)return t.fail(chalk.red("生成失败,请重新生成!")),ai(n);let{project_name:o,package_name:a,page_content:c,manifest:r}=i;if(fs.existsSync(path.join(n.cwd||process.cwd(),o))){let e=1,t=o;for(;fs.existsSync(path.join(n.cwd||process.cwd(),t));)t=`${o}_${e++}`;o=t}console.log(`${chalk.yellow("\n项目名称:")+o}`),console.log(`${chalk.yellow("包名:")+a}\n`);const s=Array.isArray(r.deviceTypeList)&&r.deviceTypeList.length>0?r.deviceTypeList[0]:"phone",l=require("../../lib/commands/init");await l(o,{cwd:n.cwd||process.cwd()});const d=path.join(n.cwd||process.cwd(),o);if(replacePage(r,d,c,o),t.succeed(chalk.green("\n恭喜!您的快应用项目已经创建成功!\n")),!n.test){const n=[{type:"confirm",name:"preview",message:"请问是否进行预览?",prefix:"",default:!0}];inquirer.prompt(n).then((n=>{if(n.preview){if("watch"===s){const n="/home/lvxin/work/gitlab/ai-quickapp/velasim";fsExtra.copySync(n,path.join(d,"node_modules/@aiot-toolkit/velasim"));const{compile:e}=require("../../lib/commands/compile");return void e("native","dev",!0,{cwd:d,openNuttx:!0})}const{launchServer:n}=require("@aiot-toolkit/server"),{compile:e}=require("../../lib/commands/compile");n({watch:!0,cwd:d,openBrowser:!0}),e("native","dev",!0,{cwd:d})}else console.log(`${chalk.green("\n您可以使用以下命令进行开发预览调试:")}`),console.log(`${chalk.cyan(" npm run start")}`),console.log(`${chalk.cyan(" npm run build")}`),console.log(`${chalk.cyan(" npm run watch")}`)}))}return{projectPath:path.join(n.cwd||process.cwd(),o),projectName:o,packageName:a,router:r.router.entry,deviceType:s}}module.exports=ai;
1
+ "use strict";const ora=require("ora"),chalk=require("chalk"),inquirer=require("inquirer"),axios=require("axios"),fs=require("fs"),fsExtra=require("fs-extra"),path=require("path"),DIFY_API_BASE_URL="https://mify-be.pt.xiaomi.com",API_PATH="/api/v1/chat-messages",API_KEY="app-f4yeq6almP6pVZd0YVFZ2ZcG",headers={Authorization:`Bearer ${API_KEY}`,"Content-Type":"application/json"},mockData={project_name:"WeatherApp",package_name:"com.example.weatherapp",page_content:{home:'<template>\n <div class="page">\n <div class="header">\n <text class="title">天气预报</text>\n </div>\n <div class="location-bar">\n <text class="location-text">{{locationName}}</text>\n <input type="button" class="location-btn" value="切换城市" onclick="switchCity" />\n </div>\n <div class="current-weather">\n <text class="temp">{{currentTemp}}°</text>\n <text class="weather-desc">{{weatherDesc}}</text>\n <text class="high-low">{{lowTemp}}° / {{highTemp}}°</text>\n </div>\n <div class="weather-detail">\n <div class="detail-item">\n <text class="detail-label">湿度</text>\n <text class="detail-value">{{humidity}}%</text>\n </div>\n <div class="detail-item">\n <text class="detail-label">风力</text>\n <text class="detail-value">{{windLevel}}</text>\n </div>\n <div class="detail-item">\n <text class="detail-label">气压</text>\n <text class="detail-value">{{pressure}}hPa</text>\n </div>\n </div>\n <text class="forecast-title">未来天气预报</text>\n <list class="forecast-list">\n <list-item type="forecast" for="{{forecastData}}" class="forecast-item">\n <text class="day">{{$item.day}}</text>\n <text class="forecast-temp">{{$item.lowTemp}}° / {{$item.highTemp}}°</text>\n <text class="forecast-desc">{{$item.desc}}</text>\n </list-item>\n </list>\n <div class="footer">\n <input type="button" class="refresh-btn" value="刷新" onclick="refreshWeather" />\n <input type="button" class="settings-btn" value="设置" onclick="goToSettings" />\n </div>\n </div>\n</template>\n\n<style>\n .page {\n flex-direction: column;\n background-color: #f5f5f5;\n width: 100%;\n }\n .header {\n height: 120px;\n width: 100%;\n background-color: #2196f3;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n }\n .title {\n font-size: 40px;\n color: #ffffff;\n font-weight: bold;\n }\n .location-bar {\n padding: 20px;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n background-color: #ffffff;\n margin: 10px 0;\n }\n .location-text {\n font-size: 34px;\n color: #333333;\n font-weight: bold;\n }\n .location-btn {\n background-color: #2196f3;\n color: #ffffff;\n font-size: 28px;\n padding: 10px 20px;\n border-radius: 4px;\n }\n .current-weather {\n padding: 40px;\n background-color: #ffffff;\n flex-direction: column;\n align-items: center;\n margin-bottom: 10px;\n }\n .temp {\n font-size: 90px;\n color: #333333;\n font-weight: bold;\n }\n .weather-desc {\n font-size: 34px;\n color: #666666;\n margin: 10px 0;\n }\n .high-low {\n font-size: 30px;\n color: #888888;\n }\n .weather-detail {\n flex-direction: row;\n justify-content: space-around;\n background-color: #ffffff;\n padding: 20px;\n margin-bottom: 10px;\n }\n .detail-item {\n flex-direction: column;\n align-items: center;\n }\n .detail-label {\n font-size: 28px;\n color: #888888;\n margin-bottom: 10px;\n }\n .detail-value {\n font-size: 32px;\n color: #333333;\n font-weight: bold;\n }\n .forecast-title {\n font-size: 34px;\n color: #333333;\n font-weight: bold;\n margin: 20px;\n }\n .forecast-list {\n background-color: #ffffff;\n padding: 10px 0;\n }\n .forecast-item {\n height: 100px;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding: 0 20px;\n border-bottom-width: 1px;\n border-bottom-color: #eeeeee;\n }\n .day {\n font-size: 30px;\n color: #333333;\n width: 100px;\n }\n .forecast-temp {\n font-size: 28px;\n color: #666666;\n }\n .forecast-desc {\n font-size: 28px;\n color: #888888;\n width: 120px;\n text-align: right;\n }\n .footer {\n flex-direction: row;\n justify-content: center;\n margin-top: 20px;\n margin-bottom: 20px;\n }\n .refresh-btn, .settings-btn {\n background-color: #2196f3;\n color: #ffffff;\n font-size: 28px;\n padding: 10px 30px;\n border-radius: 4px;\n margin: 0 10px;\n }\n</style>\n\n<script>\n export default {\n data: {\n locationName: \'北京\',\n currentTemp: 25,\n weatherDesc: \'晴\',\n lowTemp: 20,\n highTemp: 30,\n humidity: 45,\n windLevel: \'3级\',\n pressure: 1013,\n forecastData: [\n { day: \'明天\', lowTemp: 19, highTemp: 28, desc: \'多云\' },\n { day: \'后天\', lowTemp: 18, highTemp: 27, desc: \'小雨\' },\n { day: \'周三\', lowTemp: 16, highTemp: 24, desc: \'阵雨\' },\n { day: \'周四\', lowTemp: 15, highTemp: 26, desc: \'晴\' },\n { day: \'周五\', lowTemp: 17, highTemp: 28, desc: \'晴\' }\n ]\n },\n onInit() {\n this.getWeatherData()\n },\n getWeatherData() {\n // 在实际项目中,这里应该调用天气API获取真实的数据\n console.log(\'Getting weather data...\')\n // 模拟网络请求延迟\n setTimeout(() => {\n console.log(\'Weather data updated\')\n }, 1000)\n },\n switchCity() {\n // 跳转到城市选择页面\n this.$router.push({\n uri: \'city\'\n })\n },\n refreshWeather() {\n this.getWeatherData()\n },\n goToSettings() {\n // 跳转到设置页面\n this.$router.push({\n uri: \'settings\'\n })\n }\n }\n<\/script>',city:'<template>\n <div class="page">\n <div class="header">\n <text class="title">选择城市</text>\n </div>\n <div class="search-bar">\n <input type="text" class="search-input" placeholder="搜索城市" onchange="onSearch" />\n </div>\n <div class="hot-cities">\n <text class="section-title">热门城市</text>\n <div class="city-grid">\n <div class="city-item" for="{{hotCities}}" onclick="selectCity($item)">\n <text class="city-name">{{$item.name}}</text>\n </div>\n </div>\n </div>\n <list class="city-list">\n <list-item type="city" for="{{cityGroups}}" class="city-group">\n <text class="group-title">{{$item.initial}}</text>\n <div class="cities">\n <div class="city-row" for="{{$item.cities}}" onclick="selectCity($item)">\n <text class="city-name">{{$item.name}}</text>\n </div>\n </div>\n </list-item>\n </list>\n <div class="footer">\n <input type="button" class="back-btn" value="返回" onclick="goBack" />\n </div>\n </div>\n</template>\n\n<style>\n .page {\n flex-direction: column;\n background-color: #f5f5f5;\n width: 100%;\n }\n .header {\n height: 100px;\n width: 100%;\n background-color: #2196f3;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n }\n .title {\n font-size: 36px;\n color: #ffffff;\n font-weight: bold;\n }\n .search-bar {\n padding: 20px;\n background-color: #ffffff;\n margin-bottom: 10px;\n }\n .search-input {\n width: 100%;\n height: 80px;\n border: 1px solid #dddddd;\n border-radius: 4px;\n font-size: 30px;\n padding: 0 20px;\n }\n .hot-cities {\n background-color: #ffffff;\n padding: 20px;\n margin-bottom: 10px;\n }\n .section-title {\n font-size: 32px;\n color: #333333;\n font-weight: bold;\n margin-bottom: 20px;\n }\n .city-grid {\n flex-direction: row;\n flex-wrap: wrap;\n }\n .city-item {\n width: 23%;\n height: 80px;\n background-color: #f5f5f5;\n margin: 1%;\n justify-content: center;\n align-items: center;\n border-radius: 4px;\n }\n .city-name {\n font-size: 28px;\n color: #333333;\n }\n .city-list {\n background-color: #ffffff;\n flex: 1;\n }\n .city-group {\n flex-direction: column;\n }\n .group-title {\n font-size: 30px;\n color: #2196f3;\n background-color: #f5f5f5;\n padding: 10px 20px;\n }\n .cities {\n flex-direction: column;\n }\n .city-row {\n height: 90px;\n padding: 0 20px;\n justify-content: flex-start;\n align-items: center;\n border-bottom-width: 1px;\n border-bottom-color: #eeeeee;\n }\n .footer {\n padding: 20px;\n justify-content: center;\n }\n .back-btn {\n background-color: #2196f3;\n color: #ffffff;\n font-size: 30px;\n padding: 10px 40px;\n border-radius: 4px;\n }\n</style>\n\n<script>\n export default {\n data: {\n searchText: \'\',\n hotCities: [\n { id: 1, name: \'北京\' },\n { id: 2, name: \'上海\' },\n { id: 3, name: \'广州\' },\n { id: 4, name: \'深圳\' },\n { id: 5, name: \'杭州\' },\n { id: 6, name: \'南京\' },\n { id: 7, name: \'武汉\' },\n { id: 8, name: \'成都\' }\n ],\n cityGroups: [\n {\n initial: \'A\',\n cities: [\n { id: 101, name: \'安庆\' },\n { id: 102, name: \'鞍山\' }\n ]\n },\n {\n initial: \'B\',\n cities: [\n { id: 1, name: \'北京\' },\n { id: 201, name: \'保定\' },\n { id: 202, name: \'宝鸡\' }\n ]\n },\n {\n initial: \'C\',\n cities: [\n { id: 301, name: \'长沙\' },\n { id: 302, name: \'长春\' },\n { id: 8, name: \'成都\' }\n ]\n },\n {\n initial: \'G\',\n cities: [\n { id: 3, name: \'广州\' },\n { id: 401, name: \'贵阳\' }\n ]\n }\n ]\n },\n onSearch(e) {\n this.searchText = e.value\n // 在实际项目中,这里应该根据搜索文本过滤城市列表\n console.log(\'Search text:\', this.searchText)\n },\n selectCity(city) {\n // 选择城市后返回主页并更新城市\n this.$router.back({\n params: {\n city: city\n }\n })\n },\n goBack() {\n this.$router.back()\n }\n }\n<\/script>',settings:'<template>\n <div class="page">\n <div class="header">\n <text class="title">设置</text>\n </div>\n <list class="settings-list">\n <list-item type="setting" class="setting-item">\n <text class="setting-label">温度单位</text>\n <div class="unit-toggle">\n <div class="unit-option {{tempUnit === \'c\' ? \'active\' : \'\'}}" onclick="setTempUnit(\'c\')">\n <text class="unit-text {{tempUnit === \'c\' ? \'active-text\' : \'\'}}">°C</text>\n </div>\n <div class="unit-option {{tempUnit === \'f\' ? \'active\' : \'\'}}" onclick="setTempUnit(\'f\')">\n <text class="unit-text {{tempUnit === \'f\' ? \'active-text\' : \'\'}}">°F</text>\n </div>\n </div>\n </list-item>\n <list-item type="setting" class="setting-item">\n <text class="setting-label">自动更新</text>\n <switch class="setting-switch" checked="{{autoUpdate}}" onchange="toggleAutoUpdate"></switch>\n </list-item>\n <list-item type="setting" class="setting-item">\n <text class="setting-label">更新频率</text>\n <div class="frequency-select">\n <text class="frequency-value">{{updateFrequency}}分钟</text>\n <div class="frequency-buttons">\n <input type="button" class="frequency-btn" value="-" onclick="decreaseFrequency" />\n <input type="button" class="frequency-btn" value="+" onclick="increaseFrequency" />\n </div>\n </div>\n </list-item>\n <list-item type="setting" class="setting-item">\n <text class="setting-label">天气预警通知</text>\n <switch class="setting-switch" checked="{{weatherAlert}}" onchange="toggleWeatherAlert"></switch>\n </list-item>\n <list-item type="setting" class="setting-item">\n <text class="setting-label">背景颜色</text>\n <div class="color-options">\n <div class="color-option {{themeColor === \'blue\' ? \'color-selected\' : \'\'}}" style="background-color: #2196f3;" onclick="setThemeColor(\'blue\')"></div>\n <div class="color-option {{themeColor === \'green\' ? \'color-selected\' : \'\'}}" style="background-color: #4caf50;" onclick="setThemeColor(\'green\')"></div>\n <div class="color-option {{themeColor === \'orange\' ? \'color-selected\' : \'\'}}" style="background-color: #ff9800;" onclick="setThemeColor(\'orange\')"></div>\n <div class="color-option {{themeColor === \'purple\' ? \'color-selected\' : \'\'}}" style="background-color: #9c27b0;" onclick="setThemeColor(\'purple\')"></div>\n </div>\n </list-item>\n </list>\n <div class="footer">\n <input type="button" class="save-btn" value="保存设置" onclick="saveSettings" />\n <input type="button" class="back-btn" value="返回" onclick="goBack" />\n </div>\n </div>\n</template>\n\n<style>\n .page {\n flex-direction: column;\n background-color: #f5f5f5;\n width: 100%;\n }\n .header {\n height: 100px;\n width: 100%;\n background-color: #2196f3;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n }\n .title {\n font-size: 36px;\n color: #ffffff;\n font-weight: bold;\n }\n .settings-list {\n margin-top: 10px;\n background-color: #ffffff;\n }\n .setting-item {\n height: 100px;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding: 0 20px;\n border-bottom-width: 1px;\n border-bottom-color: #eeeeee;\n }\n .setting-label {\n font-size: 32px;\n color: #333333;\n }\n .unit-toggle {\n flex-direction: row;\n width: 180px;\n height: 60px;\n border-radius: 30px;\n background-color: #eeeeee;\n overflow: hidden;\n }\n .unit-option {\n flex: 1;\n justify-content: center;\n align-items: center;\n }\n .unit-text {\n font-size: 28px;\n color: #666666;\n }\n .active {\n background-color: #2196f3;\n }\n .active-text {\n color: #ffffff;\n }\n .setting-switch {\n width: 100px;\n }\n .frequency-select {\n flex-direction: row;\n align-items: center;\n }\n .frequency-value {\n font-size: 30px;\n color: #666666;\n margin-right: 20px;\n }\n .frequency-buttons {\n flex-direction: row;\n }\n .frequency-btn {\n width: 60px;\n height: 60px;\n background-color: #2196f3;\n color: #ffffff;\n font-size: 36px;\n border-radius: 30px;\n margin: 0 5px;\n text-align: center;\n }\n .color-options {\n flex-direction: row;\n }\n .color-option {\n width: 50px;\n height: 50px;\n border-radius: 25px;\n margin: 0 5px;\n border: 2px solid transparent;\n }\n .color-selected {\n border-color: #333333;\n }\n .footer {\n flex-direction: row;\n justify-content: center;\n margin-top: 40px;\n margin-bottom: 20px;\n }\n .save-btn, .back-btn {\n background-color: #2196f3;\n color: #ffffff;\n font-size: 30px;\n padding: 10px 30px;\n border-radius: 4px;\n margin: 0 10px;\n }\n</style>\n\n<script>\n export default {\n data: {\n tempUnit: \'c\',\n autoUpdate: true,\n updateFrequency: 30,\n weatherAlert: true,\n themeColor: \'blue\'\n },\n onInit() {\n // 从存储加载设置\n this.loadSettings()\n },\n loadSettings() {\n // 在实际项目中,这里应该从本地存储加载用户设置\n console.log(\'Loading settings...\')\n },\n setTempUnit(unit) {\n this.tempUnit = unit\n },\n toggleAutoUpdate(e) {\n this.autoUpdate = e.checked\n },\n increaseFrequency() {\n if (this.updateFrequency < 120) {\n this.updateFrequency += 15\n }\n },\n decreaseFrequency() {\n if (this.updateFrequency > 15) {\n this.updateFrequency -= 15\n }\n },\n toggleWeatherAlert(e) {\n this.weatherAlert = e.checked\n },\n setThemeColor(color) {\n this.themeColor = color\n },\n saveSettings() {\n // 在实际项目中,这里应该将设置保存到本地存储\n console.log(\'Saving settings:\', {\n tempUnit: this.tempUnit,\n autoUpdate: this.autoUpdate,\n updateFrequency: this.updateFrequency,\n weatherAlert: this.weatherAlert,\n themeColor: this.themeColor\n })\n \n // 显示保存成功提示\n this.$app.$def.showToast(\'设置已保存\')\n \n // 返回主页\n setTimeout(() => {\n this.$router.back()\n }, 1500)\n },\n goBack() {\n this.$router.back()\n }\n }\n<\/script>'},manifest:{package:"com.example.weatherapp",name:"WeatherApp",versionName:"1.0.0",versionCode:1,minPlatformVersion:1070,icon:"/common/images/logo.png",features:[],permissions:[{origin:"*"}],config:{logLevel:"debug",designWidth:750},router:{entry:"home",pages:{home:{component:"index"},city:{component:"index"},settings:{component:"index"}}},display:{titleBarBackgroundColor:"#2196f3",titleBarTextColor:"#ffffff",menu:!0,pages:{home:{titleBarText:"天气预报",menu:!1},city:{titleBarText:"选择城市"},settings:{titleBarText:"设置"}}}}},mockFiles=[{id:"cbb08670-6e8d-4230-9d04-9d1206b928ba",name:"Cyber_User.png",size:562298,extension:"png",mime_type:"image/png",created_by:"be6afaf3-63ef-42b3-9137-84b326c29e73",created_at:1746777496},{id:"e8d2827e-318b-4885-9def-3abf39af3cb2",name:"拍照解题-手机解题快应用.pdf",size:502150,extension:"pdf",mime_type:"application/pdf",created_by:"be6afaf3-63ef-42b3-9137-84b326c29e73",created_at:1746777522}],postDataParams={inputs:{image:[{type:"image",transfer_method:"local_file",upload_file_id:"b3c5bee5-3a1a-4ec3-83c6-5d50f8ea8430"},{type:"image",transfer_method:"local_file",upload_file_id:"983603f3-341b-436a-8457-f2c81b708b1e"}]},response_mode:"blocking",conversation_id:"",user:"test",query:"query",files:[{type:"document",transfer_method:"local_file",upload_file_id:"ce9680ab-bf48-453e-87d2-05c0a57441e6"}]};function convertToJsonArray(n){return n.split(",").map((n=>{const[e,t]=n.split(":");return{[e]:t}}))}async function postData(n,e){const t={inputs:{image:[]},response_mode:"blocking",conversation_id:"",user:"aiot-toolkit",query:n,files:[]};if(e&&e.length>1){convertToJsonArray(e).forEach((n=>{const e=Object.keys(n)[0],i=n[e];e.startsWith("image/")&&t.inputs.image.push({type:"image",transfer_method:"local_file",upload_file_id:i}),e.startsWith("application/")&&t.files.push({type:"document",transfer_method:"local_file",upload_file_id:i})})),t.user="IDE"}try{const n=await axios.post(`${DIFY_API_BASE_URL+API_PATH}`,t,{headers:headers});return writeAnswerToFile(n.data.answer,"/home/lvxin/work/gerrit/aiot-toolkit/answer.log"),cleanJSON(n.data.answer)}catch(n){console.error("POST Error:",n.response?n.response.data:n.message)}}const sleep=n=>new Promise((e=>setTimeout(e,n)));function writeAnswerToFile(n,e){fs.writeFile(e,n,{flag:"a"},(n=>{}))}function extractJSON(n){try{var e;const t=null===(e=(n=n.replace(/```/g,"").trim()).match(/{[\s\S]*}/))||void 0===e?void 0:e[0];if(!t)throw new Error("No JSON content found");const i=t.replace(/,\s*}/g,"}").replace(/,\s*]/g,"]");return JSON.parse(i)}catch(n){throw console.error("Error extracting JSON:",n),new Error("Failed to extract valid JSON")}}function cleanJSON(n){try{let e=extractJSON(n);const t=e.page_content;for(const[n,e]of Object.entries(t))t[n]=e.replace(/\\n/g,"\n").replace(/\\"/g,'"').replace(/\\t/g,"\t");let i;return i="string"==typeof e.manifest?JSON.parse(e.manifest.replace(/\\"/g,'"')):e.manifest,{project_name:e.project_name,package_name:e.package_name,page_content:t,manifest:i}}catch(n){return console.error("\nError parsing JSON:",n),null}}function replacePage(n,e,t,i){for(const[n,i]of Object.entries(t)){const t=path.join(e,"src",n,"index.ux");fs.mkdirSync(path.dirname(t),{recursive:!0}),fs.writeFileSync(t,i)}n.icon="/Common/logo.png";const o=path.join(e,"src","manifest.json");fs.mkdirSync(path.dirname(o),{recursive:!0});const a=JSON.stringify(n,null,2);fs.writeFileSync(o,a)}async function ai(n){let e=n.prompt;if(!e){const n=`\n ${chalk.bold.green("快应用智能编程助手\n")}\n ${chalk.cyan("您好!我是快应用智能编程助手,专注于为您创建高质量的快应用项目文件。\n")}\n ${chalk.yellow("您可以试试这样说:")}\n ${chalk.magenta(" 做一个天气快应用")}\n ${chalk.magenta(" 做一个计算器手表快应用")}\n ${chalk.magenta(" 做一个滴答清单手环快应用")}\n `;console.log(n);e=(await inquirer.prompt({type:"input",name:"prompt",message:"请输入您的需求:",prefix:"",validate:n=>n.length>0||"请输入您的需求!"})).prompt}const t=ora({spinner:"dots"});t.start(),setInterval((()=>{}),1e3);const i=await postData(e,n.files);if(!i)return t.fail(chalk.red("生成失败,请重新生成!")),ai(n);let{project_name:o,package_name:a,page_content:c,manifest:r}=i;if(fs.existsSync(path.join(n.cwd||process.cwd(),o))){let e=1,t=o;for(;fs.existsSync(path.join(n.cwd||process.cwd(),t));)t=`${o}_${e++}`;o=t}console.log(`${chalk.yellow("\n包名:")+a}`),console.log(`${chalk.yellow("\n项目名称:")+o}`);const s=Array.isArray(r.deviceTypeList)&&r.deviceTypeList.length>0?r.deviceTypeList[0]:"phone",l=require("../../lib/commands/init");await l(o,{cwd:n.cwd||process.cwd()});const d=path.join(n.cwd||process.cwd(),o);if(replacePage(r,d,c,o),console.log(`${chalk.yellow("\n项目路径:")+d}`),t.succeed(chalk.green("\n恭喜!您的快应用项目已经创建成功!\n")),!n.test){const n=[{type:"confirm",name:"preview",message:"请问是否进行预览?",prefix:"",default:!0}];inquirer.prompt(n).then((n=>{if(n.preview){if("watch"===s){const n="/home/lvxin/work/gitlab/ai-quickapp/velasim";fsExtra.copySync(n,path.join(d,"node_modules/@aiot-toolkit/velasim"));const{compile:e}=require("../../lib/commands/compile");return void e("native","dev",!0,{cwd:d,openNuttx:!0})}const{launchServer:n}=require("@aiot-toolkit/server"),{compile:e}=require("../../lib/commands/compile");n({watch:!0,cwd:d,openBrowser:!0}),e("native","dev",!0,{cwd:d})}else console.log(`${chalk.green("\n您可以使用以下命令进行开发预览调试:")}`),console.log(`${chalk.cyan(" npm run start")}`),console.log(`${chalk.cyan(" npm run build")}`),console.log(`${chalk.cyan(" npm run watch")}`)}))}return{projectPath:path.join(n.cwd||process.cwd(),o),projectName:o,packageName:a,router:r.router.entry,deviceType:s}}module.exports=ai;
2
2
  //# sourceMappingURL=ai.js.map
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "aiot-toolkit",
3
- "version": "1.2.0-alpha.5",
3
+ "version": "1.2.0-alpha.6",
4
4
  "description": "A command line toolkit for developing Aiot Quick Apps.",
5
5
  "engines": {
6
6
  "node": ">=8.0.0"
7
7
  },
8
8
  "dependencies": {
9
- "@aiot-toolkit/compiler": "1.2.0-alpha.5",
10
- "@aiot-toolkit/debugger": "1.2.0-alpha.5",
11
- "@aiot-toolkit/dsl-vue": "1.2.0-alpha.5",
12
- "@aiot-toolkit/dsl-xvm": "1.2.0-alpha.5",
9
+ "@aiot-toolkit/compiler": "1.2.0-alpha.6",
10
+ "@aiot-toolkit/debugger": "1.2.0-alpha.6",
11
+ "@aiot-toolkit/dsl-vue": "1.2.0-alpha.6",
12
+ "@aiot-toolkit/dsl-xvm": "1.2.0-alpha.6",
13
13
  "@aiot-toolkit/emulator": "^2.0.5-beta.13",
14
- "@aiot-toolkit/packager": "1.2.0-alpha.5",
15
- "@aiot-toolkit/server": "1.2.0-alpha.5",
16
- "@aiot-toolkit/shared-utils": "1.2.0-alpha.5",
14
+ "@aiot-toolkit/packager": "1.2.0-alpha.6",
15
+ "@aiot-toolkit/server": "1.2.0-alpha.6",
16
+ "@aiot-toolkit/shared-utils": "1.2.0-alpha.6",
17
17
  "@babel/core": "^7.9.6",
18
18
  "@babel/plugin-syntax-jsx": "^7.8.3",
19
19
  "@babel/preset-env": "^7.9.6",
@@ -58,5 +58,5 @@
58
58
  "supertest": "^3.3.0",
59
59
  "webpack-cli": "^4.3.0"
60
60
  },
61
- "gitHead": "147f2b8be39c3134f209804ec826c27f4858fc28"
61
+ "gitHead": "94526e6b72c92d38f0b7edcb857c135c509451f0"
62
62
  }