@sap/cds-dk 10.1.2 → 10.2.1

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 (898) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/bin/add.js +7 -2
  3. package/bin/bind.js +5 -6
  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 +28 -19
  9. package/bin/completion/scripts/cds.ps1 +30 -29
  10. package/bin/completion/scripts/cds.sh +26 -23
  11. package/bin/completion/scripts/cds.zsh +26 -23
  12. package/bin/debug.js +3 -3
  13. package/bin/deploy/index.js +3 -3
  14. package/bin/deploy/to-hana/hana.js +6 -5
  15. package/bin/deploy/to-hana/hdiDeployUtil.js +25 -14
  16. package/bin/env.js +0 -1
  17. package/bin/eval.js +9 -5
  18. package/bin/export.js +6 -4
  19. package/bin/help/export.md +28 -4
  20. package/bin/import.js +6 -5
  21. package/bin/inspect.js +0 -1
  22. package/bin/login.js +28 -3
  23. package/bin/repl.js +82 -26
  24. package/bin/run.js +6 -7
  25. package/bin/serve.js +6 -7
  26. package/bin/up.js +10 -5
  27. package/bin/upgrade/steps/install.js +6 -6
  28. package/bin/version.js +1 -1
  29. package/bin/watch/index.js +1 -0
  30. package/bin/watch/vite-watch.js +12 -6
  31. package/lib/bind/shared.js +1 -1
  32. package/lib/build/index.js +11 -7
  33. package/lib/build/plugins/featureToggles.js +2 -2
  34. package/lib/build/plugins/hana/index.js +1 -1
  35. package/lib/build/plugins/helm/files/subcharts/web-application/Chart.yaml +1 -1
  36. package/lib/build/plugins/helm/files/subcharts/web-application/templates/_helpers.tpl +7 -0
  37. package/lib/build/plugins/helm/files/subcharts/web-application/templates/api-rule.yaml +1 -0
  38. package/lib/build/plugins/helm/files/subcharts/web-application/templates/service-binding.yaml +4 -4
  39. package/lib/build/plugins/helm/files/subcharts/web-application/values.schema.json +13 -0
  40. package/lib/build/plugins/helm/files/subcharts/web-application/values.yaml +7 -1
  41. package/lib/build/plugins/java/index.js +5 -1
  42. package/lib/build/plugins/nodejs/index.js +5 -1
  43. package/lib/build/util.js +4 -5
  44. package/lib/env/schemas/cds-rc.js +5 -0
  45. package/lib/import/importapi.js +2 -3
  46. package/lib/init/constants.js +1 -1
  47. package/lib/init/index.js +9 -3
  48. package/lib/init/plugin.js +1 -1
  49. package/lib/init/projectReader.js +16 -12
  50. package/lib/init/registries/mta.js +0 -6
  51. package/lib/init/template/ai/index.js +4 -4
  52. package/lib/init/template/ams/files/extensionDeveloper.dcl +6 -0
  53. package/lib/init/template/ams/files/mta.yaml.hbs +6 -0
  54. package/lib/init/template/ams/files/sidecar.package.json.hbs +5 -0
  55. package/lib/init/template/ams/index.js +42 -40
  56. package/lib/init/template/app-frontend/files/mta.yaml.hbs +2 -0
  57. package/lib/init/template/app-frontend/files/ui5.yaml.hbs +0 -4
  58. package/lib/init/template/app-frontend/index.js +29 -24
  59. package/lib/init/template/application-logging/index.js +6 -6
  60. package/lib/init/template/approuter/files/values.yaml.hbs +0 -9
  61. package/lib/init/template/approuter/index.js +19 -13
  62. package/lib/init/template/attachments/index.js +3 -3
  63. package/lib/init/template/audit-logging/index.js +4 -4
  64. package/lib/init/template/cloud-logging/index.js +12 -6
  65. package/lib/init/template/completion/completionSetup.js +19 -6
  66. package/lib/init/template/connectivity/index.js +3 -3
  67. package/lib/init/template/data/as-csv.js +7 -4
  68. package/lib/init/template/data/as-json.js +77 -20
  69. package/lib/init/template/destination/index.js +12 -9
  70. package/lib/init/template/dynatrace/index.js +5 -5
  71. package/lib/init/template/enterprise-messaging/index.js +6 -6
  72. package/lib/init/template/enterprise-messaging-shared/index.js +4 -4
  73. package/lib/init/template/extensibility/index.js +2 -2
  74. package/lib/init/template/extension/index.js +26 -0
  75. package/lib/init/template/github-actions/index.js +3 -3
  76. package/lib/init/template/hana/files/package.json.hbs +3 -2
  77. package/lib/init/template/hana/index.js +5 -5
  78. package/lib/init/template/hana-serverless/index.js +3 -3
  79. package/lib/init/template/html5-repo/files/mta.yaml.hbs +2 -0
  80. package/lib/init/template/html5-repo/files/ui5.yaml.hbs +0 -4
  81. package/lib/init/template/html5-repo/index.js +80 -40
  82. package/lib/init/template/http/index.js +1 -1
  83. package/lib/init/template/ias/index.js +7 -7
  84. package/lib/init/template/initial/files/.gitignore.hbs +1 -0
  85. package/lib/init/template/kafka/index.js +3 -3
  86. package/lib/init/template/kyma/index.js +7 -9
  87. package/lib/init/template/malware-scanner/index.js +3 -3
  88. package/lib/init/template/mta/index.js +6 -3
  89. package/lib/init/template/multitenancy/index.js +6 -7
  90. package/lib/init/template/notifications/index.js +2 -2
  91. package/lib/init/template/portal/index.js +16 -10
  92. package/lib/init/template/postgres/index.js +5 -5
  93. package/lib/init/template/react/files/index.html.hbs +1 -1
  94. package/lib/init/template/react/files/package.json.hbs +3 -2
  95. package/lib/init/template/react/files/src/{App.jsx.hbs → App.{{jsxExtension}}.hbs} +8 -2
  96. package/lib/init/template/react/files/src/{main.jsx → main.{{jsxExtension}}.hbs} +2 -2
  97. package/lib/init/template/react/files/{vite.config.js.hbs → vite.config.{{extension}}.hbs} +2 -3
  98. package/lib/init/template/react/index.js +22 -5
  99. package/lib/init/template/react/typescript/src/vite-env.d.ts +1 -0
  100. package/lib/init/template/react/typescript/tsconfig.json.hbs +16 -0
  101. package/lib/init/template/redis/index.js +2 -2
  102. package/lib/init/template/sample/files/app/index.html.hbs +18 -0
  103. package/lib/init/template/sample/index.js +1 -0
  104. package/lib/init/template/side-by-side-extensibility/index.js +6 -3
  105. package/lib/init/template/typescript/files/tsconfig.json +3 -1
  106. package/lib/init/template/vue/files/index.html.hbs +1 -1
  107. package/lib/init/template/vue/files/package.json.hbs +2 -1
  108. package/lib/init/template/vue/files/src/App.vue.hbs +8 -2
  109. package/lib/init/template/vue/files/{vite.config.js.hbs → vite.config.{{extension}}.hbs} +2 -3
  110. package/lib/init/template/vue/index.js +19 -5
  111. package/lib/init/template/vue/typescript/tsconfig.json +11 -0
  112. package/lib/init/template/workzone-standard/files/mta.yaml.hbs +2 -2
  113. package/lib/init/template/workzone-standard/index.js +29 -27
  114. package/lib/init/template/xsuaa/files/mta.yaml.hbs +1 -1
  115. package/lib/init/template/xsuaa/files/values.yaml.hbs +1 -1
  116. package/lib/init/template/xsuaa/index.js +34 -22
  117. package/lib/mtx/auth_manager.js +8 -2
  118. package/lib/mtx/browser_login.js +181 -0
  119. package/lib/mtx/params.js +6 -0
  120. package/lib/mtx/push.js +7 -1
  121. package/lib/mtx/settings_manager.js +29 -4
  122. package/lib/util/cf.js +44 -8
  123. package/lib/util/fs.js +2 -2
  124. package/node_modules/@cap-js/asyncapi/README.md +4 -14
  125. package/node_modules/@cap-js/asyncapi/cds-plugin.js +12 -0
  126. package/node_modules/@cap-js/asyncapi/index.js +3 -2
  127. package/node_modules/@cap-js/asyncapi/lib/compile/components/messages/index.js +4 -2
  128. package/node_modules/@cap-js/asyncapi/lib/compile/components/schemas/definition.js +11 -1
  129. package/node_modules/@cap-js/asyncapi/lib/compile/components/schemas/utils.js +16 -0
  130. package/node_modules/@cap-js/asyncapi/lib/compile/utils.js +4 -3
  131. package/node_modules/@cap-js/asyncapi/lib/import/importAsyncAPI.js +34 -0
  132. package/node_modules/@cap-js/asyncapi/lib/import/index.js +18 -0
  133. package/node_modules/@cap-js/asyncapi/lib/import/message.js +9 -0
  134. package/node_modules/@cap-js/asyncapi/lib/import/parserContext.js +368 -0
  135. package/node_modules/@cap-js/asyncapi/lib/import/utils.js +85 -0
  136. package/node_modules/@cap-js/asyncapi/package.json +89 -1
  137. package/node_modules/@cap-js/db-service/CHANGELOG.md +10 -0
  138. package/node_modules/@cap-js/db-service/lib/cqn2pql.js +4 -0
  139. package/node_modules/@cap-js/db-service/lib/cqn2sql.js +3 -0
  140. package/node_modules/@cap-js/db-service/lib/cqn4sql.js +8 -23
  141. package/node_modules/@cap-js/db-service/lib/infer/index.js +20 -27
  142. package/node_modules/@cap-js/db-service/package.json +1 -1
  143. package/node_modules/@cap-js/openapi/cds-plugin.js +12 -0
  144. package/node_modules/@cap-js/openapi/index.js +3 -1
  145. package/node_modules/@cap-js/openapi/lib/compile/csdl2openapi.js +652 -413
  146. package/node_modules/@cap-js/openapi/lib/compile/diagram.js +16 -13
  147. package/node_modules/@cap-js/openapi/lib/compile/index.js +10 -7
  148. package/node_modules/@cap-js/openapi/lib/compile/property-util.js +51 -0
  149. package/{lib/import/openapi → node_modules/@cap-js/openapi/lib/import}/importOpenAPI.js +12 -9
  150. package/{lib/import/openapi → node_modules/@cap-js/openapi/lib/import}/index.js +4 -3
  151. package/node_modules/@cap-js/openapi/package.json +71 -3
  152. package/node_modules/@cap-js/sqlite/CHANGELOG.md +9 -0
  153. package/node_modules/@cap-js/sqlite/package.json +3 -3
  154. package/node_modules/@isaacs/fs-minipass/LICENSE +15 -0
  155. package/node_modules/@isaacs/fs-minipass/README.md +71 -0
  156. package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts +118 -0
  157. package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts.map +1 -0
  158. package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js +430 -0
  159. package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js.map +1 -0
  160. package/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json +3 -0
  161. package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts +118 -0
  162. package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts.map +1 -0
  163. package/node_modules/@isaacs/fs-minipass/dist/esm/index.js +420 -0
  164. package/node_modules/@isaacs/fs-minipass/dist/esm/index.js.map +1 -0
  165. package/node_modules/@isaacs/fs-minipass/dist/esm/package.json +3 -0
  166. package/node_modules/@isaacs/fs-minipass/package.json +72 -0
  167. package/node_modules/@sap/cds/CHANGELOG.md +62 -1
  168. package/node_modules/@sap/cds/_i18n/messages_ar.properties +1 -0
  169. package/node_modules/@sap/cds/_i18n/messages_bg.properties +1 -0
  170. package/node_modules/@sap/cds/_i18n/messages_cs.properties +1 -0
  171. package/node_modules/@sap/cds/_i18n/messages_da.properties +1 -0
  172. package/node_modules/@sap/cds/_i18n/messages_de.properties +1 -0
  173. package/node_modules/@sap/cds/_i18n/messages_el.properties +1 -0
  174. package/node_modules/@sap/cds/_i18n/messages_en.properties +1 -0
  175. package/node_modules/@sap/cds/_i18n/messages_es.properties +1 -0
  176. package/node_modules/@sap/cds/_i18n/messages_es_MX.properties +1 -0
  177. package/node_modules/@sap/cds/_i18n/messages_fi.properties +1 -0
  178. package/node_modules/@sap/cds/_i18n/messages_fr.properties +1 -0
  179. package/node_modules/@sap/cds/_i18n/messages_he.properties +1 -0
  180. package/node_modules/@sap/cds/_i18n/messages_hr.properties +1 -0
  181. package/node_modules/@sap/cds/_i18n/messages_hu.properties +1 -0
  182. package/node_modules/@sap/cds/_i18n/messages_it.properties +1 -0
  183. package/node_modules/@sap/cds/_i18n/messages_ja.properties +1 -0
  184. package/node_modules/@sap/cds/_i18n/messages_kk.properties +1 -0
  185. package/node_modules/@sap/cds/_i18n/messages_ko.properties +1 -0
  186. package/node_modules/@sap/cds/_i18n/messages_ms.properties +1 -0
  187. package/node_modules/@sap/cds/_i18n/messages_nl.properties +1 -0
  188. package/node_modules/@sap/cds/_i18n/messages_no.properties +1 -0
  189. package/node_modules/@sap/cds/_i18n/messages_pl.properties +1 -0
  190. package/node_modules/@sap/cds/_i18n/messages_pt.properties +1 -0
  191. package/node_modules/@sap/cds/_i18n/messages_ro.properties +1 -0
  192. package/node_modules/@sap/cds/_i18n/messages_ru.properties +1 -0
  193. package/node_modules/@sap/cds/_i18n/messages_sh.properties +1 -0
  194. package/node_modules/@sap/cds/_i18n/messages_sk.properties +1 -0
  195. package/node_modules/@sap/cds/_i18n/messages_sl.properties +1 -0
  196. package/node_modules/@sap/cds/_i18n/messages_sv.properties +1 -0
  197. package/node_modules/@sap/cds/_i18n/messages_th.properties +1 -0
  198. package/node_modules/@sap/cds/_i18n/messages_tr.properties +1 -0
  199. package/node_modules/@sap/cds/_i18n/messages_uk.properties +1 -0
  200. package/node_modules/@sap/cds/_i18n/messages_vi.properties +1 -0
  201. package/node_modules/@sap/cds/_i18n/messages_zh_CN.properties +1 -0
  202. package/node_modules/@sap/cds/_i18n/messages_zh_TW.properties +1 -0
  203. package/node_modules/@sap/cds/app/index-client.js +164 -0
  204. package/node_modules/@sap/cds/app/index.css +598 -87
  205. package/node_modules/@sap/cds/app/index.html +54 -30
  206. package/node_modules/@sap/cds/app/index.js +311 -67
  207. package/node_modules/@sap/cds/app/table.html +226 -0
  208. package/node_modules/@sap/cds/app/table.js +302 -0
  209. package/node_modules/@sap/cds/bin/serve.js +3 -2
  210. package/node_modules/@sap/cds/eslint.config.mjs +2 -0
  211. package/node_modules/@sap/cds/lib/compile/cdsc.js +7 -0
  212. package/node_modules/@sap/cds/lib/compile/for/embeddings.js +27 -0
  213. package/node_modules/@sap/cds/lib/compile/load.js +2 -2
  214. package/node_modules/@sap/cds/lib/compile/minify.js +17 -4
  215. package/node_modules/@sap/cds/lib/compile/parse.js +3 -0
  216. package/node_modules/@sap/cds/lib/compile/resolve.js +16 -14
  217. package/node_modules/@sap/cds/lib/core/classes.js +1 -0
  218. package/node_modules/@sap/cds/lib/dbs/cds-deploy.js +4 -5
  219. package/node_modules/@sap/cds/lib/env/cds-env.js +132 -70
  220. package/node_modules/@sap/cds/lib/env/cds-requires/auth-strategies.js +62 -0
  221. package/node_modules/@sap/cds/lib/env/cds-requires/databases.js +49 -0
  222. package/node_modules/@sap/cds/lib/env/cds-requires/embeddings.js +8 -0
  223. package/node_modules/@sap/cds/lib/env/cds-requires/index.js +27 -0
  224. package/node_modules/@sap/cds/lib/env/cds-requires/messaging.js +82 -0
  225. package/node_modules/@sap/cds/lib/env/cds-requires/platform.js +23 -0
  226. package/node_modules/@sap/cds/lib/env/cds-requires/queues.js +34 -0
  227. package/node_modules/@sap/cds/lib/env/cds-requires/services.js +32 -0
  228. package/node_modules/@sap/cds/lib/env/defaults.js +9 -1
  229. package/node_modules/@sap/cds/lib/env/schemas/cds-package.js +0 -2
  230. package/node_modules/@sap/cds/lib/env/schemas/cds-rc.js +3 -3
  231. package/node_modules/@sap/cds/lib/env/schemas/index.js +4 -4
  232. package/node_modules/@sap/cds/lib/i18n/files.js +4 -4
  233. package/node_modules/@sap/cds/lib/i18n/locale.js +1 -1
  234. package/node_modules/@sap/cds/lib/index.js +9 -9
  235. package/node_modules/@sap/cds/lib/log/cds-log.js +3 -3
  236. package/node_modules/@sap/cds/lib/ql/SELECT.js +2 -0
  237. package/node_modules/@sap/cds/lib/ql/UPDATE.js +1 -1
  238. package/node_modules/@sap/cds/lib/ql/cds.ql-Query.js +4 -1
  239. package/node_modules/@sap/cds/lib/ql/core/@types/cqn.d.ts +146 -0
  240. package/node_modules/@sap/cds/lib/ql/core/@types/exprs.d.ts +51 -0
  241. package/node_modules/@sap/cds/lib/ql/core/@types/index.d.ts +29 -0
  242. package/node_modules/@sap/cds/lib/ql/core/@types/package.json +7 -0
  243. package/node_modules/@sap/cds/lib/ql/core/@types/ql/delete.d.ts +8 -0
  244. package/node_modules/@sap/cds/lib/ql/core/@types/ql/insert.d.ts +19 -0
  245. package/node_modules/@sap/cds/lib/ql/core/@types/ql/select.d.ts +24 -0
  246. package/node_modules/@sap/cds/lib/ql/core/@types/ql/update.d.ts +10 -0
  247. package/node_modules/@sap/cds/lib/ql/core/@types/query.d.ts +18 -0
  248. package/node_modules/@sap/cds/lib/ql/core/cql/parser.min.js +1 -0
  249. package/node_modules/@sap/cds/lib/ql/core/lib/index.js +69 -0
  250. package/node_modules/@sap/cds/lib/ql/core/lib/ql/cache.js +34 -0
  251. package/node_modules/@sap/cds/lib/ql/core/lib/ql/call-action.js +6 -0
  252. package/node_modules/@sap/cds/lib/ql/core/lib/ql/delete.js +8 -0
  253. package/node_modules/@sap/cds/lib/ql/core/lib/ql/insert.js +26 -0
  254. package/node_modules/@sap/cds/lib/ql/core/lib/ql/select.js +22 -0
  255. package/node_modules/@sap/cds/lib/ql/core/lib/ql/update.js +26 -0
  256. package/node_modules/@sap/cds/lib/ql/core/lib/query.js +85 -0
  257. package/node_modules/@sap/cds/lib/ql/core/lib/xl/fluent.js +47 -0
  258. package/node_modules/@sap/cds/lib/ql/core/lib/xl/ttl.js +24 -0
  259. package/node_modules/@sap/cds/lib/ql/core/license +201 -0
  260. package/node_modules/@sap/cds/lib/ql/core/package.json +24 -0
  261. package/node_modules/@sap/cds/lib/ql/core/readme.md +99 -0
  262. package/node_modules/@sap/cds/lib/ql/core/upstream.json +5 -0
  263. package/node_modules/@sap/cds/lib/req/spawn.js +1 -1
  264. package/node_modules/@sap/cds/lib/srv/bindings.js +111 -115
  265. package/node_modules/@sap/cds/lib/srv/cds-connect.js +11 -10
  266. package/node_modules/@sap/cds/lib/srv/cds-serve.js +16 -7
  267. package/node_modules/@sap/cds/lib/srv/cds.Service.js +13 -7
  268. package/node_modules/@sap/cds/lib/srv/factory.js +8 -10
  269. package/node_modules/@sap/cds/lib/srv/middlewares/auth/ias-auth.js +35 -32
  270. package/node_modules/@sap/cds/lib/srv/middlewares/auth/jwt-auth.js +5 -1
  271. package/node_modules/@sap/cds/lib/srv/middlewares/auth/mocked-users.js +1 -1
  272. package/node_modules/@sap/cds/lib/srv/protocols/hcql.js +230 -79
  273. package/node_modules/@sap/cds/lib/srv/protocols/http.js +7 -3
  274. package/node_modules/@sap/cds/lib/srv/protocols/index.js +7 -2
  275. package/node_modules/@sap/cds/lib/srv/srv-dispatch.js +2 -2
  276. package/node_modules/@sap/cds/lib/utils/cds-utils.js +50 -0
  277. package/node_modules/@sap/cds/lib/utils/csv-reader.js +2 -2
  278. package/node_modules/@sap/cds/libx/_runtime/common/generic/assert.js +18 -27
  279. package/node_modules/@sap/cds/libx/_runtime/common/generic/crud.js +1 -1
  280. package/node_modules/@sap/cds/libx/_runtime/common/utils/rewriteAsterisks.js +1 -1
  281. package/node_modules/@sap/cds/libx/_runtime/fiori/lean-draft.js +121 -84
  282. package/node_modules/@sap/cds/libx/_runtime/messaging/common-utils/authorizedRequest.js +24 -1
  283. package/node_modules/@sap/cds/libx/_runtime/messaging/common-utils/connections.js +45 -39
  284. package/node_modules/@sap/cds/libx/_runtime/remote/Service.js +2 -2
  285. package/node_modules/@sap/cds/libx/_runtime/remote/utils/client.js +3 -2
  286. package/node_modules/@sap/cds/libx/_runtime/remote/utils/query.js +11 -6
  287. package/node_modules/@sap/cds/libx/odata/ODataAdapter.js +1 -1
  288. package/node_modules/@sap/cds/libx/odata/middleware/create.js +4 -0
  289. package/node_modules/@sap/cds/libx/odata/middleware/metadata.js +1 -1
  290. package/node_modules/@sap/cds/libx/odata/middleware/operation.js +3 -0
  291. package/node_modules/@sap/cds/libx/odata/middleware/parse.js +9 -0
  292. package/node_modules/@sap/cds/libx/odata/middleware/read.js +6 -0
  293. package/node_modules/@sap/cds/libx/odata/middleware/update.js +5 -1
  294. package/node_modules/@sap/cds/libx/odata/parse/afterburner.js +3 -3
  295. package/node_modules/@sap/cds/libx/odata/parse/multipartToJson.js +1 -1
  296. package/node_modules/@sap/cds/libx/odata/utils/ieee754.js +20 -0
  297. package/node_modules/@sap/cds/libx/queue/TaskRunner.js +22 -5
  298. package/node_modules/@sap/cds/libx/queue/api.js +1 -1
  299. package/node_modules/@sap/cds/libx/queue/index.js +3 -1
  300. package/node_modules/@sap/cds/libx/queue/processing.js +5 -0
  301. package/node_modules/@sap/cds/libx/rest/RestAdapter.js +1 -0
  302. package/node_modules/@sap/cds/package.json +2 -2
  303. package/node_modules/@sap/cds/server.js +1 -0
  304. package/node_modules/@sap/cds/srv/ucl-service.cds +1 -0
  305. package/node_modules/@sap/cds-compiler/CHANGELOG.md +83 -0
  306. package/node_modules/@sap/cds-compiler/bin/cdsse.js +1 -1
  307. package/node_modules/@sap/cds-compiler/doc/EffectiveCSN.md +3314 -0
  308. package/node_modules/@sap/cds-compiler/lib/api/main.js +9 -6
  309. package/node_modules/@sap/cds-compiler/lib/api/options.js +3 -3
  310. package/node_modules/@sap/cds-compiler/lib/{model → base}/csnUtils.js +5 -5
  311. package/node_modules/@sap/cds-compiler/lib/base/message-registry.js +54 -6
  312. package/node_modules/@sap/cds-compiler/lib/base/optionProcessor.js +4 -4
  313. package/node_modules/@sap/cds-compiler/lib/{model → base}/sortViews.js +1 -1
  314. package/node_modules/@sap/cds-compiler/lib/checks/assocOutsideService.js +1 -1
  315. package/node_modules/@sap/cds-compiler/lib/checks/checkForTypes.js +1 -1
  316. package/node_modules/@sap/cds-compiler/lib/checks/checkPathsInStoredCalcElement.js +1 -1
  317. package/node_modules/@sap/cds-compiler/lib/checks/elements.js +37 -3
  318. package/node_modules/@sap/cds-compiler/lib/checks/enricher.js +1 -1
  319. package/node_modules/@sap/cds-compiler/lib/checks/existsInForbiddenPlaces.js +1 -1
  320. package/node_modules/@sap/cds-compiler/lib/checks/hasPersistedElements.js +1 -1
  321. package/node_modules/@sap/cds-compiler/lib/checks/manyExpand.js +1 -1
  322. package/node_modules/@sap/cds-compiler/lib/checks/manyNavigations.js +1 -1
  323. package/node_modules/@sap/cds-compiler/lib/checks/onConditions.js +1 -1
  324. package/node_modules/@sap/cds-compiler/lib/checks/parameters.js +1 -1
  325. package/node_modules/@sap/cds-compiler/lib/checks/queryNoDbArtifacts.js +1 -1
  326. package/node_modules/@sap/cds-compiler/lib/checks/selectItems.js +1 -1
  327. package/node_modules/@sap/cds-compiler/lib/checks/structuredAnnoExpressions.js +1 -1
  328. package/node_modules/@sap/cds-compiler/lib/checks/typeParameters.js +1 -1
  329. package/node_modules/@sap/cds-compiler/lib/checks/types.js +1 -1
  330. package/node_modules/@sap/cds-compiler/lib/checks/validator.js +1 -1
  331. package/node_modules/@sap/cds-compiler/lib/compiler/assert-consistency.js +20 -12
  332. package/node_modules/@sap/cds-compiler/lib/compiler/builtins.js +9 -4
  333. package/node_modules/@sap/cds-compiler/lib/compiler/checks.js +50 -0
  334. package/node_modules/@sap/cds-compiler/lib/compiler/define.js +303 -323
  335. package/node_modules/@sap/cds-compiler/lib/compiler/dictionaries.js +5 -0
  336. package/node_modules/@sap/cds-compiler/lib/compiler/extend.js +1015 -1177
  337. package/node_modules/@sap/cds-compiler/lib/compiler/generate.js +55 -42
  338. package/node_modules/@sap/cds-compiler/lib/compiler/populate.js +74 -45
  339. package/node_modules/@sap/cds-compiler/lib/compiler/propagator.js +1 -0
  340. package/node_modules/@sap/cds-compiler/lib/compiler/resolve.js +6 -4
  341. package/node_modules/@sap/cds-compiler/lib/compiler/shared.js +30 -49
  342. package/node_modules/@sap/cds-compiler/lib/compiler/utils.js +32 -18
  343. package/node_modules/@sap/cds-compiler/lib/edm/annotations/edmJson.js +3 -3
  344. package/node_modules/@sap/cds-compiler/lib/edm/annotations/genericTranslation.js +2 -2
  345. package/node_modules/@sap/cds-compiler/lib/edm/annotations/preprocessAnnotations.js +2 -3
  346. package/node_modules/@sap/cds-compiler/lib/edm/csn2edm.js +1 -1
  347. package/node_modules/@sap/cds-compiler/lib/edm/edm.js +6 -7
  348. package/node_modules/@sap/cds-compiler/lib/edm/edmAnnoPreprocessor.js +1 -1
  349. package/node_modules/@sap/cds-compiler/lib/edm/edmInboundChecks.js +1 -1
  350. package/node_modules/@sap/cds-compiler/lib/edm/edmPreprocessor.js +1 -1
  351. package/node_modules/@sap/cds-compiler/lib/edm/edmUtils.js +12 -7
  352. package/node_modules/@sap/cds-compiler/lib/gen/CdlGrammar.checksum +1 -1
  353. package/node_modules/@sap/cds-compiler/lib/gen/CdlParser.js +15 -15
  354. package/node_modules/@sap/cds-compiler/lib/gen/Dictionary.json +7 -0
  355. package/node_modules/@sap/cds-compiler/lib/json/from-csn.js +30 -30
  356. package/node_modules/@sap/cds-compiler/lib/json/to-csn.js +2 -1
  357. package/node_modules/@sap/cds-compiler/lib/main.js +4 -1
  358. package/node_modules/@sap/cds-compiler/lib/parsers/AstBuildingParser.js +42 -15
  359. package/node_modules/@sap/cds-compiler/lib/render/DuplicateChecker.js +37 -11
  360. package/node_modules/@sap/cds-compiler/lib/render/manageConstraints.js +1 -1
  361. package/node_modules/@sap/cds-compiler/lib/render/toCdl.js +11 -6
  362. package/node_modules/@sap/cds-compiler/lib/render/toRename.js +1 -1
  363. package/node_modules/@sap/cds-compiler/lib/render/toSql.js +74 -24
  364. package/node_modules/@sap/cds-compiler/lib/render/utils/common.js +1 -1
  365. package/node_modules/@sap/cds-compiler/lib/render/utils/operators.js +81 -0
  366. package/node_modules/@sap/cds-compiler/lib/render/utils/sql.js +17 -10
  367. package/node_modules/@sap/cds-compiler/lib/transform/db/assertUnique.js +1 -1
  368. package/node_modules/@sap/cds-compiler/lib/transform/db/associations.js +3 -4
  369. package/node_modules/@sap/cds-compiler/lib/transform/db/assocsToQueries/transformExists.js +1 -1
  370. package/node_modules/@sap/cds-compiler/lib/transform/db/backlinks.js +2 -2
  371. package/node_modules/@sap/cds-compiler/lib/transform/db/cdsPersistence.js +1 -1
  372. package/node_modules/@sap/cds-compiler/lib/transform/db/constraints.js +6 -5
  373. package/node_modules/@sap/cds-compiler/lib/transform/db/expansion.js +7 -1
  374. package/node_modules/@sap/cds-compiler/lib/transform/db/flattening.js +2 -2
  375. package/node_modules/@sap/cds-compiler/lib/{modelCompare/compare.js → transform/db/migration/diffModels.js} +5 -5
  376. package/node_modules/@sap/cds-compiler/lib/{modelCompare/utils/filter.js → transform/db/migration/filterDiff.js} +2 -2
  377. package/node_modules/@sap/cds-compiler/lib/transform/db/processSqlServices.js +1 -1
  378. package/node_modules/@sap/cds-compiler/lib/transform/db/rewriteCalculatedElements.js +1 -1
  379. package/node_modules/@sap/cds-compiler/lib/transform/db/temporal.js +1 -1
  380. package/node_modules/@sap/cds-compiler/lib/transform/db/views.js +2 -6
  381. package/node_modules/@sap/cds-compiler/lib/transform/draft/db.js +1 -1
  382. package/node_modules/@sap/cds-compiler/lib/transform/draft/odata.js +1 -1
  383. package/node_modules/@sap/cds-compiler/lib/transform/effective/annotations.js +1 -1
  384. package/node_modules/@sap/cds-compiler/lib/transform/effective/associations.js +1 -1
  385. package/node_modules/@sap/cds-compiler/lib/transform/effective/flattening.js +1 -1
  386. package/node_modules/@sap/cds-compiler/lib/transform/effective/main.js +3 -2
  387. package/node_modules/@sap/cds-compiler/lib/transform/effective/misc.js +2 -1
  388. package/node_modules/@sap/cds-compiler/lib/transform/effective/queries.js +1 -1
  389. package/node_modules/@sap/cds-compiler/lib/transform/effective/types.js +1 -1
  390. package/node_modules/@sap/cds-compiler/lib/transform/forOdata.js +1 -1
  391. package/node_modules/@sap/cds-compiler/lib/transform/forRelationalDB.js +9 -4
  392. package/node_modules/@sap/cds-compiler/lib/transform/localized.js +1 -1
  393. package/node_modules/@sap/cds-compiler/lib/transform/odata/adaptAnnotationRefs.js +5 -11
  394. package/node_modules/@sap/cds-compiler/lib/transform/odata/createForeignKeys.js +1 -1
  395. package/node_modules/@sap/cds-compiler/lib/transform/odata/flattening.js +4 -4
  396. package/node_modules/@sap/cds-compiler/lib/transform/odata/foreignKeyRefsInXprAnnos.js +5 -3
  397. package/node_modules/@sap/cds-compiler/lib/transform/odata/toFinalBaseType.js +29 -5
  398. package/node_modules/@sap/cds-compiler/lib/transform/odata/typesExposure.js +13 -3
  399. package/node_modules/@sap/cds-compiler/lib/transform/odata/utils.js +9 -0
  400. package/node_modules/@sap/cds-compiler/lib/transform/transformUtils.js +2 -2
  401. package/node_modules/@sap/cds-compiler/lib/transform/translateAssocsToJoins.js +1 -1
  402. package/node_modules/@sap/cds-compiler/lib/transform/tupleExpansion.js +1 -1
  403. package/node_modules/@sap/cds-compiler/lib/transform/universalCsn/coreComputed.js +1 -1
  404. package/node_modules/@sap/cds-compiler/lib/transform/universalCsn/universalCsnEnricher.js +1 -1
  405. package/node_modules/@sap/cds-compiler/lib/transform/universalCsn/utils.js +1 -1
  406. package/node_modules/@sap/cds-compiler/package.json +1 -1
  407. package/node_modules/@sap/cds-mtxs/CHANGELOG.md +55 -0
  408. package/node_modules/@sap/cds-mtxs/bin/cds-mtx-migrate.js +4 -6
  409. package/node_modules/@sap/cds-mtxs/bin/cds-mtx.js +5 -4
  410. package/node_modules/@sap/cds-mtxs/cds-plugin.js +38 -2
  411. package/node_modules/@sap/cds-mtxs/db/t0.cds +7 -0
  412. package/node_modules/@sap/cds-mtxs/lib/utils.js +129 -20
  413. package/node_modules/@sap/cds-mtxs/package.json +15 -14
  414. package/node_modules/@sap/cds-mtxs/srv/cf/abstract-provisioning-service.js +13 -12
  415. package/node_modules/@sap/cds-mtxs/srv/cf/saas-provisioning-service.cds +1 -0
  416. package/node_modules/@sap/cds-mtxs/srv/cf/sms-provisioning-service.cds +1 -0
  417. package/node_modules/@sap/cds-mtxs/srv/extensibility/compat/update.js +5 -2
  418. package/node_modules/@sap/cds-mtxs/srv/extensibility/linter/config.js +1 -2
  419. package/node_modules/@sap/cds-mtxs/srv/extensibility/linter/csv-allowlist.js +64 -0
  420. package/node_modules/@sap/cds-mtxs/srv/extensibility/linter/index.js +4 -2
  421. package/node_modules/@sap/cds-mtxs/srv/extensibility/linter/protected-namespace.js +67 -5
  422. package/node_modules/@sap/cds-mtxs/srv/extensibility-service.js +199 -19
  423. package/node_modules/@sap/cds-mtxs/srv/jobs-service.js +39 -15
  424. package/node_modules/@sap/cds-mtxs/srv/plugins/common.js +33 -12
  425. package/node_modules/@sap/cds-mtxs/srv/plugins/hana/ctnr-mgr-base.js +24 -6
  426. package/node_modules/@sap/cds-mtxs/srv/plugins/hana/hdi-ctnr-mgr.js +3 -1
  427. package/node_modules/@sap/cds-mtxs/srv/plugins/hana/hdi-native.js +752 -0
  428. package/node_modules/@sap/cds-mtxs/srv/plugins/hana/serverless.js +17 -20
  429. package/node_modules/@sap/cds-mtxs/srv/plugins/hana/srv-mgr-v2.js +511 -0
  430. package/node_modules/@sap/cds-mtxs/srv/plugins/hana/srv-mgr.js +11 -4
  431. package/node_modules/@sap/cds-mtxs/srv/plugins/hana/tms.js +8 -0
  432. package/node_modules/@sap/cds-mtxs/srv/plugins/hana.js +58 -43
  433. package/node_modules/@sap/cds-mtxs/srv/worker/job-worker-pool.js +1 -1
  434. package/node_modules/@sap/cds-mtxs/srv/worker/job-worker.js +1 -1
  435. package/node_modules/body-parser/README.md +17 -13
  436. package/node_modules/body-parser/lib/read.js +74 -57
  437. package/node_modules/body-parser/lib/types/json.js +11 -11
  438. package/node_modules/body-parser/lib/types/urlencoded.js +5 -5
  439. package/node_modules/body-parser/lib/utils.js +0 -15
  440. package/node_modules/body-parser/package.json +7 -12
  441. package/node_modules/chownr/LICENSE.md +63 -0
  442. package/node_modules/chownr/README.md +3 -0
  443. package/node_modules/chownr/dist/commonjs/index.d.ts +3 -0
  444. package/node_modules/chownr/dist/commonjs/index.d.ts.map +1 -0
  445. package/node_modules/chownr/dist/commonjs/index.js +93 -0
  446. package/node_modules/chownr/dist/commonjs/index.js.map +1 -0
  447. package/node_modules/chownr/dist/commonjs/package.json +3 -0
  448. package/node_modules/chownr/dist/esm/index.d.ts +3 -0
  449. package/node_modules/chownr/dist/esm/index.d.ts.map +1 -0
  450. package/node_modules/chownr/dist/esm/index.js +85 -0
  451. package/node_modules/chownr/dist/esm/index.js.map +1 -0
  452. package/node_modules/chownr/dist/esm/package.json +3 -0
  453. package/node_modules/chownr/package.json +69 -0
  454. package/node_modules/content-disposition/README.md +105 -35
  455. package/node_modules/content-disposition/dist/index.d.ts +72 -0
  456. package/node_modules/content-disposition/dist/index.js +388 -0
  457. package/node_modules/content-disposition/dist/index.js.map +1 -0
  458. package/node_modules/content-disposition/package.json +31 -19
  459. package/node_modules/content-type/README.md +34 -57
  460. package/node_modules/content-type/package.json +35 -25
  461. package/node_modules/encodeurl/README.md +14 -0
  462. package/node_modules/encodeurl/index.js +5 -10
  463. package/node_modules/encodeurl/package.json +10 -6
  464. package/node_modules/express/Readme.md +15 -9
  465. package/node_modules/express/lib/application.js +2 -2
  466. package/node_modules/express/lib/request.js +32 -19
  467. package/node_modules/express/lib/response.js +27 -30
  468. package/node_modules/express/package.json +10 -10
  469. package/node_modules/handlebars/bin/handlebars +1 -1
  470. package/node_modules/handlebars/dist/amd/handlebars/base.js +2 -2
  471. package/node_modules/handlebars/dist/amd/handlebars/compiler/base.js +2 -59
  472. package/node_modules/handlebars/dist/amd/handlebars/compiler/code-gen.js +68 -5
  473. package/node_modules/handlebars/dist/amd/handlebars/compiler/compiler.js +160 -19
  474. package/node_modules/handlebars/dist/amd/handlebars/compiler/javascript-compiler.js +23 -7
  475. package/node_modules/handlebars/dist/amd/handlebars/compiler/node-types.js +12 -0
  476. package/node_modules/handlebars/dist/amd/handlebars/compiler/visitor.js +26 -7
  477. package/node_modules/handlebars/dist/amd/handlebars/compiler/whitespace-control.js +9 -4
  478. package/node_modules/handlebars/dist/amd/handlebars/exception.js +8 -4
  479. package/node_modules/handlebars/dist/amd/handlebars/helpers/each.js +40 -14
  480. package/node_modules/handlebars/dist/amd/handlebars/internal/proto-access.js +21 -1
  481. package/node_modules/handlebars/dist/amd/handlebars/runtime.js +24 -4
  482. package/node_modules/handlebars/dist/amd/handlebars/utils.js +4 -3
  483. package/node_modules/handlebars/dist/amd/precompiler.js +13 -7
  484. package/node_modules/handlebars/dist/cjs/handlebars/base.js +2 -2
  485. package/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js +1 -60
  486. package/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js +64 -4
  487. package/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js +161 -18
  488. package/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js +23 -7
  489. package/node_modules/handlebars/dist/cjs/handlebars/compiler/node-types.js +10 -0
  490. package/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js +29 -6
  491. package/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js +9 -4
  492. package/node_modules/handlebars/dist/cjs/handlebars/exception.js +8 -4
  493. package/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js +40 -14
  494. package/node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js +21 -1
  495. package/node_modules/handlebars/dist/cjs/handlebars/runtime.js +24 -4
  496. package/node_modules/handlebars/dist/cjs/handlebars/utils.js +4 -3
  497. package/node_modules/handlebars/dist/cjs/precompiler.js +14 -6
  498. package/node_modules/handlebars/dist/handlebars.amd.js +401 -130
  499. package/node_modules/handlebars/dist/handlebars.amd.min.js +4 -4
  500. package/node_modules/handlebars/dist/handlebars.js +396 -125
  501. package/node_modules/handlebars/dist/handlebars.min.js +4 -4
  502. package/node_modules/handlebars/dist/handlebars.runtime.amd.js +100 -29
  503. package/node_modules/handlebars/dist/handlebars.runtime.amd.min.js +2 -2
  504. package/node_modules/handlebars/dist/handlebars.runtime.js +94 -23
  505. package/node_modules/handlebars/dist/handlebars.runtime.min.js +2 -2
  506. package/node_modules/handlebars/lib/handlebars/base.js +1 -1
  507. package/node_modules/handlebars/lib/handlebars/compiler/base.js +0 -67
  508. package/node_modules/handlebars/lib/handlebars/compiler/code-gen.js +65 -11
  509. package/node_modules/handlebars/lib/handlebars/compiler/compiler.js +164 -23
  510. package/node_modules/handlebars/lib/handlebars/compiler/javascript-compiler.js +23 -7
  511. package/node_modules/handlebars/lib/handlebars/compiler/node-types.js +24 -0
  512. package/node_modules/handlebars/lib/handlebars/compiler/visitor.js +29 -5
  513. package/node_modules/handlebars/lib/handlebars/compiler/whitespace-control.js +16 -5
  514. package/node_modules/handlebars/lib/handlebars/exception.js +7 -3
  515. package/node_modules/handlebars/lib/handlebars/helpers/each.js +39 -16
  516. package/node_modules/handlebars/lib/handlebars/internal/proto-access.js +22 -0
  517. package/node_modules/handlebars/lib/handlebars/runtime.js +36 -4
  518. package/node_modules/handlebars/lib/handlebars/utils.js +3 -2
  519. package/node_modules/handlebars/lib/precompiler.js +14 -5
  520. package/node_modules/handlebars/package.json +2 -2
  521. package/node_modules/handlebars/release-notes.md +20 -1
  522. package/node_modules/handlebars/types/index.d.ts +8 -0
  523. package/node_modules/hdb/cfg/VERSION +1 -1
  524. package/node_modules/hdb/lib/Client.js +6 -2
  525. package/node_modules/hdb/lib/protocol/ClientInfo.js +28 -15
  526. package/node_modules/hdb/lib/protocol/Connection.js +30 -3
  527. package/node_modules/hdb/lib/protocol/Writer.js +2 -2
  528. package/node_modules/hdb/lib/protocol/common/ConnectOption.js +2 -0
  529. package/node_modules/hdb/lib/protocol/common/ConnectOptionFlagSet1.js +18 -0
  530. package/node_modules/hdb/lib/protocol/common/ConnectOptionType.js +2 -0
  531. package/node_modules/hdb/lib/protocol/common/Constants.js +1 -0
  532. package/node_modules/hdb/lib/protocol/common/MessageType.js +3 -2
  533. package/node_modules/hdb/lib/protocol/common/PartKind.js +2 -1
  534. package/node_modules/hdb/lib/protocol/common/index.js +1 -0
  535. package/node_modules/hdb/lib/protocol/data/TextList.js +25 -17
  536. package/node_modules/hdb/lib/protocol/data/index.js +1 -0
  537. package/node_modules/hdb/lib/protocol/part/ConnectOptions.js +7 -0
  538. package/node_modules/hdb/lib/protocol/request/index.js +7 -0
  539. package/node_modules/hdb/package.json +1 -2
  540. package/node_modules/livereload-js/.github/workflows/main.yml +4 -4
  541. package/node_modules/livereload-js/README.md +3 -3
  542. package/node_modules/livereload-js/dist/livereload.js +839 -2742
  543. package/node_modules/livereload-js/dist/livereload.min.js +1 -1
  544. package/node_modules/livereload-js/package.json +11 -11
  545. package/node_modules/minipass/LICENSE.md +55 -0
  546. package/node_modules/minipass/README.md +825 -0
  547. package/node_modules/minipass/dist/commonjs/index.d.ts +545 -0
  548. package/node_modules/minipass/dist/commonjs/index.d.ts.map +1 -0
  549. package/node_modules/minipass/dist/commonjs/index.js +1038 -0
  550. package/node_modules/minipass/dist/commonjs/index.js.map +1 -0
  551. package/node_modules/minipass/dist/commonjs/package.json +3 -0
  552. package/node_modules/minipass/dist/esm/index.d.ts +545 -0
  553. package/node_modules/minipass/dist/esm/index.d.ts.map +1 -0
  554. package/node_modules/minipass/dist/esm/index.js +1020 -0
  555. package/node_modules/minipass/dist/esm/index.js.map +1 -0
  556. package/node_modules/minipass/dist/esm/package.json +3 -0
  557. package/node_modules/minipass/package.json +77 -0
  558. package/node_modules/minizlib/LICENSE +26 -0
  559. package/node_modules/minizlib/README.md +64 -0
  560. package/node_modules/minizlib/dist/commonjs/constants.d.ts +2 -0
  561. package/node_modules/minizlib/dist/commonjs/constants.d.ts.map +1 -0
  562. package/node_modules/minizlib/dist/commonjs/constants.js +123 -0
  563. package/node_modules/minizlib/dist/commonjs/constants.js.map +1 -0
  564. package/node_modules/minizlib/dist/commonjs/index.d.ts +99 -0
  565. package/node_modules/minizlib/dist/commonjs/index.d.ts.map +1 -0
  566. package/node_modules/minizlib/dist/commonjs/index.js +416 -0
  567. package/node_modules/minizlib/dist/commonjs/index.js.map +1 -0
  568. package/node_modules/minizlib/dist/commonjs/package.json +3 -0
  569. package/node_modules/minizlib/dist/esm/constants.d.ts +2 -0
  570. package/node_modules/minizlib/dist/esm/constants.d.ts.map +1 -0
  571. package/node_modules/minizlib/dist/esm/constants.js +117 -0
  572. package/node_modules/minizlib/dist/esm/constants.js.map +1 -0
  573. package/node_modules/minizlib/dist/esm/index.d.ts +99 -0
  574. package/node_modules/minizlib/dist/esm/index.d.ts.map +1 -0
  575. package/node_modules/minizlib/dist/esm/index.js +363 -0
  576. package/node_modules/minizlib/dist/esm/index.js.map +1 -0
  577. package/node_modules/minizlib/dist/esm/package.json +3 -0
  578. package/node_modules/minizlib/package.json +80 -0
  579. package/node_modules/on-finished/index.js +14 -2
  580. package/node_modules/on-finished/package.json +11 -7
  581. package/node_modules/qs/.editorconfig +1 -1
  582. package/node_modules/qs/.github/THREAT_MODEL.md +4 -2
  583. package/node_modules/qs/CHANGELOG.md +103 -14
  584. package/node_modules/qs/README.md +90 -9
  585. package/node_modules/qs/dist/qs.js +19 -19
  586. package/node_modules/qs/eslint.config.mjs +61 -50
  587. package/node_modules/qs/lib/formats.js +7 -2
  588. package/node_modules/qs/lib/parse.js +121 -12
  589. package/node_modules/qs/lib/stringify.js +9 -7
  590. package/node_modules/qs/lib/utils.js +158 -15
  591. package/node_modules/qs/package.json +8 -8
  592. package/node_modules/qs/test/parse.js +509 -2
  593. package/node_modules/qs/test/stringify.js +485 -33
  594. package/node_modules/qs/test/utils.js +245 -3
  595. package/node_modules/semver/classes/range.js +2 -2
  596. package/node_modules/semver/internal/constants.js +30 -0
  597. package/node_modules/semver/internal/trim-comparator-whitespace.js +438 -0
  598. package/node_modules/semver/package.json +1 -1
  599. package/node_modules/tar/LICENSE.md +55 -0
  600. package/node_modules/tar/README.md +1233 -0
  601. package/node_modules/tar/dist/commonjs/create.d.ts +3 -0
  602. package/node_modules/tar/dist/commonjs/create.d.ts.map +1 -0
  603. package/node_modules/tar/dist/commonjs/create.js +82 -0
  604. package/node_modules/tar/dist/commonjs/create.js.map +1 -0
  605. package/node_modules/tar/dist/commonjs/cwd-error.d.ts +8 -0
  606. package/node_modules/tar/dist/commonjs/cwd-error.d.ts.map +1 -0
  607. package/node_modules/tar/dist/commonjs/cwd-error.js +18 -0
  608. package/node_modules/tar/dist/commonjs/cwd-error.js.map +1 -0
  609. package/node_modules/tar/dist/commonjs/extract.d.ts +3 -0
  610. package/node_modules/tar/dist/commonjs/extract.d.ts.map +1 -0
  611. package/node_modules/tar/dist/commonjs/extract.js +88 -0
  612. package/node_modules/tar/dist/commonjs/extract.js.map +1 -0
  613. package/node_modules/tar/dist/commonjs/get-write-flag.d.ts +2 -0
  614. package/node_modules/tar/dist/commonjs/get-write-flag.d.ts.map +1 -0
  615. package/node_modules/tar/dist/commonjs/get-write-flag.js +32 -0
  616. package/node_modules/tar/dist/commonjs/get-write-flag.js.map +1 -0
  617. package/node_modules/tar/dist/commonjs/header.d.ts +53 -0
  618. package/node_modules/tar/dist/commonjs/header.d.ts.map +1 -0
  619. package/node_modules/tar/dist/commonjs/header.js +348 -0
  620. package/node_modules/tar/dist/commonjs/header.js.map +1 -0
  621. package/node_modules/tar/dist/commonjs/index.d.ts +20 -0
  622. package/node_modules/tar/dist/commonjs/index.d.ts.map +1 -0
  623. package/node_modules/tar/dist/commonjs/index.js +64 -0
  624. package/node_modules/tar/dist/commonjs/index.js.map +1 -0
  625. package/node_modules/tar/dist/commonjs/index.min.js +4 -0
  626. package/node_modules/tar/dist/commonjs/index.min.js.map +7 -0
  627. package/node_modules/tar/dist/commonjs/large-numbers.d.ts +3 -0
  628. package/node_modules/tar/dist/commonjs/large-numbers.d.ts.map +1 -0
  629. package/node_modules/tar/dist/commonjs/large-numbers.js +99 -0
  630. package/node_modules/tar/dist/commonjs/large-numbers.js.map +1 -0
  631. package/node_modules/tar/dist/commonjs/list.d.ts +7 -0
  632. package/node_modules/tar/dist/commonjs/list.d.ts.map +1 -0
  633. package/node_modules/tar/dist/commonjs/list.js +153 -0
  634. package/node_modules/tar/dist/commonjs/list.js.map +1 -0
  635. package/node_modules/tar/dist/commonjs/make-command.d.ts +49 -0
  636. package/node_modules/tar/dist/commonjs/make-command.d.ts.map +1 -0
  637. package/node_modules/tar/dist/commonjs/make-command.js +52 -0
  638. package/node_modules/tar/dist/commonjs/make-command.js.map +1 -0
  639. package/node_modules/tar/dist/commonjs/mkdir.d.ts +25 -0
  640. package/node_modules/tar/dist/commonjs/mkdir.d.ts.map +1 -0
  641. package/node_modules/tar/dist/commonjs/mkdir.js +187 -0
  642. package/node_modules/tar/dist/commonjs/mkdir.js.map +1 -0
  643. package/node_modules/tar/dist/commonjs/mode-fix.d.ts +2 -0
  644. package/node_modules/tar/dist/commonjs/mode-fix.d.ts.map +1 -0
  645. package/node_modules/tar/dist/commonjs/mode-fix.js +29 -0
  646. package/node_modules/tar/dist/commonjs/mode-fix.js.map +1 -0
  647. package/node_modules/tar/dist/commonjs/normalize-unicode.d.ts +2 -0
  648. package/node_modules/tar/dist/commonjs/normalize-unicode.d.ts.map +1 -0
  649. package/node_modules/tar/dist/commonjs/normalize-unicode.js +38 -0
  650. package/node_modules/tar/dist/commonjs/normalize-unicode.js.map +1 -0
  651. package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts +2 -0
  652. package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts.map +1 -0
  653. package/node_modules/tar/dist/commonjs/normalize-windows-path.js +12 -0
  654. package/node_modules/tar/dist/commonjs/normalize-windows-path.js.map +1 -0
  655. package/node_modules/tar/dist/commonjs/options.d.ts +604 -0
  656. package/node_modules/tar/dist/commonjs/options.d.ts.map +1 -0
  657. package/node_modules/tar/dist/commonjs/options.js +66 -0
  658. package/node_modules/tar/dist/commonjs/options.js.map +1 -0
  659. package/node_modules/tar/dist/commonjs/pack.d.ts +105 -0
  660. package/node_modules/tar/dist/commonjs/pack.d.ts.map +1 -0
  661. package/node_modules/tar/dist/commonjs/pack.js +544 -0
  662. package/node_modules/tar/dist/commonjs/pack.js.map +1 -0
  663. package/node_modules/tar/dist/commonjs/package.json +3 -0
  664. package/node_modules/tar/dist/commonjs/parse.d.ts +92 -0
  665. package/node_modules/tar/dist/commonjs/parse.d.ts.map +1 -0
  666. package/node_modules/tar/dist/commonjs/parse.js +655 -0
  667. package/node_modules/tar/dist/commonjs/parse.js.map +1 -0
  668. package/node_modules/tar/dist/commonjs/path-reservations.d.ts +11 -0
  669. package/node_modules/tar/dist/commonjs/path-reservations.d.ts.map +1 -0
  670. package/node_modules/tar/dist/commonjs/path-reservations.js +170 -0
  671. package/node_modules/tar/dist/commonjs/path-reservations.js.map +1 -0
  672. package/node_modules/tar/dist/commonjs/pax.d.ts +26 -0
  673. package/node_modules/tar/dist/commonjs/pax.d.ts.map +1 -0
  674. package/node_modules/tar/dist/commonjs/pax.js +182 -0
  675. package/node_modules/tar/dist/commonjs/pax.js.map +1 -0
  676. package/node_modules/tar/dist/commonjs/process-umask.d.ts +2 -0
  677. package/node_modules/tar/dist/commonjs/process-umask.d.ts.map +1 -0
  678. package/node_modules/tar/dist/commonjs/process-umask.js +7 -0
  679. package/node_modules/tar/dist/commonjs/process-umask.js.map +1 -0
  680. package/node_modules/tar/dist/commonjs/read-entry.d.ts +36 -0
  681. package/node_modules/tar/dist/commonjs/read-entry.d.ts.map +1 -0
  682. package/node_modules/tar/dist/commonjs/read-entry.js +136 -0
  683. package/node_modules/tar/dist/commonjs/read-entry.js.map +1 -0
  684. package/node_modules/tar/dist/commonjs/replace.d.ts +2 -0
  685. package/node_modules/tar/dist/commonjs/replace.d.ts.map +1 -0
  686. package/node_modules/tar/dist/commonjs/replace.js +227 -0
  687. package/node_modules/tar/dist/commonjs/replace.js.map +1 -0
  688. package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts +2 -0
  689. package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts.map +1 -0
  690. package/node_modules/tar/dist/commonjs/strip-absolute-path.js +29 -0
  691. package/node_modules/tar/dist/commonjs/strip-absolute-path.js.map +1 -0
  692. package/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts +2 -0
  693. package/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts.map +1 -0
  694. package/node_modules/tar/dist/commonjs/strip-trailing-slashes.js +18 -0
  695. package/node_modules/tar/dist/commonjs/strip-trailing-slashes.js.map +1 -0
  696. package/node_modules/tar/dist/commonjs/symlink-error.d.ts +9 -0
  697. package/node_modules/tar/dist/commonjs/symlink-error.d.ts.map +1 -0
  698. package/node_modules/tar/dist/commonjs/symlink-error.js +19 -0
  699. package/node_modules/tar/dist/commonjs/symlink-error.js.map +1 -0
  700. package/node_modules/tar/dist/commonjs/types.d.ts +16 -0
  701. package/node_modules/tar/dist/commonjs/types.d.ts.map +1 -0
  702. package/node_modules/tar/dist/commonjs/types.js +70 -0
  703. package/node_modules/tar/dist/commonjs/types.js.map +1 -0
  704. package/node_modules/tar/dist/commonjs/unpack.d.ts +101 -0
  705. package/node_modules/tar/dist/commonjs/unpack.d.ts.map +1 -0
  706. package/node_modules/tar/dist/commonjs/unpack.js +932 -0
  707. package/node_modules/tar/dist/commonjs/unpack.js.map +1 -0
  708. package/node_modules/tar/dist/commonjs/update.d.ts +2 -0
  709. package/node_modules/tar/dist/commonjs/update.d.ts.map +1 -0
  710. package/node_modules/tar/dist/commonjs/update.js +33 -0
  711. package/node_modules/tar/dist/commonjs/update.js.map +1 -0
  712. package/node_modules/tar/dist/commonjs/warn-method.d.ts +24 -0
  713. package/node_modules/tar/dist/commonjs/warn-method.d.ts.map +1 -0
  714. package/node_modules/tar/dist/commonjs/warn-method.js +31 -0
  715. package/node_modules/tar/dist/commonjs/warn-method.js.map +1 -0
  716. package/node_modules/tar/dist/commonjs/winchars.d.ts +3 -0
  717. package/node_modules/tar/dist/commonjs/winchars.d.ts.map +1 -0
  718. package/node_modules/tar/dist/commonjs/winchars.js +14 -0
  719. package/node_modules/tar/dist/commonjs/winchars.js.map +1 -0
  720. package/node_modules/tar/dist/commonjs/write-entry.d.ts +129 -0
  721. package/node_modules/tar/dist/commonjs/write-entry.d.ts.map +1 -0
  722. package/node_modules/tar/dist/commonjs/write-entry.js +698 -0
  723. package/node_modules/tar/dist/commonjs/write-entry.js.map +1 -0
  724. package/node_modules/tar/dist/esm/create.d.ts +3 -0
  725. package/node_modules/tar/dist/esm/create.d.ts.map +1 -0
  726. package/node_modules/tar/dist/esm/create.js +76 -0
  727. package/node_modules/tar/dist/esm/create.js.map +1 -0
  728. package/node_modules/tar/dist/esm/cwd-error.d.ts +8 -0
  729. package/node_modules/tar/dist/esm/cwd-error.d.ts.map +1 -0
  730. package/node_modules/tar/dist/esm/cwd-error.js +14 -0
  731. package/node_modules/tar/dist/esm/cwd-error.js.map +1 -0
  732. package/node_modules/tar/dist/esm/extract.d.ts +3 -0
  733. package/node_modules/tar/dist/esm/extract.d.ts.map +1 -0
  734. package/node_modules/tar/dist/esm/extract.js +49 -0
  735. package/node_modules/tar/dist/esm/extract.js.map +1 -0
  736. package/node_modules/tar/dist/esm/get-write-flag.d.ts +2 -0
  737. package/node_modules/tar/dist/esm/get-write-flag.d.ts.map +1 -0
  738. package/node_modules/tar/dist/esm/get-write-flag.js +26 -0
  739. package/node_modules/tar/dist/esm/get-write-flag.js.map +1 -0
  740. package/node_modules/tar/dist/esm/header.d.ts +53 -0
  741. package/node_modules/tar/dist/esm/header.d.ts.map +1 -0
  742. package/node_modules/tar/dist/esm/header.js +311 -0
  743. package/node_modules/tar/dist/esm/header.js.map +1 -0
  744. package/node_modules/tar/dist/esm/index.d.ts +20 -0
  745. package/node_modules/tar/dist/esm/index.d.ts.map +1 -0
  746. package/node_modules/tar/dist/esm/index.js +20 -0
  747. package/node_modules/tar/dist/esm/index.js.map +1 -0
  748. package/node_modules/tar/dist/esm/index.min.js +4 -0
  749. package/node_modules/tar/dist/esm/index.min.js.map +7 -0
  750. package/node_modules/tar/dist/esm/large-numbers.d.ts +3 -0
  751. package/node_modules/tar/dist/esm/large-numbers.d.ts.map +1 -0
  752. package/node_modules/tar/dist/esm/large-numbers.js +94 -0
  753. package/node_modules/tar/dist/esm/large-numbers.js.map +1 -0
  754. package/node_modules/tar/dist/esm/list.d.ts +7 -0
  755. package/node_modules/tar/dist/esm/list.d.ts.map +1 -0
  756. package/node_modules/tar/dist/esm/list.js +113 -0
  757. package/node_modules/tar/dist/esm/list.js.map +1 -0
  758. package/node_modules/tar/dist/esm/make-command.d.ts +49 -0
  759. package/node_modules/tar/dist/esm/make-command.d.ts.map +1 -0
  760. package/node_modules/tar/dist/esm/make-command.js +48 -0
  761. package/node_modules/tar/dist/esm/make-command.js.map +1 -0
  762. package/node_modules/tar/dist/esm/mkdir.d.ts +25 -0
  763. package/node_modules/tar/dist/esm/mkdir.d.ts.map +1 -0
  764. package/node_modules/tar/dist/esm/mkdir.js +179 -0
  765. package/node_modules/tar/dist/esm/mkdir.js.map +1 -0
  766. package/node_modules/tar/dist/esm/mode-fix.d.ts +2 -0
  767. package/node_modules/tar/dist/esm/mode-fix.d.ts.map +1 -0
  768. package/node_modules/tar/dist/esm/mode-fix.js +25 -0
  769. package/node_modules/tar/dist/esm/mode-fix.js.map +1 -0
  770. package/node_modules/tar/dist/esm/normalize-unicode.d.ts +2 -0
  771. package/node_modules/tar/dist/esm/normalize-unicode.d.ts.map +1 -0
  772. package/node_modules/tar/dist/esm/normalize-unicode.js +34 -0
  773. package/node_modules/tar/dist/esm/normalize-unicode.js.map +1 -0
  774. package/node_modules/tar/dist/esm/normalize-windows-path.d.ts +2 -0
  775. package/node_modules/tar/dist/esm/normalize-windows-path.d.ts.map +1 -0
  776. package/node_modules/tar/dist/esm/normalize-windows-path.js +9 -0
  777. package/node_modules/tar/dist/esm/normalize-windows-path.js.map +1 -0
  778. package/node_modules/tar/dist/esm/options.d.ts +604 -0
  779. package/node_modules/tar/dist/esm/options.d.ts.map +1 -0
  780. package/node_modules/tar/dist/esm/options.js +54 -0
  781. package/node_modules/tar/dist/esm/options.js.map +1 -0
  782. package/node_modules/tar/dist/esm/pack.d.ts +105 -0
  783. package/node_modules/tar/dist/esm/pack.d.ts.map +1 -0
  784. package/node_modules/tar/dist/esm/pack.js +502 -0
  785. package/node_modules/tar/dist/esm/pack.js.map +1 -0
  786. package/node_modules/tar/dist/esm/package.json +3 -0
  787. package/node_modules/tar/dist/esm/parse.d.ts +92 -0
  788. package/node_modules/tar/dist/esm/parse.d.ts.map +1 -0
  789. package/node_modules/tar/dist/esm/parse.js +651 -0
  790. package/node_modules/tar/dist/esm/parse.js.map +1 -0
  791. package/node_modules/tar/dist/esm/path-reservations.d.ts +11 -0
  792. package/node_modules/tar/dist/esm/path-reservations.d.ts.map +1 -0
  793. package/node_modules/tar/dist/esm/path-reservations.js +166 -0
  794. package/node_modules/tar/dist/esm/path-reservations.js.map +1 -0
  795. package/node_modules/tar/dist/esm/pax.d.ts +26 -0
  796. package/node_modules/tar/dist/esm/pax.d.ts.map +1 -0
  797. package/node_modules/tar/dist/esm/pax.js +178 -0
  798. package/node_modules/tar/dist/esm/pax.js.map +1 -0
  799. package/node_modules/tar/dist/esm/process-umask.d.ts +2 -0
  800. package/node_modules/tar/dist/esm/process-umask.d.ts.map +1 -0
  801. package/node_modules/tar/dist/esm/process-umask.js +3 -0
  802. package/node_modules/tar/dist/esm/process-umask.js.map +1 -0
  803. package/node_modules/tar/dist/esm/read-entry.d.ts +36 -0
  804. package/node_modules/tar/dist/esm/read-entry.d.ts.map +1 -0
  805. package/node_modules/tar/dist/esm/read-entry.js +132 -0
  806. package/node_modules/tar/dist/esm/read-entry.js.map +1 -0
  807. package/node_modules/tar/dist/esm/replace.d.ts +2 -0
  808. package/node_modules/tar/dist/esm/replace.d.ts.map +1 -0
  809. package/node_modules/tar/dist/esm/replace.js +221 -0
  810. package/node_modules/tar/dist/esm/replace.js.map +1 -0
  811. package/node_modules/tar/dist/esm/strip-absolute-path.d.ts +2 -0
  812. package/node_modules/tar/dist/esm/strip-absolute-path.d.ts.map +1 -0
  813. package/node_modules/tar/dist/esm/strip-absolute-path.js +25 -0
  814. package/node_modules/tar/dist/esm/strip-absolute-path.js.map +1 -0
  815. package/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts +2 -0
  816. package/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts.map +1 -0
  817. package/node_modules/tar/dist/esm/strip-trailing-slashes.js +14 -0
  818. package/node_modules/tar/dist/esm/strip-trailing-slashes.js.map +1 -0
  819. package/node_modules/tar/dist/esm/symlink-error.d.ts +9 -0
  820. package/node_modules/tar/dist/esm/symlink-error.d.ts.map +1 -0
  821. package/node_modules/tar/dist/esm/symlink-error.js +15 -0
  822. package/node_modules/tar/dist/esm/symlink-error.js.map +1 -0
  823. package/node_modules/tar/dist/esm/types.d.ts +16 -0
  824. package/node_modules/tar/dist/esm/types.d.ts.map +1 -0
  825. package/node_modules/tar/dist/esm/types.js +65 -0
  826. package/node_modules/tar/dist/esm/types.js.map +1 -0
  827. package/node_modules/tar/dist/esm/unpack.d.ts +101 -0
  828. package/node_modules/tar/dist/esm/unpack.d.ts.map +1 -0
  829. package/node_modules/tar/dist/esm/unpack.js +891 -0
  830. package/node_modules/tar/dist/esm/unpack.js.map +1 -0
  831. package/node_modules/tar/dist/esm/update.d.ts +2 -0
  832. package/node_modules/tar/dist/esm/update.d.ts.map +1 -0
  833. package/node_modules/tar/dist/esm/update.js +30 -0
  834. package/node_modules/tar/dist/esm/update.js.map +1 -0
  835. package/node_modules/tar/dist/esm/warn-method.d.ts +24 -0
  836. package/node_modules/tar/dist/esm/warn-method.d.ts.map +1 -0
  837. package/node_modules/tar/dist/esm/warn-method.js +27 -0
  838. package/node_modules/tar/dist/esm/warn-method.js.map +1 -0
  839. package/node_modules/tar/dist/esm/winchars.d.ts +3 -0
  840. package/node_modules/tar/dist/esm/winchars.d.ts.map +1 -0
  841. package/node_modules/tar/dist/esm/winchars.js +9 -0
  842. package/node_modules/tar/dist/esm/winchars.js.map +1 -0
  843. package/node_modules/tar/dist/esm/write-entry.d.ts +129 -0
  844. package/node_modules/tar/dist/esm/write-entry.d.ts.map +1 -0
  845. package/node_modules/tar/dist/esm/write-entry.js +656 -0
  846. package/node_modules/tar/dist/esm/write-entry.js.map +1 -0
  847. package/node_modules/tar/package.json +298 -0
  848. package/node_modules/ws/README.md +21 -29
  849. package/node_modules/ws/lib/buffer-util.js +13 -2
  850. package/node_modules/ws/lib/sender.js +4 -1
  851. package/node_modules/ws/lib/websocket.js +25 -6
  852. package/node_modules/ws/package.json +1 -1
  853. package/node_modules/yallist/LICENSE.md +63 -0
  854. package/node_modules/yallist/README.md +205 -0
  855. package/node_modules/yallist/dist/commonjs/index.d.ts +39 -0
  856. package/node_modules/yallist/dist/commonjs/index.d.ts.map +1 -0
  857. package/node_modules/yallist/dist/commonjs/index.js +384 -0
  858. package/node_modules/yallist/dist/commonjs/index.js.map +1 -0
  859. package/node_modules/yallist/dist/commonjs/package.json +3 -0
  860. package/node_modules/yallist/dist/esm/index.d.ts +39 -0
  861. package/node_modules/yallist/dist/esm/index.d.ts.map +1 -0
  862. package/node_modules/yallist/dist/esm/index.js +379 -0
  863. package/node_modules/yallist/dist/esm/index.js.map +1 -0
  864. package/node_modules/yallist/dist/esm/package.json +3 -0
  865. package/node_modules/yallist/package.json +68 -0
  866. package/package.json +7 -1
  867. package/bin/completion/templates/cds-tmpl.fish +0 -65
  868. package/bin/completion/templates/cds-tmpl.ps1 +0 -217
  869. package/bin/completion/templates/cds-tmpl.sh +0 -93
  870. package/bin/completion/templates/cds-tmpl.zsh +0 -74
  871. package/node_modules/@cap-js/db-service/lib/recursion-guard.js +0 -40
  872. package/node_modules/@sap/cds/lib/env/cds-requires.js +0 -327
  873. package/node_modules/@sap/cds-mtxs/srv/bootstrap.cds +0 -2
  874. package/node_modules/@sap/cds-mtxs/srv/bootstrap.js +0 -33
  875. package/node_modules/body-parser/node_modules/content-type/LICENSE +0 -22
  876. package/node_modules/body-parser/node_modules/content-type/README.md +0 -71
  877. package/node_modules/body-parser/node_modules/content-type/package.json +0 -52
  878. package/node_modules/content-disposition/index.js +0 -536
  879. package/node_modules/content-type/HISTORY.md +0 -29
  880. package/node_modules/content-type/index.js +0 -225
  881. package/node_modules/negotiator/node_modules/content-type/LICENSE +0 -22
  882. package/node_modules/negotiator/node_modules/content-type/README.md +0 -71
  883. package/node_modules/negotiator/node_modules/content-type/dist/index.d.ts +0 -46
  884. package/node_modules/negotiator/node_modules/content-type/dist/index.js +0 -176
  885. package/node_modules/negotiator/node_modules/content-type/dist/index.js.map +0 -1
  886. package/node_modules/negotiator/node_modules/content-type/package.json +0 -52
  887. package/node_modules/on-finished/HISTORY.md +0 -98
  888. package/node_modules/type-is/node_modules/content-type/LICENSE +0 -22
  889. package/node_modules/type-is/node_modules/content-type/README.md +0 -71
  890. package/node_modules/type-is/node_modules/content-type/dist/index.d.ts +0 -46
  891. package/node_modules/type-is/node_modules/content-type/dist/index.js +0 -176
  892. package/node_modules/type-is/node_modules/content-type/dist/index.js.map +0 -1
  893. package/node_modules/type-is/node_modules/content-type/package.json +0 -52
  894. /package/lib/init/template/vue/files/src/{main.js → main.{{extension}}.hbs} +0 -0
  895. /package/{lib/import/openapi → node_modules/@cap-js/openapi/lib/import}/utilities.js +0 -0
  896. /package/node_modules/{body-parser/node_modules/content-type → content-type}/dist/index.d.ts +0 -0
  897. /package/node_modules/{body-parser/node_modules/content-type → content-type}/dist/index.js +0 -0
  898. /package/node_modules/{body-parser/node_modules/content-type → content-type}/dist/index.js.map +0 -0
@@ -0,0 +1,348 @@
1
+ "use strict";
2
+ // parse a 512-byte header block to a data object, or vice-versa
3
+ // encode returns `true` if a pax extended header is needed, because
4
+ // the data could not be faithfully encoded in a simple header.
5
+ // (Also, check header.needPax to see if it needs a pax header.)
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || (function () {
23
+ var ownKeys = function(o) {
24
+ ownKeys = Object.getOwnPropertyNames || function (o) {
25
+ var ar = [];
26
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
27
+ return ar;
28
+ };
29
+ return ownKeys(o);
30
+ };
31
+ return function (mod) {
32
+ if (mod && mod.__esModule) return mod;
33
+ var result = {};
34
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
35
+ __setModuleDefault(result, mod);
36
+ return result;
37
+ };
38
+ })();
39
+ Object.defineProperty(exports, "__esModule", { value: true });
40
+ exports.Header = void 0;
41
+ const node_path_1 = require("node:path");
42
+ const large = __importStar(require("./large-numbers.js"));
43
+ const types = __importStar(require("./types.js"));
44
+ const notNegative = (n) => n === undefined || n < 0 ? undefined : n;
45
+ class Header {
46
+ cksumValid = false;
47
+ needPax = false;
48
+ nullBlock = false;
49
+ block;
50
+ path;
51
+ mode;
52
+ uid;
53
+ gid;
54
+ size;
55
+ cksum;
56
+ #type = 'Unsupported';
57
+ linkpath;
58
+ uname;
59
+ gname;
60
+ devmaj = 0;
61
+ devmin = 0;
62
+ atime;
63
+ ctime;
64
+ mtime;
65
+ charset;
66
+ comment;
67
+ constructor(data, off = 0, ex, gex) {
68
+ if (Buffer.isBuffer(data)) {
69
+ this.decode(data, off || 0, ex, gex);
70
+ }
71
+ else if (data) {
72
+ this.#slurp(data);
73
+ }
74
+ }
75
+ decode(buf, off, ex, gex) {
76
+ if (!off) {
77
+ off = 0;
78
+ }
79
+ if (!buf || !(buf.length >= off + 512)) {
80
+ throw new Error('need 512 bytes for header');
81
+ }
82
+ // Decode the typeflag (independent of any pending PAX/GNU extended header)
83
+ // up front so we can tell whether THIS block is itself an intermediary
84
+ // extension header (PAX `x`/`g`, GNU long-name `L`, GNU long-link `K`).
85
+ // Per POSIX pax, a PAX extended header describes the *next file entry*, not
86
+ // the extension headers that may sit between it and that file. Applying the
87
+ // pending PAX overrides (notably `size`) to an intervening `L`/`K`/`x`/`g`
88
+ // header desynchronizes the stream relative to other tar implementations
89
+ // and enables tar interpretation-conflict / file-smuggling attacks.
90
+ const t = decString(buf, off + 156, 1);
91
+ const isNormalFS = types.normalFsTypes.has(t);
92
+ const exForFields = isNormalFS ? ex : undefined;
93
+ const gexForFields = isNormalFS ? gex : undefined;
94
+ this.path = exForFields?.path ?? decString(buf, off, 100);
95
+ this.mode =
96
+ exForFields?.mode ??
97
+ gexForFields?.mode ??
98
+ decNumber(buf, off + 100, 8);
99
+ this.uid =
100
+ exForFields?.uid ?? gexForFields?.uid ?? decNumber(buf, off + 108, 8);
101
+ this.gid =
102
+ exForFields?.gid ?? gexForFields?.gid ?? decNumber(buf, off + 116, 8);
103
+ this.size = notNegative(exForFields?.size ??
104
+ gexForFields?.size ??
105
+ decNumber(buf, off + 124, 12));
106
+ this.mtime =
107
+ exForFields?.mtime ??
108
+ gexForFields?.mtime ??
109
+ decDate(buf, off + 136, 12);
110
+ this.cksum = decNumber(buf, off + 148, 12);
111
+ // if we have extended or global extended headers, apply them now
112
+ // See https://github.com/npm/node-tar/pull/187
113
+ // Apply global before local, so it overrides. Never slurp the pending
114
+ // extended-header fields onto an intermediary extension header.
115
+ if (gexForFields)
116
+ this.#slurp(gexForFields, true);
117
+ if (exForFields)
118
+ this.#slurp(exForFields);
119
+ // old tar versions marked dirs as a file with a trailing /
120
+ if (types.isCode(t)) {
121
+ this.#type = t || '0';
122
+ }
123
+ if (this.#type === '0' && this.path.slice(-1) === '/') {
124
+ this.#type = '5';
125
+ }
126
+ // tar implementations sometimes incorrectly put the stat(dir).size
127
+ // as the size in the tarball, even though Directory entries are
128
+ // not able to have any body at all. In the very rare chance that
129
+ // it actually DOES have a body, we weren't going to do anything with
130
+ // it anyway, and it'll just be a warning about an invalid header.
131
+ if (this.#type === '5') {
132
+ this.size = 0;
133
+ }
134
+ this.linkpath = decString(buf, off + 157, 100);
135
+ if (buf.subarray(off + 257, off + 265).toString() === 'ustar\u000000') {
136
+ /* c8 ignore start */
137
+ this.uname =
138
+ exForFields?.uname ??
139
+ gexForFields?.uname ??
140
+ decString(buf, off + 265, 32);
141
+ this.gname =
142
+ exForFields?.gname ??
143
+ gexForFields?.gname ??
144
+ decString(buf, off + 297, 32);
145
+ this.devmaj =
146
+ exForFields?.devmaj ??
147
+ gexForFields?.devmaj ??
148
+ decNumber(buf, off + 329, 8) ??
149
+ 0;
150
+ this.devmin =
151
+ exForFields?.devmin ??
152
+ gexForFields?.devmin ??
153
+ decNumber(buf, off + 337, 8) ??
154
+ 0;
155
+ /* c8 ignore stop */
156
+ if (buf[off + 475] !== 0) {
157
+ // definitely a prefix, definitely >130 chars.
158
+ const prefix = decString(buf, off + 345, 155);
159
+ this.path = prefix + '/' + this.path;
160
+ }
161
+ else {
162
+ const prefix = decString(buf, off + 345, 130);
163
+ if (prefix) {
164
+ this.path = prefix + '/' + this.path;
165
+ }
166
+ /* c8 ignore start */
167
+ this.atime = ex?.atime ?? gex?.atime ?? decDate(buf, off + 476, 12);
168
+ this.ctime = ex?.ctime ?? gex?.ctime ?? decDate(buf, off + 488, 12);
169
+ /* c8 ignore stop */
170
+ }
171
+ }
172
+ let sum = 8 * 0x20;
173
+ for (let i = off; i < off + 148; i++) {
174
+ sum += buf[i];
175
+ }
176
+ for (let i = off + 156; i < off + 512; i++) {
177
+ sum += buf[i];
178
+ }
179
+ this.cksumValid = sum === this.cksum;
180
+ if (this.cksum === undefined && sum === 8 * 0x20) {
181
+ this.nullBlock = true;
182
+ }
183
+ }
184
+ #slurp(ex, gex = false) {
185
+ Object.assign(this, Object.fromEntries(Object.entries(ex).filter(([k, v]) => {
186
+ // we slurp in everything except for the path attribute in
187
+ // a global extended header, because that's weird. Also, any
188
+ // null/undefined values are ignored.
189
+ return !(v === null ||
190
+ v === undefined ||
191
+ (k === 'size' && Number(v) < 0) ||
192
+ (k === 'path' && gex) ||
193
+ (k === 'linkpath' && gex) ||
194
+ k === 'global');
195
+ })));
196
+ }
197
+ encode(buf, off = 0) {
198
+ if (!buf) {
199
+ buf = this.block = Buffer.alloc(512);
200
+ }
201
+ if (this.#type === 'Unsupported') {
202
+ this.#type = '0';
203
+ }
204
+ if (!(buf.length >= off + 512)) {
205
+ throw new Error('need 512 bytes for header');
206
+ }
207
+ const prefixSize = this.ctime || this.atime ? 130 : 155;
208
+ const split = splitPrefix(this.path || '', prefixSize);
209
+ const path = split[0];
210
+ const prefix = split[1];
211
+ this.needPax = !!split[2];
212
+ this.needPax = encString(buf, off, 100, path) || this.needPax;
213
+ this.needPax = encNumber(buf, off + 100, 8, this.mode) || this.needPax;
214
+ this.needPax = encNumber(buf, off + 108, 8, this.uid) || this.needPax;
215
+ this.needPax = encNumber(buf, off + 116, 8, this.gid) || this.needPax;
216
+ this.needPax = encNumber(buf, off + 124, 12, this.size) || this.needPax;
217
+ this.needPax = encDate(buf, off + 136, 12, this.mtime) || this.needPax;
218
+ buf[off + 156] = Number(this.#type.codePointAt(0));
219
+ this.needPax =
220
+ encString(buf, off + 157, 100, this.linkpath) || this.needPax;
221
+ buf.write('ustar\u000000', off + 257, 8);
222
+ this.needPax =
223
+ encString(buf, off + 265, 32, this.uname) || this.needPax;
224
+ this.needPax =
225
+ encString(buf, off + 297, 32, this.gname) || this.needPax;
226
+ this.needPax =
227
+ encNumber(buf, off + 329, 8, this.devmaj) || this.needPax;
228
+ this.needPax =
229
+ encNumber(buf, off + 337, 8, this.devmin) || this.needPax;
230
+ this.needPax =
231
+ encString(buf, off + 345, prefixSize, prefix) || this.needPax;
232
+ if (buf[off + 475] !== 0) {
233
+ this.needPax = encString(buf, off + 345, 155, prefix) || this.needPax;
234
+ }
235
+ else {
236
+ this.needPax = encString(buf, off + 345, 130, prefix) || this.needPax;
237
+ this.needPax =
238
+ encDate(buf, off + 476, 12, this.atime) || this.needPax;
239
+ this.needPax =
240
+ encDate(buf, off + 488, 12, this.ctime) || this.needPax;
241
+ }
242
+ let sum = 8 * 0x20;
243
+ for (let i = off; i < off + 148; i++) {
244
+ sum += buf[i];
245
+ }
246
+ for (let i = off + 156; i < off + 512; i++) {
247
+ sum += buf[i];
248
+ }
249
+ this.cksum = sum;
250
+ encNumber(buf, off + 148, 8, this.cksum);
251
+ this.cksumValid = true;
252
+ return this.needPax;
253
+ }
254
+ get type() {
255
+ return (this.#type === 'Unsupported' ?
256
+ this.#type
257
+ : types.name.get(this.#type));
258
+ }
259
+ get typeKey() {
260
+ return this.#type;
261
+ }
262
+ set type(type) {
263
+ const c = String(types.code.get(type));
264
+ if (types.isCode(c) || c === 'Unsupported') {
265
+ this.#type = c;
266
+ }
267
+ else if (types.isCode(type)) {
268
+ this.#type = type;
269
+ }
270
+ else {
271
+ throw new TypeError('invalid entry type: ' + type);
272
+ }
273
+ }
274
+ }
275
+ exports.Header = Header;
276
+ const splitPrefix = (p, prefixSize) => {
277
+ const pathSize = 100;
278
+ let pp = p;
279
+ let prefix = '';
280
+ let ret = undefined;
281
+ const root = node_path_1.posix.parse(p).root || '.';
282
+ if (Buffer.byteLength(pp) < pathSize) {
283
+ ret = [pp, prefix, false];
284
+ }
285
+ else {
286
+ // first set prefix to the dir, and path to the base
287
+ prefix = node_path_1.posix.dirname(pp);
288
+ pp = node_path_1.posix.basename(pp);
289
+ do {
290
+ if (Buffer.byteLength(pp) <= pathSize &&
291
+ Buffer.byteLength(prefix) <= prefixSize) {
292
+ // both fit!
293
+ ret = [pp, prefix, false];
294
+ }
295
+ else if (Buffer.byteLength(pp) > pathSize &&
296
+ Buffer.byteLength(prefix) <= prefixSize) {
297
+ // prefix fits in prefix, but path doesn't fit in path
298
+ ret = [pp.slice(0, pathSize - 1), prefix, true];
299
+ }
300
+ else {
301
+ // make path take a bit from prefix
302
+ pp = node_path_1.posix.join(node_path_1.posix.basename(prefix), pp);
303
+ prefix = node_path_1.posix.dirname(prefix);
304
+ }
305
+ } while (prefix !== root && ret === undefined);
306
+ // at this point, found no resolution, just truncate
307
+ if (!ret) {
308
+ ret = [p.slice(0, pathSize - 1), '', true];
309
+ }
310
+ }
311
+ return ret;
312
+ };
313
+ const decString = (buf, off, size) => buf
314
+ .subarray(off, off + size)
315
+ .toString('utf8')
316
+ .replace(/\0.*/, '');
317
+ const decDate = (buf, off, size) => numToDate(decNumber(buf, off, size));
318
+ const numToDate = (num) => num === undefined ? undefined : new Date(num * 1000);
319
+ const decNumber = (buf, off, size) => Number(buf[off]) & 0x80 ?
320
+ large.parse(buf.subarray(off, off + size))
321
+ : decSmallNumber(buf, off, size);
322
+ const nanUndef = (value) => (isNaN(value) ? undefined : value);
323
+ const decSmallNumber = (buf, off, size) => nanUndef(parseInt(buf
324
+ .subarray(off, off + size)
325
+ .toString('utf8')
326
+ .replace(/\0.*$/, '')
327
+ .trim(), 8));
328
+ // the maximum encodable as a null-terminated octal, by field size
329
+ const MAXNUM = {
330
+ 12: 0o77777777777,
331
+ 8: 0o7777777,
332
+ };
333
+ const encNumber = (buf, off, size, num) => num === undefined ? false
334
+ : num > MAXNUM[size] || num < 0 ?
335
+ (large.encode(num, buf.subarray(off, off + size)), true)
336
+ : (encSmallNumber(buf, off, size, num), false);
337
+ const encSmallNumber = (buf, off, size, num) => buf.write(octalString(num, size), off, size, 'ascii');
338
+ const octalString = (num, size) => padOctal(Math.floor(num).toString(8), size);
339
+ const padOctal = (str, size) => (str.length === size - 1 ?
340
+ str
341
+ : new Array(size - str.length - 1).join('0') + str + ' ') + '\0';
342
+ const encDate = (buf, off, size, date) => date === undefined ? false : (encNumber(buf, off, size, date.getTime() / 1000));
343
+ // enough to fill the longest string we've got
344
+ const NULLS = new Array(156).join('\0');
345
+ // pad with nulls, return true if it's longer or non-ascii
346
+ const encString = (buf, off, size, str) => str === undefined ? false : ((buf.write(str + NULLS, off, size, 'utf8'),
347
+ str.length !== Buffer.byteLength(str) || str.length > size));
348
+ //# sourceMappingURL=header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header.js","sourceRoot":"","sources":["../../src/header.ts"],"names":[],"mappings":";AAAA,gEAAgE;AAChE,oEAAoE;AACpE,+DAA+D;AAC/D,gEAAgE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEhE,yCAA+C;AAC/C,0DAA2C;AAE3C,kDAAmC;AAEnC,MAAM,WAAW,GAAG,CAAC,CAAU,EAAsB,EAAE,CACrD,CAAC,KAAK,SAAS,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAA;AA4B1C,MAAa,MAAM;IACjB,UAAU,GAAY,KAAK,CAAA;IAC3B,OAAO,GAAY,KAAK,CAAA;IACxB,SAAS,GAAY,KAAK,CAAA;IAE1B,KAAK,CAAS;IACd,IAAI,CAAS;IACb,IAAI,CAAS;I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AAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,CAAA;AAElE,MAAM,OAAO,GAAG,CAAC,GAAW,EAAE,GAAW,EAAE,IAAY,EAAE,IAAW,EAAE,EAAE,CACtE,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAC3B,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CACjD,CAAA;AAEH,8CAA8C;AAC9C,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACvC,0DAA0D;AAC1D,MAAM,SAAS,GAAG,CAChB,GAAW,EACX,GAAW,EACX,IAAY,EACZ,GAAY,EACZ,EAAE,CACF,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAC1B,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,GAAG,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC;IAC1C,GAAG,CAAC,MAAM,KAAK,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,CAC5D,CAAA","sourcesContent":["// parse a 512-byte header block to a data object, or vice-versa\n// encode returns `true` if a pax extended header is needed, because\n// the data could not be faithfully encoded in a simple header.\n// (Also, check header.needPax to see if it needs a pax header.)\n\nimport { posix as pathModule } from 'node:path'\nimport * as large from './large-numbers.js'\nimport type { EntryTypeCode, EntryTypeName } from './types.js'\nimport * as types from './types.js'\n\nconst notNegative = (n?: number): number | undefined =>\n n === undefined || n < 0 ? undefined : n\n\nexport type HeaderData = {\n path?: string\n mode?: number\n uid?: number\n gid?: number\n size?: number\n cksum?: number\n type?: EntryTypeName | 'Unsupported'\n linkpath?: string\n uname?: string\n gname?: string\n devmaj?: number\n devmin?: number\n atime?: Date\n ctime?: Date\n mtime?: Date\n\n // fields that are common in extended PAX headers, but not in the\n // \"standard\" tar header block\n charset?: string\n comment?: string\n dev?: number\n ino?: number\n nlink?: number\n}\n\nexport class Header implements HeaderData {\n cksumValid: boolean = false\n needPax: boolean = false\n nullBlock: boolean = false\n\n block?: Buffer\n path?: string\n mode?: number\n uid?: number\n gid?: number\n size?: number\n cksum?: number\n #type: EntryTypeCode | 'Unsupported' = 'Unsupported'\n linkpath?: string\n uname?: string\n gname?: string\n devmaj: number = 0\n devmin: number = 0\n atime?: Date\n ctime?: Date\n mtime?: Date\n\n charset?: string\n comment?: string\n\n constructor(\n data?: Buffer | HeaderData,\n off: number = 0,\n ex?: HeaderData,\n gex?: HeaderData,\n ) {\n if (Buffer.isBuffer(data)) {\n this.decode(data, off || 0, ex, gex)\n } else if (data) {\n this.#slurp(data)\n }\n }\n\n decode(buf: Buffer, off: number, ex?: HeaderData, gex?: HeaderData) {\n if (!off) {\n off = 0\n }\n\n if (!buf || !(buf.length >= off + 512)) {\n throw new Error('need 512 bytes for header')\n }\n\n // Decode the typeflag (independent of any pending PAX/GNU extended header)\n // up front so we can tell whether THIS block is itself an intermediary\n // extension header (PAX `x`/`g`, GNU long-name `L`, GNU long-link `K`).\n // Per POSIX pax, a PAX extended header describes the *next file entry*, not\n // the extension headers that may sit between it and that file. Applying the\n // pending PAX overrides (notably `size`) to an intervening `L`/`K`/`x`/`g`\n // header desynchronizes the stream relative to other tar implementations\n // and enables tar interpretation-conflict / file-smuggling attacks.\n const t = decString(buf, off + 156, 1)\n const isNormalFS = types.normalFsTypes.has(t as EntryTypeCode)\n const exForFields = isNormalFS ? ex : undefined\n const gexForFields = isNormalFS ? gex : undefined\n\n this.path = exForFields?.path ?? decString(buf, off, 100)\n this.mode =\n exForFields?.mode ??\n gexForFields?.mode ??\n decNumber(buf, off + 100, 8)\n this.uid =\n exForFields?.uid ?? gexForFields?.uid ?? decNumber(buf, off + 108, 8)\n this.gid =\n exForFields?.gid ?? gexForFields?.gid ?? decNumber(buf, off + 116, 8)\n\n this.size = notNegative(\n exForFields?.size ??\n gexForFields?.size ??\n decNumber(buf, off + 124, 12),\n )\n this.mtime =\n exForFields?.mtime ??\n gexForFields?.mtime ??\n decDate(buf, off + 136, 12)\n this.cksum = decNumber(buf, off + 148, 12)\n\n // if we have extended or global extended headers, apply them now\n // See https://github.com/npm/node-tar/pull/187\n // Apply global before local, so it overrides. Never slurp the pending\n // extended-header fields onto an intermediary extension header.\n if (gexForFields) this.#slurp(gexForFields, true)\n if (exForFields) this.#slurp(exForFields)\n\n // old tar versions marked dirs as a file with a trailing /\n if (types.isCode(t)) {\n this.#type = t || '0'\n }\n if (this.#type === '0' && this.path.slice(-1) === '/') {\n this.#type = '5'\n }\n\n // tar implementations sometimes incorrectly put the stat(dir).size\n // as the size in the tarball, even though Directory entries are\n // not able to have any body at all. In the very rare chance that\n // it actually DOES have a body, we weren't going to do anything with\n // it anyway, and it'll just be a warning about an invalid header.\n if (this.#type === '5') {\n this.size = 0\n }\n\n this.linkpath = decString(buf, off + 157, 100)\n if (\n buf.subarray(off + 257, off + 265).toString() === 'ustar\\u000000'\n ) {\n /* c8 ignore start */\n this.uname =\n exForFields?.uname ??\n gexForFields?.uname ??\n decString(buf, off + 265, 32)\n this.gname =\n exForFields?.gname ??\n gexForFields?.gname ??\n decString(buf, off + 297, 32)\n this.devmaj =\n exForFields?.devmaj ??\n gexForFields?.devmaj ??\n decNumber(buf, off + 329, 8) ??\n 0\n this.devmin =\n exForFields?.devmin ??\n gexForFields?.devmin ??\n decNumber(buf, off + 337, 8) ??\n 0\n /* c8 ignore stop */\n if (buf[off + 475] !== 0) {\n // definitely a prefix, definitely >130 chars.\n const prefix = decString(buf, off + 345, 155)\n this.path = prefix + '/' + this.path\n } else {\n const prefix = decString(buf, off + 345, 130)\n if (prefix) {\n this.path = prefix + '/' + this.path\n }\n /* c8 ignore start */\n this.atime = ex?.atime ?? gex?.atime ?? decDate(buf, off + 476, 12)\n this.ctime = ex?.ctime ?? gex?.ctime ?? decDate(buf, off + 488, 12)\n /* c8 ignore stop */\n }\n }\n\n let sum = 8 * 0x20\n for (let i = off; i < off + 148; i++) {\n sum += buf[i] as number\n }\n\n for (let i = off + 156; i < off + 512; i++) {\n sum += buf[i] as number\n }\n\n this.cksumValid = sum === this.cksum\n if (this.cksum === undefined && sum === 8 * 0x20) {\n this.nullBlock = true\n }\n }\n\n #slurp(ex: HeaderData, gex: boolean = false) {\n Object.assign(\n this,\n Object.fromEntries(\n Object.entries(ex).filter(([k, v]) => {\n // we slurp in everything except for the path attribute in\n // a global extended header, because that's weird. Also, any\n // null/undefined values are ignored.\n return !(\n v === null ||\n v === undefined ||\n (k === 'size' && Number(v) < 0) ||\n (k === 'path' && gex) ||\n (k === 'linkpath' && gex) ||\n k === 'global'\n )\n }),\n ),\n )\n }\n\n encode(buf?: Buffer, off: number = 0) {\n if (!buf) {\n buf = this.block = Buffer.alloc(512)\n }\n\n if (this.#type === 'Unsupported') {\n this.#type = '0'\n }\n\n if (!(buf.length >= off + 512)) {\n throw new Error('need 512 bytes for header')\n }\n\n const prefixSize = this.ctime || this.atime ? 130 : 155\n const split = splitPrefix(this.path || '', prefixSize)\n const path = split[0]\n const prefix = split[1]\n this.needPax = !!split[2]\n\n this.needPax = encString(buf, off, 100, path) || this.needPax\n this.needPax = encNumber(buf, off + 100, 8, this.mode) || this.needPax\n this.needPax = encNumber(buf, off + 108, 8, this.uid) || this.needPax\n this.needPax = encNumber(buf, off + 116, 8, this.gid) || this.needPax\n this.needPax = encNumber(buf, off + 124, 12, this.size) || this.needPax\n this.needPax = encDate(buf, off + 136, 12, this.mtime) || this.needPax\n buf[off + 156] = Number(this.#type.codePointAt(0))\n this.needPax =\n encString(buf, off + 157, 100, this.linkpath) || this.needPax\n buf.write('ustar\\u000000', off + 257, 8)\n this.needPax =\n encString(buf, off + 265, 32, this.uname) || this.needPax\n this.needPax =\n encString(buf, off + 297, 32, this.gname) || this.needPax\n this.needPax =\n encNumber(buf, off + 329, 8, this.devmaj) || this.needPax\n this.needPax =\n encNumber(buf, off + 337, 8, this.devmin) || this.needPax\n this.needPax =\n encString(buf, off + 345, prefixSize, prefix) || this.needPax\n if (buf[off + 475] !== 0) {\n this.needPax = encString(buf, off + 345, 155, prefix) || this.needPax\n } else {\n this.needPax = encString(buf, off + 345, 130, prefix) || this.needPax\n this.needPax =\n encDate(buf, off + 476, 12, this.atime) || this.needPax\n this.needPax =\n encDate(buf, off + 488, 12, this.ctime) || this.needPax\n }\n\n let sum = 8 * 0x20\n for (let i = off; i < off + 148; i++) {\n sum += buf[i] as number\n }\n\n for (let i = off + 156; i < off + 512; i++) {\n sum += buf[i] as number\n }\n\n this.cksum = sum\n encNumber(buf, off + 148, 8, this.cksum)\n this.cksumValid = true\n\n return this.needPax\n }\n\n get type(): EntryTypeName {\n return (\n this.#type === 'Unsupported' ?\n this.#type\n : types.name.get(this.#type)) as EntryTypeName\n }\n\n get typeKey(): EntryTypeCode | 'Unsupported' {\n return this.#type\n }\n\n set type(type: EntryTypeCode | EntryTypeName | 'Unsupported') {\n const c = String(types.code.get(type as EntryTypeName))\n if (types.isCode(c) || c === 'Unsupported') {\n this.#type = c\n } else if (types.isCode(type)) {\n this.#type = type\n } else {\n throw new TypeError('invalid entry type: ' + type)\n }\n }\n}\n\nconst splitPrefix = (\n p: string,\n prefixSize: number,\n): [string, string, boolean] => {\n const pathSize = 100\n let pp = p\n let prefix = ''\n let ret: undefined | [string, string, boolean] = undefined\n const root = pathModule.parse(p).root || '.'\n\n if (Buffer.byteLength(pp) < pathSize) {\n ret = [pp, prefix, false]\n } else {\n // first set prefix to the dir, and path to the base\n prefix = pathModule.dirname(pp)\n pp = pathModule.basename(pp)\n\n do {\n if (\n Buffer.byteLength(pp) <= pathSize &&\n Buffer.byteLength(prefix) <= prefixSize\n ) {\n // both fit!\n ret = [pp, prefix, false]\n } else if (\n Buffer.byteLength(pp) > pathSize &&\n Buffer.byteLength(prefix) <= prefixSize\n ) {\n // prefix fits in prefix, but path doesn't fit in path\n ret = [pp.slice(0, pathSize - 1), prefix, true]\n } else {\n // make path take a bit from prefix\n pp = pathModule.join(pathModule.basename(prefix), pp)\n prefix = pathModule.dirname(prefix)\n }\n } while (prefix !== root && ret === undefined)\n\n // at this point, found no resolution, just truncate\n if (!ret) {\n ret = [p.slice(0, pathSize - 1), '', true]\n }\n }\n return ret\n}\n\nconst decString = (buf: Buffer, off: number, size: number) =>\n buf\n .subarray(off, off + size)\n .toString('utf8')\n .replace(/\\0.*/, '')\n\nconst decDate = (buf: Buffer, off: number, size: number) =>\n numToDate(decNumber(buf, off, size))\n\nconst numToDate = (num?: number) =>\n num === undefined ? undefined : new Date(num * 1000)\n\nconst decNumber = (buf: Buffer, off: number, size: number) =>\n Number(buf[off]) & 0x80 ?\n large.parse(buf.subarray(off, off + size))\n : decSmallNumber(buf, off, size)\n\nconst nanUndef = (value: number) => (isNaN(value) ? undefined : value)\n\nconst decSmallNumber = (buf: Buffer, off: number, size: number) =>\n nanUndef(\n parseInt(\n buf\n .subarray(off, off + size)\n .toString('utf8')\n .replace(/\\0.*$/, '')\n .trim(),\n 8,\n ),\n )\n\n// the maximum encodable as a null-terminated octal, by field size\nconst MAXNUM = {\n 12: 0o77777777777,\n 8: 0o7777777,\n}\n\nconst encNumber = (\n buf: Buffer,\n off: number,\n size: 12 | 8,\n num?: number,\n) =>\n num === undefined ? false\n : num > MAXNUM[size] || num < 0 ?\n (large.encode(num, buf.subarray(off, off + size)), true)\n : (encSmallNumber(buf, off, size, num), false)\n\nconst encSmallNumber = (\n buf: Buffer,\n off: number,\n size: number,\n num: number,\n) => buf.write(octalString(num, size), off, size, 'ascii')\n\nconst octalString = (num: number, size: number) =>\n padOctal(Math.floor(num).toString(8), size)\n\nconst padOctal = (str: string, size: number) =>\n (str.length === size - 1 ?\n str\n : new Array(size - str.length - 1).join('0') + str + ' ') + '\\0'\n\nconst encDate = (buf: Buffer, off: number, size: 8 | 12, date?: Date) =>\n date === undefined ? false : (\n encNumber(buf, off, size, date.getTime() / 1000)\n )\n\n// enough to fill the longest string we've got\nconst NULLS = new Array(156).join('\\0')\n// pad with nulls, return true if it's longer or non-ascii\nconst encString = (\n buf: Buffer,\n off: number,\n size: number,\n str?: string,\n) =>\n str === undefined ? false : (\n (buf.write(str + NULLS, off, size, 'utf8'),\n str.length !== Buffer.byteLength(str) || str.length > size)\n )\n"]}
@@ -0,0 +1,20 @@
1
+ export { type TarOptionsWithAliasesAsync, type TarOptionsWithAliasesAsyncFile, type TarOptionsWithAliasesAsyncNoFile, type TarOptionsWithAliasesSyncNoFile, type TarOptionsWithAliases, type TarOptionsWithAliasesFile, type TarOptionsWithAliasesSync, type TarOptionsWithAliasesSyncFile, } from './options.js';
2
+ export * from './create.js';
3
+ export { create as c } from './create.js';
4
+ export * from './extract.js';
5
+ export { extract as x } from './extract.js';
6
+ export * from './header.js';
7
+ export * from './list.js';
8
+ export { list as t } from './list.js';
9
+ export * from './pack.js';
10
+ export * from './parse.js';
11
+ export * from './pax.js';
12
+ export * from './read-entry.js';
13
+ export * from './replace.js';
14
+ export { replace as r } from './replace.js';
15
+ export * as types from './types.js';
16
+ export * from './unpack.js';
17
+ export * from './update.js';
18
+ export { update as u } from './update.js';
19
+ export * from './write-entry.js';
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EACrC,KAAK,+BAA+B,EACpC,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,GACnC,MAAM,cAAc,CAAA;AAErB,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,aAAa,CAAA;AACzC,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,cAAc,CAAA;AAC3C,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,OAAO,EAAE,IAAI,IAAI,CAAC,EAAE,MAAM,WAAW,CAAA;AAErC,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,OAAO,IAAI,CAAC,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,aAAa,CAAA;AACzC,cAAc,kBAAkB,CAAA"}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
+ };
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.u = exports.types = exports.r = exports.t = exports.x = exports.c = void 0;
40
+ __exportStar(require("./create.js"), exports);
41
+ var create_js_1 = require("./create.js");
42
+ Object.defineProperty(exports, "c", { enumerable: true, get: function () { return create_js_1.create; } });
43
+ __exportStar(require("./extract.js"), exports);
44
+ var extract_js_1 = require("./extract.js");
45
+ Object.defineProperty(exports, "x", { enumerable: true, get: function () { return extract_js_1.extract; } });
46
+ __exportStar(require("./header.js"), exports);
47
+ __exportStar(require("./list.js"), exports);
48
+ var list_js_1 = require("./list.js");
49
+ Object.defineProperty(exports, "t", { enumerable: true, get: function () { return list_js_1.list; } });
50
+ // classes
51
+ __exportStar(require("./pack.js"), exports);
52
+ __exportStar(require("./parse.js"), exports);
53
+ __exportStar(require("./pax.js"), exports);
54
+ __exportStar(require("./read-entry.js"), exports);
55
+ __exportStar(require("./replace.js"), exports);
56
+ var replace_js_1 = require("./replace.js");
57
+ Object.defineProperty(exports, "r", { enumerable: true, get: function () { return replace_js_1.replace; } });
58
+ exports.types = __importStar(require("./types.js"));
59
+ __exportStar(require("./unpack.js"), exports);
60
+ __exportStar(require("./update.js"), exports);
61
+ var update_js_1 = require("./update.js");
62
+ Object.defineProperty(exports, "u", { enumerable: true, get: function () { return update_js_1.update; } });
63
+ __exportStar(require("./write-entry.js"), exports);
64
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,8CAA2B;AAC3B,yCAAyC;AAAhC,8FAAA,MAAM,OAAK;AACpB,+CAA4B;AAC5B,2CAA2C;AAAlC,+FAAA,OAAO,OAAK;AACrB,8CAA2B;AAC3B,4CAAyB;AACzB,qCAAqC;AAA5B,4FAAA,IAAI,OAAK;AAClB,UAAU;AACV,4CAAyB;AACzB,6CAA0B;AAC1B,2CAAwB;AACxB,kDAA+B;AAC/B,+CAA4B;AAC5B,2CAA2C;AAAlC,+FAAA,OAAO,OAAK;AACrB,oDAAmC;AACnC,8CAA2B;AAC3B,8CAA2B;AAC3B,yCAAyC;AAAhC,8FAAA,MAAM,OAAK;AACpB,mDAAgC","sourcesContent":["export {\n type TarOptionsWithAliasesAsync,\n type TarOptionsWithAliasesAsyncFile,\n type TarOptionsWithAliasesAsyncNoFile,\n type TarOptionsWithAliasesSyncNoFile,\n type TarOptionsWithAliases,\n type TarOptionsWithAliasesFile,\n type TarOptionsWithAliasesSync,\n type TarOptionsWithAliasesSyncFile,\n} from './options.js'\n\nexport * from './create.js'\nexport { create as c } from './create.js'\nexport * from './extract.js'\nexport { extract as x } from './extract.js'\nexport * from './header.js'\nexport * from './list.js'\nexport { list as t } from './list.js'\n// classes\nexport * from './pack.js'\nexport * from './parse.js'\nexport * from './pax.js'\nexport * from './read-entry.js'\nexport * from './replace.js'\nexport { replace as r } from './replace.js'\nexport * as types from './types.js'\nexport * from './unpack.js'\nexport * from './update.js'\nexport { update as u } from './update.js'\nexport * from './write-entry.js'\n"]}