@vendure/core 3.6.0-minor-202603310307 → 3.6.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/dist/config/api-key-strategy/api-key-strategy.d.ts +9 -2
- package/dist/config/api-key-strategy/api-key-strategy.js +6 -1
- package/dist/config/api-key-strategy/api-key-strategy.js.map +1 -1
- package/dist/config/api-key-strategy/random-bytes-api-key-strategy.d.ts +1 -0
- package/dist/config/api-key-strategy/random-bytes-api-key-strategy.js +1 -0
- package/dist/config/api-key-strategy/random-bytes-api-key-strategy.js.map +1 -1
- package/dist/config/auth/default-entity-access-control-strategy.d.ts +1 -0
- package/dist/config/auth/default-entity-access-control-strategy.js +1 -0
- package/dist/config/auth/default-entity-access-control-strategy.js.map +1 -1
- package/dist/config/auth/entity-access-control-strategy.d.ts +2 -0
- package/dist/event-bus/index.d.ts +4 -2
- package/dist/event-bus/index.js +4 -2
- package/dist/event-bus/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -40,6 +40,8 @@ export type ApiKeyStrategyParseResult = null | {
|
|
|
40
40
|
* :::
|
|
41
41
|
*
|
|
42
42
|
* @docsCategory auth
|
|
43
|
+
* @docsPage ApiKeyStrategy
|
|
44
|
+
* @docsWeight 0
|
|
43
45
|
* @since 3.6.0
|
|
44
46
|
*/
|
|
45
47
|
export interface ApiKeyStrategy extends InjectableStrategy {
|
|
@@ -68,7 +70,7 @@ export interface ApiKeyStrategy extends InjectableStrategy {
|
|
|
68
70
|
* @description
|
|
69
71
|
* Defines a custom strategy for how API-Keys get hashed and checked.
|
|
70
72
|
*
|
|
71
|
-
* :::
|
|
73
|
+
* :::caution[Performance Consideration]
|
|
72
74
|
*
|
|
73
75
|
* Vendure does not store API-Keys in plain text, but rather a hashed version of the key,
|
|
74
76
|
* similar to how passwords are handled. This means that when a request comes in with an API-Key,
|
|
@@ -148,8 +150,13 @@ export interface ApiKeyStrategy extends InjectableStrategy {
|
|
|
148
150
|
lastUsedAtUpdateInterval: number | string;
|
|
149
151
|
}
|
|
150
152
|
/**
|
|
153
|
+
* @description
|
|
151
154
|
* Intended to be extended by consumers of the {@link ApiKeyStrategy} if they do not
|
|
152
|
-
* require their own construction/parsing logic.
|
|
155
|
+
* require their own construction/parsing logic. Provides default implementations of
|
|
156
|
+
* `constructApiKey`, `parse`, `delimiter`, and `lastUsedAtUpdateInterval`.
|
|
157
|
+
*
|
|
158
|
+
* @docsCategory auth
|
|
159
|
+
* @docsPage ApiKeyStrategy
|
|
153
160
|
*/
|
|
154
161
|
export declare abstract class BaseApiKeyStrategy implements ApiKeyStrategy {
|
|
155
162
|
abstract hashingStrategy: PasswordHashingStrategy;
|
|
@@ -20,8 +20,13 @@ exports.API_KEY_AUTH_STRATEGY_NAME = 'apikey';
|
|
|
20
20
|
*/
|
|
21
21
|
exports.API_KEY_AUTH_STRATEGY_DEFAULT_DURATION_MS = (0, ms_1.default)('100y');
|
|
22
22
|
/**
|
|
23
|
+
* @description
|
|
23
24
|
* Intended to be extended by consumers of the {@link ApiKeyStrategy} if they do not
|
|
24
|
-
* require their own construction/parsing logic.
|
|
25
|
+
* require their own construction/parsing logic. Provides default implementations of
|
|
26
|
+
* `constructApiKey`, `parse`, `delimiter`, and `lastUsedAtUpdateInterval`.
|
|
27
|
+
*
|
|
28
|
+
* @docsCategory auth
|
|
29
|
+
* @docsPage ApiKeyStrategy
|
|
25
30
|
*/
|
|
26
31
|
class BaseApiKeyStrategy {
|
|
27
32
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-key-strategy.js","sourceRoot":"","sources":["../../../src/config/api-key-strategy/api-key-strategy.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AAOpB;;;;GAIG;AACU,QAAA,0BAA0B,GAAG,QAAQ,CAAC;AAEnD;;;;;;GAMG;AACU,QAAA,yCAAyC,GAAG,IAAA,YAAE,EAAC,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"api-key-strategy.js","sourceRoot":"","sources":["../../../src/config/api-key-strategy/api-key-strategy.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AAOpB;;;;GAIG;AACU,QAAA,0BAA0B,GAAG,QAAQ,CAAC;AAEnD;;;;;;GAMG;AACU,QAAA,yCAAyC,GAAG,IAAA,YAAE,EAAC,MAAM,CAAC,CAAC;AAgJpE;;;;;;;;GAQG;AACH,MAAsB,kBAAkB;IAAxC;QAII,cAAS,GAAG,GAAG,CAAC;QAChB,6BAAwB,GAA+C,CAAC,CAAC;IAmB7E,CAAC;IAjBG,eAAe,CAAC,QAAgB,EAAE,MAAc;QAC5C,OAAO,GAAG,QAAQ,GAAG,IAAI,CAAC,SAAS,GAAG,MAAM,EAAE,CAAC;IACnD,CAAC;IAED,KAAK,CAAC,KAAa;QACf,IAAI,CAAC,KAAK,EAAE,CAAC;YACT,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;QAE1D,IAAI,CAAC,QAAQ,IAAI,CAAC,MAAM,EAAE,CAAC;YACvB,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;IAChC,CAAC;CACJ;AAxBD,gDAwBC"}
|
|
@@ -67,6 +67,7 @@ export interface RandomBytesApiKeyStrategyOptions {
|
|
|
67
67
|
* Note the colon `':'` delimiter between the lookup ID and the api key.
|
|
68
68
|
*
|
|
69
69
|
* @docsCategory auth
|
|
70
|
+
* @docsPage ApiKeyStrategy
|
|
70
71
|
* @since 3.6.0
|
|
71
72
|
*/
|
|
72
73
|
export declare class RandomBytesApiKeyStrategy extends BaseApiKeyStrategy {
|
|
@@ -20,6 +20,7 @@ exports.DEFAULT_LAST_USED_AT_UPDATE_INTERVAL = 0;
|
|
|
20
20
|
* Note the colon `':'` delimiter between the lookup ID and the api key.
|
|
21
21
|
*
|
|
22
22
|
* @docsCategory auth
|
|
23
|
+
* @docsPage ApiKeyStrategy
|
|
23
24
|
* @since 3.6.0
|
|
24
25
|
*/
|
|
25
26
|
class RandomBytesApiKeyStrategy extends api_key_strategy_1.BaseApiKeyStrategy {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"random-bytes-api-key-strategy.js","sourceRoot":"","sources":["../../../src/config/api-key-strategy/random-bytes-api-key-strategy.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAG1C,+FAAyF;AAGzF,yDAAwE;AAE3D,QAAA,gCAAgC,GAAG,EAAE,CAAC;AACtC,QAAA,gCAAgC,GAAG,EAAE,CAAC;AACtC,QAAA,oCAAoC,GAAG,CAAC,CAAC;AAqDtD
|
|
1
|
+
{"version":3,"file":"random-bytes-api-key-strategy.js","sourceRoot":"","sources":["../../../src/config/api-key-strategy/random-bytes-api-key-strategy.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAG1C,+FAAyF;AAGzF,yDAAwE;AAE3D,QAAA,gCAAgC,GAAG,EAAE,CAAC;AACtC,QAAA,gCAAgC,GAAG,EAAE,CAAC;AACtC,QAAA,oCAAoC,GAAG,CAAC,CAAC;AAqDtD;;;;;;;;;;;;;;;GAeG;AACH,MAAa,yBAA0B,SAAQ,qCAAkB;IAK7D,YAAY,KAAwC;;QAChD,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,UAAU,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,mCAAI,wCAAgC,CAAC;QACxE,IAAI,CAAC,UAAU,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,mCAAI,wCAAgC,CAAC;QACxE,IAAI,CAAC,wBAAwB;YACzB,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,wBAAwB,mCAAI,4CAAoC,CAAC;QAC5E,IAAI,CAAC,eAAe,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,eAAe,mCAAI,IAAI,gEAA6B,EAAE,CAAC;IACzF,CAAC;IAED,cAAc,CAAC,GAAmB;QAC9B,OAAO,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACtD,CAAC;IAED,gBAAgB,CAAC,GAAmB;QAChC,OAAO,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACtD,CAAC;IAEO,oBAAoB,CAAC,IAAY;QACrC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACnC,IAAA,yBAAW,EAAC,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;gBAC3B,IAAI,GAAG,EAAE,CAAC;oBACN,MAAM,CAAC,GAAG,CAAC,CAAC;gBAChB,CAAC;qBAAM,CAAC;oBACJ,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;gBACjC,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAjCD,8DAiCC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-entity-access-control-strategy.js","sourceRoot":"","sources":["../../../src/config/auth/default-entity-access-control-strategy.ts"],"names":[],"mappings":";;;AAAA,yEAAiE;AAMjE
|
|
1
|
+
{"version":3,"file":"default-entity-access-control-strategy.js","sourceRoot":"","sources":["../../../src/config/auth/default-entity-access-control-strategy.ts"],"names":[],"mappings":";;;AAAA,yEAAiE;AAMjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAa,kCAAkC;IAC3C;;;;;;OAMG;IACH,KAAK,CAAC,SAAS,CAAC,GAAmB,EAAE,WAAyB;QAC1D,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3B,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,IAAI,WAAW,CAAC,QAAQ,CAAC,4BAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YAC1C,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,OAAO,GAAG,CAAC,kBAAkB,CAAC,WAAW,CAAC,IAAI,GAAG,CAAC,qBAAqB,CAAC;IAC5E,CAAC;CAIJ;AApBD,gFAoBC"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
export * from './event-bus';
|
|
2
2
|
export * from './event-bus.module';
|
|
3
|
-
export * from './vendure-event';
|
|
4
3
|
export * from './vendure-entity-event';
|
|
4
|
+
export * from './vendure-event';
|
|
5
5
|
export * from './events/account-registration-event';
|
|
6
6
|
export * from './events/account-verified-event';
|
|
7
7
|
export * from './events/administrator-event';
|
|
8
|
+
export * from './events/api-key-event';
|
|
8
9
|
export * from './events/asset-channel-event';
|
|
9
10
|
export * from './events/asset-event';
|
|
10
11
|
export * from './events/attempted-login-event';
|
|
12
|
+
export * from './events/bootstrapped-event';
|
|
11
13
|
export * from './events/change-channel-event';
|
|
12
14
|
export * from './events/channel-event';
|
|
13
15
|
export * from './events/collection-event';
|
|
@@ -16,8 +18,8 @@ export * from './events/country-event';
|
|
|
16
18
|
export * from './events/coupon-code-event';
|
|
17
19
|
export * from './events/customer-address-event';
|
|
18
20
|
export * from './events/customer-event';
|
|
19
|
-
export * from './events/customer-group-event';
|
|
20
21
|
export * from './events/customer-group-change-event';
|
|
22
|
+
export * from './events/customer-group-event';
|
|
21
23
|
export * from './events/facet-event';
|
|
22
24
|
export * from './events/facet-value-event';
|
|
23
25
|
export * from './events/fulfillment-event';
|
package/dist/event-bus/index.js
CHANGED
|
@@ -16,14 +16,16 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./event-bus"), exports);
|
|
18
18
|
__exportStar(require("./event-bus.module"), exports);
|
|
19
|
-
__exportStar(require("./vendure-event"), exports);
|
|
20
19
|
__exportStar(require("./vendure-entity-event"), exports);
|
|
20
|
+
__exportStar(require("./vendure-event"), exports);
|
|
21
21
|
__exportStar(require("./events/account-registration-event"), exports);
|
|
22
22
|
__exportStar(require("./events/account-verified-event"), exports);
|
|
23
23
|
__exportStar(require("./events/administrator-event"), exports);
|
|
24
|
+
__exportStar(require("./events/api-key-event"), exports);
|
|
24
25
|
__exportStar(require("./events/asset-channel-event"), exports);
|
|
25
26
|
__exportStar(require("./events/asset-event"), exports);
|
|
26
27
|
__exportStar(require("./events/attempted-login-event"), exports);
|
|
28
|
+
__exportStar(require("./events/bootstrapped-event"), exports);
|
|
27
29
|
__exportStar(require("./events/change-channel-event"), exports);
|
|
28
30
|
__exportStar(require("./events/channel-event"), exports);
|
|
29
31
|
__exportStar(require("./events/collection-event"), exports);
|
|
@@ -32,8 +34,8 @@ __exportStar(require("./events/country-event"), exports);
|
|
|
32
34
|
__exportStar(require("./events/coupon-code-event"), exports);
|
|
33
35
|
__exportStar(require("./events/customer-address-event"), exports);
|
|
34
36
|
__exportStar(require("./events/customer-event"), exports);
|
|
35
|
-
__exportStar(require("./events/customer-group-event"), exports);
|
|
36
37
|
__exportStar(require("./events/customer-group-change-event"), exports);
|
|
38
|
+
__exportStar(require("./events/customer-group-event"), exports);
|
|
37
39
|
__exportStar(require("./events/facet-event"), exports);
|
|
38
40
|
__exportStar(require("./events/facet-value-event"), exports);
|
|
39
41
|
__exportStar(require("./events/fulfillment-event"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/event-bus/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,qDAAmC;AACnC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/event-bus/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,qDAAmC;AACnC,yDAAuC;AACvC,kDAAgC;AAEhC,sEAAoD;AACpD,kEAAgD;AAChD,+DAA6C;AAC7C,yDAAuC;AACvC,+DAA6C;AAC7C,uDAAqC;AACrC,iEAA+C;AAC/C,8DAA4C;AAC5C,gEAA8C;AAC9C,yDAAuC;AACvC,4DAA0C;AAC1C,yEAAuD;AACvD,yDAAuC;AACvC,6DAA2C;AAC3C,kEAAgD;AAChD,0DAAwC;AACxC,uEAAqD;AACrD,gEAA8C;AAC9C,uDAAqC;AACrC,6DAA2C;AAC3C,6DAA2C;AAC3C,8EAA4D;AAC5D,iEAA+C;AAC/C,+DAA6C;AAC7C,mEAAiD;AACjD,2EAAyD;AACzD,6DAA2C;AAC3C,uDAAqC;AACrC,wDAAsC;AACtC,uDAAqC;AACrC,4DAA0C;AAC1C,8DAA4C;AAC5C,wEAAsD;AACtD,gEAA8C;AAC9C,yEAAuD;AACvD,gEAA8C;AAC9C,0EAAwD;AACxD,iEAA+C;AAC/C,yDAAuC;AACvC,gEAA8C;AAC9C,6EAA2D;AAC3D,sEAAoD;AACpD,yEAAuD;AACvD,iEAA+C;AAC/C,uEAAqD;AACrD,2DAAyC;AACzC,wDAAsC;AACtC,yEAAuD;AACvD,6DAA2C;AAC3C,sDAAoC;AACpC,wDAAsC;AACtC,wDAAsC;AACtC,iEAA+C;AAC/C,gEAA8C;AAC9C,gEAA8C;AAC9C,8DAA4C;AAC5C,0DAAwC;AACxC,uEAAqD;AACrD,sDAAoC;AACpC,8DAA4C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vendure/core",
|
|
3
|
-
"version": "3.6.0
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "A modern, headless ecommerce framework",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@nestjs/platform-express": "^11.0.12",
|
|
50
50
|
"@nestjs/terminus": "^11.0.0",
|
|
51
51
|
"@nestjs/typeorm": "^11.0.0",
|
|
52
|
-
"@vendure/common": "
|
|
52
|
+
"@vendure/common": "3.6.0",
|
|
53
53
|
"bcrypt": "^6.0.0",
|
|
54
54
|
"body-parser": "^1.20.2",
|
|
55
55
|
"cookie-session": "^2.1.0",
|