@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
- "version": "4.12.14-beta.0",
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": "ncc 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
@@ -1,5 +1,5 @@
1
1
  import { existsSync, readFileSync } from 'node:fs'
2
- import { config, exit } from 'node:process'
2
+ import { exit } from 'node:process'
3
3
  import mime from 'mime'
4
4
  import { program } from 'commander'
5
5
  import { intro, log, outro } from '@clack/prompts'
@@ -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 confirm({ message: 'Do you want to use our public key ?' })
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: ${encodedZiivSessionKey}`)
54
+ log.success(`ivSessionKey: ${encodedZip.ivSessionKey}`)
55
55
  // write decodedZip in a file
56
- writeFileSync(`${zipPath}_encrypted.zip`, encodedZiencryptedData)
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
- })