@temboplus/afloat 0.1.58 → 0.1.60
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/esm/src/models/payout/derivatives/payout.d.ts +2 -0
- package/esm/src/models/payout/derivatives/payout.d.ts.map +1 -1
- package/esm/src/models/payout/derivatives/payout.js +5 -1
- package/esm/src/models/payout/index.d.ts +1 -0
- package/esm/src/models/payout/index.d.ts.map +1 -1
- package/esm/src/models/payout/index.js +1 -0
- package/esm/src/models/payout/narration.d.ts +164 -0
- package/esm/src/models/payout/narration.d.ts.map +1 -0
- package/esm/src/models/payout/narration.js +308 -0
- package/esm/src/models/payout/schemas.js +1 -1
- package/package.json +1 -1
- package/script/mod.d.ts +7 -7
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +7 -7
- package/script/npm/src/_dnt.test_shims.d.ts +6 -0
- package/script/npm/src/_dnt.test_shims.d.ts.map +1 -0
- package/script/npm/src/_dnt.test_shims.js +65 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts +29 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/almost_equals.js +49 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts +24 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/array_includes.js +49 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assert.d.ts +16 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assert.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assert.js +25 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts +26 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assertion_error.js +34 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equal.d.ts +17 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equal.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equal.js +209 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equals.d.ts +35 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equals.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equals.js +61 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/exists.d.ts +18 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/exists.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/exists.js +30 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/fail.d.ts +15 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/fail.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/fail.js +23 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/false.d.ts +18 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/false.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/false.js +25 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater.d.ts +20 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater.js +32 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts +20 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.js +32 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts +23 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/instance_of.js +55 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts +25 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/is_error.js +56 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less.d.ts +19 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less.js +31 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts +20 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less_or_equal.js +32 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/match.d.ts +18 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/match.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/match.js +29 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/mod.d.ts +44 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/mod.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/mod.js +61 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts +21 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_equals.js +36 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts +20 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_instance_of.js +32 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts +18 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_match.js +29 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts +23 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.js +35 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts +29 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/object_match.js +163 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts +42 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/rejects.js +56 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts +24 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/strict_equals.js +60 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts +18 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/string_includes.js +29 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/throws.d.ts +45 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/throws.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/throws.js +47 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts +15 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unimplemented.js +23 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts +15 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unreachable.js +23 -0
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts +82 -0
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/build_message.js +115 -0
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff.d.ts +140 -0
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff.js +283 -0
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts +99 -0
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff_str.js +185 -0
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/format.d.ts +2 -0
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/format.js +63 -0
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/styles.d.ts +159 -0
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/styles.js +242 -0
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/types.d.ts +16 -0
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +1 -0
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/types.js +3 -0
- package/script/npm/src/mod.d.ts +8 -0
- package/script/npm/src/mod.d.ts.map +1 -0
- package/script/npm/src/mod.js +23 -0
- package/script/npm/src/src/errors/api_error.d.ts.map +1 -0
- package/script/npm/src/src/errors/index.d.ts.map +1 -0
- package/script/npm/src/src/errors/permission_error.d.ts.map +1 -0
- package/script/{src → npm/src/src}/features/admin/contract.d.ts.map +1 -1
- package/script/npm/src/src/features/admin/index.d.ts.map +1 -0
- package/script/npm/src/src/features/admin/repository.d.ts.map +1 -0
- package/script/npm/src/src/features/admin/schemas.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/access/contract.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/access/repository.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/contract.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/identity/contract.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/identity/repository.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/index.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/manager.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/profile/contract.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/profile/repository.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/repository.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/storage/client_store.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/storage/client_token_handler.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/storage/server_store.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/storage/server_token_handler.d.ts.map +1 -0
- package/script/npm/src/src/features/auth/storage/types.d.ts.map +1 -0
- package/script/npm/src/src/features/contact/contract.d.ts.map +1 -0
- package/script/npm/src/src/features/contact/index.d.ts.map +1 -0
- package/script/npm/src/src/features/contact/repository.d.ts.map +1 -0
- package/script/{src → npm/src/src}/features/payout/contract.d.ts.map +1 -1
- package/script/npm/src/src/features/payout/index.d.ts.map +1 -0
- package/script/npm/src/src/features/payout/repository.d.ts.map +1 -0
- package/script/npm/src/src/features/wallet/contract.d.ts.map +1 -0
- package/script/npm/src/src/features/wallet/index.d.ts.map +1 -0
- package/script/npm/src/src/features/wallet/repository.d.ts.map +1 -0
- package/script/npm/src/src/models/contact/derivatives/contact.d.ts.map +1 -0
- package/script/npm/src/src/models/contact/derivatives/contact.test.d.ts +1 -0
- package/script/npm/src/src/models/contact/derivatives/contact.test.d.ts.map +1 -0
- package/script/npm/src/src/models/contact/derivatives/contact.test.js +64 -0
- package/script/npm/src/src/models/contact/derivatives/contact_info.d.ts.map +1 -0
- package/script/npm/src/src/models/contact/derivatives/contact_info.test.d.ts +1 -0
- package/script/npm/src/src/models/contact/derivatives/contact_info.test.d.ts.map +1 -0
- package/script/npm/src/src/models/contact/derivatives/contact_info.test.js +331 -0
- package/script/npm/src/src/models/contact/index.d.ts.map +1 -0
- package/script/npm/src/src/models/contact/schemas.d.ts.map +1 -0
- package/script/npm/src/src/models/contact/validation.d.ts.map +1 -0
- package/script/npm/src/src/models/contact/validation.test.d.ts +2 -0
- package/script/npm/src/src/models/contact/validation.test.d.ts.map +1 -0
- package/script/npm/src/src/models/contact/validation.test.js +186 -0
- package/script/npm/src/src/models/index.d.ts.map +1 -0
- package/script/npm/src/src/models/payout/api.d.ts.map +1 -0
- package/script/npm/src/src/models/payout/channel.d.ts.map +1 -0
- package/script/{src → npm/src/src}/models/payout/derivatives/payout.d.ts +2 -0
- package/script/npm/src/src/models/payout/derivatives/payout.d.ts.map +1 -0
- package/script/{src → npm/src/src}/models/payout/derivatives/payout.js +4 -0
- package/script/npm/src/src/models/payout/derivatives/payout.test.d.ts +1 -0
- package/script/npm/src/src/models/payout/derivatives/payout.test.d.ts.map +1 -0
- package/script/npm/src/src/models/payout/derivatives/payout.test.js +76 -0
- package/script/{src → npm/src/src}/models/payout/index.d.ts +1 -0
- package/script/npm/src/src/models/payout/index.d.ts.map +1 -0
- package/script/{src → npm/src/src}/models/payout/index.js +1 -0
- package/script/npm/src/src/models/payout/narration.d.ts +164 -0
- package/script/npm/src/src/models/payout/narration.d.ts.map +1 -0
- package/script/npm/src/src/models/payout/narration.js +312 -0
- package/script/npm/src/src/models/payout/schemas.d.ts.map +1 -0
- package/script/{src → npm/src/src}/models/payout/schemas.js +1 -1
- package/script/npm/src/src/models/payout/status.d.ts.map +1 -0
- package/script/npm/src/src/models/permission.d.ts.map +1 -0
- package/script/npm/src/src/models/role.d.ts.map +1 -0
- package/script/npm/src/src/models/user/authenticated-user.d.ts.map +1 -0
- package/script/npm/src/src/models/user/index.d.ts.map +1 -0
- package/script/npm/src/src/models/user/managed-user.d.ts.map +1 -0
- package/script/npm/src/src/models/user/profile.d.ts.map +1 -0
- package/script/npm/src/src/models/wallet/index.d.ts.map +1 -0
- package/script/npm/src/src/models/wallet/schemas.d.ts.map +1 -0
- package/script/npm/src/src/models/wallet/statement_entry.d.ts.map +1 -0
- package/script/npm/src/src/models/wallet/wallet.d.ts.map +1 -0
- package/script/npm/src/src/shared/base_repository.d.ts.map +1 -0
- package/script/npm/src/src/shared/common_responses.d.ts.map +1 -0
- package/script/npm/src/src/shared/index.d.ts.map +1 -0
- package/script/npm/src/src/shared/token_required_repository.d.ts.map +1 -0
- package/script/_dnt.test_shims.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/assert.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/equal.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/exists.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/fail.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/false.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/greater.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/less.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/match.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/mod.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/throws.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
- package/script/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
- package/script/src/errors/api_error.d.ts.map +0 -1
- package/script/src/errors/index.d.ts.map +0 -1
- package/script/src/errors/permission_error.d.ts.map +0 -1
- package/script/src/features/admin/index.d.ts.map +0 -1
- package/script/src/features/admin/repository.d.ts.map +0 -1
- package/script/src/features/admin/schemas.d.ts.map +0 -1
- package/script/src/features/auth/access/contract.d.ts.map +0 -1
- package/script/src/features/auth/access/repository.d.ts.map +0 -1
- package/script/src/features/auth/contract.d.ts.map +0 -1
- package/script/src/features/auth/identity/contract.d.ts.map +0 -1
- package/script/src/features/auth/identity/repository.d.ts.map +0 -1
- package/script/src/features/auth/index.d.ts.map +0 -1
- package/script/src/features/auth/manager.d.ts.map +0 -1
- package/script/src/features/auth/profile/contract.d.ts.map +0 -1
- package/script/src/features/auth/profile/repository.d.ts.map +0 -1
- package/script/src/features/auth/repository.d.ts.map +0 -1
- package/script/src/features/auth/storage/client_store.d.ts.map +0 -1
- package/script/src/features/auth/storage/client_token_handler.d.ts.map +0 -1
- package/script/src/features/auth/storage/server_store.d.ts.map +0 -1
- package/script/src/features/auth/storage/server_token_handler.d.ts.map +0 -1
- package/script/src/features/auth/storage/types.d.ts.map +0 -1
- package/script/src/features/contact/contract.d.ts.map +0 -1
- package/script/src/features/contact/index.d.ts.map +0 -1
- package/script/src/features/contact/repository.d.ts.map +0 -1
- package/script/src/features/payout/index.d.ts.map +0 -1
- package/script/src/features/payout/repository.d.ts.map +0 -1
- package/script/src/features/wallet/contract.d.ts.map +0 -1
- package/script/src/features/wallet/index.d.ts.map +0 -1
- package/script/src/features/wallet/repository.d.ts.map +0 -1
- package/script/src/models/contact/derivatives/contact.d.ts.map +0 -1
- package/script/src/models/contact/derivatives/contact.test.d.ts.map +0 -1
- package/script/src/models/contact/derivatives/contact_info.d.ts.map +0 -1
- package/script/src/models/contact/derivatives/contact_info.test.d.ts.map +0 -1
- package/script/src/models/contact/index.d.ts.map +0 -1
- package/script/src/models/contact/schemas.d.ts.map +0 -1
- package/script/src/models/contact/validation.d.ts.map +0 -1
- package/script/src/models/contact/validation.test.d.ts.map +0 -1
- package/script/src/models/index.d.ts.map +0 -1
- package/script/src/models/payout/api.d.ts.map +0 -1
- package/script/src/models/payout/channel.d.ts.map +0 -1
- package/script/src/models/payout/derivatives/payout.d.ts.map +0 -1
- package/script/src/models/payout/derivatives/payout.test.d.ts.map +0 -1
- package/script/src/models/payout/index.d.ts.map +0 -1
- package/script/src/models/payout/schemas.d.ts.map +0 -1
- package/script/src/models/payout/status.d.ts.map +0 -1
- package/script/src/models/permission.d.ts.map +0 -1
- package/script/src/models/role.d.ts.map +0 -1
- package/script/src/models/user/authenticated-user.d.ts.map +0 -1
- package/script/src/models/user/index.d.ts.map +0 -1
- package/script/src/models/user/managed-user.d.ts.map +0 -1
- package/script/src/models/user/profile.d.ts.map +0 -1
- package/script/src/models/wallet/index.d.ts.map +0 -1
- package/script/src/models/wallet/schemas.d.ts.map +0 -1
- package/script/src/models/wallet/statement_entry.d.ts.map +0 -1
- package/script/src/models/wallet/wallet.d.ts.map +0 -1
- package/script/src/shared/base_repository.d.ts.map +0 -1
- package/script/src/shared/common_responses.d.ts.map +0 -1
- package/script/src/shared/index.d.ts.map +0 -1
- package/script/src/shared/token_required_repository.d.ts.map +0 -1
- /package/script/{src → npm/src/src}/errors/api_error.d.ts +0 -0
- /package/script/{src → npm/src/src}/errors/api_error.js +0 -0
- /package/script/{src → npm/src/src}/errors/index.d.ts +0 -0
- /package/script/{src → npm/src/src}/errors/index.js +0 -0
- /package/script/{src → npm/src/src}/errors/permission_error.d.ts +0 -0
- /package/script/{src → npm/src/src}/errors/permission_error.js +0 -0
- /package/script/{src → npm/src/src}/features/admin/contract.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/admin/contract.js +0 -0
- /package/script/{src → npm/src/src}/features/admin/index.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/admin/index.js +0 -0
- /package/script/{src → npm/src/src}/features/admin/repository.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/admin/repository.js +0 -0
- /package/script/{src → npm/src/src}/features/admin/schemas.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/admin/schemas.js +0 -0
- /package/script/{src → npm/src/src}/features/auth/access/contract.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/auth/access/contract.js +0 -0
- /package/script/{src → npm/src/src}/features/auth/access/repository.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/auth/access/repository.js +0 -0
- /package/script/{src → npm/src/src}/features/auth/contract.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/auth/contract.js +0 -0
- /package/script/{src → npm/src/src}/features/auth/identity/contract.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/auth/identity/contract.js +0 -0
- /package/script/{src → npm/src/src}/features/auth/identity/repository.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/auth/identity/repository.js +0 -0
- /package/script/{src → npm/src/src}/features/auth/index.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/auth/index.js +0 -0
- /package/script/{src → npm/src/src}/features/auth/manager.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/auth/manager.js +0 -0
- /package/script/{src → npm/src/src}/features/auth/profile/contract.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/auth/profile/contract.js +0 -0
- /package/script/{src → npm/src/src}/features/auth/profile/repository.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/auth/profile/repository.js +0 -0
- /package/script/{src → npm/src/src}/features/auth/repository.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/auth/repository.js +0 -0
- /package/script/{src → npm/src/src}/features/auth/storage/client_store.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/auth/storage/client_store.js +0 -0
- /package/script/{src → npm/src/src}/features/auth/storage/client_token_handler.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/auth/storage/client_token_handler.js +0 -0
- /package/script/{src → npm/src/src}/features/auth/storage/server_store.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/auth/storage/server_store.js +0 -0
- /package/script/{src → npm/src/src}/features/auth/storage/server_token_handler.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/auth/storage/server_token_handler.js +0 -0
- /package/script/{src → npm/src/src}/features/auth/storage/types.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/auth/storage/types.js +0 -0
- /package/script/{src → npm/src/src}/features/contact/contract.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/contact/contract.js +0 -0
- /package/script/{src → npm/src/src}/features/contact/index.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/contact/index.js +0 -0
- /package/script/{src → npm/src/src}/features/contact/repository.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/contact/repository.js +0 -0
- /package/script/{src → npm/src/src}/features/payout/contract.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/payout/contract.js +0 -0
- /package/script/{src → npm/src/src}/features/payout/index.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/payout/index.js +0 -0
- /package/script/{src → npm/src/src}/features/payout/repository.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/payout/repository.js +0 -0
- /package/script/{src → npm/src/src}/features/wallet/contract.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/wallet/contract.js +0 -0
- /package/script/{src → npm/src/src}/features/wallet/index.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/wallet/index.js +0 -0
- /package/script/{src → npm/src/src}/features/wallet/repository.d.ts +0 -0
- /package/script/{src → npm/src/src}/features/wallet/repository.js +0 -0
- /package/script/{src → npm/src/src}/models/contact/derivatives/contact.d.ts +0 -0
- /package/script/{src → npm/src/src}/models/contact/derivatives/contact.js +0 -0
- /package/script/{src → npm/src/src}/models/contact/derivatives/contact_info.d.ts +0 -0
- /package/script/{src → npm/src/src}/models/contact/derivatives/contact_info.js +0 -0
- /package/script/{src → npm/src/src}/models/contact/index.d.ts +0 -0
- /package/script/{src → npm/src/src}/models/contact/index.js +0 -0
- /package/script/{src → npm/src/src}/models/contact/schemas.d.ts +0 -0
- /package/script/{src → npm/src/src}/models/contact/schemas.js +0 -0
- /package/script/{src → npm/src/src}/models/contact/validation.d.ts +0 -0
- /package/script/{src → npm/src/src}/models/contact/validation.js +0 -0
- /package/script/{src → npm/src/src}/models/index.d.ts +0 -0
- /package/script/{src → npm/src/src}/models/index.js +0 -0
- /package/script/{src → npm/src/src}/models/payout/api.d.ts +0 -0
- /package/script/{src → npm/src/src}/models/payout/api.js +0 -0
- /package/script/{src → npm/src/src}/models/payout/channel.d.ts +0 -0
- /package/script/{src → npm/src/src}/models/payout/channel.js +0 -0
- /package/script/{src → npm/src/src}/models/payout/schemas.d.ts +0 -0
- /package/script/{src → npm/src/src}/models/payout/status.d.ts +0 -0
- /package/script/{src → npm/src/src}/models/payout/status.js +0 -0
- /package/script/{src → npm/src/src}/models/permission.d.ts +0 -0
- /package/script/{src → npm/src/src}/models/permission.js +0 -0
- /package/script/{src → npm/src/src}/models/role.d.ts +0 -0
- /package/script/{src → npm/src/src}/models/role.js +0 -0
- /package/script/{src → npm/src/src}/models/user/authenticated-user.d.ts +0 -0
- /package/script/{src → npm/src/src}/models/user/authenticated-user.js +0 -0
- /package/script/{src → npm/src/src}/models/user/index.d.ts +0 -0
- /package/script/{src → npm/src/src}/models/user/index.js +0 -0
- /package/script/{src → npm/src/src}/models/user/managed-user.d.ts +0 -0
- /package/script/{src → npm/src/src}/models/user/managed-user.js +0 -0
- /package/script/{src → npm/src/src}/models/user/profile.d.ts +0 -0
- /package/script/{src → npm/src/src}/models/user/profile.js +0 -0
- /package/script/{src → npm/src/src}/models/wallet/index.d.ts +0 -0
- /package/script/{src → npm/src/src}/models/wallet/index.js +0 -0
- /package/script/{src → npm/src/src}/models/wallet/schemas.d.ts +0 -0
- /package/script/{src → npm/src/src}/models/wallet/schemas.js +0 -0
- /package/script/{src → npm/src/src}/models/wallet/statement_entry.d.ts +0 -0
- /package/script/{src → npm/src/src}/models/wallet/statement_entry.js +0 -0
- /package/script/{src → npm/src/src}/models/wallet/wallet.d.ts +0 -0
- /package/script/{src → npm/src/src}/models/wallet/wallet.js +0 -0
- /package/script/{src → npm/src/src}/shared/base_repository.d.ts +0 -0
- /package/script/{src → npm/src/src}/shared/base_repository.js +0 -0
- /package/script/{src → npm/src/src}/shared/common_responses.d.ts +0 -0
- /package/script/{src → npm/src/src}/shared/common_responses.js +0 -0
- /package/script/{src → npm/src/src}/shared/index.d.ts +0 -0
- /package/script/{src → npm/src/src}/shared/index.js +0 -0
- /package/script/{src → npm/src/src}/shared/token_required_repository.d.ts +0 -0
- /package/script/{src → npm/src/src}/shared/token_required_repository.js +0 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dntGlobalThis = exports.Deno = void 0;
|
|
4
|
+
const shim_deno_1 = require("@deno/shim-deno");
|
|
5
|
+
var shim_deno_2 = require("@deno/shim-deno");
|
|
6
|
+
Object.defineProperty(exports, "Deno", { enumerable: true, get: function () { return shim_deno_2.Deno; } });
|
|
7
|
+
const dntGlobals = {
|
|
8
|
+
Deno: shim_deno_1.Deno,
|
|
9
|
+
};
|
|
10
|
+
exports.dntGlobalThis = createMergeProxy(globalThis, dntGlobals);
|
|
11
|
+
function createMergeProxy(baseObj, extObj) {
|
|
12
|
+
return new Proxy(baseObj, {
|
|
13
|
+
get(_target, prop, _receiver) {
|
|
14
|
+
if (prop in extObj) {
|
|
15
|
+
return extObj[prop];
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
return baseObj[prop];
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
set(_target, prop, value) {
|
|
22
|
+
if (prop in extObj) {
|
|
23
|
+
delete extObj[prop];
|
|
24
|
+
}
|
|
25
|
+
baseObj[prop] = value;
|
|
26
|
+
return true;
|
|
27
|
+
},
|
|
28
|
+
deleteProperty(_target, prop) {
|
|
29
|
+
let success = false;
|
|
30
|
+
if (prop in extObj) {
|
|
31
|
+
delete extObj[prop];
|
|
32
|
+
success = true;
|
|
33
|
+
}
|
|
34
|
+
if (prop in baseObj) {
|
|
35
|
+
delete baseObj[prop];
|
|
36
|
+
success = true;
|
|
37
|
+
}
|
|
38
|
+
return success;
|
|
39
|
+
},
|
|
40
|
+
ownKeys(_target) {
|
|
41
|
+
const baseKeys = Reflect.ownKeys(baseObj);
|
|
42
|
+
const extKeys = Reflect.ownKeys(extObj);
|
|
43
|
+
const extKeysSet = new Set(extKeys);
|
|
44
|
+
return [...baseKeys.filter((k) => !extKeysSet.has(k)), ...extKeys];
|
|
45
|
+
},
|
|
46
|
+
defineProperty(_target, prop, desc) {
|
|
47
|
+
if (prop in extObj) {
|
|
48
|
+
delete extObj[prop];
|
|
49
|
+
}
|
|
50
|
+
Reflect.defineProperty(baseObj, prop, desc);
|
|
51
|
+
return true;
|
|
52
|
+
},
|
|
53
|
+
getOwnPropertyDescriptor(_target, prop) {
|
|
54
|
+
if (prop in extObj) {
|
|
55
|
+
return Reflect.getOwnPropertyDescriptor(extObj, prop);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
return Reflect.getOwnPropertyDescriptor(baseObj, prop);
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
has(_target, prop) {
|
|
62
|
+
return prop in extObj || prop in baseObj;
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Make an assertion that `actual` and `expected` are almost equal numbers
|
|
3
|
+
* through a given tolerance. It can be used to take into account IEEE-754
|
|
4
|
+
* double-precision floating-point representation limitations. If the values
|
|
5
|
+
* are not almost equal then throw.
|
|
6
|
+
*
|
|
7
|
+
* The default tolerance is one hundred thousandth of a percent of the
|
|
8
|
+
* expected value.
|
|
9
|
+
*
|
|
10
|
+
* @example Usage
|
|
11
|
+
* ```ts ignore
|
|
12
|
+
* import { assertAlmostEquals } from "@std/assert";
|
|
13
|
+
*
|
|
14
|
+
* assertAlmostEquals(0.01, 0.02); // Throws
|
|
15
|
+
* assertAlmostEquals(1e-8, 1e-9); // Throws
|
|
16
|
+
* assertAlmostEquals(1.000000001e-8, 1.000000002e-8); // Doesn't throw
|
|
17
|
+
* assertAlmostEquals(0.01, 0.02, 0.1); // Doesn't throw
|
|
18
|
+
* assertAlmostEquals(0.1 + 0.2, 0.3, 1e-16); // Doesn't throw
|
|
19
|
+
* assertAlmostEquals(0.1 + 0.2, 0.3, 1e-17); // Throws
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @param actual The actual value to compare.
|
|
23
|
+
* @param expected The expected value to compare.
|
|
24
|
+
* @param tolerance The tolerance to consider the values almost equal. The
|
|
25
|
+
* default is one hundred thousandth of a percent of the expected value.
|
|
26
|
+
* @param msg The optional message to include in the error.
|
|
27
|
+
*/
|
|
28
|
+
export declare function assertAlmostEquals(actual: number, expected: number, tolerance?: number, msg?: string): void;
|
|
29
|
+
//# sourceMappingURL=almost_equals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"almost_equals.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/assert/1.0.10/almost_equals.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,MAAM,EAClB,GAAG,CAAC,EAAE,MAAM,QAmBb"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assertAlmostEquals = assertAlmostEquals;
|
|
4
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
|
+
// This module is browser compatible.
|
|
6
|
+
const assertion_error_js_1 = require("./assertion_error.js");
|
|
7
|
+
/**
|
|
8
|
+
* Make an assertion that `actual` and `expected` are almost equal numbers
|
|
9
|
+
* through a given tolerance. It can be used to take into account IEEE-754
|
|
10
|
+
* double-precision floating-point representation limitations. If the values
|
|
11
|
+
* are not almost equal then throw.
|
|
12
|
+
*
|
|
13
|
+
* The default tolerance is one hundred thousandth of a percent of the
|
|
14
|
+
* expected value.
|
|
15
|
+
*
|
|
16
|
+
* @example Usage
|
|
17
|
+
* ```ts ignore
|
|
18
|
+
* import { assertAlmostEquals } from "@std/assert";
|
|
19
|
+
*
|
|
20
|
+
* assertAlmostEquals(0.01, 0.02); // Throws
|
|
21
|
+
* assertAlmostEquals(1e-8, 1e-9); // Throws
|
|
22
|
+
* assertAlmostEquals(1.000000001e-8, 1.000000002e-8); // Doesn't throw
|
|
23
|
+
* assertAlmostEquals(0.01, 0.02, 0.1); // Doesn't throw
|
|
24
|
+
* assertAlmostEquals(0.1 + 0.2, 0.3, 1e-16); // Doesn't throw
|
|
25
|
+
* assertAlmostEquals(0.1 + 0.2, 0.3, 1e-17); // Throws
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @param actual The actual value to compare.
|
|
29
|
+
* @param expected The expected value to compare.
|
|
30
|
+
* @param tolerance The tolerance to consider the values almost equal. The
|
|
31
|
+
* default is one hundred thousandth of a percent of the expected value.
|
|
32
|
+
* @param msg The optional message to include in the error.
|
|
33
|
+
*/
|
|
34
|
+
function assertAlmostEquals(actual, expected, tolerance, msg) {
|
|
35
|
+
if (Object.is(actual, expected)) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const delta = Math.abs(expected - actual);
|
|
39
|
+
if (tolerance === undefined) {
|
|
40
|
+
tolerance = isFinite(expected) ? Math.abs(expected * 1e-7) : 1e-7;
|
|
41
|
+
}
|
|
42
|
+
if (delta <= tolerance) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
46
|
+
const f = (n) => Number.isInteger(n) ? n : n.toExponential();
|
|
47
|
+
throw new assertion_error_js_1.AssertionError(`Expected actual: "${f(actual)}" to be close to "${f(expected)}": \
|
|
48
|
+
delta "${f(delta)}" is greater than "${f(tolerance)}"${msgSuffix}`);
|
|
49
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** An array-like object (`Array`, `Uint8Array`, `NodeList`, etc.) that is not a string */
|
|
2
|
+
export type ArrayLikeArg<T> = ArrayLike<T> & object;
|
|
3
|
+
/**
|
|
4
|
+
* Make an assertion that `actual` includes the `expected` values. If not then
|
|
5
|
+
* an error will be thrown.
|
|
6
|
+
*
|
|
7
|
+
* Type parameter can be specified to ensure values under comparison have the
|
|
8
|
+
* same type.
|
|
9
|
+
*
|
|
10
|
+
* @example Usage
|
|
11
|
+
* ```ts ignore
|
|
12
|
+
* import { assertArrayIncludes } from "@std/assert";
|
|
13
|
+
*
|
|
14
|
+
* assertArrayIncludes([1, 2], [2]); // Doesn't throw
|
|
15
|
+
* assertArrayIncludes([1, 2], [3]); // Throws
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @typeParam T The type of the elements in the array to compare.
|
|
19
|
+
* @param actual The array-like object to check for.
|
|
20
|
+
* @param expected The array-like object to check for.
|
|
21
|
+
* @param msg The optional message to display if the assertion fails.
|
|
22
|
+
*/
|
|
23
|
+
export declare function assertArrayIncludes<T>(actual: ArrayLikeArg<T>, expected: ArrayLikeArg<T>, msg?: string): void;
|
|
24
|
+
//# sourceMappingURL=array_includes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array_includes.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/assert/1.0.10/array_includes.ts"],"names":[],"mappings":"AAMA,0FAA0F;AAC1F,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,EACvB,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,EACzB,GAAG,CAAC,EAAE,MAAM,QAwBb"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assertArrayIncludes = assertArrayIncludes;
|
|
4
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
|
+
// This module is browser compatible.
|
|
6
|
+
const equal_js_1 = require("./equal.js");
|
|
7
|
+
const format_js_1 = require("../../internal/1.0.5/format.js");
|
|
8
|
+
const assertion_error_js_1 = require("./assertion_error.js");
|
|
9
|
+
/**
|
|
10
|
+
* Make an assertion that `actual` includes the `expected` values. If not then
|
|
11
|
+
* an error will be thrown.
|
|
12
|
+
*
|
|
13
|
+
* Type parameter can be specified to ensure values under comparison have the
|
|
14
|
+
* same type.
|
|
15
|
+
*
|
|
16
|
+
* @example Usage
|
|
17
|
+
* ```ts ignore
|
|
18
|
+
* import { assertArrayIncludes } from "@std/assert";
|
|
19
|
+
*
|
|
20
|
+
* assertArrayIncludes([1, 2], [2]); // Doesn't throw
|
|
21
|
+
* assertArrayIncludes([1, 2], [3]); // Throws
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @typeParam T The type of the elements in the array to compare.
|
|
25
|
+
* @param actual The array-like object to check for.
|
|
26
|
+
* @param expected The array-like object to check for.
|
|
27
|
+
* @param msg The optional message to display if the assertion fails.
|
|
28
|
+
*/
|
|
29
|
+
function assertArrayIncludes(actual, expected, msg) {
|
|
30
|
+
const missing = [];
|
|
31
|
+
for (let i = 0; i < expected.length; i++) {
|
|
32
|
+
let found = false;
|
|
33
|
+
for (let j = 0; j < actual.length; j++) {
|
|
34
|
+
if ((0, equal_js_1.equal)(expected[i], actual[j])) {
|
|
35
|
+
found = true;
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
if (!found) {
|
|
40
|
+
missing.push(expected[i]);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (missing.length === 0) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
47
|
+
msg = `Expected actual: "${(0, format_js_1.format)(actual)}" to include: "${(0, format_js_1.format)(expected)}"${msgSuffix}\nmissing: ${(0, format_js_1.format)(missing)}`;
|
|
48
|
+
throw new assertion_error_js_1.AssertionError(msg);
|
|
49
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Make an assertion, error will be thrown if `expr` does not have truthy value.
|
|
3
|
+
*
|
|
4
|
+
* @example Usage
|
|
5
|
+
* ```ts ignore
|
|
6
|
+
* import { assert } from "@std/assert";
|
|
7
|
+
*
|
|
8
|
+
* assert("hello".includes("ello")); // Doesn't throw
|
|
9
|
+
* assert("hello".includes("world")); // Throws
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* @param expr The expression to test.
|
|
13
|
+
* @param msg The optional message to display if the assertion fails.
|
|
14
|
+
*/
|
|
15
|
+
export declare function assert(expr: unknown, msg?: string): asserts expr;
|
|
16
|
+
//# sourceMappingURL=assert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/assert/1.0.10/assert.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,SAAK,GAAG,OAAO,CAAC,IAAI,CAI5D"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assert = assert;
|
|
4
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
|
+
// This module is browser compatible.
|
|
6
|
+
const assertion_error_js_1 = require("./assertion_error.js");
|
|
7
|
+
/**
|
|
8
|
+
* Make an assertion, error will be thrown if `expr` does not have truthy value.
|
|
9
|
+
*
|
|
10
|
+
* @example Usage
|
|
11
|
+
* ```ts ignore
|
|
12
|
+
* import { assert } from "@std/assert";
|
|
13
|
+
*
|
|
14
|
+
* assert("hello".includes("ello")); // Doesn't throw
|
|
15
|
+
* assert("hello".includes("world")); // Throws
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @param expr The expression to test.
|
|
19
|
+
* @param msg The optional message to display if the assertion fails.
|
|
20
|
+
*/
|
|
21
|
+
function assert(expr, msg = "") {
|
|
22
|
+
if (!expr) {
|
|
23
|
+
throw new assertion_error_js_1.AssertionError(msg);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error thrown when an assertion fails.
|
|
3
|
+
*
|
|
4
|
+
* @example Usage
|
|
5
|
+
* ```ts ignore
|
|
6
|
+
* import { AssertionError } from "@std/assert";
|
|
7
|
+
*
|
|
8
|
+
* try {
|
|
9
|
+
* throw new AssertionError("foo", { cause: "bar" });
|
|
10
|
+
* } catch (error) {
|
|
11
|
+
* if (error instanceof AssertionError) {
|
|
12
|
+
* error.message === "foo"; // true
|
|
13
|
+
* error.cause === "bar"; // true
|
|
14
|
+
* }
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare class AssertionError extends Error {
|
|
19
|
+
/** Constructs a new instance.
|
|
20
|
+
*
|
|
21
|
+
* @param message The error message.
|
|
22
|
+
* @param options Additional options. This argument is still unstable. It may change in the future release.
|
|
23
|
+
*/
|
|
24
|
+
constructor(message: string, options?: ErrorOptions);
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=assertion_error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assertion_error.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/assert/1.0.10/assertion_error.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC;;;;OAIG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY;CAIpD"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
3
|
+
// This module is browser compatible.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.AssertionError = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* Error thrown when an assertion fails.
|
|
8
|
+
*
|
|
9
|
+
* @example Usage
|
|
10
|
+
* ```ts ignore
|
|
11
|
+
* import { AssertionError } from "@std/assert";
|
|
12
|
+
*
|
|
13
|
+
* try {
|
|
14
|
+
* throw new AssertionError("foo", { cause: "bar" });
|
|
15
|
+
* } catch (error) {
|
|
16
|
+
* if (error instanceof AssertionError) {
|
|
17
|
+
* error.message === "foo"; // true
|
|
18
|
+
* error.cause === "bar"; // true
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
class AssertionError extends Error {
|
|
24
|
+
/** Constructs a new instance.
|
|
25
|
+
*
|
|
26
|
+
* @param message The error message.
|
|
27
|
+
* @param options Additional options. This argument is still unstable. It may change in the future release.
|
|
28
|
+
*/
|
|
29
|
+
constructor(message, options) {
|
|
30
|
+
super(message, options);
|
|
31
|
+
this.name = "AssertionError";
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.AssertionError = AssertionError;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deep equality comparison used in assertions.
|
|
3
|
+
*
|
|
4
|
+
* @param a The actual value
|
|
5
|
+
* @param b The expected value
|
|
6
|
+
* @returns `true` if the values are deeply equal, `false` otherwise
|
|
7
|
+
*
|
|
8
|
+
* @example Usage
|
|
9
|
+
* ```ts
|
|
10
|
+
* import { equal } from "@std/assert/equal";
|
|
11
|
+
*
|
|
12
|
+
* equal({ foo: "bar" }, { foo: "bar" }); // Returns `true`
|
|
13
|
+
* equal({ foo: "bar" }, { foo: "baz" }); // Returns `false`
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare function equal(a: unknown, b: unknown): boolean;
|
|
17
|
+
//# sourceMappingURL=equal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equal.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/assert/1.0.10/equal.ts"],"names":[],"mappings":"AA2FA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CAuGrD"}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.equal = equal;
|
|
27
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
28
|
+
// This module is browser compatible.
|
|
29
|
+
const dntShim = __importStar(require("../../../../../_dnt.test_shims.js"));
|
|
30
|
+
function isKeyedCollection(x) {
|
|
31
|
+
return x instanceof Set || x instanceof Map;
|
|
32
|
+
}
|
|
33
|
+
function prototypesEqual(a, b) {
|
|
34
|
+
const pa = Object.getPrototypeOf(a);
|
|
35
|
+
const pb = Object.getPrototypeOf(b);
|
|
36
|
+
return pa === pb ||
|
|
37
|
+
pa === Object.prototype && pb === null ||
|
|
38
|
+
pa === null && pb === Object.prototype;
|
|
39
|
+
}
|
|
40
|
+
function isBasicObjectOrArray(obj) {
|
|
41
|
+
const proto = Object.getPrototypeOf(obj);
|
|
42
|
+
return proto === null || proto === Object.prototype ||
|
|
43
|
+
proto === Array.prototype;
|
|
44
|
+
}
|
|
45
|
+
// Slightly faster than Reflect.ownKeys in V8 as of 12.9.202.13-rusty (2024-10-28)
|
|
46
|
+
function ownKeys(obj) {
|
|
47
|
+
return [
|
|
48
|
+
...Object.getOwnPropertyNames(obj),
|
|
49
|
+
...Object.getOwnPropertySymbols(obj),
|
|
50
|
+
];
|
|
51
|
+
}
|
|
52
|
+
function getKeysDeep(obj) {
|
|
53
|
+
const keys = new Set();
|
|
54
|
+
while (obj !== Object.prototype && obj !== Array.prototype && obj != null) {
|
|
55
|
+
for (const key of ownKeys(obj)) {
|
|
56
|
+
keys.add(key);
|
|
57
|
+
}
|
|
58
|
+
obj = Object.getPrototypeOf(obj);
|
|
59
|
+
}
|
|
60
|
+
return keys;
|
|
61
|
+
}
|
|
62
|
+
// deno-lint-ignore no-explicit-any
|
|
63
|
+
const Temporal = dntShim.dntGlobalThis.Temporal ??
|
|
64
|
+
new Proxy({}, { get: () => { } });
|
|
65
|
+
/** A non-exhaustive list of prototypes that can be accurately fast-path compared with `String(instance)` */
|
|
66
|
+
const stringComparablePrototypes = new Set([
|
|
67
|
+
Intl.Locale,
|
|
68
|
+
RegExp,
|
|
69
|
+
Temporal.Duration,
|
|
70
|
+
Temporal.Instant,
|
|
71
|
+
Temporal.PlainDate,
|
|
72
|
+
Temporal.PlainDateTime,
|
|
73
|
+
Temporal.PlainTime,
|
|
74
|
+
Temporal.PlainYearMonth,
|
|
75
|
+
Temporal.PlainMonthDay,
|
|
76
|
+
Temporal.ZonedDateTime,
|
|
77
|
+
URL,
|
|
78
|
+
URLSearchParams,
|
|
79
|
+
].filter((x) => x != null).map((x) => x.prototype));
|
|
80
|
+
function isPrimitive(x) {
|
|
81
|
+
return typeof x === "string" ||
|
|
82
|
+
typeof x === "number" ||
|
|
83
|
+
typeof x === "boolean" ||
|
|
84
|
+
typeof x === "bigint" ||
|
|
85
|
+
typeof x === "symbol" ||
|
|
86
|
+
x == null;
|
|
87
|
+
}
|
|
88
|
+
const TypedArray = Object.getPrototypeOf(Uint8Array);
|
|
89
|
+
function compareTypedArrays(a, b) {
|
|
90
|
+
if (a.length !== b.length)
|
|
91
|
+
return false;
|
|
92
|
+
for (let i = 0; i < b.length; i++) {
|
|
93
|
+
if (!sameValueZero(a[i], b[i]))
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
/** Check both strict equality (`0 == -0`) and `Object.is` (`NaN == NaN`) */
|
|
99
|
+
function sameValueZero(a, b) {
|
|
100
|
+
return a === b || Object.is(a, b);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Deep equality comparison used in assertions.
|
|
104
|
+
*
|
|
105
|
+
* @param a The actual value
|
|
106
|
+
* @param b The expected value
|
|
107
|
+
* @returns `true` if the values are deeply equal, `false` otherwise
|
|
108
|
+
*
|
|
109
|
+
* @example Usage
|
|
110
|
+
* ```ts
|
|
111
|
+
* import { equal } from "@std/assert/equal";
|
|
112
|
+
*
|
|
113
|
+
* equal({ foo: "bar" }, { foo: "bar" }); // Returns `true`
|
|
114
|
+
* equal({ foo: "bar" }, { foo: "baz" }); // Returns `false`
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
function equal(a, b) {
|
|
118
|
+
const seen = new Map();
|
|
119
|
+
return (function compare(a, b) {
|
|
120
|
+
if (sameValueZero(a, b))
|
|
121
|
+
return true;
|
|
122
|
+
if (isPrimitive(a) || isPrimitive(b))
|
|
123
|
+
return false;
|
|
124
|
+
if (a instanceof Date && b instanceof Date) {
|
|
125
|
+
return Object.is(a.getTime(), b.getTime());
|
|
126
|
+
}
|
|
127
|
+
if (a && typeof a === "object" && b && typeof b === "object") {
|
|
128
|
+
if (!prototypesEqual(a, b)) {
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
if (a instanceof TypedArray) {
|
|
132
|
+
return compareTypedArrays(a, b);
|
|
133
|
+
}
|
|
134
|
+
if (a instanceof WeakMap) {
|
|
135
|
+
throw new TypeError("cannot compare WeakMap instances");
|
|
136
|
+
}
|
|
137
|
+
if (a instanceof WeakSet) {
|
|
138
|
+
throw new TypeError("cannot compare WeakSet instances");
|
|
139
|
+
}
|
|
140
|
+
if (a instanceof WeakRef) {
|
|
141
|
+
return compare(a.deref(), b.deref());
|
|
142
|
+
}
|
|
143
|
+
if (seen.get(a) === b) {
|
|
144
|
+
return true;
|
|
145
|
+
}
|
|
146
|
+
if (Object.keys(a).length !== Object.keys(b).length) {
|
|
147
|
+
return false;
|
|
148
|
+
}
|
|
149
|
+
seen.set(a, b);
|
|
150
|
+
if (isKeyedCollection(a) && isKeyedCollection(b)) {
|
|
151
|
+
if (a.size !== b.size) {
|
|
152
|
+
return false;
|
|
153
|
+
}
|
|
154
|
+
const aKeys = [...a.keys()];
|
|
155
|
+
const primitiveKeysFastPath = aKeys.every(isPrimitive);
|
|
156
|
+
if (primitiveKeysFastPath) {
|
|
157
|
+
if (a instanceof Set) {
|
|
158
|
+
return a.symmetricDifference(b).size === 0;
|
|
159
|
+
}
|
|
160
|
+
for (const key of aKeys) {
|
|
161
|
+
if (!b.has(key) ||
|
|
162
|
+
!compare(a.get(key), b.get(key))) {
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return true;
|
|
167
|
+
}
|
|
168
|
+
let unmatchedEntries = a.size;
|
|
169
|
+
for (const [aKey, aValue] of a.entries()) {
|
|
170
|
+
for (const [bKey, bValue] of b.entries()) {
|
|
171
|
+
/* Given that Map keys can be references, we need
|
|
172
|
+
* to ensure that they are also deeply equal */
|
|
173
|
+
if (!compare(aKey, bKey))
|
|
174
|
+
continue;
|
|
175
|
+
if ((aKey === aValue && bKey === bValue) ||
|
|
176
|
+
(compare(aValue, bValue))) {
|
|
177
|
+
unmatchedEntries--;
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return unmatchedEntries === 0;
|
|
183
|
+
}
|
|
184
|
+
let keys;
|
|
185
|
+
if (isBasicObjectOrArray(a)) {
|
|
186
|
+
// fast path
|
|
187
|
+
keys = ownKeys({ ...a, ...b });
|
|
188
|
+
}
|
|
189
|
+
else if (stringComparablePrototypes.has(Object.getPrototypeOf(a))) {
|
|
190
|
+
// medium path
|
|
191
|
+
return String(a) === String(b);
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
// slow path
|
|
195
|
+
keys = getKeysDeep(a).union(getKeysDeep(b));
|
|
196
|
+
}
|
|
197
|
+
for (const key of keys) {
|
|
198
|
+
if (!compare(a[key], b[key])) {
|
|
199
|
+
return false;
|
|
200
|
+
}
|
|
201
|
+
if (((key in a) && (!(key in b))) || ((key in b) && (!(key in a)))) {
|
|
202
|
+
return false;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
return true;
|
|
206
|
+
}
|
|
207
|
+
return false;
|
|
208
|
+
})(a, b);
|
|
209
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Make an assertion that `actual` and `expected` are equal, deeply. If not
|
|
3
|
+
* deeply equal, then throw.
|
|
4
|
+
*
|
|
5
|
+
* Type parameter can be specified to ensure values under comparison have the
|
|
6
|
+
* same type.
|
|
7
|
+
*
|
|
8
|
+
* Note: When comparing `Blob` objects, you should first convert them to
|
|
9
|
+
* `Uint8Array` using the `Blob.bytes()` method and then compare their
|
|
10
|
+
* contents.
|
|
11
|
+
*
|
|
12
|
+
* @example Usage
|
|
13
|
+
* ```ts ignore
|
|
14
|
+
* import { assertEquals } from "@std/assert";
|
|
15
|
+
*
|
|
16
|
+
* assertEquals("world", "world"); // Doesn't throw
|
|
17
|
+
* assertEquals("hello", "world"); // Throws
|
|
18
|
+
* ```
|
|
19
|
+
* @example Compare `Blob` objects
|
|
20
|
+
* ```ts ignore
|
|
21
|
+
* import { assertEquals } from "@std/assert";
|
|
22
|
+
*
|
|
23
|
+
* const bytes1 = await new Blob(["foo"]).bytes();
|
|
24
|
+
* const bytes2 = await new Blob(["foo"]).bytes();
|
|
25
|
+
*
|
|
26
|
+
* assertEquals(bytes1, bytes2);
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @typeParam T The type of the values to compare. This is usually inferred.
|
|
30
|
+
* @param actual The actual value to compare.
|
|
31
|
+
* @param expected The expected value to compare.
|
|
32
|
+
* @param msg The optional message to display if the assertion fails.
|
|
33
|
+
*/
|
|
34
|
+
export declare function assertEquals<T>(actual: T, expected: T, msg?: string): void;
|
|
35
|
+
//# sourceMappingURL=equals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equals.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/assert/1.0.10/equals.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QAkBb"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assertEquals = assertEquals;
|
|
4
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
5
|
+
// This module is browser compatible.
|
|
6
|
+
const equal_js_1 = require("./equal.js");
|
|
7
|
+
const build_message_js_1 = require("../../internal/1.0.5/build_message.js");
|
|
8
|
+
const diff_js_1 = require("../../internal/1.0.5/diff.js");
|
|
9
|
+
const diff_str_js_1 = require("../../internal/1.0.5/diff_str.js");
|
|
10
|
+
const format_js_1 = require("../../internal/1.0.5/format.js");
|
|
11
|
+
const assertion_error_js_1 = require("./assertion_error.js");
|
|
12
|
+
/**
|
|
13
|
+
* Make an assertion that `actual` and `expected` are equal, deeply. If not
|
|
14
|
+
* deeply equal, then throw.
|
|
15
|
+
*
|
|
16
|
+
* Type parameter can be specified to ensure values under comparison have the
|
|
17
|
+
* same type.
|
|
18
|
+
*
|
|
19
|
+
* Note: When comparing `Blob` objects, you should first convert them to
|
|
20
|
+
* `Uint8Array` using the `Blob.bytes()` method and then compare their
|
|
21
|
+
* contents.
|
|
22
|
+
*
|
|
23
|
+
* @example Usage
|
|
24
|
+
* ```ts ignore
|
|
25
|
+
* import { assertEquals } from "@std/assert";
|
|
26
|
+
*
|
|
27
|
+
* assertEquals("world", "world"); // Doesn't throw
|
|
28
|
+
* assertEquals("hello", "world"); // Throws
|
|
29
|
+
* ```
|
|
30
|
+
* @example Compare `Blob` objects
|
|
31
|
+
* ```ts ignore
|
|
32
|
+
* import { assertEquals } from "@std/assert";
|
|
33
|
+
*
|
|
34
|
+
* const bytes1 = await new Blob(["foo"]).bytes();
|
|
35
|
+
* const bytes2 = await new Blob(["foo"]).bytes();
|
|
36
|
+
*
|
|
37
|
+
* assertEquals(bytes1, bytes2);
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @typeParam T The type of the values to compare. This is usually inferred.
|
|
41
|
+
* @param actual The actual value to compare.
|
|
42
|
+
* @param expected The expected value to compare.
|
|
43
|
+
* @param msg The optional message to display if the assertion fails.
|
|
44
|
+
*/
|
|
45
|
+
function assertEquals(actual, expected, msg) {
|
|
46
|
+
if ((0, equal_js_1.equal)(actual, expected)) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
50
|
+
let message = `Values are not equal${msgSuffix}`;
|
|
51
|
+
const actualString = (0, format_js_1.format)(actual);
|
|
52
|
+
const expectedString = (0, format_js_1.format)(expected);
|
|
53
|
+
const stringDiff = (typeof actual === "string") &&
|
|
54
|
+
(typeof expected === "string");
|
|
55
|
+
const diffResult = stringDiff
|
|
56
|
+
? (0, diff_str_js_1.diffStr)(actual, expected)
|
|
57
|
+
: (0, diff_js_1.diff)(actualString.split("\n"), expectedString.split("\n"));
|
|
58
|
+
const diffMsg = (0, build_message_js_1.buildMessage)(diffResult, { stringDiff }).join("\n");
|
|
59
|
+
message = `${message}\n${diffMsg}`;
|
|
60
|
+
throw new assertion_error_js_1.AssertionError(message);
|
|
61
|
+
}
|