load-populate-files 0.1.1 → 0.1.2
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/README.md
CHANGED
|
@@ -25,8 +25,6 @@ Load and dynamically populate file content based on a single files config.
|
|
|
25
25
|
|
|
26
26
|
Instead of calling `populateFiles()` directly, we can can export the file configs, and defer the execution of file writing to `loadAndPopulateFiles()`.
|
|
27
27
|
|
|
28
|
-
This is useful for CLI scripts, or NX plugins like [nx-populate-files](https://www.npmjs.com/package/nx-populate-files).
|
|
29
|
-
|
|
30
28
|
## Installation
|
|
31
29
|
|
|
32
30
|
`npm i load-populate-files`
|
|
@@ -111,7 +109,3 @@ Used internally to interpret `cwd` option.
|
|
|
111
109
|
### [populate-files](https://www.npmjs.com/package/populate-files)
|
|
112
110
|
|
|
113
111
|
Populate and format a file based on dynamic content.
|
|
114
|
-
|
|
115
|
-
### [nx-populate-files](https://www.npmjs.com/package/nx-populate-files)
|
|
116
|
-
|
|
117
|
-
Load and populate files as an nx target.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const isPopulateFileParams: AjvDefault.ValidateFunction<(Partial<{
|
|
1
|
+
export declare const isPopulateFileParams: import("ajv/dist/2020.js").ValidateFunction<(Partial<{
|
|
3
2
|
filePath: string;
|
|
4
3
|
content: import("populate-files").FileContent | Promise<import("populate-files").FileContent>;
|
|
5
4
|
}> & Required<Pick<{
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { defaultImport } from 'default-import';
|
|
1
|
+
import { Ajv2020 } from 'ajv/dist/2020.js';
|
|
3
2
|
import { arraySchema, mergeSchema, objectSchema, stringSchema } from 'juniper';
|
|
4
|
-
const Ajv = defaultImport(AjvDefault);
|
|
5
3
|
const populateFileParam = objectSchema({
|
|
6
4
|
properties: {
|
|
7
5
|
filePath: stringSchema(),
|
|
@@ -18,7 +16,7 @@ const populateFileParams = mergeSchema().oneOf([
|
|
|
18
16
|
items: populateFileParam
|
|
19
17
|
})
|
|
20
18
|
]);
|
|
21
|
-
export const isPopulateFileParams = new
|
|
19
|
+
export const isPopulateFileParams = new Ajv2020({
|
|
22
20
|
strict: true
|
|
23
21
|
}).compile(populateFileParams.toJSON());
|
|
24
22
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "load-populate-files",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Load and dynamically populate file content",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"author": "JacobLey",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"repository": "JacobLey/leyman",
|
|
12
|
-
"homepage": "https://github.com/JacobLey/leyman/tree/main/apps/populate-files/load-populate-files
|
|
12
|
+
"homepage": "https://github.com/JacobLey/leyman/tree/main/apps/populate-files/load-populate-files#readme",
|
|
13
13
|
"bugs": {
|
|
14
14
|
"url": "https://github.com/JacobLey/leyman/issues"
|
|
15
15
|
},
|
|
@@ -30,32 +30,32 @@
|
|
|
30
30
|
"ajv": "^8.17.1",
|
|
31
31
|
"ci-info": "^4.1.0",
|
|
32
32
|
"yargs": "^17.7.2",
|
|
33
|
-
"
|
|
34
|
-
"haywire
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
33
|
+
"entry-script": "^3.0.9",
|
|
34
|
+
"haywire": "^0.1.8",
|
|
35
|
+
"default-import": "^2.0.8",
|
|
36
|
+
"juniper": "^1.2.5",
|
|
37
|
+
"parse-cwd": "^1.1.2",
|
|
38
|
+
"haywire-launcher": "^0.1.11",
|
|
39
|
+
"populate-files": "^0.2.4"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@biomejs/biome": "^1.9.4",
|
|
43
|
-
"@swc/cli": "^0.
|
|
44
|
-
"@swc/core": "^1.10.
|
|
43
|
+
"@swc/cli": "^0.6.0",
|
|
44
|
+
"@swc/core": "^1.10.15",
|
|
45
45
|
"@types/chai": "^5.0.1",
|
|
46
46
|
"@types/chai-as-promised": "^8.0.1",
|
|
47
47
|
"@types/mocha": "^10.0.10",
|
|
48
|
-
"@types/node": "^22.
|
|
48
|
+
"@types/node": "^22.13.1",
|
|
49
49
|
"@types/yargs": "^17.0.33",
|
|
50
50
|
"c8": "^10.1.3",
|
|
51
51
|
"chai": "^5.1.2",
|
|
52
52
|
"chai-as-promised": "^8.0.1",
|
|
53
|
-
"eslint": "^9.
|
|
54
|
-
"mocha": "^11.0
|
|
55
|
-
"typescript": "^5.7.
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"nx-update-ts-references": "^0.2.
|
|
59
|
-
"pnpm-dedicated-lockfile": "^0.0.
|
|
53
|
+
"eslint": "^9.20.0",
|
|
54
|
+
"mocha": "^11.1.0",
|
|
55
|
+
"typescript": "^5.7.3",
|
|
56
|
+
"mocha-chain": "^0.0.11",
|
|
57
|
+
"@leyman/eslint-config": "^0.0.1",
|
|
58
|
+
"nx-update-ts-references": "^0.2.1",
|
|
59
|
+
"pnpm-dedicated-lockfile": "^0.0.4"
|
|
60
60
|
}
|
|
61
61
|
}
|