aiot-toolkit 1.0.20-dev.1 → 1.0.20-dev.3

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.
Files changed (2) hide show
  1. package/lib/utils.js +1 -1
  2. package/package.json +9 -9
package/lib/utils.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";const path=require("path"),{colorconsole:colorconsole}=require("@aiot-toolkit/shared-utils"),{ENTRY_TYPE:ENTRY_TYPE}=require("@aiot-toolkit/packager/lib/common/utils"),{resolveFile:resolveFile}=require("@aiot-toolkit/packager/lib/common/info"),{isEmptyObject:isEmptyObject}=require("@aiot-toolkit/compiler/lib/utils");exports.resolveEntries=function(e,o,t){if(!e.router)throw Error("No routing configured in manifest.json!");const r={},i=e.router.pages||{},s=e.router.widgets||{},n=[{confs:e.router.floatingWindows||{},type:ENTRY_TYPE.FLOAT},{confs:s,type:ENTRY_TYPE.CARD}];n.unshift({confs:i,type:ENTRY_TYPE.PAGE});const c=resolveFile(path.join(o,"app"));c||(colorconsole.error("app file does not exist"),process.exit(1)),r.app="./"+path.relative(t,c)+`?uxType=${ENTRY_TYPE.APP}`,n.forEach((({confs:e,type:i})=>{Object.keys(e).forEach((s=>{const n=e[s],c=path.join(s,n.component),l=resolveFile(path.join(o,c));l||colorconsole.throw(`Compilation failed: please confirm that the file path ${c} configured in manifest.json exists`),/^\//.test(s)&&colorconsole.throw(`Compilation failed: please confirm that '${s}' configured by router.pages in manifest.json is the directory name`);let a=path.relative(t,l);a="./"+a+`?uxType=${i}`,a=a.replace(/\\/g,"/"),r[c]=a}))}));const l=e.workers;l&&l.entries&&l.entries instanceof Array&&l.entries.filter((e=>e.file)).forEach((e=>{r[e.file.replace(/\.js$/,"")]="./src/"+e.file}));const a=e.services;if(!isEmptyObject(a))for(const e in a)Object.hasOwnProperty.call(a,e)&&(r["services/"+e]="./src/"+a[e].path+`?uxType=${ENTRY_TYPE.APP}`);return r};
1
+ "use strict";const path=require("path"),{colorconsole:colorconsole}=require("@aiot-toolkit/shared-utils"),{ENTRY_TYPE:ENTRY_TYPE}=require("@aiot-toolkit/packager/lib/common/utils"),{resolveFile:resolveFile}=require("@aiot-toolkit/packager/lib/common/info"),{isEmptyObject:isEmptyObject}=require("@aiot-toolkit/compiler/lib/utils");exports.resolveEntries=function(e,o,t){if(!e.router)throw Error("No routing configured in manifest.json!");const r={},i=e.router.pages||{},s=e.router.widgets||{},n=[{confs:e.router.floatingWindows||{},type:ENTRY_TYPE.FLOAT},{confs:s,type:ENTRY_TYPE.CARD}];n.unshift({confs:i,type:ENTRY_TYPE.PAGE});const c=resolveFile(path.join(o,"app"));c||(colorconsole.error("app file does not exist"),process.exit(1)),r.app="./"+path.relative(t,c)+`?uxType=${ENTRY_TYPE.APP}`,n.forEach((({confs:e,type:i})=>{Object.keys(e).forEach((s=>{const n=e[s],c=path.join(s,n.component),a=resolveFile(path.join(o,c));a||colorconsole.throw(`Compilation failed: please confirm that the file path ${c} configured in manifest.json exists`),/^\//.test(s)&&colorconsole.throw(`Compilation failed: please confirm that '${s}' configured by router.pages in manifest.json is the directory name`);let l=path.relative(t,a);l="./"+l+`?uxType=${i}`,l=l.replace(/\\/g,"/"),r[c]=l}))}));const a=e.workers;a&&a.entries&&a.entries instanceof Array&&a.entries.filter((e=>e.file)).forEach((e=>{r[e.file.replace(/\.js$/,"")]="./src/"+e.file}));const l=e.services;if(!isEmptyObject(l))if(Array.isArray(l))l.forEach((e=>{const{name:o,path:t}=e;o&&t&&(r["services/"+o]="./src/"+t+`?uxType=${ENTRY_TYPE.APP}`)}));else for(const e in l)Object.hasOwnProperty.call(l,e)&&(r["services/"+e]="./src/"+l[e].path+`?uxType=${ENTRY_TYPE.APP}`);return r};
2
2
  //# sourceMappingURL=utils.js.map
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "aiot-toolkit",
3
- "version": "1.0.20-dev.1",
3
+ "version": "1.0.20-dev.3",
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.0.20-dev.1",
10
- "@aiot-toolkit/debugger": "1.0.20-dev.1",
11
- "@aiot-toolkit/dsl-vue": "1.0.20-dev.1",
12
- "@aiot-toolkit/dsl-xvm": "1.0.20-dev.1",
13
- "@aiot-toolkit/packager": "1.0.20-dev.1",
14
- "@aiot-toolkit/server": "1.0.20-dev.1",
15
- "@aiot-toolkit/shared-utils": "1.0.20-dev.1",
9
+ "@aiot-toolkit/compiler": "1.0.20-dev.3",
10
+ "@aiot-toolkit/debugger": "1.0.20-dev.3",
11
+ "@aiot-toolkit/dsl-vue": "1.0.20-dev.3",
12
+ "@aiot-toolkit/dsl-xvm": "1.0.20-dev.3",
13
+ "@aiot-toolkit/packager": "1.0.20-dev.3",
14
+ "@aiot-toolkit/server": "1.0.20-dev.3",
15
+ "@aiot-toolkit/shared-utils": "1.0.20-dev.3",
16
16
  "@babel/core": "^7.9.6",
17
17
  "@babel/plugin-syntax-jsx": "^7.8.3",
18
18
  "@babel/preset-env": "^7.9.6",
@@ -51,5 +51,5 @@
51
51
  "supertest": "^3.3.0",
52
52
  "webpack-cli": "^4.3.0"
53
53
  },
54
- "gitHead": "aa59aad7299090900234be5205a3510645cdb654"
54
+ "gitHead": "deeed54eef0954c7733f5cdd139f19edbe7c6808"
55
55
  }