@amedia/user 0.14.60 → 0.14.61

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/personas.js CHANGED
@@ -28,6 +28,7 @@ export default {
28
28
  'aib_ag_30,aib_co_38,aib_ge_01,aib_lp_08,aib_mu_3808',
29
29
  aib_ad_segments_user:
30
30
  'aib_ag_30,aib_co_38,aib_ge_01,aib_lp_08,aib_mu_3808',
31
+ altno_betatester: 'true',
31
32
  birth_year: '1983',
32
33
  birth_year_user: '1983',
33
34
  customer_grouping_number: '0',
package/dist/user.js CHANGED
@@ -2,7 +2,8 @@ import personas from './personas.js';
2
2
 
3
3
  function isRunningOnLocalhost() {
4
4
  return (
5
- location.host === 'localhost' || /localhost.api.no$/.test(location.host)
5
+ location.hostname === 'localhost' ||
6
+ /localhost.api.no$/.test(location.hostname)
6
7
  );
7
8
  }
8
9
 
@@ -22,7 +23,8 @@ function getMockData() {
22
23
  console.warn(
23
24
  `[@amedia/user]: Unknown persona (${persona}) was selected. Falling back to 'donald'.`,
24
25
  '\n\nAvailable personas\n',
25
- availablePersonas
26
+ availablePersonas,
27
+ 'Control active persona by setting aid_persona=persona search param.'
26
28
  );
27
29
  persona = 'donald';
28
30
  }
@@ -34,7 +36,8 @@ function getMockData() {
34
36
  '\n\nOther personas available:\n',
35
37
  Object.keys(availablePersonas)
36
38
  .filter((p) => p !== persona)
37
- .reduce((p, c) => (p[c] = availablePersonas[c]) && p, {})
39
+ .reduce((p, c) => (p[c] = availablePersonas[c]) && p, {}),
40
+ 'Control active persona by setting aid_persona=persona search param.'
38
41
  );
39
42
  }
40
43
  currentPersona = persona;
@@ -143,6 +146,7 @@ export class PaywallUnlockRequest {
143
146
  }
144
147
  }
145
148
 
149
+ export const getLoginUrl = () => '/stubbed-login-url';
146
150
  export const goToLoginPage = notImplemented;
147
151
  export const logout = notImplemented;
148
152
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amedia/user",
3
- "version": "0.14.60",
3
+ "version": "0.14.61",
4
4
  "description": "Client lib for working with aID user and associated data",
5
5
  "repository": "https://github.com/amedia/amedia-user-js",
6
6
  "author": "Amedia Utvikling (ID og data)",
@@ -54,19 +54,19 @@
54
54
  "@changesets/cli": "^2.25.2",
55
55
  "@eik/cli": "^2.0.22",
56
56
  "@eik/esbuild-plugin": "^1.1.23",
57
- "@types/jest": "^29.2.2",
57
+ "@types/jest": "^29.2.3",
58
58
  "concurrently": "^7.5.0",
59
59
  "cors": "^2.8.5",
60
- "esbuild": "0.15.13",
60
+ "esbuild": "0.15.14",
61
61
  "express": "^4.18.2",
62
62
  "jest": "^29.3.1",
63
- "jest-environment-jsdom": "^29.2.2",
63
+ "jest-environment-jsdom": "^29.3.1",
64
64
  "jest-extended": "^3.1.0",
65
65
  "jest-fetch-mock": "^3.0.3",
66
66
  "mockdate": "^3.0.5",
67
67
  "npm-run-all": "^4.1.5",
68
68
  "prettier": "^2.7.1",
69
- "rollup": "3.2.5",
69
+ "rollup": "3.3.0",
70
70
  "rollup-plugin-dts": "5.0.0",
71
71
  "ts-jest": "^29.0.3",
72
72
  "tslib": "^2.4.1",