{"id":47390,"library":"depi-node-client","title":"DEPI Node Client","description":"A gRPC client library for communicating with DEPI from Node.js, written in TypeScript. v1.0.3 provides proto-generated classes and higher-level utility functions (depiUtils) for streamlined interaction. Includes VS Code extension integration (DepiExtensionApi) for reusing sessions and invoking DEPI UI. Published on npm, ships TypeScript definitions. Use depiUtils for most operations; low-level async methods via addAsyncMethods. Build requires grpc-tools and ts-protoc-gen.","status":"active","version":"1.0.3","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","depi","grpc","typescript"],"install":[{"cmd":"npm install depi-node-client","lang":"bash","label":"npm"},{"cmd":"yarn add depi-node-client","lang":"bash","label":"yarn"},{"cmd":"pnpm add depi-node-client","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"gRPC transport","package":"@grpc/grpc-js","optional":false}],"imports":[{"note":"ESM style works with TypeScript; CommonJS requires destructuring","wrong":"const depiUtils = require('depi-node-client').depiUtils","symbol":"depiUtils","correct":"import { depiUtils } from 'depi-node-client'"},{"note":"Named export, not default","wrong":"import DepiExtensionApi from 'depi-node-client'","symbol":"DepiExtensionApi","correct":"import { DepiExtensionApi } from 'depi-node-client'"},{"note":"DepiClient is not exported from the package root; must use full path to generated file","wrong":"import { DepiClient } from 'depi-node-client'","symbol":"DepiClient","correct":"import { DepiClient } from 'depi-node-client/dist/pbs/depi_grpc_pb'"}],"quickstart":{"code":"import { depiUtils } from 'depi-node-client';\n\nconst url = '127.0.0.1:5051';\nconst userName = 'demo';\nconst password = '123456';\n\nasync function main() {\n  const session = await depiUtils.logInDepiClient(url, userName, password);\n  const resourceGroups = await depiUtils.getResourceGroups(session);\n  resourceGroups.forEach(rg => console.log(JSON.stringify(rg)));\n  await depiUtils.logOut(session);\n}\n\nmain().catch(console.error);","lang":"typescript","description":"Authenticates to a DEPI server and lists resource groups using high-level utility functions."},"warnings":[{"fix":"Use the full path: import { DepiClient } from 'depi-node-client/dist/pbs/depi_grpc_pb'","message":"DepiClient class is not exported from the package root. Must import from 'depi-node-client/dist/pbs/depi_grpc_pb'.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"const client = new DepiClient(url, creds); addAsyncMethods(client); const res = await client.loginAsync(req);","message":"Async methods are not available by default on DepiClient. Must call addAsyncMethods(client) after instantiation.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"npm install --target_arch=x64","message":"Apple M1 users must install with --target_arch=x64 due to grpc-tools lacking arm64 support.","severity":"gotcha","affected_versions":">=1.0"}],"env_vars":null,"search_vec":"'addasyncmethod':63 'async':60 'build':64 'class':22 'client':3,6 'code':35 'communic':9 'definit':51 'depi':1,11,44,75 'depiextensionapi':38 'depiutil':29,53 'extens':36 'function':28 'gen':73 'generat':21 'grpc':5,67,76 'grpc-tool':66 'higher':25 'higher-level':24 'includ':33 'integr':37 'interact':32 'invok':43 'javascript':74 'level':26,59 'librari':7 'low':58 'low-level':57 'method':61 'node':2 'node.js':13 'npm':48 'oper':56 'proto':20 'proto-gener':19 'protoc':72 'provid':18 'publish':46 'requir':65 'reus':40 'session':41 'ship':49 'streamlin':31 'tool':68 'ts':71 'ts-protoc-gen':70 'typescript':16,50,77 'ui':45 'use':52 'util':27 'v1.0.3':17 'via':62 'vs':34 'written':14","created_at":"2026-06-07T16:51:16.953404+00:00","updated_at":"2026-06-07T16:51:16.953404+00:00","problems":[{"fix":"Run 'npm install depi-node-client' and ensure import uses correct path.","cause":"Package not installed or import path incorrect.","error":"Cannot find module 'depi-node-client'"},{"fix":"Use named import: import { DepiClient } from 'depi-node-client/dist/pbs/depi_grpc_pb'","cause":"Importing DepiClient incorrectly (e.g. as default import).","error":"DepiClient is not a constructor"},{"fix":"After creating client, call addAsyncMethods(client) before using async methods.","cause":"addAsyncMethods not called on client instance.","error":"Client does not have method loginAsync"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"depi-node-client","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}