@steedos/server 3.0.0-beta.10 → 3.0.0-beta.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/app.config.js +1 -0
- package/dist/config/index.d.ts +1 -6
- package/dist/config/index.js +4 -17
- package/dist/config/index.js.map +1 -1
- package/dist/config/moleculler.config.d.ts +1 -2
- package/dist/config/moleculler.config.js +86 -83
- package/dist/config/moleculler.config.js.map +1 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +54 -14
- package/dist/index.js.map +1 -1
- package/package.json +8 -72
- package/dist/app.module.d.ts +0 -4
- package/dist/app.module.js +0 -84
- package/dist/app.module.js.map +0 -1
- package/dist/bootstrap.d.ts +0 -1
- package/dist/bootstrap.js +0 -156
- package/dist/bootstrap.js.map +0 -1
- package/dist/config/env.config.d.ts +0 -1
- package/dist/config/env.config.js +0 -128
- package/dist/config/env.config.js.map +0 -1
- package/dist/config/project.config.d.ts +0 -1
- package/dist/config/project.config.js +0 -15
- package/dist/config/project.config.js.map +0 -1
- package/dist/filters/all-exceptions.filter.d.ts +0 -5
- package/dist/filters/all-exceptions.filter.js +0 -62
- package/dist/filters/all-exceptions.filter.js.map +0 -1
- package/dist/main.d.ts +0 -1
- package/dist/main.js +0 -5
- package/dist/main.js.map +0 -1
package/app.config.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./dist/index.js');
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const projectConfigs: any;
|
|
1
|
+
export { getMoleculerConfigs } from "./moleculler.config";
|
|
3
2
|
export declare const steedosConfig: any;
|
|
4
3
|
export declare function getDbConfigs(): Promise<{}>;
|
|
5
4
|
export declare function getSteedosConfigs(): any;
|
|
6
|
-
export declare function getMoleculerConfigs(): any;
|
|
7
|
-
export declare function getConfigs(): any;
|
|
8
|
-
export declare const configs: any;
|
|
9
|
-
export { getEnvConfigs };
|
package/dist/config/index.js
CHANGED
|
@@ -12,20 +12,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.
|
|
15
|
+
exports.steedosConfig = exports.getMoleculerConfigs = void 0;
|
|
16
16
|
exports.getDbConfigs = getDbConfigs;
|
|
17
17
|
exports.getSteedosConfigs = getSteedosConfigs;
|
|
18
|
-
exports.getMoleculerConfigs = getMoleculerConfigs;
|
|
19
|
-
exports.getConfigs = getConfigs;
|
|
20
18
|
const steedos_config_1 = __importDefault(require("./steedos.config"));
|
|
21
|
-
|
|
22
|
-
exports
|
|
23
|
-
const moleculler_config_1 = __importDefault(require("./moleculler.config"));
|
|
24
|
-
const project_config_1 = __importDefault(require("./project.config"));
|
|
25
|
-
exports.projectConfigs = (0, project_config_1.default)(process.cwd());
|
|
19
|
+
var moleculler_config_1 = require("./moleculler.config");
|
|
20
|
+
Object.defineProperty(exports, "getMoleculerConfigs", { enumerable: true, get: function () { return moleculler_config_1.getMoleculerConfigs; } });
|
|
26
21
|
exports.steedosConfig = steedos_config_1.default.getSteedosConfig();
|
|
27
22
|
global.Steedos = {
|
|
28
|
-
settings: exports.steedosConfig.settings
|
|
23
|
+
settings: exports.steedosConfig.settings,
|
|
29
24
|
};
|
|
30
25
|
function getDbConfigs() {
|
|
31
26
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -35,12 +30,4 @@ function getDbConfigs() {
|
|
|
35
30
|
function getSteedosConfigs() {
|
|
36
31
|
return exports.steedosConfig;
|
|
37
32
|
}
|
|
38
|
-
function getMoleculerConfigs() {
|
|
39
|
-
const { moleculer } = (0, env_config_1.default)();
|
|
40
|
-
return Object.assign(Object.assign({}, moleculler_config_1.default), moleculer);
|
|
41
|
-
}
|
|
42
|
-
function getConfigs() {
|
|
43
|
-
return Object.assign(Object.assign({}, exports.steedosConfig), (0, env_config_1.default)());
|
|
44
|
-
}
|
|
45
|
-
exports.configs = getConfigs();
|
|
46
33
|
//# sourceMappingURL=index.js.map
|
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":";;;;;;;;;;;;;;;AAgBA,oCAEC;AAED,8CAEC;AAfD,sEAA6C;AAC7C,yDAA0D;AAAjD,wHAAA,mBAAmB,OAAA;AAEf,QAAA,aAAa,GAAG,wBAAa,CAAC,gBAAgB,EAAE,CAAC;AAE9D,MAAM,CAAC,OAAO,GAAG;IACf,QAAQ,EAAE,qBAAa,CAAC,QAAQ;CACjC,CAAC;AAEF,SAAsB,YAAY;;QAChC,OAAO,EAAE,CAAC;IACZ,CAAC;CAAA;AAED,SAAgB,iBAAiB;IAC/B,OAAO,qBAAa,CAAC;AACvB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare
|
|
1
|
+
export declare function getMoleculerConfigs(): {
|
|
2
2
|
namespace: string;
|
|
3
3
|
nodeID: any;
|
|
4
4
|
metadata: {};
|
|
@@ -60,4 +60,3 @@ declare const _default: {
|
|
|
60
60
|
started(broker: any): void;
|
|
61
61
|
stopped(broker: any): void;
|
|
62
62
|
};
|
|
63
|
-
export default _default;
|
|
@@ -9,88 +9,91 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
exports.getMoleculerConfigs = getMoleculerConfigs;
|
|
13
|
+
function getMoleculerConfigs() {
|
|
14
|
+
return {
|
|
15
|
+
namespace: "steedos",
|
|
16
|
+
nodeID: null,
|
|
17
|
+
metadata: {},
|
|
18
|
+
logger: {
|
|
19
|
+
type: "Console",
|
|
20
|
+
options: {
|
|
21
|
+
level: process.env.B6_MO_LOG_LEVEL,
|
|
22
|
+
colors: true,
|
|
23
|
+
moduleColors: false,
|
|
24
|
+
formatter: "[MO] {timestamp} {level} [{mod}] {msg}",
|
|
25
|
+
objectPrinter: null,
|
|
26
|
+
autoPadding: false,
|
|
27
|
+
},
|
|
25
28
|
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
}
|
|
29
|
+
transporter: process.env.B6_TRANSPORTER,
|
|
30
|
+
cacher: process.env.B6_CACHER,
|
|
31
|
+
serializer: "JSON",
|
|
32
|
+
requestTimeout: 0,
|
|
33
|
+
retryPolicy: {
|
|
34
|
+
enabled: false,
|
|
35
|
+
},
|
|
36
|
+
maxCallLevel: 100,
|
|
37
|
+
heartbeatInterval: 10,
|
|
38
|
+
heartbeatTimeout: 30,
|
|
39
|
+
contextParamsCloning: false,
|
|
40
|
+
tracking: {
|
|
41
|
+
enabled: false,
|
|
42
|
+
},
|
|
43
|
+
disableBalancer: false,
|
|
44
|
+
registry: {
|
|
45
|
+
strategy: "RoundRobin",
|
|
46
|
+
preferLocal: true,
|
|
47
|
+
},
|
|
48
|
+
circuitBreaker: {
|
|
49
|
+
enabled: false,
|
|
50
|
+
threshold: 0.5,
|
|
51
|
+
minRequestCount: 20,
|
|
52
|
+
windowTime: 60,
|
|
53
|
+
halfOpenTime: 10000,
|
|
54
|
+
check: (err) => err && err.code >= 500,
|
|
55
|
+
},
|
|
56
|
+
bulkhead: {
|
|
57
|
+
enabled: false,
|
|
58
|
+
concurrency: 10,
|
|
59
|
+
maxQueueSize: 100,
|
|
60
|
+
},
|
|
61
|
+
validator: true,
|
|
62
|
+
errorHandler: null,
|
|
63
|
+
metrics: {
|
|
64
|
+
enabled: false,
|
|
65
|
+
},
|
|
66
|
+
tracing: {
|
|
67
|
+
enabled: false,
|
|
68
|
+
},
|
|
69
|
+
middlewares: [],
|
|
70
|
+
replCommands: null,
|
|
71
|
+
skipProcessEventRegistration: true,
|
|
72
|
+
created(broker) {
|
|
73
|
+
global.broker = broker;
|
|
74
|
+
broker.logger.warn("Clear all cache entries on startup.");
|
|
75
|
+
broker.cacher.clean();
|
|
76
|
+
const objectql = require("@steedos/objectql");
|
|
77
|
+
objectql.broker.init(broker);
|
|
78
|
+
process.on("SIGTERM", close.bind(broker, "SIGTERM"));
|
|
79
|
+
process.on("SIGINT", close.bind(broker, "SIGINT"));
|
|
80
|
+
function close(signal) {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
try {
|
|
83
|
+
yield this.cacher.clean();
|
|
84
|
+
yield this.cacher.close();
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
}
|
|
88
|
+
console.log(`[${signal}]服务已停止: namespace: ${this.namespace}, nodeID: ${this.nodeID}`);
|
|
89
|
+
process.exit(0);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
started(broker) {
|
|
94
|
+
},
|
|
95
|
+
stopped(broker) {
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
}
|
|
96
99
|
//# sourceMappingURL=moleculler.config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moleculler.config.js","sourceRoot":"","sources":["../../src/config/moleculler.config.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;AAWb,
|
|
1
|
+
{"version":3,"file":"moleculler.config.js","sourceRoot":"","sources":["../../src/config/moleculler.config.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;;;;AAWb,kDAiIC;AAjID,SAAgB,mBAAmB;IACjC,OAAO;QACL,SAAS,EAAE,SAAS;QACpB,MAAM,EAAE,IAAI;QACZ,QAAQ,EAAE,EAAE;QAYZ,MAAM,EAAE;YACN,IAAI,EAAE,SAAS;YACf,OAAO,EAAE;gBAEP,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe;gBAElC,MAAM,EAAE,IAAI;gBAEZ,YAAY,EAAE,KAAK;gBAEnB,SAAS,EAAE,wCAAwC;gBAEnD,aAAa,EAAE,IAAI;gBAEnB,WAAW,EAAE,KAAK;aACnB;SACF;QAED,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc;QAEvC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,SAAS;QAE7B,UAAU,EAAE,MAAM;Q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,SAAS,CAAC,CAAC,CAAC;YACrD,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;YACnD,SAAe,KAAK,CAAC,MAAM;;oBACzB,IAAI,CAAC;wBACH,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;wBAC1B,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;oBAC5B,CAAC;oBAAC,OAAO,KAAK,EAAE,CAAC;oBAEjB,CAAC;oBACD,OAAO,CAAC,GAAG,CACT,IAAI,MAAM,sBAAsB,IAAI,CAAC,SAAS,aAAa,IAAI,CAAC,MAAM,EAAE,CACzE,CAAC;oBACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAClB,CAAC;aAAA;QACH,CAAC;QAED,OAAO,CAAC,MAAW;QAEnB,CAAC;QAED,OAAO,CAAC,MAAW;QAEnB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { AppController } from "./app.controller";
|
|
2
|
+
import { AppMoleculer } from "./app.moleculer";
|
|
3
|
+
export declare const modules: {
|
|
4
|
+
moleculer: (config: any) => any;
|
|
5
|
+
};
|
|
6
|
+
export declare const beforeServerStart: ({ app }: {
|
|
7
|
+
app: any;
|
|
8
|
+
}) => void;
|
|
9
|
+
export declare const controllers: (typeof AppController)[];
|
|
10
|
+
export declare const providers: (typeof AppMoleculer)[];
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,58 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
4
|
};
|
|
16
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
6
|
+
exports.providers = exports.controllers = exports.beforeServerStart = exports.modules = void 0;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const app_controller_1 = require("./app.controller");
|
|
9
|
+
const app_moleculer_1 = require("./app.moleculer");
|
|
10
|
+
const express_1 = __importDefault(require("express"));
|
|
11
|
+
const config_1 = require("./config");
|
|
12
|
+
const steedosConfig = (0, config_1.getSteedosConfigs)();
|
|
13
|
+
exports.modules = {
|
|
14
|
+
moleculer: (config) => {
|
|
15
|
+
return Object.assign(Object.assign(Object.assign({}, config), (0, config_1.getMoleculerConfigs)()), steedosConfig);
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
const beforeServerStart = ({ app }) => {
|
|
19
|
+
global.logger = app.logger;
|
|
20
|
+
const expressApp = app.getHttpAdapter().getInstance();
|
|
21
|
+
expressApp.use(require("@steedos/router").staticRouter());
|
|
22
|
+
const webappPackagePath = require.resolve("@steedos/webapp/package.json");
|
|
23
|
+
const webappDistPath = path_1.default.join(path_1.default.dirname(webappPackagePath), "dist");
|
|
24
|
+
if (webappPackagePath) {
|
|
25
|
+
expressApp.use("/", express_1.default.static(webappDistPath));
|
|
26
|
+
expressApp.get("/app/*react", (req, res) => {
|
|
27
|
+
res.sendFile(path_1.default.join(webappDistPath, "index.html"));
|
|
28
|
+
});
|
|
29
|
+
const frontendRoutes = [
|
|
30
|
+
"/logout",
|
|
31
|
+
"/signup",
|
|
32
|
+
"/login",
|
|
33
|
+
"/",
|
|
34
|
+
"/create-space",
|
|
35
|
+
"/select-space",
|
|
36
|
+
"/update-password",
|
|
37
|
+
"/verify/email",
|
|
38
|
+
"/verify/mobile",
|
|
39
|
+
"/home",
|
|
40
|
+
"/home/:spaceId",
|
|
41
|
+
"/app",
|
|
42
|
+
"/app/:appId",
|
|
43
|
+
"/app/:appId/page/:pageId",
|
|
44
|
+
"/app/:appId/:objectName",
|
|
45
|
+
"/app/:appId/:objectName/grid/:listviewId",
|
|
46
|
+
"/app/:appId/:objectName/:recordId/:relatedObjectName/grid",
|
|
47
|
+
"/app/:appId/:objectName/view/:recordId",
|
|
48
|
+
"/app/:appId/tab_iframe/:tabId",
|
|
49
|
+
];
|
|
50
|
+
expressApp.get(frontendRoutes, (req, res) => {
|
|
51
|
+
res.sendFile(path_1.default.join(webappDistPath, "index.html"));
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
exports.beforeServerStart = beforeServerStart;
|
|
56
|
+
exports.controllers = [app_controller_1.AppController];
|
|
57
|
+
exports.providers = [app_moleculer_1.AppMoleculer];
|
|
18
58
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAkC;AAClC,qDAAiD;AACjD,mDAA+C;AAC/C,sDAA8B;AAE9B,qCAAkE;AAElE,MAAM,aAAa,GAAG,IAAA,0BAAiB,GAAE,CAAC;AAE7B,QAAA,OAAO,GAAG;IACrB,SAAS,EAAE,CAAC,MAAM,EAAE,EAAE;QACpB,qDACK,MAAM,GACN,IAAA,4BAAmB,GAAE,GAC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,cAAc,EAAE,YAAY,CAAC,CAAC,CAAC;QACxD,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC;AA5CW,QAAA,iBAAiB,qBA4C5B;AAKW,QAAA,WAAW,GAAG,CAAC,8BAAa,CAAC,CAAC;AAE9B,QAAA,SAAS,GAAG,CAAC,4BAAY,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/server",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.14",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "AGPL-3.0-only",
|
|
@@ -9,85 +9,21 @@
|
|
|
9
9
|
"public",
|
|
10
10
|
"views"
|
|
11
11
|
],
|
|
12
|
-
"main": "
|
|
12
|
+
"main": "app.config.js",
|
|
13
13
|
"scripts": {
|
|
14
14
|
"build": "nest build",
|
|
15
|
-
"build:webpack": "webpack --config webpack.config.js",
|
|
16
|
-
"start:webpack": "node dist/bundle.js",
|
|
17
15
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
18
|
-
"start": "
|
|
19
|
-
"start:dev": "nest start --watch",
|
|
20
|
-
"start:debug": "nest start --debug --watch",
|
|
21
|
-
"start:prod": "node dist/main",
|
|
16
|
+
"start": "steedos start",
|
|
22
17
|
"moleculer:repl": "moleculer connect --config ./steedos.config.js",
|
|
23
|
-
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix"
|
|
24
|
-
"test": "jest",
|
|
25
|
-
"test:watch": "jest --watch",
|
|
26
|
-
"test:cov": "jest --coverage",
|
|
27
|
-
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
|
28
|
-
"test:e2e": "jest --config ./test/jest-e2e.json"
|
|
18
|
+
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix"
|
|
29
19
|
},
|
|
30
20
|
"dependencies": {
|
|
31
|
-
"@builder6/
|
|
32
|
-
"@builder6/core": "^0.16.3-alpha.0",
|
|
33
|
-
"@builder6/email": "^0.16.3-alpha.0",
|
|
34
|
-
"@builder6/files": "^0.16.3-alpha.0",
|
|
35
|
-
"@builder6/moleculer": "^0.16.3-alpha.0",
|
|
36
|
-
"@builder6/oidc": "^0.16.3-alpha.0",
|
|
37
|
-
"@builder6/pages": "^0.16.3-alpha.0",
|
|
38
|
-
"@builder6/query-mongodb": "^0.16.3-alpha.0",
|
|
39
|
-
"@builder6/rooms": "^0.16.3-alpha.0",
|
|
40
|
-
"@builder6/services": "0.14.6",
|
|
41
|
-
"@builder6/sharepoint": "^0.16.3-alpha.0",
|
|
42
|
-
"@builder6/steedos": "^0.16.3-alpha.0",
|
|
43
|
-
"@builder6/tables": "^0.16.3-alpha.0",
|
|
44
|
-
"@nestjs/common": "^11.0.0",
|
|
45
|
-
"@nestjs/config": "^4.0.1",
|
|
46
|
-
"@nestjs/core": "^11.0.0",
|
|
47
|
-
"@nestjs/jwt": "^11.0.0",
|
|
48
|
-
"@nestjs/platform-express": "^11.0.0",
|
|
49
|
-
"@nestjs/platform-ws": "^11.0.0",
|
|
50
|
-
"@nestjs/schedule": "^5.0.0",
|
|
51
|
-
"@nestjs/serve-static": "^5.0.0",
|
|
52
|
-
"@nestjs/swagger": "^11.0.0",
|
|
53
|
-
"@nestjs/websockets": "^11.0.0",
|
|
21
|
+
"@builder6/server": "^0.16.3-alpha.8",
|
|
54
22
|
"@steedos/ee_unpkg": "1.0.0",
|
|
55
|
-
"@steedos/service-community": "3.0.0-beta.
|
|
23
|
+
"@steedos/service-community": "3.0.0-beta.14",
|
|
56
24
|
"@steedos/service-enterprise": "^3.0.0",
|
|
57
25
|
"@steedos/service-license": "2.5.49",
|
|
58
|
-
"@steedos/webapp": "3.0.0-beta.
|
|
59
|
-
"@types/multer": "^1.4.12",
|
|
60
|
-
"aws-sdk": "^2.1692.0",
|
|
61
|
-
"axios": "^1.7.9",
|
|
62
|
-
"bcrypt": "^5.1.1",
|
|
63
|
-
"class-validator": "^0.14.1",
|
|
64
|
-
"compression": "^1.7.5",
|
|
65
|
-
"cookie-parser": "^1.4.7",
|
|
66
|
-
"crypto-js": "^4.2.0",
|
|
67
|
-
"dotenv": "^16.4.5",
|
|
68
|
-
"dotenv-flow": "^4.1.0",
|
|
69
|
-
"express-session": "^1.18.1",
|
|
70
|
-
"fs-extra": "^11.2.0",
|
|
71
|
-
"hbs": "^4.2.0",
|
|
72
|
-
"http-proxy-middleware": "^3.0.3",
|
|
73
|
-
"ioredis": "^5.4.1",
|
|
74
|
-
"mime-types": "^2.1.35",
|
|
75
|
-
"moleculer": "^0.14.35",
|
|
76
|
-
"mongodb": "^3.7.3",
|
|
77
|
-
"multer": "^1.4.5-lts.1",
|
|
78
|
-
"nestjs-pino": "^4.2.0",
|
|
79
|
-
"nopt": "5.0.0",
|
|
80
|
-
"openid-client": "^5.7.1",
|
|
81
|
-
"passport": "^0.7.0",
|
|
82
|
-
"passport-local": "^1.0.0",
|
|
83
|
-
"passport-openidconnect": "^0.1.2",
|
|
84
|
-
"raw-body": "^3.0.0",
|
|
85
|
-
"reflect-metadata": "^0.2.0",
|
|
86
|
-
"regenerator-runtime": "^0.14.1",
|
|
87
|
-
"rxjs": "^7.8.1",
|
|
88
|
-
"sha256": "^0.2.0",
|
|
89
|
-
"uuid": "^9.0.0",
|
|
90
|
-
"ws": "8.13.0"
|
|
26
|
+
"@steedos/webapp": "3.0.0-beta.14"
|
|
91
27
|
},
|
|
92
28
|
"devDependencies": {
|
|
93
29
|
"@nestjs/cli": "^11.0.0",
|
|
@@ -132,5 +68,5 @@
|
|
|
132
68
|
"publishConfig": {
|
|
133
69
|
"access": "public"
|
|
134
70
|
},
|
|
135
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "6ecc49f17c754defd373f19417304e88bdce8aa9"
|
|
136
72
|
}
|
package/dist/app.module.d.ts
DELETED
package/dist/app.module.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
-
};
|
|
11
|
-
var AppModule_1;
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.AppModule = void 0;
|
|
14
|
-
const common_1 = require("@nestjs/common");
|
|
15
|
-
const config_1 = require("@nestjs/config");
|
|
16
|
-
const nestjs_pino_1 = require("nestjs-pino");
|
|
17
|
-
const core_1 = require("@builder6/core");
|
|
18
|
-
const tables_1 = require("@builder6/tables");
|
|
19
|
-
const core_2 = require("@builder6/core");
|
|
20
|
-
const steedos_1 = require("@builder6/steedos");
|
|
21
|
-
const rooms_1 = require("@builder6/rooms");
|
|
22
|
-
const files_1 = require("@builder6/files");
|
|
23
|
-
const moleculer_1 = require("@builder6/moleculer");
|
|
24
|
-
const sharepoint_1 = require("@builder6/sharepoint");
|
|
25
|
-
const oidc_1 = require("@builder6/oidc");
|
|
26
|
-
const app_controller_1 = require("./app.controller");
|
|
27
|
-
const core_3 = require("@builder6/core");
|
|
28
|
-
const email_1 = require("@builder6/email");
|
|
29
|
-
const pages_1 = require("@builder6/pages");
|
|
30
|
-
const services_1 = require("@builder6/services");
|
|
31
|
-
const config_2 = require("./config");
|
|
32
|
-
const package_json_1 = __importDefault(require("../package.json"));
|
|
33
|
-
const schedule_1 = require("@nestjs/schedule");
|
|
34
|
-
const core_4 = require("@builder6/core");
|
|
35
|
-
const app_moleculer_1 = require("./app.moleculer");
|
|
36
|
-
const steedosConfig = (0, config_2.getSteedosConfigs)();
|
|
37
|
-
const moleculerConfig = Object.assign(Object.assign(Object.assign(Object.assign({}, (0, config_2.getMoleculerConfigs)()), steedosConfig), (0, config_2.getEnvConfigs)()), { namespace: "steedos", transporter: process.env.B6_TRANSPORTER });
|
|
38
|
-
let AppModule = AppModule_1 = class AppModule {
|
|
39
|
-
constructor() {
|
|
40
|
-
this.logger = new common_1.Logger(AppModule_1.name);
|
|
41
|
-
}
|
|
42
|
-
onModuleInit() { }
|
|
43
|
-
};
|
|
44
|
-
exports.AppModule = AppModule;
|
|
45
|
-
exports.AppModule = AppModule = AppModule_1 = __decorate([
|
|
46
|
-
(0, common_1.Module)({
|
|
47
|
-
imports: [
|
|
48
|
-
config_1.ConfigModule.forRoot({
|
|
49
|
-
load: [config_2.getConfigs],
|
|
50
|
-
isGlobal: true,
|
|
51
|
-
}),
|
|
52
|
-
nestjs_pino_1.LoggerModule.forRoot(core_4.pinoConfig),
|
|
53
|
-
moleculer_1.MoleculerModule.forRoot(moleculerConfig),
|
|
54
|
-
core_2.AuthModule,
|
|
55
|
-
core_1.MongodbModule,
|
|
56
|
-
schedule_1.ScheduleModule.forRoot(),
|
|
57
|
-
steedos_1.SteedosModule,
|
|
58
|
-
files_1.FilesModule,
|
|
59
|
-
email_1.EmailModule,
|
|
60
|
-
services_1.ServicesModule,
|
|
61
|
-
tables_1.TablesModule,
|
|
62
|
-
pages_1.PagesModule,
|
|
63
|
-
rooms_1.RoomsModule,
|
|
64
|
-
sharepoint_1.SharepointModule,
|
|
65
|
-
oidc_1.OidcModule,
|
|
66
|
-
core_3.PluginModule.forRootAsync(),
|
|
67
|
-
],
|
|
68
|
-
controllers: [app_controller_1.AppController],
|
|
69
|
-
providers: [app_moleculer_1.AppMoleculer],
|
|
70
|
-
})
|
|
71
|
-
], AppModule);
|
|
72
|
-
const configs = (0, config_2.getConfigs)();
|
|
73
|
-
console.log("*************************************************************************************");
|
|
74
|
-
console.log("*");
|
|
75
|
-
console.log(`* Steedos Server ...`);
|
|
76
|
-
console.log("*");
|
|
77
|
-
console.log(`* VERSION: ${package_json_1.default.version}`);
|
|
78
|
-
console.log("*");
|
|
79
|
-
console.log(`* PORT: ${configs.port}`);
|
|
80
|
-
console.log(`* MONGO_URL: ${configs.mongo.url}`);
|
|
81
|
-
console.log(`* PROJECT_DIR: ${configs.home}`);
|
|
82
|
-
console.log("*");
|
|
83
|
-
console.log("*************************************************************************************");
|
|
84
|
-
//# sourceMappingURL=app.module.js.map
|
package/dist/app.module.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,2CAAgD;AAChD,2CAA8C;AAC9C,6CAA2C;AAE3C,yCAA+C;AAC/C,6CAAgD;AAChD,yCAA4C;AAC5C,+CAAkD;AAClD,2CAA8C;AAC9C,2CAA8C;AAC9C,mDAAsD;AACtD,qDAAwD;AACxD,yCAA4C;AAC5C,qDAAiD;AACjD,yCAA8C;AAC9C,2CAA8C;AAC9C,2CAA8C;AAC9C,iDAAoD;AACpD,qCAKkB;AAClB,mEAAsC;AACtC,+CAAkD;AAElD,yCAA4C;AAC5C,mDAA+C;AAE/C,MAAM,aAAa,GAAG,IAAA,0BAAiB,GAAE,CAAC;AAC1C,MAAM,eAAe,+DAGhB,IAAA,4BAAmB,GAAE,GACrB,aAAa,GACb,IAAA,sBAAa,GAAE,KAClB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,GACxC,CAAC;AA2BK,IAAM,SAAS,iBAAf,MAAM,SAAS;IAAf;QACY,WAAM,GAAG,IAAI,eAAM,CAAC,WAAS,CAAC,IAAI,CAAC,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/C,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACjB,OAAO,CAAC,GAAG,CACT,uFAAuF,CACxF,CAAC"}
|
package/dist/bootstrap.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function bootstrap(): Promise<void>;
|
package/dist/bootstrap.js
DELETED
|
@@ -1,156 +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
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
|
-
};
|
|
47
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.bootstrap = bootstrap;
|
|
49
|
-
const core_1 = require("@nestjs/core");
|
|
50
|
-
const app_module_1 = require("./app.module");
|
|
51
|
-
const path_1 = __importStar(require("path"));
|
|
52
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
53
|
-
const cookie_parser_1 = __importDefault(require("cookie-parser"));
|
|
54
|
-
const compression_1 = __importDefault(require("compression"));
|
|
55
|
-
const express_1 = __importStar(require("express"));
|
|
56
|
-
const platform_ws_1 = require("@nestjs/platform-ws");
|
|
57
|
-
const nestjs_pino_1 = require("nestjs-pino");
|
|
58
|
-
const express_session_1 = __importDefault(require("express-session"));
|
|
59
|
-
const package_json_1 = __importDefault(require("../package.json"));
|
|
60
|
-
const all_exceptions_filter_1 = require("./filters/all-exceptions.filter");
|
|
61
|
-
function bootstrap() {
|
|
62
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
-
var _a;
|
|
64
|
-
process.on("uncaughtException", (error) => {
|
|
65
|
-
console.error("uncaughtException:", error);
|
|
66
|
-
});
|
|
67
|
-
const app = yield core_1.NestFactory.create(app_module_1.AppModule, {
|
|
68
|
-
bufferLogs: true,
|
|
69
|
-
});
|
|
70
|
-
const logger = app.get(nestjs_pino_1.Logger);
|
|
71
|
-
global.logger = logger;
|
|
72
|
-
app.useLogger(logger);
|
|
73
|
-
app.useGlobalFilters(new all_exceptions_filter_1.AllExceptionsFilter());
|
|
74
|
-
app.useWebSocketAdapter(new platform_ws_1.WsAdapter(app));
|
|
75
|
-
app.enableCors({
|
|
76
|
-
origin: function (origin, callback) {
|
|
77
|
-
callback(null, true);
|
|
78
|
-
},
|
|
79
|
-
methods: "GET,PUT,POST,DELETE,UPDATE,OPTIONS",
|
|
80
|
-
credentials: true,
|
|
81
|
-
});
|
|
82
|
-
app.use((0, express_session_1.default)({
|
|
83
|
-
secret: "your_session_secret",
|
|
84
|
-
resave: false,
|
|
85
|
-
saveUninitialized: false,
|
|
86
|
-
}));
|
|
87
|
-
const swaggerConfig = new swagger_1.DocumentBuilder()
|
|
88
|
-
.setTitle("Builder6 API")
|
|
89
|
-
.setDescription("The Builder6 is a comprehensive low-code platform designed to facilitate a wide range of functionalities and integrations. \n\
|
|
90
|
-
[Download OpenAPI Document](/api/v6-json)")
|
|
91
|
-
.addTag("Auth", "Manage authentication and authorization processes.")
|
|
92
|
-
.addTag("Users", "Access to user profile and avatar. ")
|
|
93
|
-
.addTag("Records", "Access and manage records. Admin privileges required.")
|
|
94
|
-
.addTag("Files", "Upload, download, and manage files.")
|
|
95
|
-
.addTag("Rooms", "Facilitate real-time collaboration and interaction in virtual rooms.")
|
|
96
|
-
.addTag("Tables", "Organize and manage structured data with flexible database-like features")
|
|
97
|
-
.addTag("Pages", "Create and manage micro pages.")
|
|
98
|
-
.addTag("Services", "Create and manage micro services, Admin privileges required.")
|
|
99
|
-
.addTag("Email", "Manage email configurations and communications. Admin privileges required.")
|
|
100
|
-
.addTag("Office", "Access and manage office-related resources. Admin privileges required.")
|
|
101
|
-
.addTag("Microsoft365", "Integrate and manage Microsoft365 services, Admin privileges required.")
|
|
102
|
-
.addTag("Oidc", "Implement OpenID Connect for secure user authentication.")
|
|
103
|
-
.setVersion(package_json_1.default.version)
|
|
104
|
-
.addBearerAuth()
|
|
105
|
-
.build();
|
|
106
|
-
const documentFactory = () => swagger_1.SwaggerModule.createDocument(app, swaggerConfig);
|
|
107
|
-
swagger_1.SwaggerModule.setup("api/v6", app, documentFactory, {
|
|
108
|
-
explorer: true,
|
|
109
|
-
swaggerOptions: {
|
|
110
|
-
docExpansion: "none",
|
|
111
|
-
},
|
|
112
|
-
});
|
|
113
|
-
app.useStaticAssets((0, path_1.join)(__dirname, "..", "public"));
|
|
114
|
-
app.setViewEngine("hbs");
|
|
115
|
-
app.use((0, cookie_parser_1.default)());
|
|
116
|
-
app.use((0, express_1.json)({ limit: "50mb" }));
|
|
117
|
-
app.use((0, express_1.urlencoded)({ extended: true, limit: "100mb", parameterLimit: 1000000 }));
|
|
118
|
-
app.use((0, compression_1.default)());
|
|
119
|
-
const expressApp = app.getHttpAdapter().getInstance();
|
|
120
|
-
expressApp.use(require("@steedos/router").staticRouter());
|
|
121
|
-
const webappPackagePath = require.resolve("@steedos/webapp/package.json");
|
|
122
|
-
const webappDistPath = path_1.default.join(path_1.default.dirname(webappPackagePath), "dist");
|
|
123
|
-
if (webappPackagePath) {
|
|
124
|
-
expressApp.use("/", express_1.default.static(webappDistPath));
|
|
125
|
-
expressApp.get("/app/*react", (req, res) => {
|
|
126
|
-
res.sendFile(path_1.default.join(webappDistPath, "index.html"));
|
|
127
|
-
});
|
|
128
|
-
const frontendRoutes = [
|
|
129
|
-
"/logout",
|
|
130
|
-
"/signup",
|
|
131
|
-
"/login",
|
|
132
|
-
"/",
|
|
133
|
-
"/create-space",
|
|
134
|
-
"/select-space",
|
|
135
|
-
"/update-password",
|
|
136
|
-
"/verify/email",
|
|
137
|
-
"/verify/mobile",
|
|
138
|
-
"/home",
|
|
139
|
-
"/home/:spaceId",
|
|
140
|
-
"/app",
|
|
141
|
-
"/app/:appId",
|
|
142
|
-
"/app/:appId/page/:pageId",
|
|
143
|
-
"/app/:appId/:objectName",
|
|
144
|
-
"/app/:appId/:objectName/grid/:listviewId",
|
|
145
|
-
"/app/:appId/:objectName/:recordId/:relatedObjectName/grid",
|
|
146
|
-
"/app/:appId/:objectName/view/:recordId",
|
|
147
|
-
"/app/:appId/tab_iframe/:tabId",
|
|
148
|
-
];
|
|
149
|
-
expressApp.get(frontendRoutes, (req, res) => {
|
|
150
|
-
res.sendFile(path_1.default.join(webappDistPath, "index.html"));
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
yield app.listen((_a = process.env.B6_PORT) !== null && _a !== void 0 ? _a : 5100);
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
//# sourceMappingURL=bootstrap.js.map
|
package/dist/bootstrap.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,8BAqIC;AA7JD,uCAA2C;AAC3C,6CAAyC;AACzC,6CAAkC;AAElC,6CAAiE;AACjE,kEAAyC;AACzC,8DAAsC;AACtC,mDAAoD;AACpD,qDAAgD;AAChD,6CAAqC;AAErC,sEAAsC;AAUtC,mEAAsC;AACtC,2EAAsE;AAEtE,SAAsB,SAAS;;;QAC7B,OAAO,CAAC,EAAE,CAAC,mBAAmB,EAAE,CAAC,KAAK,EAAE,EAAE;YACxC,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;QAC7C,CAAC,CAAC,CAAC;QAEH,MAAM,GAAG,GAAG,MAAM,kBAAW,CAAC,MAAM,CAAyB,sBAAS,EAAE;YACtE,UAAU,EAAE,IAAI;SACjB,CAAC,CAAC;QACH,MAAM,MAAM,G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AAI,iBAAiB,EAAE,CAAC;YACtB,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,iBAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC;YACpD,UAAU,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;gBACzC,GAAG,CAAC,QAAQ,CAAC,cAAI,CAAC,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC,CAAC;YACxD,CAAC,CAAC,CAAC;YAEH,MAAM,cAAc,GAAG;gBACrB,SAAS;gBACT,SAAS;gBACT,QAAQ;gBACR,GAAG;gBACH,eAAe;gBACf,eAAe;gBACf,kBAAkB;gBAClB,eAAe;gBACf,gBAAgB;gBAChB,OAAO;gBACP,gBAAgB;gBAChB,MAAM;gBACN,aAAa;gBACb,0BAA0B;gBAC1B,yBAAyB;gBACzB,0CAA0C;gBAC1C,2DAA2D;gBAC3D,wCAAwC;gBACxC,+BAA+B;aAChC,CAAC;YAEF,UAAU,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;gBAC1C,GAAG,CAAC,QAAQ,CAAC,cAAI,CAAC,IAAI,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC,CAAC;YACxD,CAAC,CAAC,CAAC;QACL,CAAC;QAED,MAAM,GAAG,CAAC,MAAM,CAAC,MAAA,OAAO,CAAC,GAAG,CAAC,OAAO,mCAAI,IAAI,CAAC,CAAC;IAChD,CAAC;CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function getEnvConfigs(): any;
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.default = getEnvConfigs;
|
|
7
|
-
const dotenv_flow_1 = __importDefault(require("dotenv-flow"));
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
|
-
const _ = require("lodash");
|
|
10
|
-
dotenv_flow_1.default.config({
|
|
11
|
-
path: process.cwd(),
|
|
12
|
-
silent: true,
|
|
13
|
-
});
|
|
14
|
-
if (_.isEmpty(process.env.STEEDOS_TENANT_ENABLE_PASSWORD_LOGIN)) {
|
|
15
|
-
process.env.STEEDOS_TENANT_ENABLE_PASSWORD_LOGIN = "true";
|
|
16
|
-
}
|
|
17
|
-
if (_.isEmpty(process.env.STEEDOS_UNPKG_URL)) {
|
|
18
|
-
process.env.STEEDOS_UNPKG_URL = "https://unpkg.steedos.cn";
|
|
19
|
-
}
|
|
20
|
-
process.env.STEEDOS_UNPKG_URL = process.env.STEEDOS_UNPKG_URL.replace(/\/+$/, "");
|
|
21
|
-
if (_.isEmpty(process.env.STEEDOS_BUILDER_URL)) {
|
|
22
|
-
process.env.STEEDOS_BUILDER_URL = "https://6-3.builder.steedos.com";
|
|
23
|
-
}
|
|
24
|
-
process.env.STEEDOS_BUILDER_URL = process.env.STEEDOS_BUILDER_URL.replace(/\/+$/, "");
|
|
25
|
-
if (_.isEmpty(process.env.STEEDOS_AMIS_VERSION)) {
|
|
26
|
-
process.env.STEEDOS_AMIS_VERSION = "6.3.0-patch.3";
|
|
27
|
-
}
|
|
28
|
-
if (_.isEmpty(process.env.STEEDOS_AMIS_URL)) {
|
|
29
|
-
process.env.STEEDOS_AMIS_URL =
|
|
30
|
-
process.env.STEEDOS_UNPKG_URL +
|
|
31
|
-
"/@steedos-widgets/amis@" +
|
|
32
|
-
process.env.STEEDOS_AMIS_VERSION;
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
process.env.STEEDOS_AMIS_URL = process.env.STEEDOS_AMIS_URL.replace("https://unpkg.com", process.env.STEEDOS_UNPKG_URL);
|
|
36
|
-
}
|
|
37
|
-
process.env.STEEDOS_AMIS_URL = process.env.STEEDOS_AMIS_URL.replace(/\/+$/, "");
|
|
38
|
-
if (_.isEmpty(process.env.STEEDOS_WIDGETS_VERSION)) {
|
|
39
|
-
process.env.STEEDOS_WIDGETS_VERSION = "v6.10.1-beta.13";
|
|
40
|
-
}
|
|
41
|
-
if (_.isEmpty(process.env.STEEDOS_PUBLIC_PAGE_ASSETURLS)) {
|
|
42
|
-
const widgetsVersion = process.env.STEEDOS_WIDGETS_VERSION;
|
|
43
|
-
const unpkgUrl = process.env.STEEDOS_UNPKG_URL;
|
|
44
|
-
let steedosPublicPageAsseturls = `${unpkgUrl}/@steedos-widgets/amis-object@${widgetsVersion}/dist/assets.json`;
|
|
45
|
-
if (!_.isEmpty(process.env.STEEDOS_WIDGETS_ADDITIONAL)) {
|
|
46
|
-
process.env.STEEDOS_WIDGETS_ADDITIONAL.split(",").forEach((additional) => {
|
|
47
|
-
const lastAtIndex = additional.lastIndexOf("@");
|
|
48
|
-
let packageName = additional;
|
|
49
|
-
let versionToUse = widgetsVersion;
|
|
50
|
-
if (lastAtIndex > 0) {
|
|
51
|
-
packageName = additional.substring(0, lastAtIndex);
|
|
52
|
-
versionToUse = additional.substring(lastAtIndex + 1) || widgetsVersion;
|
|
53
|
-
}
|
|
54
|
-
steedosPublicPageAsseturls += `,${unpkgUrl}/${packageName}@${versionToUse}/dist/assets.json`;
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
process.env.STEEDOS_PUBLIC_PAGE_ASSETURLS = steedosPublicPageAsseturls;
|
|
58
|
-
}
|
|
59
|
-
if (_.isEmpty(process.env.ROOT_URL)) {
|
|
60
|
-
console.error("ERROR: Environment variable ROOT_URL is not defined.");
|
|
61
|
-
process.env.ROOT_URL = "http://localhost";
|
|
62
|
-
}
|
|
63
|
-
process.env.ROOT_URL = process.env.ROOT_URL.replace(/\/+$/, "");
|
|
64
|
-
process.env.B6_ROOT_URL = process.env.B6_ROOT_URL || process.env.ROOT_URL;
|
|
65
|
-
process.env.B6_MONGO_URL = process.env.B6_MONGO_URL || process.env.MONGO_URL;
|
|
66
|
-
process.env.B6_TRANSPORTER =
|
|
67
|
-
process.env.B6_TRANSPORTER || process.env.TRANSPORTER || "";
|
|
68
|
-
process.env.B6_CACHER = process.env.B6_CACHER || process.env.CACHER || "";
|
|
69
|
-
process.env.B6_JWT_SECRET =
|
|
70
|
-
process.env.B6_JWT_SECRET || process.env.JWT_SECRET || "";
|
|
71
|
-
process.env.B6_HOME = process.cwd();
|
|
72
|
-
process.env.B6_HOST = process.env.B6_HOST || process.env.B6_ROOT_URL;
|
|
73
|
-
process.env.B6_TENANT_NAME = process.env.B6_TENANT_NAME || "Steedos";
|
|
74
|
-
process.env.B6_TENANT_LOGO_URL =
|
|
75
|
-
process.env.B6_TENANT_LOGO_URL ||
|
|
76
|
-
`${process.env.B6_ROOT_URL}/images/logo.png`;
|
|
77
|
-
process.env.B6_UNPKG_URL =
|
|
78
|
-
process.env.B6_UNPKG_URL ||
|
|
79
|
-
process.env.STEEDOS_UNPKG_URL ||
|
|
80
|
-
"https://unpkg.com";
|
|
81
|
-
process.env.B6_STORAGE_DIR =
|
|
82
|
-
process.env.B6_STORAGE_DIR ||
|
|
83
|
-
process.env.STEEDOS_STORAGE_DIR ||
|
|
84
|
-
path_1.default.join(process.cwd(), "steedos-storage");
|
|
85
|
-
process.env.B6_LOG_LEVEL =
|
|
86
|
-
process.env.B6_LOG_LEVEL || process.env.STEEDOS_LOG_LEVEL || "warn";
|
|
87
|
-
function parseEnvToJSON(env, prefixes) {
|
|
88
|
-
const result = {};
|
|
89
|
-
Object.keys(env).forEach((key) => {
|
|
90
|
-
const hasValidPrefix = prefixes.some((prefix) => key.startsWith(prefix));
|
|
91
|
-
if (!hasValidPrefix) {
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
const strippedKey = key.toLowerCase();
|
|
95
|
-
const keys = strippedKey.split("_");
|
|
96
|
-
let current = result;
|
|
97
|
-
keys.forEach((k, index) => {
|
|
98
|
-
if (index === keys.length - 1) {
|
|
99
|
-
const value = env[key];
|
|
100
|
-
if (value.toLowerCase() === "true") {
|
|
101
|
-
current[k] = true;
|
|
102
|
-
}
|
|
103
|
-
else if (value.toLowerCase() === "false") {
|
|
104
|
-
current[k] = false;
|
|
105
|
-
}
|
|
106
|
-
else if (!isNaN(value) && value.trim() !== "") {
|
|
107
|
-
current[k] = Number(value);
|
|
108
|
-
}
|
|
109
|
-
else {
|
|
110
|
-
current[k] = value;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
else {
|
|
114
|
-
if (typeof current[k] !== "object" || current[k] === null) {
|
|
115
|
-
current[k] = {};
|
|
116
|
-
}
|
|
117
|
-
current = current[k];
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
return result;
|
|
122
|
-
}
|
|
123
|
-
function getEnvConfigs() {
|
|
124
|
-
const env = parseEnvToJSON(process.env, ["STEEDOS_", "B6_"]);
|
|
125
|
-
const envConfigs = Object.assign(Object.assign({}, env.steedos), env.b6);
|
|
126
|
-
return envConfigs;
|
|
127
|
-
}
|
|
128
|
-
//# sourceMappingURL=env.config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"env.config.js","sourceRoot":"","sources":["../../src/config/env.config.ts"],"names":[],"mappings":";;;;;AAmKA,gCASC;AA5KD,8DAAqC;AACrC,gDAAwB;AACxB,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE5B,qBAAU,CAAC,MAAM,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC,GAAG,EAAE;IACnB,MAAM,EAAE,IAAI;CACb,CAAC,CAAC;AAEH,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,EAAE,CAAC;IAChE,OAAO,CAAC,GAAG,CAAC,oCAAoC,GAAG,MAAM,CAAC;AAC5D,CAAC;AAED,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,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,CAAC;oBACnC,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;gBACpB,CAAC;qBAAM,IAAI,KAAK,CAAC,WAAW,EAAE,KAAK,OAAO,EAAE,CAAC;oBAC3C,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;gBACrB,CAAC;qBAAM,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;oBAEhD,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;gBAC7B,CAAC;qBAAM,CAAC;oBAEN,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;gBACrB,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,IAAI,OAAO,OAAO,CAAC,CAAC,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;oBAC1D,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;gBAClB,CAAC;gBACD,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YACvB,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAwB,aAAa;IACnC,MAAM,GAAG,GAAG,cAAc,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,UAAU,EAAE,KAAK,CAAC,CAAQ,CAAC;IAEpE,MAAM,UAAU,mCACX,GAAG,CAAC,OAAO,GACX,GAAG,CAAC,EAAE,CACV,CAAC;IAEF,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function getProjectConfigs(projectDir: string): any | null;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = getProjectConfigs;
|
|
4
|
-
const fs_1 = require("fs");
|
|
5
|
-
const path_1 = require("path");
|
|
6
|
-
function getProjectConfigs(projectDir) {
|
|
7
|
-
const configPath = (0, path_1.join)(projectDir, 'b6.config.js');
|
|
8
|
-
if ((0, fs_1.existsSync)(configPath)) {
|
|
9
|
-
return require(configPath);
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
return {};
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=project.config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project.config.js","sourceRoot":"","sources":["../../src/config/project.config.ts"],"names":[],"mappings":";;AAGA,oCAQC;AAXD,2BAAgC;AAChC,+BAA4B;AAE5B,SAAwB,iBAAiB,CAAC,UAAkB;IAC1D,MAAM,UAAU,GAAG,IAAA,WAAI,EAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IAEpD,IAAI,IAAA,eAAU,EAAC,UAAU,CAAC,EAAE,CAAC;QAC3B,OAAO,OAAO,CAAC,UAAU,CAAC,CAAC;IAC7B,CAAC;SAAM,CAAC;QACN,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var AllExceptionsFilter_1;
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.AllExceptionsFilter = void 0;
|
|
11
|
-
const common_1 = require("@nestjs/common");
|
|
12
|
-
let AllExceptionsFilter = AllExceptionsFilter_1 = class AllExceptionsFilter {
|
|
13
|
-
constructor() {
|
|
14
|
-
this.logger = new common_1.Logger(AllExceptionsFilter_1.name);
|
|
15
|
-
}
|
|
16
|
-
catch(exception, host) {
|
|
17
|
-
var _a, _b, _c, _d, _e;
|
|
18
|
-
try {
|
|
19
|
-
const ctx = host.switchToHttp();
|
|
20
|
-
const response = ctx.getResponse();
|
|
21
|
-
const request = ctx.getRequest();
|
|
22
|
-
this.logger.error({
|
|
23
|
-
method: request.method,
|
|
24
|
-
url: request.url,
|
|
25
|
-
headers: request.headers,
|
|
26
|
-
exception,
|
|
27
|
-
}, exception.stack);
|
|
28
|
-
let errorResponse;
|
|
29
|
-
const message = ((_b = (_a = exception === null || exception === void 0 ? void 0 : exception.response) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) ||
|
|
30
|
-
((_c = exception === null || exception === void 0 ? void 0 : exception.response) === null || _c === void 0 ? void 0 : _c.message) ||
|
|
31
|
-
exception.message;
|
|
32
|
-
const code = ((_e = (_d = exception === null || exception === void 0 ? void 0 : exception.response) === null || _d === void 0 ? void 0 : _d.error) === null || _e === void 0 ? void 0 : _e.code) || (exception === null || exception === void 0 ? void 0 : exception.code);
|
|
33
|
-
if (exception instanceof common_1.HttpException) {
|
|
34
|
-
errorResponse = {
|
|
35
|
-
status: exception.getStatus(),
|
|
36
|
-
message,
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
errorResponse = {
|
|
41
|
-
message,
|
|
42
|
-
status: common_1.HttpStatus.INTERNAL_SERVER_ERROR,
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
response.status(errorResponse.status).json({
|
|
46
|
-
statusCode: errorResponse.status,
|
|
47
|
-
timestamp: new Date().toISOString(),
|
|
48
|
-
path: request.url,
|
|
49
|
-
message: errorResponse.message,
|
|
50
|
-
code: code,
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
catch (error) {
|
|
54
|
-
this.logger.error('Error while processing uncaught exception', error.stack);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
exports.AllExceptionsFilter = AllExceptionsFilter;
|
|
59
|
-
exports.AllExceptionsFilter = AllExceptionsFilter = AllExceptionsFilter_1 = __decorate([
|
|
60
|
-
(0, common_1.Catch)()
|
|
61
|
-
], AllExceptionsFilter);
|
|
62
|
-
//# sourceMappingURL=all-exceptions.filter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"all-exceptions.filter.js","sourceRoot":"","sources":["../../src/filters/all-exceptions.filter.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAOwB;AAQjB,IAAM,mBAAmB,2BAAzB,MAAM,mBAAmB;IAAzB;QACG,WAAM,GAAW,IAAI,eAAM,CAAC,qBAAmB,CAAC,IAAI,CAAC,CAAC;IAkDhE,CAAC;IAjDC,KAAK,CAAC,SAAc,EAAE,IAAmB;;QACvC,IAAI,CAAC;YACH,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;YAChC,MAAM,QAAQ,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC;YACnC,MAAM,OAAO,GAAG,GAAG,CAAC,UAAU,EAAE,CAAC;YAEjC,IAAI,CAAC,MAAM,CAAC,KAAK,CACf;gBACE,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,GAAG,EAAE,OAAO,CAAC,GAAG;gBAChB,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,SAAS;aACV,EACD,SAAS,CAAC,KAAK,CAChB,CAAC;YAEF,IAAI,aAA4B,CAAC;YACjC,MAAM,OAAO,GACX,CAAA,MAAA,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,QAAQ,0CAAE,KAAK,0CAAE,OAAO;iBACnC,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,QAAQ,0CAAE,OAAO,CAAA;gBAC5B,SAAS,CAAC,OAAO,CAAC;YACpB,MAAM,IAAI,GAAG,CAAA,MAAA,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,QAAQ,0CAAE,KAAK,0CAAE,IAAI,MAAI,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,IAAI,CAAA,CAAC;YAEjE,IAAI,SAAS,YAAY,sBAAa,EAAE,CAAC;gBACvC,aAAa,GAAG;oBACd,MAAM,EAAE,SAAS,CAAC,SAAS,EAAE;oBAC7B,OAAO;iBACR,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,aAAa,GAAG;oBACd,OAAO;oBACP,MAAM,EAAE,mBAAU,CAAC,qBAAqB;iBACzC,CAAC;YACJ,CAAC;YAED,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC;gBACzC,UAAU,EAAE,aAAa,CAAC,MAAM;gBAChC,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBACnC,IAAI,EAAE,OAAO,CAAC,GAAG;gBACjB,OAAO,EAAE,aAAa,CAAC,OAAO;gBAC9B,IAAI,EAAE,IAAI;aACX,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,2CAA2C,EAC3C,KAAK,CAAC,KAAK,CACZ,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAA;AAnDY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,cAAK,GAAE;GACK,mBAAmB,CAmD/B"}
|
package/dist/main.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/main.js
DELETED
package/dist/main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;AAAA,2CAAwC;AAExC,IAAA,qBAAS,GAAE,CAAC"}
|