@noimosai/platform-cli 0.1.0 → 0.1.2
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/cli/cli.js
CHANGED
|
@@ -2,11 +2,11 @@ import { open } from "node:fs/promises";
|
|
|
2
2
|
import { constants } from "node:fs";
|
|
3
3
|
import { extname } from "node:path";
|
|
4
4
|
import { platformInputMimeSchema, PLATFORM_INPUT_MAX_BYTES } from "./index.js";
|
|
5
|
-
const extensions = { ".mp3": "audio/mpeg", ".wav": "audio/wav", ".mp4": "video/mp4", ".jpg": "image/jpeg", ".jpeg": "image/jpeg", ".png": "image/png" };
|
|
5
|
+
const extensions = { ".mp3": "audio/mpeg", ".wav": "audio/wav", ".mp4": "video/mp4", ".jpg": "image/jpeg", ".jpeg": "image/jpeg", ".png": "image/png", ".webp": "image/webp" };
|
|
6
6
|
export async function uploadLocalInput(client, path) {
|
|
7
7
|
const mimeType = platformInputMimeSchema.safeParse(extensions[extname(path).toLowerCase()]);
|
|
8
8
|
if (!mimeType.success)
|
|
9
|
-
throw new Error("Supported input files: JPG, PNG, WAV, MP3, MP4.");
|
|
9
|
+
throw new Error("Supported input files: JPG, PNG, WebP, WAV, MP3, MP4.");
|
|
10
10
|
let data;
|
|
11
11
|
try {
|
|
12
12
|
const file = await open(path, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK);
|
|
@@ -6,7 +6,7 @@ export const platformJsonObjectSchema = z.record(z.string(), z.json());
|
|
|
6
6
|
export const PLATFORM_INPUT_MAX_BYTES = 12 * 1024 * 1024;
|
|
7
7
|
export const PLATFORM_UPLOAD_MAX_BYTES = 16 * 1024 * 1024 + 4096;
|
|
8
8
|
export const platformInputFileIdSchema = z.string().regex(/^f_[a-f0-9]{64}$/);
|
|
9
|
-
export const platformInputMimeSchema = z.enum(["image/jpeg", "image/png", "audio/wav", "audio/mpeg", "video/mp4"]);
|
|
9
|
+
export const platformInputMimeSchema = z.enum(["image/jpeg", "image/png", "image/webp", "audio/wav", "audio/mpeg", "video/mp4"]);
|
|
10
10
|
export const platformInputUploadSchema = z.object({ mimeType: platformInputMimeSchema, data: z.string().min(4).max(16 * 1024 * 1024) }).strict();
|
|
11
11
|
export const platformInputFileSchema = z.object({ id: platformInputFileIdSchema, mimeType: platformInputMimeSchema,
|
|
12
12
|
sizeBytes: z.number().int().positive().max(PLATFORM_INPUT_MAX_BYTES), sha256: z.string().regex(/^[a-f0-9]{64}$/), expiresAt: z.iso.datetime() });
|
|
@@ -48,7 +48,7 @@ export const platformExecutionListSchema = z.object({
|
|
|
48
48
|
});
|
|
49
49
|
export const platformArtifactIdSchema = z.string().regex(/^a_[A-Za-z0-9_-]{1,100}$/);
|
|
50
50
|
export const platformArtifactSchema = z.object({
|
|
51
|
-
id: platformArtifactIdSchema, mimeType: z.enum(["image/jpeg", "image/png", "audio/wav", "audio/mpeg", "video/mp4"]),
|
|
51
|
+
id: platformArtifactIdSchema, mimeType: z.enum(["image/jpeg", "image/png", "image/webp", "audio/wav", "audio/mpeg", "video/mp4"]),
|
|
52
52
|
sizeBytes: z.number().int().positive().max(64 * 1024 * 1024), sha256: z.string().regex(/^[a-f0-9]{64}$/),
|
|
53
53
|
generation: z.string().regex(/^\d{1,30}$/), expiresAt: z.iso.datetime(),
|
|
54
54
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noimosai/platform-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "NoimosAI Developer Platform CLI for research, SEO, social data and media generation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"bin",
|
|
11
11
|
"dist",
|
|
12
|
-
"
|
|
12
|
+
"README.md",
|
|
13
13
|
"LICENSE"
|
|
14
14
|
],
|
|
15
15
|
"engines": {
|
|
@@ -31,6 +31,6 @@
|
|
|
31
31
|
"ai-agents"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"zod": "^4.5
|
|
34
|
+
"zod": "^4.6.5"
|
|
35
35
|
}
|
|
36
36
|
}
|
/package/{USAGE.md → README.md}
RENAMED
|
File without changes
|