@dropthis/cli 0.21.0 → 0.23.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/README.md +4 -0
- package/dist/cli.cjs +53 -7
- package/dist/cli.cjs.map +1 -1
- package/node_modules/@dropthis/node/dist/{drops-CSahv_jA.d.cts → drops-DNwOp7g_.d.cts} +19 -1
- package/node_modules/@dropthis/node/dist/{drops-CSahv_jA.d.ts → drops-DNwOp7g_.d.ts} +19 -1
- package/node_modules/@dropthis/node/dist/edge.cjs +13 -3
- package/node_modules/@dropthis/node/dist/edge.cjs.map +1 -1
- package/node_modules/@dropthis/node/dist/edge.d.cts +1 -1
- package/node_modules/@dropthis/node/dist/edge.d.ts +1 -1
- package/node_modules/@dropthis/node/dist/edge.mjs +13 -3
- package/node_modules/@dropthis/node/dist/edge.mjs.map +1 -1
- package/node_modules/@dropthis/node/dist/index.cjs +13 -3
- package/node_modules/@dropthis/node/dist/index.cjs.map +1 -1
- package/node_modules/@dropthis/node/dist/index.d.cts +2 -2
- package/node_modules/@dropthis/node/dist/index.d.ts +2 -2
- package/node_modules/@dropthis/node/dist/index.mjs +13 -3
- package/node_modules/@dropthis/node/dist/index.mjs.map +1 -1
- package/node_modules/@dropthis/node/package.json +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as Transport, v as DropthisResult, E as EmailOtpResponse, M as SessionResponse, C as CreateUploadSessionRequest, e as CreateUploadSessionResponse, W as UploadSessionResponse, t as DropthisClientOptions, d as ApiKeysResource, a as AccountResource, s as DropsResource, H as PublishInput, h as DeploymentsResource, m as DomainsResource, J as PublishOptions, z as PreparedPublishRequest } from './drops-
|
|
2
|
-
export { A as AccountLimits, b as AccountResponse, c as ActionResolve, f as CursorPage, D as DeploymentContentFile, g as DeploymentContentManifest, i as DnsRecord, j as DomainDeletedResponse, k as DomainListResponse, l as DomainResponse, n as DropAction, o as DropContentFile, p as DropDeploymentResponse, q as DropOptions, r as DropResponse, u as DropthisErrorResponse, G as GetContentOptions, I as InMemoryPublishInput, L as Limitations, w as ListDeploymentsParams, x as ListDeploymentsResponse, y as ListPage, N as NextHint, P as PrepareOptions, B as PreparedUploadFile, F as PublishFileInput, R as RequestControls, K as RequestOptions, S as SHARED_POOL, T as TierInfo, U as UpdateContentOptions, Q as UploadManifestFile, V as UploadSessionFileResponse, X as UploadTarget } from './drops-
|
|
1
|
+
import { O as Transport, v as DropthisResult, E as EmailOtpResponse, M as SessionResponse, C as CreateUploadSessionRequest, e as CreateUploadSessionResponse, W as UploadSessionResponse, t as DropthisClientOptions, d as ApiKeysResource, a as AccountResource, s as DropsResource, H as PublishInput, h as DeploymentsResource, m as DomainsResource, J as PublishOptions, z as PreparedPublishRequest } from './drops-DNwOp7g_.cjs';
|
|
2
|
+
export { A as AccountLimits, b as AccountResponse, c as ActionResolve, f as CursorPage, D as DeploymentContentFile, g as DeploymentContentManifest, i as DnsRecord, j as DomainDeletedResponse, k as DomainListResponse, l as DomainResponse, n as DropAction, o as DropContentFile, p as DropDeploymentResponse, q as DropOptions, r as DropResponse, u as DropthisErrorResponse, G as GetContentOptions, I as InMemoryPublishInput, L as Limitations, w as ListDeploymentsParams, x as ListDeploymentsResponse, y as ListPage, N as NextHint, P as PrepareOptions, B as PreparedUploadFile, F as PublishFileInput, R as RequestControls, K as RequestOptions, S as SHARED_POOL, T as TierInfo, U as UpdateContentOptions, Q as UploadManifestFile, V as UploadSessionFileResponse, X as UploadTarget } from './drops-DNwOp7g_.cjs';
|
|
3
3
|
|
|
4
4
|
declare class AuthResource {
|
|
5
5
|
private readonly transport;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as Transport, v as DropthisResult, E as EmailOtpResponse, M as SessionResponse, C as CreateUploadSessionRequest, e as CreateUploadSessionResponse, W as UploadSessionResponse, t as DropthisClientOptions, d as ApiKeysResource, a as AccountResource, s as DropsResource, H as PublishInput, h as DeploymentsResource, m as DomainsResource, J as PublishOptions, z as PreparedPublishRequest } from './drops-
|
|
2
|
-
export { A as AccountLimits, b as AccountResponse, c as ActionResolve, f as CursorPage, D as DeploymentContentFile, g as DeploymentContentManifest, i as DnsRecord, j as DomainDeletedResponse, k as DomainListResponse, l as DomainResponse, n as DropAction, o as DropContentFile, p as DropDeploymentResponse, q as DropOptions, r as DropResponse, u as DropthisErrorResponse, G as GetContentOptions, I as InMemoryPublishInput, L as Limitations, w as ListDeploymentsParams, x as ListDeploymentsResponse, y as ListPage, N as NextHint, P as PrepareOptions, B as PreparedUploadFile, F as PublishFileInput, R as RequestControls, K as RequestOptions, S as SHARED_POOL, T as TierInfo, U as UpdateContentOptions, Q as UploadManifestFile, V as UploadSessionFileResponse, X as UploadTarget } from './drops-
|
|
1
|
+
import { O as Transport, v as DropthisResult, E as EmailOtpResponse, M as SessionResponse, C as CreateUploadSessionRequest, e as CreateUploadSessionResponse, W as UploadSessionResponse, t as DropthisClientOptions, d as ApiKeysResource, a as AccountResource, s as DropsResource, H as PublishInput, h as DeploymentsResource, m as DomainsResource, J as PublishOptions, z as PreparedPublishRequest } from './drops-DNwOp7g_.js';
|
|
2
|
+
export { A as AccountLimits, b as AccountResponse, c as ActionResolve, f as CursorPage, D as DeploymentContentFile, g as DeploymentContentManifest, i as DnsRecord, j as DomainDeletedResponse, k as DomainListResponse, l as DomainResponse, n as DropAction, o as DropContentFile, p as DropDeploymentResponse, q as DropOptions, r as DropResponse, u as DropthisErrorResponse, G as GetContentOptions, I as InMemoryPublishInput, L as Limitations, w as ListDeploymentsParams, x as ListDeploymentsResponse, y as ListPage, N as NextHint, P as PrepareOptions, B as PreparedUploadFile, F as PublishFileInput, R as RequestControls, K as RequestOptions, S as SHARED_POOL, T as TierInfo, U as UpdateContentOptions, Q as UploadManifestFile, V as UploadSessionFileResponse, X as UploadTarget } from './drops-DNwOp7g_.js';
|
|
3
3
|
|
|
4
4
|
declare class AuthResource {
|
|
5
5
|
private readonly transport;
|
|
@@ -218,6 +218,8 @@ function updateContentOptions(options) {
|
|
|
218
218
|
if (options.idempotencyKey !== void 0)
|
|
219
219
|
out.idempotencyKey = options.idempotencyKey;
|
|
220
220
|
if (options.ifRevision !== void 0) out.ifRevision = options.ifRevision;
|
|
221
|
+
if (options.mode !== void 0) out.mode = options.mode;
|
|
222
|
+
if (options.deletePaths !== void 0) out.deletePaths = options.deletePaths;
|
|
221
223
|
return out;
|
|
222
224
|
}
|
|
223
225
|
function buildStagedRequest(files, options, entry) {
|
|
@@ -376,6 +378,12 @@ async function resolveInMemory(input, options = {}) {
|
|
|
376
378
|
const files = input.files.map(prepareBundleFile);
|
|
377
379
|
return buildStagedRequest(files, options, input.entry);
|
|
378
380
|
}
|
|
381
|
+
function partialUpdateBody(options) {
|
|
382
|
+
return {
|
|
383
|
+
...options.mode !== void 0 ? { mode: options.mode } : {},
|
|
384
|
+
...options.deletePaths !== void 0 ? { deletePaths: options.deletePaths } : {}
|
|
385
|
+
};
|
|
386
|
+
}
|
|
379
387
|
var UPLOAD_CONCURRENCY = 5;
|
|
380
388
|
var INGEST_TIMEOUT_MS = 12e4;
|
|
381
389
|
function errorResult(result) {
|
|
@@ -477,7 +485,8 @@ async function publishStaged(transport, prepared, finalPath, options = {}) {
|
|
|
477
485
|
body: {
|
|
478
486
|
uploadId: createResult.data.uploadId,
|
|
479
487
|
...Object.keys(prepared.options).length > 0 ? { options: prepared.options } : {},
|
|
480
|
-
...prepared.metadata ? { metadata: prepared.metadata } : {}
|
|
488
|
+
...prepared.metadata ? { metadata: prepared.metadata } : {},
|
|
489
|
+
...partialUpdateBody(options)
|
|
481
490
|
},
|
|
482
491
|
idempotencyKey: `${baseKey}:publish`
|
|
483
492
|
};
|
|
@@ -491,7 +500,8 @@ async function publishSource(transport, prepared, finalPath, options = {}) {
|
|
|
491
500
|
body: {
|
|
492
501
|
sourceUrl: prepared.sourceUrl,
|
|
493
502
|
...Object.keys(prepared.options).length > 0 ? { options: prepared.options } : {},
|
|
494
|
-
...prepared.metadata ? { metadata: prepared.metadata } : {}
|
|
503
|
+
...prepared.metadata ? { metadata: prepared.metadata } : {},
|
|
504
|
+
...partialUpdateBody(options)
|
|
495
505
|
},
|
|
496
506
|
idempotencyKey: `${baseKey}:publish`,
|
|
497
507
|
...options.ifRevision !== void 0 ? { ifRevision: options.ifRevision } : {}
|
|
@@ -1075,7 +1085,7 @@ function toSnakeCase(value) {
|
|
|
1075
1085
|
|
|
1076
1086
|
// src/transport.ts
|
|
1077
1087
|
var DEFAULT_BASE_URL = "https://api.dropthis.app";
|
|
1078
|
-
var SDK_VERSION = "0.
|
|
1088
|
+
var SDK_VERSION = "0.20.0";
|
|
1079
1089
|
var Transport = class {
|
|
1080
1090
|
apiKey;
|
|
1081
1091
|
baseUrl;
|