@eik/common 4.1.1 → 5.0.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 +19 -0
- package/lib/classes/custom-error.js +8 -8
- package/lib/classes/eik-config.js +148 -150
- package/lib/classes/file-mapping.js +25 -25
- package/lib/classes/invalid-config-error.js +7 -7
- package/lib/classes/local-file-location.js +45 -52
- package/lib/classes/missing-config-error.js +7 -7
- package/lib/classes/multiple-config-sources-error.js +6 -6
- package/lib/classes/no-files-matched-error.js +8 -8
- package/lib/classes/read-file.js +25 -25
- package/lib/classes/remote-file-location.js +30 -30
- package/lib/classes/resolved-files.js +38 -46
- package/lib/classes/single-dest-multiple-source-error.js +9 -9
- package/lib/helpers/config-store.js +103 -103
- package/lib/helpers/get-defaults.js +24 -24
- package/lib/helpers/index.js +21 -21
- package/lib/helpers/local-assets.js +49 -49
- package/lib/helpers/path-slashes.js +8 -10
- package/lib/helpers/resolve-files.js +60 -65
- package/lib/helpers/type-slug.js +3 -3
- package/lib/helpers/type-title.js +4 -4
- package/lib/index.js +12 -12
- package/lib/schemas/assert.js +41 -41
- package/lib/schemas/index.js +7 -7
- package/lib/schemas/validate.js +64 -64
- package/lib/schemas/validation-error.js +11 -11
- package/lib/stream.js +11 -11
- package/lib/validators/index.js +37 -37
- package/package.json +16 -15
- package/types/classes/eik-config.d.ts +1 -1
- package/types/classes/file-mapping.d.ts +2 -2
- package/types/classes/invalid-config-error.d.ts +1 -1
- package/types/classes/missing-config-error.d.ts +1 -1
- package/types/classes/multiple-config-sources-error.d.ts +1 -1
- package/types/classes/no-files-matched-error.d.ts +1 -1
- package/types/classes/resolved-files.d.ts +1 -1
- package/types/classes/single-dest-multiple-source-error.d.ts +1 -1
- package/types/helpers/config-store.d.ts +1 -1
- package/types/helpers/index.d.ts +10 -10
- package/types/helpers/resolve-files.d.ts +1 -1
- package/types/index.d.ts +6 -6
- package/types/schemas/index.d.ts +3 -3
package/lib/schemas/validate.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { readFileSync } from
|
|
2
|
-
import { join, dirname } from
|
|
3
|
-
import formats from
|
|
4
|
-
import semver from
|
|
5
|
-
import npmPkg from
|
|
6
|
-
import Ajv from
|
|
7
|
-
import { fileURLToPath } from
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { join, dirname } from "node:path";
|
|
3
|
+
import formats from "ajv-formats";
|
|
4
|
+
import semver from "semver";
|
|
5
|
+
import npmPkg from "validate-npm-package-name";
|
|
6
|
+
import Ajv from "ajv";
|
|
7
|
+
import { fileURLToPath } from "node:url";
|
|
8
8
|
|
|
9
9
|
const __filename = fileURLToPath(import.meta.url);
|
|
10
10
|
const __dirname = dirname(__filename);
|
|
11
11
|
|
|
12
12
|
const eikJSONSchema = JSON.parse(
|
|
13
|
-
|
|
13
|
+
readFileSync(join(__dirname, "./eikjson.schema.json"), "utf8"),
|
|
14
14
|
);
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -32,17 +32,17 @@ const eikJSONSchema = JSON.parse(
|
|
|
32
32
|
* @returns {SchemaValidator<T>}
|
|
33
33
|
*/
|
|
34
34
|
const createValidator = (schema, ajvOptions) => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
const ajv = new Ajv(ajvOptions);
|
|
37
|
+
// @ts-ignore
|
|
38
|
+
formats(ajv); // Needed to support "uri"
|
|
39
|
+
const validate = ajv.compile(schema);
|
|
40
|
+
|
|
41
|
+
return (data) => {
|
|
42
|
+
const cloned = JSON.parse(JSON.stringify(data));
|
|
43
|
+
const valid = validate(cloned);
|
|
44
|
+
return { value: cloned, error: !valid && validate.errors };
|
|
45
|
+
};
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
/**
|
|
@@ -50,8 +50,8 @@ const createValidator = (schema, ajvOptions) => {
|
|
|
50
50
|
* @type {SchemaValidator<import('../../eikjson.js').EikjsonSchema>}
|
|
51
51
|
*/
|
|
52
52
|
const eikJSON = createValidator(eikJSONSchema, {
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
removeAdditional: true,
|
|
54
|
+
useDefaults: true,
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
/**
|
|
@@ -59,26 +59,26 @@ const eikJSON = createValidator(eikJSONSchema, {
|
|
|
59
59
|
* @returns {SchemaValidator<string>}
|
|
60
60
|
*/
|
|
61
61
|
const createNameValidator = (jsonSchemaValidator) => (value) => {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
62
|
+
const result = jsonSchemaValidator(value);
|
|
63
|
+
if (!result.error) {
|
|
64
|
+
const pkvalid = npmPkg(value);
|
|
65
|
+
/** @type {ErrorObject[]} */
|
|
66
|
+
const errors = [];
|
|
67
|
+
if (!pkvalid.validForNewPackages) {
|
|
68
|
+
errors.push({
|
|
69
|
+
keyword: "validForNewPackages",
|
|
70
|
+
instancePath: ".name",
|
|
71
|
+
dataPath: ".name", // this was here before, but maybe replaced by instancePath?
|
|
72
|
+
schemaPath: "",
|
|
73
|
+
params: [],
|
|
74
|
+
message: "should be valid package name",
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
if (errors.length) {
|
|
78
|
+
result.error = errors;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return result;
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
/**
|
|
@@ -86,26 +86,26 @@ const createNameValidator = (jsonSchemaValidator) => (value) => {
|
|
|
86
86
|
* @returns {SchemaValidator<string>}
|
|
87
87
|
*/
|
|
88
88
|
const createVersionValidator = (jsonSchemaValidator) => (value) => {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
89
|
+
const result = jsonSchemaValidator(value);
|
|
90
|
+
if (!result.error) {
|
|
91
|
+
const version = semver.valid(value);
|
|
92
|
+
/** @type {ErrorObject[]} */
|
|
93
|
+
const errors = [];
|
|
94
|
+
if (!version) {
|
|
95
|
+
errors.push({
|
|
96
|
+
keyword: "invalidSemverRange",
|
|
97
|
+
instancePath: ".version",
|
|
98
|
+
dataPath: ".version",
|
|
99
|
+
schemaPath: "",
|
|
100
|
+
params: [],
|
|
101
|
+
message: "should be valid semver range for version",
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
if (errors.length) {
|
|
105
|
+
result.error = errors;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return result;
|
|
109
109
|
};
|
|
110
110
|
|
|
111
111
|
/**
|
|
@@ -113,7 +113,7 @@ const createVersionValidator = (jsonSchemaValidator) => (value) => {
|
|
|
113
113
|
* @type {SchemaValidator<string>}
|
|
114
114
|
*/
|
|
115
115
|
const name = createNameValidator(
|
|
116
|
-
|
|
116
|
+
createValidator(eikJSONSchema.properties.name),
|
|
117
117
|
);
|
|
118
118
|
|
|
119
119
|
/**
|
|
@@ -121,7 +121,7 @@ const name = createNameValidator(
|
|
|
121
121
|
* @type {SchemaValidator<string>}
|
|
122
122
|
*/
|
|
123
123
|
const version = createVersionValidator(
|
|
124
|
-
|
|
124
|
+
createValidator(eikJSONSchema.properties.version),
|
|
125
125
|
);
|
|
126
126
|
|
|
127
127
|
/**
|
|
@@ -146,7 +146,7 @@ const files = createValidator(eikJSONSchema.properties.files);
|
|
|
146
146
|
* Checks [import-map](https://eik.dev/docs/reference/eik-json#import-map)
|
|
147
147
|
* @type {SchemaValidator<string | string[]>}
|
|
148
148
|
*/
|
|
149
|
-
const importMap = createValidator(eikJSONSchema.properties[
|
|
149
|
+
const importMap = createValidator(eikJSONSchema.properties["import-map"]);
|
|
150
150
|
|
|
151
151
|
/**
|
|
152
152
|
* Checks [out](https://eik.dev/docs/reference/eik-json#out)
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
|
|
3
3
|
class ValidationError extends Error {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
/**
|
|
5
|
+
* @param {string} message
|
|
6
|
+
* @param {Error} err
|
|
7
|
+
*/
|
|
8
|
+
constructor(message, err) {
|
|
9
|
+
let m = message;
|
|
10
|
+
if (err && err.message) m += `: ${err.message}`;
|
|
11
|
+
super(m);
|
|
12
|
+
this.name = this.constructor.name;
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
15
|
}
|
|
16
16
|
export default ValidationError;
|
package/lib/stream.js
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* @returns {boolean}
|
|
5
5
|
*/
|
|
6
6
|
export const isStream = (stream) =>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
stream !== null &&
|
|
8
|
+
typeof stream === "object" &&
|
|
9
|
+
// @ts-expect-error
|
|
10
|
+
typeof stream.pipe === "function";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Checks if the value is a {@link ReadableStream}
|
|
@@ -15,10 +15,10 @@ export const isStream = (stream) =>
|
|
|
15
15
|
* @returns {boolean}
|
|
16
16
|
*/
|
|
17
17
|
export const isReadableStream = (stream) =>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
isStream(stream) &&
|
|
19
|
+
// @ts-expect-error
|
|
20
|
+
stream.readable !== false &&
|
|
21
|
+
// @ts-expect-error
|
|
22
|
+
typeof stream._read === "function" &&
|
|
23
|
+
// @ts-expect-error
|
|
24
|
+
typeof stream._readableState === "object";
|
package/lib/validators/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import semver from
|
|
2
|
-
import npmPkg from
|
|
1
|
+
import semver from "semver";
|
|
2
|
+
import npmPkg from "validate-npm-package-name";
|
|
3
3
|
|
|
4
4
|
const urlIsh = /^https?:\/\/[a-zA-Z0-9-_./]+(:[0-9]+)?/;
|
|
5
5
|
|
|
@@ -10,10 +10,10 @@ const urlIsh = /^https?:\/\/[a-zA-Z0-9-_./]+(:[0-9]+)?/;
|
|
|
10
10
|
* @throws {Error} if the parameter does not match a URL pattern
|
|
11
11
|
*/
|
|
12
12
|
export const origin = (value) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
if (urlIsh.test(value)) {
|
|
14
|
+
return value.toLowerCase();
|
|
15
|
+
}
|
|
16
|
+
throw new Error('Parameter "origin" is not valid');
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -23,10 +23,10 @@ export const origin = (value) => {
|
|
|
23
23
|
* @throws {Error} if the value is not a valid organisation name
|
|
24
24
|
*/
|
|
25
25
|
export const org = (value) => {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
if (/^[a-zA-Z0-9_-]+$/.test(value)) {
|
|
27
|
+
return value.toLowerCase();
|
|
28
|
+
}
|
|
29
|
+
throw new Error(`Parameter "org" is not valid - Value: ${value}`);
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
/**
|
|
@@ -36,11 +36,11 @@ export const org = (value) => {
|
|
|
36
36
|
* @throws {Error} if the value is not a valid package name
|
|
37
37
|
*/
|
|
38
38
|
export const name = (value) => {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
const result = npmPkg(value);
|
|
40
|
+
if (result.validForNewPackages || result.validForOldPackages) {
|
|
41
|
+
return value.toLowerCase();
|
|
42
|
+
}
|
|
43
|
+
throw new Error(`Parameter "name" is not valid - Value: ${value}`);
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
/**
|
|
@@ -50,11 +50,11 @@ export const name = (value) => {
|
|
|
50
50
|
* @throws {Error} if the value is not a valid semver version
|
|
51
51
|
*/
|
|
52
52
|
export const version = (value) => {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
const result = semver.valid(value);
|
|
54
|
+
if (result) {
|
|
55
|
+
return result;
|
|
56
|
+
}
|
|
57
|
+
throw new Error(`Parameter "version" is not valid - Value: ${value}`);
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
/**
|
|
@@ -64,10 +64,10 @@ export const version = (value) => {
|
|
|
64
64
|
* @throws {Error} if the value is not a valid alias value
|
|
65
65
|
*/
|
|
66
66
|
export const alias = (value) => {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
if (/^[0-9]+$/.test(value)) {
|
|
68
|
+
return value;
|
|
69
|
+
}
|
|
70
|
+
throw new Error(`Parameter "alias" is not valid - Value: ${value}`);
|
|
71
71
|
};
|
|
72
72
|
|
|
73
73
|
/**
|
|
@@ -77,15 +77,15 @@ 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
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
80
|
+
if (
|
|
81
|
+
value === "pkg" ||
|
|
82
|
+
value === "map" ||
|
|
83
|
+
value === "npm" ||
|
|
84
|
+
value === "img"
|
|
85
|
+
) {
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
88
|
+
throw new Error(`Parameter "type" is not valid - Value: ${value}`);
|
|
89
89
|
};
|
|
90
90
|
|
|
91
91
|
/**
|
|
@@ -104,8 +104,8 @@ export const extra = (value) => value;
|
|
|
104
104
|
* @throws {Error} if the value is not a valid semver type
|
|
105
105
|
*/
|
|
106
106
|
export const semverType = (value) => {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
if (value === "major" || value === "minor" || value === "patch") {
|
|
108
|
+
return value;
|
|
109
|
+
}
|
|
110
|
+
throw new Error(`Parameter "semverType" is not valid - Value: ${value}`);
|
|
111
111
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eik/common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "Common utilities for Eik modules",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -37,34 +37,35 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"ajv": "8.17.1",
|
|
39
39
|
"ajv-formats": "3.0.1",
|
|
40
|
-
"glob": "11.0.
|
|
40
|
+
"glob": "11.0.1",
|
|
41
41
|
"is-glob": "4.0.3",
|
|
42
42
|
"mime-types": "2.1.35",
|
|
43
43
|
"semver": "7.6.3",
|
|
44
|
-
"validate-npm-package-name": "
|
|
44
|
+
"validate-npm-package-name": "6.0.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@babel/plugin-syntax-import-assertions": "7.
|
|
48
|
-
"@eik/eslint-config": "1.0.
|
|
47
|
+
"@babel/plugin-syntax-import-assertions": "7.26.0",
|
|
48
|
+
"@eik/eslint-config": "1.0.7",
|
|
49
|
+
"@eik/prettier-config": "1.0.1",
|
|
49
50
|
"@eik/semantic-release-config": "1.0.0",
|
|
50
51
|
"@eik/typescript-config": "1.0.0",
|
|
51
|
-
"@hapi/hapi": "21.3.
|
|
52
|
+
"@hapi/hapi": "21.3.12",
|
|
52
53
|
"@semantic-release/changelog": "6.0.3",
|
|
53
54
|
"@semantic-release/git": "10.0.1",
|
|
54
55
|
"@types/glob": "8.1.0",
|
|
55
56
|
"@types/is-glob": "4.0.4",
|
|
56
57
|
"@types/semver": "7.5.8",
|
|
57
58
|
"@types/validate-npm-package-name": "4.0.2",
|
|
58
|
-
"eslint": "9.
|
|
59
|
-
"express": "4.
|
|
60
|
-
"fastify": "
|
|
61
|
-
"json-schema-to-typescript": "15.0.
|
|
62
|
-
"npm-run-
|
|
63
|
-
"prettier": "3.
|
|
59
|
+
"eslint": "9.16.0",
|
|
60
|
+
"express": "4.21.2",
|
|
61
|
+
"fastify": "5.1.0",
|
|
62
|
+
"json-schema-to-typescript": "15.0.3",
|
|
63
|
+
"npm-run-all2": "7.0.1",
|
|
64
|
+
"prettier": "3.4.1",
|
|
64
65
|
"rimraf": "6.0.1",
|
|
65
|
-
"semantic-release": "24.
|
|
66
|
+
"semantic-release": "24.2.0",
|
|
66
67
|
"stoppable": "1.1.0",
|
|
67
|
-
"tap": "21.0.
|
|
68
|
-
"typescript": "5.
|
|
68
|
+
"tap": "21.0.1",
|
|
69
|
+
"typescript": "5.6.3"
|
|
69
70
|
}
|
|
70
71
|
}
|
|
@@ -57,7 +57,7 @@ export default class EikConfig {
|
|
|
57
57
|
[_tokens]: Map<string, string>;
|
|
58
58
|
}
|
|
59
59
|
export type EikjsonSchema = import("../../eikjson.js").EikjsonSchema;
|
|
60
|
-
import FileMapping from
|
|
60
|
+
import FileMapping from "./file-mapping.js";
|
|
61
61
|
declare const _config: unique symbol;
|
|
62
62
|
declare const _tokens: unique symbol;
|
|
63
63
|
export {};
|
|
@@ -17,5 +17,5 @@ declare class FileMapping {
|
|
|
17
17
|
*/
|
|
18
18
|
destination: RemoteFileLocation;
|
|
19
19
|
}
|
|
20
|
-
import LocalFileLocation from
|
|
21
|
-
import RemoteFileLocation from
|
|
20
|
+
import LocalFileLocation from "./local-file-location.js";
|
|
21
|
+
import RemoteFileLocation from "./remote-file-location.js";
|
|
@@ -16,5 +16,5 @@ declare class ResolvedFiles {
|
|
|
16
16
|
[Symbol.iterator](): Generator<LocalFileLocation, void, unknown>;
|
|
17
17
|
[originalFiles]: string[];
|
|
18
18
|
}
|
|
19
|
-
import LocalFileLocation from
|
|
19
|
+
import LocalFileLocation from "./local-file-location.js";
|
|
20
20
|
declare const originalFiles: unique symbol;
|
package/types/helpers/index.d.ts
CHANGED
|
@@ -11,13 +11,13 @@ declare namespace _default {
|
|
|
11
11
|
export { resolveFiles };
|
|
12
12
|
}
|
|
13
13
|
export default _default;
|
|
14
|
-
import localAssets from
|
|
15
|
-
import getDefaults from
|
|
16
|
-
import configStore from
|
|
17
|
-
import typeSlug from
|
|
18
|
-
import typeTitle from
|
|
19
|
-
import { addTrailingSlash } from
|
|
20
|
-
import { removeTrailingSlash } from
|
|
21
|
-
import { addLeadingSlash } from
|
|
22
|
-
import { removeLeadingSlash } from
|
|
23
|
-
import resolveFiles from
|
|
14
|
+
import localAssets from "./local-assets.js";
|
|
15
|
+
import getDefaults from "./get-defaults.js";
|
|
16
|
+
import configStore from "./config-store.js";
|
|
17
|
+
import typeSlug from "./type-slug.js";
|
|
18
|
+
import typeTitle from "./type-title.js";
|
|
19
|
+
import { addTrailingSlash } from "./path-slashes.js";
|
|
20
|
+
import { removeTrailingSlash } from "./path-slashes.js";
|
|
21
|
+
import { addLeadingSlash } from "./path-slashes.js";
|
|
22
|
+
import { removeLeadingSlash } from "./path-slashes.js";
|
|
23
|
+
import resolveFiles from "./resolve-files.js";
|
package/types/index.d.ts
CHANGED
|
@@ -7,10 +7,10 @@ declare namespace _default {
|
|
|
7
7
|
export { helpers };
|
|
8
8
|
}
|
|
9
9
|
export default _default;
|
|
10
|
-
import * as validators from
|
|
11
|
-
import ReadFile from
|
|
12
|
-
import EikConfig from
|
|
13
|
-
import schemas from
|
|
14
|
-
import * as stream from
|
|
15
|
-
import helpers from
|
|
10
|
+
import * as validators from "./validators/index.js";
|
|
11
|
+
import ReadFile from "./classes/read-file.js";
|
|
12
|
+
import EikConfig from "./classes/eik-config.js";
|
|
13
|
+
import schemas from "./schemas/index.js";
|
|
14
|
+
import * as stream from "./stream.js";
|
|
15
|
+
import helpers from "./helpers/index.js";
|
|
16
16
|
export { validators, ReadFile, EikConfig, schemas, stream, helpers };
|
package/types/schemas/index.d.ts
CHANGED
|
@@ -6,6 +6,6 @@ declare namespace _default {
|
|
|
6
6
|
}
|
|
7
7
|
export default _default;
|
|
8
8
|
declare const schema: any;
|
|
9
|
-
import * as validate from
|
|
10
|
-
import assert from
|
|
11
|
-
import ValidationError from
|
|
9
|
+
import * as validate from "./validate.js";
|
|
10
|
+
import assert from "./assert.js";
|
|
11
|
+
import ValidationError from "./validation-error.js";
|