@shardflux/sdk 0.12.0 → 0.13.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/CHANGELOG.md +110 -0
- package/README.md +93 -3
- package/dist/cell.d.ts +44 -0
- package/dist/cell.js +73 -12
- package/dist/client.d.ts +30 -6
- package/dist/client.js +33 -5
- package/dist/errors.d.ts +21 -2
- package/dist/generated/app-api.d.ts +328 -47
- package/dist/generated/cell-api.d.ts +167 -9
- package/dist/http.d.ts +6 -1
- package/dist/http.js +12 -3
- package/dist/index.d.ts +4 -4
- package/dist/lifecycle.d.ts +7 -1
- package/dist/lifecycle.js +2 -2
- package/dist/templates.d.ts +25 -3
- package/dist/tools.d.ts +7 -0
- package/dist/tools.js +275 -7
- package/dist/workspace.d.ts +19 -4
- package/dist/workspace.js +21 -0
- package/package.json +1 -1
package/dist/errors.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export type ErrorCode = AppErrorCode | CellErrorCode;
|
|
|
11
11
|
* added: 409 conflict legacy_disk_layout, not_session, session_lifetime, lifetime_mismatch,
|
|
12
12
|
* not_resettable, template_not_layered, draft_exists, draft_stale, build_in_progress, file_list_unavailable,
|
|
13
13
|
* file_list_indexing (retryable), guest_feature_unavailable; 422 validation_failed confirm_destructive_required,
|
|
14
|
-
* reserved_key_prefix, invalid_defaults,
|
|
14
|
+
* reserved_key_prefix, invalid_defaults, invalid_path, too_many_acknowledged_findings;
|
|
15
15
|
* 403 forbidden template_dev_mode_role; 404 not_found draft_not_found, version_not_found, path_not_found.
|
|
16
16
|
* The template editor (0.7.0) added: 422 validation_failed invalid_recipe, base_not_layered,
|
|
17
17
|
* language_unavailable, language_conflict, invalid_package, too_many_files, platform_owned_path, upload_required,
|
|
@@ -51,8 +51,27 @@ export type ErrorCode = AppErrorCode | CellErrorCode;
|
|
|
51
51
|
* overage_unavailable, spend_cap_required, spend_cap_below_minimum (details.min_minor), spend_cap_above_plan_price
|
|
52
52
|
* (details.max_minor) and spend_cap_below_charges (details.charges_minor); with `ifMatch`, 409 conflict
|
|
53
53
|
* version_mismatch (details.current_version), as egress puts with `ifMatch` answer too.
|
|
54
|
+
* Elastic memory (0.13.0): 422 validation_failed allocation_mode_not_available (details.field
|
|
55
|
+
* `caps.allocation_mode`; the organization does not have elastic memory, nothing is created or changed),
|
|
56
|
+
* not_supported_for_mode (elastic with file_first), requires_elastic and exceeds_memory_mib (details.field
|
|
57
|
+
* `caps.memory_mib_held`).
|
|
58
|
+
* Burst execution (0.13.0): the codes `burst_unavailable` (409; details.reason
|
|
59
|
+
* not_available, layout_unsupported, shared_volumes, host_capacity, fence_not_drained, workspace_fenced, apply_pending,
|
|
60
|
+
* park_failed, workspace_resumed, interrupted; details.replayed on a journaled failure answered again) and
|
|
61
|
+
* `burst_apply_failed` (409; details.reason disk_full, apply_failed, reverted, revert_failed with
|
|
62
|
+
* details.applied_entries and details.pending_entries: retry with the same session id to finish an apply_failed one);
|
|
63
|
+
* 422 validation_failed burst_mode_not_supported (`auto`), burst_not_supported (with stdin; also 409 conflict for
|
|
64
|
+
* signal/cancel of a burst session) and burst_size_exceeds_plan (details.field, details.limit); a burst session nobody
|
|
65
|
+
* followed any more ends with burst.error service_unavailable burst_lost.
|
|
66
|
+
* Immutable paths (0.13.0): 422 validation_failed immutable_path_removed (a recipe drops a path of the template's open
|
|
67
|
+
* version: details.removed, details.open_version; a version keeps every immutable path), immutable_paths_unsupported_base
|
|
68
|
+
* (the base's guest agent lacks the feature, or a Dockerfile build of a template with immutable paths: details.base
|
|
69
|
+
* {name, version}, details.required_feature, details.paths) and invalid_path at details.field `recipe.immutable[<i>]`;
|
|
70
|
+
* 409 conflict read_only_path (a files write under an immutable path, from the cell gateway). The reason
|
|
71
|
+
* `update_policy_not_available` is gone with the update policy. A build that fails on them carries `failure.code`
|
|
72
|
+
* immutable_path_missing (details.path) or immutable_image_too_large.
|
|
54
73
|
*/
|
|
55
|
-
export type KnownErrorReason = 'invalid_recipe' | 'base_not_layered' | 'language_unavailable' | 'language_conflict' | 'invalid_package' | 'too_many_files' | 'platform_owned_path' | 'upload_required' | 'upload_missing' | 'upload_digest_mismatch' | 'upload_too_large' | 'extra_hosts_without_auto' | 'invalid_settings' | 'services_unsupported' | 'input_required' | 'input_unknown' | 'input_invalid' | 'egress_widening' | 'reserved_session_id' | 'env_collision' | 'reserved_template_slug' | 'package_index_unavailable' | 'package_not_found' | 'startup_failed' | 'service_not_ready' | 'secrets_unavailable' | 'workspace_not_running' | 'operation_in_progress' | 'workspace_deleted' | 'secret_not_available' | 'legacy_disk_layout' | 'not_session' | 'session_lifetime' | 'lifetime_mismatch' | 'not_resettable' | 'template_not_layered' | 'draft_exists' | 'draft_stale' | 'build_in_progress' | 'file_list_unavailable' | 'file_list_indexing' | 'guest_feature_unavailable' | 'confirm_destructive_required' | 'reserved_key_prefix' | 'invalid_defaults' | '
|
|
74
|
+
export type KnownErrorReason = 'invalid_recipe' | 'base_not_layered' | 'language_unavailable' | 'language_conflict' | 'invalid_package' | 'too_many_files' | 'platform_owned_path' | 'upload_required' | 'upload_missing' | 'upload_digest_mismatch' | 'upload_too_large' | 'extra_hosts_without_auto' | 'invalid_settings' | 'services_unsupported' | 'input_required' | 'input_unknown' | 'input_invalid' | 'egress_widening' | 'reserved_session_id' | 'env_collision' | 'reserved_template_slug' | 'package_index_unavailable' | 'package_not_found' | 'startup_failed' | 'service_not_ready' | 'secrets_unavailable' | 'workspace_not_running' | 'operation_in_progress' | 'workspace_deleted' | 'secret_not_available' | 'legacy_disk_layout' | 'not_session' | 'session_lifetime' | 'lifetime_mismatch' | 'not_resettable' | 'template_not_layered' | 'draft_exists' | 'draft_stale' | 'build_in_progress' | 'file_list_unavailable' | 'file_list_indexing' | 'guest_feature_unavailable' | 'confirm_destructive_required' | 'reserved_key_prefix' | 'invalid_defaults' | 'invalid_path' | 'too_many_acknowledged_findings' | 'template_dev_mode_role' | 'draft_not_found' | 'version_not_found' | 'path_not_found' | 'revision_mismatch' | 'edit_not_found' | 'edit_ambiguous' | 'edit_not_text' | 'patch_invalid' | 'host_capacity' | 'wake_failed' | 'workspace_fenced' | 'offline_unavailable' | 'offline_budget' | 'offline_changed' | 'host_feature_unavailable' | 'not_supported_for_mode' | 'mode_mismatch' | 'mode_not_available' | 'layout_unsupported' | 'tree_revision_mismatch' | 'outside_tree_root' | 'execution_in_progress' | 'execution_id_reused' | 'operation_id_reused' | 'no_execution_host' | 'lease_expired' | 'host_unreachable' | 'host_restarted' | 'tree_moved' | 'blob_missing' | 'blob_corrupt' | 'exec_failed_to_start' | 'invalid_cwd' | 'allowance_used' | 'overage_paused' | 'spend_cap_reached' | 'overage_unavailable' | 'spend_cap_required' | 'spend_cap_below_minimum' | 'spend_cap_above_plan_price' | 'spend_cap_below_charges' | 'version_mismatch' | 'allocation_mode_not_available' | 'requires_elastic' | 'exceeds_memory_mib' | 'burst_mode_not_supported' | 'burst_not_supported' | 'burst_size_exceeds_plan' | 'not_available' | 'shared_volumes' | 'fence_not_drained' | 'apply_pending' | 'park_failed' | 'workspace_resumed' | 'interrupted' | 'burst_lost' | 'disk_full' | 'apply_failed' | 'reverted' | 'revert_failed' | 'immutable_path_removed' | 'immutable_paths_unsupported_base' | 'read_only_path';
|
|
56
75
|
/** A known reason, or any other string the server sends (reasons are open-ended). */
|
|
57
76
|
export type ErrorReason = KnownErrorReason | (string & {});
|
|
58
77
|
export interface ErrorBodyLike {
|