@axinom/mosaic-db-common 0.11.0-rc.9 → 0.11.0
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/CHANGELOG.md +12 -0
- package/dist/auth/authentication-subject.d.ts +13 -0
- package/dist/auth/authentication-subject.d.ts.map +1 -1
- package/dist/auth/authentication-subject.js +1 -0
- package/dist/auth/authentication-subject.js.map +1 -1
- package/dist/auth/helpers.d.ts +4 -4
- package/dist/auth/helpers.d.ts.map +1 -1
- package/dist/auth/helpers.js +2 -2
- package/dist/auth/helpers.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.11.0](https://dev.azure.com/axinom/CMS/_git/Navy/branchCompare?baseVersion=GT@axinom/mosaic-db-common@0.10.0&targetVersion=GT@axinom/mosaic-db-common@0.11.0) (2022-02-02)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* anonymous consumer token WIP ([280a075](https://dev.azure.com/axinom/CMS/_git/Navy/commit/280a075d4da97b24915c6a2c6a71158a1f4c03c5))
|
|
12
|
+
* rebase with master branch ([fe969fa](https://dev.azure.com/axinom/CMS/_git/Navy/commit/fe969fac8a5e64c98174faefd61288907e10eefd))
|
|
13
|
+
* set default ts version ([16ce926](https://dev.azure.com/axinom/CMS/_git/Navy/commit/16ce92627bec279b93f5b21fe6ae830361f201a8))
|
|
14
|
+
* sql snippets generation cli implemented ([164fe2a](https://dev.azure.com/axinom/CMS/_git/Navy/commit/164fe2ad61411f91b5d919f7b4d643d723e60208)), closes [#33834](https://dev.azure.com/axinom/CMS/_workitems/edit/33834)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
6
18
|
## [0.10.0](https://dev.azure.com/axinom/CMS/_git/Navy/branchCompare?baseVersion=GT@axinom/mosaic-db-common@0.9.0&targetVersion=GT@axinom/mosaic-db-common@0.10.0) (2022-01-19)
|
|
7
19
|
|
|
8
20
|
|
|
@@ -27,4 +27,17 @@ export interface PgAuthenticatedConsumer {
|
|
|
27
27
|
name: string;
|
|
28
28
|
profileId: string;
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* This interface represents an authenticated consumer application.
|
|
32
|
+
* These will be tokens issued by the User Service.
|
|
33
|
+
*
|
|
34
|
+
* Having name and profileId is not mandatory for these tokens.
|
|
35
|
+
*/
|
|
36
|
+
export interface PgAuthenticatedConsumerApplication {
|
|
37
|
+
tenantId: string;
|
|
38
|
+
environmentId: string;
|
|
39
|
+
sub: string;
|
|
40
|
+
name: string;
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
}
|
|
30
43
|
//# sourceMappingURL=authentication-subject.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authentication-subject.d.ts","sourceRoot":"","sources":["../../src/auth/authentication-subject.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"authentication-subject.d.ts","sourceRoot":"","sources":["../../src/auth/authentication-subject.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE;QACX,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;KACzB,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,WAAW,kCAAkC;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authentication-subject.js","sourceRoot":"","sources":["../../src/auth/authentication-subject.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"authentication-subject.js","sourceRoot":"","sources":["../../src/auth/authentication-subject.ts"],"names":[],"mappings":";AAAA,uDAAuD"}
|
package/dist/auth/helpers.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Dict } from '../common';
|
|
2
|
-
import { PgAuthenticatedConsumer, PgAuthenticatedManagementSubject } from './authentication-subject';
|
|
2
|
+
import { PgAuthenticatedConsumer, PgAuthenticatedConsumerApplication, PgAuthenticatedManagementSubject } from './authentication-subject';
|
|
3
3
|
/**
|
|
4
4
|
* Builds a pg settings object for the currently authenticated management subject.
|
|
5
5
|
* Used for RLS authentication in both PostGraphile and zapatos.
|
|
@@ -34,11 +34,11 @@ export declare function buildAuthPgSettings(subject: PgAuthenticatedManagementSu
|
|
|
34
34
|
*/
|
|
35
35
|
export declare function buildAuthPgSettings(subject: PgAuthenticatedManagementSubject | undefined): Dict<string>;
|
|
36
36
|
/**
|
|
37
|
-
* Builds a pg settings object for the currently authenticated Consumer with a dedicated DB Role.
|
|
37
|
+
* Builds a pg settings object for the currently authenticated Consumer or Consumer Application with a dedicated DB Role.
|
|
38
38
|
* Used for End User RLS authentication in both PostGraphile and zapatos.
|
|
39
39
|
*
|
|
40
|
-
* @param subject - Currently Authenticated Consumer
|
|
40
|
+
* @param subject - Currently Authenticated Consumer or Consumer Application
|
|
41
41
|
* @param dbRole - The database role to switch to
|
|
42
42
|
*/
|
|
43
|
-
export declare function buildConsumerAuthPgSettings(subject: PgAuthenticatedConsumer | undefined, dbRole: string): Dict<string>;
|
|
43
|
+
export declare function buildConsumerAuthPgSettings(subject: PgAuthenticatedConsumer | PgAuthenticatedConsumerApplication | undefined, dbRole: string): Dict<string>;
|
|
44
44
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/auth/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAYjC,OAAO,EACL,uBAAuB,EACvB,gCAAgC,EACjC,MAAM,0BAA0B,CAAC;AAElC;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,gCAAgC,GAAG,SAAS,EACrD,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,IAAI,CAAC,MAAM,CAAC,CAAC;AAEhB;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,gCAAgC,GAAG,SAAS,EACrD,MAAM,EAAE,MAAM,GACb,IAAI,CAAC,MAAM,CAAC,CAAC;AAShB;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,gCAAgC,GAAG,SAAS,EACrD,SAAS,EAAE,MAAM,GAChB,IAAI,CAAC,MAAM,CAAC,CAAC;AAEhB;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,gCAAgC,GAAG,SAAS,GACpD,IAAI,CAAC,MAAM,CAAC,CAAC;AAmBhB;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/auth/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAYjC,OAAO,EACL,uBAAuB,EACvB,kCAAkC,EAClC,gCAAgC,EACjC,MAAM,0BAA0B,CAAC;AAElC;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,gCAAgC,GAAG,SAAS,EACrD,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,IAAI,CAAC,MAAM,CAAC,CAAC;AAEhB;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,gCAAgC,GAAG,SAAS,EACrD,MAAM,EAAE,MAAM,GACb,IAAI,CAAC,MAAM,CAAC,CAAC;AAShB;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,gCAAgC,GAAG,SAAS,EACrD,SAAS,EAAE,MAAM,GAChB,IAAI,CAAC,MAAM,CAAC,CAAC;AAEhB;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,gCAAgC,GAAG,SAAS,GACpD,IAAI,CAAC,MAAM,CAAC,CAAC;AAmBhB;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EACH,uBAAuB,GACvB,kCAAkC,GAClC,SAAS,EACb,MAAM,EAAE,MAAM,GACb,IAAI,CAAC,MAAM,CAAC,CASd"}
|
package/dist/auth/helpers.js
CHANGED
|
@@ -24,10 +24,10 @@ function buildAuthPgSettings(...args) {
|
|
|
24
24
|
}
|
|
25
25
|
exports.buildAuthPgSettings = buildAuthPgSettings;
|
|
26
26
|
/**
|
|
27
|
-
* Builds a pg settings object for the currently authenticated Consumer with a dedicated DB Role.
|
|
27
|
+
* Builds a pg settings object for the currently authenticated Consumer or Consumer Application with a dedicated DB Role.
|
|
28
28
|
* Used for End User RLS authentication in both PostGraphile and zapatos.
|
|
29
29
|
*
|
|
30
|
-
* @param subject - Currently Authenticated Consumer
|
|
30
|
+
* @param subject - Currently Authenticated Consumer or Consumer Application
|
|
31
31
|
* @param dbRole - The database role to switch to
|
|
32
32
|
*/
|
|
33
33
|
function buildConsumerAuthPgSettings(subject, dbRole) {
|
package/dist/auth/helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/auth/helpers.ts"],"names":[],"mappings":";;;AAEA,4CASsB;AACtB,wCAAsC;
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/auth/helpers.ts"],"names":[],"mappings":";;;AAEA,4CASsB;AACtB,wCAAsC;AAiCtC,SAAgB,eAAe,CAAC,GAAG,IAAW;IAC5C,uBACE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,IACV,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EACxC;AACJ,CAAC;AALD,0CAKC;AAyBD,SAAgB,mBAAmB,CAAC,GAAG,IAAW;;IAChD,MAAM,UAAU,iCACd,CAAC,oCAAwB,CAAC,EAAE,MAAA,MAAA,IAAI,CAAC,CAAC,CAAC,0CAAE,IAAI,mCAAI,qCAAyB,EACtE,CAAC,4BAAgB,CAAC,EAAE,MAAA,MAAA,IAAI,CAAC,CAAC,CAAC,0CAAE,QAAQ,mCAAI,EAAE,EAC3C,CAAC,iCAAqB,CAAC,EAAE,MAAA,MAAA,IAAI,CAAC,CAAC,CAAC,0CAAE,aAAa,mCAAI,EAAE,IAClD,IAAA,kBAAQ,EAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE;;QAAC,OAAA,CAAC;YAC1B,CAAC,4BAAgB,CAAC,EAAE,MAAA,MAAA,MAAA,MAAA,IAAI,CAAC,CAAC,CAAC,0CAAE,IAAI,0CAAE,IAAI,mDAAG,GAAG,CAAC,mCAAI,EAAE;SACrD,CAAC,CAAA;KAAA,CAAC,GACA,IAAA,kBAAQ,EAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,EAAE,EAAE;;QAAC,OAAA,CAAC;YACnC,CAAC,mCAAuB,CAAC,EACvB,MAAA,MAAA,MAAA,MAAA,MAAA,IAAI,CAAC,CAAC,CAAC,0CAAE,WAAW,0CAAG,SAAS,CAAC,0CAAE,IAAI,mDAAG,GAAG,CAAC,mCAAI,EAAE;SACvD,CAAC,CAAA;KAAA,CAAC,CACJ,CAAC;IAEF,OAAO,UAAU,CAAC;AACpB,CAAC;AAfD,kDAeC;AAED;;;;;;GAMG;AACH,SAAgB,2BAA2B,CACzC,OAGa,EACb,MAAc;;IAEd,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,CAAC,oCAAwB,CAAC,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,mCAAI,qCAAyB;QACtE,CAAC,4BAAgB,CAAC,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,mCAAI,EAAE;QAC3C,CAAC,iCAAqB,CAAC,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,mCAAI,EAAE;QACrD,CAAC,mCAAuB,CAAC,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG,mCAAI,EAAE;QAC7C,CAAC,kCAAsB,CAAC,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,mCAAI,EAAE;KACnD,CAAC;AACJ,CAAC;AAfD,kEAeC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axinom/mosaic-db-common",
|
|
3
|
-
"version": "0.11.0
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "This library encapsulates database-related functionality to develop Mosaic based services.",
|
|
5
5
|
"author": "Axinom",
|
|
6
6
|
"license": "PROPRIETARY",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "f80cb6c17c7fe9993994473b513b568c7ae718d8"
|
|
54
54
|
}
|