dyo-tools 0.1.0 → 0.2.0

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 (93) hide show
  1. package/.c8rc.json +4 -0
  2. package/.eslintignore +2 -0
  3. package/.eslintrc.json +47 -0
  4. package/LICENSE +21 -0
  5. package/Makefile +34 -0
  6. package/README.md +0 -7
  7. package/babel.config.js +1 -0
  8. package/cucumber-report.html +48 -0
  9. package/cucumber.js +9 -0
  10. package/dist/constants.d.ts +6 -0
  11. package/dist/constants.js +63 -0
  12. package/dist/constants.js.map +1 -0
  13. package/dist/core/DTBunch.d.ts +11 -15
  14. package/dist/core/DTBunch.js +27 -106
  15. package/dist/core/DTBunch.js.map +1 -1
  16. package/dist/core/DTComponent.d.ts +13 -5
  17. package/dist/core/DTComponent.js +39 -1
  18. package/dist/core/DTComponent.js.map +1 -1
  19. package/dist/core/DTComponentPhysical.d.ts +10 -0
  20. package/dist/core/DTComponentPhysical.js +16 -0
  21. package/dist/core/DTComponentPhysical.js.map +1 -0
  22. package/dist/core/DTComponentWithMeta.d.ts +2 -2
  23. package/dist/core/DTComponentWithMeta.js.map +1 -1
  24. package/dist/core/DTElement.d.ts +2 -7
  25. package/dist/core/DTElement.js +3 -12
  26. package/dist/core/DTElement.js.map +1 -1
  27. package/dist/core/DTManager.d.ts +31 -0
  28. package/dist/core/DTManager.js +180 -0
  29. package/dist/core/DTManager.js.map +1 -0
  30. package/dist/core/DTPlayer.js +1 -1
  31. package/dist/core/DTPlayer.js.map +1 -1
  32. package/dist/index.d.ts +2 -0
  33. package/dist/index.js +5 -1
  34. package/dist/index.js.map +1 -1
  35. package/dist/libs/DYOFinder.d.ts +10 -0
  36. package/dist/libs/DYOFinder.js +96 -0
  37. package/dist/libs/DYOFinder.js.map +1 -0
  38. package/dist/tsconfig.tsbuildinfo +1 -1321
  39. package/dist/types/index.d.ts +64 -24
  40. package/dist/types/index.js.map +1 -1
  41. package/docs/.nojekyll +1 -0
  42. package/docs/assets/highlight.css +29 -0
  43. package/docs/assets/main.js +58 -0
  44. package/docs/assets/search.js +1 -0
  45. package/docs/assets/style.css +1367 -0
  46. package/docs/index.html +46 -0
  47. package/e2e/0.2.0/epic1.feature +29 -0
  48. package/e2e/0.2.0/epic2.feature +22 -0
  49. package/e2e/0.2.0/epic3.feature +25 -0
  50. package/e2e/0.2.0/resources/dominion.js +195 -0
  51. package/e2e/0.2.0/resources/utils.js +27 -0
  52. package/e2e/0.2.0/support/steps.js +108 -0
  53. package/e2e/future/epic4.feature +39 -0
  54. package/e2e/future/resources/dominion.js +238 -0
  55. package/e2e/future/resources/utils.js +27 -0
  56. package/jest.config.js +6 -0
  57. package/package.json +33 -23
  58. package/src/constants.ts +85 -0
  59. package/src/core/DTBunch.ts +461 -0
  60. package/src/core/DTComponent.ts +225 -0
  61. package/src/core/DTComponentPhysical.ts +39 -0
  62. package/src/core/DTComponentWithMeta.ts +65 -0
  63. package/src/core/DTElement.ts +69 -0
  64. package/src/core/DTError.ts +78 -0
  65. package/src/core/DTManager.ts +446 -0
  66. package/src/core/DTPlayer.ts +57 -0
  67. package/src/index.ts +9 -0
  68. package/src/libs/DYOFinder.ts +175 -0
  69. package/src/types/index.ts +162 -0
  70. package/test/core/DTBunch.double.ts +253 -0
  71. package/test/core/DTBunch.spec.ts +895 -0
  72. package/test/core/DTComponent.double.ts +164 -0
  73. package/test/core/DTComponent.spec.ts +295 -0
  74. package/test/core/DTComponentPhysical.double.ts +76 -0
  75. package/test/core/DTComponentPhysical.spec.ts +64 -0
  76. package/test/core/DTComponentWithMeta.double.ts +115 -0
  77. package/test/core/DTComponentWithMeta.spec.ts +124 -0
  78. package/test/core/DTElement.double.ts +147 -0
  79. package/test/core/DTElement.spec.ts +102 -0
  80. package/test/core/DTError.double.ts +92 -0
  81. package/test/core/DTError.spec.ts +89 -0
  82. package/test/core/DTManager.double.ts +192 -0
  83. package/test/core/DTManager.spec.ts +902 -0
  84. package/test/core/DTPlayer.double.ts +64 -0
  85. package/test/core/DTPlayer.spec.ts +80 -0
  86. package/test/core/copy.spec.ts +227 -0
  87. package/test/libs/DYOFinder.double.ts +152 -0
  88. package/test/libs/DYOFinder.spec.ts +194 -0
  89. package/tsconfig.dev.json +22 -0
  90. package/tsconfig.json +21 -0
  91. package/dist/utils/filters.d.ts +0 -6
  92. package/dist/utils/filters.js +0 -39
  93. package/dist/utils/filters.js.map +0 -1
package/.c8rc.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "src": ["./src"],
3
+ "reporter": ["html", "text"]
4
+ }
package/.eslintignore ADDED
@@ -0,0 +1,2 @@
1
+ node_modules
2
+ dist
package/.eslintrc.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "root": true,
3
+ "parser": "@typescript-eslint/parser",
4
+ "parserOptions": {
5
+ "project": "./tsconfig.json"
6
+ },
7
+ "plugins": [
8
+ "@typescript-eslint"
9
+ ],
10
+ "extends": [
11
+ "eslint:recommended",
12
+ "plugin:@typescript-eslint/eslint-recommended",
13
+ "plugin:@typescript-eslint/recommended",
14
+ "airbnb-base",
15
+ "airbnb-typescript"
16
+ ],
17
+ "rules": {
18
+ // Allow class methods without this
19
+ "class-methods-use-this": "off",
20
+ // Use of underscored private props
21
+ "no-underscore-dangle": "off",
22
+ // Disable JSX unexpected error
23
+ "react/jsx-filename-extension": "off",
24
+ // Max length line : 130
25
+ "max-len": ["error", 160],
26
+ // TEMPORARY : Authorize Dependency cycle
27
+ "import/no-cycle": "off",
28
+ // Authorize for-of to return and break
29
+ "no-restricted-syntax": [
30
+ "error",
31
+ {
32
+ "selector": "ForInStatement",
33
+ "message": "for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array."
34
+ },
35
+ {
36
+ "selector": "LabeledStatement",
37
+ "message": "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand."
38
+ },
39
+ {
40
+ "selector": "WithStatement",
41
+ "message": "`with` is disallowed in strict mode because it makes code impossible to predict and optimize."
42
+ }
43
+ ],
44
+ // Forbid use of any
45
+ "@typescript-eslint/no-explicit-any": "error"
46
+ }
47
+ }
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Flaya24
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/Makefile ADDED
@@ -0,0 +1,34 @@
1
+ .DEFAULT_GOAL := all
2
+
3
+ .PHONY: all
4
+ all: dist
5
+
6
+ .PHONY: check
7
+ check:
8
+ npm run-script lint
9
+
10
+ .PHONY: checkfix
11
+ checkfix:
12
+ npm run-script lint:fix
13
+
14
+ .PHONY: clean
15
+ clean: distclean
16
+ rm -Rf node_modules/
17
+
18
+ dist: node_modules distclean
19
+ npm run-script build:prod
20
+
21
+ .PHONY: distclean
22
+ distclean:
23
+ rm -Rf dist/
24
+
25
+ node_modules:
26
+ npm install
27
+
28
+ .PHONY: test
29
+ test:
30
+ npm run-script test
31
+
32
+ .PHONY: verify
33
+ verify: dist check
34
+ npm run-script test:coverage:verify
package/README.md CHANGED
@@ -1,7 +0,0 @@
1
- ## DYO Tools
2
-
3
- [![npm version](https://img.shields.io/npm/v/dyo-tools)](https://www.npmjs.org/package/dyo-tools)
4
-
5
- A Typescript library to provide component in order to build technical managers for a board game instance.
6
-
7
- _Complete README in progress_
@@ -0,0 +1 @@
1
+ module.exports = {presets: ['@babel/preset-env']}