@dropthis/cli 0.35.0 → 0.37.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 +6 -4
- package/dist/cli.cjs +352 -105
- package/dist/cli.cjs.map +1 -1
- package/node_modules/@dropthis/node/dist/edge.cjs +34 -1
- 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 +34 -1
- package/node_modules/@dropthis/node/dist/edge.mjs.map +1 -1
- package/node_modules/@dropthis/node/dist/index.cjs +34 -1
- 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 +34 -1
- package/node_modules/@dropthis/node/dist/index.mjs.map +1 -1
- package/node_modules/@dropthis/node/dist/{workspaces-Cq705UM6.d.cts → workspaces-CfwVerjp.d.cts} +45 -5
- package/node_modules/@dropthis/node/dist/{workspaces-Cq705UM6.d.ts → workspaces-CfwVerjp.d.ts} +45 -5
- package/node_modules/@dropthis/node/package.json +1 -1
- package/package.json +2 -2
package/node_modules/@dropthis/node/dist/{workspaces-Cq705UM6.d.cts → workspaces-CfwVerjp.d.cts}
RENAMED
|
@@ -161,6 +161,28 @@ type ListDeploymentsResponse = {
|
|
|
161
161
|
deployments: DropDeploymentResponse[];
|
|
162
162
|
nextCursor: string | null;
|
|
163
163
|
};
|
|
164
|
+
/** One row of a `full`-depth analytics breakdown (a country code or referer host). */
|
|
165
|
+
type AnalyticsBreakdownItem = {
|
|
166
|
+
key: string;
|
|
167
|
+
views: number;
|
|
168
|
+
};
|
|
169
|
+
/** One day of the `full`-depth daily view series. */
|
|
170
|
+
type AnalyticsDailyPoint = {
|
|
171
|
+
date: string;
|
|
172
|
+
views: number;
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* Per-drop view analytics. Counts are best-effort (captured fire-and-forget at the edge),
|
|
176
|
+
* so treat them as an approximate signal. `view_count` plans (Keep) get `views`/`truncated`
|
|
177
|
+
* only; `full` plans (Pro+) also get `byCountry`/`byReferer`/`daily` (null otherwise).
|
|
178
|
+
*/
|
|
179
|
+
type DropAnalyticsResponse = {
|
|
180
|
+
views: number;
|
|
181
|
+
truncated: boolean;
|
|
182
|
+
byCountry: AnalyticsBreakdownItem[] | null;
|
|
183
|
+
byReferer: AnalyticsBreakdownItem[] | null;
|
|
184
|
+
daily: AnalyticsDailyPoint[] | null;
|
|
185
|
+
};
|
|
164
186
|
type ListPage<T> = {
|
|
165
187
|
object: "list";
|
|
166
188
|
data: T[];
|
|
@@ -867,6 +889,15 @@ declare class DeploymentsResource {
|
|
|
867
889
|
constructor(transport: Transport);
|
|
868
890
|
list(dropId: string, params?: ListDeploymentsParams): Promise<DropthisResult<ListDeploymentsResponse>>;
|
|
869
891
|
get(dropId: string, deploymentId: string): Promise<DropthisResult<DropDeploymentResponse>>;
|
|
892
|
+
/**
|
|
893
|
+
* Roll a drop back to a prior deployment's content (Pro+ version-history feature). Mints a
|
|
894
|
+
* NEW deployment whose content is copied from `deploymentId` and makes it current — the drop's
|
|
895
|
+
* URL and settings are unchanged. Restoring the deployment that is already current is a 200
|
|
896
|
+
* no-op. Below Pro returns `feature_not_in_plan` (carrying `upgradeUrl`). Returns the updated
|
|
897
|
+
* parent drop (with its `url` and bumped `revision`). Pass `idempotencyKey` to make a retry
|
|
898
|
+
* safe. POST /drops/{id}/deployments/{deploymentId}/restore.
|
|
899
|
+
*/
|
|
900
|
+
restore(dropId: string, deploymentId: string, options?: RequestControls): Promise<DropthisResult<DropResponse>>;
|
|
870
901
|
}
|
|
871
902
|
|
|
872
903
|
declare class DomainsResource {
|
|
@@ -982,6 +1013,14 @@ declare class DropsResource<TInput = PublishInput> {
|
|
|
982
1013
|
list(params?: ListDropsParams): Promise<DropthisResult<CursorPage<DropResponse>>>;
|
|
983
1014
|
/** Fetch one drop by its `drop_…` id (not the slug/URL). GET /drops/{id}. */
|
|
984
1015
|
get(dropId: string): Promise<DropthisResult<DropResponse>>;
|
|
1016
|
+
/**
|
|
1017
|
+
* Approximate view analytics for one drop, by its `drop_…` id. Gated by the `analytics`
|
|
1018
|
+
* capability: Free returns `feature_not_in_plan` (needs Keep); Keep (`view_count`) returns
|
|
1019
|
+
* `views`/`truncated` with breakdowns null; Pro+ (`full`) also returns `byCountry`/
|
|
1020
|
+
* `byReferer`/`daily`. Counts are best-effort (captured fire-and-forget at the edge) — an
|
|
1021
|
+
* approximate signal, not exact human visits. GET /drops/{id}/analytics.
|
|
1022
|
+
*/
|
|
1023
|
+
analytics(dropId: string): Promise<DropthisResult<DropAnalyticsResponse>>;
|
|
985
1024
|
/**
|
|
986
1025
|
* Resolve a public locator (a drop URL, a custom-domain URL, or a bare vanity/shared
|
|
987
1026
|
* slug) back to the drop — the way to recover a lost `drop_…` id. Sends the raw target
|
|
@@ -997,10 +1036,11 @@ declare class DropsResource<TInput = PublishInput> {
|
|
|
997
1036
|
/**
|
|
998
1037
|
* Read back what a drop is serving (owner-only; works regardless of any viewer
|
|
999
1038
|
* password). By default returns the JSON manifest of the CURRENT deployment's files;
|
|
1000
|
-
* pass `deploymentId` to read a historical (even superseded) deployment
|
|
1001
|
-
*
|
|
1002
|
-
*
|
|
1003
|
-
* that file's exact stored bytes instead.
|
|
1039
|
+
* pass `deploymentId` to read a historical (even superseded) deployment. To roll a drop
|
|
1040
|
+
* back to a prior version, use {@link DeploymentsResource.restore} (a first-class server
|
|
1041
|
+
* action) rather than downloading and republishing by hand. Pass `path` (one of the
|
|
1042
|
+
* manifest's `files[].path` values) to download that file's exact stored bytes instead.
|
|
1043
|
+
* GET /drops/{id}/content.
|
|
1004
1044
|
*/
|
|
1005
1045
|
getContent(dropId: string, options: GetContentOptions & {
|
|
1006
1046
|
path: string;
|
|
@@ -1083,4 +1123,4 @@ declare class WorkspacesResource {
|
|
|
1083
1123
|
active(): Promise<DropthisResult<Workspace | null>>;
|
|
1084
1124
|
}
|
|
1085
1125
|
|
|
1086
|
-
export { type
|
|
1126
|
+
export { type PublishInput as $, AccountResource as A, type DropthisResult as B, type CreateUploadSessionRequest as C, type DeploymentContentFile as D, type EmailOtpResponse as E, type EntitlementLimits as F, type Entitlements as G, type GetContentOptions as H, type ImageTransform as I, type InMemoryPublishInput as J, type InvitableRole as K, type Invitation as L, type InvitationListResponse as M, InvitationsResource as N, type KeyType as O, type Limitations as P, type ListDeploymentsParams as Q, type ListDeploymentsResponse as R, type ListPage as S, type Member as T, type MemberListResponse as U, MembersResource as V, type NextHint as W, type PrepareOptions as X, type PreparedPublishRequest as Y, type PreparedUploadFile as Z, type PublishFileInput as _, type AccountResponse as a, type PublishOptions as a0, type RequestControls as a1, type RequestOptions as a2, type RevokeImpact as a3, SHARED_POOL as a4, type SessionResponse as a5, type TierInfo as a6, Transport as a7, type UpdateContentOptions as a8, type UploadManifestFile as a9, type UploadSessionFileResponse as aa, type UploadSessionResponse as ab, type UploadTarget as ac, type Workspace as ad, type WorkspaceRole as ae, WorkspacesResource as af, type AccountUsage as b, type AccountWorkspace as c, type ActionResolve as d, type AnalyticsBreakdownItem as e, type AnalyticsDailyPoint as f, ApiKeysResource as g, type CreateUploadSessionResponse as h, CursorPage as i, type DeploymentContentManifest as j, DeploymentsResource as k, type DnsRecord as l, type DomainDeletedResponse as m, type DomainListResponse as n, type DomainResponse as o, DomainsResource as p, type DropAction as q, type DropAnalyticsResponse as r, type DropContentFile as s, type DropDeploymentResponse as t, type DropOptions as u, type DropResponse as v, type DropWorkspace as w, DropsResource as x, type DropthisClientOptions as y, type DropthisErrorResponse as z };
|
package/node_modules/@dropthis/node/dist/{workspaces-Cq705UM6.d.ts → workspaces-CfwVerjp.d.ts}
RENAMED
|
@@ -161,6 +161,28 @@ type ListDeploymentsResponse = {
|
|
|
161
161
|
deployments: DropDeploymentResponse[];
|
|
162
162
|
nextCursor: string | null;
|
|
163
163
|
};
|
|
164
|
+
/** One row of a `full`-depth analytics breakdown (a country code or referer host). */
|
|
165
|
+
type AnalyticsBreakdownItem = {
|
|
166
|
+
key: string;
|
|
167
|
+
views: number;
|
|
168
|
+
};
|
|
169
|
+
/** One day of the `full`-depth daily view series. */
|
|
170
|
+
type AnalyticsDailyPoint = {
|
|
171
|
+
date: string;
|
|
172
|
+
views: number;
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* Per-drop view analytics. Counts are best-effort (captured fire-and-forget at the edge),
|
|
176
|
+
* so treat them as an approximate signal. `view_count` plans (Keep) get `views`/`truncated`
|
|
177
|
+
* only; `full` plans (Pro+) also get `byCountry`/`byReferer`/`daily` (null otherwise).
|
|
178
|
+
*/
|
|
179
|
+
type DropAnalyticsResponse = {
|
|
180
|
+
views: number;
|
|
181
|
+
truncated: boolean;
|
|
182
|
+
byCountry: AnalyticsBreakdownItem[] | null;
|
|
183
|
+
byReferer: AnalyticsBreakdownItem[] | null;
|
|
184
|
+
daily: AnalyticsDailyPoint[] | null;
|
|
185
|
+
};
|
|
164
186
|
type ListPage<T> = {
|
|
165
187
|
object: "list";
|
|
166
188
|
data: T[];
|
|
@@ -867,6 +889,15 @@ declare class DeploymentsResource {
|
|
|
867
889
|
constructor(transport: Transport);
|
|
868
890
|
list(dropId: string, params?: ListDeploymentsParams): Promise<DropthisResult<ListDeploymentsResponse>>;
|
|
869
891
|
get(dropId: string, deploymentId: string): Promise<DropthisResult<DropDeploymentResponse>>;
|
|
892
|
+
/**
|
|
893
|
+
* Roll a drop back to a prior deployment's content (Pro+ version-history feature). Mints a
|
|
894
|
+
* NEW deployment whose content is copied from `deploymentId` and makes it current — the drop's
|
|
895
|
+
* URL and settings are unchanged. Restoring the deployment that is already current is a 200
|
|
896
|
+
* no-op. Below Pro returns `feature_not_in_plan` (carrying `upgradeUrl`). Returns the updated
|
|
897
|
+
* parent drop (with its `url` and bumped `revision`). Pass `idempotencyKey` to make a retry
|
|
898
|
+
* safe. POST /drops/{id}/deployments/{deploymentId}/restore.
|
|
899
|
+
*/
|
|
900
|
+
restore(dropId: string, deploymentId: string, options?: RequestControls): Promise<DropthisResult<DropResponse>>;
|
|
870
901
|
}
|
|
871
902
|
|
|
872
903
|
declare class DomainsResource {
|
|
@@ -982,6 +1013,14 @@ declare class DropsResource<TInput = PublishInput> {
|
|
|
982
1013
|
list(params?: ListDropsParams): Promise<DropthisResult<CursorPage<DropResponse>>>;
|
|
983
1014
|
/** Fetch one drop by its `drop_…` id (not the slug/URL). GET /drops/{id}. */
|
|
984
1015
|
get(dropId: string): Promise<DropthisResult<DropResponse>>;
|
|
1016
|
+
/**
|
|
1017
|
+
* Approximate view analytics for one drop, by its `drop_…` id. Gated by the `analytics`
|
|
1018
|
+
* capability: Free returns `feature_not_in_plan` (needs Keep); Keep (`view_count`) returns
|
|
1019
|
+
* `views`/`truncated` with breakdowns null; Pro+ (`full`) also returns `byCountry`/
|
|
1020
|
+
* `byReferer`/`daily`. Counts are best-effort (captured fire-and-forget at the edge) — an
|
|
1021
|
+
* approximate signal, not exact human visits. GET /drops/{id}/analytics.
|
|
1022
|
+
*/
|
|
1023
|
+
analytics(dropId: string): Promise<DropthisResult<DropAnalyticsResponse>>;
|
|
985
1024
|
/**
|
|
986
1025
|
* Resolve a public locator (a drop URL, a custom-domain URL, or a bare vanity/shared
|
|
987
1026
|
* slug) back to the drop — the way to recover a lost `drop_…` id. Sends the raw target
|
|
@@ -997,10 +1036,11 @@ declare class DropsResource<TInput = PublishInput> {
|
|
|
997
1036
|
/**
|
|
998
1037
|
* Read back what a drop is serving (owner-only; works regardless of any viewer
|
|
999
1038
|
* password). By default returns the JSON manifest of the CURRENT deployment's files;
|
|
1000
|
-
* pass `deploymentId` to read a historical (even superseded) deployment
|
|
1001
|
-
*
|
|
1002
|
-
*
|
|
1003
|
-
* that file's exact stored bytes instead.
|
|
1039
|
+
* pass `deploymentId` to read a historical (even superseded) deployment. To roll a drop
|
|
1040
|
+
* back to a prior version, use {@link DeploymentsResource.restore} (a first-class server
|
|
1041
|
+
* action) rather than downloading and republishing by hand. Pass `path` (one of the
|
|
1042
|
+
* manifest's `files[].path` values) to download that file's exact stored bytes instead.
|
|
1043
|
+
* GET /drops/{id}/content.
|
|
1004
1044
|
*/
|
|
1005
1045
|
getContent(dropId: string, options: GetContentOptions & {
|
|
1006
1046
|
path: string;
|
|
@@ -1083,4 +1123,4 @@ declare class WorkspacesResource {
|
|
|
1083
1123
|
active(): Promise<DropthisResult<Workspace | null>>;
|
|
1084
1124
|
}
|
|
1085
1125
|
|
|
1086
|
-
export { type
|
|
1126
|
+
export { type PublishInput as $, AccountResource as A, type DropthisResult as B, type CreateUploadSessionRequest as C, type DeploymentContentFile as D, type EmailOtpResponse as E, type EntitlementLimits as F, type Entitlements as G, type GetContentOptions as H, type ImageTransform as I, type InMemoryPublishInput as J, type InvitableRole as K, type Invitation as L, type InvitationListResponse as M, InvitationsResource as N, type KeyType as O, type Limitations as P, type ListDeploymentsParams as Q, type ListDeploymentsResponse as R, type ListPage as S, type Member as T, type MemberListResponse as U, MembersResource as V, type NextHint as W, type PrepareOptions as X, type PreparedPublishRequest as Y, type PreparedUploadFile as Z, type PublishFileInput as _, type AccountResponse as a, type PublishOptions as a0, type RequestControls as a1, type RequestOptions as a2, type RevokeImpact as a3, SHARED_POOL as a4, type SessionResponse as a5, type TierInfo as a6, Transport as a7, type UpdateContentOptions as a8, type UploadManifestFile as a9, type UploadSessionFileResponse as aa, type UploadSessionResponse as ab, type UploadTarget as ac, type Workspace as ad, type WorkspaceRole as ae, WorkspacesResource as af, type AccountUsage as b, type AccountWorkspace as c, type ActionResolve as d, type AnalyticsBreakdownItem as e, type AnalyticsDailyPoint as f, ApiKeysResource as g, type CreateUploadSessionResponse as h, CursorPage as i, type DeploymentContentManifest as j, DeploymentsResource as k, type DnsRecord as l, type DomainDeletedResponse as m, type DomainListResponse as n, type DomainResponse as o, DomainsResource as p, type DropAction as q, type DropAnalyticsResponse as r, type DropContentFile as s, type DropDeploymentResponse as t, type DropOptions as u, type DropResponse as v, type DropWorkspace as w, DropsResource as x, type DropthisClientOptions as y, type DropthisErrorResponse as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dropthis/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.0",
|
|
4
4
|
"description": "Official CLI for Dropthis.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@clack/prompts": "1.4.0",
|
|
35
|
-
"@dropthis/node": "^0.
|
|
35
|
+
"@dropthis/node": "^0.33.0",
|
|
36
36
|
"@napi-rs/keyring": "1.3.0",
|
|
37
37
|
"commander": "14.0.3",
|
|
38
38
|
"picocolors": "1.1.1"
|