@typinghare/trick 1.0.4 → 1.0.6

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,7 +6,7 @@ import { TRICK_ENCRYPTED_DIR } from './constant.js';
6
6
  import fsExtra from 'fs-extra';
7
7
  import chalk from 'chalk';
8
8
  const program = new Command();
9
- program.version('Trick v1.0.3 \nby James Chen (jameschan312.cn@gmail.com)');
9
+ program.version('Trick v1.0.6');
10
10
  program.description('Save credential files to remote safely.');
11
11
  program
12
12
  .command('add')
package/dist/encrypt.js CHANGED
@@ -36,7 +36,7 @@ export async function encryptFile(srcFilePath, destFilePath, secret, iteration_c
36
36
  '-out',
37
37
  destFilePath,
38
38
  '-pass',
39
- `pass:${secret}`,
39
+ `'pass:${secret}'`,
40
40
  ].join(' ');
41
41
  await fsExtra.ensureDir(path.dirname(destFilePath));
42
42
  try {
@@ -69,7 +69,7 @@ export async function decryptFile(srcFilePath, destFilePath, secret, iteration_c
69
69
  '-out',
70
70
  srcFilePath,
71
71
  '-pass',
72
- `pass:${secret}`,
72
+ `'pass:${secret}'`,
73
73
  ].join(' ');
74
74
  await fsExtra.ensureDir(path.dirname(srcFilePath));
75
75
  try {
package/package.json CHANGED
@@ -1,13 +1,17 @@
1
1
  {
2
2
  "name": "@typinghare/trick",
3
3
  "description": "Save credential files to remote safely.",
4
- "version": "1.0.4",
4
+ "version": "1.0.6",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "type": "module",
8
8
  "bin": {
9
9
  "trick": "bin/trick"
10
10
  },
11
+ "scripts": {
12
+ "build": "tsc",
13
+ "publish": "rm -rf dist && tsc && pnpm publish --access public"
14
+ },
11
15
  "author": {
12
16
  "name": "James Chen",
13
17
  "email": "jameschan312.cn@gmail.com"
@@ -23,8 +27,5 @@
23
27
  "devDependencies": {
24
28
  "@types/fs-extra": "^11.0.4",
25
29
  "prettier": "^3.3.3"
26
- },
27
- "scripts": {
28
- "build": "tsc"
29
30
  }
30
- }
31
+ }
package/src/app.ts CHANGED
@@ -20,7 +20,7 @@ import chalk from 'chalk'
20
20
 
21
21
  const program = new Command()
22
22
 
23
- program.version('Trick v1.0.3 \nby James Chen (jameschan312.cn@gmail.com)')
23
+ program.version('Trick v1.0.6')
24
24
  program.description('Save credential files to remote safely.')
25
25
 
26
26
  program
package/src/encrypt.ts CHANGED
@@ -43,7 +43,7 @@ export async function encryptFile(
43
43
  '-out',
44
44
  destFilePath,
45
45
  '-pass',
46
- `pass:${secret}`,
46
+ `'pass:${secret}'`,
47
47
  ].join(' ')
48
48
 
49
49
  await fsExtra.ensureDir(path.dirname(destFilePath))
@@ -93,7 +93,7 @@ export async function decryptFile(
93
93
  '-out',
94
94
  srcFilePath,
95
95
  '-pass',
96
- `pass:${secret}`,
96
+ `'pass:${secret}'`,
97
97
  ].join(' ')
98
98
 
99
99
  await fsExtra.ensureDir(path.dirname(srcFilePath))
package/trick.config.json CHANGED
@@ -2,12 +2,19 @@
2
2
  "iteration_count": 114514,
3
3
  "targets": [
4
4
  {
5
- "secret_name": "ROBLOX_PROJECT_TRICK_SECRET",
5
+ "secret_name": "TRICK_SECRET_NAME",
6
6
  "files": [
7
7
  "test/resources/really.json",
8
8
  "test/resources/task.yml"
9
9
  ]
10
+ },
11
+ {
12
+ "secret_name": "SUPERVISOR_SERVER_TRICK_SECRET_NAME",
13
+ "files": [
14
+ "test/main/resources/database.properties",
15
+ "test/main/resources/password.properties"
16
+ ]
10
17
  }
11
18
  ],
12
- "default_secret_name": "ROBLOX_PROJECT_TRICK_SECRET"
19
+ "default_secret_name": "SUPERVISOR_SERVER_TRICK_SECRET_NAME"
13
20
  }
@@ -1 +0,0 @@
1
- Salted__�;��a��S�K�9ℑ���2�����4�'Q���\0]�G~G01�߯G���
@@ -1 +0,0 @@
1
- Salted__�)�"�K 7�bk��aQ��ܰ^�B9��������.3.�g�!g�$�XjM�q�~q�c76C�i����0�S