functional-models 1.1.3 → 1.1.4

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 (103) hide show
  1. package/package.json +5 -4
  2. package/{dist/src → src}/constants.d.ts +0 -0
  3. package/{dist/src → src}/constants.js +0 -0
  4. package/{dist/src → src}/constants.js.map +0 -0
  5. package/{dist/src → src}/errors.d.ts +0 -0
  6. package/{dist/src → src}/errors.js +0 -0
  7. package/{dist/src → src}/errors.js.map +0 -0
  8. package/{dist/src → src}/index.d.ts +0 -0
  9. package/{dist/src → src}/index.js +0 -0
  10. package/{dist/src → src}/index.js.map +0 -0
  11. package/{dist/src → src}/interfaces.d.ts +0 -0
  12. package/{dist/src → src}/interfaces.js +0 -0
  13. package/{dist/src → src}/interfaces.js.map +0 -0
  14. package/{dist/src → src}/lazy.d.ts +0 -0
  15. package/{dist/src → src}/lazy.js +0 -0
  16. package/{dist/src → src}/lazy.js.map +0 -0
  17. package/{dist/src → src}/methods.d.ts +0 -0
  18. package/{dist/src → src}/methods.js +0 -0
  19. package/{dist/src → src}/methods.js.map +0 -0
  20. package/{dist/src → src}/models.d.ts +0 -0
  21. package/{dist/src → src}/models.js +0 -0
  22. package/{dist/src → src}/models.js.map +0 -0
  23. package/{dist/src → src}/properties.d.ts +0 -0
  24. package/{dist/src → src}/properties.js +0 -0
  25. package/{dist/src → src}/properties.js.map +0 -0
  26. package/{dist/src → src}/serialization.d.ts +0 -0
  27. package/{dist/src → src}/serialization.js +0 -0
  28. package/{dist/src → src}/serialization.js.map +0 -0
  29. package/{dist/src → src}/utils.d.ts +0 -0
  30. package/{dist/src → src}/utils.js +0 -0
  31. package/{dist/src → src}/utils.js.map +0 -0
  32. package/{dist/src → src}/validation.d.ts +0 -0
  33. package/{dist/src → src}/validation.js +0 -0
  34. package/{dist/src → src}/validation.js.map +0 -0
  35. package/{dist/stepDefinitions → stepDefinitions}/oldSteps.d.ts +0 -0
  36. package/{dist/stepDefinitions → stepDefinitions}/oldSteps.js +0 -0
  37. package/{dist/stepDefinitions → stepDefinitions}/oldSteps.js.map +0 -0
  38. package/{dist/stepDefinitions → stepDefinitions}/tssteps.d.ts +0 -0
  39. package/{dist/stepDefinitions → stepDefinitions}/tssteps.js +0 -0
  40. package/{dist/stepDefinitions → stepDefinitions}/tssteps.js.map +0 -0
  41. package/{dist/test → test}/src/errors.test.d.ts +0 -0
  42. package/{dist/test → test}/src/errors.test.js +0 -0
  43. package/{dist/test → test}/src/errors.test.js.map +0 -0
  44. package/{dist/test/src/lazy.test.d.ts → test/src/index.test.d.ts} +0 -0
  45. package/test/src/index.test.js +3 -0
  46. package/test/src/index.test.js.map +1 -0
  47. package/{dist/test/src/methods.test.d.ts → test/src/lazy.test.d.ts} +0 -0
  48. package/{dist/test → test}/src/lazy.test.js +0 -0
  49. package/{dist/test → test}/src/lazy.test.js.map +0 -0
  50. package/{dist/test/src/models.test.d.ts → test/src/methods.test.d.ts} +0 -0
  51. package/{dist/test → test}/src/methods.test.js +0 -0
  52. package/{dist/test → test}/src/methods.test.js.map +0 -0
  53. package/{dist/test/src/properties.test.d.ts → test/src/models.test.d.ts} +0 -0
  54. package/{dist/test → test}/src/models.test.js +0 -0
  55. package/{dist/test → test}/src/models.test.js.map +0 -0
  56. package/{dist/test/src/serialization.test.d.ts → test/src/properties.test.d.ts} +0 -0
  57. package/{dist/test → test}/src/properties.test.js +0 -0
  58. package/{dist/test → test}/src/properties.test.js.map +0 -0
  59. package/{dist/test/src/utils.test.d.ts → test/src/serialization.test.d.ts} +0 -0
  60. package/{dist/test → test}/src/serialization.test.js +0 -0
  61. package/{dist/test → test}/src/serialization.test.js.map +0 -0
  62. package/{dist/test/src/validation.test.d.ts → test/src/utils.test.d.ts} +0 -0
  63. package/{dist/test → test}/src/utils.test.js +0 -0
  64. package/{dist/test → test}/src/utils.test.js.map +0 -0
  65. package/test/src/validation.test.d.ts +1 -0
  66. package/{dist/test → test}/src/validation.test.js +0 -0
  67. package/{dist/test → test}/src/validation.test.js.map +0 -0
  68. package/.eslintignore +0 -5
  69. package/.eslintrc +0 -180
  70. package/.github/workflows/feature.yml +0 -26
  71. package/.github/workflows/ut.yml +0 -32
  72. package/.prettierignore +0 -7
  73. package/.prettierrc.json +0 -14
  74. package/LICENSE +0 -674
  75. package/cucumber.js +0 -10
  76. package/features/arrayFields.feature +0 -52
  77. package/features/basic-ts.feature +0 -13
  78. package/features/functions.feature +0 -10
  79. package/features/model.feature +0 -7
  80. package/features/validation.feature +0 -12
  81. package/index.js +0 -1
  82. package/src/constants.ts +0 -15
  83. package/src/errors.ts +0 -18
  84. package/src/index.ts +0 -12
  85. package/src/interfaces.ts +0 -323
  86. package/src/lazy.ts +0 -24
  87. package/src/methods.ts +0 -30
  88. package/src/models.ts +0 -183
  89. package/src/properties.ts +0 -375
  90. package/src/serialization.ts +0 -39
  91. package/src/utils.ts +0 -42
  92. package/src/validation.ts +0 -390
  93. package/stepDefinitions/oldSteps.ts +0 -216
  94. package/stepDefinitions/tssteps.ts +0 -107
  95. package/test/src/errors.test.ts +0 -31
  96. package/test/src/lazy.test.ts +0 -15
  97. package/test/src/methods.test.ts +0 -45
  98. package/test/src/models.test.ts +0 -417
  99. package/test/src/properties.test.ts +0 -747
  100. package/test/src/serialization.test.ts +0 -80
  101. package/test/src/utils.test.ts +0 -76
  102. package/test/src/validation.test.ts +0 -682
  103. package/tsconfig.json +0 -100
package/package.json CHANGED
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "name": "functional-models",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "A library for creating JavaScript function based models.",
5
- "main": "dist/src/index.js",
6
- "types": "dist/src/index.d.ts",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
7
  "scripts": {
8
8
  "test": "mocha -r ts-node/register test/**/*.test.ts",
9
9
  "test:coverage": "nyc npm run test",
10
10
  "feature-tests": "./node_modules/.bin/cucumber-js -p default",
11
- "coverage": "nyc --all --reporter=lcov npm test"
11
+ "coverage": "nyc --all --reporter=lcov npm test",
12
+ "dist": "tsc && cp package.json ./dist && cp README.md ./dist && cd dist && npm publish"
12
13
  },
13
14
  "repository": {
14
15
  "type": "git",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../../test/src/index.test.ts"],"names":[],"mappings":""}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1 @@
1
+ export {};
File without changes
File without changes
package/.eslintignore DELETED
@@ -1,5 +0,0 @@
1
- dist/
2
- node_modules/
3
- test/
4
- features/
5
- stepDefinitions/
package/.eslintrc DELETED
@@ -1,180 +0,0 @@
1
- {
2
- "extends": ["eslint:recommended", "prettier"],
3
- "plugins": ["import", "functional", "@typescript-eslint"],
4
- "env": {
5
- "browser": true,
6
- "node": true,
7
- "mocha": true,
8
- "es6": true
9
- },
10
- "rules": {
11
- "@typescript-eslint/no-unused-vars": "error",
12
-
13
- "no-await-in-loop": ["error"],
14
- "no-console": ["error", { "allow": ["warn", "error", "info"] }],
15
- "no-constant-condition": ["error"],
16
- "no-extra-parens": 0,
17
- "no-extra-semi": ["error"],
18
- "no-loss-of-precision": ["error"],
19
- "no-promise-executor-return": ["error"],
20
- "no-template-curly-in-string": ["error"],
21
- "no-useless-backreference": ["error"],
22
- "require-atomic-updates": ["error"],
23
-
24
- "accessor-pairs": ["error"],
25
- "array-callback-return": ["error"],
26
- "block-scoped-var": ["error"],
27
- "class-methods-use-this": ["error"],
28
- "complexity": ["error"],
29
- "consistent-return": ["error"],
30
- "curly": ["error"],
31
- "default-case": ["error"],
32
- "default-case-last": ["error"],
33
- "default-param-last": 0,
34
- "dot-location": ["error", "property"],
35
- "dot-notation": ["error"],
36
- "eqeqeq": ["error"],
37
- "grouped-accessor-pairs": ["error"],
38
- "guard-for-in": ["error"],
39
- "max-classes-per-file": ["error"],
40
- "no-alert": ["error"],
41
- "no-caller": ["error"],
42
- "no-constructor-return": ["error"],
43
- "no-div-regex": ["error"],
44
- "no-else-return": ["error"],
45
- "no-empty-function": ["error"],
46
- "no-eq-null": ["error"],
47
- "no-eval": ["error"],
48
- "no-extend-native": ["error"],
49
- "no-extra-bind": ["error"],
50
- "no-extra-label": ["error"],
51
- "no-floating-decimal": ["error"],
52
- "no-implicit-coercion": ["error"],
53
- "no-implicit-globals": ["error"],
54
- "no-implied-eval": ["error"],
55
- "no-invalid-this": ["error"],
56
- "no-iterator": ["error"],
57
- "no-labels": ["error"],
58
- "no-lone-blocks": ["error"],
59
- "no-loop-func": ["error"],
60
- "no-magic-numbers": ["error", { "ignore": [1, -1, 0, 2] }],
61
- "no-multi-spaces": ["error"],
62
- "no-multi-str": ["error"],
63
- "no-new": ["error"],
64
- "no-new-func": ["error"],
65
- "no-new-wrappers": ["error"],
66
- "no-octal-escape": ["error"],
67
- "no-proto": ["error"],
68
- "no-restricted-properties": ["error"],
69
- "no-return-assign": ["error"],
70
- "no-return-await": ["error"],
71
- "no-script-url": ["error"],
72
- "no-self-compare": ["error"],
73
- "no-sequences": ["error"],
74
- "no-throw-literal": ["error"],
75
- "no-unmodified-loop-condition": ["error"],
76
- "no-unused-expressions": ["error"],
77
- "no-useless-call": ["error"],
78
- "no-useless-concat": ["error"],
79
- "no-void": ["error"],
80
- "no-warning-comments": ["warn"],
81
- "prefer-named-capture-group": ["error"],
82
- "prefer-promise-reject-errors": ["error"],
83
- "prefer-regex-literals": ["error"],
84
- "radix": ["error"],
85
- "require-unicode-regexp": ["error"],
86
- "vars-on-top": ["error"],
87
- "wrap-iife": ["error"],
88
- "yoda": ["error"],
89
-
90
- "arrow-body-style": 0,
91
- "eol-last": ["error", "always"],
92
- "comma-dangle": 0,
93
- "linebreak-style": 0,
94
- "no-underscore-dangle": 0,
95
- "no-unused-labels": 0,
96
- "no-unused-vars": 0,
97
- "object-shorthand": 0,
98
- "prefer-rest-params": 0,
99
- "semi": ["error", "never"],
100
-
101
- "functional/immutable-data": [
102
- "error",
103
- {
104
- "ignoreAccessorPattern": "module.exports*"
105
- }
106
- ],
107
- "functional/no-let": ["error"],
108
- "functional/no-method-signature": ["error"],
109
- "functional/prefer-readonly-type": ["error"],
110
- "functional/no-class": ["error"],
111
- "functional/no-mixed-type": 0,
112
- "functional/no-this-expression": ["error"],
113
- "functional/prefer-type-literal": 0,
114
- "functional/no-conditional-statement": 0,
115
- "functional/no-expression-statement": 0,
116
- "functional/no-loop-statement": ["error"],
117
- "functional/no-return-void": 0,
118
- "functional/no-promise-reject": 0,
119
- "functional/no-throw-statement": 0,
120
- "functional/no-try-statement": ["error"],
121
- "functional/functional-parameters": 0,
122
-
123
- "import/no-unresolved": ["error"],
124
- "import/named": ["error"],
125
- "import/default": ["error"],
126
- "import/namespace": ["error"],
127
- "import/no-restricted-paths": ["error"],
128
- "import/no-absolute-path": ["error"],
129
- "import/no-dynamic-require": ["error"],
130
- "import/no-internal-modules": 0,
131
- "import/no-webpack-loader-syntax": ["error"],
132
- "import/no-self-import": ["error"],
133
- "import/no-cycle": ["error"],
134
- "import/no-useless-path-segments": ["error"],
135
- "import/no-relative-parent-imports": 0,
136
-
137
- "import/export": ["error"],
138
- "import/no-named-as-default": ["error"],
139
- "import/no-named-as-default-member": ["error"],
140
- "import/no-deprecated": ["error"],
141
- "import/no-extraneous-dependencies": ["error"],
142
- "import/no-mutable-exports": ["error"],
143
- "import/no-unused-modules": ["error"],
144
-
145
- "import/unambiguous": ["error"],
146
- "import/no-commonjs": 0,
147
- "import/no-amd": ["error"],
148
- "import/no-nodejs-modules": 0,
149
-
150
- "import/first": ["error"],
151
- "import/exports-last": ["error"],
152
- "import/no-duplicates": ["error"],
153
- "import/no-namespace": 0,
154
- "import/extensions": ["error"],
155
- "import/order": ["error"],
156
- "import/newline-after-import": ["error"],
157
- "import/prefer-default-export": 0,
158
- "import/max-dependencies": ["error"],
159
- "import/no-unassigned-import": ["error"],
160
- "import/no-named-default": 0,
161
- "import/no-named-export": 0,
162
- "import/no-anonymous-default-export": 0,
163
- "import/group-exports": ["error"],
164
- "import/dynamic-import-chuckname": 0
165
- },
166
- "settings": {
167
- "import/ignore": ["node_modules"],
168
- "import/resolver": {
169
- "node": {
170
- "extensions": [".js", ".jsx", ".ts", ".tsx"]
171
- }
172
- }
173
- },
174
- "parserOptions": {
175
- "ecmaFeatures": {
176
- "jsx": true
177
- }
178
- },
179
- "parser": "@typescript-eslint/parser"
180
- }
@@ -1,26 +0,0 @@
1
- name: Feature Tests
2
-
3
- on:
4
- push:
5
- branches: [master]
6
- pull_request:
7
- branches: [master]
8
-
9
- jobs:
10
- build:
11
- runs-on: ubuntu-latest
12
-
13
- strategy:
14
- matrix:
15
- node-version: [12.x, 14.x, 15.x]
16
-
17
- steps:
18
- - uses: actions/checkout@v2
19
- - name: Use Node.js ${{ matrix.node-version }}
20
- uses: actions/setup-node@v2
21
- with:
22
- node-version: ${{ matrix.node-version }}
23
- - name: Install dependencies
24
- run: npm install
25
- - name: Run Cucumber Tests
26
- run: npm run feature-tests
@@ -1,32 +0,0 @@
1
- name: Unit Tests
2
-
3
- on:
4
- push:
5
- branches: [master]
6
- pull_request:
7
- branches: [master]
8
-
9
- jobs:
10
- build:
11
- runs-on: ubuntu-latest
12
-
13
- strategy:
14
- matrix:
15
- node-version: [12.x, 14.x, 15.x]
16
-
17
- steps:
18
- - uses: actions/checkout@v2
19
- - name: Use Node.js ${{ matrix.node-version }}
20
- uses: actions/setup-node@v2
21
- with:
22
- node-version: ${{ matrix.node-version }}
23
- - name: Install dependencies
24
- run: npm install
25
- - name: Run Unit Tests
26
- run: npm test
27
- - run: npm run coverage
28
-
29
- - name: Coveralls
30
- uses: coverallsapp/github-action@master
31
- with:
32
- github-token: ${{ secrets.GITHUB_TOKEN }}
package/.prettierignore DELETED
@@ -1,7 +0,0 @@
1
- node_modules/
2
- *.json
3
- dist/
4
- *.html
5
- build
6
- coverage
7
- .nyc_output/
package/.prettierrc.json DELETED
@@ -1,14 +0,0 @@
1
- {
2
- "tabWidth": 2,
3
- "semi": false,
4
- "singleQuote": true,
5
- "quoteProps": "as-needed",
6
- "jsxSingleQuote": false,
7
- "trailingComma": "es5",
8
- "bracketSpacing": true,
9
- "jsxBracketSameLine": true,
10
- "arrowParens": "avoid",
11
- "requirePragma": false,
12
- "proseWrap": "preserve",
13
- "endOfLine": "lf"
14
- }