@eik/common 4.0.9 → 4.1.0
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 +7 -0
- package/eikjson.d.ts +2 -2
- package/lib/helpers/type-slug.js +1 -0
- package/lib/helpers/type-title.js +1 -0
- package/lib/schemas/assert.js +1 -1
- package/lib/schemas/eikjson.schema.json +2 -2
- package/lib/validators/index.js +6 -1
- package/package.json +1 -1
- package/types/classes/eik-config.d.ts +1 -1
- package/types/helpers/type-title.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [4.1.0](https://github.com/eik-lib/common/compare/v4.0.9...v4.1.0) (2024-08-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add support for Eik image type ([75a5830](https://github.com/eik-lib/common/commit/75a5830df7bf59f7ef627b8d143cda5c0bbbba1b))
|
|
7
|
+
|
|
1
8
|
## [4.0.9](https://github.com/eik-lib/common/compare/v4.0.8...v4.0.9) (2024-08-13)
|
|
2
9
|
|
|
3
10
|
|
package/eikjson.d.ts
CHANGED
|
@@ -20,9 +20,9 @@ export interface EikjsonSchema {
|
|
|
20
20
|
*/
|
|
21
21
|
version: string;
|
|
22
22
|
/**
|
|
23
|
-
* The type of the Eik package. Must be one of 'package', 'npm' or '
|
|
23
|
+
* 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.
|
|
24
24
|
*/
|
|
25
|
-
type?: "package" | "npm" | "map";
|
|
25
|
+
type?: "package" | "npm" | "map" | "image";
|
|
26
26
|
/**
|
|
27
27
|
* 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.
|
|
28
28
|
*/
|
package/lib/helpers/type-slug.js
CHANGED
package/lib/schemas/assert.js
CHANGED
|
@@ -32,7 +32,7 @@ const assert = (validate, message) => (value) => {
|
|
|
32
32
|
.map((err) => {
|
|
33
33
|
let msg = err.message;
|
|
34
34
|
if (err.params && err.params.allowedValues) {
|
|
35
|
-
msg += ` ("${err.params.allowedValues.join('", ')}")`;
|
|
35
|
+
msg += ` ("${err.params.allowedValues.join('", "')}")`;
|
|
36
36
|
}
|
|
37
37
|
return msg;
|
|
38
38
|
})
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"minLength": 1
|
|
25
25
|
},
|
|
26
26
|
"type": {
|
|
27
|
-
"description": "The type of the Eik package. Must be one of 'package', 'npm' or '
|
|
27
|
+
"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.",
|
|
28
28
|
"type": "string",
|
|
29
|
-
"enum": ["package", "npm", "map"],
|
|
29
|
+
"enum": ["package", "npm", "map", "image"],
|
|
30
30
|
"default": "package"
|
|
31
31
|
},
|
|
32
32
|
"files": {
|
package/lib/validators/index.js
CHANGED
|
@@ -77,7 +77,12 @@ export const alias = (value) => {
|
|
|
77
77
|
* @throws {Error} if the value is not a valid Eik package type
|
|
78
78
|
*/
|
|
79
79
|
export const type = (value) => {
|
|
80
|
-
if (
|
|
80
|
+
if (
|
|
81
|
+
value === 'pkg' ||
|
|
82
|
+
value === 'map' ||
|
|
83
|
+
value === 'npm' ||
|
|
84
|
+
value === 'img'
|
|
85
|
+
) {
|
|
81
86
|
return value;
|
|
82
87
|
}
|
|
83
88
|
throw new Error(`Parameter "type" is not valid - Value: ${value}`);
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ export default class EikConfig {
|
|
|
17
17
|
/** @type {EikjsonSchema["version"]} */
|
|
18
18
|
get version(): string;
|
|
19
19
|
/** @type {EikjsonSchema["type"]} */
|
|
20
|
-
get type(): "map" | "npm" | "package";
|
|
20
|
+
get type(): "map" | "npm" | "package" | "image";
|
|
21
21
|
/** @type {string} */
|
|
22
22
|
get server(): string;
|
|
23
23
|
/** @type {[string, string][]} */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare function _default(type: string): "PACKAGE" | "NPM" | "MAP";
|
|
1
|
+
declare function _default(type: string): "PACKAGE" | "NPM" | "MAP" | "IMAGE";
|
|
2
2
|
export default _default;
|