@sap/cds-dk 10.1.1 → 10.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (870) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/bin/add.js +7 -2
  3. package/bin/bind.js +0 -2
  4. package/bin/bindings.js +35 -0
  5. package/bin/build.js +11 -6
  6. package/bin/compile/index.js +1 -0
  7. package/bin/completion/index.js +10 -448
  8. package/bin/completion/scripts/cds.fish +24 -16
  9. package/bin/completion/scripts/cds.ps1 +26 -25
  10. package/bin/completion/scripts/cds.sh +22 -19
  11. package/bin/completion/scripts/cds.zsh +22 -19
  12. package/bin/deploy/index.js +1 -1
  13. package/bin/deploy/to-hana/hana.js +5 -4
  14. package/bin/env.js +0 -1
  15. package/bin/eval.js +9 -5
  16. package/bin/export.js +6 -4
  17. package/bin/help/export.md +28 -4
  18. package/bin/import.js +6 -5
  19. package/bin/inspect.js +0 -1
  20. package/bin/login.js +28 -3
  21. package/bin/repl.js +82 -26
  22. package/bin/run.js +6 -7
  23. package/bin/serve.js +6 -7
  24. package/bin/up.js +7 -2
  25. package/bin/upgrade/steps/install.js +6 -6
  26. package/bin/watch/index.js +1 -0
  27. package/lib/build/index.js +11 -7
  28. package/lib/build/plugins/featureToggles.js +2 -2
  29. package/lib/build/plugins/hana/index.js +1 -1
  30. package/lib/build/plugins/helm/files/subcharts/web-application/Chart.yaml +1 -1
  31. package/lib/build/plugins/helm/files/subcharts/web-application/templates/_helpers.tpl +7 -0
  32. package/lib/build/plugins/helm/files/subcharts/web-application/templates/api-rule.yaml +1 -0
  33. package/lib/build/plugins/helm/files/subcharts/web-application/templates/service-binding.yaml +4 -4
  34. package/lib/build/plugins/helm/files/subcharts/web-application/values.schema.json +13 -0
  35. package/lib/build/plugins/helm/files/subcharts/web-application/values.yaml +7 -1
  36. package/lib/build/plugins/internal.js +0 -26
  37. package/lib/build/plugins/java/index.js +5 -1
  38. package/lib/build/plugins/nodejs/index.js +13 -4
  39. package/lib/build/util.js +4 -5
  40. package/lib/cds.js +8 -2
  41. package/lib/env/schemas/cds-rc.js +5 -0
  42. package/lib/import/importapi.js +2 -3
  43. package/lib/init/constants.js +1 -1
  44. package/lib/init/index.js +8 -3
  45. package/lib/init/merge.js +21 -17
  46. package/lib/init/plugin.js +1 -1
  47. package/lib/init/projectReader.js +13 -10
  48. package/lib/init/registries/mta.js +0 -6
  49. package/lib/init/template/ai/index.js +4 -4
  50. package/lib/init/template/ams/files/extensionDeveloper.dcl +6 -0
  51. package/lib/init/template/ams/files/mta.yaml.hbs +6 -0
  52. package/lib/init/template/ams/files/sidecar.package.json.hbs +5 -0
  53. package/lib/init/template/ams/index.js +42 -40
  54. package/lib/init/template/app-frontend/files/mta.yaml.hbs +2 -0
  55. package/lib/init/template/app-frontend/files/ui5.yaml.hbs +0 -4
  56. package/lib/init/template/app-frontend/index.js +29 -24
  57. package/lib/init/template/application-logging/index.js +6 -6
  58. package/lib/init/template/approuter/files/xs-app.json.hbs +22 -0
  59. package/lib/init/template/approuter/index.js +20 -13
  60. package/lib/init/template/attachments/index.js +3 -3
  61. package/lib/init/template/audit-logging/index.js +4 -4
  62. package/lib/init/template/cloud-logging/index.js +12 -6
  63. package/lib/init/template/completion/completionSetup.js +19 -6
  64. package/lib/init/template/connectivity/index.js +3 -3
  65. package/lib/init/template/data/as-csv.js +7 -4
  66. package/lib/init/template/data/as-json.js +77 -20
  67. package/lib/init/template/destination/index.js +12 -9
  68. package/lib/init/template/dynatrace/index.js +5 -5
  69. package/lib/init/template/enterprise-messaging/index.js +10 -7
  70. package/lib/init/template/enterprise-messaging-shared/index.js +4 -4
  71. package/lib/init/template/event-mesh/index.js +3 -0
  72. package/lib/init/template/extensibility/index.js +2 -2
  73. package/lib/init/template/extension/index.js +26 -0
  74. package/lib/init/template/github-actions/index.js +3 -3
  75. package/lib/init/template/hana/files/package.json.hbs +3 -2
  76. package/lib/init/template/hana/index.js +5 -5
  77. package/lib/init/template/hana-serverless/index.js +3 -3
  78. package/lib/init/template/html5-repo/files/mta.yaml.hbs +2 -0
  79. package/lib/init/template/html5-repo/files/ui5.yaml.hbs +0 -4
  80. package/lib/init/template/html5-repo/index.js +68 -40
  81. package/lib/init/template/http/index.js +1 -1
  82. package/lib/init/template/ias/index.js +7 -7
  83. package/lib/init/template/initial/files/.gitignore.hbs +1 -0
  84. package/lib/init/template/kafka/index.js +3 -3
  85. package/lib/init/template/kyma/index.js +7 -9
  86. package/lib/init/template/malware-scanner/index.js +3 -3
  87. package/lib/init/template/mta/index.js +6 -3
  88. package/lib/init/template/multitenancy/index.js +6 -7
  89. package/lib/init/template/notifications/index.js +2 -2
  90. package/lib/init/template/portal/index.js +16 -10
  91. package/lib/init/template/postgres/index.js +5 -5
  92. package/lib/init/template/react/files/index.html.hbs +1 -1
  93. package/lib/init/template/react/files/package.json.hbs +3 -2
  94. package/lib/init/template/react/files/src/{App.jsx.hbs → App.{{jsxExtension}}.hbs} +8 -2
  95. package/lib/init/template/react/files/src/{main.jsx → main.{{jsxExtension}}.hbs} +2 -2
  96. package/lib/init/template/react/index.js +23 -4
  97. package/lib/init/template/react/typescript/src/vite-env.d.ts +1 -0
  98. package/lib/init/template/react/typescript/tsconfig.json.hbs +16 -0
  99. package/lib/init/template/redis/index.js +2 -2
  100. package/lib/init/template/side-by-side-extensibility/index.js +6 -3
  101. package/lib/init/template/typescript/files/tsconfig.json +3 -1
  102. package/lib/init/template/vue/files/index.html.hbs +1 -1
  103. package/lib/init/template/vue/files/package.json.hbs +2 -1
  104. package/lib/init/template/vue/files/src/App.vue.hbs +8 -2
  105. package/lib/init/template/vue/index.js +20 -4
  106. package/lib/init/template/vue/typescript/tsconfig.json +11 -0
  107. package/lib/init/template/workzone-standard/files/mta.yaml.hbs +2 -2
  108. package/lib/init/template/workzone-standard/index.js +30 -28
  109. package/lib/init/template/xsuaa/files/mta.yaml.hbs +1 -1
  110. package/lib/init/template/xsuaa/files/values.yaml.hbs +1 -1
  111. package/lib/init/template/xsuaa/index.js +34 -22
  112. package/lib/mtx/auth_manager.js +8 -2
  113. package/lib/mtx/browser_login.js +181 -0
  114. package/lib/mtx/params.js +6 -0
  115. package/lib/mtx/settings_manager.js +29 -4
  116. package/lib/util/cf.js +44 -8
  117. package/lib/util/fs.js +2 -2
  118. package/node_modules/@cap-js/db-service/CHANGELOG.md +23 -0
  119. package/node_modules/@cap-js/db-service/lib/cqn2pql.js +4 -0
  120. package/node_modules/@cap-js/db-service/lib/cqn2sql.js +3 -0
  121. package/node_modules/@cap-js/db-service/lib/cqn4sql.js +17 -28
  122. package/node_modules/@cap-js/db-service/lib/infer/index.js +20 -27
  123. package/node_modules/@cap-js/db-service/package.json +1 -1
  124. package/node_modules/@cap-js/openapi/cds-plugin.js +12 -0
  125. package/node_modules/@cap-js/openapi/index.js +3 -1
  126. package/node_modules/@cap-js/openapi/lib/compile/csdl2openapi.js +652 -413
  127. package/node_modules/@cap-js/openapi/lib/compile/diagram.js +16 -13
  128. package/node_modules/@cap-js/openapi/lib/compile/index.js +10 -7
  129. package/node_modules/@cap-js/openapi/lib/compile/property-util.js +51 -0
  130. package/{lib/import/openapi → node_modules/@cap-js/openapi/lib/import}/importOpenAPI.js +12 -9
  131. package/{lib/import/openapi → node_modules/@cap-js/openapi/lib/import}/index.js +4 -3
  132. package/node_modules/@cap-js/openapi/package.json +71 -3
  133. package/node_modules/@cap-js/sqlite/CHANGELOG.md +18 -0
  134. package/node_modules/@cap-js/sqlite/package.json +3 -3
  135. package/node_modules/@isaacs/fs-minipass/LICENSE +15 -0
  136. package/node_modules/@isaacs/fs-minipass/README.md +71 -0
  137. package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts +118 -0
  138. package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts.map +1 -0
  139. package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js +430 -0
  140. package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js.map +1 -0
  141. package/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json +3 -0
  142. package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts +118 -0
  143. package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts.map +1 -0
  144. package/node_modules/@isaacs/fs-minipass/dist/esm/index.js +420 -0
  145. package/node_modules/@isaacs/fs-minipass/dist/esm/index.js.map +1 -0
  146. package/node_modules/@isaacs/fs-minipass/dist/esm/package.json +3 -0
  147. package/node_modules/@isaacs/fs-minipass/package.json +72 -0
  148. package/node_modules/@sap/cds/CHANGELOG.md +71 -1
  149. package/node_modules/@sap/cds/_i18n/messages_ar.properties +1 -0
  150. package/node_modules/@sap/cds/_i18n/messages_bg.properties +1 -0
  151. package/node_modules/@sap/cds/_i18n/messages_cs.properties +1 -0
  152. package/node_modules/@sap/cds/_i18n/messages_da.properties +1 -0
  153. package/node_modules/@sap/cds/_i18n/messages_de.properties +1 -0
  154. package/node_modules/@sap/cds/_i18n/messages_el.properties +1 -0
  155. package/node_modules/@sap/cds/_i18n/messages_en.properties +1 -0
  156. package/node_modules/@sap/cds/_i18n/messages_es.properties +1 -0
  157. package/node_modules/@sap/cds/_i18n/messages_es_MX.properties +1 -0
  158. package/node_modules/@sap/cds/_i18n/messages_fi.properties +1 -0
  159. package/node_modules/@sap/cds/_i18n/messages_fr.properties +1 -0
  160. package/node_modules/@sap/cds/_i18n/messages_he.properties +1 -0
  161. package/node_modules/@sap/cds/_i18n/messages_hr.properties +1 -0
  162. package/node_modules/@sap/cds/_i18n/messages_hu.properties +1 -0
  163. package/node_modules/@sap/cds/_i18n/messages_it.properties +1 -0
  164. package/node_modules/@sap/cds/_i18n/messages_ja.properties +1 -0
  165. package/node_modules/@sap/cds/_i18n/messages_kk.properties +1 -0
  166. package/node_modules/@sap/cds/_i18n/messages_ko.properties +1 -0
  167. package/node_modules/@sap/cds/_i18n/messages_ms.properties +1 -0
  168. package/node_modules/@sap/cds/_i18n/messages_nl.properties +1 -0
  169. package/node_modules/@sap/cds/_i18n/messages_no.properties +1 -0
  170. package/node_modules/@sap/cds/_i18n/messages_pl.properties +1 -0
  171. package/node_modules/@sap/cds/_i18n/messages_pt.properties +1 -0
  172. package/node_modules/@sap/cds/_i18n/messages_ro.properties +1 -0
  173. package/node_modules/@sap/cds/_i18n/messages_ru.properties +1 -0
  174. package/node_modules/@sap/cds/_i18n/messages_sh.properties +1 -0
  175. package/node_modules/@sap/cds/_i18n/messages_sk.properties +1 -0
  176. package/node_modules/@sap/cds/_i18n/messages_sl.properties +1 -0
  177. package/node_modules/@sap/cds/_i18n/messages_sv.properties +1 -0
  178. package/node_modules/@sap/cds/_i18n/messages_th.properties +1 -0
  179. package/node_modules/@sap/cds/_i18n/messages_tr.properties +1 -0
  180. package/node_modules/@sap/cds/_i18n/messages_uk.properties +1 -0
  181. package/node_modules/@sap/cds/_i18n/messages_vi.properties +1 -0
  182. package/node_modules/@sap/cds/_i18n/messages_zh_CN.properties +1 -0
  183. package/node_modules/@sap/cds/_i18n/messages_zh_TW.properties +1 -0
  184. package/node_modules/@sap/cds/app/index-client.js +164 -0
  185. package/node_modules/@sap/cds/app/index.css +598 -87
  186. package/node_modules/@sap/cds/app/index.html +54 -30
  187. package/node_modules/@sap/cds/app/index.js +311 -67
  188. package/node_modules/@sap/cds/app/table.html +226 -0
  189. package/node_modules/@sap/cds/app/table.js +302 -0
  190. package/node_modules/@sap/cds/bin/serve.js +3 -2
  191. package/node_modules/@sap/cds/common.cds +3 -3
  192. package/node_modules/@sap/cds/eslint.config.mjs +2 -0
  193. package/node_modules/@sap/cds/lib/compile/cdsc.js +7 -0
  194. package/node_modules/@sap/cds/lib/compile/for/embeddings.js +27 -0
  195. package/node_modules/@sap/cds/lib/compile/load.js +2 -2
  196. package/node_modules/@sap/cds/lib/compile/minify.js +17 -2
  197. package/node_modules/@sap/cds/lib/compile/parse.js +3 -0
  198. package/node_modules/@sap/cds/lib/compile/resolve.js +16 -14
  199. package/node_modules/@sap/cds/lib/core/classes.js +1 -0
  200. package/node_modules/@sap/cds/lib/dbs/cds-deploy.js +4 -5
  201. package/node_modules/@sap/cds/lib/env/cds-env.js +132 -70
  202. package/node_modules/@sap/cds/lib/env/cds-requires/auth-strategies.js +62 -0
  203. package/node_modules/@sap/cds/lib/env/cds-requires/databases.js +49 -0
  204. package/node_modules/@sap/cds/lib/env/cds-requires/embeddings.js +8 -0
  205. package/node_modules/@sap/cds/lib/env/cds-requires/index.js +27 -0
  206. package/node_modules/@sap/cds/lib/env/cds-requires/messaging.js +82 -0
  207. package/node_modules/@sap/cds/lib/env/cds-requires/platform.js +23 -0
  208. package/node_modules/@sap/cds/lib/env/cds-requires/queues.js +34 -0
  209. package/node_modules/@sap/cds/lib/env/cds-requires/services.js +32 -0
  210. package/node_modules/@sap/cds/lib/env/defaults.js +9 -1
  211. package/node_modules/@sap/cds/lib/i18n/files.js +4 -4
  212. package/node_modules/@sap/cds/lib/i18n/locale.js +1 -1
  213. package/node_modules/@sap/cds/lib/index.js +9 -9
  214. package/node_modules/@sap/cds/lib/log/cds-log.js +3 -3
  215. package/node_modules/@sap/cds/lib/ql/SELECT.js +2 -0
  216. package/node_modules/@sap/cds/lib/ql/UPDATE.js +1 -1
  217. package/node_modules/@sap/cds/lib/ql/cds.ql-Query.js +4 -1
  218. package/node_modules/@sap/cds/lib/ql/core/@types/cqn.d.ts +146 -0
  219. package/node_modules/@sap/cds/lib/ql/core/@types/exprs.d.ts +51 -0
  220. package/node_modules/@sap/cds/lib/ql/core/@types/index.d.ts +29 -0
  221. package/node_modules/@sap/cds/lib/ql/core/@types/package.json +7 -0
  222. package/node_modules/@sap/cds/lib/ql/core/@types/ql/delete.d.ts +8 -0
  223. package/node_modules/@sap/cds/lib/ql/core/@types/ql/insert.d.ts +19 -0
  224. package/node_modules/@sap/cds/lib/ql/core/@types/ql/select.d.ts +24 -0
  225. package/node_modules/@sap/cds/lib/ql/core/@types/ql/update.d.ts +10 -0
  226. package/node_modules/@sap/cds/lib/ql/core/@types/query.d.ts +18 -0
  227. package/node_modules/@sap/cds/lib/ql/core/cql/parser.min.js +1 -0
  228. package/node_modules/@sap/cds/lib/ql/core/lib/index.js +69 -0
  229. package/node_modules/@sap/cds/lib/ql/core/lib/ql/cache.js +34 -0
  230. package/node_modules/@sap/cds/lib/ql/core/lib/ql/call-action.js +6 -0
  231. package/node_modules/@sap/cds/lib/ql/core/lib/ql/delete.js +8 -0
  232. package/node_modules/@sap/cds/lib/ql/core/lib/ql/insert.js +26 -0
  233. package/node_modules/@sap/cds/lib/ql/core/lib/ql/select.js +22 -0
  234. package/node_modules/@sap/cds/lib/ql/core/lib/ql/update.js +26 -0
  235. package/node_modules/@sap/cds/lib/ql/core/lib/query.js +85 -0
  236. package/node_modules/@sap/cds/lib/ql/core/lib/xl/fluent.js +47 -0
  237. package/node_modules/@sap/cds/lib/ql/core/lib/xl/ttl.js +24 -0
  238. package/node_modules/@sap/cds/lib/ql/core/license +201 -0
  239. package/node_modules/@sap/cds/lib/ql/core/package.json +24 -0
  240. package/node_modules/@sap/cds/lib/ql/core/readme.md +99 -0
  241. package/node_modules/@sap/cds/lib/ql/core/upstream.json +5 -0
  242. package/node_modules/@sap/cds/lib/req/spawn.js +1 -1
  243. package/node_modules/@sap/cds/lib/srv/bindings.js +111 -115
  244. package/node_modules/@sap/cds/lib/srv/cds-connect.js +11 -10
  245. package/node_modules/@sap/cds/lib/srv/cds-serve.js +16 -7
  246. package/node_modules/@sap/cds/lib/srv/cds.Service.js +13 -7
  247. package/node_modules/@sap/cds/lib/srv/factory.js +8 -10
  248. package/node_modules/@sap/cds/lib/srv/middlewares/auth/ias-auth.js +35 -32
  249. package/node_modules/@sap/cds/lib/srv/middlewares/auth/jwt-auth.js +5 -1
  250. package/node_modules/@sap/cds/lib/srv/middlewares/auth/mocked-users.js +1 -1
  251. package/node_modules/@sap/cds/lib/srv/protocols/hcql.js +230 -79
  252. package/node_modules/@sap/cds/lib/srv/protocols/http.js +7 -3
  253. package/node_modules/@sap/cds/lib/srv/protocols/index.js +7 -2
  254. package/node_modules/@sap/cds/lib/srv/srv-dispatch.js +2 -2
  255. package/node_modules/@sap/cds/lib/utils/cds-utils.js +37 -0
  256. package/node_modules/@sap/cds/lib/utils/csv-reader.js +2 -2
  257. package/node_modules/@sap/cds/libx/_runtime/common/generic/assert.js +18 -27
  258. package/node_modules/@sap/cds/libx/_runtime/common/generic/crud.js +8 -2
  259. package/node_modules/@sap/cds/libx/_runtime/common/utils/cqn.js +1 -1
  260. package/node_modules/@sap/cds/libx/_runtime/common/utils/rewriteAsterisks.js +1 -1
  261. package/node_modules/@sap/cds/libx/_runtime/fiori/lean-draft.js +122 -85
  262. package/node_modules/@sap/cds/libx/_runtime/messaging/common-utils/authorizedRequest.js +24 -1
  263. package/node_modules/@sap/cds/libx/_runtime/messaging/common-utils/normalizeIncomingMessage.js +1 -1
  264. package/node_modules/@sap/cds/libx/_runtime/messaging/kafka.js +1 -1
  265. package/node_modules/@sap/cds/libx/_runtime/remote/Service.js +2 -2
  266. package/node_modules/@sap/cds/libx/_runtime/remote/utils/client.js +3 -2
  267. package/node_modules/@sap/cds/libx/_runtime/remote/utils/query.js +11 -6
  268. package/node_modules/@sap/cds/libx/http/location.js +10 -11
  269. package/node_modules/@sap/cds/libx/odata/middleware/create.js +4 -0
  270. package/node_modules/@sap/cds/libx/odata/middleware/metadata.js +1 -1
  271. package/node_modules/@sap/cds/libx/odata/middleware/operation.js +3 -0
  272. package/node_modules/@sap/cds/libx/odata/middleware/parse.js +9 -0
  273. package/node_modules/@sap/cds/libx/odata/middleware/read.js +7 -1
  274. package/node_modules/@sap/cds/libx/odata/middleware/update.js +5 -1
  275. package/node_modules/@sap/cds/libx/odata/parse/afterburner.js +3 -3
  276. package/node_modules/@sap/cds/libx/odata/parse/multipartToJson.js +1 -1
  277. package/node_modules/@sap/cds/libx/odata/utils/ieee754.js +20 -0
  278. package/node_modules/@sap/cds/libx/queue/SchedulingService.js +4 -0
  279. package/node_modules/@sap/cds/libx/queue/api.js +1 -1
  280. package/node_modules/@sap/cds/libx/queue/index.js +46 -10
  281. package/node_modules/@sap/cds/libx/queue/processing.js +52 -16
  282. package/node_modules/@sap/cds/libx/queue/utils.js +3 -0
  283. package/node_modules/@sap/cds/libx/rest/RestAdapter.js +1 -0
  284. package/node_modules/@sap/cds/package.json +2 -2
  285. package/node_modules/@sap/cds/server.js +1 -0
  286. package/node_modules/@sap/cds/srv/ucl-service.cds +1 -0
  287. package/node_modules/@sap/cds/tasks/enterprise-messaging-deploy.js +13 -5
  288. package/node_modules/@sap/cds-compiler/CHANGELOG.md +83 -0
  289. package/node_modules/@sap/cds-compiler/bin/cdsse.js +1 -1
  290. package/node_modules/@sap/cds-compiler/doc/EffectiveCSN.md +3314 -0
  291. package/node_modules/@sap/cds-compiler/lib/api/main.js +9 -6
  292. package/node_modules/@sap/cds-compiler/lib/api/options.js +3 -3
  293. package/node_modules/@sap/cds-compiler/lib/{model → base}/csnUtils.js +5 -5
  294. package/node_modules/@sap/cds-compiler/lib/base/message-registry.js +54 -6
  295. package/node_modules/@sap/cds-compiler/lib/base/optionProcessor.js +4 -4
  296. package/node_modules/@sap/cds-compiler/lib/{model → base}/sortViews.js +1 -1
  297. package/node_modules/@sap/cds-compiler/lib/checks/assocOutsideService.js +1 -1
  298. package/node_modules/@sap/cds-compiler/lib/checks/checkForTypes.js +1 -1
  299. package/node_modules/@sap/cds-compiler/lib/checks/checkPathsInStoredCalcElement.js +1 -1
  300. package/node_modules/@sap/cds-compiler/lib/checks/elements.js +37 -3
  301. package/node_modules/@sap/cds-compiler/lib/checks/enricher.js +1 -1
  302. package/node_modules/@sap/cds-compiler/lib/checks/existsInForbiddenPlaces.js +1 -1
  303. package/node_modules/@sap/cds-compiler/lib/checks/hasPersistedElements.js +1 -1
  304. package/node_modules/@sap/cds-compiler/lib/checks/manyExpand.js +1 -1
  305. package/node_modules/@sap/cds-compiler/lib/checks/manyNavigations.js +1 -1
  306. package/node_modules/@sap/cds-compiler/lib/checks/onConditions.js +1 -1
  307. package/node_modules/@sap/cds-compiler/lib/checks/parameters.js +1 -1
  308. package/node_modules/@sap/cds-compiler/lib/checks/queryNoDbArtifacts.js +1 -1
  309. package/node_modules/@sap/cds-compiler/lib/checks/selectItems.js +1 -1
  310. package/node_modules/@sap/cds-compiler/lib/checks/structuredAnnoExpressions.js +1 -1
  311. package/node_modules/@sap/cds-compiler/lib/checks/typeParameters.js +1 -1
  312. package/node_modules/@sap/cds-compiler/lib/checks/types.js +1 -1
  313. package/node_modules/@sap/cds-compiler/lib/checks/validator.js +1 -1
  314. package/node_modules/@sap/cds-compiler/lib/compiler/assert-consistency.js +20 -12
  315. package/node_modules/@sap/cds-compiler/lib/compiler/builtins.js +9 -4
  316. package/node_modules/@sap/cds-compiler/lib/compiler/checks.js +50 -0
  317. package/node_modules/@sap/cds-compiler/lib/compiler/define.js +303 -323
  318. package/node_modules/@sap/cds-compiler/lib/compiler/dictionaries.js +5 -0
  319. package/node_modules/@sap/cds-compiler/lib/compiler/extend.js +1015 -1177
  320. package/node_modules/@sap/cds-compiler/lib/compiler/generate.js +55 -42
  321. package/node_modules/@sap/cds-compiler/lib/compiler/populate.js +74 -45
  322. package/node_modules/@sap/cds-compiler/lib/compiler/propagator.js +1 -0
  323. package/node_modules/@sap/cds-compiler/lib/compiler/resolve.js +6 -4
  324. package/node_modules/@sap/cds-compiler/lib/compiler/shared.js +30 -49
  325. package/node_modules/@sap/cds-compiler/lib/compiler/utils.js +32 -18
  326. package/node_modules/@sap/cds-compiler/lib/edm/annotations/edmJson.js +3 -3
  327. package/node_modules/@sap/cds-compiler/lib/edm/annotations/genericTranslation.js +2 -2
  328. package/node_modules/@sap/cds-compiler/lib/edm/annotations/preprocessAnnotations.js +2 -3
  329. package/node_modules/@sap/cds-compiler/lib/edm/csn2edm.js +1 -1
  330. package/node_modules/@sap/cds-compiler/lib/edm/edm.js +6 -7
  331. package/node_modules/@sap/cds-compiler/lib/edm/edmAnnoPreprocessor.js +1 -1
  332. package/node_modules/@sap/cds-compiler/lib/edm/edmInboundChecks.js +1 -1
  333. package/node_modules/@sap/cds-compiler/lib/edm/edmPreprocessor.js +1 -1
  334. package/node_modules/@sap/cds-compiler/lib/edm/edmUtils.js +12 -7
  335. package/node_modules/@sap/cds-compiler/lib/gen/CdlGrammar.checksum +1 -1
  336. package/node_modules/@sap/cds-compiler/lib/gen/CdlParser.js +15 -15
  337. package/node_modules/@sap/cds-compiler/lib/gen/Dictionary.json +7 -0
  338. package/node_modules/@sap/cds-compiler/lib/json/from-csn.js +30 -30
  339. package/node_modules/@sap/cds-compiler/lib/json/to-csn.js +2 -1
  340. package/node_modules/@sap/cds-compiler/lib/main.js +4 -1
  341. package/node_modules/@sap/cds-compiler/lib/parsers/AstBuildingParser.js +42 -15
  342. package/node_modules/@sap/cds-compiler/lib/render/DuplicateChecker.js +37 -11
  343. package/node_modules/@sap/cds-compiler/lib/render/manageConstraints.js +1 -1
  344. package/node_modules/@sap/cds-compiler/lib/render/toCdl.js +11 -6
  345. package/node_modules/@sap/cds-compiler/lib/render/toRename.js +1 -1
  346. package/node_modules/@sap/cds-compiler/lib/render/toSql.js +74 -24
  347. package/node_modules/@sap/cds-compiler/lib/render/utils/common.js +1 -1
  348. package/node_modules/@sap/cds-compiler/lib/render/utils/operators.js +81 -0
  349. package/node_modules/@sap/cds-compiler/lib/render/utils/sql.js +17 -10
  350. package/node_modules/@sap/cds-compiler/lib/transform/db/assertUnique.js +1 -1
  351. package/node_modules/@sap/cds-compiler/lib/transform/db/associations.js +3 -4
  352. package/node_modules/@sap/cds-compiler/lib/transform/db/assocsToQueries/transformExists.js +1 -1
  353. package/node_modules/@sap/cds-compiler/lib/transform/db/backlinks.js +2 -2
  354. package/node_modules/@sap/cds-compiler/lib/transform/db/cdsPersistence.js +1 -1
  355. package/node_modules/@sap/cds-compiler/lib/transform/db/constraints.js +6 -5
  356. package/node_modules/@sap/cds-compiler/lib/transform/db/expansion.js +7 -1
  357. package/node_modules/@sap/cds-compiler/lib/transform/db/flattening.js +2 -2
  358. package/node_modules/@sap/cds-compiler/lib/{modelCompare/compare.js → transform/db/migration/diffModels.js} +5 -5
  359. package/node_modules/@sap/cds-compiler/lib/{modelCompare/utils/filter.js → transform/db/migration/filterDiff.js} +2 -2
  360. package/node_modules/@sap/cds-compiler/lib/transform/db/processSqlServices.js +1 -1
  361. package/node_modules/@sap/cds-compiler/lib/transform/db/rewriteCalculatedElements.js +1 -1
  362. package/node_modules/@sap/cds-compiler/lib/transform/db/temporal.js +1 -1
  363. package/node_modules/@sap/cds-compiler/lib/transform/db/views.js +2 -6
  364. package/node_modules/@sap/cds-compiler/lib/transform/draft/db.js +1 -1
  365. package/node_modules/@sap/cds-compiler/lib/transform/draft/odata.js +1 -1
  366. package/node_modules/@sap/cds-compiler/lib/transform/effective/annotations.js +1 -1
  367. package/node_modules/@sap/cds-compiler/lib/transform/effective/associations.js +1 -1
  368. package/node_modules/@sap/cds-compiler/lib/transform/effective/flattening.js +1 -1
  369. package/node_modules/@sap/cds-compiler/lib/transform/effective/main.js +3 -2
  370. package/node_modules/@sap/cds-compiler/lib/transform/effective/misc.js +2 -1
  371. package/node_modules/@sap/cds-compiler/lib/transform/effective/queries.js +1 -1
  372. package/node_modules/@sap/cds-compiler/lib/transform/effective/types.js +1 -1
  373. package/node_modules/@sap/cds-compiler/lib/transform/forOdata.js +1 -1
  374. package/node_modules/@sap/cds-compiler/lib/transform/forRelationalDB.js +9 -4
  375. package/node_modules/@sap/cds-compiler/lib/transform/localized.js +1 -1
  376. package/node_modules/@sap/cds-compiler/lib/transform/odata/adaptAnnotationRefs.js +5 -11
  377. package/node_modules/@sap/cds-compiler/lib/transform/odata/createForeignKeys.js +1 -1
  378. package/node_modules/@sap/cds-compiler/lib/transform/odata/flattening.js +4 -4
  379. package/node_modules/@sap/cds-compiler/lib/transform/odata/foreignKeyRefsInXprAnnos.js +5 -3
  380. package/node_modules/@sap/cds-compiler/lib/transform/odata/toFinalBaseType.js +29 -5
  381. package/node_modules/@sap/cds-compiler/lib/transform/odata/typesExposure.js +13 -3
  382. package/node_modules/@sap/cds-compiler/lib/transform/odata/utils.js +9 -0
  383. package/node_modules/@sap/cds-compiler/lib/transform/transformUtils.js +2 -2
  384. package/node_modules/@sap/cds-compiler/lib/transform/translateAssocsToJoins.js +1 -1
  385. package/node_modules/@sap/cds-compiler/lib/transform/tupleExpansion.js +1 -1
  386. package/node_modules/@sap/cds-compiler/lib/transform/universalCsn/coreComputed.js +1 -1
  387. package/node_modules/@sap/cds-compiler/lib/transform/universalCsn/universalCsnEnricher.js +1 -1
  388. package/node_modules/@sap/cds-compiler/lib/transform/universalCsn/utils.js +1 -1
  389. package/node_modules/@sap/cds-compiler/package.json +1 -1
  390. package/node_modules/@sap/cds-mtxs/CHANGELOG.md +47 -0
  391. package/node_modules/@sap/cds-mtxs/bin/cds-mtx-migrate.js +4 -6
  392. package/node_modules/@sap/cds-mtxs/bin/cds-mtx.js +5 -4
  393. package/node_modules/@sap/cds-mtxs/cds-plugin.js +38 -2
  394. package/node_modules/@sap/cds-mtxs/db/t0.cds +7 -0
  395. package/node_modules/@sap/cds-mtxs/lib/utils.js +129 -20
  396. package/node_modules/@sap/cds-mtxs/package.json +15 -14
  397. package/node_modules/@sap/cds-mtxs/srv/cf/abstract-provisioning-service.js +13 -12
  398. package/node_modules/@sap/cds-mtxs/srv/cf/saas-provisioning-service.cds +1 -0
  399. package/node_modules/@sap/cds-mtxs/srv/cf/sms-provisioning-service.cds +1 -0
  400. package/node_modules/@sap/cds-mtxs/srv/extensibility/compat/update.js +5 -2
  401. package/node_modules/@sap/cds-mtxs/srv/extensibility/linter/config.js +1 -2
  402. package/node_modules/@sap/cds-mtxs/srv/extensibility/linter/csv-allowlist.js +64 -0
  403. package/node_modules/@sap/cds-mtxs/srv/extensibility/linter/index.js +4 -2
  404. package/node_modules/@sap/cds-mtxs/srv/extensibility/linter/protected-namespace.js +67 -5
  405. package/node_modules/@sap/cds-mtxs/srv/extensibility-service.js +179 -15
  406. package/node_modules/@sap/cds-mtxs/srv/jobs-service.js +12 -3
  407. package/node_modules/@sap/cds-mtxs/srv/plugins/common.js +33 -12
  408. package/node_modules/@sap/cds-mtxs/srv/plugins/hana/ctnr-mgr-base.js +24 -6
  409. package/node_modules/@sap/cds-mtxs/srv/plugins/hana/hdi-ctnr-mgr.js +3 -1
  410. package/node_modules/@sap/cds-mtxs/srv/plugins/hana/hdi-native.js +752 -0
  411. package/node_modules/@sap/cds-mtxs/srv/plugins/hana/serverless.js +17 -20
  412. package/node_modules/@sap/cds-mtxs/srv/plugins/hana/srv-mgr-v2.js +511 -0
  413. package/node_modules/@sap/cds-mtxs/srv/plugins/hana/srv-mgr.js +11 -4
  414. package/node_modules/@sap/cds-mtxs/srv/plugins/hana/tms.js +8 -0
  415. package/node_modules/@sap/cds-mtxs/srv/plugins/hana.js +27 -18
  416. package/node_modules/@sap/cds-mtxs/srv/worker/job-worker-pool.js +1 -1
  417. package/node_modules/@sap/cds-mtxs/srv/worker/job-worker.js +1 -1
  418. package/node_modules/chownr/LICENSE.md +63 -0
  419. package/node_modules/chownr/README.md +3 -0
  420. package/node_modules/chownr/dist/commonjs/index.d.ts +3 -0
  421. package/node_modules/chownr/dist/commonjs/index.d.ts.map +1 -0
  422. package/node_modules/chownr/dist/commonjs/index.js +93 -0
  423. package/node_modules/chownr/dist/commonjs/index.js.map +1 -0
  424. package/node_modules/chownr/dist/commonjs/package.json +3 -0
  425. package/node_modules/chownr/dist/esm/index.d.ts +3 -0
  426. package/node_modules/chownr/dist/esm/index.d.ts.map +1 -0
  427. package/node_modules/chownr/dist/esm/index.js +85 -0
  428. package/node_modules/chownr/dist/esm/index.js.map +1 -0
  429. package/node_modules/chownr/dist/esm/package.json +3 -0
  430. package/node_modules/chownr/package.json +69 -0
  431. package/node_modules/content-disposition/README.md +105 -35
  432. package/node_modules/content-disposition/dist/index.d.ts +72 -0
  433. package/node_modules/content-disposition/dist/index.js +388 -0
  434. package/node_modules/content-disposition/dist/index.js.map +1 -0
  435. package/node_modules/content-disposition/package.json +31 -19
  436. package/node_modules/content-type/README.md +34 -57
  437. package/node_modules/content-type/package.json +35 -25
  438. package/node_modules/express/Readme.md +15 -9
  439. package/node_modules/express/lib/application.js +2 -2
  440. package/node_modules/express/lib/request.js +32 -19
  441. package/node_modules/express/lib/response.js +27 -30
  442. package/node_modules/express/package.json +10 -10
  443. package/node_modules/handlebars/bin/handlebars +1 -1
  444. package/node_modules/handlebars/dist/amd/handlebars/base.js +2 -2
  445. package/node_modules/handlebars/dist/amd/handlebars/compiler/base.js +2 -59
  446. package/node_modules/handlebars/dist/amd/handlebars/compiler/code-gen.js +68 -5
  447. package/node_modules/handlebars/dist/amd/handlebars/compiler/compiler.js +160 -19
  448. package/node_modules/handlebars/dist/amd/handlebars/compiler/javascript-compiler.js +23 -7
  449. package/node_modules/handlebars/dist/amd/handlebars/compiler/node-types.js +12 -0
  450. package/node_modules/handlebars/dist/amd/handlebars/compiler/visitor.js +26 -7
  451. package/node_modules/handlebars/dist/amd/handlebars/compiler/whitespace-control.js +9 -4
  452. package/node_modules/handlebars/dist/amd/handlebars/exception.js +8 -4
  453. package/node_modules/handlebars/dist/amd/handlebars/helpers/each.js +40 -14
  454. package/node_modules/handlebars/dist/amd/handlebars/internal/proto-access.js +21 -1
  455. package/node_modules/handlebars/dist/amd/handlebars/runtime.js +24 -4
  456. package/node_modules/handlebars/dist/amd/handlebars/utils.js +4 -3
  457. package/node_modules/handlebars/dist/amd/precompiler.js +13 -7
  458. package/node_modules/handlebars/dist/cjs/handlebars/base.js +2 -2
  459. package/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js +1 -60
  460. package/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js +64 -4
  461. package/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js +161 -18
  462. package/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js +23 -7
  463. package/node_modules/handlebars/dist/cjs/handlebars/compiler/node-types.js +10 -0
  464. package/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js +29 -6
  465. package/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js +9 -4
  466. package/node_modules/handlebars/dist/cjs/handlebars/exception.js +8 -4
  467. package/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js +40 -14
  468. package/node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js +21 -1
  469. package/node_modules/handlebars/dist/cjs/handlebars/runtime.js +24 -4
  470. package/node_modules/handlebars/dist/cjs/handlebars/utils.js +4 -3
  471. package/node_modules/handlebars/dist/cjs/precompiler.js +14 -6
  472. package/node_modules/handlebars/dist/handlebars.amd.js +401 -130
  473. package/node_modules/handlebars/dist/handlebars.amd.min.js +4 -4
  474. package/node_modules/handlebars/dist/handlebars.js +396 -125
  475. package/node_modules/handlebars/dist/handlebars.min.js +4 -4
  476. package/node_modules/handlebars/dist/handlebars.runtime.amd.js +100 -29
  477. package/node_modules/handlebars/dist/handlebars.runtime.amd.min.js +2 -2
  478. package/node_modules/handlebars/dist/handlebars.runtime.js +94 -23
  479. package/node_modules/handlebars/dist/handlebars.runtime.min.js +2 -2
  480. package/node_modules/handlebars/lib/handlebars/base.js +1 -1
  481. package/node_modules/handlebars/lib/handlebars/compiler/base.js +0 -67
  482. package/node_modules/handlebars/lib/handlebars/compiler/code-gen.js +65 -11
  483. package/node_modules/handlebars/lib/handlebars/compiler/compiler.js +164 -23
  484. package/node_modules/handlebars/lib/handlebars/compiler/javascript-compiler.js +23 -7
  485. package/node_modules/handlebars/lib/handlebars/compiler/node-types.js +24 -0
  486. package/node_modules/handlebars/lib/handlebars/compiler/visitor.js +29 -5
  487. package/node_modules/handlebars/lib/handlebars/compiler/whitespace-control.js +16 -5
  488. package/node_modules/handlebars/lib/handlebars/exception.js +7 -3
  489. package/node_modules/handlebars/lib/handlebars/helpers/each.js +39 -16
  490. package/node_modules/handlebars/lib/handlebars/internal/proto-access.js +22 -0
  491. package/node_modules/handlebars/lib/handlebars/runtime.js +36 -4
  492. package/node_modules/handlebars/lib/handlebars/utils.js +3 -2
  493. package/node_modules/handlebars/lib/precompiler.js +14 -5
  494. package/node_modules/handlebars/package.json +2 -2
  495. package/node_modules/handlebars/release-notes.md +20 -1
  496. package/node_modules/handlebars/types/index.d.ts +8 -0
  497. package/node_modules/hdb/cfg/VERSION +1 -1
  498. package/node_modules/hdb/lib/Client.js +6 -2
  499. package/node_modules/hdb/lib/protocol/ClientInfo.js +28 -15
  500. package/node_modules/hdb/lib/protocol/Connection.js +30 -3
  501. package/node_modules/hdb/lib/protocol/Writer.js +2 -2
  502. package/node_modules/hdb/lib/protocol/common/ConnectOption.js +2 -0
  503. package/node_modules/hdb/lib/protocol/common/ConnectOptionFlagSet1.js +18 -0
  504. package/node_modules/hdb/lib/protocol/common/ConnectOptionType.js +2 -0
  505. package/node_modules/hdb/lib/protocol/common/Constants.js +1 -0
  506. package/node_modules/hdb/lib/protocol/common/MessageType.js +3 -2
  507. package/node_modules/hdb/lib/protocol/common/PartKind.js +2 -1
  508. package/node_modules/hdb/lib/protocol/common/index.js +1 -0
  509. package/node_modules/hdb/lib/protocol/data/TextList.js +25 -17
  510. package/node_modules/hdb/lib/protocol/data/index.js +1 -0
  511. package/node_modules/hdb/lib/protocol/part/ConnectOptions.js +7 -0
  512. package/node_modules/hdb/lib/protocol/request/index.js +7 -0
  513. package/node_modules/hdb/package.json +1 -2
  514. package/node_modules/livereload-js/.github/workflows/main.yml +4 -4
  515. package/node_modules/livereload-js/README.md +3 -3
  516. package/node_modules/livereload-js/dist/livereload.js +839 -2742
  517. package/node_modules/livereload-js/dist/livereload.min.js +1 -1
  518. package/node_modules/livereload-js/package.json +11 -11
  519. package/node_modules/minipass/LICENSE.md +55 -0
  520. package/node_modules/minipass/README.md +825 -0
  521. package/node_modules/minipass/dist/commonjs/index.d.ts +545 -0
  522. package/node_modules/minipass/dist/commonjs/index.d.ts.map +1 -0
  523. package/node_modules/minipass/dist/commonjs/index.js +1038 -0
  524. package/node_modules/minipass/dist/commonjs/index.js.map +1 -0
  525. package/node_modules/minipass/dist/commonjs/package.json +3 -0
  526. package/node_modules/minipass/dist/esm/index.d.ts +545 -0
  527. package/node_modules/minipass/dist/esm/index.d.ts.map +1 -0
  528. package/node_modules/minipass/dist/esm/index.js +1020 -0
  529. package/node_modules/minipass/dist/esm/index.js.map +1 -0
  530. package/node_modules/minipass/dist/esm/package.json +3 -0
  531. package/node_modules/minipass/package.json +77 -0
  532. package/node_modules/minizlib/LICENSE +26 -0
  533. package/node_modules/minizlib/README.md +64 -0
  534. package/node_modules/minizlib/dist/commonjs/constants.d.ts +2 -0
  535. package/node_modules/minizlib/dist/commonjs/constants.d.ts.map +1 -0
  536. package/node_modules/minizlib/dist/commonjs/constants.js +123 -0
  537. package/node_modules/minizlib/dist/commonjs/constants.js.map +1 -0
  538. package/node_modules/minizlib/dist/commonjs/index.d.ts +99 -0
  539. package/node_modules/minizlib/dist/commonjs/index.d.ts.map +1 -0
  540. package/node_modules/minizlib/dist/commonjs/index.js +416 -0
  541. package/node_modules/minizlib/dist/commonjs/index.js.map +1 -0
  542. package/node_modules/minizlib/dist/commonjs/package.json +3 -0
  543. package/node_modules/minizlib/dist/esm/constants.d.ts +2 -0
  544. package/node_modules/minizlib/dist/esm/constants.d.ts.map +1 -0
  545. package/node_modules/minizlib/dist/esm/constants.js +117 -0
  546. package/node_modules/minizlib/dist/esm/constants.js.map +1 -0
  547. package/node_modules/minizlib/dist/esm/index.d.ts +99 -0
  548. package/node_modules/minizlib/dist/esm/index.d.ts.map +1 -0
  549. package/node_modules/minizlib/dist/esm/index.js +363 -0
  550. package/node_modules/minizlib/dist/esm/index.js.map +1 -0
  551. package/node_modules/minizlib/dist/esm/package.json +3 -0
  552. package/node_modules/minizlib/package.json +80 -0
  553. package/node_modules/proxy-addr/HISTORY.md +60 -54
  554. package/node_modules/proxy-addr/README.md +1 -1
  555. package/node_modules/proxy-addr/index.js +32 -0
  556. package/node_modules/proxy-addr/package.json +8 -4
  557. package/node_modules/qs/.github/THREAT_MODEL.md +4 -2
  558. package/node_modules/qs/CHANGELOG.md +38 -14
  559. package/node_modules/qs/README.md +31 -3
  560. package/node_modules/qs/dist/qs.js +20 -20
  561. package/node_modules/qs/lib/parse.js +94 -4
  562. package/node_modules/qs/lib/stringify.js +4 -4
  563. package/node_modules/qs/lib/utils.js +130 -6
  564. package/node_modules/qs/package.json +4 -4
  565. package/node_modules/qs/test/parse.js +174 -0
  566. package/node_modules/qs/test/stringify.js +263 -33
  567. package/node_modules/qs/test/utils.js +184 -0
  568. package/node_modules/tar/LICENSE.md +55 -0
  569. package/node_modules/tar/README.md +1233 -0
  570. package/node_modules/tar/dist/commonjs/create.d.ts +3 -0
  571. package/node_modules/tar/dist/commonjs/create.d.ts.map +1 -0
  572. package/node_modules/tar/dist/commonjs/create.js +82 -0
  573. package/node_modules/tar/dist/commonjs/create.js.map +1 -0
  574. package/node_modules/tar/dist/commonjs/cwd-error.d.ts +8 -0
  575. package/node_modules/tar/dist/commonjs/cwd-error.d.ts.map +1 -0
  576. package/node_modules/tar/dist/commonjs/cwd-error.js +18 -0
  577. package/node_modules/tar/dist/commonjs/cwd-error.js.map +1 -0
  578. package/node_modules/tar/dist/commonjs/extract.d.ts +3 -0
  579. package/node_modules/tar/dist/commonjs/extract.d.ts.map +1 -0
  580. package/node_modules/tar/dist/commonjs/extract.js +88 -0
  581. package/node_modules/tar/dist/commonjs/extract.js.map +1 -0
  582. package/node_modules/tar/dist/commonjs/get-write-flag.d.ts +2 -0
  583. package/node_modules/tar/dist/commonjs/get-write-flag.d.ts.map +1 -0
  584. package/node_modules/tar/dist/commonjs/get-write-flag.js +32 -0
  585. package/node_modules/tar/dist/commonjs/get-write-flag.js.map +1 -0
  586. package/node_modules/tar/dist/commonjs/header.d.ts +53 -0
  587. package/node_modules/tar/dist/commonjs/header.d.ts.map +1 -0
  588. package/node_modules/tar/dist/commonjs/header.js +348 -0
  589. package/node_modules/tar/dist/commonjs/header.js.map +1 -0
  590. package/node_modules/tar/dist/commonjs/index.d.ts +20 -0
  591. package/node_modules/tar/dist/commonjs/index.d.ts.map +1 -0
  592. package/node_modules/tar/dist/commonjs/index.js +64 -0
  593. package/node_modules/tar/dist/commonjs/index.js.map +1 -0
  594. package/node_modules/tar/dist/commonjs/index.min.js +4 -0
  595. package/node_modules/tar/dist/commonjs/index.min.js.map +7 -0
  596. package/node_modules/tar/dist/commonjs/large-numbers.d.ts +3 -0
  597. package/node_modules/tar/dist/commonjs/large-numbers.d.ts.map +1 -0
  598. package/node_modules/tar/dist/commonjs/large-numbers.js +99 -0
  599. package/node_modules/tar/dist/commonjs/large-numbers.js.map +1 -0
  600. package/node_modules/tar/dist/commonjs/list.d.ts +7 -0
  601. package/node_modules/tar/dist/commonjs/list.d.ts.map +1 -0
  602. package/node_modules/tar/dist/commonjs/list.js +153 -0
  603. package/node_modules/tar/dist/commonjs/list.js.map +1 -0
  604. package/node_modules/tar/dist/commonjs/make-command.d.ts +49 -0
  605. package/node_modules/tar/dist/commonjs/make-command.d.ts.map +1 -0
  606. package/node_modules/tar/dist/commonjs/make-command.js +52 -0
  607. package/node_modules/tar/dist/commonjs/make-command.js.map +1 -0
  608. package/node_modules/tar/dist/commonjs/mkdir.d.ts +25 -0
  609. package/node_modules/tar/dist/commonjs/mkdir.d.ts.map +1 -0
  610. package/node_modules/tar/dist/commonjs/mkdir.js +187 -0
  611. package/node_modules/tar/dist/commonjs/mkdir.js.map +1 -0
  612. package/node_modules/tar/dist/commonjs/mode-fix.d.ts +2 -0
  613. package/node_modules/tar/dist/commonjs/mode-fix.d.ts.map +1 -0
  614. package/node_modules/tar/dist/commonjs/mode-fix.js +29 -0
  615. package/node_modules/tar/dist/commonjs/mode-fix.js.map +1 -0
  616. package/node_modules/tar/dist/commonjs/normalize-unicode.d.ts +2 -0
  617. package/node_modules/tar/dist/commonjs/normalize-unicode.d.ts.map +1 -0
  618. package/node_modules/tar/dist/commonjs/normalize-unicode.js +38 -0
  619. package/node_modules/tar/dist/commonjs/normalize-unicode.js.map +1 -0
  620. package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts +2 -0
  621. package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts.map +1 -0
  622. package/node_modules/tar/dist/commonjs/normalize-windows-path.js +12 -0
  623. package/node_modules/tar/dist/commonjs/normalize-windows-path.js.map +1 -0
  624. package/node_modules/tar/dist/commonjs/options.d.ts +604 -0
  625. package/node_modules/tar/dist/commonjs/options.d.ts.map +1 -0
  626. package/node_modules/tar/dist/commonjs/options.js +66 -0
  627. package/node_modules/tar/dist/commonjs/options.js.map +1 -0
  628. package/node_modules/tar/dist/commonjs/pack.d.ts +105 -0
  629. package/node_modules/tar/dist/commonjs/pack.d.ts.map +1 -0
  630. package/node_modules/tar/dist/commonjs/pack.js +544 -0
  631. package/node_modules/tar/dist/commonjs/pack.js.map +1 -0
  632. package/node_modules/tar/dist/commonjs/package.json +3 -0
  633. package/node_modules/tar/dist/commonjs/parse.d.ts +92 -0
  634. package/node_modules/tar/dist/commonjs/parse.d.ts.map +1 -0
  635. package/node_modules/tar/dist/commonjs/parse.js +655 -0
  636. package/node_modules/tar/dist/commonjs/parse.js.map +1 -0
  637. package/node_modules/tar/dist/commonjs/path-reservations.d.ts +11 -0
  638. package/node_modules/tar/dist/commonjs/path-reservations.d.ts.map +1 -0
  639. package/node_modules/tar/dist/commonjs/path-reservations.js +170 -0
  640. package/node_modules/tar/dist/commonjs/path-reservations.js.map +1 -0
  641. package/node_modules/tar/dist/commonjs/pax.d.ts +26 -0
  642. package/node_modules/tar/dist/commonjs/pax.d.ts.map +1 -0
  643. package/node_modules/tar/dist/commonjs/pax.js +182 -0
  644. package/node_modules/tar/dist/commonjs/pax.js.map +1 -0
  645. package/node_modules/tar/dist/commonjs/process-umask.d.ts +2 -0
  646. package/node_modules/tar/dist/commonjs/process-umask.d.ts.map +1 -0
  647. package/node_modules/tar/dist/commonjs/process-umask.js +7 -0
  648. package/node_modules/tar/dist/commonjs/process-umask.js.map +1 -0
  649. package/node_modules/tar/dist/commonjs/read-entry.d.ts +36 -0
  650. package/node_modules/tar/dist/commonjs/read-entry.d.ts.map +1 -0
  651. package/node_modules/tar/dist/commonjs/read-entry.js +136 -0
  652. package/node_modules/tar/dist/commonjs/read-entry.js.map +1 -0
  653. package/node_modules/tar/dist/commonjs/replace.d.ts +2 -0
  654. package/node_modules/tar/dist/commonjs/replace.d.ts.map +1 -0
  655. package/node_modules/tar/dist/commonjs/replace.js +227 -0
  656. package/node_modules/tar/dist/commonjs/replace.js.map +1 -0
  657. package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts +2 -0
  658. package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts.map +1 -0
  659. package/node_modules/tar/dist/commonjs/strip-absolute-path.js +29 -0
  660. package/node_modules/tar/dist/commonjs/strip-absolute-path.js.map +1 -0
  661. package/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts +2 -0
  662. package/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts.map +1 -0
  663. package/node_modules/tar/dist/commonjs/strip-trailing-slashes.js +18 -0
  664. package/node_modules/tar/dist/commonjs/strip-trailing-slashes.js.map +1 -0
  665. package/node_modules/tar/dist/commonjs/symlink-error.d.ts +9 -0
  666. package/node_modules/tar/dist/commonjs/symlink-error.d.ts.map +1 -0
  667. package/node_modules/tar/dist/commonjs/symlink-error.js +19 -0
  668. package/node_modules/tar/dist/commonjs/symlink-error.js.map +1 -0
  669. package/node_modules/tar/dist/commonjs/types.d.ts +16 -0
  670. package/node_modules/tar/dist/commonjs/types.d.ts.map +1 -0
  671. package/node_modules/tar/dist/commonjs/types.js +70 -0
  672. package/node_modules/tar/dist/commonjs/types.js.map +1 -0
  673. package/node_modules/tar/dist/commonjs/unpack.d.ts +101 -0
  674. package/node_modules/tar/dist/commonjs/unpack.d.ts.map +1 -0
  675. package/node_modules/tar/dist/commonjs/unpack.js +932 -0
  676. package/node_modules/tar/dist/commonjs/unpack.js.map +1 -0
  677. package/node_modules/tar/dist/commonjs/update.d.ts +2 -0
  678. package/node_modules/tar/dist/commonjs/update.d.ts.map +1 -0
  679. package/node_modules/tar/dist/commonjs/update.js +33 -0
  680. package/node_modules/tar/dist/commonjs/update.js.map +1 -0
  681. package/node_modules/tar/dist/commonjs/warn-method.d.ts +24 -0
  682. package/node_modules/tar/dist/commonjs/warn-method.d.ts.map +1 -0
  683. package/node_modules/tar/dist/commonjs/warn-method.js +31 -0
  684. package/node_modules/tar/dist/commonjs/warn-method.js.map +1 -0
  685. package/node_modules/tar/dist/commonjs/winchars.d.ts +3 -0
  686. package/node_modules/tar/dist/commonjs/winchars.d.ts.map +1 -0
  687. package/node_modules/tar/dist/commonjs/winchars.js +14 -0
  688. package/node_modules/tar/dist/commonjs/winchars.js.map +1 -0
  689. package/node_modules/tar/dist/commonjs/write-entry.d.ts +129 -0
  690. package/node_modules/tar/dist/commonjs/write-entry.d.ts.map +1 -0
  691. package/node_modules/tar/dist/commonjs/write-entry.js +698 -0
  692. package/node_modules/tar/dist/commonjs/write-entry.js.map +1 -0
  693. package/node_modules/tar/dist/esm/create.d.ts +3 -0
  694. package/node_modules/tar/dist/esm/create.d.ts.map +1 -0
  695. package/node_modules/tar/dist/esm/create.js +76 -0
  696. package/node_modules/tar/dist/esm/create.js.map +1 -0
  697. package/node_modules/tar/dist/esm/cwd-error.d.ts +8 -0
  698. package/node_modules/tar/dist/esm/cwd-error.d.ts.map +1 -0
  699. package/node_modules/tar/dist/esm/cwd-error.js +14 -0
  700. package/node_modules/tar/dist/esm/cwd-error.js.map +1 -0
  701. package/node_modules/tar/dist/esm/extract.d.ts +3 -0
  702. package/node_modules/tar/dist/esm/extract.d.ts.map +1 -0
  703. package/node_modules/tar/dist/esm/extract.js +49 -0
  704. package/node_modules/tar/dist/esm/extract.js.map +1 -0
  705. package/node_modules/tar/dist/esm/get-write-flag.d.ts +2 -0
  706. package/node_modules/tar/dist/esm/get-write-flag.d.ts.map +1 -0
  707. package/node_modules/tar/dist/esm/get-write-flag.js +26 -0
  708. package/node_modules/tar/dist/esm/get-write-flag.js.map +1 -0
  709. package/node_modules/tar/dist/esm/header.d.ts +53 -0
  710. package/node_modules/tar/dist/esm/header.d.ts.map +1 -0
  711. package/node_modules/tar/dist/esm/header.js +311 -0
  712. package/node_modules/tar/dist/esm/header.js.map +1 -0
  713. package/node_modules/tar/dist/esm/index.d.ts +20 -0
  714. package/node_modules/tar/dist/esm/index.d.ts.map +1 -0
  715. package/node_modules/tar/dist/esm/index.js +20 -0
  716. package/node_modules/tar/dist/esm/index.js.map +1 -0
  717. package/node_modules/tar/dist/esm/index.min.js +4 -0
  718. package/node_modules/tar/dist/esm/index.min.js.map +7 -0
  719. package/node_modules/tar/dist/esm/large-numbers.d.ts +3 -0
  720. package/node_modules/tar/dist/esm/large-numbers.d.ts.map +1 -0
  721. package/node_modules/tar/dist/esm/large-numbers.js +94 -0
  722. package/node_modules/tar/dist/esm/large-numbers.js.map +1 -0
  723. package/node_modules/tar/dist/esm/list.d.ts +7 -0
  724. package/node_modules/tar/dist/esm/list.d.ts.map +1 -0
  725. package/node_modules/tar/dist/esm/list.js +113 -0
  726. package/node_modules/tar/dist/esm/list.js.map +1 -0
  727. package/node_modules/tar/dist/esm/make-command.d.ts +49 -0
  728. package/node_modules/tar/dist/esm/make-command.d.ts.map +1 -0
  729. package/node_modules/tar/dist/esm/make-command.js +48 -0
  730. package/node_modules/tar/dist/esm/make-command.js.map +1 -0
  731. package/node_modules/tar/dist/esm/mkdir.d.ts +25 -0
  732. package/node_modules/tar/dist/esm/mkdir.d.ts.map +1 -0
  733. package/node_modules/tar/dist/esm/mkdir.js +179 -0
  734. package/node_modules/tar/dist/esm/mkdir.js.map +1 -0
  735. package/node_modules/tar/dist/esm/mode-fix.d.ts +2 -0
  736. package/node_modules/tar/dist/esm/mode-fix.d.ts.map +1 -0
  737. package/node_modules/tar/dist/esm/mode-fix.js +25 -0
  738. package/node_modules/tar/dist/esm/mode-fix.js.map +1 -0
  739. package/node_modules/tar/dist/esm/normalize-unicode.d.ts +2 -0
  740. package/node_modules/tar/dist/esm/normalize-unicode.d.ts.map +1 -0
  741. package/node_modules/tar/dist/esm/normalize-unicode.js +34 -0
  742. package/node_modules/tar/dist/esm/normalize-unicode.js.map +1 -0
  743. package/node_modules/tar/dist/esm/normalize-windows-path.d.ts +2 -0
  744. package/node_modules/tar/dist/esm/normalize-windows-path.d.ts.map +1 -0
  745. package/node_modules/tar/dist/esm/normalize-windows-path.js +9 -0
  746. package/node_modules/tar/dist/esm/normalize-windows-path.js.map +1 -0
  747. package/node_modules/tar/dist/esm/options.d.ts +604 -0
  748. package/node_modules/tar/dist/esm/options.d.ts.map +1 -0
  749. package/node_modules/tar/dist/esm/options.js +54 -0
  750. package/node_modules/tar/dist/esm/options.js.map +1 -0
  751. package/node_modules/tar/dist/esm/pack.d.ts +105 -0
  752. package/node_modules/tar/dist/esm/pack.d.ts.map +1 -0
  753. package/node_modules/tar/dist/esm/pack.js +502 -0
  754. package/node_modules/tar/dist/esm/pack.js.map +1 -0
  755. package/node_modules/tar/dist/esm/package.json +3 -0
  756. package/node_modules/tar/dist/esm/parse.d.ts +92 -0
  757. package/node_modules/tar/dist/esm/parse.d.ts.map +1 -0
  758. package/node_modules/tar/dist/esm/parse.js +651 -0
  759. package/node_modules/tar/dist/esm/parse.js.map +1 -0
  760. package/node_modules/tar/dist/esm/path-reservations.d.ts +11 -0
  761. package/node_modules/tar/dist/esm/path-reservations.d.ts.map +1 -0
  762. package/node_modules/tar/dist/esm/path-reservations.js +166 -0
  763. package/node_modules/tar/dist/esm/path-reservations.js.map +1 -0
  764. package/node_modules/tar/dist/esm/pax.d.ts +26 -0
  765. package/node_modules/tar/dist/esm/pax.d.ts.map +1 -0
  766. package/node_modules/tar/dist/esm/pax.js +178 -0
  767. package/node_modules/tar/dist/esm/pax.js.map +1 -0
  768. package/node_modules/tar/dist/esm/process-umask.d.ts +2 -0
  769. package/node_modules/tar/dist/esm/process-umask.d.ts.map +1 -0
  770. package/node_modules/tar/dist/esm/process-umask.js +3 -0
  771. package/node_modules/tar/dist/esm/process-umask.js.map +1 -0
  772. package/node_modules/tar/dist/esm/read-entry.d.ts +36 -0
  773. package/node_modules/tar/dist/esm/read-entry.d.ts.map +1 -0
  774. package/node_modules/tar/dist/esm/read-entry.js +132 -0
  775. package/node_modules/tar/dist/esm/read-entry.js.map +1 -0
  776. package/node_modules/tar/dist/esm/replace.d.ts +2 -0
  777. package/node_modules/tar/dist/esm/replace.d.ts.map +1 -0
  778. package/node_modules/tar/dist/esm/replace.js +221 -0
  779. package/node_modules/tar/dist/esm/replace.js.map +1 -0
  780. package/node_modules/tar/dist/esm/strip-absolute-path.d.ts +2 -0
  781. package/node_modules/tar/dist/esm/strip-absolute-path.d.ts.map +1 -0
  782. package/node_modules/tar/dist/esm/strip-absolute-path.js +25 -0
  783. package/node_modules/tar/dist/esm/strip-absolute-path.js.map +1 -0
  784. package/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts +2 -0
  785. package/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts.map +1 -0
  786. package/node_modules/tar/dist/esm/strip-trailing-slashes.js +14 -0
  787. package/node_modules/tar/dist/esm/strip-trailing-slashes.js.map +1 -0
  788. package/node_modules/tar/dist/esm/symlink-error.d.ts +9 -0
  789. package/node_modules/tar/dist/esm/symlink-error.d.ts.map +1 -0
  790. package/node_modules/tar/dist/esm/symlink-error.js +15 -0
  791. package/node_modules/tar/dist/esm/symlink-error.js.map +1 -0
  792. package/node_modules/tar/dist/esm/types.d.ts +16 -0
  793. package/node_modules/tar/dist/esm/types.d.ts.map +1 -0
  794. package/node_modules/tar/dist/esm/types.js +65 -0
  795. package/node_modules/tar/dist/esm/types.js.map +1 -0
  796. package/node_modules/tar/dist/esm/unpack.d.ts +101 -0
  797. package/node_modules/tar/dist/esm/unpack.d.ts.map +1 -0
  798. package/node_modules/tar/dist/esm/unpack.js +891 -0
  799. package/node_modules/tar/dist/esm/unpack.js.map +1 -0
  800. package/node_modules/tar/dist/esm/update.d.ts +2 -0
  801. package/node_modules/tar/dist/esm/update.d.ts.map +1 -0
  802. package/node_modules/tar/dist/esm/update.js +30 -0
  803. package/node_modules/tar/dist/esm/update.js.map +1 -0
  804. package/node_modules/tar/dist/esm/warn-method.d.ts +24 -0
  805. package/node_modules/tar/dist/esm/warn-method.d.ts.map +1 -0
  806. package/node_modules/tar/dist/esm/warn-method.js +27 -0
  807. package/node_modules/tar/dist/esm/warn-method.js.map +1 -0
  808. package/node_modules/tar/dist/esm/winchars.d.ts +3 -0
  809. package/node_modules/tar/dist/esm/winchars.d.ts.map +1 -0
  810. package/node_modules/tar/dist/esm/winchars.js +9 -0
  811. package/node_modules/tar/dist/esm/winchars.js.map +1 -0
  812. package/node_modules/tar/dist/esm/write-entry.d.ts +129 -0
  813. package/node_modules/tar/dist/esm/write-entry.d.ts.map +1 -0
  814. package/node_modules/tar/dist/esm/write-entry.js +656 -0
  815. package/node_modules/tar/dist/esm/write-entry.js.map +1 -0
  816. package/node_modules/tar/package.json +298 -0
  817. package/node_modules/ws/lib/websocket.js +17 -3
  818. package/node_modules/ws/package.json +1 -1
  819. package/node_modules/yallist/LICENSE.md +63 -0
  820. package/node_modules/yallist/README.md +205 -0
  821. package/node_modules/yallist/dist/commonjs/index.d.ts +39 -0
  822. package/node_modules/yallist/dist/commonjs/index.d.ts.map +1 -0
  823. package/node_modules/yallist/dist/commonjs/index.js +384 -0
  824. package/node_modules/yallist/dist/commonjs/index.js.map +1 -0
  825. package/node_modules/yallist/dist/commonjs/package.json +3 -0
  826. package/node_modules/yallist/dist/esm/index.d.ts +39 -0
  827. package/node_modules/yallist/dist/esm/index.d.ts.map +1 -0
  828. package/node_modules/yallist/dist/esm/index.js +379 -0
  829. package/node_modules/yallist/dist/esm/index.js.map +1 -0
  830. package/node_modules/yallist/dist/esm/package.json +3 -0
  831. package/node_modules/yallist/package.json +68 -0
  832. package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +19 -18
  833. package/node_modules/yaml/browser/dist/nodes/Alias.js +25 -23
  834. package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +19 -18
  835. package/node_modules/yaml/dist/nodes/Alias.js +25 -23
  836. package/node_modules/yaml/package.json +1 -1
  837. package/package.json +7 -1
  838. package/bin/completion/templates/cds-tmpl.fish +0 -65
  839. package/bin/completion/templates/cds-tmpl.ps1 +0 -217
  840. package/bin/completion/templates/cds-tmpl.sh +0 -93
  841. package/bin/completion/templates/cds-tmpl.zsh +0 -74
  842. package/node_modules/@cap-js/db-service/lib/recursion-guard.js +0 -40
  843. package/node_modules/@sap/cds/lib/env/cds-requires.js +0 -326
  844. package/node_modules/@sap/cds-mtxs/srv/bootstrap.cds +0 -2
  845. package/node_modules/@sap/cds-mtxs/srv/bootstrap.js +0 -33
  846. package/node_modules/body-parser/node_modules/content-type/LICENSE +0 -22
  847. package/node_modules/body-parser/node_modules/content-type/README.md +0 -71
  848. package/node_modules/body-parser/node_modules/content-type/package.json +0 -52
  849. package/node_modules/content-disposition/index.js +0 -536
  850. package/node_modules/content-type/HISTORY.md +0 -29
  851. package/node_modules/content-type/index.js +0 -225
  852. package/node_modules/negotiator/node_modules/content-type/LICENSE +0 -22
  853. package/node_modules/negotiator/node_modules/content-type/README.md +0 -71
  854. package/node_modules/negotiator/node_modules/content-type/dist/index.d.ts +0 -46
  855. package/node_modules/negotiator/node_modules/content-type/dist/index.js +0 -176
  856. package/node_modules/negotiator/node_modules/content-type/dist/index.js.map +0 -1
  857. package/node_modules/negotiator/node_modules/content-type/package.json +0 -52
  858. package/node_modules/type-is/node_modules/content-type/LICENSE +0 -22
  859. package/node_modules/type-is/node_modules/content-type/README.md +0 -71
  860. package/node_modules/type-is/node_modules/content-type/dist/index.d.ts +0 -46
  861. package/node_modules/type-is/node_modules/content-type/dist/index.js +0 -176
  862. package/node_modules/type-is/node_modules/content-type/dist/index.js.map +0 -1
  863. package/node_modules/type-is/node_modules/content-type/package.json +0 -52
  864. /package/lib/init/template/react/files/{vite.config.js.hbs → vite.config.{{extension}}.hbs} +0 -0
  865. /package/lib/init/template/vue/files/src/{main.js → main.{{extension}}.hbs} +0 -0
  866. /package/lib/init/template/vue/files/{vite.config.js.hbs → vite.config.{{extension}}.hbs} +0 -0
  867. /package/{lib/import/openapi → node_modules/@cap-js/openapi/lib/import}/utilities.js +0 -0
  868. /package/node_modules/{body-parser/node_modules/content-type → content-type}/dist/index.d.ts +0 -0
  869. /package/node_modules/{body-parser/node_modules/content-type → content-type}/dist/index.js +0 -0
  870. /package/node_modules/{body-parser/node_modules/content-type → content-type}/dist/index.js.map +0 -0
@@ -0,0 +1,39 @@
1
+ export declare class Yallist<T = unknown> {
2
+ tail?: Node<T>;
3
+ head?: Node<T>;
4
+ length: number;
5
+ static create<T = unknown>(list?: Iterable<T>): Yallist<T>;
6
+ constructor(list?: Iterable<T>);
7
+ [Symbol.iterator](): Generator<T, void, unknown>;
8
+ removeNode(node: Node<T>): Node<T> | undefined;
9
+ unshiftNode(node: Node<T>): void;
10
+ pushNode(node: Node<T>): void;
11
+ push(...args: T[]): number;
12
+ unshift(...args: T[]): number;
13
+ pop(): T | undefined;
14
+ shift(): T | undefined;
15
+ forEach(fn: (value: T, i: number, list: Yallist<T>) => any, thisp?: any): void;
16
+ forEachReverse(fn: (value: T, i: number, list: Yallist<T>) => any, thisp?: any): void;
17
+ get(n: number): T | undefined;
18
+ getReverse(n: number): T | undefined;
19
+ map<R = any>(fn: (value: T, list: Yallist<T>) => R, thisp?: any): Yallist<R>;
20
+ mapReverse<R = any>(fn: (value: T, list: Yallist<T>) => R, thisp?: any): Yallist<R>;
21
+ reduce(fn: (left: T, right: T, i: number) => T): T;
22
+ reduce<R = any>(fn: (acc: R, next: T, i: number) => R, initial: R): R;
23
+ reduceReverse(fn: (left: T, right: T, i: number) => T): T;
24
+ reduceReverse<R = any>(fn: (acc: R, next: T, i: number) => R, initial: R): R;
25
+ toArray(): any[];
26
+ toArrayReverse(): any[];
27
+ slice(from?: number, to?: number): Yallist<unknown>;
28
+ sliceReverse(from?: number, to?: number): Yallist<unknown>;
29
+ splice(start: number, deleteCount?: number, ...nodes: T[]): T[];
30
+ reverse(): this;
31
+ }
32
+ export declare class Node<T = unknown> {
33
+ list?: Yallist<T>;
34
+ next?: Node<T>;
35
+ prev?: Node<T>;
36
+ value: T;
37
+ constructor(value: T, prev?: Node<T> | undefined, next?: Node<T> | undefined, list?: Yallist<T> | undefined);
38
+ }
39
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,qBAAa,OAAO,CAAC,CAAC,GAAG,OAAO;IAC9B,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;IACd,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;IACd,MAAM,EAAE,MAAM,CAAI;IAElB,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,GAAE,QAAQ,CAAC,CAAC,CAAM;gBAIrC,IAAI,GAAE,QAAQ,CAAC,CAAC,CAAM;IAMjC,CAAC,MAAM,CAAC,QAAQ,CAAC;IAMlB,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IAiCxB,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IAuBzB,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IAuBtB,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE;IAOjB,OAAO,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE;IAOpB,GAAG;IAkBH,KAAK;IAkBL,OAAO,CACL,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,GAAG,EAClD,KAAK,CAAC,EAAE,GAAG;IASb,cAAc,CACZ,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AK,CAAC,IAAI,GAAE,MAAU,EAAE,EAAE,GAAE,MAAoB;IA4BhD,YAAY,CAAC,IAAI,GAAE,MAAU,EAAE,EAAE,GAAE,MAAoB;IA4BvD,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,GAAE,MAAU,EAAE,GAAG,KAAK,EAAE,CAAC,EAAE;IAgC5D,OAAO;CAYR;AAwCD,qBAAa,IAAI,CAAC,CAAC,GAAG,OAAO;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;IACjB,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;IACd,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAA;IACd,KAAK,EAAE,CAAC,CAAA;gBAGN,KAAK,EAAE,CAAC,EACR,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,SAAS,EAC1B,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,SAAS,EAC1B,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS;CAmBhC"}
@@ -0,0 +1,379 @@
1
+ export class Yallist {
2
+ tail;
3
+ head;
4
+ length = 0;
5
+ static create(list = []) {
6
+ return new Yallist(list);
7
+ }
8
+ constructor(list = []) {
9
+ for (const item of list) {
10
+ this.push(item);
11
+ }
12
+ }
13
+ *[Symbol.iterator]() {
14
+ for (let walker = this.head; walker; walker = walker.next) {
15
+ yield walker.value;
16
+ }
17
+ }
18
+ removeNode(node) {
19
+ if (node.list !== this) {
20
+ throw new Error('removing node which does not belong to this list');
21
+ }
22
+ const next = node.next;
23
+ const prev = node.prev;
24
+ if (next) {
25
+ next.prev = prev;
26
+ }
27
+ if (prev) {
28
+ prev.next = next;
29
+ }
30
+ if (node === this.head) {
31
+ this.head = next;
32
+ }
33
+ if (node === this.tail) {
34
+ this.tail = prev;
35
+ }
36
+ this.length--;
37
+ node.next = undefined;
38
+ node.prev = undefined;
39
+ node.list = undefined;
40
+ return next;
41
+ }
42
+ unshiftNode(node) {
43
+ if (node === this.head) {
44
+ return;
45
+ }
46
+ if (node.list) {
47
+ node.list.removeNode(node);
48
+ }
49
+ const head = this.head;
50
+ node.list = this;
51
+ node.next = head;
52
+ if (head) {
53
+ head.prev = node;
54
+ }
55
+ this.head = node;
56
+ if (!this.tail) {
57
+ this.tail = node;
58
+ }
59
+ this.length++;
60
+ }
61
+ pushNode(node) {
62
+ if (node === this.tail) {
63
+ return;
64
+ }
65
+ if (node.list) {
66
+ node.list.removeNode(node);
67
+ }
68
+ const tail = this.tail;
69
+ node.list = this;
70
+ node.prev = tail;
71
+ if (tail) {
72
+ tail.next = node;
73
+ }
74
+ this.tail = node;
75
+ if (!this.head) {
76
+ this.head = node;
77
+ }
78
+ this.length++;
79
+ }
80
+ push(...args) {
81
+ for (let i = 0, l = args.length; i < l; i++) {
82
+ push(this, args[i]);
83
+ }
84
+ return this.length;
85
+ }
86
+ unshift(...args) {
87
+ for (var i = 0, l = args.length; i < l; i++) {
88
+ unshift(this, args[i]);
89
+ }
90
+ return this.length;
91
+ }
92
+ pop() {
93
+ if (!this.tail) {
94
+ return undefined;
95
+ }
96
+ const res = this.tail.value;
97
+ const t = this.tail;
98
+ this.tail = this.tail.prev;
99
+ if (this.tail) {
100
+ this.tail.next = undefined;
101
+ }
102
+ else {
103
+ this.head = undefined;
104
+ }
105
+ t.list = undefined;
106
+ this.length--;
107
+ return res;
108
+ }
109
+ shift() {
110
+ if (!this.head) {
111
+ return undefined;
112
+ }
113
+ const res = this.head.value;
114
+ const h = this.head;
115
+ this.head = this.head.next;
116
+ if (this.head) {
117
+ this.head.prev = undefined;
118
+ }
119
+ else {
120
+ this.tail = undefined;
121
+ }
122
+ h.list = undefined;
123
+ this.length--;
124
+ return res;
125
+ }
126
+ forEach(fn, thisp) {
127
+ thisp = thisp || this;
128
+ for (let walker = this.head, i = 0; !!walker; i++) {
129
+ fn.call(thisp, walker.value, i, this);
130
+ walker = walker.next;
131
+ }
132
+ }
133
+ forEachReverse(fn, thisp) {
134
+ thisp = thisp || this;
135
+ for (let walker = this.tail, i = this.length - 1; !!walker; i--) {
136
+ fn.call(thisp, walker.value, i, this);
137
+ walker = walker.prev;
138
+ }
139
+ }
140
+ get(n) {
141
+ let i = 0;
142
+ let walker = this.head;
143
+ for (; !!walker && i < n; i++) {
144
+ walker = walker.next;
145
+ }
146
+ if (i === n && !!walker) {
147
+ return walker.value;
148
+ }
149
+ }
150
+ getReverse(n) {
151
+ let i = 0;
152
+ let walker = this.tail;
153
+ for (; !!walker && i < n; i++) {
154
+ // abort out of the list early if we hit a cycle
155
+ walker = walker.prev;
156
+ }
157
+ if (i === n && !!walker) {
158
+ return walker.value;
159
+ }
160
+ }
161
+ map(fn, thisp) {
162
+ thisp = thisp || this;
163
+ const res = new Yallist();
164
+ for (let walker = this.head; !!walker;) {
165
+ res.push(fn.call(thisp, walker.value, this));
166
+ walker = walker.next;
167
+ }
168
+ return res;
169
+ }
170
+ mapReverse(fn, thisp) {
171
+ thisp = thisp || this;
172
+ var res = new Yallist();
173
+ for (let walker = this.tail; !!walker;) {
174
+ res.push(fn.call(thisp, walker.value, this));
175
+ walker = walker.prev;
176
+ }
177
+ return res;
178
+ }
179
+ reduce(fn, initial) {
180
+ let acc;
181
+ let walker = this.head;
182
+ if (arguments.length > 1) {
183
+ acc = initial;
184
+ }
185
+ else if (this.head) {
186
+ walker = this.head.next;
187
+ acc = this.head.value;
188
+ }
189
+ else {
190
+ throw new TypeError('Reduce of empty list with no initial value');
191
+ }
192
+ for (var i = 0; !!walker; i++) {
193
+ acc = fn(acc, walker.value, i);
194
+ walker = walker.next;
195
+ }
196
+ return acc;
197
+ }
198
+ reduceReverse(fn, initial) {
199
+ let acc;
200
+ let walker = this.tail;
201
+ if (arguments.length > 1) {
202
+ acc = initial;
203
+ }
204
+ else if (this.tail) {
205
+ walker = this.tail.prev;
206
+ acc = this.tail.value;
207
+ }
208
+ else {
209
+ throw new TypeError('Reduce of empty list with no initial value');
210
+ }
211
+ for (let i = this.length - 1; !!walker; i--) {
212
+ acc = fn(acc, walker.value, i);
213
+ walker = walker.prev;
214
+ }
215
+ return acc;
216
+ }
217
+ toArray() {
218
+ const arr = new Array(this.length);
219
+ for (let i = 0, walker = this.head; !!walker; i++) {
220
+ arr[i] = walker.value;
221
+ walker = walker.next;
222
+ }
223
+ return arr;
224
+ }
225
+ toArrayReverse() {
226
+ const arr = new Array(this.length);
227
+ for (let i = 0, walker = this.tail; !!walker; i++) {
228
+ arr[i] = walker.value;
229
+ walker = walker.prev;
230
+ }
231
+ return arr;
232
+ }
233
+ slice(from = 0, to = this.length) {
234
+ if (to < 0) {
235
+ to += this.length;
236
+ }
237
+ if (from < 0) {
238
+ from += this.length;
239
+ }
240
+ const ret = new Yallist();
241
+ if (to < from || to < 0) {
242
+ return ret;
243
+ }
244
+ if (from < 0) {
245
+ from = 0;
246
+ }
247
+ if (to > this.length) {
248
+ to = this.length;
249
+ }
250
+ let walker = this.head;
251
+ let i = 0;
252
+ for (i = 0; !!walker && i < from; i++) {
253
+ walker = walker.next;
254
+ }
255
+ for (; !!walker && i < to; i++, walker = walker.next) {
256
+ ret.push(walker.value);
257
+ }
258
+ return ret;
259
+ }
260
+ sliceReverse(from = 0, to = this.length) {
261
+ if (to < 0) {
262
+ to += this.length;
263
+ }
264
+ if (from < 0) {
265
+ from += this.length;
266
+ }
267
+ const ret = new Yallist();
268
+ if (to < from || to < 0) {
269
+ return ret;
270
+ }
271
+ if (from < 0) {
272
+ from = 0;
273
+ }
274
+ if (to > this.length) {
275
+ to = this.length;
276
+ }
277
+ let i = this.length;
278
+ let walker = this.tail;
279
+ for (; !!walker && i > to; i--) {
280
+ walker = walker.prev;
281
+ }
282
+ for (; !!walker && i > from; i--, walker = walker.prev) {
283
+ ret.push(walker.value);
284
+ }
285
+ return ret;
286
+ }
287
+ splice(start, deleteCount = 0, ...nodes) {
288
+ if (start > this.length) {
289
+ start = this.length - 1;
290
+ }
291
+ if (start < 0) {
292
+ start = this.length + start;
293
+ }
294
+ let walker = this.head;
295
+ for (let i = 0; !!walker && i < start; i++) {
296
+ walker = walker.next;
297
+ }
298
+ const ret = [];
299
+ for (let i = 0; !!walker && i < deleteCount; i++) {
300
+ ret.push(walker.value);
301
+ walker = this.removeNode(walker);
302
+ }
303
+ if (!walker) {
304
+ walker = this.tail;
305
+ }
306
+ else if (walker !== this.tail) {
307
+ walker = walker.prev;
308
+ }
309
+ for (const v of nodes) {
310
+ walker = insertAfter(this, walker, v);
311
+ }
312
+ return ret;
313
+ }
314
+ reverse() {
315
+ const head = this.head;
316
+ const tail = this.tail;
317
+ for (let walker = head; !!walker; walker = walker.prev) {
318
+ const p = walker.prev;
319
+ walker.prev = walker.next;
320
+ walker.next = p;
321
+ }
322
+ this.head = tail;
323
+ this.tail = head;
324
+ return this;
325
+ }
326
+ }
327
+ // insertAfter undefined means "make the node the new head of list"
328
+ function insertAfter(self, node, value) {
329
+ const prev = node;
330
+ const next = node ? node.next : self.head;
331
+ const inserted = new Node(value, prev, next, self);
332
+ if (inserted.next === undefined) {
333
+ self.tail = inserted;
334
+ }
335
+ if (inserted.prev === undefined) {
336
+ self.head = inserted;
337
+ }
338
+ self.length++;
339
+ return inserted;
340
+ }
341
+ function push(self, item) {
342
+ self.tail = new Node(item, self.tail, undefined, self);
343
+ if (!self.head) {
344
+ self.head = self.tail;
345
+ }
346
+ self.length++;
347
+ }
348
+ function unshift(self, item) {
349
+ self.head = new Node(item, undefined, self.head, self);
350
+ if (!self.tail) {
351
+ self.tail = self.head;
352
+ }
353
+ self.length++;
354
+ }
355
+ export class Node {
356
+ list;
357
+ next;
358
+ prev;
359
+ value;
360
+ constructor(value, prev, next, list) {
361
+ this.list = list;
362
+ this.value = value;
363
+ if (prev) {
364
+ prev.next = this;
365
+ this.prev = prev;
366
+ }
367
+ else {
368
+ this.prev = undefined;
369
+ }
370
+ if (next) {
371
+ next.prev = this;
372
+ this.next = next;
373
+ }
374
+ else {
375
+ this.next = undefined;
376
+ }
377
+ }
378
+ }
379
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,OAAO;IAClB,IAAI,CAAU;IACd,IAAI,CAAU;IACd,MAAM,GAAW,CAAC,CAAA;IAElB,MAAM,CAAC,MAAM,CAAc,OAAoB,EAAE;QAC/C,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1B,CAAC;IAED,YAAY,OAAoB,EAAE;QAChC,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE,CAAC;YACxB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACjB,CAAC;IACH,CAAC;IAED,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QAChB,KAAK,IAAI,MAAM,GAAG,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;YAC1D,MAAM,MAAM,CAAC,KAAK,CAAA;QACpB,CAAC;IACH,CAAC;IAED,UAAU,CAAC,IAAa;QACtB,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CACb,kDAAkD,CACnD,CAAA;QACH,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;QACtB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;QAEtB,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAClB,CAAC;QAED,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAClB,CAAC;QAED,IAAI,IAAI,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;YACvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAClB,CAAC;QACD,IAAI,IAAI,KAAK,IAAI,CAA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AAC;AAED,SAAS,OAAO,CAAI,IAAgB,EAAE,IAAO;IAC3C,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAI,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IACzD,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;IACvB,CAAC;IACD,IAAI,CAAC,MAAM,EAAE,CAAA;AACf,CAAC;AAED,MAAM,OAAO,IAAI;IACf,IAAI,CAAa;IACjB,IAAI,CAAU;IACd,IAAI,CAAU;IACd,KAAK,CAAG;IAER,YACE,KAAQ,EACR,IAA0B,EAC1B,IAA0B,EAC1B,IAA6B;QAE7B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QAElB,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;YAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAClB,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,GAAG,SAAS,CAAA;QACvB,CAAC;QAED,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;YAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAClB,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,GAAG,SAAS,CAAA;QACvB,CAAC;IACH,CAAC;CACF","sourcesContent":["export class Yallist<T = unknown> {\n tail?: Node<T>\n head?: Node<T>\n length: number = 0\n\n static create<T = unknown>(list: Iterable<T> = []) {\n return new Yallist(list)\n }\n\n constructor(list: Iterable<T> = []) {\n for (const item of list) {\n this.push(item)\n }\n }\n\n *[Symbol.iterator]() {\n for (let walker = this.head; walker; walker = walker.next) {\n yield walker.value\n }\n }\n\n removeNode(node: Node<T>) {\n if (node.list !== this) {\n throw new Error(\n 'removing node which does not belong to this list',\n )\n }\n\n const next = node.next\n const prev = node.prev\n\n if (next) {\n next.prev = prev\n }\n\n if (prev) {\n prev.next = next\n }\n\n if (node === this.head) {\n this.head = next\n }\n if (node === this.tail) {\n this.tail = prev\n }\n\n this.length--\n node.next = undefined\n node.prev = undefined\n node.list = undefined\n\n return next\n }\n\n unshiftNode(node: Node<T>) {\n if (node === this.head) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n const head = this.head\n node.list = this\n node.next = head\n if (head) {\n head.prev = node\n }\n\n this.head = node\n if (!this.tail) {\n this.tail = node\n }\n this.length++\n }\n\n pushNode(node: Node<T>) {\n if (node === this.tail) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n const tail = this.tail\n node.list = this\n node.prev = tail\n if (tail) {\n tail.next = node\n }\n\n this.tail = node\n if (!this.head) {\n this.head = node\n }\n this.length++\n }\n\n push(...args: T[]) {\n for (let i = 0, l = args.length; i < l; i++) {\n push(this, args[i])\n }\n return this.length\n }\n\n unshift(...args: T[]) {\n for (var i = 0, l = args.length; i < l; i++) {\n unshift(this, args[i])\n }\n return this.length\n }\n\n pop() {\n if (!this.tail) {\n return undefined\n }\n\n const res = this.tail.value\n const t = this.tail\n this.tail = this.tail.prev\n if (this.tail) {\n this.tail.next = undefined\n } else {\n this.head = undefined\n }\n t.list = undefined\n this.length--\n return res\n }\n\n shift() {\n if (!this.head) {\n return undefined\n }\n\n const res = this.head.value\n const h = this.head\n this.head = this.head.next\n if (this.head) {\n this.head.prev = undefined\n } else {\n this.tail = undefined\n }\n h.list = undefined\n this.length--\n return res\n }\n\n forEach(\n fn: (value: T, i: number, list: Yallist<T>) => any,\n thisp?: any,\n ) {\n thisp = thisp || this\n for (let walker = this.head, i = 0; !!walker; i++) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.next\n }\n }\n\n forEachReverse(\n fn: (value: T, i: number, list: Yallist<T>) => any,\n thisp?: any,\n ) {\n thisp = thisp || this\n for (let walker = this.tail, i = this.length - 1; !!walker; i--) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.prev\n }\n }\n\n get(n: number) {\n let i = 0\n let walker = this.head\n for (; !!walker && i < n; i++) {\n walker = walker.next\n }\n if (i === n && !!walker) {\n return walker.value\n }\n }\n\n getReverse(n: number) {\n let i = 0\n let walker = this.tail\n for (; !!walker && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.prev\n }\n if (i === n && !!walker) {\n return walker.value\n }\n }\n\n map<R = any>(\n fn: (value: T, list: Yallist<T>) => R,\n thisp?: any,\n ): Yallist<R> {\n thisp = thisp || this\n const res = new Yallist<R>()\n for (let walker = this.head; !!walker; ) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.next\n }\n return res\n }\n\n mapReverse<R = any>(\n fn: (value: T, list: Yallist<T>) => R,\n thisp?: any,\n ): Yallist<R> {\n thisp = thisp || this\n var res = new Yallist<R>()\n for (let walker = this.tail; !!walker; ) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.prev\n }\n return res\n }\n\n reduce(fn: (left: T, right: T, i: number) => T): T\n reduce<R = any>(\n fn: (acc: R, next: T, i: number) => R,\n initial: R,\n ): R\n reduce<R = any>(\n fn: (acc: R, next: T, i: number) => R,\n initial?: R,\n ): R {\n let acc: R | T\n let walker = this.head\n if (arguments.length > 1) {\n acc = initial as R\n } else if (this.head) {\n walker = this.head.next\n acc = this.head.value\n } else {\n throw new TypeError(\n 'Reduce of empty list with no initial value',\n )\n }\n\n for (var i = 0; !!walker; i++) {\n acc = fn(acc as R, walker.value, i)\n walker = walker.next\n }\n\n return acc as R\n }\n\n reduceReverse(fn: (left: T, right: T, i: number) => T): T\n reduceReverse<R = any>(\n fn: (acc: R, next: T, i: number) => R,\n initial: R,\n ): R\n reduceReverse<R = any>(\n fn: (acc: R, next: T, i: number) => R,\n initial?: R,\n ): R {\n let acc: R | T\n let walker = this.tail\n if (arguments.length > 1) {\n acc = initial as R\n } else if (this.tail) {\n walker = this.tail.prev\n acc = this.tail.value\n } else {\n throw new TypeError(\n 'Reduce of empty list with no initial value',\n )\n }\n\n for (let i = this.length - 1; !!walker; i--) {\n acc = fn(acc as R, walker.value, i)\n walker = walker.prev\n }\n\n return acc as R\n }\n\n toArray() {\n const arr = new Array(this.length)\n for (let i = 0, walker = this.head; !!walker; i++) {\n arr[i] = walker.value\n walker = walker.next\n }\n return arr\n }\n\n toArrayReverse() {\n const arr = new Array(this.length)\n for (let i = 0, walker = this.tail; !!walker; i++) {\n arr[i] = walker.value\n walker = walker.prev\n }\n return arr\n }\n\n slice(from: number = 0, to: number = this.length) {\n if (to < 0) {\n to += this.length\n }\n if (from < 0) {\n from += this.length\n }\n const ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n let walker = this.head\n let i = 0\n for (i = 0; !!walker && i < from; i++) {\n walker = walker.next\n }\n for (; !!walker && i < to; i++, walker = walker.next) {\n ret.push(walker.value)\n }\n return ret\n }\n\n sliceReverse(from: number = 0, to: number = this.length) {\n if (to < 0) {\n to += this.length\n }\n if (from < 0) {\n from += this.length\n }\n const ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n let i = this.length\n let walker = this.tail\n for (; !!walker && i > to; i--) {\n walker = walker.prev\n }\n for (; !!walker && i > from; i--, walker = walker.prev) {\n ret.push(walker.value)\n }\n return ret\n }\n\n splice(start: number, deleteCount: number = 0, ...nodes: T[]) {\n if (start > this.length) {\n start = this.length - 1\n }\n if (start < 0) {\n start = this.length + start\n }\n\n let walker = this.head\n\n for (let i = 0; !!walker && i < start; i++) {\n walker = walker.next\n }\n\n const ret: T[] = []\n for (let i = 0; !!walker && i < deleteCount; i++) {\n ret.push(walker.value)\n walker = this.removeNode(walker)\n }\n if (!walker) {\n walker = this.tail\n } else if (walker !== this.tail) {\n walker = walker.prev\n }\n\n for (const v of nodes) {\n walker = insertAfter<T>(this, walker, v)\n }\n\n return ret\n }\n\n reverse() {\n const head = this.head\n const tail = this.tail\n for (let walker = head; !!walker; walker = walker.prev) {\n const p = walker.prev\n walker.prev = walker.next\n walker.next = p\n }\n this.head = tail\n this.tail = head\n return this\n }\n}\n\n// insertAfter undefined means \"make the node the new head of list\"\nfunction insertAfter<T>(\n self: Yallist<T>,\n node: Node<T> | undefined,\n value: T,\n) {\n const prev = node\n const next = node ? node.next : self.head\n const inserted = new Node<T>(value, prev, next, self)\n\n if (inserted.next === undefined) {\n self.tail = inserted\n }\n if (inserted.prev === undefined) {\n self.head = inserted\n }\n\n self.length++\n\n return inserted\n}\n\nfunction push<T>(self: Yallist<T>, item: T) {\n self.tail = new Node<T>(item, self.tail, undefined, self)\n if (!self.head) {\n self.head = self.tail\n }\n self.length++\n}\n\nfunction unshift<T>(self: Yallist<T>, item: T) {\n self.head = new Node<T>(item, undefined, self.head, self)\n if (!self.tail) {\n self.tail = self.head\n }\n self.length++\n}\n\nexport class Node<T = unknown> {\n list?: Yallist<T>\n next?: Node<T>\n prev?: Node<T>\n value: T\n\n constructor(\n value: T,\n prev?: Node<T> | undefined,\n next?: Node<T> | undefined,\n list?: Yallist<T> | undefined,\n ) {\n this.list = list\n this.value = value\n\n if (prev) {\n prev.next = this\n this.prev = prev\n } else {\n this.prev = undefined\n }\n\n if (next) {\n next.prev = this\n this.next = next\n } else {\n this.next = undefined\n }\n }\n}\n"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "yallist",
3
+ "version": "5.0.0",
4
+ "description": "Yet Another Linked List",
5
+ "files": [
6
+ "dist"
7
+ ],
8
+ "devDependencies": {
9
+ "prettier": "^3.2.5",
10
+ "tap": "^18.7.2",
11
+ "tshy": "^1.13.1",
12
+ "typedoc": "^0.25.13"
13
+ },
14
+ "scripts": {
15
+ "preversion": "npm test",
16
+ "postversion": "npm publish",
17
+ "prepublishOnly": "git push origin --follow-tags",
18
+ "prepare": "tshy",
19
+ "pretest": "npm run prepare",
20
+ "presnap": "npm run prepare",
21
+ "test": "tap",
22
+ "snap": "tap",
23
+ "format": "prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache",
24
+ "typedoc": "typedoc"
25
+ },
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/isaacs/yallist.git"
29
+ },
30
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
31
+ "license": "BlueOak-1.0.0",
32
+ "tshy": {
33
+ "exports": {
34
+ "./package.json": "./package.json",
35
+ ".": "./src/index.ts"
36
+ }
37
+ },
38
+ "exports": {
39
+ "./package.json": "./package.json",
40
+ ".": {
41
+ "import": {
42
+ "types": "./dist/esm/index.d.ts",
43
+ "default": "./dist/esm/index.js"
44
+ },
45
+ "require": {
46
+ "types": "./dist/commonjs/index.d.ts",
47
+ "default": "./dist/commonjs/index.js"
48
+ }
49
+ }
50
+ },
51
+ "main": "./dist/commonjs/index.js",
52
+ "types": "./dist/commonjs/index.d.ts",
53
+ "type": "module",
54
+ "prettier": {
55
+ "semi": false,
56
+ "printWidth": 70,
57
+ "tabWidth": 2,
58
+ "useTabs": false,
59
+ "singleQuote": true,
60
+ "jsxSingleQuote": false,
61
+ "bracketSameLine": true,
62
+ "arrowParens": "avoid",
63
+ "endOfLine": "lf"
64
+ },
65
+ "engines": {
66
+ "node": ">=18"
67
+ }
68
+ }
@@ -64,46 +64,47 @@ function plainValue(source, onError) {
64
64
  }
65
65
  if (badChar)
66
66
  onError(0, 'BAD_SCALAR_START', `Plain value cannot start with ${badChar}`);
67
- return foldLines(source);
67
+ return unfoldLines(source);
68
68
  }
69
69
  function singleQuotedValue(source, onError) {
70
70
  if (source[source.length - 1] !== "'" || source.length === 1)
71
71
  onError(source.length, 'MISSING_CHAR', "Missing closing 'quote");
72
- return foldLines(source.slice(1, -1)).replace(/''/g, "'");
72
+ return unfoldLines(source.slice(1, -1)).replace(/''/g, "'");
73
73
  }
74
- function foldLines(source) {
74
+ function unfoldLines(source) {
75
+ const line = /(.*?)\r?\n/sy;
76
+ let match = line.exec(source);
77
+ if (!match)
78
+ return source;
75
79
  /**
76
- * The negative lookbehind here and in the `re` RegExp is to
80
+ * The negative lookbehinds in these RegExps are to
77
81
  * prevent causing a polynomial search time in certain cases.
78
82
  *
79
- * The try-catch is for Safari, which doesn't support this yet:
83
+ * The try-catch is for Safari < 16.4 and other old browsers:
80
84
  * https://caniuse.com/js-regexp-lookbehind
81
85
  */
82
- let first, line;
86
+ let trimEnd, trimBoth;
83
87
  try {
84
- first = new RegExp('(.*?)(?<![ \t])[ \t]*\r?\n', 'sy');
85
- line = new RegExp('[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n', 'sy');
88
+ trimEnd = new RegExp('(?<![ \t])[ \t]+$');
89
+ trimBoth = new RegExp('^[ \t]+|(?<![ \t])[ \t]+$', 'g');
86
90
  }
87
91
  catch {
88
- first = /(.*?)[ \t]*\r?\n/sy;
89
- line = /[ \t]*(.*?)[ \t]*\r?\n/sy;
92
+ trimEnd = /[ \t]+$/;
93
+ trimBoth = /^[ \t]+|[ \t]+$/g;
90
94
  }
91
- let match = first.exec(source);
92
- if (!match)
93
- return source;
94
- let res = match[1];
95
+ let res = match[1].replace(trimEnd, '');
95
96
  let sep = ' ';
96
- let pos = first.lastIndex;
97
- line.lastIndex = pos;
97
+ let pos = line.lastIndex;
98
98
  while ((match = line.exec(source))) {
99
- if (match[1] === '') {
99
+ const lm = match[1].replace(trimBoth, '');
100
+ if (lm === '') {
100
101
  if (sep === '\n')
101
102
  res += sep;
102
103
  else
103
104
  sep = '\n';
104
105
  }
105
106
  else {
106
- res += sep + match[1];
107
+ res += sep + lm;
107
108
  sep = ' ';
108
109
  }
109
110
  pos = line.lastIndex;
@@ -43,38 +43,40 @@ class Alias extends NodeBase {
43
43
  if (node.anchor === this.source)
44
44
  found = node;
45
45
  }
46
+ if (found && ctx) {
47
+ const { anchors, doc, maxAliasCount } = ctx;
48
+ let data = anchors.get(found);
49
+ if (!data) {
50
+ // Resolve anchors for Node.prototype.toJS()
51
+ toJS(found, null, ctx);
52
+ data = anchors.get(found);
53
+ }
54
+ /* istanbul ignore if */
55
+ if (data?.res === undefined) {
56
+ const msg = 'This should not happen: Alias anchor was not resolved?';
57
+ throw new ReferenceError(msg);
58
+ }
59
+ if (maxAliasCount >= 0) {
60
+ data.count += 1;
61
+ if (data.aliasCount === 0)
62
+ data.aliasCount = getAliasCount(doc, found, anchors);
63
+ if (data.count * data.aliasCount > maxAliasCount) {
64
+ const msg = 'Excessive alias count indicates a resource exhaustion attack';
65
+ throw new ReferenceError(msg);
66
+ }
67
+ }
68
+ }
46
69
  return found;
47
70
  }
48
71
  toJSON(_arg, ctx) {
49
72
  if (!ctx)
50
73
  return { source: this.source };
51
- const { anchors, doc, maxAliasCount } = ctx;
52
- const source = this.resolve(doc, ctx);
74
+ const source = this.resolve(ctx.doc, ctx);
53
75
  if (!source) {
54
76
  const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
55
77
  throw new ReferenceError(msg);
56
78
  }
57
- let data = anchors.get(source);
58
- if (!data) {
59
- // Resolve anchors for Node.prototype.toJS()
60
- toJS(source, null, ctx);
61
- data = anchors.get(source);
62
- }
63
- /* istanbul ignore if */
64
- if (data?.res === undefined) {
65
- const msg = 'This should not happen: Alias anchor was not resolved?';
66
- throw new ReferenceError(msg);
67
- }
68
- if (maxAliasCount >= 0) {
69
- data.count += 1;
70
- if (data.aliasCount === 0)
71
- data.aliasCount = getAliasCount(doc, source, anchors);
72
- if (data.count * data.aliasCount > maxAliasCount) {
73
- const msg = 'Excessive alias count indicates a resource exhaustion attack';
74
- throw new ReferenceError(msg);
75
- }
76
- }
77
- return data.res;
79
+ return ctx.anchors.get(source).res;
78
80
  }
79
81
  toString(ctx, _onComment, _onChompKeep) {
80
82
  const src = `*${this.source}`;