jsf.js_next_gen 4.1.0-beta.12 → 4.1.0-beta.14
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/AI_CONTRIBUTIONS.md +66 -0
- package/README.md +39 -1
- package/dist/docs/index.html +38 -1
- package/package.json +2 -2
- package/src/main/typescript/@types/definitions/modules.d.ts +1 -0
- package/src/main/typescript/test/api/JsfPushShimTest.spec.ts +1 -0
- package/src/main/typescript/test/api/PushTypeCompatibility.ts +10 -0
- package/src/main/typescript/test/impl/AssertionsTest.spec.ts +1 -0
- package/src/main/typescript/test/impl/FileUtilsTest.spec.ts +1 -0
- package/src/main/typescript/test/impl/ResponseDataResolverTest.spec.ts +1 -0
- package/src/main/typescript/test/impl/util/ExtLangTest.spec.ts +1 -0
- package/src/main/typescript/test/impl/util/HiddenInputBuilderTest.spec.ts +1 -0
- package/src/main/typescript/test/xhrCore/WebsocketTest.spec.ts +1 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# AI Contributions Disclosure
|
|
2
|
+
|
|
3
|
+
In accordance with the [Apache Software Foundation policy on generative AI tooling](https://www.apache.org/legal/generative-tooling.html), this file discloses that portions of this project were created or substantially modified with assistance from generative AI tools.
|
|
4
|
+
|
|
5
|
+
## Tool used
|
|
6
|
+
|
|
7
|
+
**Claude** (Anthropic) — conversational AI coding assistant
|
|
8
|
+
|
|
9
|
+
## Scope
|
|
10
|
+
|
|
11
|
+
All new source files and substantial modifications introduced from the TypeScript 6 migration onwards (starting with commit `d609321` in http://github.com/werpu/jsf_js_ts) were produced with AI assistance. This covers both production source code and test code.
|
|
12
|
+
|
|
13
|
+
### Newly created files (AI-generated)
|
|
14
|
+
|
|
15
|
+
- `src/main/typescript/@types/definitions/modules.d.ts`
|
|
16
|
+
- `src/main/typescript/test/api/JsfPushShimTest.spec.ts`
|
|
17
|
+
- `src/main/typescript/test/api/PushTypeCompatibility.ts`
|
|
18
|
+
- `src/main/typescript/test/impl/AssertionsTest.spec.ts`
|
|
19
|
+
- `src/main/typescript/test/impl/FileUtilsTest.spec.ts`
|
|
20
|
+
- `src/main/typescript/test/impl/ResponseDataResolverTest.spec.ts`
|
|
21
|
+
- `src/main/typescript/test/impl/util/ExtLangTest.spec.ts`
|
|
22
|
+
- `src/main/typescript/test/impl/util/HiddenInputBuilderTest.spec.ts`
|
|
23
|
+
- `src/main/typescript/test/xhrCore/WebsocketTest.spec.ts`
|
|
24
|
+
|
|
25
|
+
### Substantially modified files (AI-assisted)
|
|
26
|
+
|
|
27
|
+
- `src/main/typescript/api/_api.ts`
|
|
28
|
+
- `src/main/typescript/api/faces.ts`
|
|
29
|
+
- `src/main/typescript/api/jsf.ts`
|
|
30
|
+
- `src/main/typescript/impl/AjaxImpl.ts`
|
|
31
|
+
- `src/main/typescript/impl/PushImpl.ts`
|
|
32
|
+
- `src/main/typescript/impl/util/Assertions.ts`
|
|
33
|
+
- `src/main/typescript/impl/util/AsyncRunnable.ts`
|
|
34
|
+
- `src/main/typescript/impl/util/ExtDomQuery.ts`
|
|
35
|
+
- `src/main/typescript/impl/util/FileUtils.ts`
|
|
36
|
+
- `src/main/typescript/impl/util/HiddenInputBuilder.ts`
|
|
37
|
+
- `src/main/typescript/impl/util/Lang.ts`
|
|
38
|
+
- `src/main/typescript/impl/util/XhrQueueController.ts`
|
|
39
|
+
- `src/main/typescript/impl/xhrCore/ErrorData.ts`
|
|
40
|
+
- `src/main/typescript/impl/xhrCore/EventData.ts`
|
|
41
|
+
- `src/main/typescript/impl/xhrCore/IResponseProcessor.ts`
|
|
42
|
+
- `src/main/typescript/impl/xhrCore/RequestDataResolver.ts`
|
|
43
|
+
- `src/main/typescript/impl/xhrCore/Response.ts`
|
|
44
|
+
- `src/main/typescript/impl/xhrCore/ResponseDataResolver.ts`
|
|
45
|
+
- `src/main/typescript/impl/xhrCore/ResponseProcessor.ts`
|
|
46
|
+
- `src/main/typescript/impl/xhrCore/XhrFormData.ts`
|
|
47
|
+
- `src/main/typescript/impl/xhrCore/XhrRequest.ts`
|
|
48
|
+
- `src/main/typescript/myfaces/OamSubmit.ts`
|
|
49
|
+
- `src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.ts`
|
|
50
|
+
- `src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.ts`
|
|
51
|
+
- `src/main/typescript/test/impl/util/ExtDomQueryTest.spec.ts`
|
|
52
|
+
- `src/main/typescript/test/myfaces/OamSubmit.spec.ts`
|
|
53
|
+
- `src/main/typescript/test/queue/AsynchronousQueueTest.spec.ts`
|
|
54
|
+
- `src/main/typescript/test/xhrCore/ErrorChainTest.spec.ts`
|
|
55
|
+
- `src/main/typescript/test/xhrCore/FakeWebsocket.ts`
|
|
56
|
+
- `src/main/typescript/test/xhrCore/RequestTest.spec.ts`
|
|
57
|
+
- `src/main/typescript/test/xhrCore/ResponseTest.spec.ts`
|
|
58
|
+
- `src/main/typescript/test/xhrCore/TobagoFileUploadTest.spec.ts`
|
|
59
|
+
- `src/main/typescript/test/xhrCore/XhrFormDataTest.spec.ts`
|
|
60
|
+
- `src/main/typescript/@types/definitions/index.d.ts`
|
|
61
|
+
|
|
62
|
+
## Nature of AI assistance
|
|
63
|
+
|
|
64
|
+
The AI assistant was used interactively: the human author directed the work, reviewed all output, made corrections,
|
|
65
|
+
and approved each change before it was applied.
|
|
66
|
+
The AI did not commit code autonomously. All contributions remain under the Apache License 2.0.
|
package/README.md
CHANGED
|
@@ -251,4 +251,42 @@ faces.ajax.request(document.getElementById("cmd_eval"), null,
|
|
|
251
251
|
* Added tests that max reconnect exhaustion calls `onclose`.
|
|
252
252
|
* Added tests that close code `1008` is terminal and does not reconnect.
|
|
253
253
|
* Added tests that explicit `open()` after a terminal close fires `onopen` again as a fresh connection.
|
|
254
|
-
* JSF 2.3 jsf.push.init compatibility test added
|
|
254
|
+
* JSF 2.3 jsf.push.init compatibility test added
|
|
255
|
+
|
|
256
|
+
4.1.0-beta.12
|
|
257
|
+
|
|
258
|
+
Bug Fixes
|
|
259
|
+
|
|
260
|
+
- WebSocket push spec alignment (PushImpl.ts): Full compliance with the Jakarta Faces push specification on 2,2 and 2.3 level
|
|
261
|
+
- hasEverConnected flag is now set before firing onopen callbacks (prevents re-entrant terminal-close edge case)
|
|
262
|
+
- Code 1000 (normal closure) is now always treated as terminal regardless of reason, per spec
|
|
263
|
+
- reconnectAttempts and hasEverConnected are reset after a terminal close, allowing faces.push.open() to re-establish a connection and fire onopen again
|
|
264
|
+
- XhrQueueController debounce race condition: Each XhrQueueController instance now uses a unique debounce key — previously all instances shared one key, causing
|
|
265
|
+
enqueues on separate instances to cancel each other's debounce window
|
|
266
|
+
- Code cleanup: Removed dead exports from ResponseDataResolver.ts; minor cleanup in _api.ts and PushImpl.ts
|
|
267
|
+
|
|
268
|
+
Improvements
|
|
269
|
+
|
|
270
|
+
- PushImpl.ts readability: Lifecycle code refactored for clarity
|
|
271
|
+
- FileUtils.ts: Minor code improvements (stricter equality, cleaner split)
|
|
272
|
+
|
|
273
|
+
Tests
|
|
274
|
+
|
|
275
|
+
- Added tests for WebSocket re-open after terminal close
|
|
276
|
+
- Added XhrQueueController two-instance debounce isolation test
|
|
277
|
+
- Added direct unit tests for FileUtils (encodeFormData, decodeEncodedValues, fixEmptyParameters)
|
|
278
|
+
- Added tests for Assertions.ts — branch coverage up to ~88%
|
|
279
|
+
- Added tests for ResponseDataResolver.resolveContexts
|
|
280
|
+
- Added tests for ExtDomQuery (nonce DOM fallback, runHeadInserts text-node path) and ExtConfig (append, appendIf, deepCopy)
|
|
281
|
+
- Added tests for HiddenInputBuilder, Lang, and async queue
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
## 4.1.0-beta.13
|
|
285
|
+
|
|
286
|
+
- Added AI disclaimers to fulfill the ASF criteria for code being integrated into the Apache MyFaces codebase
|
|
287
|
+
|
|
288
|
+
Note as of Version 4.0 the code has been improved with the help of
|
|
289
|
+
generative AI Tooling, as per https://www.apache.org/legal/generative-tooling.html
|
|
290
|
+
disclosures now are added!
|
|
291
|
+
See AI_CONTRIBUTIONS.md for full disclosure
|
|
292
|
+
|
package/dist/docs/index.html
CHANGED
|
@@ -220,4 +220,41 @@ and adjusts the references in the resource according to the request patterns.</p
|
|
|
220
220
|
</ul>
|
|
221
221
|
</li>
|
|
222
222
|
</ul>
|
|
223
|
-
|
|
223
|
+
<p>4.1.0-beta.12</p>
|
|
224
|
+
<p>Bug Fixes</p>
|
|
225
|
+
<ul>
|
|
226
|
+
<li>WebSocket push spec alignment (PushImpl.ts): Full compliance with the Jakarta Faces push specification on 2,2 and 2.3 level
|
|
227
|
+
<ul>
|
|
228
|
+
<li>hasEverConnected flag is now set before firing onopen callbacks (prevents re-entrant terminal-close edge case)</li>
|
|
229
|
+
<li>Code 1000 (normal closure) is now always treated as terminal regardless of reason, per spec</li>
|
|
230
|
+
<li>reconnectAttempts and hasEverConnected are reset after a terminal close, allowing faces.push.open() to re-establish a connection and fire onopen again</li>
|
|
231
|
+
</ul>
|
|
232
|
+
</li>
|
|
233
|
+
<li>XhrQueueController debounce race condition: Each XhrQueueController instance now uses a unique debounce key — previously all instances shared one key, causing<br>
|
|
234
|
+
enqueues on separate instances to cancel each other's debounce window</li>
|
|
235
|
+
<li>Code cleanup: Removed dead exports from ResponseDataResolver.ts; minor cleanup in _api.ts and PushImpl.ts</li>
|
|
236
|
+
</ul>
|
|
237
|
+
<p>Improvements</p>
|
|
238
|
+
<ul>
|
|
239
|
+
<li>PushImpl.ts readability: Lifecycle code refactored for clarity</li>
|
|
240
|
+
<li>FileUtils.ts: Minor code improvements (stricter equality, cleaner split)</li>
|
|
241
|
+
</ul>
|
|
242
|
+
<p>Tests</p>
|
|
243
|
+
<ul>
|
|
244
|
+
<li>Added tests for WebSocket re-open after terminal close</li>
|
|
245
|
+
<li>Added XhrQueueController two-instance debounce isolation test</li>
|
|
246
|
+
<li>Added direct unit tests for FileUtils (encodeFormData, decodeEncodedValues, fixEmptyParameters)</li>
|
|
247
|
+
<li>Added tests for Assertions.ts — branch coverage up to ~88%</li>
|
|
248
|
+
<li>Added tests for ResponseDataResolver.resolveContexts</li>
|
|
249
|
+
<li>Added tests for ExtDomQuery (nonce DOM fallback, runHeadInserts text-node path) and ExtConfig (append, appendIf, deepCopy)</li>
|
|
250
|
+
<li>Added tests for HiddenInputBuilder, Lang, and async queue</li>
|
|
251
|
+
</ul>
|
|
252
|
+
<h2 id="410-beta13" class="tsd-anchor-link">4.1.0-beta.13<a href="#410-beta13" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2>
|
|
253
|
+
<ul>
|
|
254
|
+
<li>Added AI disclaimers to fulfill the ASF criteria for code being integrated into the Apache MyFaces codebase</li>
|
|
255
|
+
</ul>
|
|
256
|
+
<p>Note as of Version 4.0 the code has been improved with the help of
|
|
257
|
+
generative AI Tooling, as per <a href="https://www.apache.org/legal/generative-tooling.html">https://www.apache.org/legal/generative-tooling.html</a>
|
|
258
|
+
disclosures now are added!
|
|
259
|
+
See AI_CONTRIBUTIONS.md for full disclosure</p>
|
|
260
|
+
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#🚀-scratchpad-for-the-typescript-based-reimplementation-of-jsfjs"><span>🚀 <wbr/>Scratchpad for the <wbr/>Type<wbr/>Script-<wbr/>based reimplementation of jsf.js</span></a><ul><li><a href="#what-is-this"><span>What is this?</span></a></li><li><a href="#status"><span>Status</span></a></li><li><ul><li><a href="#special-info"><span>Special <wbr/>Info</span></a></li><li><a href="#general-build"><span>General <wbr/>Build</span></a></li><li><ul><li><a href="#on-windows"><span>On <wbr/>Windows</span></a></li></ul></li><li><a href="#tests"><span>Tests</span></a></li><li><a href="#test-coverage"><span>Test <wbr/>Coverage</span></a></li><li><a href="#changelist-compared-to-the-original-implementation"><span>Changelist compared to the original implementation</span></a></li></ul></li><li><a href="#upload-support"><span>Upload <wbr/>Support</span></a></li><li><a href="#changes-since-40"><span>Changes since 4.0</span></a></li><li><a href="#changes-since-410-beta-10"><span>Changes since 4.1.0-<wbr/>beta-<wbr/>10</span></a></li><li><a href="#410-beta13"><span>4.1.0-<wbr/>beta.13</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="modules.html">jsf.js_next_gen</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsf.js_next_gen",
|
|
3
|
-
"version": "4.1.0-beta.
|
|
3
|
+
"version": "4.1.0-beta.14",
|
|
4
4
|
"description": "A next generation typescript reimplementation of jsf.js",
|
|
5
5
|
"main": "dist/window/faces.js",
|
|
6
6
|
"scripts": {
|
|
@@ -55,6 +55,6 @@
|
|
|
55
55
|
"uuid": "^14.0.0"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"mona-dish": "0.40.0-beta.
|
|
58
|
+
"mona-dish": "0.40.0-beta.4"
|
|
59
59
|
}
|
|
60
60
|
}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
// AI-generated: this file was created with assistance from Claude (Anthropic) — see AI_CONTRIBUTIONS.md
|
|
16
17
|
|
|
17
18
|
declare module "mona-dish/dist/js/umd/index.js" {
|
|
18
19
|
export * from "mona-dish";
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
// AI-generated: this file was created with assistance from Claude (Anthropic) — see AI_CONTRIBUTIONS.md
|
|
16
17
|
import {describe} from "mocha";
|
|
17
18
|
import * as sinon from "sinon";
|
|
18
19
|
import {expect} from "chai";
|
|
@@ -13,7 +13,17 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
// AI-generated: this file was created with assistance from Claude (Anthropic) — see AI_CONTRIBUTIONS.md
|
|
16
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Compile-time type compatibility check for Push.init() overloads.
|
|
20
|
+
*
|
|
21
|
+
* This file is never executed. Its only purpose is to make the TypeScript
|
|
22
|
+
* compiler verify that both supported call signatures of Push.init() are
|
|
23
|
+
* accepted: the 4-callback form (onopen, onmessage, onerror, onclose) and
|
|
24
|
+
* the legacy 3-callback form (onmessage, onerror, onclose). If either
|
|
25
|
+
* overload is accidentally broken, tsc will reject this file.
|
|
26
|
+
*/
|
|
17
27
|
function verifyPushInitTypeCompatibility(push: Push): void {
|
|
18
28
|
push.init("clientId1", "booga.ws", "mychannel",
|
|
19
29
|
() => {},
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
// AI-generated: this file was created with assistance from Claude (Anthropic) — see AI_CONTRIBUTIONS.md
|
|
16
17
|
import {describe, it} from "mocha";
|
|
17
18
|
import {expect} from "chai";
|
|
18
19
|
import {XMLQuery} from "mona-dish";
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
// AI-generated: this file was created with assistance from Claude (Anthropic) — see AI_CONTRIBUTIONS.md
|
|
16
17
|
import {describe, it} from "mocha";
|
|
17
18
|
import {expect} from "chai";
|
|
18
19
|
import {Config} from "mona-dish";
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
// AI-generated: this file was created with assistance from Claude (Anthropic) — see AI_CONTRIBUTIONS.md
|
|
16
17
|
import {describe, it} from "mocha";
|
|
17
18
|
import {expect} from "chai";
|
|
18
19
|
import {resolveContexts} from "../../impl/xhrCore/ResponseDataResolver";
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
// AI-generated: this file was created with assistance from Claude (Anthropic) — see AI_CONTRIBUTIONS.md
|
|
16
17
|
|
|
17
18
|
import {describe} from "mocha";
|
|
18
19
|
import {expect} from "chai";
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
// AI-generated: this file was created with assistance from Claude (Anthropic) — see AI_CONTRIBUTIONS.md
|
|
16
17
|
|
|
17
18
|
import {describe} from "mocha";
|
|
18
19
|
import {expect} from "chai";
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
// AI-generated: this file was created with assistance from Claude (Anthropic) — see AI_CONTRIBUTIONS.md
|
|
16
17
|
import {describe} from "mocha";
|
|
17
18
|
import * as sinon from "sinon";
|
|
18
19
|
import * as nise from "nise";
|