linuxcnc-grpc 0.6.0-beta.1
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/dist/__tests__/client.test.d.ts +6 -0
- package/dist/__tests__/client.test.js +292 -0
- package/dist/hal.d.ts +637 -0
- package/dist/hal.js +4149 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.js +70 -0
- package/dist/linuxcnc.d.ts +903 -0
- package/dist/linuxcnc.js +7441 -0
- package/package.json +54 -0
- package/src/__tests__/client.test.ts +373 -0
- package/src/hal.ts +5153 -0
- package/src/index.ts +35 -0
- package/src/linuxcnc.ts +8840 -0
package/src/index.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LinuxCNC gRPC client for TypeScript/JavaScript
|
|
3
|
+
*
|
|
4
|
+
* This package provides TypeScript types and gRPC client stubs for
|
|
5
|
+
* communicating with a LinuxCNC gRPC server.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { LinuxCNCServiceClient, GetStatusRequest, credentials } from 'linuxcnc-grpc';
|
|
10
|
+
*
|
|
11
|
+
* const client = new LinuxCNCServiceClient(
|
|
12
|
+
* 'localhost:50051',
|
|
13
|
+
* credentials.createInsecure()
|
|
14
|
+
* );
|
|
15
|
+
*
|
|
16
|
+
* client.getStatus(GetStatusRequest.create(), (err, status) => {
|
|
17
|
+
* if (err) {
|
|
18
|
+
* console.error('Error:', err);
|
|
19
|
+
* return;
|
|
20
|
+
* }
|
|
21
|
+
* console.log('Status:', status);
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import * as grpc from '@grpc/grpc-js';
|
|
27
|
+
|
|
28
|
+
// Re-export grpc utilities to avoid version conflicts
|
|
29
|
+
export const credentials = grpc.credentials;
|
|
30
|
+
export const Metadata = grpc.Metadata;
|
|
31
|
+
export const status = grpc.status;
|
|
32
|
+
export type { ServiceError } from '@grpc/grpc-js';
|
|
33
|
+
|
|
34
|
+
export * from './linuxcnc';
|
|
35
|
+
export * from './hal';
|