@adminforth/login-captcha 1.1.6 → 1.1.8

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/index.js CHANGED
@@ -18,7 +18,7 @@ export default class CaptchaPlugin extends AdminForthPlugin {
18
18
  modifyResourceConfig: { get: () => super.modifyResourceConfig }
19
19
  });
20
20
  return __awaiter(this, void 0, void 0, function* () {
21
- var _a;
21
+ var _a, _b;
22
22
  _super.modifyResourceConfig.call(this, adminforth, resourceConfig);
23
23
  if (!((_a = adminforth.config.customization) === null || _a === void 0 ? void 0 : _a.loginPageInjections)) {
24
24
  adminforth.config.customization = Object.assign(Object.assign({}, adminforth.config.customization), { loginPageInjections: { underInputs: [], panelHeader: [] } });
@@ -36,6 +36,9 @@ export default class CaptchaPlugin extends AdminForthPlugin {
36
36
  pluginInstanceId: this.pluginInstanceId
37
37
  }
38
38
  });
39
+ if (!((_b = adminforth.config.customization) === null || _b === void 0 ? void 0 : _b.customHeadItems)) {
40
+ adminforth.config.customization.customHeadItems = [];
41
+ }
39
42
  adminforth.config.customization.customHeadItems.push({
40
43
  tagName: 'script',
41
44
  attributes: { src: this.options.captchaAdapter.getScriptSrc(), async: 'true', defer: 'true' }
package/index.ts CHANGED
@@ -33,6 +33,9 @@ export default class CaptchaPlugin extends AdminForthPlugin {
33
33
  }
34
34
  });
35
35
 
36
+ if (!adminforth.config.customization?.customHeadItems) {
37
+ adminforth.config.customization.customHeadItems = [];
38
+ }
36
39
  adminforth.config.customization.customHeadItems.push(
37
40
  {
38
41
  tagName: 'script',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/login-captcha",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "keywords": [],
14
14
  "author": "",
15
- "license": "ISC",
15
+ "license": "MIT",
16
16
  "description": "",
17
17
  "devDependencies": {
18
18
  "@types/node": "latest",