@lwrjs/server 0.9.0-alpha.5 → 0.9.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35,7 +35,7 @@ var import_express_response = __toModule(require("./express-response.cjs"));
35
35
  var ExpressInternalServer = class extends import_abstract_internal_app_server.default {
36
36
  constructor(options) {
37
37
  super();
38
- this.expressApp = (0, import_express.default)();
38
+ this.expressApp = options?.app || (0, import_express.default)();
39
39
  if (options.basePath) {
40
40
  this.basePath = options.basePath;
41
41
  }
@@ -10,7 +10,7 @@ import ExpressResponse from './express-response.js';
10
10
  export default class ExpressInternalServer extends AbstractInternalAppServer {
11
11
  constructor(options) {
12
12
  super();
13
- this.expressApp = express();
13
+ this.expressApp = options?.app || express();
14
14
  if (options.basePath) {
15
15
  this.basePath = options.basePath;
16
16
  }
@@ -1,7 +1,8 @@
1
1
  import { LwrFsKoa } from './fs/fs-server.js';
2
- import { InternalAppServer, MiddlewareRequest, MiddlewareResponse, ServerTypes } from '@lwrjs/types';
2
+ import { InternalAppServer, MiddlewareRequest, MiddlewareResponse, ServerTypeImpl, ServerTypes } from '@lwrjs/types';
3
3
  import { Request, Response } from 'express';
4
4
  declare type ServerOptions = {
5
+ app?: ServerTypeImpl<ServerTypes>;
5
6
  basePath?: string;
6
7
  };
7
8
  declare function createInternalServer<T extends ServerTypes>(serverType?: string, options?: ServerOptions): InternalAppServer<T>;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.9.0-alpha.5",
7
+ "version": "0.9.0-alpha.7",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -22,6 +22,10 @@
22
22
  ".": {
23
23
  "import": "./build/es/index.js",
24
24
  "require": "./build/cjs/index.cjs"
25
+ },
26
+ "./express": {
27
+ "import": "./build/es/src/express/express-server.js",
28
+ "require": "./build/cjs/src/express/express-server.cjs"
25
29
  }
26
30
  },
27
31
  "files": [
@@ -30,14 +34,14 @@
30
34
  "build/**/*.d.ts"
31
35
  ],
32
36
  "devDependencies": {
33
- "@lwrjs/types": "0.9.0-alpha.5",
37
+ "@lwrjs/types": "0.9.0-alpha.7",
34
38
  "@types/koa-compress": "^4.0.1",
35
39
  "@types/koa__router": "^8.0.4",
36
40
  "jest-express": "^1.12.0"
37
41
  },
38
42
  "dependencies": {
39
43
  "@koa/router": "^10.0.0",
40
- "@lwrjs/shared-utils": "0.9.0-alpha.5",
44
+ "@lwrjs/shared-utils": "0.9.0-alpha.7",
41
45
  "@types/compression": "^1.7.2",
42
46
  "@types/express": "^4.17.13",
43
47
  "@types/koa": "^2.11.7",
@@ -53,5 +57,5 @@
53
57
  "engines": {
54
58
  "node": ">=14.15.4 <19"
55
59
  },
56
- "gitHead": "6974600380071123ff14c5427d50d9d74bc0805d"
60
+ "gitHead": "b442dafaf3416c8c86f0e05c1644b805aac3decd"
57
61
  }