UNPKG

@junobuild/errors

Version:

A collection of predefined error constants and utilities for Juno applications.

5 lines (4 loc) 9.99 kB
import { createRequire as topLevelCreateRequire } from 'module'; const require = topLevelCreateRequire(import.meta.url); var r="juno.cdn.proposals.error.cannot_submit",e="juno.cdn.proposals.error.cannot_submit_invalid_status",R="juno.cdn.proposals.error.cannot_reject",t="juno.cdn.proposals.error.cannot_reject_invalid_status",O="juno.cdn.proposals.error.cannot_commit",n="juno.cdn.proposals.error.cannot_commit_invalid_status",E="juno.cdn.proposals.error.invalid_hash",N="juno.cdn.proposals.error.unknown_type",s="juno.cdn.proposals.error.no_content_chunks_at_index",a="juno.cdn.proposals.error.empty_assets",A="juno.cdn.proposals.error.cannot_delete_assets",T="juno.cdn.proposals.error.cannot_delete_assets_invalid_status",c="juno.cdn.proposals.error.next_id_convert",u="juno.cdn.proposals.error.next_id_overflow",S="juno.cdn.storage.error.cannot_insert_asset_unknown_reference_id",U="juno.cdn.storage.error.cannot_get_asset_unknown_reference_id",p="juno.cdn.storage.error.cannot_insert_asset_encoding_unknown_reference_id",i="juno.cdn.storage.error.no_proposal_found",l="juno.cdn.storage.error.invalid_releases_path",L="juno.cdn.storage.error.missing_releases_description",I="juno.cdn.storage.error.invalid_releases_description",d="juno.cdn.storage.error.invalid_collection";var C="juno.collections.error.modify_reserved_collection",x="juno.collections.error.reserved_name",j="juno.collections.error.reserved_collection",J="juno.collections.error.rate_config_enabled",P="juno.collections.error.prefix_deletion",m="juno.collections.error.not_empty",M="juno.collections.error.not_found",f="juno.collections.error.prefix_reserved";var G="juno.error.no_timestamp_provided",h="juno.error.timestamp_outdated_or_future",V="juno.error.no_version_provided",v="juno.error.version_outdated_or_future",F="juno.datastore.error.cannot_write",H="juno.datastore.error.cannot_read",w="juno.storage.error.upload_not_allowed",W="juno.storage.error.set_not_allowed",b="juno.storage.error.cannot_commit_invalid_collection",k="juno.storage.error.cannot_commit_batch",y="juno.storage.error.asset_not_found",K="juno.storage.error.cannot_read_asset",Y="juno.storage.error.upload_path_collection_prefix",B="juno.storage.error.reserved_asset",X="juno.storage.error.batch_not_found",z="juno.storage.error.chunk_not_found",Z="juno.storage.error.chunk_not_included_in_batch",q="juno.storage.error.asset_max_allowed_size",Q="juno.auth.error.not_admin_controller",$="juno.auth.error.invalid_origin",__="juno.auth.error.not_write_controller",o_="juno.auth.error.not_controller",r_="juno.auth.error.caller.not_allowed",e_="juno.auth.error.not_configured",R_="juno.auth.error.automation_not_configured",t_="juno.auth.error.openid_disabled",O_="juno.automation.token.error.missing_jti",n_="juno.automation.token.error.token_reused",E_="juno.automation.workflow.error.missing_repository",N_="juno.automation.workflow.error.missing_run_id",s_="juno.datastore.error.automation.caller",a_="juno.datastore.error.user.cannot_update",A_="juno.datastore.error.user.invalid_data",T_="juno.datastore.error.user.caller_key",c_="juno.datastore.error.user.key_no_principal",u_="juno.datastore.error.user.not_allowed",S_="juno.datastore.error.user.webauthn.aaguid_invalid_length",U_="juno.datastore.error.user.webauthn.provider_invalid_data",p_="juno.datastore.error.user.webauthn.provider_webauthn_invalid_data",i_="juno.datastore.error.user.register.provider_invalid_data",l_="juno.auth.error.profile.data.email_invalid_length",L_="juno.auth.error.profile.data.name_invalid_length",I_="juno.auth.error.profile.data.given_name_invalid_length",d_="juno.auth.error.profile.data.family_name_invalid_length",D_="juno.auth.error.profile.data.preferred_username_invalid_length",C_="juno.auth.error.profile.data.locale_invalid_length",x_="juno.auth.error.profile.data.picture_invalid_url",j_="juno.auth.error.profile.data.picture_invalid_scheme",J_="juno.datastore.error.user.usage.change_limit_reached",P_="juno.datastore.error.user.usage.invalid_data",m_="juno.datastore.error.user.webauthn.cannot_update",M_="juno.datastore.error.user.webauthn.invalid_data",f_="juno.datastore.error.user.webauthn.caller_key";var G_="juno.error.controllers.max_number",h_="juno.error.controllers.anonymous_not_allowed",V_="juno.error.controllers.revoked_not_allowed",v_="juno.error.controllers.admin_no_expire",F_="juno.error.controllers.expiry_in_past",H_="juno.error.memory.stable_exceeded",w_="juno.error.memory.heap_exceeded",W_="juno.error.cycles.deposit_balance_low",b_="juno.error.cycles.deposit_failed",k_="juno.error.canister.create_failed",y_="juno.error.canister.install_code_failed",K_="juno.error.segment.stop_failed",Y_="juno.error.segment.delete_failed",B_="juno.error.cmc.call_ledger_failed",X_="juno.error.cmc.ledger_transfer_failed",z_="juno.error.cmc.call_create_canister_failed",Z_="juno.error.cmc.create_canister_failed",q_="juno.error.cmc.install_code_failed",Q_="juno.error.invalid_regex";var _o=({error:_,type:o})=>typeof _=="string"?_.includes(o):_ instanceof Error?_.message.includes(o):!1;export{R_ as JUNO_AUTH_ERROR_AUTOMATION_NOT_CONFIGURED,r_ as JUNO_AUTH_ERROR_CALLER_NOT_ALLOWED,$ as JUNO_AUTH_ERROR_INVALID_ORIGIN,Q as JUNO_AUTH_ERROR_NOT_ADMIN_CONTROLLER,e_ as JUNO_AUTH_ERROR_NOT_CONFIGURED,o_ as JUNO_AUTH_ERROR_NOT_CONTROLLER,__ as JUNO_AUTH_ERROR_NOT_WRITE_CONTROLLER,t_ as JUNO_AUTH_ERROR_OPENID_DISABLED,l_ as JUNO_AUTH_ERROR_PROFILE_EMAIL_INVALID_LENGTH,d_ as JUNO_AUTH_ERROR_PROFILE_FAMILY_NAME_INVALID_LENGTH,I_ as JUNO_AUTH_ERROR_PROFILE_GIVEN_NAME_INVALID_LENGTH,C_ as JUNO_AUTH_ERROR_PROFILE_LOCALE_INVALID_LENGTH,L_ as JUNO_AUTH_ERROR_PROFILE_NAME_INVALID_LENGTH,j_ as JUNO_AUTH_ERROR_PROFILE_PICTURE_INVALID_SCHEME,x_ as JUNO_AUTH_ERROR_PROFILE_PICTURE_INVALID_URL,D_ as JUNO_AUTH_ERROR_PROFILE_PREFERRED_USERNAME_INVALID_LENGTH,O_ as JUNO_AUTOMATION_TOKEN_ERROR_MISSING_JTI,n_ as JUNO_AUTOMATION_TOKEN_ERROR_TOKEN_REUSED,E_ as JUNO_AUTOMATION_WORKFLOW_ERROR_MISSING_REPOSITORY,N_ as JUNO_AUTOMATION_WORKFLOW_ERROR_MISSING_RUN_ID,O as JUNO_CDN_PROPOSALS_ERROR_CANNOT_COMMIT,n as JUNO_CDN_PROPOSALS_ERROR_CANNOT_COMMIT_INVALID_STATUS,A as JUNO_CDN_PROPOSALS_ERROR_CANNOT_DELETE_ASSETS,T as JUNO_CDN_PROPOSALS_ERROR_CANNOT_DELETE_ASSETS_INVALID_STATUS,R as JUNO_CDN_PROPOSALS_ERROR_CANNOT_REJECT,t as JUNO_CDN_PROPOSALS_ERROR_CANNOT_REJECT_INVALID_STATUS,r as JUNO_CDN_PROPOSALS_ERROR_CANNOT_SUBMIT,e as JUNO_CDN_PROPOSALS_ERROR_CANNOT_SUBMIT_INVALID_STATUS,a as JUNO_CDN_PROPOSALS_ERROR_EMPTY_ASSETS,E as JUNO_CDN_PROPOSALS_ERROR_INVALID_HASH,c as JUNO_CDN_PROPOSALS_ERROR_NEXT_ID_CONVERT,u as JUNO_CDN_PROPOSALS_ERROR_NEXT_ID_OVERFLOW,s as JUNO_CDN_PROPOSALS_ERROR_NOT_CONTENT_CHUNKS_AT_INDEX,N as JUNO_CDN_PROPOSALS_ERROR_UNKNOWN_TYPE,U as JUNO_CDN_STORAGE_ERROR_CANNOT_GET_ASSET_UNKNOWN_REFERENCE_ID,p as JUNO_CDN_STORAGE_ERROR_CANNOT_INSERT_ASSET_ENCODING_UNKNOWN_REFERENCE_ID,S as JUNO_CDN_STORAGE_ERROR_CANNOT_INSERT_ASSET_UNKNOWN_REFERENCE_ID,d as JUNO_CDN_STORAGE_ERROR_INVALID_COLLECTION,I as JUNO_CDN_STORAGE_ERROR_INVALID_RELEASES_DESCRIPTION,l as JUNO_CDN_STORAGE_ERROR_INVALID_RELEASES_PATH,L as JUNO_CDN_STORAGE_ERROR_MISSING_RELEASES_DESCRIPTION,i as JUNO_CDN_STORAGE_ERROR_NO_PROPOSAL_FOUND,m as JUNO_COLLECTIONS_ERROR_COLLECTION_NOT_EMPTY,M as JUNO_COLLECTIONS_ERROR_COLLECTION_NOT_FOUND,P as JUNO_COLLECTIONS_ERROR_DELETE_PREFIX_RESERVED,C as JUNO_COLLECTIONS_ERROR_MODIFY_RESERVED_COLLECTION,f as JUNO_COLLECTIONS_ERROR_PREFIX_RESERVED,J as JUNO_COLLECTIONS_ERROR_RATE_CONFIG_ENABLED,j as JUNO_COLLECTIONS_ERROR_RESERVED_COLLECTION,x as JUNO_COLLECTIONS_ERROR_RESERVED_NAME,s_ as JUNO_DATASTORE_ERROR_AUTOMATION_CALLER,H as JUNO_DATASTORE_ERROR_CANNOT_READ,F as JUNO_DATASTORE_ERROR_CANNOT_WRITE,S_ as JUNO_DATASTORE_ERROR_USER_AAGUID_INVALID_LENGTH,T_ as JUNO_DATASTORE_ERROR_USER_CALLER_KEY,a_ as JUNO_DATASTORE_ERROR_USER_CANNOT_UPDATE,A_ as JUNO_DATASTORE_ERROR_USER_INVALID_DATA,c_ as JUNO_DATASTORE_ERROR_USER_KEY_NO_PRINCIPAL,u_ as JUNO_DATASTORE_ERROR_USER_NOT_ALLOWED,U_ as JUNO_DATASTORE_ERROR_USER_PROVIDER_INVALID_DATA,p_ as JUNO_DATASTORE_ERROR_USER_PROVIDER_WEBAUTHN_INVALID_DATA,i_ as JUNO_DATASTORE_ERROR_USER_REGISTER_PROVIDER_INVALID_DATA,J_ as JUNO_DATASTORE_ERROR_USER_USAGE_CHANGE_LIMIT_REACHED,P_ as JUNO_DATASTORE_ERROR_USER_USAGE_INVALID_DATA,f_ as JUNO_DATASTORE_ERROR_USER_WEBAUTHN_CALLER_KEY,m_ as JUNO_DATASTORE_ERROR_USER_WEBAUTHN_CANNOT_UPDATE,M_ as JUNO_DATASTORE_ERROR_USER_WEBAUTHN_INVALID_DATA,k_ as JUNO_ERROR_CANISTER_CREATE_FAILED,y_ as JUNO_ERROR_CANISTER_INSTALL_CODE_FAILED,z_ as JUNO_ERROR_CMC_CALL_CREATE_CANISTER_FAILED,B_ as JUNO_ERROR_CMC_CALL_LEDGER_FAILED,Z_ as JUNO_ERROR_CMC_CREATE_CANISTER_FAILED,q_ as JUNO_ERROR_CMC_INSTALL_CODE_FAILED,X_ as JUNO_ERROR_CMC_LEDGER_TRANSFER_FAILED,v_ as JUNO_ERROR_CONTROLLERS_ADMIN_NO_EXPIRY,h_ as JUNO_ERROR_CONTROLLERS_ANONYMOUS_NOT_ALLOWED,F_ as JUNO_ERROR_CONTROLLERS_EXPIRY_IN_PAST,G_ as JUNO_ERROR_CONTROLLERS_MAX_NUMBER,V_ as JUNO_ERROR_CONTROLLERS_REVOKED_NOT_ALLOWED,W_ as JUNO_ERROR_CYCLES_DEPOSIT_BALANCE_LOW,b_ as JUNO_ERROR_CYCLES_DEPOSIT_FAILED,Q_ as JUNO_ERROR_INVALID_REGEX,w_ as JUNO_ERROR_MEMORY_HEAP_EXCEEDED,H_ as JUNO_ERROR_MEMORY_STABLE_EXCEEDED,G as JUNO_ERROR_NO_TIMESTAMP_PROVIDED,V as JUNO_ERROR_NO_VERSION_PROVIDED,Y_ as JUNO_ERROR_SEGMENT_DELETE_FAILED,K_ as JUNO_ERROR_SEGMENT_STOP_FAILED,h as JUNO_ERROR_TIMESTAMP_OUTDATED_OR_FUTURE,v as JUNO_ERROR_VERSION_OUTDATED_OR_FUTURE,q as JUNO_STORAGE_ERROR_ASSET_MAX_ALLOWED_SIZE,y as JUNO_STORAGE_ERROR_ASSET_NOT_FOUND,X as JUNO_STORAGE_ERROR_BATCH_NOT_FOUND,k as JUNO_STORAGE_ERROR_CANNOT_COMMIT_BATCH,b as JUNO_STORAGE_ERROR_CANNOT_COMMIT_INVALID_COLLECTION,K as JUNO_STORAGE_ERROR_CANNOT_READ_ASSET,z as JUNO_STORAGE_ERROR_CHUNK_NOT_FOUND,Z as JUNO_STORAGE_ERROR_CHUNK_NOT_INCLUDED_IN_BATCH,B as JUNO_STORAGE_ERROR_RESERVED_ASSET,W as JUNO_STORAGE_ERROR_SET_NOT_ALLOWED,w as JUNO_STORAGE_ERROR_UPLOAD_NOT_ALLOWED,Y as JUNO_STORAGE_ERROR_UPLOAD_PATH_COLLECTION_PREFIX,_o as isSatelliteError}; //# sourceMappingURL=index.mjs.map