Skip to content

Commit b2dc165

Browse files
authored
🤖 Merge PR DefinitelyTyped#74049 Some updates for @xmpp/* packages by @vpzomtrrfrt
1 parent 7725fac commit b2dc165

File tree

153 files changed

+974
-787
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+974
-787
lines changed

types/xmpp__base64/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"private": true,
33
"name": "@types/xmpp__base64",
4-
"version": "0.13.9999",
4+
"version": "0.14.9999",
5+
"type": "module",
56
"projects": [
67
"https://github.com/xmppjs/xmpp.js/tree/main/packages/base64"
78
],

types/xmpp__base64/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"compilerOptions": {
33
"module": "node16",
4+
"target": "es6",
45
"lib": [
56
"es6"
67
],

types/xmpp__client-core/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import ClientCls = require("./lib/Client");
2-
import xmppXml = require("@xmpp/xml");
3-
import xmppJid = require("@xmpp/jid");
1+
import xmppJid from "@xmpp/jid";
2+
import xmppXml from "@xmpp/xml";
3+
import ClientCls from "./lib/Client.js";
44

55
export const Client: typeof ClientCls;
66
export type Client = ClientCls;

types/xmpp__client-core/lib/Client.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import Connection = require("@xmpp/connection");
1+
import Connection from "@xmpp/connection";
22
import { Element } from "@xmpp/xml";
33

4-
export = Client;
4+
export default Client;
55

66
declare class Client extends Connection {
77
transports: Array<typeof Connection>;

types/xmpp__client-core/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
{
22
"private": true,
33
"name": "@types/xmpp__client-core",
4-
"version": "0.13.9999",
4+
"version": "0.14.9999",
5+
"type": "module",
56
"projects": [
67
"https://github.com/xmppjs/xmpp.js/tree/main/packages/client-core"
78
],
89
"dependencies": {
910
"@types/xmpp__connection": "*",
1011
"@types/xmpp__jid": "*",
12+
"@types/xmpp__sasl2": "*",
1113
"@types/xmpp__xml": "*"
1214
},
1315
"devDependencies": {
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Entity } from "@xmpp/connection";
2+
import { SASL2 } from "@xmpp/sasl2";
3+
import { Element } from "@xmpp/xml";
4+
5+
export default function bind2(
6+
params: {
7+
sasl2: SASL2;
8+
entity: Entity;
9+
},
10+
tag: string | (() => Promise<string>),
11+
): Bind2;
12+
13+
export interface Bind2 {
14+
use(ns: string, req: (element: Element) => Element, res: (element: Element) => Promise<void>): void;
15+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { EventEmitter } from "@xmpp/events";
2+
import { SASL2 } from "@xmpp/sasl2";
3+
import SASLFactory from "saslmechanisms";
4+
5+
import { Client } from "../..";
6+
7+
export interface Token {
8+
mechanism: string;
9+
token: string;
10+
expiry: string;
11+
}
12+
13+
export interface FAST extends EventEmitter {
14+
mechanism: null | string;
15+
mechanisms: string[];
16+
17+
saveToken(t: Token): Promise<void>;
18+
fetchToken(): Promise<Token | undefined>;
19+
deleteToken(): Promise<void>;
20+
21+
save(t: Token): Promise<void>;
22+
fetch(): Promise<Token | undefined>;
23+
delete(): Promise<void>;
24+
25+
saslFactory: SASLFactory;
26+
}
27+
28+
export default function fast(options: { sasl2: SASL2; entity: Client }): FAST;

types/xmpp__client-core/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"compilerOptions": {
33
"module": "node16",
4+
"target": "es6",
45
"lib": [
56
"es6"
67
],

types/xmpp__client-core/xmpp__client-core-tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Client, jid, xml } from "@xmpp/client-core";
2-
import Connection = require("@xmpp/connection");
2+
import Connection from "@xmpp/connection";
33
import { Element } from "@xmpp/xml";
44

55
// test type exports

types/xmpp__client/browser.d.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)