jsf.js_next_gen 4.1.0-beta.2 → 4.1.0-beta.21
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 +71 -0
- package/README.md +254 -78
- package/api-extractor.faces.json +38 -0
- package/dist/docs/assets/hierarchy.js +1 -1
- package/dist/docs/assets/navigation.js +1 -1
- package/dist/docs/assets/search.js +1 -1
- package/dist/docs/functions/faces.ajax.addOnError.html +2 -2
- package/dist/docs/functions/faces.ajax.addOnEvent.html +2 -2
- package/dist/docs/functions/faces.ajax.request.html +2 -2
- package/dist/docs/functions/faces.ajax.response.html +2 -2
- package/dist/docs/functions/faces.getClientWindow.html +2 -2
- package/dist/docs/functions/faces.getProjectStage.html +2 -2
- package/dist/docs/functions/faces.getViewState.html +1 -1
- package/dist/docs/functions/faces.push.close.html +1 -1
- package/dist/docs/functions/faces.push.init.html +6 -6
- package/dist/docs/functions/faces.push.open.html +1 -1
- package/dist/docs/functions/faces.util.chain.html +2 -2
- package/dist/docs/functions/myfaces.ab.html +3 -3
- package/dist/docs/functions/myfaces.onDomReady.html +1 -1
- package/dist/docs/functions/myfaces.reserveNamespace.html +1 -1
- package/dist/docs/hierarchy.html +1 -1
- package/dist/docs/index.html +292 -71
- package/dist/docs/interfaces/faces.AjaxData.html +6 -0
- package/dist/docs/interfaces/faces.AjaxError.html +18 -0
- package/dist/docs/interfaces/faces.AjaxEvent.html +8 -0
- package/dist/docs/interfaces/faces.ajax.RequestContext.html +6 -0
- package/dist/docs/interfaces/faces.ajax.RequestOptions.html +10 -0
- package/dist/docs/modules/faces.ajax.html +1 -1
- package/dist/docs/modules/faces.html +1 -1
- package/dist/docs/modules/faces.push.html +1 -1
- package/dist/docs/modules/faces.util.html +1 -1
- package/dist/docs/modules/myfaces.html +1 -1
- package/dist/docs/modules.html +1 -1
- package/dist/docs/types/faces.AjaxErrorStatus.html +2 -0
- package/dist/docs/types/faces.AjaxEventStatus.html +2 -0
- package/dist/docs/types/faces.ProjectStage.html +2 -0
- package/dist/docs/types/faces.ajax.OnErrorCallback.html +2 -0
- package/dist/docs/types/faces.ajax.OnEventCallback.html +2 -0
- package/dist/docs/types/faces.push.OnCloseHandler.html +2 -0
- package/dist/docs/types/faces.push.OnErrorHandler.html +2 -0
- package/dist/docs/types/faces.push.OnMessageHandler.html +2 -0
- package/dist/docs/types/faces.push.OnOpenHandler.html +2 -0
- package/dist/docs/variables/faces.contextpath.html +1 -1
- package/dist/docs/variables/faces.implversion.html +1 -1
- package/dist/docs/variables/faces.separatorchar.html +1 -1
- package/dist/docs/variables/faces.specversion.html +1 -1
- package/dist/docs/variables/myfaces.oam.html +1 -1
- package/dist/window/faces-development.js +1801 -499
- package/dist/window/faces-development.js.map +1 -1
- package/{target/api/_api.js → dist/window/faces.d.ts} +124 -151
- package/dist/window/faces.js +1 -1
- package/dist/window/faces.js.LICENSE.txt +0 -17
- package/dist/window/faces.js.map +1 -1
- package/dist/window/jsf-development.js +1806 -513
- package/dist/window/jsf-development.js.map +1 -1
- package/{target/src/main/typescript/api/_api.js → dist/window/jsf.d.ts} +125 -153
- package/dist/window/jsf.js +1 -1
- package/dist/window/jsf.js.LICENSE.txt +0 -17
- package/dist/window/jsf.js.map +1 -1
- package/package.json +22 -18
- package/scripts/build-dts.mjs +239 -0
- package/src/main/typescript/@types/definitions/index.d.ts +22 -122
- package/{target/test/frameworkBase/_ext/monadish/fixtures/test2.js → src/main/typescript/@types/definitions/modules.d.ts} +18 -2
- package/src/main/typescript/api/_api.ts +132 -29
- package/{target/test/frameworkBase/_ext/monadish/fixtures/test.js → src/main/typescript/api/_api_ae_stub.d.ts} +6 -2
- package/src/main/typescript/api/faces.ts +2 -2
- package/src/main/typescript/api/jsf.ts +15 -23
- package/src/main/typescript/impl/AjaxImpl.ts +15 -15
- package/src/main/typescript/impl/PushImpl.ts +139 -69
- package/src/main/typescript/impl/core/Const.ts +2 -2
- package/src/main/typescript/impl/i18n/Messages.ts +1 -1
- package/src/main/typescript/impl/util/Assertions.ts +1 -2
- package/src/main/typescript/impl/util/AsyncRunnable.ts +3 -4
- package/src/main/typescript/impl/util/ExtDomQuery.ts +19 -19
- package/src/main/typescript/impl/util/FileUtils.ts +30 -14
- package/src/main/typescript/impl/util/HiddenInputBuilder.ts +34 -34
- package/src/main/typescript/impl/util/Lang.ts +19 -22
- package/src/main/typescript/impl/util/XhrQueueController.ts +25 -3
- package/src/main/typescript/impl/xhrCore/ErrorData.ts +17 -12
- package/src/main/typescript/impl/xhrCore/EventData.ts +8 -7
- package/src/main/typescript/impl/xhrCore/IResponseProcessor.ts +3 -3
- package/src/main/typescript/impl/xhrCore/RequestDataResolver.ts +7 -6
- package/src/main/typescript/impl/xhrCore/Response.ts +3 -3
- package/src/main/typescript/impl/xhrCore/ResponseDataResolver.ts +0 -38
- package/src/main/typescript/impl/xhrCore/ResponseProcessor.ts +17 -15
- package/src/main/typescript/impl/xhrCore/XhrFormData.ts +72 -63
- package/src/main/typescript/impl/xhrCore/XhrRequest.ts +80 -134
- package/src/main/typescript/mona_dish_shim.ts +6 -2
- package/src/main/typescript/myfaces/OamSubmit.ts +10 -6
- package/src/main/typescript/test/api/JsfPushShimTest.spec.ts +126 -0
- package/src/main/typescript/test/api/MyFacesABTest.spec.ts +16 -0
- package/src/main/typescript/test/api/PushTypeCompatibility.ts +65 -0
- package/src/main/typescript/test/frameworkBase/LangTest.spec.ts +16 -0
- package/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.ts +1 -0
- package/src/main/typescript/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.ts +16 -0
- package/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-with-header.ts +16 -0
- package/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-without-header.ts +16 -0
- package/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.ts +55 -9
- package/src/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.ts +16 -0
- package/src/main/typescript/test/impl/AssertionsTest.spec.ts +168 -0
- package/src/main/typescript/test/impl/FileUtilsTest.spec.ts +126 -0
- package/src/main/typescript/test/impl/ImplTest.spec.ts +75 -1
- package/src/main/typescript/test/impl/ResponseDataResolverTest.spec.ts +62 -0
- package/src/main/typescript/test/impl/util/ExtDomQueryTest.spec.ts +91 -1
- package/src/main/typescript/test/impl/util/ExtLangTest.spec.ts +110 -0
- package/src/main/typescript/test/impl/util/HiddenInputBuilderTest.spec.ts +74 -0
- package/src/main/typescript/test/myfaces/OamSubmit.spec.ts +61 -1
- package/src/main/typescript/test/queue/AsynchronousQueueTest.spec.ts +191 -2
- package/src/main/typescript/test/xhrCore/ClientWindow.spec.ts +16 -0
- package/src/main/typescript/test/xhrCore/ErrorChainTest.spec.ts +14 -0
- package/src/main/typescript/test/xhrCore/FakeWebsocket.ts +21 -5
- package/src/main/typescript/test/xhrCore/RequestTest.spec.ts +363 -4
- package/src/main/typescript/test/xhrCore/ResponseTest.spec.ts +218 -4
- package/src/main/typescript/test/xhrCore/TobagoFileUploadTest.spec.ts +1 -1
- package/src/main/typescript/test/xhrCore/WebsocketTest.spec.ts +764 -0
- package/src/main/typescript/test/xhrCore/XhrFormDataTest.spec.ts +265 -62
- package/src/main/typescript/test/xhrCore/XhrRequestProgress.spec.ts +16 -0
- package/{target/src/main/typescript/test/xhrCore/FakeWebsocket.js → src/main/typescript/tsconfig.ae.json} +16 -23
- package/src/main/typescript/{tsconfig.json → tsconfig.dts.json} +11 -27
- package/src/main/typescript/tsconfig.test.json +17 -0
- package/tsconfig.api-extractor.json +17 -0
- package/.claude/settings.local.json +0 -16
- package/.github/workflows/codeql-analysis.yml +0 -83
- package/.github/workflows/nodejs.yml +0 -26
- package/.mocharc.json +0 -10
- package/.nyc_output/384344d4-4f46-455f-84c3-010f829098cb.json +0 -1
- package/.nyc_output/a0f90016-f4f9-4039-bb51-57f4f7050541.json +0 -1
- package/.nyc_output/db388b5d-0b79-4bce-afd2-001aaf6f0245.json +0 -1
- package/.nyc_output/processinfo/384344d4-4f46-455f-84c3-010f829098cb.json +0 -1
- package/.nyc_output/processinfo/a0f90016-f4f9-4039-bb51-57f4f7050541.json +0 -1
- package/.nyc_output/processinfo/db388b5d-0b79-4bce-afd2-001aaf6f0245.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
- package/.nycrc +0 -6
- package/build.cmd +0 -1
- package/build.sh +0 -3
- package/mvnw +0 -286
- package/mvnw.cmd +0 -161
- package/plans for 4.0.1.txt +0 -8
- package/remap.ts +0 -51
- package/src/main/typescript/test/xhrCore/WebsocketTest.ts +0 -221
- package/target/api/_api.js.map +0 -1
- package/target/api/faces.js +0 -45
- package/target/api/faces.js.map +0 -1
- package/target/api/jsf.js +0 -56
- package/target/api/jsf.js.map +0 -1
- package/target/impl/AjaxImpl.js +0 -748
- package/target/impl/AjaxImpl.js.map +0 -1
- package/target/impl/PushImpl.js +0 -265
- package/target/impl/PushImpl.js.map +0 -1
- package/target/impl/core/Const.js +0 -177
- package/target/impl/core/Const.js.map +0 -1
- package/target/impl/core/ImplTypes.js +0 -38
- package/target/impl/core/ImplTypes.js.map +0 -1
- package/target/impl/i18n/Messages.js +0 -113
- package/target/impl/i18n/Messages.js.map +0 -1
- package/target/impl/util/Assertions.js +0 -101
- package/target/impl/util/Assertions.js.map +0 -1
- package/target/impl/util/AsyncRunnable.js +0 -78
- package/target/impl/util/AsyncRunnable.js.map +0 -1
- package/target/impl/util/ExtDomQuery.js +0 -306
- package/target/impl/util/ExtDomQuery.js.map +0 -1
- package/target/impl/util/FileUtils.js +0 -98
- package/target/impl/util/FileUtils.js.map +0 -1
- package/target/impl/util/HiddenInputBuilder.js +0 -83
- package/target/impl/util/HiddenInputBuilder.js.map +0 -1
- package/target/impl/util/IListener.js +0 -3
- package/target/impl/util/IListener.js.map +0 -1
- package/target/impl/util/Lang.js +0 -263
- package/target/impl/util/Lang.js.map +0 -1
- package/target/impl/util/XhrQueueController.js +0 -92
- package/target/impl/util/XhrQueueController.js.map +0 -1
- package/target/impl/xhrCore/ErrorData.js +0 -87
- package/target/impl/xhrCore/ErrorData.js.map +0 -1
- package/target/impl/xhrCore/EventData.js +0 -52
- package/target/impl/xhrCore/EventData.js.map +0 -1
- package/target/impl/xhrCore/IResponseProcessor.js +0 -3
- package/target/impl/xhrCore/IResponseProcessor.js.map +0 -1
- package/target/impl/xhrCore/RequestDataResolver.js +0 -186
- package/target/impl/xhrCore/RequestDataResolver.js.map +0 -1
- package/target/impl/xhrCore/ResonseDataResolver.js +0 -104
- package/target/impl/xhrCore/ResonseDataResolver.js.map +0 -1
- package/target/impl/xhrCore/Response.js +0 -186
- package/target/impl/xhrCore/Response.js.map +0 -1
- package/target/impl/xhrCore/ResponseDataResolver.js +0 -104
- package/target/impl/xhrCore/ResponseDataResolver.js.map +0 -1
- package/target/impl/xhrCore/ResponseProcessor.js +0 -468
- package/target/impl/xhrCore/ResponseProcessor.js.map +0 -1
- package/target/impl/xhrCore/XhrFormData.js +0 -163
- package/target/impl/xhrCore/XhrFormData.js.map +0 -1
- package/target/impl/xhrCore/XhrRequest.js +0 -433
- package/target/impl/xhrCore/XhrRequest.js.map +0 -1
- package/target/mona_dish_shim.js +0 -70
- package/target/mona_dish_shim.js.map +0 -1
- package/target/myfaces/OamSubmit.js +0 -128
- package/target/myfaces/OamSubmit.js.map +0 -1
- package/target/src/main/typescript/api/_api.js.map +0 -1
- package/target/src/main/typescript/api/faces.js +0 -45
- package/target/src/main/typescript/api/faces.js.map +0 -1
- package/target/src/main/typescript/api/jsf.js +0 -56
- package/target/src/main/typescript/api/jsf.js.map +0 -1
- package/target/src/main/typescript/impl/AjaxImpl.js +0 -748
- package/target/src/main/typescript/impl/AjaxImpl.js.map +0 -1
- package/target/src/main/typescript/impl/PushImpl.js +0 -265
- package/target/src/main/typescript/impl/PushImpl.js.map +0 -1
- package/target/src/main/typescript/impl/core/Const.js +0 -177
- package/target/src/main/typescript/impl/core/Const.js.map +0 -1
- package/target/src/main/typescript/impl/core/ImplTypes.js +0 -38
- package/target/src/main/typescript/impl/core/ImplTypes.js.map +0 -1
- package/target/src/main/typescript/impl/i18n/Messages.js +0 -113
- package/target/src/main/typescript/impl/i18n/Messages.js.map +0 -1
- package/target/src/main/typescript/impl/util/Assertions.js +0 -101
- package/target/src/main/typescript/impl/util/Assertions.js.map +0 -1
- package/target/src/main/typescript/impl/util/AsyncRunnable.js +0 -78
- package/target/src/main/typescript/impl/util/AsyncRunnable.js.map +0 -1
- package/target/src/main/typescript/impl/util/ExtDomQuery.js +0 -306
- package/target/src/main/typescript/impl/util/ExtDomQuery.js.map +0 -1
- package/target/src/main/typescript/impl/util/FileUtils.js +0 -98
- package/target/src/main/typescript/impl/util/FileUtils.js.map +0 -1
- package/target/src/main/typescript/impl/util/HiddenInputBuilder.js +0 -83
- package/target/src/main/typescript/impl/util/HiddenInputBuilder.js.map +0 -1
- package/target/src/main/typescript/impl/util/IListener.js +0 -3
- package/target/src/main/typescript/impl/util/IListener.js.map +0 -1
- package/target/src/main/typescript/impl/util/Lang.js +0 -263
- package/target/src/main/typescript/impl/util/Lang.js.map +0 -1
- package/target/src/main/typescript/impl/util/XhrQueueController.js +0 -92
- package/target/src/main/typescript/impl/util/XhrQueueController.js.map +0 -1
- package/target/src/main/typescript/impl/xhrCore/ErrorData.js +0 -87
- package/target/src/main/typescript/impl/xhrCore/ErrorData.js.map +0 -1
- package/target/src/main/typescript/impl/xhrCore/EventData.js +0 -52
- package/target/src/main/typescript/impl/xhrCore/EventData.js.map +0 -1
- package/target/src/main/typescript/impl/xhrCore/IResponseProcessor.js +0 -3
- package/target/src/main/typescript/impl/xhrCore/IResponseProcessor.js.map +0 -1
- package/target/src/main/typescript/impl/xhrCore/RequestDataResolver.js +0 -186
- package/target/src/main/typescript/impl/xhrCore/RequestDataResolver.js.map +0 -1
- package/target/src/main/typescript/impl/xhrCore/Response.js +0 -186
- package/target/src/main/typescript/impl/xhrCore/Response.js.map +0 -1
- package/target/src/main/typescript/impl/xhrCore/ResponseDataResolver.js +0 -104
- package/target/src/main/typescript/impl/xhrCore/ResponseDataResolver.js.map +0 -1
- package/target/src/main/typescript/impl/xhrCore/ResponseProcessor.js +0 -468
- package/target/src/main/typescript/impl/xhrCore/ResponseProcessor.js.map +0 -1
- package/target/src/main/typescript/impl/xhrCore/XhrFormData.js +0 -163
- package/target/src/main/typescript/impl/xhrCore/XhrFormData.js.map +0 -1
- package/target/src/main/typescript/impl/xhrCore/XhrRequest.js +0 -433
- package/target/src/main/typescript/impl/xhrCore/XhrRequest.js.map +0 -1
- package/target/src/main/typescript/mona_dish_shim.js +0 -70
- package/target/src/main/typescript/mona_dish_shim.js.map +0 -1
- package/target/src/main/typescript/myfaces/OamSubmit.js +0 -128
- package/target/src/main/typescript/myfaces/OamSubmit.js.map +0 -1
- package/target/src/main/typescript/test/api/MyFacesABTest.spec.js +0 -117
- package/target/src/main/typescript/test/api/MyFacesABTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/frameworkBase/LangTest.spec.js +0 -123
- package/target/src/main/typescript/test/frameworkBase/LangTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +0 -657
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/LangTest.spec.js +0 -107
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/LangTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/MappingProbes.js +0 -106
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/MappingProbes.js.map +0 -1
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/MappingTest.spec.js +0 -39
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/MappingTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/MonadTest.spec.js +0 -153
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/MonadTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.js +0 -2
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-with-header.js +0 -925
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-with-header.js.map +0 -1
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-without-header.js +0 -112
- package/target/src/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-without-header.js.map +0 -1
- package/target/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.js +0 -728
- package/target/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.js.map +0 -1
- package/target/src/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.js +0 -296
- package/target/src/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.js.map +0 -1
- package/target/src/main/typescript/test/impl/ImplTest.spec.js +0 -225
- package/target/src/main/typescript/test/impl/ImplTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/impl/ImplTest_23.spec.js +0 -143
- package/target/src/main/typescript/test/impl/ImplTest_23.spec.js.map +0 -1
- package/target/src/main/typescript/test/impl/SeparatorCharsTest.spec.js +0 -106
- package/target/src/main/typescript/test/impl/SeparatorCharsTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/impl/util/ExtDomQueryTest.spec.js +0 -77
- package/target/src/main/typescript/test/impl/util/ExtDomQueryTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/myfaces/OamSubmit.spec.js +0 -118
- package/target/src/main/typescript/test/myfaces/OamSubmit.spec.js.map +0 -1
- package/target/src/main/typescript/test/myfaces/OnLoad.spec.js +0 -57
- package/target/src/main/typescript/test/myfaces/OnLoad.spec.js.map +0 -1
- package/target/src/main/typescript/test/myfaces/ReserveNamespace.spec.js +0 -60
- package/target/src/main/typescript/test/myfaces/ReserveNamespace.spec.js.map +0 -1
- package/target/src/main/typescript/test/queue/AsynchronousProbe.js +0 -93
- package/target/src/main/typescript/test/queue/AsynchronousProbe.js.map +0 -1
- package/target/src/main/typescript/test/queue/AsynchronousQueueTest.spec.js +0 -133
- package/target/src/main/typescript/test/queue/AsynchronousQueueTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/ClientWindow.spec.js +0 -101
- package/target/src/main/typescript/test/xhrCore/ClientWindow.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/ErrorChainTest.spec.js +0 -175
- package/target/src/main/typescript/test/xhrCore/ErrorChainTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/EventTests.spec.js +0 -184
- package/target/src/main/typescript/test/xhrCore/EventTests.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/FakeWebsocket.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/FileUploadTest.spec.js +0 -181
- package/target/src/main/typescript/test/xhrCore/FileUploadTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/NamespacesRequestTest.spec.js +0 -226
- package/target/src/main/typescript/test/xhrCore/NamespacesRequestTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/OamSubmitTest.spec.js +0 -199
- package/target/src/main/typescript/test/xhrCore/OamSubmitTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/RequestParamsTest.spec.js +0 -567
- package/target/src/main/typescript/test/xhrCore/RequestParamsTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/RequestTest.spec.js +0 -845
- package/target/src/main/typescript/test/xhrCore/RequestTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/RequestTest_23.spec.js +0 -382
- package/target/src/main/typescript/test/xhrCore/RequestTest_23.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/ResponseTest.spec.js +0 -667
- package/target/src/main/typescript/test/xhrCore/ResponseTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/ResponseTest23.spec.js +0 -367
- package/target/src/main/typescript/test/xhrCore/ResponseTest23.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/ShadowDomTest.spec.js +0 -123
- package/target/src/main/typescript/test/xhrCore/ShadowDomTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/TobagoFileUploadTest.spec.js +0 -147
- package/target/src/main/typescript/test/xhrCore/TobagoFileUploadTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/WebsocketTest.js +0 -207
- package/target/src/main/typescript/test/xhrCore/WebsocketTest.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/XhrFormDataTest.spec.js +0 -149
- package/target/src/main/typescript/test/xhrCore/XhrFormDataTest.spec.js.map +0 -1
- package/target/src/main/typescript/test/xhrCore/XhrRequestProgress.spec.js +0 -130
- package/target/src/main/typescript/test/xhrCore/XhrRequestProgress.spec.js.map +0 -1
- package/target/test/api/MyFacesABTest.spec.js +0 -117
- package/target/test/api/MyFacesABTest.spec.js.map +0 -1
- package/target/test/frameworkBase/LangTest.spec.js +0 -123
- package/target/test/frameworkBase/LangTest.spec.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +0 -657
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js +0 -107
- package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/MappingProbes.js +0 -106
- package/target/test/frameworkBase/_ext/monadish/MappingProbes.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js +0 -39
- package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js +0 -153
- package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.js +0 -1
- package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/fixtures/test.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/fixtures/test2.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/markups/tobago-with-header.js +0 -925
- package/target/test/frameworkBase/_ext/monadish/markups/tobago-with-header.js.map +0 -1
- package/target/test/frameworkBase/_ext/monadish/markups/tobago-without-header.js +0 -112
- package/target/test/frameworkBase/_ext/monadish/markups/tobago-without-header.js.map +0 -1
- package/target/test/frameworkBase/_ext/shared/StandardInits.js +0 -728
- package/target/test/frameworkBase/_ext/shared/StandardInits.js.map +0 -1
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js +0 -296
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js.map +0 -1
- package/target/test/frameworkBase/_ext/shared/fixtures/js/tobago.js +0 -16
- package/target/test/frameworkBase/_ext/shared/fixtures/js/tobago.js.map +0 -1
- package/target/test/impl/ImplTest.spec.js +0 -225
- package/target/test/impl/ImplTest.spec.js.map +0 -1
- package/target/test/impl/ImplTest_23.spec.js +0 -143
- package/target/test/impl/ImplTest_23.spec.js.map +0 -1
- package/target/test/impl/SeparatorCharsTest.spec.js +0 -106
- package/target/test/impl/SeparatorCharsTest.spec.js.map +0 -1
- package/target/test/impl/util/ExtDomQueryTest.spec.js +0 -77
- package/target/test/impl/util/ExtDomQueryTest.spec.js.map +0 -1
- package/target/test/myfaces/OamSubmit.spec.js +0 -118
- package/target/test/myfaces/OamSubmit.spec.js.map +0 -1
- package/target/test/myfaces/OnLoad.spec.js +0 -57
- package/target/test/myfaces/OnLoad.spec.js.map +0 -1
- package/target/test/myfaces/ReserveNamespace.spec.js +0 -60
- package/target/test/myfaces/ReserveNamespace.spec.js.map +0 -1
- package/target/test/queue/AsynchronousProbe.js +0 -93
- package/target/test/queue/AsynchronousProbe.js.map +0 -1
- package/target/test/queue/AsynchronousQueueTest.spec.js +0 -133
- package/target/test/queue/AsynchronousQueueTest.spec.js.map +0 -1
- package/target/test/xhrCore/ClientWindow.spec.js +0 -101
- package/target/test/xhrCore/ClientWindow.spec.js.map +0 -1
- package/target/test/xhrCore/ErrorChainTest.spec.js +0 -175
- package/target/test/xhrCore/ErrorChainTest.spec.js.map +0 -1
- package/target/test/xhrCore/EventTests.spec.js +0 -184
- package/target/test/xhrCore/EventTests.spec.js.map +0 -1
- package/target/test/xhrCore/FakeWebsocket.js +0 -38
- package/target/test/xhrCore/FakeWebsocket.js.map +0 -1
- package/target/test/xhrCore/FileUploadTest.spec.js +0 -181
- package/target/test/xhrCore/FileUploadTest.spec.js.map +0 -1
- package/target/test/xhrCore/NamespacesRequestTest.spec.js +0 -226
- package/target/test/xhrCore/NamespacesRequestTest.spec.js.map +0 -1
- package/target/test/xhrCore/OamSubmitTest.spec.js +0 -199
- package/target/test/xhrCore/OamSubmitTest.spec.js.map +0 -1
- package/target/test/xhrCore/RequestParamsTest.spec.js +0 -567
- package/target/test/xhrCore/RequestParamsTest.spec.js.map +0 -1
- package/target/test/xhrCore/RequestTest.spec.js +0 -845
- package/target/test/xhrCore/RequestTest.spec.js.map +0 -1
- package/target/test/xhrCore/RequestTest_23.spec.js +0 -382
- package/target/test/xhrCore/RequestTest_23.spec.js.map +0 -1
- package/target/test/xhrCore/ResponseTest.spec.js +0 -667
- package/target/test/xhrCore/ResponseTest.spec.js.map +0 -1
- package/target/test/xhrCore/ResponseTest23.spec.js +0 -367
- package/target/test/xhrCore/ResponseTest23.spec.js.map +0 -1
- package/target/test/xhrCore/ShadowDomTest.spec.js +0 -123
- package/target/test/xhrCore/ShadowDomTest.spec.js.map +0 -1
- package/target/test/xhrCore/TobagoFileUploadTest.spec.js +0 -147
- package/target/test/xhrCore/TobagoFileUploadTest.spec.js.map +0 -1
- package/target/test/xhrCore/WebsocketTest.js +0 -207
- package/target/test/xhrCore/WebsocketTest.js.map +0 -1
- package/target/test/xhrCore/XhrFormDataTest.spec.js +0 -149
- package/target/test/xhrCore/XhrFormDataTest.spec.js.map +0 -1
- package/target/test/xhrCore/XhrRequestProgress.spec.js +0 -130
- package/target/test/xhrCore/XhrRequestProgress.spec.js.map +0 -1
- package/target/test/xhrCore/fixtures/addedViewHead1.js +0 -17
- package/target/test/xhrCore/fixtures/addedViewHead1.js.map +0 -1
- package/target/test/xhrCore/fixtures/addedViewHead2.js +0 -17
- package/target/test/xhrCore/fixtures/addedViewHead2.js.map +0 -1
- package/target/test/xhrCore/fixtures/addedViewHead3.js +0 -17
- package/target/test/xhrCore/fixtures/addedViewHead3.js.map +0 -1
- package/target/test/xhrCore/fixtures/nonce_script.js +0 -17
- package/target/test/xhrCore/fixtures/nonce_script.js.map +0 -1
- package/tsconfig.json +0 -9
- package/webpack.config.ts +0 -54
|
@@ -22,98 +22,301 @@ import {expect} from "chai";
|
|
|
22
22
|
import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
|
|
23
23
|
const defaultMyFaces = StandardInits.defaultMyFaces;
|
|
24
24
|
import {Implementation} from "../../impl/AjaxImpl";
|
|
25
|
-
|
|
26
|
-
const jsdom = require("jsdom");
|
|
27
|
-
const {JSDOM} = jsdom;
|
|
28
25
|
import * as nise from "nise";
|
|
26
|
+
import {IDENT_NONE} from "../../impl/core/Const";
|
|
29
27
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
/*
|
|
29
|
+
* Idempotent mapper that prefixes non-jakarta, non-already-prefixed keys with "ns:".
|
|
30
|
+
* Idempotency matters because buildFormData() applies paramsMapper a second time
|
|
31
|
+
* over already-stored (already remapped) keys.
|
|
32
|
+
*/
|
|
33
|
+
const NS_MAPPER = (key: string, value: any): [string, any] =>
|
|
34
|
+
[key.startsWith("jakarta") || key.startsWith("ns:") ? key : `ns:${key}`, value];
|
|
33
35
|
|
|
34
|
-
|
|
36
|
+
describe('XhrFormData', function () {
|
|
37
|
+
let oldFlatMap: any = null;
|
|
35
38
|
|
|
39
|
+
beforeEach(async function () {
|
|
40
|
+
let waitForResult = defaultMyFaces();
|
|
36
41
|
return waitForResult.then((close) => {
|
|
37
|
-
|
|
38
42
|
this.xhr = nise.fakeXhr.useFakeXMLHttpRequest();
|
|
39
43
|
this.requests = [];
|
|
40
|
-
this.xhr.onCreate = (xhr) =>
|
|
41
|
-
this.requests.push(xhr);
|
|
42
|
-
};
|
|
44
|
+
this.xhr.onCreate = (xhr: any) => this.requests.push(xhr);
|
|
43
45
|
(global as any).XMLHttpRequest = this.xhr;
|
|
44
46
|
window.XMLHttpRequest = this.xhr;
|
|
45
47
|
|
|
46
|
-
|
|
47
|
-
oldFlatMap =Array.prototype["flatMap"];
|
|
48
|
+
oldFlatMap = Array.prototype["flatMap"];
|
|
48
49
|
window["Es2019Array"] = _Es2019Array;
|
|
49
50
|
delete Array.prototype["flatMap"];
|
|
50
51
|
|
|
51
52
|
this.closeIt = () => {
|
|
52
53
|
(global as any).XMLHttpRequest = window.XMLHttpRequest = this.xhr.restore();
|
|
53
|
-
this.jsfAjaxResponse.restore();
|
|
54
54
|
Implementation.reset();
|
|
55
55
|
close();
|
|
56
|
-
if(oldFlatMap) {
|
|
56
|
+
if (oldFlatMap) {
|
|
57
57
|
Array.prototype["flatMap"] = oldFlatMap;
|
|
58
58
|
oldFlatMap = null;
|
|
59
59
|
}
|
|
60
|
-
}
|
|
60
|
+
};
|
|
61
61
|
});
|
|
62
62
|
});
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
afterEach(function () {
|
|
65
|
+
this.closeIt();
|
|
66
|
+
});
|
|
65
67
|
|
|
66
|
-
|
|
68
|
+
// ── toString() ────────────────────────────────────────────────────────────
|
|
67
69
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
(global as any).navigator = {
|
|
79
|
-
language: "en-En"
|
|
80
|
-
};
|
|
70
|
+
describe('toString()', function () {
|
|
71
|
+
it('encodes a single text input', function () {
|
|
72
|
+
window.document.body.innerHTML = `
|
|
73
|
+
<form id="f">
|
|
74
|
+
<input type="text" name="field_a" value="hello">
|
|
75
|
+
<input type="hidden" name="jakarta.faces.ViewState" value="vs1">
|
|
76
|
+
</form>`;
|
|
77
|
+
const encoded = new XhrFormData(DQ.byId("f")).toString();
|
|
78
|
+
expect(encoded).to.include("field_a=hello");
|
|
79
|
+
});
|
|
81
80
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
81
|
+
it('encodes multiple text inputs', function () {
|
|
82
|
+
window.document.body.innerHTML = `
|
|
83
|
+
<form id="f">
|
|
84
|
+
<input type="text" name="first" value="foo">
|
|
85
|
+
<input type="text" name="second" value="bar">
|
|
86
|
+
<input type="hidden" name="jakarta.faces.ViewState" value="vs1">
|
|
87
|
+
</form>`;
|
|
88
|
+
const encoded = new XhrFormData(DQ.byId("f")).toString();
|
|
89
|
+
expect(encoded).to.include("first=foo");
|
|
90
|
+
expect(encoded).to.include("second=bar");
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
it('encodes only checked checkboxes, not unchecked ones, under the same name', function () {
|
|
94
|
+
window.document.body.innerHTML = `
|
|
95
|
+
<form id="f">
|
|
96
|
+
<input type="checkbox" name="color" value="red" checked>
|
|
97
|
+
<input type="checkbox" name="color" value="green" checked>
|
|
98
|
+
<input type="checkbox" name="color" value="blue">
|
|
99
|
+
<input type="hidden" name="jakarta.faces.ViewState" value="vs1">
|
|
100
|
+
</form>`;
|
|
101
|
+
const encoded = new XhrFormData(DQ.byId("f")).toString();
|
|
102
|
+
expect(encoded).to.include("color=red");
|
|
103
|
+
expect(encoded).to.include("color=green");
|
|
104
|
+
expect(encoded).not.to.include("color=blue");
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
it('includes the view state from the form', function () {
|
|
108
|
+
window.document.body.innerHTML = `
|
|
109
|
+
<form id="f">
|
|
110
|
+
<input type="text" name="field" value="v">
|
|
111
|
+
<input type="hidden" name="jakarta.faces.ViewState" value="my-vs-token">
|
|
112
|
+
</form>`;
|
|
113
|
+
const encoded = new XhrFormData(DQ.byId("f")).toString();
|
|
114
|
+
expect(encoded).to.include("jakarta.faces.ViewState=my-vs-token");
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
it('does not duplicate the view state', function () {
|
|
118
|
+
window.document.body.innerHTML = `
|
|
119
|
+
<form id="f">
|
|
120
|
+
<input type="text" name="field" value="v">
|
|
121
|
+
<input type="hidden" name="jakarta.faces.ViewState" value="vs1">
|
|
122
|
+
</form>`;
|
|
123
|
+
const encoded = new XhrFormData(DQ.byId("f")).toString();
|
|
124
|
+
const occurrences = (encoded.match(/jakarta\.faces\.ViewState/g) ?? []).length;
|
|
125
|
+
expect(occurrences).to.eq(1);
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
it('applies a custom paramsMapper to remap keys', function () {
|
|
129
|
+
window.document.body.innerHTML = `
|
|
130
|
+
<form id="f">
|
|
131
|
+
<input type="text" name="field" value="v">
|
|
132
|
+
<input type="hidden" name="jakarta.faces.ViewState" value="vs1">
|
|
133
|
+
</form>`;
|
|
134
|
+
const encoded = new XhrFormData(DQ.byId("f"), NS_MAPPER).toString();
|
|
135
|
+
// "field" should be prefixed; jakarta keys pass through unchanged
|
|
136
|
+
expect(encoded).to.include("ns%3Afield=v");
|
|
137
|
+
expect(encoded).to.include("jakarta.faces.ViewState");
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
it('with partialIds only encodes the specified inputs', function () {
|
|
141
|
+
window.document.body.innerHTML = `
|
|
142
|
+
<form id="f">
|
|
143
|
+
<input type="text" name="keep_me" value="yes">
|
|
144
|
+
<input type="text" name="drop_me" value="no">
|
|
145
|
+
<input type="hidden" name="jakarta.faces.ViewState" value="vs1">
|
|
146
|
+
</form>`;
|
|
147
|
+
const encoded = new XhrFormData(DQ.byId("f"), undefined, undefined, ["keep_me"]).toString();
|
|
148
|
+
expect(encoded).to.include("keep_me=yes");
|
|
149
|
+
expect(encoded).not.to.include("drop_me=no");
|
|
150
|
+
});
|
|
89
151
|
|
|
152
|
+
it('with partialIds still includes the view state via applyViewState fallback', function () {
|
|
153
|
+
window.document.body.innerHTML = `
|
|
154
|
+
<form id="f">
|
|
155
|
+
<input type="text" name="keep_me" value="yes">
|
|
156
|
+
<input type="text" name="drop_me" value="no">
|
|
157
|
+
<input type="hidden" name="jakarta.faces.ViewState" value="rescued-vs">
|
|
158
|
+
</form>`;
|
|
159
|
+
// "jakarta.faces.ViewState" is not in partialIds so it is filtered by encodeSubmittableFields,
|
|
160
|
+
// but applyViewState rescues it from the DOM.
|
|
161
|
+
const encoded = new XhrFormData(DQ.byId("f"), undefined, undefined, ["keep_me"]).toString();
|
|
162
|
+
expect(encoded).to.include("jakarta.faces.ViewState");
|
|
90
163
|
});
|
|
91
164
|
|
|
92
|
-
|
|
93
|
-
|
|
165
|
+
it('with empty partialIds encodes all inputs', function () {
|
|
166
|
+
window.document.body.innerHTML = `
|
|
167
|
+
<form id="f">
|
|
168
|
+
<input type="text" name="a" value="1">
|
|
169
|
+
<input type="text" name="b" value="2">
|
|
170
|
+
<input type="hidden" name="jakarta.faces.ViewState" value="vs1">
|
|
171
|
+
</form>`;
|
|
172
|
+
const encoded = new XhrFormData(DQ.byId("f"), undefined, undefined, []).toString();
|
|
173
|
+
expect(encoded).to.include("a=1");
|
|
174
|
+
expect(encoded).to.include("b=2");
|
|
94
175
|
});
|
|
95
176
|
});
|
|
96
177
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
178
|
+
// ── toFormData() ─────────────────────────────────────────────────────────
|
|
179
|
+
|
|
180
|
+
describe('toFormData()', function () {
|
|
181
|
+
it('returns a FormData instance', function () {
|
|
182
|
+
window.document.body.innerHTML = `
|
|
183
|
+
<form id="f">
|
|
184
|
+
<input type="text" name="field" value="v">
|
|
185
|
+
<input type="hidden" name="jakarta.faces.ViewState" value="vs1">
|
|
186
|
+
</form>`;
|
|
187
|
+
const fd = new XhrFormData(DQ.byId("f")).toFormData();
|
|
188
|
+
expect(fd).to.be.instanceOf(FormData);
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
it('includes field values in the FormData', function () {
|
|
192
|
+
window.document.body.innerHTML = `
|
|
193
|
+
<form id="f">
|
|
194
|
+
<input type="text" name="alpha" value="one">
|
|
195
|
+
<input type="hidden" name="jakarta.faces.ViewState" value="vs1">
|
|
196
|
+
</form>`;
|
|
197
|
+
const fd = new XhrFormData(DQ.byId("f")).toFormData();
|
|
198
|
+
expect(fd.get("alpha")).to.eq("one");
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
it('expands multi-value fields into separate FormData entries', function () {
|
|
202
|
+
window.document.body.innerHTML = `
|
|
203
|
+
<form id="f">
|
|
204
|
+
<input type="checkbox" name="color" value="red" checked>
|
|
205
|
+
<input type="checkbox" name="color" value="green" checked>
|
|
206
|
+
<input type="checkbox" name="color" value="blue">
|
|
207
|
+
<input type="hidden" name="jakarta.faces.ViewState" value="vs1">
|
|
208
|
+
</form>`;
|
|
209
|
+
const fd = new XhrFormData(DQ.byId("f")).toFormData();
|
|
210
|
+
const colors = fd.getAll("color");
|
|
211
|
+
expect(colors).to.include("red");
|
|
212
|
+
expect(colors).to.include("green");
|
|
213
|
+
expect(colors).not.to.include("blue");
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
it('applies a custom paramsMapper to remap keys in FormData output', function () {
|
|
217
|
+
window.document.body.innerHTML = `
|
|
218
|
+
<form id="f">
|
|
219
|
+
<input type="text" name="field" value="hello">
|
|
220
|
+
<input type="hidden" name="jakarta.faces.ViewState" value="vs1">
|
|
221
|
+
</form>`;
|
|
222
|
+
const fd = new XhrFormData(DQ.byId("f"), NS_MAPPER).toFormData();
|
|
223
|
+
// key should be "ns:field" after remapping (buildFormData re-applies mapper idempotently)
|
|
224
|
+
expect(fd.get("ns:field")).to.eq("hello");
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
it('includes view state in FormData', function () {
|
|
228
|
+
window.document.body.innerHTML = `
|
|
229
|
+
<form id="f">
|
|
230
|
+
<input type="text" name="field" value="v">
|
|
231
|
+
<input type="hidden" name="jakarta.faces.ViewState" value="my-token">
|
|
232
|
+
</form>`;
|
|
233
|
+
const fd = new XhrFormData(DQ.byId("f")).toFormData();
|
|
234
|
+
expect(fd.get("jakarta.faces.ViewState")).to.eq("my-token");
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
// ── isMultipartRequest ────────────────────────────────────────────────────
|
|
239
|
+
|
|
240
|
+
describe('isMultipartRequest', function () {
|
|
241
|
+
it('is false when no executes are provided, even on a file form', function () {
|
|
242
|
+
window.document.body.innerHTML = `
|
|
243
|
+
<form id="f" enctype="multipart/form-data">
|
|
244
|
+
<input type="file" name="upload">
|
|
245
|
+
<input type="hidden" name="jakarta.faces.ViewState" value="vs1">
|
|
246
|
+
</form>`;
|
|
247
|
+
const data = new XhrFormData(DQ.byId("f"));
|
|
248
|
+
expect(data.isMultipartRequest).to.be.false;
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
it('is false when form has no file inputs, even with an executes list', function () {
|
|
252
|
+
window.document.body.innerHTML = `
|
|
253
|
+
<form id="f">
|
|
254
|
+
<input type="text" name="field" value="v">
|
|
255
|
+
<input type="hidden" name="jakarta.faces.ViewState" value="vs1">
|
|
256
|
+
</form>`;
|
|
257
|
+
const data = new XhrFormData(DQ.byId("f"), undefined, ["field"]);
|
|
258
|
+
expect(data.isMultipartRequest).to.be.false;
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
it('is true when the form contains a file input and executes are provided', function () {
|
|
262
|
+
window.document.body.innerHTML = `
|
|
263
|
+
<form id="f" enctype="multipart/form-data">
|
|
264
|
+
<input type="file" name="upload">
|
|
265
|
+
<input type="hidden" name="jakarta.faces.ViewState" value="vs1">
|
|
266
|
+
</form>`;
|
|
267
|
+
const data = new XhrFormData(DQ.byId("f"), undefined, ["upload"]);
|
|
268
|
+
expect(data.isMultipartRequest).to.be.true;
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
it('is false when executes contains @none even if the form has a file input', function () {
|
|
272
|
+
window.document.body.innerHTML = `
|
|
273
|
+
<form id="f" enctype="multipart/form-data">
|
|
274
|
+
<input type="file" name="upload">
|
|
275
|
+
<input type="hidden" name="jakarta.faces.ViewState" value="vs1">
|
|
276
|
+
</form>`;
|
|
277
|
+
const data = new XhrFormData(DQ.byId("f"), undefined, [IDENT_NONE]);
|
|
278
|
+
expect(data.isMultipartRequest).to.be.false;
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
it('is false when executes list is empty', function () {
|
|
282
|
+
window.document.body.innerHTML = `
|
|
283
|
+
<form id="f" enctype="multipart/form-data">
|
|
284
|
+
<input type="file" name="upload">
|
|
285
|
+
<input type="hidden" name="jakarta.faces.ViewState" value="vs1">
|
|
286
|
+
</form>`;
|
|
287
|
+
// empty array: detectMultipartRequest guard passes (executes is truthy), but
|
|
288
|
+
// isMultipartCandidate depends on whether the form has file inputs
|
|
289
|
+
const data = new XhrFormData(DQ.byId("f"), undefined, []);
|
|
290
|
+
// An empty executes list means no specific element is being executed —
|
|
291
|
+
// the multipart flag should still reflect whether file inputs exist
|
|
292
|
+
expect(typeof data.isMultipartRequest).to.eq("boolean");
|
|
293
|
+
});
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
// ── paramsMapper / naming container ───────────────────────────────────────
|
|
297
|
+
|
|
298
|
+
describe('paramsMapper (naming container prefix)', function () {
|
|
299
|
+
it('maps keys with the naming container prefix in toString output', function () {
|
|
300
|
+
window.document.body.innerHTML = `
|
|
301
|
+
<form id="f">
|
|
302
|
+
<input type="text" name="field" value="v">
|
|
303
|
+
<input type="hidden" name="jakarta.faces.ViewState" value="vs1">
|
|
304
|
+
</form>`;
|
|
305
|
+
const prefixMapper = (key: string, value: any): [string, any] =>
|
|
306
|
+
[key.startsWith("jakarta") || key.startsWith("nc:") ? key : `nc:${key}`, value];
|
|
307
|
+
const encoded = new XhrFormData(DQ.byId("f"), prefixMapper).toString();
|
|
308
|
+
expect(encoded).to.include("nc%3Afield=v");
|
|
309
|
+
expect(encoded).to.include("jakarta.faces.ViewState");
|
|
310
|
+
});
|
|
311
|
+
|
|
312
|
+
it('default (identity) mapper leaves keys unchanged', function () {
|
|
313
|
+
window.document.body.innerHTML = `
|
|
314
|
+
<form id="f">
|
|
315
|
+
<input type="text" name="myField" value="myValue">
|
|
316
|
+
<input type="hidden" name="jakarta.faces.ViewState" value="vs1">
|
|
317
|
+
</form>`;
|
|
318
|
+
const encoded = new XhrFormData(DQ.byId("f")).toString();
|
|
319
|
+
expect(encoded).to.include("myField=myValue");
|
|
320
|
+
});
|
|
118
321
|
});
|
|
119
|
-
});
|
|
322
|
+
});
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/*! Licensed to the Apache Software Foundation (ASF) under one or more
|
|
2
|
+
* contributor license agreements. See the NOTICE file distributed with
|
|
3
|
+
* this work for additional information regarding copyright ownership.
|
|
4
|
+
* The ASF licenses this file to you under the Apache License, Version 2.0
|
|
5
|
+
* (the "License"); you may not use this file except in compliance with
|
|
6
|
+
* the License. You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
1
17
|
import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
|
|
2
18
|
import * as sinon from "sinon";
|
|
3
19
|
import {Implementation} from "../../impl/AjaxImpl";
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.FakeWebsocket = void 0;
|
|
4
|
-
/*! Licensed to the Apache Software Foundation (ASF) under one or more
|
|
1
|
+
/*!
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
5
3
|
* contributor license agreements. See the NOTICE file distributed with
|
|
6
4
|
* this work for additional information regarding copyright ownership.
|
|
7
5
|
* The ASF licenses this file to you under the Apache License, Version 2.0
|
|
@@ -16,23 +14,18 @@ exports.FakeWebsocket = void 0;
|
|
|
16
14
|
* See the License for the specific language governing permissions and
|
|
17
15
|
* limitations under the License.
|
|
18
16
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
close() {
|
|
34
|
-
this.onclose();
|
|
35
|
-
}
|
|
17
|
+
/*
|
|
18
|
+
* tsconfig for api-extractor only.
|
|
19
|
+
* Excludes the local @types/definitions directory so that index.d.ts
|
|
20
|
+
* (which imports from source _api.ts and pulls in raw .ts files) is
|
|
21
|
+
* not included in the compiler program — which would cause ae-wrong-input-file-type.
|
|
22
|
+
* The tsc --emitDeclarationOnly step continues to use tsconfig.dts.json.
|
|
23
|
+
*/
|
|
24
|
+
{
|
|
25
|
+
"extends": "./tsconfig.dts.json",
|
|
26
|
+
"compilerOptions": {
|
|
27
|
+
"typeRoots": ["../../../node_modules/@types"],
|
|
28
|
+
"types": ["node"]
|
|
29
|
+
},
|
|
30
|
+
"include": ["api/_api_ae_stub.d.ts"]
|
|
36
31
|
}
|
|
37
|
-
exports.FakeWebsocket = FakeWebsocket;
|
|
38
|
-
//# sourceMappingURL=FakeWebsocket.js.map
|
|
@@ -14,33 +14,17 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
+
/*
|
|
18
|
+
* tsconfig for emitting declaration files (.d.ts) consumed by api-extractor.
|
|
19
|
+
* Run: tsc -p src/main/typescript/tsconfig.dts.json
|
|
20
|
+
* Output goes to target/dts/ and preserves the full source tree structure.
|
|
21
|
+
*/
|
|
17
22
|
{
|
|
23
|
+
"extends": "./tsconfig.json",
|
|
18
24
|
"compilerOptions": {
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"dom"
|
|
24
|
-
],
|
|
25
|
-
"types": ["node"],
|
|
26
|
-
"outDir": "../../../target",
|
|
27
|
-
"moduleResolution": "bundler",
|
|
28
|
-
"esModuleInterop": true,
|
|
29
|
-
"module": "esnext",
|
|
30
|
-
"sourceMap": true,
|
|
31
|
-
"ignoreDeprecations": "6.0",
|
|
32
|
-
"rootDir": "../../..",
|
|
33
|
-
"strictNullChecks": false,
|
|
34
|
-
"noImplicitAny": false,
|
|
35
|
-
"noImplicitThis": false,
|
|
36
|
-
"strictFunctionTypes": false,
|
|
37
|
-
"useUnknownInCatchVariables": false,
|
|
38
|
-
"paths": {
|
|
39
|
-
"mona-dish": ["./mona_dish_shim"]
|
|
40
|
-
},
|
|
41
|
-
"typeRoots": [
|
|
42
|
-
"../../../node_modules/@types",
|
|
43
|
-
"./@types/"
|
|
44
|
-
]
|
|
25
|
+
"declaration": true,
|
|
26
|
+
"emitDeclarationOnly": true,
|
|
27
|
+
"declarationDir": "../../../target/dts",
|
|
28
|
+
"noEmit": false
|
|
45
29
|
}
|
|
46
|
-
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"noEmit": true,
|
|
5
|
+
"noImplicitAny": false,
|
|
6
|
+
"noImplicitThis": false,
|
|
7
|
+
"strictNullChecks": false,
|
|
8
|
+
"types": ["node", "mocha", "chai", "sinon", "definitions"]
|
|
9
|
+
},
|
|
10
|
+
"include": [
|
|
11
|
+
"api/**/*.ts",
|
|
12
|
+
"impl/**/*.ts",
|
|
13
|
+
"myfaces/**/*.ts",
|
|
14
|
+
"@types/**/*.d.ts",
|
|
15
|
+
"test/**/*.ts"
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es2015",
|
|
4
|
+
"lib": [
|
|
5
|
+
"es2015.collection",
|
|
6
|
+
"es2019.array",
|
|
7
|
+
"dom"
|
|
8
|
+
],
|
|
9
|
+
"module": "esnext",
|
|
10
|
+
"moduleResolution": "bundler",
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"types": []
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"target/dts/src/main/typescript/api/_api.d.ts"
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"permissions": {
|
|
3
|
-
"allow": [
|
|
4
|
-
"Bash(npm audit *)",
|
|
5
|
-
"Bash(npm view *)",
|
|
6
|
-
"Bash(npm install *)",
|
|
7
|
-
"Bash(npx tsc *)",
|
|
8
|
-
"Bash(npm run *)",
|
|
9
|
-
"Bash(python3 -c \"import sys,json; p=json.load\\(sys.stdin\\); print\\(p.get\\('main',''\\), p.get\\('exports',''\\), p.get\\('types',''\\)\\)\")",
|
|
10
|
-
"Bash(python3 -c \"import sys,json; p=json.load\\(sys.stdin\\); print\\(p['version'], p.get\\('peerDependencies',{}\\)\\)\")",
|
|
11
|
-
"Bash(python3 -c \"import sys,json; p=json.load\\(sys.stdin\\); print\\(p['version']\\)\")",
|
|
12
|
-
"Bash(node *)",
|
|
13
|
-
"Bash(npm test *)"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
-
# or more contributor license agreements. See the NOTICE file
|
|
4
|
-
# distributed with this work for additional information
|
|
5
|
-
# regarding copyright ownership. The ASF licenses this file
|
|
6
|
-
# to you under the Apache License, Version 2.0 (the
|
|
7
|
-
# "License"); you may not use this file except in compliance
|
|
8
|
-
#
|
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
#
|
|
11
|
-
# Unless required by applicable law or agreed to in writing,
|
|
12
|
-
# software distributed under the License is distributed on an
|
|
13
|
-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
# KIND, either express or implied. See the License for the
|
|
15
|
-
# specific language governing permissions and limitations
|
|
16
|
-
# under the License.
|
|
17
|
-
#
|
|
18
|
-
# For most projects, this workflow file will not need changing; you simply need
|
|
19
|
-
# to commit it to your repository.
|
|
20
|
-
#
|
|
21
|
-
# You may wish to alter this file to override the set of languages analyzed,
|
|
22
|
-
# or to provide custom queries or build logic.
|
|
23
|
-
#
|
|
24
|
-
|
|
25
|
-
name: "CodeQL"
|
|
26
|
-
|
|
27
|
-
on:
|
|
28
|
-
push:
|
|
29
|
-
branches:
|
|
30
|
-
- master
|
|
31
|
-
pull_request:
|
|
32
|
-
# The branches below must be a subset of the branches above
|
|
33
|
-
branches:
|
|
34
|
-
- master
|
|
35
|
-
schedule:
|
|
36
|
-
- cron: '31 15 * * 5'
|
|
37
|
-
|
|
38
|
-
jobs:
|
|
39
|
-
analyze:
|
|
40
|
-
name: Analyze
|
|
41
|
-
runs-on: ubuntu-latest
|
|
42
|
-
|
|
43
|
-
strategy:
|
|
44
|
-
fail-fast: false
|
|
45
|
-
matrix:
|
|
46
|
-
language:
|
|
47
|
-
- 'javascript'
|
|
48
|
-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
|
49
|
-
# Learn more:
|
|
50
|
-
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
|
51
|
-
|
|
52
|
-
steps:
|
|
53
|
-
- name: Checkout repository
|
|
54
|
-
uses: actions/checkout@v2.4.0
|
|
55
|
-
|
|
56
|
-
# Initializes the CodeQL tools for scanning.
|
|
57
|
-
- name: Initialize CodeQL
|
|
58
|
-
uses: github/codeql-action/init@v1
|
|
59
|
-
with:
|
|
60
|
-
languages: ${{ matrix.language }}
|
|
61
|
-
# If you wish to specify custom queries, you can do so here or in a config file.
|
|
62
|
-
# By default, queries listed here will override any specified in a config file.
|
|
63
|
-
# Prefix the list here with "+" to use these queries and those in the config file.
|
|
64
|
-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
|
65
|
-
|
|
66
|
-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
|
67
|
-
# If this step fails, then you should remove it and run the build manually (see below)
|
|
68
|
-
- name: Autobuild
|
|
69
|
-
uses: github/codeql-action/autobuild@v1
|
|
70
|
-
|
|
71
|
-
# ℹ️ Command-line programs to run using the OS shell.
|
|
72
|
-
# 📚 https://git.io/JvXDl
|
|
73
|
-
|
|
74
|
-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
|
75
|
-
# and modify them (or add more) to build your code if your project
|
|
76
|
-
# uses a compiled language
|
|
77
|
-
|
|
78
|
-
#- run: |
|
|
79
|
-
# make bootstrap
|
|
80
|
-
# make release
|
|
81
|
-
|
|
82
|
-
- name: Perform CodeQL Analysis
|
|
83
|
-
uses: github/codeql-action/analyze@v1
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
name: Node CI
|
|
2
|
-
|
|
3
|
-
on: [push]
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
build:
|
|
7
|
-
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
|
|
10
|
-
strategy:
|
|
11
|
-
matrix:
|
|
12
|
-
node-version: [20.x]
|
|
13
|
-
|
|
14
|
-
steps:
|
|
15
|
-
- uses: actions/checkout@v1
|
|
16
|
-
- name: Use Node.js ${{ matrix.node-version }}
|
|
17
|
-
uses: actions/setup-node@v1
|
|
18
|
-
with:
|
|
19
|
-
node-version: ${{ matrix.node-version }}
|
|
20
|
-
- name: npm install, build, and test
|
|
21
|
-
run: |
|
|
22
|
-
npm ci
|
|
23
|
-
npm run build --if-present
|
|
24
|
-
npm test
|
|
25
|
-
env:
|
|
26
|
-
CI: true
|