Skip to content

Commit 2420166

Browse files
🤖 dprint fmt
1 parent fc9e107 commit 2420166

File tree

12 files changed

+101
-103
lines changed

12 files changed

+101
-103
lines changed

types/mokapi/encoding.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,3 @@ export interface Base64Encoding {
2424
}
2525

2626
export const base64: Base64Encoding;
27-
28-

types/mokapi/faker.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export interface Request {
156156
* This allows for interdependent data generation — for example, creating an email
157157
* address using a previously generated first and last name.
158158
*/
159-
context: Context
159+
context: Context;
160160
}
161161

162162
/**
@@ -166,7 +166,7 @@ export interface Context {
166166
/**
167167
* A map of names to previously generated values.
168168
*/
169-
values: { [name: string]: any }
169+
values: { [name: string]: any };
170170
}
171171

172172
/**
@@ -392,4 +392,4 @@ export interface Schema {
392392

393393
/** Specifies whether all items in an array must be unique. */
394394
uniqueItems?: boolean;
395-
}
395+
}

types/mokapi/global.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ declare global {
2424
*/
2525
as: "binary" | "string" | "resolved";
2626
}
27-
}
27+
}

types/mokapi/http.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,4 @@ export interface Response {
117117
* res.json()
118118
*/
119119
json(): JSONValue;
120-
}
120+
}

types/mokapi/index.d.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ export interface JSONObject {
459459
/**
460460
* Specifies the date-time format defined in [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339).
461461
* This constant can be used when defining or validating datetime strings.
462-
*
462+
*
463463
* @example
464464
* const date = new Date().toISOString()
465465
* if (isValidDate(date, RFC3339)) {
@@ -471,24 +471,24 @@ export const RFC3339 = "RFC3339";
471471
/**
472472
* Applies a patch object to a target object. Only properties that are explicitly defined in the patch
473473
* are applied. This includes nested objects. Properties marked with `Delete` will be removed.
474-
*
474+
*
475475
* This function is especially useful when working with generated mock data in Mokapi that you want to override
476476
* or refine with specific values.
477-
*
477+
*
478478
* https://mokapi.io/docs/javascript-api/mokapi/patch
479-
*
479+
*
480480
* @param target The original object or value to be patched.
481481
* @param patch The patch object or value. Only defined values are applied; undefined values are ignored. Use `Delete` to remove fields.
482482
* @returns A new object or value with the patch applied.
483-
*
483+
*
484484
* @example
485485
* const result = patch({ name: "foo", age: 42 }, { name: "bar" })
486486
* // result: { name: "bar", age: 42 }
487-
*
487+
*
488488
* @example
489489
* const result = patch({ name: "foo", meta: { version: 1 } }, { meta: { version: 2 } })
490490
* // result: { name: "foo", meta: { version: 2 } }
491-
*
491+
*
492492
* @example
493493
* const result = patch({ name: "foo", age: 42 }, { age: Delete })
494494
* // result: { name: "foo" }
@@ -497,16 +497,16 @@ export function patch(target: any, patch: any): any;
497497

498498
/**
499499
* Special marker used with the `patch` function to indicate a property should be removed.
500-
*
500+
*
501501
* When used as a value inside a patch object, the corresponding property will be deleted
502502
* from the result.
503-
*
503+
*
504504
* This is useful when refining or overriding mock data in a script while keeping validation logic intact.
505-
*
505+
*
506506
* https://mokapi.io/docs/javascript-api/mokapi/patch#delete
507-
*
507+
*
508508
* @example
509509
* const result = patch({ name: "foo", age: 42 }, { age: Delete })
510510
* // result: { name: "foo" }
511511
*/
512-
export const Delete: unique symbol;
512+
export const Delete: unique symbol;

types/mokapi/kafka.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,4 +243,4 @@ export interface ProduceRetry {
243243
* @default 5
244244
*/
245245
retries: number;
246-
}
246+
}

types/mokapi/mail.d.ts

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,79 +3,79 @@
33
* @param server Host to which the message is to be sent.
44
* @param message a Message object containing email details
55
*/
6-
export function send(server: string, message: Message): void
6+
export function send(server: string, message: Message): void;
77

88
/**
99
* Represents an email message.
1010
*/
1111
export interface Message {
1212
/** SMTP server hostname */
13-
server: string
13+
server: string;
1414

1515
/** The envelope sender address */
16-
sender?: Address
16+
sender?: Address;
1717

1818
/** The `From` header addresses */
19-
from: Address[]
19+
from: Address[];
2020

2121
/** The primary recipients */
22-
to: Address[]
22+
to: Address[];
2323

2424
/** The `Reply-To` header addresses */
25-
replyTo?: Address[]
25+
replyTo?: Address[];
2626

2727
/** Carbon copy recipients */
28-
cc?: Address[]
28+
cc?: Address[];
2929

3030
/** Blind carbon copy recipients */
31-
bcc?: Address[]
31+
bcc?: Address[];
3232

3333
/** Unique message ID */
34-
messageId: string
34+
messageId: string;
3535

3636
/** Message ID of the email being replied to */
37-
inReplyTo?: string
37+
inReplyTo?: string;
3838

3939
/** The date and time the message was created */
40-
time?: Date
40+
time?: Date;
4141

4242
/** The subject line of the email */
43-
subject: string
43+
subject: string;
4444

4545
/** MIME type of the message body (e.g., `text/plain` or `text/html`) */
46-
contentType: string
46+
contentType: string;
4747

4848
/** Content encoding (e.g., `utf-8`, `base64`) */
49-
encoding: string
49+
encoding: string;
5050

5151
/** Main body text of the message */
52-
body: string
52+
body: string;
5353

5454
/** List of file attachments */
55-
attachments: Attachment[]
55+
attachments: Attachment[];
5656
}
5757

5858
/**
5959
* Represents an email address with an optional display name.
6060
*/
6161
export interface Address {
6262
/** Optional display name (e.g., "John Doe") */
63-
name?: string
63+
name?: string;
6464

6565
/** Email address (e.g., "[email protected]") */
66-
address: string
66+
address: string;
6767
}
6868

6969
/**
7070
* Represents an email attachment.
7171
*/
7272
export interface Attachment {
7373
/** File name of the attachment */
74-
name: string
74+
name: string;
7575

7676
/** MIME type of the attachment (e.g., `application/pdf`) */
77-
contentType: string
77+
contentType: string;
7878

7979
/** File data as binary content */
80-
data: Uint8Array
81-
}
80+
data: Uint8Array;
81+
}

types/mokapi/mustache.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ export interface ScopeObject {
3131
[key: string]: Scope | ScopeFunction;
3232
}
3333

34-
export type ScopeFunction = () => Scope;
34+
export type ScopeFunction = () => Scope;

types/mokapi/test/encoding-test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
import { base64 } from 'mokapi/encoding';
1+
import { base64 } from "mokapi/encoding";
22

33
// @ts-expect-error
44
base64.encode();
5-
const s: string = base64.encode('');
5+
const s: string = base64.encode("");
66
// @ts-expect-error
7-
const b: boolean = base64.encode('');
7+
const b: boolean = base64.encode("");
88
base64.encode(new ArrayBuffer(12));
99

1010
// @ts-expect-error
1111
base64.decode();
12-
base64.decode('');
12+
base64.decode("");
1313
// @ts-expect-error
14-
const i: number = base64.decode('')
15-
const decoded: string = base64.decode('');
14+
const i: number = base64.decode("");
15+
const decoded: string = base64.decode("");

types/mokapi/test/faker-test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { fake, findByName, JSONSchema, ROOT_NAME, Request, Schema } from "mokapi/faker";
1+
import { fake, findByName, JSONSchema, Request, ROOT_NAME, Schema } from "mokapi/faker";
22

33
// @ts-expect-error
44
fake();
@@ -110,9 +110,9 @@ node.children.push({
110110
node.children.push({
111111
name: "foo",
112112
fake: (r: Request) => {
113-
r.path[0] === 'foo';
113+
r.path[0] === "foo";
114114
r.schema.type === "integer";
115-
return 'foo';
115+
return "foo";
116116
},
117117
});
118118
node.children.unshift({

0 commit comments

Comments
 (0)