@dropthis/cli 0.4.1 → 0.5.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.
@@ -0,0 +1,49 @@
1
+ import { m as DropthisClientOptions, l as DropsResource, A as AccountResource, b as ApiKeysResource, D as DeploymentsResource, o as DropthisResult, k as DropResponse } from './drops-fK63OCk6.cjs';
2
+
3
+ /** In-memory publish input: an HTML/text string, or raw bytes with a filename + content type. */
4
+ type InlineInput = string | {
5
+ bytes: Uint8Array;
6
+ filename?: string;
7
+ contentType?: string;
8
+ };
9
+ type PublishInlineOptions = {
10
+ /** Drop title. */
11
+ title?: string;
12
+ /** Serving visibility. */
13
+ visibility?: "public" | "unlisted";
14
+ /** Require a password to view (Pro). */
15
+ password?: string | null;
16
+ /** Force search engines not to index. */
17
+ noindex?: boolean | null;
18
+ /** Set or clear automatic expiry (ISO 8601). */
19
+ expiresAt?: string | null;
20
+ /** Override the entry path/filename for string input (default index.html). */
21
+ path?: string;
22
+ /** Override the detected content type for string input. */
23
+ contentType?: string;
24
+ /** Custom drop metadata. */
25
+ metadata?: Record<string, unknown>;
26
+ /** Idempotency key base; one is generated if omitted. */
27
+ idempotencyKey?: string;
28
+ /** Optimistic-concurrency revision for deployments. */
29
+ ifRevision?: number;
30
+ };
31
+ /** Workers-safe dropthis client. Pass an apiKey explicitly (no process.env on the edge). */
32
+ declare class DropthisEdge {
33
+ private readonly transport;
34
+ private dropsResource?;
35
+ private accountResource?;
36
+ private apiKeysResource?;
37
+ private deploymentsResource?;
38
+ constructor(options?: DropthisClientOptions | string);
39
+ get drops(): DropsResource;
40
+ get account(): AccountResource;
41
+ get apiKeys(): ApiKeysResource;
42
+ get deployments(): DeploymentsResource;
43
+ /** Publish a NEW drop from in-memory content. */
44
+ publishInline(input: InlineInput, options?: PublishInlineOptions): Promise<DropthisResult<DropResponse>>;
45
+ /** Publish a NEW content version to an existing drop, keeping its URL. */
46
+ deployInline(dropId: string, input: InlineInput, options?: PublishInlineOptions): Promise<DropthisResult<DropResponse>>;
47
+ }
48
+
49
+ export { DropthisEdge, type InlineInput, type PublishInlineOptions };
@@ -0,0 +1,49 @@
1
+ import { m as DropthisClientOptions, l as DropsResource, A as AccountResource, b as ApiKeysResource, D as DeploymentsResource, o as DropthisResult, k as DropResponse } from './drops-fK63OCk6.js';
2
+
3
+ /** In-memory publish input: an HTML/text string, or raw bytes with a filename + content type. */
4
+ type InlineInput = string | {
5
+ bytes: Uint8Array;
6
+ filename?: string;
7
+ contentType?: string;
8
+ };
9
+ type PublishInlineOptions = {
10
+ /** Drop title. */
11
+ title?: string;
12
+ /** Serving visibility. */
13
+ visibility?: "public" | "unlisted";
14
+ /** Require a password to view (Pro). */
15
+ password?: string | null;
16
+ /** Force search engines not to index. */
17
+ noindex?: boolean | null;
18
+ /** Set or clear automatic expiry (ISO 8601). */
19
+ expiresAt?: string | null;
20
+ /** Override the entry path/filename for string input (default index.html). */
21
+ path?: string;
22
+ /** Override the detected content type for string input. */
23
+ contentType?: string;
24
+ /** Custom drop metadata. */
25
+ metadata?: Record<string, unknown>;
26
+ /** Idempotency key base; one is generated if omitted. */
27
+ idempotencyKey?: string;
28
+ /** Optimistic-concurrency revision for deployments. */
29
+ ifRevision?: number;
30
+ };
31
+ /** Workers-safe dropthis client. Pass an apiKey explicitly (no process.env on the edge). */
32
+ declare class DropthisEdge {
33
+ private readonly transport;
34
+ private dropsResource?;
35
+ private accountResource?;
36
+ private apiKeysResource?;
37
+ private deploymentsResource?;
38
+ constructor(options?: DropthisClientOptions | string);
39
+ get drops(): DropsResource;
40
+ get account(): AccountResource;
41
+ get apiKeys(): ApiKeysResource;
42
+ get deployments(): DeploymentsResource;
43
+ /** Publish a NEW drop from in-memory content. */
44
+ publishInline(input: InlineInput, options?: PublishInlineOptions): Promise<DropthisResult<DropResponse>>;
45
+ /** Publish a NEW content version to an existing drop, keeping its URL. */
46
+ deployInline(dropId: string, input: InlineInput, options?: PublishInlineOptions): Promise<DropthisResult<DropResponse>>;
47
+ }
48
+
49
+ export { DropthisEdge, type InlineInput, type PublishInlineOptions };
@@ -0,0 +1,557 @@
1
+ // src/errors.ts
2
+ var API_KEY_RE = /sk_[A-Za-z0-9_-]+/g;
3
+ function redactSecrets(message) {
4
+ return message.replace(API_KEY_RE, "sk_[redacted]");
5
+ }
6
+ function createErrorResult(code, message, statusCode, extra = {}) {
7
+ return {
8
+ data: null,
9
+ error: {
10
+ code,
11
+ message: redactSecrets(message),
12
+ statusCode,
13
+ ...extra.type ? { type: extra.type } : {},
14
+ ...extra.detail !== void 0 ? { detail: extra.detail } : {},
15
+ ...extra.param !== void 0 ? { param: extra.param } : {},
16
+ ...extra.currentRevision !== void 0 ? { currentRevision: extra.currentRevision } : {},
17
+ ...extra.requestId !== void 0 ? { requestId: extra.requestId } : {},
18
+ ...extra.suggestion !== void 0 ? { suggestion: extra.suggestion } : {},
19
+ ...extra.retryable !== void 0 ? { retryable: extra.retryable } : {}
20
+ },
21
+ headers: extra.headers ?? {}
22
+ };
23
+ }
24
+
25
+ // src/resources/account.ts
26
+ var AccountResource = class {
27
+ constructor(transport) {
28
+ this.transport = transport;
29
+ }
30
+ transport;
31
+ get() {
32
+ return this.transport.request("GET", "/account");
33
+ }
34
+ update(input) {
35
+ return this.transport.request("PATCH", "/account", { body: input });
36
+ }
37
+ delete() {
38
+ return this.transport.request("DELETE", "/account");
39
+ }
40
+ };
41
+
42
+ // src/resources/api-keys.ts
43
+ var ApiKeysResource = class {
44
+ constructor(transport) {
45
+ this.transport = transport;
46
+ }
47
+ transport;
48
+ list() {
49
+ return this.transport.request("GET", "/api-keys");
50
+ }
51
+ create(input) {
52
+ return this.transport.request("POST", "/api-keys", { body: input });
53
+ }
54
+ delete(keyId) {
55
+ return this.transport.request(
56
+ "DELETE",
57
+ `/api-keys/${encodeURIComponent(keyId)}`
58
+ );
59
+ }
60
+ };
61
+
62
+ // src/resources/deployments.ts
63
+ var DeploymentsResource = class {
64
+ constructor(transport) {
65
+ this.transport = transport;
66
+ }
67
+ transport;
68
+ create(dropId, body, options = {}) {
69
+ const requestOptions = { body };
70
+ if (options.idempotencyKey)
71
+ requestOptions.idempotencyKey = options.idempotencyKey;
72
+ if (options.ifRevision !== void 0)
73
+ requestOptions.ifRevision = options.ifRevision;
74
+ return this.transport.request(
75
+ "POST",
76
+ `/drops/${encodeURIComponent(dropId)}/deployments`,
77
+ requestOptions
78
+ );
79
+ }
80
+ createRaw(dropId, body, options = {}) {
81
+ const requestOptions = {
82
+ body,
83
+ bodyCase: "raw"
84
+ };
85
+ if (options.idempotencyKey)
86
+ requestOptions.idempotencyKey = options.idempotencyKey;
87
+ if (options.ifRevision !== void 0)
88
+ requestOptions.ifRevision = options.ifRevision;
89
+ return this.transport.request(
90
+ "POST",
91
+ `/drops/${encodeURIComponent(dropId)}/deployments`,
92
+ requestOptions
93
+ );
94
+ }
95
+ list(dropId, params = {}) {
96
+ return this.transport.request(
97
+ "GET",
98
+ `/drops/${encodeURIComponent(dropId)}/deployments`,
99
+ { params }
100
+ );
101
+ }
102
+ get(dropId, deploymentId) {
103
+ return this.transport.request(
104
+ "GET",
105
+ `/drops/${encodeURIComponent(dropId)}/deployments/${encodeURIComponent(deploymentId)}`
106
+ );
107
+ }
108
+ };
109
+
110
+ // src/pagination.ts
111
+ var CursorPage = class {
112
+ object = "list";
113
+ data;
114
+ hasMore;
115
+ nextCursor;
116
+ fetchNextPage;
117
+ constructor(input) {
118
+ this.data = input.data;
119
+ this.hasMore = input.hasMore;
120
+ this.nextCursor = input.nextCursor;
121
+ this.fetchNextPage = input.fetchNextPage;
122
+ }
123
+ async autoPagingToArray(options = {}) {
124
+ const items = [];
125
+ for await (const item of this) {
126
+ items.push(item);
127
+ if (options.limit !== void 0 && items.length >= options.limit) break;
128
+ }
129
+ return items;
130
+ }
131
+ async *[Symbol.asyncIterator]() {
132
+ for (const item of this.data) yield item;
133
+ let current = this;
134
+ while (current.hasMore && current.fetchNextPage) {
135
+ const next = await current.fetchNextPage();
136
+ if (next.error) break;
137
+ current = next.data;
138
+ for (const item of current.data) yield item;
139
+ }
140
+ }
141
+ };
142
+
143
+ // src/resources/drops.ts
144
+ var DropsResource = class {
145
+ constructor(transport) {
146
+ this.transport = transport;
147
+ }
148
+ transport;
149
+ create(body, options = {}) {
150
+ const requestOptions = { body };
151
+ if (options.idempotencyKey)
152
+ requestOptions.idempotencyKey = options.idempotencyKey;
153
+ return this.transport.request("POST", "/drops", requestOptions);
154
+ }
155
+ createRaw(body, options = {}) {
156
+ const requestOptions = {
157
+ body,
158
+ bodyCase: "raw"
159
+ };
160
+ if (options.idempotencyKey)
161
+ requestOptions.idempotencyKey = options.idempotencyKey;
162
+ return this.transport.request("POST", "/drops", requestOptions);
163
+ }
164
+ async list(params = {}) {
165
+ const result = await this.transport.request("GET", "/drops", {
166
+ params
167
+ });
168
+ if (result.error) return result;
169
+ const page = new CursorPage({
170
+ data: result.data.drops,
171
+ nextCursor: result.data.nextCursor,
172
+ hasMore: result.data.nextCursor !== null,
173
+ fetchNextPage: result.data.nextCursor ? () => this.list({ ...params, cursor: result.data.nextCursor }) : void 0
174
+ });
175
+ return { data: page, error: null, headers: result.headers };
176
+ }
177
+ get(dropId) {
178
+ return this.transport.request(
179
+ "GET",
180
+ `/drops/${encodeURIComponent(dropId)}`
181
+ );
182
+ }
183
+ update(dropId, options = {}) {
184
+ const requestOptions = {
185
+ body: updateBody(options)
186
+ };
187
+ if (options.idempotencyKey)
188
+ requestOptions.idempotencyKey = options.idempotencyKey;
189
+ if (options.ifRevision !== void 0)
190
+ requestOptions.ifRevision = options.ifRevision;
191
+ return this.transport.request(
192
+ "PATCH",
193
+ `/drops/${encodeURIComponent(dropId)}`,
194
+ requestOptions
195
+ );
196
+ }
197
+ delete(dropId) {
198
+ return this.transport.request(
199
+ "DELETE",
200
+ `/drops/${encodeURIComponent(dropId)}`
201
+ );
202
+ }
203
+ };
204
+ function updateBody(options) {
205
+ const {
206
+ metadata,
207
+ idempotencyKey: _idempotencyKey,
208
+ ifRevision: _ifRevision,
209
+ entry: _entry,
210
+ ...dropOptions2
211
+ } = options;
212
+ return { options: dropOptions2, metadata };
213
+ }
214
+
215
+ // src/case.ts
216
+ function toCamelKey(key) {
217
+ return key.replace(/_([a-z])/g, (_, char) => char.toUpperCase());
218
+ }
219
+ function toSnakeKey(key) {
220
+ return key.replace(/[A-Z]/g, (char) => `_${char.toLowerCase()}`);
221
+ }
222
+ var PASSTHROUGH_KEYS = /* @__PURE__ */ new Set(["metadata"]);
223
+ function toCamelCase(value) {
224
+ if (Array.isArray(value)) return value.map(toCamelCase);
225
+ if (value && typeof value === "object") {
226
+ return Object.fromEntries(
227
+ Object.entries(value).map(([key, item]) => [
228
+ toCamelKey(key),
229
+ PASSTHROUGH_KEYS.has(key) ? item : toCamelCase(item)
230
+ ])
231
+ );
232
+ }
233
+ return value;
234
+ }
235
+ function toSnakeCase(value) {
236
+ if (Array.isArray(value)) return value.map(toSnakeCase);
237
+ if (value && typeof value === "object") {
238
+ return Object.fromEntries(
239
+ Object.entries(value).filter(([, item]) => item !== void 0).map(([key, item]) => [
240
+ toSnakeKey(key),
241
+ PASSTHROUGH_KEYS.has(key) ? item : toSnakeCase(item)
242
+ ])
243
+ );
244
+ }
245
+ return value;
246
+ }
247
+
248
+ // src/transport.ts
249
+ var DEFAULT_BASE_URL = "https://api.dropthis.app";
250
+ var SDK_VERSION = "0.5.0";
251
+ var Transport = class {
252
+ apiKey;
253
+ baseUrl;
254
+ timeoutMs;
255
+ fetchImpl;
256
+ constructor(options = {}) {
257
+ const resolved = typeof options === "string" ? { apiKey: options } : options;
258
+ this.apiKey = resolved.apiKey ?? (typeof process !== "undefined" ? process.env?.DROPTHIS_API_KEY : void 0);
259
+ this.baseUrl = (resolved.baseUrl ?? DEFAULT_BASE_URL).replace(/\/+$/, "");
260
+ this.timeoutMs = resolved.timeoutMs ?? 3e4;
261
+ this.fetchImpl = resolved.fetch ?? globalThis.fetch;
262
+ }
263
+ multipart(method, path, form, options = {}) {
264
+ return this.request(method, path, { ...options, body: form });
265
+ }
266
+ async putSignedUrl(url, body, headers) {
267
+ const controller = new AbortController();
268
+ const timeout = setTimeout(() => controller.abort(), this.timeoutMs);
269
+ try {
270
+ const request = {
271
+ method: "PUT",
272
+ headers,
273
+ body,
274
+ signal: controller.signal
275
+ };
276
+ if (body instanceof ReadableStream) request.duplex = "half";
277
+ const response = await this.fetchImpl(url, request);
278
+ const responseHeaders = headersToObject(response.headers);
279
+ if (!response.ok) {
280
+ const text = await response.text();
281
+ return createErrorResult(
282
+ `signed_upload_${response.status}`,
283
+ text || response.statusText,
284
+ response.status,
285
+ { headers: responseHeaders }
286
+ );
287
+ }
288
+ return {
289
+ data: {
290
+ etag: response.headers.get("ETag") ?? responseHeaders.etag ?? null
291
+ },
292
+ error: null,
293
+ headers: responseHeaders
294
+ };
295
+ } catch (error) {
296
+ const message = error instanceof Error && error.name === "AbortError" ? "Request timed out" : error instanceof Error ? error.message : "Network error";
297
+ return createErrorResult(
298
+ error instanceof Error && error.name === "AbortError" ? "timeout" : "network_error",
299
+ message,
300
+ null
301
+ );
302
+ } finally {
303
+ clearTimeout(timeout);
304
+ }
305
+ }
306
+ async request(method, path, options = {}) {
307
+ const authenticated = options.authenticated ?? true;
308
+ if (authenticated && !this.apiKey) {
309
+ return createErrorResult(
310
+ "missing_api_key",
311
+ "No API key provided. Pass apiKey or set DROPTHIS_API_KEY.",
312
+ null
313
+ );
314
+ }
315
+ const headers = {
316
+ "user-agent": `dropthis-node/${SDK_VERSION}`
317
+ };
318
+ if (authenticated && this.apiKey)
319
+ headers.authorization = `Bearer ${this.apiKey}`;
320
+ if (options.idempotencyKey)
321
+ headers["idempotency-key"] = options.idempotencyKey;
322
+ if (options.ifRevision !== void 0)
323
+ headers["If-Revision"] = String(options.ifRevision);
324
+ if (options.body !== void 0 && !(options.body instanceof FormData))
325
+ headers["content-type"] = "application/json";
326
+ const url = new URL(`${this.baseUrl}${path}`);
327
+ const wireParams = options.bodyCase === "raw" ? options.params : toSnakeCase(options.params ?? {});
328
+ for (const [key, value] of Object.entries(wireParams ?? {})) {
329
+ if (value !== void 0 && value !== null)
330
+ url.searchParams.set(key, String(value));
331
+ }
332
+ const controller = new AbortController();
333
+ const timeout = setTimeout(
334
+ () => controller.abort(),
335
+ options.timeoutMs ?? this.timeoutMs
336
+ );
337
+ try {
338
+ const request = {
339
+ method,
340
+ headers,
341
+ signal: controller.signal
342
+ };
343
+ if (options.body instanceof FormData) {
344
+ request.body = options.body;
345
+ } else if (options.body !== void 0) {
346
+ const wireBody = options.bodyCase === "raw" ? options.body : toSnakeCase(options.body);
347
+ request.body = JSON.stringify(wireBody);
348
+ }
349
+ const response = await this.fetchImpl(url.toString(), request);
350
+ const responseHeaders = headersToObject(response.headers);
351
+ const text = await response.text();
352
+ const parsed = parseJson(text);
353
+ if (!response.ok) {
354
+ const body = parsed && typeof parsed === "object" ? parsed : {};
355
+ const message = stringValue(body.detail) ?? stringValue(body.error) ?? stringValue(body.message) ?? response.statusText;
356
+ const code = stringValue(body.code) ?? stringValue(body.error_code) ?? `http_${response.status}`;
357
+ const currentRevision = numberValue(body.current_revision);
358
+ return createErrorResult(code, message, response.status, {
359
+ detail: body,
360
+ param: stringValue(body.param),
361
+ ...currentRevision !== void 0 ? { currentRevision } : {},
362
+ requestId: stringValue(body.request_id) ?? responseHeaders["x-request-id"] ?? null,
363
+ suggestion: stringValue(body.suggestion),
364
+ retryable: booleanValue(body.retryable),
365
+ headers: responseHeaders
366
+ });
367
+ }
368
+ return {
369
+ data: toCamelCase(parsed),
370
+ error: null,
371
+ headers: responseHeaders
372
+ };
373
+ } catch (error) {
374
+ const message = error instanceof Error && error.name === "AbortError" ? "Request timed out" : error instanceof Error ? error.message : "Network error";
375
+ return createErrorResult(
376
+ error instanceof Error && error.name === "AbortError" ? "timeout" : "network_error",
377
+ message,
378
+ null
379
+ );
380
+ } finally {
381
+ clearTimeout(timeout);
382
+ }
383
+ }
384
+ };
385
+ function headersToObject(headers) {
386
+ const result = {};
387
+ headers.forEach((value, key) => {
388
+ result[key.toLowerCase()] = value;
389
+ });
390
+ return result;
391
+ }
392
+ function parseJson(text) {
393
+ if (!text) return null;
394
+ try {
395
+ return JSON.parse(text);
396
+ } catch {
397
+ return text;
398
+ }
399
+ }
400
+ function stringValue(value) {
401
+ return typeof value === "string" ? value : null;
402
+ }
403
+ function numberValue(value) {
404
+ return typeof value === "number" ? value : void 0;
405
+ }
406
+ function booleanValue(value) {
407
+ return typeof value === "boolean" ? value : null;
408
+ }
409
+
410
+ // src/edge.ts
411
+ var DROP_OPTION_KEYS = [
412
+ "title",
413
+ "visibility",
414
+ "password",
415
+ "noindex",
416
+ "expiresAt"
417
+ ];
418
+ function detectStringContentType(value) {
419
+ const trimmed = value.trimStart().toLowerCase();
420
+ if (trimmed.startsWith("<!doctype html") || trimmed.startsWith("<html") || /^<[a-z][a-z0-9:-]*(\s|>)/.test(trimmed)) {
421
+ return "text/html";
422
+ }
423
+ return "text/plain; charset=utf-8";
424
+ }
425
+ function defaultEntry(contentType) {
426
+ const media = contentType.split(";", 1)[0]?.trim().toLowerCase() ?? "";
427
+ return media === "text/html" ? "index.html" : "index.txt";
428
+ }
429
+ function normalizeInput(input, options) {
430
+ if (typeof input === "string") {
431
+ const contentType = options.contentType ?? detectStringContentType(input);
432
+ return {
433
+ bytes: new TextEncoder().encode(input),
434
+ path: options.path ?? defaultEntry(contentType),
435
+ contentType
436
+ };
437
+ }
438
+ return {
439
+ bytes: input.bytes,
440
+ path: input.filename ?? options.path ?? "index.html",
441
+ contentType: input.contentType ?? options.contentType ?? "application/octet-stream"
442
+ };
443
+ }
444
+ function dropOptions(options) {
445
+ const out = {};
446
+ for (const key of DROP_OPTION_KEYS) {
447
+ if (options[key] !== void 0) out[key] = options[key];
448
+ }
449
+ return out;
450
+ }
451
+ function errorResult(result) {
452
+ if (!result.error) throw new Error("Expected an error result");
453
+ return { data: null, error: result.error, headers: result.headers };
454
+ }
455
+ async function stagedInline(transport, input, options, finalPath) {
456
+ const { bytes, path, contentType } = normalizeInput(input, options);
457
+ const baseKey = options.idempotencyKey ?? `mcp-${crypto.randomUUID()}`;
458
+ const manifest = {
459
+ schemaVersion: 1,
460
+ files: [{ path, contentType, sizeBytes: bytes.byteLength }],
461
+ entry: path
462
+ };
463
+ const created = await transport.request(
464
+ "POST",
465
+ "/uploads",
466
+ {
467
+ body: manifest,
468
+ idempotencyKey: `${baseKey}:create-upload`
469
+ }
470
+ );
471
+ if (created.error) return errorResult(created);
472
+ const target = created.data.files[0];
473
+ if (!target) {
474
+ return createErrorResult(
475
+ "upload_target_missing",
476
+ "No upload target returned for the file.",
477
+ null
478
+ );
479
+ }
480
+ if (target.upload.strategy !== "single_put") {
481
+ return createErrorResult(
482
+ "unsupported_upload_strategy",
483
+ "Edge publishInline supports single_put uploads only; the content is too large for inline publishing.",
484
+ null
485
+ );
486
+ }
487
+ const put = await transport.putSignedUrl(
488
+ target.upload.url,
489
+ bytes,
490
+ target.upload.headers
491
+ );
492
+ if (put.error) return errorResult(put);
493
+ const completed = await transport.request(
494
+ "POST",
495
+ `/uploads/${encodeURIComponent(created.data.uploadId)}/complete`,
496
+ { body: { files: {} }, idempotencyKey: `${baseKey}:complete-upload` }
497
+ );
498
+ if (completed.error) return errorResult(completed);
499
+ const finalOptions = {
500
+ body: {
501
+ uploadId: created.data.uploadId,
502
+ options: dropOptions(options),
503
+ ...options.metadata ? { metadata: options.metadata } : {}
504
+ },
505
+ idempotencyKey: `${baseKey}:publish`
506
+ };
507
+ if (options.ifRevision !== void 0)
508
+ finalOptions.ifRevision = options.ifRevision;
509
+ return transport.request("POST", finalPath, finalOptions);
510
+ }
511
+ var DropthisEdge = class {
512
+ transport;
513
+ dropsResource;
514
+ accountResource;
515
+ apiKeysResource;
516
+ deploymentsResource;
517
+ constructor(options = {}) {
518
+ this.transport = new Transport(options);
519
+ }
520
+ get drops() {
521
+ if (!this.dropsResource)
522
+ this.dropsResource = new DropsResource(this.transport);
523
+ return this.dropsResource;
524
+ }
525
+ get account() {
526
+ if (!this.accountResource)
527
+ this.accountResource = new AccountResource(this.transport);
528
+ return this.accountResource;
529
+ }
530
+ get apiKeys() {
531
+ if (!this.apiKeysResource)
532
+ this.apiKeysResource = new ApiKeysResource(this.transport);
533
+ return this.apiKeysResource;
534
+ }
535
+ get deployments() {
536
+ if (!this.deploymentsResource)
537
+ this.deploymentsResource = new DeploymentsResource(this.transport);
538
+ return this.deploymentsResource;
539
+ }
540
+ /** Publish a NEW drop from in-memory content. */
541
+ publishInline(input, options = {}) {
542
+ return stagedInline(this.transport, input, options, "/drops");
543
+ }
544
+ /** Publish a NEW content version to an existing drop, keeping its URL. */
545
+ deployInline(dropId, input, options = {}) {
546
+ return stagedInline(
547
+ this.transport,
548
+ input,
549
+ options,
550
+ `/drops/${encodeURIComponent(dropId)}/deployments`
551
+ );
552
+ }
553
+ };
554
+ export {
555
+ DropthisEdge
556
+ };
557
+ //# sourceMappingURL=edge.mjs.map