@builder6/core 3.0.5 → 3.0.7
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/dist/config/index.d.ts +1 -2
- package/dist/config/index.js +1 -4
- package/dist/config/index.js.map +1 -1
- package/package.json +5 -4
- package/views/error.ejs +73 -0
- package/dist/config/steedos.config.d.ts +0 -4
- package/dist/config/steedos.config.js +0 -74
- package/dist/config/steedos.config.js.map +0 -1
package/dist/config/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import getEnvConfigs from './env.config';
|
|
2
|
-
import getSteedosConfigs from './steedos.config';
|
|
3
2
|
export declare function getDbConfigs(): Promise<{}>;
|
|
4
3
|
export declare function getMoleculerConfigs(): any;
|
|
5
4
|
export declare function getConfigs(): any;
|
|
6
5
|
export declare const configs: any;
|
|
7
|
-
export { getEnvConfigs
|
|
6
|
+
export { getEnvConfigs };
|
package/dist/config/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.getEnvConfigs = exports.configs = void 0;
|
|
7
7
|
exports.getDbConfigs = getDbConfigs;
|
|
8
8
|
exports.getMoleculerConfigs = getMoleculerConfigs;
|
|
9
9
|
exports.getConfigs = getConfigs;
|
|
@@ -11,8 +11,6 @@ const default_config_1 = __importDefault(require("./default.config"));
|
|
|
11
11
|
const env_config_1 = __importDefault(require("./env.config"));
|
|
12
12
|
exports.getEnvConfigs = env_config_1.default;
|
|
13
13
|
const moleculer_config_1 = __importDefault(require("./moleculer.config"));
|
|
14
|
-
const steedos_config_1 = __importDefault(require("./steedos.config"));
|
|
15
|
-
exports.getSteedosConfigs = steedos_config_1.default;
|
|
16
14
|
async function getDbConfigs() {
|
|
17
15
|
return {};
|
|
18
16
|
}
|
|
@@ -26,7 +24,6 @@ function getMoleculerConfigs() {
|
|
|
26
24
|
function getConfigs() {
|
|
27
25
|
return {
|
|
28
26
|
...default_config_1.default,
|
|
29
|
-
...(0, steedos_config_1.default)(),
|
|
30
27
|
...(0, env_config_1.default)(),
|
|
31
28
|
};
|
|
32
29
|
}
|
package/dist/config/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":";;;;;;AAIA,oCAEC;AAED,kDAMC;AAED,gCAKC;AArBD,sEAA8C;AAC9C,8DAAyC;AAwBhC,wBAxBF,oBAAa,CAwBE;AAvBtB,0EAAkD;AAE3C,KAAK,UAAU,YAAY;IAChC,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,SAAgB,mBAAmB;IACjC,MAAM,EAAE,SAAS,EAAE,GAAG,IAAA,oBAAa,GAAE,CAAC;IACtC,OAAO;QACL,GAAG,0BAAgB;QACnB,GAAG,SAAS;KACb,CAAC;AACJ,CAAC;AAED,SAAgB,UAAU;IACxB,OAAO;QACL,GAAG,wBAAc;QACjB,GAAG,IAAA,oBAAa,GAAE;KACnB,CAAC;AACJ,CAAC;AAEY,QAAA,OAAO,GAAG,UAAU,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder6/core",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.7",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
7
|
-
"dist"
|
|
7
|
+
"dist",
|
|
8
|
+
"views"
|
|
8
9
|
],
|
|
9
10
|
"dependencies": {
|
|
10
11
|
"@aws-sdk/client-cloudwatch-logs": "^3.721.0",
|
|
11
|
-
"@builder6/query-mongodb": "3.0.
|
|
12
|
+
"@builder6/query-mongodb": "3.0.7",
|
|
12
13
|
"@socket.io/redis-adapter": "^8.3.0",
|
|
13
14
|
"moleculer": "^0.14.35",
|
|
14
15
|
"pino-http": "^10.3.0",
|
|
@@ -22,5 +23,5 @@
|
|
|
22
23
|
"publishConfig": {
|
|
23
24
|
"access": "public"
|
|
24
25
|
},
|
|
25
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "eb1dd820e3365f743ee927bb2d178256b6ec36d2"
|
|
26
27
|
}
|
package/views/error.ejs
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>访问被拒绝</title>
|
|
7
|
+
<style>
|
|
8
|
+
:root {
|
|
9
|
+
--bg-color: #ffffff;
|
|
10
|
+
--text-color: #333333;
|
|
11
|
+
--subtext-color: #888888;
|
|
12
|
+
--icon-color: #ff4d4f;
|
|
13
|
+
--border-color: #e0e0e0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@media (prefers-color-scheme: dark) {
|
|
17
|
+
:root {
|
|
18
|
+
--bg-color: #1e1e1e;
|
|
19
|
+
--text-color: #eeeeee;
|
|
20
|
+
--subtext-color: #aaaaaa;
|
|
21
|
+
--icon-color: #ff6b6b;
|
|
22
|
+
--border-color: #333333;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
body {
|
|
27
|
+
margin: 0;
|
|
28
|
+
padding: 0;
|
|
29
|
+
background-color: var(--bg-color);
|
|
30
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
height: 100vh;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.container {
|
|
38
|
+
text-align: center;
|
|
39
|
+
padding: 40px 30px;
|
|
40
|
+
background-color: var(--bg-color);
|
|
41
|
+
border: 1px solid var(--border-color);
|
|
42
|
+
border-radius: 16px;
|
|
43
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
|
|
44
|
+
max-width: 90%;
|
|
45
|
+
width: 400px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.icon {
|
|
49
|
+
font-size: 56px;
|
|
50
|
+
color: var(--icon-color);
|
|
51
|
+
margin-bottom: 20px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.message {
|
|
55
|
+
font-size: 20px;
|
|
56
|
+
color: var(--text-color);
|
|
57
|
+
margin-bottom: 10px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.subtext {
|
|
61
|
+
font-size: 16px;
|
|
62
|
+
color: var(--subtext-color);
|
|
63
|
+
}
|
|
64
|
+
</style>
|
|
65
|
+
</head>
|
|
66
|
+
<body>
|
|
67
|
+
<div class="container">
|
|
68
|
+
<div class="icon">⚠️</div>
|
|
69
|
+
<div class="message">访问失败,请联系系统管理员</div>
|
|
70
|
+
<div class="subtext"><%= statusCode %> <%= message %></div>
|
|
71
|
+
</div>
|
|
72
|
+
</body>
|
|
73
|
+
</html>
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.default = getSteedosConfigs;
|
|
37
|
-
const fs = __importStar(require("fs"));
|
|
38
|
-
const path = __importStar(require("path"));
|
|
39
|
-
const yaml = __importStar(require("js-yaml"));
|
|
40
|
-
function loadYamlFile(filePath) {
|
|
41
|
-
const absPath = path.isAbsolute(filePath)
|
|
42
|
-
? filePath
|
|
43
|
-
: path.resolve(__dirname, filePath);
|
|
44
|
-
const fileContent = fs.readFileSync(absPath, 'utf8');
|
|
45
|
-
return yaml.load(fileContent);
|
|
46
|
-
}
|
|
47
|
-
function replaceEnvVarsInObject(obj) {
|
|
48
|
-
if (typeof obj === 'string') {
|
|
49
|
-
return obj.replace(/\${([^}]+)}/g, (match, varName) => {
|
|
50
|
-
return process.env[varName] ?? match;
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
if (Array.isArray(obj)) {
|
|
54
|
-
return obj.map((item) => replaceEnvVarsInObject(item));
|
|
55
|
-
}
|
|
56
|
-
if (obj !== null && typeof obj === 'object') {
|
|
57
|
-
const result = {};
|
|
58
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
59
|
-
result[key] = replaceEnvVarsInObject(value);
|
|
60
|
-
}
|
|
61
|
-
return result;
|
|
62
|
-
}
|
|
63
|
-
return obj;
|
|
64
|
-
}
|
|
65
|
-
function getConfig(filePath) {
|
|
66
|
-
const config = loadYamlFile(filePath);
|
|
67
|
-
const replacedConfig = replaceEnvVarsInObject(config);
|
|
68
|
-
return replacedConfig;
|
|
69
|
-
}
|
|
70
|
-
function getSteedosConfigs() {
|
|
71
|
-
const filePath = path.join(__dirname, '..', '..', 'default.steedos.settings.yml');
|
|
72
|
-
return getConfig(filePath);
|
|
73
|
-
}
|
|
74
|
-
//# sourceMappingURL=steedos.config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"steedos.config.js","sourceRoot":"","sources":["../../src/config/steedos.config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmOA,oCAQC;AArED,uCAAyB;AACzB,2CAA6B;AAC7B,8CAAgC;AAchC,SAAS,YAAY,CAAC,QAAgB;IACpC,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;QACvC,CAAC,CAAC,QAAQ;QACV,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IACtC,MAAM,WAAW,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACrD,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAW,CAAC;AAC1C,CAAC;AAOD,SAAS,sBAAsB,CAAI,GAAM;IACvC,IAAI,OAAO,GAAG,KAAK,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