load-populate-files 1.1.4 → 1.1.5
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 +14 -13
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<div style="text-align:center">
|
|
2
2
|
|
|
3
3
|
# load-populate-files
|
|
4
|
+
|
|
4
5
|
Load and dynamically populate file content based on a single file's config.
|
|
5
6
|
|
|
6
7
|
[](https://www.npmjs.com/package/load-populate-files)
|
|
@@ -71,10 +72,10 @@ Loads the config exported at `params.filePath` and passes it to [`populateFiles(
|
|
|
71
72
|
|
|
72
73
|
**Parameters**
|
|
73
74
|
|
|
74
|
-
| Parameter
|
|
75
|
-
|
|
76
|
-
| `params.filePath` | `string` | —
|
|
77
|
-
| `options`
|
|
75
|
+
| Parameter | Type | Default | Description |
|
|
76
|
+
| ----------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------ |
|
|
77
|
+
| `params.filePath` | `string` | — | Required. Path to the config module, resolved from `options.cwd`. When using the CLI, pass as `--file-path`. |
|
|
78
|
+
| `options` | `object` | `{}` | Optional. See [options](#options) below. |
|
|
78
79
|
|
|
79
80
|
**Returns** `Promise<PopulationResponse[]>`, from `populateFiles()`.
|
|
80
81
|
|
|
@@ -84,15 +85,15 @@ Loads the config exported at `params.filePath` and passes it to [`populateFiles(
|
|
|
84
85
|
|
|
85
86
|
Options are passed through to the underlying `populateFiles()` call. They are also available as CLI flags.
|
|
86
87
|
|
|
87
|
-
| Property
|
|
88
|
-
|
|
89
|
-
| `check`
|
|
90
|
-
| `dryRun`
|
|
91
|
-
| `cwd`
|
|
92
|
-
| `targetDir` | `--target-dir`, `-t`
|
|
93
|
-
| `clean`
|
|
94
|
-
| `force`
|
|
95
|
-
| `manifest`
|
|
88
|
+
| Property | CLI flag | Type | Default | Description |
|
|
89
|
+
| ----------- | -------------------------------------------- | --------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
90
|
+
| `check` | `--ci`, `--check` (`--no-ci` to write in CI) | `boolean` | `true` in CI, else `false` | If `true`, fails if writing a file would change its content. Useful for verifying version-controlled files are up to date before deployment. |
|
|
91
|
+
| `dryRun` | `--dry-run` | `boolean` | `false` | If `true`, does not write any files regardless of changes. Can still fail if `check` is `true`. |
|
|
92
|
+
| `cwd` | `--cwd` | `string \| URL` | `process.cwd()` | Used as the current working directory for `filePath` and the `targetDir` and `manifest` paths. Must be an existing directory. |
|
|
93
|
+
| `targetDir` | `--target-dir`, `-t` | `string` | `'.'` | Target directory for resolving output file paths. Resolved relative to `cwd`. |
|
|
94
|
+
| `clean` | `--clean` | `boolean` | `false` | If `true`, removes files in `targetDir` that were not generated (with `manifest`, only files it lists). In `--ci` mode, fails instead of removing. |
|
|
95
|
+
| `force` | `--force` | `boolean` | `false` | Applies to `signed` files and the `manifest`. If `true`, overwrites files that were edited, are not signed or not listed, or are malformed. See [`populate-files`](https://www.npmjs.com/package/populate-files#signed-files). |
|
|
96
|
+
| `manifest` | `--manifest` | `string` | — | Path of a manifest (relative to `cwd`) recording the generated files, to detect edits to any file type and `clean` only files it lists. See [`populate-files`](https://www.npmjs.com/package/populate-files#manifest). |
|
|
96
97
|
|
|
97
98
|
## Types
|
|
98
99
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "load-populate-files",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"description": "Load and dynamically populate file content based on a single file's config.",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=24"
|
|
@@ -38,17 +38,17 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"ci-info": "^4.4.0",
|
|
41
|
-
"default-import": "^3.0
|
|
42
|
-
"entry-script": "^4.
|
|
43
|
-
"juniper": "^2.
|
|
44
|
-
"juniper-validator": "^0.
|
|
45
|
-
"parse-cwd": "^2.0
|
|
46
|
-
"populate-files": "^1.2.
|
|
47
|
-
"unknown-error": "^0.
|
|
41
|
+
"default-import": "^3.1.0",
|
|
42
|
+
"entry-script": "^4.2.0",
|
|
43
|
+
"juniper": "^2.7.0",
|
|
44
|
+
"juniper-validator": "^0.6.0",
|
|
45
|
+
"parse-cwd": "^2.1.0",
|
|
46
|
+
"populate-files": "^1.2.1",
|
|
47
|
+
"unknown-error": "^0.2.0",
|
|
48
48
|
"yargs": "^18.2.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@biomejs/biome": "^2.6.
|
|
51
|
+
"@biomejs/biome": "^2.6.4",
|
|
52
52
|
"@leyman/eslint-config": "^0.0.1",
|
|
53
53
|
"@leyman/expect": "^0.0.1",
|
|
54
54
|
"@swc/cli": "^0.8.1",
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
60
60
|
"c8": "^12.0.0",
|
|
61
61
|
"eslint": "^10.13.0",
|
|
62
|
-
"generated-signature": "^0.
|
|
62
|
+
"generated-signature": "^0.2.0",
|
|
63
63
|
"mocha": "^12.0.3",
|
|
64
|
-
"mocha-chain": "^1.0
|
|
64
|
+
"mocha-chain": "^1.1.0",
|
|
65
65
|
"tmp-promise": "^3.0.3",
|
|
66
66
|
"typescript": "npm:@typescript/typescript6@^6.0.2"
|
|
67
67
|
},
|