@qodalis/cli-server-plugin-users-postgres 0.0.0-stage → 1.0.0-beta.30
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 +21 -0
- package/README.md +76 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/postgres-users-stores.d.ts +143 -0
- package/dist/postgres-users-stores.d.ts.map +1 -0
- package/dist/postgres-users-stores.js +589 -0
- package/dist/postgres-users-stores.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +40 -5
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 Qodalis Solutions
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,77 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @qodalis/cli-server-plugin-users-postgres
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
PostgreSQL stores for [`@qodalis/cli-server-plugin-users`](../users/README.md): users, groups, passwords, sessions,
|
|
4
|
+
API tokens and the audit log are kept in PostgreSQL instead of memory, so accounts, sign-ins and tokens survive
|
|
5
|
+
restarts and deploys, and several server instances can share them.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @qodalis/cli-server-plugin-users-postgres
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { createCliServer } from '@qodalis/cli-server-node';
|
|
13
|
+
import { CliUsersBuilder } from '@qodalis/cli-server-plugin-users';
|
|
14
|
+
import { createPostgresUsersStores } from '@qodalis/cli-server-plugin-users-postgres';
|
|
15
|
+
|
|
16
|
+
const cli = createCliServer();
|
|
17
|
+
const stores = createPostgresUsersStores(process.env.DATABASE_URL!); // or PoolConfig, or your own Pool
|
|
18
|
+
await stores.init(); // applies the schema migrations
|
|
19
|
+
|
|
20
|
+
const users = new CliUsersBuilder()
|
|
21
|
+
.setUserStore(stores.userStore)
|
|
22
|
+
.setGroupStore(stores.groupStore)
|
|
23
|
+
.setCredentialStore(stores.credentialStore)
|
|
24
|
+
.setSessionStore(stores.sessionStore)
|
|
25
|
+
.setApiTokenStore(stores.apiTokenStore)
|
|
26
|
+
.setAuditStore(stores.auditStore)
|
|
27
|
+
.build(cli.eventBus);
|
|
28
|
+
cli.mountPlugin(users);
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The users plugin seeds the built-in groups and the `root` user only into empty stores, so a restart keeps the
|
|
32
|
+
existing accounts. `stores.close()` ends the pool when the stores created it (not a `Pool` you passed in).
|
|
33
|
+
|
|
34
|
+
## Tables
|
|
35
|
+
|
|
36
|
+
Named `Qcli` + PascalCase with PascalCase columns, like every plugin's tables (`tablePrefix` changes the prefix,
|
|
37
|
+
`tables: { Users: 'AppUsers' }` names one table, `schema` puts them in another schema):
|
|
38
|
+
|
|
39
|
+
| Table | Holds |
|
|
40
|
+
|---|---|
|
|
41
|
+
| `QcliUsers` | Users; names and emails unique ignoring case; groups and `Data` as JSONB |
|
|
42
|
+
| `QcliGroups` | Groups and their permissions; names unique ignoring case |
|
|
43
|
+
| `QcliCredentials` | Password hash and salt per user |
|
|
44
|
+
| `QcliSessions` | Sessions by token hash (SHA-256; raw tokens are never stored) |
|
|
45
|
+
| `QcliApiTokens` | API tokens by hash, with audience and permissions |
|
|
46
|
+
| `QcliAuditEntries` | The audit log, newest first by insertion order |
|
|
47
|
+
|
|
48
|
+
Times are epoch milliseconds (`bigint`), as in the users plugin's models.
|
|
49
|
+
|
|
50
|
+
## Migrations
|
|
51
|
+
|
|
52
|
+
The schema is the migration source `qcli-users` of the [databases plugin](../databases/README.md): `init()` applies
|
|
53
|
+
what the database does not have yet, under the plugin's lock, recording it in `QcliMigrations` /
|
|
54
|
+
`QcliMigrationRuns`. A database with tables of the first preview (`qcli_users`, ...) is adopted by the first
|
|
55
|
+
migration: tables, columns and indexes are renamed and the data kept.
|
|
56
|
+
|
|
57
|
+
To see and run the users schema from the dashboard and the terminal, register its database with the migrations
|
|
58
|
+
plugin:
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
const migrations = new CliDatabasesBuilder()
|
|
62
|
+
.addDatabase('users', { connection: stores.connection })
|
|
63
|
+
.addSource('users', stores.migrationSource)
|
|
64
|
+
.build();
|
|
65
|
+
cli.mountPlugin(migrations);
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Audit log
|
|
69
|
+
|
|
70
|
+
Unlike the in-memory store (latest 1000 entries), the PostgreSQL audit store keeps every entry. Bound it with
|
|
71
|
+
`pruneAudit(stores.auditStore, before)` on a schedule, e.g. a [jobs plugin](../jobs/README.md) job.
|
|
72
|
+
|
|
73
|
+
## Tests
|
|
74
|
+
|
|
75
|
+
The store tests run the same contract against the in-memory and the PostgreSQL stores. The PostgreSQL part runs
|
|
76
|
+
when `QCLI_TEST_POSTGRES` holds a connection string to an empty database the tests may wipe; CI starts a
|
|
77
|
+
`postgres:17` service for it.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { createPostgresUsersStores, PostgresUsersStores, PostgresUsersStoresOptions, PostgresUserStore, PostgresGroupStore, PostgresCredentialStore, PostgresSessionStore, PostgresApiTokenStore, PostgresAuditStore, } from './postgres-users-stores';
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,yBAAyB,EACzB,mBAAmB,EACnB,0BAA0B,EAC1B,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,EACvB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,GACrB,MAAM,yBAAyB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PostgresAuditStore = exports.PostgresApiTokenStore = exports.PostgresSessionStore = exports.PostgresCredentialStore = exports.PostgresGroupStore = exports.PostgresUserStore = exports.createPostgresUsersStores = void 0;
|
|
4
|
+
var postgres_users_stores_1 = require("./postgres-users-stores");
|
|
5
|
+
Object.defineProperty(exports, "createPostgresUsersStores", { enumerable: true, get: function () { return postgres_users_stores_1.createPostgresUsersStores; } });
|
|
6
|
+
Object.defineProperty(exports, "PostgresUserStore", { enumerable: true, get: function () { return postgres_users_stores_1.PostgresUserStore; } });
|
|
7
|
+
Object.defineProperty(exports, "PostgresGroupStore", { enumerable: true, get: function () { return postgres_users_stores_1.PostgresGroupStore; } });
|
|
8
|
+
Object.defineProperty(exports, "PostgresCredentialStore", { enumerable: true, get: function () { return postgres_users_stores_1.PostgresCredentialStore; } });
|
|
9
|
+
Object.defineProperty(exports, "PostgresSessionStore", { enumerable: true, get: function () { return postgres_users_stores_1.PostgresSessionStore; } });
|
|
10
|
+
Object.defineProperty(exports, "PostgresApiTokenStore", { enumerable: true, get: function () { return postgres_users_stores_1.PostgresApiTokenStore; } });
|
|
11
|
+
Object.defineProperty(exports, "PostgresAuditStore", { enumerable: true, get: function () { return postgres_users_stores_1.PostgresAuditStore; } });
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;AAAA,iEAUiC;AAT7B,kIAAA,yBAAyB,OAAA;AAGzB,0HAAA,iBAAiB,OAAA;AACjB,2HAAA,kBAAkB,OAAA;AAClB,gIAAA,uBAAuB,OAAA;AACvB,6HAAA,oBAAoB,OAAA;AACpB,8HAAA,qBAAqB,OAAA;AACrB,2HAAA,kBAAkB,OAAA"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { Pool, PoolConfig } from 'pg';
|
|
2
|
+
import { type AuditEntry, type AuditQueryOptions, type CliTableNameOptions, type ICliAuditStore } from '@qodalis/cli-server-abstractions';
|
|
3
|
+
import { type CliMigrationSource, type CliSqlConnection } from '@qodalis/cli-server-plugin-databases';
|
|
4
|
+
import type { ApiToken, CreateGroupDto, CreateUserDto, Credentials, Group, ICliApiTokenStore, ICliCredentialStore, ICliGroupStore, ICliSessionStore, ICliUserStore, Session, SessionMetadata, UpdateGroupDto, UpdateUserDto, User } from '@qodalis/cli-server-plugin-users';
|
|
5
|
+
/**
|
|
6
|
+
* Table names: `QcliUsers`, `QcliGroups`, `QcliCredentials`, `QcliSessions`, `QcliApiTokens`, `QcliAuditEntries`
|
|
7
|
+
* (plugin tables are `Qcli` + PascalCase), changed with `tablePrefix`, per table with `tables` (`{ Users: 'MyUsers' }`),
|
|
8
|
+
* and placed in `schema`.
|
|
9
|
+
*/
|
|
10
|
+
export type PostgresUsersStoresOptions = Pick<CliTableNameOptions, 'tablePrefix' | 'tables' | 'schema'>;
|
|
11
|
+
/** The stores the users plugin takes, kept in PostgreSQL. Call `init()` before use. */
|
|
12
|
+
export interface PostgresUsersStores {
|
|
13
|
+
userStore: PostgresUserStore;
|
|
14
|
+
groupStore: PostgresGroupStore;
|
|
15
|
+
credentialStore: PostgresCredentialStore;
|
|
16
|
+
sessionStore: PostgresSessionStore;
|
|
17
|
+
apiTokenStore: PostgresApiTokenStore;
|
|
18
|
+
auditStore: PostgresAuditStore;
|
|
19
|
+
/**
|
|
20
|
+
* Applies the schema migrations the database does not have yet (source `qcli-users`, history in
|
|
21
|
+
* `QcliMigrations`); safe to run on every start, also from several processes at once.
|
|
22
|
+
*/
|
|
23
|
+
init(): Promise<void>;
|
|
24
|
+
/** The database, for the databases plugin (`addDatabase('users', { connection })`). */
|
|
25
|
+
connection: CliSqlConnection;
|
|
26
|
+
/** The stores' migrations (`qcli-users`), to show and run them from the databases plugin. */
|
|
27
|
+
migrationSource: CliMigrationSource;
|
|
28
|
+
/** Closes the pool when the stores created it. */
|
|
29
|
+
close(): Promise<void>;
|
|
30
|
+
}
|
|
31
|
+
/** The stores' tables, by their base names (`Users` → `QcliUsers`). */
|
|
32
|
+
declare const TABLES: readonly ["Users", "Groups", "Credentials", "Sessions", "ApiTokens", "AuditEntries"];
|
|
33
|
+
declare class Tables {
|
|
34
|
+
readonly options: PostgresUsersStoresOptions;
|
|
35
|
+
/** Quoted names, ready for SQL. */
|
|
36
|
+
readonly users: string;
|
|
37
|
+
readonly groups: string;
|
|
38
|
+
readonly credentials: string;
|
|
39
|
+
readonly sessions: string;
|
|
40
|
+
readonly tokens: string;
|
|
41
|
+
readonly audit: string;
|
|
42
|
+
/** Unquoted names by base name. */
|
|
43
|
+
readonly names: Record<(typeof TABLES)[number], string>;
|
|
44
|
+
constructor(options: PostgresUsersStoresOptions);
|
|
45
|
+
/** The schema's history (source `qcli-users`): append new migrations, never edit released ones. */
|
|
46
|
+
source(): CliMigrationSource;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Creates the PostgreSQL stores of the users plugin on one pool.
|
|
50
|
+
*
|
|
51
|
+
* @param config A connection string, pool settings, or a pool the host owns (then `close()`
|
|
52
|
+
* leaves it open).
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* const stores = createPostgresUsersStores(process.env.DATABASE_URL!);
|
|
57
|
+
* await stores.init();
|
|
58
|
+
* const users = new CliUsersBuilder()
|
|
59
|
+
* .setUserStore(stores.userStore)
|
|
60
|
+
* .setGroupStore(stores.groupStore)
|
|
61
|
+
* .setCredentialStore(stores.credentialStore)
|
|
62
|
+
* .setSessionStore(stores.sessionStore)
|
|
63
|
+
* .setApiTokenStore(stores.apiTokenStore)
|
|
64
|
+
* .setAuditStore(stores.auditStore)
|
|
65
|
+
* .build(cli.eventBus);
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
export declare function createPostgresUsersStores(config: string | PoolConfig | Pool, options?: PostgresUsersStoresOptions): PostgresUsersStores;
|
|
69
|
+
/** Users; names and emails are unique ignoring case. */
|
|
70
|
+
export declare class PostgresUserStore implements ICliUserStore {
|
|
71
|
+
private readonly pool;
|
|
72
|
+
private readonly t;
|
|
73
|
+
constructor(pool: Pool, t: Tables);
|
|
74
|
+
getUsers(): Promise<User[]>;
|
|
75
|
+
getUser(idOrName: string): Promise<User | undefined>;
|
|
76
|
+
private assertUnique;
|
|
77
|
+
createUser(data: CreateUserDto): Promise<User>;
|
|
78
|
+
updateUser(id: string, data: UpdateUserDto): Promise<User>;
|
|
79
|
+
deleteUser(id: string): Promise<void>;
|
|
80
|
+
}
|
|
81
|
+
/** Groups; names are unique ignoring case and kept as given. */
|
|
82
|
+
export declare class PostgresGroupStore implements ICliGroupStore {
|
|
83
|
+
private readonly pool;
|
|
84
|
+
private readonly t;
|
|
85
|
+
constructor(pool: Pool, t: Tables);
|
|
86
|
+
getGroups(): Promise<Group[]>;
|
|
87
|
+
getGroup(name: string): Promise<Group | undefined>;
|
|
88
|
+
createGroup(data: CreateGroupDto): Promise<Group>;
|
|
89
|
+
updateGroup(name: string, data: UpdateGroupDto): Promise<Group>;
|
|
90
|
+
deleteGroup(name: string): Promise<void>;
|
|
91
|
+
}
|
|
92
|
+
/** Password hashes and salts, one row per user. */
|
|
93
|
+
export declare class PostgresCredentialStore implements ICliCredentialStore {
|
|
94
|
+
private readonly pool;
|
|
95
|
+
private readonly t;
|
|
96
|
+
constructor(pool: Pool, t: Tables);
|
|
97
|
+
setPassword(userId: string, hash: string, salt: string): Promise<void>;
|
|
98
|
+
getCredentials(userId: string): Promise<Credentials | undefined>;
|
|
99
|
+
deleteCredentials(userId: string): Promise<void>;
|
|
100
|
+
}
|
|
101
|
+
/** Sessions, keyed by the token's SHA-256 (raw tokens are never stored). */
|
|
102
|
+
export declare class PostgresSessionStore implements ICliSessionStore {
|
|
103
|
+
private readonly pool;
|
|
104
|
+
private readonly t;
|
|
105
|
+
constructor(pool: Pool, t: Tables);
|
|
106
|
+
createSession(userId: string, tokenHash: string, metadata: SessionMetadata): Promise<Session>;
|
|
107
|
+
getSession(tokenHash: string): Promise<Session | undefined>;
|
|
108
|
+
getSessionById(id: string): Promise<Session | undefined>;
|
|
109
|
+
getActiveSessions(): Promise<Session[]>;
|
|
110
|
+
deleteSession(tokenHash: string): Promise<void>;
|
|
111
|
+
deleteSessionById(id: string): Promise<void>;
|
|
112
|
+
deleteUserSessions(userId: string): Promise<void>;
|
|
113
|
+
updateLastActivity(tokenHash: string): Promise<void>;
|
|
114
|
+
cleanup(maxAgeMs: number): Promise<void>;
|
|
115
|
+
}
|
|
116
|
+
/** API tokens, found by the token's SHA-256 (raw tokens are never stored). */
|
|
117
|
+
export declare class PostgresApiTokenStore implements ICliApiTokenStore {
|
|
118
|
+
private readonly pool;
|
|
119
|
+
private readonly t;
|
|
120
|
+
constructor(pool: Pool, t: Tables);
|
|
121
|
+
createToken(token: ApiToken): Promise<ApiToken>;
|
|
122
|
+
getTokenByHash(tokenHash: string): Promise<ApiToken | undefined>;
|
|
123
|
+
getToken(id: string): Promise<ApiToken | undefined>;
|
|
124
|
+
getTokens(userId?: string): Promise<ApiToken[]>;
|
|
125
|
+
deleteToken(id: string): Promise<void>;
|
|
126
|
+
deleteUserTokens(userId: string): Promise<void>;
|
|
127
|
+
updateLastUsed(id: string, lastUsedAt: number): Promise<void>;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* The audit log. Unlike the in-memory store it keeps every entry: bound it with
|
|
131
|
+
* `pruneAudit(store, before)` on a schedule (e.g. a jobs-plugin job).
|
|
132
|
+
*/
|
|
133
|
+
export declare class PostgresAuditStore implements ICliAuditStore {
|
|
134
|
+
private readonly pool;
|
|
135
|
+
private readonly t;
|
|
136
|
+
constructor(pool: Pool, t: Tables);
|
|
137
|
+
log(entry: AuditEntry): Promise<void>;
|
|
138
|
+
getEntries(options?: AuditQueryOptions): Promise<AuditEntry[]>;
|
|
139
|
+
prune(before: Date): Promise<number>;
|
|
140
|
+
clear(): Promise<void>;
|
|
141
|
+
}
|
|
142
|
+
export {};
|
|
143
|
+
//# sourceMappingURL=postgres-users-stores.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgres-users-stores.d.ts","sourceRoot":"","sources":["../postgres-users-stores.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AACtC,OAAO,EAAiB,KAAK,UAAU,EAAE,KAAK,iBAAiB,EAAE,KAAK,mBAAmB,EAAE,KAAK,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACzJ,OAAO,EAQH,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACxB,MAAM,sCAAsC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,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAyB9D,KAAK,CAAC,MAAM,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC;IAKpC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAG/B"}
|
|
@@ -0,0 +1,589 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PostgresAuditStore = exports.PostgresApiTokenStore = exports.PostgresSessionStore = exports.PostgresCredentialStore = exports.PostgresGroupStore = exports.PostgresUserStore = void 0;
|
|
4
|
+
exports.createPostgresUsersStores = createPostgresUsersStores;
|
|
5
|
+
const crypto_1 = require("crypto");
|
|
6
|
+
const pg_1 = require("pg");
|
|
7
|
+
const cli_server_abstractions_1 = require("@qodalis/cli-server-abstractions");
|
|
8
|
+
const cli_server_plugin_databases_1 = require("@qodalis/cli-server-plugin-databases");
|
|
9
|
+
/** Epoch milliseconds are kept in `bigint` columns, which `pg` returns as strings. */
|
|
10
|
+
const ms = (value) => Number(value);
|
|
11
|
+
const optionalMs = (value) => (value === null || value === undefined ? undefined : Number(value));
|
|
12
|
+
/** A unique-index violation (duplicate name, email, ...). */
|
|
13
|
+
const isUniqueViolation = (err) => err?.code === '23505';
|
|
14
|
+
/** The stores' tables, by their base names (`Users` → `QcliUsers`). */
|
|
15
|
+
const TABLES = ['Users', 'Groups', 'Credentials', 'Sessions', 'ApiTokens', 'AuditEntries'];
|
|
16
|
+
/** The tables of the never-published first version (`qcli_users`, ...), adopted by migration 1. */
|
|
17
|
+
const LEGACY = {
|
|
18
|
+
Users: {
|
|
19
|
+
table: 'qcli_users',
|
|
20
|
+
columns: { id: 'Id', name: 'Name', email: 'Email', groups: 'Groups', disabled: 'Disabled', must_change_password: 'MustChangePassword', home_dir: 'HomeDir', data: 'Data', last_login_at: 'LastLoginAt', created_at: 'CreatedAt', updated_at: 'UpdatedAt' },
|
|
21
|
+
indexes: { qcli_users_name_key: 'Name', qcli_users_email_key: 'Email', qcli_users_pkey: '' },
|
|
22
|
+
},
|
|
23
|
+
Groups: {
|
|
24
|
+
table: 'qcli_groups',
|
|
25
|
+
columns: { id: 'Id', name: 'Name', description: 'Description', permissions: 'Permissions', built_in: 'BuiltIn', created_at: 'CreatedAt', updated_at: 'UpdatedAt' },
|
|
26
|
+
indexes: { qcli_groups_name_key: 'Name', qcli_groups_pkey: '' },
|
|
27
|
+
},
|
|
28
|
+
Credentials: {
|
|
29
|
+
table: 'qcli_credentials',
|
|
30
|
+
columns: { user_id: 'UserId', password_hash: 'PasswordHash', salt: 'Salt', last_changed: 'LastChanged' },
|
|
31
|
+
indexes: { qcli_credentials_pkey: '' },
|
|
32
|
+
},
|
|
33
|
+
Sessions: {
|
|
34
|
+
table: 'qcli_sessions',
|
|
35
|
+
columns: { token_hash: 'TokenHash', id: 'Id', user_id: 'UserId', created_at: 'CreatedAt', last_activity: 'LastActivity', metadata: 'Metadata' },
|
|
36
|
+
indexes: { qcli_sessions_user_idx: 'UserId', qcli_sessions_id_key: 'Id', qcli_sessions_pkey: '' },
|
|
37
|
+
},
|
|
38
|
+
ApiTokens: {
|
|
39
|
+
table: 'qcli_api_tokens',
|
|
40
|
+
columns: { id: 'Id', user_id: 'UserId', name: 'Name', token_hash: 'TokenHash', created_at: 'CreatedAt', expires_at: 'ExpiresAt', last_used_at: 'LastUsedAt', audience: 'Audience', permissions: 'Permissions' },
|
|
41
|
+
indexes: { qcli_api_tokens_user_idx: 'UserId', qcli_api_tokens_token_hash_key: 'TokenHash', qcli_api_tokens_pkey: '' },
|
|
42
|
+
},
|
|
43
|
+
AuditEntries: {
|
|
44
|
+
table: 'qcli_audit',
|
|
45
|
+
columns: { seq: 'Seq', id: 'Id', timestamp: 'Timestamp', event: 'Event', username: 'Username', actor: 'Actor', entry: 'Entry' },
|
|
46
|
+
indexes: { qcli_audit_timestamp_idx: 'Timestamp', qcli_audit_pkey: '' },
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
class Tables {
|
|
50
|
+
options;
|
|
51
|
+
/** Quoted names, ready for SQL. */
|
|
52
|
+
users;
|
|
53
|
+
groups;
|
|
54
|
+
credentials;
|
|
55
|
+
sessions;
|
|
56
|
+
tokens;
|
|
57
|
+
audit;
|
|
58
|
+
/** Unquoted names by base name. */
|
|
59
|
+
names;
|
|
60
|
+
constructor(options) {
|
|
61
|
+
this.options = options;
|
|
62
|
+
this.names = Object.fromEntries(TABLES.map((t) => [t, (0, cli_server_abstractions_1.qcliTableName)(t, options)]));
|
|
63
|
+
const q = (t) => (0, cli_server_plugin_databases_1.quoteTable)('postgres', this.names[t], options.schema);
|
|
64
|
+
this.users = q('Users');
|
|
65
|
+
this.groups = q('Groups');
|
|
66
|
+
this.credentials = q('Credentials');
|
|
67
|
+
this.sessions = q('Sessions');
|
|
68
|
+
this.tokens = q('ApiTokens');
|
|
69
|
+
this.audit = q('AuditEntries');
|
|
70
|
+
}
|
|
71
|
+
/** The schema's history (source `qcli-users`): append new migrations, never edit released ones. */
|
|
72
|
+
source() {
|
|
73
|
+
const n = this.names;
|
|
74
|
+
const schema = this.options.schema;
|
|
75
|
+
const ix = (table, ...columns) => (0, cli_server_plugin_databases_1.quoteIdent)('postgres', `IX_${table}_${columns.join('_')}`);
|
|
76
|
+
return (0, cli_server_plugin_databases_1.codeSource)('qcli-users', [
|
|
77
|
+
{
|
|
78
|
+
id: '1',
|
|
79
|
+
name: 'users, groups, credentials, sessions, api tokens, audit',
|
|
80
|
+
up: async (db) => {
|
|
81
|
+
// The first version's qcli_* tables (plugins.qodalis.com): renamed with their data
|
|
82
|
+
for (const base of TABLES) {
|
|
83
|
+
const legacy = LEGACY[base];
|
|
84
|
+
if (!(await (0, cli_server_plugin_databases_1.adoptLegacyTable)(db, legacy.table, n[base], legacy.columns, schema)))
|
|
85
|
+
continue;
|
|
86
|
+
for (const [index, column] of Object.entries(legacy.indexes)) {
|
|
87
|
+
const to = column ? `IX_${n[base]}_${column}` : `PK_${n[base]}`;
|
|
88
|
+
await db.exec(`ALTER INDEX IF EXISTS ${schema ? `${(0, cli_server_plugin_databases_1.quoteIdent)('postgres', schema)}.` : ''}${(0, cli_server_plugin_databases_1.quoteIdent)('postgres', index)} RENAME TO ${(0, cli_server_plugin_databases_1.quoteIdent)('postgres', to)}`);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (await (0, cli_server_plugin_databases_1.tableExists)(db, 'qcli_schema_migrations', schema))
|
|
92
|
+
await db.exec(`DROP TABLE ${(0, cli_server_plugin_databases_1.quoteTable)('postgres', 'qcli_schema_migrations', schema)}`);
|
|
93
|
+
await db.exec(`
|
|
94
|
+
CREATE TABLE IF NOT EXISTS ${this.users} (
|
|
95
|
+
"Id" text CONSTRAINT ${(0, cli_server_plugin_databases_1.quoteIdent)('postgres', `PK_${n.Users}`)} PRIMARY KEY,
|
|
96
|
+
"Name" text NOT NULL,
|
|
97
|
+
"Email" text NOT NULL,
|
|
98
|
+
"Groups" jsonb NOT NULL DEFAULT '[]',
|
|
99
|
+
"Disabled" boolean NOT NULL DEFAULT false,
|
|
100
|
+
"MustChangePassword" boolean NOT NULL DEFAULT false,
|
|
101
|
+
"HomeDir" text,
|
|
102
|
+
"Data" jsonb,
|
|
103
|
+
"LastLoginAt" bigint,
|
|
104
|
+
"CreatedAt" bigint NOT NULL,
|
|
105
|
+
"UpdatedAt" bigint NOT NULL
|
|
106
|
+
);
|
|
107
|
+
CREATE UNIQUE INDEX IF NOT EXISTS ${ix(n.Users, 'Name')} ON ${this.users} (lower("Name"));
|
|
108
|
+
CREATE UNIQUE INDEX IF NOT EXISTS ${ix(n.Users, 'Email')} ON ${this.users} (lower("Email"));
|
|
109
|
+
CREATE TABLE IF NOT EXISTS ${this.groups} (
|
|
110
|
+
"Id" text CONSTRAINT ${(0, cli_server_plugin_databases_1.quoteIdent)('postgres', `PK_${n.Groups}`)} PRIMARY KEY,
|
|
111
|
+
"Name" text NOT NULL,
|
|
112
|
+
"Description" text,
|
|
113
|
+
"Permissions" jsonb NOT NULL DEFAULT '[]',
|
|
114
|
+
"BuiltIn" boolean NOT NULL DEFAULT false,
|
|
115
|
+
"CreatedAt" bigint NOT NULL,
|
|
116
|
+
"UpdatedAt" bigint NOT NULL
|
|
117
|
+
);
|
|
118
|
+
CREATE UNIQUE INDEX IF NOT EXISTS ${ix(n.Groups, 'Name')} ON ${this.groups} (lower("Name"));
|
|
119
|
+
CREATE TABLE IF NOT EXISTS ${this.credentials} (
|
|
120
|
+
"UserId" text CONSTRAINT ${(0, cli_server_plugin_databases_1.quoteIdent)('postgres', `PK_${n.Credentials}`)} PRIMARY KEY,
|
|
121
|
+
"PasswordHash" text NOT NULL,
|
|
122
|
+
"Salt" text NOT NULL,
|
|
123
|
+
"LastChanged" bigint NOT NULL
|
|
124
|
+
);
|
|
125
|
+
CREATE TABLE IF NOT EXISTS ${this.sessions} (
|
|
126
|
+
"TokenHash" text CONSTRAINT ${(0, cli_server_plugin_databases_1.quoteIdent)('postgres', `PK_${n.Sessions}`)} PRIMARY KEY,
|
|
127
|
+
"Id" text NOT NULL CONSTRAINT ${ix(n.Sessions, 'Id')} UNIQUE,
|
|
128
|
+
"UserId" text NOT NULL,
|
|
129
|
+
"CreatedAt" bigint NOT NULL,
|
|
130
|
+
"LastActivity" bigint NOT NULL,
|
|
131
|
+
"Metadata" jsonb NOT NULL DEFAULT '{}'
|
|
132
|
+
);
|
|
133
|
+
CREATE INDEX IF NOT EXISTS ${ix(n.Sessions, 'UserId')} ON ${this.sessions} ("UserId");
|
|
134
|
+
CREATE TABLE IF NOT EXISTS ${this.tokens} (
|
|
135
|
+
"Id" text CONSTRAINT ${(0, cli_server_plugin_databases_1.quoteIdent)('postgres', `PK_${n.ApiTokens}`)} PRIMARY KEY,
|
|
136
|
+
"UserId" text NOT NULL,
|
|
137
|
+
"Name" text NOT NULL,
|
|
138
|
+
"TokenHash" text NOT NULL CONSTRAINT ${ix(n.ApiTokens, 'TokenHash')} UNIQUE,
|
|
139
|
+
"CreatedAt" bigint NOT NULL,
|
|
140
|
+
"ExpiresAt" bigint,
|
|
141
|
+
"LastUsedAt" bigint,
|
|
142
|
+
"Audience" text,
|
|
143
|
+
"Permissions" jsonb
|
|
144
|
+
);
|
|
145
|
+
CREATE INDEX IF NOT EXISTS ${ix(n.ApiTokens, 'UserId')} ON ${this.tokens} ("UserId");
|
|
146
|
+
CREATE TABLE IF NOT EXISTS ${this.audit} (
|
|
147
|
+
"Seq" bigserial CONSTRAINT ${(0, cli_server_plugin_databases_1.quoteIdent)('postgres', `PK_${n.AuditEntries}`)} PRIMARY KEY,
|
|
148
|
+
"Id" text NOT NULL,
|
|
149
|
+
"Timestamp" bigint NOT NULL,
|
|
150
|
+
"Event" text NOT NULL,
|
|
151
|
+
"Username" text,
|
|
152
|
+
"Actor" text,
|
|
153
|
+
"Entry" jsonb NOT NULL
|
|
154
|
+
);
|
|
155
|
+
CREATE INDEX IF NOT EXISTS ${ix(n.AuditEntries, 'Timestamp')} ON ${this.audit} ("Timestamp");
|
|
156
|
+
`);
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
]);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Creates the PostgreSQL stores of the users plugin on one pool.
|
|
164
|
+
*
|
|
165
|
+
* @param config A connection string, pool settings, or a pool the host owns (then `close()`
|
|
166
|
+
* leaves it open).
|
|
167
|
+
*
|
|
168
|
+
* @example
|
|
169
|
+
* ```ts
|
|
170
|
+
* const stores = createPostgresUsersStores(process.env.DATABASE_URL!);
|
|
171
|
+
* await stores.init();
|
|
172
|
+
* const users = new CliUsersBuilder()
|
|
173
|
+
* .setUserStore(stores.userStore)
|
|
174
|
+
* .setGroupStore(stores.groupStore)
|
|
175
|
+
* .setCredentialStore(stores.credentialStore)
|
|
176
|
+
* .setSessionStore(stores.sessionStore)
|
|
177
|
+
* .setApiTokenStore(stores.apiTokenStore)
|
|
178
|
+
* .setAuditStore(stores.auditStore)
|
|
179
|
+
* .build(cli.eventBus);
|
|
180
|
+
* ```
|
|
181
|
+
*/
|
|
182
|
+
function createPostgresUsersStores(config, options = {}) {
|
|
183
|
+
const owned = !(config instanceof pg_1.Pool);
|
|
184
|
+
const pool = config instanceof pg_1.Pool ? config : new pg_1.Pool(typeof config === 'string' ? { connectionString: config } : config);
|
|
185
|
+
const tables = new Tables(options);
|
|
186
|
+
const connection = (0, cli_server_plugin_databases_1.postgresConnection)(pool);
|
|
187
|
+
const migrationSource = tables.source();
|
|
188
|
+
return {
|
|
189
|
+
userStore: new PostgresUserStore(pool, tables),
|
|
190
|
+
groupStore: new PostgresGroupStore(pool, tables),
|
|
191
|
+
credentialStore: new PostgresCredentialStore(pool, tables),
|
|
192
|
+
sessionStore: new PostgresSessionStore(pool, tables),
|
|
193
|
+
apiTokenStore: new PostgresApiTokenStore(pool, tables),
|
|
194
|
+
auditStore: new PostgresAuditStore(pool, tables),
|
|
195
|
+
connection,
|
|
196
|
+
migrationSource,
|
|
197
|
+
init: async () => {
|
|
198
|
+
const runner = new cli_server_plugin_databases_1.CliMigrationRunner('users', { connection, tablePrefix: options.tablePrefix, schema: options.schema }).addSource(migrationSource);
|
|
199
|
+
const run = await runner.up({ trigger: 'startup', wait: true });
|
|
200
|
+
if ('status' in run && run.status === 'failed')
|
|
201
|
+
throw new Error(`users-postgres schema: ${run.error}`);
|
|
202
|
+
},
|
|
203
|
+
close: async () => {
|
|
204
|
+
if (owned)
|
|
205
|
+
await pool.end();
|
|
206
|
+
},
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
/** Users; names and emails are unique ignoring case. */
|
|
210
|
+
class PostgresUserStore {
|
|
211
|
+
pool;
|
|
212
|
+
t;
|
|
213
|
+
constructor(pool, t) {
|
|
214
|
+
this.pool = pool;
|
|
215
|
+
this.t = t;
|
|
216
|
+
}
|
|
217
|
+
async getUsers() {
|
|
218
|
+
const { rows } = await this.pool.query(`SELECT "Id" AS id, "Name" AS name, "Email" AS email, "Groups" AS groups, "Disabled" AS disabled, "MustChangePassword" AS must_change_password, "HomeDir" AS home_dir, "Data" AS data, "LastLoginAt" AS last_login_at, "CreatedAt" AS created_at, "UpdatedAt" AS updated_at FROM ${this.t.users} ORDER BY "CreatedAt", "Name"`);
|
|
219
|
+
return rows.map(toUser);
|
|
220
|
+
}
|
|
221
|
+
async getUser(idOrName) {
|
|
222
|
+
const { rows } = await this.pool.query(`SELECT "Id" AS id, "Name" AS name, "Email" AS email, "Groups" AS groups, "Disabled" AS disabled, "MustChangePassword" AS must_change_password, "HomeDir" AS home_dir, "Data" AS data, "LastLoginAt" AS last_login_at, "CreatedAt" AS created_at, "UpdatedAt" AS updated_at FROM ${this.t.users} WHERE "Id" = $1 OR lower("Name") = lower($1) ORDER BY ("Id" = $1) DESC LIMIT 1`, [idOrName]);
|
|
223
|
+
return rows[0] ? toUser(rows[0]) : undefined;
|
|
224
|
+
}
|
|
225
|
+
async assertUnique(name, email, exceptId) {
|
|
226
|
+
if (name !== undefined) {
|
|
227
|
+
const { rowCount } = await this.pool.query(`SELECT 1 FROM ${this.t.users} WHERE lower("Name") = lower($1) AND "Id" IS DISTINCT FROM $2`, [name, exceptId ?? null]);
|
|
228
|
+
if (rowCount)
|
|
229
|
+
throw new Error(`User with name '${name}' already exists`);
|
|
230
|
+
}
|
|
231
|
+
if (email !== undefined) {
|
|
232
|
+
const { rowCount } = await this.pool.query(`SELECT 1 FROM ${this.t.users} WHERE lower("Email") = lower($1) AND "Id" IS DISTINCT FROM $2`, [email, exceptId ?? null]);
|
|
233
|
+
if (rowCount)
|
|
234
|
+
throw new Error(`User with email '${email}' already exists`);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
async createUser(data) {
|
|
238
|
+
await this.assertUnique(data.name, data.email);
|
|
239
|
+
const now = Date.now();
|
|
240
|
+
try {
|
|
241
|
+
const { rows } = await this.pool.query(`INSERT INTO ${this.t.users} ("Id", "Name", "Email", "Groups", "Disabled", "MustChangePassword", "HomeDir", "Data", "CreatedAt", "UpdatedAt")
|
|
242
|
+
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $9) RETURNING "Id" AS id, "Name" AS name, "Email" AS email, "Groups" AS groups, "Disabled" AS disabled, "MustChangePassword" AS must_change_password, "HomeDir" AS home_dir, "Data" AS data, "LastLoginAt" AS last_login_at, "CreatedAt" AS created_at, "UpdatedAt" AS updated_at`, [
|
|
243
|
+
(0, crypto_1.randomUUID)(),
|
|
244
|
+
data.name,
|
|
245
|
+
data.email,
|
|
246
|
+
JSON.stringify(data.groups ?? []),
|
|
247
|
+
data.disabled ?? false,
|
|
248
|
+
data.mustChangePassword ?? false,
|
|
249
|
+
data.homeDir ?? null,
|
|
250
|
+
data.data !== undefined ? JSON.stringify(data.data) : null,
|
|
251
|
+
now,
|
|
252
|
+
]);
|
|
253
|
+
return toUser(rows[0]);
|
|
254
|
+
}
|
|
255
|
+
catch (err) {
|
|
256
|
+
// a concurrent create won the race: the same error as the check above
|
|
257
|
+
if (isUniqueViolation(err))
|
|
258
|
+
await this.assertUnique(data.name, data.email);
|
|
259
|
+
throw err;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
async updateUser(id, data) {
|
|
263
|
+
const { rowCount } = await this.pool.query(`SELECT 1 FROM ${this.t.users} WHERE "Id" = $1`, [id]);
|
|
264
|
+
if (!rowCount)
|
|
265
|
+
throw new Error(`User with id '${id}' not found`);
|
|
266
|
+
await this.assertUnique(data.name, data.email, id);
|
|
267
|
+
const sets = [];
|
|
268
|
+
const values = [id];
|
|
269
|
+
const set = (column, value) => {
|
|
270
|
+
values.push(value);
|
|
271
|
+
sets.push(`${column} = $${values.length}`);
|
|
272
|
+
};
|
|
273
|
+
if (data.name !== undefined)
|
|
274
|
+
set('"Name"', data.name);
|
|
275
|
+
if (data.email !== undefined)
|
|
276
|
+
set('"Email"', data.email);
|
|
277
|
+
if (data.groups !== undefined)
|
|
278
|
+
set('"Groups"', JSON.stringify(data.groups));
|
|
279
|
+
if (data.disabled !== undefined)
|
|
280
|
+
set('"Disabled"', data.disabled);
|
|
281
|
+
if (data.mustChangePassword !== undefined)
|
|
282
|
+
set('"MustChangePassword"', data.mustChangePassword);
|
|
283
|
+
if (data.homeDir !== undefined)
|
|
284
|
+
set('"HomeDir"', data.homeDir);
|
|
285
|
+
if (data.data !== undefined)
|
|
286
|
+
set('"Data"', JSON.stringify(data.data));
|
|
287
|
+
if (data.lastLoginAt !== undefined)
|
|
288
|
+
set('"LastLoginAt"', data.lastLoginAt);
|
|
289
|
+
set('"UpdatedAt"', Date.now());
|
|
290
|
+
let rows;
|
|
291
|
+
try {
|
|
292
|
+
({ rows } = await this.pool.query(`UPDATE ${this.t.users} SET ${sets.join(', ')} WHERE "Id" = $1 RETURNING "Id" AS id, "Name" AS name, "Email" AS email, "Groups" AS groups, "Disabled" AS disabled, "MustChangePassword" AS must_change_password, "HomeDir" AS home_dir, "Data" AS data, "LastLoginAt" AS last_login_at, "CreatedAt" AS created_at, "UpdatedAt" AS updated_at`, values));
|
|
293
|
+
}
|
|
294
|
+
catch (err) {
|
|
295
|
+
// a concurrent rename or create took the name or email: the same error as the check above
|
|
296
|
+
if (isUniqueViolation(err))
|
|
297
|
+
await this.assertUnique(data.name, data.email, id);
|
|
298
|
+
throw err;
|
|
299
|
+
}
|
|
300
|
+
if (!rows[0])
|
|
301
|
+
throw new Error(`User with id '${id}' not found`);
|
|
302
|
+
return toUser(rows[0]);
|
|
303
|
+
}
|
|
304
|
+
async deleteUser(id) {
|
|
305
|
+
await this.pool.query(`DELETE FROM ${this.t.users} WHERE "Id" = $1`, [id]);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
exports.PostgresUserStore = PostgresUserStore;
|
|
309
|
+
function toUser(row) {
|
|
310
|
+
return {
|
|
311
|
+
id: row.id,
|
|
312
|
+
name: row.name,
|
|
313
|
+
email: row.email,
|
|
314
|
+
groups: [...(row.groups ?? [])],
|
|
315
|
+
disabled: row.disabled,
|
|
316
|
+
mustChangePassword: row.must_change_password,
|
|
317
|
+
...(row.home_dir !== null && row.home_dir !== undefined ? { homeDir: row.home_dir } : {}),
|
|
318
|
+
...(row.data !== null && row.data !== undefined ? { data: row.data } : {}),
|
|
319
|
+
...(row.last_login_at !== null && row.last_login_at !== undefined ? { lastLoginAt: ms(row.last_login_at) } : {}),
|
|
320
|
+
createdAt: ms(row.created_at),
|
|
321
|
+
updatedAt: ms(row.updated_at),
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
/** Groups; names are unique ignoring case and kept as given. */
|
|
325
|
+
class PostgresGroupStore {
|
|
326
|
+
pool;
|
|
327
|
+
t;
|
|
328
|
+
constructor(pool, t) {
|
|
329
|
+
this.pool = pool;
|
|
330
|
+
this.t = t;
|
|
331
|
+
}
|
|
332
|
+
async getGroups() {
|
|
333
|
+
const { rows } = await this.pool.query(`SELECT "Id" AS id, "Name" AS name, "Description" AS description, "Permissions" AS permissions, "BuiltIn" AS built_in, "CreatedAt" AS created_at, "UpdatedAt" AS updated_at FROM ${this.t.groups} ORDER BY "CreatedAt", "Name"`);
|
|
334
|
+
return rows.map(toGroup);
|
|
335
|
+
}
|
|
336
|
+
async getGroup(name) {
|
|
337
|
+
const { rows } = await this.pool.query(`SELECT "Id" AS id, "Name" AS name, "Description" AS description, "Permissions" AS permissions, "BuiltIn" AS built_in, "CreatedAt" AS created_at, "UpdatedAt" AS updated_at FROM ${this.t.groups} WHERE lower("Name") = lower($1)`, [name]);
|
|
338
|
+
return rows[0] ? toGroup(rows[0]) : undefined;
|
|
339
|
+
}
|
|
340
|
+
async createGroup(data) {
|
|
341
|
+
const now = Date.now();
|
|
342
|
+
try {
|
|
343
|
+
const { rows } = await this.pool.query(`INSERT INTO ${this.t.groups} ("Id", "Name", "Description", "Permissions", "BuiltIn", "CreatedAt", "UpdatedAt")
|
|
344
|
+
VALUES ($1, $2, $3, $4, $5, $6, $6) RETURNING "Id" AS id, "Name" AS name, "Description" AS description, "Permissions" AS permissions, "BuiltIn" AS built_in, "CreatedAt" AS created_at, "UpdatedAt" AS updated_at`, [(0, crypto_1.randomUUID)(), data.name, data.description ?? null, JSON.stringify(data.permissions ?? []), data.builtIn ?? false, now]);
|
|
345
|
+
return toGroup(rows[0]);
|
|
346
|
+
}
|
|
347
|
+
catch (err) {
|
|
348
|
+
if (isUniqueViolation(err))
|
|
349
|
+
throw new Error(`Group '${data.name}' already exists`);
|
|
350
|
+
throw err;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
async updateGroup(name, data) {
|
|
354
|
+
const sets = [];
|
|
355
|
+
const values = [name];
|
|
356
|
+
if (data.description !== undefined) {
|
|
357
|
+
values.push(data.description);
|
|
358
|
+
sets.push(`"Description" = $${values.length}`);
|
|
359
|
+
}
|
|
360
|
+
if (data.permissions !== undefined) {
|
|
361
|
+
values.push(JSON.stringify(data.permissions));
|
|
362
|
+
sets.push(`"Permissions" = $${values.length}`);
|
|
363
|
+
}
|
|
364
|
+
values.push(Date.now());
|
|
365
|
+
sets.push(`"UpdatedAt" = $${values.length}`);
|
|
366
|
+
const { rows } = await this.pool.query(`UPDATE ${this.t.groups} SET ${sets.join(', ')} WHERE lower("Name") = lower($1) RETURNING "Id" AS id, "Name" AS name, "Description" AS description, "Permissions" AS permissions, "BuiltIn" AS built_in, "CreatedAt" AS created_at, "UpdatedAt" AS updated_at`, values);
|
|
367
|
+
if (!rows[0])
|
|
368
|
+
throw new Error(`Group '${name}' not found`);
|
|
369
|
+
return toGroup(rows[0]);
|
|
370
|
+
}
|
|
371
|
+
async deleteGroup(name) {
|
|
372
|
+
await this.pool.query(`DELETE FROM ${this.t.groups} WHERE lower("Name") = lower($1)`, [name]);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
exports.PostgresGroupStore = PostgresGroupStore;
|
|
376
|
+
function toGroup(row) {
|
|
377
|
+
return {
|
|
378
|
+
id: row.id,
|
|
379
|
+
name: row.name,
|
|
380
|
+
...(row.description !== null && row.description !== undefined ? { description: row.description } : {}),
|
|
381
|
+
permissions: [...(row.permissions ?? [])],
|
|
382
|
+
builtIn: row.built_in,
|
|
383
|
+
createdAt: ms(row.created_at),
|
|
384
|
+
updatedAt: ms(row.updated_at),
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
/** Password hashes and salts, one row per user. */
|
|
388
|
+
class PostgresCredentialStore {
|
|
389
|
+
pool;
|
|
390
|
+
t;
|
|
391
|
+
constructor(pool, t) {
|
|
392
|
+
this.pool = pool;
|
|
393
|
+
this.t = t;
|
|
394
|
+
}
|
|
395
|
+
async setPassword(userId, hash, salt) {
|
|
396
|
+
await this.pool.query(`INSERT INTO ${this.t.credentials} ("UserId", "PasswordHash", "Salt", "LastChanged") VALUES ($1, $2, $3, $4)
|
|
397
|
+
ON CONFLICT ("UserId") DO UPDATE SET "PasswordHash" = EXCLUDED."PasswordHash", "Salt" = EXCLUDED."Salt", "LastChanged" = EXCLUDED."LastChanged"`, [userId, hash, salt, Date.now()]);
|
|
398
|
+
}
|
|
399
|
+
async getCredentials(userId) {
|
|
400
|
+
const { rows } = await this.pool.query(`SELECT "UserId" AS user_id, "PasswordHash" AS password_hash, "Salt" AS salt, "LastChanged" AS last_changed FROM ${this.t.credentials} WHERE "UserId" = $1`, [userId]);
|
|
401
|
+
const row = rows[0];
|
|
402
|
+
return row ? { userId: row.user_id, passwordHash: row.password_hash, salt: row.salt, lastChanged: ms(row.last_changed) } : undefined;
|
|
403
|
+
}
|
|
404
|
+
async deleteCredentials(userId) {
|
|
405
|
+
await this.pool.query(`DELETE FROM ${this.t.credentials} WHERE "UserId" = $1`, [userId]);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
exports.PostgresCredentialStore = PostgresCredentialStore;
|
|
409
|
+
/** Sessions, keyed by the token's SHA-256 (raw tokens are never stored). */
|
|
410
|
+
class PostgresSessionStore {
|
|
411
|
+
pool;
|
|
412
|
+
t;
|
|
413
|
+
constructor(pool, t) {
|
|
414
|
+
this.pool = pool;
|
|
415
|
+
this.t = t;
|
|
416
|
+
}
|
|
417
|
+
async createSession(userId, tokenHash, metadata) {
|
|
418
|
+
const now = Date.now();
|
|
419
|
+
const { rows } = await this.pool.query(`INSERT INTO ${this.t.sessions} ("TokenHash", "Id", "UserId", "CreatedAt", "LastActivity", "Metadata") VALUES ($1, $2, $3, $4, $4, $5)
|
|
420
|
+
ON CONFLICT ("TokenHash") DO UPDATE SET "Id" = EXCLUDED."Id", "UserId" = EXCLUDED."UserId", "CreatedAt" = EXCLUDED."CreatedAt",
|
|
421
|
+
"LastActivity" = EXCLUDED."LastActivity", "Metadata" = EXCLUDED."Metadata"
|
|
422
|
+
RETURNING "TokenHash" AS token_hash, "Id" AS id, "UserId" AS user_id, "CreatedAt" AS created_at, "LastActivity" AS last_activity, "Metadata" AS metadata`, [tokenHash, (0, crypto_1.randomUUID)(), userId, now, JSON.stringify({ ...metadata })]);
|
|
423
|
+
return toSession(rows[0]);
|
|
424
|
+
}
|
|
425
|
+
async getSession(tokenHash) {
|
|
426
|
+
const { rows } = await this.pool.query(`SELECT "TokenHash" AS token_hash, "Id" AS id, "UserId" AS user_id, "CreatedAt" AS created_at, "LastActivity" AS last_activity, "Metadata" AS metadata FROM ${this.t.sessions} WHERE "TokenHash" = $1`, [tokenHash]);
|
|
427
|
+
return rows[0] ? toSession(rows[0]) : undefined;
|
|
428
|
+
}
|
|
429
|
+
async getSessionById(id) {
|
|
430
|
+
const { rows } = await this.pool.query(`SELECT "TokenHash" AS token_hash, "Id" AS id, "UserId" AS user_id, "CreatedAt" AS created_at, "LastActivity" AS last_activity, "Metadata" AS metadata FROM ${this.t.sessions} WHERE "Id" = $1`, [id]);
|
|
431
|
+
return rows[0] ? toSession(rows[0]) : undefined;
|
|
432
|
+
}
|
|
433
|
+
async getActiveSessions() {
|
|
434
|
+
const { rows } = await this.pool.query(`SELECT "TokenHash" AS token_hash, "Id" AS id, "UserId" AS user_id, "CreatedAt" AS created_at, "LastActivity" AS last_activity, "Metadata" AS metadata FROM ${this.t.sessions} ORDER BY "CreatedAt"`);
|
|
435
|
+
return rows.map(toSession);
|
|
436
|
+
}
|
|
437
|
+
async deleteSession(tokenHash) {
|
|
438
|
+
await this.pool.query(`DELETE FROM ${this.t.sessions} WHERE "TokenHash" = $1`, [tokenHash]);
|
|
439
|
+
}
|
|
440
|
+
async deleteSessionById(id) {
|
|
441
|
+
await this.pool.query(`DELETE FROM ${this.t.sessions} WHERE "Id" = $1`, [id]);
|
|
442
|
+
}
|
|
443
|
+
async deleteUserSessions(userId) {
|
|
444
|
+
await this.pool.query(`DELETE FROM ${this.t.sessions} WHERE "UserId" = $1`, [userId]);
|
|
445
|
+
}
|
|
446
|
+
async updateLastActivity(tokenHash) {
|
|
447
|
+
await this.pool.query(`UPDATE ${this.t.sessions} SET "LastActivity" = $2 WHERE "TokenHash" = $1`, [tokenHash, Date.now()]);
|
|
448
|
+
}
|
|
449
|
+
async cleanup(maxAgeMs) {
|
|
450
|
+
await this.pool.query(`DELETE FROM ${this.t.sessions} WHERE "LastActivity" < $1`, [Date.now() - maxAgeMs]);
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
exports.PostgresSessionStore = PostgresSessionStore;
|
|
454
|
+
function toSession(row) {
|
|
455
|
+
return {
|
|
456
|
+
id: row.id,
|
|
457
|
+
tokenHash: row.token_hash,
|
|
458
|
+
userId: row.user_id,
|
|
459
|
+
createdAt: ms(row.created_at),
|
|
460
|
+
lastActivity: ms(row.last_activity),
|
|
461
|
+
metadata: { ...(row.metadata ?? {}) },
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
/** API tokens, found by the token's SHA-256 (raw tokens are never stored). */
|
|
465
|
+
class PostgresApiTokenStore {
|
|
466
|
+
pool;
|
|
467
|
+
t;
|
|
468
|
+
constructor(pool, t) {
|
|
469
|
+
this.pool = pool;
|
|
470
|
+
this.t = t;
|
|
471
|
+
}
|
|
472
|
+
async createToken(token) {
|
|
473
|
+
const { rows } = await this.pool.query(`INSERT INTO ${this.t.tokens} ("Id", "UserId", "Name", "TokenHash", "CreatedAt", "ExpiresAt", "LastUsedAt", "Audience", "Permissions")
|
|
474
|
+
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)
|
|
475
|
+
ON CONFLICT ("Id") DO UPDATE SET "UserId" = EXCLUDED."UserId", "Name" = EXCLUDED."Name", "TokenHash" = EXCLUDED."TokenHash",
|
|
476
|
+
"CreatedAt" = EXCLUDED."CreatedAt", "ExpiresAt" = EXCLUDED."ExpiresAt", "LastUsedAt" = EXCLUDED."LastUsedAt",
|
|
477
|
+
"Audience" = EXCLUDED."Audience", "Permissions" = EXCLUDED."Permissions"
|
|
478
|
+
RETURNING "Id" AS id, "UserId" AS user_id, "Name" AS name, "TokenHash" AS token_hash, "CreatedAt" AS created_at, "ExpiresAt" AS expires_at, "LastUsedAt" AS last_used_at, "Audience" AS audience, "Permissions" AS permissions`, [
|
|
479
|
+
token.id,
|
|
480
|
+
token.userId,
|
|
481
|
+
token.name,
|
|
482
|
+
token.tokenHash,
|
|
483
|
+
token.createdAt,
|
|
484
|
+
token.expiresAt,
|
|
485
|
+
token.lastUsedAt ?? null,
|
|
486
|
+
token.audience ?? null,
|
|
487
|
+
token.permissions ? JSON.stringify(token.permissions) : null,
|
|
488
|
+
]);
|
|
489
|
+
return toToken(rows[0]);
|
|
490
|
+
}
|
|
491
|
+
async getTokenByHash(tokenHash) {
|
|
492
|
+
const { rows } = await this.pool.query(`SELECT "Id" AS id, "UserId" AS user_id, "Name" AS name, "TokenHash" AS token_hash, "CreatedAt" AS created_at, "ExpiresAt" AS expires_at, "LastUsedAt" AS last_used_at, "Audience" AS audience, "Permissions" AS permissions FROM ${this.t.tokens} WHERE "TokenHash" = $1`, [tokenHash]);
|
|
493
|
+
return rows[0] ? toToken(rows[0]) : undefined;
|
|
494
|
+
}
|
|
495
|
+
async getToken(id) {
|
|
496
|
+
const { rows } = await this.pool.query(`SELECT "Id" AS id, "UserId" AS user_id, "Name" AS name, "TokenHash" AS token_hash, "CreatedAt" AS created_at, "ExpiresAt" AS expires_at, "LastUsedAt" AS last_used_at, "Audience" AS audience, "Permissions" AS permissions FROM ${this.t.tokens} WHERE "Id" = $1`, [id]);
|
|
497
|
+
return rows[0] ? toToken(rows[0]) : undefined;
|
|
498
|
+
}
|
|
499
|
+
async getTokens(userId) {
|
|
500
|
+
const { rows } = userId === undefined
|
|
501
|
+
? await this.pool.query(`SELECT "Id" AS id, "UserId" AS user_id, "Name" AS name, "TokenHash" AS token_hash, "CreatedAt" AS created_at, "ExpiresAt" AS expires_at, "LastUsedAt" AS last_used_at, "Audience" AS audience, "Permissions" AS permissions FROM ${this.t.tokens} ORDER BY "CreatedAt"`)
|
|
502
|
+
: await this.pool.query(`SELECT "Id" AS id, "UserId" AS user_id, "Name" AS name, "TokenHash" AS token_hash, "CreatedAt" AS created_at, "ExpiresAt" AS expires_at, "LastUsedAt" AS last_used_at, "Audience" AS audience, "Permissions" AS permissions FROM ${this.t.tokens} WHERE "UserId" = $1 ORDER BY "CreatedAt"`, [userId]);
|
|
503
|
+
return rows.map(toToken);
|
|
504
|
+
}
|
|
505
|
+
async deleteToken(id) {
|
|
506
|
+
await this.pool.query(`DELETE FROM ${this.t.tokens} WHERE "Id" = $1`, [id]);
|
|
507
|
+
}
|
|
508
|
+
async deleteUserTokens(userId) {
|
|
509
|
+
await this.pool.query(`DELETE FROM ${this.t.tokens} WHERE "UserId" = $1`, [userId]);
|
|
510
|
+
}
|
|
511
|
+
async updateLastUsed(id, lastUsedAt) {
|
|
512
|
+
await this.pool.query(`UPDATE ${this.t.tokens} SET "LastUsedAt" = $2 WHERE "Id" = $1`, [id, lastUsedAt]);
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
exports.PostgresApiTokenStore = PostgresApiTokenStore;
|
|
516
|
+
function toToken(row) {
|
|
517
|
+
return {
|
|
518
|
+
id: row.id,
|
|
519
|
+
userId: row.user_id,
|
|
520
|
+
name: row.name,
|
|
521
|
+
tokenHash: row.token_hash,
|
|
522
|
+
createdAt: ms(row.created_at),
|
|
523
|
+
expiresAt: optionalMs(row.expires_at) ?? null,
|
|
524
|
+
...(row.last_used_at !== null && row.last_used_at !== undefined ? { lastUsedAt: ms(row.last_used_at) } : {}),
|
|
525
|
+
...(row.audience !== null && row.audience !== undefined ? { audience: row.audience } : {}),
|
|
526
|
+
...(row.permissions !== null && row.permissions !== undefined ? { permissions: [...row.permissions] } : {}),
|
|
527
|
+
};
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* The audit log. Unlike the in-memory store it keeps every entry: bound it with
|
|
531
|
+
* `pruneAudit(store, before)` on a schedule (e.g. a jobs-plugin job).
|
|
532
|
+
*/
|
|
533
|
+
class PostgresAuditStore {
|
|
534
|
+
pool;
|
|
535
|
+
t;
|
|
536
|
+
constructor(pool, t) {
|
|
537
|
+
this.pool = pool;
|
|
538
|
+
this.t = t;
|
|
539
|
+
}
|
|
540
|
+
async log(entry) {
|
|
541
|
+
const stored = { ...entry, id: entry.id ?? (0, crypto_1.randomUUID)(), timestamp: entry.timestamp ?? Date.now() };
|
|
542
|
+
await this.pool.query(`INSERT INTO ${this.t.audit} ("Id", "Timestamp", "Event", "Username", "Actor", "Entry") VALUES ($1, $2, $3, $4, $5, $6)`, [
|
|
543
|
+
stored.id,
|
|
544
|
+
stored.timestamp,
|
|
545
|
+
stored.event,
|
|
546
|
+
stored.username ?? null,
|
|
547
|
+
stored.actor ?? null,
|
|
548
|
+
JSON.stringify(stored),
|
|
549
|
+
]);
|
|
550
|
+
}
|
|
551
|
+
async getEntries(options) {
|
|
552
|
+
const where = [];
|
|
553
|
+
const values = [];
|
|
554
|
+
const add = (sql, value) => {
|
|
555
|
+
values.push(value);
|
|
556
|
+
where.push(sql.replace('?', `$${values.length}`));
|
|
557
|
+
};
|
|
558
|
+
if (options?.event)
|
|
559
|
+
add('lower("Event") = lower(?)', options.event);
|
|
560
|
+
if (options?.username)
|
|
561
|
+
add('lower("Username") = lower(?)', options.username);
|
|
562
|
+
if (options?.actor)
|
|
563
|
+
add('lower("Actor") = lower(?)', options.actor);
|
|
564
|
+
if (options?.from)
|
|
565
|
+
add('"Timestamp" >= ?', options.from.getTime());
|
|
566
|
+
if (options?.to)
|
|
567
|
+
add('"Timestamp" < ?', options.to.getTime());
|
|
568
|
+
let sql = `SELECT "Entry" AS entry FROM ${this.t.audit}${where.length ? ` WHERE ${where.join(' AND ')}` : ''} ORDER BY "Seq" DESC`;
|
|
569
|
+
if (options?.limit !== undefined && options.limit > 0) {
|
|
570
|
+
values.push(options.limit);
|
|
571
|
+
sql += ` LIMIT $${values.length}`;
|
|
572
|
+
}
|
|
573
|
+
if (options?.offset !== undefined && options.offset > 0) {
|
|
574
|
+
values.push(options.offset);
|
|
575
|
+
sql += ` OFFSET $${values.length}`;
|
|
576
|
+
}
|
|
577
|
+
const { rows } = await this.pool.query(sql, values);
|
|
578
|
+
return rows.map((r) => r.entry);
|
|
579
|
+
}
|
|
580
|
+
async prune(before) {
|
|
581
|
+
const { rowCount } = await this.pool.query(`DELETE FROM ${this.t.audit} WHERE "Timestamp" < $1`, [before.getTime()]);
|
|
582
|
+
return rowCount ?? 0;
|
|
583
|
+
}
|
|
584
|
+
async clear() {
|
|
585
|
+
await this.pool.query(`DELETE FROM ${this.t.audit}`);
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
exports.PostgresAuditStore = PostgresAuditStore;
|
|
589
|
+
//# sourceMappingURL=postgres-users-stores.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgres-users-stores.js","sourceRoot":"","sources":["../postgres-users-stores.ts"],"names":[],"mappings":";;;AA4OA,8DAwBC;AApQD,mCAAoC;AACpC,2BAAsC;AACtC,8EAAyJ;AACzJ,sFAU8C;AA+C9C,sFAAsF;AACtF,MAAM,EAAE,GAAG,CAAC,KAAc,EAAU,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACrD,MAAM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C,IAAI,CAAC,KAAK,CAAC,eAAe,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;IACzD,CAAC;CACJ;AAnDD,gDAmDC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/@types/node/web-globals/events.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/undici-types/retry-handler.d.ts","../../../node_modules/undici-types/retry-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/util.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/eventsource.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/@types/node/web-globals/navigator.d.ts","../../../node_modules/@types/node/web-globals/storage.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/sea.d.ts","../../../node_modules/@types/node/sqlite.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/pg-types/index.d.ts","../../../node_modules/pg-protocol/dist/messages.d.ts","../../../node_modules/pg-protocol/dist/serializer.d.ts","../../../node_modules/pg-protocol/dist/parser.d.ts","../../../node_modules/pg-protocol/dist/index.d.ts","../../../node_modules/@types/pg/lib/type-overrides.d.ts","../../../node_modules/@types/pg/index.d.ts","../../../packages/abstractions/dist/cli-command-author.d.ts","../../../packages/abstractions/dist/cli-process-command.d.ts","../../../packages/abstractions/dist/shell-words.d.ts","../../../packages/abstractions/dist/cli-command-parameter-descriptor.d.ts","../../../packages/abstractions/dist/cli-structured-response.d.ts","../../../packages/abstractions/dist/cli-command-processor.d.ts","../../../packages/abstractions/dist/cli-module.d.ts","../../../packages/abstractions/dist/cli-paging.d.ts","../../../packages/abstractions/dist/jobs/cli-job-logger.d.ts","../../../packages/abstractions/dist/jobs/cli-job-execution-context.d.ts","../../../packages/abstractions/dist/jobs/cli-job.d.ts","../../../packages/abstractions/dist/jobs/job-history-retention.d.ts","../../../packages/abstractions/dist/jobs/cli-job-options.d.ts","../../../packages/abstractions/dist/jobs/log-entry.d.ts","../../../packages/abstractions/dist/jobs/job-execution.d.ts","../../../packages/abstractions/dist/jobs/job-execution-query.d.ts","../../../packages/abstractions/dist/jobs/job-execution-summary.d.ts","../../../packages/abstractions/dist/jobs/job-state.d.ts","../../../packages/abstractions/dist/jobs/cli-job-storage-provider.d.ts","../../../packages/abstractions/dist/jobs/index.d.ts","../../../packages/abstractions/dist/data-explorer-types.d.ts","../../../packages/abstractions/dist/data-explorer-provider.d.ts","../../../packages/abstractions/dist/cli-processor-filter.d.ts","../../../packages/abstractions/dist/cli-stream-command-processor.d.ts","../../../packages/abstractions/dist/installed-plugin.d.ts","../../../packages/abstractions/dist/audit/audit-entry.d.ts","../../../packages/abstractions/dist/audit/audit-query-options.d.ts","../../../packages/abstractions/dist/audit/audit-store.d.ts","../../../packages/abstractions/dist/audit/index.d.ts","../../../packages/abstractions/dist/events/cli-event.d.ts","../../../packages/abstractions/dist/events/index.d.ts","../../../packages/abstractions/dist/dashboard-extension.d.ts","../../../packages/abstractions/dist/dashboard-module.d.ts","../../../packages/abstractions/dist/table-names.d.ts","../../../packages/abstractions/dist/cli-caller.d.ts","../../../packages/abstractions/dist/index.d.ts","../../../node_modules/@types/send/index.d.ts","../../../node_modules/@types/qs/index.d.ts","../../../node_modules/@types/range-parser/index.d.ts","../../../node_modules/@types/express-serve-static-core/index.d.ts","../../../node_modules/@types/http-errors/index.d.ts","../../../node_modules/@types/mime/index.d.ts","../../../node_modules/@types/serve-static/node_modules/@types/send/index.d.ts","../../../node_modules/@types/serve-static/index.d.ts","../../../node_modules/@types/connect/index.d.ts","../../../node_modules/@types/body-parser/index.d.ts","../../../node_modules/@types/express/index.d.ts","../../databases/dist/connection.d.ts","../../databases/dist/dialects.d.ts","../../databases/dist/sources.d.ts","../../databases/dist/runner.d.ts","../../databases/dist/stats.d.ts","../../databases/dist/databases.d.ts","../../databases/dist/mcp.d.ts","../../databases/dist/builder.d.ts","../../databases/dist/controller.d.ts","../../databases/dist/commands.d.ts","../../databases/dist/dashboard-page.d.ts","../../databases/dist/package-info.d.ts","../../databases/dist/index.d.ts","../../users/dist/stores/interfaces.d.ts","../../users/dist/models.d.ts","../../users/dist/errors.d.ts","../../users/dist/services/auth-service.d.ts","../../users/dist/services/permission-validation.d.ts","../../users/dist/services/directory-service.d.ts","../../users/dist/services/api-token-manager.d.ts","../../users/dist/middleware/auth-middleware.d.ts","../../users/dist/server-auth.d.ts","../../users/dist/package-info.d.ts","../../users/dist/cli-users-builder.d.ts","../../users/dist/security.d.ts","../../users/dist/stores/in-memory-api-token-store.d.ts","../../users/dist/stores/in-memory-user-store.d.ts","../../users/dist/stores/in-memory-session-store.d.ts","../../users/dist/stores/in-memory-credential-store.d.ts","../../users/dist/stores/in-memory-group-store.d.ts","../../users/dist/services/password-hasher.d.ts","../../users/dist/permissions.d.ts","../../users/dist/controllers/permissions-controller.d.ts","../../users/dist/dashboard-page.d.ts","../../users/dist/index.d.ts","../postgres-users-stores.ts","../index.ts","../../../node_modules/@types/better-sqlite3/index.d.ts","../../../node_modules/@types/deep-eql/index.d.ts","../../../node_modules/assertion-error/index.d.ts","../../../node_modules/@types/chai/index.d.ts","../../../node_modules/@types/command-line-args/index.d.ts","../../../node_modules/@types/command-line-usage/index.d.ts","../../../node_modules/@types/cookiejar/index.d.ts","../../../node_modules/@types/cors/index.d.ts","../../../node_modules/@types/estree/index.d.ts","../../../node_modules/@types/methods/index.d.ts","../../../node_modules/@azure/abort-controller/dist/commonjs/AbortError.d.ts","../../../node_modules/@azure/abort-controller/dist/commonjs/AbortSignalLike.d.ts","../../../node_modules/@azure/abort-controller/dist/commonjs/index.d.ts","../../../node_modules/@azure/core-util/dist/commonjs/aborterUtils.d.ts","../../../node_modules/@azure/core-util/dist/commonjs/createAbortablePromise.d.ts","../../../node_modules/@azure/core-util/dist/commonjs/delay.d.ts","../../../node_modules/@azure/core-util/dist/commonjs/error.d.ts","../../../node_modules/@azure/core-util/dist/commonjs/typeGuards.d.ts","../../../node_modules/@azure/core-util/dist/commonjs/index.d.ts","../../../node_modules/@azure/core-auth/dist/commonjs/keyCredential.d.ts","../../../node_modules/@azure/core-auth/dist/commonjs/azureKeyCredential.d.ts","../../../node_modules/@azure/core-auth/dist/commonjs/azureNamedKeyCredential.d.ts","../../../node_modules/@azure/core-auth/dist/commonjs/azureSASCredential.d.ts","../../../node_modules/@azure/core-auth/dist/commonjs/tracing.d.ts","../../../node_modules/@azure/core-auth/dist/commonjs/tokenCredential.d.ts","../../../node_modules/@azure/core-auth/dist/commonjs/index.d.ts","../../../node_modules/tedious/lib/packet.d.ts","../../../node_modules/tedious/lib/collation.d.ts","../../../node_modules/tedious/lib/token/colmetadata-token-parser.d.ts","../../../node_modules/tedious/lib/token/stream-parser.d.ts","../../../node_modules/tedious/lib/always-encrypted/cek-entry.d.ts","../../../node_modules/tedious/lib/always-encrypted/types.d.ts","../../../node_modules/tedious/lib/data-type.d.ts","../../../node_modules/tedious/lib/token/helpers.d.ts","../../../node_modules/tedious/lib/metadata-parser.d.ts","../../../node_modules/tedious/lib/request.d.ts","../../../node_modules/tedious/lib/errors.d.ts","../../../node_modules/tedious/lib/token/handler.d.ts","../../../node_modules/tedious/lib/token/token.d.ts","../../../node_modules/tedious/lib/debug.d.ts","../../../node_modules/tedious/lib/transient-error-lookup.d.ts","../../../node_modules/tedious/lib/message.d.ts","../../../node_modules/tedious/lib/outgoing-message-stream.d.ts","../../../node_modules/tedious/lib/message-io.d.ts","../../../node_modules/tedious/lib/token/token-stream-parser.d.ts","../../../node_modules/tedious/lib/transaction.d.ts","../../../node_modules/tedious/lib/always-encrypted/keystore-provider-azure-key-vault.d.ts","../../../node_modules/tedious/lib/connection.d.ts","../../../node_modules/tedious/lib/bulk-load.d.ts","../../../node_modules/tedious/lib/tds-versions.d.ts","../../../node_modules/tedious/lib/tedious.d.ts","../../../node_modules/tarn/dist/PromiseInspection.d.ts","../../../node_modules/tarn/dist/utils.d.ts","../../../node_modules/tarn/dist/PendingOperation.d.ts","../../../node_modules/tarn/dist/Resource.d.ts","../../../node_modules/tarn/dist/Pool.d.ts","../../../node_modules/tarn/dist/TimeoutError.d.ts","../../../node_modules/tarn/dist/tarn.d.ts","../../../node_modules/@types/mssql/index.d.ts","../../../node_modules/@types/multer/index.d.ts","../../../node_modules/@types/readable-stream/index.d.ts","../../../node_modules/@types/superagent/lib/agent-base.d.ts","../../../node_modules/@types/superagent/lib/node/response.d.ts","../../../node_modules/@types/superagent/types.d.ts","../../../node_modules/@types/superagent/lib/node/agent.d.ts","../../../node_modules/@types/superagent/lib/request-base.d.ts","../../../node_modules/form-data/index.d.ts","../../../node_modules/@types/superagent/lib/node/http2wrapper.d.ts","../../../node_modules/@types/superagent/lib/node/index.d.ts","../../../node_modules/@types/superagent/index.d.ts","../../../node_modules/@types/supertest/types.d.ts","../../../node_modules/@types/supertest/lib/agent.d.ts","../../../node_modules/@types/supertest/lib/test.d.ts","../../../node_modules/@types/supertest/lib/cookies.d.ts","../../../node_modules/@types/supertest/index.d.ts","../../../node_modules/@types/webidl-conversions/index.d.ts","../../../node_modules/@types/whatwg-url/index.d.ts","../../../node_modules/@types/ws/index.d.ts"],"fileIdsList":[[63,111,128,129],[63,111,128,129,263,264],[63,111,128,129,272],[63,111,128,129,271,272,273,274,275,276,277],[63,111,128,129,265,271,276],[63,111,128,129,265],[63,111,128,129,266],[63,111,128,129,266,267,268,269,270],[63,111,128,129,161],[63,111,125,128,129,161,213],[63,111,128,129,254,255],[63,111,125,128,129,161],[63,111,122,125,128,129,161,205,206,207],[63,111,128,129,206,208,212,214],[63,111,122,128,129,143,161,303,308,310],[63,111,128,129,143,215],[63,108,109,111,128,129],[63,110,111,128,129],[111,128,129],[63,111,116,128,129,146],[63,111,112,117,122,128,129,131,143,154],[63,111,112,113,122,128,129,131],[58,59,60,63,111,128,129],[63,111,114,128,129,155],[63,111,115,116,123,128,129,132],[63,111,116,128,129,143,151],[63,111,117,119,122,128,129,131],[63,110,111,118,128,129],[63,111,119,120,128,129],[63,111,121,122,128,129],[63,110,111,122,128,129],[63,111,122,123,124,128,129,143,154],[63,111,122,123,124,128,129,138,143,146],[63,104,111,119,122,125,128,129,131,143,154],[63,111,122,123,125,126,128,129,131,143,151,154],[63,111,125,127,128,129,143,151,154],[61,62,63,64,65,66,67,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160],[63,111,122,128,129],[63,111,128,129,130,154],[63,111,119,122,128,129,131,143],[63,111,128,129,132],[63,111,128,129,133],[63,110,111,128,129,134],[63,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160],[63,111,128,129,136],[63,111,128,129,137],[63,111,122,128,129,138,139],[63,111,128,129,138,140,155,157],[63,111,123,128,129],[63,111,122,128,129,143,144,146],[63,111,128,129,145,146],[63,111,128,129,143,144],[63,111,128,129,146],[63,111,128,129,147],[63,108,111,128,129,143,148,154],[63,111,122,128,129,149,150],[63,111,128,129,149,150],[63,111,116,128,129,131,143,151],[63,111,128,129,152],[63,111,128,129,131,153],[63,111,125,128,129,137,154],[63,111,116,128,129,155],[63,111,128,129,143,156],[63,111,128,129,130,157],[63,111,128,129,158],[63,104,111,128,129],[63,104,111,122,124,128,129,134,143,146,154,156,157,159],[63,111,128,129,143,160],[63,111,122,128,129,143,151,161,162,163,166,167,168],[63,111,128,129,168],[63,111,128,129,143,161],[63,111,123,128,129,143,161],[63,111,125,128,129,161,209,211],[63,111,123,128,129,143,161,210],[63,111,128,129,321],[63,111,128,129,259,262,314,316,322],[63,111,126,128,129,131,143,151,161],[63,111,123,125,126,127,128,129,131,143,262,315,316,317,318,319,320],[63,111,125,128,129,143,321],[63,111,123,128,129,315,316],[63,111,128,129,154,315],[63,111,128,129,322,323,324,325,326],[63,111,128,129,322,323,327],[63,111,128,129,322,323],[63,111,125,126,128,129,131,262,322],[63,111,122,125,127,128,129,131,143,151,154,160,161],[63,111,125,128,129,143,161],[63,111,128,129,161,163,164,165],[63,111,128,129,143,161,163],[63,111,128,129,305],[63,111,122,128,129,161,304,306,307],[63,111,128,129,308,309],[63,111,128,129,304],[63,111,128,129,284],[63,111,128,129,283,287],[63,111,122,128,129,143,280,285,300],[63,111,122,128,129,131,151,278,280,287,288,289,290,291,292,293,294,296,297,298,299,301],[63,111,128,129,280,284,300],[63,111,122,128,129,279,291],[63,111,122,128,129,131,143,151,292,294,295],[63,111,128,129,143],[63,111,128,129,280,282,284,285,286],[63,111,128,129,143,292,294],[63,111,122,128,129,280,281,284,285,287,300],[63,111,128,129,285,288,289,298,300,301,302],[63,111,128,129,282,287,291],[63,111,128,129,288,289,291,300,301],[63,111,128,129,281,291,292,300],[63,111,122,128,129,143,282,290,292,294],[63,111,128,129,280,281,287,290],[63,76,80,111,128,129,154],[63,76,111,128,129,143,154],[63,71,111,128,129],[63,73,76,111,128,129,151,154],[63,111,128,129,131,151],[63,71,111,128,129,161],[63,73,76,111,128,129,131,154],[63,68,69,72,75,111,122,128,129,143,154],[63,76,83,111,128,129],[63,68,74,111,128,129],[63,76,97,98,111,128,129],[63,72,76,111,128,129,146,154,161],[63,97,111,128,129,161],[63,70,71,111,128,129,161],[63,76,111,128,129],[63,70,71,72,73,74,75,76,77,78,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,98,99,100,101,102,103,111,128,129],[63,76,91,111,128,129],[63,76,83,84,111,128,129],[63,74,76,84,85,111,128,129],[63,75,111,128,129],[63,68,71,76,111,128,129],[63,76,80,84,85,111,128,129],[63,80,111,128,129],[63,74,76,79,111,128,129,154],[63,68,73,76,83,111,128,129],[63,71,76,97,111,128,129,159,161],[63,111,128,129,194,195],[63,111,128,129,194,195,196],[63,111,128,129,169,170,172,173],[63,111,128,129,169,174],[63,111,128,129,170,172],[63,111,128,129,174],[63,111,128,129,170,173],[63,111,125,128,129,200],[63,111,128,129,189],[63,111,128,129,198],[63,111,128,129,169,170,171,172,173,174,175,176,188,189,190,191,192,193,197,199,200,201,202,203],[63,111,128,129,177],[63,111,128,129,180],[63,111,128,129,180,183,184,185,186],[63,111,128,129,178],[63,111,128,129,177,178,179,180,181,182,183,184,185,186,187],[63,111,128,129,183],[63,111,128,129,182],[63,111,128,129,170],[63,111,128,129,204,215,218,219,221,222],[63,111,128,129,204,221],[63,111,128,129,215,221],[63,111,128,129,204],[63,111,128,129,204,219,220],[63,111,128,129,216],[63,111,128,129,216,217,218,219,220,221,222,223,224,225,226,227],[63,111,128,129,221],[63,111,128,129,204,216,217,218],[63,111,128,129,251],[63,111,116,128,129,168,204,228,250],[63,111,128,129,204,215,229,230,232,234,235,237,238],[63,111,128,129,215,232],[63,111,128,129,215],[63,111,128,129,229,230,231,232,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249],[63,111,128,129,215,230,232],[63,111,128,129,215,229],[63,111,128,129,230],[63,111,125,128,129,204,215,230,232,236],[63,111,128,129,229,230,232],[63,111,125,128,129,204,215,229,230,231],[63,111,128,129,229,230,232,233],[63,111,128,129,229,230]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"6c7176368037af28cb72f2392010fa1cef295d6d6744bca8cfb54985f3a18c3e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"437e20f2ba32abaeb7985e0afe0002de1917bc74e949ba585e49feba65da6ca1","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"98cffbf06d6bab333473c70a893770dbe990783904002c4f1a960447b4b53dca","affectsGlobalScope":true,"impliedFormat":1},{"version":"3af97acf03cc97de58a3a4bc91f8f616408099bc4233f6d0852e72a8ffb91ac9","affectsGlobalScope":true,"impliedFormat":1},{"version":"808069bba06b6768b62fd22429b53362e7af342da4a236ed2d2e1c89fcca3b4a","affectsGlobalScope":true,"impliedFormat":1},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"f26b11d8d8e4b8028f1c7d618b22274c892e4b0ef5b3678a8ccbad85419aef43","affectsGlobalScope":true,"impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"b52476feb4a0cbcb25e5931b930fc73cb6643fb1a5060bf8a3dda0eeae5b4b68","affectsGlobalScope":true,"impliedFormat":1},{"version":"f9501cc13ce624c72b61f12b3963e84fad210fbdf0ffbc4590e08460a3f04eba","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0fa06ada475b910e2106c98c68b10483dc8811d0c14a8a8dd36efb2672485b29","impliedFormat":1},{"version":"33e5e9aba62c3193d10d1d33ae1fa75c46a1171cf76fef750777377d53b0303f","impliedFormat":1},{"version":"2b06b93fd01bcd49d1a6bd1f9b65ddcae6480b9a86e9061634d6f8e354c1468f","impliedFormat":1},{"version":"6a0cd27e5dc2cfbe039e731cf879d12b0e2dded06d1b1dedad07f7712de0d7f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"13f5c844119c43e51ce777c509267f14d6aaf31eafb2c2b002ca35584cd13b29","impliedFormat":1},{"version":"e60477649d6ad21542bd2dc7e3d9ff6853d0797ba9f689ba2f6653818999c264","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4c829ab315f57c5442c6667b53769975acbf92003a66aef19bce151987675bd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"b2ade7657e2db96d18315694789eff2ddd3d8aea7215b181f8a0b303277cc579","impliedFormat":1},{"version":"9855e02d837744303391e5623a531734443a5f8e6e8755e018c41d63ad797db2","impliedFormat":1},{"version":"4d631b81fa2f07a0e63a9a143d6a82c25c5f051298651a9b69176ba28930756d","impliedFormat":1},{"version":"836a356aae992ff3c28a0212e3eabcb76dd4b0cc06bcb9607aeef560661b860d","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"41670ee38943d9cbb4924e436f56fc19ee94232bc96108562de1a734af20dc2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c906fb15bd2aabc9ed1e3f44eb6a8661199d6c320b3aa196b826121552cb3695","impliedFormat":1},{"version":"22295e8103f1d6d8ea4b5d6211e43421fe4564e34d0dd8e09e520e452d89e659","impliedFormat":1},{"version":"f949f7f6c7802a338039cfc2156d1fe285cdd1e092c64437ebe15ae8edc854e0","impliedFormat":1},{"version":"6b4e081d55ac24fc8a4631d5dd77fe249fa25900abd7d046abb87d90e3b45645","impliedFormat":1},{"version":"a10f0e1854f3316d7ee437b79649e5a6ae3ae14ffe6322b02d4987071a95362e","impliedFormat":1},{"version":"e208f73ef6a980104304b0d2ca5f6bf1b85de6009d2c7e404028b875020fa8f2","impliedFormat":1},{"version":"d163b6bc2372b4f07260747cbc6c0a6405ab3fbcea3852305e98ac43ca59f5bc","impliedFormat":1},{"version":"e6fa9ad47c5f71ff733744a029d1dc472c618de53804eae08ffc243b936f87ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"83e63d6ccf8ec004a3bb6d58b9bb0104f60e002754b1e968024b320730cc5311","impliedFormat":1},{"version":"24826ed94a78d5c64bd857570fdbd96229ad41b5cb654c08d75a9845e3ab7dde","impliedFormat":1},{"version":"8b479a130ccb62e98f11f136d3ac80f2984fdc07616516d29881f3061f2dd472","impliedFormat":1},{"version":"928af3d90454bf656a52a48679f199f64c1435247d6189d1caf4c68f2eaf921f","affectsGlobalScope":true,"impliedFormat":1},{"version":"bceb58df66ab8fb00170df20cd813978c5ab84be1d285710c4eb005d8e9d8efb","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"933921f0bb0ec12ef45d1062a1fc0f27635318f4d294e4d99de9a5493e618ca2","impliedFormat":1},{"version":"71a0f3ad612c123b57239a7749770017ecfe6b66411488000aba83e4546fde25","impliedFormat":1},{"version":"77fbe5eecb6fac4b6242bbf6eebfc43e98ce5ccba8fa44e0ef6a95c945ff4d98","impliedFormat":1},{"version":"4f9d8ca0c417b67b69eeb54c7ca1bedd7b56034bb9bfd27c5d4f3bc4692daca7","impliedFormat":1},{"version":"814118df420c4e38fe5ae1b9a3bafb6e9c2aa40838e528cde908381867be6466","impliedFormat":1},{"version":"a3fc63c0d7b031693f665f5494412ba4b551fe644ededccc0ab5922401079c95","impliedFormat":1},{"version":"f27524f4bef4b6519c604bdb23bf4465bddcccbf3f003abb901acbd0d7404d99","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"6b039f55681caaf111d5eb84d292b9bee9e0131d0db1ad0871eef0964f533c73","affectsGlobalScope":true,"impliedFormat":1},{"version":"18fd40412d102c5564136f29735e5d1c3b455b8a37f920da79561f1fde068208","impliedFormat":1},{"version":"c8d3e5a18ba35629954e48c4cc8f11dc88224650067a172685c736b27a34a4dc","impliedFormat":1},{"version":"f0be1b8078cd549d91f37c30c222c2a187ac1cf981d994fb476a1adc61387b14","affectsGlobalScope":true,"impliedFormat":1},{"version":"0aaed1d72199b01234152f7a60046bc947f1f37d78d182e9ae09c4289e06a592","impliedFormat":1},{"version":"2b55d426ff2b9087485e52ac4bc7cfafe1dc420fc76dad926cd46526567c501a","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"5b7aa3c4c1a5d81b411e8cb302b45507fea9358d3569196b27eb1a27ae3a90ef","affectsGlobalScope":true,"impliedFormat":1},{"version":"5987a903da92c7462e0b35704ce7da94d7fdc4b89a984871c0e2b87a8aae9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea08a0345023ade2b47fbff5a76d0d0ed8bff10bc9d22b83f40858a8e941501c","impliedFormat":1},{"version":"47613031a5a31510831304405af561b0ffaedb734437c595256bb61a90f9311b","impliedFormat":1},{"version":"ae062ce7d9510060c5d7e7952ae379224fb3f8f2dd74e88959878af2057c143b","impliedFormat":1},{"version":"8a1a0d0a4a06a8d278947fcb66bf684f117bf147f89b06e50662d79a53be3e9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"9f663c2f91127ef7024e8ca4b3b4383ff2770e5f826696005de382282794b127","impliedFormat":1},{"version":"9f55299850d4f0921e79b6bf344b47c420ce0f507b9dcf593e532b09ea7eeea1","impliedFormat":1},{"version":"f60e3e3060207ac982da13363181fd7ee4beecc19a7c569f0d6bb034331066c2","impliedFormat":1},{"version":"17230b34bb564a3a2e36f9d3985372ccab4ad1722df2c43f7c5c2b553f68e5db","impliedFormat":1},{"version":"6e5c9272f6b3783be7bdddaf207cccdb8e033be3d14c5beacc03ae9d27d50929","impliedFormat":1},{"version":"21ac4cf3f8d8c6e1201cb31f600be708c9a37867fc5c73b7ccf80560fae591c8","impliedFormat":1},{"version":"0dfe35191a04e8f9dc7caeb9f52f2ee07402736563d12cbccd15fb5f31ac877f","impliedFormat":1},{"version":"798367363a3274220cbed839b883fe2f52ba7197b25e8cb2ac59c1e1fd8af6b7","impliedFormat":1},{"version":"2636a309ed87d6876728d9aca846a76b372cf2a21a4fdf9940a82a2dd86687d0","impliedFormat":1},"704f159f3d6c71a1fe731c8f10eba2c18a18eb522e4b6442f6892bf33123c717","eeecbf64223a0da418b5982f42dfe5c15e2ef2c5172b126bb70b914b91afa4c0","acac004ac7eedba2fe27c095c0bf1ee8d7ae3414815ee67254f2286674105899","c40739dba4a75717e573e5dacebbadf676423c5f815c8de6c208a86eda1889cd","fb00ff708a8f7251f660924bb94098c1f23210fb71ae856d01391621f9ddc0d8","ff0d9900338bdd58a2bc23142d868c315f4a15ef3f9c1e454496d748d0d7b131","7e8d985870f4a63701fdc93f953703fa0d44a6ddbbd7eb5e160705e65579403e","dbec65c8a42afdfc8fb11379d5d00df49259a8838e07c4a6494b2d6b9a23698c","5715a065ec212a11e4ff5026031bbd18c3b5af02c8e35956ba936ba5501c8e58","c273055aff0fc6feb0308eb79b93dd228af5a17466fbca69b0de631da52a7da0","aeb48076e7dbfe19611f34405c973a4d8625a0150607ccbd0d7137abf0cd735e","b3101f888e2d145c0a09b4fa914ebde75e52c274761d43e06c913684067356f5","1983dc3a75eb03cd5f5328f595dd9c7ef27f94a1928292aea5dc123fc085b319","153c29752b148da7ec822b33dafe864cb7c860f3fc309ba7322754626c60c28f","18e7b35694edcfd9a687162c9cda1a40a5dfcab92c5d747aa04d7098a69cd2f5","42a49f18a231de72c00cf50b187045e3013d3a05a993caf04f37e331c066bf0a","16c2d09d473c998dfca61a89993dd97cb96762443c93282f3d5d8f527ae7b2bf","5b6dd1b95e7c8f98203581d7acc0bd0a969e97eedac821bf65f2bf34743ebe96","dc4f5ef4b2c83394f11a548a8b23f074650b622f55cc165b291b513b9c77b740","0e5b3775c384b9d2fd0d95090cae649f22324cc26d827245ebe4743cbfa0d86f","3cd1c1c04b82a4462a271eb648f56c5868a52462a6dfeb81b8fedce14569281e","8ffeec7a1ef4b58b051615f2ca9ef7732e8406ed30e07de1a9e10eebc3107dae","dc8c1e89f05915c200dc2f523a6910c96dad06040c932934a0acf2030ff772b1","5652f9e97fdfff4ad3d832528940ecfdcc38ea0390b8b14fa0a998e38b89421b","ef149415e8010d4af9d1e110aafc2f221bf167c02f185ae499d332227bc40659","ea5786463f0373d36fe755ea089f7a890bdcc260284df7f3ba3fe9c42dca558d","199a0cb1b3fe619153e346b184f742350239e58c5f864b674874b020be523a91","b5594ab35913d14acc5e6108c3ab9a43949a9722369c5f8623a03c5f1604a401","1ab2fc5334ece9a4887bbe9c9d43f6202cd233b72b886123d9f58ede974aa4fb","4b92991bed1278c6c086a566f2eae7df03a59041d946fa1cb5b62598bae4bdfa","a70a33d77e95bb290efaa10ed35585a2faaf63bac55e4c71ee31f8e4d30ecb14","661df34896cea216f038fb49e59cae44485230e3b44c6d7148eda204e243872f","b74d1b062f334cb35fc1b269dd33519bb838d494a9793ec7f7c1ad9d34b1ef99","9e590636d4ff32bdf42c592230cc356ad145a1442f44e17ef50d83096bac1233","6b41cf9049673c266b7da2c2313dec5890252209e3c7118e069784f5d84ef943","832a2e09b1d7c5903d906ab99ff3a440d74242dda331974aacdca11982dae229",{"version":"d34aa8df2d0b18fb56b1d772ff9b3c7aea7256cf0d692f969be6e1d27b74d660","impliedFormat":1},{"version":"baac9896d29bcc55391d769e408ff400d61273d832dd500f21de766205255acb","impliedFormat":1},{"version":"2f5747b1508ccf83fad0c251ba1e5da2f5a30b78b09ffa1cfaf633045160afed","impliedFormat":1},{"version":"90407bbaa24977b8a6a90861148ac98d8652afe69992a90d823f29e9807fe2d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"b71c603a539078a5e3a039b20f2b0a0d1708967530cf97dec8850a9ca45baa2b","impliedFormat":1},{"version":"d3f2d715f57df3f04bf7b16dde01dec10366f64fce44503c92b8f78f614c1769","impliedFormat":1},{"version":"cb90077223cc1365fa21ef0911a1f9b8f2f878943523d97350dc557973ca3823","impliedFormat":1},{"version":"18f1541b81b80d806120a3489af683edfb811deb91aeca19735d9bb2613e6311","impliedFormat":1},{"version":"104c67f0da1bdf0d94865419247e20eded83ce7f9911a1aa75fc675c077ca66e","impliedFormat":1},{"version":"cc0d0b339f31ce0ab3b7a5b714d8e578ce698f1e13d7f8c60bfb766baeb1d35c","impliedFormat":1},{"version":"232f118ae64ab84dcd26ddb60eaed5a6e44302d36249abf05e9e3fc2cbb701a2","impliedFormat":1},"f24ddc6b244d7fac9d4e73e49fcefdd1b8bdd9beea378b45e6c129f91feb7441","f939b71a9ad8faea4369cf65c0946976e40301b9b251ac72fcef77ac42b18049","496a4ba2120c8d7052d9b7b1effcbcafc1ad8760bce19ff1e643f342a04a83cd","e0060513c54c77e142343ae67e0eb85cc3f829e0ce9c1ce05cfe240457bee7ae","cb5c1bc370b6aa6e79ad756effd6e3fbef23d46b37ff66ccec1a6e234bca91a0","673525a4b565ec0b7ed877ebdf7294284bcac8deb27c1e641111e7ab6cd20ff7","413bad7bccd602f3b74fdc16190fdcda66e5c2e84892f1ffc73887231effc234","94a02d1c6f76fdf3b8ef9fc1985e9f70c85ba75f5194d24e6949b5768aeec4dc","d20b2ee5e8cb6c56c67652bde34809807c77e7a428f2ba341f0363a7af965a6a","1d14eb57e6a3542700c14702408e096f82a3aec4740a0cbf882398c010fddad1","4b17e5251a903d596e8a6419b8f94538fdf2b1c088e4006eadf9b002f307c993","bfd7df2013a61b4f71c10b426bd4fa7c7b1a90167616404c1b36772da6115bc6","1aa57c82af4f13786eb6a5c7a15b9c4f4fbf74c0b56da5dd7099360a37fc3b0f","fa0ccbba2e5865c5c1a37cb4d21c6218315c4a8f2da77b75caae2f8211d9dca2","63559d5444029f1f97796846e6a10445b7aece7f2cc353f22615cda0407c8b30","6e5bf06f4227b7f803c5c831b823483bdbbb77e41eac199246ec501f2c027ded","b0eec35093efc95c957dd60eea71a68fc7d6e766aa511068432e9e355d7b7b16","51ff73aca5d9a6d50546d26f617e4ef598d64ab52c14ac95d7112fec170a4d8e","d1f5a198c30c68abf4295be80404fefcf0fb16588019f171ec2b69104a750736","c6496260ed8fa7e48a59cde1bea68d191e326b11601b76a78f5869d9bfa38abf",{"version":"07387aad054cda97e2009da452b916e866a309d0854495df5e277bc4eeab9673","affectsGlobalScope":true},"39748a2bd6f422d840b6311f7396b6e03ec4f88c2ad9cf723598d2d042c2492e","f62612b4349b063387032acf8508c3ebffca90c088b5285e3f26efdc910a4523","078cbd13d341f09f1a0f63c6f032378dbc14238789f9fcf96fc9c2a4790e6fb1","7930a380dcfc6004f8cb664be5eb0cf4b9e2f7b4e20a1ea0181d104879ff38ff","7e5946d32987408de5383227ae2a69ad81fcc17fd9adec89af9bbd1260c303b6","7dba650d912fd21a83bf9d86ee9cc86cd59213906f9547c4cbdb66b31612a3e9","e621811ae7bd2c9890b7c6b554d8a60d8b3c04d5f082d264cdfb37198312f698","e3c5c409e7129610113dbbb5015eb69b52e0cc47669f19f3d9e22641553f9cfd","b1ea54bd5b5101af1f89a947172f22d77f4f20942943a15246687f9bcb36a9d3","9ff7978369554aa3cf39d469f979f8d62bc4f73e9355853be3ca6230eeb2e3f3","148b5287206caedde0a749e959ceca8307980063367090610a6d9b6087d9c9ed","e4f3ec8ffb7e210230fb8efc9aa56226c0c2af8009965734c515324e8a687cc0","ca475effcbde6d820f3349daabde619a95775f01b30b2b094280f51abe02da86","a27f5613495a62ed3c3347f721a06ca5ca2206973c4861581875d0c56515d84a",{"version":"31de793f9827d866cf352c971c0f16b7656f5204f206b0c5adc1da3e444b5e98","signature":"29ce3b5ba9c7f7c5b4a9d77147e454e7d03f807ca48acb8c0cd3276be93f537f"},{"version":"6b57109e263834527a2d97ad7babef30cb24663c78b477681d21b24908179697","signature":"7483447a6abdae9d48fca39309a0f1e29c40e787a937d8540385db8362137fb5"},{"version":"c2a6a737189ced24ffe0634e9239b087e4c26378d0490f95141b9b9b042b746c","impliedFormat":1},{"version":"427fe2004642504828c1476d0af4270e6ad4db6de78c0b5da3e4c5ca95052a99","impliedFormat":1},{"version":"2eeffcee5c1661ddca53353929558037b8cf305ffb86a803512982f99bcab50d","impliedFormat":99},{"version":"9afb4cb864d297e4092a79ee2871b5d3143ea14153f62ef0bb04ede25f432030","affectsGlobalScope":true,"impliedFormat":99},{"version":"5b7206ca5f2f6eeaac6daa285664f424e0b728f3e31937da89deb8696c5f1dbc","impliedFormat":1},{"version":"53dd92e141efe47b413a058f3fbcc6e40a84f5afdde16f45de550a476da25d98","impliedFormat":1},{"version":"0dc6940ff35d845686a118ee7384713a84024d60ef26f25a2f87992ec7ddbd64","impliedFormat":1},{"version":"25be1eb939c9c63242c7a45446edb20c40541da967f43f1aa6a00ed53c0552db","impliedFormat":1},{"version":"751764bb94219b4ce8f5475dc35d3de2e432fea01a0c9610cd7f69ad05e398c6","impliedFormat":1},{"version":"b0f9ef6423d6b29dde29fd60d83d215796b2c1b76bfca28ac374ae18702cfb8e","impliedFormat":1},{"version":"9604063ccdbccc7bb6bd0de7de4eda573eac84a98b85104868e8f828f8523aeb","impliedFormat":1},{"version":"2cfca81d9986f9038afd5c80da0162a75a58f08dcfac574c47641d166e868ca3","impliedFormat":1},{"version":"24f2e55a5dbe187494bd6f2b0f4422b47364ee4fdec226c86336830ce18b6de3","affectsGlobalScope":true,"impliedFormat":1},{"version":"16d3ff766f6382a2033a7bbeca936f94c717630b44aadac207019d135a16c1c2","impliedFormat":1},{"version":"8c41261cc0ab7e6b743723384334877e37b411a09f4b023ec068fc13ee9a0ef9","impliedFormat":1},{"version":"954aa02ef3f468cb6a09d68416657610e430638ede9b8659f6ad09e4b1495a15","impliedFormat":1},{"version":"37572965bf2925adb0290f105eae3fe48380509e5a2e82a0b4b05dd8b44863a6","impliedFormat":1},{"version":"d3822b6f3d4bb34b4b7bd388540df4e30f8c52846e4e6a099ad0b3bcac1177e4","impliedFormat":1},{"version":"fae4a58b36adf98d91a0c24d325a1530b114ce3070648f77321b53e2debfc6f1","impliedFormat":1},{"version":"9ad5866938709e230941dfbf01dbf0cc01fd43c67e1b06f717c0fc0695c6b816","impliedFormat":1},{"version":"c6457956bb33e94d7ed59f0c4573dbe03b9aa7fbe144b71202d3060323a6e5f6","impliedFormat":1},{"version":"6bf2967239620c9a43dba294f8c62850b78180df5d3d459b00767032ca6c4a4b","impliedFormat":1},{"version":"f550481c9af8cc420098c83064a1727266bbb37fff65974dd57678f25686e1b3","impliedFormat":1},{"version":"150524671677f0682c3a819efab65eeca3aad2ed7ddb04c198c908a314d53ede","impliedFormat":1},{"version":"35dea7c5fe9fc5a8a4554f9ce247c7ef95af2997ba93471e44654207b6ce492e","impliedFormat":1},{"version":"7c004fa5802a47d8c115658663048040370952f05a4b4523e04a6dfa8295835a","impliedFormat":1},{"version":"ae498c2fde267da234b7309bd60f573b2dd5e29ee7525b7681e0472d8934151e","impliedFormat":1},{"version":"379431c713f22537483d7dd9dddf5b90db42445e6832ab81c0ea7ea551687cf7","impliedFormat":1},{"version":"aeb362d03e7a0a1042d43863b028ba833787519cc12acdd6348c8636031fcf64","impliedFormat":1},{"version":"d48585b49b6e6338be09c91c7a77f07a06acc8fa14fd034251391496b80a4389","impliedFormat":1},{"version":"4c2771ecdb34409f1de33f3e5b9205f466991fa87ffb7c9fce37001549854dd4","impliedFormat":1},{"version":"ae4e433c01cd6d3fefdd211147cb21c097a672cccb5a35c6fe1e0d0496462864","impliedFormat":1},{"version":"cb898659a2f6965a58b910782c540bf659cdff732fdbe88d0f8fea3f39e426a0","impliedFormat":1},{"version":"fe70c01d4defb5fa09a9e93a7c2369e52f3d618d24d949096cde54c46383804b","impliedFormat":1},{"version":"edcc306d9267a2dfe9621f82b49ee1846c68272ab33b95e312ec858a7ad008cf","impliedFormat":1},{"version":"2c9e4994396e1fe7e3b90ac048be4635e981165dbdc17210a4d35ddf18d4ea6c","impliedFormat":1},{"version":"bbc91b6ea2447d459184ea3168290420e5220ae07fc4bfa04f35d9a91c9b27f5","impliedFormat":1},{"version":"6dc13a6b4dccddd9e43d5bf4d4a5bd431104834c8ac117885c86106e2fdb8d9d","impliedFormat":1},{"version":"21180e1e59f53a435a47f6dbedc4e34fb0c44ed6b6babc0c9da24baa09cf0803","impliedFormat":1},{"version":"c72cf7b1cc8d44aa4438de7034a727ed0c55d138f714a34f63b90071ae578d8d","impliedFormat":1},{"version":"9750f6a101733da60c0db5c0a0ce959fc183777f428a0b6c75d451d79b6ad26e","impliedFormat":1},{"version":"689dfba65bbc1169a648f9051a1ee1ece7daa8ea03e896adebfbe1a066f58507","impliedFormat":1},{"version":"8187d28ab3665c2a2193e14573046c4a55c9a173a8253273db54b58bd44b8d04","impliedFormat":1},{"version":"f28a928c10c9e7021eeee89ef86b1e4b927ddb632d3b1c4c7b659c332f053ac3","impliedFormat":1},{"version":"05dd810625ad0bf17ba5535147d86fe9d5069374e1dfe30cbec97bbf38de4e4f","impliedFormat":1},{"version":"3479665d9b2cb3164c727076db9b2bacc3bffda44968b935b19f51cc29468268","impliedFormat":1},{"version":"f1df47dee4401adba6a8a303fb4d64ca053d22b38cb3c74f09088039bcdc38fb","impliedFormat":1},{"version":"05b4547baf39b8ec556ff5019a3fe27972c877e8eb65355eeab5748a9c7f9782","impliedFormat":1},{"version":"28840e14407c5afa8aac86d86eb8cf5e7731e76fc3be7073b43d91a28445279b","impliedFormat":1},{"version":"46c97faf301b3452e4f6a49d7d3f048192938601fa3865b4848310bde694f45d","impliedFormat":1},{"version":"21742e51851f200b11c21d7873daa67772b924ae832d28aa010949167eb4762a","impliedFormat":1},{"version":"7c54c4b7f7752b0315f14b9ae63f00d7a3f39308e598c670d8a96afdcb8e0a4e","impliedFormat":1},{"version":"9f559e612c27cce4bc181decc88ba90b00e5be42b6ed7fe9316d6c61476d7439","impliedFormat":1},{"version":"03dfcf3d00c60a769e705eb5b080c3674cd59ae830ee7ad82aed8f1883f60f06","impliedFormat":1},{"version":"ca8cec5a09c4323e1fcd9e0f0f84727c9b0818802fabae4ecf7f42a380483037","impliedFormat":1},{"version":"92d06124389a259ec6f17fa490dd2da4a8aff8fd9055047036e63211793a556b","impliedFormat":1},{"version":"aa8c0e10f176c156cfea40f5acdbc08cb44a43ba5411c743be645743ed3b1c02","impliedFormat":1},{"version":"b1bf7de0413303c8bd9424cf4955b433606e90eb31339202c8bffdb1dec982e9","impliedFormat":1},{"version":"b2a4ac9cb48af3f699271b962a00b26747c0bb9b01ae21493ef1826ee3ddd270","impliedFormat":1},{"version":"58564964bef3ffbd810241a8bd1c3a54347dd8adf04e1077ba49051009d3007d","affectsGlobalScope":true,"impliedFormat":1},{"version":"82428329db2b05aba6784395a429504ebca24f5d4b9506f779b964cf8c0fd58e","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7bb49fac2aa46a13011b5eb5e4a8648f70a28aea1853fab2444dd4fcb4d4ec7","impliedFormat":1},{"version":"464e45d1a56dae066d7e1a2f32e55b8de4bfb072610c3483a4091d73c9924908","impliedFormat":1},{"version":"da318e126ac39362c899829547cc8ee24fa3e8328b52cdd27e34173cf19c7941","impliedFormat":1},{"version":"24bd01a91f187b22456c7171c07dbf44f3ad57ebd50735aab5c13fa23d7114b4","impliedFormat":1},{"version":"4738eefeaaba4d4288a08c1c226a76086095a4d5bcc7826d2564e7c29da47671","impliedFormat":1},{"version":"736097ddbb2903bef918bb3b5811ef1c9c5656f2a73bd39b22a91b9cc2525e50","impliedFormat":1},{"version":"dbec715e9e82df297e49e3ed0029f6151aa40517ebfd6fcdba277a8a2e1d3a1b","impliedFormat":1},{"version":"097f1f8ca02e8940cfdcca553279e281f726485fa6fb214b3c9f7084476f6bcc","impliedFormat":1},{"version":"8f75e211a2e83ff216eb66330790fb6412dcda2feb60c4f165c903cf375633ee","impliedFormat":1},{"version":"c3fb0d969970b37d91f0dbf493c014497fe457a2280ac42ae24567015963dbf7","impliedFormat":1},{"version":"a9155c6deffc2f6a69e69dc12f0950ba1b4db03b3d26ab7a523efc89149ce979","impliedFormat":1},{"version":"c99faf0d7cb755b0424a743ea0cbf195606bf6cd023b5d10082dba8d3714673c","impliedFormat":1},{"version":"8e770f88d5f5b92aa94251b2d223d18e85dc0ff8ffba5b0d82164a78e8ac5663","impliedFormat":1},{"version":"3134a6c11d0beb89fcb57ee0720c68fbd47d6c796e219ec188c459553e46505b","impliedFormat":1},{"version":"f2f23fe34b735887db1d5597714ae37a6ffae530cafd6908c9d79d485667c956","impliedFormat":1},{"version":"5bba0e6cd8375fd37047e99a080d1bd9a808c95ecb7f3043e3adc125196f6607","impliedFormat":1},{"version":"1ba59c8bbeed2cb75b239bb12041582fa3e8ef32f8d0bd0ec802e38442d3f317","impliedFormat":1}],"root":[251,252],"options":{"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"module":1,"outDir":"./","rootDir":"..","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9},"referencedMap":[[263,1],[264,1],[265,2],[273,3],[274,1],[275,1],[278,4],[272,1],[277,5],[276,1],[266,6],[267,7],[268,7],[269,1],[271,8],[270,1],[253,9],[214,10],[256,11],[257,1],[258,1],[213,12],[259,1],[260,12],[254,1],[261,1],[208,13],[215,14],[209,1],[262,1],[210,1],[311,15],[312,16],[108,17],[109,17],[110,18],[63,19],[111,20],[112,21],[113,22],[58,1],[61,23],[59,1],[60,1],[114,24],[115,25],[116,26],[117,27],[118,28],[119,29],[120,29],[121,30],[122,31],[123,32],[124,33],[64,1],[62,1],[125,34],[126,35],[127,36],[161,37],[128,38],[129,1],[130,39],[131,40],[132,41],[133,42],[134,43],[135,44],[136,45],[137,46],[138,47],[139,47],[140,48],[141,1],[142,49],[143,50],[145,51],[144,52],[146,53],[147,54],[148,55],[149,56],[150,57],[151,58],[152,59],[153,60],[154,61],[155,62],[156,63],[157,64],[158,65],[65,1],[66,1],[67,1],[105,66],[106,1],[107,1],[159,67],[160,68],[168,69],[167,70],[206,1],[207,1],[313,71],[205,72],[212,73],[211,74],[322,75],[314,1],[317,76],[320,77],[321,78],[315,79],[318,80],[316,81],[327,82],[324,83],[326,1],[325,84],[323,85],[328,1],[329,1],[330,86],[255,1],[319,87],[166,88],[163,9],[165,89],[164,1],[162,1],[306,90],[308,91],[304,1],[307,90],[309,1],[310,92],[305,93],[283,94],[299,1],[284,95],[301,96],[280,1],[300,97],[285,98],[292,99],[289,1],[296,100],[294,101],[287,102],[295,103],[279,1],[288,104],[302,1],[303,105],[281,106],[290,107],[286,1],[282,108],[297,109],[291,110],[298,1],[293,1],[56,1],[57,1],[11,1],[10,1],[2,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[3,1],[20,1],[21,1],[4,1],[22,1],[26,1],[23,1],[24,1],[25,1],[27,1],[28,1],[29,1],[5,1],[30,1],[31,1],[32,1],[33,1],[6,1],[37,1],[34,1],[35,1],[36,1],[38,1],[7,1],[39,1],[44,1],[45,1],[40,1],[41,1],[42,1],[43,1],[8,1],[49,1],[46,1],[47,1],[48,1],[50,1],[9,1],[51,1],[52,1],[53,1],[55,1],[54,1],[1,1],[83,111],[93,112],[82,111],[103,113],[74,114],[73,115],[102,9],[96,116],[101,117],[76,118],[90,119],[75,120],[99,121],[71,122],[70,9],[100,123],[72,124],[77,125],[78,1],[81,125],[68,1],[104,126],[94,127],[85,128],[86,129],[88,130],[84,131],[87,132],[97,9],[79,133],[80,134],[89,135],[69,101],[92,127],[91,125],[95,1],[98,136],[194,1],[195,1],[196,137],[197,138],[203,1],[169,1],[172,1],[174,139],[175,140],[176,141],[170,1],[191,142],[192,143],[173,1],[200,1],[201,144],[190,145],[189,1],[198,1],[199,146],[204,147],[193,1],[178,148],[177,1],[181,149],[187,150],[179,151],[188,152],[184,153],[185,153],[183,154],[180,1],[186,1],[182,1],[171,155],[202,1],[223,156],[225,157],[216,1],[224,158],[226,159],[221,160],[217,161],[228,162],[222,163],[227,159],[219,164],[218,161],[220,161],[252,165],[251,166],[239,167],[248,168],[249,159],[231,169],[250,170],[236,171],[230,172],[238,1],[247,173],[240,169],[237,174],[235,175],[232,176],[234,177],[246,1],[233,1],[241,178],[244,178],[245,178],[243,178],[242,178],[229,173]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.3"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,41 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@qodalis/cli-server-plugin-users-postgres",
|
|
3
|
+
"version": "1.0.0-beta.30",
|
|
4
|
+
"description": "PostgreSQL stores for the Qodalis CLI server users plugin: users, groups, passwords, sessions, API tokens and the audit log survive restarts; the schema is versioned with the migrations plugin",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"LICENSE",
|
|
10
|
+
"README.md"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"cli",
|
|
17
|
+
"qodalis",
|
|
18
|
+
"users",
|
|
19
|
+
"postgres",
|
|
20
|
+
"postgresql",
|
|
21
|
+
"cli-server",
|
|
22
|
+
"plugin"
|
|
23
|
+
],
|
|
24
|
+
"author": "Nicolae Lupei",
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "https://github.com/qodalis-solutions/cli-server-node",
|
|
29
|
+
"directory": "plugins/users-postgres"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@qodalis/cli-server-abstractions": "^1.0.0-beta.29",
|
|
33
|
+
"@qodalis/cli-server-plugin-databases": "^1.0.0-beta.29",
|
|
34
|
+
"@qodalis/cli-server-plugin-users": "^1.0.0-beta.29",
|
|
35
|
+
"pg": "^8.13.0"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/pg": "^8.0.0",
|
|
39
|
+
"typescript": "^5.6.0"
|
|
40
|
+
}
|
|
41
|
+
}
|