@qlover/create-app 0.1.12 → 0.1.14
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/CHANGELOG.md +2 -0
- package/bin/create-app.js +0 -0
- package/dist/index.cjs +3631 -0
- package/dist/{cjs/index.d.ts → index.d.ts} +3 -2
- package/dist/index.js +3625 -0
- package/package.json +17 -16
- package/templates/node-lib/bin/test.js +1 -1
- package/templates/node-lib/package.json +2 -2
- package/templates/node-lib/rollup.config.js +1 -2
- package/templates/pack-app/package.json +1 -1
- package/templates/react-app/.env.local +24 -0
- package/templates/react-app/lib/router-loader/Page.ts +8 -4
- package/templates/react-app/lib/router-loader/RouterLoader.ts +1 -1
- package/templates/react-app/pnpm-lock.yaml +5892 -0
- package/configs/_common/.release-it.json.template +0 -42
- package/dist/cjs/index.js +0 -1
- package/dist/es/index.d.ts +0 -112
- package/dist/es/index.js +0 -1
package/package.json
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qlover/create-app",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
|
-
"main": "./dist/
|
|
7
|
-
"module": "./dist/
|
|
8
|
-
"types": "./dist/
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
|
+
"./package.json": "./package.json",
|
|
10
11
|
".": {
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
}
|
|
15
|
-
"./cjs/*": "./dist/cjs/*",
|
|
16
|
-
"./es/*": "./dist/es/*",
|
|
17
|
-
"./package.json": "./package.json"
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"require": "./dist/index.cjs"
|
|
15
|
+
}
|
|
18
16
|
},
|
|
19
17
|
"files": [
|
|
20
18
|
"dist",
|
|
@@ -26,11 +24,10 @@
|
|
|
26
24
|
"CHANGELOG.md"
|
|
27
25
|
],
|
|
28
26
|
"bin": {
|
|
29
|
-
"create-app": "
|
|
27
|
+
"create-app": "bin/create-app.js"
|
|
30
28
|
},
|
|
31
29
|
"scripts": {
|
|
32
30
|
"build": "rollup -c",
|
|
33
|
-
"test": "jest",
|
|
34
31
|
"create:app:build": "npm run build && npm run create:app",
|
|
35
32
|
"create:app": "node ./bin/create-app.js"
|
|
36
33
|
},
|
|
@@ -50,12 +47,16 @@
|
|
|
50
47
|
"publishConfig": {
|
|
51
48
|
"access": "public"
|
|
52
49
|
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@qlover/env-loader": "^0.0.1"
|
|
52
|
+
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@qlover/fe-
|
|
55
|
-
"@qlover/scripts-context": "
|
|
54
|
+
"@qlover/fe-corekit": "^1.2.2",
|
|
55
|
+
"@qlover/scripts-context": "^0.0.8",
|
|
56
56
|
"commander": "^13.1.0",
|
|
57
57
|
"ignore": "^7.0.3",
|
|
58
58
|
"inquirer": "^12.3.2",
|
|
59
|
-
"ora": "^8.1.1"
|
|
59
|
+
"ora": "^8.1.1",
|
|
60
|
+
"lodash": "^4.17.21"
|
|
60
61
|
}
|
|
61
62
|
}
|
|
@@ -10,7 +10,7 @@ function programArgs() {
|
|
|
10
10
|
'Do not touch or write anything, but show the commands'
|
|
11
11
|
)
|
|
12
12
|
.option('-V, --verbose', 'Show more information')
|
|
13
|
-
.option('-n, --name <name>', 'The name of the test')
|
|
13
|
+
.option('-n, --name <name>', 'The name of the test');
|
|
14
14
|
// parse arguments
|
|
15
15
|
program.parse();
|
|
16
16
|
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"run:command": "node bin/test.js"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@qlover/env-loader": "
|
|
50
|
-
"@qlover/fe-standard": "
|
|
49
|
+
"@qlover/env-loader": "workspace:*",
|
|
50
|
+
"@qlover/fe-standard": "workspace:*",
|
|
51
51
|
"@qlover/scripts-context": "latest",
|
|
52
52
|
"@release-it/conventional-changelog": "^8.0.1",
|
|
53
53
|
"@rollup/plugin-commonjs": "^28.0.1",
|
|
@@ -9,7 +9,7 @@ import { readFileSync, rmSync } from 'fs';
|
|
|
9
9
|
import { Env } from '@qlover/env-loader';
|
|
10
10
|
|
|
11
11
|
const pkg = JSON.parse(readFileSync('./package.json'), 'utf-8');
|
|
12
|
-
const env = Env.searchEnv(
|
|
12
|
+
const env = Env.searchEnv();
|
|
13
13
|
const isProduction = env.get('NODE_ENV') === 'production';
|
|
14
14
|
const buildDir = 'dist';
|
|
15
15
|
|
|
@@ -44,7 +44,6 @@ function createPlugin(minify) {
|
|
|
44
44
|
|
|
45
45
|
function cleanBuildDir() {
|
|
46
46
|
rmSync(buildDir, { recursive: true, force: true });
|
|
47
|
-
console.log(`${buildDir} cleaned`);
|
|
48
47
|
}
|
|
49
48
|
|
|
50
49
|
cleanBuildDir();
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
NODE_ENV=local
|
|
2
|
+
|
|
3
|
+
# ci
|
|
4
|
+
NPM_TOKEN=
|
|
5
|
+
GITHUB_TOKEN=
|
|
6
|
+
|
|
7
|
+
# fe-scripts
|
|
8
|
+
FE_RELEASE_BRANCH=master
|
|
9
|
+
FE_RELEASE=false
|
|
10
|
+
FE_RELEASE_ENV=production
|
|
11
|
+
|
|
12
|
+
# ===== build
|
|
13
|
+
VITE_PUBLIC_PATH=
|
|
14
|
+
VITE_SERVER_PORT=3200
|
|
15
|
+
|
|
16
|
+
# ===== app config
|
|
17
|
+
VITE_USER_TOKEN_STORAGE_KEY=fe_user_token
|
|
18
|
+
VITE_OPEN_AI_MODELS='["gpt-4o-mini","gpt-3.5-turbo","gpt-3.5-turbo-2","gpt-4","gpt-4-32k"]'
|
|
19
|
+
VITE_OPEN_AI_BASE_URL=https://openai-proxy.brain.loocaa.com:1443/v1/
|
|
20
|
+
VITE_OPEN_AI_TOKEN=DlJYSkMVj1x4zoe8jZnjvxfHG6z5yGxK
|
|
21
|
+
VITE_OPEN_AI_TOKEN_PREFIX=Bearer
|
|
22
|
+
VITE_OPEN_AI_REQUIRE_TOKEN=true
|
|
23
|
+
VITE_LOGIN_USER=admin
|
|
24
|
+
VITE_LOGIN_PASSWORD=123456
|
|
@@ -48,15 +48,19 @@ export type LoadProps = {
|
|
|
48
48
|
Provider?: React.ComponentType<PropsWithChildren<RouteMeta>>;
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
type ComponentValue =
|
|
52
|
+
| React.ComponentType<unknown>
|
|
53
|
+
| LazyExoticComponent<React.ComponentType<unknown>>;
|
|
53
54
|
|
|
54
55
|
export type ComponentMaps = {
|
|
55
56
|
/**
|
|
56
57
|
* key: ./xxx/bbb.(jsx,js,tsx,ts)
|
|
57
58
|
*/
|
|
58
|
-
[key: string]:
|
|
59
|
-
|
|
59
|
+
[key: string]:
|
|
60
|
+
| ComponentValue
|
|
61
|
+
| (() => Promise<ComponentValue>)
|
|
62
|
+
| (() => ComponentValue);
|
|
63
|
+
};
|
|
60
64
|
|
|
61
65
|
// new RouterManager({
|
|
62
66
|
// routes: [],
|