Registry / iot / infinimesh-proto

infinimesh-proto

JSON →
library3.1.5-9jsnpmunverified

Generated gRPC and Connect API code for infinimesh IoT platform. Version 3.1.5-9 provides TypeScript/JavaScript stubs via Connect-ES (ESM/CJS) and Go generated code. Released as needed with protobuf updates. Key differentiator: pre-generated code for Node and Go, avoiding manual protoc setup. Supports both gRPC and Connect protocol.

npm install infinimesh-proto
INSTALL
IMPORT
SIG · INFINIMESH-PROTO
I
infinimesh-proto
iotjavascriptv3.1.5-9
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ServiceClient
import { ServiceClient } from '@infinimesh/proto/infinimesh/device/v1/device_connect'
import ServiceClient from '@infinimesh/proto/infinimesh/device/v1/device_connect'
Named export from Connect-ES generated files; default import will fail.
DeviceService
import { DeviceService } from '@infinimesh/proto/infinimesh/device/v1/device_pb'
const { DeviceService } = require('@infinimesh/proto/infinimesh/device/v1/device_pb')
ESM-only package; CJS require not supported. Use import syntax.
createPromiseClient
import { createPromiseClient } from '@bufbuild/connect'
import { createPromiseClient } from '@infinimesh/proto'
createPromiseClient is from @bufbuild/connect, not from the proto package.
createRouterTransport
import { createRouterTransport } from '@bufbuild/connect'
Used for server-side testing; exported from @bufbuild/connect.

Creates a Connect-ES client for the DeviceService, demonstrating import paths and transport setup.

import { createPromiseClient } from '@bufbuild/connect'; import { createConnectTransport } from '@bufbuild/connect-web'; import { DeviceService } from '@infinimesh/proto/infinimesh/device/v1/device_pb'; const transport = createConnectTransport({ baseUrl: process.env.INFINIMESH_API_URL ?? 'https://api.infinimesh.cloud', }); async function main() { const client = createPromiseClient(DeviceService, transport); const res = await client.getDevice({ id: 'my-device' }); console.log(res); } main();
Debug
Known issues
breakingVersion 3.x changed import paths from deep nested to scoped @infinimesh/proto.
fix
Update imports to use @infinimesh/proto/infinimesh/... instead of direct references to subdirectories.
affects: >=3.0.0
gotchaThe package is ESM-only; CJS require() results in error.
fix
Use import syntax or set type:"module" in package.json.
affects: >=3.0.0
gotchacreatePromiseClient and transport utilities are from @bufbuild/connect, not from this package.
fix
Install @bufbuild/connect and @bufbuild/connect-web as peer dependencies.
affects: *
deprecatedOlder v2.x used gRPC-Web stubs; v3 switched to Connect-ES.
fix
Migrate to Connect-ES (v3) for future support.
affects: >=2.0.0 <3.0.0
breakingv3.1.0 removed grpc-web stubs; only Connect-ES stubs remain.
fix
Regenerate using Buf with connect-es plugin.
affects: >=3.1.0
gotchaThe package requires protobuf runtime packages; missing them causes runtime errors.
fix
Ensure @bufbuild/protobuf is installed (>=1.0.0).
affects: *
deprecatedUse of default exports is deprecated; all symbols are named exports.
fix
Use named import syntax.
affects: >=3.0.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module /path/node_modules/@infinimesh/proto/... from /path/app.js not supported.
Using CommonJS require instead of import.
fix
Add "type": "module" to package.json or use import syntax.
Module not found: Can't resolve '@infinimesh/proto/infinimesh/device/v1/device_connect'
Missing or incorrect package install; or not using the correct subpath import.
fix
Ensure package is installed: npm install @infinimesh/proto. Verify import path matches the generated files.
TypeError: (0 , createPromiseClient) is not a function
Importing createPromiseClient from the wrong package (e.g., @infinimesh/proto itself).
fix
Import createPromiseClient from '@bufbuild/connect'.
Error: Cannot find module '@bufbuild/protobuf'
Missing required runtime dependency.
fix
Install @bufbuild/protobuf: npm install @bufbuild/protobuf.
Uncaught TypeError: DeviceService.getDevice is not a function
Using the service object directly instead of creating a client.
fix
Use createPromiseClient to instantiate a client: const client = createPromiseClient(DeviceService, transport); then call client.getDevice().
Upgrade
Version history
3.1.5-9latest on npm
Audit
Dependencies
@bufbuild/protobufrequiredRuntime dependency for Connect-ES generated code
@bufbuild/connectoptionalRequired for Connect-ES transport
@bufbuild/connect-weboptionalRequired for browser usage
Agent activity
29 hits · last 30 days
node
24
Amazon
1
Resources
infinimesh-proto — npm install infinimesh-proto · libregistry