@lwrjs/asset-transformer 0.22.8 → 0.22.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.
@@ -43,7 +43,7 @@ function defaultAssetTransformer(_options, lwrGlobalContext) {
43
43
  const immutable = immutableAssets ? "immutable/" : "";
44
44
  const hash = immutableAssets ? ownHash : "latest";
45
45
  const relativePath = basePath ? (0, import_path.relative)(basePath, existingUri) : existingUri;
46
- const uri = (0, import_path.join)(`${basePath}/${apiVersion}/${type}/${immutable}s/${hash}`, encodeURI(relativePath));
46
+ const uri = (0, import_shared_utils.joinUrlPath)(`${basePath}/${apiVersion}/${type}/${immutable}s/${hash}`, encodeURI(relativePath));
47
47
  import_diagnostics.logger.debug({label: `${this.name}`, message: `normalized url ${entry} -> ${uri}`});
48
48
  return {
49
49
  ...assetUri,
package/build/es/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { logger } from '@lwrjs/diagnostics';
2
- import { createStringBuilder, mimeLookup } from '@lwrjs/shared-utils';
2
+ import { createStringBuilder, joinUrlPath, mimeLookup } from '@lwrjs/shared-utils';
3
3
  import { linkCss } from './metadata-collectors/css.js';
4
- import { join, relative } from 'path';
4
+ import { relative } from 'path';
5
5
  const CSS_MIME = mimeLookup('.css');
6
6
  const name = 'lwr-default-asset-transformer';
7
7
  export default function defaultAssetTransformer(_options, lwrGlobalContext) {
@@ -18,7 +18,7 @@ export default function defaultAssetTransformer(_options, lwrGlobalContext) {
18
18
  const immutable = immutableAssets ? 'immutable/' : '';
19
19
  const hash = immutableAssets ? ownHash : 'latest';
20
20
  const relativePath = basePath ? relative(basePath, existingUri) : existingUri;
21
- const uri = join(`${basePath}/${apiVersion}/${type}/${immutable}s/${hash}`, encodeURI(relativePath));
21
+ const uri = joinUrlPath(`${basePath}/${apiVersion}/${type}/${immutable}s/${hash}`, encodeURI(relativePath));
22
22
  logger.debug({ label: `${this.name}`, message: `normalized url ${entry} -> ${uri}` });
23
23
  return {
24
24
  ...assetUri,
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.22.8",
7
+ "version": "0.22.9",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -39,14 +39,14 @@
39
39
  "test": "jest"
40
40
  },
41
41
  "dependencies": {
42
- "@lwrjs/diagnostics": "0.22.8",
43
- "@lwrjs/shared-utils": "0.22.8",
42
+ "@lwrjs/diagnostics": "0.22.9",
43
+ "@lwrjs/shared-utils": "0.22.9",
44
44
  "fs-extra": "^11.2.0",
45
45
  "postcss": "^8.4.40",
46
46
  "postcss-value-parser": "^4.2.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@lwrjs/types": "0.22.8",
49
+ "@lwrjs/types": "0.22.9",
50
50
  "jest": "29.7.0",
51
51
  "ts-jest": "^29.2.6"
52
52
  },
@@ -56,5 +56,5 @@
56
56
  "volta": {
57
57
  "extends": "../../../package.json"
58
58
  },
59
- "gitHead": "66f71f33f5b12fa4e7c7969f0a6239a590c999d1"
59
+ "gitHead": "d0c112cd7b6eb940d6e554d0bbd93fb535465fdc"
60
60
  }