@nocobase/app-server 0.7.0-alpha.9 → 0.7.1-alpha.4
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/config/database.d.ts +2 -2
- package/lib/config/database.js +16 -14
- package/lib/config/index.d.ts +8 -0
- package/lib/config/index.js +21 -0
- package/lib/config/plugins.js +7 -22
- package/lib/config/resourcer.js +8 -4
- package/lib/index.d.ts +3 -1
- package/lib/index.js +27 -36
- package/package.json +3 -20
- package/src/config/database.ts +11 -25
- package/src/config/index.ts +9 -0
- package/src/config/plugins.ts +4 -10
- package/src/config/resourcer.ts +1 -1
- package/src/index.ts +9 -7
- package/esm/config/database.d.ts +0 -3
- package/esm/config/database.js +0 -14
- package/esm/config/database.js.map +0 -1
- package/esm/config/plugins.d.ts +0 -3
- package/esm/config/plugins.js +0 -21
- package/esm/config/plugins.js.map +0 -1
- package/esm/config/resourcer.d.ts +0 -4
- package/esm/config/resourcer.js +0 -4
- package/esm/config/resourcer.js.map +0 -1
- package/esm/index.d.ts +0 -1
- package/esm/index.js +0 -17
- package/esm/index.js.map +0 -1
- package/lib/config/database.js.map +0 -1
- package/lib/config/plugins.js.map +0 -1
- package/lib/config/resourcer.js.map +0 -1
- package/lib/index.js.map +0 -1
package/lib/config/database.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { IDatabaseOptions } from '@nocobase/database';
|
|
2
|
-
declare
|
|
3
|
-
export default
|
|
2
|
+
declare const _default: IDatabaseOptions;
|
|
3
|
+
export default _default;
|
package/lib/config/database.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _default = {
|
|
8
|
+
logging: process.env.DB_LOGGING === 'on' ? console.log : false,
|
|
9
|
+
dialect: process.env.DB_DIALECT,
|
|
10
|
+
storage: process.env.DB_STORAGE,
|
|
11
|
+
username: process.env.DB_USER,
|
|
12
|
+
password: process.env.DB_PASSWORD,
|
|
13
|
+
database: process.env.DB_DATABASE,
|
|
14
|
+
host: process.env.DB_HOST,
|
|
15
|
+
port: process.env.DB_PORT,
|
|
16
|
+
timezone: process.env.DB_TIMEZONE
|
|
8
17
|
};
|
|
9
|
-
|
|
10
|
-
databaseConfig = Object.assign(Object.assign({}, databaseConfig), { storage: (0, path_1.resolve)(process.cwd(), process.env.DB_STORAGE || 'db.sqlite') });
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
13
|
-
databaseConfig = Object.assign(Object.assign({}, databaseConfig), { username: process.env.DB_USER, password: process.env.DB_PASSWORD, database: process.env.DB_DATABASE, host: process.env.DB_HOST, port: process.env.DB_PORT });
|
|
14
|
-
}
|
|
15
|
-
exports.default = databaseConfig;
|
|
16
|
-
//# sourceMappingURL=database.js.map
|
|
18
|
+
exports.default = _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _database = _interopRequireDefault(require("./database"));
|
|
9
|
+
|
|
10
|
+
var _plugins = _interopRequireDefault(require("./plugins"));
|
|
11
|
+
|
|
12
|
+
var _resourcer = _interopRequireDefault(require("./resourcer"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
var _default = {
|
|
17
|
+
database: _database.default,
|
|
18
|
+
resourcer: _resourcer.default,
|
|
19
|
+
plugins: _plugins.default
|
|
20
|
+
};
|
|
21
|
+
exports.default = _default;
|
package/lib/config/plugins.js
CHANGED
|
@@ -1,23 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
exports
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
'@nocobase/plugin-system-settings',
|
|
10
|
-
[
|
|
11
|
-
'@nocobase/plugin-users',
|
|
12
|
-
{
|
|
13
|
-
jwt: {
|
|
14
|
-
secret: process.env.JWT_SECRET,
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
],
|
|
18
|
-
'@nocobase/plugin-acl',
|
|
19
|
-
'@nocobase/plugin-china-region',
|
|
20
|
-
'@nocobase/plugin-workflow',
|
|
21
|
-
['@nocobase/plugin-client'],
|
|
22
|
-
];
|
|
23
|
-
//# sourceMappingURL=plugins.js.map
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _default = ['@nocobase/plugin-error-handler', '@nocobase/plugin-collection-manager', '@nocobase/plugin-ui-schema-storage', '@nocobase/plugin-ui-routes-storage', '@nocobase/plugin-file-manager', '@nocobase/plugin-system-settings', '@nocobase/plugin-users', '@nocobase/plugin-acl', '@nocobase/plugin-china-region', '@nocobase/plugin-workflow', '@nocobase/plugin-client', '@nocobase/plugin-export', '@nocobase/plugin-audit-logs'];
|
|
8
|
+
exports.default = _default;
|
package/lib/config/resourcer.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
exports
|
|
4
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _default = {
|
|
8
|
+
prefix: process.env.API_BASE_PATH
|
|
5
9
|
};
|
|
6
|
-
|
|
10
|
+
exports.default = _default;
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,38 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
13
5
|
});
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
//# sourceMappingURL=index.js.map
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
function _server() {
|
|
9
|
+
const data = require("@nocobase/server");
|
|
10
|
+
|
|
11
|
+
_server = function _server() {
|
|
12
|
+
return data;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return data;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
var _config = _interopRequireDefault(require("./config"));
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
|
|
22
|
+
const app = new (_server().Application)(_config.default);
|
|
23
|
+
|
|
24
|
+
if (require.main === module) {
|
|
25
|
+
app.parse();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var _default = app;
|
|
29
|
+
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,34 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/app-server",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1-alpha.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./lib/index.js",
|
|
7
7
|
"types": "./lib/index.d.ts",
|
|
8
|
-
"scripts": {
|
|
9
|
-
"build": "rimraf -rf lib esm dist && npm run build:cjs && npm run build:esm",
|
|
10
|
-
"build:cjs": "tsc --project tsconfig.build.json",
|
|
11
|
-
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir esm"
|
|
12
|
-
},
|
|
13
8
|
"dependencies": {
|
|
14
|
-
"@nocobase/
|
|
15
|
-
"@nocobase/plugin-acl": "0.7.0-alpha.9",
|
|
16
|
-
"@nocobase/plugin-china-region": "0.7.0-alpha.9",
|
|
17
|
-
"@nocobase/plugin-client": "0.7.0-alpha.9",
|
|
18
|
-
"@nocobase/plugin-collection-manager": "0.7.0-alpha.9",
|
|
19
|
-
"@nocobase/plugin-error-handler": "0.7.0-alpha.9",
|
|
20
|
-
"@nocobase/plugin-file-manager": "0.7.0-alpha.9",
|
|
21
|
-
"@nocobase/plugin-system-settings": "0.7.0-alpha.9",
|
|
22
|
-
"@nocobase/plugin-ui-routes-storage": "0.7.0-alpha.9",
|
|
23
|
-
"@nocobase/plugin-ui-schema-storage": "0.7.0-alpha.9",
|
|
24
|
-
"@nocobase/plugin-users": "0.7.0-alpha.9",
|
|
25
|
-
"@nocobase/plugin-workflow": "0.7.0-alpha.9",
|
|
26
|
-
"@nocobase/server": "0.7.0-alpha.9"
|
|
9
|
+
"@nocobase/preset-nocobase": "0.7.1-alpha.4"
|
|
27
10
|
},
|
|
28
11
|
"repository": {
|
|
29
12
|
"type": "git",
|
|
30
13
|
"url": "git+https://github.com/nocobase/nocobase.git",
|
|
31
14
|
"directory": "packages/app/server"
|
|
32
15
|
},
|
|
33
|
-
"gitHead": "
|
|
16
|
+
"gitHead": "570d039f1904a041729c1967c0637b1109c278a8"
|
|
34
17
|
}
|
package/src/config/database.ts
CHANGED
|
@@ -1,27 +1,13 @@
|
|
|
1
1
|
import { IDatabaseOptions } from '@nocobase/database';
|
|
2
|
-
import { resolve } from 'path';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
};
|
|
16
|
-
} else {
|
|
17
|
-
databaseConfig = {
|
|
18
|
-
...databaseConfig,
|
|
19
|
-
username: process.env.DB_USER,
|
|
20
|
-
password: process.env.DB_PASSWORD,
|
|
21
|
-
database: process.env.DB_DATABASE,
|
|
22
|
-
host: process.env.DB_HOST,
|
|
23
|
-
port: process.env.DB_PORT as any,
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export default databaseConfig;
|
|
3
|
+
export default {
|
|
4
|
+
logging: process.env.DB_LOGGING === 'on' ? console.log : false,
|
|
5
|
+
dialect: process.env.DB_DIALECT as any,
|
|
6
|
+
storage: process.env.DB_STORAGE,
|
|
7
|
+
username: process.env.DB_USER,
|
|
8
|
+
password: process.env.DB_PASSWORD,
|
|
9
|
+
database: process.env.DB_DATABASE,
|
|
10
|
+
host: process.env.DB_HOST,
|
|
11
|
+
port: process.env.DB_PORT as any,
|
|
12
|
+
timezone: process.env.DB_TIMEZONE,
|
|
13
|
+
} as IDatabaseOptions;
|
package/src/config/plugins.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PluginsConfigurations } from '@nocobase/server';
|
|
2
|
-
import { resolve } from 'path';
|
|
3
2
|
|
|
4
3
|
export default [
|
|
5
4
|
'@nocobase/plugin-error-handler',
|
|
@@ -8,16 +7,11 @@ export default [
|
|
|
8
7
|
'@nocobase/plugin-ui-routes-storage',
|
|
9
8
|
'@nocobase/plugin-file-manager',
|
|
10
9
|
'@nocobase/plugin-system-settings',
|
|
11
|
-
|
|
12
|
-
'@nocobase/plugin-users',
|
|
13
|
-
{
|
|
14
|
-
jwt: {
|
|
15
|
-
secret: process.env.JWT_SECRET,
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
],
|
|
10
|
+
'@nocobase/plugin-users',
|
|
19
11
|
'@nocobase/plugin-acl',
|
|
20
12
|
'@nocobase/plugin-china-region',
|
|
21
13
|
'@nocobase/plugin-workflow',
|
|
22
|
-
|
|
14
|
+
'@nocobase/plugin-client',
|
|
15
|
+
'@nocobase/plugin-export',
|
|
16
|
+
'@nocobase/plugin-audit-logs',
|
|
23
17
|
] as PluginsConfigurations;
|
package/src/config/resourcer.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { Application
|
|
2
|
-
import
|
|
1
|
+
import { Application } from '@nocobase/server';
|
|
2
|
+
import config from './config';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
4
|
+
const app = new Application(config);
|
|
5
|
+
|
|
6
|
+
if (require.main === module) {
|
|
7
|
+
app.parse();
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export default app;
|
package/esm/config/database.d.ts
DELETED
package/esm/config/database.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { resolve } from 'path';
|
|
2
|
-
const dialect = process.env.DB_DIALECT;
|
|
3
|
-
let databaseConfig = {
|
|
4
|
-
dialect,
|
|
5
|
-
logging: process.env.DB_LOG_SQL === 'on' ? console.log : false,
|
|
6
|
-
};
|
|
7
|
-
if (dialect === 'sqlite') {
|
|
8
|
-
databaseConfig = Object.assign(Object.assign({}, databaseConfig), { storage: resolve(process.cwd(), process.env.DB_STORAGE || 'db.sqlite') });
|
|
9
|
-
}
|
|
10
|
-
else {
|
|
11
|
-
databaseConfig = Object.assign(Object.assign({}, databaseConfig), { username: process.env.DB_USER, password: process.env.DB_PASSWORD, database: process.env.DB_DATABASE, host: process.env.DB_HOST, port: process.env.DB_PORT });
|
|
12
|
-
}
|
|
13
|
-
export default databaseConfig;
|
|
14
|
-
//# sourceMappingURL=database.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"database.js","sourceRoot":"","sources":["../../src/config/database.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,UAAiB,CAAC;AAE9C,IAAI,cAAc,GAAqB;IACrC,OAAO;IACP,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,UAAU,KAAK,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK;CAC/D,CAAC;AAEF,IAAI,OAAO,KAAK,QAAQ,EAAE;IACxB,cAAc,mCACT,cAAc,KACjB,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,WAAW,CAAC,GACvE,CAAC;CACH;KAAM;IACL,cAAc,mCACT,cAAc,KACjB,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,EAC7B,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,EACjC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,EACjC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,EACzB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,OAAc,GACjC,CAAC;CACH;AAED,eAAe,cAAc,CAAC","sourcesContent":["import { IDatabaseOptions } from '@nocobase/database';\nimport { resolve } from 'path';\n\nconst dialect = process.env.DB_DIALECT as any;\n\nlet databaseConfig: IDatabaseOptions = {\n dialect,\n logging: process.env.DB_LOG_SQL === 'on' ? console.log : false,\n};\n\nif (dialect === 'sqlite') {\n databaseConfig = {\n ...databaseConfig,\n storage: resolve(process.cwd(), process.env.DB_STORAGE || 'db.sqlite'),\n };\n} else {\n databaseConfig = {\n ...databaseConfig,\n username: process.env.DB_USER,\n password: process.env.DB_PASSWORD,\n database: process.env.DB_DATABASE,\n host: process.env.DB_HOST,\n port: process.env.DB_PORT as any,\n };\n}\n\nexport default databaseConfig;\n"]}
|
package/esm/config/plugins.d.ts
DELETED
package/esm/config/plugins.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export default [
|
|
2
|
-
'@nocobase/plugin-error-handler',
|
|
3
|
-
'@nocobase/plugin-collection-manager',
|
|
4
|
-
'@nocobase/plugin-ui-schema-storage',
|
|
5
|
-
'@nocobase/plugin-ui-routes-storage',
|
|
6
|
-
'@nocobase/plugin-file-manager',
|
|
7
|
-
'@nocobase/plugin-system-settings',
|
|
8
|
-
[
|
|
9
|
-
'@nocobase/plugin-users',
|
|
10
|
-
{
|
|
11
|
-
jwt: {
|
|
12
|
-
secret: process.env.JWT_SECRET,
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
],
|
|
16
|
-
'@nocobase/plugin-acl',
|
|
17
|
-
'@nocobase/plugin-china-region',
|
|
18
|
-
'@nocobase/plugin-workflow',
|
|
19
|
-
['@nocobase/plugin-client'],
|
|
20
|
-
];
|
|
21
|
-
//# sourceMappingURL=plugins.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../src/config/plugins.ts"],"names":[],"mappings":"AAGA,eAAe;IACb,gCAAgC;IAChC,qCAAqC;IACrC,oCAAoC;IACpC,oCAAoC;IACpC,+BAA+B;IAC/B,kCAAkC;IAClC;QACE,wBAAwB;QACxB;YACE,GAAG,EAAE;gBACH,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,UAAU;aAC/B;SACF;KACF;IACD,sBAAsB;IACtB,+BAA+B;IAC/B,2BAA2B;IAC3B,CAAC,yBAAyB,CAAC;CACH,CAAC","sourcesContent":["import { PluginsConfigurations } from '@nocobase/server';\nimport { resolve } from 'path';\n\nexport default [\n '@nocobase/plugin-error-handler',\n '@nocobase/plugin-collection-manager',\n '@nocobase/plugin-ui-schema-storage',\n '@nocobase/plugin-ui-routes-storage',\n '@nocobase/plugin-file-manager',\n '@nocobase/plugin-system-settings',\n [\n '@nocobase/plugin-users',\n {\n jwt: {\n secret: process.env.JWT_SECRET,\n },\n },\n ],\n '@nocobase/plugin-acl',\n '@nocobase/plugin-china-region',\n '@nocobase/plugin-workflow',\n ['@nocobase/plugin-client'],\n] as PluginsConfigurations;\n"]}
|
package/esm/config/resourcer.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resourcer.js","sourceRoot":"","sources":["../../src/config/resourcer.ts"],"names":[],"mappings":"AAAA,eAAe;IACb,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB;CACrC,CAAC","sourcesContent":["export default {\n prefix: process.env.SERVER_BASE_PATH,\n};\n"]}
|
package/esm/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/esm/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { Application, readConfig } from '@nocobase/server';
|
|
11
|
-
import * as path from 'path';
|
|
12
|
-
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
13
|
-
const config = yield readConfig(path.join(__dirname, './config'));
|
|
14
|
-
const app = new Application(config);
|
|
15
|
-
yield app.parse();
|
|
16
|
-
}))();
|
|
17
|
-
//# sourceMappingURL=index.js.map
|
package/esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,CAAC,GAAS,EAAE;IACV,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IAClE,MAAM,GAAG,GAAG,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,GAAG,CAAC,KAAK,EAAE,CAAC;AACpB,CAAC,CAAA,CAAC,EAAE,CAAC","sourcesContent":["import { Application, readConfig } from '@nocobase/server';\nimport * as path from 'path';\n\n(async () => {\n const config = await readConfig(path.join(__dirname, './config'));\n const app = new Application(config);\n await app.parse();\n})();\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"database.js","sourceRoot":"","sources":["../../src/config/database.ts"],"names":[],"mappings":";;AACA,+BAA+B;AAE/B,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,UAAiB,CAAC;AAE9C,IAAI,cAAc,GAAqB;IACrC,OAAO;IACP,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,UAAU,KAAK,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK;CAC/D,CAAC;AAEF,IAAI,OAAO,KAAK,QAAQ,EAAE;IACxB,cAAc,mCACT,cAAc,KACjB,OAAO,EAAE,IAAA,cAAO,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,WAAW,CAAC,GACvE,CAAC;CACH;KAAM;IACL,cAAc,mCACT,cAAc,KACjB,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,EAC7B,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,EACjC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,EACjC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,EACzB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,OAAc,GACjC,CAAC;CACH;AAED,kBAAe,cAAc,CAAC","sourcesContent":["import { IDatabaseOptions } from '@nocobase/database';\nimport { resolve } from 'path';\n\nconst dialect = process.env.DB_DIALECT as any;\n\nlet databaseConfig: IDatabaseOptions = {\n dialect,\n logging: process.env.DB_LOG_SQL === 'on' ? console.log : false,\n};\n\nif (dialect === 'sqlite') {\n databaseConfig = {\n ...databaseConfig,\n storage: resolve(process.cwd(), process.env.DB_STORAGE || 'db.sqlite'),\n };\n} else {\n databaseConfig = {\n ...databaseConfig,\n username: process.env.DB_USER,\n password: process.env.DB_PASSWORD,\n database: process.env.DB_DATABASE,\n host: process.env.DB_HOST,\n port: process.env.DB_PORT as any,\n };\n}\n\nexport default databaseConfig;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../src/config/plugins.ts"],"names":[],"mappings":";;AAGA,kBAAe;IACb,gCAAgC;IAChC,qCAAqC;IACrC,oCAAoC;IACpC,oCAAoC;IACpC,+BAA+B;IAC/B,kCAAkC;IAClC;QACE,wBAAwB;QACxB;YACE,GAAG,EAAE;gBACH,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,UAAU;aAC/B;SACF;KACF;IACD,sBAAsB;IACtB,+BAA+B;IAC/B,2BAA2B;IAC3B,CAAC,yBAAyB,CAAC;CACH,CAAC","sourcesContent":["import { PluginsConfigurations } from '@nocobase/server';\nimport { resolve } from 'path';\n\nexport default [\n '@nocobase/plugin-error-handler',\n '@nocobase/plugin-collection-manager',\n '@nocobase/plugin-ui-schema-storage',\n '@nocobase/plugin-ui-routes-storage',\n '@nocobase/plugin-file-manager',\n '@nocobase/plugin-system-settings',\n [\n '@nocobase/plugin-users',\n {\n jwt: {\n secret: process.env.JWT_SECRET,\n },\n },\n ],\n '@nocobase/plugin-acl',\n '@nocobase/plugin-china-region',\n '@nocobase/plugin-workflow',\n ['@nocobase/plugin-client'],\n] as PluginsConfigurations;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resourcer.js","sourceRoot":"","sources":["../../src/config/resourcer.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACb,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB;CACrC,CAAC","sourcesContent":["export default {\n prefix: process.env.SERVER_BASE_PATH,\n};\n"]}
|
package/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA2D;AAC3D,2CAA6B;AAE7B,CAAC,GAAS,EAAE;IACV,MAAM,MAAM,GAAG,MAAM,IAAA,mBAAU,EAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IAClE,MAAM,GAAG,GAAG,IAAI,oBAAW,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,GAAG,CAAC,KAAK,EAAE,CAAC;AACpB,CAAC,CAAA,CAAC,EAAE,CAAC","sourcesContent":["import { Application, readConfig } from '@nocobase/server';\nimport * as path from 'path';\n\n(async () => {\n const config = await readConfig(path.join(__dirname, './config'));\n const app = new Application(config);\n await app.parse();\n})();\n"]}
|