@temboplus/afloat 0.1.60 → 0.1.61
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/package.json +2 -3
- package/esm/_dnt.test_shims.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/assert.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/exists.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/fail.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/false.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/greater.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/less.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/mod.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/throws.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
- package/esm/src/models/contact/derivatives/contact.test.d.ts.map +0 -1
- package/esm/src/models/contact/derivatives/contact_info.test.d.ts.map +0 -1
- package/esm/src/models/contact/validation.test.d.ts.map +0 -1
- package/esm/src/models/payout/derivatives/payout.test.d.ts.map +0 -1
- package/script/npm/src/_dnt.test_shims.d.ts +0 -6
- package/script/npm/src/_dnt.test_shims.d.ts.map +0 -1
- package/script/npm/src/_dnt.test_shims.js +0 -65
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts +0 -29
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/almost_equals.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/almost_equals.js +0 -49
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts +0 -24
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/array_includes.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/array_includes.js +0 -49
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assert.d.ts +0 -16
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assert.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assert.js +0 -25
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts +0 -26
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assertion_error.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/assertion_error.js +0 -34
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equal.d.ts +0 -17
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equal.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equal.js +0 -209
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equals.d.ts +0 -35
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equals.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/equals.js +0 -61
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/exists.d.ts +0 -18
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/exists.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/exists.js +0 -30
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/fail.d.ts +0 -15
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/fail.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/fail.js +0 -23
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/false.d.ts +0 -18
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/false.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/false.js +0 -25
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater.d.ts +0 -20
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater.js +0 -32
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts +0 -20
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/greater_or_equal.js +0 -32
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts +0 -23
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/instance_of.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/instance_of.js +0 -55
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts +0 -25
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/is_error.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/is_error.js +0 -56
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less.d.ts +0 -19
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less.js +0 -31
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts +0 -20
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less_or_equal.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/less_or_equal.js +0 -32
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/match.d.ts +0 -18
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/match.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/match.js +0 -29
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/mod.d.ts +0 -44
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/mod.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/mod.js +0 -61
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts +0 -21
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_equals.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_equals.js +0 -36
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts +0 -20
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_instance_of.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_instance_of.js +0 -32
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts +0 -18
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_match.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_match.js +0 -29
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts +0 -23
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/not_strict_equals.js +0 -35
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts +0 -29
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/object_match.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/object_match.js +0 -163
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts +0 -42
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/rejects.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/rejects.js +0 -56
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts +0 -24
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/strict_equals.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/strict_equals.js +0 -60
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts +0 -18
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/string_includes.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/string_includes.js +0 -29
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/throws.d.ts +0 -45
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/throws.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/throws.js +0 -47
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts +0 -15
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unimplemented.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unimplemented.js +0 -23
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts +0 -15
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unreachable.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/assert/1.0.10/unreachable.js +0 -23
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts +0 -82
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/build_message.js +0 -115
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff.d.ts +0 -140
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff.js +0 -283
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts +0 -99
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/diff_str.js +0 -185
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/format.d.ts +0 -2
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/format.js +0 -63
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/styles.d.ts +0 -159
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/styles.js +0 -242
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/types.d.ts +0 -16
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +0 -1
- package/script/npm/src/deps/jsr.io/@std/internal/1.0.5/types.js +0 -3
- package/script/npm/src/src/models/contact/derivatives/contact.test.d.ts +0 -1
- package/script/npm/src/src/models/contact/derivatives/contact.test.d.ts.map +0 -1
- package/script/npm/src/src/models/contact/derivatives/contact.test.js +0 -64
- package/script/npm/src/src/models/contact/derivatives/contact_info.test.d.ts +0 -1
- package/script/npm/src/src/models/contact/derivatives/contact_info.test.d.ts.map +0 -1
- package/script/npm/src/src/models/contact/derivatives/contact_info.test.js +0 -331
- package/script/npm/src/src/models/contact/validation.test.d.ts +0 -2
- package/script/npm/src/src/models/contact/validation.test.d.ts.map +0 -1
- package/script/npm/src/src/models/contact/validation.test.js +0 -186
- package/script/npm/src/src/models/payout/derivatives/payout.test.d.ts +0 -1
- package/script/npm/src/src/models/payout/derivatives/payout.test.d.ts.map +0 -1
- package/script/npm/src/src/models/payout/derivatives/payout.test.js +0 -76
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
3
|
-
// This module is browser compatible.
|
|
4
|
-
// A module to print ANSI terminal colors. Inspired by chalk, kleur, and colors
|
|
5
|
-
// on npm.
|
|
6
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
-
if (k2 === undefined) k2 = k;
|
|
8
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
-
}
|
|
12
|
-
Object.defineProperty(o, k2, desc);
|
|
13
|
-
}) : (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
o[k2] = m[k];
|
|
16
|
-
}));
|
|
17
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
-
}) : function(o, v) {
|
|
20
|
-
o["default"] = v;
|
|
21
|
-
});
|
|
22
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
-
if (mod && mod.__esModule) return mod;
|
|
24
|
-
var result = {};
|
|
25
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
-
__setModuleDefault(result, mod);
|
|
27
|
-
return result;
|
|
28
|
-
};
|
|
29
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.bold = bold;
|
|
31
|
-
exports.red = red;
|
|
32
|
-
exports.green = green;
|
|
33
|
-
exports.yellow = yellow;
|
|
34
|
-
exports.white = white;
|
|
35
|
-
exports.gray = gray;
|
|
36
|
-
exports.brightBlack = brightBlack;
|
|
37
|
-
exports.bgRed = bgRed;
|
|
38
|
-
exports.bgGreen = bgGreen;
|
|
39
|
-
exports.stripAnsiCode = stripAnsiCode;
|
|
40
|
-
// This code is vendored from `fmt/colors.ts`.
|
|
41
|
-
// deno-lint-ignore no-explicit-any
|
|
42
|
-
const dntShim = __importStar(require("../../../../../_dnt.test_shims.js"));
|
|
43
|
-
const { Deno } = dntShim.dntGlobalThis;
|
|
44
|
-
const noColor = typeof Deno?.noColor === "boolean"
|
|
45
|
-
? Deno.noColor
|
|
46
|
-
: false;
|
|
47
|
-
const enabled = !noColor;
|
|
48
|
-
function code(open, close) {
|
|
49
|
-
return {
|
|
50
|
-
open: `\x1b[${open.join(";")}m`,
|
|
51
|
-
close: `\x1b[${close}m`,
|
|
52
|
-
regexp: new RegExp(`\\x1b\\[${close}m`, "g"),
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
function run(str, code) {
|
|
56
|
-
return enabled
|
|
57
|
-
? `${code.open}${str.replace(code.regexp, code.open)}${code.close}`
|
|
58
|
-
: str;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Sets the style of text to be printed to bold.
|
|
62
|
-
*
|
|
63
|
-
* Disable by setting the `NO_COLOR` environmental variable.
|
|
64
|
-
*
|
|
65
|
-
* @param str Text to make bold
|
|
66
|
-
*
|
|
67
|
-
* @returns Bold text for printing
|
|
68
|
-
*
|
|
69
|
-
* @example Usage
|
|
70
|
-
* ```ts no-assert
|
|
71
|
-
* import { bold } from "@std/internal/styles";
|
|
72
|
-
*
|
|
73
|
-
* console.log(bold("Hello, world!")); // Prints "Hello, world!" in bold
|
|
74
|
-
* ```
|
|
75
|
-
*/
|
|
76
|
-
function bold(str) {
|
|
77
|
-
return run(str, code([1], 22));
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Sets the color of text to be printed to red.
|
|
81
|
-
*
|
|
82
|
-
* Disable by setting the `NO_COLOR` environmental variable.
|
|
83
|
-
*
|
|
84
|
-
* @param str Text to make red
|
|
85
|
-
*
|
|
86
|
-
* @returns Red text for printing
|
|
87
|
-
*
|
|
88
|
-
* @example Usage
|
|
89
|
-
* ```ts no-assert
|
|
90
|
-
* import { red } from "@std/internal/styles";
|
|
91
|
-
*
|
|
92
|
-
* console.log(red("Hello, world!")); // Prints "Hello, world!" in red
|
|
93
|
-
* ```
|
|
94
|
-
*/
|
|
95
|
-
function red(str) {
|
|
96
|
-
return run(str, code([31], 39));
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Sets the color of text to be printed to green.
|
|
100
|
-
*
|
|
101
|
-
* Disable by setting the `NO_COLOR` environmental variable.
|
|
102
|
-
*
|
|
103
|
-
* @param str Text to make green
|
|
104
|
-
*
|
|
105
|
-
* @returns Green text for print
|
|
106
|
-
*
|
|
107
|
-
* @example Usage
|
|
108
|
-
* ```ts no-assert
|
|
109
|
-
* import { green } from "@std/internal/styles";
|
|
110
|
-
*
|
|
111
|
-
* console.log(green("Hello, world!")); // Prints "Hello, world!" in green
|
|
112
|
-
* ```
|
|
113
|
-
*/
|
|
114
|
-
function green(str) {
|
|
115
|
-
return run(str, code([32], 39));
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Sets the color of text to be printed to yellow.
|
|
119
|
-
*
|
|
120
|
-
* Disable by setting the `NO_COLOR` environmental variable.
|
|
121
|
-
*
|
|
122
|
-
* @param str Text to make yellow
|
|
123
|
-
*
|
|
124
|
-
* @returns Yellow text for print
|
|
125
|
-
*
|
|
126
|
-
* @example Usage
|
|
127
|
-
* ```ts no-assert
|
|
128
|
-
* import { yellow } from "@std/internal/styles";
|
|
129
|
-
*
|
|
130
|
-
* console.log(yellow("Hello, world!")); // Prints "Hello, world!" in yellow
|
|
131
|
-
* ```
|
|
132
|
-
*/
|
|
133
|
-
function yellow(str) {
|
|
134
|
-
return run(str, code([33], 39));
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Sets the color of text to be printed to white.
|
|
138
|
-
*
|
|
139
|
-
* @param str Text to make white
|
|
140
|
-
*
|
|
141
|
-
* @returns White text for print
|
|
142
|
-
*
|
|
143
|
-
* @example Usage
|
|
144
|
-
* ```ts no-assert
|
|
145
|
-
* import { white } from "@std/internal/styles";
|
|
146
|
-
*
|
|
147
|
-
* console.log(white("Hello, world!")); // Prints "Hello, world!" in white
|
|
148
|
-
* ```
|
|
149
|
-
*/
|
|
150
|
-
function white(str) {
|
|
151
|
-
return run(str, code([37], 39));
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Sets the color of text to be printed to gray.
|
|
155
|
-
*
|
|
156
|
-
* @param str Text to make gray
|
|
157
|
-
*
|
|
158
|
-
* @returns Gray text for print
|
|
159
|
-
*
|
|
160
|
-
* @example Usage
|
|
161
|
-
* ```ts no-assert
|
|
162
|
-
* import { gray } from "@std/internal/styles";
|
|
163
|
-
*
|
|
164
|
-
* console.log(gray("Hello, world!")); // Prints "Hello, world!" in gray
|
|
165
|
-
* ```
|
|
166
|
-
*/
|
|
167
|
-
function gray(str) {
|
|
168
|
-
return brightBlack(str);
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Sets the color of text to be printed to bright-black.
|
|
172
|
-
*
|
|
173
|
-
* @param str Text to make bright-black
|
|
174
|
-
*
|
|
175
|
-
* @returns Bright-black text for print
|
|
176
|
-
*
|
|
177
|
-
* @example Usage
|
|
178
|
-
* ```ts no-assert
|
|
179
|
-
* import { brightBlack } from "@std/internal/styles";
|
|
180
|
-
*
|
|
181
|
-
* console.log(brightBlack("Hello, world!")); // Prints "Hello, world!" in bright-black
|
|
182
|
-
* ```
|
|
183
|
-
*/
|
|
184
|
-
function brightBlack(str) {
|
|
185
|
-
return run(str, code([90], 39));
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* Sets the background color of text to be printed to red.
|
|
189
|
-
*
|
|
190
|
-
* @param str Text to make its background red
|
|
191
|
-
*
|
|
192
|
-
* @returns Red background text for print
|
|
193
|
-
*
|
|
194
|
-
* @example Usage
|
|
195
|
-
* ```ts no-assert
|
|
196
|
-
* import { bgRed } from "@std/internal/styles";
|
|
197
|
-
*
|
|
198
|
-
* console.log(bgRed("Hello, world!")); // Prints "Hello, world!" with red background
|
|
199
|
-
* ```
|
|
200
|
-
*/
|
|
201
|
-
function bgRed(str) {
|
|
202
|
-
return run(str, code([41], 49));
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* Sets the background color of text to be printed to green.
|
|
206
|
-
*
|
|
207
|
-
* @param str Text to make its background green
|
|
208
|
-
*
|
|
209
|
-
* @returns Green background text for print
|
|
210
|
-
*
|
|
211
|
-
* @example Usage
|
|
212
|
-
* ```ts no-assert
|
|
213
|
-
* import { bgGreen } from "@std/internal/styles";
|
|
214
|
-
*
|
|
215
|
-
* console.log(bgGreen("Hello, world!")); // Prints "Hello, world!" with green background
|
|
216
|
-
* ```
|
|
217
|
-
*/
|
|
218
|
-
function bgGreen(str) {
|
|
219
|
-
return run(str, code([42], 49));
|
|
220
|
-
}
|
|
221
|
-
// https://github.com/chalk/ansi-regex/blob/02fa893d619d3da85411acc8fd4e2eea0e95a9d9/index.js
|
|
222
|
-
const ANSI_PATTERN = new RegExp([
|
|
223
|
-
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
224
|
-
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TXZcf-nq-uy=><~]))",
|
|
225
|
-
].join("|"), "g");
|
|
226
|
-
/**
|
|
227
|
-
* Remove ANSI escape codes from the string.
|
|
228
|
-
*
|
|
229
|
-
* @param string Text to remove ANSI escape codes from
|
|
230
|
-
*
|
|
231
|
-
* @returns Text without ANSI escape codes
|
|
232
|
-
*
|
|
233
|
-
* @example Usage
|
|
234
|
-
* ```ts no-assert
|
|
235
|
-
* import { red, stripAnsiCode } from "@std/internal/styles";
|
|
236
|
-
*
|
|
237
|
-
* console.log(stripAnsiCode(red("Hello, world!"))); // Prints "Hello, world!"
|
|
238
|
-
* ```
|
|
239
|
-
*/
|
|
240
|
-
function stripAnsiCode(string) {
|
|
241
|
-
return string.replace(ANSI_PATTERN, "");
|
|
242
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/** Ways that lines in a diff can be different. */
|
|
2
|
-
export type DiffType = "removed" | "common" | "added";
|
|
3
|
-
/**
|
|
4
|
-
* Represents the result of a diff operation.
|
|
5
|
-
*
|
|
6
|
-
* @typeParam T The type of the value in the diff result.
|
|
7
|
-
*/
|
|
8
|
-
export interface DiffResult<T> {
|
|
9
|
-
/** The type of the diff. */
|
|
10
|
-
type: DiffType;
|
|
11
|
-
/** The value of the diff. */
|
|
12
|
-
value: T;
|
|
13
|
-
/** The details of the diff. */
|
|
14
|
-
details?: DiffResult<T>[];
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../src/deps/jsr.io/@std/internal/1.0.5/types.ts"],"names":[],"mappings":"AAEA,kDAAkD;AAClD,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEtD;;;;GAIG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,4BAA4B;IAC5B,IAAI,EAAE,QAAQ,CAAC;IACf,6BAA6B;IAC7B,KAAK,EAAE,CAAC,CAAC;IACT,+BAA+B;IAC/B,OAAO,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;CAC3B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=contact.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contact.test.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/models/contact/derivatives/contact.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// import { assertEquals } from "jsr:@std/assert";
|
|
3
|
-
// import { faker } from "https://esm.sh/@faker-js/faker@9.3.0";
|
|
4
|
-
// import { Contact } from "@models/contact/index.ts";
|
|
5
|
-
// import type { ContactData } from "@models/contact/schemas.ts";
|
|
6
|
-
// // Valid contact data
|
|
7
|
-
// const validContactData: ContactData = {
|
|
8
|
-
// id: faker.string.uuid(),
|
|
9
|
-
// profileId: faker.string.uuid(),
|
|
10
|
-
// displayName: faker.person.fullName(),
|
|
11
|
-
// type: "Mobile",
|
|
12
|
-
// accountNo: "+255713345678",
|
|
13
|
-
// channel: "MPESA",
|
|
14
|
-
// createdAt: new Date(),
|
|
15
|
-
// updatedAt: new Date(),
|
|
16
|
-
// };
|
|
17
|
-
// Deno.test("Contact.is - validates Contact instances", async (t) => {
|
|
18
|
-
// const validContact = Contact.create(validContactData);
|
|
19
|
-
// await t.step("returns true for valid Contact instances", () => {
|
|
20
|
-
// assertEquals(Contact.is(validContact), true);
|
|
21
|
-
// });
|
|
22
|
-
// await t.step("returns false for non-object values", () => {
|
|
23
|
-
// assertEquals(Contact.is(null), false);
|
|
24
|
-
// assertEquals(Contact.is(undefined), false);
|
|
25
|
-
// assertEquals(Contact.is("string"), false);
|
|
26
|
-
// assertEquals(Contact.is(123), false);
|
|
27
|
-
// });
|
|
28
|
-
// await t.step("returns false for objects without data property", () => {
|
|
29
|
-
// assertEquals(Contact.is({}), false);
|
|
30
|
-
// assertEquals(Contact.is({ id: "123" }), false);
|
|
31
|
-
// });
|
|
32
|
-
// await t.step("returns false for objects with invalid data", () => {
|
|
33
|
-
// assertEquals(Contact.is({ data: {} }), false);
|
|
34
|
-
// assertEquals(Contact.is({ data: { id: "123" } }), false);
|
|
35
|
-
// });
|
|
36
|
-
// });
|
|
37
|
-
// Deno.test("Contact.canConstruct - validates contact data", async (t) => {
|
|
38
|
-
// await t.step("returns true for valid contact data", () => {
|
|
39
|
-
// assertEquals(Contact.canConstruct(validContactData), true);
|
|
40
|
-
// });
|
|
41
|
-
// await t.step("returns false for non-object values", () => {
|
|
42
|
-
// assertEquals(Contact.canConstruct(null), false);
|
|
43
|
-
// assertEquals(Contact.canConstruct(undefined), false);
|
|
44
|
-
// assertEquals(Contact.canConstruct("string"), false);
|
|
45
|
-
// assertEquals(Contact.canConstruct(123), false);
|
|
46
|
-
// });
|
|
47
|
-
// await t.step("returns false for invalid contact data", () => {
|
|
48
|
-
// assertEquals(Contact.canConstruct({}), false);
|
|
49
|
-
// assertEquals(Contact.canConstruct({ id: "123" }), false);
|
|
50
|
-
// assertEquals(
|
|
51
|
-
// Contact.canConstruct({
|
|
52
|
-
// ...validContactData,
|
|
53
|
-
// type: "InvalidType",
|
|
54
|
-
// }),
|
|
55
|
-
// false,
|
|
56
|
-
// );
|
|
57
|
-
// });
|
|
58
|
-
// await t.step("returns false for missing required fields", () => {
|
|
59
|
-
// const { id: _a, ...missingId } = validContactData;
|
|
60
|
-
// assertEquals(Contact.canConstruct(missingId), false);
|
|
61
|
-
// const { displayName: _b, ...missingName } = validContactData;
|
|
62
|
-
// assertEquals(Contact.canConstruct(missingName), false);
|
|
63
|
-
// });
|
|
64
|
-
// });
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=contact_info.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contact_info.test.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/models/contact/derivatives/contact_info.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,331 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// import { assertEquals } from "jsr:@std/assert";
|
|
3
|
-
// import {
|
|
4
|
-
// BankContactInfo,
|
|
5
|
-
// MobileContactInfo,
|
|
6
|
-
// } from "@models/contact/derivatives/contact_info.ts";
|
|
7
|
-
// import { Bank, TZPhoneNumber } from "@temboplus/frontend-core";
|
|
8
|
-
// Deno.test("MobileContactInfo.is", async (t) => {
|
|
9
|
-
// // Valid inputs with string phone number
|
|
10
|
-
// await t.step("accepts valid object with string phone number", () => {
|
|
11
|
-
// assertEquals(
|
|
12
|
-
// MobileContactInfo.is({
|
|
13
|
-
// name: "John Doe",
|
|
14
|
-
// phoneNumber: "+255712345678",
|
|
15
|
-
// }),
|
|
16
|
-
// true,
|
|
17
|
-
// );
|
|
18
|
-
// assertEquals(
|
|
19
|
-
// MobileContactInfo.is({
|
|
20
|
-
// name: "Jane Doe",
|
|
21
|
-
// phoneNumber: "0712345678",
|
|
22
|
-
// }),
|
|
23
|
-
// true,
|
|
24
|
-
// );
|
|
25
|
-
// });
|
|
26
|
-
// // Valid inputs with PhoneNumber object
|
|
27
|
-
// await t.step("accepts valid object with PhoneNumber instance", () => {
|
|
28
|
-
// const phoneNumber = TZPhoneNumber.from("+255712345678");
|
|
29
|
-
// assertEquals(
|
|
30
|
-
// MobileContactInfo.is({
|
|
31
|
-
// name: "John Doe",
|
|
32
|
-
// phoneNumber,
|
|
33
|
-
// }),
|
|
34
|
-
// true,
|
|
35
|
-
// );
|
|
36
|
-
// });
|
|
37
|
-
// // Invalid inputs - not an object
|
|
38
|
-
// await t.step("rejects non-object inputs", () => {
|
|
39
|
-
// assertEquals(MobileContactInfo.is(undefined), false);
|
|
40
|
-
// assertEquals(MobileContactInfo.is(null), false);
|
|
41
|
-
// assertEquals(MobileContactInfo.is(""), false);
|
|
42
|
-
// assertEquals(MobileContactInfo.is(123), false);
|
|
43
|
-
// assertEquals(MobileContactInfo.is(true), false);
|
|
44
|
-
// });
|
|
45
|
-
// // Invalid inputs - missing properties
|
|
46
|
-
// await t.step("rejects objects with missing properties", () => {
|
|
47
|
-
// assertEquals(MobileContactInfo.is({}), false);
|
|
48
|
-
// assertEquals(MobileContactInfo.is({ name: "John Doe" }), false);
|
|
49
|
-
// assertEquals(MobileContactInfo.is({ phoneNumber: "+255712345678" }), false);
|
|
50
|
-
// });
|
|
51
|
-
// // Invalid inputs - empty name
|
|
52
|
-
// await t.step("rejects empty name", () => {
|
|
53
|
-
// assertEquals(
|
|
54
|
-
// MobileContactInfo.is({
|
|
55
|
-
// name: "",
|
|
56
|
-
// phoneNumber: "+255712345678",
|
|
57
|
-
// }),
|
|
58
|
-
// false,
|
|
59
|
-
// );
|
|
60
|
-
// assertEquals(
|
|
61
|
-
// MobileContactInfo.is({
|
|
62
|
-
// name: " ",
|
|
63
|
-
// phoneNumber: "+255712345678",
|
|
64
|
-
// }),
|
|
65
|
-
// false,
|
|
66
|
-
// );
|
|
67
|
-
// });
|
|
68
|
-
// // Invalid inputs - wrong property types
|
|
69
|
-
// await t.step("rejects invalid property types", () => {
|
|
70
|
-
// assertEquals(
|
|
71
|
-
// MobileContactInfo.is({
|
|
72
|
-
// name: 123,
|
|
73
|
-
// phoneNumber: "+255712345678",
|
|
74
|
-
// }),
|
|
75
|
-
// false,
|
|
76
|
-
// );
|
|
77
|
-
// assertEquals(
|
|
78
|
-
// MobileContactInfo.is({
|
|
79
|
-
// name: true,
|
|
80
|
-
// phoneNumber: "+255712345678",
|
|
81
|
-
// }),
|
|
82
|
-
// false,
|
|
83
|
-
// );
|
|
84
|
-
// assertEquals(
|
|
85
|
-
// MobileContactInfo.is({
|
|
86
|
-
// name: {},
|
|
87
|
-
// phoneNumber: "+255712345678",
|
|
88
|
-
// }),
|
|
89
|
-
// false,
|
|
90
|
-
// );
|
|
91
|
-
// assertEquals(
|
|
92
|
-
// MobileContactInfo.is({
|
|
93
|
-
// name: [],
|
|
94
|
-
// phoneNumber: "+255712345678",
|
|
95
|
-
// }),
|
|
96
|
-
// false,
|
|
97
|
-
// );
|
|
98
|
-
// });
|
|
99
|
-
// // Invalid inputs - invalid phone numbers
|
|
100
|
-
// await t.step("rejects invalid phone numbers", () => {
|
|
101
|
-
// assertEquals(
|
|
102
|
-
// MobileContactInfo.is({
|
|
103
|
-
// name: "John Doe",
|
|
104
|
-
// phoneNumber: "invalid",
|
|
105
|
-
// }),
|
|
106
|
-
// false,
|
|
107
|
-
// );
|
|
108
|
-
// assertEquals(
|
|
109
|
-
// MobileContactInfo.is({
|
|
110
|
-
// name: "John Doe",
|
|
111
|
-
// phoneNumber: "12345", // Too short
|
|
112
|
-
// }),
|
|
113
|
-
// false,
|
|
114
|
-
// );
|
|
115
|
-
// assertEquals(
|
|
116
|
-
// MobileContactInfo.is({
|
|
117
|
-
// name: "John Doe",
|
|
118
|
-
// phoneNumber: "+255999999999", // Invalid prefix
|
|
119
|
-
// }),
|
|
120
|
-
// false,
|
|
121
|
-
// );
|
|
122
|
-
// assertEquals(
|
|
123
|
-
// MobileContactInfo.is({
|
|
124
|
-
// name: "John Doe",
|
|
125
|
-
// phoneNumber: {}, // Empty object
|
|
126
|
-
// }),
|
|
127
|
-
// false,
|
|
128
|
-
// );
|
|
129
|
-
// assertEquals(
|
|
130
|
-
// MobileContactInfo.is({
|
|
131
|
-
// name: "John Doe",
|
|
132
|
-
// phoneNumber: { invalid: "object" }, // Invalid phone number object
|
|
133
|
-
// }),
|
|
134
|
-
// false,
|
|
135
|
-
// );
|
|
136
|
-
// });
|
|
137
|
-
// // Edge cases
|
|
138
|
-
// await t.step("handles edge cases correctly", () => {
|
|
139
|
-
// // Extra properties should not affect validation
|
|
140
|
-
// assertEquals(
|
|
141
|
-
// MobileContactInfo.is({
|
|
142
|
-
// name: "John Doe",
|
|
143
|
-
// phoneNumber: "+255712345678",
|
|
144
|
-
// extraProp: "something",
|
|
145
|
-
// }),
|
|
146
|
-
// true,
|
|
147
|
-
// );
|
|
148
|
-
// // Name with special characters should be valid
|
|
149
|
-
// assertEquals(
|
|
150
|
-
// MobileContactInfo.is({
|
|
151
|
-
// name: "John-Doe O'Connor",
|
|
152
|
-
// phoneNumber: "+255712345678",
|
|
153
|
-
// }),
|
|
154
|
-
// true,
|
|
155
|
-
// );
|
|
156
|
-
// // Minimum valid name length
|
|
157
|
-
// assertEquals(
|
|
158
|
-
// MobileContactInfo.is({
|
|
159
|
-
// name: "J",
|
|
160
|
-
// phoneNumber: "+255712345678",
|
|
161
|
-
// }),
|
|
162
|
-
// true,
|
|
163
|
-
// );
|
|
164
|
-
// });
|
|
165
|
-
// });
|
|
166
|
-
// Deno.test("BankContactInfo.is", async (t) => {
|
|
167
|
-
// // Setup valid bank object for tests
|
|
168
|
-
// const validBank = Bank.fromSWIFTCode("CORUTZTZ")
|
|
169
|
-
// // Valid cases with all properties correct
|
|
170
|
-
// await t.step("accepts valid object with all correct properties", () => {
|
|
171
|
-
// assertEquals(
|
|
172
|
-
// BankContactInfo.is({
|
|
173
|
-
// accName: "John Doe",
|
|
174
|
-
// accNumber: "1234567890",
|
|
175
|
-
// bank: validBank,
|
|
176
|
-
// }),
|
|
177
|
-
// true,
|
|
178
|
-
// );
|
|
179
|
-
// });
|
|
180
|
-
// // Invalid inputs - not an object
|
|
181
|
-
// await t.step("rejects non-object inputs", () => {
|
|
182
|
-
// assertEquals(BankContactInfo.is(undefined), false);
|
|
183
|
-
// assertEquals(BankContactInfo.is(null), false);
|
|
184
|
-
// assertEquals(BankContactInfo.is(""), false);
|
|
185
|
-
// assertEquals(BankContactInfo.is(123), false);
|
|
186
|
-
// assertEquals(BankContactInfo.is(true), false);
|
|
187
|
-
// });
|
|
188
|
-
// // Invalid inputs - missing properties
|
|
189
|
-
// await t.step("rejects objects with missing properties", () => {
|
|
190
|
-
// assertEquals(BankContactInfo.is({}), false);
|
|
191
|
-
// assertEquals(
|
|
192
|
-
// BankContactInfo.is({
|
|
193
|
-
// accName: "John Doe",
|
|
194
|
-
// }),
|
|
195
|
-
// false,
|
|
196
|
-
// );
|
|
197
|
-
// assertEquals(
|
|
198
|
-
// BankContactInfo.is({
|
|
199
|
-
// accName: "John Doe",
|
|
200
|
-
// accNumber: "1234567890",
|
|
201
|
-
// }),
|
|
202
|
-
// false,
|
|
203
|
-
// );
|
|
204
|
-
// assertEquals(
|
|
205
|
-
// BankContactInfo.is({
|
|
206
|
-
// accNumber: "1234567890",
|
|
207
|
-
// bank: validBank,
|
|
208
|
-
// }),
|
|
209
|
-
// false,
|
|
210
|
-
// );
|
|
211
|
-
// assertEquals(
|
|
212
|
-
// BankContactInfo.is({
|
|
213
|
-
// accName: "John Doe",
|
|
214
|
-
// bank: validBank,
|
|
215
|
-
// }),
|
|
216
|
-
// false,
|
|
217
|
-
// );
|
|
218
|
-
// });
|
|
219
|
-
// // Invalid inputs - wrong property types
|
|
220
|
-
// await t.step("rejects invalid property types", () => {
|
|
221
|
-
// assertEquals(
|
|
222
|
-
// BankContactInfo.is({
|
|
223
|
-
// accName: 123,
|
|
224
|
-
// accNumber: "1234567890",
|
|
225
|
-
// bank: validBank,
|
|
226
|
-
// }),
|
|
227
|
-
// false,
|
|
228
|
-
// );
|
|
229
|
-
// assertEquals(
|
|
230
|
-
// BankContactInfo.is({
|
|
231
|
-
// accName: "John Doe",
|
|
232
|
-
// accNumber: 1234567890,
|
|
233
|
-
// bank: validBank,
|
|
234
|
-
// }),
|
|
235
|
-
// false,
|
|
236
|
-
// );
|
|
237
|
-
// assertEquals(
|
|
238
|
-
// BankContactInfo.is({
|
|
239
|
-
// accName: "John Doe",
|
|
240
|
-
// accNumber: "1234567890",
|
|
241
|
-
// bank: "CRDB", // bank should be object
|
|
242
|
-
// }),
|
|
243
|
-
// false,
|
|
244
|
-
// );
|
|
245
|
-
// });
|
|
246
|
-
// // Invalid inputs - empty or invalid strings
|
|
247
|
-
// await t.step("rejects invalid string values", () => {
|
|
248
|
-
// assertEquals(
|
|
249
|
-
// BankContactInfo.is({
|
|
250
|
-
// accName: "",
|
|
251
|
-
// accNumber: "1234567890",
|
|
252
|
-
// bank: validBank,
|
|
253
|
-
// }),
|
|
254
|
-
// false,
|
|
255
|
-
// );
|
|
256
|
-
// assertEquals(
|
|
257
|
-
// BankContactInfo.is({
|
|
258
|
-
// accName: "John Doe",
|
|
259
|
-
// accNumber: "",
|
|
260
|
-
// bank: validBank,
|
|
261
|
-
// }),
|
|
262
|
-
// false,
|
|
263
|
-
// );
|
|
264
|
-
// assertEquals(
|
|
265
|
-
// BankContactInfo.is({
|
|
266
|
-
// accName: " ",
|
|
267
|
-
// accNumber: "1234567890",
|
|
268
|
-
// bank: validBank,
|
|
269
|
-
// }),
|
|
270
|
-
// false,
|
|
271
|
-
// );
|
|
272
|
-
// });
|
|
273
|
-
// // Invalid inputs - invalid bank object
|
|
274
|
-
// await t.step("rejects invalid bank object", () => {
|
|
275
|
-
// assertEquals(
|
|
276
|
-
// BankContactInfo.is({
|
|
277
|
-
// accName: "John Doe",
|
|
278
|
-
// accNumber: "1234567890",
|
|
279
|
-
// bank: {},
|
|
280
|
-
// }),
|
|
281
|
-
// false,
|
|
282
|
-
// );
|
|
283
|
-
// assertEquals(
|
|
284
|
-
// BankContactInfo.is({
|
|
285
|
-
// accName: "John Doe",
|
|
286
|
-
// accNumber: "1234567890",
|
|
287
|
-
// bank: { name: "CRDB" }, // incomplete bank object
|
|
288
|
-
// }),
|
|
289
|
-
// false,
|
|
290
|
-
// );
|
|
291
|
-
// assertEquals(
|
|
292
|
-
// BankContactInfo.is({
|
|
293
|
-
// accName: "John Doe",
|
|
294
|
-
// accNumber: "1234567890",
|
|
295
|
-
// bank: { invalid: "object" },
|
|
296
|
-
// }),
|
|
297
|
-
// false,
|
|
298
|
-
// );
|
|
299
|
-
// });
|
|
300
|
-
// // Edge cases
|
|
301
|
-
// await t.step("handles edge cases correctly", () => {
|
|
302
|
-
// // Extra properties should not affect validation
|
|
303
|
-
// assertEquals(
|
|
304
|
-
// BankContactInfo.is({
|
|
305
|
-
// accName: "John Doe",
|
|
306
|
-
// accNumber: "1234567890",
|
|
307
|
-
// bank: validBank,
|
|
308
|
-
// extraProp: "something",
|
|
309
|
-
// }),
|
|
310
|
-
// true,
|
|
311
|
-
// );
|
|
312
|
-
// // Account name with special characters (assuming validateAccName allows them)
|
|
313
|
-
// assertEquals(
|
|
314
|
-
// BankContactInfo.is({
|
|
315
|
-
// accName: "John-Doe O'Connor",
|
|
316
|
-
// accNumber: "1234567890",
|
|
317
|
-
// bank: validBank,
|
|
318
|
-
// }),
|
|
319
|
-
// true,
|
|
320
|
-
// );
|
|
321
|
-
// // Account number with special formatting (assuming validateBankAccNo handles it)
|
|
322
|
-
// assertEquals(
|
|
323
|
-
// BankContactInfo.is({
|
|
324
|
-
// accName: "John Doe",
|
|
325
|
-
// accNumber: "1234-5678-90",
|
|
326
|
-
// bank: validBank,
|
|
327
|
-
// }),
|
|
328
|
-
// false,
|
|
329
|
-
// );
|
|
330
|
-
// });
|
|
331
|
-
// });
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validation.test.d.ts","sourceRoot":"","sources":["../../../../../../src/src/models/contact/validation.test.ts"],"names":[],"mappings":""}
|