@eik/common
Advanced tools
Comparing version 4.0.9 to 4.1.0
@@ -0,1 +1,8 @@ | ||
# [4.1.0](https://github.com/eik-lib/common/compare/v4.0.9...v4.1.0) (2024-08-14) | ||
### Features | ||
* add support for Eik image type ([75a5830](https://github.com/eik-lib/common/commit/75a5830df7bf59f7ef627b8d143cda5c0bbbba1b)) | ||
## [4.0.9](https://github.com/eik-lib/common/compare/v4.0.8...v4.0.9) (2024-08-13) | ||
@@ -2,0 +9,0 @@ |
@@ -23,5 +23,5 @@ /* eslint-disable */ | ||
/** | ||
* The type of the Eik package. Must be one of 'package', 'npm' or 'map'. Setting this value changes the URL publish namespace between '/pkg' (default), '/npm' and '/map', use 'npm' when publishing NPM packages. Use 'map' when publishing import maps. | ||
* The type of the Eik package. Must be one of 'package', 'npm', 'map' or 'image'. Setting this value changes the URL publish namespace between '/pkg' (default), '/npm', '/map' and '/img', use 'npm' when publishing NPM packages. Use 'image' when publishing images. Use 'map' when publishing import maps. | ||
*/ | ||
type?: "package" | "npm" | "map"; | ||
type?: "package" | "npm" | "map" | "image"; | ||
/** | ||
@@ -28,0 +28,0 @@ * File mapping definition for the package. Keys represent files or paths to be created on the Eik Server. Values represent paths to local files to be published. |
@@ -9,3 +9,4 @@ /** | ||
if (type === 'package') return 'pkg'; | ||
if (type === 'image') return 'img'; | ||
return type; | ||
}; |
@@ -9,3 +9,4 @@ /** | ||
if (type === 'npm') return 'NPM'; | ||
if (type === 'image') return 'IMAGE'; | ||
return 'MAP'; | ||
}; |
@@ -35,3 +35,3 @@ import { | ||
if (err.params && err.params.allowedValues) { | ||
msg += ` ("${err.params.allowedValues.join('", ')}")`; | ||
msg += ` ("${err.params.allowedValues.join('", "')}")`; | ||
} | ||
@@ -38,0 +38,0 @@ return msg; |
@@ -27,5 +27,5 @@ { | ||
"type": { | ||
"description": "The type of the Eik package. Must be one of 'package', 'npm' or 'map'. Setting this value changes the URL publish namespace between '/pkg' (default), '/npm' and '/map', use 'npm' when publishing NPM packages. Use 'map' when publishing import maps.", | ||
"description": "The type of the Eik package. Must be one of 'package', 'npm', 'map' or 'image'. Setting this value changes the URL publish namespace between '/pkg' (default), '/npm', '/map' and '/img', use 'npm' when publishing NPM packages. Use 'image' when publishing images. Use 'map' when publishing import maps.", | ||
"type": "string", | ||
"enum": ["package", "npm", "map"], | ||
"enum": ["package", "npm", "map", "image"], | ||
"default": "package" | ||
@@ -32,0 +32,0 @@ }, |
@@ -80,3 +80,8 @@ import semver from 'semver'; | ||
export const type = (value) => { | ||
if (value === 'pkg' || value === 'map' || value === 'npm') { | ||
if ( | ||
value === 'pkg' || | ||
value === 'map' || | ||
value === 'npm' || | ||
value === 'img' | ||
) { | ||
return value; | ||
@@ -83,0 +88,0 @@ } |
{ | ||
"name": "@eik/common", | ||
"version": "4.0.9", | ||
"version": "4.1.0", | ||
"description": "Common utilities for Eik modules", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -20,3 +20,3 @@ /** | ||
/** @type {EikjsonSchema["type"]} */ | ||
get type(): "map" | "npm" | "package"; | ||
get type(): "map" | "npm" | "package" | "image"; | ||
/** @type {string} */ | ||
@@ -23,0 +23,0 @@ get server(): string; |
@@ -1,2 +0,2 @@ | ||
declare function _default(type: string): "PACKAGE" | "NPM" | "MAP"; | ||
declare function _default(type: string): "PACKAGE" | "NPM" | "MAP" | "IMAGE"; | ||
export default _default; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
82088
1667