@lwrjs/static 0.13.0-alpha.8 → 0.13.0-alpha.9

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.
@@ -103,7 +103,7 @@ var StaticBundleProvider = class {
103
103
  return includedModule;
104
104
  }
105
105
  async getCode(bundlePath, debug, specifier, version, localeId) {
106
- const isLambda = process.env.AWS_LAMBDA_FUNCTION_NAME !== void 0;
106
+ const isLambda = (0, import_shared_utils.isLambdaEnv)();
107
107
  let bundleSourcePath = bundlePath;
108
108
  try {
109
109
  if (debug && isLambda) {
@@ -54,7 +54,7 @@ var StaticResourceProvider = class {
54
54
  }
55
55
  const resourcePath = import_path.default.join(this.siteRootDir, metadata.path);
56
56
  const debugResourcePath = debugMetadata ? import_path.default.join(this.siteRootDir, debugMetadata.path) : void 0;
57
- const isLambda = process.env.AWS_LAMBDA_FUNCTION_NAME !== void 0;
57
+ const isLambda = (0, import_shared_utils.isLambdaEnv)();
58
58
  const useDebug = debug && !isLambda && debugResourcePath;
59
59
  const type = metadata.mimeType || (0, import_shared_utils.mimeLookup)(resourcePath) || "application/javascript";
60
60
  return {
@@ -1,5 +1,5 @@
1
1
  import { logger } from '@lwrjs/diagnostics';
2
- import { VERSION_SIGIL, explodeSpecifier, getSpecifier } from '@lwrjs/shared-utils';
2
+ import { VERSION_SIGIL, explodeSpecifier, getSpecifier, isLambdaEnv } from '@lwrjs/shared-utils';
3
3
  import path from 'path';
4
4
  import fs from 'fs-extra';
5
5
  import { getSiteBundleId, parseSiteId, resolveStaticBundleVersion } from '../site-metadata.js';
@@ -92,7 +92,7 @@ export default class StaticBundleProvider {
92
92
  */
93
93
  async getCode(bundlePath, debug, specifier, version, localeId) {
94
94
  // Flag is used to indicate that we are running on a lambda
95
- const isLambda = process.env.AWS_LAMBDA_FUNCTION_NAME !== undefined;
95
+ const isLambda = isLambdaEnv();
96
96
  // Default source code path determined from metadata based on debug mode
97
97
  let bundleSourcePath = bundlePath;
98
98
  try {
@@ -1,5 +1,5 @@
1
1
  import { logger } from '@lwrjs/diagnostics';
2
- import { mimeLookup } from '@lwrjs/shared-utils';
2
+ import { isLambdaEnv, mimeLookup } from '@lwrjs/shared-utils';
3
3
  import path from 'path';
4
4
  import fs from 'fs-extra';
5
5
  import { getSiteResourceId } from '../site-metadata.js';
@@ -30,7 +30,7 @@ export default class StaticResourceProvider {
30
30
  }
31
31
  const resourcePath = path.join(this.siteRootDir, metadata.path);
32
32
  const debugResourcePath = debugMetadata ? path.join(this.siteRootDir, debugMetadata.path) : undefined;
33
- const isLambda = process.env.AWS_LAMBDA_FUNCTION_NAME !== undefined;
33
+ const isLambda = isLambdaEnv();
34
34
  const useDebug = debug && !isLambda && debugResourcePath;
35
35
  // Figure out mime type
36
36
  const type = metadata.mimeType || mimeLookup(resourcePath) || 'application/javascript';
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.13.0-alpha.8",
7
+ "version": "0.13.0-alpha.9",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -52,11 +52,11 @@
52
52
  "build/**/*.d.ts"
53
53
  ],
54
54
  "dependencies": {
55
- "@lwrjs/diagnostics": "0.13.0-alpha.8",
56
- "@lwrjs/shared-utils": "0.13.0-alpha.8"
55
+ "@lwrjs/diagnostics": "0.13.0-alpha.9",
56
+ "@lwrjs/shared-utils": "0.13.0-alpha.9"
57
57
  },
58
58
  "devDependencies": {
59
- "@lwrjs/types": "0.13.0-alpha.8",
59
+ "@lwrjs/types": "0.13.0-alpha.9",
60
60
  "@types/express": "^4.17.21",
61
61
  "jest": "^26.6.3",
62
62
  "jest-express": "^1.12.0",
@@ -69,5 +69,5 @@
69
69
  "volta": {
70
70
  "extends": "../../../package.json"
71
71
  },
72
- "gitHead": "91e731eae1457bbbebeb274fa0ea5574705c51a2"
72
+ "gitHead": "a2a9e1dbf39a7b04c7a43433e004895b6f4c51a3"
73
73
  }