mulmocast 1.2.44 → 1.2.45
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/lib/index.common.d.ts +1 -0
- package/lib/index.common.js +1 -0
- package/lib/utils/error_cause.d.ts +19 -4
- package/lib/utils/error_cause.js +35 -25
- package/package.json +1 -1
package/lib/index.common.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from "./utils/const.js";
|
|
|
4
4
|
export * from "./utils/string.js";
|
|
5
5
|
export * from "./utils/utils.js";
|
|
6
6
|
export * from "./utils/prompt.js";
|
|
7
|
+
export * from "./utils/error_cause.js";
|
|
7
8
|
export * from "./methods/mulmo_presentation_style.js";
|
|
8
9
|
export * from "./methods/mulmo_script.js";
|
|
9
10
|
export * from "./methods/mulmo_studio_context.js";
|
package/lib/index.common.js
CHANGED
|
@@ -5,6 +5,7 @@ export * from "./utils/const.js";
|
|
|
5
5
|
export * from "./utils/string.js";
|
|
6
6
|
export * from "./utils/utils.js";
|
|
7
7
|
export * from "./utils/prompt.js";
|
|
8
|
+
export * from "./utils/error_cause.js";
|
|
8
9
|
export * from "./methods/mulmo_presentation_style.js";
|
|
9
10
|
export * from "./methods/mulmo_script.js";
|
|
10
11
|
export * from "./methods/mulmo_studio_context.js";
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
export declare const urlFileNotFoundType = "urlFileNotFound";
|
|
2
|
+
export declare const fileNotExistType = "fileNotExist";
|
|
3
|
+
export declare const unknownMediaType = "unknownMedia";
|
|
4
|
+
export declare const sourceUndefinedType = "undefinedSourceType";
|
|
5
|
+
export declare const movieAction = "movie";
|
|
6
|
+
export declare const imageAction = "images";
|
|
7
|
+
export declare const audioAction = "audio";
|
|
8
|
+
export declare const imageReferenceAction = "imageReference";
|
|
9
|
+
export declare const audioFileTarget = "audioFile";
|
|
10
|
+
export declare const imageFileTarget = "imageFile";
|
|
11
|
+
export declare const movieFileTarget = "movieFile";
|
|
12
|
+
export declare const videoSourceTarget = "videoSource";
|
|
13
|
+
export declare const audioSourceTarget = "audioSource";
|
|
14
|
+
export declare const codeTextTarget = "codeText";
|
|
1
15
|
export declare const getAudioInputIdsError: (index: number, fileName: string) => {
|
|
2
16
|
type: string;
|
|
3
17
|
action: string;
|
|
@@ -14,26 +28,27 @@ export declare const audioCheckerError: (index: number, fileName: string) => {
|
|
|
14
28
|
beatIndex: number;
|
|
15
29
|
fileName: string;
|
|
16
30
|
};
|
|
17
|
-
export declare const
|
|
31
|
+
export declare const createVideoFileError: (index: number, fileName: string) => {
|
|
18
32
|
type: string;
|
|
19
33
|
action: string;
|
|
34
|
+
target: string;
|
|
20
35
|
agentName: string;
|
|
21
36
|
beatIndex: number;
|
|
37
|
+
fileName: string;
|
|
22
38
|
};
|
|
23
|
-
export declare const
|
|
39
|
+
export declare const createVideoSourceError: (index: number) => {
|
|
24
40
|
type: string;
|
|
25
41
|
action: string;
|
|
26
42
|
target: string;
|
|
27
43
|
agentName: string;
|
|
28
44
|
beatIndex: number;
|
|
29
45
|
};
|
|
30
|
-
export declare const
|
|
46
|
+
export declare const invalidAudioSourceError: (beatIndex: number) => {
|
|
31
47
|
type: string;
|
|
32
48
|
action: string;
|
|
33
49
|
target: string;
|
|
34
50
|
agentName: string;
|
|
35
51
|
beatIndex: number;
|
|
36
|
-
fileName: string;
|
|
37
52
|
};
|
|
38
53
|
export declare const downLoadReferenceImageError: (key: string, url: string) => {
|
|
39
54
|
type: string;
|
package/lib/utils/error_cause.js
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
const urlFileNotFoundType = "urlFileNotFound";
|
|
2
|
-
const fileNotExistType = "fileNotExist";
|
|
3
|
-
const unknownMediaType = "unknownMedia";
|
|
4
|
-
const sourceUndefinedType = "undefinedSourceType";
|
|
5
|
-
const movieAction = "movie";
|
|
6
|
-
const imageAction = "images";
|
|
7
|
-
const
|
|
8
|
-
const imageReferenceAction = "imageReference";
|
|
1
|
+
export const urlFileNotFoundType = "urlFileNotFound";
|
|
2
|
+
export const fileNotExistType = "fileNotExist";
|
|
3
|
+
export const unknownMediaType = "unknownMedia";
|
|
4
|
+
export const sourceUndefinedType = "undefinedSourceType";
|
|
5
|
+
export const movieAction = "movie";
|
|
6
|
+
export const imageAction = "images";
|
|
7
|
+
export const audioAction = "audio";
|
|
8
|
+
export const imageReferenceAction = "imageReference";
|
|
9
|
+
export const audioFileTarget = "audioFile";
|
|
10
|
+
export const imageFileTarget = "imageFile";
|
|
11
|
+
export const movieFileTarget = "movieFile";
|
|
12
|
+
export const videoSourceTarget = "videoSource";
|
|
13
|
+
export const audioSourceTarget = "audioSource";
|
|
14
|
+
export const codeTextTarget = "codeText";
|
|
9
15
|
export const getAudioInputIdsError = (index, fileName) => {
|
|
10
16
|
return {
|
|
11
17
|
type: fileNotExistType,
|
|
12
18
|
action: movieAction,
|
|
13
|
-
target:
|
|
19
|
+
target: audioFileTarget,
|
|
14
20
|
agentName: "combineAudioFiles",
|
|
15
21
|
beatIndex: index,
|
|
16
22
|
fileName,
|
|
@@ -20,16 +26,28 @@ export const audioCheckerError = (index, fileName) => {
|
|
|
20
26
|
return {
|
|
21
27
|
type: fileNotExistType,
|
|
22
28
|
action: imageAction,
|
|
23
|
-
target:
|
|
29
|
+
target: imageFileTarget,
|
|
24
30
|
agentName: "audioChecker",
|
|
25
31
|
beatIndex: index,
|
|
26
32
|
fileName,
|
|
27
33
|
};
|
|
28
34
|
};
|
|
35
|
+
export const createVideoFileError = (index, fileName) => {
|
|
36
|
+
return {
|
|
37
|
+
type: fileNotExistType,
|
|
38
|
+
action: movieAction,
|
|
39
|
+
target: imageFileTarget,
|
|
40
|
+
agentName: "createVideo",
|
|
41
|
+
beatIndex: index,
|
|
42
|
+
fileName,
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
// undefinedSource
|
|
29
46
|
export const createVideoSourceError = (index) => {
|
|
30
47
|
return {
|
|
31
48
|
type: sourceUndefinedType,
|
|
32
49
|
action: movieAction,
|
|
50
|
+
target: videoSourceTarget,
|
|
33
51
|
agentName: "createVideo",
|
|
34
52
|
beatIndex: index,
|
|
35
53
|
};
|
|
@@ -37,27 +55,18 @@ export const createVideoSourceError = (index) => {
|
|
|
37
55
|
export const invalidAudioSourceError = (beatIndex) => {
|
|
38
56
|
return {
|
|
39
57
|
type: sourceUndefinedType,
|
|
40
|
-
action:
|
|
41
|
-
target:
|
|
58
|
+
action: audioAction,
|
|
59
|
+
target: audioSourceTarget,
|
|
42
60
|
agentName: "getAudioPathOrUrl",
|
|
43
61
|
beatIndex,
|
|
44
62
|
};
|
|
45
63
|
};
|
|
46
|
-
|
|
47
|
-
return {
|
|
48
|
-
type: fileNotExistType,
|
|
49
|
-
action: movieAction,
|
|
50
|
-
target: "imageFile",
|
|
51
|
-
agentName: "createVideo",
|
|
52
|
-
beatIndex: index,
|
|
53
|
-
fileName,
|
|
54
|
-
};
|
|
55
|
-
};
|
|
64
|
+
// 404
|
|
56
65
|
export const downLoadReferenceImageError = (key, url) => {
|
|
57
66
|
return {
|
|
58
67
|
type: urlFileNotFoundType,
|
|
59
68
|
action: imageReferenceAction,
|
|
60
|
-
target:
|
|
69
|
+
target: imageFileTarget,
|
|
61
70
|
agentName: "downloadUrl",
|
|
62
71
|
key,
|
|
63
72
|
url,
|
|
@@ -67,7 +76,7 @@ export const downloadImagePluginError = (url, imageType) => {
|
|
|
67
76
|
return {
|
|
68
77
|
type: urlFileNotFoundType,
|
|
69
78
|
action: imageAction,
|
|
70
|
-
target: imageType,
|
|
79
|
+
target: imageType === "image" ? imageFileTarget : movieFileTarget,
|
|
71
80
|
agentName: "imagePlugin",
|
|
72
81
|
url,
|
|
73
82
|
};
|
|
@@ -76,11 +85,12 @@ export const getTextError = (url) => {
|
|
|
76
85
|
return {
|
|
77
86
|
type: urlFileNotFoundType,
|
|
78
87
|
action: imageAction,
|
|
79
|
-
target:
|
|
88
|
+
target: codeTextTarget,
|
|
80
89
|
agentName: "mermaid",
|
|
81
90
|
url,
|
|
82
91
|
};
|
|
83
92
|
};
|
|
93
|
+
//
|
|
84
94
|
export const imageReferenceUnknownMediaError = (key) => {
|
|
85
95
|
return {
|
|
86
96
|
type: unknownMediaType,
|