@newskit-render/core 2.44.0-alpha.0 → 2.44.0-alpha.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/config/environment.ts
CHANGED
|
@@ -42,6 +42,8 @@ export const getSanitizedConfig = () => {
|
|
|
42
42
|
algoliaApiKey: process.env.ALGOLIA_API_KEY as string,
|
|
43
43
|
algoliaIndex: process.env.ALGOLIA_INDEX as string,
|
|
44
44
|
nodeEnviroment: process.env.NODE_ENV as string,
|
|
45
|
+
acsSessionUrlTimes: process.env.ACS_SESSION_URL_TIMES as string,
|
|
46
|
+
acsSessionUrlSun: process.env.ACS_SESSION_URL_SUN as string,
|
|
45
47
|
}
|
|
46
48
|
}
|
|
47
49
|
|
|
@@ -71,4 +73,6 @@ export const {
|
|
|
71
73
|
algoliaApiKey,
|
|
72
74
|
algoliaIndex,
|
|
73
75
|
nodeEnviroment,
|
|
76
|
+
acsSessionUrlTimes,
|
|
77
|
+
acsSessionUrlSun,
|
|
74
78
|
} = config
|
|
@@ -12,6 +12,9 @@ spec:
|
|
|
12
12
|
template:
|
|
13
13
|
metadata:
|
|
14
14
|
annotations:
|
|
15
|
+
{{- if eq .Values.environment "pr" }}
|
|
16
|
+
rollme: {{ randAlphaNum 5 }}
|
|
17
|
+
{{- end }}
|
|
15
18
|
checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
|
|
16
19
|
labels: {{ include "core.selectors" . | nindent 8 }}
|
|
17
20
|
spec:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newskit-render/core",
|
|
3
|
-
"version": "2.44.0-alpha.
|
|
3
|
+
"version": "2.44.0-alpha.2",
|
|
4
4
|
"description": "Newskit Render - Core package",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"@emotion-icons/material-outlined": "3.14.0",
|
|
40
40
|
"@emotion/react": "11.9.3",
|
|
41
41
|
"@emotion/styled": "11.9.3",
|
|
42
|
-
"@newskit-render/api": "^1.6.
|
|
42
|
+
"@newskit-render/api": "^1.6.5-alpha.0",
|
|
43
43
|
"@newskit-render/auth": "^1.3.9",
|
|
44
|
-
"@newskit-render/checkout": "^2.5.0-alpha.
|
|
44
|
+
"@newskit-render/checkout": "^2.5.0-alpha.1",
|
|
45
45
|
"@newskit-render/feature-flags": "^1.4.10",
|
|
46
|
-
"@newskit-render/feed": "^1.4.
|
|
47
|
-
"@newskit-render/my-account": "^4.4.0-alpha.
|
|
48
|
-
"@newskit-render/shared-components": "^2.4.0",
|
|
49
|
-
"@newskit-render/standalone-components": "^2.5.0",
|
|
46
|
+
"@newskit-render/feed": "^1.4.15-alpha.0",
|
|
47
|
+
"@newskit-render/my-account": "^4.4.0-alpha.1",
|
|
48
|
+
"@newskit-render/shared-components": "^2.4.1-alpha.0",
|
|
49
|
+
"@newskit-render/standalone-components": "^2.5.1-alpha.0",
|
|
50
50
|
"@newskit-render/validation": "^1.5.11",
|
|
51
51
|
"@next/font": "13.1.6",
|
|
52
52
|
"cross-fetch": "3.1.5",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { fetchSessionCookie } from '@newskit-render/api'
|
|
2
|
+
import { safeJsonParse } from '@newskit-render/shared-components'
|
|
3
|
+
import { NextApiRequest, NextApiResponse } from 'next'
|
|
4
|
+
import { acsSessionUrlTimes, acsSessionUrlSun } from '../../../../config'
|
|
5
|
+
|
|
6
|
+
const tenantMap = {
|
|
7
|
+
SUN: acsSessionUrlSun,
|
|
8
|
+
TIMES: acsSessionUrlTimes,
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const handler = async (req: NextApiRequest, res: NextApiResponse) => {
|
|
12
|
+
const { username, password, tenant } = safeJsonParse(req.body)
|
|
13
|
+
const tenantUrl = tenantMap[tenant]
|
|
14
|
+
|
|
15
|
+
const result = await fetchSessionCookie({
|
|
16
|
+
username,
|
|
17
|
+
password,
|
|
18
|
+
tenantUrl,
|
|
19
|
+
})
|
|
20
|
+
res.send(result)
|
|
21
|
+
}
|
|
22
|
+
export default handler
|