@lwrjs/static 0.12.0-alpha.11 → 0.12.0-alpha.12

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.
@@ -68,10 +68,8 @@ var StaticAssetProvider = class {
68
68
  const mime = metadata.mimeType || (0, import_shared_utils.mimeLookup)(siteAssetPath);
69
69
  const ext = import_path.default.extname(`x.${siteAssetPath}`).toLowerCase().substring(1);
70
70
  const type = this.assetsOnLambda ? "asset" : "external";
71
- const content = this.assetsOnLambda ? function(encoding) {
71
+ const content = function(encoding) {
72
72
  return import_fs_extra.default.readFileSync(siteAssetPath, encoding);
73
- } : () => {
74
- throw Error(`[${this.name}] Asset is not on lambda ${siteAssetPath}`);
75
73
  };
76
74
  const uri = this.assetsOnLambda ? fileAssetPath : import_path.default.join(this.siteRootDir, fileAssetPath);
77
75
  import_diagnostics.logger.debug({label: `${this.name}`, message: `uri ${assetIdentifier.specifier} -> ${uri}`});
@@ -48,13 +48,10 @@ export default class StaticAssetProvider {
48
48
  const ext = path.extname(`x.${siteAssetPath}`).toLowerCase().substring(1);
49
49
  // Unless assets on lambda feature flag is set indicate the asset source is external
50
50
  const type = this.assetsOnLambda ? 'asset' : 'external';
51
- const content = this.assetsOnLambda
52
- ? function (encoding) {
53
- return fs.readFileSync(siteAssetPath, encoding);
54
- }
55
- : () => {
56
- throw Error(`[${this.name}] Asset is not on lambda ${siteAssetPath}`);
57
- };
51
+ const content = function (encoding) {
52
+ return fs.readFileSync(siteAssetPath, encoding);
53
+ };
54
+ // Create URI
58
55
  const uri = this.assetsOnLambda ? fileAssetPath : path.join(this.siteRootDir, fileAssetPath);
59
56
  logger.debug({ label: `${this.name}`, message: `uri ${assetIdentifier.specifier} -> ${uri}` });
60
57
  return {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.12.0-alpha.11",
7
+ "version": "0.12.0-alpha.12",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -48,11 +48,11 @@
48
48
  "build/**/*.d.ts"
49
49
  ],
50
50
  "dependencies": {
51
- "@lwrjs/diagnostics": "0.12.0-alpha.11",
52
- "@lwrjs/shared-utils": "0.12.0-alpha.11"
51
+ "@lwrjs/diagnostics": "0.12.0-alpha.12",
52
+ "@lwrjs/shared-utils": "0.12.0-alpha.12"
53
53
  },
54
54
  "devDependencies": {
55
- "@lwrjs/types": "0.12.0-alpha.11",
55
+ "@lwrjs/types": "0.12.0-alpha.12",
56
56
  "@types/express": "^4.17.21",
57
57
  "jest": "^26.6.3",
58
58
  "jest-express": "^1.12.0",
@@ -65,5 +65,5 @@
65
65
  "volta": {
66
66
  "extends": "../../../package.json"
67
67
  },
68
- "gitHead": "781951a5ef92ce735cbffce7c7a2a32c60bd3c16"
68
+ "gitHead": "bc8a88bce246e9ec00641955152de526ea030ebb"
69
69
  }