create-jwn-js 1.0.23 → 1.0.25
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/package.json +2 -2
- package/template-vite-node-ts/connect.json +43 -0
- package/template-vite-node-ts/package.json +16 -15
- package/template-vite-node-ts/src/backend/server/helpers/createConfigServer.ts +0 -6
- package/template-vite-node-ts/src/backend/views/Api/v1/Clients/__its__/clients.spec.ts +1 -1
- package/template-vite-node-ts/src/scripts/test.setup.ts +1 -7
- package/template-vite-node-ts/src/scripts/vitest.global.setup.ts +1 -1
- package/template-vite-node-ts/tsconfig.json +1 -1
- package/template-vite-node-ts/yarn.lock +1446 -1910
- package/template-vite-vue3-ts/connect-template.json +11 -2
- package/template-vite-vue3-ts/connect.json +43 -0
- package/template-vite-vue3-ts/package.json +34 -37
- package/template-vite-vue3-ts/postcss.config.js +1 -14
- package/template-vite-vue3-ts/src/backend/server/helpers/createConfigServer.ts +3 -8
- package/template-vite-vue3-ts/src/backend/server/index.ts +1 -1
- package/template-vite-vue3-ts/src/frontend/App.vue +7 -6
- package/template-vite-vue3-ts/src/frontend/entry-options.ts +4 -2
- package/template-vite-vue3-ts/src/scripts/{jest.setup.ts → test.setup.ts} +3 -9
- package/template-vite-vue3-ts/src/scripts/{jest.global.setup.ts → vitest.global.setup.ts} +10 -3
- package/template-vite-vue3-ts/vite.config.ts +18 -18
- package/template-vite-vue3-ts/vitest.config.mts +43 -0
- package/template-vite-vue3-ts/vitest.config.production.mts +41 -0
- package/template-vite-vue3-ts/yarn.lock +2217 -0
- package/template-vite-node-ts/src/scripts/test.config.ts +0 -24
- package/template-vite-vue3-ts/jest.config.ts +0 -38
- package/template-vite-vue3-ts/src/scripts/jest.global.teardown.ts +0 -9
- /package/template-vite-node-ts/{vite.config.ts → vite.config.mts} +0 -0
- /package/template-vite-node-ts/{vitest.config.ts → vitest.config.mts} +0 -0
- /package/template-vite-node-ts/{vitest.config.production.ts → vitest.config.production.mts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-jwn-js",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.25",
|
|
4
4
|
"license": "PRIVATE",
|
|
5
5
|
"author": "Webigorkiev",
|
|
6
6
|
"bin": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"main": "index.js",
|
|
15
15
|
"scripts": {},
|
|
16
16
|
"engines": {
|
|
17
|
-
"node": ">=
|
|
17
|
+
"node": ">=20.0.0"
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://github.com/webigorkiev",
|
|
20
20
|
"dependencies": {
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"server": {
|
|
3
|
+
"development": {
|
|
4
|
+
"mode": "development",
|
|
5
|
+
"https": false,
|
|
6
|
+
"port": 3000,
|
|
7
|
+
"host": "localhost",
|
|
8
|
+
"url": "http://127.0.0.1"
|
|
9
|
+
},
|
|
10
|
+
"production": {
|
|
11
|
+
"mode": "production",
|
|
12
|
+
"https": false,
|
|
13
|
+
"port": 3000,
|
|
14
|
+
"host": "127.0.0.1",
|
|
15
|
+
"url": "http://127.0.0.1"
|
|
16
|
+
},
|
|
17
|
+
"test": {
|
|
18
|
+
"mode": "development",
|
|
19
|
+
"https": false,
|
|
20
|
+
"port": 3000,
|
|
21
|
+
"host": "localhost",
|
|
22
|
+
"url": "http://127.0.0.1"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"db": {
|
|
26
|
+
"home": {
|
|
27
|
+
"engine": "mysql",
|
|
28
|
+
"host": "localhost",
|
|
29
|
+
"user": "",
|
|
30
|
+
"password": "",
|
|
31
|
+
"database": "",
|
|
32
|
+
"connectTimeout": 10000,
|
|
33
|
+
"acquireTimeout": 10000,
|
|
34
|
+
"connectionLimit": 2,
|
|
35
|
+
"charset": "utf8",
|
|
36
|
+
"compress": true,
|
|
37
|
+
"port": 3306,
|
|
38
|
+
"multipleStatements": true,
|
|
39
|
+
"namedPlaceholders": true,
|
|
40
|
+
"dateStrings": true
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -10,27 +10,28 @@
|
|
|
10
10
|
"serve": "vite",
|
|
11
11
|
"build": "vite build",
|
|
12
12
|
"test": "vitest run",
|
|
13
|
-
"test:production": "vitest run -c vitest.config.production.
|
|
13
|
+
"test:production": "vitest run -c vitest.config.production.mts",
|
|
14
14
|
"docs:dev": "vitepress dev docs",
|
|
15
15
|
"docs:build": "vitepress build docs",
|
|
16
16
|
"docs:serve": "vitepress serve docs"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@types/memjs": "^1.
|
|
20
|
-
"@types/node": "
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
19
|
+
"@types/memjs": "^1.3.3",
|
|
20
|
+
"@types/node": "20",
|
|
21
|
+
"chalk": "4",
|
|
22
|
+
"jsdom": "^24.1.0",
|
|
23
|
+
"mariadb": "^3.3.1",
|
|
24
|
+
"typescript": "^5.5.2",
|
|
25
|
+
"vite": "^5.3.1",
|
|
26
|
+
"vitepress": "^1.2.3",
|
|
27
|
+
"vitest": "^1.6.0"
|
|
27
28
|
},
|
|
28
29
|
"dependencies": {
|
|
29
|
-
"@jwn-js/common": "2.
|
|
30
|
-
"buildmsql": "1.6.9",
|
|
31
|
-
"cross-fetch": "
|
|
32
|
-
"easy-ash": "1.1.14",
|
|
33
|
-
"margv": "1.1.2",
|
|
34
|
-
"memjs": "1.3.2"
|
|
30
|
+
"@jwn-js/common": "^2.2.7",
|
|
31
|
+
"buildmsql": "^1.6.9",
|
|
32
|
+
"cross-fetch": "^4.0.0",
|
|
33
|
+
"easy-ash": "^1.1.14",
|
|
34
|
+
"margv": "^1.1.2",
|
|
35
|
+
"memjs": "^1.3.2"
|
|
35
36
|
}
|
|
36
37
|
}
|
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
import margv from "margv";
|
|
2
2
|
const args = margv();
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* Config for server
|
|
6
|
-
* @param config
|
|
7
|
-
*/
|
|
8
4
|
export const createConfigServer = (config: Record<string, any>, nodeEnv?: "development"|"production"|"test") => {
|
|
9
5
|
const env = (nodeEnv || process.env.NODE_ENV || "development") as "development"|"production"|"test";
|
|
10
6
|
const configServer = config.server[env];
|
|
11
|
-
|
|
12
7
|
configServer.https = args.https ?? configServer.https;
|
|
13
8
|
configServer.protocol = configServer.https ? "https" : "http";
|
|
14
9
|
configServer.port = args.port || configServer.port;
|
|
15
10
|
configServer.webPort = process.env.NODE_ENV === "production" ? configServer.port : 3001;
|
|
16
11
|
configServer.host = args.host || configServer.host;
|
|
17
12
|
configServer.proxy = `http://${configServer.host}:${configServer.webPort}`;
|
|
18
|
-
|
|
19
13
|
return configServer;
|
|
20
14
|
}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import crossFetch from "cross-fetch";
|
|
2
2
|
// @ts-ignore
|
|
3
3
|
import config from "../../connect.json";
|
|
4
|
-
<<<<<<< HEAD:template-vite-node-ts/src/scripts/test.setup.ts
|
|
5
|
-
import {createConfigServer} from "../../src/backend/server/helpers/createConfigServer";
|
|
6
|
-
const cnf = createConfigServer(config, process.env.TEST_MODE_APP as "test");
|
|
7
|
-
=======
|
|
8
4
|
import {createConfigServer} from "@/backend/server/helpers/createConfigServer";
|
|
9
|
-
const cnf = createConfigServer(config);
|
|
10
|
-
|
|
11
|
-
>>>>>>> ad324504e6d98d4d9229b45f1d428d8a9ce37811:template-vite-node-ts/src/scripts/test.config.ts
|
|
5
|
+
const cnf = createConfigServer(config, process.env.TEST_MODE_APP as "test");
|
|
12
6
|
const apiUrl = `${cnf.protocol}://${cnf.host}:${cnf.port}`;
|
|
13
7
|
const defaultHeaders = {
|
|
14
8
|
headers: {
|