@lotics/cli 0.281.0 → 0.282.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/src/cli.js +182 -2
- package/package.json +1 -1
package/dist/src/cli.js
CHANGED
|
@@ -21977,6 +21977,186 @@ function fixtureWriteOrder(entities) {
|
|
|
21977
21977
|
return { cycle: entities.filter((entity) => !placed.has(entity.alias)).map((entity) => entity.alias) };
|
|
21978
21978
|
}
|
|
21979
21979
|
|
|
21980
|
+
// ../shared/src/schemas/files.ts
|
|
21981
|
+
var processedFileSchema = zod_default.object({
|
|
21982
|
+
id: zod_default.string().describe("Unique identifier for the processed file"),
|
|
21983
|
+
filename: zod_default.string().describe("Original filename of the uploaded file"),
|
|
21984
|
+
mime_type: zod_default.string().describe("MIME type of the file (e.g., 'image/png', 'application/pdf')"),
|
|
21985
|
+
// Stable proxy URL (`/v1/files/<file_storage_key>`), resolved at serving time
|
|
21986
|
+
// — never stored in the DB.
|
|
21987
|
+
url: zod_default.string().optional().describe("Stable file serving URL, resolved at serving time"),
|
|
21988
|
+
thumbnail_url: zod_default.string().optional().describe("Thumbnail URL for image files, resolved at serving time"),
|
|
21989
|
+
preview_url: zod_default.string().optional().describe("Preview URL for legacy Excel files, resolved at serving time"),
|
|
21990
|
+
provider: zod_default.string().describe("Storage provider name (e.g., 'aws', 'gcs')"),
|
|
21991
|
+
file_storage_key: zod_default.string().describe("Storage key/path where the file is stored"),
|
|
21992
|
+
workspace_id: zod_default.string().describe("ID of the workspace this file belongs to"),
|
|
21993
|
+
size: zod_default.number().nullish().describe("Byte size of the stored object (null until backfilled)"),
|
|
21994
|
+
created_at: zod_default.string().describe("Timestamp when file was uploaded"),
|
|
21995
|
+
metadata: zod_default.unknown().describe("Additional metadata about the file"),
|
|
21996
|
+
data: zod_default.unknown().describe("File-type-specific data (e.g., {width, height, orientation} for images)")
|
|
21997
|
+
});
|
|
21998
|
+
var fileUploadErrorSchema = zod_default.object({
|
|
21999
|
+
filename: zod_default.string().describe("Original filename that failed to upload"),
|
|
22000
|
+
error: zod_default.string().describe("Error message describing the failure reason")
|
|
22001
|
+
});
|
|
22002
|
+
var fileUploadResponseSchema = zod_default.object({
|
|
22003
|
+
files: zod_default.array(processedFileSchema).describe("Successfully uploaded files"),
|
|
22004
|
+
errors: zod_default.array(fileUploadErrorSchema).describe("Files that failed to upload with error details")
|
|
22005
|
+
});
|
|
22006
|
+
var fileFieldValueSchema = zod_default.object({
|
|
22007
|
+
id: zod_default.string().describe("Unique identifier for the file"),
|
|
22008
|
+
/**
|
|
22009
|
+
* Present on a STORED cell and on its way off responses.
|
|
22010
|
+
*
|
|
22011
|
+
* Optional here because this schema types both, and a response is the half
|
|
22012
|
+
* that loses it — no client reads it, and one that required it would reject
|
|
22013
|
+
* the first response without it. Nothing weakens at write time: a file cell
|
|
22014
|
+
* is written from file IDS and `resolveFileFieldIds` mints this from the
|
|
22015
|
+
* `files` row, so a caller never supplies it and a stored cell always has it.
|
|
22016
|
+
* Code that derives a serving URL guards for it (`file_url_resolver.ts`).
|
|
22017
|
+
*/
|
|
22018
|
+
file_storage_key: zod_default.string().optional().describe("Storage key for the file"),
|
|
22019
|
+
filename: zod_default.string().describe("Original filename"),
|
|
22020
|
+
mime_type: zod_default.string().describe("MIME type of the file"),
|
|
22021
|
+
url: zod_default.string().optional().describe("Public URL for the file, resolved at serving time"),
|
|
22022
|
+
thumbnail_url: zod_default.string().optional().describe("Thumbnail URL for image files, resolved at serving time"),
|
|
22023
|
+
preview_url: zod_default.string().optional().describe("Preview URL for legacy Excel files, resolved at serving time"),
|
|
22024
|
+
// Immutable file-object metadata, resolved at serving time from the `files`
|
|
22025
|
+
// row (never stored on the denormalized cell) — like `url`. `size` may be
|
|
22026
|
+
// absent for older files not yet backfilled.
|
|
22027
|
+
size: zod_default.number().nullish().describe("Byte size, resolved at serving time from the file object (null/absent until backfilled)"),
|
|
22028
|
+
created_at: zod_default.string().optional().describe("Upload timestamp, resolved at serving time from the file object"),
|
|
22029
|
+
document_template_id: zod_default.string().optional().describe("The document template the file was generated from, resolved at serving time from the file object; absent on a file a person brought")
|
|
22030
|
+
});
|
|
22031
|
+
var servedFileSchema = zod_default.object({
|
|
22032
|
+
id: zod_default.string(),
|
|
22033
|
+
filename: zod_default.string(),
|
|
22034
|
+
mime_type: zod_default.string(),
|
|
22035
|
+
url: zod_default.string().optional().describe("Serving URL, signed for 24 hours."),
|
|
22036
|
+
thumbnail_url: zod_default.string().optional().describe("Signed thumbnail, for an image."),
|
|
22037
|
+
preview_url: zod_default.string().optional(),
|
|
22038
|
+
size: zod_default.number().nullish().describe("Bytes, where the object records it."),
|
|
22039
|
+
created_at: zod_default.string().optional().describe("When the file was uploaded."),
|
|
22040
|
+
document_template_id: zod_default.string().optional().describe("The document template the file was generated from.")
|
|
22041
|
+
});
|
|
22042
|
+
var SERVED_FILE_KEYS = servedFileSchema.keyof().options;
|
|
22043
|
+
var MAX_UPLOAD_FILE_SIZE = 2 * 1024 * 1024 * 1024;
|
|
22044
|
+
var PROFILE_IMAGE_MAX_SIZE = 10 * 1024 * 1024;
|
|
22045
|
+
var UPLOAD_TICKET_TTL_SECONDS = 5 * 60;
|
|
22046
|
+
var MAX_TICKET_UPLOAD_BYTES = 20 * 1024 * 1024;
|
|
22047
|
+
var uploadTicketRequestSchema = zod_default.object({
|
|
22048
|
+
filename: zod_default.string().min(1),
|
|
22049
|
+
mime_type: zod_default.string().optional(),
|
|
22050
|
+
/** Declared up front so an oversize file is refused before its bytes move,
|
|
22051
|
+
* rather than after the transfer is already spent. Optional because a caller
|
|
22052
|
+
* streaming from a pipe may genuinely not know; the PUT enforces the cap
|
|
22053
|
+
* either way. */
|
|
22054
|
+
size_bytes: zod_default.number().int().positive().optional()
|
|
22055
|
+
});
|
|
22056
|
+
var uploadTicketResponseSchema = zod_default.object({
|
|
22057
|
+
upload_url: zod_default.string(),
|
|
22058
|
+
ticket_id: zod_default.string(),
|
|
22059
|
+
method: zod_default.literal("PUT"),
|
|
22060
|
+
expires_at: zod_default.string(),
|
|
22061
|
+
max_bytes: zod_default.number(),
|
|
22062
|
+
required_headers: zod_default.record(zod_default.string(), zod_default.string())
|
|
22063
|
+
});
|
|
22064
|
+
var uploadTicketResultSchema = zod_default.object({
|
|
22065
|
+
file_id: zod_default.string(),
|
|
22066
|
+
file_name: zod_default.string(),
|
|
22067
|
+
mime_type: zod_default.string(),
|
|
22068
|
+
size_bytes: zod_default.number(),
|
|
22069
|
+
sha256: zod_default.string(),
|
|
22070
|
+
/** True when these bytes were already in the workspace and no second copy was
|
|
22071
|
+
* stored. Stated rather than left to inference, because the caller then gets
|
|
22072
|
+
* back a `file_name` it did not send — the stored file's, not the one it
|
|
22073
|
+
* uploaded under — and a silent difference reads as a bug. */
|
|
22074
|
+
deduplicated: zod_default.boolean()
|
|
22075
|
+
});
|
|
22076
|
+
var fileSizeSchema = zod_default.number().int().positive().max(MAX_UPLOAD_FILE_SIZE);
|
|
22077
|
+
var directUploadInitRequestSchema = zod_default.object({
|
|
22078
|
+
file_id: zod_default.string().optional(),
|
|
22079
|
+
filename: zod_default.string(),
|
|
22080
|
+
mime_type: zod_default.string(),
|
|
22081
|
+
file_size: fileSizeSchema
|
|
22082
|
+
});
|
|
22083
|
+
var directUploadInitResponseSchema = zod_default.object({
|
|
22084
|
+
file_id: zod_default.string(),
|
|
22085
|
+
file_storage_key: zod_default.string(),
|
|
22086
|
+
upload_url: zod_default.string()
|
|
22087
|
+
});
|
|
22088
|
+
var directUploadCompleteRequestSchema = zod_default.object({
|
|
22089
|
+
file_id: zod_default.string(),
|
|
22090
|
+
file_storage_key: zod_default.string(),
|
|
22091
|
+
filename: zod_default.string(),
|
|
22092
|
+
mime_type: zod_default.string(),
|
|
22093
|
+
original_file_id: zod_default.string().optional().describe(
|
|
22094
|
+
"When set, this upload becomes a new version of the original file. The server resolves the current latest, links the new row via source_file_id, and bumps the original's latest_version_id pointer."
|
|
22095
|
+
)
|
|
22096
|
+
});
|
|
22097
|
+
var multipartInitRequestSchema = zod_default.object({
|
|
22098
|
+
file_id: zod_default.string().optional(),
|
|
22099
|
+
filename: zod_default.string(),
|
|
22100
|
+
mime_type: zod_default.string(),
|
|
22101
|
+
file_size: fileSizeSchema,
|
|
22102
|
+
network_effective_type: zod_default.enum(["slow-2g", "2g", "3g", "4g"]).optional(),
|
|
22103
|
+
network_rtt_ms: zod_default.number().nonnegative().optional()
|
|
22104
|
+
});
|
|
22105
|
+
var multipartInitResponseSchema = zod_default.object({
|
|
22106
|
+
file_id: zod_default.string(),
|
|
22107
|
+
upload_id: zod_default.string(),
|
|
22108
|
+
file_storage_key: zod_default.string(),
|
|
22109
|
+
part_size: zod_default.number(),
|
|
22110
|
+
parts: zod_default.array(
|
|
22111
|
+
zod_default.object({
|
|
22112
|
+
part_number: zod_default.number(),
|
|
22113
|
+
url: zod_default.string()
|
|
22114
|
+
})
|
|
22115
|
+
)
|
|
22116
|
+
});
|
|
22117
|
+
var multipartCompleteRequestSchema = zod_default.object({
|
|
22118
|
+
file_id: zod_default.string(),
|
|
22119
|
+
upload_id: zod_default.string(),
|
|
22120
|
+
file_storage_key: zod_default.string(),
|
|
22121
|
+
filename: zod_default.string(),
|
|
22122
|
+
mime_type: zod_default.string(),
|
|
22123
|
+
parts: zod_default.array(
|
|
22124
|
+
zod_default.object({
|
|
22125
|
+
part_number: zod_default.number(),
|
|
22126
|
+
etag: zod_default.string()
|
|
22127
|
+
})
|
|
22128
|
+
),
|
|
22129
|
+
original_file_id: zod_default.string().optional().describe(
|
|
22130
|
+
"When set, this upload becomes a new version of the original file. The server resolves the current latest, links the new row via source_file_id, and bumps the original's latest_version_id pointer."
|
|
22131
|
+
)
|
|
22132
|
+
});
|
|
22133
|
+
var multipartAbortRequestSchema = zod_default.object({
|
|
22134
|
+
upload_id: zod_default.string(),
|
|
22135
|
+
file_storage_key: zod_default.string()
|
|
22136
|
+
});
|
|
22137
|
+
var fileVersionEntrySchema = zod_default.object({
|
|
22138
|
+
id: zod_default.string(),
|
|
22139
|
+
filename: zod_default.string(),
|
|
22140
|
+
/**
|
|
22141
|
+
* Resolved by the server, because deriving it needs the storage key and a
|
|
22142
|
+
* caller that derives is a caller that must be handed one. Every other file
|
|
22143
|
+
* shape already resolves its URL at serving time; this one did not, which is
|
|
22144
|
+
* the whole reason the key still travels here.
|
|
22145
|
+
*/
|
|
22146
|
+
url: zod_default.string(),
|
|
22147
|
+
/** @deprecated Unread by any client — resolve bytes through `url` or `id`. */
|
|
22148
|
+
file_storage_key: zod_default.string(),
|
|
22149
|
+
mime_type: zod_default.string(),
|
|
22150
|
+
created_at: zod_default.string(),
|
|
22151
|
+
is_current: zod_default.boolean(),
|
|
22152
|
+
source_file_id: zod_default.string().nullable()
|
|
22153
|
+
});
|
|
22154
|
+
var fileVersionListResponseSchema = zod_default.object({
|
|
22155
|
+
original_file_id: zod_default.string(),
|
|
22156
|
+
current_version_id: zod_default.string(),
|
|
22157
|
+
versions: zod_default.array(fileVersionEntrySchema).describe("Ordered newest \u2192 oldest. Index 0 is the current version.")
|
|
22158
|
+
});
|
|
22159
|
+
|
|
21980
22160
|
// ../../node_modules/date-fns/constants.js
|
|
21981
22161
|
var daysInYear = 365.2425;
|
|
21982
22162
|
var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1e3;
|
|
@@ -40264,8 +40444,8 @@ function resultSideEffects(result) {
|
|
|
40264
40444
|
}
|
|
40265
40445
|
|
|
40266
40446
|
// src/version.ts
|
|
40267
|
-
var VERSION = "0.
|
|
40268
|
-
var APP_SDK_VERSION = "0.
|
|
40447
|
+
var VERSION = "0.282.0";
|
|
40448
|
+
var APP_SDK_VERSION = "0.109.0";
|
|
40269
40449
|
|
|
40270
40450
|
// src/timezone.ts
|
|
40271
40451
|
function machineTimezone() {
|