@typinghare/trick 2.0.0 → 2.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/dist/app.js CHANGED
@@ -6,12 +6,12 @@ import chalk from 'chalk';
6
6
  import { getPassphrase } from './passphrase.js';
7
7
  import { resolve_error } from './error.js';
8
8
  const program = new Command();
9
- program.version('2.0.0');
9
+ program.version('2.0.1');
10
10
  program.description('Save credential files to remote safely and easily.');
11
11
  program
12
12
  .command('add')
13
13
  .description('Add files to a target.')
14
- .argument('<name>', 'The name of the target')
14
+ .argument('<target>', 'The name of the target')
15
15
  .argument('[files...]', 'Files that are encrypted')
16
16
  .action(async (targetName, files) => {
17
17
  await updateConfig((config) => {
@@ -29,7 +29,7 @@ program
29
29
  program
30
30
  .command('remove')
31
31
  .description('Remove files from a target.')
32
- .argument('<name>', 'The name of the target')
32
+ .argument('<target>', 'The name of the target')
33
33
  .argument('[files...]', 'Files to remove')
34
34
  .option('-t, --target', 'Remove the target instead.')
35
35
  .action(async (targetName, files, options) => {
package/dist/config.js CHANGED
@@ -13,7 +13,7 @@ const DEFAULT_CONFIG = {
13
13
  root_directory: '.trick',
14
14
  passphrase_file_path: '~/.config/trick_passphrase.json',
15
15
  encryption: {
16
- iteration_count: 0,
16
+ iteration_count: 100_000,
17
17
  },
18
18
  };
19
19
  /**
package/dist/encrypt.js CHANGED
@@ -30,7 +30,7 @@ export async function encryptFile(srcFilePath, destFilePath, passphrase, iterati
30
30
  '-salt',
31
31
  '-pbkdf2',
32
32
  '-iter',
33
- iteration_count,
33
+ Number(iteration_count),
34
34
  '-in',
35
35
  srcFilePath,
36
36
  '-out',
@@ -81,7 +81,7 @@ export async function decryptFile(srcFilePath, destFilePath, passphrase, iterati
81
81
  '-salt',
82
82
  '-pbkdf2',
83
83
  '-iter',
84
- iteration_count,
84
+ Number(iteration_count),
85
85
  '-in',
86
86
  destFilePath,
87
87
  '-out',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@typinghare/trick",
3
3
  "description": "Save credential files to remote safely and easily.",
4
- "version": "2.0.0",
4
+ "version": "2.0.1",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "type": "module",
package/src/app.ts CHANGED
@@ -7,13 +7,13 @@ import { getPassphrase } from './passphrase.js'
7
7
  import { resolve_error } from './error.js'
8
8
 
9
9
  const program = new Command()
10
- program.version('2.0.0')
10
+ program.version('2.0.1')
11
11
  program.description('Save credential files to remote safely and easily.')
12
12
 
13
13
  program
14
14
  .command('add')
15
15
  .description('Add files to a target.')
16
- .argument('<name>', 'The name of the target')
16
+ .argument('<target>', 'The name of the target')
17
17
  .argument('[files...]', 'Files that are encrypted')
18
18
  .action(async (targetName: string, files: string[]): Promise<void> => {
19
19
  await updateConfig((config) => {
@@ -32,7 +32,7 @@ program
32
32
  program
33
33
  .command('remove')
34
34
  .description('Remove files from a target.')
35
- .argument('<name>', 'The name of the target')
35
+ .argument('<target>', 'The name of the target')
36
36
  .argument('[files...]', 'Files to remove')
37
37
  .option('-t, --target', 'Remove the target instead.')
38
38
  .action(