@capgo/cli 4.12.14-beta.0 → 4.13.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/CHANGELOG.md +36 -0
- package/build.mjs +3 -5
- package/dist/index.js +183 -80551
- package/package.json +2 -2
- package/src/app/add.ts +1 -1
- package/src/bundle/encrypt.ts +4 -4
- package/vercel-ncc.js +0 -18
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/cli",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.13.2",
|
|
4
4
|
"description": "A CLI to upload to capgo servers",
|
|
5
5
|
"author": "github.com/riderx",
|
|
6
6
|
"license": "Apache 2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"node": ">=18.0.0"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
|
-
"build": "
|
|
35
|
+
"build": "node build.mjs",
|
|
36
36
|
"dev": "NODE_ENV=development ncc build",
|
|
37
37
|
"no-debug": "node dist/index.js",
|
|
38
38
|
"test": "npx --yes ts-node -T src/index.ts",
|
package/src/app/add.ts
CHANGED
package/src/bundle/encrypt.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { existsSync, readFileSync, writeFileSync } from 'node:fs'
|
|
|
2
2
|
import { exit } from 'node:process'
|
|
3
3
|
import { program } from 'commander'
|
|
4
4
|
import ciDetect from 'ci-info'
|
|
5
|
-
import { intro, log, outro } from '@clack/prompts'
|
|
5
|
+
import { confirm as confirmC, intro, log, outro } from '@clack/prompts'
|
|
6
6
|
import { checkLatest } from '../api/update'
|
|
7
7
|
import { encryptSource } from '../api/crypto'
|
|
8
8
|
import { baseKeyPub, getLocalConfig } from '../utils'
|
|
@@ -36,7 +36,7 @@ export async function encryptZip(zipPath: string, options: Options) {
|
|
|
36
36
|
log.error(`Error: Missing public key`)
|
|
37
37
|
program.error('')
|
|
38
38
|
}
|
|
39
|
-
const res = await
|
|
39
|
+
const res = await confirmC({ message: 'Do you want to use our public key ?' })
|
|
40
40
|
if (!res) {
|
|
41
41
|
log.error(`Error: Missing public key`)
|
|
42
42
|
program.error('')
|
|
@@ -51,9 +51,9 @@ export async function encryptZip(zipPath: string, options: Options) {
|
|
|
51
51
|
|
|
52
52
|
const zipFile = readFileSync(zipPath)
|
|
53
53
|
const encodedZip = encryptSource(zipFile, publicKey)
|
|
54
|
-
log.success(`ivSessionKey: ${
|
|
54
|
+
log.success(`ivSessionKey: ${encodedZip.ivSessionKey}`)
|
|
55
55
|
// write decodedZip in a file
|
|
56
|
-
writeFileSync(`${zipPath}_encrypted.zip`,
|
|
56
|
+
writeFileSync(`${zipPath}_encrypted.zip`, encodedZip.encryptedData)
|
|
57
57
|
log.success(`Encrypted zip saved at ${zipPath}_encrypted.zip`)
|
|
58
58
|
outro(`Done ✅`)
|
|
59
59
|
exit()
|
package/vercel-ncc.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
require('@vercel/ncc')('/src/index.ts', {
|
|
2
|
-
cache: false,
|
|
3
|
-
externals: ["externalpackage"],
|
|
4
|
-
filterAssetBase: process.cwd(),
|
|
5
|
-
minify: false,
|
|
6
|
-
sourceMap: false,
|
|
7
|
-
assetBuilds: false,
|
|
8
|
-
sourceMapRegister: true,
|
|
9
|
-
watch: false,
|
|
10
|
-
license: '',
|
|
11
|
-
target: 'es2015',
|
|
12
|
-
v8cache: false,
|
|
13
|
-
quiet: false,
|
|
14
|
-
debugLog: false
|
|
15
|
-
}).then(({ code }) => {
|
|
16
|
-
console.log(code);
|
|
17
|
-
|
|
18
|
-
})
|