keycloakify 5.3.2 → 5.4.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/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ### **5.4.2** (2022-06-01)
2
+
3
+ - Prevent rate limite in CI by authenticating
4
+
5
+ ### **5.4.1** (2022-06-01)
6
+
7
+
8
+
9
+ ## **5.4.0** (2022-05-23)
10
+
11
+ - #109
12
+
1
13
  ### **5.3.2** (2022-05-04)
2
14
 
3
15
  - Merge pull request #101 from Romcol/bugfix/99
@@ -124,9 +124,11 @@ ${ftl_object_to_js_code_declaring_an_object(.data_model, [])?no_esc};
124
124
  ) || (
125
125
  <#-- https://github.com/InseeFrLab/keycloakify/pull/65#issuecomment-991896344 (reports with saml-post-form.ftl) -->
126
126
  <#-- https://github.com/InseeFrLab/keycloakify/issues/91#issue-1212319466 (reports with error.ftl and Kc18) -->
127
+ <#-- https://github.com/InseeFrLab/keycloakify/issues/109#issuecomment-1134610163 -->
127
128
  key == "loginAction" &&
128
129
  are_same_path(path, ["url"]) &&
129
- ["saml-post-form.ftl", "error.ftl"]?seq_contains(pageId)
130
+ ["saml-post-form.ftl", "error.ftl", "info.ftl"]?seq_contains(pageId) &&
131
+ !(auth?has_content && auth.showTryAnotherWayLink())
130
132
  ) || (
131
133
  ["contextData", "idpConfig", "idp", "authenticationSession"]?seq_contains(key) &&
132
134
  are_same_path(path, ["brokerContext"]) &&
@@ -152,6 +154,33 @@ ${ftl_object_to_js_code_declaring_an_object(.data_model, [])?no_esc};
152
154
  </#attempt>
153
155
 
154
156
  </#if>
157
+
158
+ <#if key == "showUsername" && are_same_path(path, ["auth"])>
159
+ <#attempt>
160
+ <#return auth.showUsername()?c>
161
+ <#recover>
162
+ <#local out_seq += ["/*Couldn't evaluate auth.showUsername()*/"]>
163
+ <#continue>
164
+ </#attempt>
165
+ </#if>
166
+
167
+ <#if key == "showResetCredentials" && are_same_path(path, ["auth"])>
168
+ <#attempt>
169
+ <#return auth.showResetCredentials()?c>
170
+ <#recover>
171
+ <#local out_seq += ["/*Couldn't evaluate auth.showResetCredentials()*/"]>
172
+ <#continue>
173
+ </#attempt>
174
+ </#if>
175
+
176
+ <#if key == "showTryAnotherWayLink" && are_same_path(path, ["auth"])>
177
+ <#attempt>
178
+ <#return auth.showTryAnotherWayLink()?c>
179
+ <#recover>
180
+ <#local out_seq += ["/*Couldn't evaluate auth.showTryAnotherWayLink()*/"]>
181
+ <#continue>
182
+ </#attempt>
183
+ </#if>
155
184
 
156
185
  <#attempt>
157
186
  <#if !object[key]??>
@@ -32,9 +32,9 @@ export declare namespace KcContextBase {
32
32
  currentLanguageTag: KcLanguageTag;
33
33
  };
34
34
  auth?: {
35
- showUsername: boolean;
36
- showResetCredentials: boolean;
37
- showTryAnotherWayLink: boolean;
35
+ showUsername?: boolean;
36
+ showResetCredentials?: boolean;
37
+ showTryAnotherWayLink?: boolean;
38
38
  attemptedUsername?: string;
39
39
  };
40
40
  scripts: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keycloakify",
3
- "version": "5.3.2",
3
+ "version": "5.4.2",
4
4
  "description": "Keycloak theme generator for Reacts app",
5
5
  "repository": {
6
6
  "type": "git",
@@ -43,7 +43,6 @@
43
43
  "src/bin/promptKeycloakVersion.ts",
44
44
  "src/bin/tools/NpmModuleVersion.ts",
45
45
  "src/bin/tools/crawl.ts",
46
- "src/bin/tools/createOctokit.ts",
47
46
  "src/bin/tools/downloadAndUnzip.ts",
48
47
  "src/bin/tools/getProjectRoot.ts",
49
48
  "src/bin/tools/grant-exec-perms.ts",
@@ -150,9 +149,6 @@
150
149
  "bin/tools/crawl.d.ts",
151
150
  "bin/tools/crawl.js",
152
151
  "bin/tools/crawl.js.map",
153
- "bin/tools/createOctokit.d.ts",
154
- "bin/tools/createOctokit.js",
155
- "bin/tools/createOctokit.js.map",
156
152
  "bin/tools/downloadAndUnzip.d.ts",
157
153
  "bin/tools/downloadAndUnzip.js",
158
154
  "bin/tools/downloadAndUnzip.js.map",
@@ -338,7 +334,7 @@
338
334
  "homepage": "https://github.com/garronej/keycloakify",
339
335
  "peerDependencies": {
340
336
  "@emotion/react": "^11.4.1",
341
- "react": "^16.8.0 || ^17.0.0"
337
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
342
338
  },
343
339
  "devDependencies": {
344
340
  "@emotion/react": "^11.4.1",
@@ -358,14 +354,14 @@
358
354
  "@octokit/rest": "^18.12.0",
359
355
  "cheerio": "^1.0.0-rc.5",
360
356
  "cli-select": "^1.1.2",
361
- "evt": "2.0.0-beta.39",
357
+ "evt": "2.0.0-beta.43",
362
358
  "memoizee": "^0.4.15",
363
359
  "minimal-polyfills": "^2.2.1",
364
360
  "path-browserify": "^1.0.1",
365
- "powerhooks": "^0.14.0",
361
+ "powerhooks": "^0.17.1",
366
362
  "react-markdown": "^5.0.3",
367
363
  "scripting-tools": "^0.19.13",
368
- "tsafe": "^0.9.0",
369
- "tss-react": "^3.5.2"
364
+ "tsafe": "^0.10.0",
365
+ "tss-react": "^3.7.0"
370
366
  }
371
367
  }
@@ -124,9 +124,11 @@ ${ftl_object_to_js_code_declaring_an_object(.data_model, [])?no_esc};
124
124
  ) || (
125
125
  <#-- https://github.com/InseeFrLab/keycloakify/pull/65#issuecomment-991896344 (reports with saml-post-form.ftl) -->
126
126
  <#-- https://github.com/InseeFrLab/keycloakify/issues/91#issue-1212319466 (reports with error.ftl and Kc18) -->
127
+ <#-- https://github.com/InseeFrLab/keycloakify/issues/109#issuecomment-1134610163 -->
127
128
  key == "loginAction" &&
128
129
  are_same_path(path, ["url"]) &&
129
- ["saml-post-form.ftl", "error.ftl"]?seq_contains(pageId)
130
+ ["saml-post-form.ftl", "error.ftl", "info.ftl"]?seq_contains(pageId) &&
131
+ !(auth?has_content && auth.showTryAnotherWayLink())
130
132
  ) || (
131
133
  ["contextData", "idpConfig", "idp", "authenticationSession"]?seq_contains(key) &&
132
134
  are_same_path(path, ["brokerContext"]) &&
@@ -152,6 +154,33 @@ ${ftl_object_to_js_code_declaring_an_object(.data_model, [])?no_esc};
152
154
  </#attempt>
153
155
 
154
156
  </#if>
157
+
158
+ <#if key == "showUsername" && are_same_path(path, ["auth"])>
159
+ <#attempt>
160
+ <#return auth.showUsername()?c>
161
+ <#recover>
162
+ <#local out_seq += ["/*Couldn't evaluate auth.showUsername()*/"]>
163
+ <#continue>
164
+ </#attempt>
165
+ </#if>
166
+
167
+ <#if key == "showResetCredentials" && are_same_path(path, ["auth"])>
168
+ <#attempt>
169
+ <#return auth.showResetCredentials()?c>
170
+ <#recover>
171
+ <#local out_seq += ["/*Couldn't evaluate auth.showResetCredentials()*/"]>
172
+ <#continue>
173
+ </#attempt>
174
+ </#if>
175
+
176
+ <#if key == "showTryAnotherWayLink" && are_same_path(path, ["auth"])>
177
+ <#attempt>
178
+ <#return auth.showTryAnotherWayLink()?c>
179
+ <#recover>
180
+ <#local out_seq += ["/*Couldn't evaluate auth.showTryAnotherWayLink()*/"]>
181
+ <#continue>
182
+ </#attempt>
183
+ </#if>
155
184
 
156
185
  <#attempt>
157
186
  <#if !object[key]??>
@@ -52,9 +52,9 @@ export declare namespace KcContextBase {
52
52
  currentLanguageTag: KcLanguageTag;
53
53
  };
54
54
  auth?: {
55
- showUsername: boolean;
56
- showResetCredentials: boolean;
57
- showTryAnotherWayLink: boolean;
55
+ showUsername?: boolean;
56
+ showResetCredentials?: boolean;
57
+ showTryAnotherWayLink?: boolean;
58
58
  attemptedUsername?: string;
59
59
  };
60
60
  scripts: string[];
@@ -1,5 +0,0 @@
1
- export declare function createOctokit(params: {
2
- github_token: string;
3
- }): import("@octokit/core").Octokit & {
4
- paginate: import("@octokit/plugin-paginate-rest").PaginateInterface;
5
- } & import("@octokit/plugin-rest-endpoint-methods/dist-types/generated/method-types").RestEndpointMethods & import("@octokit/plugin-rest-endpoint-methods/dist-types/types").Api;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.createOctokit = void 0;
15
- var rest_1 = require("@octokit/rest");
16
- function createOctokit(params) {
17
- var github_token = params.github_token;
18
- return new rest_1.Octokit(__assign({}, (github_token !== "" ? { "auth": github_token } : {})));
19
- }
20
- exports.createOctokit = createOctokit;
21
- //# sourceMappingURL=createOctokit.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createOctokit.js","sourceRoot":"","sources":["../../src/bin/tools/createOctokit.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,sCAAwC;AAExC,SAAgB,aAAa,CAAC,MAAgC;IAClD,IAAA,YAAY,GAAK,MAAM,aAAX,CAAY;IAEhC,OAAO,IAAI,cAAO,cAAM,CAAC,YAAY,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAG,CAAC;AACrF,CAAC;AAJD,sCAIC"}
@@ -1,7 +0,0 @@
1
- import { Octokit } from "@octokit/rest";
2
-
3
- export function createOctokit(params: { github_token: string }) {
4
- const { github_token } = params;
5
-
6
- return new Octokit({ ...(github_token !== "" ? { "auth": github_token } : {}) });
7
- }