@northern.tech/store 0.19.0 → 0.19.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions.js +1 -1
- package/dist/api/general-api.cjs +13 -9
- package/dist/api/general-api.cjs.map +1 -1
- package/dist/api/general-api.js +3 -3
- package/dist/api/users-api.cjs +13 -9
- package/dist/api/users-api.cjs.map +1 -1
- package/dist/api/users-api.js +4 -4
- package/dist/appSlice/constants.cjs +8 -4
- package/dist/appSlice/constants.cjs.map +1 -1
- package/dist/appSlice/constants.d.cts +1 -1
- package/dist/appSlice/constants.d.ts +1 -1
- package/dist/appSlice/constants.js +1 -1
- package/dist/appSlice/index.js +1 -1
- package/dist/appSlice/mocks.js +1 -1
- package/dist/appSlice/thunks.cjs +37 -21
- package/dist/appSlice/thunks.cjs.map +1 -1
- package/dist/appSlice/thunks.js +12 -12
- package/dist/auth.cjs +7 -9
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.js +2 -2
- package/dist/{chunk-GEQ2QQEE.js → chunk-42GZ6FGV.js} +2 -2
- package/dist/{chunk-QL6FN2JC.js → chunk-43ZBO3JW.js} +2 -2
- package/dist/{chunk-GAHFKM3N.js → chunk-45BHMNX6.js} +5 -5
- package/dist/{chunk-EL672W25.js → chunk-AJ6DIDO4.js} +9 -5
- package/dist/chunk-AJ6DIDO4.js.map +1 -0
- package/dist/{chunk-XC7DABLM.js → chunk-AV7SRATY.js} +6 -6
- package/dist/{chunk-U5TPV5X5.js → chunk-B3C6H2PR.js} +2 -2
- package/dist/{chunk-5M6EUVNO.js → chunk-IRQRV552.js} +8 -2
- package/dist/chunk-IRQRV552.js.map +1 -0
- package/dist/{chunk-QFYSFHAF.js → chunk-KJ2SUFAU.js} +19 -10
- package/dist/chunk-KJ2SUFAU.js.map +1 -0
- package/dist/{chunk-FDSMCFV5.js → chunk-UVTLZV34.js} +8 -10
- package/dist/chunk-UVTLZV34.js.map +1 -0
- package/dist/{chunk-Y3DJIMEN.js → chunk-XJLZK4QY.js} +3 -3
- package/dist/{chunk-TJBX7YHM.js → chunk-XOASGJZU.js} +5 -5
- package/dist/{chunk-RVAERI6U.js → chunk-ZAZTNDSY.js} +2 -2
- package/dist/commonConstants.js +1 -1
- package/dist/commonSelectors.cjs +8 -4
- package/dist/commonSelectors.cjs.map +1 -1
- package/dist/commonSelectors.js +5 -5
- package/dist/constants.cjs +8 -4
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/deploymentsSlice/constants.js +1 -1
- package/dist/deploymentsSlice/index.js +1 -1
- package/dist/deploymentsSlice/mocks.js +1 -1
- package/dist/deploymentsSlice/selectors.js +1 -1
- package/dist/deploymentsSlice/thunks.cjs +37 -21
- package/dist/deploymentsSlice/thunks.cjs.map +1 -1
- package/dist/deploymentsSlice/thunks.js +12 -12
- package/dist/devicesSlice/constants.js +1 -1
- package/dist/devicesSlice/index.js +1 -1
- package/dist/devicesSlice/mocks.js +1 -1
- package/dist/devicesSlice/selectors.js +1 -1
- package/dist/devicesSlice/thunks.cjs +39 -21
- package/dist/devicesSlice/thunks.cjs.map +1 -1
- package/dist/devicesSlice/thunks.d.cts +41 -3
- package/dist/devicesSlice/thunks.d.ts +41 -3
- package/dist/devicesSlice/thunks.js +14 -12
- package/dist/liststatehook.js +1 -1
- package/dist/locationutils.js +1 -1
- package/dist/monitorSlice/index.js +1 -1
- package/dist/monitorSlice/mocks.js +1 -1
- package/dist/monitorSlice/thunks.cjs +21 -13
- package/dist/monitorSlice/thunks.cjs.map +1 -1
- package/dist/monitorSlice/thunks.js +9 -9
- package/dist/onboardingSlice/thunks.cjs +40 -24
- package/dist/onboardingSlice/thunks.cjs.map +1 -1
- package/dist/onboardingSlice/thunks.js +12 -12
- package/dist/organizationSlice/constants.js +1 -1
- package/dist/organizationSlice/index.js +1 -1
- package/dist/organizationSlice/mocks.js +1 -1
- package/dist/organizationSlice/selectors.js +1 -1
- package/dist/organizationSlice/thunks.cjs +43 -27
- package/dist/organizationSlice/thunks.cjs.map +1 -1
- package/dist/organizationSlice/thunks.js +12 -12
- package/dist/releasesSlice/index.js +1 -1
- package/dist/releasesSlice/mocks.js +1 -1
- package/dist/releasesSlice/selectors.js +3 -3
- package/dist/releasesSlice/thunks.cjs +21 -13
- package/dist/releasesSlice/thunks.cjs.map +1 -1
- package/dist/releasesSlice/thunks.js +9 -9
- package/dist/selectors.cjs +8 -4
- package/dist/selectors.cjs.map +1 -1
- package/dist/selectors.js +5 -5
- package/dist/sockethook.js +1 -1
- package/dist/store.cjs +7 -9
- package/dist/store.cjs.map +1 -1
- package/dist/store.js +3 -3
- package/dist/storehooks.cjs +50 -34
- package/dist/storehooks.cjs.map +1 -1
- package/dist/storehooks.js +12 -12
- package/dist/thunks.cjs +48 -30
- package/dist/thunks.cjs.map +1 -1
- package/dist/thunks.d.cts +1 -1
- package/dist/thunks.d.ts +1 -1
- package/dist/thunks.js +14 -12
- package/dist/useDeploymentDevice.cjs +37 -21
- package/dist/useDeploymentDevice.cjs.map +1 -1
- package/dist/useDeploymentDevice.js +12 -12
- package/dist/usersSlice/constants.js +1 -1
- package/dist/usersSlice/index.js +1 -1
- package/dist/usersSlice/mocks.js +1 -1
- package/dist/usersSlice/selectors.cjs +8 -4
- package/dist/usersSlice/selectors.cjs.map +1 -1
- package/dist/usersSlice/selectors.js +3 -3
- package/dist/usersSlice/thunks.cjs +37 -21
- package/dist/usersSlice/thunks.cjs.map +1 -1
- package/dist/usersSlice/thunks.js +12 -12
- package/dist/utils.cjs +8 -4
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.js +2 -2
- package/package.json +3 -3
- package/dist/chunk-5M6EUVNO.js.map +0 -1
- package/dist/chunk-EL672W25.js.map +0 -1
- package/dist/chunk-FDSMCFV5.js.map +0 -1
- package/dist/chunk-QFYSFHAF.js.map +0 -1
- /package/dist/{chunk-GEQ2QQEE.js.map → chunk-42GZ6FGV.js.map} +0 -0
- /package/dist/{chunk-QL6FN2JC.js.map → chunk-43ZBO3JW.js.map} +0 -0
- /package/dist/{chunk-GAHFKM3N.js.map → chunk-45BHMNX6.js.map} +0 -0
- /package/dist/{chunk-XC7DABLM.js.map → chunk-AV7SRATY.js.map} +0 -0
- /package/dist/{chunk-U5TPV5X5.js.map → chunk-B3C6H2PR.js.map} +0 -0
- /package/dist/{chunk-Y3DJIMEN.js.map → chunk-XJLZK4QY.js.map} +0 -0
- /package/dist/{chunk-TJBX7YHM.js.map → chunk-XOASGJZU.js.map} +0 -0
- /package/dist/{chunk-RVAERI6U.js.map → chunk-ZAZTNDSY.js.map} +0 -0
|
@@ -14,19 +14,17 @@ var getSessionInfo = () => {
|
|
|
14
14
|
sessionInfo = JSON.parse(window.localStorage.getItem("JWT") ?? "");
|
|
15
15
|
} catch {
|
|
16
16
|
}
|
|
17
|
+
const jwtTokenFromCookie = cookies.get("JWT", { doNotParse: true }) ?? "";
|
|
18
|
+
if (jwtTokenFromCookie) {
|
|
19
|
+
setSessionInfo({ token: jwtTokenFromCookie });
|
|
20
|
+
cookies.remove("JWT");
|
|
21
|
+
cookies.remove("JWT", { path: "/" });
|
|
22
|
+
return { token: jwtTokenFromCookie, expiresAt: void 0 };
|
|
23
|
+
}
|
|
17
24
|
if (sessionInfo.expiresAt && new Date(sessionInfo.expiresAt) < /* @__PURE__ */ new Date()) {
|
|
18
25
|
cleanUp();
|
|
19
26
|
return { ...emptySession };
|
|
20
27
|
}
|
|
21
|
-
if (!sessionInfo.token) {
|
|
22
|
-
const jwtTokenFromCookie = cookies.get("JWT", { doNotParse: true }) ?? "";
|
|
23
|
-
if (jwtTokenFromCookie) {
|
|
24
|
-
setSessionInfo({ token: jwtTokenFromCookie });
|
|
25
|
-
sessionInfo.token = jwtTokenFromCookie;
|
|
26
|
-
cookies.remove("JWT");
|
|
27
|
-
cookies.remove("JWT", { path: "/" });
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
28
|
sessionInfo.token = sessionInfo.token || "";
|
|
31
29
|
tokenCache = sessionInfo.token;
|
|
32
30
|
return sessionInfo;
|
|
@@ -67,4 +65,4 @@ export {
|
|
|
67
65
|
cleanUp,
|
|
68
66
|
updateMaxAge
|
|
69
67
|
};
|
|
70
|
-
//# sourceMappingURL=chunk-
|
|
68
|
+
//# sourceMappingURL=chunk-UVTLZV34.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/auth.ts"],"sourcesContent":["// Copyright 2016 Northern.tech AS\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\nimport Cookies from 'universal-cookie';\n\nimport { TIMEOUTS, maxSessionAge } from './constants';\nimport type { UserSession } from './usersSlice';\n\nconst cookies = new Cookies();\n\nconst emptySession = Object.freeze({ token: '', expiresAt: undefined }) as Readonly<UserSession>;\n\nlet tokenCache = '';\n\nexport const getSessionInfo = (): UserSession => {\n let sessionInfo = { ...emptySession } as UserSession;\n try {\n sessionInfo = JSON.parse(window.localStorage.getItem('JWT') ?? '');\n } catch {\n // most likely not logged in - nothing to do here\n }\n\n // check for cookie first to handles sso login while an old/expired token may still exist in cache/ localStorage\n const jwtTokenFromCookie = cookies.get('JWT', { doNotParse: true }) ?? '';\n if (jwtTokenFromCookie) {\n setSessionInfo({ token: jwtTokenFromCookie });\n cookies.remove('JWT');\n cookies.remove('JWT', { path: '/' });\n return { token: jwtTokenFromCookie, expiresAt: undefined };\n }\n if (sessionInfo.expiresAt && new Date(sessionInfo.expiresAt) < new Date()) {\n cleanUp();\n return { ...emptySession };\n }\n sessionInfo.token = sessionInfo.token || '';\n tokenCache = sessionInfo.token;\n return sessionInfo;\n};\n\nexport const getToken = () => (tokenCache ? tokenCache : getSessionInfo().token);\n\nexport const setSessionInfo = ({ token, expiresAt }: UserSession) => {\n tokenCache = token;\n window.localStorage.setItem('JWT', JSON.stringify({ token, expiresAt }));\n};\n\nexport const cleanUp = () => {\n tokenCache = '';\n cookies.remove('JWT');\n cookies.remove('JWT', { path: '/' });\n window.localStorage.removeItem('JWT');\n window.localStorage.removeItem('oauth');\n};\n\nexport const updateMaxAge = ({ expiresAt, token }) => {\n const oAuthExpiration = Number(window.localStorage.getItem('oauth'));\n let updateWithOAuth = false;\n if (oAuthExpiration) {\n const soon = Date.now() + maxSessionAge * TIMEOUTS.oneSecond;\n updateWithOAuth = oAuthExpiration <= soon;\n if (updateWithOAuth) {\n window.localStorage.removeItem('oauth');\n }\n }\n if (token && expiresAt && (!oAuthExpiration || updateWithOAuth)) {\n const expiration = new Date();\n expiration.setSeconds(expiration.getSeconds() + maxSessionAge);\n setSessionInfo({ token, expiresAt: expiration.toISOString() });\n }\n};\n"],"mappings":";;;;;;AAaA,OAAO,aAAa;AAKpB,IAAM,UAAU,IAAI,QAAQ;AAE5B,IAAM,eAAe,OAAO,OAAO,EAAE,OAAO,IAAI,WAAW,OAAU,CAAC;AAEtE,IAAI,aAAa;AAEV,IAAM,iBAAiB,MAAmB;AAC/C,MAAI,cAAc,EAAE,GAAG,aAAa;AACpC,MAAI;AACF,kBAAc,KAAK,MAAM,OAAO,aAAa,QAAQ,KAAK,KAAK,EAAE;AAAA,EACnE,QAAQ;AAAA,EAER;AAGA,QAAM,qBAAqB,QAAQ,IAAI,OAAO,EAAE,YAAY,KAAK,CAAC,KAAK;AACvE,MAAI,oBAAoB;AACtB,mBAAe,EAAE,OAAO,mBAAmB,CAAC;AAC5C,YAAQ,OAAO,KAAK;AACpB,YAAQ,OAAO,OAAO,EAAE,MAAM,IAAI,CAAC;AACnC,WAAO,EAAE,OAAO,oBAAoB,WAAW,OAAU;AAAA,EAC3D;AACA,MAAI,YAAY,aAAa,IAAI,KAAK,YAAY,SAAS,IAAI,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|
8
8
|
// src/api/users-api.ts
|
|
9
9
|
import axios from "axios";
|
|
@@ -22,4 +22,4 @@ var users_api_default = Api;
|
|
|
22
22
|
export {
|
|
23
23
|
users_api_default
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
//# sourceMappingURL=chunk-XJLZK4QY.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getReleasesById
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-42GZ6FGV.js";
|
|
4
4
|
import {
|
|
5
5
|
getCurrentUser,
|
|
6
6
|
getGlobalSettings,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
getSecurityAlertDismissedTimestamp,
|
|
11
11
|
getUserSettings,
|
|
12
12
|
getUserSettingsInitialized
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-43ZBO3JW.js";
|
|
14
14
|
import {
|
|
15
15
|
getAuditLogEntry,
|
|
16
16
|
getIsServiceProvider,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
import {
|
|
42
42
|
listItemMapper,
|
|
43
43
|
mapUserRolesToUiPermissions
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-B3C6H2PR.js";
|
|
45
45
|
import {
|
|
46
46
|
ALL_DEVICES,
|
|
47
47
|
ATTRIBUTE_SCOPES,
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
ADDONS,
|
|
63
63
|
PLANS,
|
|
64
64
|
defaultReports
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-AJ6DIDO4.js";
|
|
66
66
|
|
|
67
67
|
// src/commonSelectors.ts
|
|
68
68
|
import { attributeDuplicateFilter, getDemoDeviceAddress as getDemoDeviceAddressHelper } from "@northern.tech/utils/helpers";
|
|
@@ -310,4 +310,4 @@ export {
|
|
|
310
310
|
getRelevantRoles,
|
|
311
311
|
getShowSecurityAlert
|
|
312
312
|
};
|
|
313
|
-
//# sourceMappingURL=chunk-
|
|
313
|
+
//# sourceMappingURL=chunk-XOASGJZU.js.map
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "./chunk-OLKM53RL.js";
|
|
30
30
|
import {
|
|
31
31
|
getToken
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-UVTLZV34.js";
|
|
33
33
|
import {
|
|
34
34
|
USER_LOGOUT,
|
|
35
35
|
settingsKeys
|
|
@@ -139,4 +139,4 @@ export {
|
|
|
139
139
|
useAppDispatch,
|
|
140
140
|
createAppAsyncThunk
|
|
141
141
|
};
|
|
142
|
-
//# sourceMappingURL=chunk-
|
|
142
|
+
//# sourceMappingURL=chunk-ZAZTNDSY.js.map
|
package/dist/commonConstants.js
CHANGED
package/dist/commonSelectors.cjs
CHANGED
|
@@ -104,7 +104,7 @@ var ADDONS = {
|
|
|
104
104
|
configure: {
|
|
105
105
|
id: "configure",
|
|
106
106
|
title: "Configure",
|
|
107
|
-
description: "
|
|
107
|
+
description: "Seamlessly configure applications and devices remotely \u2013 configure each device to its environment.",
|
|
108
108
|
needs: ["hasDeviceConfig"],
|
|
109
109
|
os: {
|
|
110
110
|
price: "$11/month",
|
|
@@ -119,7 +119,7 @@ var ADDONS = {
|
|
|
119
119
|
monitor: {
|
|
120
120
|
id: "monitor",
|
|
121
121
|
title: "Monitor",
|
|
122
|
-
description: "
|
|
122
|
+
description: "Detect and analyze health issues of devices, services and applications. Set up alerts so you can act quickly.",
|
|
123
123
|
needs: ["hasMonitor"],
|
|
124
124
|
os: {
|
|
125
125
|
price: "-",
|
|
@@ -134,7 +134,7 @@ var ADDONS = {
|
|
|
134
134
|
troubleshoot: {
|
|
135
135
|
id: "troubleshoot",
|
|
136
136
|
title: "Troubleshoot",
|
|
137
|
-
description: "
|
|
137
|
+
description: "Secure, remote access to your devices \u2013 quickly diagnose and fix issues in real time.",
|
|
138
138
|
needs: ["hasDeviceConnect"],
|
|
139
139
|
os: {
|
|
140
140
|
price: "$27/month",
|
|
@@ -148,7 +148,11 @@ var ADDONS = {
|
|
|
148
148
|
}
|
|
149
149
|
};
|
|
150
150
|
var BENEFITS = {
|
|
151
|
-
auditlog: {
|
|
151
|
+
auditlog: {
|
|
152
|
+
id: "auditlog",
|
|
153
|
+
benefit: "gain access to logs for important events such as changes to devices, deployments and user management, as well as remote terminal session replays",
|
|
154
|
+
requiredPlan: PLANS.enterprise.id
|
|
155
|
+
},
|
|
152
156
|
dashboard: { id: "dashboard", benefit: "actionable insights into the devices you are updating with Mender", requiredPlan: PLANS.enterprise.id },
|
|
153
157
|
deltaGeneration: {
|
|
154
158
|
id: "deltaGeneration",
|