vona-cli-set-api 1.0.339 → 1.0.341
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.
- package/cli/templates/create/module/boilerplate/_package.json +1 -1
- package/cli/templates/create/project/basic/boilerplate/package.original.json +1 -1
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-base/package.json +3 -3
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-index/package.json +3 -3
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-user/package.json +3 -3
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/package.json +1 -1
- package/dist/lib/bean/cli.bin.build.js +7 -10
- package/dist/lib/bean/cli.init.asset.d.ts +0 -1
- package/dist/lib/bean/cli.init.asset.js +2 -20
- package/dist/lib/bean/cli.init.static.js +1 -1
- package/package.json +2 -2
- /package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-index/{static → assets/static}/img/vona.png +0 -0
- /package/cli/templates/init/static/boilerplate/{static → assets/static}/img/vona.png +0 -0
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"description": "<%=argv.description%>",
|
|
23
23
|
"keywords": ["Vona Module"],
|
|
24
24
|
"author": "<%=argv.author%>",
|
|
25
|
-
"files": ["dist", "
|
|
25
|
+
"files": ["dist", "assets"],
|
|
26
26
|
"scripts": {
|
|
27
27
|
"clean": "rimraf dist tsconfig.build.tsbuildinfo",
|
|
28
28
|
"tsc:publish": "npm run clean && vona :bin:buildModule && tsc -p tsconfig.build.json",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vona-module-home-base",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.11",
|
|
5
5
|
"title": "home-base",
|
|
6
6
|
"vonaModule": {
|
|
7
7
|
"dependencies": {
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"./package.json": "./package.json"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
|
-
"
|
|
29
|
-
"
|
|
28
|
+
"assets",
|
|
29
|
+
"dist"
|
|
30
30
|
],
|
|
31
31
|
"scripts": {
|
|
32
32
|
"clean": "rimraf dist tsconfig.build.tsbuildinfo",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vona-module-home-index",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.9",
|
|
5
5
|
"title": "home-index",
|
|
6
6
|
"vonaModule": {
|
|
7
7
|
"dependencies": {
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"./package.json": "./package.json"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
|
-
"
|
|
29
|
-
"
|
|
28
|
+
"assets",
|
|
29
|
+
"dist"
|
|
30
30
|
],
|
|
31
31
|
"scripts": {
|
|
32
32
|
"clean": "rimraf dist tsconfig.build.tsbuildinfo",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vona-module-home-user",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.17",
|
|
5
5
|
"title": "home-user",
|
|
6
6
|
"vonaModule": {
|
|
7
7
|
"fileVersion": 1,
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"./package.json": "./package.json"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
|
-
"
|
|
30
|
-
"
|
|
29
|
+
"assets",
|
|
30
|
+
"dist"
|
|
31
31
|
],
|
|
32
32
|
"scripts": {
|
|
33
33
|
"clean": "rimraf dist tsconfig.build.tsbuildinfo",
|
|
@@ -8,6 +8,7 @@ import resolveImport from '@rollup/plugin-node-resolve';
|
|
|
8
8
|
import replaceImport from '@rollup/plugin-replace';
|
|
9
9
|
import terserImport from '@rollup/plugin-terser';
|
|
10
10
|
import fse from 'fs-extra';
|
|
11
|
+
import { globby } from 'globby';
|
|
11
12
|
import { rimraf } from 'rimraf';
|
|
12
13
|
import { rollup } from 'rollup';
|
|
13
14
|
import { generateConfigDefine, getAbsolutePathOfModule, getOutDir, getOutReleasesDir } from "../utils.js";
|
|
@@ -71,16 +72,12 @@ export class CliBinBuild extends BeanCliBase {
|
|
|
71
72
|
const assetsPath = path.join(outDir, 'assets');
|
|
72
73
|
for (const relativeName in modulesMeta.modules) {
|
|
73
74
|
const module = modulesMeta.modules[relativeName];
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if (fse.existsSync(scenePath)) {
|
|
81
|
-
const destPath = path.join(assetsPath, scene, relativeName);
|
|
82
|
-
await fse.copy(scenePath, destPath);
|
|
83
|
-
}
|
|
75
|
+
const scenes = await globby('assets/*', { cwd: module.root, onlyDirectories: true });
|
|
76
|
+
for (const scene2 of scenes) {
|
|
77
|
+
const scene = scene2.substring('assets/'.length);
|
|
78
|
+
const scenePath = path.join(module.root, scene2);
|
|
79
|
+
const destPath = path.join(assetsPath, scene, relativeName);
|
|
80
|
+
await fse.copy(scenePath, destPath);
|
|
84
81
|
}
|
|
85
82
|
}
|
|
86
83
|
}
|
|
@@ -19,28 +19,10 @@ export class CliInitAsset extends BeanCliBase {
|
|
|
19
19
|
// scene
|
|
20
20
|
const scene = argv.scene;
|
|
21
21
|
// directory
|
|
22
|
-
const assetDir = path.join(targetDir, scene);
|
|
22
|
+
const assetDir = path.join(targetDir, 'assets', scene);
|
|
23
23
|
if (fse.existsSync(assetDir)) {
|
|
24
|
-
throw new Error(`asset exists: ${moduleName}/${scene}`);
|
|
24
|
+
throw new Error(`asset exists: ${moduleName}/assets/${scene}`);
|
|
25
25
|
}
|
|
26
26
|
await this.helper.ensureDir(assetDir);
|
|
27
|
-
// package.json
|
|
28
|
-
await this._setPackageInfo(targetDir, scene);
|
|
29
|
-
}
|
|
30
|
-
async _setPackageInfo(modulePath, scene) {
|
|
31
|
-
const pkgFile = path.join(modulePath, 'package.json');
|
|
32
|
-
const pkg = await this.helper.loadJSONFile(pkgFile);
|
|
33
|
-
if (!pkg.files)
|
|
34
|
-
pkg.files = [];
|
|
35
|
-
let changed;
|
|
36
|
-
// files
|
|
37
|
-
if (!pkg.files.includes(scene)) {
|
|
38
|
-
pkg.files.push(scene);
|
|
39
|
-
changed = true;
|
|
40
|
-
}
|
|
41
|
-
// save
|
|
42
|
-
if (changed) {
|
|
43
|
-
await this.helper.saveJSONFile(pkgFile, pkg);
|
|
44
|
-
}
|
|
45
27
|
}
|
|
46
28
|
}
|
|
@@ -19,7 +19,7 @@ export class CliInitStatic extends BeanCliBase {
|
|
|
19
19
|
}
|
|
20
20
|
// target dir
|
|
21
21
|
const targetDir = await this.helper.ensureDir(_module.root);
|
|
22
|
-
const staticDir = path.join(targetDir, 'static');
|
|
22
|
+
const staticDir = path.join(targetDir, 'assets/static');
|
|
23
23
|
if (fse.existsSync(staticDir)) {
|
|
24
24
|
throw new Error(`static exists: ${moduleName}`);
|
|
25
25
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vona-cli-set-api",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.341",
|
|
5
5
|
"description": "vona cli-set-api",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"ts-node-maintained": "^10.9.6",
|
|
62
62
|
"urllib": "^4.6.11",
|
|
63
63
|
"uuid": "^11.1.0",
|
|
64
|
-
"vona-core": "^5.0.
|
|
64
|
+
"vona-core": "^5.0.93",
|
|
65
65
|
"why-is-node-running": "^3.2.2",
|
|
66
66
|
"yargs-parser": "^21.1.1"
|
|
67
67
|
},
|
|
File without changes
|
|
File without changes
|