@adobe-commerce/recaptcha 1.3.0 → 1.3.1-alpha-20260928110639

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,5 +1,41 @@
1
1
  # @adobe-commerce/recaptcha
2
2
 
3
+ ## 1.3.1-alpha-20260928110639
4
+
5
+ ### Patch Changes
6
+
7
+ - 3313516: feat(elsie): make `typescript` a peer dependency; remove the `types`
8
+ command
9
+
10
+ `typescript` is now an optional `peerDependency` of `@adobe-commerce/elsie`
11
+ instead of a bundled `dependency`. The `dts` Vite plugin (used by
12
+ `elsie build` for `.d.ts` generation) resolves `typescript` from the building
13
+ package's own install rather than elsie's, so declaration output reflects the
14
+ exact compiler version that package's `tsconfig.json`, source, and IDE
15
+ actually use. A package with no `typescript` devDependency of its own gets a
16
+ clear error instead of a silently mismatched build. See
17
+ `docs/toolchain-peer-dependencies.md` for the full rationale.
18
+
19
+ The `elsie types` command (`tsc --noEmit` plus TS6 tsconfig validation) is
20
+ removed — with `typescript` no longer bundled, elsie has no reason to own a
21
+ type-checking command. A package that wants one defines its own script (e.g.
22
+ `"types": "tsc --noEmit"`), using its own installed `typescript`.
23
+
24
+ `build-tools`, `event-bus`, `fetch-graphql`, and `recaptcha` each gain a
25
+ `typescript` devDependency of their own (pinned via `pnpm-workspace.yaml`'s
26
+ `catalog.typescript`) so `.d.ts` generation and any future type-checking
27
+ script keep working now that elsie no longer bundles it.
28
+
29
+ - 3313516: fix(recaptcha): accept string form identifiers in `extendConfig`
30
+
31
+ `extendConfig`'s `modifyParams` was typed `PropsFormTypes[]`, but its
32
+ implementation resolves string form identifiers via `typeDefaultForm` /
33
+ `RECAPTCHA_FORMS`. The parameter is now `Array<PropsFormTypes | string>` so
34
+ callers passing string identifiers type-check, matching the runtime behavior.
35
+
36
+ - Updated dependencies [3313516]
37
+ - @adobe-commerce/fetch-graphql@1.3.2-alpha-20260928110639
38
+
3
39
  ## 1.3.0
4
40
 
5
41
  ### Minor Changes
package/LICENSE.md ADDED
@@ -0,0 +1,288 @@
1
+ ADOBE SOFTWARE DEVELOPMENT KIT LICENSE AGREEMENT
2
+ Effective Date: first date you use the SDK
3
+
4
+ The SDK is licensed to you subject to the terms and conditions below which form
5
+ a binding agreement between you and Adobe. By downloading, installing, or making
6
+ use of any portion of the SDK, you are agreeing to the following terms and
7
+ conditions. If you do not agree to the terms and conditions below, do not use
8
+ the SDK. If you agree to be bound by this agreement on behalf of your employer
9
+ or other entity, you must have the legal authority to do so. If you are not
10
+ authorized to so bind your employer or such entity, do not use the SDK.
11
+
12
+ AGREED TERMS AND CONDITIONS
13
+
14
+ 1. DEFINITIONS.
15
+
16
+ 1.1 “Adobe” means collectively, Adobe Inc., a company incorporated in
17
+ Delaware, U.S.A., having a place of business at 345 Park Avenue, San Jose,
18
+ California USA 95110-2704, U.S.A. (“Adobe US”) and Adobe Systems Software
19
+ Ireland, company incorporated in Ireland, having a place of business 4-6
20
+ Riverwalk, City West Business Campus, Saggart, Dublin 24, Ireland (“Adobe
21
+ Ireland”).
22
+
23
+ 1.2 “Adobe Product(s)” means software applications, programs and other
24
+ technologies not included in or with the SDK which are or may be made
25
+ generally available by Adobe for licensing. This agreement does not govern
26
+ use of Adobe Products.
27
+
28
+ 1.3 “Developer Product(s)” means any software application(s), program(s) and
29
+ other teconolog(y/ies) you develop with use of the SDK to function or
30
+ interoperate with Adobe Products.
31
+
32
+ 1.4 “Intellectual Property Rights” means copyright, moral rights, trademark,
33
+ trade dress, patent, trade secret, unfair competition, and any other
34
+ intellectual and proprietary rights.
35
+
36
+ 1.5 “SDK” or “Software Development Kit” means all items comprising the
37
+ software development kit and all associated materials licensed to you by
38
+ Adobe as part of the SDK, including all SDK system files, tools, programs
39
+ and utilities, as well as any plug-ins or other application programming
40
+ interfaces, header or JAR files (“API”), sample images, sounds, or similar
41
+ assets (“Content Files”), software code samples, runtimes and libraries,
42
+ including any portion(s) that is modified by you, or merged or incorporated
43
+ with your Developer Products (“Sample Code”), and any related documentation,
44
+ technical specifications, notes and explanatory materials, as well any
45
+ modifications, updates, upgrades, or copies of, any of the foregoing items,
46
+ that may be made available by Adobe.
47
+
48
+ 2. LICENSES GRANTED TO YOU.
49
+
50
+ 2.1 SDK. Subject to your compliance with terms of this agreement, Adobe
51
+ grants to you a non-exclusive, non-sublicensable, non-transferable license
52
+ to install and use the SDK solely for your internal design, development and
53
+ testing of your Developer Products, subject further to the requirements and
54
+ limitations below.
55
+
56
+ 2.2 API. Subject to your compliance with terms of this agreement, Adobe
57
+ grants to you a non-exclusive, non-sublicensable, non-transferable license
58
+ to use the API only as provided in or by the applicable specification and to
59
+ distribute the API solely in, with, and on the same media as, your Developer
60
+ Products. For clarification, you may not modify the API.
61
+
62
+ 2.3 Content Files. You may not use, modify, reproduce or distribute any of
63
+ the Content Files. For the avoidance of doubt, the Content Files are
64
+ included as examples only. You acquire no rights to the Content Files.
65
+
66
+ 2.4 Sample Code. Subject to your compliance with terms of this agreement,
67
+ Adobe grants to you a non-exclusive, non-sublicensable, non-transferable
68
+ license to use, modify, merge, and redistribute (in object code form only)
69
+ all or any portions of the Sample Code solely as part of, and as necessary
70
+ to properly implement, the SDK in your Developer Products. All and any
71
+ portion of the Sample code that is modified or merged by you in your
72
+ Developer Products is subject to the terms of this agreement.
73
+
74
+ 3. SCOPE OF LICENSE; LIMITATIONS AND RESTRICTIONS
75
+
76
+ 3.1 You may not distribute the SDK or any of its component parts to
77
+ interoperate with or to run on a platform other than the Adobe-approved
78
+ platform.
79
+
80
+ 3.2 Third-Party Software. The SDK may contain third-party software, subject
81
+ to additional terms and conditions; and
82
+
83
+ 3.3 You may not modify, port, adapt, creative derivate works, redistribute,
84
+ or translate any portion of this SDK; or add or delete any SDK program files
85
+ that would in any way result in modifying the functionality or appearance of
86
+ any element of the Adobe Products.
87
+
88
+ 3.4 You may not reverse engineer, decompile, disassemble, or otherwise
89
+ attempt to discover the source code of, any portion of the SDK, except and
90
+ only to the extent that applicable laws of the jurisdiction where you are
91
+ located grant you the right to decompile SDK in order to obtain information
92
+ necessary to render the SDK interoperable with other software; in which case
93
+ you must first request the information from Adobe in writing and Adobe may,
94
+ in its discretion, either provide such information to you or impose
95
+ reasonable conditions, including reasonable fees, on your use of the SDK
96
+ software to ensure that Adobe’s and its licensors’ Intellectual Proprietary
97
+ Rights in the SDK are protected.
98
+
99
+ 3.5 You may not unbundle, repackage, distribute, rent, lease, offer, sell,
100
+ resale, sublicense, assign or transfer all, or any component parts of the
101
+ SDK, or any of your rights in the SDK, nor authorize any portion of the SDK
102
+ to be copied onto another’s device, computer or platform, including on a
103
+ service bureau basis to other providers (i.e., volume printing, banking,
104
+ payroll service providers, etc) who provide you free or fee-based business
105
+ services.
106
+
107
+ 4. VIRAL OPEN SOURCE SOFTWARE AND SERVICES
108
+
109
+ You are not license to (and you agree that you will not) merge, integrate or
110
+ use the SDK with any Viral Open Source Software or Viral Service, or
111
+ otherwise take any action that could require disclosure, distribution, or
112
+ licensing of all or any part of the SDK in source code form for any purpose
113
+ whatsoever. For purposes of this Section, “Viral Open Source Software” means
114
+ software licensed under the GNU General Public License, the GNU Affero
115
+ General Public License (AGPL), the GNU Lesser General Public License (LGPL),
116
+ or any other license terms that would require, or condition your use,
117
+ modification, or distribution of such licensed software on the disclosure,
118
+ distribution, or licensing of any other software in source code form, for
119
+ the purpose of making derivative works, or at no charge, and “Viral Service”
120
+ means any service that contains any viruses, Trojan horses, worms, time
121
+ bombs, cancelbots or other computer programming routines that are intended
122
+ to damage, detrimentally interfere with, surreptitiously intercept,
123
+ expropriate or deprive owners’ possession of any system, data or personal
124
+ information, or that in any way violates any law, statute, ordinance,
125
+ regulation or rights (including any law, regulations or rights respecting
126
+ intellectual property, computer spyware, privacy, export control, unfair
127
+ competition, antidiscrimination or false advertising), or otherwise
128
+ interferes with the operability of Adobe Products or third-party programs or
129
+ software.
130
+
131
+ 5. NON-BLOCKING OF ADOBE DEVELOPMENT
132
+
133
+ You acknowledge that Adobe is currently developing or may develop
134
+ technologies and Adobe Products in the future that have, or may have, design
135
+ or functionality similar to Developer Products that you may develop based on
136
+ the license granted to you in this agreement. Nothing in this agreement will
137
+ impair, limit or curtail Adobe’s right to continue with its development,
138
+ maintenance or distribution of Adobe Products. You agree that you will not
139
+ assert in any way any patent owned by you arising out of or in connection
140
+ with your use of the SDK, or any SDK modifications made by you, against
141
+ Adobe, its customers, subsidiaries or affiliates, or any of their customers,
142
+ direct or indirect, agents and contractors for the manufacture, use, import,
143
+ license, offer for sale, or sale of any Adobe Products.
144
+
145
+ 6. OWNERSHIP; INTELLECTUAL PROPERTY RIGHTS
146
+
147
+ 6.1 The items contained in the SDK are the Intellectual Property of Adobe
148
+ and its licensors and are protected by United States copyright and patent
149
+ law, international treaty provisions and applicable laws of the country in
150
+ which it is being used. Adobe and its licensors reserve all rights not
151
+ expressly granted to you under this agreement, and retain all right, title,
152
+ and interest in the SDK, including all Intellectual Property Rights.
153
+
154
+ 6.2 The SDK, or any of its component parts, may be supplied to you with
155
+ certain accompanying proprietary notices, including patent, copyright and
156
+ trademark notices. You agree to protect all copyright and other ownership
157
+ interests of Adobe and its licensors in the SDK supplied to you under this
158
+ agreement; to preserve exactly (and not remove or alter) all proprietary
159
+ notices displayed in or on the SDK; to reproduce the same proprietary
160
+ notices in all copies you make of any portion of the SDK.
161
+
162
+ 6.3 You agree to include in your Developer Products Adobe’s copyright
163
+ notices, wherever such notices are customarily posted, in substantially the
164
+ following form: Portions of software used to develop this product
165
+ copyrighted by Adobe and its licensors. All Rights Reserved.
166
+
167
+ 6.4 Nothing in this agreement gives you a right to use the name, logo or
168
+ trademarks of Adobe or its licensors to market your Developer Products.
169
+
170
+ 7. CONFIDENTIAL INFORMATION
171
+
172
+ With respect to the API, and any portion, included in the SDK (for purposes
173
+ of this Section, “Adobe Confidential Information”), you will treat the Adobe
174
+ Confidential Information, and exercise the same degree of care to protect
175
+ it, as you afford to your own confidential information. Your obligations
176
+ under this Section will terminate when you can document that (a) the Adobe
177
+ Confidential Information was in the public domain at or subsequent to the
178
+ time Adobe communicated or provided it to you with no fault of your own; (b)
179
+ your employees or agents developed independently without reference to any
180
+ Adobe Confidential Information Adobe communicated or provided to you; or (c)
181
+ your communication of Adobe Confidential Information was in response to a
182
+ valid order by a court or other governmental body, was otherwise required by
183
+ law, or was necessary to establish the rights of a party under this
184
+ agreement.
185
+
186
+ 8. TERM; TERMINATION
187
+
188
+ This agreement will commence on the Effective Date and will continue unless
189
+ terminated. Adobe may terminate this agreement immediately upon notice to
190
+ you, and without judicial intervention, if you fail to comply with any term
191
+ of its terms. You may terminate this agreement at any time by discontinuing
192
+ all your use(s) of the SDK and you agree to destroying or removing all full
193
+ and partial copies of the SDK from your computer. If requested by Adobe, you
194
+ must demonstrate proof of your compliance with the terms of this Section. In
195
+ the event of termination, the terms of this agreement that, by their nature,
196
+ are meant to survive termination, including all terms relating to viral open
197
+ source software and services, ownership, confidential information, indemnity
198
+ obligations and procedures, disclaimers of warranty, limitations on and
199
+ exclusions of remedies and damages, dispute resolution, and waiver, will
200
+ survive termination of this agreement.
201
+
202
+ 9. DISCLAIMER OF WARRANTY; LIMITATION OF LIABILITY
203
+
204
+ You expressly understand and agree that, to the maximum extent permitted by
205
+ applicable law:
206
+
207
+ 9.1 Use OF THE SDK is entirely at your own risk. The SDK is provided by
208
+ Adobe “AS-IS” and with all faults. Adobe and its licensors are not liable to
209
+ you or anyone else for any special, incidental, indirect, consequential, or
210
+ punitive damages whatsoever (even if Adobe has been advised of the
211
+ possibility of such damages), including (a) damages resulting from loss of
212
+ use, data, or profits, whether or not foreseeable, (b) damages based on any
213
+ theory of liability, including breach of contract or warranty, negligence or
214
+ other tortious action, or (c) damages arising from any other claim arising
215
+ out of or in connection with your use of the SDK.
216
+
217
+ 9.2 Adobe’s total liability in any matter arising out of or related to these
218
+ terms is limited to US $100 or the aggregate amount that you paid for use of
219
+ the SDK during the 12 months prior to the event giving rise to the damages,
220
+ whichever is larger. This limitation will apply even if Adobe has been
221
+ advised of the possibility of such damages and regardless of any failure of
222
+ the essential purpose of any limited remedy.
223
+
224
+ 10. INDEMNIFICATION
225
+
226
+ To the maximum extent permitted by law, you agree to indemnify Adobe, its
227
+ subsidiaries, affiliates, officers, agents, employees, partners, licensors,
228
+ or suppliers from any claim or demand, including reasonable attorneys’ fees,
229
+ that arise from the use and distribution of your Developer Products that
230
+ contain or are based upon any portion of the SDK, or from your violation of
231
+ the terms of this agreement.
232
+
233
+ 11. DISPUTE RESOLUTION
234
+
235
+ 11.1 Choice of Law. If you are a resident of North America (or if your
236
+ organization is headquartered in North America), your relationship is with
237
+ Adobe Inc., a Delaware corporation, and the SDK is governed by the laws of
238
+ California. If you reside outside of North America, your relationship is
239
+ with Adobe Systems Software Ireland Limited, and the SDK is governed by the
240
+ laws of Ireland.
241
+
242
+ 11.2 Venue. You agree that any claim or dispute you may have against Adobe
243
+ must be resolved by a court located in Santa Clara County, California when
244
+ the laws of California apply, or Dublin, Ireland, when the laws of Ireland
245
+ apply . You agree to submit to the personal jurisdiction of the courts
246
+ located in Santa Clara County, California, United States of America when the
247
+ laws of California apply, and the courts of Dublin, Ireland, when the laws
248
+ of Ireland applies, for the purpose of litigating such claims or disputes.
249
+ The parties specifically disclaim the U.N. Convention on Contracts for the
250
+ International Sale of Goods.
251
+
252
+ 11.3 Injunctive Relief. Notwithstanding the foregoing, in the event of your
253
+ or others’ unauthorized access to or use of the SDK in violation of this
254
+ Agreement, you agree that Adobe is entitled to apply for injunctive remedies
255
+ (or an equivalent type of urgent legal relief) in any jurisdiction.
256
+
257
+ 12. EXPORT RULES
258
+
259
+ The SDK and your use of the SDK are subject to U.S. and international laws,
260
+ restrictions, and regulations that may govern the import, export, and use of
261
+ the SDK. You agree to comply with all such laws, restrictions, and
262
+ regulations.
263
+
264
+ 13. NOTICE TO U.S. GOVERNMENT END USERS
265
+
266
+ For U.S. Government procurements, the SDK is a commercial computer software
267
+ as defined in FAR 12.212 and subject to restricted rights as defined in FAR
268
+ Section 52.227-19 "Commercial Computer Software - Restricted Rights" and
269
+ DFARS 227.7202, “Rights in Commercial Computer Software or Commercial
270
+ Computer Software Documentation”, as applicable, and any successor
271
+ regulations. Any use, modification, reproduction release, performance,
272
+ display or disclosure of the SDK by the U.S. Government shall be solely in
273
+ accordance with license rights and restrictions described herein.
274
+
275
+ 14. GENERAL PROVISIONS
276
+
277
+ 14.1 Severability. If it turns out that a particular term is not
278
+ enforceable, the unenforceability of that term will not affect any other
279
+ terms.
280
+
281
+ 14.2 Modification; Waiver. No provision of this agreement will be deemed to
282
+ have been modified or waived by any act or acquiescence on the part of
283
+ Adobe, its agents, or employees, but only by any instrument in writing,
284
+ signed by an authorized officer of Adobe.
285
+
286
+ 14.3 Entire Agreement. This Agreement is the entire agreement, superseding
287
+ any prior written or oral agreements, between you and Adobe relating to the
288
+ SDK.
package/eslint.config.js CHANGED
@@ -7,8 +7,17 @@
7
7
  * accompanying it.
8
8
  *******************************************************************/
9
9
 
10
- import base, {
11
- sourceImportRestrictions,
12
- } from '@adobe-commerce/elsie/config/eslint.mjs';
10
+ import {
11
+ defineConfig,
12
+ globals,
13
+ typescript,
14
+ tests,
15
+ restrictions,
16
+ } from '@adobe-commerce/elsie/configs/eslint.js';
13
17
 
14
- export default [...base, ...sourceImportRestrictions];
18
+ export default defineConfig(
19
+ globals('browser'),
20
+ typescript(),
21
+ tests(),
22
+ restrictions({ severityOverrides: { fetchGraphql: 'warn' } }),
23
+ );
package/package.json CHANGED
@@ -1,21 +1,22 @@
1
1
  {
2
2
  "name": "@adobe-commerce/recaptcha",
3
- "version": "1.3.0",
3
+ "version": "1.3.1-alpha-20260928110639",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "description": "Module allows to efficiently verify that users are humans, not bots or spammers",
6
6
  "type": "module",
7
7
  "main": "src/index.ts",
8
- "prettier": "@adobe-commerce/elsie/config/prettier.json",
9
- "scripts": {
10
- "build": "echo 'No build step required'",
11
- "lint": "elsie lint",
12
- "test": "elsie test",
13
- "test:ci": "elsie test --config jest.config.js --passWithNoTests --coverage"
14
- },
8
+ "prettier": "@adobe-commerce/elsie/configs/prettier.js",
15
9
  "dependencies": {
16
- "@adobe-commerce/fetch-graphql": "~1.3.1"
10
+ "@adobe-commerce/fetch-graphql": "1.3.2-alpha-20260928110639"
17
11
  },
18
12
  "devDependencies": {
19
- "@types/grecaptcha": "*"
13
+ "@types/grecaptcha": "*",
14
+ "typescript": "^6.0.0"
15
+ },
16
+ "scripts": {
17
+ "lint": "elsie lint",
18
+ "test": "elsie test",
19
+ "test:ci": "elsie test --config jest.config.js --passWithNoTests --coverage",
20
+ "build": "echo 'No build step required'"
20
21
  }
21
- }
22
+ }
File without changes
File without changes
File without changes
File without changes
package/src/index.ts CHANGED
@@ -224,7 +224,7 @@ export class RecaptchaModule {
224
224
  });
225
225
 
226
226
  if (response?.errors?.length) {
227
- this._logger && console.error(response.errors[0].message);
227
+ this._logger && console.error(response.errors[0]?.message);
228
228
 
229
229
  return;
230
230
  }
@@ -7,12 +7,15 @@
7
7
  * accompanying it.
8
8
  *******************************************************************/
9
9
 
10
- import { ReCaptchaModel } from '../types/recaptcha.types';
10
+ import { ReCaptchaModel, PropsFormTypes } from '../types/recaptcha.types';
11
11
  import { typeDefaultForm, RECAPTCHA_FORMS } from '../configs/typeForms.config';
12
12
 
13
13
  export const extendConfig = (
14
14
  config: ReCaptchaModel,
15
- modifyParams: any[],
15
+ // Accept string form identifiers as well as objects: the implementation below
16
+ // resolves strings via typeDefaultForm/RECAPTCHA_FORMS, so restricting this to
17
+ // PropsFormTypes[] would reject callers the runtime still supports.
18
+ modifyParams: Array<PropsFormTypes | string>,
16
19
  ): ReCaptchaModel | undefined => {
17
20
  if (config && config.forms) {
18
21
  const modifyForm = config.forms.concat(modifyParams).map((el) => {
@@ -21,7 +24,8 @@ export const extendConfig = (
21
24
  return {
22
25
  badgeId:
23
26
  typeDefaultForm[el] ??
24
- RECAPTCHA_FORMS[el as keyof typeof RECAPTCHA_FORMS],
27
+ RECAPTCHA_FORMS[el as keyof typeof RECAPTCHA_FORMS] ??
28
+ el,
25
29
  enabledBadgePlace: false,
26
30
  };
27
31
  });
File without changes
package/src/lib/index.ts CHANGED
File without changes
File without changes
@@ -14,7 +14,8 @@ export interface ReCaptchaInitProps {
14
14
  badge_position?: string;
15
15
  language_code?: string;
16
16
  failure_message?: string;
17
- theme: string;
17
+ theme?: string;
18
+ recaptcha_type?: ReCaptchaType;
18
19
  }
19
20
 
20
21
  export interface ReCaptchaProps extends ReCaptchaInitProps {