@magnet-cms/core 1.0.3 → 2.0.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/cache.settings-WVD3J7KS.js +5 -0
- package/dist/{chunk-VRD3SNTH.js → chunk-4KTI5N3Y.js} +5 -5
- package/dist/{chunk-2G3SJVME.js → chunk-57BXP7WT.js} +3 -3
- package/dist/{chunk-VPQMUAKT.js → chunk-5HGRFVWS.js} +2907 -1422
- package/dist/{chunk-GRTSRYQ3.js → chunk-5ZNZ457Y.js} +1 -1
- package/dist/chunk-FPVW2XEK.js +77 -0
- package/dist/{chunk-UPVWRKGL.js → chunk-LK4NYP67.js} +1 -1
- package/dist/{chunk-5KKPPI6S.js → chunk-LSFWCRI6.js} +3 -3
- package/dist/{chunk-IRYV6KDU.js → chunk-QYK4424N.js} +1806 -2919
- package/dist/{dist-es-EKS5UN6W.js → dist-es-FN4ZDH7H.js} +3 -3
- package/dist/dist-es-IFKE2QTH.js +1 -1
- package/dist/{dist-es-J4ID6CFE.js → dist-es-JOTZAW56.js} +3 -3
- package/dist/{dist-es-SH3IYNFH.js → dist-es-UU6EFY2O.js} +2 -2
- package/dist/index.cjs +62073 -8603
- package/dist/index.d.cts +20 -7
- package/dist/index.d.ts +20 -7
- package/dist/index.js +53223 -193
- package/dist/{loadCognitoIdentity-IDLT73F5.js → loadCognitoIdentity-VHCOBTS2.js} +4 -4
- package/dist/{loadSso-VKQ2MGWC.js → loadSso-5XNIYOZP.js} +4 -4
- package/dist/{loadSts-CDV5EIAC.js → loadSts-IC4PURXF.js} +6 -6
- package/dist/magnet-module-imports.cjs +3816 -3389
- package/dist/magnet-module-imports.d.cts +6 -2
- package/dist/magnet-module-imports.d.ts +6 -2
- package/dist/magnet-module-imports.js +12 -11
- package/dist/modules.cjs +3873 -2170
- package/dist/modules.d.cts +288 -618
- package/dist/modules.d.ts +288 -618
- package/dist/modules.js +179 -15
- package/dist/permission.guard-B8HLjHP2.d.cts +912 -0
- package/dist/permission.guard-B8HLjHP2.d.ts +912 -0
- package/dist/{settings.module-CS9n15pg.d.cts → settings.module-CX5Cs5fA.d.cts} +29 -3
- package/dist/{settings.module-CS9n15pg.d.ts → settings.module-CX5Cs5fA.d.ts} +29 -3
- package/dist/{signin-OTF7SOKV.js → signin-TXX6BWCZ.js} +4 -4
- package/dist/{sso-oidc-IU7NSPWD.js → sso-oidc-CMVLR2KO.js} +4 -4
- package/dist/{sts-IGHPXD4X.js → sts-MASJMUF3.js} +6 -6
- package/package.json +3 -3
- package/dist/auth-strategy.factory-D2p1hfeq.d.cts +0 -303
- package/dist/auth-strategy.factory-D2p1hfeq.d.ts +0 -303
- package/dist/{chunk-ISB33RLS.js → chunk-47RGXMWN.js} +3 -3
|
@@ -13,7 +13,7 @@ var init_fromWebToken = __esm({
|
|
|
13
13
|
const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;
|
|
14
14
|
let { roleAssumerWithWebIdentity } = init;
|
|
15
15
|
if (!roleAssumerWithWebIdentity) {
|
|
16
|
-
const { getDefaultRoleAssumerWithWebIdentity } = await import('./sts-
|
|
16
|
+
const { getDefaultRoleAssumerWithWebIdentity } = await import('./sts-MASJMUF3.js');
|
|
17
17
|
roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({
|
|
18
18
|
...init.clientConfig,
|
|
19
19
|
credentialProviderLogger: init.logger,
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { __esm, __name } from './chunk-6EUZQHAF.js';
|
|
2
|
+
import { SettingField, Settings } from '@magnet-cms/common';
|
|
3
|
+
|
|
4
|
+
function _ts_decorate(decorators, target, key, desc) {
|
|
5
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
6
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
7
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
8
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
9
|
+
}
|
|
10
|
+
var CacheSettings;
|
|
11
|
+
var init_cache_settings = __esm({
|
|
12
|
+
"src/modules/cache/cache.settings.ts"() {
|
|
13
|
+
__name(_ts_decorate, "_ts_decorate");
|
|
14
|
+
CacheSettings = class {
|
|
15
|
+
static {
|
|
16
|
+
__name(this, "CacheSettings");
|
|
17
|
+
}
|
|
18
|
+
enabled = true;
|
|
19
|
+
defaultTtl = 300;
|
|
20
|
+
maxMemoryEntries = 1e3;
|
|
21
|
+
};
|
|
22
|
+
_ts_decorate([
|
|
23
|
+
SettingField.Boolean({
|
|
24
|
+
label: "Enable Cache",
|
|
25
|
+
description: "Master toggle for all caching. When disabled, cache reads always miss.",
|
|
26
|
+
default: true,
|
|
27
|
+
section: "general",
|
|
28
|
+
order: 1
|
|
29
|
+
})
|
|
30
|
+
], CacheSettings.prototype, "enabled", void 0);
|
|
31
|
+
_ts_decorate([
|
|
32
|
+
SettingField.Number({
|
|
33
|
+
label: "Default TTL (seconds)",
|
|
34
|
+
description: "Default time-to-live for cached entries, in seconds.",
|
|
35
|
+
default: 300,
|
|
36
|
+
section: "general",
|
|
37
|
+
order: 2
|
|
38
|
+
})
|
|
39
|
+
], CacheSettings.prototype, "defaultTtl", void 0);
|
|
40
|
+
_ts_decorate([
|
|
41
|
+
SettingField.Number({
|
|
42
|
+
label: "Max Memory Entries",
|
|
43
|
+
description: "Maximum number of entries in the in-memory cache before LRU eviction. Only applies to the memory adapter.",
|
|
44
|
+
default: 1e3,
|
|
45
|
+
section: "memory",
|
|
46
|
+
order: 1
|
|
47
|
+
})
|
|
48
|
+
], CacheSettings.prototype, "maxMemoryEntries", void 0);
|
|
49
|
+
CacheSettings = _ts_decorate([
|
|
50
|
+
Settings({
|
|
51
|
+
group: "cache",
|
|
52
|
+
label: "Cache",
|
|
53
|
+
icon: "zap",
|
|
54
|
+
order: 8,
|
|
55
|
+
description: "Configure cache behavior and time-to-live defaults",
|
|
56
|
+
sections: [
|
|
57
|
+
{
|
|
58
|
+
name: "general",
|
|
59
|
+
label: "General",
|
|
60
|
+
icon: "settings",
|
|
61
|
+
description: "General cache settings",
|
|
62
|
+
order: 1
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: "memory",
|
|
66
|
+
label: "Memory Adapter",
|
|
67
|
+
icon: "cpu",
|
|
68
|
+
description: "Settings for the built-in in-memory cache adapter",
|
|
69
|
+
order: 2
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
})
|
|
73
|
+
], CacheSettings);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
export { CacheSettings, init_cache_settings };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { init_constants, PLUGIN_METADATA, PLUGIN_FRONTEND_MANIFEST, PLUGIN_MODULE, getPluginOptionsToken } from './chunk-
|
|
1
|
+
import { init_constants, PLUGIN_METADATA, PLUGIN_FRONTEND_MANIFEST, PLUGIN_MODULE, getPluginOptionsToken } from './chunk-5HGRFVWS.js';
|
|
2
2
|
import { __name } from './chunk-6EUZQHAF.js';
|
|
3
3
|
import { Injectable, Inject } from '@nestjs/common';
|
|
4
4
|
|
|
@@ -32,7 +32,7 @@ var getSsoOidcClient;
|
|
|
32
32
|
var init_getSsoOidcClient = __esm({
|
|
33
33
|
"../../node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js"() {
|
|
34
34
|
getSsoOidcClient = /* @__PURE__ */ __name(async (ssoRegion, init = {}, callerClientConfig) => {
|
|
35
|
-
const { SSOOIDCClient } = await import('./sso-oidc-
|
|
35
|
+
const { SSOOIDCClient } = await import('./sso-oidc-CMVLR2KO.js');
|
|
36
36
|
const coalesce = /* @__PURE__ */ __name((prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop], "coalesce");
|
|
37
37
|
const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, {
|
|
38
38
|
region: ssoRegion ?? init.clientConfig?.region,
|
|
@@ -50,7 +50,7 @@ var init_getNewSsoOidcToken = __esm({
|
|
|
50
50
|
"../../node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js"() {
|
|
51
51
|
init_getSsoOidcClient();
|
|
52
52
|
getNewSsoOidcToken = /* @__PURE__ */ __name(async (ssoToken, ssoRegion, init = {}, callerClientConfig) => {
|
|
53
|
-
const { CreateTokenCommand } = await import('./sso-oidc-
|
|
53
|
+
const { CreateTokenCommand } = await import('./sso-oidc-CMVLR2KO.js');
|
|
54
54
|
const ssoOidcClient = await getSsoOidcClient(ssoRegion, init, callerClientConfig);
|
|
55
55
|
return ssoOidcClient.send(new CreateTokenCommand({
|
|
56
56
|
clientId: ssoToken.clientId,
|
|
@@ -261,7 +261,7 @@ var init_resolveSSOCredentials = __esm({
|
|
|
261
261
|
});
|
|
262
262
|
}
|
|
263
263
|
const { accessToken } = token;
|
|
264
|
-
const { SSOClient, GetRoleCredentialsCommand } = await import('./loadSso-
|
|
264
|
+
const { SSOClient, GetRoleCredentialsCommand } = await import('./loadSso-5XNIYOZP.js');
|
|
265
265
|
const sso = ssoClient || new SSOClient(Object.assign({}, clientConfig ?? {}, {
|
|
266
266
|
logger: clientConfig?.logger ?? callerClientConfig?.logger ?? parentClientConfig?.logger,
|
|
267
267
|
region: clientConfig?.region ?? ssoRegion,
|