@eik/node-client 1.2.0 → 1.2.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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.2.1](https://github.com/eik-lib/node-client/compare/v1.2.0...v1.2.1) (2024-10-16)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * slugify image type ([#207](https://github.com/eik-lib/node-client/issues/207)) ([c0ed5e7](https://github.com/eik-lib/node-client/commit/c0ed5e787119657fa83647256a5f6179ccd24389))
7
+
1
8
  # [1.2.0](https://github.com/eik-lib/node-client/compare/v1.1.64...v1.2.0) (2024-10-15)
2
9
 
3
10
 
package/dist/index.cjs CHANGED
@@ -238,7 +238,12 @@ class Eik {
238
238
  */
239
239
  get pathname() {
240
240
  if (this.#config.type && this.#config.name && this.#config.version)
241
- return path.join("/", this.type, this.name, this.version).replace(/\\/g, "/");
241
+ return path.join(
242
+ "/",
243
+ common.helpers.typeSlug(this.type),
244
+ this.name,
245
+ this.version,
246
+ ).replace(/\\/g, "/");
242
247
  throw new Error("Eik config was not loaded before calling .pathname");
243
248
  }
244
249
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eik/node-client",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Utilities for working with assets and import maps on an Eik server",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
package/src/index.js CHANGED
@@ -186,7 +186,12 @@ export default class Eik {
186
186
  */
187
187
  get pathname() {
188
188
  if (this.#config.type && this.#config.name && this.#config.version)
189
- return join("/", this.type, this.name, this.version).replace(/\\/g, "/");
189
+ return join(
190
+ "/",
191
+ helpers.typeSlug(this.type),
192
+ this.name,
193
+ this.version,
194
+ ).replace(/\\/g, "/");
190
195
  throw new Error("Eik config was not loaded before calling .pathname");
191
196
  }
192
197