@eagleoutice/flowr 2.6.2 → 2.6.3

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 (349) hide show
  1. package/README.md +36 -34
  2. package/abstract-interpretation/data-frame/absint-visitor.js +3 -3
  3. package/abstract-interpretation/data-frame/mappers/function-mapper.d.ts +7 -7
  4. package/abstract-interpretation/data-frame/mappers/function-mapper.js +20 -16
  5. package/abstract-interpretation/data-frame/semantics.js +8 -0
  6. package/abstract-interpretation/data-frame/shape-inference.d.ts +3 -3
  7. package/abstract-interpretation/data-frame/shape-inference.js +3 -3
  8. package/abstract-interpretation/normalized-ast-fold.d.ts +1 -1
  9. package/benchmark/slicer.d.ts +1 -0
  10. package/benchmark/slicer.js +13 -12
  11. package/benchmark/summarizer/first-phase/process.js +1 -1
  12. package/benchmark/summarizer/second-phase/graph.d.ts +3 -1
  13. package/benchmark/summarizer/second-phase/graph.js +3 -1
  14. package/cli/export-quads-app.js +1 -1
  15. package/cli/repl/commands/repl-dataflow.js +2 -1
  16. package/cli/repl/commands/repl-parse.js +16 -4
  17. package/cli/repl/commands/repl-query.js +1 -1
  18. package/cli/repl/core.js +16 -13
  19. package/cli/repl/server/connection.js +2 -1
  20. package/cli/script-core/statistics-helper-core.js +2 -1
  21. package/cli/slicer-app.js +3 -4
  22. package/cli/wiki.d.ts +4 -0
  23. package/cli/wiki.js +165 -0
  24. package/config.d.ts +4 -0
  25. package/config.js +6 -0
  26. package/control-flow/cfg-dead-code.js +13 -3
  27. package/control-flow/cfg-simplification.d.ts +5 -2
  28. package/control-flow/cfg-simplification.js +3 -0
  29. package/control-flow/extract-cfg.d.ts +9 -3
  30. package/control-flow/extract-cfg.js +44 -4
  31. package/control-flow/semantic-cfg-guided-visitor.d.ts +2 -2
  32. package/control-flow/simple-visitor.js +2 -2
  33. package/control-flow/useless-loop.d.ts +3 -3
  34. package/control-flow/useless-loop.js +14 -5
  35. package/core/pipeline-executor.d.ts +3 -6
  36. package/core/pipeline-executor.js +4 -7
  37. package/core/print/normalize-printer.d.ts +1 -1
  38. package/core/print/normalize-printer.js +2 -2
  39. package/core/steps/all/core/00-parse.d.ts +1 -1
  40. package/core/steps/all/core/00-parse.js +1 -1
  41. package/core/steps/all/core/10-normalize.d.ts +3 -9
  42. package/core/steps/all/core/10-normalize.js +1 -16
  43. package/core/steps/all/core/11-normalize-tree-sitter.d.ts +2 -3
  44. package/core/steps/all/core/11-normalize-tree-sitter.js +2 -3
  45. package/core/steps/all/core/20-dataflow.d.ts +3 -4
  46. package/core/steps/all/core/20-dataflow.js +2 -2
  47. package/core/steps/all/static-slicing/00-slice.d.ts +1 -2
  48. package/core/steps/all/static-slicing/00-slice.js +1 -1
  49. package/core/steps/all/static-slicing/10-reconstruct.d.ts +8 -0
  50. package/core/steps/all/static-slicing/10-reconstruct.js +4 -1
  51. package/core/steps/pipeline/default-pipelines.d.ts +55 -56
  52. package/core/steps/pipeline/default-pipelines.js +8 -8
  53. package/dataflow/environments/clone.d.ts +0 -1
  54. package/dataflow/environments/clone.js +12 -2
  55. package/dataflow/environments/diff.js +2 -2
  56. package/dataflow/environments/overwrite.d.ts +1 -5
  57. package/dataflow/environments/overwrite.js +3 -19
  58. package/dataflow/environments/scoping.d.ts +6 -2
  59. package/dataflow/environments/scoping.js +6 -2
  60. package/dataflow/eval/resolve/resolve-argument.js +2 -2
  61. package/dataflow/eval/values/string/string-constants.d.ts +9 -3
  62. package/dataflow/eval/values/string/string-constants.js +9 -3
  63. package/dataflow/extractor.d.ts +2 -3
  64. package/dataflow/extractor.js +25 -22
  65. package/dataflow/graph/graph.d.ts +3 -9
  66. package/dataflow/graph/graph.js +0 -13
  67. package/dataflow/graph/unknown-replacement.d.ts +4 -2
  68. package/dataflow/graph/unknown-replacement.js +4 -2
  69. package/dataflow/info.d.ts +7 -0
  70. package/dataflow/info.js +21 -0
  71. package/dataflow/internal/linker.js +7 -4
  72. package/dataflow/internal/process/functions/call/argument/make-argument.d.ts +2 -2
  73. package/dataflow/internal/process/functions/call/argument/make-argument.js +2 -3
  74. package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +1 -1
  75. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +4 -4
  76. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +1 -1
  77. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +4 -4
  78. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +6 -6
  79. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +1 -1
  80. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +1 -1
  81. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +1 -1
  82. package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +1 -1
  83. package/dataflow/internal/process/functions/call/built-in/built-in-get.js +1 -1
  84. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +1 -1
  85. package/dataflow/internal/process/functions/call/built-in/built-in-list.js +2 -2
  86. package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +3 -3
  87. package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.d.ts +6 -1
  88. package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +6 -1
  89. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +2 -2
  90. package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +15 -10
  91. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +78 -75
  92. package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.d.ts +3 -1
  93. package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +3 -1
  94. package/dataflow/internal/process/functions/call/built-in/built-in-vector.js +2 -2
  95. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +1 -1
  96. package/dataflow/internal/process/functions/call/common.d.ts +1 -1
  97. package/dataflow/internal/process/functions/call/common.js +4 -4
  98. package/dataflow/internal/process/functions/call/default-call-handling.d.ts +3 -1
  99. package/dataflow/internal/process/functions/call/default-call-handling.js +3 -1
  100. package/dataflow/internal/process/functions/call/known-call-handling.js +3 -3
  101. package/dataflow/internal/process/functions/call/named-call-handling.js +4 -4
  102. package/dataflow/internal/process/functions/process-parameter.js +4 -4
  103. package/dataflow/origin/dfg-get-symbol-refs.d.ts +1 -1
  104. package/dataflow/origin/dfg-get-symbol-refs.js +1 -1
  105. package/dataflow/processor.d.ts +6 -11
  106. package/documentation/data/dfg/doc-data-dfg-util.d.ts +0 -2
  107. package/documentation/data/faq/faqs.js +27 -18
  108. package/documentation/data/faq/recommended-configs.d.ts +36 -0
  109. package/documentation/data/faq/recommended-configs.js +40 -0
  110. package/documentation/data/faq/wiki-faq-store.d.ts +1 -0
  111. package/documentation/data/faq/wiki-faq-store.js +10 -2
  112. package/documentation/data/server/doc-data-server-messages.js +1 -1
  113. package/documentation/doc-capabilities.d.ts +9 -0
  114. package/documentation/{print-capabilities-markdown.js → doc-capabilities.js} +18 -21
  115. package/documentation/doc-readme.d.ts +9 -0
  116. package/documentation/{print-readme.js → doc-readme.js} +31 -35
  117. package/documentation/doc-util/doc-benchmarks.d.ts +6 -4
  118. package/documentation/doc-util/doc-benchmarks.js +6 -4
  119. package/documentation/doc-util/doc-cfg.js +5 -8
  120. package/documentation/doc-util/doc-dfg.d.ts +7 -7
  121. package/documentation/doc-util/doc-dfg.js +13 -13
  122. package/documentation/doc-util/doc-escape.d.ts +6 -0
  123. package/documentation/doc-util/doc-escape.js +11 -0
  124. package/documentation/doc-util/doc-general.d.ts +22 -2
  125. package/documentation/doc-util/doc-general.js +22 -2
  126. package/documentation/doc-util/doc-normalized-ast.d.ts +10 -5
  127. package/documentation/doc-util/doc-normalized-ast.js +12 -9
  128. package/documentation/doc-util/doc-query.d.ts +12 -4
  129. package/documentation/doc-util/doc-query.js +18 -11
  130. package/documentation/doc-util/doc-search.d.ts +0 -30
  131. package/documentation/doc-util/doc-search.js +2 -73
  132. package/documentation/doc-util/doc-server-message.d.ts +5 -5
  133. package/documentation/doc-util/doc-server-message.js +4 -4
  134. package/documentation/doc-util/doc-types.d.ts +69 -32
  135. package/documentation/doc-util/doc-types.js +108 -61
  136. package/documentation/index.d.ts +9 -9
  137. package/documentation/index.js +9 -9
  138. package/documentation/issue-linting-rule.d.ts +9 -0
  139. package/documentation/{print-linter-issue.js → issue-linting-rule.js} +20 -23
  140. package/documentation/wiki-analyzer.d.ts +9 -0
  141. package/documentation/wiki-analyzer.js +412 -0
  142. package/documentation/wiki-cfg.d.ts +9 -0
  143. package/documentation/{print-cfg-wiki.js → wiki-cfg.js} +144 -160
  144. package/documentation/wiki-core.d.ts +14 -0
  145. package/documentation/{print-core-wiki.js → wiki-core.js} +164 -175
  146. package/documentation/wiki-dataflow-graph.d.ts +9 -0
  147. package/documentation/{print-dataflow-graph-wiki.js → wiki-dataflow-graph.js} +142 -172
  148. package/documentation/wiki-engine.d.ts +9 -0
  149. package/documentation/{print-engines-wiki.js → wiki-engine.js} +27 -42
  150. package/documentation/wiki-faq.d.ts +8 -0
  151. package/documentation/wiki-faq.js +22 -0
  152. package/documentation/wiki-interface.d.ts +9 -0
  153. package/documentation/{print-interface-wiki.js → wiki-interface.js} +59 -56
  154. package/documentation/wiki-linter.d.ts +9 -0
  155. package/documentation/{print-linter-wiki.js → wiki-linter.js} +52 -48
  156. package/documentation/wiki-linting-and-testing.d.ts +9 -0
  157. package/documentation/{print-linting-and-testing-wiki.js → wiki-linting-and-testing.js} +25 -32
  158. package/documentation/wiki-mk/doc-context.d.ts +186 -0
  159. package/documentation/wiki-mk/doc-context.js +84 -0
  160. package/documentation/wiki-mk/doc-maker.d.ts +95 -0
  161. package/documentation/wiki-mk/doc-maker.js +133 -0
  162. package/documentation/wiki-normalized-ast.d.ts +9 -0
  163. package/documentation/{print-normalized-ast-wiki.js → wiki-normalized-ast.js} +64 -47
  164. package/documentation/wiki-onboarding.d.ts +8 -0
  165. package/documentation/{print-onboarding-wiki.js → wiki-onboarding.js} +18 -15
  166. package/documentation/wiki-query.d.ts +9 -0
  167. package/documentation/{print-query-wiki.js → wiki-query.js} +62 -47
  168. package/documentation/wiki-search.d.ts +9 -0
  169. package/documentation/wiki-search.js +61 -0
  170. package/linter/linter-executor.js +3 -2
  171. package/linter/linter-format.d.ts +2 -2
  172. package/linter/linter-rules.d.ts +13 -17
  173. package/linter/rules/absolute-path.d.ts +1 -2
  174. package/linter/rules/absolute-path.js +2 -2
  175. package/linter/rules/dataframe-access-validation.d.ts +1 -1
  176. package/linter/rules/dataframe-access-validation.js +12 -8
  177. package/linter/rules/dead-code.d.ts +1 -1
  178. package/linter/rules/deprecated-functions.d.ts +1 -5
  179. package/linter/rules/file-path-validity.d.ts +1 -1
  180. package/linter/rules/file-path-validity.js +4 -4
  181. package/linter/rules/function-finder-util.d.ts +1 -5
  182. package/linter/rules/naming-convention.d.ts +2 -2
  183. package/linter/rules/naming-convention.js +1 -1
  184. package/linter/rules/network-functions.d.ts +1 -1
  185. package/linter/rules/network-functions.js +1 -1
  186. package/linter/rules/seeded-randomness.d.ts +3 -2
  187. package/linter/rules/seeded-randomness.js +33 -13
  188. package/linter/rules/unused-definition.d.ts +1 -1
  189. package/linter/rules/useless-loop.d.ts +2 -2
  190. package/linter/rules/useless-loop.js +2 -2
  191. package/package.json +6 -17
  192. package/project/cache/flowr-analyzer-cache.d.ts +7 -10
  193. package/project/cache/flowr-analyzer-cache.js +17 -38
  194. package/project/cache/flowr-analyzer-controlflow-cache.d.ts +34 -0
  195. package/project/cache/flowr-analyzer-controlflow-cache.js +79 -0
  196. package/project/context/flowr-analyzer-context.d.ts +30 -5
  197. package/project/context/flowr-analyzer-context.js +48 -4
  198. package/project/context/flowr-analyzer-files-context.d.ts +63 -13
  199. package/project/context/flowr-analyzer-files-context.js +110 -39
  200. package/project/context/flowr-file.d.ts +32 -10
  201. package/project/context/flowr-file.js +30 -9
  202. package/project/flowr-analyzer-builder.d.ts +22 -28
  203. package/project/flowr-analyzer-builder.js +32 -70
  204. package/project/flowr-analyzer.d.ts +55 -14
  205. package/project/flowr-analyzer.js +53 -8
  206. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.d.ts +7 -1
  207. package/project/plugins/file-plugins/flowr-analyzer-description-file-plugin.js +13 -5
  208. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.d.ts +3 -3
  209. package/project/plugins/file-plugins/flowr-analyzer-file-plugin.js +11 -5
  210. package/project/plugins/file-plugins/flowr-description-file.d.ts +3 -3
  211. package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.d.ts +22 -0
  212. package/project/plugins/file-plugins/notebooks/flowr-analyzer-jupyter-file-plugin.js +33 -0
  213. package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.d.ts +22 -0
  214. package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.js +33 -0
  215. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.d.ts +22 -0
  216. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.js +33 -0
  217. package/project/plugins/file-plugins/notebooks/flowr-jupyter-file.d.ts +20 -0
  218. package/project/plugins/file-plugins/notebooks/flowr-jupyter-file.js +42 -0
  219. package/project/plugins/file-plugins/notebooks/flowr-rmarkdown-file.d.ts +59 -0
  220. package/project/plugins/file-plugins/notebooks/flowr-rmarkdown-file.js +132 -0
  221. package/project/plugins/file-plugins/notebooks/notebook.d.ts +0 -0
  222. package/project/plugins/file-plugins/notebooks/notebook.js +2 -0
  223. package/project/plugins/flowr-analyzer-plugin-defaults.d.ts +5 -0
  224. package/project/plugins/flowr-analyzer-plugin-defaults.js +23 -0
  225. package/project/plugins/flowr-analyzer-plugin.d.ts +2 -0
  226. package/project/plugins/flowr-analyzer-plugin.js +2 -0
  227. package/project/plugins/loading-order-plugins/flowr-analyzer-loading-order-description-file-plugin.js +1 -1
  228. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-description-file-plugin.js +1 -1
  229. package/project/plugins/plugin-registry.d.ts +34 -0
  230. package/project/plugins/plugin-registry.js +62 -0
  231. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +7 -1
  232. package/queries/catalog/call-context-query/call-context-query-executor.js +4 -2
  233. package/queries/catalog/call-context-query/identify-link-to-last-call-relation.d.ts +5 -2
  234. package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +25 -18
  235. package/queries/catalog/cluster-query/cluster-query-format.d.ts +1 -1
  236. package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +1 -1
  237. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +1 -1
  238. package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +1 -1
  239. package/queries/catalog/dependencies-query/dependencies-query-executor.d.ts +1 -1
  240. package/queries/catalog/dependencies-query/dependencies-query-executor.js +1 -1
  241. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +1 -1
  242. package/queries/catalog/dependencies-query/dependencies-query-format.js +1 -1
  243. package/queries/catalog/df-shape-query/df-shape-query-executor.js +1 -1
  244. package/queries/catalog/df-shape-query/df-shape-query-format.d.ts +2 -2
  245. package/queries/catalog/df-shape-query/df-shape-query-format.js +6 -5
  246. package/queries/catalog/happens-before-query/happens-before-query-executor.d.ts +2 -1
  247. package/queries/catalog/happens-before-query/happens-before-query-executor.js +2 -1
  248. package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +1 -1
  249. package/queries/catalog/id-map-query/id-map-query-format.d.ts +1 -1
  250. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.d.ts +1 -1
  251. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +1 -1
  252. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +1 -1
  253. package/queries/catalog/linter-query/linter-query-format.d.ts +1 -1
  254. package/queries/catalog/linter-query/linter-query-format.js +13 -2
  255. package/queries/catalog/location-map-query/location-map-query-executor.js +2 -1
  256. package/queries/catalog/location-map-query/location-map-query-format.d.ts +1 -1
  257. package/queries/catalog/location-map-query/location-map-query-format.js +1 -1
  258. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +1 -1
  259. package/queries/catalog/origin-query/origin-query-format.d.ts +1 -1
  260. package/queries/catalog/project-query/project-query-executor.js +3 -1
  261. package/queries/catalog/project-query/project-query-format.d.ts +1 -1
  262. package/queries/catalog/resolve-value-query/resolve-value-query-executor.d.ts +2 -2
  263. package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +2 -2
  264. package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +1 -1
  265. package/queries/catalog/search-query/search-query-format.d.ts +1 -1
  266. package/queries/catalog/static-slice-query/static-slice-query-executor.js +1 -1
  267. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +1 -1
  268. package/queries/catalog/static-slice-query/static-slice-query-format.js +13 -1
  269. package/queries/query.d.ts +26 -18
  270. package/queries/query.js +21 -1
  271. package/r-bridge/lang-4.x/ast/model/collect.d.ts +2 -1
  272. package/r-bridge/lang-4.x/ast/model/collect.js +4 -0
  273. package/r-bridge/lang-4.x/ast/model/nodes/r-project.d.ts +29 -0
  274. package/r-bridge/lang-4.x/ast/model/nodes/r-project.js +15 -0
  275. package/r-bridge/lang-4.x/ast/model/processing/decorate.d.ts +5 -7
  276. package/r-bridge/lang-4.x/ast/model/processing/decorate.js +24 -11
  277. package/r-bridge/lang-4.x/ast/model/type.d.ts +2 -0
  278. package/r-bridge/lang-4.x/ast/model/type.js +2 -0
  279. package/r-bridge/lang-4.x/ast/parser/json/format.js +1 -1
  280. package/r-bridge/lang-4.x/ast/parser/json/parser.d.ts +9 -8
  281. package/r-bridge/lang-4.x/ast/parser/json/parser.js +11 -10
  282. package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-root.d.ts +4 -3
  283. package/r-bridge/lang-4.x/ast/parser/main/internal/structure/normalize-root.js +20 -11
  284. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +3 -3
  285. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +5 -4
  286. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.d.ts +3 -2
  287. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +14 -5
  288. package/r-bridge/parser.d.ts +15 -5
  289. package/r-bridge/parser.js +27 -13
  290. package/r-bridge/retriever.d.ts +9 -15
  291. package/r-bridge/retriever.js +14 -5
  292. package/r-bridge/shell.d.ts +1 -1
  293. package/r-bridge/shell.js +1 -1
  294. package/reconstruct/auto-select/auto-select-defaults.d.ts +0 -1
  295. package/reconstruct/auto-select/magic-comments.js +1 -1
  296. package/reconstruct/reconstruct.d.ts +17 -9
  297. package/reconstruct/reconstruct.js +19 -8
  298. package/search/flowr-search.d.ts +12 -0
  299. package/search/search-executor/search-enrichers.d.ts +9 -2
  300. package/search/search-executor/search-enrichers.js +1 -3
  301. package/search/search-executor/search-generators.d.ts +1 -1
  302. package/search/search-executor/search-generators.js +9 -4
  303. package/slicing/criterion/collect-all.d.ts +3 -2
  304. package/slicing/criterion/collect-all.js +1 -1
  305. package/slicing/criterion/parse.js +4 -4
  306. package/statistics/features/supported/assignments/assignments.js +1 -1
  307. package/statistics/features/supported/control-flow/control-flow.js +1 -1
  308. package/statistics/features/supported/data-access/data-access.js +1 -1
  309. package/statistics/features/supported/defined-functions/defined-functions.js +1 -1
  310. package/statistics/features/supported/expression-list/statistics-expression-list.js +1 -1
  311. package/statistics/features/supported/loops/loops.js +1 -1
  312. package/statistics/features/supported/used-functions/used-functions.js +1 -1
  313. package/statistics/features/supported/variables/variables.js +1 -1
  314. package/statistics/statistics.js +3 -2
  315. package/util/assert.d.ts +4 -0
  316. package/util/assert.js +4 -0
  317. package/util/files.d.ts +1 -1
  318. package/util/files.js +1 -1
  319. package/util/mermaid/ast.d.ts +4 -3
  320. package/util/mermaid/ast.js +36 -8
  321. package/util/mermaid/cfg.js +1 -1
  322. package/util/version.js +1 -1
  323. package/documentation/print-analyzer-wiki.d.ts +0 -1
  324. package/documentation/print-analyzer-wiki.js +0 -141
  325. package/documentation/print-capabilities-markdown.d.ts +0 -1
  326. package/documentation/print-cfg-wiki.d.ts +0 -1
  327. package/documentation/print-core-wiki.d.ts +0 -5
  328. package/documentation/print-dataflow-graph-wiki.d.ts +0 -1
  329. package/documentation/print-engines-wiki.d.ts +0 -1
  330. package/documentation/print-faq-wiki.d.ts +0 -1
  331. package/documentation/print-faq-wiki.js +0 -18
  332. package/documentation/print-interface-wiki.d.ts +0 -1
  333. package/documentation/print-linter-issue.d.ts +0 -1
  334. package/documentation/print-linter-wiki.d.ts +0 -1
  335. package/documentation/print-linting-and-testing-wiki.d.ts +0 -1
  336. package/documentation/print-normalized-ast-wiki.d.ts +0 -1
  337. package/documentation/print-onboarding-wiki.d.ts +0 -1
  338. package/documentation/print-query-wiki.d.ts +0 -1
  339. package/documentation/print-readme.d.ts +0 -1
  340. package/documentation/print-search-wiki.d.ts +0 -1
  341. package/documentation/print-search-wiki.js +0 -74
  342. package/util/formats/adapter-format.d.ts +0 -6
  343. package/util/formats/adapter-format.js +0 -3
  344. package/util/formats/adapter.d.ts +0 -27
  345. package/util/formats/adapter.js +0 -58
  346. package/util/formats/adapters/r-adapter.d.ts +0 -4
  347. package/util/formats/adapters/r-adapter.js +0 -7
  348. package/util/formats/adapters/rmd-adapter.d.ts +0 -35
  349. package/util/formats/adapters/rmd-adapter.js +0 -100
@@ -0,0 +1,95 @@
1
+ import type { PathLike } from 'fs';
2
+ import type { GeneralDocContext } from './doc-context';
3
+ import type { RShell } from '../../r-bridge/shell';
4
+ import type { TreeSitterExecutor } from '../../r-bridge/lang-4.x/tree-sitter/tree-sitter-executor';
5
+ import type { AsyncOrSync } from 'ts-essentials';
6
+ export interface DocMakerArgs {
7
+ /** Overwrite existing wiki files, even if nothing changes */
8
+ readonly force?: boolean;
9
+ /**
10
+ * The general documentation context to use for generating links and headers
11
+ */
12
+ readonly ctx: GeneralDocContext;
13
+ /**
14
+ * The RShell engine to use for R code execution and retrieval
15
+ */
16
+ readonly shell: RShell;
17
+ /**
18
+ * The TreeSitter engine to use for R code parsing
19
+ */
20
+ readonly treeSitter: TreeSitterExecutor;
21
+ }
22
+ export interface DocMakerOutputArgs {
23
+ writeFileSync(path: PathLike, data: string): void;
24
+ readFileSync(path: PathLike): string | Buffer<ArrayBufferLike> | undefined;
25
+ }
26
+ export declare enum WikiChangeType {
27
+ Changed = 0,
28
+ UnimportantChange = 1,
29
+ Identical = 2
30
+ }
31
+ export interface DocMakerLike {
32
+ make(args: DocMakerArgs & DocMakerOutputArgs): Promise<boolean>;
33
+ getTarget(): string;
34
+ getProducer(): string;
35
+ getWrittenSubfiles(): Set<string>;
36
+ }
37
+ /**
38
+ * Abstract base class for generating wiki files.
39
+ * **Please make sure to register your WikiMaker implementation in the CLI wiki tool to have it executed:
40
+ * `src/cli/wiki.ts`.**
41
+ *
42
+ * If this wiki page produces multiple pages ("sub files"), you can use `writeSubFile` inside the `text` method
43
+ * to write those additional files.
44
+ */
45
+ export declare abstract class DocMaker implements DocMakerLike {
46
+ private readonly target;
47
+ private readonly filename;
48
+ private readonly purpose;
49
+ private readonly printHeader;
50
+ private currentArgs?;
51
+ private writtenSubfiles;
52
+ /**
53
+ * Creates a new WikiMaker instance.
54
+ * @param target - The target path where the wiki file will be generated.
55
+ * @param filename - The name of the file being generated. Probably use `module.filename`.
56
+ * @param purpose - The purpose of the file, e.g., 'wiki context for types'.
57
+ * @param printHeader - Whether to print the auto-generation header. Default is `true`. Only mark this `false` if you plan to add it yourself.
58
+ * @protected
59
+ */
60
+ protected constructor(target: PathLike, filename: string, purpose: string, printHeader?: boolean);
61
+ /**
62
+ * Gets the target path where the wiki file will be generated.
63
+ */
64
+ getTarget(): string;
65
+ /**
66
+ * Gets the name of the producer of this wiki file.
67
+ */
68
+ getProducer(): string;
69
+ /**
70
+ * Gets the set of subfiles written during the last `make` call.
71
+ */
72
+ getWrittenSubfiles(): Set<string>;
73
+ /**
74
+ * Generates or updates the wiki file at the given target location.
75
+ * @returns `true` if the file was created or updated, `false` if it was identical and not changed.
76
+ */
77
+ make(args: DocMakerArgs & DocMakerOutputArgs): Promise<boolean>;
78
+ /**
79
+ * Please note that for subfiles you have to always add your own header
80
+ */
81
+ protected writeSubFile(path: PathLike, data: string): boolean;
82
+ /**
83
+ * Normalizes the given wiki text for comparison.
84
+ */
85
+ protected normalizeText(text: string): string;
86
+ /**
87
+ * Determines the type of change between the old and new text.
88
+ */
89
+ protected didUpdate(path: PathLike, newText: string, oldText: string | undefined): WikiChangeType;
90
+ /**
91
+ * Generates the wiki text for the given arguments.
92
+ * The text will be automatically prefixed with metadata including filename and purpose.
93
+ */
94
+ protected abstract text(args: DocMakerArgs): AsyncOrSync<string>;
95
+ }
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DocMaker = exports.WikiChangeType = void 0;
4
+ var WikiChangeType;
5
+ (function (WikiChangeType) {
6
+ WikiChangeType[WikiChangeType["Changed"] = 0] = "Changed";
7
+ WikiChangeType[WikiChangeType["UnimportantChange"] = 1] = "UnimportantChange";
8
+ WikiChangeType[WikiChangeType["Identical"] = 2] = "Identical";
9
+ })(WikiChangeType || (exports.WikiChangeType = WikiChangeType = {}));
10
+ const DefaultReplacementPatterns = [
11
+ // eslint-disable-next-line no-irregular-whitespace -- we may produce it in output
12
+ [/[0-9]+(\.[0-9]+)?( |\s*)?ms/g, ''],
13
+ [/tmp[%A-Za-z0-9-]+/g, ''],
14
+ [/"(timing|searchTimeMs|processTimeMs|id|treeSitterId)":\s*[0-9]+(\.[0-9])?,?/g, ''],
15
+ [/"format":"compact".+/gmius, ''],
16
+ [/%%\s*\d*-+/g, ''],
17
+ [/"[rR]": "\d+\.\d+\.\d+.*?"/g, ''],
18
+ [/R\s*\d+\.\d+\.\d+/g, ''],
19
+ // async wrapper depends on whether the promise got forfilled already
20
+ [/%20async%20/g, ' ']
21
+ ];
22
+ /**
23
+ * Abstract base class for generating wiki files.
24
+ * **Please make sure to register your WikiMaker implementation in the CLI wiki tool to have it executed:
25
+ * `src/cli/wiki.ts`.**
26
+ *
27
+ * If this wiki page produces multiple pages ("sub files"), you can use `writeSubFile` inside the `text` method
28
+ * to write those additional files.
29
+ */
30
+ class DocMaker {
31
+ target;
32
+ filename;
33
+ purpose;
34
+ printHeader;
35
+ currentArgs;
36
+ writtenSubfiles = new Set();
37
+ /**
38
+ * Creates a new WikiMaker instance.
39
+ * @param target - The target path where the wiki file will be generated.
40
+ * @param filename - The name of the file being generated. Probably use `module.filename`.
41
+ * @param purpose - The purpose of the file, e.g., 'wiki context for types'.
42
+ * @param printHeader - Whether to print the auto-generation header. Default is `true`. Only mark this `false` if you plan to add it yourself.
43
+ * @protected
44
+ */
45
+ constructor(target, filename, purpose, printHeader = true) {
46
+ this.filename = filename;
47
+ this.purpose = purpose;
48
+ this.target = target;
49
+ this.printHeader = printHeader;
50
+ }
51
+ /**
52
+ * Gets the target path where the wiki file will be generated.
53
+ */
54
+ getTarget() {
55
+ return this.target.toString();
56
+ }
57
+ /**
58
+ * Gets the name of the producer of this wiki file.
59
+ */
60
+ getProducer() {
61
+ return this.filename;
62
+ }
63
+ /**
64
+ * Gets the set of subfiles written during the last `make` call.
65
+ */
66
+ getWrittenSubfiles() {
67
+ return this.writtenSubfiles;
68
+ }
69
+ /**
70
+ * Generates or updates the wiki file at the given target location.
71
+ * @returns `true` if the file was created or updated, `false` if it was identical and not changed.
72
+ */
73
+ async make(args) {
74
+ this.currentArgs = args;
75
+ this.writtenSubfiles = new Set();
76
+ const newText = (this.printHeader ? (await args.ctx.header(this.filename, this.purpose)) + '\n' : '') + await this.text(args);
77
+ if (args.force || this.didUpdate(this.target, newText, args.readFileSync(this.target)?.toString()) === WikiChangeType.Changed) {
78
+ args.writeFileSync(this.target, newText);
79
+ return true;
80
+ }
81
+ return this.writtenSubfiles.size > 0;
82
+ }
83
+ /**
84
+ * Please note that for subfiles you have to always add your own header
85
+ */
86
+ writeSubFile(path, data) {
87
+ if (!this.currentArgs) {
88
+ throw new Error('DocMaker: writeSubFile called outside of make()');
89
+ }
90
+ if (this.currentArgs.force || this.didUpdate(path, data, this.currentArgs.readFileSync(path)?.toString()) === WikiChangeType.Changed) {
91
+ this.currentArgs.writeFileSync(path.toString(), data);
92
+ this.writtenSubfiles.add(path.toString());
93
+ return true;
94
+ }
95
+ return false;
96
+ }
97
+ /**
98
+ * Normalizes the given wiki text for comparison.
99
+ */
100
+ normalizeText(text) {
101
+ // drop first two meta lines
102
+ let result = text.split('\n').slice(2).join('\n');
103
+ for (const [pattern, replacement] of DefaultReplacementPatterns) {
104
+ result = result.replace(pattern, replacement);
105
+ }
106
+ return result.trim();
107
+ }
108
+ /**
109
+ * Determines the type of change between the old and new text.
110
+ */
111
+ didUpdate(path, newText, oldText) {
112
+ if (oldText === newText) {
113
+ return WikiChangeType.Identical;
114
+ }
115
+ const normOld = this.normalizeText(oldText ?? '');
116
+ const normNew = this.normalizeText(newText);
117
+ const same = normOld === normNew;
118
+ if (!same) {
119
+ // find first diff
120
+ for (let i = 0; i < Math.min(normOld.length, normNew.length); i++) {
121
+ if (normOld[i] !== normNew[i]) {
122
+ const contextOld = normOld.slice(Math.max(0, i - 20), Math.min(normOld.length, i + 20));
123
+ const contextNew = normNew.slice(Math.max(0, i - 20), Math.min(normNew.length, i + 20));
124
+ console.log(` [${path.toString()}] First diff at pos ${i}:\n - Old: ...${contextOld}...\n + New: ...${contextNew}...`);
125
+ break;
126
+ }
127
+ }
128
+ }
129
+ return same ? WikiChangeType.UnimportantChange : WikiChangeType.Changed;
130
+ }
131
+ }
132
+ exports.DocMaker = DocMaker;
133
+ //# sourceMappingURL=doc-maker.js.map
@@ -0,0 +1,9 @@
1
+ import type { DocMakerArgs } from './wiki-mk/doc-maker';
2
+ import { DocMaker } from './wiki-mk/doc-maker';
3
+ /**
4
+ * https://github.com/flowr-analysis/flowr/wiki/Normalized-AST
5
+ */
6
+ export declare class WikiNormalizedAst extends DocMaker {
7
+ constructor();
8
+ protected text({ ctx, treeSitter }: DocMakerArgs): Promise<string>;
9
+ }
@@ -1,18 +1,11 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WikiNormalizedAst = void 0;
6
4
  const shell_1 = require("../r-bridge/shell");
7
- const log_1 = require("../../test/functionality/_helper/log");
8
- const doc_auto_gen_1 = require("./doc-util/doc-auto-gen");
9
5
  const doc_code_1 = require("./doc-util/doc-code");
10
6
  const doc_normalized_ast_1 = require("./doc-util/doc-normalized-ast");
11
- const doc_types_1 = require("./doc-util/doc-types");
12
- const path_1 = __importDefault(require("path"));
13
7
  const doc_files_1 = require("./doc-util/doc-files");
14
8
  const doc_cli_option_1 = require("./doc-util/doc-cli-option");
15
- const time_1 = require("../util/text/time");
16
9
  const doc_structure_1 = require("./doc-util/doc-structure");
17
10
  const pipeline_executor_1 = require("../core/pipeline-executor");
18
11
  const retriever_1 = require("../r-bridge/retriever");
@@ -21,17 +14,29 @@ const collect_1 = require("../r-bridge/lang-4.x/ast/model/collect");
21
14
  const normalized_ast_fold_1 = require("../abstract-interpretation/normalized-ast-fold");
22
15
  const default_pipelines_1 = require("../core/steps/pipeline/default-pipelines");
23
16
  const flowr_analyzer_1 = require("../project/flowr-analyzer");
24
- async function getText(shell) {
25
- const rversion = (await shell.usedRVersion())?.format() ?? 'unknown';
26
- const now = performance.now();
27
- const types = (0, doc_types_1.getTypesFromFolder)({
28
- rootFolder: path_1.default.resolve('./src'),
29
- typeNameForMermaid: 'RNode',
30
- inlineTypes: doc_types_1.mermaidHide
31
- });
32
- const elapsed = performance.now() - now;
33
- return `${(0, doc_auto_gen_1.autoGenHeader)({ filename: module.filename, purpose: 'normalized ast', rVersion: rversion })}
34
-
17
+ const flowr_analyzer_builder_1 = require("../project/flowr-analyzer-builder");
18
+ const flowr_file_1 = require("../project/context/flowr-file");
19
+ const doc_maker_1 = require("./wiki-mk/doc-maker");
20
+ async function quickNormalizedAstMultipleFiles() {
21
+ const analyzer = await new flowr_analyzer_builder_1.FlowrAnalyzerBuilder()
22
+ .setEngine('tree-sitter')
23
+ .build();
24
+ analyzer.addFile(new flowr_file_1.FlowrInlineTextFile('foo.R', 'x <- 12; source("a.R")'));
25
+ analyzer.addFile(new flowr_file_1.FlowrInlineTextFile('a.R', 'y <- x + 3'));
26
+ analyzer.addFile(new flowr_file_1.FlowrInlineTextFile('b.R', 'print(x, y)'));
27
+ analyzer.addRequest({ request: 'file', content: 'a.R' }, { request: 'file', content: 'b.R' }, { request: 'file', content: 'foo.R' });
28
+ const n = await analyzer.normalize();
29
+ return n;
30
+ }
31
+ /**
32
+ * https://github.com/flowr-analysis/flowr/wiki/Normalized-AST
33
+ */
34
+ class WikiNormalizedAst extends doc_maker_1.DocMaker {
35
+ constructor() {
36
+ super('wiki/Normalized AST.md', module.filename, 'normalized ast');
37
+ }
38
+ async text({ ctx, treeSitter }) {
39
+ return `
35
40
  _flowR_ produces a normalized version of R's abstract syntax tree (AST),
36
41
  offering the following benefits:
37
42
 
@@ -48,14 +53,15 @@ ${(0, doc_code_1.codeBlock)('r', 'x <- 2 * 3 + 1')}
48
53
  Each node in the AST contains the type, the id, and the lexeme (if applicable).
49
54
  Each edge is labeled with the type of the parent-child relationship (the "role").
50
55
 
51
- ${await (0, doc_normalized_ast_1.printNormalizedAstForCode)(shell, 'x <- 2 * 3 + 1', { showCode: false, prefix: 'flowchart LR\n' })}
56
+ ${await (0, doc_normalized_ast_1.printNormalizedAstForCode)(treeSitter, 'x <- 2 * 3 + 1', { showCode: false, prefix: 'flowchart LR\n' })}
52
57
 
53
58
  > [!TIP]
54
59
  > If you want to investigate the normalized AST,
55
60
  > you can either use the [Visual Studio Code extension](${doc_files_1.FlowrGithubBaseRef}/vscode-flowr) or the ${(0, doc_cli_option_1.getReplCommand)('normalize*')}
56
61
  > command in the REPL (see the [Interface wiki page](${doc_files_1.FlowrWikiBaseRef}/Interface) for more information).
57
62
 
58
- Indicative of the normalization is the root expression list node, which is present in every normalized AST.
63
+ Indicative of the normalization is the root ${ctx.link('RProject')} node, which is present in every normalized AST
64
+ and provides the ${ctx.link('RExpressionList')} nodes for each file in the project.
59
65
  In general, we provide node types for:
60
66
 
61
67
  1. literals (e.g., numbers and strings)
@@ -71,19 +77,18 @@ In general, we provide node types for:
71
77
  Every node is a link, which directly refers to the implementation in the source code.
72
78
  Grayed-out parts are used for structuring the AST, grouping together related nodes.
73
79
 
74
- ${(0, doc_code_1.codeBlock)('mermaid', types.mermaid)}
80
+ ${(0, doc_code_1.codeBlock)('mermaid', ctx.mermaid('RNode'))}
75
81
 
76
- _The generation of the class diagram required ${(0, time_1.printAsMs)(elapsed)}._
77
82
  </details>
78
83
 
79
- Node types are controlled by the ${(0, doc_types_1.shortLink)('RType', types.info)} enum (see ${(0, doc_files_1.getFilePathMd)('../r-bridge/lang-4.x/ast/model/type.ts')}),
84
+ Node types are controlled by the ${ctx.link('RType')} enum (see ${(0, doc_files_1.getFilePathMd)('../r-bridge/lang-4.x/ast/model/type.ts')}),
80
85
  which is used to distinguish between different types of nodes.
81
86
  Additionally, every AST node is generic with respect to the \`Info\` type which allows for arbitrary decorations (e.g., parent inforamtion or dataflow constraints).
82
87
  Most notably, the \`info\` field holds the \`id\` of the node, which is used to reference the node in the [dataflow graph](${doc_files_1.FlowrWikiBaseRef}/Dataflow%20Graph).
83
88
 
84
89
  In summary, we have the following types:
85
90
 
86
- ${(0, doc_structure_1.details)('Normalized AST Node Types', (0, doc_types_1.printHierarchy)({ program: types.program, info: types.info, root: 'RNode', collapseFromNesting: Number.MAX_VALUE }))}
91
+ ${(0, doc_structure_1.details)('Normalized AST Node Types', ctx.hierarchy('RNode', { collapseFromNesting: Number.MAX_VALUE }))}
87
92
 
88
93
  The following segments intend to give you an overview of how to work with the normalized AST:
89
94
 
@@ -93,7 +98,7 @@ The following segments intend to give you an overview of how to work with the no
93
98
  ## How to Get a Normalized AST
94
99
 
95
100
  As explained alongside the [Interface](${doc_files_1.FlowrWikiBaseRef}/Interface#creating-flowr-analyses) wiki page, you can use an instance of
96
- ${(0, doc_types_1.shortLink)(flowr_analyzer_1.FlowrAnalyzer.name, types.info)} to get the ${(0, doc_types_1.shortLink)('NormalizedAst', types.info)}:
101
+ ${ctx.link(flowr_analyzer_1.FlowrAnalyzer)} to get the ${ctx.link('NormalizedAst')}:
97
102
 
98
103
  ${(0, doc_code_1.codeBlock)('ts', `
99
104
  async function getAst(code: string): Promise<RNode> {
@@ -104,17 +109,37 @@ async function getAst(code: string): Promise<RNode> {
104
109
 
105
110
  From the REPL, you can use the ${(0, doc_cli_option_1.getReplCommand)('normalize')} command.
106
111
 
112
+ ### Multi-File Projects
113
+
114
+ With the ${ctx.link(flowr_analyzer_1.FlowrAnalyzer)}, you can analyze multiple files at once:
115
+
116
+ ${ctx.code(quickNormalizedAstMultipleFiles, { dropLinesStart: 1, dropLinesEnd: 2, hideDefinedAt: true })}
117
+
118
+ Visualizing the resulting AST yields the following.
119
+
120
+ <details>
121
+
122
+ <summary style="color:gray">Mermaid Diagram</summary>
123
+
124
+ ${(0, doc_normalized_ast_1.printNormalizedAst)((await quickNormalizedAstMultipleFiles()).ast, 'flowchart LR\n')}
125
+
126
+ </details>
127
+
128
+
107
129
  ## Traversing the Normalized AST
108
130
 
109
131
  We provide two ways to traverse the normalized AST: [Visitors](#visitors) and [Folds](#folds).
132
+ Please note, that they usually operate on the ${ctx.link('RExpressionList')} level, and it is up to
133
+ you to decide how you want to traverse multiple files with a ${ctx.link('RProject')} in the AST (you can, for example, simplify flat-map over the files).
134
+ The ${ctx.link('RProject')} node cannot appear nested within other nodes, so you can safely assume that any child of a node is not an ${ctx.link('RProject')}.
110
135
 
111
136
  ### Visitors
112
137
 
113
- If you want a simple visitor which traverses the AST, the ${(0, doc_types_1.shortLink)(visitor_1.visitAst.name, types.info)} function is a good starting point.
138
+ If you want a simple visitor which traverses the AST, the ${ctx.link(visitor_1.visitAst)} function is a good starting point.
114
139
  You may specify functions to be called whenever you enter and exit a node during the traversal, and any
115
140
  computation is to be done by side effects.
116
141
  For example, if you want to collect all the \`id\`s present within a normalized (sub-)AST,
117
- as it is done by the ${(0, doc_types_1.shortLink)(collect_1.collectAllIds.name, types.info)} function, you can use the following visitor:
142
+ as it is done by the ${ctx.link(collect_1.collectAllIds)} function, you can use the following visitor:
118
143
 
119
144
  ${(0, doc_code_1.codeBlock)('ts', `
120
145
  const ids = new Set<NodeId>();
@@ -126,12 +151,12 @@ return ids;
126
151
 
127
152
  ### Folds
128
153
 
129
- We formulate a fold with the base class ${(0, doc_types_1.shortLink)(normalized_ast_fold_1.DefaultNormalizedAstFold.name, types.info)} in ${(0, doc_files_1.getFilePathMd)('../abstract-interpretation/normalized-ast-fold.ts')}.
154
+ We formulate a fold with the base class ${ctx.link(normalized_ast_fold_1.DefaultNormalizedAstFold)} in ${(0, doc_files_1.getFilePathMd)('../abstract-interpretation/normalized-ast-fold.ts')}.
130
155
  Using this class, you can create your own fold behavior by overwriting the default methods.
131
156
  By default, the class provides a monoid abstraction using the _empty_ from the constructor and the _concat_ method.
132
157
 
133
158
 
134
- ${(0, doc_types_1.printHierarchy)({ program: types.program, info: types.info, root: 'DefaultNormalizedAstFold' })}
159
+ ${ctx.hierarchy(normalized_ast_fold_1.DefaultNormalizedAstFold)}
135
160
 
136
161
  Now, of course, we could provide hundreds of examples here, but we use tests to verify that the fold behaves as expected
137
162
  and happily point to them at ${(0, doc_files_1.getFilePathMd)('../../test/functionality/r-bridge/normalize-ast-fold.test.ts')}.
@@ -168,7 +193,7 @@ class MyMathFold<Info> extends ${normalized_ast_fold_1.DefaultNormalizedAstFold.
168
193
  }
169
194
  `)}
170
195
 
171
- Now, we can use the ${(0, doc_types_1.shortLink)(pipeline_executor_1.PipelineExecutor.name, types.info)} to get the normalized AST and apply the fold:
196
+ Now, we can use the ${ctx.link(pipeline_executor_1.PipelineExecutor)} to get the normalized AST and apply the fold:
172
197
 
173
198
  ${(0, doc_code_1.codeBlock)('ts', `
174
199
  const shell = new ${shell_1.RShell.name}();
@@ -181,23 +206,15 @@ console.log(result); // -> 7
181
206
  `)}
182
207
 
183
208
  ${(0, doc_structure_1.block)({
184
- type: 'NOTE',
185
- content: `
209
+ type: 'NOTE',
210
+ content: `
186
211
  If you want to retrieve the normalized AST with the [Tree-Sitter Engine](${doc_files_1.FlowrWikiBaseRef}/Engines),
187
- you may use the ${(0, doc_types_1.shortLink)('TREE_SITTER_NORMALIZE_PIPELINE', types.info)} or directly rely on one of the
188
- helper functions like ${(0, doc_types_1.shortLink)(default_pipelines_1.createNormalizePipeline.name, types.info)}.
212
+ you may use the ${ctx.link('TREE_SITTER_NORMALIZE_PIPELINE')} or directly rely on one of the
213
+ helper functions like ${ctx.link(default_pipelines_1.createNormalizePipeline)}.
189
214
  `
190
- })}
215
+ })}
191
216
  `;
217
+ }
192
218
  }
193
- /** if we run this script, we want a Markdown representation of the capabilities */
194
- if (require.main === module) {
195
- (0, log_1.setMinLevelOfAllLogs)(6 /* LogLevel.Fatal */);
196
- const shell = new shell_1.RShell();
197
- void getText(shell).then(str => {
198
- console.log(str);
199
- }).finally(() => {
200
- shell.close();
201
- });
202
- }
203
- //# sourceMappingURL=print-normalized-ast-wiki.js.map
219
+ exports.WikiNormalizedAst = WikiNormalizedAst;
220
+ //# sourceMappingURL=wiki-normalized-ast.js.map
@@ -0,0 +1,8 @@
1
+ import { DocMaker } from './wiki-mk/doc-maker';
2
+ /**
3
+ * https://github.com/flowr-analysis/flowr/wiki/Onboarding
4
+ */
5
+ export declare class WikiOnboarding extends DocMaker {
6
+ constructor();
7
+ text(): string;
8
+ }
@@ -1,21 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const log_1 = require("../../test/functionality/_helper/log");
3
+ exports.WikiOnboarding = void 0;
4
4
  const doc_files_1 = require("./doc-util/doc-files");
5
5
  const doc_code_1 = require("./doc-util/doc-code");
6
- const doc_auto_gen_1 = require("./doc-util/doc-auto-gen");
7
- function print() {
8
- return `${(0, doc_auto_gen_1.autoGenHeader)({ filename: module.filename, purpose: 'developer onboarding process' })}
9
-
10
- To get started developing on *flowR*, we recommend carefully reading the following pages:
11
- - 💻 [Setting up the *flowR* development environment](${doc_files_1.FlowrWikiBaseRef}/Setup#%EF%B8%8F-building-from-scratch).\
6
+ const doc_maker_1 = require("./wiki-mk/doc-maker");
7
+ /**
8
+ * https://github.com/flowr-analysis/flowr/wiki/Onboarding
9
+ */
10
+ class WikiOnboarding extends doc_maker_1.DocMaker {
11
+ constructor() {
12
+ super('wiki/Onboarding.md', module.filename, 'developer onboarding process');
13
+ }
14
+ text() {
15
+ return `To get started developing on *flowR*, we recommend carefully reading the following pages:
16
+ - 💻 [Setting up the *flowR* development environment](${doc_files_1.FlowrWikiBaseRef}/Setup#%EF%B8%8F-building-from-scratch).\\
12
17
  This page explains how to install **R** and **Node.js**.
13
- - 💖 [Contributing guidelines](${doc_files_1.FlowrGithubBaseRef}/flowr/tree/main/.github/CONTRIBUTING.md).\
18
+ - 💖 [Contributing guidelines](${doc_files_1.FlowrGithubBaseRef}/flowr/tree/main/.github/CONTRIBUTING.md).\\
14
19
  This page also includes information about how to set up **git-lfs** and several **git hooks**.
15
20
 
16
21
  If you have any questions, please check out the [FAQ](${doc_files_1.FlowrWikiBaseRef}/FAQ) first, but if the question
17
- is not answered there (or in the wiki in general), feel free to ask a question.
18
-
22
+ is not answered there (or in the wiki in general), feel free to ask a question.
23
+ The [FAQ](${doc_files_1.FlowrWikiBaseRef}/FAQ) also includes information about how you can configure your editor.
19
24
 
20
25
  ## ⌛ TL;DR
21
26
 
@@ -38,9 +43,7 @@ git config --local core.hooksPath .githooks/
38
43
  git push --dry-run
39
44
  `)}
40
45
  `.trim();
46
+ }
41
47
  }
42
- if (require.main === module) {
43
- (0, log_1.setMinLevelOfAllLogs)(6 /* LogLevel.Fatal */);
44
- console.log(print());
45
- }
46
- //# sourceMappingURL=print-onboarding-wiki.js.map
48
+ exports.WikiOnboarding = WikiOnboarding;
49
+ //# sourceMappingURL=wiki-onboarding.js.map
@@ -0,0 +1,9 @@
1
+ import type { DocMakerArgs } from './wiki-mk/doc-maker';
2
+ import { DocMaker } from './wiki-mk/doc-maker';
3
+ /**
4
+ * https://github.com/flowr-analysis/flowr/wiki/Query-API
5
+ */
6
+ export declare class WikiQuery extends DocMaker {
7
+ constructor();
8
+ protected text({ ctx, shell }: DocMakerArgs): Promise<string>;
9
+ }