@lwrjs/core 0.17.2-alpha.30 → 0.17.2-alpha.31

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.
@@ -50,10 +50,15 @@ function requestProcessorMiddleware(app, context) {
50
50
  const host = req.headers["host"];
51
51
  const forwardedProto = req.headers["x-forwarded-proto"];
52
52
  const protocol = req.protocol;
53
+ const cookieLength = req.headers["cookie"]?.length || 0;
54
+ let cookieMsg = `Cookie length: ${cookieLength}`;
55
+ if (cookieLength) {
56
+ cookieMsg += `, Cookie has '__Secure-has-sid': ${!!req.cookie("__Secure-has-sid")}, Cookie has 'sid': ${!!req.cookie("sid")}`;
57
+ }
53
58
  if ((0, import_shared_utils.isLambdaEnv)()) {
54
59
  import_diagnostics.logger.info({
55
60
  label: `request-processor-middleware`,
56
- message: `Original Url: ${req.originalUrl}, Forwarded: ${forwarded}, X-Forwarded-Proto: ${forwardedProto}, Host: ${host}, Protocol: ${protocol}, ${import_shared_utils.MRT_REQUEST_CLASS}: ${requestClass}, ${import_shared_utils.TRUE_CLIENT_IP}: ${trueClientIP}, ${import_shared_utils.CORRELATION_ID}: ${correlationID}, ${import_shared_utils.REQUEST_DEPTH_HEADER}: ${requestDepth}`
61
+ message: `Original Url: ${req.originalUrl}, Forwarded: ${forwarded}, X-Forwarded-Proto: ${forwardedProto}, Host: ${host}, Protocol: ${protocol}, ${cookieMsg}, ${import_shared_utils.MRT_REQUEST_CLASS}: ${requestClass}, ${import_shared_utils.TRUE_CLIENT_IP}: ${trueClientIP}, ${import_shared_utils.CORRELATION_ID}: ${correlationID}, ${import_shared_utils.REQUEST_DEPTH_HEADER}: ${requestDepth}`
57
62
  });
58
63
  }
59
64
  }
package/build/es/index.js CHANGED
@@ -91,8 +91,19 @@ async function initContext(appConfig, runtimeEnvironment, globalData) {
91
91
  return serverContext;
92
92
  }
93
93
  export class LwrApp {
94
+ app;
95
+ server;
96
+ initialized = false;
97
+ config;
98
+ runtimeEnvironment;
99
+ globalData;
100
+ // generic server API
101
+ serverType;
102
+ use;
103
+ all;
104
+ get;
105
+ post;
94
106
  constructor(configs) {
95
- this.initialized = false;
96
107
  const span = getTracer().startSpan({ name: CoreSpan.CreateServer });
97
108
  const { appConfig, runtimeEnvironment, globalData } = configs;
98
109
  this.config = appConfig;
@@ -5,6 +5,11 @@ import { getRequestProperties } from './utils/request.js';
5
5
  let hmr;
6
6
  const HMR_URI = '/:apiVersion/hmr/:format/:compat';
7
7
  class Hmr {
8
+ connectedClients;
9
+ server;
10
+ context;
11
+ // Restriction: HMR only supports format=ESM and bundle=false
12
+ moduleRegistry;
8
13
  constructor(server, context) {
9
14
  this.server = server;
10
15
  this.context = context;
@@ -24,11 +24,16 @@ export function requestProcessorMiddleware(app, context) {
24
24
  const host = req.headers['host'];
25
25
  const forwardedProto = req.headers['x-forwarded-proto'];
26
26
  const protocol = req.protocol;
27
+ const cookieLength = req.headers['cookie']?.length || 0;
28
+ let cookieMsg = `Cookie length: ${cookieLength}`;
29
+ if (cookieLength) {
30
+ cookieMsg += `, Cookie has '__Secure-has-sid': ${!!req.cookie('__Secure-has-sid')}, Cookie has 'sid': ${!!req.cookie('sid')}`;
31
+ }
27
32
  // Only Add this log when on MRT. Useful to catch issues where CDN did not send us the right info.
28
33
  if (isLambdaEnv()) {
29
34
  logger.info({
30
35
  label: `request-processor-middleware`,
31
- message: `Original Url: ${req.originalUrl}, Forwarded: ${forwarded}, X-Forwarded-Proto: ${forwardedProto}, Host: ${host}, Protocol: ${protocol}, ${MRT_REQUEST_CLASS}: ${requestClass}, ${TRUE_CLIENT_IP}: ${trueClientIP}, ${CORRELATION_ID}: ${correlationID}, ${REQUEST_DEPTH_HEADER}: ${requestDepth}`,
36
+ message: `Original Url: ${req.originalUrl}, Forwarded: ${forwarded}, X-Forwarded-Proto: ${forwardedProto}, Host: ${host}, Protocol: ${protocol}, ${cookieMsg}, ${MRT_REQUEST_CLASS}: ${requestClass}, ${TRUE_CLIENT_IP}: ${trueClientIP}, ${CORRELATION_ID}: ${correlationID}, ${REQUEST_DEPTH_HEADER}: ${requestDepth}`,
32
37
  });
33
38
  }
34
39
  }
@@ -847,6 +847,8 @@ export default class SiteGenerator {
847
847
  }
848
848
  // Class used to track import metadata for a view
849
849
  export class ViewImportMetadataImpl {
850
+ existing;
851
+ additional;
850
852
  constructor(existingImportMetadata, additionalImportMetadata) {
851
853
  this.existing = existingImportMetadata;
852
854
  this.additional = additionalImportMetadata || { imports: {}, index: {} };
@@ -3,6 +3,9 @@ import https from 'https';
3
3
  import { logger } from '@lwrjs/diagnostics';
4
4
  import { isLocalDev, isModuleOrBundleUrl } from '@lwrjs/shared-utils';
5
5
  export default class NetworkDispatcher {
6
+ port;
7
+ internalRequestKey;
8
+ pool;
6
9
  constructor(port, internalRequestKey) {
7
10
  this.port = port || 3000;
8
11
  const httpClient = this.port == 443 ? https : http;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.17.2-alpha.30",
7
+ "version": "0.17.2-alpha.31",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -43,34 +43,34 @@
43
43
  "build": "tsc -b"
44
44
  },
45
45
  "dependencies": {
46
- "@lwrjs/app-service": "0.17.2-alpha.30",
47
- "@lwrjs/asset-registry": "0.17.2-alpha.30",
48
- "@lwrjs/asset-transformer": "0.17.2-alpha.30",
49
- "@lwrjs/base-view-provider": "0.17.2-alpha.30",
50
- "@lwrjs/base-view-transformer": "0.17.2-alpha.30",
51
- "@lwrjs/client-modules": "0.17.2-alpha.30",
52
- "@lwrjs/config": "0.17.2-alpha.30",
53
- "@lwrjs/diagnostics": "0.17.2-alpha.30",
54
- "@lwrjs/esbuild": "0.17.2-alpha.30",
55
- "@lwrjs/fs-asset-provider": "0.17.2-alpha.30",
56
- "@lwrjs/fs-watch": "0.17.2-alpha.30",
57
- "@lwrjs/html-view-provider": "0.17.2-alpha.30",
58
- "@lwrjs/instrumentation": "0.17.2-alpha.30",
59
- "@lwrjs/loader": "0.17.2-alpha.30",
60
- "@lwrjs/lwc-module-provider": "0.17.2-alpha.30",
61
- "@lwrjs/lwc-ssr": "0.17.2-alpha.30",
62
- "@lwrjs/markdown-view-provider": "0.17.2-alpha.30",
63
- "@lwrjs/module-bundler": "0.17.2-alpha.30",
64
- "@lwrjs/module-registry": "0.17.2-alpha.30",
65
- "@lwrjs/npm-module-provider": "0.17.2-alpha.30",
66
- "@lwrjs/nunjucks-view-provider": "0.17.2-alpha.30",
67
- "@lwrjs/o11y": "0.17.2-alpha.30",
68
- "@lwrjs/resource-registry": "0.17.2-alpha.30",
69
- "@lwrjs/router": "0.17.2-alpha.30",
70
- "@lwrjs/server": "0.17.2-alpha.30",
71
- "@lwrjs/shared-utils": "0.17.2-alpha.30",
72
- "@lwrjs/static": "0.17.2-alpha.30",
73
- "@lwrjs/view-registry": "0.17.2-alpha.30",
46
+ "@lwrjs/app-service": "0.17.2-alpha.31",
47
+ "@lwrjs/asset-registry": "0.17.2-alpha.31",
48
+ "@lwrjs/asset-transformer": "0.17.2-alpha.31",
49
+ "@lwrjs/base-view-provider": "0.17.2-alpha.31",
50
+ "@lwrjs/base-view-transformer": "0.17.2-alpha.31",
51
+ "@lwrjs/client-modules": "0.17.2-alpha.31",
52
+ "@lwrjs/config": "0.17.2-alpha.31",
53
+ "@lwrjs/diagnostics": "0.17.2-alpha.31",
54
+ "@lwrjs/esbuild": "0.17.2-alpha.31",
55
+ "@lwrjs/fs-asset-provider": "0.17.2-alpha.31",
56
+ "@lwrjs/fs-watch": "0.17.2-alpha.31",
57
+ "@lwrjs/html-view-provider": "0.17.2-alpha.31",
58
+ "@lwrjs/instrumentation": "0.17.2-alpha.31",
59
+ "@lwrjs/loader": "0.17.2-alpha.31",
60
+ "@lwrjs/lwc-module-provider": "0.17.2-alpha.31",
61
+ "@lwrjs/lwc-ssr": "0.17.2-alpha.31",
62
+ "@lwrjs/markdown-view-provider": "0.17.2-alpha.31",
63
+ "@lwrjs/module-bundler": "0.17.2-alpha.31",
64
+ "@lwrjs/module-registry": "0.17.2-alpha.31",
65
+ "@lwrjs/npm-module-provider": "0.17.2-alpha.31",
66
+ "@lwrjs/nunjucks-view-provider": "0.17.2-alpha.31",
67
+ "@lwrjs/o11y": "0.17.2-alpha.31",
68
+ "@lwrjs/resource-registry": "0.17.2-alpha.31",
69
+ "@lwrjs/router": "0.17.2-alpha.31",
70
+ "@lwrjs/server": "0.17.2-alpha.31",
71
+ "@lwrjs/shared-utils": "0.17.2-alpha.31",
72
+ "@lwrjs/static": "0.17.2-alpha.31",
73
+ "@lwrjs/view-registry": "0.17.2-alpha.31",
74
74
  "chokidar": "^3.6.0",
75
75
  "esbuild": "^0.9.7",
76
76
  "fs-extra": "^11.2.0",
@@ -80,7 +80,7 @@
80
80
  "ws": "^8.18.0"
81
81
  },
82
82
  "devDependencies": {
83
- "@lwrjs/types": "0.17.2-alpha.30",
83
+ "@lwrjs/types": "0.17.2-alpha.31",
84
84
  "@types/ws": "^8.5.12",
85
85
  "memfs": "^4.13.0"
86
86
  },
@@ -93,5 +93,5 @@
93
93
  "volta": {
94
94
  "extends": "../../../package.json"
95
95
  },
96
- "gitHead": "818bbb13d2d4b14d128c4c4f23229c9ce7458a23"
96
+ "gitHead": "bbb087ab080321047b10bbcda40e88e69b6a69a5"
97
97
  }