phala 1.1.0 → 1.1.2
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 +34 -0
- package/dist/api/index.d.ts +24 -1
- package/dist/api/index.js +23 -23
- package/dist/index.js +128 -128
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -260,6 +260,40 @@ phala status
|
|
|
260
260
|
phala status --json
|
|
261
261
|
```
|
|
262
262
|
|
|
263
|
+
#### Environment Variable Override
|
|
264
|
+
|
|
265
|
+
You can override the stored API key using the `PHALA_CLOUD_API_KEY` environment variable. This is useful for CI/CD workflows or testing with different accounts.
|
|
266
|
+
|
|
267
|
+
**Example:**
|
|
268
|
+
```bash
|
|
269
|
+
# Temporarily use a different API key
|
|
270
|
+
PHALA_CLOUD_API_KEY="phak_your_api_key_here" phala cvms list
|
|
271
|
+
|
|
272
|
+
# In CI/CD pipelines
|
|
273
|
+
export PHALA_CLOUD_API_KEY="phak_your_api_key_here"
|
|
274
|
+
phala deploy --name my-app
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
You can also override the API endpoint using the `PHALA_CLOUD_API_PREFIX` environment variable.
|
|
278
|
+
|
|
279
|
+
**Example:**
|
|
280
|
+
```bash
|
|
281
|
+
PHALA_CLOUD_API_PREFIX="https://cloud-api.phala.ai" phala cvms list
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
#### JSON Output Mode
|
|
285
|
+
|
|
286
|
+
All commands support the `--json` flag for machine-readable output, useful for automation and CI/CD pipelines.
|
|
287
|
+
|
|
288
|
+
**Example:**
|
|
289
|
+
```bash
|
|
290
|
+
# Get CVM list as JSON
|
|
291
|
+
phala cvms list --json
|
|
292
|
+
|
|
293
|
+
# Parse with jq
|
|
294
|
+
phala status --json | jq '.username'
|
|
295
|
+
```
|
|
296
|
+
|
|
263
297
|
### Docker Management Commands
|
|
264
298
|
|
|
265
299
|
Commands for managing Docker images for TEE deployments.
|
package/dist/api/index.d.ts
CHANGED
|
@@ -910,5 +910,28 @@ declare function upgradeCvm(appId: string, vmConfig: VMConfig): Promise<UpgradeR
|
|
|
910
910
|
* @returns List of TEEPods with embedded images
|
|
911
911
|
*/
|
|
912
912
|
declare function getTeepods(v03x_only?: boolean): Promise<TeepodResponse>;
|
|
913
|
+
interface SerialLogsOptions {
|
|
914
|
+
tail?: number;
|
|
915
|
+
timestamps?: boolean;
|
|
916
|
+
}
|
|
917
|
+
interface ContainerLogsOptions extends SerialLogsOptions {
|
|
918
|
+
container?: string;
|
|
919
|
+
}
|
|
920
|
+
/** Fetch serial logs from a CVM */
|
|
921
|
+
declare function fetchSerialLogs(appId: string, options?: SerialLogsOptions): Promise<string>;
|
|
922
|
+
/**
|
|
923
|
+
* Fetch container logs from a CVM
|
|
924
|
+
* Note: Fetches from a single container. Use --container to specify which one,
|
|
925
|
+
* otherwise fetches from the first container with a log endpoint.
|
|
926
|
+
*/
|
|
927
|
+
declare function fetchContainerLogs(appId: string, options?: ContainerLogsOptions): Promise<string>;
|
|
928
|
+
/** Stream serial logs from a CVM */
|
|
929
|
+
declare function streamSerialLogs(appId: string, onData: (data: string) => void, options?: SerialLogsOptions, signal?: AbortSignal): Promise<void>;
|
|
930
|
+
/**
|
|
931
|
+
* Stream container logs from a CVM
|
|
932
|
+
* Note: Streams from a single container. Use --container to specify which one,
|
|
933
|
+
* otherwise streams from the first container with a log endpoint.
|
|
934
|
+
*/
|
|
935
|
+
declare function streamContainerLogs(appId: string, onData: (data: string) => void, options?: ContainerLogsOptions, signal?: AbortSignal): Promise<void>;
|
|
913
936
|
|
|
914
|
-
export { type AvailableNodesResponse, type CertificateInfo, type CertificateNameInfo, type ComposeFile, type CvmAttestationResponse, type CvmComposeConfigResponse, type CvmListResponse, type DockerConfig, type EncryptedEnvItem, type GetCvmNetworkResponse, type Image, type KmsListItem, type PostCvmResponse, type PubkeyResponse, type ReplicateCvmResponse, type ResizeCvmPayload, type TCBEventLogEntry, type TCBInfo, type TEEPod, type TeepodResponse, type UpgradeResponse, type UserInfoResponse, type VMConfig, composeFileSchema, createCvm, cvmAttestationResponseSchema, deleteCvm, dockerConfigSchema, encryptedEnvItemSchema, getCvmAttestation, getCvmByAppId, getCvmComposeConfig, getCvmNetwork, getCvmNetworkResponseSchema, getPubkeyFromCvm, getTeepods, imageSchema, postCvmResponseSchema, replicateCvm, replicateCvmResponseSchema, resizeCvm, restartCvm, selectCvm, startCvm, stopCvm, teepodSchema, upgradeCvm };
|
|
937
|
+
export { type AvailableNodesResponse, type CertificateInfo, type CertificateNameInfo, type ComposeFile, type ContainerLogsOptions, type CvmAttestationResponse, type CvmComposeConfigResponse, type CvmListResponse, type DockerConfig, type EncryptedEnvItem, type GetCvmNetworkResponse, type Image, type KmsListItem, type PostCvmResponse, type PubkeyResponse, type ReplicateCvmResponse, type ResizeCvmPayload, type SerialLogsOptions, type TCBEventLogEntry, type TCBInfo, type TEEPod, type TeepodResponse, type UpgradeResponse, type UserInfoResponse, type VMConfig, composeFileSchema, createCvm, cvmAttestationResponseSchema, deleteCvm, dockerConfigSchema, encryptedEnvItemSchema, fetchContainerLogs, fetchSerialLogs, getCvmAttestation, getCvmByAppId, getCvmComposeConfig, getCvmNetwork, getCvmNetworkResponseSchema, getPubkeyFromCvm, getTeepods, imageSchema, postCvmResponseSchema, replicateCvm, replicateCvmResponseSchema, resizeCvm, restartCvm, selectCvm, startCvm, stopCvm, streamContainerLogs, streamSerialLogs, teepodSchema, upgradeCvm };
|