From fc19697fad944a52447f51fb44ada9c4a5cc598c Mon Sep 17 00:00:00 2001 From: Sarah Fortune Date: Sun, 7 Sep 2025 16:31:06 -0700 Subject: [PATCH] Support node modules that include binaries in cline-core (#6046) * Fix check for debug build in package-standalone script * Support node modules that include binaries Add support to the scripts/package-standalone.js for node modules that use platform-specific binary modules. By default the script bundles the module for all platforms, this can be disabled with -s for single platform builds. The module for each platform will be bundled into standalone.zip in platform specific directories: ``` binaries/linux-arm64/node_modules binaries/darwin-x64/node_modules binaries/win32-x64/node_modules binaries/darwin-arm64/node_modules binaries/linux-x64/node_modules ``` When running cline-core add the correct directory to the NODE_PATH, e.g. ``` $ export NODE_PATH=./node_modules/:./binaries/darwin-arm64/node_modules/ cline:/tmp/1$ node cline-core.js Loading stubs... Finished loading stubs Loading stub impls... Finished loading stub impls... Cline environment: production XS variant configuration warnings: [ 'Component overrides for unused components: TOOL_USE_SECTION, TOOLS_SECTION, MCP_SECTION, TODO_SECTION, FEEDBACK_SECTION', 'Missing recommended components: TOOL_USE_SECTION' ] [2025-09-05T19:53:00.853] #bot.cline.server.ts Running standalone cline 0.0.1 [2025-09-05T19:53:00.854] #bot.cline.server.ts Using settings dir: /Users/sjf/.cline/data Finished loading vscode context... [2025-09-05T19:53:00.858] #bot.cline.server.ts Starting cline-core service... sjfsjf created DBBBBBBBBB: Database { name: '/tmp/db.sql', open: true, inTransaction: false, readonly: false, memory: false } ``` * Apply suggestion from @ellipsis-dev[bot] Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * Apply suggestion from @ellipsis-dev[bot] Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * Support node modules that include binaries Add support to the scripts/package-standalone.js for node modules that use platform-specific binary modules. By default the script bundles the module for all platforms, this can be disabled with -s for single platform builds. The module for each platform will be bundled into standalone.zip in platform specific directories: ``` binaries/linux-arm64/node_modules binaries/darwin-x64/node_modules binaries/win32-x64/node_modules binaries/darwin-arm64/node_modules binaries/linux-x64/node_modules ``` When running cline-core add the correct directory to the NODE_PATH, e.g. ``` $ export NODE_PATH=./node_modules/:./binaries/darwin-arm64/node_modules/ cline:/tmp/1$ node cline-core.js Loading stubs... Finished loading stubs Loading stub impls... Finished loading stub impls... Cline environment: production XS variant configuration warnings: [ 'Component overrides for unused components: TOOL_USE_SECTION, TOOLS_SECTION, MCP_SECTION, TODO_SECTION, FEEDBACK_SECTION', 'Missing recommended components: TOOL_USE_SECTION' ] [2025-09-05T19:53:00.853] #bot.cline.server.ts Running standalone cline 0.0.1 [2025-09-05T19:53:00.854] #bot.cline.server.ts Using settings dir: /Users/sjf/.cline/data Finished loading vscode context... [2025-09-05T19:53:00.858] #bot.cline.server.ts Starting cline-core service... sjfsjf created DBBBBBBBBB: Database { name: '/tmp/db.sql', open: true, inTransaction: false, readonly: false, memory: false } ``` * Apply suggestion from @ellipsis-dev[bot] Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * Apply suggestion from @ellipsis-dev[bot] Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * Apply suggestion from @ellipsis-dev[bot] Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * Remove test code * Use the correct target directory for the binaries The directory structure that the JB host expects is does not exactly match ${arch}-${os} * Update package-standalone script Warn if there is module that needs binaries, but it is not being used. Reset the binaries dir before packaging. --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> --- esbuild.mjs | 4 +- package-lock.json | 48 +-- package.json | 6 +- scripts/package-standalone.mjs | 98 ++++- src/standalone/vscode-context.ts | 3 +- standalone/runtime-files/package-lock.json | 460 ++++++++++++++++++++- standalone/runtime-files/package.json | 1 + 7 files changed, 565 insertions(+), 55 deletions(-) diff --git a/esbuild.mjs b/esbuild.mjs index c194623341..06d5887b5e 100644 --- a/esbuild.mjs +++ b/esbuild.mjs @@ -160,9 +160,9 @@ const standaloneConfig = { ...baseConfig, entryPoints: ["src/standalone/cline-core.ts"], outfile: `${destDir}/cline-core.js`, - // These gRPC protos need to load files from the module directory at runtime, + // These modules need to load files from the module directory at runtime, // so they cannot be bundled. - external: ["vscode", "@grpc/reflection", "grpc-health-check"], + external: ["vscode", "@grpc/reflection", "grpc-health-check", "better-sqlite3"], } // E2E build script configuration diff --git a/package-lock.json b/package-lock.json index 2ef0683fe9..ba43cd9b54 100644 --- a/package-lock.json +++ b/package-lock.json @@ -86,6 +86,7 @@ "@biomejs/biome": "^2.1.4", "@bufbuild/buf": "^1.54.0", "@changesets/cli": "^2.27.12", + "@types/better-sqlite3": "^7.6.13", "@types/chai": "^5.0.1", "@types/clone-deep": "^4.0.4", "@types/diff": "^5.2.1", @@ -109,6 +110,7 @@ "lint-staged": "^16.1.0", "minimatch": "^3.0.3", "npm-run-all": "^4.1.5", + "prebuild-install": "^7.1.3", "protoc-gen-ts": "^0.8.7", "proxyquire": "^2.1.3", "rimraf": "^6.0.1", @@ -5090,6 +5092,16 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/better-sqlite3": { + "version": "7.6.13", + "resolved": "https://registry.npmjs.org/@types/better-sqlite3/-/better-sqlite3-7.6.13.tgz", + "integrity": "sha512-NMv9ASNARoKksWtsq/SHakpYAYnhBrQgGD8zkLYk/jaK8jUGn08CfEdTRgYhMypUQAfzSP8W6gNLe0q19/t4VA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/chai": { "version": "5.0.1", "dev": true, @@ -7113,7 +7125,6 @@ "version": "6.0.0", "dev": true, "license": "MIT", - "optional": true, "dependencies": { "mimic-response": "^3.1.0" }, @@ -7128,7 +7139,6 @@ "version": "3.1.0", "dev": true, "license": "MIT", - "optional": true, "engines": { "node": ">=10" }, @@ -7151,7 +7161,6 @@ "version": "0.6.0", "dev": true, "license": "MIT", - "optional": true, "engines": { "node": ">=4.0.0" } @@ -8105,7 +8114,6 @@ "version": "2.0.3", "dev": true, "license": "(MIT OR WTFPL)", - "optional": true, "engines": { "node": ">=6" } @@ -8963,8 +8971,7 @@ "node_modules/github-from-package": { "version": "0.0.0", "dev": true, - "license": "MIT", - "optional": true + "license": "MIT" }, "node_modules/glob": { "version": "10.4.3", @@ -9394,8 +9401,7 @@ "node_modules/ini": { "version": "1.3.8", "dev": true, - "license": "ISC", - "optional": true + "license": "ISC" }, "node_modules/internal-slot": { "version": "1.1.0", @@ -10975,8 +10981,7 @@ "node_modules/mkdirp-classic": { "version": "0.5.3", "dev": true, - "license": "MIT", - "optional": true + "license": "MIT" }, "node_modules/mocha": { "version": "10.6.0", @@ -11204,8 +11209,7 @@ "node_modules/napi-build-utils": { "version": "2.0.0", "dev": true, - "license": "MIT", - "optional": true + "license": "MIT" }, "node_modules/negotiator": { "version": "1.0.0", @@ -11269,7 +11273,6 @@ "version": "3.75.0", "dev": true, "license": "MIT", - "optional": true, "dependencies": { "semver": "^7.3.5" }, @@ -12411,9 +12414,10 @@ }, "node_modules/prebuild-install": { "version": "7.1.3", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz", + "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==", "dev": true, "license": "MIT", - "optional": true, "dependencies": { "detect-libc": "^2.0.0", "expand-template": "^2.0.3", @@ -12439,7 +12443,6 @@ "version": "4.1.0", "dev": true, "license": "MIT", - "optional": true, "dependencies": { "buffer": "^5.5.0", "inherits": "^2.0.4", @@ -12464,7 +12467,6 @@ } ], "license": "MIT", - "optional": true, "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" @@ -12473,14 +12475,12 @@ "node_modules/prebuild-install/node_modules/chownr": { "version": "1.1.4", "dev": true, - "license": "ISC", - "optional": true + "license": "ISC" }, "node_modules/prebuild-install/node_modules/detect-libc": { "version": "2.0.4", "dev": true, "license": "Apache-2.0", - "optional": true, "engines": { "node": ">=8" } @@ -12489,7 +12489,6 @@ "version": "3.6.2", "dev": true, "license": "MIT", - "optional": true, "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -12503,7 +12502,6 @@ "version": "2.1.3", "dev": true, "license": "MIT", - "optional": true, "dependencies": { "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", @@ -12515,7 +12513,6 @@ "version": "2.2.0", "dev": true, "license": "MIT", - "optional": true, "dependencies": { "bl": "^4.0.3", "end-of-stream": "^1.4.1", @@ -12745,7 +12742,6 @@ "version": "1.2.8", "dev": true, "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", - "optional": true, "dependencies": { "deep-extend": "^0.6.0", "ini": "~1.3.0", @@ -12771,7 +12767,6 @@ "version": "2.0.1", "dev": true, "license": "MIT", - "optional": true, "engines": { "node": ">=0.10.0" } @@ -13652,8 +13647,7 @@ "url": "https://feross.org/support" } ], - "license": "MIT", - "optional": true + "license": "MIT" }, "node_modules/simple-get": { "version": "4.0.1", @@ -13673,7 +13667,6 @@ } ], "license": "MIT", - "optional": true, "dependencies": { "decompress-response": "^6.0.0", "once": "^1.3.1", @@ -14567,7 +14560,6 @@ "version": "0.6.0", "dev": true, "license": "Apache-2.0", - "optional": true, "dependencies": { "safe-buffer": "^5.0.1" }, diff --git a/package.json b/package.json index 0689ec3017..97ad19ae73 100644 --- a/package.json +++ b/package.json @@ -382,6 +382,7 @@ "@biomejs/biome": "^2.1.4", "@bufbuild/buf": "^1.54.0", "@changesets/cli": "^2.27.12", + "@types/better-sqlite3": "^7.6.13", "@types/chai": "^5.0.1", "@types/clone-deep": "^4.0.4", "@types/diff": "^5.2.1", @@ -405,6 +406,7 @@ "lint-staged": "^16.1.0", "minimatch": "^3.0.3", "npm-run-all": "^4.1.5", + "prebuild-install": "^7.1.3", "protoc-gen-ts": "^0.8.7", "proxyquire": "^2.1.3", "rimraf": "^6.0.1", @@ -420,8 +422,6 @@ "@anthropic-ai/vertex-sdk": "^0.6.4", "@aws-sdk/client-bedrock-runtime": "^3.840.0", "@aws-sdk/credential-providers": "^3.840.0", - "@sap-ai-sdk/ai-api": "^1.17.0", - "@sap-ai-sdk/orchestration": "^1.17.0", "@bufbuild/protobuf": "^2.2.5", "@cerebras/cerebras_cloud_sdk": "^1.35.0", "@google-cloud/vertexai": "^1.9.3", @@ -437,6 +437,8 @@ "@opentelemetry/sdk-trace-node": "^1.30.1", "@opentelemetry/semantic-conventions": "^1.30.0", "@playwright/test": "^1.53.2", + "@sap-ai-sdk/ai-api": "^1.17.0", + "@sap-ai-sdk/orchestration": "^1.17.0", "@sentry/browser": "^9.12.0", "@streamparser/json": "^0.0.22", "@types/uuid": "^10.0.0", diff --git a/scripts/package-standalone.mjs b/scripts/package-standalone.mjs index 0e88a5a9ee..20873ad460 100755 --- a/scripts/package-standalone.mjs +++ b/scripts/package-standalone.mjs @@ -6,41 +6,102 @@ import fs from "fs" import { cp } from "fs/promises" import { glob } from "glob" import minimatch from "minimatch" +import os from "os" import path from "path" +import { rmrf } from "./file-utils.mjs" const BUILD_DIR = "dist-standalone" +const BINARIES_DIR = `${BUILD_DIR}/binaries` const RUNTIME_DEPS_DIR = "standalone/runtime-files" const IS_DEBUG_BUILD = process.env.IS_DEBUG_BUILD === "true" +// This should match the node version packaged with the JetBrains plugin. +const TARGET_NODE_VERSION = "22.15.0" +const TARGET_PLATFORMS = [ + { platform: "win32", arch: "x64", targetDir: "win-x64" }, + { platform: "darwin", arch: "x64", targetDir: "darwin-x64" }, + { platform: "darwin", arch: "arm64", targetDir: "darwin-arm64" }, + { platform: "linux", arch: "x64", targetDir: "linux-x64" }, +] +const SUPPORTED_BINARY_MODULES = ["better-sqlite3"] + +const UNIVERSAL_BUILD = !process.argv.includes("-s") +const IS_VERBOSE = process.argv.includes("-v") || process.argv.includes("--verbose") + async function main() { await installNodeDependencies() + if (UNIVERSAL_BUILD) { + console.log("Building universal package for all platforms...") + await packageAllBinaryDeps() + } else { + console.log(`Building package for ${os.platform()}-${os.arch()}...`) + } await zipDistribution() } async function installNodeDependencies() { + // Clean modules from any previous builds + await rmrf(path.join(BUILD_DIR, "node_modules")) + await rmrf(path.join(BINARIES_DIR)) + await cpr(RUNTIME_DEPS_DIR, BUILD_DIR) console.log("Running npm install in distribution directory...") - const cwd = process.cwd() - process.chdir(BUILD_DIR) + execSync("npm install", { stdio: "inherit", cwd: BUILD_DIR }) - try { - execSync("npm install", { stdio: "inherit" }) - // Move the vscode directory into node_modules. - // It can't be installed using npm because it will create a symlink which cannot be unzipped correctly on windows. - fs.renameSync("vscode", path.join("node_modules", "vscode")) - } catch (error) { - console.error("Error during setup:", error) + // Move the vscode directory into node_modules. + // It can't be installed using npm because it will create a symlink which cannot be unzipped correctly on windows. + fs.renameSync(`${BUILD_DIR}/vscode`, `${BUILD_DIR}/node_modules/vscode`) +} + +/** + * Downloads prebuilt binaries for each platform for the modules that include binaries. It uses `npx prebuild-install` + * to download the binary. + * + * The modules are downloaded to dist-standalone/binaries/{os}-{platform}/. + * When cline-core is installed, the installer should use the correct module for the current platform. + */ +async function packageAllBinaryDeps() { + // Check for native .node modules. + const allNativeModules = await glob("**/*.node", { cwd: path.join(BUILD_DIR, "node_modules"), nodir: true }) + const isAllowed = (path) => SUPPORTED_BINARY_MODULES.some((allowed) => path.includes(allowed)) + const blocked = allNativeModules.filter((x) => !isAllowed(x)) + + if (blocked.length > 0) { + console.error(`Error: Native node modules cannot be included in the standalone distribution:\n\n${blocked.join("\n")}`) + console.error( + "\nThese modules must support prebuilt-install and be added to the supported list in scripts/package-standalone.mjs", + ) process.exit(1) - } finally { - process.chdir(cwd) } - // Check for native .node modules. - const nativeModules = await glob("**/*.node", { cwd: BUILD_DIR, nodir: true }) - if (nativeModules.length > 0) { - console.error("Native node modules cannot be included in the standalone distribution:\n", nativeModules.join("\n")) - process.exit(1) + for (const module of SUPPORTED_BINARY_MODULES) { + console.log(`Installing binaries for ${module}...`) + const src = path.join(BUILD_DIR, "node_modules", module) + if (!fs.existsSync(src)) { + console.warn(`Warning: Trying to install binaries for the module '${module}', but it is not being used by cline.`) + continue + } + + for (const { platform, arch, targetDir } of TARGET_PLATFORMS) { + const binaryDir = `${BINARIES_DIR}/${targetDir}/node_modules` + fs.mkdirSync(binaryDir, { recursive: true }) + + // Copy the module from the build dir + const dest = path.join(binaryDir, module) + await cpr(src, dest) + + // Download the binary libs + const v = IS_VERBOSE ? "--verbose" : "" + const cmd = `npx prebuild-install --platform=${platform} --arch=${arch} --target=${TARGET_NODE_VERSION} ${v}` + log_verbose(`${module}: ${cmd}`) + execSync(cmd, { cwd: dest, stdio: "inherit" }) + log_verbose("") + } + // Remove the original module with the host platform binaries installed directly into node_modules. + log_verbose(`Cleaning up host version of ${module}`) + await rmrf(src) + log_verbose("") } } @@ -77,7 +138,7 @@ async function zipDistribution() { // Add the whole cline directory under "extension", except the for the ignored files. archive.directory(process.cwd(), "extension", (entry) => { if (isIgnored(entry.name)) { - log_verbose("Ignoring", entry.name) + //log_verbose("Ignoring", entry.name) return false } return entry @@ -171,6 +232,7 @@ function createIsIgnored(standaloneIgnores) { /* cp -r */ async function cpr(source, dest) { + log_verbose(`Copying ${source} -> ${dest}`) await cp(source, dest, { recursive: true, preserveTimestamps: true, @@ -179,7 +241,7 @@ async function cpr(source, dest) { } function log_verbose(...args) { - if (process.argv.includes("-v") || process.argv.includes("--verbose")) { + if (IS_VERBOSE) { console.log(...args) } } diff --git a/src/standalone/vscode-context.ts b/src/standalone/vscode-context.ts index f619dd1509..2f1d074170 100644 --- a/src/standalone/vscode-context.ts +++ b/src/standalone/vscode-context.ts @@ -12,7 +12,8 @@ log("Running standalone cline ", VERSION) const CLINE_DIR = process.env.CLINE_DIR || `${os.homedir()}/.cline` const DATA_DIR = path.join(CLINE_DIR, "data") -const INSTALL_DIR = process.env.INSTALL_DIR || path.join(CLINE_DIR, "core", VERSION) +const INSTALL_DIR = process.env.INSTALL_DIR || __dirname + mkdirSync(DATA_DIR, { recursive: true }) log("Using settings dir:", DATA_DIR) diff --git a/standalone/runtime-files/package-lock.json b/standalone/runtime-files/package-lock.json index 2eb8dcfaea..a073ccf78d 100644 --- a/standalone/runtime-files/package-lock.json +++ b/standalone/runtime-files/package-lock.json @@ -1,15 +1,16 @@ { - "name": "Cline standalone", - "version": "1.0.0", + "name": "cline-core", + "version": "0.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "Cline standalone", - "version": "1.0.0", + "name": "cline-core", + "version": "0.0.1", "dependencies": { "@grpc/grpc-js": "^1.13.3", "@grpc/reflection": "^1.0.4", + "better-sqlite3": "^12.2.0", "grpc-health-check": "^2.0.2", "open": "^10.1.2", "vscode-uri": "^3.1.0" @@ -166,6 +167,84 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/better-sqlite3": { + "version": "12.2.0", + "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-12.2.0.tgz", + "integrity": "sha512-eGbYq2CT+tos1fBwLQ/tkBt9J5M3JEHjku4hbvQUePCckkvVf14xWj+1m7dGoK81M/fOjFT7yM9UMeKT/+vFLQ==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "bindings": "^1.5.0", + "prebuild-install": "^7.1.1" + }, + "engines": { + "node": "20.x || 22.x || 23.x || 24.x" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "license": "MIT", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "node_modules/bundle-name": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.0.tgz", @@ -181,6 +260,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "license": "ISC" + }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -213,6 +298,30 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "license": "MIT" }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "license": "MIT", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/default-browser": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.2.1.tgz", @@ -253,12 +362,30 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/detect-libc": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz", + "integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "license": "MIT" }, + "node_modules/end-of-stream": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", + "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, "node_modules/escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", @@ -268,6 +395,27 @@ "node": ">=6" } }, + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "license": "(MIT OR WTFPL)", + "engines": { + "node": ">=6" + } + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "license": "MIT" + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "license": "MIT" + }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -277,6 +425,12 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", + "license": "MIT" + }, "node_modules/grpc-health-check": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/grpc-health-check/-/grpc-health-check-2.0.2.tgz", @@ -286,6 +440,38 @@ "@grpc/proto-loader": "^0.7.13" } }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "license": "ISC" + }, "node_modules/is-docker": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", @@ -355,6 +541,60 @@ "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", "license": "Apache-2.0" }, + "node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "license": "MIT" + }, + "node_modules/napi-build-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz", + "integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==", + "license": "MIT" + }, + "node_modules/node-abi": { + "version": "3.77.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.77.0.tgz", + "integrity": "sha512-DSmt0OEcLoK4i3NuscSbGjOf3bqiDEutejqENSplMSFA/gmB8mkED9G4pKWnPl7MDU4rSHebKPHeitpDfyH0cQ==", + "license": "MIT", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, "node_modules/open": { "version": "10.1.2", "resolved": "https://registry.npmjs.org/open/-/open-10.1.2.tgz", @@ -373,6 +613,32 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/prebuild-install": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz", + "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==", + "license": "MIT", + "dependencies": { + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^2.0.0", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/protobufjs": { "version": "7.5.2", "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.2.tgz", @@ -397,6 +663,45 @@ "node": ">=12.0.0" } }, + "node_modules/pump": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz", + "integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==", + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -418,6 +723,92 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -444,12 +835,67 @@ "node": ">=8" } }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tar-fs": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.3.tgz", + "integrity": "sha512-090nwYJDmlhwFwEW3QQl+vaNnxsO2yVsd45eTKRBzSzu+hlb1w2K9inVq5b0ngXuLVqQ4ApvsUHHnu/zQNkWAg==", + "license": "MIT", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "license": "MIT", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, "node_modules/undici-types": { "version": "6.21.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "license": "MIT" }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, "node_modules/vscode-uri": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.1.0.tgz", @@ -473,6 +919,12 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", diff --git a/standalone/runtime-files/package.json b/standalone/runtime-files/package.json index ec8ab86d79..86562ced5a 100644 --- a/standalone/runtime-files/package.json +++ b/standalone/runtime-files/package.json @@ -5,6 +5,7 @@ "dependencies": { "@grpc/grpc-js": "^1.13.3", "@grpc/reflection": "^1.0.4", + "better-sqlite3": "^12.2.0", "grpc-health-check": "^2.0.2", "open": "^10.1.2", "vscode-uri": "^3.1.0"