phala 1.2.0 → 1.2.1

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 CHANGED
@@ -147,6 +147,12 @@ bun run type-check # TypeScript type checking
147
147
  bun run test # Run tests
148
148
  ```
149
149
 
150
+ ## How do I upgrade to these CLI changes?
151
+
152
+ - `phala deploy --cvm-id` (or a CVM ID in `phala.toml`) now fails before sending any request when a create-only flag is passed, instead of ignoring it: `--name`, `--region`, `--node`, `--custom-app-id`, `--nonce`, `--key-provider-mode`, `--dev-os` / `--no-dev-os`, `--ssh-pubkey`, `--secure-time`, `--fs`, `--skip-gateway`, `--kms`, `--kms-id`, `--kms-contract`, `--kms-contract-id` and `--experimental-key-provider-type`. Remove them from update invocations; they only apply when a new CVM is created.
153
+ - `phala cvms upgrade` now replaces only the Docker Compose file (and, with `--env-file`, the allowed env keys and encrypted env). It keeps the stored pre-launch script, visibility settings and allowed env keys instead of resetting them, and an unchanged compose does nothing.
154
+ - `phala cvms resize --allow-restart` is ignored and prints a warning (not in `--json` mode, which prints no warnings). The CVM restarts when the resize needs it. `phala cvms resize --json` no longer outputs `allow_restart`.
155
+
150
156
  ## License
151
157
 
152
158
  [Apache-2.0](LICENSE)
@@ -279,10 +279,6 @@ interface CvmCreateResourcesResponse {
279
279
  instance_types: CvmCreateInstanceTypeResource[];
280
280
  gpu_availability: GpuAvailability;
281
281
  }
282
- interface UpgradeResponse {
283
- detail?: string;
284
- [key: string]: unknown;
285
- }
286
282
  interface UserInfoResponse {
287
283
  username: string;
288
284
  [key: string]: unknown;
@@ -326,32 +322,17 @@ interface ResizeCvmPayload {
326
322
  vcpu?: number;
327
323
  memory?: number;
328
324
  disk_size?: number;
329
- allow_restart?: number;
330
325
  }
331
326
  /**
332
- * Resize a CVM's resources
327
+ * Resize a CVM's resources through PATCH /cvms/{id}. The CVM restarts when
328
+ * the resize needs it.
333
329
  * @param appId App ID (with or without app_ prefix)
334
330
  * @param vcpu Number of virtual CPUs (optional)
335
331
  * @param memory Memory size in MB (optional)
336
332
  * @param diskSize Disk size in GB (optional)
337
- * @param allowRestart Whether to allow restart (1) or not (0) for the resize operation (optional)
338
333
  * @returns Success status
339
334
  */
340
- declare function resizeCvm(appId: string, vcpu?: number, memory?: number, diskSize?: number, allowRestart?: number): Promise<boolean>;
341
- /**
342
- * VM configuration type
343
- */
344
- interface VMConfig {
345
- [key: string]: unknown;
346
- }
347
- /**
348
- * Upgrade a CVM (Legacy)
349
- * @deprecated This is a legacy function, consider using SDK's provisionCvmComposeFileUpdate
350
- * @param appId App ID (with or without app_ prefix)
351
- * @param vmConfig VM configuration
352
- * @returns Upgrade response
353
- */
354
- declare function upgradeCvm(appId: string, vmConfig: VMConfig): Promise<UpgradeResponse>;
335
+ declare function resizeCvm(appId: string, vcpu?: number, memory?: number, diskSize?: number): Promise<boolean>;
355
336
  /**
356
337
  * Get the CVM create resource graph.
357
338
  * @returns Nodes, KMS resources, gateway resources, and instance types for CVM creation
@@ -419,4 +400,4 @@ declare function streamCvmChannelLogs(appId: string, channel: CvmLogChannel, onD
419
400
  /** Get CVM status string (e.g. "running", "stopped") */
420
401
  declare function getCvmStatus(appId: string): Promise<string>;
421
402
 
422
- export { type AvailableNodesResponse, type CertificateInfo, type CertificateNameInfo, type ComposeFile, type ContainerLogsOptions, type CvmAttestationResponse, type CvmCreateGatewayResource, type CvmCreateInstanceTypeResource, type CvmCreateNodeKmsRelation, type CvmCreateResourcesResponse, type CvmListResponse, type CvmLogChannel, type DockerConfig, type EncryptedEnvItem, type GetCvmNetworkResponse, type GpuAvailability, type Image, type KmsListItem, type LogChannel, type LogEntry, type ProductGpuAvailability, type ReplicateCvmResponse, type ResizeCvmPayload, type SerialLogsOptions, type TCBEventLogEntry, type TCBInfo, type TEEPod, type UpgradeResponse, type UserInfoResponse, type VMConfig, composeFileSchema, cvmAttestationResponseSchema, dockerConfigSchema, encryptedEnvItemSchema, fetchContainerLogs, fetchContainerLogsEntries, fetchCvmChannelLogs, fetchSerialLogs, getCvmAttestation, getCvmByAppId, getCvmCreateResources, getCvmLogEndpoint, getCvmNetwork, getCvmNetworkResponseSchema, getCvmStatus, imageSchema, replicateCvmResponseSchema, resizeCvm, selectCvm, streamContainerLogs, streamContainerLogsEntries, streamCvmChannelLogs, streamSerialLogs, teepodSchema, upgradeCvm };
403
+ export { type AvailableNodesResponse, type CertificateInfo, type CertificateNameInfo, type ComposeFile, type ContainerLogsOptions, type CvmAttestationResponse, type CvmCreateGatewayResource, type CvmCreateInstanceTypeResource, type CvmCreateNodeKmsRelation, type CvmCreateResourcesResponse, type CvmListResponse, type CvmLogChannel, type DockerConfig, type EncryptedEnvItem, type GetCvmNetworkResponse, type GpuAvailability, type Image, type KmsListItem, type LogChannel, type LogEntry, type ProductGpuAvailability, type ReplicateCvmResponse, type ResizeCvmPayload, type SerialLogsOptions, type TCBEventLogEntry, type TCBInfo, type TEEPod, type UserInfoResponse, composeFileSchema, cvmAttestationResponseSchema, dockerConfigSchema, encryptedEnvItemSchema, fetchContainerLogs, fetchContainerLogsEntries, fetchCvmChannelLogs, fetchSerialLogs, getCvmAttestation, getCvmByAppId, getCvmCreateResources, getCvmLogEndpoint, getCvmNetwork, getCvmNetworkResponseSchema, getCvmStatus, imageSchema, replicateCvmResponseSchema, resizeCvm, selectCvm, streamContainerLogs, streamContainerLogsEntries, streamCvmChannelLogs, streamSerialLogs, teepodSchema };