@widget-js/cli 24.1.1-beta.3 → 24.1.1-beta.31
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/{lib/createWidget-4LQ6PVEM.js → dist/createWidget-EFGZUM5G.js} +3 -4
- package/{lib/dependencies-AVNHKRF3.js → dist/dependencies-YMVXAX75.js} +1 -1
- package/{lib → dist}/index.js +14 -5
- package/dist/publish-C52GHJWG.js +50 -0
- package/{lib/release-PIRAQ7A6.js → dist/release-5GS34BAJ.js} +5 -1
- package/package.json +35 -20
- package/template/WidgetConfig.ejs +2 -6
- package/template/WidgetDefine.ejs +7 -18
- package/template/WidgetRoutes.ejs +1 -1
- package/template/WidgetView.ejs +1 -2
- package/template/widget-router.ts +1 -1
- package/.editorconfig +0 -16
- package/.idea/cli.iml +0 -9
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/jpa-buddy.xml +0 -6
- package/.idea/misc.xml +0 -8
- package/.idea/modules.xml +0 -8
- package/.idea/prettier.xml +0 -6
- package/.idea/vcs.xml +0 -6
- package/.prettierrc +0 -21
- package/jest.config.js +0 -14
- package/release.json +0 -9
- package/src/build/build.ts +0 -35
- package/src/createWidget.ts +0 -232
- package/src/dependencies/index.ts +0 -13
- package/src/dependencies/localDependencies.ts +0 -29
- package/src/dependencies/remoteDependencies.ts +0 -37
- package/src/index.ts +0 -56
- package/src/init/init.ts +0 -121
- package/src/promts/promptChecker.ts +0 -17
- package/src/release/ftp.ts +0 -144
- package/src/release/oss.ts +0 -50
- package/src/release/release.ts +0 -70
- package/src/release/update-zip.ts +0 -19
- package/src/utils/EJSUtils.ts +0 -18
- package/src/utils/PrettierUtils.ts +0 -12
- package/src/utils/WidgetPackageUtils.ts +0 -13
- package/src/utils.ts +0 -84
- package/test/index.test.ts +0 -9
- package/tsconfig.json +0 -78
- package/tsup.config.ts +0 -6
- package/vite.config.ts +0 -15
- package/widget.json +0 -14
- /package/{lib → dist}/chunk-I4ZBPB2S.js +0 -0
- /package/{lib → dist}/chunk-RDJH7Z4C.js +0 -0
- /package/{lib → dist}/chunk-XPJ33Y5L.js +0 -0
- /package/{lib → dist}/init-HCEGKTNF.js +0 -0
|
@@ -157,7 +157,6 @@ async function createWidget() {
|
|
|
157
157
|
minWidth
|
|
158
158
|
};
|
|
159
159
|
const widgetDefineFile = path.resolve(widgetDir, `${name}.widget.ts`);
|
|
160
|
-
const widgetFile = path.resolve(widgetDir, `${name}Widget.vue`);
|
|
161
160
|
const widgetViewFile = path.resolve(widgetDir, `${name}WidgetView.vue`);
|
|
162
161
|
const widgetRoutesFile = path.resolve(widgetDir, `${name}WidgetRoutes.ts`);
|
|
163
162
|
await EJSUtils.renderToFile("WidgetDefine.ejs", widgetDefineFile, "typescript", renderOptions);
|
|
@@ -178,14 +177,14 @@ async function createWidget() {
|
|
|
178
177
|
const routeStr = `...${name}WidgetRoutes,`;
|
|
179
178
|
if (!routeContent.includes(importRouteStr)) {
|
|
180
179
|
routeContent = routeContent.replaceAll(
|
|
181
|
-
"//FBI WANING! IMPORT PLACE",
|
|
180
|
+
"// FBI WANING! IMPORT PLACE",
|
|
182
181
|
`${importRouteStr}
|
|
183
182
|
//FBI WANING! IMPORT PLACE`
|
|
184
183
|
);
|
|
185
184
|
}
|
|
186
185
|
if (!routeContent.includes(routeStr)) {
|
|
187
|
-
routeContent = routeContent.replaceAll("//FBI WANING! ROUTE PLACE", `${routeStr}
|
|
188
|
-
//FBI WANING! ROUTE PLACE`);
|
|
186
|
+
routeContent = routeContent.replaceAll("// FBI WANING! ROUTE PLACE", `${routeStr}
|
|
187
|
+
// FBI WANING! ROUTE PLACE`);
|
|
189
188
|
}
|
|
190
189
|
fs.writeFileSync(routeFile, routeContent);
|
|
191
190
|
const gitAdd = `git add ${widgetDir}`;
|
|
@@ -28,7 +28,7 @@ var RemoteDependencies;
|
|
|
28
28
|
if (packageNames.includes(localPackage)) {
|
|
29
29
|
let packageVersion = widgetPackages[localPackage];
|
|
30
30
|
if (!packageVersion) {
|
|
31
|
-
spinner.
|
|
31
|
+
spinner.start(`Fetching package version:${localPackage}`);
|
|
32
32
|
packageVersion = await Utils.getRemoteVersion(localPackage);
|
|
33
33
|
widgetPackages[localPackage] = packageVersion;
|
|
34
34
|
spinner.info(`version:${packageVersion}`);
|
package/{lib → dist}/index.js
RENAMED
|
@@ -11,22 +11,31 @@ var cliPackage = JSON.parse(fs.readFileSync(packageJsonPath).toString());
|
|
|
11
11
|
console.log(gradient.pastel.multiline(figlet.textSync("widget-cli", { horizontalLayout: "full" })));
|
|
12
12
|
program.version(`@widget-js/cli ${cliPackage.version}`).usage("<command> [options]");
|
|
13
13
|
program.command("create").description("Create new widget").action(async () => {
|
|
14
|
-
const createWidget = await import("./createWidget-
|
|
14
|
+
const createWidget = await import("./createWidget-EFGZUM5G.js");
|
|
15
15
|
await createWidget.default();
|
|
16
16
|
});
|
|
17
17
|
var dependenciesOption = new Option("-t, --type <type>").choices(["remote", "local"]);
|
|
18
|
-
program.command("dependencies").description("Set @widget-js dependencies to local(workspace:*) or remote(^1.0.0 etc)").addOption(dependenciesOption).action(async (options) => {
|
|
19
|
-
const dependencies = await import("./dependencies-
|
|
18
|
+
program.command("dependencies").description("Deprecated!. Set @widget-js dependencies to local(workspace:*) or remote(^1.0.0 etc)").addOption(dependenciesOption).action(async (options) => {
|
|
19
|
+
const dependencies = await import("./dependencies-YMVXAX75.js");
|
|
20
|
+
await dependencies.default(options);
|
|
21
|
+
});
|
|
22
|
+
program.command("deps").description("Set @widget-js dependencies to local(workspace:*) or remote(^1.0.0 etc)").addOption(dependenciesOption).action(async (options) => {
|
|
23
|
+
const dependencies = await import("./dependencies-YMVXAX75.js");
|
|
20
24
|
await dependencies.default(options);
|
|
21
25
|
});
|
|
22
26
|
program.command("init").description("Initialize widget-js project").action(async () => {
|
|
23
27
|
const init = await import("./init-HCEGKTNF.js");
|
|
24
28
|
await init.init();
|
|
25
29
|
});
|
|
30
|
+
var keyOption = new Option("-k, --key <key>");
|
|
31
|
+
program.command("publish").description("Publish widget package with developer key").addOption(keyOption).action(async (options) => {
|
|
32
|
+
const publishImport = await import("./publish-C52GHJWG.js");
|
|
33
|
+
await publishImport.publish(options);
|
|
34
|
+
});
|
|
26
35
|
var typeOption = new Option("-t, --type <type>").choices(["ftp", "oss"]);
|
|
27
36
|
var fileOption = new Option("-f, --file <file>");
|
|
28
|
-
program.command("release").description("\u901A\u8FC7FTP/OSS\u53D1\u5E03\u6587\u4EF6\uFF0C\u4EC5\u5185\u90E8\u4F7F\u7528").addOption(typeOption).addOption(fileOption).action(async (options
|
|
29
|
-
const release = await import("./release-
|
|
37
|
+
program.command("release").description("\u901A\u8FC7FTP/OSS\u53D1\u5E03\u6587\u4EF6\uFF0C\u4EC5\u5185\u90E8\u4F7F\u7528").addOption(typeOption).addOption(fileOption).action(async (options) => {
|
|
38
|
+
const release = await import("./release-5GS34BAJ.js");
|
|
30
39
|
await release.default(options);
|
|
31
40
|
});
|
|
32
41
|
program.parse(process.argv);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// src/publish/index.ts
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import fastGlob from "fast-glob";
|
|
4
|
+
import axios from "axios";
|
|
5
|
+
import consola from "consola";
|
|
6
|
+
import ora from "ora";
|
|
7
|
+
async function publish(options) {
|
|
8
|
+
if (!options.key) {
|
|
9
|
+
consola.error("Please provide a developer key with -k or --key option.");
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const spinner = ora("Search widget.json").start();
|
|
13
|
+
try {
|
|
14
|
+
const files = await fastGlob("**/widget.json", { onlyFiles: true, ignore: ["node_modules/**"], absolute: true });
|
|
15
|
+
if (files.length === 0) {
|
|
16
|
+
spinner.fail("No widget.json file found.");
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
spinner.succeed(`Widget.json found: ${files[0]}`);
|
|
20
|
+
const widgetPath = files[0];
|
|
21
|
+
const widgetContent = fs.readFileSync(widgetPath, "utf-8");
|
|
22
|
+
const json = JSON.parse(widgetContent);
|
|
23
|
+
consola.info(`Package name:${json.name}`);
|
|
24
|
+
const widgets = json.widgets;
|
|
25
|
+
consola.info(`Widget size:${widgets?.length ?? 0}`);
|
|
26
|
+
spinner.start("Publishing widget package...");
|
|
27
|
+
const response = await axios.post("https://widgetjs.cn/api/v1/widget/package", json, {
|
|
28
|
+
headers: {
|
|
29
|
+
"Content-Type": "application/json",
|
|
30
|
+
"Key": options.key
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
if (response.data) {
|
|
34
|
+
if (response.data.code == 200) {
|
|
35
|
+
spinner.succeed("Widget published successfully.");
|
|
36
|
+
} else {
|
|
37
|
+
spinner.fail("Failed to publish widget.");
|
|
38
|
+
consola.error(response.data.msg);
|
|
39
|
+
}
|
|
40
|
+
} else {
|
|
41
|
+
spinner.fail("Empty Response");
|
|
42
|
+
}
|
|
43
|
+
} catch (error) {
|
|
44
|
+
spinner.fail("Failed to publish widget.");
|
|
45
|
+
consola.error(error);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
publish
|
|
50
|
+
};
|
|
@@ -19,7 +19,11 @@ function zipDirectory(sourceDir, outPath, ignoreDir) {
|
|
|
19
19
|
const archive = archiver("zip", { zlib: { level: 9 } });
|
|
20
20
|
const stream = fs.createWriteStream(outPath);
|
|
21
21
|
return new Promise((resolve, reject) => {
|
|
22
|
-
|
|
22
|
+
const ignore = ["node_modules/**"];
|
|
23
|
+
if (ignoreDir) {
|
|
24
|
+
ignore.push(...ignoreDir);
|
|
25
|
+
}
|
|
26
|
+
archive.glob("**/*", { cwd: sourceDir, ignore }).on("error", (err) => reject(err)).pipe(stream);
|
|
23
27
|
stream.on("close", () => resolve());
|
|
24
28
|
archive.finalize();
|
|
25
29
|
});
|
package/package.json
CHANGED
|
@@ -1,51 +1,59 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@widget-js/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "24.1.1-beta.
|
|
4
|
+
"version": "24.1.1-beta.31",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Neo Fu",
|
|
7
7
|
"license": "MIT",
|
|
8
|
-
"main": "
|
|
8
|
+
"main": "dist/index.js",
|
|
9
9
|
"bin": {
|
|
10
|
-
"widget": "
|
|
10
|
+
"widget": "dist/index.js"
|
|
11
11
|
},
|
|
12
12
|
"engines": {
|
|
13
13
|
"node": "^12.0.0 || >= 14.0.0"
|
|
14
14
|
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"template"
|
|
18
|
+
],
|
|
15
19
|
"publishConfig": {
|
|
16
20
|
"access": "public"
|
|
17
21
|
},
|
|
18
22
|
"dependencies": {
|
|
19
23
|
"@types/archiver": "^5.3.1",
|
|
20
|
-
"@types/gradient-string": "^1.1.2",
|
|
21
24
|
"@vue/cli-shared-utils": "^5.0.8",
|
|
22
25
|
"@widget-js/ssh-config": "^4.2.1",
|
|
23
|
-
"@widget-js/vue3": "^0.11.20",
|
|
24
26
|
"ali-oss": "^6.17.1",
|
|
25
27
|
"archiver": "^5.3.1",
|
|
28
|
+
"axios": "^1.7.2",
|
|
26
29
|
"chalk": "^4.1.2",
|
|
27
30
|
"change-case": "^4.1.2",
|
|
28
31
|
"commander": "^9.4.1",
|
|
29
32
|
"consola": "^2.15.3",
|
|
30
33
|
"dirname-filename-esm": "^1.1.1",
|
|
31
34
|
"ejs": "^3.1.8",
|
|
35
|
+
"fast-glob": "^3.3.2",
|
|
32
36
|
"figlet": "^1.5.2",
|
|
37
|
+
"gradient-string": "^2.0.2",
|
|
33
38
|
"inquirer": "^8.0.0",
|
|
34
39
|
"minimatch": "^9.0.3",
|
|
35
40
|
"ora": "^6.2.0",
|
|
36
|
-
"package-json": "^
|
|
41
|
+
"package-json": "^10.0.1",
|
|
37
42
|
"prettier": "^3.1.1",
|
|
38
43
|
"semver": "^7.5.2",
|
|
39
44
|
"shelljs": "^0.8.5",
|
|
40
45
|
"ssh2-sftp-client": "^9.1.0",
|
|
41
46
|
"ws": "^8.11.0",
|
|
42
|
-
"@widget-js/core": "24.1.1-beta.
|
|
43
|
-
"@widget-js/utils": "24.1.1-beta.
|
|
47
|
+
"@widget-js/core": "24.1.1-beta.9",
|
|
48
|
+
"@widget-js/utils": "24.1.1-beta.9",
|
|
49
|
+
"@widget-js/vue3": "24.1.1-beta.10"
|
|
44
50
|
},
|
|
45
51
|
"devDependencies": {
|
|
52
|
+
"@antfu/eslint-config": "^2.21.1",
|
|
46
53
|
"@types/ali-oss": "^6.16.7",
|
|
47
54
|
"@types/ejs": "latest",
|
|
48
55
|
"@types/figlet": "^1.5.5",
|
|
56
|
+
"@types/gradient-string": "^1.1.2",
|
|
49
57
|
"@types/inquirer": "latest",
|
|
50
58
|
"@types/jest": "^29.2.3",
|
|
51
59
|
"@types/minimist": "^1.2.5",
|
|
@@ -53,8 +61,7 @@
|
|
|
53
61
|
"@types/semver": "^7.5.0",
|
|
54
62
|
"@types/shelljs": "latest",
|
|
55
63
|
"@types/ssh2-sftp-client": "^9.0.1",
|
|
56
|
-
"
|
|
57
|
-
"gradient-string": "^2.0.2",
|
|
64
|
+
"eslint": "8.48.0",
|
|
58
65
|
"jest": "^29.5.0",
|
|
59
66
|
"pinst": "^3.0.0",
|
|
60
67
|
"rimraf": "^4.4.1",
|
|
@@ -67,19 +74,27 @@
|
|
|
67
74
|
"vue-router": "^4.2.5",
|
|
68
75
|
"webpack": "^5.75.0",
|
|
69
76
|
"webpack-cli": "^5.0.0",
|
|
70
|
-
"@widget-js/
|
|
71
|
-
"@widget-js/
|
|
77
|
+
"@widget-js/core": "24.1.1-beta.9",
|
|
78
|
+
"@widget-js/vite-plugin-widget": "24.1.1-beta.9",
|
|
79
|
+
"@widget-js/vue3": "24.1.1-beta.10"
|
|
72
80
|
},
|
|
73
81
|
"scripts": {
|
|
74
|
-
"build": "
|
|
75
|
-
"watch": "tsup src/index.ts --
|
|
82
|
+
"build": "tsup-node src/index.ts",
|
|
83
|
+
"watch": "tsup-node src/index.ts --watch",
|
|
76
84
|
"build:run": "npm run build && npm run widget",
|
|
77
|
-
"widget": "node ./
|
|
78
|
-
"widget:ftp": "node ./
|
|
79
|
-
"widget:init": "node ./
|
|
80
|
-
"widget:
|
|
81
|
-
"widget:
|
|
85
|
+
"widget": "node ./dist/index.js",
|
|
86
|
+
"widget:ftp": "node ./dist/index.js release -t ftp",
|
|
87
|
+
"widget:init": "node ./dist/index.js init",
|
|
88
|
+
"widget:publish": "node ./dist/index.js publish -key 123",
|
|
89
|
+
"widget:create": "npm run build && node ./dist/index.js create",
|
|
90
|
+
"widget:local": "npm run build && node ./dist/index.js dependencies -t local",
|
|
91
|
+
"widget:remote": "npm run build && node ./dist/index.js dependencies -t remote",
|
|
82
92
|
"build:publish": "npm run build && npm run pnpm:publish",
|
|
83
|
-
"pnpm:publish": "pnpm publish --no-git-checks"
|
|
93
|
+
"pnpm:publish": "pnpm publish --no-git-checks",
|
|
94
|
+
"remote": "widget dependencies -t remote && pnpm install",
|
|
95
|
+
"local": "widget dependencies -t local && pnpm install",
|
|
96
|
+
"link": "pnpm link --global",
|
|
97
|
+
"lint": "eslint .",
|
|
98
|
+
"lint:fix": "eslint . --fix"
|
|
84
99
|
}
|
|
85
100
|
}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<widget-edit-dialog :widget-params="widgetParams" :option="widgetConfigOption"
|
|
3
|
-
v-model="widgetData"
|
|
4
|
-
@apply="save()"
|
|
5
|
-
@confirm="save({ closeWindow: true })">
|
|
2
|
+
<widget-edit-dialog :widget-params="widgetParams" :option="widgetConfigOption">
|
|
6
3
|
</widget-edit-dialog>
|
|
7
4
|
</template>
|
|
8
5
|
|
|
9
6
|
<script lang="ts" setup>
|
|
10
7
|
import {useWidget, WidgetConfigOption} from "@widget-js/vue3";
|
|
11
|
-
import {WidgetData} from "@widget-js/core";
|
|
12
8
|
|
|
13
|
-
const {
|
|
9
|
+
const {widgetParams } = useWidget()
|
|
14
10
|
|
|
15
11
|
//修改成需要设置组件参数配置
|
|
16
12
|
const widgetConfigOption = new WidgetConfigOption({
|
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
import {Widget, WidgetKeyword} from "@widget-js/core";
|
|
2
2
|
//TODO 修改组件信息,标题,描述,关键词
|
|
3
|
-
const name = "<%= widgetName %>";
|
|
4
|
-
//组件标题
|
|
5
|
-
const title = {"zh-CN": "<%= title %>"};
|
|
6
|
-
//组件描述
|
|
7
|
-
const description = {"zh-CN": ""};
|
|
8
|
-
//组件关键词
|
|
9
|
-
const keywords = [WidgetKeyword.RECOMMEND];
|
|
10
|
-
//组件路由地址
|
|
11
|
-
const path = "/widget/<%= snakeCaseName %>";
|
|
12
|
-
//配置页路由地址
|
|
13
|
-
const configPagePath = <% if (configurable) { %>"/widget/config/<%= snakeCaseName %>"<% } else { %>undefined<% } %>;
|
|
14
|
-
//组件关键词
|
|
15
3
|
const <%= name %>Widget = new Widget({
|
|
16
|
-
name:
|
|
17
|
-
title: title,
|
|
18
|
-
description:
|
|
19
|
-
keywords:
|
|
4
|
+
name: "<%= widgetName %>",
|
|
5
|
+
title: {"zh-CN": "<%= title %>"},
|
|
6
|
+
description: {"zh-CN": ""},
|
|
7
|
+
keywords: [WidgetKeyword.RECOMMEND],
|
|
8
|
+
categories: [],
|
|
20
9
|
lang: "zh-CN",
|
|
21
10
|
width: <%= width %>,
|
|
22
11
|
height: <%= height %>,
|
|
@@ -25,8 +14,8 @@ maxWidth: <%= maxWidth %>,
|
|
|
25
14
|
minHeight: <%= minHeight %>,
|
|
26
15
|
maxHeight: <%= maxHeight %>,
|
|
27
16
|
previewImage: "修改为组件预览图地址",
|
|
28
|
-
path,
|
|
29
|
-
configPagePath
|
|
17
|
+
path: "/widget/<%= snakeCaseName %>",
|
|
18
|
+
configPagePath: <% if (configurable) { %>"/widget/config/<%= snakeCaseName %>?width=600&height=500&frame=true&transparent=false"<% } else { %>undefined<% } %>
|
|
30
19
|
})
|
|
31
20
|
|
|
32
21
|
export default <%= name %>Widget;
|
|
@@ -4,7 +4,7 @@ import <%= name %>Widget from "./<%= name %>.widget";
|
|
|
4
4
|
const path = <%= name %>Widget.path;
|
|
5
5
|
const name = <%= name %>Widget.name;
|
|
6
6
|
<% if (configurable) { %>
|
|
7
|
-
const configPagePath = <%= name %>Widget.configPagePath
|
|
7
|
+
const configPagePath = <%= name %>Widget.configPagePath!.split('?')[0];
|
|
8
8
|
|
|
9
9
|
const <%= name %>WidgetRoutes: RouteRecordRaw[] = [
|
|
10
10
|
{
|
package/template/WidgetView.ejs
CHANGED
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script lang="ts" setup>
|
|
8
|
-
import {WidgetData} from "@widget-js/core";
|
|
9
8
|
import {useWidget} from "@widget-js/vue3";
|
|
10
9
|
|
|
11
|
-
const {
|
|
10
|
+
const {widgetParams} = useWidget();
|
|
12
11
|
</script>
|
|
13
12
|
|
|
14
13
|
<style scoped>
|
package/.editorconfig
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
[*]
|
|
2
|
-
charset = utf-8
|
|
3
|
-
end_of_line = crlf
|
|
4
|
-
indent_size = 2
|
|
5
|
-
indent_style = space
|
|
6
|
-
insert_final_newline = true
|
|
7
|
-
max_line_length = 120
|
|
8
|
-
tab_width = 2
|
|
9
|
-
trim_trailing_whitespace = true
|
|
10
|
-
ij_continuation_indent_size = 2
|
|
11
|
-
ij_formatter_off_tag = @formatter:off
|
|
12
|
-
ij_formatter_on_tag = @formatter:on
|
|
13
|
-
ij_formatter_tags_enabled = false
|
|
14
|
-
ij_smart_tabs = false
|
|
15
|
-
ij_visual_guides = none
|
|
16
|
-
ij_wrap_on_typing = false
|
package/.idea/cli.iml
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="JAVA_MODULE" version="4">
|
|
3
|
-
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
-
<exclude-output />
|
|
5
|
-
<content url="file://$MODULE_DIR$" />
|
|
6
|
-
<orderEntry type="inheritedJdk" />
|
|
7
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
8
|
-
</component>
|
|
9
|
-
</module>
|
package/.idea/jpa-buddy.xml
DELETED
package/.idea/misc.xml
DELETED
package/.idea/modules.xml
DELETED
package/.idea/prettier.xml
DELETED
package/.idea/vcs.xml
DELETED
package/.prettierrc
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"printWidth": 120,
|
|
3
|
-
"semi": false,
|
|
4
|
-
"singleQuote": true,
|
|
5
|
-
"overrides": [
|
|
6
|
-
{
|
|
7
|
-
"files": ["**/*.css", "**/*.scss", "**/*.html"],
|
|
8
|
-
"options": {
|
|
9
|
-
"singleQuote": false
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
],
|
|
13
|
-
"trailingComma": "all",
|
|
14
|
-
"bracketSpacing": false,
|
|
15
|
-
"arrowParens": "avoid",
|
|
16
|
-
"proseWrap": "never",
|
|
17
|
-
"htmlWhitespaceSensitivity": "strict",
|
|
18
|
-
"vueIndentScriptAndStyle": false,
|
|
19
|
-
"endOfLine": "lf",
|
|
20
|
-
"singleAttributePerLine": true
|
|
21
|
-
}
|
package/jest.config.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
roots: ['<rootDir>/test'],
|
|
3
|
-
testMatch: [
|
|
4
|
-
'**/__tests__/**/*.+(ts|tsx|js)',
|
|
5
|
-
'**/?(*.)+(spec|test).+(ts|tsx|js)',
|
|
6
|
-
],
|
|
7
|
-
transform: {
|
|
8
|
-
'^.+\\.(ts|tsx)$': ['ts-jest', {
|
|
9
|
-
tsconfig: 'tsconfig.json',
|
|
10
|
-
}],
|
|
11
|
-
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
|
|
12
|
-
'./config/fileTransformer.js',
|
|
13
|
-
},
|
|
14
|
-
}
|
package/release.json
DELETED
package/src/build/build.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { exec } from 'node:child_process'
|
|
2
|
-
import ora from 'ora'
|
|
3
|
-
import consola from 'consola'
|
|
4
|
-
|
|
5
|
-
export function build() {
|
|
6
|
-
const preloadSpinner = ora('Preload').start()
|
|
7
|
-
const mainSpinner = ora('Main').start()
|
|
8
|
-
// @ts-expect-error
|
|
9
|
-
const build = exec('npm run build:preload').on('close', () => {
|
|
10
|
-
consola.success('done')
|
|
11
|
-
})
|
|
12
|
-
// @ts-expect-error
|
|
13
|
-
build.stdout.on('data', (data) => {
|
|
14
|
-
consola.log('data', data)
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
// @ts-expect-error
|
|
18
|
-
exec('npm run build:main', (error, stdout, stderr) => {
|
|
19
|
-
if (error) {
|
|
20
|
-
consola.error(`error: ${error}`)
|
|
21
|
-
return
|
|
22
|
-
}
|
|
23
|
-
consola.log(`stdout: ${stdout}`)
|
|
24
|
-
consola.log(`stderr: ${typeof stderr}`)
|
|
25
|
-
})
|
|
26
|
-
.on('message', () => {
|
|
27
|
-
consola.log('on-message')
|
|
28
|
-
})
|
|
29
|
-
.on('data', () => {
|
|
30
|
-
consola.log('on-data')
|
|
31
|
-
})
|
|
32
|
-
.on('close', () => {
|
|
33
|
-
consola.log('done')
|
|
34
|
-
})
|
|
35
|
-
}
|