repoburg 1.3.87 → 1.3.91

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 (568) hide show
  1. package/backend/.env +20 -0
  2. package/backend/.repoburg/hooks/README.md +53 -0
  3. package/backend/.repoburg/hooks/eslint-hook.ts +46 -0
  4. package/backend/.repoburg/hooks/example-hook.ts +62 -0
  5. package/backend/dist/src/ai-actions/ai-actions.controller.js +67 -0
  6. package/backend/dist/src/ai-actions/ai-actions.controller.js.map +1 -1
  7. package/backend/dist/src/app.module.d.ts +3 -1
  8. package/backend/dist/src/app.module.js +17 -1
  9. package/backend/dist/src/app.module.js.map +1 -1
  10. package/backend/dist/src/application-state/application-state.controller.js +123 -0
  11. package/backend/dist/src/application-state/application-state.controller.js.map +1 -1
  12. package/backend/dist/src/application-state/application-state.service.d.ts +3 -0
  13. package/backend/dist/src/application-state/application-state.service.js +18 -1
  14. package/backend/dist/src/application-state/application-state.service.js.map +1 -1
  15. package/backend/dist/src/application-state/dto/set-alibaba-config.dto.js +2 -0
  16. package/backend/dist/src/application-state/dto/set-alibaba-config.dto.js.map +1 -1
  17. package/backend/dist/src/application-state/dto/set-auto-context-fetch-enabled.dto.js +4 -0
  18. package/backend/dist/src/application-state/dto/set-auto-context-fetch-enabled.dto.js.map +1 -1
  19. package/backend/dist/src/application-state/dto/set-auto-send-to-ai-studio-enabled.dto.js +2 -0
  20. package/backend/dist/src/application-state/dto/set-auto-send-to-ai-studio-enabled.dto.js.map +1 -1
  21. package/backend/dist/src/application-state/dto/set-context-token-limit.dto.js +6 -0
  22. package/backend/dist/src/application-state/dto/set-context-token-limit.dto.js.map +1 -1
  23. package/backend/dist/src/application-state/dto/set-execution-strategy.dto.js +6 -0
  24. package/backend/dist/src/application-state/dto/set-execution-strategy.dto.js.map +1 -1
  25. package/backend/dist/src/application-state/dto/set-followup-token-limit.dto.js +5 -0
  26. package/backend/dist/src/application-state/dto/set-followup-token-limit.dto.js.map +1 -1
  27. package/backend/dist/src/application-state/dto/set-history-compression-enabled.dto.js +4 -0
  28. package/backend/dist/src/application-state/dto/set-history-compression-enabled.dto.js.map +1 -1
  29. package/backend/dist/src/application-state/dto/set-llm-retry-enabled.dto.js +4 -0
  30. package/backend/dist/src/application-state/dto/set-llm-retry-enabled.dto.js.map +1 -1
  31. package/backend/dist/src/application-state/dto/set-llm-retry-max-attempts.dto.js +6 -0
  32. package/backend/dist/src/application-state/dto/set-llm-retry-max-attempts.dto.js.map +1 -1
  33. package/backend/dist/src/application-state/dto/set-manual-llm-enabled.dto.js +4 -0
  34. package/backend/dist/src/application-state/dto/set-manual-llm-enabled.dto.js.map +1 -1
  35. package/backend/dist/src/application-state/dto/set-openrouter-config.dto.js +2 -0
  36. package/backend/dist/src/application-state/dto/set-openrouter-config.dto.js.map +1 -1
  37. package/backend/dist/src/application-state/dto/set-streaming-enabled.dto.js +2 -0
  38. package/backend/dist/src/application-state/dto/set-streaming-enabled.dto.js.map +1 -1
  39. package/backend/dist/src/application-state/dto/set-syntax-validation-enabled.dto.js +4 -0
  40. package/backend/dist/src/application-state/dto/set-syntax-validation-enabled.dto.js.map +1 -1
  41. package/backend/dist/src/application-state/dto/set-theme.dto.js +6 -0
  42. package/backend/dist/src/application-state/dto/set-theme.dto.js.map +1 -1
  43. package/backend/dist/src/application-state/dto/set-tools-enabled.dto.js +4 -0
  44. package/backend/dist/src/application-state/dto/set-tools-enabled.dto.js.map +1 -1
  45. package/backend/dist/src/application-state/dto/set-websocket-enabled.dto.js +2 -0
  46. package/backend/dist/src/application-state/dto/set-websocket-enabled.dto.js.map +1 -1
  47. package/backend/dist/src/application-state/dto/set-yolo-mode-message.dto.js +5 -0
  48. package/backend/dist/src/application-state/dto/set-yolo-mode-message.dto.js.map +1 -1
  49. package/backend/dist/src/application-state/dto/set-yolo-mode.dto.js +4 -0
  50. package/backend/dist/src/application-state/dto/set-yolo-mode.dto.js.map +1 -1
  51. package/backend/dist/src/application-state/dto/set-zai-config.dto.js +2 -0
  52. package/backend/dist/src/application-state/dto/set-zai-config.dto.js.map +1 -1
  53. package/backend/dist/src/common/cache/etag-cache.service.d.ts +18 -0
  54. package/backend/dist/src/common/cache/etag-cache.service.js +98 -0
  55. package/backend/dist/src/common/cache/etag-cache.service.js.map +1 -0
  56. package/backend/dist/src/common/common.module.d.ts +2 -0
  57. package/backend/dist/src/common/common.module.js +22 -0
  58. package/backend/dist/src/common/common.module.js.map +1 -0
  59. package/backend/dist/src/common/interceptors/etag-cache.interceptor.d.ts +14 -0
  60. package/backend/dist/src/common/interceptors/etag-cache.interceptor.js +69 -0
  61. package/backend/dist/src/common/interceptors/etag-cache.interceptor.js.map +1 -0
  62. package/backend/dist/src/common/middleware/cache.middleware.d.ts +8 -0
  63. package/backend/dist/src/common/middleware/cache.middleware.js +44 -0
  64. package/backend/dist/src/common/middleware/cache.middleware.js.map +1 -0
  65. package/backend/dist/src/context-snippets/context-snippets.controller.js +38 -0
  66. package/backend/dist/src/context-snippets/context-snippets.controller.js.map +1 -1
  67. package/backend/dist/src/context-templates/context-templates.controller.js +104 -0
  68. package/backend/dist/src/context-templates/context-templates.controller.js.map +1 -1
  69. package/backend/dist/src/context-templates/dto/context-template.dto.d.ts +1 -1
  70. package/backend/dist/src/context-templates/dto/context-template.dto.js +44 -1
  71. package/backend/dist/src/context-templates/dto/context-template.dto.js.map +1 -1
  72. package/backend/dist/src/core-entities/ai-action.entity.js +73 -0
  73. package/backend/dist/src/core-entities/ai-action.entity.js.map +1 -1
  74. package/backend/dist/src/core-entities/base.entity.js +18 -0
  75. package/backend/dist/src/core-entities/base.entity.js.map +1 -1
  76. package/backend/dist/src/core-entities/context-snippet.entity.js +12 -0
  77. package/backend/dist/src/core-entities/context-snippet.entity.js.map +1 -1
  78. package/backend/dist/src/core-entities/context-template.entity.d.ts +2 -4
  79. package/backend/dist/src/core-entities/context-template.entity.js +50 -7
  80. package/backend/dist/src/core-entities/context-template.entity.js.map +1 -1
  81. package/backend/dist/src/core-entities/custom-snippet.entity.js +16 -0
  82. package/backend/dist/src/core-entities/custom-snippet.entity.js.map +1 -1
  83. package/backend/dist/src/core-entities/custom-variable.entity.js +24 -0
  84. package/backend/dist/src/core-entities/custom-variable.entity.js.map +1 -1
  85. package/backend/dist/src/core-entities/enums.d.ts +64 -0
  86. package/backend/dist/src/core-entities/enums.js +77 -0
  87. package/backend/dist/src/core-entities/enums.js.map +1 -0
  88. package/backend/dist/src/core-entities/execution-log.entity.js +15 -0
  89. package/backend/dist/src/core-entities/execution-log.entity.js.map +1 -1
  90. package/backend/dist/src/core-entities/index.d.ts +1 -2
  91. package/backend/dist/src/core-entities/index.js +1 -2
  92. package/backend/dist/src/core-entities/index.js.map +1 -1
  93. package/backend/dist/src/core-entities/llm-call-log.entity.js +43 -0
  94. package/backend/dist/src/core-entities/llm-call-log.entity.js.map +1 -1
  95. package/backend/dist/src/core-entities/mcp-config.entity.js +27 -0
  96. package/backend/dist/src/core-entities/mcp-config.entity.js.map +1 -1
  97. package/backend/dist/src/core-entities/mcp-tool.entity.js +26 -0
  98. package/backend/dist/src/core-entities/mcp-tool.entity.js.map +1 -1
  99. package/backend/dist/src/core-entities/project.entity.js +13 -0
  100. package/backend/dist/src/core-entities/project.entity.js.map +1 -1
  101. package/backend/dist/src/core-entities/session-input.entity.js +95 -0
  102. package/backend/dist/src/core-entities/session-input.entity.js.map +1 -1
  103. package/backend/dist/src/core-entities/session.entity.d.ts +1 -1
  104. package/backend/dist/src/core-entities/session.entity.js +96 -1
  105. package/backend/dist/src/core-entities/session.entity.js.map +1 -1
  106. package/backend/dist/src/core-entities/system-prompt.entity.js +29 -0
  107. package/backend/dist/src/core-entities/system-prompt.entity.js.map +1 -1
  108. package/backend/dist/src/core-entities/tool-hook.entity.js +21 -0
  109. package/backend/dist/src/core-entities/tool-hook.entity.js.map +1 -1
  110. package/backend/dist/src/custom-snippets/custom-snippets.controller.js +48 -0
  111. package/backend/dist/src/custom-snippets/custom-snippets.controller.js.map +1 -1
  112. package/backend/dist/src/custom-variables/custom-variables.controller.js +46 -0
  113. package/backend/dist/src/custom-variables/custom-variables.controller.js.map +1 -1
  114. package/backend/dist/src/global-config/global-config.controller.js +12 -0
  115. package/backend/dist/src/global-config/global-config.controller.js.map +1 -1
  116. package/backend/dist/src/global-config/global-config.service.d.ts +1 -0
  117. package/backend/dist/src/global-config/global-config.service.js.map +1 -1
  118. package/backend/dist/src/interactive-chat/streaming.controller.js +38 -0
  119. package/backend/dist/src/interactive-chat/streaming.controller.js.map +1 -1
  120. package/backend/dist/src/llm-call-logs/llm-call-logs.controller.js +96 -0
  121. package/backend/dist/src/llm-call-logs/llm-call-logs.controller.js.map +1 -1
  122. package/backend/dist/src/llm-provider/llm-provider.controller.js +18 -0
  123. package/backend/dist/src/llm-provider/llm-provider.controller.js.map +1 -1
  124. package/backend/dist/src/llm-provider/zai-llm.provider.js +1 -1
  125. package/backend/dist/src/llm-provider/zai-llm.provider.js.map +1 -1
  126. package/backend/dist/src/llm-responses/dto/submit-llm-response.dto.js +45 -0
  127. package/backend/dist/src/llm-responses/dto/submit-llm-response.dto.js.map +1 -1
  128. package/backend/dist/src/llm-responses/dto/sync-conversation.dto.js +24 -0
  129. package/backend/dist/src/llm-responses/dto/sync-conversation.dto.js.map +1 -1
  130. package/backend/dist/src/llm-responses/llm-responses.controller.js +32 -0
  131. package/backend/dist/src/llm-responses/llm-responses.controller.js.map +1 -1
  132. package/backend/dist/src/main.js +9 -0
  133. package/backend/dist/src/main.js.map +1 -1
  134. package/backend/dist/src/mcp/dto/batch-update-mcp-tools.dto.js +8 -0
  135. package/backend/dist/src/mcp/dto/batch-update-mcp-tools.dto.js.map +1 -1
  136. package/backend/dist/src/mcp/dto/create-mcp-config.dto.js +5 -0
  137. package/backend/dist/src/mcp/dto/create-mcp-config.dto.js.map +1 -1
  138. package/backend/dist/src/mcp/dto/update-mcp-config.dto.js +2 -0
  139. package/backend/dist/src/mcp/dto/update-mcp-config.dto.js.map +1 -1
  140. package/backend/dist/src/mcp/mcp.controller.js +21 -0
  141. package/backend/dist/src/mcp/mcp.controller.js.map +1 -1
  142. package/backend/dist/src/projects/dto/project.dto.js +14 -0
  143. package/backend/dist/src/projects/dto/project.dto.js.map +1 -1
  144. package/backend/dist/src/projects/projects.controller.js +31 -0
  145. package/backend/dist/src/projects/projects.controller.js.map +1 -1
  146. package/backend/dist/src/session-inputs/dto/session-input.dto.d.ts +12 -1
  147. package/backend/dist/src/session-inputs/dto/session-input.dto.js +103 -1
  148. package/backend/dist/src/session-inputs/dto/session-input.dto.js.map +1 -1
  149. package/backend/dist/src/session-inputs/session-input.subscriber.js.map +1 -1
  150. package/backend/dist/src/session-inputs/session-inputs.controller.d.ts +2 -1
  151. package/backend/dist/src/session-inputs/session-inputs.controller.js +84 -0
  152. package/backend/dist/src/session-inputs/session-inputs.controller.js.map +1 -1
  153. package/backend/dist/src/session-inputs/session-inputs.module.js +1 -0
  154. package/backend/dist/src/session-inputs/session-inputs.module.js.map +1 -1
  155. package/backend/dist/src/session-inputs/session-inputs.service.d.ts +7 -3
  156. package/backend/dist/src/session-inputs/session-inputs.service.js +51 -4
  157. package/backend/dist/src/session-inputs/session-inputs.service.js.map +1 -1
  158. package/backend/dist/src/sessions/dto/session.dto.js +91 -0
  159. package/backend/dist/src/sessions/dto/session.dto.js.map +1 -1
  160. package/backend/dist/src/sessions/sessions.controller.d.ts +1 -1
  161. package/backend/dist/src/sessions/sessions.controller.js +123 -3
  162. package/backend/dist/src/sessions/sessions.controller.js.map +1 -1
  163. package/backend/dist/src/sessions/sessions.service.d.ts +2 -1
  164. package/backend/dist/src/sessions/sessions.service.js +47 -18
  165. package/backend/dist/src/sessions/sessions.service.js.map +1 -1
  166. package/backend/dist/src/sub-agents/dto/create-sub-agent.dto.js +26 -0
  167. package/backend/dist/src/sub-agents/dto/create-sub-agent.dto.js.map +1 -1
  168. package/backend/dist/src/sub-agents/dto/update-sub-agent.dto.js +22 -0
  169. package/backend/dist/src/sub-agents/dto/update-sub-agent.dto.js.map +1 -1
  170. package/backend/dist/src/sub-agents/sub-agent-run.entity.d.ts +2 -7
  171. package/backend/dist/src/sub-agents/sub-agent-run.entity.js +63 -9
  172. package/backend/dist/src/sub-agents/sub-agent-run.entity.js.map +1 -1
  173. package/backend/dist/src/sub-agents/sub-agent-runs.controller.js +63 -0
  174. package/backend/dist/src/sub-agents/sub-agent-runs.controller.js.map +1 -1
  175. package/backend/dist/src/sub-agents/sub-agent.entity.js +47 -0
  176. package/backend/dist/src/sub-agents/sub-agent.entity.js.map +1 -1
  177. package/backend/dist/src/sub-agents/sub-agents.controller.js +25 -0
  178. package/backend/dist/src/sub-agents/sub-agents.controller.js.map +1 -1
  179. package/backend/dist/src/system-prompts/dto/set-enabled-tools.dto.js +9 -0
  180. package/backend/dist/src/system-prompts/dto/set-enabled-tools.dto.js.map +1 -1
  181. package/backend/dist/src/system-prompts/dto/system-prompt.dto.js +43 -0
  182. package/backend/dist/src/system-prompts/dto/system-prompt.dto.js.map +1 -1
  183. package/backend/dist/src/system-prompts/dto/toggle-tool.dto.js +5 -0
  184. package/backend/dist/src/system-prompts/dto/toggle-tool.dto.js.map +1 -1
  185. package/backend/dist/src/system-prompts/system-prompts.controller.js +80 -0
  186. package/backend/dist/src/system-prompts/system-prompts.controller.js.map +1 -1
  187. package/backend/dist/src/tool-hooks/dto/create-tool-hook.dto.js +14 -0
  188. package/backend/dist/src/tool-hooks/dto/create-tool-hook.dto.js.map +1 -1
  189. package/backend/dist/src/tool-hooks/dto/update-tool-hook.dto.js +11 -0
  190. package/backend/dist/src/tool-hooks/dto/update-tool-hook.dto.js.map +1 -1
  191. package/backend/dist/src/tool-hooks/tool-hooks.controller.js +52 -0
  192. package/backend/dist/src/tool-hooks/tool-hooks.controller.js.map +1 -1
  193. package/backend/dist/src/visual-editor/visual-editor.controller.js +15 -0
  194. package/backend/dist/src/visual-editor/visual-editor.controller.js.map +1 -1
  195. package/backend/dist/src/workspace/workspace.controller.js +41 -0
  196. package/backend/dist/src/workspace/workspace.controller.js.map +1 -1
  197. package/backend/dist/tsconfig.build.tsbuildinfo +1 -1
  198. package/{daemon/node_modules/undici-types → backend/node_modules/@eslint/eslintrc}/LICENSE +5 -7
  199. package/backend/node_modules/@eslint/eslintrc/README.md +115 -0
  200. package/backend/node_modules/@eslint/eslintrc/conf/config-schema.js +79 -0
  201. package/backend/node_modules/@eslint/eslintrc/conf/environments.js +215 -0
  202. package/backend/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs +1104 -0
  203. package/backend/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map +1 -0
  204. package/backend/node_modules/@eslint/eslintrc/dist/eslintrc.cjs +4344 -0
  205. package/backend/node_modules/@eslint/eslintrc/dist/eslintrc.cjs.map +1 -0
  206. package/backend/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js +532 -0
  207. package/backend/node_modules/@eslint/eslintrc/lib/config-array/config-array.js +523 -0
  208. package/backend/node_modules/@eslint/eslintrc/lib/config-array/config-dependency.js +124 -0
  209. package/backend/node_modules/@eslint/eslintrc/lib/config-array/extracted-config.js +145 -0
  210. package/backend/node_modules/@eslint/eslintrc/lib/config-array/ignore-pattern.js +238 -0
  211. package/backend/node_modules/@eslint/eslintrc/lib/config-array/index.js +19 -0
  212. package/backend/node_modules/@eslint/eslintrc/lib/config-array/override-tester.js +225 -0
  213. package/backend/node_modules/@eslint/eslintrc/lib/config-array-factory.js +1151 -0
  214. package/backend/node_modules/@eslint/eslintrc/lib/flat-compat.js +318 -0
  215. package/backend/node_modules/@eslint/eslintrc/lib/index-universal.js +29 -0
  216. package/backend/node_modules/@eslint/eslintrc/lib/index.js +56 -0
  217. package/backend/node_modules/@eslint/eslintrc/lib/shared/ajv.js +191 -0
  218. package/backend/node_modules/@eslint/eslintrc/lib/shared/config-ops.js +135 -0
  219. package/backend/node_modules/@eslint/eslintrc/lib/shared/config-validator.js +325 -0
  220. package/backend/node_modules/@eslint/eslintrc/lib/shared/deprecation-warnings.js +63 -0
  221. package/backend/node_modules/@eslint/eslintrc/lib/shared/naming.js +96 -0
  222. package/backend/node_modules/@eslint/eslintrc/lib/shared/relative-module-resolver.js +42 -0
  223. package/backend/node_modules/@eslint/eslintrc/lib/shared/types.js +149 -0
  224. package/backend/node_modules/@eslint/eslintrc/package.json +82 -0
  225. package/backend/node_modules/@eslint/eslintrc/universal.js +9 -0
  226. package/backend/package.json +2 -4
  227. package/daemon/dist/api/system.js +25 -0
  228. package/daemon/dist/daemon.blob +0 -0
  229. package/daemon/dist/index.js +0 -0
  230. package/package.json +3 -1
  231. package/visual-editor-proxy/.repoburg/data.sqlite +0 -0
  232. package/visual-editor-proxy/dist/tsconfig.tsbuildinfo +1 -1
  233. package/backend/node_modules/@types/node/LICENSE +0 -21
  234. package/backend/node_modules/@types/node/README.md +0 -15
  235. package/backend/node_modules/@types/node/assert/strict.d.ts +0 -8
  236. package/backend/node_modules/@types/node/assert.d.ts +0 -1044
  237. package/backend/node_modules/@types/node/async_hooks.d.ts +0 -605
  238. package/backend/node_modules/@types/node/buffer.buffer.d.ts +0 -462
  239. package/backend/node_modules/@types/node/buffer.d.ts +0 -1932
  240. package/backend/node_modules/@types/node/child_process.d.ts +0 -1452
  241. package/backend/node_modules/@types/node/cluster.d.ts +0 -578
  242. package/backend/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
  243. package/backend/node_modules/@types/node/compatibility/index.d.ts +0 -9
  244. package/backend/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
  245. package/backend/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  246. package/backend/node_modules/@types/node/console.d.ts +0 -452
  247. package/backend/node_modules/@types/node/constants.d.ts +0 -21
  248. package/backend/node_modules/@types/node/crypto.d.ts +0 -4570
  249. package/backend/node_modules/@types/node/dgram.d.ts +0 -596
  250. package/backend/node_modules/@types/node/diagnostics_channel.d.ts +0 -578
  251. package/backend/node_modules/@types/node/dns/promises.d.ts +0 -479
  252. package/backend/node_modules/@types/node/dns.d.ts +0 -871
  253. package/backend/node_modules/@types/node/domain.d.ts +0 -170
  254. package/backend/node_modules/@types/node/events.d.ts +0 -931
  255. package/backend/node_modules/@types/node/fs/promises.d.ts +0 -1248
  256. package/backend/node_modules/@types/node/fs.d.ts +0 -4362
  257. package/backend/node_modules/@types/node/globals.d.ts +0 -170
  258. package/backend/node_modules/@types/node/globals.typedarray.d.ts +0 -21
  259. package/backend/node_modules/@types/node/http.d.ts +0 -2031
  260. package/backend/node_modules/@types/node/http2.d.ts +0 -2623
  261. package/backend/node_modules/@types/node/https.d.ts +0 -549
  262. package/backend/node_modules/@types/node/index.d.ts +0 -93
  263. package/backend/node_modules/@types/node/inspector.generated.d.ts +0 -3966
  264. package/backend/node_modules/@types/node/module.d.ts +0 -539
  265. package/backend/node_modules/@types/node/net.d.ts +0 -1011
  266. package/backend/node_modules/@types/node/os.d.ts +0 -495
  267. package/backend/node_modules/@types/node/package.json +0 -140
  268. package/backend/node_modules/@types/node/path.d.ts +0 -200
  269. package/backend/node_modules/@types/node/perf_hooks.d.ts +0 -963
  270. package/backend/node_modules/@types/node/process.d.ts +0 -1956
  271. package/backend/node_modules/@types/node/punycode.d.ts +0 -117
  272. package/backend/node_modules/@types/node/querystring.d.ts +0 -152
  273. package/backend/node_modules/@types/node/readline/promises.d.ts +0 -162
  274. package/backend/node_modules/@types/node/readline.d.ts +0 -589
  275. package/backend/node_modules/@types/node/repl.d.ts +0 -430
  276. package/backend/node_modules/@types/node/sea.d.ts +0 -153
  277. package/backend/node_modules/@types/node/stream/consumers.d.ts +0 -38
  278. package/backend/node_modules/@types/node/stream/promises.d.ts +0 -90
  279. package/backend/node_modules/@types/node/stream/web.d.ts +0 -533
  280. package/backend/node_modules/@types/node/stream.d.ts +0 -1668
  281. package/backend/node_modules/@types/node/string_decoder.d.ts +0 -67
  282. package/backend/node_modules/@types/node/test.d.ts +0 -1807
  283. package/backend/node_modules/@types/node/timers/promises.d.ts +0 -108
  284. package/backend/node_modules/@types/node/timers.d.ts +0 -286
  285. package/backend/node_modules/@types/node/tls.d.ts +0 -1231
  286. package/backend/node_modules/@types/node/trace_events.d.ts +0 -197
  287. package/backend/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -460
  288. package/backend/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
  289. package/backend/node_modules/@types/node/ts5.6/index.d.ts +0 -93
  290. package/backend/node_modules/@types/node/tty.d.ts +0 -208
  291. package/backend/node_modules/@types/node/url.d.ts +0 -964
  292. package/backend/node_modules/@types/node/util.d.ts +0 -2331
  293. package/backend/node_modules/@types/node/v8.d.ts +0 -808
  294. package/backend/node_modules/@types/node/vm.d.ts +0 -1030
  295. package/backend/node_modules/@types/node/wasi.d.ts +0 -181
  296. package/backend/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -34
  297. package/backend/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
  298. package/backend/node_modules/@types/node/web-globals/events.d.ts +0 -94
  299. package/backend/node_modules/@types/node/web-globals/fetch.d.ts +0 -46
  300. package/backend/node_modules/@types/node/worker_threads.d.ts +0 -743
  301. package/backend/node_modules/@types/node/zlib.d.ts +0 -539
  302. package/backend/node_modules/debug/LICENSE +0 -20
  303. package/backend/node_modules/debug/README.md +0 -481
  304. package/backend/node_modules/debug/package.json +0 -64
  305. package/backend/node_modules/debug/src/browser.js +0 -272
  306. package/backend/node_modules/debug/src/common.js +0 -292
  307. package/backend/node_modules/debug/src/index.js +0 -10
  308. package/backend/node_modules/debug/src/node.js +0 -263
  309. package/backend/node_modules/undici-types/LICENSE +0 -21
  310. package/backend/node_modules/undici-types/README.md +0 -6
  311. package/backend/node_modules/undici-types/agent.d.ts +0 -31
  312. package/backend/node_modules/undici-types/api.d.ts +0 -43
  313. package/backend/node_modules/undici-types/balanced-pool.d.ts +0 -29
  314. package/backend/node_modules/undici-types/cache.d.ts +0 -36
  315. package/backend/node_modules/undici-types/client.d.ts +0 -108
  316. package/backend/node_modules/undici-types/connector.d.ts +0 -34
  317. package/backend/node_modules/undici-types/content-type.d.ts +0 -21
  318. package/backend/node_modules/undici-types/cookies.d.ts +0 -28
  319. package/backend/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
  320. package/backend/node_modules/undici-types/dispatcher.d.ts +0 -256
  321. package/backend/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
  322. package/backend/node_modules/undici-types/errors.d.ts +0 -149
  323. package/backend/node_modules/undici-types/eventsource.d.ts +0 -61
  324. package/backend/node_modules/undici-types/fetch.d.ts +0 -209
  325. package/backend/node_modules/undici-types/file.d.ts +0 -39
  326. package/backend/node_modules/undici-types/filereader.d.ts +0 -54
  327. package/backend/node_modules/undici-types/formdata.d.ts +0 -108
  328. package/backend/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  329. package/backend/node_modules/undici-types/global-origin.d.ts +0 -7
  330. package/backend/node_modules/undici-types/handlers.d.ts +0 -15
  331. package/backend/node_modules/undici-types/header.d.ts +0 -4
  332. package/backend/node_modules/undici-types/index.d.ts +0 -71
  333. package/backend/node_modules/undici-types/interceptors.d.ts +0 -17
  334. package/backend/node_modules/undici-types/mock-agent.d.ts +0 -50
  335. package/backend/node_modules/undici-types/mock-client.d.ts +0 -25
  336. package/backend/node_modules/undici-types/mock-errors.d.ts +0 -12
  337. package/backend/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  338. package/backend/node_modules/undici-types/mock-pool.d.ts +0 -25
  339. package/backend/node_modules/undici-types/package.json +0 -55
  340. package/backend/node_modules/undici-types/patch.d.ts +0 -33
  341. package/backend/node_modules/undici-types/pool-stats.d.ts +0 -19
  342. package/backend/node_modules/undici-types/pool.d.ts +0 -39
  343. package/backend/node_modules/undici-types/proxy-agent.d.ts +0 -28
  344. package/backend/node_modules/undici-types/readable.d.ts +0 -65
  345. package/backend/node_modules/undici-types/retry-agent.d.ts +0 -8
  346. package/backend/node_modules/undici-types/retry-handler.d.ts +0 -116
  347. package/backend/node_modules/undici-types/util.d.ts +0 -18
  348. package/backend/node_modules/undici-types/webidl.d.ts +0 -228
  349. package/backend/node_modules/undici-types/websocket.d.ts +0 -150
  350. package/daemon/node_modules/@types/node/LICENSE +0 -21
  351. package/daemon/node_modules/@types/node/README.md +0 -15
  352. package/daemon/node_modules/@types/node/assert/strict.d.ts +0 -8
  353. package/daemon/node_modules/@types/node/assert.d.ts +0 -1044
  354. package/daemon/node_modules/@types/node/async_hooks.d.ts +0 -605
  355. package/daemon/node_modules/@types/node/buffer.buffer.d.ts +0 -462
  356. package/daemon/node_modules/@types/node/buffer.d.ts +0 -1932
  357. package/daemon/node_modules/@types/node/child_process.d.ts +0 -1452
  358. package/daemon/node_modules/@types/node/cluster.d.ts +0 -578
  359. package/daemon/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
  360. package/daemon/node_modules/@types/node/compatibility/index.d.ts +0 -9
  361. package/daemon/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
  362. package/daemon/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  363. package/daemon/node_modules/@types/node/console.d.ts +0 -452
  364. package/daemon/node_modules/@types/node/constants.d.ts +0 -21
  365. package/daemon/node_modules/@types/node/crypto.d.ts +0 -4570
  366. package/daemon/node_modules/@types/node/dgram.d.ts +0 -596
  367. package/daemon/node_modules/@types/node/diagnostics_channel.d.ts +0 -578
  368. package/daemon/node_modules/@types/node/dns/promises.d.ts +0 -479
  369. package/daemon/node_modules/@types/node/dns.d.ts +0 -871
  370. package/daemon/node_modules/@types/node/domain.d.ts +0 -170
  371. package/daemon/node_modules/@types/node/events.d.ts +0 -931
  372. package/daemon/node_modules/@types/node/fs/promises.d.ts +0 -1248
  373. package/daemon/node_modules/@types/node/fs.d.ts +0 -4362
  374. package/daemon/node_modules/@types/node/globals.d.ts +0 -170
  375. package/daemon/node_modules/@types/node/globals.typedarray.d.ts +0 -21
  376. package/daemon/node_modules/@types/node/http.d.ts +0 -2031
  377. package/daemon/node_modules/@types/node/http2.d.ts +0 -2623
  378. package/daemon/node_modules/@types/node/https.d.ts +0 -549
  379. package/daemon/node_modules/@types/node/index.d.ts +0 -93
  380. package/daemon/node_modules/@types/node/inspector.generated.d.ts +0 -3966
  381. package/daemon/node_modules/@types/node/module.d.ts +0 -539
  382. package/daemon/node_modules/@types/node/net.d.ts +0 -1011
  383. package/daemon/node_modules/@types/node/os.d.ts +0 -495
  384. package/daemon/node_modules/@types/node/package.json +0 -140
  385. package/daemon/node_modules/@types/node/path.d.ts +0 -200
  386. package/daemon/node_modules/@types/node/perf_hooks.d.ts +0 -963
  387. package/daemon/node_modules/@types/node/process.d.ts +0 -1956
  388. package/daemon/node_modules/@types/node/punycode.d.ts +0 -117
  389. package/daemon/node_modules/@types/node/querystring.d.ts +0 -152
  390. package/daemon/node_modules/@types/node/readline/promises.d.ts +0 -162
  391. package/daemon/node_modules/@types/node/readline.d.ts +0 -589
  392. package/daemon/node_modules/@types/node/repl.d.ts +0 -430
  393. package/daemon/node_modules/@types/node/sea.d.ts +0 -153
  394. package/daemon/node_modules/@types/node/stream/consumers.d.ts +0 -38
  395. package/daemon/node_modules/@types/node/stream/promises.d.ts +0 -90
  396. package/daemon/node_modules/@types/node/stream/web.d.ts +0 -533
  397. package/daemon/node_modules/@types/node/stream.d.ts +0 -1668
  398. package/daemon/node_modules/@types/node/string_decoder.d.ts +0 -67
  399. package/daemon/node_modules/@types/node/test.d.ts +0 -1807
  400. package/daemon/node_modules/@types/node/timers/promises.d.ts +0 -108
  401. package/daemon/node_modules/@types/node/timers.d.ts +0 -286
  402. package/daemon/node_modules/@types/node/tls.d.ts +0 -1231
  403. package/daemon/node_modules/@types/node/trace_events.d.ts +0 -197
  404. package/daemon/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -460
  405. package/daemon/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
  406. package/daemon/node_modules/@types/node/ts5.6/index.d.ts +0 -93
  407. package/daemon/node_modules/@types/node/tty.d.ts +0 -208
  408. package/daemon/node_modules/@types/node/url.d.ts +0 -964
  409. package/daemon/node_modules/@types/node/util.d.ts +0 -2331
  410. package/daemon/node_modules/@types/node/v8.d.ts +0 -808
  411. package/daemon/node_modules/@types/node/vm.d.ts +0 -1030
  412. package/daemon/node_modules/@types/node/wasi.d.ts +0 -181
  413. package/daemon/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -34
  414. package/daemon/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
  415. package/daemon/node_modules/@types/node/web-globals/events.d.ts +0 -94
  416. package/daemon/node_modules/@types/node/web-globals/fetch.d.ts +0 -46
  417. package/daemon/node_modules/@types/node/worker_threads.d.ts +0 -743
  418. package/daemon/node_modules/@types/node/zlib.d.ts +0 -539
  419. package/daemon/node_modules/undici-types/README.md +0 -6
  420. package/daemon/node_modules/undici-types/agent.d.ts +0 -31
  421. package/daemon/node_modules/undici-types/api.d.ts +0 -43
  422. package/daemon/node_modules/undici-types/balanced-pool.d.ts +0 -29
  423. package/daemon/node_modules/undici-types/cache.d.ts +0 -36
  424. package/daemon/node_modules/undici-types/client.d.ts +0 -108
  425. package/daemon/node_modules/undici-types/connector.d.ts +0 -34
  426. package/daemon/node_modules/undici-types/content-type.d.ts +0 -21
  427. package/daemon/node_modules/undici-types/cookies.d.ts +0 -28
  428. package/daemon/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
  429. package/daemon/node_modules/undici-types/dispatcher.d.ts +0 -256
  430. package/daemon/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
  431. package/daemon/node_modules/undici-types/errors.d.ts +0 -149
  432. package/daemon/node_modules/undici-types/eventsource.d.ts +0 -61
  433. package/daemon/node_modules/undici-types/fetch.d.ts +0 -209
  434. package/daemon/node_modules/undici-types/file.d.ts +0 -39
  435. package/daemon/node_modules/undici-types/filereader.d.ts +0 -54
  436. package/daemon/node_modules/undici-types/formdata.d.ts +0 -108
  437. package/daemon/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  438. package/daemon/node_modules/undici-types/global-origin.d.ts +0 -7
  439. package/daemon/node_modules/undici-types/handlers.d.ts +0 -15
  440. package/daemon/node_modules/undici-types/header.d.ts +0 -4
  441. package/daemon/node_modules/undici-types/index.d.ts +0 -71
  442. package/daemon/node_modules/undici-types/interceptors.d.ts +0 -17
  443. package/daemon/node_modules/undici-types/mock-agent.d.ts +0 -50
  444. package/daemon/node_modules/undici-types/mock-client.d.ts +0 -25
  445. package/daemon/node_modules/undici-types/mock-errors.d.ts +0 -12
  446. package/daemon/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  447. package/daemon/node_modules/undici-types/mock-pool.d.ts +0 -25
  448. package/daemon/node_modules/undici-types/package.json +0 -55
  449. package/daemon/node_modules/undici-types/patch.d.ts +0 -33
  450. package/daemon/node_modules/undici-types/pool-stats.d.ts +0 -19
  451. package/daemon/node_modules/undici-types/pool.d.ts +0 -39
  452. package/daemon/node_modules/undici-types/proxy-agent.d.ts +0 -28
  453. package/daemon/node_modules/undici-types/readable.d.ts +0 -65
  454. package/daemon/node_modules/undici-types/retry-agent.d.ts +0 -8
  455. package/daemon/node_modules/undici-types/retry-handler.d.ts +0 -116
  456. package/daemon/node_modules/undici-types/util.d.ts +0 -18
  457. package/daemon/node_modules/undici-types/webidl.d.ts +0 -228
  458. package/daemon/node_modules/undici-types/websocket.d.ts +0 -150
  459. package/visual-editor-proxy/node_modules/@types/node/LICENSE +0 -21
  460. package/visual-editor-proxy/node_modules/@types/node/README.md +0 -15
  461. package/visual-editor-proxy/node_modules/@types/node/assert/strict.d.ts +0 -8
  462. package/visual-editor-proxy/node_modules/@types/node/assert.d.ts +0 -1062
  463. package/visual-editor-proxy/node_modules/@types/node/async_hooks.d.ts +0 -605
  464. package/visual-editor-proxy/node_modules/@types/node/buffer.buffer.d.ts +0 -462
  465. package/visual-editor-proxy/node_modules/@types/node/buffer.d.ts +0 -1932
  466. package/visual-editor-proxy/node_modules/@types/node/child_process.d.ts +0 -1458
  467. package/visual-editor-proxy/node_modules/@types/node/cluster.d.ts +0 -577
  468. package/visual-editor-proxy/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
  469. package/visual-editor-proxy/node_modules/@types/node/compatibility/index.d.ts +0 -9
  470. package/visual-editor-proxy/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
  471. package/visual-editor-proxy/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  472. package/visual-editor-proxy/node_modules/@types/node/console.d.ts +0 -452
  473. package/visual-editor-proxy/node_modules/@types/node/constants.d.ts +0 -21
  474. package/visual-editor-proxy/node_modules/@types/node/crypto.d.ts +0 -4570
  475. package/visual-editor-proxy/node_modules/@types/node/dgram.d.ts +0 -596
  476. package/visual-editor-proxy/node_modules/@types/node/diagnostics_channel.d.ts +0 -578
  477. package/visual-editor-proxy/node_modules/@types/node/dns/promises.d.ts +0 -479
  478. package/visual-editor-proxy/node_modules/@types/node/dns.d.ts +0 -871
  479. package/visual-editor-proxy/node_modules/@types/node/domain.d.ts +0 -170
  480. package/visual-editor-proxy/node_modules/@types/node/events.d.ts +0 -977
  481. package/visual-editor-proxy/node_modules/@types/node/fs/promises.d.ts +0 -1248
  482. package/visual-editor-proxy/node_modules/@types/node/fs.d.ts +0 -4362
  483. package/visual-editor-proxy/node_modules/@types/node/globals.d.ts +0 -172
  484. package/visual-editor-proxy/node_modules/@types/node/globals.typedarray.d.ts +0 -21
  485. package/visual-editor-proxy/node_modules/@types/node/http.d.ts +0 -2030
  486. package/visual-editor-proxy/node_modules/@types/node/http2.d.ts +0 -2624
  487. package/visual-editor-proxy/node_modules/@types/node/https.d.ts +0 -546
  488. package/visual-editor-proxy/node_modules/@types/node/index.d.ts +0 -93
  489. package/visual-editor-proxy/node_modules/@types/node/inspector.generated.d.ts +0 -3966
  490. package/visual-editor-proxy/node_modules/@types/node/module.d.ts +0 -539
  491. package/visual-editor-proxy/node_modules/@types/node/net.d.ts +0 -1011
  492. package/visual-editor-proxy/node_modules/@types/node/os.d.ts +0 -505
  493. package/visual-editor-proxy/node_modules/@types/node/package.json +0 -140
  494. package/visual-editor-proxy/node_modules/@types/node/path.d.ts +0 -200
  495. package/visual-editor-proxy/node_modules/@types/node/perf_hooks.d.ts +0 -961
  496. package/visual-editor-proxy/node_modules/@types/node/process.d.ts +0 -1944
  497. package/visual-editor-proxy/node_modules/@types/node/punycode.d.ts +0 -117
  498. package/visual-editor-proxy/node_modules/@types/node/querystring.d.ts +0 -152
  499. package/visual-editor-proxy/node_modules/@types/node/readline/promises.d.ts +0 -162
  500. package/visual-editor-proxy/node_modules/@types/node/readline.d.ts +0 -589
  501. package/visual-editor-proxy/node_modules/@types/node/repl.d.ts +0 -430
  502. package/visual-editor-proxy/node_modules/@types/node/sea.d.ts +0 -153
  503. package/visual-editor-proxy/node_modules/@types/node/stream/consumers.d.ts +0 -38
  504. package/visual-editor-proxy/node_modules/@types/node/stream/promises.d.ts +0 -90
  505. package/visual-editor-proxy/node_modules/@types/node/stream/web.d.ts +0 -533
  506. package/visual-editor-proxy/node_modules/@types/node/stream.d.ts +0 -1675
  507. package/visual-editor-proxy/node_modules/@types/node/string_decoder.d.ts +0 -67
  508. package/visual-editor-proxy/node_modules/@types/node/test.d.ts +0 -1787
  509. package/visual-editor-proxy/node_modules/@types/node/timers/promises.d.ts +0 -108
  510. package/visual-editor-proxy/node_modules/@types/node/timers.d.ts +0 -286
  511. package/visual-editor-proxy/node_modules/@types/node/tls.d.ts +0 -1231
  512. package/visual-editor-proxy/node_modules/@types/node/trace_events.d.ts +0 -197
  513. package/visual-editor-proxy/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -460
  514. package/visual-editor-proxy/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
  515. package/visual-editor-proxy/node_modules/@types/node/ts5.6/index.d.ts +0 -93
  516. package/visual-editor-proxy/node_modules/@types/node/tty.d.ts +0 -208
  517. package/visual-editor-proxy/node_modules/@types/node/url.d.ts +0 -964
  518. package/visual-editor-proxy/node_modules/@types/node/util.d.ts +0 -2331
  519. package/visual-editor-proxy/node_modules/@types/node/v8.d.ts +0 -808
  520. package/visual-editor-proxy/node_modules/@types/node/vm.d.ts +0 -1000
  521. package/visual-editor-proxy/node_modules/@types/node/wasi.d.ts +0 -181
  522. package/visual-editor-proxy/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -34
  523. package/visual-editor-proxy/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
  524. package/visual-editor-proxy/node_modules/@types/node/web-globals/events.d.ts +0 -97
  525. package/visual-editor-proxy/node_modules/@types/node/web-globals/fetch.d.ts +0 -46
  526. package/visual-editor-proxy/node_modules/@types/node/worker_threads.d.ts +0 -715
  527. package/visual-editor-proxy/node_modules/@types/node/zlib.d.ts +0 -539
  528. package/visual-editor-proxy/node_modules/undici-types/LICENSE +0 -21
  529. package/visual-editor-proxy/node_modules/undici-types/README.md +0 -6
  530. package/visual-editor-proxy/node_modules/undici-types/agent.d.ts +0 -31
  531. package/visual-editor-proxy/node_modules/undici-types/api.d.ts +0 -43
  532. package/visual-editor-proxy/node_modules/undici-types/balanced-pool.d.ts +0 -29
  533. package/visual-editor-proxy/node_modules/undici-types/cache.d.ts +0 -36
  534. package/visual-editor-proxy/node_modules/undici-types/client.d.ts +0 -108
  535. package/visual-editor-proxy/node_modules/undici-types/connector.d.ts +0 -34
  536. package/visual-editor-proxy/node_modules/undici-types/content-type.d.ts +0 -21
  537. package/visual-editor-proxy/node_modules/undici-types/cookies.d.ts +0 -28
  538. package/visual-editor-proxy/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
  539. package/visual-editor-proxy/node_modules/undici-types/dispatcher.d.ts +0 -256
  540. package/visual-editor-proxy/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
  541. package/visual-editor-proxy/node_modules/undici-types/errors.d.ts +0 -149
  542. package/visual-editor-proxy/node_modules/undici-types/eventsource.d.ts +0 -61
  543. package/visual-editor-proxy/node_modules/undici-types/fetch.d.ts +0 -209
  544. package/visual-editor-proxy/node_modules/undici-types/file.d.ts +0 -39
  545. package/visual-editor-proxy/node_modules/undici-types/filereader.d.ts +0 -54
  546. package/visual-editor-proxy/node_modules/undici-types/formdata.d.ts +0 -108
  547. package/visual-editor-proxy/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  548. package/visual-editor-proxy/node_modules/undici-types/global-origin.d.ts +0 -7
  549. package/visual-editor-proxy/node_modules/undici-types/handlers.d.ts +0 -15
  550. package/visual-editor-proxy/node_modules/undici-types/header.d.ts +0 -4
  551. package/visual-editor-proxy/node_modules/undici-types/index.d.ts +0 -71
  552. package/visual-editor-proxy/node_modules/undici-types/interceptors.d.ts +0 -17
  553. package/visual-editor-proxy/node_modules/undici-types/mock-agent.d.ts +0 -50
  554. package/visual-editor-proxy/node_modules/undici-types/mock-client.d.ts +0 -25
  555. package/visual-editor-proxy/node_modules/undici-types/mock-errors.d.ts +0 -12
  556. package/visual-editor-proxy/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  557. package/visual-editor-proxy/node_modules/undici-types/mock-pool.d.ts +0 -25
  558. package/visual-editor-proxy/node_modules/undici-types/package.json +0 -55
  559. package/visual-editor-proxy/node_modules/undici-types/patch.d.ts +0 -33
  560. package/visual-editor-proxy/node_modules/undici-types/pool-stats.d.ts +0 -19
  561. package/visual-editor-proxy/node_modules/undici-types/pool.d.ts +0 -39
  562. package/visual-editor-proxy/node_modules/undici-types/proxy-agent.d.ts +0 -28
  563. package/visual-editor-proxy/node_modules/undici-types/readable.d.ts +0 -65
  564. package/visual-editor-proxy/node_modules/undici-types/retry-agent.d.ts +0 -8
  565. package/visual-editor-proxy/node_modules/undici-types/retry-handler.d.ts +0 -116
  566. package/visual-editor-proxy/node_modules/undici-types/util.d.ts +0 -18
  567. package/visual-editor-proxy/node_modules/undici-types/webidl.d.ts +0 -228
  568. package/visual-editor-proxy/node_modules/undici-types/websocket.d.ts +0 -150
@@ -0,0 +1,1151 @@
1
+ /**
2
+ * @fileoverview The factory of `ConfigArray` objects.
3
+ *
4
+ * This class provides methods to create `ConfigArray` instance.
5
+ *
6
+ * - `create(configData, options)`
7
+ * Create a `ConfigArray` instance from a config data. This is to handle CLI
8
+ * options except `--config`.
9
+ * - `loadFile(filePath, options)`
10
+ * Create a `ConfigArray` instance from a config file. This is to handle
11
+ * `--config` option. If the file was not found, throws the following error:
12
+ * - If the filename was `*.js`, a `MODULE_NOT_FOUND` error.
13
+ * - If the filename was `package.json`, an IO error or an
14
+ * `ESLINT_CONFIG_FIELD_NOT_FOUND` error.
15
+ * - Otherwise, an IO error such as `ENOENT`.
16
+ * - `loadInDirectory(directoryPath, options)`
17
+ * Create a `ConfigArray` instance from a config file which is on a given
18
+ * directory. This tries to load `.eslintrc.*` or `package.json`. If not
19
+ * found, returns an empty `ConfigArray`.
20
+ * - `loadESLintIgnore(filePath)`
21
+ * Create a `ConfigArray` instance from a config file that is `.eslintignore`
22
+ * format. This is to handle `--ignore-path` option.
23
+ * - `loadDefaultESLintIgnore()`
24
+ * Create a `ConfigArray` instance from `.eslintignore` or `package.json` in
25
+ * the current working directory.
26
+ *
27
+ * `ConfigArrayFactory` class has the responsibility that loads configuration
28
+ * files, including loading `extends`, `parser`, and `plugins`. The created
29
+ * `ConfigArray` instance has the loaded `extends`, `parser`, and `plugins`.
30
+ *
31
+ * But this class doesn't handle cascading. `CascadingConfigArrayFactory` class
32
+ * handles cascading and hierarchy.
33
+ *
34
+ * @author Toru Nagashima <https://github.com/mysticatea>
35
+ */
36
+
37
+ //------------------------------------------------------------------------------
38
+ // Requirements
39
+ //------------------------------------------------------------------------------
40
+
41
+ import debugOrig from "debug";
42
+ import fs from "fs";
43
+ import importFresh from "import-fresh";
44
+ import { createRequire } from "module";
45
+ import path from "path";
46
+ import stripComments from "strip-json-comments";
47
+
48
+ import {
49
+ ConfigArray,
50
+ ConfigDependency,
51
+ IgnorePattern,
52
+ OverrideTester
53
+ } from "./config-array/index.js";
54
+ import ConfigValidator from "./shared/config-validator.js";
55
+ import * as naming from "./shared/naming.js";
56
+ import * as ModuleResolver from "./shared/relative-module-resolver.js";
57
+
58
+ const require = createRequire(import.meta.url);
59
+
60
+ const debug = debugOrig("eslintrc:config-array-factory");
61
+
62
+ //------------------------------------------------------------------------------
63
+ // Helpers
64
+ //------------------------------------------------------------------------------
65
+
66
+ const configFilenames = [
67
+ ".eslintrc.js",
68
+ ".eslintrc.cjs",
69
+ ".eslintrc.yaml",
70
+ ".eslintrc.yml",
71
+ ".eslintrc.json",
72
+ ".eslintrc",
73
+ "package.json"
74
+ ];
75
+
76
+ // Define types for VSCode IntelliSense.
77
+ /** @typedef {import("./shared/types").ConfigData} ConfigData */
78
+ /** @typedef {import("./shared/types").OverrideConfigData} OverrideConfigData */
79
+ /** @typedef {import("./shared/types").Parser} Parser */
80
+ /** @typedef {import("./shared/types").Plugin} Plugin */
81
+ /** @typedef {import("./shared/types").Rule} Rule */
82
+ /** @typedef {import("./config-array/config-dependency").DependentParser} DependentParser */
83
+ /** @typedef {import("./config-array/config-dependency").DependentPlugin} DependentPlugin */
84
+ /** @typedef {ConfigArray[0]} ConfigArrayElement */
85
+
86
+ /**
87
+ * @typedef {Object} ConfigArrayFactoryOptions
88
+ * @property {Map<string,Plugin>} [additionalPluginPool] The map for additional plugins.
89
+ * @property {string} [cwd] The path to the current working directory.
90
+ * @property {string} [resolvePluginsRelativeTo] A path to the directory that plugins should be resolved from. Defaults to `cwd`.
91
+ * @property {Map<string,Rule>} builtInRules The rules that are built in to ESLint.
92
+ * @property {Object} [resolver=ModuleResolver] The module resolver object.
93
+ * @property {string} eslintAllPath The path to the definitions for eslint:all.
94
+ * @property {Function} getEslintAllConfig Returns the config data for eslint:all.
95
+ * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.
96
+ * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.
97
+ */
98
+
99
+ /**
100
+ * @typedef {Object} ConfigArrayFactoryInternalSlots
101
+ * @property {Map<string,Plugin>} additionalPluginPool The map for additional plugins.
102
+ * @property {string} cwd The path to the current working directory.
103
+ * @property {string | undefined} resolvePluginsRelativeTo An absolute path the the directory that plugins should be resolved from.
104
+ * @property {Map<string,Rule>} builtInRules The rules that are built in to ESLint.
105
+ * @property {Object} [resolver=ModuleResolver] The module resolver object.
106
+ * @property {string} eslintAllPath The path to the definitions for eslint:all.
107
+ * @property {Function} getEslintAllConfig Returns the config data for eslint:all.
108
+ * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.
109
+ * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.
110
+ */
111
+
112
+ /**
113
+ * @typedef {Object} ConfigArrayFactoryLoadingContext
114
+ * @property {string} filePath The path to the current configuration.
115
+ * @property {string} matchBasePath The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.
116
+ * @property {string} name The name of the current configuration.
117
+ * @property {string} pluginBasePath The base path to resolve plugins.
118
+ * @property {"config" | "ignore" | "implicit-processor"} type The type of the current configuration. This is `"config"` in normal. This is `"ignore"` if it came from `.eslintignore`. This is `"implicit-processor"` if it came from legacy file-extension processors.
119
+ */
120
+
121
+ /**
122
+ * @typedef {Object} ConfigArrayFactoryLoadingContext
123
+ * @property {string} filePath The path to the current configuration.
124
+ * @property {string} matchBasePath The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.
125
+ * @property {string} name The name of the current configuration.
126
+ * @property {"config" | "ignore" | "implicit-processor"} type The type of the current configuration. This is `"config"` in normal. This is `"ignore"` if it came from `.eslintignore`. This is `"implicit-processor"` if it came from legacy file-extension processors.
127
+ */
128
+
129
+ /** @type {WeakMap<ConfigArrayFactory, ConfigArrayFactoryInternalSlots>} */
130
+ const internalSlotsMap = new WeakMap();
131
+
132
+ /** @type {WeakMap<object, Plugin>} */
133
+ const normalizedPlugins = new WeakMap();
134
+
135
+ /**
136
+ * Check if a given string is a file path.
137
+ * @param {string} nameOrPath A module name or file path.
138
+ * @returns {boolean} `true` if the `nameOrPath` is a file path.
139
+ */
140
+ function isFilePath(nameOrPath) {
141
+ return (
142
+ /^\.{1,2}[/\\]/u.test(nameOrPath) ||
143
+ path.isAbsolute(nameOrPath)
144
+ );
145
+ }
146
+
147
+ /**
148
+ * Convenience wrapper for synchronously reading file contents.
149
+ * @param {string} filePath The filename to read.
150
+ * @returns {string} The file contents, with the BOM removed.
151
+ * @private
152
+ */
153
+ function readFile(filePath) {
154
+ return fs.readFileSync(filePath, "utf8").replace(/^\ufeff/u, "");
155
+ }
156
+
157
+ /**
158
+ * Loads a YAML configuration from a file.
159
+ * @param {string} filePath The filename to load.
160
+ * @returns {ConfigData} The configuration object from the file.
161
+ * @throws {Error} If the file cannot be read.
162
+ * @private
163
+ */
164
+ function loadYAMLConfigFile(filePath) {
165
+ debug(`Loading YAML config file: ${filePath}`);
166
+
167
+ // lazy load YAML to improve performance when not used
168
+ const yaml = require("js-yaml");
169
+
170
+ try {
171
+
172
+ // empty YAML file can be null, so always use
173
+ return yaml.load(readFile(filePath)) || {};
174
+ } catch (e) {
175
+ debug(`Error reading YAML file: ${filePath}`);
176
+ e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
177
+ throw e;
178
+ }
179
+ }
180
+
181
+ /**
182
+ * Loads a JSON configuration from a file.
183
+ * @param {string} filePath The filename to load.
184
+ * @returns {ConfigData} The configuration object from the file.
185
+ * @throws {Error} If the file cannot be read.
186
+ * @private
187
+ */
188
+ function loadJSONConfigFile(filePath) {
189
+ debug(`Loading JSON config file: ${filePath}`);
190
+
191
+ try {
192
+ return JSON.parse(stripComments(readFile(filePath)));
193
+ } catch (e) {
194
+ debug(`Error reading JSON file: ${filePath}`);
195
+ e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
196
+ e.messageTemplate = "failed-to-read-json";
197
+ e.messageData = {
198
+ path: filePath,
199
+ message: e.message
200
+ };
201
+ throw e;
202
+ }
203
+ }
204
+
205
+ /**
206
+ * Loads a legacy (.eslintrc) configuration from a file.
207
+ * @param {string} filePath The filename to load.
208
+ * @returns {ConfigData} The configuration object from the file.
209
+ * @throws {Error} If the file cannot be read.
210
+ * @private
211
+ */
212
+ function loadLegacyConfigFile(filePath) {
213
+ debug(`Loading legacy config file: ${filePath}`);
214
+
215
+ // lazy load YAML to improve performance when not used
216
+ const yaml = require("js-yaml");
217
+
218
+ try {
219
+ return yaml.load(stripComments(readFile(filePath))) || /* istanbul ignore next */ {};
220
+ } catch (e) {
221
+ debug("Error reading YAML file: %s\n%o", filePath, e);
222
+ e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
223
+ throw e;
224
+ }
225
+ }
226
+
227
+ /**
228
+ * Loads a JavaScript configuration from a file.
229
+ * @param {string} filePath The filename to load.
230
+ * @returns {ConfigData} The configuration object from the file.
231
+ * @throws {Error} If the file cannot be read.
232
+ * @private
233
+ */
234
+ function loadJSConfigFile(filePath) {
235
+ debug(`Loading JS config file: ${filePath}`);
236
+ try {
237
+ return importFresh(filePath);
238
+ } catch (e) {
239
+ debug(`Error reading JavaScript file: ${filePath}`);
240
+ e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
241
+ throw e;
242
+ }
243
+ }
244
+
245
+ /**
246
+ * Loads a configuration from a package.json file.
247
+ * @param {string} filePath The filename to load.
248
+ * @returns {ConfigData} The configuration object from the file.
249
+ * @throws {Error} If the file cannot be read.
250
+ * @private
251
+ */
252
+ function loadPackageJSONConfigFile(filePath) {
253
+ debug(`Loading package.json config file: ${filePath}`);
254
+ try {
255
+ const packageData = loadJSONConfigFile(filePath);
256
+
257
+ if (!Object.hasOwnProperty.call(packageData, "eslintConfig")) {
258
+ throw Object.assign(
259
+ new Error("package.json file doesn't have 'eslintConfig' field."),
260
+ { code: "ESLINT_CONFIG_FIELD_NOT_FOUND" }
261
+ );
262
+ }
263
+
264
+ return packageData.eslintConfig;
265
+ } catch (e) {
266
+ debug(`Error reading package.json file: ${filePath}`);
267
+ e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`;
268
+ throw e;
269
+ }
270
+ }
271
+
272
+ /**
273
+ * Loads a `.eslintignore` from a file.
274
+ * @param {string} filePath The filename to load.
275
+ * @returns {string[]} The ignore patterns from the file.
276
+ * @private
277
+ */
278
+ function loadESLintIgnoreFile(filePath) {
279
+ debug(`Loading .eslintignore file: ${filePath}`);
280
+
281
+ try {
282
+ return readFile(filePath)
283
+ .split(/\r?\n/gu)
284
+ .filter(line => line.trim() !== "" && !line.startsWith("#"));
285
+ } catch (e) {
286
+ debug(`Error reading .eslintignore file: ${filePath}`);
287
+ e.message = `Cannot read .eslintignore file: ${filePath}\nError: ${e.message}`;
288
+ throw e;
289
+ }
290
+ }
291
+
292
+ /**
293
+ * Creates an error to notify about a missing config to extend from.
294
+ * @param {string} configName The name of the missing config.
295
+ * @param {string} importerName The name of the config that imported the missing config
296
+ * @param {string} messageTemplate The text template to source error strings from.
297
+ * @returns {Error} The error object to throw
298
+ * @private
299
+ */
300
+ function configInvalidError(configName, importerName, messageTemplate) {
301
+ return Object.assign(
302
+ new Error(`Failed to load config "${configName}" to extend from.`),
303
+ {
304
+ messageTemplate,
305
+ messageData: { configName, importerName }
306
+ }
307
+ );
308
+ }
309
+
310
+ /**
311
+ * Loads a configuration file regardless of the source. Inspects the file path
312
+ * to determine the correctly way to load the config file.
313
+ * @param {string} filePath The path to the configuration.
314
+ * @returns {ConfigData|null} The configuration information.
315
+ * @private
316
+ */
317
+ function loadConfigFile(filePath) {
318
+ switch (path.extname(filePath)) {
319
+ case ".js":
320
+ case ".cjs":
321
+ return loadJSConfigFile(filePath);
322
+
323
+ case ".json":
324
+ if (path.basename(filePath) === "package.json") {
325
+ return loadPackageJSONConfigFile(filePath);
326
+ }
327
+ return loadJSONConfigFile(filePath);
328
+
329
+ case ".yaml":
330
+ case ".yml":
331
+ return loadYAMLConfigFile(filePath);
332
+
333
+ default:
334
+ return loadLegacyConfigFile(filePath);
335
+ }
336
+ }
337
+
338
+ /**
339
+ * Write debug log.
340
+ * @param {string} request The requested module name.
341
+ * @param {string} relativeTo The file path to resolve the request relative to.
342
+ * @param {string} filePath The resolved file path.
343
+ * @returns {void}
344
+ */
345
+ function writeDebugLogForLoading(request, relativeTo, filePath) {
346
+ /* istanbul ignore next */
347
+ if (debug.enabled) {
348
+ let nameAndVersion = null;
349
+
350
+ try {
351
+ const packageJsonPath = ModuleResolver.resolve(
352
+ `${request}/package.json`,
353
+ relativeTo
354
+ );
355
+ const { version = "unknown" } = require(packageJsonPath);
356
+
357
+ nameAndVersion = `${request}@${version}`;
358
+ } catch (error) {
359
+ debug("package.json was not found:", error.message);
360
+ nameAndVersion = request;
361
+ }
362
+
363
+ debug("Loaded: %s (%s)", nameAndVersion, filePath);
364
+ }
365
+ }
366
+
367
+ /**
368
+ * Create a new context with default values.
369
+ * @param {ConfigArrayFactoryInternalSlots} slots The internal slots.
370
+ * @param {"config" | "ignore" | "implicit-processor" | undefined} providedType The type of the current configuration. Default is `"config"`.
371
+ * @param {string | undefined} providedName The name of the current configuration. Default is the relative path from `cwd` to `filePath`.
372
+ * @param {string | undefined} providedFilePath The path to the current configuration. Default is empty string.
373
+ * @param {string | undefined} providedMatchBasePath The type of the current configuration. Default is the directory of `filePath` or `cwd`.
374
+ * @returns {ConfigArrayFactoryLoadingContext} The created context.
375
+ */
376
+ function createContext(
377
+ { cwd, resolvePluginsRelativeTo },
378
+ providedType,
379
+ providedName,
380
+ providedFilePath,
381
+ providedMatchBasePath
382
+ ) {
383
+ const filePath = providedFilePath
384
+ ? path.resolve(cwd, providedFilePath)
385
+ : "";
386
+ const matchBasePath =
387
+ (providedMatchBasePath && path.resolve(cwd, providedMatchBasePath)) ||
388
+ (filePath && path.dirname(filePath)) ||
389
+ cwd;
390
+ const name =
391
+ providedName ||
392
+ (filePath && path.relative(cwd, filePath)) ||
393
+ "";
394
+ const pluginBasePath =
395
+ resolvePluginsRelativeTo ||
396
+ (filePath && path.dirname(filePath)) ||
397
+ cwd;
398
+ const type = providedType || "config";
399
+
400
+ return { filePath, matchBasePath, name, pluginBasePath, type };
401
+ }
402
+
403
+ /**
404
+ * Normalize a given plugin.
405
+ * - Ensure the object to have four properties: configs, environments, processors, and rules.
406
+ * - Ensure the object to not have other properties.
407
+ * @param {Plugin} plugin The plugin to normalize.
408
+ * @returns {Plugin} The normalized plugin.
409
+ */
410
+ function normalizePlugin(plugin) {
411
+
412
+ // first check the cache
413
+ let normalizedPlugin = normalizedPlugins.get(plugin);
414
+
415
+ if (normalizedPlugin) {
416
+ return normalizedPlugin;
417
+ }
418
+
419
+ normalizedPlugin = {
420
+ configs: plugin.configs || {},
421
+ environments: plugin.environments || {},
422
+ processors: plugin.processors || {},
423
+ rules: plugin.rules || {}
424
+ };
425
+
426
+ // save the reference for later
427
+ normalizedPlugins.set(plugin, normalizedPlugin);
428
+
429
+ return normalizedPlugin;
430
+ }
431
+
432
+ //------------------------------------------------------------------------------
433
+ // Public Interface
434
+ //------------------------------------------------------------------------------
435
+
436
+ /**
437
+ * The factory of `ConfigArray` objects.
438
+ */
439
+ class ConfigArrayFactory {
440
+
441
+ /**
442
+ * Initialize this instance.
443
+ * @param {ConfigArrayFactoryOptions} [options] The map for additional plugins.
444
+ */
445
+ constructor({
446
+ additionalPluginPool = new Map(),
447
+ cwd = process.cwd(),
448
+ resolvePluginsRelativeTo,
449
+ builtInRules,
450
+ resolver = ModuleResolver,
451
+ eslintAllPath,
452
+ getEslintAllConfig,
453
+ eslintRecommendedPath,
454
+ getEslintRecommendedConfig
455
+ } = {}) {
456
+ internalSlotsMap.set(this, {
457
+ additionalPluginPool,
458
+ cwd,
459
+ resolvePluginsRelativeTo:
460
+ resolvePluginsRelativeTo &&
461
+ path.resolve(cwd, resolvePluginsRelativeTo),
462
+ builtInRules,
463
+ resolver,
464
+ eslintAllPath,
465
+ getEslintAllConfig,
466
+ eslintRecommendedPath,
467
+ getEslintRecommendedConfig
468
+ });
469
+ }
470
+
471
+ /**
472
+ * Create `ConfigArray` instance from a config data.
473
+ * @param {ConfigData|null} configData The config data to create.
474
+ * @param {Object} [options] The options.
475
+ * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.
476
+ * @param {string} [options.filePath] The path to this config data.
477
+ * @param {string} [options.name] The config name.
478
+ * @returns {ConfigArray} Loaded config.
479
+ */
480
+ create(configData, { basePath, filePath, name } = {}) {
481
+ if (!configData) {
482
+ return new ConfigArray();
483
+ }
484
+
485
+ const slots = internalSlotsMap.get(this);
486
+ const ctx = createContext(slots, "config", name, filePath, basePath);
487
+ const elements = this._normalizeConfigData(configData, ctx);
488
+
489
+ return new ConfigArray(...elements);
490
+ }
491
+
492
+ /**
493
+ * Load a config file.
494
+ * @param {string} filePath The path to a config file.
495
+ * @param {Object} [options] The options.
496
+ * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.
497
+ * @param {string} [options.name] The config name.
498
+ * @returns {ConfigArray} Loaded config.
499
+ */
500
+ loadFile(filePath, { basePath, name } = {}) {
501
+ const slots = internalSlotsMap.get(this);
502
+ const ctx = createContext(slots, "config", name, filePath, basePath);
503
+
504
+ return new ConfigArray(...this._loadConfigData(ctx));
505
+ }
506
+
507
+ /**
508
+ * Load the config file on a given directory if exists.
509
+ * @param {string} directoryPath The path to a directory.
510
+ * @param {Object} [options] The options.
511
+ * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.
512
+ * @param {string} [options.name] The config name.
513
+ * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist.
514
+ */
515
+ loadInDirectory(directoryPath, { basePath, name } = {}) {
516
+ const slots = internalSlotsMap.get(this);
517
+
518
+ for (const filename of configFilenames) {
519
+ const ctx = createContext(
520
+ slots,
521
+ "config",
522
+ name,
523
+ path.join(directoryPath, filename),
524
+ basePath
525
+ );
526
+
527
+ if (fs.existsSync(ctx.filePath) && fs.statSync(ctx.filePath).isFile()) {
528
+ let configData;
529
+
530
+ try {
531
+ configData = loadConfigFile(ctx.filePath);
532
+ } catch (error) {
533
+ if (!error || error.code !== "ESLINT_CONFIG_FIELD_NOT_FOUND") {
534
+ throw error;
535
+ }
536
+ }
537
+
538
+ if (configData) {
539
+ debug(`Config file found: ${ctx.filePath}`);
540
+ return new ConfigArray(
541
+ ...this._normalizeConfigData(configData, ctx)
542
+ );
543
+ }
544
+ }
545
+ }
546
+
547
+ debug(`Config file not found on ${directoryPath}`);
548
+ return new ConfigArray();
549
+ }
550
+
551
+ /**
552
+ * Check if a config file on a given directory exists or not.
553
+ * @param {string} directoryPath The path to a directory.
554
+ * @returns {string | null} The path to the found config file. If not found then null.
555
+ */
556
+ static getPathToConfigFileInDirectory(directoryPath) {
557
+ for (const filename of configFilenames) {
558
+ const filePath = path.join(directoryPath, filename);
559
+
560
+ if (fs.existsSync(filePath)) {
561
+ if (filename === "package.json") {
562
+ try {
563
+ loadPackageJSONConfigFile(filePath);
564
+ return filePath;
565
+ } catch { /* ignore */ }
566
+ } else {
567
+ return filePath;
568
+ }
569
+ }
570
+ }
571
+ return null;
572
+ }
573
+
574
+ /**
575
+ * Load `.eslintignore` file.
576
+ * @param {string} filePath The path to a `.eslintignore` file to load.
577
+ * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist.
578
+ */
579
+ loadESLintIgnore(filePath) {
580
+ const slots = internalSlotsMap.get(this);
581
+ const ctx = createContext(
582
+ slots,
583
+ "ignore",
584
+ void 0,
585
+ filePath,
586
+ slots.cwd
587
+ );
588
+ const ignorePatterns = loadESLintIgnoreFile(ctx.filePath);
589
+
590
+ return new ConfigArray(
591
+ ...this._normalizeESLintIgnoreData(ignorePatterns, ctx)
592
+ );
593
+ }
594
+
595
+ /**
596
+ * Load `.eslintignore` file in the current working directory.
597
+ * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist.
598
+ */
599
+ loadDefaultESLintIgnore() {
600
+ const slots = internalSlotsMap.get(this);
601
+ const eslintIgnorePath = path.resolve(slots.cwd, ".eslintignore");
602
+ const packageJsonPath = path.resolve(slots.cwd, "package.json");
603
+
604
+ if (fs.existsSync(eslintIgnorePath)) {
605
+ return this.loadESLintIgnore(eslintIgnorePath);
606
+ }
607
+ if (fs.existsSync(packageJsonPath)) {
608
+ const data = loadJSONConfigFile(packageJsonPath);
609
+
610
+ if (Object.hasOwnProperty.call(data, "eslintIgnore")) {
611
+ if (!Array.isArray(data.eslintIgnore)) {
612
+ throw new Error("Package.json eslintIgnore property requires an array of paths");
613
+ }
614
+ const ctx = createContext(
615
+ slots,
616
+ "ignore",
617
+ "eslintIgnore in package.json",
618
+ packageJsonPath,
619
+ slots.cwd
620
+ );
621
+
622
+ return new ConfigArray(
623
+ ...this._normalizeESLintIgnoreData(data.eslintIgnore, ctx)
624
+ );
625
+ }
626
+ }
627
+
628
+ return new ConfigArray();
629
+ }
630
+
631
+ /**
632
+ * Load a given config file.
633
+ * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
634
+ * @returns {IterableIterator<ConfigArrayElement>} Loaded config.
635
+ * @private
636
+ */
637
+ _loadConfigData(ctx) {
638
+ return this._normalizeConfigData(loadConfigFile(ctx.filePath), ctx);
639
+ }
640
+
641
+ /**
642
+ * Normalize a given `.eslintignore` data to config array elements.
643
+ * @param {string[]} ignorePatterns The patterns to ignore files.
644
+ * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
645
+ * @returns {IterableIterator<ConfigArrayElement>} The normalized config.
646
+ * @private
647
+ */
648
+ *_normalizeESLintIgnoreData(ignorePatterns, ctx) {
649
+ const elements = this._normalizeObjectConfigData(
650
+ { ignorePatterns },
651
+ ctx
652
+ );
653
+
654
+ // Set `ignorePattern.loose` flag for backward compatibility.
655
+ for (const element of elements) {
656
+ if (element.ignorePattern) {
657
+ element.ignorePattern.loose = true;
658
+ }
659
+ yield element;
660
+ }
661
+ }
662
+
663
+ /**
664
+ * Normalize a given config to an array.
665
+ * @param {ConfigData} configData The config data to normalize.
666
+ * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
667
+ * @returns {IterableIterator<ConfigArrayElement>} The normalized config.
668
+ * @private
669
+ */
670
+ _normalizeConfigData(configData, ctx) {
671
+ const validator = new ConfigValidator();
672
+
673
+ validator.validateConfigSchema(configData, ctx.name || ctx.filePath);
674
+ return this._normalizeObjectConfigData(configData, ctx);
675
+ }
676
+
677
+ /**
678
+ * Normalize a given config to an array.
679
+ * @param {ConfigData|OverrideConfigData} configData The config data to normalize.
680
+ * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
681
+ * @returns {IterableIterator<ConfigArrayElement>} The normalized config.
682
+ * @private
683
+ */
684
+ *_normalizeObjectConfigData(configData, ctx) {
685
+ const { files, excludedFiles, ...configBody } = configData;
686
+ const criteria = OverrideTester.create(
687
+ files,
688
+ excludedFiles,
689
+ ctx.matchBasePath
690
+ );
691
+ const elements = this._normalizeObjectConfigDataBody(configBody, ctx);
692
+
693
+ // Apply the criteria to every element.
694
+ for (const element of elements) {
695
+
696
+ /*
697
+ * Merge the criteria.
698
+ * This is for the `overrides` entries that came from the
699
+ * configurations of `overrides[].extends`.
700
+ */
701
+ element.criteria = OverrideTester.and(criteria, element.criteria);
702
+
703
+ /*
704
+ * Remove `root` property to ignore `root` settings which came from
705
+ * `extends` in `overrides`.
706
+ */
707
+ if (element.criteria) {
708
+ element.root = void 0;
709
+ }
710
+
711
+ yield element;
712
+ }
713
+ }
714
+
715
+ /**
716
+ * Normalize a given config to an array.
717
+ * @param {ConfigData} configData The config data to normalize.
718
+ * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
719
+ * @returns {IterableIterator<ConfigArrayElement>} The normalized config.
720
+ * @private
721
+ */
722
+ *_normalizeObjectConfigDataBody(
723
+ {
724
+ env,
725
+ extends: extend,
726
+ globals,
727
+ ignorePatterns,
728
+ noInlineConfig,
729
+ parser: parserName,
730
+ parserOptions,
731
+ plugins: pluginList,
732
+ processor,
733
+ reportUnusedDisableDirectives,
734
+ root,
735
+ rules,
736
+ settings,
737
+ overrides: overrideList = []
738
+ },
739
+ ctx
740
+ ) {
741
+ const extendList = Array.isArray(extend) ? extend : [extend];
742
+ const ignorePattern = ignorePatterns && new IgnorePattern(
743
+ Array.isArray(ignorePatterns) ? ignorePatterns : [ignorePatterns],
744
+ ctx.matchBasePath
745
+ );
746
+
747
+ // Flatten `extends`.
748
+ for (const extendName of extendList.filter(Boolean)) {
749
+ yield* this._loadExtends(extendName, ctx);
750
+ }
751
+
752
+ // Load parser & plugins.
753
+ const parser = parserName && this._loadParser(parserName, ctx);
754
+ const plugins = pluginList && this._loadPlugins(pluginList, ctx);
755
+
756
+ // Yield pseudo config data for file extension processors.
757
+ if (plugins) {
758
+ yield* this._takeFileExtensionProcessors(plugins, ctx);
759
+ }
760
+
761
+ // Yield the config data except `extends` and `overrides`.
762
+ yield {
763
+
764
+ // Debug information.
765
+ type: ctx.type,
766
+ name: ctx.name,
767
+ filePath: ctx.filePath,
768
+
769
+ // Config data.
770
+ criteria: null,
771
+ env,
772
+ globals,
773
+ ignorePattern,
774
+ noInlineConfig,
775
+ parser,
776
+ parserOptions,
777
+ plugins,
778
+ processor,
779
+ reportUnusedDisableDirectives,
780
+ root,
781
+ rules,
782
+ settings
783
+ };
784
+
785
+ // Flatten `overries`.
786
+ for (let i = 0; i < overrideList.length; ++i) {
787
+ yield* this._normalizeObjectConfigData(
788
+ overrideList[i],
789
+ { ...ctx, name: `${ctx.name}#overrides[${i}]` }
790
+ );
791
+ }
792
+ }
793
+
794
+ /**
795
+ * Load configs of an element in `extends`.
796
+ * @param {string} extendName The name of a base config.
797
+ * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
798
+ * @returns {IterableIterator<ConfigArrayElement>} The normalized config.
799
+ * @private
800
+ */
801
+ _loadExtends(extendName, ctx) {
802
+ debug("Loading {extends:%j} relative to %s", extendName, ctx.filePath);
803
+ try {
804
+ if (extendName.startsWith("eslint:")) {
805
+ return this._loadExtendedBuiltInConfig(extendName, ctx);
806
+ }
807
+ if (extendName.startsWith("plugin:")) {
808
+ return this._loadExtendedPluginConfig(extendName, ctx);
809
+ }
810
+ return this._loadExtendedShareableConfig(extendName, ctx);
811
+ } catch (error) {
812
+ error.message += `\nReferenced from: ${ctx.filePath || ctx.name}`;
813
+ throw error;
814
+ }
815
+ }
816
+
817
+ /**
818
+ * Load configs of an element in `extends`.
819
+ * @param {string} extendName The name of a base config.
820
+ * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
821
+ * @returns {IterableIterator<ConfigArrayElement>} The normalized config.
822
+ * @private
823
+ */
824
+ _loadExtendedBuiltInConfig(extendName, ctx) {
825
+ const {
826
+ eslintAllPath,
827
+ getEslintAllConfig,
828
+ eslintRecommendedPath,
829
+ getEslintRecommendedConfig
830
+ } = internalSlotsMap.get(this);
831
+
832
+ if (extendName === "eslint:recommended") {
833
+ const name = `${ctx.name} » ${extendName}`;
834
+
835
+ if (getEslintRecommendedConfig) {
836
+ if (typeof getEslintRecommendedConfig !== "function") {
837
+ throw new Error(`getEslintRecommendedConfig must be a function instead of '${getEslintRecommendedConfig}'`);
838
+ }
839
+ return this._normalizeConfigData(getEslintRecommendedConfig(), { ...ctx, name, filePath: "" });
840
+ }
841
+ return this._loadConfigData({
842
+ ...ctx,
843
+ name,
844
+ filePath: eslintRecommendedPath
845
+ });
846
+ }
847
+ if (extendName === "eslint:all") {
848
+ const name = `${ctx.name} » ${extendName}`;
849
+
850
+ if (getEslintAllConfig) {
851
+ if (typeof getEslintAllConfig !== "function") {
852
+ throw new Error(`getEslintAllConfig must be a function instead of '${getEslintAllConfig}'`);
853
+ }
854
+ return this._normalizeConfigData(getEslintAllConfig(), { ...ctx, name, filePath: "" });
855
+ }
856
+ return this._loadConfigData({
857
+ ...ctx,
858
+ name,
859
+ filePath: eslintAllPath
860
+ });
861
+ }
862
+
863
+ throw configInvalidError(extendName, ctx.name, "extend-config-missing");
864
+ }
865
+
866
+ /**
867
+ * Load configs of an element in `extends`.
868
+ * @param {string} extendName The name of a base config.
869
+ * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
870
+ * @returns {IterableIterator<ConfigArrayElement>} The normalized config.
871
+ * @private
872
+ */
873
+ _loadExtendedPluginConfig(extendName, ctx) {
874
+ const slashIndex = extendName.lastIndexOf("/");
875
+
876
+ if (slashIndex === -1) {
877
+ throw configInvalidError(extendName, ctx.filePath, "plugin-invalid");
878
+ }
879
+
880
+ const pluginName = extendName.slice("plugin:".length, slashIndex);
881
+ const configName = extendName.slice(slashIndex + 1);
882
+
883
+ if (isFilePath(pluginName)) {
884
+ throw new Error("'extends' cannot use a file path for plugins.");
885
+ }
886
+
887
+ const plugin = this._loadPlugin(pluginName, ctx);
888
+ const configData =
889
+ plugin.definition &&
890
+ plugin.definition.configs[configName];
891
+
892
+ if (configData) {
893
+ return this._normalizeConfigData(configData, {
894
+ ...ctx,
895
+ filePath: plugin.filePath || ctx.filePath,
896
+ name: `${ctx.name} » plugin:${plugin.id}/${configName}`
897
+ });
898
+ }
899
+
900
+ throw plugin.error || configInvalidError(extendName, ctx.filePath, "extend-config-missing");
901
+ }
902
+
903
+ /**
904
+ * Load configs of an element in `extends`.
905
+ * @param {string} extendName The name of a base config.
906
+ * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
907
+ * @returns {IterableIterator<ConfigArrayElement>} The normalized config.
908
+ * @private
909
+ */
910
+ _loadExtendedShareableConfig(extendName, ctx) {
911
+ const { cwd, resolver } = internalSlotsMap.get(this);
912
+ const relativeTo = ctx.filePath || path.join(cwd, "__placeholder__.js");
913
+ let request;
914
+
915
+ if (isFilePath(extendName)) {
916
+ request = extendName;
917
+ } else if (extendName.startsWith(".")) {
918
+ request = `./${extendName}`; // For backward compatibility. A ton of tests depended on this behavior.
919
+ } else {
920
+ request = naming.normalizePackageName(
921
+ extendName,
922
+ "eslint-config"
923
+ );
924
+ }
925
+
926
+ let filePath;
927
+
928
+ try {
929
+ filePath = resolver.resolve(request, relativeTo);
930
+ } catch (error) {
931
+ /* istanbul ignore else */
932
+ if (error && error.code === "MODULE_NOT_FOUND") {
933
+ throw configInvalidError(extendName, ctx.filePath, "extend-config-missing");
934
+ }
935
+ throw error;
936
+ }
937
+
938
+ writeDebugLogForLoading(request, relativeTo, filePath);
939
+ return this._loadConfigData({
940
+ ...ctx,
941
+ filePath,
942
+ name: `${ctx.name} » ${request}`
943
+ });
944
+ }
945
+
946
+ /**
947
+ * Load given plugins.
948
+ * @param {string[]} names The plugin names to load.
949
+ * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
950
+ * @returns {Record<string,DependentPlugin>} The loaded parser.
951
+ * @private
952
+ */
953
+ _loadPlugins(names, ctx) {
954
+ return names.reduce((map, name) => {
955
+ if (isFilePath(name)) {
956
+ throw new Error("Plugins array cannot includes file paths.");
957
+ }
958
+ const plugin = this._loadPlugin(name, ctx);
959
+
960
+ map[plugin.id] = plugin;
961
+
962
+ return map;
963
+ }, {});
964
+ }
965
+
966
+ /**
967
+ * Load a given parser.
968
+ * @param {string} nameOrPath The package name or the path to a parser file.
969
+ * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
970
+ * @returns {DependentParser} The loaded parser.
971
+ */
972
+ _loadParser(nameOrPath, ctx) {
973
+ debug("Loading parser %j from %s", nameOrPath, ctx.filePath);
974
+
975
+ const { cwd, resolver } = internalSlotsMap.get(this);
976
+ const relativeTo = ctx.filePath || path.join(cwd, "__placeholder__.js");
977
+
978
+ try {
979
+ const filePath = resolver.resolve(nameOrPath, relativeTo);
980
+
981
+ writeDebugLogForLoading(nameOrPath, relativeTo, filePath);
982
+
983
+ return new ConfigDependency({
984
+ definition: require(filePath),
985
+ filePath,
986
+ id: nameOrPath,
987
+ importerName: ctx.name,
988
+ importerPath: ctx.filePath
989
+ });
990
+ } catch (error) {
991
+
992
+ // If the parser name is "espree", load the espree of ESLint.
993
+ if (nameOrPath === "espree") {
994
+ debug("Fallback espree.");
995
+ return new ConfigDependency({
996
+ definition: require("espree"),
997
+ filePath: require.resolve("espree"),
998
+ id: nameOrPath,
999
+ importerName: ctx.name,
1000
+ importerPath: ctx.filePath
1001
+ });
1002
+ }
1003
+
1004
+ debug("Failed to load parser '%s' declared in '%s'.", nameOrPath, ctx.name);
1005
+ error.message = `Failed to load parser '${nameOrPath}' declared in '${ctx.name}': ${error.message}`;
1006
+
1007
+ return new ConfigDependency({
1008
+ error,
1009
+ id: nameOrPath,
1010
+ importerName: ctx.name,
1011
+ importerPath: ctx.filePath
1012
+ });
1013
+ }
1014
+ }
1015
+
1016
+ /**
1017
+ * Load a given plugin.
1018
+ * @param {string} name The plugin name to load.
1019
+ * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
1020
+ * @returns {DependentPlugin} The loaded plugin.
1021
+ * @private
1022
+ */
1023
+ _loadPlugin(name, ctx) {
1024
+ debug("Loading plugin %j from %s", name, ctx.filePath);
1025
+
1026
+ const { additionalPluginPool, resolver } = internalSlotsMap.get(this);
1027
+ const request = naming.normalizePackageName(name, "eslint-plugin");
1028
+ const id = naming.getShorthandName(request, "eslint-plugin");
1029
+ const relativeTo = path.join(ctx.pluginBasePath, "__placeholder__.js");
1030
+
1031
+ if (name.match(/\s+/u)) {
1032
+ const error = Object.assign(
1033
+ new Error(`Whitespace found in plugin name '${name}'`),
1034
+ {
1035
+ messageTemplate: "whitespace-found",
1036
+ messageData: { pluginName: request }
1037
+ }
1038
+ );
1039
+
1040
+ return new ConfigDependency({
1041
+ error,
1042
+ id,
1043
+ importerName: ctx.name,
1044
+ importerPath: ctx.filePath
1045
+ });
1046
+ }
1047
+
1048
+ // Check for additional pool.
1049
+ const plugin =
1050
+ additionalPluginPool.get(request) ||
1051
+ additionalPluginPool.get(id);
1052
+
1053
+ if (plugin) {
1054
+ return new ConfigDependency({
1055
+ definition: normalizePlugin(plugin),
1056
+ original: plugin,
1057
+ filePath: "", // It's unknown where the plugin came from.
1058
+ id,
1059
+ importerName: ctx.name,
1060
+ importerPath: ctx.filePath
1061
+ });
1062
+ }
1063
+
1064
+ let filePath;
1065
+ let error;
1066
+
1067
+ try {
1068
+ filePath = resolver.resolve(request, relativeTo);
1069
+ } catch (resolveError) {
1070
+ error = resolveError;
1071
+ /* istanbul ignore else */
1072
+ if (error && error.code === "MODULE_NOT_FOUND") {
1073
+ error.messageTemplate = "plugin-missing";
1074
+ error.messageData = {
1075
+ pluginName: request,
1076
+ resolvePluginsRelativeTo: ctx.pluginBasePath,
1077
+ importerName: ctx.name
1078
+ };
1079
+ }
1080
+ }
1081
+
1082
+ if (filePath) {
1083
+ try {
1084
+ writeDebugLogForLoading(request, relativeTo, filePath);
1085
+
1086
+ const startTime = Date.now();
1087
+ const pluginDefinition = require(filePath);
1088
+
1089
+ debug(`Plugin ${filePath} loaded in: ${Date.now() - startTime}ms`);
1090
+
1091
+ return new ConfigDependency({
1092
+ definition: normalizePlugin(pluginDefinition),
1093
+ original: pluginDefinition,
1094
+ filePath,
1095
+ id,
1096
+ importerName: ctx.name,
1097
+ importerPath: ctx.filePath
1098
+ });
1099
+ } catch (loadError) {
1100
+ error = loadError;
1101
+ }
1102
+ }
1103
+
1104
+ debug("Failed to load plugin '%s' declared in '%s'.", name, ctx.name);
1105
+ error.message = `Failed to load plugin '${name}' declared in '${ctx.name}': ${error.message}`;
1106
+ return new ConfigDependency({
1107
+ error,
1108
+ id,
1109
+ importerName: ctx.name,
1110
+ importerPath: ctx.filePath
1111
+ });
1112
+ }
1113
+
1114
+ /**
1115
+ * Take file expression processors as config array elements.
1116
+ * @param {Record<string,DependentPlugin>} plugins The plugin definitions.
1117
+ * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
1118
+ * @returns {IterableIterator<ConfigArrayElement>} The config array elements of file expression processors.
1119
+ * @private
1120
+ */
1121
+ *_takeFileExtensionProcessors(plugins, ctx) {
1122
+ for (const pluginId of Object.keys(plugins)) {
1123
+ const processors =
1124
+ plugins[pluginId] &&
1125
+ plugins[pluginId].definition &&
1126
+ plugins[pluginId].definition.processors;
1127
+
1128
+ if (!processors) {
1129
+ continue;
1130
+ }
1131
+
1132
+ for (const processorId of Object.keys(processors)) {
1133
+ if (processorId.startsWith(".")) {
1134
+ yield* this._normalizeObjectConfigData(
1135
+ {
1136
+ files: [`*${processorId}`],
1137
+ processor: `${pluginId}/${processorId}`
1138
+ },
1139
+ {
1140
+ ...ctx,
1141
+ type: "implicit-processor",
1142
+ name: `${ctx.name}#processors["${pluginId}/${processorId}"]`
1143
+ }
1144
+ );
1145
+ }
1146
+ }
1147
+ }
1148
+ }
1149
+ }
1150
+
1151
+ export { ConfigArrayFactory, createContext };