@crossauth/backend 0.0.2
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/LICENSE +203 -0
- package/README.md +14 -0
- package/dist/apikey.d.ts +100 -0
- package/dist/apikey.d.ts.map +1 -0
- package/dist/auth.d.ts +131 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/authenticators/dummyfactor2.d.ts +129 -0
- package/dist/authenticators/dummyfactor2.d.ts.map +1 -0
- package/dist/authenticators/emailauth.d.ts +176 -0
- package/dist/authenticators/emailauth.d.ts.map +1 -0
- package/dist/authenticators/ldapauth.d.ts +89 -0
- package/dist/authenticators/ldapauth.d.ts.map +1 -0
- package/dist/authenticators/passwordauth.d.ts +159 -0
- package/dist/authenticators/passwordauth.d.ts.map +1 -0
- package/dist/authenticators/smsauth.d.ts +160 -0
- package/dist/authenticators/smsauth.d.ts.map +1 -0
- package/dist/authenticators/tests/ldapauth.test.d.ts +2 -0
- package/dist/authenticators/tests/ldapauth.test.d.ts.map +1 -0
- package/dist/authenticators/totpauth.d.ts +117 -0
- package/dist/authenticators/totpauth.d.ts.map +1 -0
- package/dist/authenticators/twilioauth.d.ts +29 -0
- package/dist/authenticators/twilioauth.d.ts.map +1 -0
- package/dist/cookieauth.d.ts +269 -0
- package/dist/cookieauth.d.ts.map +1 -0
- package/dist/crypto.d.ts +196 -0
- package/dist/crypto.d.ts.map +1 -0
- package/dist/emailtokens.d.ts +178 -0
- package/dist/emailtokens.d.ts.map +1 -0
- package/dist/index.cjs +9107 -0
- package/dist/index.d.ts +46 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9090 -0
- package/dist/oauth/authserver.d.ts +490 -0
- package/dist/oauth/authserver.d.ts.map +1 -0
- package/dist/oauth/client.d.ts +72 -0
- package/dist/oauth/client.d.ts.map +1 -0
- package/dist/oauth/clientmanager.d.ts +73 -0
- package/dist/oauth/clientmanager.d.ts.map +1 -0
- package/dist/oauth/resserver.d.ts +43 -0
- package/dist/oauth/resserver.d.ts.map +1 -0
- package/dist/oauth/tests/common.d.ts +58 -0
- package/dist/oauth/tests/common.d.ts.map +1 -0
- package/dist/oauth/tests/oauthauthserver_authzcode.test.d.ts +2 -0
- package/dist/oauth/tests/oauthauthserver_authzcode.test.d.ts.map +1 -0
- package/dist/oauth/tests/oauthauthserver_clientcred.test.d.ts +2 -0
- package/dist/oauth/tests/oauthauthserver_clientcred.test.d.ts.map +1 -0
- package/dist/oauth/tests/oauthauthserver_device.test.d.ts +2 -0
- package/dist/oauth/tests/oauthauthserver_device.test.d.ts.map +1 -0
- package/dist/oauth/tests/oauthauthserver_mfa.test.d.ts +5 -0
- package/dist/oauth/tests/oauthauthserver_mfa.test.d.ts.map +1 -0
- package/dist/oauth/tests/oauthauthserver_password.test.d.ts +2 -0
- package/dist/oauth/tests/oauthauthserver_password.test.d.ts.map +1 -0
- package/dist/oauth/tests/oauthclient.test.d.ts +2 -0
- package/dist/oauth/tests/oauthclient.test.d.ts.map +1 -0
- package/dist/oauth/tests/oauthresserver.test.d.ts +2 -0
- package/dist/oauth/tests/oauthresserver.test.d.ts.map +1 -0
- package/dist/oauth/tokenconsumer.d.ts +80 -0
- package/dist/oauth/tokenconsumer.d.ts.map +1 -0
- package/dist/session.d.ts +491 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/storage/dbconnection.d.ts +19 -0
- package/dist/storage/dbconnection.d.ts.map +1 -0
- package/dist/storage/dbstorage.d.ts +319 -0
- package/dist/storage/dbstorage.d.ts.map +1 -0
- package/dist/storage/inmemorystorage.d.ts +225 -0
- package/dist/storage/inmemorystorage.d.ts.map +1 -0
- package/dist/storage/ldapstorage.d.ts +143 -0
- package/dist/storage/ldapstorage.d.ts.map +1 -0
- package/dist/storage/postgresconnection.d.ts +27 -0
- package/dist/storage/postgresconnection.d.ts.map +1 -0
- package/dist/storage/postgresstorage.d.ts +83 -0
- package/dist/storage/postgresstorage.d.ts.map +1 -0
- package/dist/storage/prismastorage.d.ts +361 -0
- package/dist/storage/prismastorage.d.ts.map +1 -0
- package/dist/storage/sqliteconnection.d.ts +35 -0
- package/dist/storage/sqliteconnection.d.ts.map +1 -0
- package/dist/storage/sqlitestorage.d.ts +83 -0
- package/dist/storage/sqlitestorage.d.ts.map +1 -0
- package/dist/storage/tests/dbtests.d.ts +5 -0
- package/dist/storage/tests/dbtests.d.ts.map +1 -0
- package/dist/storage/tests/inmemorystorage.test.d.ts +5 -0
- package/dist/storage/tests/inmemorystorage.test.d.ts.map +1 -0
- package/dist/storage/tests/inmemorytestdata.d.ts +4 -0
- package/dist/storage/tests/inmemorytestdata.d.ts.map +1 -0
- package/dist/storage/tests/ldapstorage.test.d.ts +2 -0
- package/dist/storage/tests/ldapstorage.test.d.ts.map +1 -0
- package/dist/storage/tests/postgresstorage.test.d.ts +2 -0
- package/dist/storage/tests/postgresstorage.test.d.ts.map +1 -0
- package/dist/storage/tests/prismastorage.test.d.ts +4 -0
- package/dist/storage/tests/prismastorage.test.d.ts.map +1 -0
- package/dist/storage/tests/sqlitestorage.test.d.ts +2 -0
- package/dist/storage/tests/sqlitestorage.test.d.ts.map +1 -0
- package/dist/storage.d.ts +411 -0
- package/dist/storage.d.ts.map +1 -0
- package/dist/tests/cookieauth.test.d.ts +4 -0
- package/dist/tests/cookieauth.test.d.ts.map +1 -0
- package/dist/tests/crypto.test.d.ts +2 -0
- package/dist/tests/crypto.test.d.ts.map +1 -0
- package/dist/tests/email.test.d.ts +4 -0
- package/dist/tests/email.test.d.ts.map +1 -0
- package/dist/tests/password.test.d.ts +5 -0
- package/dist/tests/password.test.d.ts.map +1 -0
- package/dist/tests/tmp.test.d.ts +2 -0
- package/dist/tests/tmp.test.d.ts.map +1 -0
- package/dist/tests/utils.test.d.ts +2 -0
- package/dist/tests/utils.test.d.ts.map +1 -0
- package/dist/utils.d.ts +41 -0
- package/dist/utils.d.ts.map +1 -0
- package/package.json +71 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { default as sqlite3 } from 'sqlite3';
|
|
2
|
+
import { DbPool, DbConnection, DbParameter } from './dbconnection';
|
|
3
|
+
|
|
4
|
+
export interface SqlPoolOptions {
|
|
5
|
+
/** Sqlite doesn't have a native date/time/timestamp format.
|
|
6
|
+
* List any fields you have in your user or usersecrets models here
|
|
7
|
+
* and they will be converted upon insert/update/select
|
|
8
|
+
*/
|
|
9
|
+
dateFields?: string[];
|
|
10
|
+
}
|
|
11
|
+
export declare class SqlitePool extends DbPool {
|
|
12
|
+
private database;
|
|
13
|
+
private dateFields;
|
|
14
|
+
constructor(filename: string, options?: SqlPoolOptions);
|
|
15
|
+
connect(): Promise<DbConnection>;
|
|
16
|
+
parameters(): DbParameter;
|
|
17
|
+
}
|
|
18
|
+
export declare class SqliteConnection extends DbConnection {
|
|
19
|
+
private database;
|
|
20
|
+
dateFields?: string[];
|
|
21
|
+
constructor(database: sqlite3.Database, dateFields: string[]);
|
|
22
|
+
private crossauthErrorFromSqliteError;
|
|
23
|
+
execute(query: string, values?: any[]): Promise<{
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
}[]>;
|
|
26
|
+
release(): void;
|
|
27
|
+
startTransaction(): Promise<void>;
|
|
28
|
+
commit(): Promise<void>;
|
|
29
|
+
rollback(): Promise<void>;
|
|
30
|
+
}
|
|
31
|
+
export declare class PostgresParameter extends DbParameter {
|
|
32
|
+
constructor();
|
|
33
|
+
nextParameter(): string;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=sqliteconnection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqliteconnection.d.ts","sourceRoot":"","sources":["../../src/storage/sqliteconnection.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAInE,MAAM,WAAW,cAAc;IAC3B;;;OAGG;IACH,UAAU,CAAC,EAAG,MAAM,EAAE,CAAC;CAE1B;AAED,qBAAa,UAAW,SAAQ,MAAM;IAClC,OAAO,CAAC,QAAQ,CAAoB;IACpC,OAAO,CAAC,UAAU,CAAiB;gBAEvB,QAAQ,EAAG,MAAM,EAAE,OAAO,GAAG,cAAmB;IAOtD,OAAO,IAAK,OAAO,CAAC,YAAY,CAAC;IAIvC,UAAU,IAAK,WAAW;CAI7B;AAED,qBAAa,gBAAiB,SAAQ,YAAY;IAC9C,OAAO,CAAC,QAAQ,CAAoB;IACpC,UAAU,CAAC,EAAG,MAAM,EAAE,CAAC;gBAEX,QAAQ,EAAG,OAAO,CAAC,QAAQ,EAAE,UAAU,EAAG,MAAM,EAAE;IAM9D,OAAO,CAAC,6BAA6B;IAmB/B,OAAO,CAAC,KAAK,EAAG,MAAM,EAAE,MAAM,GAAG,GAAG,EAAO,GAAI,OAAO,CAAC;QAAC,CAAC,GAAG,EAAC,MAAM,GAAE,GAAG,CAAA;KAAC,EAAE,CAAC;IAwClF,OAAO,IAAK,IAAI;IAKV,gBAAgB,IAAK,OAAO,CAAC,IAAI,CAAC;IAYlC,MAAM,IAAK,OAAO,CAAC,IAAI,CAAC;IAYxB,QAAQ,IAAK,OAAO,CAAC,IAAI,CAAC;CAWnC;AAGD,qBAAa,iBAAkB,SAAQ,WAAW;;IAM9C,aAAa,IAAK,MAAM;CAG3B"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { DbUserStorage, DbKeyStorage, DbOAuthClientStorage, DbOAuthAuthorizationStorage, DbUserStorageOptions, DbKeyStorageOptions, DbOAuthClientStorageOptions, DbOAuthAuthorizationStorageOptions } from './dbstorage';
|
|
2
|
+
import { SqlPoolOptions } from './sqliteconnection';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Optional parameters for {@link PostgresUserStorage}.
|
|
6
|
+
*
|
|
7
|
+
* See {@link SqliteUserStorage.constructor} for definitions.
|
|
8
|
+
*/
|
|
9
|
+
export interface SqliteUserStorageOptions extends DbUserStorageOptions, SqlPoolOptions {
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Implementation of {@link UserStorage} where username and password is stored
|
|
13
|
+
* in two Sqlite tables: one for non secret fields, one for secret fields.
|
|
14
|
+
*
|
|
15
|
+
* The `pg` package module is used to access the database.
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
export declare class SqliteUserStorage extends DbUserStorage {
|
|
19
|
+
/**
|
|
20
|
+
* Creates a PostgresUserStorage object, optionally overriding defaults.
|
|
21
|
+
* @param filename the Sqlite database file
|
|
22
|
+
* @param options see {@link PostgresUserStorageOptions}.
|
|
23
|
+
*/
|
|
24
|
+
constructor(filename: string, options?: SqliteUserStorageOptions);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Optional parameters for {@link PostgresKeyStorage}.
|
|
28
|
+
*
|
|
29
|
+
* See {@link SqliteKeyStorage.constructor} for definitions.
|
|
30
|
+
*/
|
|
31
|
+
export interface SqliteKeyStorageOptions extends DbKeyStorageOptions, SqlPoolOptions {
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Implementation of {@link KeyStorage } where keys stored in a
|
|
35
|
+
* Sqlite database.
|
|
36
|
+
*/
|
|
37
|
+
export declare class SqliteKeyStorage extends DbKeyStorage {
|
|
38
|
+
/**
|
|
39
|
+
* Creates a SqliteKeyStorage object, optionally overriding defaults.
|
|
40
|
+
* @param filename the Sqlite database file
|
|
41
|
+
* @param options see {@link SqliteKeyStorageOptions}.
|
|
42
|
+
*/
|
|
43
|
+
constructor(filename: string, options?: SqliteKeyStorageOptions);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Optional parameters for {@link SqliteOAuthClientStorage}.
|
|
47
|
+
*
|
|
48
|
+
* See {@link SqliteOAuthClientStorage.constructor} for definitions.
|
|
49
|
+
*/
|
|
50
|
+
export interface SqliteOAuthClientStorageOptions extends DbOAuthClientStorageOptions, SqlPoolOptions {
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Implementation of {@link OAuthClientStorage } where keys stored in a
|
|
54
|
+
* Sqlite database.
|
|
55
|
+
*/
|
|
56
|
+
export declare class SqliteOAuthClientStorage extends DbOAuthClientStorage {
|
|
57
|
+
/**
|
|
58
|
+
* Creates a PostgresOAuthStorage object, optionally overriding defaults.
|
|
59
|
+
* @param filename the Sqlite database file
|
|
60
|
+
* @param options see {@link SqliteOAuthClientStorageOptions}.
|
|
61
|
+
*/
|
|
62
|
+
constructor(filename: string, options?: SqliteOAuthClientStorageOptions);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Optional parameters for {@link SqliteOAuthAuthorizationStorage}.
|
|
66
|
+
*
|
|
67
|
+
* See {@link SqliteOAuthAuthorization.constructor} for definitions.
|
|
68
|
+
*/
|
|
69
|
+
export interface SqliteOAuthAuthorizationStorageOptions extends DbOAuthAuthorizationStorageOptions, SqlPoolOptions {
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Implementation of {@link OAuthAuthorization } where keys stored in a
|
|
73
|
+
* Sqlite database.
|
|
74
|
+
*/
|
|
75
|
+
export declare class SqliteOAuthAuthorizationStorage extends DbOAuthAuthorizationStorage {
|
|
76
|
+
/**
|
|
77
|
+
* Creates a PostgresOAuthStorage object, optionally overriding defaults.
|
|
78
|
+
* @param filename the Sqlite database file
|
|
79
|
+
* @param options see {@link SqliteOAuthAuthorizationStorageOptions}.
|
|
80
|
+
*/
|
|
81
|
+
constructor(filename: string, options?: SqliteOAuthAuthorizationStorageOptions);
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=sqlitestorage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqlitestorage.d.ts","sourceRoot":"","sources":["../../src/storage/sqlitestorage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAC7G,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,kCAAkC,EAAE,MAAM,aAAa,CAAC;AAC9I,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAKrE;;;;GAIG;AACH,MAAM,WAAW,wBAAyB,SAAQ,oBAAoB,EAAE,cAAc;CACrF;AAED;;;;;;GAMG;AACH,qBAAa,iBAAkB,SAAQ,aAAa;IAEhD;;;;OAIG;gBACS,QAAQ,EAAG,MAAM,EAAE,OAAO,GAAG,wBAA6B;CAGzE;AAKD;;;;GAIG;AACH,MAAM,WAAW,uBAAwB,SAAQ,mBAAmB,EAAE,cAAc;CACnF;AAED;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,YAAY;IAE9C;;;;OAIG;gBACS,QAAQ,EAAG,MAAM,EAAE,OAAO,GAAG,uBAA4B;CAGxE;AAKD;;;;GAIG;AACH,MAAM,WAAW,+BAAgC,SAAQ,2BAA2B,EAAE,cAAc;CACnG;AAED;;;GAGG;AACH,qBAAa,wBAAyB,SAAQ,oBAAoB;IAE9D;;;;OAIG;gBACS,QAAQ,EAAG,MAAM,EAAE,OAAO,GAAG,+BAAoC;CAGhF;AAKD;;;;GAIG;AACH,MAAM,WAAW,sCAAuC,SAAQ,kCAAkC,EAAE,cAAc;CACjH;AAED;;;GAGG;AACH,qBAAa,+BAAgC,SAAQ,2BAA2B;IAE5E;;;;OAIG;gBACS,QAAQ,EAAG,MAAM,EAAE,OAAO,GAAG,sCAA2C;CAGvF"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { UserStorage, KeyStorage, OAuthClientStorage, OAuthAuthorizationStorage } from '../../storage';
|
|
2
|
+
import { LocalPasswordAuthenticator } from '../../authenticators/passwordauth';
|
|
3
|
+
|
|
4
|
+
export declare function makeDBTests(prefix: string, userStorage: UserStorage, keyStorage: KeyStorage, clientStorage: OAuthClientStorage, authStorage: OAuthAuthorizationStorage, authenticator: LocalPasswordAuthenticator): void;
|
|
5
|
+
//# sourceMappingURL=dbtests.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dbtests.d.ts","sourceRoot":"","sources":["../../../src/storage/tests/dbtests.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAEvG,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAE/E,wBAAgB,WAAW,CAAC,MAAM,EAAG,MAAM,EAAE,WAAW,EAAG,WAAW,EAAE,UAAU,EAAG,UAAU,EAAE,aAAa,EAAG,kBAAkB,EAAE,WAAW,EAAG,yBAAyB,EAAE,aAAa,EAAG,0BAA0B,QAwbvN"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inmemorystorage.test.d.ts","sourceRoot":"","sources":["../../../src/storage/tests/inmemorystorage.test.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAqF,MAAM,oBAAoB,CAAC;AAI5I,eAAO,IAAI,WAAW,EAAG,mBAAmB,CAAC;AAC7C,eAAO,IAAI,iBAAiB,EAAG,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inmemorytestdata.d.ts","sourceRoot":"","sources":["../../../src/storage/tests/inmemorytestdata.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAGzD,wBAAsB,kBAAkB,CAAC,MAAM,CAAC,EAAG,MAAM,GAAC,SAAS,GAAI,OAAO,CAAC,mBAAmB,CAAC,CAqBlG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ldapstorage.test.d.ts","sourceRoot":"","sources":["../../../src/storage/tests/ldapstorage.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgresstorage.test.d.ts","sourceRoot":"","sources":["../../../src/storage/tests/postgresstorage.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prismastorage.test.d.ts","sourceRoot":"","sources":["../../../src/storage/tests/prismastorage.test.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAA+E,MAAM,kBAAkB,CAAC;AAKlI,eAAO,IAAI,WAAW,EAAG,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqlitestorage.test.d.ts","sourceRoot":"","sources":["../../../src/storage/tests/sqlitestorage.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
import { User, UserSecrets, Key, UserInputFields, UserSecretsInputFields, OAuthClient } from '@crossauth/common';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Passed to get methods in {@link UserStorage}.
|
|
5
|
+
*/
|
|
6
|
+
export interface UserStorageGetOptions {
|
|
7
|
+
/**
|
|
8
|
+
* If true, a valid user will be returned even if state is set to `awaitingemailverification`
|
|
9
|
+
*/
|
|
10
|
+
skipEmailVerifiedCheck?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* If true, a valid user will be returned even if state is not set to `active`
|
|
13
|
+
*/
|
|
14
|
+
skipActiveCheck?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* If true, usernames will be matched as lowercase and with diacritics removed.
|
|
17
|
+
* Default true,
|
|
18
|
+
*
|
|
19
|
+
* Note: this doesn't apply to the ID column
|
|
20
|
+
*/
|
|
21
|
+
normalizeUsername?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* If true, email addresses (in the email column not in the username column)
|
|
24
|
+
* will be matched as lowercase and with diacritics removed.
|
|
25
|
+
* Default true.
|
|
26
|
+
*/
|
|
27
|
+
normalizeEmail?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Options passed to {@link UserStorage} constructor
|
|
31
|
+
*/
|
|
32
|
+
export interface UserStorageOptions {
|
|
33
|
+
/**
|
|
34
|
+
* Fields that users are allowed to edit. Any fields passed to a create or
|
|
35
|
+
* update call that are not in this list will be ignored.
|
|
36
|
+
*/
|
|
37
|
+
userEditableFields?: string[];
|
|
38
|
+
/**
|
|
39
|
+
* Fields that admins are allowed to edit (in addition to `userEditableFields`)
|
|
40
|
+
*/
|
|
41
|
+
adminEditableFields?: string[];
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Base class for place where user details are stored,
|
|
45
|
+
*
|
|
46
|
+
* This class is subclasses for various types of user storage,
|
|
47
|
+
* eg {@link PrismaUserStorage } is for storing
|
|
48
|
+
* username and password in a database table, managed by the Prisma ORM.
|
|
49
|
+
*
|
|
50
|
+
* Username and email searches should be case insensitive, as should their
|
|
51
|
+
* unique constraints. ID searches need not be case insensitive.
|
|
52
|
+
*/
|
|
53
|
+
export declare abstract class UserStorage {
|
|
54
|
+
readonly userEditableFields: string[];
|
|
55
|
+
readonly adminEditableFields: string[];
|
|
56
|
+
readonly normalizeUsername = true;
|
|
57
|
+
readonly normalizeEmail = true;
|
|
58
|
+
/**
|
|
59
|
+
* Constructor
|
|
60
|
+
* @param options See {@link UserStorageOptions}
|
|
61
|
+
*/
|
|
62
|
+
constructor(options?: UserStorageOptions);
|
|
63
|
+
/**
|
|
64
|
+
* Returns user matching the given username, or throws an exception.
|
|
65
|
+
*
|
|
66
|
+
* if `normalizeUsername` is true, the username should be matched normalized and
|
|
67
|
+
* lowercased (using normalize())
|
|
68
|
+
* @param username the username to return the user of
|
|
69
|
+
* @param options optionally turn off checks. Used internally
|
|
70
|
+
* @throws CrossauthException with ErrorCode either `UserNotExist` or `Connection`
|
|
71
|
+
*/
|
|
72
|
+
abstract getUserByUsername(username: string, options?: UserStorageGetOptions): Promise<{
|
|
73
|
+
user: User;
|
|
74
|
+
secrets: UserSecrets;
|
|
75
|
+
}>;
|
|
76
|
+
/**
|
|
77
|
+
* Returns user matching the given user id, or throws an exception.
|
|
78
|
+
*
|
|
79
|
+
* Not that implementations are free to define what the user ID is. It can be a number of string,
|
|
80
|
+
* or can simply be `username`.
|
|
81
|
+
*
|
|
82
|
+
* @param id the user id to return the user of
|
|
83
|
+
* @param options optionally turn off checks. Used internally
|
|
84
|
+
* @throws {@link @crossauth/common!CrossauthError} with
|
|
85
|
+
* {@link @crossauth/common!ErrorCode} either `UserNotExist` or `Connection`
|
|
86
|
+
*/
|
|
87
|
+
abstract getUserById(id: string | number, options?: UserStorageGetOptions): Promise<{
|
|
88
|
+
user: User;
|
|
89
|
+
secrets: UserSecrets;
|
|
90
|
+
}>;
|
|
91
|
+
/**
|
|
92
|
+
* Returns user matching the given email address, or throws an exception.
|
|
93
|
+
*
|
|
94
|
+
* If `normalizeEmail` is true, email should be matched normalized and lowercased (using normalize())
|
|
95
|
+
* If the email field doesn't exist, username is assumed to be the email column
|
|
96
|
+
*
|
|
97
|
+
* @param email the email address to return the user of
|
|
98
|
+
* @param options optionally turn off checks. Used internally
|
|
99
|
+
* @throws {@link @crossauth/common!CrossauthError} with
|
|
100
|
+
* {@link @crossauth/common!ErrorCode} either `UserNotExist` or `Connection`
|
|
101
|
+
*/
|
|
102
|
+
abstract getUserByEmail(email: string | number, options?: UserStorageGetOptions): Promise<{
|
|
103
|
+
user: User;
|
|
104
|
+
secrets: UserSecrets;
|
|
105
|
+
}>;
|
|
106
|
+
/**
|
|
107
|
+
* Creates a user with the given details and secrets.
|
|
108
|
+
*
|
|
109
|
+
* @param _user will be put in the User table
|
|
110
|
+
* @param _secrets will be put in the UserSecrets table
|
|
111
|
+
* @returns the new user as a {@link @crossauth/common!User} object.
|
|
112
|
+
*/
|
|
113
|
+
createUser(_user: UserInputFields, _secrets?: UserSecretsInputFields): Promise<User>;
|
|
114
|
+
/**
|
|
115
|
+
* Updates an existing user with the given details and secrets.
|
|
116
|
+
*
|
|
117
|
+
* If the given user exists in the database, update it with the passed values.
|
|
118
|
+
* If it doesn't exist, throw a
|
|
119
|
+
* {@link @crossauth/common!CrossauthError} with
|
|
120
|
+
* {@link @crossauth/common!ErrorCode} `InvalidKey`.
|
|
121
|
+
*
|
|
122
|
+
* @param user The `id` field must be set, but all others are optional.
|
|
123
|
+
* Any parameter not set (or undefined) will not be updated.
|
|
124
|
+
* If you want to set somethign to `null` in the database, pass
|
|
125
|
+
* the value as `null` not undefined.
|
|
126
|
+
*/
|
|
127
|
+
abstract updateUser(user: Partial<User>, secrets?: Partial<UserSecrets>): Promise<void>;
|
|
128
|
+
/**
|
|
129
|
+
* If the storage supports this, delete the named user from storage.
|
|
130
|
+
*
|
|
131
|
+
* @param username username to delete
|
|
132
|
+
*/
|
|
133
|
+
abstract deleteUserByUsername(username: string): Promise<void>;
|
|
134
|
+
/**
|
|
135
|
+
* If the storage supports this, delete the user with the given ID from
|
|
136
|
+
* storage.
|
|
137
|
+
*
|
|
138
|
+
* @param id id of user to delete
|
|
139
|
+
*/
|
|
140
|
+
abstract deleteUserById(id: string | number): Promise<void>;
|
|
141
|
+
/**
|
|
142
|
+
* Returns all users in the storage, in a a fixed order defined by
|
|
143
|
+
* the storage (eg alphabetical by username)
|
|
144
|
+
* @param skip skip this number of records from the start of the set
|
|
145
|
+
* @param take only return at most this number of records
|
|
146
|
+
*
|
|
147
|
+
* @returns an array of {@link @crossauth/common!User} objects.
|
|
148
|
+
*/
|
|
149
|
+
abstract getUsers(skip?: number, take?: number): Promise<User[]>;
|
|
150
|
+
/**
|
|
151
|
+
* By default, usernames and emails are stored in lowercase, normalized format.
|
|
152
|
+
* This function returns that normalization.
|
|
153
|
+
*
|
|
154
|
+
* @param str the string to normalize
|
|
155
|
+
* @returns the normalized string, in lowercase with diacritics removed
|
|
156
|
+
*/
|
|
157
|
+
static normalize(str: string): string;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Base class for storing session and API keys.
|
|
161
|
+
*
|
|
162
|
+
* This class is subclasses for various types of session key storage, Eg
|
|
163
|
+
* {@link PrismaKeyStorage } is for storing
|
|
164
|
+
* session in a database table, managed by the Prisma ORM.
|
|
165
|
+
*/
|
|
166
|
+
export declare abstract class KeyStorage {
|
|
167
|
+
/**
|
|
168
|
+
* Returns the matching key in the session storage or throws an exception if it doesn't exist.
|
|
169
|
+
*
|
|
170
|
+
* @param key the key to look up, as it will appear in this storage
|
|
171
|
+
* (typically unsigned, hashed)
|
|
172
|
+
* @returns The matching Key record.
|
|
173
|
+
*/
|
|
174
|
+
abstract getKey(key: string): Promise<Key>;
|
|
175
|
+
/**
|
|
176
|
+
* Saves a session key in the session storage (eg database).
|
|
177
|
+
*
|
|
178
|
+
* @param userid the ID of the user. This matches the primary key in the
|
|
179
|
+
* {@link UserStorage } implementation.
|
|
180
|
+
* @param value the key value to store.
|
|
181
|
+
* @param dateCreated the date/time the key was created.
|
|
182
|
+
* @param expires the date/time the key expires.
|
|
183
|
+
* @param data an optional value, specific to the type of key, eg new
|
|
184
|
+
* email for email change tokens
|
|
185
|
+
* @param extraFields these will also be saved in the key record
|
|
186
|
+
*/
|
|
187
|
+
abstract saveKey(userid: string | number | undefined, value: string, dateCreated: Date, expires: Date | undefined, data?: string, extraFields?: {
|
|
188
|
+
[key: string]: any;
|
|
189
|
+
}): Promise<void>;
|
|
190
|
+
/**
|
|
191
|
+
* If the given session key exists in the database, update it with the
|
|
192
|
+
* passed values. If it doesn't exist, throw a
|
|
193
|
+
* {@link @crossauth/common!CrossauthError} with
|
|
194
|
+
* {@link @crossauth/common!ErrorCode} `InvalidKey`.
|
|
195
|
+
* @param key the fields defined in this will be updated. `id` must
|
|
196
|
+
* be present and it will not be updated.
|
|
197
|
+
*/
|
|
198
|
+
abstract updateKey(key: Partial<Key>): Promise<void>;
|
|
199
|
+
/**
|
|
200
|
+
* Deletes a key from storage (eg the database).
|
|
201
|
+
*
|
|
202
|
+
* @param value the key to delete
|
|
203
|
+
*/
|
|
204
|
+
abstract deleteKey(value: string): Promise<void>;
|
|
205
|
+
/**
|
|
206
|
+
* Deletes all keys from storage for the given user ID
|
|
207
|
+
*
|
|
208
|
+
* @param userid : user ID to delete keys for
|
|
209
|
+
* @param prefix only keys starting with this prefix will be
|
|
210
|
+
* deleted
|
|
211
|
+
* @param except if defined, the key with this value will not be deleted
|
|
212
|
+
*/
|
|
213
|
+
abstract deleteAllForUser(userid: string | number | undefined, prefix: string, except?: string): Promise<void>;
|
|
214
|
+
/**
|
|
215
|
+
* Deletes all matching the given specs
|
|
216
|
+
*
|
|
217
|
+
* @param key : any key matching all defined values in this object will
|
|
218
|
+
* be deleted
|
|
219
|
+
*/
|
|
220
|
+
abstract deleteMatching(key: Partial<Key>): Promise<void>;
|
|
221
|
+
/**
|
|
222
|
+
* Return all keys matching the given user ID
|
|
223
|
+
* @param userid user to return keys for
|
|
224
|
+
* @returns an array of keys
|
|
225
|
+
*/
|
|
226
|
+
abstract getAllForUser(userid: string | number | undefined): Promise<Key[]>;
|
|
227
|
+
/**
|
|
228
|
+
* The `data` field in a key entry is a JSON string. This class should
|
|
229
|
+
* atomically update a field in it.
|
|
230
|
+
* @param keyName the name of they to update, as it appears in the table.
|
|
231
|
+
* @param dataName the field name to update. This can contain dots, eg
|
|
232
|
+
* `part1.part2`, which means `part2` within `part1` is updated.
|
|
233
|
+
* @param value the new value.
|
|
234
|
+
*/
|
|
235
|
+
abstract updateData(keyName: string, dataName: string, value: any | undefined): Promise<void>;
|
|
236
|
+
/**
|
|
237
|
+
* Same as `updateData` but updates several keys.
|
|
238
|
+
*
|
|
239
|
+
* Ensure it is done as a single transaction.
|
|
240
|
+
*
|
|
241
|
+
* @param keyName the key to update
|
|
242
|
+
* @param dataArray dataName and value pairs
|
|
243
|
+
*/
|
|
244
|
+
abstract updateManyData(keyName: string, dataArray: {
|
|
245
|
+
dataName: string;
|
|
246
|
+
value: any | undefined;
|
|
247
|
+
}[]): Promise<void>;
|
|
248
|
+
/**
|
|
249
|
+
* The `data` field in a key entry is a JSON string. This class should
|
|
250
|
+
* atomically update a field in it.
|
|
251
|
+
* @param keyName the name of they to update, as it appears in the table.
|
|
252
|
+
* @param dataName the field name to delete. This can contain dots, eg
|
|
253
|
+
* `part1.part2`, which means `part2` within `part1` is deleted.
|
|
254
|
+
*/
|
|
255
|
+
abstract deleteData(keyName: string, dataName: string): Promise<void>;
|
|
256
|
+
/**
|
|
257
|
+
* Returns an object decoded from the data field as a JSON string
|
|
258
|
+
* @param data the JSON string to decode
|
|
259
|
+
* @returns the parse JSON object
|
|
260
|
+
* @throws an exception is data is not a valid JSON string
|
|
261
|
+
*/
|
|
262
|
+
static decodeData(data: string | undefined): {
|
|
263
|
+
[key: string]: any;
|
|
264
|
+
};
|
|
265
|
+
/**
|
|
266
|
+
* Returns a JSON string encoded from the given object
|
|
267
|
+
* @param data the object to encode
|
|
268
|
+
* @returns a JSON string
|
|
269
|
+
*/
|
|
270
|
+
static encodeData(data?: {
|
|
271
|
+
[key: string]: any;
|
|
272
|
+
}): string;
|
|
273
|
+
/**
|
|
274
|
+
* Helper function for imnpklementing `updateData`
|
|
275
|
+
* @param data parsed data string extracted from the key.
|
|
276
|
+
* @param dataName name of field to update (may contain dots)
|
|
277
|
+
* @param value the value to set it to
|
|
278
|
+
* @returns new data object if changes were made, undefined otherwise
|
|
279
|
+
*/
|
|
280
|
+
protected updateDataInternal(data: {
|
|
281
|
+
[key: string]: any;
|
|
282
|
+
}, dataName: string, value: any | undefined): {
|
|
283
|
+
[key: string]: any;
|
|
284
|
+
} | undefined;
|
|
285
|
+
/**
|
|
286
|
+
* Helper function for imnpklementing `deleteData`
|
|
287
|
+
* @param data parsed data string extracted from the key. Resutls will be
|
|
288
|
+
* written back to this
|
|
289
|
+
* @param dataName name of field to delete (may contain dots)
|
|
290
|
+
* @returns true if modifications were made, false otherwise
|
|
291
|
+
*/
|
|
292
|
+
protected deleteDataInternal(data: {
|
|
293
|
+
[key: string]: any;
|
|
294
|
+
}, dataName: string): boolean;
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Options for constructing an {@link OAuthClientStorage} object.
|
|
298
|
+
*/
|
|
299
|
+
export interface OAuthClientStorageOptions {
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Base class for storing OAuth clients.
|
|
303
|
+
*
|
|
304
|
+
* This class is subclassed for various types of client storage, Eg {@link PrismaOAuthClientStorage } is for storing
|
|
305
|
+
* clients in a database table, managed by the Prisma ORM.
|
|
306
|
+
*/
|
|
307
|
+
export declare abstract class OAuthClientStorage {
|
|
308
|
+
/**
|
|
309
|
+
* Constructor
|
|
310
|
+
* @param _options see {@link OAuthClientStorageOptions}
|
|
311
|
+
*/
|
|
312
|
+
constructor(_options?: OAuthClientStorageOptions);
|
|
313
|
+
/**
|
|
314
|
+
* Returns the matching client by its auto-generated id in the storage or
|
|
315
|
+
* throws an exception if it doesn't exist.
|
|
316
|
+
*
|
|
317
|
+
* @param client_id the client_id to look up
|
|
318
|
+
* @returns The matching {@link @crossauth/common!OAuthClient} object.
|
|
319
|
+
*/
|
|
320
|
+
abstract getClientById(client_id: string): Promise<OAuthClient>;
|
|
321
|
+
/**
|
|
322
|
+
* Returns the matching client in the storage by friendly name or
|
|
323
|
+
* throws an exception if it doesn't exist.
|
|
324
|
+
*
|
|
325
|
+
* @param name the client name to look up
|
|
326
|
+
* @param userid if defined, only return clients belonging to this user.
|
|
327
|
+
* if `null`, return only clients with a null userid.
|
|
328
|
+
* if undefined, return all clients with this name.
|
|
329
|
+
* @returns An array of {@link @crossauth/common!OAuthClient} objects.
|
|
330
|
+
* @throws {@link @crossauth/common!CrossauthError } with {@link @crossauth/common!ErrorCode } of `InvalidSessionId` if a match was not found in session storage.
|
|
331
|
+
*/
|
|
332
|
+
abstract getClientByName(name: string, userid?: string | number | null): Promise<OAuthClient[]>;
|
|
333
|
+
/**
|
|
334
|
+
* Returns all clients in alphabetical order of client name.
|
|
335
|
+
* @param skip skip this number of records from the start in alphabetical
|
|
336
|
+
* order
|
|
337
|
+
* @param take return at most this number of records
|
|
338
|
+
* @param userid if defined, only return clients belonging to this user.
|
|
339
|
+
* if `null`, return only clients with a null userid.
|
|
340
|
+
* if undefined, return all clients.
|
|
341
|
+
* @returns An array of {@link @crossauth/common!OAuthClient} objects.
|
|
342
|
+
*/
|
|
343
|
+
abstract getClients(skip?: number, take?: number, userid?: string | number | null): Promise<OAuthClient[]>;
|
|
344
|
+
/**
|
|
345
|
+
* Creates and returns a new client with random ID and optionally secret.
|
|
346
|
+
*
|
|
347
|
+
* Saves in the database.
|
|
348
|
+
*
|
|
349
|
+
* @param client the client to save.
|
|
350
|
+
* @returns the new client.
|
|
351
|
+
*
|
|
352
|
+
*/
|
|
353
|
+
abstract createClient(client: OAuthClient): Promise<OAuthClient>;
|
|
354
|
+
/**
|
|
355
|
+
* If the given session key exists in the database, update it with the
|
|
356
|
+
* passed values. If it doesn't
|
|
357
|
+
* exist, throw a {@link @crossauth/common!CrossauthError} with
|
|
358
|
+
* `InvalidClient`.
|
|
359
|
+
* @param client all fields to update (client_id must be set but will not
|
|
360
|
+
* be updated)
|
|
361
|
+
*/
|
|
362
|
+
abstract updateClient(client: Partial<OAuthClient>): Promise<void>;
|
|
363
|
+
/**
|
|
364
|
+
* Deletes a key from storage .
|
|
365
|
+
*
|
|
366
|
+
* @param client_id the client to delete
|
|
367
|
+
*/
|
|
368
|
+
abstract deleteClient(client_id: string): Promise<void>;
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Options for creating an {@link OAuthAuthorizationStorage} object
|
|
372
|
+
*/
|
|
373
|
+
export interface OAuthAuthorizationStorageOptions {
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Base class for storing scopes that have been authorized by a user
|
|
377
|
+
* (or for client credentials, for a client).
|
|
378
|
+
*
|
|
379
|
+
* This class is subclassed for various types of storage, Eg
|
|
380
|
+
* {@link PrismaOAuthAuthorizationStorage } is for storing
|
|
381
|
+
* in a database table, managed by the Prisma ORM.
|
|
382
|
+
*/
|
|
383
|
+
export declare abstract class OAuthAuthorizationStorage {
|
|
384
|
+
/**
|
|
385
|
+
* Constructor
|
|
386
|
+
* @param _options see {@link OAuthAuthorizationStorageOptions}
|
|
387
|
+
*/
|
|
388
|
+
constructor(_options?: OAuthAuthorizationStorageOptions);
|
|
389
|
+
/**
|
|
390
|
+
* Returns the matching all scopes authorized for the given client and optionally user.
|
|
391
|
+
*
|
|
392
|
+
* @param client_id the client_id to look up
|
|
393
|
+
* @param userid the userid to look up, undefined for a client authorization not user authorization
|
|
394
|
+
* @returns The authorized scopes as an array.
|
|
395
|
+
*/
|
|
396
|
+
abstract getAuthorizations(client_id: string, userid: string | number | undefined): Promise<(string | null)[]>;
|
|
397
|
+
/**
|
|
398
|
+
* Saves a new set of authorizations for the given client and optionally
|
|
399
|
+
* user.
|
|
400
|
+
*
|
|
401
|
+
* Deletes the old ones.
|
|
402
|
+
*
|
|
403
|
+
* @param client_id the client_id to look up
|
|
404
|
+
* @param userid the userid to look up, undefined for a client
|
|
405
|
+
* authorization not user authorization
|
|
406
|
+
* @param authorizations new set of authorized scopes, which may be empty
|
|
407
|
+
*
|
|
408
|
+
*/
|
|
409
|
+
abstract updateAuthorizations(client_id: string, userid: string | number | null, authorizations: (string | null)[]): Promise<void>;
|
|
410
|
+
}
|
|
411
|
+
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,eAAe,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEtH;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAElC;;OAEG;IACH,sBAAsB,CAAC,EAAG,OAAO,CAAA;IAEjC;;OAEG;IACH,eAAe,CAAC,EAAG,OAAO,CAAC;IAE3B;;;;;OAKG;IACH,iBAAiB,CAAC,EAAG,OAAO,CAAC;IAE7B;;;;OAIG;IACH,cAAc,CA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;GAEG;AACH,MAAM,WAAW,gCAAgC;CAChD;AAED;;;;;;;GAOG;AACH,8BAAsB,yBAAyB;IAE3C;;;OAGG;gBACS,QAAQ,GAAG,gCAAqC;IAG5D;;;;;;OAMG;IACH,QAAQ,CAAC,iBAAiB,CAAC,SAAS,EAAE,MAAM,EACxC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAI,OAAO,CAAC,CAAC,MAAM,GAAC,IAAI,CAAC,EAAE,CAAC;IAEnE;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAC3C,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,EAC9B,cAAc,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,GAAI,OAAO,CAAC,IAAI,CAAC;CACzD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cookieauth.test.d.ts","sourceRoot":"","sources":["../../src/tests/cookieauth.test.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,mBAAmB,EAAsB,MAAM,4BAA4B,CAAC;AAGrF,eAAO,IAAI,WAAW,EAAG,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crypto.test.d.ts","sourceRoot":"","sources":["../../src/tests/crypto.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email.test.d.ts","sourceRoot":"","sources":["../../src/tests/email.test.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAsB,MAAM,4BAA4B,CAAC;AAGrF,eAAO,IAAI,WAAW,EAAG,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"password.test.d.ts","sourceRoot":"","sources":["../../src/tests/password.test.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,eAAO,IAAI,WAAW,EAAG,mBAAmB,CAAC;AAC7C,eAAO,IAAI,iBAAiB,EAAG,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tmp.test.d.ts","sourceRoot":"","sources":["../../src/tests/tmp.test.ts"],"names":[],"mappings":""}
|