kea-typegen 1.2.0 → 1.4.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 (164) hide show
  1. package/CHANGELOG.md +72 -31
  2. package/dist/package.json +15 -14
  3. package/dist/src/__tests__/e2e/actions.js +4 -4
  4. package/dist/src/__tests__/e2e/actions.js.map +1 -1
  5. package/dist/src/__tests__/e2e/connect.js +6 -6
  6. package/dist/src/__tests__/e2e/connect.js.map +1 -1
  7. package/dist/src/__tests__/e2e/loaders.js +3 -3
  8. package/dist/src/__tests__/e2e/loaders.js.map +1 -1
  9. package/dist/src/__tests__/e2e/reducers.js +4 -4
  10. package/dist/src/__tests__/e2e/reducers.js.map +1 -1
  11. package/dist/src/__tests__/e2e/selectors.js +3 -3
  12. package/dist/src/__tests__/e2e/selectors.js.map +1 -1
  13. package/dist/src/__tests__/utils.js +7 -7
  14. package/dist/src/__tests__/utils.js.map +1 -1
  15. package/dist/src/cli/typegen.js +5 -3
  16. package/dist/src/cli/typegen.js.map +1 -1
  17. package/dist/src/print/print.d.ts +5 -5
  18. package/dist/src/print/print.js +55 -43
  19. package/dist/src/print/print.js.map +1 -1
  20. package/dist/src/print/printActionCreators.d.ts +1 -2
  21. package/dist/src/print/printActionCreators.js +7 -7
  22. package/dist/src/print/printActionCreators.js.map +1 -1
  23. package/dist/src/print/printActionKeys.d.ts +1 -2
  24. package/dist/src/print/printActionKeys.js +4 -4
  25. package/dist/src/print/printActionKeys.js.map +1 -1
  26. package/dist/src/print/printActionTypes.d.ts +1 -2
  27. package/dist/src/print/printActionTypes.js +4 -4
  28. package/dist/src/print/printActionTypes.js.map +1 -1
  29. package/dist/src/print/printActions.d.ts +1 -2
  30. package/dist/src/print/printActions.js +4 -4
  31. package/dist/src/print/printActions.js.map +1 -1
  32. package/dist/src/print/printConstants.d.ts +1 -2
  33. package/dist/src/print/printConstants.js +2 -2
  34. package/dist/src/print/printConstants.js.map +1 -1
  35. package/dist/src/print/printDefaults.d.ts +1 -2
  36. package/dist/src/print/printDefaults.js +3 -3
  37. package/dist/src/print/printDefaults.js.map +1 -1
  38. package/dist/src/print/printEvents.d.ts +1 -2
  39. package/dist/src/print/printEvents.js +3 -3
  40. package/dist/src/print/printEvents.js.map +1 -1
  41. package/dist/src/print/printInternalExtraInput.d.ts +1 -2
  42. package/dist/src/print/printInternalExtraInput.js +8 -8
  43. package/dist/src/print/printInternalExtraInput.js.map +1 -1
  44. package/dist/src/print/printInternalReducerActions.d.ts +1 -2
  45. package/dist/src/print/printInternalReducerActions.js +3 -4
  46. package/dist/src/print/printInternalReducerActions.js.map +1 -1
  47. package/dist/src/print/printInternalSelectorTypes.d.ts +1 -2
  48. package/dist/src/print/printInternalSelectorTypes.js +3 -3
  49. package/dist/src/print/printInternalSelectorTypes.js.map +1 -1
  50. package/dist/src/print/printKey.d.ts +1 -2
  51. package/dist/src/print/printKey.js +2 -2
  52. package/dist/src/print/printKey.js.map +1 -1
  53. package/dist/src/print/printListeners.d.ts +1 -2
  54. package/dist/src/print/printListeners.js +9 -9
  55. package/dist/src/print/printListeners.js.map +1 -1
  56. package/dist/src/print/printProps.d.ts +1 -2
  57. package/dist/src/print/printProps.js +6 -5
  58. package/dist/src/print/printProps.js.map +1 -1
  59. package/dist/src/print/printReducer.d.ts +1 -2
  60. package/dist/src/print/printReducer.js +6 -6
  61. package/dist/src/print/printReducer.js.map +1 -1
  62. package/dist/src/print/printReducerOptions.d.ts +1 -2
  63. package/dist/src/print/printReducerOptions.js +3 -3
  64. package/dist/src/print/printReducerOptions.js.map +1 -1
  65. package/dist/src/print/printReducers.d.ts +1 -2
  66. package/dist/src/print/printReducers.js +7 -7
  67. package/dist/src/print/printReducers.js.map +1 -1
  68. package/dist/src/print/printSelector.d.ts +1 -2
  69. package/dist/src/print/printSelector.js +4 -4
  70. package/dist/src/print/printSelector.js.map +1 -1
  71. package/dist/src/print/printSelectors.d.ts +1 -2
  72. package/dist/src/print/printSelectors.js +6 -6
  73. package/dist/src/print/printSelectors.js.map +1 -1
  74. package/dist/src/print/printSharedListeners.d.ts +1 -2
  75. package/dist/src/print/printSharedListeners.js +11 -11
  76. package/dist/src/print/printSharedListeners.js.map +1 -1
  77. package/dist/src/print/printValues.d.ts +1 -2
  78. package/dist/src/print/printValues.js +3 -3
  79. package/dist/src/print/printValues.js.map +1 -1
  80. package/dist/src/typegen.js +5 -5
  81. package/dist/src/typegen.js.map +1 -1
  82. package/dist/src/types.d.ts +3 -0
  83. package/dist/src/utils.js +15 -15
  84. package/dist/src/utils.js.map +1 -1
  85. package/dist/src/visit/__tests__/visit.js +2 -2
  86. package/dist/src/visit/__tests__/visit.js.map +1 -1
  87. package/dist/src/visit/visit.js +22 -14
  88. package/dist/src/visit/visit.js.map +1 -1
  89. package/dist/src/visit/visitActions.d.ts +2 -2
  90. package/dist/src/visit/visitActions.js +13 -11
  91. package/dist/src/visit/visitActions.js.map +1 -1
  92. package/dist/src/visit/visitConnect.js +4 -4
  93. package/dist/src/visit/visitConnect.js.map +1 -1
  94. package/dist/src/visit/visitDefaults.js +1 -1
  95. package/dist/src/visit/visitDefaults.js.map +1 -1
  96. package/dist/src/visit/visitKey.js +2 -2
  97. package/dist/src/visit/visitKey.js.map +1 -1
  98. package/dist/src/visit/visitListeners.js +5 -5
  99. package/dist/src/visit/visitListeners.js.map +1 -1
  100. package/dist/src/visit/visitLoaders.d.ts +2 -2
  101. package/dist/src/visit/visitLoaders.js +27 -27
  102. package/dist/src/visit/visitLoaders.js.map +1 -1
  103. package/dist/src/visit/visitProps.js +1 -1
  104. package/dist/src/visit/visitProps.js.map +1 -1
  105. package/dist/src/visit/visitReducers.js +4 -4
  106. package/dist/src/visit/visitReducers.js.map +1 -1
  107. package/dist/src/visit/visitSelectors.js +8 -8
  108. package/dist/src/visit/visitSelectors.js.map +1 -1
  109. package/dist/src/visit/visitSharedListeners.js +5 -5
  110. package/dist/src/visit/visitSharedListeners.js.map +1 -1
  111. package/dist/src/visit/visitWindowValues.js +1 -1
  112. package/dist/src/visit/visitWindowValues.js.map +1 -1
  113. package/dist/src/write/write.d.ts +4 -0
  114. package/dist/src/{import/writeLogicTypeImports.js → write/write.js} +56 -11
  115. package/dist/src/write/write.js.map +1 -0
  116. package/dist/tsconfig.tsbuildinfo +1 -1
  117. package/form-plugin/lib/form-plugin/src/typegen.js +16 -15
  118. package/form-plugin/lib/src/types.d.ts +4 -1
  119. package/form-plugin/package.json +1 -1
  120. package/form-plugin/src/typegen.ts +25 -25
  121. package/form-plugin/tsconfig.json +0 -1
  122. package/form-plugin/yarn.lock +10 -10
  123. package/package.json +15 -14
  124. package/samples/autoImportLogic.ts +9 -3
  125. package/samples/autoImportLogicType.ts +1 -1
  126. package/samples/loadersLogicType.ts +10 -10
  127. package/samples/logicType.ts +4 -4
  128. package/src/__tests__/e2e/__snapshots__/loaders.ts.snap +12 -12
  129. package/src/__tests__/utils.ts +5 -5
  130. package/src/cli/typegen.ts +2 -0
  131. package/src/print/print.ts +65 -36
  132. package/src/print/printActionCreators.ts +12 -15
  133. package/src/print/printActionKeys.ts +5 -6
  134. package/src/print/printActionTypes.ts +6 -7
  135. package/src/print/printActions.ts +6 -13
  136. package/src/print/printConstants.ts +5 -6
  137. package/src/print/printDefaults.ts +5 -6
  138. package/src/print/printEvents.ts +8 -6
  139. package/src/print/printInternalExtraInput.ts +12 -13
  140. package/src/print/printInternalReducerActions.ts +5 -12
  141. package/src/print/printInternalSelectorTypes.ts +7 -8
  142. package/src/print/printKey.ts +2 -2
  143. package/src/print/printListeners.ts +16 -17
  144. package/src/print/printProps.ts +7 -7
  145. package/src/print/printReducer.ts +14 -15
  146. package/src/print/printReducerOptions.ts +4 -5
  147. package/src/print/printReducers.ts +13 -14
  148. package/src/print/printSelector.ts +8 -9
  149. package/src/print/printSelectors.ts +12 -13
  150. package/src/print/printSharedListeners.ts +20 -21
  151. package/src/print/printValues.ts +5 -6
  152. package/src/typegen.ts +4 -4
  153. package/src/types.ts +4 -1
  154. package/src/utils.ts +14 -14
  155. package/src/visit/visit.ts +11 -3
  156. package/src/visit/visitActions.ts +12 -10
  157. package/src/visit/visitListeners.ts +8 -8
  158. package/src/visit/visitLoaders.ts +49 -43
  159. package/src/visit/visitReducers.ts +1 -1
  160. package/src/visit/visitSelectors.ts +3 -3
  161. package/src/visit/visitSharedListeners.ts +8 -10
  162. package/src/{import/writeLogicTypeImports.ts → write/write.ts} +115 -16
  163. package/dist/src/import/writeLogicTypeImports.d.ts +0 -3
  164. package/dist/src/import/writeLogicTypeImports.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,76 +1,117 @@
1
+ ## 1.4.0 - 2021-12-12
2
+
3
+ - Support TypeScript 4.5+.
4
+ - Now adds new type imports with `type`, such as: `import type { logicType } from './logicType`.
5
+ - Refactor internals to create nodes newer `ts.factory` methods.
6
+
7
+ ## 1.3.0 - 2021-11-08
8
+
9
+ - Write paths into logics with `--write-paths`. Can be configured in `.kearc` with `writePaths: true`
10
+
11
+ ## 1.2.2 - 2021-10-14
12
+
13
+ - Loaders: Make the `payload` parameter on the `Success` action optional.
14
+
15
+ ## 1.2.1 - 2021-10-14
16
+
17
+ - Improve `kea-loaders` 0.5.0 support
18
+
1
19
  ## 1.2.0 - 2021-10-14
2
- - Support `kea-loaders` 0.5.0, add `payload` to the success action and `errorObject` to the failure action.
20
+
21
+ - Support `kea-loaders` 0.5.0, add `payload` to the success action and `errorObject` to the failure action.
3
22
 
4
23
  ## 1.1.6 - 2021-10-07
5
- - Support reducers with actions like `[otherLogic().actionTypes.bla]`
24
+
25
+ - Support reducers with actions like `[otherLogic().actionTypes.bla]`
6
26
 
7
27
  ## 1.1.5 - 2021-07-14
8
- - [Fix bug](https://github.com/keajs/kea-typegen/issues/28) with string constant types in action properties when connected with `connect`.
28
+
29
+ - [Fix bug](https://github.com/keajs/kea-typegen/issues/28) with string constant types in action properties when connected with `connect`.
9
30
 
10
31
  ## 1.1.4 - 2021-07-13
11
- - Support declaring `props: {} as SomeInterface`
32
+
33
+ - Support declaring `props: {} as SomeInterface`
12
34
 
13
35
  ## 1.1.3 - 2021-07-13
14
- - Bugfixes
36
+
37
+ - Bugfixes
15
38
 
16
39
  ## 1.1.2 - 2021-07-12
17
- - Export types and `runTypeGen` function
40
+
41
+ - Export types and `runTypeGen` function
18
42
 
19
43
  ## 1.1.1 - 2021-07-12
20
- - Fix main field in package.json
44
+
45
+ - Fix main field in package.json
21
46
 
22
47
  ## 1.1.0 - 2021-07-12
23
- - Experimental support for typegen plugins
48
+
49
+ - Experimental support for typegen plugins
24
50
 
25
51
  ## 1.0.4 - 2021-06-27
26
- - Fix regression
52
+
53
+ - Fix regression
27
54
 
28
55
  ## 1.0.3 - 2021-06-27
29
- - Fix regression
56
+
57
+ - Fix regression
30
58
 
31
59
  ## 1.0.2 - 2021-06-27
32
- - Use explicitly specified function return types if present for actions and selectors (vs detection via compiler api).
33
- - This helps with namespaced types like `This.That`, as the namespace information is lost in detected types.
60
+
61
+ - Use explicitly specified function return types if present for actions and selectors (vs detection via compiler api).
62
+ - This helps with namespaced types like `This.That`, as the namespace information is lost in detected types.
34
63
 
35
64
  ## 1.0.1 - 2021-06-27
36
- - Republish as 1.0.0 on npm is actually 0.7.2
37
- - Only import `A` when encountering complex types like `A.B`
65
+
66
+ - Republish as 1.0.0 on npm is actually 0.7.2
67
+ - Only import `A` when encountering complex types like `A.B`
38
68
 
39
69
  ## 1.0.0 - 2021-06-26
40
- - Support auto-importing referenced types into logic types
70
+
71
+ - Support auto-importing referenced types into logic types
41
72
 
42
73
  ## 0.7.2 - 2021-05-30
43
- - Support actions that return payloads with over 16 properties (fix ".. 4 more .." in the generated type).
74
+
75
+ - Support actions that return payloads with over 16 properties (fix ".. 4 more .." in the generated type).
44
76
 
45
77
  ## 0.7.1 - 2021-04-30
46
- - Improve error display, condense logs
78
+
79
+ - Improve error display, condense logs
47
80
 
48
81
  ## 0.7.0 - 2021-04-26
49
- - Fix various bugs from last version.
50
- - Run with `--no-import` to skip automatically adding imports to logic types.
82
+
83
+ - Fix various bugs from last version.
84
+ - Run with `--no-import` to skip automatically adding imports to logic types.
51
85
 
52
86
  ## 0.6.2 - 2021-04-25
53
- - Automatically add `import { logicType } from './logicType'` statements
54
- - Automatically add the type to `kea<logicType>()`
55
- - 0.6.0 and 0.6.1 had some bugs, don't use.
87
+
88
+ - Automatically add `import { logicType } from './logicType'` statements
89
+ - Automatically add the type to `kea<logicType>()`
90
+ - 0.6.0 and 0.6.1 had some bugs, don't use.
56
91
 
57
92
  ## 0.5.4 - 2021-03-30
58
- - Support reducers with selectors as defaults
93
+
94
+ - Support reducers with selectors as defaults
59
95
 
60
96
  ## 0.5.3 - 2021-02-23
61
- - Fix type bug with selectors
62
- - Skip first comment line in generated types when comparing for overwrites
63
- - Update deps
97
+
98
+ - Fix type bug with selectors
99
+ - Skip first comment line in generated types when comparing for overwrites
100
+ - Update deps
64
101
 
65
102
  ## 0.5.2 - 2021-02-23
66
- - Update and clean up copy
103
+
104
+ - Update and clean up copy
67
105
 
68
106
  ## 0.5.1 - 2021-01-22
69
- - Fix `kea-typegen write` recursive updates
107
+
108
+ - Fix `kea-typegen write` recursive updates
70
109
 
71
110
  ## 0.5.0 - 2021-01-22
72
- - Fix "Record<...>" style shortened types in selectors
73
- - Add names to selectors
111
+
112
+ - Fix "Record<...>" style shortened types in selectors
113
+ - Add names to selectors
74
114
 
75
115
  ## 0.4.0 - 2020-12-29
76
- - Fixed support for TypeScript 4.1
116
+
117
+ - Fixed support for TypeScript 4.1
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kea-typegen",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "description": "Generate type definitions for kea logic",
5
5
  "scripts": {
6
6
  "start": "ts-node ./src/cli/typegen.ts",
@@ -11,9 +11,10 @@
11
11
  "test": "jest",
12
12
  "samples:check": "ts-node ./src/cli/typegen.ts check -c ./samples/tsconfig.json",
13
13
  "samples:write": "ts-node ./src/cli/typegen.ts write -c ./samples/tsconfig.json",
14
+ "samples:write:paths": "ts-node ./src/cli/typegen.ts write -c ./samples/tsconfig.json --write-paths",
14
15
  "samples:watch": "ts-node ./src/cli/typegen.ts watch -c ./samples/tsconfig.json",
15
16
  "samples:write:posthog": "ts-node ./src/cli/typegen.ts write -c ../../PostHog/posthog/tsconfig.json",
16
- "form-plugin:build": "cd form-plugin && yarn build && cd ..",
17
+ "form-plugin:build": "cd form-plugin && yarn && yarn build && cd ..",
17
18
  "form-plugin:rebuild": "yarn form-plugin:build && rm -rf node_modules && yarn"
18
19
  },
19
20
  "main": "dist/src/index.js",
@@ -25,13 +26,13 @@
25
26
  "dependencies": {
26
27
  "@wessberg/ts-clone-node": "0.3.19",
27
28
  "diff": "^5.0.0",
28
- "prettier": "^2.3.1",
29
+ "prettier": "^2.5.1",
29
30
  "yargs": "^16.2.0"
30
31
  },
31
32
  "devDependencies": {
32
- "@babel/core": "^7.13.1",
33
- "@babel/preset-env": "^7.13.5",
34
- "@babel/preset-typescript": "^7.13.0",
33
+ "@babel/core": "^7.16.0",
34
+ "@babel/preset-env": "^7.16.4",
35
+ "@babel/preset-typescript": "^7.16.0",
35
36
  "@types/jest": "^26.0.20",
36
37
  "@types/node": "^14.14.31",
37
38
  "@types/yargs": "^16.0.0",
@@ -40,19 +41,19 @@
40
41
  "form-plugin": "file:./form-plugin",
41
42
  "husky": ">=4",
42
43
  "jest": "^27.0.5",
43
- "kea": "^2.4.6",
44
- "lint-staged": ">=10.5.4",
44
+ "kea": "^2.5.6",
45
+ "lint-staged": ">=12.1.2",
45
46
  "react": "^16.13.1",
46
- "react-redux": "^7.2.4",
47
- "redux": "^4.1.0",
48
- "reselect": "^4.0.0",
47
+ "react-redux": "^7.2.6",
48
+ "redux": "^4.1.2",
49
+ "reselect": "^4.1.5",
49
50
  "rimraf": "^3.0.2",
50
51
  "ts-jest": "^27.0.3",
51
- "ts-node": "^10.0.0",
52
- "typescript": "^4.3.4"
52
+ "ts-node": "^10.4.0",
53
+ "typescript": "^4.5.3"
53
54
  },
54
55
  "peerDependencies": {
55
- "typescript": "*"
56
+ "typescript": ">=4.5.3"
56
57
  },
57
58
  "jest": {
58
59
  "testPathIgnorePatterns": [
@@ -12,7 +12,7 @@ test('actions - with a function', () => {
12
12
  })
13
13
  })
14
14
  `;
15
- expect(utils_1.logicSourceToLogicType(logicSource)).toMatchSnapshot();
15
+ expect((0, utils_1.logicSourceToLogicType)(logicSource)).toMatchSnapshot();
16
16
  });
17
17
  test('actions - as an object', () => {
18
18
  const logicSource = `
@@ -25,7 +25,7 @@ test('actions - as an object', () => {
25
25
  }
26
26
  })
27
27
  `;
28
- expect(utils_1.logicSourceToLogicType(logicSource)).toMatchSnapshot();
28
+ expect((0, utils_1.logicSourceToLogicType)(logicSource)).toMatchSnapshot();
29
29
  });
30
30
  test('actions - as a function returning a object', () => {
31
31
  const logicSource = `
@@ -40,7 +40,7 @@ test('actions - as a function returning a object', () => {
40
40
  }
41
41
  })
42
42
  `;
43
- expect(utils_1.logicSourceToLogicType(logicSource)).toMatchSnapshot();
43
+ expect((0, utils_1.logicSourceToLogicType)(logicSource)).toMatchSnapshot();
44
44
  });
45
45
  test('actions - with random values instead of functions', () => {
46
46
  const logicSource = `
@@ -56,6 +56,6 @@ test('actions - with random values instead of functions', () => {
56
56
  }
57
57
  })
58
58
  `;
59
- expect(utils_1.logicSourceToLogicType(logicSource)).toMatchSnapshot();
59
+ expect((0, utils_1.logicSourceToLogicType)(logicSource)).toMatchSnapshot();
60
60
  });
61
61
  //# sourceMappingURL=actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../../src/__tests__/e2e/actions.ts"],"names":[],"mappings":";;AAAA,uCAAoD;AAEpD,IAAI,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACnC,MAAM,WAAW,GAAG;;;;;;;;;KASnB,CAAA;IACD,MAAM,CAAC,8BAAsB,CAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,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AAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,mDAAmD,EAAE,GAAG,EAAE;IAC3D,MAAM,WAAW,GAAG;;;;;;;;;;;;KAYnB,CAAA;IACD,MAAM,CAAC,IAAA,8BAAsB,EAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA"}
@@ -44,7 +44,7 @@ test('connect actions from another logic', () => {
44
44
  }
45
45
  })
46
46
  `;
47
- expect(utils_1.logicSourceToLogicType(logicSource)).toMatchSnapshot();
47
+ expect((0, utils_1.logicSourceToLogicType)(logicSource)).toMatchSnapshot();
48
48
  });
49
49
  test('connect actions from multiple other logics', () => {
50
50
  const logicSource = `
@@ -91,7 +91,7 @@ test('connect actions from multiple other logics', () => {
91
91
  }
92
92
  })
93
93
  `;
94
- expect(utils_1.logicSourceToLogicType(logicSource)).toMatchSnapshot();
94
+ expect((0, utils_1.logicSourceToLogicType)(logicSource)).toMatchSnapshot();
95
95
  });
96
96
  test('connect actions and rename', () => {
97
97
  const logicSource = `
@@ -138,7 +138,7 @@ test('connect actions and rename', () => {
138
138
  }
139
139
  })
140
140
  `;
141
- expect(utils_1.logicSourceToLogicType(logicSource)).toMatchSnapshot();
141
+ expect((0, utils_1.logicSourceToLogicType)(logicSource)).toMatchSnapshot();
142
142
  });
143
143
  test('connect values from another logic', () => {
144
144
  const logicSource = `
@@ -187,7 +187,7 @@ test('connect values from another logic', () => {
187
187
  }
188
188
  })
189
189
  `;
190
- expect(utils_1.logicSourceToLogicType(logicSource)).toMatchSnapshot();
190
+ expect((0, utils_1.logicSourceToLogicType)(logicSource)).toMatchSnapshot();
191
191
  });
192
192
  test('connect props from another logic', () => {
193
193
  const logicSource = `
@@ -236,7 +236,7 @@ test('connect props from another logic', () => {
236
236
  }
237
237
  })
238
238
  `;
239
- expect(utils_1.logicSourceToLogicType(logicSource)).toMatchSnapshot();
239
+ expect((0, utils_1.logicSourceToLogicType)(logicSource)).toMatchSnapshot();
240
240
  });
241
241
  test('connect values and rename', () => {
242
242
  const logicSource = `
@@ -285,6 +285,6 @@ test('connect values and rename', () => {
285
285
  }
286
286
  })
287
287
  `;
288
- expect(utils_1.logicSourceToLogicType(logicSource)).toMatchSnapshot();
288
+ expect((0, utils_1.logicSourceToLogicType)(logicSource)).toMatchSnapshot();
289
289
  });
290
290
  //# sourceMappingURL=connect.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"connect.js","sourceRoot":"","sources":["../../../../src/__tests__/e2e/connect.ts"],"names":[],"mappings":";;AAAA,uCAAmD;AAEnD,IAAI,CAAC,oCAAoC,EAAE,GAAG,EAAE;IAC5C,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAyCnB,CAAA;IACD,MAAM,CAAC,8BAAsB,CAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA;AAGF,IAAI,CAAC,4CAA4C,EAAE,GAAG,EAAE;IACpD,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2CnB,CAAA;IACD,MAAM,CAAC,8BAAsB,CAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,4BAA4B,EAAE,GAAG,EAAE;IACpC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2CnB,CAAA;IACD,MAAM,CAAC,8BAAsB,CAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,mCAAmC,EAAE,GAAG,EAAE;IAC3C,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6CnB,CAAA;IACD,MAAM,CAAC,8BAAsB,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2CnB,CAAA;IACD,MAAM,CAAC,IAAA,8BAAsB,EAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,mCAAmC,EAAE,GAAG,EAAE;IAC3C,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6CnB,CAAA;IACD,MAAM,CAAC,IAAA,8BAAsB,EAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,kCAAkC,EAAE,GAAG,EAAE;IAC1C,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6CnB,CAAA;IACD,MAAM,CAAC,IAAA,8BAAsB,EAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACnC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6CnB,CAAA;IACD,MAAM,CAAC,IAAA,8BAAsB,EAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA"}
@@ -23,7 +23,7 @@ test('loaders - with a function', () => {
23
23
  })
24
24
  })
25
25
  `;
26
- expect(utils_1.logicSourceToLogicType(logicSource)).toMatchSnapshot();
26
+ expect((0, utils_1.logicSourceToLogicType)(logicSource)).toMatchSnapshot();
27
27
  });
28
28
  test('loaders - with an array and default', () => {
29
29
  const logicSource = `
@@ -49,7 +49,7 @@ test('loaders - with an array and default', () => {
49
49
  })
50
50
  })
51
51
  `;
52
- expect(utils_1.logicSourceToLogicType(logicSource)).toMatchSnapshot();
52
+ expect((0, utils_1.logicSourceToLogicType)(logicSource)).toMatchSnapshot();
53
53
  });
54
54
  test('loaders - with no param', () => {
55
55
  const logicSource = `
@@ -68,6 +68,6 @@ test('loaders - with no param', () => {
68
68
  })
69
69
  })
70
70
  `;
71
- expect(utils_1.logicSourceToLogicType(logicSource)).toMatchSnapshot();
71
+ expect((0, utils_1.logicSourceToLogicType)(logicSource)).toMatchSnapshot();
72
72
  });
73
73
  //# sourceMappingURL=loaders.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"loaders.js","sourceRoot":"","sources":["../../../../src/__tests__/e2e/loaders.ts"],"names":[],"mappings":";;AAAA,uCAAoD;AAEpD,IAAI,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACnC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;KAoBnB,CAAA;IACD,MAAM,CAAC,8BAAsB,CAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA;AAGF,IAAI,CAAC,qCAAqC,EAAE,GAAG,EAAE;IAC7C,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;KAsBnB,CAAA;IACD,MAAM,CAAC,8BAAsB,CAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACjC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;KAenB,CAAA;IACD,MAAM,CAAC,8BAAsB,CAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"loaders.js","sourceRoot":"","sources":["../../../../src/__tests__/e2e/loaders.ts"],"names":[],"mappings":";;AAAA,uCAAoD;AAEpD,IAAI,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACnC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;KAoBnB,CAAA;IACD,MAAM,CAAC,IAAA,8BAAsB,EAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA;AAGF,IAAI,CAAC,qCAAqC,EAAE,GAAG,EAAE;IAC7C,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;KAsBnB,CAAA;IACD,MAAM,CAAC,IAAA,8BAAsB,EAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACjC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;KAenB,CAAA;IACD,MAAM,CAAC,IAAA,8BAAsB,EAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA"}
@@ -30,7 +30,7 @@ test('reducers - with a function', () => {
30
30
  })
31
31
  })
32
32
  `;
33
- expect(utils_1.logicSourceToLogicType(logicSource)).toMatchSnapshot();
33
+ expect((0, utils_1.logicSourceToLogicType)(logicSource)).toMatchSnapshot();
34
34
  });
35
35
  test('reducers - as an object', () => {
36
36
  const logicSource = `
@@ -60,7 +60,7 @@ test('reducers - as an object', () => {
60
60
  }
61
61
  })
62
62
  `;
63
- expect(utils_1.logicSourceToLogicType(logicSource)).toMatchSnapshot();
63
+ expect((0, utils_1.logicSourceToLogicType)(logicSource)).toMatchSnapshot();
64
64
  });
65
65
  test('reducers - as a function returning a object', () => {
66
66
  const logicSource = `
@@ -93,7 +93,7 @@ test('reducers - as a function returning a object', () => {
93
93
  }
94
94
  })
95
95
  `;
96
- expect(utils_1.logicSourceToLogicType(logicSource)).toMatchSnapshot();
96
+ expect((0, utils_1.logicSourceToLogicType)(logicSource)).toMatchSnapshot();
97
97
  });
98
98
  test('reducers - with bool default', () => {
99
99
  const logicSource = `
@@ -115,6 +115,6 @@ test('reducers - with bool default', () => {
115
115
  }
116
116
  })
117
117
  `;
118
- expect(utils_1.logicSourceToLogicType(logicSource)).toMatchSnapshot();
118
+ expect((0, utils_1.logicSourceToLogicType)(logicSource)).toMatchSnapshot();
119
119
  });
120
120
  //# sourceMappingURL=reducers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"reducers.js","sourceRoot":"","sources":["../../../../src/__tests__/e2e/reducers.ts"],"names":[],"mappings":";;AAAA,uCAAoD;AAEpD,IAAI,CAAC,4BAA4B,EAAE,GAAG,EAAE;IACpC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2BnB,CAAA;IACD,MAAM,CAAC,8BAAsB,CAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACjC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;KA0BnB,CAAA;IACD,MAAM,CAAC,8BAAsB,CAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,6CAA6C,EAAE,GAAG,EAAE;IACrD,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6BnB,CAAA;IACD,MAAM,CAAC,8BAAsB,CAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,8BAA8B,EAAE,GAAG,EAAE;IACtC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;KAkBnB,CAAA;IACD,MAAM,CAAC,8BAAsB,CAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"reducers.js","sourceRoot":"","sources":["../../../../src/__tests__/e2e/reducers.ts"],"names":[],"mappings":";;AAAA,uCAAoD;AAEpD,IAAI,CAAC,4BAA4B,EAAE,GAAG,EAAE;IACpC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2BnB,CAAA;IACD,MAAM,CAAC,IAAA,8BAAsB,EAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,yBAAyB,EAAE,GAAG,EAAE;IACjC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;KA0BnB,CAAA;IACD,MAAM,CAAC,IAAA,8BAAsB,EAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,6CAA6C,EAAE,GAAG,EAAE;IACrD,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6BnB,CAAA;IACD,MAAM,CAAC,IAAA,8BAAsB,EAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,8BAA8B,EAAE,GAAG,EAAE;IACtC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;KAkBnB,CAAA;IACD,MAAM,CAAC,IAAA,8BAAsB,EAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA"}
@@ -33,7 +33,7 @@ test('selectors - with a function', () => {
33
33
  })
34
34
  })
35
35
  `;
36
- expect(utils_1.logicSourceToLogicType(logicSource)).toMatchSnapshot();
36
+ expect((0, utils_1.logicSourceToLogicType)(logicSource)).toMatchSnapshot();
37
37
  });
38
38
  test('selectors - as an object', () => {
39
39
  const logicSource = `
@@ -67,7 +67,7 @@ test('selectors - as an object', () => {
67
67
  }
68
68
  })
69
69
  `;
70
- expect(utils_1.logicSourceToLogicType(logicSource)).toMatchSnapshot();
70
+ expect((0, utils_1.logicSourceToLogicType)(logicSource)).toMatchSnapshot();
71
71
  });
72
72
  test('selectors - as a function returning a object', () => {
73
73
  const logicSource = `
@@ -103,6 +103,6 @@ test('selectors - as a function returning a object', () => {
103
103
  }
104
104
  })
105
105
  `;
106
- expect(utils_1.logicSourceToLogicType(logicSource)).toMatchSnapshot();
106
+ expect((0, utils_1.logicSourceToLogicType)(logicSource)).toMatchSnapshot();
107
107
  });
108
108
  //# sourceMappingURL=selectors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"selectors.js","sourceRoot":"","sources":["../../../../src/__tests__/e2e/selectors.ts"],"names":[],"mappings":";;AAAA,uCAAoD;AAEpD,IAAI,CAAC,6BAA6B,EAAE,GAAG,EAAE;IACrC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8BnB,CAAA;IACD,MAAM,CAAC,8BAAsB,CAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,0BAA0B,EAAE,GAAG,EAAE;IAClC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8BnB,CAAA;IACD,MAAM,CAAC,8BAAsB,CAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,8CAA8C,EAAE,GAAG,EAAE;IACtD,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgCnB,CAAA;IACD,MAAM,CAAC,8BAAsB,CAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"selectors.js","sourceRoot":"","sources":["../../../../src/__tests__/e2e/selectors.ts"],"names":[],"mappings":";;AAAA,uCAAoD;AAEpD,IAAI,CAAC,6BAA6B,EAAE,GAAG,EAAE;IACrC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8BnB,CAAA;IACD,MAAM,CAAC,IAAA,8BAAsB,EAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,0BAA0B,EAAE,GAAG,EAAE;IAClC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8BnB,CAAA;IACD,MAAM,CAAC,IAAA,8BAAsB,EAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,8CAA8C,EAAE,GAAG,EAAE;IACtD,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgCnB,CAAA;IACD,MAAM,CAAC,IAAA,8BAAsB,EAAC,WAAW,CAAC,CAAC,CAAC,eAAe,EAAE,CAAA;AACjE,CAAC,CAAC,CAAA"}
@@ -1,21 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const utils_1 = require("../utils");
4
- const ts = require("typescript");
4
+ const typescript_1 = require("typescript");
5
5
  test('sourceToSourceFile', () => {
6
6
  const source = 'var foo = 5;';
7
- const sourceFile1 = utils_1.sourceToSourceFile(source);
8
- const sourceFile2 = utils_1.sourceToSourceFile(source, 'otherLogic.ts');
7
+ const sourceFile1 = (0, utils_1.sourceToSourceFile)(source);
8
+ const sourceFile2 = (0, utils_1.sourceToSourceFile)(source, 'otherLogic.ts');
9
9
  expect(sourceFile1.text).toEqual(source);
10
10
  expect(sourceFile2.text).toEqual(source);
11
11
  expect(sourceFile1.fileName).toEqual('logic.ts');
12
12
  expect(sourceFile2.fileName).toEqual('otherLogic.ts');
13
- expect(ts.SyntaxKind[sourceFile1.kind]).toEqual('SourceFile');
14
- expect(ts.SyntaxKind[sourceFile2.kind]).toEqual('SourceFile');
13
+ expect(typescript_1.SyntaxKind[sourceFile1.kind]).toEqual('SourceFile');
14
+ expect(typescript_1.SyntaxKind[sourceFile2.kind]).toEqual('SourceFile');
15
15
  });
16
16
  test('programFromSource', () => {
17
17
  const source = 'var foo = 5;';
18
- const program = utils_1.programFromSource(source);
18
+ const program = (0, utils_1.programFromSource)(source);
19
19
  expect(program).toBeDefined;
20
20
  expect(typeof program.getSourceFile).toBe('function');
21
21
  });
@@ -30,7 +30,7 @@ test('logicSourceToLogicType', () => {
30
30
  })
31
31
  })
32
32
  `;
33
- const string = utils_1.logicSourceToLogicType(logicSource);
33
+ const string = (0, utils_1.logicSourceToLogicType)(logicSource);
34
34
  expect(string).toContain('export interface myRandomLogicType extends Logic {');
35
35
  });
36
36
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/__tests__/utils.ts"],"names":[],"mappings":";;AAAA,oCAAwF;AACxF,iCAAgC;AAEhC,IAAI,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAC5B,MAAM,MAAM,GAAG,cAAc,CAAA;IAC7B,MAAM,WAAW,GAAG,0BAAkB,CAAC,MAAM,CAAG,CAAA;IAChD,MAAM,WAAW,GAAG,0BAAkB,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;IAC/D,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;IACxC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;IACxC,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;IAChD,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,CAAA;IACrD,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;IAC7D,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;AACjE,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,mBAAmB,EAAE,GAAG,EAAE;IAC3B,MAAM,MAAM,GAAG,cAAc,CAAA;IAC7B,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IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;AAC9D,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,mBAAmB,EAAE,GAAG,EAAE;IAC3B,MAAM,MAAM,GAAG,cAAc,CAAA;IAC7B,MAAM,OAAO,GAAG,IAAA,yBAAiB,EAAC,MAAM,CAAC,CAAA;IACzC,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,CAAA;IAC3B,MAAM,CAAC,OAAO,OAAO,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;AACzD,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,wBAAwB,EAAE,GAAG,EAAE;IAChC,MAAM,WAAW,GAAG;;;;;;;;;KASnB,CAAA;IACD,MAAM,MAAM,GAAG,IAAA,8BAAsB,EAAC,WAAW,CAAC,CAAA;IAElD,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,oDAAoD,CAAC,CAAA;AAClF,CAAC,CAAC,CAAA"}
@@ -8,13 +8,13 @@ const fs = require("fs");
8
8
  const typegen_1 = require("../typegen");
9
9
  yargs
10
10
  .command('check', '- check what should be done', (yargs) => { }, (argv) => {
11
- typegen_1.runTypeGen(Object.assign(Object.assign({}, includeKeaConfig(parsedToAppOptions(argv))), { write: false, watch: false }));
11
+ (0, typegen_1.runTypeGen)(Object.assign(Object.assign({}, includeKeaConfig(parsedToAppOptions(argv))), { write: false, watch: false }));
12
12
  })
13
13
  .command('write', '- write logicType.ts files', (yargs) => { }, (argv) => {
14
- typegen_1.runTypeGen(Object.assign(Object.assign({}, includeKeaConfig(parsedToAppOptions(argv))), { write: true, watch: false }));
14
+ (0, typegen_1.runTypeGen)(Object.assign(Object.assign({}, includeKeaConfig(parsedToAppOptions(argv))), { write: true, watch: false }));
15
15
  })
16
16
  .command('watch', '- watch for changes and write logicType.ts files', (yargs) => { }, (argv) => {
17
- typegen_1.runTypeGen(Object.assign(Object.assign({}, includeKeaConfig(parsedToAppOptions(argv))), { write: true, watch: true }));
17
+ (0, typegen_1.runTypeGen)(Object.assign(Object.assign({}, includeKeaConfig(parsedToAppOptions(argv))), { write: true, watch: true }));
18
18
  })
19
19
  .option('config', { alias: 'c', describe: 'Path to tsconfig.json (otherwise auto-detected)', type: 'string' })
20
20
  .option('file', { alias: 'f', describe: "Single file to evaluate (can't be used with --config)", type: 'string' })
@@ -30,6 +30,7 @@ yargs
30
30
  })
31
31
  .option('quiet', { alias: 'q', describe: 'Write nothing to stdout', type: 'boolean' })
32
32
  .option('no-import', { describe: 'Do not automatically import generated types in logic files', type: 'boolean' })
33
+ .option('write-paths', { describe: 'Write paths into logic files that have none', type: 'boolean' })
33
34
  .option('verbose', { describe: 'Slightly more verbose output log', type: 'boolean' })
34
35
  .demandCommand()
35
36
  .help()
@@ -43,6 +44,7 @@ function parsedToAppOptions(parsedOptions) {
43
44
  quiet: parsedOptions.quiet,
44
45
  verbose: parsedOptions.verbose,
45
46
  noImport: parsedOptions.noImport,
47
+ writePaths: parsedOptions.writePaths,
46
48
  log: parsedOptions.quiet ? () => null : console.log.bind(console),
47
49
  };
48
50
  return appOptions;
@@ -1 +1 @@
1
- {"version":3,"file":"typegen.js","sourceRoot":"","sources":["../../../src/cli/typegen.ts"],"names":[],"mappings":";;;AAEA,iCAAgC;AAChC,+BAA8B;AAC9B,6BAA4B;AAC5B,yBAAwB;AAExB,wCAAuC;AAEvC,KAAK;KACA,OAAO,CACJ,OAAO,EACP,6BAA6B,EAC7B,CAAC,KAAK,EAAE,EAAE,GAAE,CAAC,EACb,CAAC,IAAI,EAAE,EAAE;IACL,oBAAU,iCAAM,gBAAgB,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,KAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,IAAG,CAAA;AAC7F,CAAC,CACJ;KACA,OAAO,CACJ,OAAO,EACP,4BAA4B,EAC5B,CAAC,KAAK,EAAE,EAAE,GAAE,CAAC,EACb,CAAC,IAAI,E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E,CAAC,CAAA;YACjE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;SAClB;QAED,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;aACjB,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,UAAU,CAAC,GAAG,CAAC,KAAK,WAAW,CAAC;aACvD,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YAEb,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;gBACtB,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,aAAa,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,CAAA;aAC/E;iBAAM;gBACH,UAAU,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,GAAG,CAAC,CAAA;aACnC;QACL,CAAC,CAAC,CAAA;KACT;IAED,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE;QAC1B,UAAU,CAAC,YAAY,GAAG,EAAE,CAAC,cAAc,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,EAAE,eAAe,CAAC,CAAA;KACxF;IAED,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;QACtB,UAAU,CAAC,QAAQ,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAA;KACxG;IAED,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE;QACvB,UAAU,CAAC,SAAS,GAAG,UAAU,CAAC,QAAQ,CAAA;KAC7C;IAED,OAAO,UAAU,CAAA;AACrB,CAAC"}
@@ -1,12 +1,12 @@
1
- import * as ts from 'typescript';
1
+ import { Node, Program, TypeParameterDeclaration } from 'typescript';
2
2
  import { AppOptions, ParsedLogic } from '../types';
3
3
  export declare function runThroughPrettier(sourceText: string, filePath: string): string;
4
- export declare function printToFiles(program: ts.Program, appOptions: AppOptions, parsedLogics: ParsedLogic[]): {
4
+ export declare function printToFiles(program: Program, appOptions: AppOptions, parsedLogics: ParsedLogic[]): {
5
5
  filesToWrite: number;
6
6
  writtenFiles: number;
7
- importsToModify: number;
7
+ filesToModify: number;
8
8
  };
9
- export declare function nodeToString(node: ts.Node): string;
9
+ export declare function nodeToString(node: Node): string;
10
10
  export declare function parsedLogicToTypeString(parsedLogic: ParsedLogic, appOptions?: AppOptions): string;
11
- export declare function getLogicTypeArguments(parsedLogic: ParsedLogic): ts.TypeParameterDeclaration[];
11
+ export declare function getLogicTypeArguments(parsedLogic: ParsedLogic): TypeParameterDeclaration[];
12
12
  export declare function printLogicType(parsedLogic: ParsedLogic, appOptions?: AppOptions): void;