mcp-3d-printer-server 1.0.2 → 1.2.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/README.md +105 -29
- package/dist/http-server.d.ts +16 -0
- package/dist/http-server.js +268 -0
- package/dist/index.js +462 -37
- package/dist/printers/bambu.d.ts +23 -12
- package/dist/printers/bambu.js +319 -232
- package/dist/printers/printer-factory.d.ts +0 -1
- package/dist/printers/printer-factory.js +6 -4
- package/dist/printers/prusa.d.ts +5 -0
- package/dist/printers/prusa.js +160 -59
- package/dist/sse-server.d.ts +20 -0
- package/dist/sse-server.js +318 -0
- package/dist/stl/stl-manipulator.d.ts +5 -5
- package/dist/stl/stl-manipulator.js +32 -7
- package/dist/types.d.ts +0 -6
- package/dist/types.js +0 -20
- package/package.json +10 -4
- package/src/http-server.ts +328 -0
- package/src/index.ts +582 -50
- package/src/printers/bambu.ts +452 -299
- package/src/printers/printer-factory.ts +7 -4
- package/src/printers/prusa.ts +218 -73
- package/src/sse-server.ts +409 -0
- package/src/stl/stl-manipulator.ts +38 -8
- package/src/test/Tape+Card+55mm+Ring.stl +0 -0
- package/src/types.ts +0 -19
package/dist/printers/bambu.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { PrinterImplementation
|
|
1
|
+
import { PrinterImplementation } from "../types.js";
|
|
2
2
|
interface BambuPrintOptionsInternal {
|
|
3
3
|
projectName: string;
|
|
4
4
|
filePath: string;
|
|
5
5
|
useAMS?: boolean;
|
|
6
6
|
plateIndex?: number;
|
|
7
|
+
bedType?: string;
|
|
7
8
|
bedLeveling?: boolean;
|
|
8
9
|
flowCalibration?: boolean;
|
|
9
10
|
vibrationCalibration?: boolean;
|
|
@@ -13,30 +14,40 @@ interface BambuPrintOptionsInternal {
|
|
|
13
14
|
md5?: string;
|
|
14
15
|
}
|
|
15
16
|
export declare class BambuImplementation extends PrinterImplementation {
|
|
16
|
-
private
|
|
17
|
-
|
|
18
|
-
private
|
|
19
|
-
|
|
20
|
-
private getBambuPrinterForFTP;
|
|
21
|
-
private getMqttClient;
|
|
22
|
-
disconnectAllMqtt(): Promise<void>;
|
|
17
|
+
private printerStore;
|
|
18
|
+
constructor(apiClient: any);
|
|
19
|
+
private getPrinter;
|
|
20
|
+
private resolveProjectFileMetadata;
|
|
23
21
|
getStatus(host: string, port: string, apiKey: string): Promise<any>;
|
|
24
22
|
print3mf(host: string, serial: string, token: string, options: BambuPrintOptionsInternal): Promise<any>;
|
|
25
23
|
cancelJob(host: string, port: string, apiKey: string): Promise<any>;
|
|
26
|
-
setTemperature(host: string, port: string, apiKey: string, component: string, temperature: number): Promise<
|
|
24
|
+
setTemperature(host: string, port: string, apiKey: string, component: string, temperature: number): Promise<{
|
|
25
|
+
status: string;
|
|
26
|
+
message: string;
|
|
27
|
+
command: string;
|
|
28
|
+
}>;
|
|
27
29
|
getFiles(host: string, port: string, apiKey: string): Promise<{
|
|
28
30
|
files: string[];
|
|
31
|
+
directories: Record<string, string[]>;
|
|
29
32
|
}>;
|
|
30
33
|
getFile(host: string, port: string, apiKey: string, filename: string): Promise<{
|
|
31
34
|
name: string;
|
|
32
35
|
exists: boolean;
|
|
33
36
|
}>;
|
|
34
|
-
uploadFile(host: string, port: string, apiKey: string, filePath: string, filename: string, print: boolean): Promise<
|
|
37
|
+
uploadFile(host: string, port: string, apiKey: string, filePath: string, filename: string, print: boolean): Promise<Record<string, unknown>>;
|
|
38
|
+
startJob(host: string, port: string, apiKey: string, filename: string): Promise<{
|
|
35
39
|
status: string;
|
|
36
40
|
message: string;
|
|
41
|
+
file: string;
|
|
37
42
|
}>;
|
|
38
|
-
|
|
39
|
-
|
|
43
|
+
/**
|
|
44
|
+
* Upload a file to the printer via FTP using basic-ftp directly.
|
|
45
|
+
* Bypasses bambu-js's sendFile which has a double-path bug (ensureDir CDs
|
|
46
|
+
* into the target directory, then uploadFrom uses the full relative path
|
|
47
|
+
* again, resulting in e.g. /cache/cache/file.3mf).
|
|
48
|
+
*/
|
|
49
|
+
private ftpUpload;
|
|
40
50
|
private extractBambuCredentials;
|
|
51
|
+
disconnectAll(): Promise<void>;
|
|
41
52
|
}
|
|
42
53
|
export {};
|