@mobb.ai/cli 1.4.50 → 1.4.51

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.
Files changed (35) hide show
  1. package/README.md +13 -208
  2. package/bin/mobbdev.js +10 -0
  3. package/lib/binary.js +52 -0
  4. package/package.json +19 -160
  5. package/.env +0 -10
  6. package/LICENSE +0 -21
  7. package/bin/cli.mjs +0 -2
  8. package/dist/args/commands/upload_ai_blame.d.mts +0 -164
  9. package/dist/args/commands/upload_ai_blame.mjs +0 -6614
  10. package/dist/hash_search/index.d.mts +0 -10
  11. package/dist/hash_search/index.mjs +0 -112
  12. package/dist/index.d.mts +0 -2
  13. package/dist/index.mjs +0 -29052
  14. package/src/features/codeium_intellij/proto/buf/validate/validate.proto +0 -504
  15. package/src/features/codeium_intellij/proto/exa/auto_cascade_common_pb/auto_cascade_common.proto +0 -81
  16. package/src/features/codeium_intellij/proto/exa/bug_checker_pb/bug_checker.proto +0 -24
  17. package/src/features/codeium_intellij/proto/exa/cascade_plugins_pb/cascade_plugins.proto +0 -108
  18. package/src/features/codeium_intellij/proto/exa/chat_client_server_pb/chat_client_server.proto +0 -56
  19. package/src/features/codeium_intellij/proto/exa/chat_pb/chat.proto +0 -457
  20. package/src/features/codeium_intellij/proto/exa/code_edit/code_edit_pb/code_edit.proto +0 -191
  21. package/src/features/codeium_intellij/proto/exa/codeium_common_pb/codeium_common.proto +0 -3783
  22. package/src/features/codeium_intellij/proto/exa/context_module_pb/context_module.proto +0 -172
  23. package/src/features/codeium_intellij/proto/exa/cortex_pb/cortex.proto +0 -3604
  24. package/src/features/codeium_intellij/proto/exa/diff_action_pb/diff_action.proto +0 -73
  25. package/src/features/codeium_intellij/proto/exa/extension_server_pb/extension_server.proto +0 -565
  26. package/src/features/codeium_intellij/proto/exa/index_pb/index.proto +0 -474
  27. package/src/features/codeium_intellij/proto/exa/knowledge_base_pb/knowledge_base.proto +0 -149
  28. package/src/features/codeium_intellij/proto/exa/language_server_pb/language_server.proto +0 -2504
  29. package/src/features/codeium_intellij/proto/exa/opensearch_clients_pb/opensearch_clients.proto +0 -505
  30. package/src/features/codeium_intellij/proto/exa/product_analytics_pb/product_analytics.proto +0 -31
  31. package/src/features/codeium_intellij/proto/exa/reactive_component_pb/reactive_component.proto +0 -104
  32. package/src/features/codeium_intellij/proto/exa/seat_management_pb/seat_management.proto +0 -2349
  33. package/src/post_install/binary.mjs +0 -89
  34. package/src/post_install/constants.mjs +0 -2
  35. package/src/post_install/cx_install.mjs +0 -72
@@ -1,89 +0,0 @@
1
- // this file is based from 'binary-install' https://www.npmjs.com/package/binary-install
2
- import AdmZip from 'adm-zip'
3
- import axios from 'axios'
4
- import { existsSync, mkdirSync } from 'fs'
5
- import { arch as _arch, type as _type } from 'os'
6
- import { join } from 'path'
7
- import * as tar from 'tar'
8
-
9
- /**
10
- * Options for showing a installParams.
11
- * @typedef {Object} InstallParams
12
- * @property {string} installParams.binaryName
13
- * @property {string} installParams.url
14
- */
15
-
16
- /**
17
- * @param {string} url
18
- * @returns {string}
19
- */
20
- function getArchiveType(url) {
21
- if (url.endsWith('.zip')) {
22
- return 'zip'
23
- }
24
- if (url.endsWith('.tar.gz')) {
25
- return 'tar'
26
- }
27
- throw Error(`Unknown archive type for ${url}`)
28
- }
29
-
30
- /**
31
- * @param {InstallParams} opts
32
- * @returns {Promise<void>}
33
- */
34
-
35
- export async function install({ binaryName, url }) {
36
- const installDirectory = join(process.cwd(), 'node_modules', '.bin')
37
- const binaryPath = join(installDirectory, binaryName)
38
- if (existsSync(binaryPath)) {
39
- console.log(`${binaryName} is already installed, skipping installation.`)
40
- return
41
- }
42
- const archiveType = getArchiveType(url)
43
- mkdirSync(installDirectory, { recursive: true })
44
- console.log(`Downloading release from ${url}`)
45
- archiveType === 'zip'
46
- ? await installZip({ binaryName, url, installDirectory })
47
- : await installTar({ binaryName, url, installDirectory })
48
-
49
- console.log(`${binaryName} has been installed!`)
50
- }
51
-
52
- /**
53
- * @typedef {object} InstallDirectory
54
- * @property {string} installDirectory
55
- * @typedef {InstallParams & InstallDirectory} ArchiveInstallParams
56
- **/
57
-
58
- /**
59
- * @param {ArchiveInstallParams} opts
60
- * @returns {Promise<void>}
61
- */
62
- async function installTar({ binaryName, url, installDirectory }) {
63
- const binaryStream = await axios({ url, responseType: 'stream' })
64
- await new Promise((resolve, reject) => {
65
- const sink = binaryStream.data.pipe(
66
- tar.x({
67
- filter(path) {
68
- return path.startsWith(binaryName)
69
- },
70
- C: installDirectory,
71
- })
72
- )
73
- sink.on('finish', () => resolve(null))
74
- sink.on('error', (/** @type {Error} */ err) => reject(err))
75
- })
76
- }
77
-
78
- /**
79
- * @param {ArchiveInstallParams} opts
80
- * @returns {Promise<void>}
81
- */
82
- async function installZip({ binaryName, url, installDirectory }) {
83
- const body = await axios.get(url, {
84
- responseType: 'arraybuffer',
85
- })
86
-
87
- var zip = new AdmZip(body.data)
88
- zip.extractEntryTo(binaryName, installDirectory)
89
- }
@@ -1,2 +0,0 @@
1
- export const cxOperatingSystemSupportMessage = `Your operating system does not support checkmarx.
2
- You can see the list of supported operating systems here: https://github.com/Checkmarx/ast-cli#releases`
@@ -1,72 +0,0 @@
1
- import { arch as _arch, type as _type } from 'os'
2
-
3
- import { install } from './binary.mjs'
4
- import { cxOperatingSystemSupportMessage } from './constants.mjs'
5
-
6
- const supportedPlatforms = [
7
- {
8
- type: 'Windows_NT',
9
- architecture: 'x64',
10
- target: 'windows_x64.zip',
11
- },
12
- {
13
- type: 'Linux',
14
- architecture: 'x64',
15
- target: 'linux_x64.tar.gz',
16
- },
17
- {
18
- type: 'Linux',
19
- architecture: 'arm',
20
- target: 'linux_arm6.tar.gz',
21
- },
22
- {
23
- type: 'Linux',
24
- architecture: 'arm64',
25
- target: 'linux_arm64.tar.gz',
26
- },
27
- {
28
- type: 'Darwin',
29
- architecture: 'arm64',
30
- target: 'darwin_x64.tar.gz',
31
- },
32
- ]
33
-
34
- async function installBinary() {
35
- const supportedPlatform = getPlatformMetadata()
36
- if (!supportedPlatform) {
37
- console.warn(cxOperatingSystemSupportMessage)
38
- console.warn(
39
- 'The checkmarx scanner is not available on your platform. The rest of Bugsy features and scanners will be available for use.'
40
- )
41
- return
42
- }
43
- const { target } = supportedPlatform
44
-
45
- const url = `https://github.com/Checkmarx/ast-cli/releases/download/2.0.55/ast-cli_${target}`
46
- const binaryName = supportedPlatform.type === 'Windows_NT' ? 'cx.exe' : 'cx'
47
-
48
- await install({ binaryName, url })
49
- }
50
-
51
- export function getPlatformMetadata() {
52
- const type = _type()
53
- const architecture = _arch()
54
-
55
- for (const supportedPlatform of supportedPlatforms) {
56
- if (
57
- type === supportedPlatform.type &&
58
- architecture === supportedPlatform.architecture
59
- ) {
60
- return supportedPlatform
61
- }
62
- }
63
-
64
- return null
65
- }
66
-
67
- installBinary().catch((err) => {
68
- console.debug(err)
69
- console.warn(
70
- "Optional Checkmarx dependency was not installed. If you don't require this functionality, you can safely ignore this message."
71
- )
72
- })