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
package/package.json
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsf.js_next_gen",
|
|
3
|
-
"version": "4.1.0-beta.
|
|
3
|
+
"version": "4.1.0-beta.21",
|
|
4
4
|
"description": "A next generation typescript reimplementation of jsf.js",
|
|
5
5
|
"main": "dist/window/faces.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"doc": "npx typedoc --tsconfig src/main/typescript/tsconfig-typedoc.json",
|
|
8
|
-
"
|
|
8
|
+
"typecheck": "tsc --noEmit --project src/main/typescript/tsconfig.test.json",
|
|
9
|
+
"test": "npm run typecheck && cross-env mocha",
|
|
9
10
|
"coverage": "cross-env nyc --reporter=html --reporter=text mocha",
|
|
10
|
-
"build-
|
|
11
|
-
"build-
|
|
12
|
-
"build": "
|
|
11
|
+
"build-bundles": "cross-env NODE_OPTIONS=\"--import tsx\" webpack",
|
|
12
|
+
"build-production": "cross-env NODE_OPTIONS=\"--import tsx\" webpack --mode production",
|
|
13
|
+
"build-development": "cross-env NODE_OPTIONS=\"--import tsx\" webpack --mode development",
|
|
14
|
+
"build-dts-compile": "tsc -p src/main/typescript/tsconfig.dts.json",
|
|
15
|
+
"build-dts": "npm run build-dts-compile && node scripts/build-dts.mjs",
|
|
16
|
+
"build": "npm run doc && npm run build-bundles && npm run build-dts",
|
|
13
17
|
"serve": "npx http-server -p 8900 -b -g -o ./dist/"
|
|
14
18
|
},
|
|
15
19
|
"keywords": [
|
|
@@ -21,32 +25,32 @@
|
|
|
21
25
|
"license": "Apache-2.0",
|
|
22
26
|
"devDependencies": {
|
|
23
27
|
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
|
28
|
+
"@microsoft/api-extractor": "^7.58.8",
|
|
24
29
|
"@types/chai": "^5.2.3",
|
|
25
30
|
"@types/mocha": "^10.0.10",
|
|
26
|
-
"@types/node": "^25.
|
|
31
|
+
"@types/node": "^25.9.3",
|
|
27
32
|
"@types/sinon": "^21.0.1",
|
|
28
33
|
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
|
29
34
|
"chai": "^6.2.2",
|
|
30
35
|
"cross-env": "^10.1.0",
|
|
36
|
+
"global-jsdom": "^29.0.0",
|
|
31
37
|
"html-webpack-plugin": "^5.6.7",
|
|
32
38
|
"http-server": "^14.1.1",
|
|
33
|
-
"jsdom": "^29.1.
|
|
34
|
-
"
|
|
35
|
-
"mocha": "^11.7.5",
|
|
39
|
+
"jsdom": "^29.1.1",
|
|
40
|
+
"mocha": "^11.7.6",
|
|
36
41
|
"nise": "^6.1.5",
|
|
37
|
-
"npm-check-updates": "^22.
|
|
42
|
+
"npm-check-updates": "^22.2.3",
|
|
38
43
|
"nyc": "^18.0.0",
|
|
39
|
-
"replace-in-file": "^8.4.0",
|
|
40
44
|
"rxjs": "^7.8.2",
|
|
41
|
-
"sinon": "^
|
|
42
|
-
"terser-webpack-plugin": "^5.
|
|
43
|
-
"ts-loader": "^9.
|
|
45
|
+
"sinon": "^22.0.0",
|
|
46
|
+
"terser-webpack-plugin": "^5.6.1",
|
|
47
|
+
"ts-loader": "^9.6.0",
|
|
44
48
|
"tsconfig-paths": "^4.2.0",
|
|
45
|
-
"tsx": "^4.
|
|
49
|
+
"tsx": "^4.22.4",
|
|
46
50
|
"typedoc": "^0.28.19",
|
|
47
51
|
"typescript": "^6.0.3",
|
|
48
|
-
"webpack": "^5.
|
|
49
|
-
"webpack-cli": "^7.0.
|
|
52
|
+
"webpack": "^5.107.2",
|
|
53
|
+
"webpack-cli": "^7.0.3"
|
|
50
54
|
},
|
|
51
55
|
"overrides": {
|
|
52
56
|
"diff": "^9.0.0",
|
|
@@ -54,6 +58,6 @@
|
|
|
54
58
|
"uuid": "^14.0.0"
|
|
55
59
|
},
|
|
56
60
|
"dependencies": {
|
|
57
|
-
"mona-dish": "0.
|
|
61
|
+
"mona-dish": "0.50.0-beta.8"
|
|
58
62
|
}
|
|
59
63
|
}
|
|
@@ -0,0 +1,239 @@
|
|
|
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
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Programmatic api-extractor runner.
|
|
19
|
+
* Suppresses the "bundled TypeScript is older than project" noise that appears
|
|
20
|
+
* when the project uses a newer TypeScript than api-extractor bundles.
|
|
21
|
+
*
|
|
22
|
+
* After running api-extractor for faces, post-processes faces.d.ts into a
|
|
23
|
+
* global declaration file, then derives jsf.d.ts from it via deterministic
|
|
24
|
+
* text transforms (JSF 2.3 shim differences).
|
|
25
|
+
*
|
|
26
|
+
* Usage (called by npm scripts):
|
|
27
|
+
* node scripts/build-dts.mjs
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
import { Extractor, ExtractorConfig } from "@microsoft/api-extractor";
|
|
31
|
+
import { resolve, dirname } from "path";
|
|
32
|
+
import { fileURLToPath } from "url";
|
|
33
|
+
import { readFileSync, writeFileSync } from "fs";
|
|
34
|
+
|
|
35
|
+
// Suppress the "bundled TypeScript / newer than bundled" noise from api-extractor.
|
|
36
|
+
function makeSuppressingWriter(original) {
|
|
37
|
+
return function (chunk, ...args) {
|
|
38
|
+
const text = typeof chunk === "string" ? chunk : chunk.toString();
|
|
39
|
+
if (
|
|
40
|
+
text.includes("bundled TypeScript version") ||
|
|
41
|
+
text.includes("newer than the bundled compiler engine")
|
|
42
|
+
) {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
return original.call(this, chunk, ...args);
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
process.stdout.write = makeSuppressingWriter(process.stdout.write.bind(process.stdout));
|
|
49
|
+
process.stderr.write = makeSuppressingWriter(process.stderr.write.bind(process.stderr));
|
|
50
|
+
|
|
51
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
52
|
+
const projectRoot = resolve(__dirname, "..");
|
|
53
|
+
|
|
54
|
+
// Resolve the local TypeScript compiler installed in the project.
|
|
55
|
+
const typescriptCompilerFolder = resolve(projectRoot, "node_modules", "typescript");
|
|
56
|
+
|
|
57
|
+
// --- Step 1: run api-extractor for faces.d.ts ---
|
|
58
|
+
|
|
59
|
+
const configPath = resolve(projectRoot, "api-extractor.faces.json");
|
|
60
|
+
console.log(`\napi-extractor: processing api-extractor.faces.json`);
|
|
61
|
+
|
|
62
|
+
const extractorConfig = ExtractorConfig.loadFileAndPrepare(configPath);
|
|
63
|
+
|
|
64
|
+
const result = Extractor.invoke(extractorConfig, {
|
|
65
|
+
localBuild: true,
|
|
66
|
+
typescriptCompilerFolder,
|
|
67
|
+
showVerboseMessages: false,
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
if (!result.succeeded) {
|
|
71
|
+
console.error(" ✖ api-extractor.faces.json — FAILED");
|
|
72
|
+
process.exit(1);
|
|
73
|
+
}
|
|
74
|
+
console.log(" ✔ api-extractor.faces.json — completed successfully");
|
|
75
|
+
|
|
76
|
+
// --- Step 2: post-process faces.d.ts into a global declaration file ---
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Walks forward from openIdx counting braces, returns the index of the
|
|
80
|
+
* matching closing brace, or -1 if not found.
|
|
81
|
+
*/
|
|
82
|
+
function findClosingBrace(content, openIdx) {
|
|
83
|
+
let depth = 0;
|
|
84
|
+
for (let i = openIdx; i < content.length; i++) {
|
|
85
|
+
if (content[i] === "{") depth++;
|
|
86
|
+
else if (content[i] === "}") {
|
|
87
|
+
if (--depth === 0) return i;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return -1;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Converts the api-extractor module output into a global declaration file:
|
|
95
|
+
*
|
|
96
|
+
* A. Strips "export" from top-level namespace declarations so that
|
|
97
|
+
* "declare namespace faces { ... }" is a global ambient namespace,
|
|
98
|
+
* matching the runtime shape where faces/jsf hang off window.
|
|
99
|
+
*
|
|
100
|
+
* B. Removes "export { }" which makes the file a TypeScript module
|
|
101
|
+
* (and therefore prevents global treatment).
|
|
102
|
+
*
|
|
103
|
+
* C. Inlines the top-level "declare namespace oam { ... }" block as a
|
|
104
|
+
* nested "namespace oam { ... }" inside myfaces, fixing the
|
|
105
|
+
* self-referential "const oam: typeof oam" that api-extractor emits.
|
|
106
|
+
*/
|
|
107
|
+
function makeGlobalDeclaration(content) {
|
|
108
|
+
content = content.replace(/\r\n/g, "\n");
|
|
109
|
+
|
|
110
|
+
// A. Remove "export" from top-level namespace declarations.
|
|
111
|
+
content = content.replace(/^export (declare namespace )/gm, "$1");
|
|
112
|
+
|
|
113
|
+
// B. Remove the module-marker line.
|
|
114
|
+
content = content.replace(/\nexport \{ \}\s*$/, "\n");
|
|
115
|
+
|
|
116
|
+
// D. api-extractor drops "export" from const declarations inside namespaces
|
|
117
|
+
// (it preserves it for functions/types/interfaces but not consts).
|
|
118
|
+
// Add it back so namespace members like faces.specversion are accessible.
|
|
119
|
+
content = content.replace(/^([ \t]+)const /gm, "$1export const ");
|
|
120
|
+
|
|
121
|
+
// C. Inline the top-level oam namespace into myfaces.
|
|
122
|
+
const oamNeedle = "\ndeclare namespace oam {";
|
|
123
|
+
const nsIdx = content.indexOf(oamNeedle);
|
|
124
|
+
if (nsIdx !== -1) {
|
|
125
|
+
const openIdx = content.indexOf("{", nsIdx + 1);
|
|
126
|
+
const closeIdx = findClosingBrace(content, openIdx);
|
|
127
|
+
if (closeIdx !== -1) {
|
|
128
|
+
// Extract inner content, add 4 extra spaces of indentation, and make
|
|
129
|
+
// each const member explicitly exported so myfaces.oam.X is accessible.
|
|
130
|
+
const inner = content
|
|
131
|
+
.slice(openIdx + 1, closeIdx)
|
|
132
|
+
.split("\n")
|
|
133
|
+
.map((l) => {
|
|
134
|
+
if (!l.trim().length) return "";
|
|
135
|
+
const indented = " " + l;
|
|
136
|
+
// Top-level oam members had no 'export' (redundant at global scope);
|
|
137
|
+
// nested inside myfaces they need it for myfaces.oam.X to be visible.
|
|
138
|
+
return indented.replace(/^([ \t]+)const /, "$1export const ");
|
|
139
|
+
})
|
|
140
|
+
.join("\n")
|
|
141
|
+
.trimEnd();
|
|
142
|
+
|
|
143
|
+
// Find the cut point: the blank line immediately before the top-level
|
|
144
|
+
// JSDoc that precedes "declare namespace oam {".
|
|
145
|
+
// Top-level JSDoc lines start at column 0 ("/**"), while JSDoc inside
|
|
146
|
+
// namespaces is indented (" /**"), so lastIndexOf("\n/**") safely
|
|
147
|
+
// targets the oam JSDoc without matching inner comments.
|
|
148
|
+
const jsdocAnchor = content.lastIndexOf("\n/**", nsIdx);
|
|
149
|
+
const cutFrom = jsdocAnchor !== -1 ? jsdocAnchor : nsIdx;
|
|
150
|
+
|
|
151
|
+
// Remove the top-level oam block first (preserves index validity for
|
|
152
|
+
// the const-oam replacement that follows).
|
|
153
|
+
content = content.slice(0, cutFrom) + content.slice(closeIdx + 1);
|
|
154
|
+
content = content.trimEnd() + "\n";
|
|
155
|
+
|
|
156
|
+
// Replace 'const oam: typeof oam;' with the inlined nested namespace.
|
|
157
|
+
// 'export namespace' so that myfaces.oam is visible to TypeScript.
|
|
158
|
+
content = content.replace(
|
|
159
|
+
/^([ \t]*)const oam: typeof oam;/m,
|
|
160
|
+
`$1export namespace oam {\n${inner}\n$1}`
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return content;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
const APACHE_HEADER =
|
|
169
|
+
"/*! Licensed to the Apache Software Foundation (ASF) under one or more\n" +
|
|
170
|
+
" * contributor license agreements. See the NOTICE file distributed with\n" +
|
|
171
|
+
" * this work for additional information regarding copyright ownership.\n" +
|
|
172
|
+
" * The ASF licenses this file to you under the Apache License, Version 2.0\n" +
|
|
173
|
+
' * (the "License"); you may not use this file except in compliance with\n' +
|
|
174
|
+
" * the License. You may obtain a copy of the License at\n" +
|
|
175
|
+
" *\n" +
|
|
176
|
+
" * http://www.apache.org/licenses/LICENSE-2.0\n" +
|
|
177
|
+
" *\n" +
|
|
178
|
+
" * Unless required by applicable law or agreed to in writing, software\n" +
|
|
179
|
+
' * distributed under the License is distributed on an "AS IS" BASIS,\n' +
|
|
180
|
+
" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" +
|
|
181
|
+
" * See the License for the specific language governing permissions and\n" +
|
|
182
|
+
" * limitations under the License.\n" +
|
|
183
|
+
" */\n\n";
|
|
184
|
+
|
|
185
|
+
function postProcessFaces(facesPath) {
|
|
186
|
+
let content = readFileSync(facesPath, "utf-8");
|
|
187
|
+
content = makeGlobalDeclaration(content);
|
|
188
|
+
content = APACHE_HEADER + content;
|
|
189
|
+
writeFileSync(facesPath, content, "utf-8");
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// --- Step 3: derive jsf.d.ts from the post-processed faces.d.ts ---
|
|
193
|
+
|
|
194
|
+
function generateJsfFromFaces(facesPath, jsfPath) {
|
|
195
|
+
let content = readFileSync(facesPath, "utf-8");
|
|
196
|
+
|
|
197
|
+
// Normalize line endings (faces.d.ts is already normalized by postProcessFaces,
|
|
198
|
+
// but guard here in case this function is ever called standalone).
|
|
199
|
+
content = content.replace(/\r\n/g, "\n");
|
|
200
|
+
|
|
201
|
+
// 1. Rename the main "faces" namespace to "jsf".
|
|
202
|
+
// After postProcessFaces the declaration has no leading "export".
|
|
203
|
+
content = content.replace(
|
|
204
|
+
/^declare namespace faces \{/m,
|
|
205
|
+
"declare namespace jsf {"
|
|
206
|
+
);
|
|
207
|
+
|
|
208
|
+
// 2. Fix cross-namespace references in myfaces: faces.ajax. → jsf.ajax.
|
|
209
|
+
content = content.replace(/\bfaces\.ajax\./g, "jsf.ajax.");
|
|
210
|
+
|
|
211
|
+
// 3. Remove the contextpath JSDoc comment block + var declaration.
|
|
212
|
+
content = content.replace(
|
|
213
|
+
/[ \t]+\/\*\*\n[ \t]+\* Context Path[^\n]*\n[ \t]+\*\/\n[ \t]+var contextpath: string;\n/,
|
|
214
|
+
""
|
|
215
|
+
);
|
|
216
|
+
|
|
217
|
+
// 4. Remove onerror param from push.init (not from ajax options).
|
|
218
|
+
content = content.replace(
|
|
219
|
+
/ onerror: OnErrorHandler \| string \| null,/,
|
|
220
|
+
""
|
|
221
|
+
);
|
|
222
|
+
|
|
223
|
+
// 5. Remove the @param onerror JSDoc line — first occurrence only (push.init jsdoc).
|
|
224
|
+
content = content.replace(
|
|
225
|
+
/\n[ \t]*\* @param onerror The function to be invoked when an error occurs\./,
|
|
226
|
+
""
|
|
227
|
+
);
|
|
228
|
+
|
|
229
|
+
writeFileSync(jsfPath, content, "utf-8");
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
const facesPath = resolve(projectRoot, "dist/window/faces.d.ts");
|
|
233
|
+
const jsfPath = resolve(projectRoot, "dist/window/jsf.d.ts");
|
|
234
|
+
|
|
235
|
+
postProcessFaces(facesPath);
|
|
236
|
+
console.log(" ✔ faces.d.ts — post-processed as global declaration");
|
|
237
|
+
|
|
238
|
+
generateJsfFromFaces(facesPath, jsfPath);
|
|
239
|
+
console.log(" ✔ jsf.d.ts — derived from faces.d.ts");
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
+
import type { faces, myfaces } from '../../api/_api';
|
|
18
|
+
|
|
17
19
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* This file is only there to allow global calls into window, faces and ajax
|
|
21
|
-
* in a typesafe manner, hence eliminating <b>any</b> casts.
|
|
20
|
+
* Internal utility types used throughout the implementation.
|
|
21
|
+
* Public API types live in _api.ts; these are build-only helpers.
|
|
22
22
|
*/
|
|
23
23
|
declare global {
|
|
24
24
|
|
|
@@ -28,138 +28,38 @@ declare global {
|
|
|
28
28
|
type AssocArr<T> = { [key: string]: T };
|
|
29
29
|
type EvalFuncs = Array<Function | string>;
|
|
30
30
|
|
|
31
|
-
|
|
32
31
|
type Options = {
|
|
33
32
|
render ?: string,
|
|
34
|
-
execute ?: string,
|
|
35
|
-
onevent ?: Function,
|
|
36
|
-
onerror ?: Function,
|
|
37
|
-
params ?: AssocArr<any>,
|
|
38
|
-
delay ?: number,
|
|
39
|
-
resetValues ?: boolean,
|
|
40
|
-
/* @deprecated non-spec conform fallback behavior that anything can be passed and is used as passthrough */
|
|
33
|
+
execute ?: string,
|
|
34
|
+
onevent ?: Function,
|
|
35
|
+
onerror ?: Function,
|
|
36
|
+
params ?: AssocArr<any>,
|
|
37
|
+
delay ?: number,
|
|
38
|
+
resetValues ?: boolean,
|
|
41
39
|
[key: string]: any
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
type Context = AssocArr<any>;
|
|
45
43
|
type ElemDef = Element | string;
|
|
46
44
|
|
|
47
|
-
/**
|
|
48
|
-
* * <ul>
|
|
49
|
-
* <li> errorData.type : "error"</li>
|
|
50
|
-
* <li> errorData.status : the error status message</li>
|
|
51
|
-
* <li> errorData.serverErrorName : the server error name in case of a server error</li>
|
|
52
|
-
* <li> errorData.serverErrorMessage : the server error message in case of a server error</li>
|
|
53
|
-
* <li> errorData.source : the issuing source element which triggered the request </li>
|
|
54
|
-
* <li> eventData.responseCode: the response code (aka http request response code, 401 etc...) </li>
|
|
55
|
-
* <li> eventData.responseText: the response text </li>
|
|
56
|
-
* <li> eventData.responseXML: the response xml </li>
|
|
57
|
-
* </ul>
|
|
58
|
-
*/
|
|
59
|
-
interface IErrorData {
|
|
60
|
-
type: any;
|
|
61
|
-
status: string;
|
|
62
|
-
serverErrorName: string;
|
|
63
|
-
serverErrorMessage: string;
|
|
64
|
-
source: any;
|
|
65
|
-
responseCode: number;
|
|
66
|
-
responseText: string;
|
|
67
|
-
responseXML: string;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* <ul>
|
|
72
|
-
* <li>status: status of the ajax cycle</li>
|
|
73
|
-
* </ul>
|
|
74
|
-
*/
|
|
75
|
-
interface IEventData {
|
|
76
|
-
status: String;
|
|
77
|
-
source: any;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
interface Ajax {
|
|
81
|
-
request(element: Element, event?: Event, options?: Options): void;
|
|
82
|
-
response(request: XMLHttpRequest, context?: Context): void;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
interface Util {
|
|
86
|
-
chain(source, event, ...funcs: Array<Function | string>): boolean;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
interface Push {
|
|
90
|
-
init(socketClientId: string,
|
|
91
|
-
uri: string,
|
|
92
|
-
channel: string,
|
|
93
|
-
onopen: Function,
|
|
94
|
-
onmessage: Function,
|
|
95
|
-
onclose: Function,
|
|
96
|
-
behaviorScripts: any,
|
|
97
|
-
autoconnect: boolean): void;
|
|
98
|
-
open(socketClientId: string);
|
|
99
|
-
close(socketClientId: string): void;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
interface FacesAPI {
|
|
103
|
-
contextpath: string;
|
|
104
|
-
specversion: number;
|
|
105
|
-
implversion: number;
|
|
106
|
-
separatorchar: string;
|
|
107
|
-
|
|
108
|
-
getProjectStage(): string;
|
|
109
|
-
getViewState(formElement: Element | string): string;
|
|
110
|
-
getClientWindow(rootNode?: Element | string): string;
|
|
111
|
-
getSeparatorChar(): string;
|
|
112
|
-
response(request: XMLHttpRequest, context?: Context): void;
|
|
113
|
-
addOnError(errorFunc: (data: IErrorData) => void): void;
|
|
114
|
-
addOnEvent(eventFunc: (data: IEventData) => void): void;
|
|
115
|
-
|
|
116
|
-
ajax: Ajax;
|
|
117
|
-
util: Util;
|
|
118
|
-
push: Push;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
interface OAM {
|
|
122
|
-
clearHiddenInput(formName: string, name: string): void;
|
|
123
|
-
setHiddenInput(formName: string, name: string, value: string): void;
|
|
124
|
-
submitForm(formName: string, linkId?: string |null, target?: string | null, params?: AssocArr<any> |Tuples<string, any> | null): boolean;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
interface MyFacesAPI {
|
|
128
|
-
ab(source: Element, event: Event, eventName: string, execute: string, render: string, options?: Context, userParams?: Context): void;
|
|
129
|
-
reserveNamespace(namespace: string): void;
|
|
130
|
-
|
|
131
|
-
config: { [key: string]: any };
|
|
132
|
-
oam: OAM;
|
|
133
|
-
core: {
|
|
134
|
-
config ?: {[key: string]: any};
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
45
|
/*
|
|
141
|
-
* Global
|
|
46
|
+
* Global namespace type definitions — typed from the canonical _api.ts source.
|
|
142
47
|
*/
|
|
143
|
-
let
|
|
144
|
-
let jsf:
|
|
145
|
-
let
|
|
48
|
+
let faces: typeof faces;
|
|
49
|
+
let jsf: typeof faces;
|
|
50
|
+
let myfaces: typeof myfaces;
|
|
146
51
|
|
|
147
|
-
// special "magic", Typescript merges whatever we have
|
|
148
|
-
// to window. This is a language "hack", but documented.
|
|
149
52
|
// see https://www.typescriptlang.org/docs/handbook/declaration-files/templates/global-modifying-module-d-ts.html
|
|
150
|
-
// lib.dom.d.ts declares the type Window as being type for window.
|
|
151
53
|
// noinspection JSUnusedGlobalSymbols
|
|
152
54
|
interface Window {
|
|
153
|
-
|
|
154
|
-
faces:
|
|
155
|
-
jsf:
|
|
156
|
-
|
|
157
|
-
|
|
55
|
+
[key: string]: any;
|
|
56
|
+
faces: typeof faces;
|
|
57
|
+
jsf: typeof faces;
|
|
58
|
+
myfaces: typeof myfaces;
|
|
59
|
+
XMLHttpRequest: XMLHttpRequest;
|
|
60
|
+
called: { [key: string]: any };
|
|
158
61
|
}
|
|
159
62
|
}
|
|
160
63
|
|
|
161
|
-
// this
|
|
162
|
-
|
|
163
|
-
// https://www.typescriptlang.org/docs/handbook/declaration-files/templates/global-modifying-module-d-ts.html
|
|
164
|
-
// noinspection JSUnusedGlobalSymbols
|
|
165
|
-
export var __my_faces_ambient_module_glob_;
|
|
64
|
+
// needed to make this file a module so the declare global block is valid
|
|
65
|
+
export {};
|
|
@@ -13,5 +13,21 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
// AI-generated: this file was created with assistance from Claude (Anthropic) — see AI_CONTRIBUTIONS.md
|
|
17
|
+
|
|
18
|
+
declare module "mona-dish/dist/js/umd/index.js" {
|
|
19
|
+
export * from "mona-dish";
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare module "nise" {
|
|
23
|
+
const nise: any;
|
|
24
|
+
export = nise;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
declare module "jsdom" {
|
|
28
|
+
export const JSDOM: any;
|
|
29
|
+
export const VirtualConsole: any;
|
|
30
|
+
export const CookieJar: any;
|
|
31
|
+
export const ResourceLoader: any;
|
|
32
|
+
export function toughCookie(...args: any[]): any;
|
|
33
|
+
}
|