@lwrjs/fs-asset-provider 0.21.8 → 0.22.1
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.
- package/build/cjs/index.cjs +1 -1
- package/build/es/index.js +2 -2
- package/package.json +6 -6
package/build/cjs/index.cjs
CHANGED
|
@@ -73,7 +73,7 @@ var FsAssetProvider = class {
|
|
|
73
73
|
return this.getAssetFromFSPath(fullAssetPath);
|
|
74
74
|
}
|
|
75
75
|
async getAssetFromFSPath(assetPath) {
|
|
76
|
-
assetPath = (0, import_path.normalize)(assetPath);
|
|
76
|
+
assetPath = (0, import_shared_utils.toForwardSlash)((0, import_path.normalize)(assetPath));
|
|
77
77
|
const fullAssetPath = decodeURI(assetPath);
|
|
78
78
|
if (!this.cachedAssets.has(fullAssetPath)) {
|
|
79
79
|
const [assetPath2] = fullAssetPath.split("?");
|
package/build/es/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'fs-extra';
|
|
2
2
|
import { extname, normalize } from 'path';
|
|
3
3
|
import { logger } from '@lwrjs/diagnostics';
|
|
4
|
-
import { mimeLookup, normalizeAssetSpecifier } from '@lwrjs/shared-utils';
|
|
4
|
+
import { mimeLookup, normalizeAssetSpecifier, toForwardSlash } from '@lwrjs/shared-utils';
|
|
5
5
|
function hash(filePath) {
|
|
6
6
|
const result = fs.statSync(filePath);
|
|
7
7
|
return (result.mtimeMs * 10000).toString();
|
|
@@ -54,7 +54,7 @@ export default class FsAssetProvider {
|
|
|
54
54
|
* Get and AssetSource object from a resolved filesystem file path.
|
|
55
55
|
*/
|
|
56
56
|
async getAssetFromFSPath(assetPath) {
|
|
57
|
-
assetPath = normalize(assetPath);
|
|
57
|
+
assetPath = toForwardSlash(normalize(assetPath));
|
|
58
58
|
const fullAssetPath = decodeURI(assetPath); // decodeURIComponent decodes too many things (eg: /)
|
|
59
59
|
if (!this.cachedAssets.has(fullAssetPath)) {
|
|
60
60
|
const [assetPath] = fullAssetPath.split('?'); // remove query params
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.22.1",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -33,16 +33,16 @@
|
|
|
33
33
|
"build": "tsc -b"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@lwrjs/diagnostics": "0.
|
|
37
|
-
"@lwrjs/shared-utils": "0.
|
|
36
|
+
"@lwrjs/diagnostics": "0.22.1",
|
|
37
|
+
"@lwrjs/shared-utils": "0.22.1",
|
|
38
38
|
"fs-extra": "^11.2.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@lwrjs/types": "0.
|
|
41
|
+
"@lwrjs/types": "0.22.1",
|
|
42
42
|
"memfs": "^4.13.0"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
|
-
"node": ">=
|
|
45
|
+
"node": ">=22.0.0"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "29d44fb69ae394a4191c6a81024a8a81f2125556"
|
|
48
48
|
}
|