@cephla/types 0.1.0
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/file.d.ts +48 -0
- package/dist/file.d.ts.map +1 -0
- package/dist/file.js +22 -0
- package/dist/file.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/project.d.ts +42 -0
- package/dist/project.d.ts.map +1 -0
- package/dist/project.js +16 -0
- package/dist/project.js.map +1 -0
- package/dist/share.d.ts +36 -0
- package/dist/share.d.ts.map +1 -0
- package/dist/share.js +14 -0
- package/dist/share.js.map +1 -0
- package/dist/upload-rules.d.ts +16 -0
- package/dist/upload-rules.d.ts.map +1 -0
- package/dist/upload-rules.js +28 -0
- package/dist/upload-rules.js.map +1 -0
- package/dist/upload.d.ts +170 -0
- package/dist/upload.d.ts.map +1 -0
- package/dist/upload.js +70 -0
- package/dist/upload.js.map +1 -0
- package/package.json +39 -0
package/dist/file.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const MAX_UPLOAD_BYTES: number;
|
|
3
|
+
export declare const InitUploadInput: z.ZodObject<{
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
sizeBytes: z.ZodNumber;
|
|
6
|
+
contentType: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
name: string;
|
|
9
|
+
sizeBytes: number;
|
|
10
|
+
contentType: string;
|
|
11
|
+
}, {
|
|
12
|
+
name: string;
|
|
13
|
+
sizeBytes: number;
|
|
14
|
+
contentType: string;
|
|
15
|
+
}>;
|
|
16
|
+
export type InitUploadInput = z.infer<typeof InitUploadInput>;
|
|
17
|
+
export declare const InitUploadResponse: z.ZodObject<{
|
|
18
|
+
fileId: z.ZodString;
|
|
19
|
+
sessionUri: z.ZodString;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
fileId: string;
|
|
22
|
+
sessionUri: string;
|
|
23
|
+
}, {
|
|
24
|
+
fileId: string;
|
|
25
|
+
sessionUri: string;
|
|
26
|
+
}>;
|
|
27
|
+
export type InitUploadResponse = z.infer<typeof InitUploadResponse>;
|
|
28
|
+
export declare const FileSummary: z.ZodObject<{
|
|
29
|
+
id: z.ZodString;
|
|
30
|
+
name: z.ZodString;
|
|
31
|
+
sizeBytes: z.ZodNumber;
|
|
32
|
+
contentType: z.ZodString;
|
|
33
|
+
uploadedAt: z.ZodString;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
name: string;
|
|
36
|
+
sizeBytes: number;
|
|
37
|
+
contentType: string;
|
|
38
|
+
id: string;
|
|
39
|
+
uploadedAt: string;
|
|
40
|
+
}, {
|
|
41
|
+
name: string;
|
|
42
|
+
sizeBytes: number;
|
|
43
|
+
contentType: string;
|
|
44
|
+
id: string;
|
|
45
|
+
uploadedAt: string;
|
|
46
|
+
}>;
|
|
47
|
+
export type FileSummary = z.infer<typeof FileSummary>;
|
|
48
|
+
//# sourceMappingURL=file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../src/file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,gBAAgB,QAA0B,CAAC;AAExD,eAAO,MAAM,eAAe;;;;;;;;;;;;EAI1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D,eAAO,MAAM,kBAAkB;;;;;;;;;EAG7B,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;EAMtB,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
package/dist/file.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
// 50 GB. Matches the 100 GB max-file scale target with breathing room while
|
|
3
|
+
// the upload path is still single-PUT (no chunked/resumable client support).
|
|
4
|
+
// Bump after Plan 2 introduces chunked uploads.
|
|
5
|
+
export const MAX_UPLOAD_BYTES = 50 * 1024 * 1024 * 1024;
|
|
6
|
+
export const InitUploadInput = z.object({
|
|
7
|
+
name: z.string().min(1).max(500),
|
|
8
|
+
sizeBytes: z.number().int().positive().max(MAX_UPLOAD_BYTES),
|
|
9
|
+
contentType: z.string().min(1).max(200),
|
|
10
|
+
});
|
|
11
|
+
export const InitUploadResponse = z.object({
|
|
12
|
+
fileId: z.string().uuid(),
|
|
13
|
+
sessionUri: z.string().url(),
|
|
14
|
+
});
|
|
15
|
+
export const FileSummary = z.object({
|
|
16
|
+
id: z.string().uuid(),
|
|
17
|
+
name: z.string(),
|
|
18
|
+
sizeBytes: z.number(),
|
|
19
|
+
contentType: z.string(),
|
|
20
|
+
uploadedAt: z.string().datetime(),
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=file.js.map
|
package/dist/file.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.js","sourceRoot":"","sources":["../src/file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,4EAA4E;AAC5E,6EAA6E;AAC7E,gDAAgD;AAChD,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAExD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAChC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,gBAAgB,CAAC;IAC5D,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;CACxC,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACzB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;CAC7B,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACrB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,SAAS,MAAM,WAAW,CAAC;AACvC,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC;AACzC,OAAO,KAAK,WAAW,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,SAAS,MAAM,WAAW,CAAC;AACvC,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC;AACzC,OAAO,KAAK,WAAW,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const CreateProjectInput: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
description: z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
name: string;
|
|
7
|
+
description?: string | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
name: string;
|
|
10
|
+
description?: string | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
export type CreateProjectInput = z.infer<typeof CreateProjectInput>;
|
|
13
|
+
export declare const Project: z.ZodObject<{
|
|
14
|
+
id: z.ZodString;
|
|
15
|
+
slug: z.ZodString;
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
description: z.ZodNullable<z.ZodString>;
|
|
18
|
+
ownerId: z.ZodString;
|
|
19
|
+
gcsPrefix: z.ZodString;
|
|
20
|
+
createdAt: z.ZodString;
|
|
21
|
+
updatedAt: z.ZodString;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
name: string;
|
|
24
|
+
id: string;
|
|
25
|
+
description: string | null;
|
|
26
|
+
slug: string;
|
|
27
|
+
ownerId: string;
|
|
28
|
+
gcsPrefix: string;
|
|
29
|
+
createdAt: string;
|
|
30
|
+
updatedAt: string;
|
|
31
|
+
}, {
|
|
32
|
+
name: string;
|
|
33
|
+
id: string;
|
|
34
|
+
description: string | null;
|
|
35
|
+
slug: string;
|
|
36
|
+
ownerId: string;
|
|
37
|
+
gcsPrefix: string;
|
|
38
|
+
createdAt: string;
|
|
39
|
+
updatedAt: string;
|
|
40
|
+
}>;
|
|
41
|
+
export type Project = z.infer<typeof Project>;
|
|
42
|
+
//# sourceMappingURL=project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../src/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,kBAAkB;;;;;;;;;EAG7B,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;EASlB,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC"}
|
package/dist/project.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const CreateProjectInput = z.object({
|
|
3
|
+
name: z.string().min(1).max(200),
|
|
4
|
+
description: z.string().max(2000).optional(),
|
|
5
|
+
});
|
|
6
|
+
export const Project = z.object({
|
|
7
|
+
id: z.string().uuid(),
|
|
8
|
+
slug: z.string(),
|
|
9
|
+
name: z.string(),
|
|
10
|
+
description: z.string().nullable(),
|
|
11
|
+
ownerId: z.string().uuid(),
|
|
12
|
+
gcsPrefix: z.string(),
|
|
13
|
+
createdAt: z.string().datetime(),
|
|
14
|
+
updatedAt: z.string().datetime(),
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.js","sourceRoot":"","sources":["../src/project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAChC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9B,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACrB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC1B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC"}
|
package/dist/share.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const CreateShareInput: z.ZodObject<{
|
|
3
|
+
recipientEmail: z.ZodString;
|
|
4
|
+
expiresInDays: z.ZodOptional<z.ZodNumber>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
recipientEmail: string;
|
|
7
|
+
expiresInDays?: number | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
recipientEmail: string;
|
|
10
|
+
expiresInDays?: number | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
export type CreateShareInput = z.infer<typeof CreateShareInput>;
|
|
13
|
+
export declare const ShareSummary: z.ZodObject<{
|
|
14
|
+
id: z.ZodString;
|
|
15
|
+
recipientEmail: z.ZodString;
|
|
16
|
+
createdAt: z.ZodString;
|
|
17
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
18
|
+
revokedAt: z.ZodNullable<z.ZodString>;
|
|
19
|
+
lastOpenedAt: z.ZodNullable<z.ZodString>;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
id: string;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
recipientEmail: string;
|
|
24
|
+
expiresAt: string | null;
|
|
25
|
+
revokedAt: string | null;
|
|
26
|
+
lastOpenedAt: string | null;
|
|
27
|
+
}, {
|
|
28
|
+
id: string;
|
|
29
|
+
createdAt: string;
|
|
30
|
+
recipientEmail: string;
|
|
31
|
+
expiresAt: string | null;
|
|
32
|
+
revokedAt: string | null;
|
|
33
|
+
lastOpenedAt: string | null;
|
|
34
|
+
}>;
|
|
35
|
+
export type ShareSummary = z.infer<typeof ShareSummary>;
|
|
36
|
+
//# sourceMappingURL=share.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"share.d.ts","sourceRoot":"","sources":["../src/share.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gBAAgB;;;;;;;;;EAG3B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;EAOvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
package/dist/share.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const CreateShareInput = z.object({
|
|
3
|
+
recipientEmail: z.string().email().max(320),
|
|
4
|
+
expiresInDays: z.number().int().min(1).max(365).optional(), // null = no expiry
|
|
5
|
+
});
|
|
6
|
+
export const ShareSummary = z.object({
|
|
7
|
+
id: z.string().uuid(),
|
|
8
|
+
recipientEmail: z.string(),
|
|
9
|
+
createdAt: z.string().datetime(),
|
|
10
|
+
expiresAt: z.string().datetime().nullable(),
|
|
11
|
+
revokedAt: z.string().datetime().nullable(),
|
|
12
|
+
lastOpenedAt: z.string().datetime().nullable(),
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=share.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"share.js","sourceRoot":"","sources":["../src/share.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC;IAC3C,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,mBAAmB;CAChF,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACrB,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC3C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC3C,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC/C,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filename / path patterns that the upload flow always ignores, regardless of
|
|
3
|
+
* the --include-hidden flag. These are OS-junk and VCS metadata that nobody
|
|
4
|
+
* intends to upload.
|
|
5
|
+
*
|
|
6
|
+
* Used by both the browser folder-walker (when computing display totals in the
|
|
7
|
+
* upload modal) and the CLI walker (when building the declare list). Keeping
|
|
8
|
+
* them in @cephla/types means a single source of truth.
|
|
9
|
+
*/
|
|
10
|
+
export declare const DEFAULT_IGNORE_PATTERNS: readonly RegExp[];
|
|
11
|
+
export interface IgnoreOptions {
|
|
12
|
+
/** When false (default), any path segment starting with "." is ignored. */
|
|
13
|
+
includeHidden: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function shouldIgnore(relativePath: string, opts: IgnoreOptions): boolean;
|
|
16
|
+
//# sourceMappingURL=upload-rules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-rules.d.ts","sourceRoot":"","sources":["../src/upload-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,EAAE,SAAS,MAAM,EAQpD,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,2EAA2E;IAC3E,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,wBAAgB,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,GAAG,OAAO,CAM/E"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filename / path patterns that the upload flow always ignores, regardless of
|
|
3
|
+
* the --include-hidden flag. These are OS-junk and VCS metadata that nobody
|
|
4
|
+
* intends to upload.
|
|
5
|
+
*
|
|
6
|
+
* Used by both the browser folder-walker (when computing display totals in the
|
|
7
|
+
* upload modal) and the CLI walker (when building the declare list). Keeping
|
|
8
|
+
* them in @cephla/types means a single source of truth.
|
|
9
|
+
*/
|
|
10
|
+
export const DEFAULT_IGNORE_PATTERNS = [
|
|
11
|
+
/(^|\/)\.DS_Store$/,
|
|
12
|
+
/(^|\/)Thumbs\.db$/,
|
|
13
|
+
/(^|\/)desktop\.ini$/,
|
|
14
|
+
/(^|\/)\.git\//,
|
|
15
|
+
/(^|\/)\.svn\//,
|
|
16
|
+
/(^|\/)\.hg\//,
|
|
17
|
+
/(^|\/)node_modules\//,
|
|
18
|
+
];
|
|
19
|
+
export function shouldIgnore(relativePath, opts) {
|
|
20
|
+
if (DEFAULT_IGNORE_PATTERNS.some((re) => re.test(relativePath)))
|
|
21
|
+
return true;
|
|
22
|
+
if (!opts.includeHidden) {
|
|
23
|
+
if (relativePath.split("/").some((s) => s.startsWith(".")))
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=upload-rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-rules.js","sourceRoot":"","sources":["../src/upload-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAsB;IACxD,mBAAmB;IACnB,mBAAmB;IACnB,qBAAqB;IACrB,eAAe;IACf,eAAe;IACf,cAAc;IACd,sBAAsB;CACvB,CAAC;AAOF,MAAM,UAAU,YAAY,CAAC,YAAoB,EAAE,IAAmB;IACpE,IAAI,uBAAuB,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IAC7E,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;QACxB,IAAI,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;YAAE,OAAO,IAAI,CAAC;IAC1E,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/dist/upload.d.ts
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const MAX_UPLOAD_FILE_BYTES: number;
|
|
3
|
+
export declare const DECLARE_BATCH_MAX = 200;
|
|
4
|
+
export declare const InitUploadSessionInput: z.ZodEffects<z.ZodObject<{
|
|
5
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
6
|
+
projectName: z.ZodOptional<z.ZodString>;
|
|
7
|
+
projectDescription: z.ZodOptional<z.ZodString>;
|
|
8
|
+
sourceFolderName: z.ZodString;
|
|
9
|
+
expectedFileCount: z.ZodNumber;
|
|
10
|
+
expectedTotalBytes: z.ZodNumber;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
sourceFolderName: string;
|
|
13
|
+
expectedFileCount: number;
|
|
14
|
+
expectedTotalBytes: number;
|
|
15
|
+
projectId?: string | undefined;
|
|
16
|
+
projectName?: string | undefined;
|
|
17
|
+
projectDescription?: string | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
sourceFolderName: string;
|
|
20
|
+
expectedFileCount: number;
|
|
21
|
+
expectedTotalBytes: number;
|
|
22
|
+
projectId?: string | undefined;
|
|
23
|
+
projectName?: string | undefined;
|
|
24
|
+
projectDescription?: string | undefined;
|
|
25
|
+
}>, {
|
|
26
|
+
sourceFolderName: string;
|
|
27
|
+
expectedFileCount: number;
|
|
28
|
+
expectedTotalBytes: number;
|
|
29
|
+
projectId?: string | undefined;
|
|
30
|
+
projectName?: string | undefined;
|
|
31
|
+
projectDescription?: string | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
sourceFolderName: string;
|
|
34
|
+
expectedFileCount: number;
|
|
35
|
+
expectedTotalBytes: number;
|
|
36
|
+
projectId?: string | undefined;
|
|
37
|
+
projectName?: string | undefined;
|
|
38
|
+
projectDescription?: string | undefined;
|
|
39
|
+
}>;
|
|
40
|
+
export type InitUploadSessionInput = z.infer<typeof InitUploadSessionInput>;
|
|
41
|
+
export declare const InitUploadSessionResponse: z.ZodObject<{
|
|
42
|
+
sessionId: z.ZodString;
|
|
43
|
+
projectId: z.ZodString;
|
|
44
|
+
command: z.ZodString;
|
|
45
|
+
expiresAt: z.ZodString;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
expiresAt: string;
|
|
48
|
+
projectId: string;
|
|
49
|
+
sessionId: string;
|
|
50
|
+
command: string;
|
|
51
|
+
}, {
|
|
52
|
+
expiresAt: string;
|
|
53
|
+
projectId: string;
|
|
54
|
+
sessionId: string;
|
|
55
|
+
command: string;
|
|
56
|
+
}>;
|
|
57
|
+
export type InitUploadSessionResponse = z.infer<typeof InitUploadSessionResponse>;
|
|
58
|
+
export declare const DeclareInput: z.ZodObject<{
|
|
59
|
+
files: z.ZodArray<z.ZodObject<{
|
|
60
|
+
relativePath: z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>>;
|
|
61
|
+
sizeBytes: z.ZodNumber;
|
|
62
|
+
contentType: z.ZodString;
|
|
63
|
+
}, "strip", z.ZodTypeAny, {
|
|
64
|
+
sizeBytes: number;
|
|
65
|
+
contentType: string;
|
|
66
|
+
relativePath: string;
|
|
67
|
+
}, {
|
|
68
|
+
sizeBytes: number;
|
|
69
|
+
contentType: string;
|
|
70
|
+
relativePath: string;
|
|
71
|
+
}>, "many">;
|
|
72
|
+
}, "strip", z.ZodTypeAny, {
|
|
73
|
+
files: {
|
|
74
|
+
sizeBytes: number;
|
|
75
|
+
contentType: string;
|
|
76
|
+
relativePath: string;
|
|
77
|
+
}[];
|
|
78
|
+
}, {
|
|
79
|
+
files: {
|
|
80
|
+
sizeBytes: number;
|
|
81
|
+
contentType: string;
|
|
82
|
+
relativePath: string;
|
|
83
|
+
}[];
|
|
84
|
+
}>;
|
|
85
|
+
export type DeclareInput = z.infer<typeof DeclareInput>;
|
|
86
|
+
export declare const DeclareResponse: z.ZodObject<{
|
|
87
|
+
files: z.ZodArray<z.ZodObject<{
|
|
88
|
+
fileId: z.ZodString;
|
|
89
|
+
relativePath: z.ZodString;
|
|
90
|
+
sessionUri: z.ZodNullable<z.ZodString>;
|
|
91
|
+
alreadyUploaded: z.ZodBoolean;
|
|
92
|
+
}, "strip", z.ZodTypeAny, {
|
|
93
|
+
fileId: string;
|
|
94
|
+
sessionUri: string | null;
|
|
95
|
+
relativePath: string;
|
|
96
|
+
alreadyUploaded: boolean;
|
|
97
|
+
}, {
|
|
98
|
+
fileId: string;
|
|
99
|
+
sessionUri: string | null;
|
|
100
|
+
relativePath: string;
|
|
101
|
+
alreadyUploaded: boolean;
|
|
102
|
+
}>, "many">;
|
|
103
|
+
}, "strip", z.ZodTypeAny, {
|
|
104
|
+
files: {
|
|
105
|
+
fileId: string;
|
|
106
|
+
sessionUri: string | null;
|
|
107
|
+
relativePath: string;
|
|
108
|
+
alreadyUploaded: boolean;
|
|
109
|
+
}[];
|
|
110
|
+
}, {
|
|
111
|
+
files: {
|
|
112
|
+
fileId: string;
|
|
113
|
+
sessionUri: string | null;
|
|
114
|
+
relativePath: string;
|
|
115
|
+
alreadyUploaded: boolean;
|
|
116
|
+
}[];
|
|
117
|
+
}>;
|
|
118
|
+
export type DeclareResponse = z.infer<typeof DeclareResponse>;
|
|
119
|
+
export declare const CompleteFileInput: z.ZodObject<{
|
|
120
|
+
fileId: z.ZodString;
|
|
121
|
+
}, "strip", z.ZodTypeAny, {
|
|
122
|
+
fileId: string;
|
|
123
|
+
}, {
|
|
124
|
+
fileId: string;
|
|
125
|
+
}>;
|
|
126
|
+
export type CompleteFileInput = z.infer<typeof CompleteFileInput>;
|
|
127
|
+
export declare const FinishInput: z.ZodObject<{
|
|
128
|
+
cancelled: z.ZodOptional<z.ZodBoolean>;
|
|
129
|
+
}, "strip", z.ZodTypeAny, {
|
|
130
|
+
cancelled?: boolean | undefined;
|
|
131
|
+
}, {
|
|
132
|
+
cancelled?: boolean | undefined;
|
|
133
|
+
}>;
|
|
134
|
+
export type FinishInput = z.infer<typeof FinishInput>;
|
|
135
|
+
export declare const SessionInfoResponse: z.ZodObject<{
|
|
136
|
+
projectId: z.ZodString;
|
|
137
|
+
projectName: z.ZodString;
|
|
138
|
+
sourceFolderName: z.ZodString;
|
|
139
|
+
expectedFileCount: z.ZodNumber;
|
|
140
|
+
expectedTotalBytes: z.ZodNumber;
|
|
141
|
+
status: z.ZodEnum<["pending", "active", "complete", "revoked", "expired"]>;
|
|
142
|
+
expiresAt: z.ZodString;
|
|
143
|
+
filesDeclared: z.ZodNumber;
|
|
144
|
+
filesCompleted: z.ZodNumber;
|
|
145
|
+
bytesCompleted: z.ZodNumber;
|
|
146
|
+
}, "strip", z.ZodTypeAny, {
|
|
147
|
+
status: "pending" | "active" | "complete" | "revoked" | "expired";
|
|
148
|
+
expiresAt: string;
|
|
149
|
+
projectId: string;
|
|
150
|
+
projectName: string;
|
|
151
|
+
sourceFolderName: string;
|
|
152
|
+
expectedFileCount: number;
|
|
153
|
+
expectedTotalBytes: number;
|
|
154
|
+
filesDeclared: number;
|
|
155
|
+
filesCompleted: number;
|
|
156
|
+
bytesCompleted: number;
|
|
157
|
+
}, {
|
|
158
|
+
status: "pending" | "active" | "complete" | "revoked" | "expired";
|
|
159
|
+
expiresAt: string;
|
|
160
|
+
projectId: string;
|
|
161
|
+
projectName: string;
|
|
162
|
+
sourceFolderName: string;
|
|
163
|
+
expectedFileCount: number;
|
|
164
|
+
expectedTotalBytes: number;
|
|
165
|
+
filesDeclared: number;
|
|
166
|
+
filesCompleted: number;
|
|
167
|
+
bytesCompleted: number;
|
|
168
|
+
}>;
|
|
169
|
+
export type SessionInfoResponse = z.infer<typeof SessionInfoResponse>;
|
|
170
|
+
//# sourceMappingURL=upload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../src/upload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,qBAAqB,QAA2B,CAAC;AAG9D,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAoBrC,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASjC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE5E,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;EAKpC,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAElF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;EAWvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D,eAAO,MAAM,iBAAiB;;;;;;EAA0C,CAAC;AACzE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE,eAAO,MAAM,WAAW;;;;;;EAAkD,CAAC;AAC3E,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW9B,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
package/dist/upload.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
// Cap individual file at 100 GB. Project-aggregate caps live elsewhere.
|
|
3
|
+
export const MAX_UPLOAD_FILE_BYTES = 100 * 1024 * 1024 * 1024;
|
|
4
|
+
// Cap a single declare batch at 200 entries — keeps Cloud Run request size
|
|
5
|
+
// bounded and matches the recommendation in the spec (§4 step 5).
|
|
6
|
+
export const DECLARE_BATCH_MAX = 200;
|
|
7
|
+
// Apply NFC normalization first so macOS (NFD) and Linux (NFC) callers
|
|
8
|
+
// produce byte-identical paths for the same logical file. Required for
|
|
9
|
+
// the partial-unique-index dedup property (spec §5.3, §6.2 declare).
|
|
10
|
+
const RelativePath = z
|
|
11
|
+
.string()
|
|
12
|
+
.min(1)
|
|
13
|
+
.max(1024)
|
|
14
|
+
.transform((p) => p.normalize("NFC"))
|
|
15
|
+
.pipe(z
|
|
16
|
+
.string()
|
|
17
|
+
.regex(/^[^/]/, "must not start with /")
|
|
18
|
+
.refine((p) => !p.includes("\\"), { message: "must not contain backslashes" })
|
|
19
|
+
.refine((p) => !p.split("/").includes(".."), { message: "must not contain .." })
|
|
20
|
+
.refine((p) => !p.includes("\0"), { message: "must not contain NUL bytes" })
|
|
21
|
+
.refine((p) => !p.endsWith("/"), { message: "must not end with /" }));
|
|
22
|
+
export const InitUploadSessionInput = z.object({
|
|
23
|
+
projectId: z.string().uuid().optional(),
|
|
24
|
+
projectName: z.string().min(1).max(200).optional(),
|
|
25
|
+
projectDescription: z.string().max(2000).optional(),
|
|
26
|
+
sourceFolderName: z.string().min(1).max(200),
|
|
27
|
+
expectedFileCount: z.number().int().nonnegative(),
|
|
28
|
+
expectedTotalBytes: z.number().int().nonnegative(),
|
|
29
|
+
}).refine((v) => Boolean(v.projectId) !== Boolean(v.projectName), {
|
|
30
|
+
message: "exactly one of projectId or projectName is required",
|
|
31
|
+
});
|
|
32
|
+
export const InitUploadSessionResponse = z.object({
|
|
33
|
+
sessionId: z.string().uuid(),
|
|
34
|
+
projectId: z.string().uuid(),
|
|
35
|
+
command: z.string(),
|
|
36
|
+
expiresAt: z.string().datetime(),
|
|
37
|
+
});
|
|
38
|
+
export const DeclareInput = z.object({
|
|
39
|
+
files: z
|
|
40
|
+
.array(z.object({
|
|
41
|
+
relativePath: RelativePath,
|
|
42
|
+
sizeBytes: z.number().int().nonnegative().max(MAX_UPLOAD_FILE_BYTES),
|
|
43
|
+
contentType: z.string().min(1).max(200),
|
|
44
|
+
}))
|
|
45
|
+
.min(1)
|
|
46
|
+
.max(DECLARE_BATCH_MAX),
|
|
47
|
+
});
|
|
48
|
+
export const DeclareResponse = z.object({
|
|
49
|
+
files: z.array(z.object({
|
|
50
|
+
fileId: z.string().uuid(),
|
|
51
|
+
relativePath: z.string(),
|
|
52
|
+
sessionUri: z.string().url().nullable(),
|
|
53
|
+
alreadyUploaded: z.boolean(),
|
|
54
|
+
})),
|
|
55
|
+
});
|
|
56
|
+
export const CompleteFileInput = z.object({ fileId: z.string().uuid() });
|
|
57
|
+
export const FinishInput = z.object({ cancelled: z.boolean().optional() });
|
|
58
|
+
export const SessionInfoResponse = z.object({
|
|
59
|
+
projectId: z.string().uuid(),
|
|
60
|
+
projectName: z.string(),
|
|
61
|
+
sourceFolderName: z.string(),
|
|
62
|
+
expectedFileCount: z.number().int().nonnegative(),
|
|
63
|
+
expectedTotalBytes: z.number().int().nonnegative(),
|
|
64
|
+
status: z.enum(["pending", "active", "complete", "revoked", "expired"]),
|
|
65
|
+
expiresAt: z.string().datetime(),
|
|
66
|
+
filesDeclared: z.number().int().nonnegative(),
|
|
67
|
+
filesCompleted: z.number().int().nonnegative(),
|
|
68
|
+
bytesCompleted: z.number().int().nonnegative(),
|
|
69
|
+
});
|
|
70
|
+
//# sourceMappingURL=upload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload.js","sourceRoot":"","sources":["../src/upload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,wEAAwE;AACxE,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC9D,2EAA2E;AAC3E,kEAAkE;AAClE,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CA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AAC,QAAQ,EAAE;IAChC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAC7C,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAC9C,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;CAC/C,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cephla/types",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Shared Zod schemas and small utilities for the Cephla file-sharing platform.",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"README.md"
|
|
19
|
+
],
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"zod": "3.23.8"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"typescript": "5.5.4",
|
|
28
|
+
"vitest": "2.0.5"
|
|
29
|
+
},
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=20"
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "tsc -p tsconfig.build.json",
|
|
35
|
+
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput",
|
|
36
|
+
"test": "vitest run",
|
|
37
|
+
"typecheck": "tsc --noEmit"
|
|
38
|
+
}
|
|
39
|
+
}
|