@shipstatic/types 0.8.8 → 0.8.10

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/index.d.ts CHANGED
@@ -26,8 +26,10 @@ export interface Deployment {
26
26
  readonly size: number;
27
27
  /** Current deployment status */
28
28
  status: DeploymentStatusType;
29
- /** Whether deployment has configuration */
29
+ /** Whether deployment has a ship.json config */
30
30
  readonly config: boolean;
31
+ /** Whether deployment has a password set */
32
+ readonly password: boolean;
31
33
  /** Labels for categorization and filtering (lowercase, alphanumeric with separators). Always present, empty array when none. */
32
34
  labels: string[];
33
35
  /** The client/tool used to create this deployment (e.g., 'web', 'sdk', 'cli'), null if unknown */
@@ -586,14 +588,13 @@ export interface DeploymentUploadOptions {
586
588
  /** Client identifier (e.g., 'cli', 'sdk', 'web') */
587
589
  via?: string;
588
590
  /**
589
- * Optional password that gates public access to this deployment.
591
+ * Optional password that protects this deployment.
590
592
  *
591
593
  * Length: {@link PASSWORD_CONSTRAINTS.MIN_LENGTH} to
592
- * {@link PASSWORD_CONSTRAINTS.MAX_LENGTH} characters. Plaintext on the wire;
593
- * the API hashes it once (SHA-256) and stores the hex digest. The Router
594
- * serves a lock page to visitors who don't present the matching cookie. If
595
- * the deployment is linked to a custom domain, the same gate applies there
596
- * too. Revocation is redeployment.
594
+ * {@link PASSWORD_CONSTRAINTS.MAX_LENGTH} characters; whitespace is
595
+ * significant. Visitors are prompted to enter the password before they can
596
+ * view the deployment including on any custom domains pointing at it.
597
+ * To remove protection, redeploy without a password.
597
598
  */
598
599
  password?: string;
599
600
  /** @internal Trigger server-side build. Only available via /upload endpoint. */
@@ -738,8 +739,10 @@ export interface ActivityMeta {
738
739
  files?: number;
739
740
  /** Total size in bytes */
740
741
  size?: number;
741
- /** Whether deployment has config */
742
+ /** Whether deployment has a ship.json config */
742
743
  hasConfig?: boolean;
744
+ /** Whether deployment has a password set */
745
+ hasPassword?: boolean;
743
746
  /** Whether this was an update (vs create) */
744
747
  isUpdate?: boolean;
745
748
  /** Whether domain was already verified */
@@ -924,12 +927,9 @@ export declare function serializeLabels(labels: string[] | undefined): string |
924
927
  */
925
928
  export declare function deserializeLabels(labelsJson: string | null): string[];
926
929
  /**
927
- * Deployment password validation constraints, shared across UI, SDK, and API.
928
- * Single source of truth for the length rule applied to the optional
929
- * `DeploymentUploadOptions.password` field.
930
- *
931
- * Plaintext is hashed once server-side (SHA-256) and never persisted in its
932
- * original form; see `cloudflare/shared/password.ts` for the protocol.
930
+ * Length constraints for the optional deployment password
931
+ * (`DeploymentUploadOptions.password`). Single source of truth shared across
932
+ * platform consumers.
933
933
  */
934
934
  export declare const PASSWORD_CONSTRAINTS: {
935
935
  /** Minimum password length in characters */
package/dist/index.js CHANGED
@@ -516,12 +516,9 @@ export function deserializeLabels(labelsJson) {
516
516
  // PASSWORD UTILITIES
517
517
  // =============================================================================
518
518
  /**
519
- * Deployment password validation constraints, shared across UI, SDK, and API.
520
- * Single source of truth for the length rule applied to the optional
521
- * `DeploymentUploadOptions.password` field.
522
- *
523
- * Plaintext is hashed once server-side (SHA-256) and never persisted in its
524
- * original form; see `cloudflare/shared/password.ts` for the protocol.
519
+ * Length constraints for the optional deployment password
520
+ * (`DeploymentUploadOptions.password`). Single source of truth shared across
521
+ * platform consumers.
525
522
  */
526
523
  export const PASSWORD_CONSTRAINTS = {
527
524
  /** Minimum password length in characters */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipstatic/types",
3
- "version": "0.8.8",
3
+ "version": "0.8.10",
4
4
  "description": "Shared types for ShipStatic platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/index.ts CHANGED
@@ -33,8 +33,10 @@ export interface Deployment {
33
33
  readonly size: number;
34
34
  /** Current deployment status */
35
35
  status: DeploymentStatusType; // Mutable - can be updated
36
- /** Whether deployment has configuration */
36
+ /** Whether deployment has a ship.json config */
37
37
  readonly config: boolean;
38
+ /** Whether deployment has a password set */
39
+ readonly password: boolean;
38
40
  /** Labels for categorization and filtering (lowercase, alphanumeric with separators). Always present, empty array when none. */
39
41
  labels: string[];
40
42
  /** The client/tool used to create this deployment (e.g., 'web', 'sdk', 'cli'), null if unknown */
@@ -889,14 +891,13 @@ export interface DeploymentUploadOptions {
889
891
  /** Client identifier (e.g., 'cli', 'sdk', 'web') */
890
892
  via?: string;
891
893
  /**
892
- * Optional password that gates public access to this deployment.
894
+ * Optional password that protects this deployment.
893
895
  *
894
896
  * Length: {@link PASSWORD_CONSTRAINTS.MIN_LENGTH} to
895
- * {@link PASSWORD_CONSTRAINTS.MAX_LENGTH} characters. Plaintext on the wire;
896
- * the API hashes it once (SHA-256) and stores the hex digest. The Router
897
- * serves a lock page to visitors who don't present the matching cookie. If
898
- * the deployment is linked to a custom domain, the same gate applies there
899
- * too. Revocation is redeployment.
897
+ * {@link PASSWORD_CONSTRAINTS.MAX_LENGTH} characters; whitespace is
898
+ * significant. Visitors are prompted to enter the password before they can
899
+ * view the deployment including on any custom domains pointing at it.
900
+ * To remove protection, redeploy without a password.
900
901
  */
901
902
  password?: string;
902
903
  /** @internal Trigger server-side build. Only available via /upload endpoint. */
@@ -1113,8 +1114,10 @@ export interface ActivityMeta {
1113
1114
  files?: number;
1114
1115
  /** Total size in bytes */
1115
1116
  size?: number;
1116
- /** Whether deployment has config */
1117
+ /** Whether deployment has a ship.json config */
1117
1118
  hasConfig?: boolean;
1119
+ /** Whether deployment has a password set */
1120
+ hasPassword?: boolean;
1118
1121
 
1119
1122
  // Domain events
1120
1123
  /** Whether this was an update (vs create) */
@@ -1369,12 +1372,9 @@ export function deserializeLabels(labelsJson: string | null): string[] {
1369
1372
  // =============================================================================
1370
1373
 
1371
1374
  /**
1372
- * Deployment password validation constraints, shared across UI, SDK, and API.
1373
- * Single source of truth for the length rule applied to the optional
1374
- * `DeploymentUploadOptions.password` field.
1375
- *
1376
- * Plaintext is hashed once server-side (SHA-256) and never persisted in its
1377
- * original form; see `cloudflare/shared/password.ts` for the protocol.
1375
+ * Length constraints for the optional deployment password
1376
+ * (`DeploymentUploadOptions.password`). Single source of truth shared across
1377
+ * platform consumers.
1378
1378
  */
1379
1379
  export const PASSWORD_CONSTRAINTS = {
1380
1380
  /** Minimum password length in characters */