@genesislcap/foundation-login 12.0.1 → 13.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/dts/routes/base.d.ts.map +1 -1
- package/dist/esm/routes/base.js +28 -6
- package/package.json +18 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/routes/base.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,OAAO,EAEP,iBAAiB,EACjB,OAAO,EACP,cAAc,EACd,OAAO,EACR,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAEL,OAAO,EAGP,WAAW,EAIZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAGvD,OAAO,EAAsB,cAAc,EAAW,WAAW,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAGlG;;GAEG;AACH,eAAO,MAAM,eAAe,OAAQ,CAAC;AAErC;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,EAAE,WAAW,CAAC;CACrB,CAAC;AAEF;;;;;GAKG;AACH,qBAAa,iBAAkB,SAAQ,WAAY,YAAW,UAAU;IAC3D,SAAS,EAAG,SAAS,CAAC;IACrB,MAAM,EAAE,WAAW,CAAC;IAEhC,iBAAiB;CAMlB;AAED;;GAEG;AACH,qBAAa,SAAU,SAAQ,iBAAiB;IACxC,IAAI,EAAG,IAAI,CAAC;IACT,OAAO,EAAG,OAAO,CAAC;IAClB,OAAO,EAAG,OAAO,CAAC;IACX,cAAc,EAAG,cAAc,CAAC;IAC7B,iBAAiB,EAAG,iBAAiB,CAAC;IAE7C,IAAI,EAAE,MAAM,CAAM;IAClB,YAAY,EAAE,MAAM,CAAM;IAC1B,QAAQ,EAAE,MAAM,CAAM;IACtB,KAAK,EAAE,MAAM,CAAM;IACnB,QAAQ,EAAE,MAAM,CAAM;IACtB,SAAS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;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,gCAAiC,MAAM,2DAYhE,CAAC;AAOF;;GAEG;AACH,eAAO,MAAM,cAAc,8BAA+B,KAAK,GAAG,cAAc,2DAe/E,CAAC;AAEF;;;;GAIG;AACH,qBA2Ba,iBAAkB,SAAQ,iBAAiB;IACtD,iBAAiB;CAIlB;AAED;;GAEG;AACH,qBAoBa,WAAY,SAAQ,iBAAiB;CAAG;AAErD;;GAEG;AACH,eAAO,MAAM,UAAU,kCAAmC,OAAO,2DAUhE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,gCAChB,MAAM,eACD,MAAM,aACR,OAAO,2DAWlB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,mFAQjC,CAAC;AAEF;;;;GAIG;AACH,qBA0Ba,cAAe,SAAQ,WAAW;IACjC,UAAU,EAAE,MAAM,CAAM;IAC9B,OAAO,EAAE,MAAM,CAAM;IACwB,QAAQ,EAAE,OAAO,CAAS;IAC7E,eAAe;CAGhB;AAED;;GAEG;AACH,qBAuBa,mBAAoB,SAAQ,WAAW;IACK,YAAY,EAAE,OAAO,CAAS;CACtF"}
|
package/dist/esm/routes/base.js
CHANGED
|
@@ -102,7 +102,7 @@ export class BaseRoute extends ConfigHostElement {
|
|
|
102
102
|
}, delay);
|
|
103
103
|
}
|
|
104
104
|
autofill() {
|
|
105
|
-
var _a, _b, _c;
|
|
105
|
+
var _a, _b, _c, _d, _e;
|
|
106
106
|
return __awaiter(this, void 0, void 0, function* () {
|
|
107
107
|
let credentialData;
|
|
108
108
|
try {
|
|
@@ -115,16 +115,38 @@ export class BaseRoute extends ConfigHostElement {
|
|
|
115
115
|
const cookieData = yield this.credentialManager.getCredentialsFromCookie();
|
|
116
116
|
if (containerData && cookieData) {
|
|
117
117
|
/**
|
|
118
|
-
* Upgrade path: They have chosen a profile from the container, yet also have a cookie... kill the cookie now!
|
|
118
|
+
* Upgrade path: They have chosen a profile from the container, yet also have a cookie... kill the legacy cookie now!
|
|
119
119
|
*/
|
|
120
120
|
this.credentialManager.removeCookie();
|
|
121
121
|
}
|
|
122
|
-
|
|
122
|
+
/**
|
|
123
|
+
* They have chosen a profile from the container
|
|
124
|
+
*/
|
|
125
|
+
if (containerData) {
|
|
126
|
+
credentialData = containerData;
|
|
127
|
+
}
|
|
128
|
+
else if (cookieData) {
|
|
129
|
+
/**
|
|
130
|
+
* They have NOT chosen a profile from the container (or it wasn't supported) yet have a cookie available.
|
|
131
|
+
*
|
|
132
|
+
* Possible legacy cookie during upgrade, so we will need to reformat to CredentialData shape.
|
|
133
|
+
*/
|
|
134
|
+
const legacyCookie = cookieData;
|
|
135
|
+
const name = (_a = cookieData.name) !== null && _a !== void 0 ? _a : legacyCookie.username;
|
|
136
|
+
const password = cookieData.password;
|
|
137
|
+
const organisation = legacyCookie.organisation;
|
|
138
|
+
const id = ((_b = cookieData.id) !== null && _b !== void 0 ? _b : organisation) ? `${name}:${organisation}` : name;
|
|
139
|
+
credentialData = {
|
|
140
|
+
name,
|
|
141
|
+
password,
|
|
142
|
+
id,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
123
145
|
if (credentialData) {
|
|
124
|
-
this.username = (
|
|
125
|
-
this.password = (
|
|
146
|
+
this.username = (_c = credentialData.name) !== null && _c !== void 0 ? _c : '';
|
|
147
|
+
this.password = (_d = credentialData.password) !== null && _d !== void 0 ? _d : '';
|
|
126
148
|
if (this.config.fields.organisation) {
|
|
127
|
-
const combinedCompIdUsername = (
|
|
149
|
+
const combinedCompIdUsername = (_e = credentialData.id) !== null && _e !== void 0 ? _e : '';
|
|
128
150
|
const valueParts = combinedCompIdUsername.split(':');
|
|
129
151
|
const orgIdx = valueParts.length === 2 ? 1 : 0;
|
|
130
152
|
const proposedOrganisation = valueParts[orgIdx];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-login",
|
|
3
3
|
"description": "Genesis Foundation Login",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "13.0.0",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
7
7
|
"types": "dist/foundation-login.d.ts",
|
|
@@ -11,11 +11,21 @@
|
|
|
11
11
|
"DEFAULT_PASSWORD": "Password11*",
|
|
12
12
|
"PORT": 5030
|
|
13
13
|
},
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/foundation-login.d.ts",
|
|
17
|
+
"default": "./dist/esm/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./e2e": {
|
|
20
|
+
"default": "./test/e2e/index.ts"
|
|
21
|
+
},
|
|
22
|
+
"./package.json": "./package.json"
|
|
23
|
+
},
|
|
14
24
|
"scripts": {
|
|
15
25
|
"api": "npm run api:extract && npm run api:document",
|
|
16
26
|
"api:extract": "api-extractor run",
|
|
17
27
|
"api:document": "api-documenter markdown -i dist -o docs/api",
|
|
18
|
-
"build": "npm run build:tsc && npm run
|
|
28
|
+
"build": "npm run clean && npm run build:tsc && npm run copy-files && npm run api",
|
|
19
29
|
"build:tsc": "tsc -b ./tsconfig.build.json",
|
|
20
30
|
"build:webpack": "cross-env NODE_ENV=production webpack",
|
|
21
31
|
"build:webpack:make-federated-types": "make-federated-types",
|
|
@@ -26,7 +36,6 @@
|
|
|
26
36
|
"dev": "npm run dev:webpack",
|
|
27
37
|
"dev:webpack": "cross-env NODE_ENV=development API_HOST=$npm_package_config_API_HOST DEFAULT_USER=$npm_package_config_DEFAULT_USER DEFAULT_PASSWORD=$npm_package_config_DEFAULT_PASSWORD webpack serve --open",
|
|
28
38
|
"dev:webpack:https": "npm run dev:webpack -- --https",
|
|
29
|
-
"prepare": "npm run clean && npm run build:tsc && npm run copy-files && npm run api",
|
|
30
39
|
"serve": "serve dist -p $npm_package_config_PORT",
|
|
31
40
|
"test": "npm run test:unit && npm run test:e2e",
|
|
32
41
|
"test:coverage": "c8 --include=src npm run test:unit",
|
|
@@ -43,6 +52,7 @@
|
|
|
43
52
|
"test:unit:watch": "watchlist src test -- npm run test:unit"
|
|
44
53
|
},
|
|
45
54
|
"devDependencies": {
|
|
55
|
+
"@genesislcap/foundation-testing": "^13.0.0",
|
|
46
56
|
"@microsoft/api-documenter": "^7.19.13",
|
|
47
57
|
"@microsoft/api-extractor": "^7.31.1",
|
|
48
58
|
"@module-federation/dashboard-plugin": "2.3.0",
|
|
@@ -85,11 +95,10 @@
|
|
|
85
95
|
"webpack-merge": "^5.7.3"
|
|
86
96
|
},
|
|
87
97
|
"dependencies": {
|
|
88
|
-
"@genesislcap/foundation-comms": "^
|
|
89
|
-
"@genesislcap/foundation-
|
|
90
|
-
"@genesislcap/foundation-
|
|
91
|
-
"@genesislcap/foundation-
|
|
92
|
-
"@genesislcap/foundation-zero": "^12.0.1",
|
|
98
|
+
"@genesislcap/foundation-comms": "^13.0.0",
|
|
99
|
+
"@genesislcap/foundation-ui": "^13.0.0",
|
|
100
|
+
"@genesislcap/foundation-utils": "^13.0.0",
|
|
101
|
+
"@genesislcap/foundation-zero": "^13.0.0",
|
|
93
102
|
"@microsoft/fast-components": "^2.21.3",
|
|
94
103
|
"@microsoft/fast-element": "^1.7.0",
|
|
95
104
|
"@microsoft/fast-foundation": "^2.33.2",
|
|
@@ -102,5 +111,5 @@
|
|
|
102
111
|
"publishConfig": {
|
|
103
112
|
"access": "public"
|
|
104
113
|
},
|
|
105
|
-
"gitHead": "
|
|
114
|
+
"gitHead": "71d64612efd2827cb02ef308a22f3637bacb0bf2"
|
|
106
115
|
}
|