yamlock 0.2.4 → 0.2.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 CHANGED
@@ -65,7 +65,8 @@ Options of note:
65
65
  - `--output <file>` writes the result to a separate file instead of overwriting the input.
66
66
  - `--paths <path1,path2>` targets only the specified fields (dot/bracket notation like `db.password` or `users[0].token`).
67
67
  - Command `keygen` produces a random key and shows how to store it (shell export or `.env`).
68
- - Commands `version` and `algorithms` print the installed CLI version and the list of supported ciphers respectively.
68
+ - Command `algorithms` prints two lists: tested presets (covered by yamlock) and additional ciphers available from the runtime.
69
+ - Command `version` prints the installed CLI version.
69
70
 
70
71
  ### Node.js API
71
72
 
package/dist/cli/cli.js CHANGED
@@ -8,7 +8,7 @@ import { randomBytes } from 'node:crypto';
8
8
  import yaml from 'js-yaml';
9
9
 
10
10
  import { processConfig } from '../utils/config.js';
11
- import { listSupportedAlgorithms } from '../crypto/utils.js';
11
+ import { listSupportedAlgorithms, TESTED_ALGORITHMS } from '../crypto/utils.js';
12
12
 
13
13
  const require = createRequire(import.meta.url);
14
14
  const packageJson = require('../../package.json');
@@ -161,8 +161,18 @@ export async function runCli(argv = process.argv) {
161
161
 
162
162
  if (command === 'algorithms') {
163
163
  const algorithms = listSupportedAlgorithms();
164
- print('Supported algorithms:');
165
- algorithms.forEach((name) => print(`- ${name}`));
164
+ const tested = TESTED_ALGORITHMS.slice().sort();
165
+ const testedSet = new Set(tested);
166
+ const additional = algorithms.filter((name) => !testedSet.has(name));
167
+
168
+ print('Tested algorithms (covered by yamlock fixtures):');
169
+ tested.forEach((name) => print(`- ${name}`));
170
+
171
+ if (additional.length > 0) {
172
+ print('\nAdditional algorithms available in this runtime:');
173
+ additional.forEach((name) => print(`- ${name}`));
174
+ print('\nUse at your own risk; these ciphers are not part of the official test matrix yet.');
175
+ }
166
176
  return exit(0);
167
177
  }
168
178
 
@@ -9,6 +9,7 @@ export const ALGORITHM_PRESETS = {
9
9
  'aes-128-cbc': { keyLength: 16, ivLength: 16, authTagLength: 0 },
10
10
  'chacha20-poly1305': { keyLength: 32, ivLength: 12, authTagLength: 16 }
11
11
  };
12
+ export const TESTED_ALGORITHMS = Object.keys(ALGORITHM_PRESETS);
12
13
 
13
14
  /**
14
15
  * Returns the sorted list of cipher algorithms supported by the current runtime.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yamlock",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "author": "PAVEL TKACHEV (phoenixweiss) <mail@phoenixweiss.me>",
5
5
  "description": "Value-level encryption for YAML/JSON configuration files with CLI + Node.js APIs.",
6
6
  "license": "MIT",