@nocobase/app-server 0.7.0-alpha.6 → 0.7.0-alpha.60

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.
@@ -1,3 +1,3 @@
1
1
  import { IDatabaseOptions } from '@nocobase/database';
2
- declare let databaseConfig: IDatabaseOptions;
3
- export default databaseConfig;
2
+ declare const _default: IDatabaseOptions;
3
+ export default _default;
@@ -1,16 +1,17 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const path_1 = require("path");
4
- const dialect = process.env.DB_DIALECT;
5
- let databaseConfig = {
6
- dialect,
7
- logging: process.env.DB_LOG_SQL === 'on' ? console.log : false,
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
8
16
  };
9
- if (dialect === 'sqlite') {
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
17
+ exports.default = _default;
@@ -0,0 +1,8 @@
1
+ declare const _default: {
2
+ database: import("@nocobase/database").IDatabaseOptions;
3
+ resourcer: {
4
+ prefix: string;
5
+ };
6
+ plugins: import("@nocobase/server").PluginsConfigurations;
7
+ };
8
+ export 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;
@@ -1,23 +1,8 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = [
4
- '@nocobase/plugin-error-handler',
5
- '@nocobase/plugin-collection-manager',
6
- '@nocobase/plugin-ui-schema-storage',
7
- '@nocobase/plugin-ui-routes-storage',
8
- '@nocobase/plugin-file-manager',
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'];
8
+ exports.default = _default;
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = {
4
- prefix: process.env.SERVER_BASE_PATH,
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
- //# sourceMappingURL=resourcer.js.map
10
+ exports.default = _default;
package/lib/index.d.ts CHANGED
@@ -1 +1,3 @@
1
- export {};
1
+ import { Application } from '@nocobase/server';
2
+ declare const app: Application<import("@nocobase/server").DefaultState, import("@nocobase/server").DefaultContext>;
3
+ export default app;
package/lib/index.js CHANGED
@@ -1,38 +1,29 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
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
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
22
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
23
- return new (P || (P = Promise))(function (resolve, reject) {
24
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
25
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
26
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
27
- step((generator = generator.apply(thisArg, _arguments || [])).next());
28
- });
29
- };
30
- Object.defineProperty(exports, "__esModule", { value: true });
31
- const server_1 = require("@nocobase/server");
32
- const path = __importStar(require("path"));
33
- (() => __awaiter(void 0, void 0, void 0, function* () {
34
- const config = yield (0, server_1.readConfig)(path.join(__dirname, './config'));
35
- const app = new server_1.Application(config);
36
- yield app.parse();
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.0-alpha.6",
3
+ "version": "0.7.0-alpha.60",
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/database": "0.7.0-alpha.6",
15
- "@nocobase/plugin-acl": "0.7.0-alpha.6",
16
- "@nocobase/plugin-china-region": "0.7.0-alpha.6",
17
- "@nocobase/plugin-client": "0.7.0-alpha.6",
18
- "@nocobase/plugin-collection-manager": "0.7.0-alpha.6",
19
- "@nocobase/plugin-error-handler": "0.7.0-alpha.6",
20
- "@nocobase/plugin-file-manager": "0.7.0-alpha.6",
21
- "@nocobase/plugin-system-settings": "0.7.0-alpha.6",
22
- "@nocobase/plugin-ui-routes-storage": "0.7.0-alpha.6",
23
- "@nocobase/plugin-ui-schema-storage": "0.7.0-alpha.6",
24
- "@nocobase/plugin-users": "0.7.0-alpha.6",
25
- "@nocobase/plugin-workflow": "0.7.0-alpha.6",
26
- "@nocobase/server": "0.7.0-alpha.6"
9
+ "@nocobase/preset-nocobase": "0.7.0-alpha.60"
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": "7d0087cbb3b7663ba05366ca3b80db2853669ee9"
16
+ "gitHead": "f0d0afbb19dbd90ac3cf4155748fa084c67f54ee"
34
17
  }
@@ -1,27 +1,12 @@
1
1
  import { IDatabaseOptions } from '@nocobase/database';
2
- import { resolve } from 'path';
3
2
 
4
- const dialect = process.env.DB_DIALECT as any;
5
-
6
- let databaseConfig: IDatabaseOptions = {
7
- dialect,
8
- logging: process.env.DB_LOG_SQL === 'on' ? console.log : false,
9
- };
10
-
11
- if (dialect === 'sqlite') {
12
- databaseConfig = {
13
- ...databaseConfig,
14
- storage: resolve(process.cwd(), process.env.DB_STORAGE || 'db.sqlite'),
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
+ } as IDatabaseOptions;
@@ -0,0 +1,9 @@
1
+ import database from './database';
2
+ import plugins from './plugins';
3
+ import resourcer from './resourcer';
4
+
5
+ export default {
6
+ database,
7
+ resourcer,
8
+ plugins,
9
+ };
@@ -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,9 @@ 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
- ['@nocobase/plugin-client'],
14
+ '@nocobase/plugin-client',
23
15
  ] as PluginsConfigurations;
@@ -1,3 +1,3 @@
1
1
  export default {
2
- prefix: process.env.SERVER_BASE_PATH,
2
+ prefix: process.env.API_BASE_PATH,
3
3
  };
package/src/index.ts CHANGED
@@ -1,8 +1,10 @@
1
- import { Application, readConfig } from '@nocobase/server';
2
- import * as path from 'path';
1
+ import { Application } from '@nocobase/server';
2
+ import config from './config';
3
3
 
4
- (async () => {
5
- const config = await readConfig(path.join(__dirname, './config'));
6
- const app = new Application(config);
7
- await app.parse();
8
- })();
4
+ const app = new Application(config);
5
+
6
+ if (require.main === module) {
7
+ app.parse();
8
+ }
9
+
10
+ export default app;
@@ -1,3 +0,0 @@
1
- import { IDatabaseOptions } from '@nocobase/database';
2
- declare let databaseConfig: IDatabaseOptions;
3
- export default databaseConfig;
@@ -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"]}
@@ -1,3 +0,0 @@
1
- import { PluginsConfigurations } from '@nocobase/server';
2
- declare const _default: PluginsConfigurations;
3
- export default _default;
@@ -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"]}
@@ -1,4 +0,0 @@
1
- declare const _default: {
2
- prefix: string;
3
- };
4
- export default _default;
@@ -1,4 +0,0 @@
1
- export default {
2
- prefix: process.env.SERVER_BASE_PATH,
3
- };
4
- //# sourceMappingURL=resourcer.js.map
@@ -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"]}