jsf.js_next_gen 1.0.0-beta-4 → 1.0.0-beta-7

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.
Files changed (100) hide show
  1. package/.mocharc.json +9 -0
  2. package/dist/window/jsf-development.js +1 -1
  3. package/dist/window/jsf-development.js.map +1 -1
  4. package/dist/window/jsf.js +1 -1
  5. package/dist/window/jsf.js.br +0 -0
  6. package/dist/window/jsf.js.gz +0 -0
  7. package/dist/window/jsf.js.map +1 -1
  8. package/{src/test/typescript/frameworkBase/_ext/monadish/XmlQueryTest.ts → dist/window/tmp} +0 -0
  9. package/package.json +6 -5
  10. package/src/main/typescript/api/Jsf.ts +1 -1
  11. package/src/{test/typescript/frameworkBase/LangTest.ts → main/typescript/test/frameworkBase/LangTest.spec.ts} +1 -1
  12. package/src/{test/typescript/frameworkBase/_ext/monadish/DomQueryTest.ts → main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.ts} +1 -0
  13. package/src/{test/typescript/frameworkBase/_ext/monadish/LangTest.ts → main/typescript/test/frameworkBase/_ext/monadish/LangTest.spec.ts} +0 -0
  14. package/src/{test/typescript → main/typescript/test}/frameworkBase/_ext/monadish/MappingProbes.ts +0 -0
  15. package/src/{test/typescript/frameworkBase/_ext/monadish/MappingTest.ts → main/typescript/test/frameworkBase/_ext/monadish/MappingTest.spec.ts} +0 -0
  16. package/src/{test/typescript/frameworkBase/_ext/monadish/MonadTest.ts → main/typescript/test/frameworkBase/_ext/monadish/MonadTest.spec.ts} +0 -0
  17. package/src/{test/typescript/frameworkBase/_ext/monadish/StreamTest.ts → main/typescript/test/frameworkBase/_ext/monadish/StreamTest.spec.ts} +0 -0
  18. package/src/main/typescript/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.ts +0 -0
  19. package/src/{test/typescript → main/typescript/test}/frameworkBase/_ext/shared/StandardInits.ts +4 -3
  20. package/src/{test/typescript → main/typescript/test}/frameworkBase/_ext/shared/XmlResponses.ts +0 -0
  21. package/src/{test/typescript/impl/ImplTest.ts → main/typescript/test/impl/ImplTest.spec.ts} +1 -1
  22. package/src/{test/typescript/impl/SeparatorCharsTest.ts → main/typescript/test/impl/SeparatorCharsTest.spec.ts} +0 -0
  23. package/src/{test/typescript → main/typescript/test}/queue/AsynchronousProbe.ts +1 -1
  24. package/src/{test/typescript/queue/AsynchronousQueueTest.ts → main/typescript/test/queue/AsynchronousQueueTest.spec.ts} +2 -2
  25. package/src/{test/typescript/xhrCore/EventTests.ts → main/typescript/test/xhrCore/EventTests.spec.ts} +1 -1
  26. package/src/{test/typescript → main/typescript/test}/xhrCore/FakeWebsocket.ts +0 -0
  27. package/src/{test/typescript/xhrCore/FileUploadTest.ts → main/typescript/test/xhrCore/FileUploadTest.spec.ts} +2 -2
  28. package/src/{test/typescript/xhrCore/RequestParamsTest.ts → main/typescript/test/xhrCore/RequestParamsTest.spec.ts} +2 -2
  29. package/src/{test/typescript/xhrCore/RequestTest.ts → main/typescript/test/xhrCore/RequestTest.spec.ts} +1 -1
  30. package/src/{test/typescript/xhrCore/ResponseTest.ts → main/typescript/test/xhrCore/ResponseTest.spec.ts} +0 -0
  31. package/src/{test/typescript/xhrCore/ShadowDomTest.ts → main/typescript/test/xhrCore/ShadowDomTest.spec.ts} +0 -0
  32. package/src/{test/typescript → main/typescript/test}/xhrCore/WebsocketTest.ts +1 -1
  33. package/src/{test/typescript/xhrCore/XhrFormDataTest.ts → main/typescript/test/xhrCore/XhrFormDataTest.spec.ts} +1 -1
  34. package/src/main/typescript/tsconfig-typedoc.json +2 -1
  35. package/src/main/typescript/tsconfig.json +2 -1
  36. package/src/test/resources/jsf-development.js +450 -3672
  37. package/src/test/resources/jsf.js +1 -1
  38. package/src/test/resources/jsf.js.br +0 -0
  39. package/src/test/resources/jsf.js.gz +0 -0
  40. package/target/api/Jsf.js.map +1 -1
  41. package/target/test/frameworkBase/LangTest.spec.js +112 -0
  42. package/target/test/frameworkBase/LangTest.spec.js.map +1 -0
  43. package/target/test/frameworkBase/_ext/monadish/DomQueryTest.js +293 -0
  44. package/target/test/frameworkBase/_ext/monadish/DomQueryTest.js.map +1 -0
  45. package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +293 -0
  46. package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js.map +1 -0
  47. package/target/test/frameworkBase/_ext/monadish/LangTest.js +89 -0
  48. package/target/test/frameworkBase/_ext/monadish/LangTest.js.map +1 -0
  49. package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js +89 -0
  50. package/target/test/frameworkBase/_ext/monadish/LangTest.spec.js.map +1 -0
  51. package/target/test/frameworkBase/_ext/monadish/MappingProbes.js +115 -0
  52. package/target/test/frameworkBase/_ext/monadish/MappingProbes.js.map +1 -0
  53. package/target/test/frameworkBase/_ext/monadish/MappingTest.js +39 -0
  54. package/target/test/frameworkBase/_ext/monadish/MappingTest.js.map +1 -0
  55. package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js +39 -0
  56. package/target/test/frameworkBase/_ext/monadish/MappingTest.spec.js.map +1 -0
  57. package/target/test/frameworkBase/_ext/monadish/MonadTest.js +155 -0
  58. package/target/test/frameworkBase/_ext/monadish/MonadTest.js.map +1 -0
  59. package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js +155 -0
  60. package/target/test/frameworkBase/_ext/monadish/MonadTest.spec.js.map +1 -0
  61. package/target/test/frameworkBase/_ext/monadish/StreamTest.js +176 -0
  62. package/target/test/frameworkBase/_ext/monadish/StreamTest.js.map +1 -0
  63. package/target/test/frameworkBase/_ext/monadish/StreamTest.spec.js +176 -0
  64. package/target/test/frameworkBase/_ext/monadish/StreamTest.spec.js.map +1 -0
  65. package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.js +1 -0
  66. package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.js.map +1 -0
  67. package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.js +1 -0
  68. package/target/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.js.map +1 -0
  69. package/target/test/frameworkBase/_ext/shared/StandardInits.js +264 -0
  70. package/target/test/frameworkBase/_ext/shared/StandardInits.js.map +1 -0
  71. package/target/test/frameworkBase/_ext/shared/XmlResponses.js +23 -0
  72. package/target/test/frameworkBase/_ext/shared/XmlResponses.js.map +1 -0
  73. package/target/test/impl/ImplTest.spec.js +98 -0
  74. package/target/test/impl/ImplTest.spec.js.map +1 -0
  75. package/target/test/impl/SeparatorCharsTest.spec.js +72 -0
  76. package/target/test/impl/SeparatorCharsTest.spec.js.map +1 -0
  77. package/target/test/queue/AsynchronousProbe.js +99 -0
  78. package/target/test/queue/AsynchronousProbe.js.map +1 -0
  79. package/target/test/queue/AsynchronousQueueTest.spec.js +130 -0
  80. package/target/test/queue/AsynchronousQueueTest.spec.js.map +1 -0
  81. package/target/test/xhrCore/EventTests.spec.js +155 -0
  82. package/target/test/xhrCore/EventTests.spec.js.map +1 -0
  83. package/target/test/xhrCore/FakeWebsocket.js +25 -0
  84. package/target/test/xhrCore/FakeWebsocket.js.map +1 -0
  85. package/target/test/xhrCore/FileUploadTest.spec.js +166 -0
  86. package/target/test/xhrCore/FileUploadTest.spec.js.map +1 -0
  87. package/target/test/xhrCore/RequestParamsTest.spec.js +151 -0
  88. package/target/test/xhrCore/RequestParamsTest.spec.js.map +1 -0
  89. package/target/test/xhrCore/RequestTest.spec.js +318 -0
  90. package/target/test/xhrCore/RequestTest.spec.js.map +1 -0
  91. package/target/test/xhrCore/ResponseTest.spec.js +257 -0
  92. package/target/test/xhrCore/ResponseTest.spec.js.map +1 -0
  93. package/target/test/xhrCore/ShadowDomTest.spec.js +122 -0
  94. package/target/test/xhrCore/ShadowDomTest.spec.js.map +1 -0
  95. package/target/test/xhrCore/WebsocketTest.js +182 -0
  96. package/target/test/xhrCore/WebsocketTest.js.map +1 -0
  97. package/target/test/xhrCore/XhrFormDataTest.spec.js +58 -0
  98. package/target/test/xhrCore/XhrFormDataTest.spec.js.map +1 -0
  99. package/src/test/typescript/dumy.html +0 -10
  100. package/src/test/typescript/tsconfig.json +0 -20
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "jsf.js_next_gen",
3
- "version": "1.0.0-beta-4",
3
+ "version": "1.0.0-beta-7",
4
4
  "description": "A next generation typescript reimplementation of jsf.js",
5
5
  "main": "dist/window/jsf.js",
6
6
  "scripts": {
7
7
  "doc": "npx typedoc --tsconfig src/main/typescript/tsconfig-typedoc.json",
8
- "test": "env TS_NODE_PROJECT=./src/test/typescript/tsconfig.json mocha -r ts-node/register ./src/test/typescript/**/**/*Test*.ts",
9
- "coverage": "nyc --reporter=html --reporter=text mocha -r ts-node/register ./**/test/typescript/**/**/*Test*.ts",
8
+ "test": "env TS_NODE_PROJECT=./src/main/typescript/tsconfig.json mocha",
9
+ "coverage": "env TS_NODE_PROJECT=./src/test/typescript/tsconfig.json nyc --reporter=html --reporter=text mocha",
10
10
  "build-production": "webpack --mode production --env FILE_NAME=jsf && ts-node ./remap.ts --production",
11
11
  "build-development": "webpack --mode development --env FILE_NAME=jsf-development && ts-node ./remap.ts --development",
12
12
  "build": "npm run doc && npm run build-development && npm run build-production"
@@ -22,6 +22,7 @@
22
22
  "@istanbuljs/nyc-config-typescript": "^1.0.2",
23
23
  "@types/chai": "^4.3.3",
24
24
  "@types/mocha": "^9.1.1",
25
+ "@types/node": "^18.7.16",
25
26
  "@types/sinon": "^10.0.13",
26
27
  "babel-plugin-syntax-dynamic-import": "^6.18.0",
27
28
  "chai": "^4.3.6",
@@ -42,9 +43,9 @@
42
43
  "typescript": "^4.8.2",
43
44
  "webpack": "^5.74.0",
44
45
  "webpack-cli": "^4.10.0",
45
- "webpack-dev-server": "^4.10.1"
46
+ "webpack-dev-server": "^4.11.0"
46
47
  },
47
48
  "dependencies": {
48
- "mona-dish": "0.21.2"
49
+ "mona-dish": "0.21.4"
49
50
  }
50
51
  }
@@ -176,7 +176,7 @@ export module jsf {
176
176
  * @returns true if the chain has succeeded false otherwise
177
177
  */
178
178
  export function chain(source, event, ...funcs: Array<Function | string>): boolean {
179
- return Implementation.chain(source, event, ...funcs);
179
+ return Implementation.chain(source, event, ...(funcs as EvalFuncs));
180
180
  }
181
181
  }
182
182
 
@@ -9,7 +9,7 @@ import isFunc = Lang.isFunc;
9
9
  import isString = Lang.isString;
10
10
  import trim = Lang.trim;
11
11
  import strToArray = Lang.strToArray;
12
- import {ExtLang} from "../../../main/typescript/impl/util/Lang";
12
+ import {ExtLang} from "../../impl/util/Lang";
13
13
  import keyValToStr = ExtLang.keyValToStr;
14
14
 
15
15
 
@@ -25,6 +25,7 @@ import trim = Lang.trim;
25
25
 
26
26
  const jsdom = require("jsdom");
27
27
  const {JSDOM} = jsdom;
28
+ declare const global;
28
29
 
29
30
  describe('DOMQuery tests', function () {
30
31
 
@@ -17,6 +17,7 @@
17
17
 
18
18
  import {DomQuery} from "mona-dish";
19
19
 
20
+ declare let global;
20
21
  declare let jsf: any;
21
22
 
22
23
  /**
@@ -325,9 +326,9 @@ export module StandardInits {
325
326
  */
326
327
  let initJSF = async function () {
327
328
  // @ts-ignore
328
- return import("../../../../../main/typescript/api/Jsf").then((data) => {
329
- let Implementation = require("../../../../../main/typescript/impl/AjaxImpl");
330
- let PushImpl = require("../../../../../main/typescript/impl/PushImpl");
329
+ return import("../../../../api/Jsf").then((data) => {
330
+ let Implementation = require("../../../../impl/AjaxImpl");
331
+ let PushImpl = require("../../../../impl/PushImpl");
331
332
  applyJsfToGlobals(data, Implementation, PushImpl);
332
333
  });
333
334
  };
@@ -23,7 +23,7 @@ import {DomQuery} from "mona-dish";
23
23
 
24
24
  import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
25
25
  import defaultMyFaces = StandardInits.defaultMyFaces;
26
- import {P_EXECUTE, P_RENDER} from "../../../main/typescript/impl/core/Const";
26
+ import {P_EXECUTE, P_RENDER} from "../../impl/core/Const";
27
27
 
28
28
  sinon.reset();
29
29
 
@@ -18,7 +18,7 @@
18
18
  * we need a probe to test our asynchronous behavior
19
19
  * the asynchronous behavior needs to be in an asynchronous runnable
20
20
  */
21
- import {AsyncRunnable} from "../../../main/typescript/impl/util/AsyncRunnable";
21
+ import {AsyncRunnable} from "../../impl/util/AsyncRunnable";
22
22
  import {IValueHolder} from "mona-dish";
23
23
 
24
24
  export class ProbeClass implements AsyncRunnable<Promise<any>>, IValueHolder<Promise<any>> {
@@ -18,9 +18,9 @@ import {describe, it} from 'mocha';
18
18
  import {expect} from 'chai';
19
19
  import * as sinon from 'sinon';
20
20
  import {ProbeClass} from "./AsynchronousProbe";
21
- import {AsynchronouseQueue} from "../../../main/typescript/impl/util/AsyncQueue";
21
+ import {AsynchronouseQueue} from "../../impl/util/AsyncQueue";
22
22
  import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
23
- import {Implementation} from "../../../main/typescript/impl/AjaxImpl";
23
+ import {Implementation} from "../../impl/AjaxImpl";
24
24
  import defaultMyFaces = StandardInits.defaultMyFaces;
25
25
 
26
26
  describe('Asynchronous Queue tests', () => {
@@ -17,7 +17,7 @@
17
17
  import {describe} from "mocha";
18
18
  import * as sinon from "sinon";
19
19
  import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
20
- import {Implementation} from "../../../main/typescript/impl/AjaxImpl";
20
+ import {Implementation} from "../../impl/AjaxImpl";
21
21
 
22
22
  import {expect} from "chai";
23
23
  import protocolPage = StandardInits.protocolPage;
@@ -12,11 +12,11 @@ import {
12
12
  P_VIEWSTATE,
13
13
  P_WINDOW_ID,
14
14
  SUCCESS
15
- } from "../../../main/typescript/impl/core/Const";
15
+ } from "../../impl/core/Const";
16
16
  import defaultMyFaces = StandardInits.defaultMyFaces;
17
17
  import STD_XML = StandardInits.STD_XML;
18
18
  import defaultFileForm = StandardInits.defaultFileForm;
19
- import {Implementation} from "../../../main/typescript/impl/AjaxImpl";
19
+ import {Implementation} from "../../impl/AjaxImpl";
20
20
 
21
21
  declare var jsf: any;
22
22
  declare var Impl
@@ -1,10 +1,10 @@
1
1
  import * as sinon from "sinon";
2
- import {Implementation} from "../../../main/typescript/impl/AjaxImpl";
2
+ import {Implementation} from "../../impl/AjaxImpl";
3
3
  import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
4
4
  import defaultMyFaces = StandardInits.defaultMyFaces;
5
5
  import protocolPage = StandardInits.protocolPage;
6
6
  import {DQ} from "mona-dish";
7
- import {XhrFormData} from "../../../main/typescript/impl/xhrCore/XhrFormData";
7
+ import {XhrFormData} from "../../impl/xhrCore/XhrFormData";
8
8
  import { expect } from "chai";
9
9
 
10
10
  describe("test for proper request param patterns identical to the old implementation", function () {
@@ -28,7 +28,7 @@ import {
28
28
  P_VIEWSTATE,
29
29
  P_WINDOW_ID,
30
30
  SUCCESS
31
- } from "../../../main/typescript/impl/core/Const";
31
+ } from "../../impl/core/Const";
32
32
  import defaultMyFaces = StandardInits.defaultMyFaces;
33
33
  import STD_XML = StandardInits.STD_XML;
34
34
 
@@ -1,7 +1,7 @@
1
1
  import {describe} from "mocha";
2
2
  import * as sinon from "sinon";
3
3
  import {StandardInits} from "../frameworkBase/_ext/shared/StandardInits";
4
- import {Implementation} from "../../../main/typescript/impl/AjaxImpl";
4
+ import {Implementation} from "../../impl/AjaxImpl";
5
5
 
6
6
  import {expect} from "chai";
7
7
 
@@ -17,7 +17,7 @@
17
17
  import {describe, it} from 'mocha';
18
18
  import {DQ} from "mona-dish";
19
19
  import * as sinon from 'sinon';
20
- import {XhrFormData} from "../../../main/typescript/impl/xhrCore/XhrFormData";
20
+ import {XhrFormData} from "../../impl/xhrCore/XhrFormData";
21
21
  import {expect} from "chai";
22
22
 
23
23
  const jsdom = require("jsdom");
@@ -4,7 +4,8 @@ Special config to generate the tsdocs
4
4
  {
5
5
  "extends": "./tsconfig.json",
6
6
  "compilerOptions": {
7
- "skipLibCheck": true
7
+ "skipLibCheck": true,
8
+
8
9
  },
9
10
  "typedocOptions": {
10
11
  "entryPoints": ["api/Jsf.ts"],
@@ -13,6 +13,7 @@
13
13
  "sourceMap": true,
14
14
  "typeRoots": [
15
15
  "../../build/npm/node_modules/@types"
16
- ]
16
+ ],
17
+ "types": ["node"]
17
18
  }
18
19
  }