@sap/cds-dk 9.9.3 → 10.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +88 -0
- package/bin/add.js +1 -1
- package/bin/cds.js +4 -1
- package/bin/data-products/import.js +1 -1
- package/bin/data-products/{index.js → load.js} +0 -3
- package/bin/debug.js +19 -0
- package/bin/export.js +21 -15
- package/bin/login.js +4 -8
- package/bin/logout.js +4 -9
- package/bin/pull.js +4 -8
- package/bin/push.js +8 -23
- package/bin/up.js +50 -1
- package/bin/upgrade-tenant.js +78 -0
- package/bin/upgrade.js +55 -53
- package/bin/util/log.js +1 -2
- package/bin/version.js +44 -60
- package/lib/bind/shared.js +5 -1
- package/lib/build/index.js +3 -3
- package/lib/build/plugins/fiori/index.js +5 -5
- package/lib/build/plugins/hana/index.js +13 -12
- package/lib/build/plugins/hana/template/package.json +1 -1
- package/lib/build/plugins/internal.js +4 -3
- package/lib/build/plugins/mtx-sidecar/index.js +8 -25
- package/lib/build/plugins/nodejs/index.js +4 -2
- package/lib/build/plugins/plugin.js +4 -10
- package/lib/build/util.js +0 -41
- package/lib/import/openapi/importOpenAPI.js +15 -3
- package/lib/index.js +1 -1
- package/lib/init/bas.js +2 -3
- package/lib/init/constants.js +8 -7
- package/lib/init/index.js +1 -17
- package/lib/init/projectReader.js +14 -5
- package/lib/init/registries/mta.js +12 -0
- package/lib/init/template/ai/files/mta.yaml.hbs +14 -0
- package/lib/init/template/ai/files/package.json.hbs +25 -0
- package/lib/init/template/ai/files/values.yaml +7 -0
- package/lib/init/template/ai/index.js +48 -0
- package/lib/init/template/ams/files/Chart.yaml.hbs +2 -2
- package/lib/init/template/ams/files/containerize.yaml.hbs +5 -5
- package/lib/init/template/ams/files/mta.yaml.hbs +1 -1
- package/lib/init/template/ams/files/package.json.hbs +3 -0
- package/lib/init/template/ams/index.js +2 -2
- package/lib/init/template/app-frontend/files/app-package.json.hbs +2 -2
- package/lib/init/template/app-frontend/files/containerize.yaml.hbs +13 -0
- package/lib/init/template/app-frontend/files/index.html.hbs +1 -1
- package/lib/init/template/app-frontend/files/mta.yaml.hbs +1 -1
- package/lib/init/template/app-frontend/files/ui5.yaml.hbs +4 -4
- package/lib/init/template/app-frontend/files/values.yaml.hbs +21 -9
- package/lib/init/template/app-frontend/index.js +37 -29
- package/lib/init/template/application-logging/files/mta.yaml.hbs +1 -1
- package/lib/init/template/application-logging/index.js +3 -3
- package/lib/init/template/approuter/files/containerize.yaml.hbs +4 -4
- package/lib/init/template/approuter/files/mta.yaml.hbs +1 -1
- package/lib/init/template/approuter/index.js +5 -5
- package/lib/init/template/attachments/files/mta.yaml.hbs +1 -1
- package/lib/init/template/attachments/files/values.yaml +1 -1
- package/lib/init/template/attachments/index.js +4 -4
- package/lib/init/template/audit-logging/files/mta.yaml.hbs +1 -1
- package/lib/init/template/audit-logging/index.js +4 -4
- package/lib/init/template/cf-manifest/files/manifest.yml.hbs +3 -3
- package/lib/init/template/cjs/files/package.json.hbs +3 -0
- package/lib/init/template/{esm → cjs}/index.js +2 -2
- package/lib/init/template/cloud-logging/files/mta.yaml.hbs +1 -1
- package/lib/init/template/cloud-logging/index.js +3 -3
- package/lib/init/template/completion/completionSetup.js +1 -1
- package/lib/init/template/connectivity/files/mta.yaml.hbs +1 -1
- package/lib/init/template/connectivity/index.js +4 -4
- package/lib/init/template/data/as-json.js +0 -10
- package/lib/init/template/destination/files/mta.yaml.hbs +1 -1
- package/lib/init/template/destination/index.js +4 -4
- package/lib/init/template/dynatrace/files/mta.yaml.hbs +1 -1
- package/lib/init/template/dynatrace/index.js +3 -3
- package/lib/init/template/enterprise-messaging/files/mta.yaml.hbs +1 -1
- package/lib/init/template/enterprise-messaging/index.js +39 -23
- package/lib/init/template/enterprise-messaging-shared/files/mta.yaml.hbs +1 -1
- package/lib/init/template/enterprise-messaging-shared/index.js +22 -44
- package/lib/init/template/event-mesh/files/event-mesh.json.hbs +31 -0
- package/lib/init/template/event-mesh/files/mta.yaml.hbs +22 -0
- package/lib/init/template/event-mesh/files/package.json.hbs +20 -0
- package/lib/init/template/event-mesh/files/values.yaml +7 -0
- package/lib/init/template/event-mesh/files/xs-security.json.hbs +19 -0
- package/lib/init/template/event-mesh/index.js +16 -0
- package/lib/init/template/event-mesh-shared/files/event-mesh.json.hbs +31 -0
- package/lib/init/template/event-mesh-shared/files/mta.yaml.hbs +15 -0
- package/lib/init/template/event-mesh-shared/files/package.json.hbs +23 -0
- package/lib/init/template/event-mesh-shared/files/values.yaml +7 -0
- package/lib/init/template/event-mesh-shared/index.js +16 -0
- package/lib/init/template/extensibility/files/package.json.hbs +1 -1
- package/lib/init/template/github-actions/files/workflows/cf.yaml.hbs +2 -2
- package/lib/init/template/github-actions/files/workflows/test.yaml.hbs +2 -2
- package/lib/init/template/hana/files/containerize.yaml.hbs +5 -5
- package/lib/init/template/hana/files/mta.yaml.hbs +1 -1
- package/lib/init/template/hana/files/package.json.hbs +1 -1
- package/lib/init/template/hana/files/src/.hdiconfig +1 -1
- package/lib/init/template/hana/index.js +5 -8
- package/lib/init/template/handler/files/extension/handler.xs.hbs +1 -1
- package/lib/init/template/handler/index.js +1 -19
- package/lib/init/template/html5-repo/files/app-package.json.hbs +2 -2
- package/lib/init/template/html5-repo/files/containerize.yaml.hbs +5 -7
- package/lib/init/template/html5-repo/files/mta.yaml.hbs +4 -4
- package/lib/init/template/html5-repo/files/ui5.yaml.hbs +4 -4
- package/lib/init/template/html5-repo/files/values.yaml.hbs +9 -0
- package/lib/init/template/html5-repo/index.js +23 -22
- package/lib/init/template/ias/files/Chart.yaml.hbs +2 -2
- package/lib/init/template/ias/files/mta.yaml.hbs +1 -1
- package/lib/init/template/ias/index.js +5 -5
- package/lib/init/template/initial/index.js +2 -10
- package/lib/init/template/kafka/files/mta.yaml.hbs +1 -1
- package/lib/init/template/kafka/files/values.yaml +1 -1
- package/lib/init/template/kafka/index.js +4 -4
- package/lib/init/template/kyma/files/containerize.yaml.hbs +11 -11
- package/lib/init/template/kyma/files/values.schema.json +1 -1
- package/lib/init/template/kyma/index.js +10 -10
- package/lib/init/template/lint/files/package.json +1 -1
- package/lib/init/template/malware-scanner/files/mta.yaml.hbs +2 -2
- package/lib/init/template/malware-scanner/files/package.json.hbs +1 -1
- package/lib/init/template/malware-scanner/files/values.yaml +1 -1
- package/lib/init/template/malware-scanner/index.js +4 -4
- package/lib/init/template/mta/files/mta.yaml.hbs +1 -1
- package/lib/init/template/mta/files/package.json +1 -1
- package/lib/init/template/multitenancy/files/containerize.yaml.hbs +5 -5
- package/lib/init/template/multitenancy/files/mta.yaml.hbs +1 -1
- package/lib/init/template/multitenancy/files/package.json.hbs +1 -1
- package/lib/init/template/multitenancy/files/package.sidecar.json.hbs +5 -5
- package/lib/init/template/multitenancy/index.js +10 -11
- package/lib/init/template/nodejs/files/package.json.hbs +3 -2
- package/lib/init/template/portal/files/containerize.yaml.hbs +4 -4
- package/lib/init/template/portal/files/mta.yaml.hbs +1 -1
- package/lib/init/template/portal/files/values.yaml.hbs +3 -32
- package/lib/init/template/portal/index.js +5 -13
- package/lib/init/template/postgres/files/containerize.yaml.hbs +4 -4
- package/lib/init/template/postgres/files/mta.yml.hbs +1 -1
- package/lib/init/template/postgres/files/package.json.hbs +1 -1
- package/lib/init/template/postgres/index.js +4 -4
- package/lib/init/template/react/files/{index.html → index.html.hbs} +1 -1
- package/lib/init/template/react/files/{vite.config.js → vite.config.js.hbs} +2 -1
- package/lib/init/template/react/index.js +15 -7
- package/lib/init/template/redis/files/mta.yaml.hbs +1 -1
- package/lib/init/template/redis/index.js +4 -4
- package/lib/init/template/sample/files/app/admin-books/webapp/manifest.json +2 -1
- package/lib/init/template/side-by-side-extensibility/files/mta.yaml.hbs +1 -1
- package/lib/init/template/sqlite/files/package.json.hbs +2 -2
- package/lib/init/template/toggles/files/package.json.hbs +1 -1
- package/lib/init/template/typer/files/gitignore +1 -1
- package/lib/init/template/typescript/files/package.json +1 -1
- package/lib/init/template/vue/files/{index.html → index.html.hbs} +1 -1
- package/lib/init/template/vue/files/{vite.config.js → vite.config.js.hbs} +2 -1
- package/lib/init/template/vue/index.js +16 -8
- package/lib/init/template/workzone-standard/files/mta.yaml.hbs +1 -1
- package/lib/init/template/workzone-standard/index.js +3 -3
- package/lib/init/template/xsuaa/files/mta.yaml.hbs +1 -1
- package/lib/init/template/xsuaa/index.js +3 -3
- package/lib/lint/Linter.js +5 -4
- package/lib/lint/eslintHelp.json +1 -1
- package/lib/mtx/params.js +0 -4
- package/lib/mtx/pull.js +1 -1
- package/lib/mtx/push.js +4 -3
- package/lib/mtx/settings_manager.js +9 -14
- package/lib/mtx/tenant_action.js +6 -6
- package/lib/mtx/util/question.js +0 -18
- package/lib/upgrade/constants.js +102 -0
- package/lib/upgrade/context.js +24 -0
- package/lib/upgrade/index.js +65 -0
- package/lib/upgrade/migrations/cds10/migrations.json +705 -0
- package/lib/upgrade/preflight/cds-version.js +61 -0
- package/lib/upgrade/preflight/consistency.js +94 -0
- package/lib/upgrade/preflight/index.js +49 -0
- package/lib/upgrade/preflight/project-type.js +224 -0
- package/lib/upgrade/steps/analyze/classification.js +92 -0
- package/lib/upgrade/steps/analyze/detector.js +22 -0
- package/lib/upgrade/steps/analyze/evaluator.js +91 -0
- package/lib/upgrade/steps/analyze/index.js +124 -0
- package/lib/upgrade/steps/analyze/reporter.js +339 -0
- package/lib/upgrade/steps/analyze/setup.js +71 -0
- package/lib/upgrade/steps/analyze/utils/detection.js +63 -0
- package/lib/upgrade/steps/analyze/utils/files.js +114 -0
- package/lib/upgrade/steps/analyze/utils/grep.js +95 -0
- package/lib/upgrade/steps/analyze/utils/yaml.js +58 -0
- package/lib/upgrade/steps/install.js +115 -0
- package/lib/upgrade/steps/openrewrite.js +293 -0
- package/lib/upgrade/steps/removals.js +88 -0
- package/lib/upgrade/steps/rewrite.js +167 -0
- package/lib/upgrade/steps/verify.js +96 -0
- package/lib/upgrade/util/pom.js +46 -0
- package/lib/upgrade/util/prompt.js +28 -0
- package/lib/upgrade/util/workspaces.js +111 -0
- package/lib/util/cf.js +23 -12
- package/lib/util/term.js +1 -1
- package/lib/watch/vite-watch.js +33 -8
- package/node_modules/@cap-js/asyncapi/LICENSE +201 -0
- package/node_modules/@cap-js/asyncapi/README.md +46 -0
- package/node_modules/@cap-js/asyncapi/index.js +4 -0
- package/node_modules/@cap-js/asyncapi/lib/compile/channels.js +18 -0
- package/node_modules/@cap-js/asyncapi/lib/compile/components/messageTraits/index.js +89 -0
- package/node_modules/@cap-js/asyncapi/lib/compile/components/messages/index.js +179 -0
- package/node_modules/@cap-js/asyncapi/lib/compile/components/schemas/annotations.js +36 -0
- package/node_modules/@cap-js/asyncapi/lib/compile/components/schemas/array.js +8 -0
- package/node_modules/@cap-js/asyncapi/lib/compile/components/schemas/cache.js +16 -0
- package/node_modules/@cap-js/asyncapi/lib/compile/components/schemas/definition.js +191 -0
- package/node_modules/@cap-js/asyncapi/lib/compile/components/schemas/enum.js +15 -0
- package/node_modules/@cap-js/asyncapi/lib/compile/components/schemas/examples.js +10 -0
- package/node_modules/@cap-js/asyncapi/lib/compile/components/schemas/index.js +14 -0
- package/node_modules/@cap-js/asyncapi/lib/compile/components/schemas/localized.js +29 -0
- package/node_modules/@cap-js/asyncapi/lib/compile/components/schemas/primitiveElement.js +41 -0
- package/node_modules/@cap-js/asyncapi/lib/compile/components/schemas/ref.js +45 -0
- package/node_modules/@cap-js/asyncapi/lib/compile/components/schemas/utils.js +108 -0
- package/node_modules/@cap-js/asyncapi/lib/compile/index.js +277 -0
- package/node_modules/@cap-js/asyncapi/lib/compile/message.js +13 -0
- package/node_modules/@cap-js/asyncapi/lib/compile/utils.js +77 -0
- package/node_modules/@cap-js/asyncapi/package.json +34 -0
- package/node_modules/@cap-js/openapi/LICENSE +201 -0
- package/node_modules/@cap-js/openapi/README.md +96 -0
- package/node_modules/@cap-js/openapi/index.js +5 -0
- package/node_modules/@cap-js/openapi/lib/compile/csdl-types.d.ts +546 -0
- package/node_modules/@cap-js/openapi/lib/compile/csdl.js +212 -0
- package/node_modules/@cap-js/openapi/lib/compile/csdl2openapi.js +2753 -0
- package/node_modules/@cap-js/openapi/lib/compile/diagram.js +112 -0
- package/node_modules/@cap-js/openapi/lib/compile/index.js +259 -0
- package/node_modules/@cap-js/openapi/lib/compile/string-util.js +20 -0
- package/node_modules/@cap-js/openapi/lib/compile/types.d.ts +117 -0
- package/node_modules/@cap-js/openapi/package.json +44 -0
- package/node_modules/@eslint/js/LICENSE +19 -0
- package/node_modules/@eslint/js/README.md +103 -0
- package/node_modules/@eslint/js/package.json +44 -0
- package/node_modules/@eslint/js/src/configs/eslint-all.js +210 -0
- package/node_modules/@eslint/js/src/configs/eslint-recommended.js +75 -0
- package/node_modules/@eslint/js/src/index.js +23 -0
- package/node_modules/@eslint/js/types/index.d.ts +14 -0
- package/node_modules/@sap/cds/CHANGELOG.md +810 -0
- package/node_modules/@sap/cds/LICENSE +32 -0
- package/node_modules/@sap/cds/README.md +13 -0
- package/node_modules/@sap/cds/_i18n/i18n.properties +113 -0
- package/node_modules/@sap/cds/_i18n/i18n_ar.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_bg.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_cs.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_da.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_de.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_el.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_en.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_en_US_saptrc.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_es.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_es_MX.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_fi.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_fr.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_he.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_hr.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_hu.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_it.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_ja.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_kk.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_ko.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_ms.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_nl.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_no.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_pl.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_pt.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_ro.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_ru.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_sh.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_sk.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_sl.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_sv.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_th.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_tr.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_uk.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_vi.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_zh_CN.properties +58 -0
- package/node_modules/@sap/cds/_i18n/i18n_zh_TW.properties +58 -0
- package/node_modules/@sap/cds/_i18n/messages.properties +196 -0
- package/node_modules/@sap/cds/_i18n/messages_ar.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_bg.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_cs.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_da.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_de.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_el.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_en.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_en_US_saptrc.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_es.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_es_MX.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_fi.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_fr.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_he.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_hr.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_hu.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_it.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_ja.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_kk.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_ko.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_ms.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_nl.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_no.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_pl.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_pt.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_ro.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_ru.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_sh.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_sk.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_sl.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_sv.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_th.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_tr.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_uk.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_vi.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_zh_CN.properties +103 -0
- package/node_modules/@sap/cds/_i18n/messages_zh_TW.properties +103 -0
- package/node_modules/@sap/cds/app/etc/livereload.js +9 -0
- package/node_modules/@sap/cds/app/favicon.ico +0 -0
- package/node_modules/@sap/cds/app/index.css +132 -0
- package/node_modules/@sap/cds/app/index.html +32 -0
- package/node_modules/@sap/cds/app/index.js +100 -0
- package/node_modules/@sap/cds/bin/args.js +34 -0
- package/node_modules/@sap/cds/bin/deploy.js +29 -0
- package/node_modules/@sap/cds/bin/serve.js +398 -0
- package/node_modules/@sap/cds/common.cds +216 -0
- package/node_modules/@sap/cds/eslint.config.mjs +153 -0
- package/node_modules/@sap/cds/lib/compile/cds-compile.js +63 -0
- package/node_modules/@sap/cds/lib/compile/cdsc.js +166 -0
- package/node_modules/@sap/cds/lib/compile/etc/_localized.js +75 -0
- package/node_modules/@sap/cds/lib/compile/etc/csv.js +87 -0
- package/node_modules/@sap/cds/lib/compile/etc/properties.js +44 -0
- package/node_modules/@sap/cds/lib/compile/etc/yaml.js +9 -0
- package/node_modules/@sap/cds/lib/compile/extend.js +39 -0
- package/node_modules/@sap/cds/lib/compile/for/assert.js +64 -0
- package/node_modules/@sap/cds/lib/compile/for/direct_crud.js +49 -0
- package/node_modules/@sap/cds/lib/compile/for/flows.js +396 -0
- package/node_modules/@sap/cds/lib/compile/for/java.js +49 -0
- package/node_modules/@sap/cds/lib/compile/for/lean_drafts.js +230 -0
- package/node_modules/@sap/cds/lib/compile/for/nodejs.js +94 -0
- package/node_modules/@sap/cds/lib/compile/for/odata.js +19 -0
- package/node_modules/@sap/cds/lib/compile/for/sql.js +9 -0
- package/node_modules/@sap/cds/lib/compile/load.js +59 -0
- package/node_modules/@sap/cds/lib/compile/minify.js +112 -0
- package/node_modules/@sap/cds/lib/compile/parse.js +140 -0
- package/node_modules/@sap/cds/lib/compile/resolve.js +166 -0
- package/node_modules/@sap/cds/lib/compile/to/cdl.js +22 -0
- package/node_modules/@sap/cds/lib/compile/to/csn.js +80 -0
- package/node_modules/@sap/cds/lib/compile/to/edm-files.js +80 -0
- package/node_modules/@sap/cds/lib/compile/to/edm.js +97 -0
- package/node_modules/@sap/cds/lib/compile/to/hana.js +31 -0
- package/node_modules/@sap/cds/lib/compile/to/hdbtabledata.js +152 -0
- package/node_modules/@sap/cds/lib/compile/to/json.js +63 -0
- package/node_modules/@sap/cds/lib/compile/to/sql.js +62 -0
- package/node_modules/@sap/cds/lib/compile/to/srvinfo.js +135 -0
- package/node_modules/@sap/cds/lib/core/classes.js +230 -0
- package/node_modules/@sap/cds/lib/core/entities.js +132 -0
- package/node_modules/@sap/cds/lib/core/linked-csn.js +188 -0
- package/node_modules/@sap/cds/lib/core/types.js +67 -0
- package/node_modules/@sap/cds/lib/dbs/cds-deploy.js +420 -0
- package/node_modules/@sap/cds/lib/env/cds-env.js +584 -0
- package/node_modules/@sap/cds/lib/env/cds-requires.js +315 -0
- package/node_modules/@sap/cds/lib/env/compat.js +95 -0
- package/node_modules/@sap/cds/lib/env/defaults.js +227 -0
- package/node_modules/@sap/cds/lib/env/schemas/cds-package.js +27 -0
- package/node_modules/@sap/cds/lib/env/schemas/cds-rc.js +1124 -0
- package/node_modules/@sap/cds/lib/env/schemas/index.js +12 -0
- package/node_modules/@sap/cds/lib/env/serviceBindings.js +157 -0
- package/node_modules/@sap/cds/lib/i18n/bundles.js +114 -0
- package/node_modules/@sap/cds/lib/i18n/files.js +140 -0
- package/node_modules/@sap/cds/lib/i18n/index.js +63 -0
- package/node_modules/@sap/cds/lib/i18n/locale.js +42 -0
- package/node_modules/@sap/cds/lib/i18n/localize.js +137 -0
- package/node_modules/@sap/cds/lib/index.js +156 -0
- package/node_modules/@sap/cds/lib/log/cds-error.js +114 -0
- package/node_modules/@sap/cds/lib/log/cds-log.js +215 -0
- package/node_modules/@sap/cds/lib/log/format/aspects/als.js +27 -0
- package/node_modules/@sap/cds/lib/log/format/aspects/cf.js +36 -0
- package/node_modules/@sap/cds/lib/log/format/aspects/cls.js +19 -0
- package/node_modules/@sap/cds/lib/log/format/json.js +143 -0
- package/node_modules/@sap/cds/lib/log/service/index.js +96 -0
- package/node_modules/@sap/cds/lib/log/service/model.cds +21 -0
- package/node_modules/@sap/cds/lib/log/service/test.http +16 -0
- package/node_modules/@sap/cds/lib/log/service/vue.html +73 -0
- package/node_modules/@sap/cds/lib/plugins.js +45 -0
- package/node_modules/@sap/cds/lib/ql/CREATE.js +30 -0
- package/node_modules/@sap/cds/lib/ql/DELETE.js +26 -0
- package/node_modules/@sap/cds/lib/ql/DROP.js +33 -0
- package/node_modules/@sap/cds/lib/ql/INSERT.js +57 -0
- package/node_modules/@sap/cds/lib/ql/SELECT.js +207 -0
- package/node_modules/@sap/cds/lib/ql/UPDATE.js +111 -0
- package/node_modules/@sap/cds/lib/ql/UPSERT.js +17 -0
- package/node_modules/@sap/cds/lib/ql/Whereable.js +58 -0
- package/node_modules/@sap/cds/lib/ql/cds-ql.js +228 -0
- package/node_modules/@sap/cds/lib/ql/cds.ql-Query.js +111 -0
- package/node_modules/@sap/cds/lib/ql/cds.ql-infer.js +148 -0
- package/node_modules/@sap/cds/lib/ql/cds.ql-predicates.js +136 -0
- package/node_modules/@sap/cds/lib/ql/cds.ql-projections.js +111 -0
- package/node_modules/@sap/cds/lib/ql/cqn.d.ts +146 -0
- package/node_modules/@sap/cds/lib/req/assert.js +71 -0
- package/node_modules/@sap/cds/lib/req/context.js +216 -0
- package/node_modules/@sap/cds/lib/req/event.js +14 -0
- package/node_modules/@sap/cds/lib/req/request.js +183 -0
- package/node_modules/@sap/cds/lib/req/response.js +54 -0
- package/node_modules/@sap/cds/lib/req/spawn.js +38 -0
- package/node_modules/@sap/cds/lib/req/user.js +77 -0
- package/node_modules/@sap/cds/lib/req/validate.js +339 -0
- package/node_modules/@sap/cds/lib/srv/bindings.js +170 -0
- package/node_modules/@sap/cds/lib/srv/cds-connect.js +79 -0
- package/node_modules/@sap/cds/lib/srv/cds-serve.js +84 -0
- package/node_modules/@sap/cds/lib/srv/cds.Service.js +214 -0
- package/node_modules/@sap/cds/lib/srv/factory.js +78 -0
- package/node_modules/@sap/cds/lib/srv/middlewares/auth/basic-auth.js +55 -0
- package/node_modules/@sap/cds/lib/srv/middlewares/auth/dummy-auth.js +8 -0
- package/node_modules/@sap/cds/lib/srv/middlewares/auth/ias-auth.js +167 -0
- package/node_modules/@sap/cds/lib/srv/middlewares/auth/index.js +53 -0
- package/node_modules/@sap/cds/lib/srv/middlewares/auth/jwt-auth.js +89 -0
- package/node_modules/@sap/cds/lib/srv/middlewares/auth/mocked-users.js +73 -0
- package/node_modules/@sap/cds/lib/srv/middlewares/auth/xssec.js +7 -0
- package/node_modules/@sap/cds/lib/srv/middlewares/cds-context.js +17 -0
- package/node_modules/@sap/cds/lib/srv/middlewares/ctx-model.js +25 -0
- package/node_modules/@sap/cds/lib/srv/middlewares/errors.js +42 -0
- package/node_modules/@sap/cds/lib/srv/middlewares/index.js +51 -0
- package/node_modules/@sap/cds/lib/srv/middlewares/trace.js +117 -0
- package/node_modules/@sap/cds/lib/srv/protocols/hcql.js +170 -0
- package/node_modules/@sap/cds/lib/srv/protocols/http.js +207 -0
- package/node_modules/@sap/cds/lib/srv/protocols/index.js +186 -0
- package/node_modules/@sap/cds/lib/srv/protocols/odata-v4.js +1 -0
- package/node_modules/@sap/cds/lib/srv/protocols/rest.js +1 -0
- package/node_modules/@sap/cds/lib/srv/srv-dispatch.js +117 -0
- package/node_modules/@sap/cds/lib/srv/srv-handlers.js +173 -0
- package/node_modules/@sap/cds/lib/srv/srv-methods.js +86 -0
- package/node_modules/@sap/cds/lib/srv/srv-models.js +167 -0
- package/node_modules/@sap/cds/lib/srv/srv-resolve.js +21 -0
- package/node_modules/@sap/cds/lib/srv/srv-tx.js +204 -0
- package/node_modules/@sap/cds/lib/test/cds-test.js +5 -0
- package/node_modules/@sap/cds/lib/utils/cds-utils.js +411 -0
- package/node_modules/@sap/cds/lib/utils/colors.js +56 -0
- package/node_modules/@sap/cds/lib/utils/csv-reader.js +100 -0
- package/node_modules/@sap/cds/lib/utils/extend.js +20 -0
- package/node_modules/@sap/cds/lib/utils/inflect.js +25 -0
- package/node_modules/@sap/cds/lib/utils/lazify.js +33 -0
- package/node_modules/@sap/cds/lib/utils/tar-lib.js +58 -0
- package/node_modules/@sap/cds/lib/utils/tar-win.js +106 -0
- package/node_modules/@sap/cds/lib/utils/tar.js +180 -0
- package/node_modules/@sap/cds/lib/utils/version.js +11 -0
- package/node_modules/@sap/cds/libx/_runtime/cds.js +25 -0
- package/node_modules/@sap/cds/libx/_runtime/common/Service.js +96 -0
- package/node_modules/@sap/cds/libx/_runtime/common/aspects/Association.js +82 -0
- package/node_modules/@sap/cds/libx/_runtime/common/aspects/any.js +34 -0
- package/node_modules/@sap/cds/libx/_runtime/common/aspects/entity.js +41 -0
- package/node_modules/@sap/cds/libx/_runtime/common/aspects/service.js +25 -0
- package/node_modules/@sap/cds/libx/_runtime/common/constants/draft.js +48 -0
- package/node_modules/@sap/cds/libx/_runtime/common/constants/events.js +6 -0
- package/node_modules/@sap/cds/libx/_runtime/common/generic/assert.js +225 -0
- package/node_modules/@sap/cds/libx/_runtime/common/generic/auth/autoexpose.js +26 -0
- package/node_modules/@sap/cds/libx/_runtime/common/generic/auth/capabilities.js +87 -0
- package/node_modules/@sap/cds/libx/_runtime/common/generic/auth/expand.js +74 -0
- package/node_modules/@sap/cds/libx/_runtime/common/generic/auth/index.js +84 -0
- package/node_modules/@sap/cds/libx/_runtime/common/generic/auth/insertOnly.js +13 -0
- package/node_modules/@sap/cds/libx/_runtime/common/generic/auth/readOnly.js +13 -0
- package/node_modules/@sap/cds/libx/_runtime/common/generic/auth/requires.js +40 -0
- package/node_modules/@sap/cds/libx/_runtime/common/generic/auth/restrict.js +296 -0
- package/node_modules/@sap/cds/libx/_runtime/common/generic/auth/restrictions.js +124 -0
- package/node_modules/@sap/cds/libx/_runtime/common/generic/auth/service.js +18 -0
- package/node_modules/@sap/cds/libx/_runtime/common/generic/auth/utils.js +200 -0
- package/node_modules/@sap/cds/libx/_runtime/common/generic/crud.js +82 -0
- package/node_modules/@sap/cds/libx/_runtime/common/generic/etag.js +100 -0
- package/node_modules/@sap/cds/libx/_runtime/common/generic/flows.js +235 -0
- package/node_modules/@sap/cds/libx/_runtime/common/generic/input.js +441 -0
- package/node_modules/@sap/cds/libx/_runtime/common/generic/media.js +25 -0
- package/node_modules/@sap/cds/libx/_runtime/common/generic/paging.js +47 -0
- package/node_modules/@sap/cds/libx/_runtime/common/generic/sorting.js +83 -0
- package/node_modules/@sap/cds/libx/_runtime/common/generic/temporal.js +86 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/binary.js +9 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/compareJson.js +378 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/copy.js +44 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/cqn.js +73 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/csn.js +153 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/differ.js +183 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/draft.js +82 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/entityFromCqn.js +42 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/etag.js +30 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/foreignKeyPropagations.js +299 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/keys.js +105 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/normalizeTimestamp.js +34 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/postProcess.js +102 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/propagateForeignKeys.js +108 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/resolveStructured.js +58 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/resolveView.js +732 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/rewriteAsterisks.js +199 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/rowUUIDGenerator.js +21 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/streamProp.js +72 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/structured.js +314 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/template.js +154 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/templateDelimiter.js +1 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/templateProcessor.js +83 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/templateProcessorPathSerializer.js +51 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/vcap.js +28 -0
- package/node_modules/@sap/cds/libx/_runtime/common/utils/waitingTime.js +14 -0
- package/node_modules/@sap/cds/libx/_runtime/fiori/lean-draft.js +2604 -0
- package/node_modules/@sap/cds/libx/_runtime/messaging/AMQPWebhookMessaging.js +71 -0
- package/node_modules/@sap/cds/libx/_runtime/messaging/common-utils/AMQPClient.js +90 -0
- package/node_modules/@sap/cds/libx/_runtime/messaging/common-utils/appId.js +9 -0
- package/node_modules/@sap/cds/libx/_runtime/messaging/common-utils/authorizedRequest.js +66 -0
- package/node_modules/@sap/cds/libx/_runtime/messaging/common-utils/connections.js +81 -0
- package/node_modules/@sap/cds/libx/_runtime/messaging/common-utils/normalizeIncomingMessage.js +29 -0
- package/node_modules/@sap/cds/libx/_runtime/messaging/common-utils/optionsForSubdomain.js +14 -0
- package/node_modules/@sap/cds/libx/_runtime/messaging/common-utils/runInSequence.js +6 -0
- package/node_modules/@sap/cds/libx/_runtime/messaging/composite.js +47 -0
- package/node_modules/@sap/cds/libx/_runtime/messaging/enterprise-messaging-shared.js +61 -0
- package/node_modules/@sap/cds/libx/_runtime/messaging/enterprise-messaging-utils/EMManagement.js +473 -0
- package/node_modules/@sap/cds/libx/_runtime/messaging/enterprise-messaging-utils/cloudEvents.js +31 -0
- package/node_modules/@sap/cds/libx/_runtime/messaging/enterprise-messaging-utils/getTenantInfo.js +24 -0
- package/node_modules/@sap/cds/libx/_runtime/messaging/enterprise-messaging-utils/options-management.js +24 -0
- package/node_modules/@sap/cds/libx/_runtime/messaging/enterprise-messaging-utils/options-messaging.js +73 -0
- package/node_modules/@sap/cds/libx/_runtime/messaging/enterprise-messaging-utils/registerEndpoints.js +158 -0
- package/node_modules/@sap/cds/libx/_runtime/messaging/enterprise-messaging.js +209 -0
- package/node_modules/@sap/cds/libx/_runtime/messaging/file-based.js +104 -0
- package/node_modules/@sap/cds/libx/_runtime/messaging/http-utils/token.js +75 -0
- package/node_modules/@sap/cds/libx/_runtime/messaging/kafka.js +273 -0
- package/node_modules/@sap/cds/libx/_runtime/messaging/message-queuing-utils/options-management.js +34 -0
- package/node_modules/@sap/cds/libx/_runtime/messaging/message-queuing-utils/options-messaging.js +40 -0
- package/node_modules/@sap/cds/libx/_runtime/messaging/message-queuing.js +238 -0
- package/node_modules/@sap/cds/libx/_runtime/messaging/redis-messaging.js +95 -0
- package/node_modules/@sap/cds/libx/_runtime/messaging/service.js +147 -0
- package/node_modules/@sap/cds/libx/_runtime/remote/Service.js +330 -0
- package/node_modules/@sap/cds/libx/_runtime/remote/utils/client.js +287 -0
- package/node_modules/@sap/cds/libx/_runtime/remote/utils/cloudSdkProvider.js +60 -0
- package/node_modules/@sap/cds/libx/_runtime/remote/utils/data.js +177 -0
- package/node_modules/@sap/cds/libx/_runtime/remote/utils/fetchClient.js +180 -0
- package/node_modules/@sap/cds/libx/_runtime/remote/utils/query.js +196 -0
- package/node_modules/@sap/cds/libx/_runtime/ucl/Service.js +450 -0
- package/node_modules/@sap/cds/libx/_runtime/ucl/queries.js +61 -0
- package/node_modules/@sap/cds/libx/common/utils/path.js +47 -0
- package/node_modules/@sap/cds/libx/common/utils/streaming.js +72 -0
- package/node_modules/@sap/cds/libx/http/body-parser.js +44 -0
- package/node_modules/@sap/cds/libx/http/location.js +42 -0
- package/node_modules/@sap/cds/libx/http/put.js +36 -0
- package/node_modules/@sap/cds/libx/odata/ODataAdapter.js +129 -0
- package/node_modules/@sap/cds/libx/odata/index.js +137 -0
- package/node_modules/@sap/cds/libx/odata/middleware/batch.js +695 -0
- package/node_modules/@sap/cds/libx/odata/middleware/create.js +113 -0
- package/node_modules/@sap/cds/libx/odata/middleware/delete.js +73 -0
- package/node_modules/@sap/cds/libx/odata/middleware/error.js +19 -0
- package/node_modules/@sap/cds/libx/odata/middleware/metadata.js +138 -0
- package/node_modules/@sap/cds/libx/odata/middleware/operation.js +192 -0
- package/node_modules/@sap/cds/libx/odata/middleware/parse.js +49 -0
- package/node_modules/@sap/cds/libx/odata/middleware/read.js +311 -0
- package/node_modules/@sap/cds/libx/odata/middleware/service-document.js +79 -0
- package/node_modules/@sap/cds/libx/odata/middleware/stream.js +180 -0
- package/node_modules/@sap/cds/libx/odata/middleware/update.js +178 -0
- package/node_modules/@sap/cds/libx/odata/parse/afterburner.js +1033 -0
- package/node_modules/@sap/cds/libx/odata/parse/cqn2odata.js +615 -0
- package/node_modules/@sap/cds/libx/odata/parse/grammar.peggy +1416 -0
- package/node_modules/@sap/cds/libx/odata/parse/multipartToJson.js +220 -0
- package/node_modules/@sap/cds/libx/odata/parse/parser.js +1 -0
- package/node_modules/@sap/cds/libx/odata/utils/etag.js +21 -0
- package/node_modules/@sap/cds/libx/odata/utils/index.js +348 -0
- package/node_modules/@sap/cds/libx/odata/utils/metadata.js +223 -0
- package/node_modules/@sap/cds/libx/odata/utils/normalizeTimeData.js +43 -0
- package/node_modules/@sap/cds/libx/odata/utils/odataBind.js +43 -0
- package/node_modules/@sap/cds/libx/odata/utils/postProcess.js +86 -0
- package/node_modules/@sap/cds/libx/odata/utils/readAfterWrite.js +144 -0
- package/node_modules/@sap/cds/libx/odata/utils/result.js +91 -0
- package/node_modules/@sap/cds/libx/queue/JobExecutor.js +80 -0
- package/node_modules/@sap/cds/libx/queue/SchedulingService.js +213 -0
- package/node_modules/@sap/cds/libx/queue/TaskRunner.js +92 -0
- package/node_modules/@sap/cds/libx/queue/api.js +28 -0
- package/node_modules/@sap/cds/libx/queue/consts.js +13 -0
- package/node_modules/@sap/cds/libx/queue/index.js +608 -0
- package/node_modules/@sap/cds/libx/queue/processing.js +645 -0
- package/node_modules/@sap/cds/libx/queue/utils.js +159 -0
- package/node_modules/@sap/cds/libx/rest/RestAdapter.js +102 -0
- package/node_modules/@sap/cds/libx/rest/middleware/create.js +50 -0
- package/node_modules/@sap/cds/libx/rest/middleware/delete.js +17 -0
- package/node_modules/@sap/cds/libx/rest/middleware/operation.js +54 -0
- package/node_modules/@sap/cds/libx/rest/middleware/parse.js +142 -0
- package/node_modules/@sap/cds/libx/rest/middleware/read.js +34 -0
- package/node_modules/@sap/cds/libx/rest/middleware/update.js +28 -0
- package/node_modules/@sap/cds/libx/rest/middleware/upsert.js +35 -0
- package/node_modules/@sap/cds/libx/rest/post-processing.js +33 -0
- package/node_modules/@sap/cds/libx/rest/pre-processing.js +28 -0
- package/node_modules/@sap/cds/package.json +49 -0
- package/node_modules/@sap/cds/server.js +119 -0
- package/node_modules/@sap/cds/srv/app-service.js +1 -0
- package/node_modules/@sap/cds/srv/db-service.js +1 -0
- package/node_modules/@sap/cds/srv/msg-service.js +1 -0
- package/node_modules/@sap/cds/srv/outbox.cds +15 -0
- package/node_modules/@sap/cds/srv/remote-service.js +1 -0
- package/node_modules/@sap/cds/srv/ucl-service.cds +58 -0
- package/node_modules/@sap/cds/srv/ucl-service.js +1 -0
- package/node_modules/@sap/cds/tasks/enterprise-messaging-deploy.js +52 -0
- package/node_modules/@sap/cds-compiler/CHANGELOG.md +987 -0
- package/node_modules/@sap/cds-compiler/LICENSE +32 -0
- package/node_modules/@sap/cds-compiler/README.md +44 -0
- package/node_modules/@sap/cds-compiler/bin/cds_update_identifiers.js +141 -0
- package/node_modules/@sap/cds-compiler/bin/cdsc.js +776 -0
- package/node_modules/@sap/cds-compiler/bin/cdshi.js +83 -0
- package/node_modules/@sap/cds-compiler/bin/cdsse.js +210 -0
- package/node_modules/@sap/cds-compiler/bin/cdsv2m.js +52 -0
- package/node_modules/@sap/cds-compiler/doc/API.md +16 -0
- package/node_modules/@sap/cds-compiler/doc/IncompatibleChanges_v5.md +436 -0
- package/node_modules/@sap/cds-compiler/doc/IncompatibleChanges_v6.md +659 -0
- package/node_modules/@sap/cds-compiler/doc/IncompatibleChanges_v7.md +639 -0
- package/node_modules/@sap/cds-compiler/doc/Versioning.md +79 -0
- package/node_modules/@sap/cds-compiler/lib/api/main.js +1415 -0
- package/node_modules/@sap/cds-compiler/lib/api/options.js +275 -0
- package/node_modules/@sap/cds-compiler/lib/api/validate.js +209 -0
- package/node_modules/@sap/cds-compiler/lib/base/builtins.js +122 -0
- package/node_modules/@sap/cds-compiler/lib/base/cloneCsn.js +226 -0
- package/node_modules/@sap/cds-compiler/lib/base/csnRefs.js +1420 -0
- package/node_modules/@sap/cds-compiler/lib/base/error.js +30 -0
- package/node_modules/@sap/cds-compiler/lib/base/keywords.js +930 -0
- package/node_modules/@sap/cds-compiler/lib/base/location.js +304 -0
- package/node_modules/@sap/cds-compiler/lib/base/message-registry.js +1635 -0
- package/node_modules/@sap/cds-compiler/lib/base/messages.js +1994 -0
- package/node_modules/@sap/cds-compiler/lib/base/meta.js +10 -0
- package/node_modules/@sap/cds-compiler/lib/base/model-api.js +82 -0
- package/node_modules/@sap/cds-compiler/lib/base/optionProcessor.js +593 -0
- package/node_modules/@sap/cds-compiler/lib/base/specialOptions.js +125 -0
- package/node_modules/@sap/cds-compiler/lib/base/trace.js +91 -0
- package/node_modules/@sap/cds-compiler/lib/base/xprAsTree.js +85 -0
- package/node_modules/@sap/cds-compiler/lib/checks/actionsFunctions.js +128 -0
- package/node_modules/@sap/cds-compiler/lib/checks/annotationsOData.js +126 -0
- package/node_modules/@sap/cds-compiler/lib/checks/arrayOfs.js +52 -0
- package/node_modules/@sap/cds-compiler/lib/checks/assocOutsideService.js +29 -0
- package/node_modules/@sap/cds-compiler/lib/checks/cdsMap.js +27 -0
- package/node_modules/@sap/cds-compiler/lib/checks/cdsPersistence.js +24 -0
- package/node_modules/@sap/cds-compiler/lib/checks/checkForTypes.js +35 -0
- package/node_modules/@sap/cds-compiler/lib/checks/checkPathsInStoredCalcElement.js +84 -0
- package/node_modules/@sap/cds-compiler/lib/checks/defaultValues.js +34 -0
- package/node_modules/@sap/cds-compiler/lib/checks/elements.js +345 -0
- package/node_modules/@sap/cds-compiler/lib/checks/enricher.js +225 -0
- package/node_modules/@sap/cds-compiler/lib/checks/enums.js +31 -0
- package/node_modules/@sap/cds-compiler/lib/checks/existsExpressionsOnlyForeignKeys.js +77 -0
- package/node_modules/@sap/cds-compiler/lib/checks/existsInForbiddenPlaces.js +32 -0
- package/node_modules/@sap/cds-compiler/lib/checks/existsMustEndInAssoc.js +32 -0
- package/node_modules/@sap/cds-compiler/lib/checks/existsMustNotStartWithDollarSelf.js +31 -0
- package/node_modules/@sap/cds-compiler/lib/checks/featureFlags.js +69 -0
- package/node_modules/@sap/cds-compiler/lib/checks/foreignKeys.js +80 -0
- package/node_modules/@sap/cds-compiler/lib/checks/hasPersistedElements.js +69 -0
- package/node_modules/@sap/cds-compiler/lib/checks/invalidTarget.js +64 -0
- package/node_modules/@sap/cds-compiler/lib/checks/managedInType.js +84 -0
- package/node_modules/@sap/cds-compiler/lib/checks/managedWithoutKeys.js +20 -0
- package/node_modules/@sap/cds-compiler/lib/checks/manyExpand.js +28 -0
- package/node_modules/@sap/cds-compiler/lib/checks/manyNavigations.js +33 -0
- package/node_modules/@sap/cds-compiler/lib/checks/nullableKeys.js +13 -0
- package/node_modules/@sap/cds-compiler/lib/checks/onConditions.js +268 -0
- package/node_modules/@sap/cds-compiler/lib/checks/parameters.js +46 -0
- package/node_modules/@sap/cds-compiler/lib/checks/queryNoDbArtifacts.js +225 -0
- package/node_modules/@sap/cds-compiler/lib/checks/selectItems.js +57 -0
- package/node_modules/@sap/cds-compiler/lib/checks/sql-snippets.js +117 -0
- package/node_modules/@sap/cds-compiler/lib/checks/structuredAnnoExpressions.js +26 -0
- package/node_modules/@sap/cds-compiler/lib/checks/typeParameters.js +162 -0
- package/node_modules/@sap/cds-compiler/lib/checks/types.js +198 -0
- package/node_modules/@sap/cds-compiler/lib/checks/utils.js +96 -0
- package/node_modules/@sap/cds-compiler/lib/checks/validator.js +292 -0
- package/node_modules/@sap/cds-compiler/lib/compiler/assert-consistency.js +1115 -0
- package/node_modules/@sap/cds-compiler/lib/compiler/base.js +153 -0
- package/node_modules/@sap/cds-compiler/lib/compiler/builtins.js +499 -0
- package/node_modules/@sap/cds-compiler/lib/compiler/checks.js +1447 -0
- package/node_modules/@sap/cds-compiler/lib/compiler/cycle-detector.js +135 -0
- package/node_modules/@sap/cds-compiler/lib/compiler/define.js +1190 -0
- package/node_modules/@sap/cds-compiler/lib/compiler/dictionaries.js +109 -0
- package/node_modules/@sap/cds-compiler/lib/compiler/extend.js +1928 -0
- package/node_modules/@sap/cds-compiler/lib/compiler/finalize-parse-cdl.js +170 -0
- package/node_modules/@sap/cds-compiler/lib/compiler/generate.js +910 -0
- package/node_modules/@sap/cds-compiler/lib/compiler/index.js +695 -0
- package/node_modules/@sap/cds-compiler/lib/compiler/kick-start.js +142 -0
- package/node_modules/@sap/cds-compiler/lib/compiler/lsp-api.js +506 -0
- package/node_modules/@sap/cds-compiler/lib/compiler/moduleLayers.js +75 -0
- package/node_modules/@sap/cds-compiler/lib/compiler/populate.js +1425 -0
- package/node_modules/@sap/cds-compiler/lib/compiler/propagator.js +457 -0
- package/node_modules/@sap/cds-compiler/lib/compiler/resolve.js +1996 -0
- package/node_modules/@sap/cds-compiler/lib/compiler/shared.js +2272 -0
- package/node_modules/@sap/cds-compiler/lib/compiler/tweak-assocs.js +1388 -0
- package/node_modules/@sap/cds-compiler/lib/compiler/utils.js +929 -0
- package/node_modules/@sap/cds-compiler/lib/compiler/xpr-rewrite.js +778 -0
- package/node_modules/@sap/cds-compiler/lib/compiler/xsn-model.js +50 -0
- package/node_modules/@sap/cds-compiler/lib/edm/EdmPrimitiveTypeDefinitions.js +263 -0
- package/node_modules/@sap/cds-compiler/lib/edm/annotations/edmJson.js +1245 -0
- package/node_modules/@sap/cds-compiler/lib/edm/annotations/genericTranslation.js +1873 -0
- package/node_modules/@sap/cds-compiler/lib/edm/annotations/preprocessAnnotations.js +308 -0
- package/node_modules/@sap/cds-compiler/lib/edm/annotations/vocabularyDefinitions.js +166 -0
- package/node_modules/@sap/cds-compiler/lib/edm/csn2edm.js +1226 -0
- package/node_modules/@sap/cds-compiler/lib/edm/edm.js +1628 -0
- package/node_modules/@sap/cds-compiler/lib/edm/edmAnnoPreprocessor.js +312 -0
- package/node_modules/@sap/cds-compiler/lib/edm/edmInboundChecks.js +182 -0
- package/node_modules/@sap/cds-compiler/lib/edm/edmPreprocessor.js +2320 -0
- package/node_modules/@sap/cds-compiler/lib/edm/edmUtils.js +949 -0
- package/node_modules/@sap/cds-compiler/lib/gen/BaseParser.js +892 -0
- package/node_modules/@sap/cds-compiler/lib/gen/CdlGrammar.checksum +1 -0
- package/node_modules/@sap/cds-compiler/lib/gen/CdlParser.js +4549 -0
- package/node_modules/@sap/cds-compiler/lib/gen/Dictionary.json +5124 -0
- package/node_modules/@sap/cds-compiler/lib/gen/cdlKeywords.json +26 -0
- package/node_modules/@sap/cds-compiler/lib/json/csnVersion.js +53 -0
- package/node_modules/@sap/cds-compiler/lib/json/from-csn.js +2217 -0
- package/node_modules/@sap/cds-compiler/lib/json/to-csn.js +1621 -0
- package/node_modules/@sap/cds-compiler/lib/language/docCommentParser.js +181 -0
- package/node_modules/@sap/cds-compiler/lib/language/genericAntlrParser.js +0 -0
- package/node_modules/@sap/cds-compiler/lib/language/multiLineStringParser.js +525 -0
- package/node_modules/@sap/cds-compiler/lib/language/textUtils.js +61 -0
- package/node_modules/@sap/cds-compiler/lib/main.d.ts +1631 -0
- package/node_modules/@sap/cds-compiler/lib/main.js +212 -0
- package/node_modules/@sap/cds-compiler/lib/model/csnUtils.js +1532 -0
- package/node_modules/@sap/cds-compiler/lib/model/sortViews.js +121 -0
- package/node_modules/@sap/cds-compiler/lib/modelCompare/compare.js +475 -0
- package/node_modules/@sap/cds-compiler/lib/modelCompare/utils/filter.js +230 -0
- package/node_modules/@sap/cds-compiler/lib/parsers/AstBuildingParser.js +1696 -0
- package/node_modules/@sap/cds-compiler/lib/parsers/Lexer.js +253 -0
- package/node_modules/@sap/cds-compiler/lib/parsers/XprTree.js +269 -0
- package/node_modules/@sap/cds-compiler/lib/parsers/identifiers.js +22 -0
- package/node_modules/@sap/cds-compiler/lib/parsers/index.js +120 -0
- package/node_modules/@sap/cds-compiler/lib/render/DuplicateChecker.js +126 -0
- package/node_modules/@sap/cds-compiler/lib/render/manageConstraints.js +257 -0
- package/node_modules/@sap/cds-compiler/lib/render/toCdl.js +3084 -0
- package/node_modules/@sap/cds-compiler/lib/render/toRename.js +115 -0
- package/node_modules/@sap/cds-compiler/lib/render/toSql.js +1789 -0
- package/node_modules/@sap/cds-compiler/lib/render/utils/common.js +784 -0
- package/node_modules/@sap/cds-compiler/lib/render/utils/delta.js +291 -0
- package/node_modules/@sap/cds-compiler/lib/render/utils/operators.js +160 -0
- package/node_modules/@sap/cds-compiler/lib/render/utils/pretty.js +337 -0
- package/node_modules/@sap/cds-compiler/lib/render/utils/sql.js +225 -0
- package/node_modules/@sap/cds-compiler/lib/render/utils/standardDatabaseFunctions.js +834 -0
- package/node_modules/@sap/cds-compiler/lib/render/utils/stringEscapes.js +112 -0
- package/node_modules/@sap/cds-compiler/lib/render/utils/unique.js +52 -0
- package/node_modules/@sap/cds-compiler/lib/sql-identifier.js +109 -0
- package/node_modules/@sap/cds-compiler/lib/tool-lib/enrichCsn.js +383 -0
- package/node_modules/@sap/cds-compiler/lib/tool-lib/index.js +14 -0
- package/node_modules/@sap/cds-compiler/lib/tool-lib/inspectModelStatistics.js +82 -0
- package/node_modules/@sap/cds-compiler/lib/tool-lib/inspectPropagation.js +191 -0
- package/node_modules/@sap/cds-compiler/lib/tool-lib/inspectUtils.js +44 -0
- package/node_modules/@sap/cds-compiler/lib/tool-lib/revealInternalProperties.js +419 -0
- package/node_modules/@sap/cds-compiler/lib/transform/addTenantFields.js +431 -0
- package/node_modules/@sap/cds-compiler/lib/transform/db/applyTransformations.js +444 -0
- package/node_modules/@sap/cds-compiler/lib/transform/db/assertUnique.js +307 -0
- package/node_modules/@sap/cds-compiler/lib/transform/db/associations.js +270 -0
- package/node_modules/@sap/cds-compiler/lib/transform/db/assocsToQueries/normalizeFrom.js +33 -0
- package/node_modules/@sap/cds-compiler/lib/transform/db/assocsToQueries/transformExists.js +401 -0
- package/node_modules/@sap/cds-compiler/lib/transform/db/assocsToQueries/utils.js +449 -0
- package/node_modules/@sap/cds-compiler/lib/transform/db/backlinks.js +333 -0
- package/node_modules/@sap/cds-compiler/lib/transform/db/cdsPersistence.js +127 -0
- package/node_modules/@sap/cds-compiler/lib/transform/db/constraints.js +619 -0
- package/node_modules/@sap/cds-compiler/lib/transform/db/expansion.js +913 -0
- package/node_modules/@sap/cds-compiler/lib/transform/db/flattening.js +814 -0
- package/node_modules/@sap/cds-compiler/lib/transform/db/groupByOrderBy.js +84 -0
- package/node_modules/@sap/cds-compiler/lib/transform/db/killAnnotations.js +44 -0
- package/node_modules/@sap/cds-compiler/lib/transform/db/processSqlServices.js +135 -0
- package/node_modules/@sap/cds-compiler/lib/transform/db/rewriteCalculatedElements.js +507 -0
- package/node_modules/@sap/cds-compiler/lib/transform/db/temporal.js +263 -0
- package/node_modules/@sap/cds-compiler/lib/transform/db/views.js +404 -0
- package/node_modules/@sap/cds-compiler/lib/transform/draft/db.js +381 -0
- package/node_modules/@sap/cds-compiler/lib/transform/draft/odata.js +302 -0
- package/node_modules/@sap/cds-compiler/lib/transform/effective/annotations.js +342 -0
- package/node_modules/@sap/cds-compiler/lib/transform/effective/associations.js +81 -0
- package/node_modules/@sap/cds-compiler/lib/transform/effective/flattening.js +124 -0
- package/node_modules/@sap/cds-compiler/lib/transform/effective/main.js +164 -0
- package/node_modules/@sap/cds-compiler/lib/transform/effective/misc.js +106 -0
- package/node_modules/@sap/cds-compiler/lib/transform/effective/queries.js +40 -0
- package/node_modules/@sap/cds-compiler/lib/transform/effective/service.js +34 -0
- package/node_modules/@sap/cds-compiler/lib/transform/effective/types.js +168 -0
- package/node_modules/@sap/cds-compiler/lib/transform/featureFlags.js +10 -0
- package/node_modules/@sap/cds-compiler/lib/transform/fioriTreeViews.js +196 -0
- package/node_modules/@sap/cds-compiler/lib/transform/forOdata.js +687 -0
- package/node_modules/@sap/cds-compiler/lib/transform/forRelationalDB.js +658 -0
- package/node_modules/@sap/cds-compiler/lib/transform/localized.js +758 -0
- package/node_modules/@sap/cds-compiler/lib/transform/odata/adaptAnnotationRefs.js +101 -0
- package/node_modules/@sap/cds-compiler/lib/transform/odata/createForeignKeys.js +203 -0
- package/node_modules/@sap/cds-compiler/lib/transform/odata/flattening.js +730 -0
- package/node_modules/@sap/cds-compiler/lib/transform/odata/foreignKeyRefsInXprAnnos.js +124 -0
- package/node_modules/@sap/cds-compiler/lib/transform/odata/toFinalBaseType.js +297 -0
- package/node_modules/@sap/cds-compiler/lib/transform/odata/typesExposure.js +455 -0
- package/node_modules/@sap/cds-compiler/lib/transform/odata/utils.js +65 -0
- package/node_modules/@sap/cds-compiler/lib/transform/transformUtils.js +1000 -0
- package/node_modules/@sap/cds-compiler/lib/transform/translateAssocsToJoins.js +1905 -0
- package/node_modules/@sap/cds-compiler/lib/transform/tupleExpansion.js +548 -0
- package/node_modules/@sap/cds-compiler/lib/transform/universalCsn/coreComputed.js +194 -0
- package/node_modules/@sap/cds-compiler/lib/transform/universalCsn/universalCsnEnricher.js +800 -0
- package/node_modules/@sap/cds-compiler/lib/transform/universalCsn/utils.js +63 -0
- package/node_modules/@sap/cds-compiler/lib/utils/file.js +267 -0
- package/node_modules/@sap/cds-compiler/lib/utils/lazyload.js +37 -0
- package/node_modules/@sap/cds-compiler/lib/utils/moduleResolve.js +608 -0
- package/node_modules/@sap/cds-compiler/lib/utils/node-helpers.js +44 -0
- package/node_modules/@sap/cds-compiler/lib/utils/objectUtils.js +112 -0
- package/node_modules/@sap/cds-compiler/lib/utils/optionProcessorHelper.js +652 -0
- package/node_modules/@sap/cds-compiler/lib/utils/shuffle.js +54 -0
- package/node_modules/@sap/cds-compiler/lib/utils/term.js +102 -0
- package/node_modules/@sap/cds-compiler/lib/utils/timetrace.js +158 -0
- package/node_modules/@sap/cds-compiler/package.json +30 -0
- package/node_modules/@sap/cds-compiler/share/messages/.markdownlintrc +13 -0
- package/node_modules/@sap/cds-compiler/share/messages/README.md +62 -0
- package/node_modules/@sap/cds-compiler/share/messages/anno-duplicate-unrelated-layer.md +69 -0
- package/node_modules/@sap/cds-compiler/share/messages/anno-missing-rewrite.md +45 -0
- package/node_modules/@sap/cds-compiler/share/messages/check-proper-type-of.md +46 -0
- package/node_modules/@sap/cds-compiler/share/messages/def-duplicate-autoexposed.md +82 -0
- package/node_modules/@sap/cds-compiler/share/messages/def-missing-type.md +48 -0
- package/node_modules/@sap/cds-compiler/share/messages/def-upcoming-virtual-change.md +55 -0
- package/node_modules/@sap/cds-compiler/share/messages/extend-repeated-intralayer.md +47 -0
- package/node_modules/@sap/cds-compiler/share/messages/extend-unrelated-layer.md +58 -0
- package/node_modules/@sap/cds-compiler/share/messages/file-unexpected-case-mismatch.md +61 -0
- package/node_modules/@sap/cds-compiler/share/messages/message-explanations.json +22 -0
- package/node_modules/@sap/cds-compiler/share/messages/redirected-to-ambiguous.md +72 -0
- package/node_modules/@sap/cds-compiler/share/messages/redirected-to-complex.md +66 -0
- package/node_modules/@sap/cds-compiler/share/messages/redirected-to-unrelated.md +78 -0
- package/node_modules/@sap/cds-compiler/share/messages/rewrite-not-supported.md +61 -0
- package/node_modules/@sap/cds-compiler/share/messages/rewrite-undefined-key.md +94 -0
- package/node_modules/@sap/cds-compiler/share/messages/syntax-expecting-unsigned-int.md +41 -0
- package/node_modules/@sap/cds-compiler/share/messages/type-missing-enum-value.md +59 -0
- package/node_modules/@sap/cds-compiler/share/messages/wildcard-excluding-one.md +37 -0
- package/node_modules/@sap/cds-fiori/CHANGELOG.md +163 -0
- package/node_modules/@sap/cds-fiori/LICENSE +32 -0
- package/node_modules/@sap/cds-fiori/README.md +11 -0
- package/node_modules/@sap/cds-fiori/app/preview.js +360 -0
- package/node_modules/@sap/cds-fiori/app/routes.js +74 -0
- package/node_modules/@sap/cds-fiori/cds-plugin.js +5 -0
- package/node_modules/@sap/cds-fiori/package.json +42 -0
- package/node_modules/@sap/cds-mtxs/CHANGELOG.md +1322 -0
- package/node_modules/@sap/cds-mtxs/LICENSE +32 -0
- package/node_modules/@sap/cds-mtxs/README.md +9 -0
- package/node_modules/@sap/cds-mtxs/bin/cds-mtx-migrate.js +115 -0
- package/node_modules/@sap/cds-mtxs/bin/cds-mtx.js +134 -0
- package/node_modules/@sap/cds-mtxs/cds-plugin.js +30 -0
- package/node_modules/@sap/cds-mtxs/db/extensions.cds +10 -0
- package/node_modules/@sap/cds-mtxs/db/t0.cds +46 -0
- package/node_modules/@sap/cds-mtxs/lib/index.js +26 -0
- package/node_modules/@sap/cds-mtxs/lib/migration/extension-project-builder.js +129 -0
- package/node_modules/@sap/cds-mtxs/lib/migration/extension-project.js +89 -0
- package/node_modules/@sap/cds-mtxs/lib/migration/migration.js +485 -0
- package/node_modules/@sap/cds-mtxs/lib/migration/mtx-adapter.js +230 -0
- package/node_modules/@sap/cds-mtxs/lib/utils.js +255 -0
- package/node_modules/@sap/cds-mtxs/package.json +257 -0
- package/node_modules/@sap/cds-mtxs/srv/bootstrap.cds +2 -0
- package/node_modules/@sap/cds-mtxs/srv/bootstrap.js +33 -0
- package/node_modules/@sap/cds-mtxs/srv/cf/abstract-provisioning-service.js +307 -0
- package/node_modules/@sap/cds-mtxs/srv/cf/saas-provisioning-service.cds +30 -0
- package/node_modules/@sap/cds-mtxs/srv/cf/saas-provisioning-service.js +59 -0
- package/node_modules/@sap/cds-mtxs/srv/cf/sms-provisioning-service.cds +37 -0
- package/node_modules/@sap/cds-mtxs/srv/cf/sms-provisioning-service.js +115 -0
- package/node_modules/@sap/cds-mtxs/srv/config.js +16 -0
- package/node_modules/@sap/cds-mtxs/srv/dberrors.js +45 -0
- package/node_modules/@sap/cds-mtxs/srv/deployment-service.cds +54 -0
- package/node_modules/@sap/cds-mtxs/srv/deployment-service.js +26 -0
- package/node_modules/@sap/cds-mtxs/srv/extensibility/compat/update.js +95 -0
- package/node_modules/@sap/cds-mtxs/srv/extensibility/linter/allowlist.js +292 -0
- package/node_modules/@sap/cds-mtxs/srv/extensibility/linter/annotations.js +168 -0
- package/node_modules/@sap/cds-mtxs/srv/extensibility/linter/config.js +98 -0
- package/node_modules/@sap/cds-mtxs/srv/extensibility/linter/index.js +76 -0
- package/node_modules/@sap/cds-mtxs/srv/extensibility/linter/message.js +57 -0
- package/node_modules/@sap/cds-mtxs/srv/extensibility/linter/namespace.js +94 -0
- package/node_modules/@sap/cds-mtxs/srv/extensibility-service.cds +82 -0
- package/node_modules/@sap/cds-mtxs/srv/extensibility-service.js +550 -0
- package/node_modules/@sap/cds-mtxs/srv/jobs-service.cds +37 -0
- package/node_modules/@sap/cds-mtxs/srv/jobs-service.js +346 -0
- package/node_modules/@sap/cds-mtxs/srv/model-provider.cds +85 -0
- package/node_modules/@sap/cds-mtxs/srv/model-provider.js +412 -0
- package/node_modules/@sap/cds-mtxs/srv/plugins/common.js +130 -0
- package/node_modules/@sap/cds-mtxs/srv/plugins/hana/ctnr-mgr-base.js +154 -0
- package/node_modules/@sap/cds-mtxs/srv/plugins/hana/hdi-ctnr-mgr.js +15 -0
- package/node_modules/@sap/cds-mtxs/srv/plugins/hana/hdi.js +167 -0
- package/node_modules/@sap/cds-mtxs/srv/plugins/hana/srv-mgr.js +323 -0
- package/node_modules/@sap/cds-mtxs/srv/plugins/hana/tms.js +542 -0
- package/node_modules/@sap/cds-mtxs/srv/plugins/hana.js +381 -0
- package/node_modules/@sap/cds-mtxs/srv/plugins/sqlite.js +122 -0
- package/node_modules/@sap/cds-mtxs/srv/worker/load.js +14 -0
- package/node_modules/@sap/cds-mtxs/srv/worker/pool.js +54 -0
- package/node_modules/@sap/hdi/CHANGELOG.md +159 -0
- package/node_modules/@sap/hdi/LICENSE +38 -0
- package/node_modules/@sap/hdi/README.md +244 -0
- package/node_modules/@sap/hdi/index.js +58 -0
- package/node_modules/@sap/hdi/lib/ResultTuple.js +33 -0
- package/node_modules/@sap/hdi/lib/main/Container.js +1107 -0
- package/node_modules/@sap/hdi/lib/main/ContainerGroup.js +147 -0
- package/node_modules/@sap/hdi/lib/main/ContainerGroupBase.js +788 -0
- package/node_modules/@sap/hdi/lib/main/HDI.js +437 -0
- package/node_modules/@sap/hdi/lib/main/HDIBase.js +592 -0
- package/node_modules/@sap/hdi/lib/main/promises/ContainerGroupPromises.js +401 -0
- package/node_modules/@sap/hdi/lib/main/promises/ContainerPromises.js +454 -0
- package/node_modules/@sap/hdi/lib/main/promises/HDIPromises.js +218 -0
- package/node_modules/@sap/hdi/lib/parameter/APIPrivilege.js +47 -0
- package/node_modules/@sap/hdi/lib/parameter/File.js +25 -0
- package/node_modules/@sap/hdi/lib/parameter/FileWithContent.js +24 -0
- package/node_modules/@sap/hdi/lib/parameter/Folder.js +25 -0
- package/node_modules/@sap/hdi/lib/parameter/FolderWithContent.js +24 -0
- package/node_modules/@sap/hdi/lib/parameter/HDIObject.js +40 -0
- package/node_modules/@sap/hdi/lib/parameter/LibraryConfiguration.js +62 -0
- package/node_modules/@sap/hdi/lib/parameter/Parameter.js +73 -0
- package/node_modules/@sap/hdi/lib/parameter/Path.js +39 -0
- package/node_modules/@sap/hdi/lib/parameter/PathParameter.js +43 -0
- package/node_modules/@sap/hdi/lib/parameter/PathWithContent.js +41 -0
- package/node_modules/@sap/hdi/lib/parameter/SchemaPrivilege.js +44 -0
- package/node_modules/@sap/hdi/lib/parameter/SchemaRole.js +44 -0
- package/node_modules/@sap/hdi/lib/parameter/TableRow.js +72 -0
- package/node_modules/@sap/hdi/lib/parameter/parameterCheck.js +41 -0
- package/node_modules/@sap/hdi/lib/result/DependencyResultTuple.js +105 -0
- package/node_modules/@sap/hdi/lib/result/LibraryInformationResultTuple.js +62 -0
- package/node_modules/@sap/hdi/lib/result/MakeGroupResultTuple.js +57 -0
- package/node_modules/@sap/hdi/lib/result/MetadataContentResultTuple.js +56 -0
- package/node_modules/@sap/hdi/lib/result/MetadataResult.js +40 -0
- package/node_modules/@sap/hdi/lib/result/MetadataResultTuple.js +37 -0
- package/node_modules/@sap/hdi/lib/result/StatusResultTuple.js +59 -0
- package/node_modules/@sap/hdi/lib/util/Constants.js +55 -0
- package/node_modules/@sap/hdi/lib/util/callback.js +18 -0
- package/node_modules/@sap/hdi/lib/util/connection.js +20 -0
- package/node_modules/@sap/hdi/lib/util/schema_escaping.js +11 -0
- package/node_modules/@sap/hdi/lib/util/typeCheck.js +43 -0
- package/node_modules/@sap/hdi/lib/util/wrap.js +23 -0
- package/node_modules/@sap/hdi/package.json +37 -0
- package/node_modules/@sap/hdi-deploy/CHANGELOG.md +672 -0
- package/node_modules/@sap/hdi-deploy/LICENSE +38 -0
- package/node_modules/@sap/hdi-deploy/README.md +1237 -0
- package/node_modules/@sap/hdi-deploy/deploy.js +1070 -0
- package/node_modules/@sap/hdi-deploy/lib/IgnoreFile.js +56 -0
- package/node_modules/@sap/hdi-deploy/lib/arguments.js +203 -0
- package/node_modules/@sap/hdi-deploy/lib/check_client.js +31 -0
- package/node_modules/@sap/hdi-deploy/lib/client-info.js +80 -0
- package/node_modules/@sap/hdi-deploy/lib/connections.js +4 -0
- package/node_modules/@sap/hdi-deploy/lib/content.js +478 -0
- package/node_modules/@sap/hdi-deploy/lib/deploy.js +113 -0
- package/node_modules/@sap/hdi-deploy/lib/features.client.js +59 -0
- package/node_modules/@sap/hdi-deploy/lib/fileWalker.js +58 -0
- package/node_modules/@sap/hdi-deploy/lib/fileWorker.js +85 -0
- package/node_modules/@sap/hdi-deploy/lib/filters/PathFilter.js +211 -0
- package/node_modules/@sap/hdi-deploy/lib/filters/regex-helper.js +87 -0
- package/node_modules/@sap/hdi-deploy/lib/hana-helper.js +1055 -0
- package/node_modules/@sap/hdi-deploy/lib/hdi.js +77 -0
- package/node_modules/@sap/hdi-deploy/lib/hdiTables.js +32 -0
- package/node_modules/@sap/hdi-deploy/lib/hdi_utils.js +356 -0
- package/node_modules/@sap/hdi-deploy/lib/info.js +44 -0
- package/node_modules/@sap/hdi-deploy/lib/json-comment-stripper.js +147 -0
- package/node_modules/@sap/hdi-deploy/lib/liveness-ping.js +53 -0
- package/node_modules/@sap/hdi-deploy/lib/logger.js +434 -0
- package/node_modules/@sap/hdi-deploy/lib/make.js +460 -0
- package/node_modules/@sap/hdi-deploy/lib/messages.hdi.js +7 -0
- package/node_modules/@sap/hdi-deploy/lib/options.js +49 -0
- package/node_modules/@sap/hdi-deploy/lib/ownership_checker.js +87 -0
- package/node_modules/@sap/hdi-deploy/lib/paths.js +71 -0
- package/node_modules/@sap/hdi-deploy/lib/privileges/grantor.js +94 -0
- package/node_modules/@sap/hdi-deploy/lib/privileges/privilege_utils.js +414 -0
- package/node_modules/@sap/hdi-deploy/lib/privileges/privileges.js +73 -0
- package/node_modules/@sap/hdi-deploy/lib/privileges/revoker.js +94 -0
- package/node_modules/@sap/hdi-deploy/lib/privileges/strategies.js +1049 -0
- package/node_modules/@sap/hdi-deploy/lib/services.js +253 -0
- package/node_modules/@sap/hdi-deploy/lib/shared-password-service.js +62 -0
- package/node_modules/@sap/hdi-deploy/lib/status.js +113 -0
- package/node_modules/@sap/hdi-deploy/lib/tasks.js +985 -0
- package/node_modules/@sap/hdi-deploy/lib/template.js +91 -0
- package/node_modules/@sap/hdi-deploy/lib/utils.js +717 -0
- package/node_modules/@sap/hdi-deploy/lib/version.cloud.js +71 -0
- package/node_modules/@sap/hdi-deploy/lib/version.container-api.js +100 -0
- package/node_modules/@sap/hdi-deploy/lib/version.hdi-version.js +101 -0
- package/node_modules/@sap/hdi-deploy/lib/version.server.js +145 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/Generator.js +598 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/artifact-visitors/AccessArtifactParserVisitor.js +68 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/artifact-visitors/ArtifactVisitor.js +11 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/artifact-visitors/DataArtifactParserVisitor.js +75 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/file-artifacts/AccessContainerDuplicate.js +16 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/file-artifacts/DataContainerDuplicate.js +16 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/file-artifacts/FileArtifact.js +228 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/file-artifacts/FileArtifactsFactory.js +243 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/file-artifacts/HDBCDS.js +182 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/file-artifacts/HDBRole.js +26 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/file-artifacts/HDBSequence.js +29 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/file-artifacts/HDBTable.js +82 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/file-artifacts/HDIConfig.js +203 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/file-artifacts/HDINamespace.js +16 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/model/Model.js +306 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/model/ModelSerializer.js +132 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/model-artifacts/Column.js +19 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/model-artifacts/Context.js +117 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/model-artifacts/DataControlLanguageModelArtifact.js +14 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/model-artifacts/DerivedType.js +23 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/model-artifacts/Entity.js +14 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/model-artifacts/ModelArtifact.js +22 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/model-artifacts/ModelArtifactsFactory.js +80 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/model-artifacts/StructuredType.js +23 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/model-artifacts/TableModelArtifact.js +41 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/generator/model-artifacts/View.js +14 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/resources/cfg/projectionViewConfig.hdbprojectionviewconfig.template +8 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/resources/cfg/synonym.hdbsynonymconfig.template +8 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/resources/cfg/zdm_data_access.hdbgrants.template +10 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/resources/src/namespace.hdinamespace.template +4 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/resources/src/projectionView.hdbprojectionview.template +5 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/resources/src/synonym.hdbsynonym.template +4 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/resources/src/zdm_access.hdbrole.template +10 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/resources/src/zdm_sequences.hdbrole.template +12 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/tasks/FinalizeTask.js +80 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/tasks/InstallTask.js +93 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/tasks/StartTask.js +101 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/tasks/Task.js +110 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/tasks/taskFactory.js +23 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/zdmDeployer.js +34 -0
- package/node_modules/@sap/hdi-deploy/lib/zdm/zdmUtils.js +257 -0
- package/node_modules/@sap/hdi-deploy/library.js +129 -0
- package/node_modules/@sap/hdi-deploy/package.json +42 -0
- package/node_modules/@sap/xsenv/CHANGELOG.md +236 -0
- package/node_modules/@sap/xsenv/LICENSE +37 -0
- package/node_modules/@sap/xsenv/README.md +548 -0
- package/node_modules/@sap/xsenv/index.js +17 -0
- package/node_modules/@sap/xsenv/lib/cacert.js +26 -0
- package/node_modules/@sap/xsenv/lib/cfservice.js +59 -0
- package/node_modules/@sap/xsenv/lib/filter.js +42 -0
- package/node_modules/@sap/xsenv/lib/k8sservice.js +121 -0
- package/node_modules/@sap/xsenv/lib/loadEnv.js +31 -0
- package/node_modules/@sap/xsenv/lib/redactServiceData.js +32 -0
- package/node_modules/@sap/xsenv/lib/serviceBindingService.js +146 -0
- package/node_modules/@sap/xsenv/lib/xsservices.js +180 -0
- package/node_modules/@sap/xsenv/migration.md +49 -0
- package/node_modules/@sap/xsenv/package.json +49 -0
- package/node_modules/accepts/HISTORY.md +250 -0
- package/node_modules/accepts/LICENSE +23 -0
- package/node_modules/accepts/README.md +140 -0
- package/node_modules/accepts/index.js +238 -0
- package/node_modules/accepts/package.json +47 -0
- package/node_modules/assert-plus/AUTHORS +6 -0
- package/node_modules/assert-plus/CHANGES.md +14 -0
- package/node_modules/assert-plus/README.md +162 -0
- package/node_modules/assert-plus/assert.js +211 -0
- package/node_modules/assert-plus/package.json +23 -0
- package/node_modules/async/CHANGELOG.md +351 -0
- package/node_modules/async/LICENSE +19 -0
- package/node_modules/async/README.md +59 -0
- package/node_modules/async/all.js +119 -0
- package/node_modules/async/allLimit.js +46 -0
- package/node_modules/async/allSeries.js +45 -0
- package/node_modules/async/any.js +122 -0
- package/node_modules/async/anyLimit.js +47 -0
- package/node_modules/async/anySeries.js +46 -0
- package/node_modules/async/apply.js +11 -0
- package/node_modules/async/applyEach.js +57 -0
- package/node_modules/async/applyEachSeries.js +37 -0
- package/node_modules/async/asyncify.js +118 -0
- package/node_modules/async/auto.js +333 -0
- package/node_modules/async/autoInject.js +182 -0
- package/node_modules/async/bower.json +17 -0
- package/node_modules/async/cargo.js +63 -0
- package/node_modules/async/cargoQueue.js +71 -0
- package/node_modules/async/compose.js +55 -0
- package/node_modules/async/concat.js +115 -0
- package/node_modules/async/concatLimit.js +60 -0
- package/node_modules/async/concatSeries.js +41 -0
- package/node_modules/async/constant.js +14 -0
- package/node_modules/async/detect.js +96 -0
- package/node_modules/async/detectLimit.js +48 -0
- package/node_modules/async/detectSeries.js +47 -0
- package/node_modules/async/dir.js +43 -0
- package/node_modules/async/dist/async.js +6061 -0
- package/node_modules/async/dist/async.min.js +1 -0
- package/node_modules/async/dist/async.mjs +5948 -0
- package/node_modules/async/doDuring.js +68 -0
- package/node_modules/async/doUntil.js +46 -0
- package/node_modules/async/doWhilst.js +68 -0
- package/node_modules/async/during.js +78 -0
- package/node_modules/async/each.js +129 -0
- package/node_modules/async/eachLimit.js +50 -0
- package/node_modules/async/eachOf.js +185 -0
- package/node_modules/async/eachOfLimit.js +47 -0
- package/node_modules/async/eachOfSeries.js +39 -0
- package/node_modules/async/eachSeries.js +44 -0
- package/node_modules/async/ensureAsync.js +67 -0
- package/node_modules/async/every.js +119 -0
- package/node_modules/async/everyLimit.js +46 -0
- package/node_modules/async/everySeries.js +45 -0
- package/node_modules/async/filter.js +93 -0
- package/node_modules/async/filterLimit.js +45 -0
- package/node_modules/async/filterSeries.js +43 -0
- package/node_modules/async/find.js +96 -0
- package/node_modules/async/findLimit.js +48 -0
- package/node_modules/async/findSeries.js +47 -0
- package/node_modules/async/flatMap.js +115 -0
- package/node_modules/async/flatMapLimit.js +60 -0
- package/node_modules/async/flatMapSeries.js +41 -0
- package/node_modules/async/foldl.js +153 -0
- package/node_modules/async/foldr.js +41 -0
- package/node_modules/async/forEach.js +129 -0
- package/node_modules/async/forEachLimit.js +50 -0
- package/node_modules/async/forEachOf.js +185 -0
- package/node_modules/async/forEachOfLimit.js +47 -0
- package/node_modules/async/forEachOfSeries.js +39 -0
- package/node_modules/async/forEachSeries.js +44 -0
- package/node_modules/async/forever.js +68 -0
- package/node_modules/async/groupBy.js +108 -0
- package/node_modules/async/groupByLimit.js +71 -0
- package/node_modules/async/groupBySeries.js +36 -0
- package/node_modules/async/index.js +588 -0
- package/node_modules/async/inject.js +153 -0
- package/node_modules/async/internal/DoublyLinkedList.js +92 -0
- package/node_modules/async/internal/Heap.js +120 -0
- package/node_modules/async/internal/applyEach.js +29 -0
- package/node_modules/async/internal/asyncEachOfLimit.js +75 -0
- package/node_modules/async/internal/awaitify.js +28 -0
- package/node_modules/async/internal/breakLoop.js +10 -0
- package/node_modules/async/internal/consoleFunc.js +31 -0
- package/node_modules/async/internal/createTester.js +40 -0
- package/node_modules/async/internal/eachOfLimit.js +90 -0
- package/node_modules/async/internal/filter.js +55 -0
- package/node_modules/async/internal/getIterator.js +11 -0
- package/node_modules/async/internal/initialParams.js +14 -0
- package/node_modules/async/internal/isArrayLike.js +10 -0
- package/node_modules/async/internal/iterator.js +57 -0
- package/node_modules/async/internal/map.js +30 -0
- package/node_modules/async/internal/once.js +17 -0
- package/node_modules/async/internal/onlyOnce.js +15 -0
- package/node_modules/async/internal/parallel.js +34 -0
- package/node_modules/async/internal/promiseCallback.js +23 -0
- package/node_modules/async/internal/queue.js +294 -0
- package/node_modules/async/internal/range.js +14 -0
- package/node_modules/async/internal/reject.js +26 -0
- package/node_modules/async/internal/setImmediate.js +34 -0
- package/node_modules/async/internal/withoutIndex.js +10 -0
- package/node_modules/async/internal/wrapAsync.js +34 -0
- package/node_modules/async/log.js +41 -0
- package/node_modules/async/map.js +142 -0
- package/node_modules/async/mapLimit.js +45 -0
- package/node_modules/async/mapSeries.js +44 -0
- package/node_modules/async/mapValues.js +152 -0
- package/node_modules/async/mapValuesLimit.js +61 -0
- package/node_modules/async/mapValuesSeries.js +37 -0
- package/node_modules/async/memoize.js +91 -0
- package/node_modules/async/nextTick.js +52 -0
- package/node_modules/async/package.json +75 -0
- package/node_modules/async/parallel.js +180 -0
- package/node_modules/async/parallelLimit.js +41 -0
- package/node_modules/async/priorityQueue.js +60 -0
- package/node_modules/async/queue.js +24 -0
- package/node_modules/async/race.js +67 -0
- package/node_modules/async/reduce.js +153 -0
- package/node_modules/async/reduceRight.js +41 -0
- package/node_modules/async/reflect.js +78 -0
- package/node_modules/async/reflectAll.js +93 -0
- package/node_modules/async/reject.js +87 -0
- package/node_modules/async/rejectLimit.js +45 -0
- package/node_modules/async/rejectSeries.js +43 -0
- package/node_modules/async/retry.js +159 -0
- package/node_modules/async/retryable.js +77 -0
- package/node_modules/async/select.js +93 -0
- package/node_modules/async/selectLimit.js +45 -0
- package/node_modules/async/selectSeries.js +43 -0
- package/node_modules/async/seq.js +79 -0
- package/node_modules/async/series.js +186 -0
- package/node_modules/async/setImmediate.js +45 -0
- package/node_modules/async/some.js +122 -0
- package/node_modules/async/someLimit.js +47 -0
- package/node_modules/async/someSeries.js +46 -0
- package/node_modules/async/sortBy.js +190 -0
- package/node_modules/async/timeout.js +89 -0
- package/node_modules/async/times.js +50 -0
- package/node_modules/async/timesLimit.js +43 -0
- package/node_modules/async/timesSeries.js +32 -0
- package/node_modules/async/transform.js +173 -0
- package/node_modules/async/tryEach.js +78 -0
- package/node_modules/async/unmemoize.js +25 -0
- package/node_modules/async/until.js +61 -0
- package/node_modules/async/waterfall.js +105 -0
- package/node_modules/async/whilst.js +78 -0
- package/node_modules/async/wrapSync.js +118 -0
- package/node_modules/body-parser/LICENSE +23 -0
- package/node_modules/body-parser/README.md +509 -0
- package/node_modules/body-parser/index.js +55 -0
- package/node_modules/body-parser/lib/read.js +247 -0
- package/node_modules/body-parser/lib/types/json.js +186 -0
- package/node_modules/body-parser/lib/types/raw.js +42 -0
- package/node_modules/body-parser/lib/types/text.js +36 -0
- package/node_modules/body-parser/lib/types/urlencoded.js +138 -0
- package/node_modules/body-parser/lib/utils.js +100 -0
- package/node_modules/body-parser/node_modules/content-type/LICENSE +22 -0
- package/node_modules/body-parser/node_modules/content-type/README.md +69 -0
- package/node_modules/body-parser/node_modules/content-type/dist/index.d.ts +26 -0
- package/node_modules/body-parser/node_modules/content-type/dist/index.js +170 -0
- package/node_modules/body-parser/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/body-parser/node_modules/content-type/package.json +52 -0
- package/node_modules/body-parser/package.json +65 -0
- package/node_modules/braces/LICENSE +21 -0
- package/node_modules/braces/README.md +586 -0
- package/node_modules/braces/index.js +170 -0
- package/node_modules/braces/lib/compile.js +60 -0
- package/node_modules/braces/lib/constants.js +57 -0
- package/node_modules/braces/lib/expand.js +113 -0
- package/node_modules/braces/lib/parse.js +331 -0
- package/node_modules/braces/lib/stringify.js +32 -0
- package/node_modules/braces/lib/utils.js +122 -0
- package/node_modules/braces/package.json +77 -0
- package/node_modules/bytes/History.md +97 -0
- package/node_modules/bytes/LICENSE +23 -0
- package/node_modules/bytes/Readme.md +152 -0
- package/node_modules/bytes/index.js +170 -0
- package/node_modules/bytes/package.json +42 -0
- package/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
- package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
- package/node_modules/call-bind-apply-helpers/LICENSE +21 -0
- package/node_modules/call-bind-apply-helpers/README.md +62 -0
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
- package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
- package/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/node_modules/call-bind-apply-helpers/package.json +85 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
- package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
- package/node_modules/call-bound/.eslintrc +13 -0
- package/node_modules/call-bound/.github/FUNDING.yml +12 -0
- package/node_modules/call-bound/.nycrc +9 -0
- package/node_modules/call-bound/CHANGELOG.md +42 -0
- package/node_modules/call-bound/LICENSE +21 -0
- package/node_modules/call-bound/README.md +53 -0
- package/node_modules/call-bound/index.d.ts +94 -0
- package/node_modules/call-bound/index.js +19 -0
- package/node_modules/call-bound/package.json +99 -0
- package/node_modules/call-bound/test/index.js +61 -0
- package/node_modules/call-bound/tsconfig.json +10 -0
- package/node_modules/clone/.npmignore +4 -0
- package/node_modules/clone/LICENSE +18 -0
- package/node_modules/clone/README.md +194 -0
- package/node_modules/clone/clone.iml +10 -0
- package/node_modules/clone/clone.js +257 -0
- package/node_modules/clone/package.json +56 -0
- package/node_modules/content-disposition/LICENSE +22 -0
- package/node_modules/content-disposition/README.md +141 -0
- package/node_modules/content-disposition/index.js +536 -0
- package/node_modules/content-disposition/package.json +40 -0
- package/node_modules/content-type/HISTORY.md +29 -0
- package/node_modules/content-type/LICENSE +22 -0
- package/node_modules/content-type/README.md +94 -0
- package/node_modules/content-type/index.js +225 -0
- package/node_modules/content-type/package.json +42 -0
- package/node_modules/cookie/LICENSE +24 -0
- package/node_modules/cookie/README.md +317 -0
- package/node_modules/cookie/SECURITY.md +25 -0
- package/node_modules/cookie/index.js +335 -0
- package/node_modules/cookie/package.json +44 -0
- package/node_modules/cookie-signature/History.md +70 -0
- package/node_modules/cookie-signature/LICENSE +22 -0
- package/node_modules/cookie-signature/Readme.md +23 -0
- package/node_modules/cookie-signature/index.js +47 -0
- package/node_modules/cookie-signature/package.json +28 -0
- package/node_modules/core-util-is/LICENSE +19 -0
- package/node_modules/core-util-is/README.md +3 -0
- package/node_modules/core-util-is/float.patch +604 -0
- package/node_modules/core-util-is/lib/util.js +107 -0
- package/node_modules/core-util-is/package.json +32 -0
- package/node_modules/core-util-is/test.js +68 -0
- package/node_modules/debug/LICENSE +20 -0
- package/node_modules/debug/README.md +481 -0
- package/node_modules/debug/package.json +64 -0
- package/node_modules/debug/src/browser.js +272 -0
- package/node_modules/debug/src/common.js +292 -0
- package/node_modules/debug/src/index.js +10 -0
- package/node_modules/debug/src/node.js +263 -0
- package/node_modules/depd/History.md +103 -0
- package/node_modules/depd/LICENSE +22 -0
- package/node_modules/depd/Readme.md +280 -0
- package/node_modules/depd/index.js +538 -0
- package/node_modules/depd/lib/browser/index.js +77 -0
- package/node_modules/depd/package.json +45 -0
- package/node_modules/dotenv/CHANGELOG.md +520 -0
- package/node_modules/dotenv/LICENSE +23 -0
- package/node_modules/dotenv/README-es.md +411 -0
- package/node_modules/dotenv/README.md +645 -0
- package/node_modules/dotenv/SECURITY.md +1 -0
- package/node_modules/dotenv/config.d.ts +1 -0
- package/node_modules/dotenv/config.js +9 -0
- package/node_modules/dotenv/lib/cli-options.js +17 -0
- package/node_modules/dotenv/lib/env-options.js +28 -0
- package/node_modules/dotenv/lib/main.d.ts +162 -0
- package/node_modules/dotenv/lib/main.js +386 -0
- package/node_modules/dotenv/package.json +62 -0
- package/node_modules/dunder-proto/.eslintrc +5 -0
- package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
- package/node_modules/dunder-proto/.nycrc +13 -0
- package/node_modules/dunder-proto/CHANGELOG.md +24 -0
- package/node_modules/dunder-proto/LICENSE +21 -0
- package/node_modules/dunder-proto/README.md +54 -0
- package/node_modules/dunder-proto/get.d.ts +5 -0
- package/node_modules/dunder-proto/get.js +30 -0
- package/node_modules/dunder-proto/package.json +76 -0
- package/node_modules/dunder-proto/set.d.ts +5 -0
- package/node_modules/dunder-proto/set.js +35 -0
- package/node_modules/dunder-proto/test/get.js +34 -0
- package/node_modules/dunder-proto/test/index.js +4 -0
- package/node_modules/dunder-proto/test/set.js +50 -0
- package/node_modules/dunder-proto/tsconfig.json +9 -0
- package/node_modules/ee-first/LICENSE +22 -0
- package/node_modules/ee-first/README.md +80 -0
- package/node_modules/ee-first/index.js +95 -0
- package/node_modules/ee-first/package.json +29 -0
- package/node_modules/encodeurl/LICENSE +22 -0
- package/node_modules/encodeurl/README.md +109 -0
- package/node_modules/encodeurl/index.js +60 -0
- package/node_modules/encodeurl/package.json +40 -0
- package/node_modules/es-define-property/.eslintrc +13 -0
- package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
- package/node_modules/es-define-property/.nycrc +9 -0
- package/node_modules/es-define-property/CHANGELOG.md +29 -0
- package/node_modules/es-define-property/LICENSE +21 -0
- package/node_modules/es-define-property/README.md +49 -0
- package/node_modules/es-define-property/index.d.ts +3 -0
- package/node_modules/es-define-property/index.js +14 -0
- package/node_modules/es-define-property/package.json +81 -0
- package/node_modules/es-define-property/test/index.js +56 -0
- package/node_modules/es-define-property/tsconfig.json +10 -0
- package/node_modules/es-errors/.eslintrc +5 -0
- package/node_modules/es-errors/.github/FUNDING.yml +12 -0
- package/node_modules/es-errors/CHANGELOG.md +40 -0
- package/node_modules/es-errors/LICENSE +21 -0
- package/node_modules/es-errors/README.md +55 -0
- package/node_modules/es-errors/eval.d.ts +3 -0
- package/node_modules/es-errors/eval.js +4 -0
- package/node_modules/es-errors/index.d.ts +3 -0
- package/node_modules/es-errors/index.js +4 -0
- package/node_modules/es-errors/package.json +80 -0
- package/node_modules/es-errors/range.d.ts +3 -0
- package/node_modules/es-errors/range.js +4 -0
- package/node_modules/es-errors/ref.d.ts +3 -0
- package/node_modules/es-errors/ref.js +4 -0
- package/node_modules/es-errors/syntax.d.ts +3 -0
- package/node_modules/es-errors/syntax.js +4 -0
- package/node_modules/es-errors/test/index.js +19 -0
- package/node_modules/es-errors/tsconfig.json +49 -0
- package/node_modules/es-errors/type.d.ts +3 -0
- package/node_modules/es-errors/type.js +4 -0
- package/node_modules/es-errors/uri.d.ts +3 -0
- package/node_modules/es-errors/uri.js +4 -0
- package/node_modules/es-object-atoms/.eslintrc +16 -0
- package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
- package/node_modules/es-object-atoms/CHANGELOG.md +44 -0
- package/node_modules/es-object-atoms/LICENSE +21 -0
- package/node_modules/es-object-atoms/README.md +63 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
- package/node_modules/es-object-atoms/ToObject.js +10 -0
- package/node_modules/es-object-atoms/index.d.ts +3 -0
- package/node_modules/es-object-atoms/index.js +4 -0
- package/node_modules/es-object-atoms/isObject.d.ts +3 -0
- package/node_modules/es-object-atoms/isObject.js +6 -0
- package/node_modules/es-object-atoms/package.json +79 -0
- package/node_modules/es-object-atoms/test/index.js +38 -0
- package/node_modules/es-object-atoms/tsconfig.json +7 -0
- package/node_modules/escape-html/LICENSE +24 -0
- package/node_modules/escape-html/Readme.md +43 -0
- package/node_modules/escape-html/index.js +78 -0
- package/node_modules/escape-html/package.json +24 -0
- package/node_modules/etag/HISTORY.md +83 -0
- package/node_modules/etag/LICENSE +22 -0
- package/node_modules/etag/README.md +159 -0
- package/node_modules/etag/index.js +131 -0
- package/node_modules/etag/package.json +47 -0
- package/node_modules/express/LICENSE +24 -0
- package/node_modules/express/Readme.md +276 -0
- package/node_modules/express/index.js +11 -0
- package/node_modules/express/lib/application.js +631 -0
- package/node_modules/express/lib/express.js +81 -0
- package/node_modules/express/lib/request.js +514 -0
- package/node_modules/express/lib/response.js +1053 -0
- package/node_modules/express/lib/utils.js +271 -0
- package/node_modules/express/lib/view.js +205 -0
- package/node_modules/express/package.json +99 -0
- package/node_modules/extsprintf/.gitmodules +3 -0
- package/node_modules/extsprintf/CHANGES.md +10 -0
- package/node_modules/extsprintf/CONTRIBUTING.md +17 -0
- package/node_modules/extsprintf/LICENSE +19 -0
- package/node_modules/extsprintf/Makefile +30 -0
- package/node_modules/extsprintf/Makefile.targ +285 -0
- package/node_modules/extsprintf/README.md +46 -0
- package/node_modules/extsprintf/jsl.node.conf +137 -0
- package/node_modules/extsprintf/lib/extsprintf.js +225 -0
- package/node_modules/extsprintf/package.json +14 -0
- package/node_modules/extsprintf/test/tst.basic.js +118 -0
- package/node_modules/extsprintf/test/tst.invalid.js +78 -0
- package/node_modules/fill-range/LICENSE +21 -0
- package/node_modules/fill-range/README.md +237 -0
- package/node_modules/fill-range/index.js +248 -0
- package/node_modules/fill-range/package.json +74 -0
- package/node_modules/finalhandler/HISTORY.md +239 -0
- package/node_modules/finalhandler/LICENSE +22 -0
- package/node_modules/finalhandler/README.md +150 -0
- package/node_modules/finalhandler/index.js +293 -0
- package/node_modules/finalhandler/package.json +47 -0
- package/node_modules/forwarded/HISTORY.md +21 -0
- package/node_modules/forwarded/LICENSE +22 -0
- package/node_modules/forwarded/README.md +57 -0
- package/node_modules/forwarded/index.js +90 -0
- package/node_modules/forwarded/package.json +45 -0
- package/node_modules/fresh/HISTORY.md +80 -0
- package/node_modules/fresh/LICENSE +23 -0
- package/node_modules/fresh/README.md +117 -0
- package/node_modules/fresh/index.js +136 -0
- package/node_modules/fresh/package.json +46 -0
- package/node_modules/function-bind/.eslintrc +21 -0
- package/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/node_modules/function-bind/.nycrc +13 -0
- package/node_modules/function-bind/CHANGELOG.md +136 -0
- package/node_modules/function-bind/LICENSE +20 -0
- package/node_modules/function-bind/README.md +46 -0
- package/node_modules/function-bind/implementation.js +84 -0
- package/node_modules/function-bind/index.js +5 -0
- package/node_modules/function-bind/package.json +87 -0
- package/node_modules/function-bind/test/.eslintrc +9 -0
- package/node_modules/function-bind/test/index.js +252 -0
- package/node_modules/get-intrinsic/.eslintrc +42 -0
- package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/node_modules/get-intrinsic/.nycrc +9 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +186 -0
- package/node_modules/get-intrinsic/LICENSE +21 -0
- package/node_modules/get-intrinsic/README.md +71 -0
- package/node_modules/get-intrinsic/index.js +378 -0
- package/node_modules/get-intrinsic/package.json +97 -0
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
- package/node_modules/get-proto/.eslintrc +10 -0
- package/node_modules/get-proto/.github/FUNDING.yml +12 -0
- package/node_modules/get-proto/.nycrc +9 -0
- package/node_modules/get-proto/CHANGELOG.md +21 -0
- package/node_modules/get-proto/LICENSE +21 -0
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
- package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/node_modules/get-proto/README.md +50 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/node_modules/get-proto/index.d.ts +5 -0
- package/node_modules/get-proto/index.js +27 -0
- package/node_modules/get-proto/package.json +81 -0
- package/node_modules/get-proto/test/index.js +68 -0
- package/node_modules/get-proto/tsconfig.json +9 -0
- package/node_modules/gopd/.eslintrc +16 -0
- package/node_modules/gopd/.github/FUNDING.yml +12 -0
- package/node_modules/gopd/CHANGELOG.md +45 -0
- package/node_modules/gopd/LICENSE +21 -0
- package/node_modules/gopd/README.md +40 -0
- package/node_modules/gopd/gOPD.d.ts +1 -0
- package/node_modules/gopd/gOPD.js +4 -0
- package/node_modules/gopd/index.d.ts +5 -0
- package/node_modules/gopd/index.js +15 -0
- package/node_modules/gopd/package.json +77 -0
- package/node_modules/gopd/test/index.js +36 -0
- package/node_modules/gopd/tsconfig.json +9 -0
- package/node_modules/handlebars/LICENSE +19 -0
- package/node_modules/handlebars/README.markdown +167 -0
- package/node_modules/handlebars/bin/.eslintrc.js +6 -0
- package/node_modules/handlebars/bin/handlebars +176 -0
- package/node_modules/handlebars/dist/amd/handlebars/base.js +106 -0
- package/node_modules/handlebars/dist/amd/handlebars/compiler/ast.js +31 -0
- package/node_modules/handlebars/dist/amd/handlebars/compiler/base.js +102 -0
- package/node_modules/handlebars/dist/amd/handlebars/compiler/code-gen.js +165 -0
- package/node_modules/handlebars/dist/amd/handlebars/compiler/compiler.js +562 -0
- package/node_modules/handlebars/dist/amd/handlebars/compiler/helpers.js +228 -0
- package/node_modules/handlebars/dist/amd/handlebars/compiler/javascript-compiler.js +1158 -0
- package/node_modules/handlebars/dist/amd/handlebars/compiler/parser.js +737 -0
- package/node_modules/handlebars/dist/amd/handlebars/compiler/printer.js +186 -0
- package/node_modules/handlebars/dist/amd/handlebars/compiler/visitor.js +138 -0
- package/node_modules/handlebars/dist/amd/handlebars/compiler/whitespace-control.js +219 -0
- package/node_modules/handlebars/dist/amd/handlebars/decorators/inline.js +25 -0
- package/node_modules/handlebars/dist/amd/handlebars/decorators.js +16 -0
- package/node_modules/handlebars/dist/amd/handlebars/exception.js +64 -0
- package/node_modules/handlebars/dist/amd/handlebars/helpers/block-helper-missing.js +35 -0
- package/node_modules/handlebars/dist/amd/handlebars/helpers/each.js +99 -0
- package/node_modules/handlebars/dist/amd/handlebars/helpers/helper-missing.js +22 -0
- package/node_modules/handlebars/dist/amd/handlebars/helpers/if.js +41 -0
- package/node_modules/handlebars/dist/amd/handlebars/helpers/log.js +24 -0
- package/node_modules/handlebars/dist/amd/handlebars/helpers/lookup.js +14 -0
- package/node_modules/handlebars/dist/amd/handlebars/helpers/with.js +38 -0
- package/node_modules/handlebars/dist/amd/handlebars/helpers.js +45 -0
- package/node_modules/handlebars/dist/amd/handlebars/internal/proto-access.js +76 -0
- package/node_modules/handlebars/dist/amd/handlebars/internal/wrapHelper.js +21 -0
- package/node_modules/handlebars/dist/amd/handlebars/logger.js +44 -0
- package/node_modules/handlebars/dist/amd/handlebars/no-conflict.js +28 -0
- package/node_modules/handlebars/dist/amd/handlebars/runtime.js +363 -0
- package/node_modules/handlebars/dist/amd/handlebars/safe-string.js +15 -0
- package/node_modules/handlebars/dist/amd/handlebars/utils.js +126 -0
- package/node_modules/handlebars/dist/amd/handlebars.js +52 -0
- package/node_modules/handlebars/dist/amd/handlebars.runtime.js +44 -0
- package/node_modules/handlebars/dist/amd/precompiler.js +345 -0
- package/node_modules/handlebars/dist/cjs/handlebars/base.js +116 -0
- package/node_modules/handlebars/dist/cjs/handlebars/compiler/ast.js +31 -0
- package/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js +116 -0
- package/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js +168 -0
- package/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js +566 -0
- package/node_modules/handlebars/dist/cjs/handlebars/compiler/helpers.js +228 -0
- package/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js +1166 -0
- package/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js +737 -0
- package/node_modules/handlebars/dist/cjs/handlebars/compiler/printer.js +186 -0
- package/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js +140 -0
- package/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js +221 -0
- package/node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js +29 -0
- package/node_modules/handlebars/dist/cjs/handlebars/decorators.js +16 -0
- package/node_modules/handlebars/dist/cjs/handlebars/exception.js +64 -0
- package/node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js +39 -0
- package/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js +104 -0
- package/node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js +25 -0
- package/node_modules/handlebars/dist/cjs/handlebars/helpers/if.js +46 -0
- package/node_modules/handlebars/dist/cjs/handlebars/helpers/log.js +26 -0
- package/node_modules/handlebars/dist/cjs/handlebars/helpers/lookup.js +16 -0
- package/node_modules/handlebars/dist/cjs/handlebars/helpers/with.js +43 -0
- package/node_modules/handlebars/dist/cjs/handlebars/helpers.js +57 -0
- package/node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js +78 -0
- package/node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js +19 -0
- package/node_modules/handlebars/dist/cjs/handlebars/logger.js +47 -0
- package/node_modules/handlebars/dist/cjs/handlebars/no-conflict.js +30 -0
- package/node_modules/handlebars/dist/cjs/handlebars/runtime.js +379 -0
- package/node_modules/handlebars/dist/cjs/handlebars/safe-string.js +15 -0
- package/node_modules/handlebars/dist/cjs/handlebars/utils.js +124 -0
- package/node_modules/handlebars/dist/cjs/handlebars.js +66 -0
- package/node_modules/handlebars/dist/cjs/handlebars.runtime.js +66 -0
- package/node_modules/handlebars/dist/cjs/precompiler.js +359 -0
- package/node_modules/handlebars/dist/handlebars.amd.js +4694 -0
- package/node_modules/handlebars/dist/handlebars.amd.min.js +29 -0
- package/node_modules/handlebars/dist/handlebars.js +6026 -0
- package/node_modules/handlebars/dist/handlebars.min.js +29 -0
- package/node_modules/handlebars/dist/handlebars.runtime.amd.js +1292 -0
- package/node_modules/handlebars/dist/handlebars.runtime.amd.min.js +27 -0
- package/node_modules/handlebars/dist/handlebars.runtime.js +2548 -0
- package/node_modules/handlebars/dist/handlebars.runtime.min.js +27 -0
- package/node_modules/handlebars/lib/.eslintrc.js +8 -0
- package/node_modules/handlebars/lib/handlebars/base.js +94 -0
- package/node_modules/handlebars/lib/handlebars/compiler/ast.js +32 -0
- package/node_modules/handlebars/lib/handlebars/compiler/base.js +101 -0
- package/node_modules/handlebars/lib/handlebars/compiler/code-gen.js +171 -0
- package/node_modules/handlebars/lib/handlebars/compiler/compiler.js +594 -0
- package/node_modules/handlebars/lib/handlebars/compiler/helpers.js +219 -0
- package/node_modules/handlebars/lib/handlebars/compiler/javascript-compiler.js +1306 -0
- package/node_modules/handlebars/lib/handlebars/compiler/parser.js +622 -0
- package/node_modules/handlebars/lib/handlebars/compiler/printer.js +178 -0
- package/node_modules/handlebars/lib/handlebars/compiler/visitor.js +136 -0
- package/node_modules/handlebars/lib/handlebars/compiler/whitespace-control.js +234 -0
- package/node_modules/handlebars/lib/handlebars/decorators/inline.js +22 -0
- package/node_modules/handlebars/lib/handlebars/decorators.js +5 -0
- package/node_modules/handlebars/lib/handlebars/exception.js +68 -0
- package/node_modules/handlebars/lib/handlebars/helpers/block-helper-missing.js +35 -0
- package/node_modules/handlebars/lib/handlebars/helpers/each.js +101 -0
- package/node_modules/handlebars/lib/handlebars/helpers/helper-missing.js +15 -0
- package/node_modules/handlebars/lib/handlebars/helpers/if.js +33 -0
- package/node_modules/handlebars/lib/handlebars/helpers/log.js +19 -0
- package/node_modules/handlebars/lib/handlebars/helpers/lookup.js +9 -0
- package/node_modules/handlebars/lib/handlebars/helpers/with.js +39 -0
- package/node_modules/handlebars/lib/handlebars/helpers.js +27 -0
- package/node_modules/handlebars/lib/handlebars/internal/proto-access.js +69 -0
- package/node_modules/handlebars/lib/handlebars/internal/wrapHelper.js +13 -0
- package/node_modules/handlebars/lib/handlebars/logger.js +39 -0
- package/node_modules/handlebars/lib/handlebars/no-conflict.js +23 -0
- package/node_modules/handlebars/lib/handlebars/runtime.js +452 -0
- package/node_modules/handlebars/lib/handlebars/safe-string.js +10 -0
- package/node_modules/handlebars/lib/handlebars/utils.js +116 -0
- package/node_modules/handlebars/lib/handlebars.js +46 -0
- package/node_modules/handlebars/lib/handlebars.runtime.js +37 -0
- package/node_modules/handlebars/lib/index.js +26 -0
- package/node_modules/handlebars/lib/precompiler.js +378 -0
- package/node_modules/handlebars/package.json +134 -0
- package/node_modules/handlebars/release-notes.md +1112 -0
- package/node_modules/handlebars/runtime.d.ts +5 -0
- package/node_modules/handlebars/runtime.js +3 -0
- package/node_modules/handlebars/types/index.d.ts +422 -0
- package/node_modules/has-symbols/.eslintrc +11 -0
- package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/node_modules/has-symbols/.nycrc +9 -0
- package/node_modules/has-symbols/CHANGELOG.md +91 -0
- package/node_modules/has-symbols/LICENSE +21 -0
- package/node_modules/has-symbols/README.md +46 -0
- package/node_modules/has-symbols/index.d.ts +3 -0
- package/node_modules/has-symbols/index.js +14 -0
- package/node_modules/has-symbols/package.json +111 -0
- package/node_modules/has-symbols/shams.d.ts +3 -0
- package/node_modules/has-symbols/shams.js +45 -0
- package/node_modules/has-symbols/test/index.js +22 -0
- package/node_modules/has-symbols/test/shams/core-js.js +29 -0
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
- package/node_modules/has-symbols/test/tests.js +58 -0
- package/node_modules/has-symbols/tsconfig.json +10 -0
- package/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/node_modules/hasown/.nycrc +13 -0
- package/node_modules/hasown/CHANGELOG.md +58 -0
- package/node_modules/hasown/LICENSE +21 -0
- package/node_modules/hasown/README.md +40 -0
- package/node_modules/hasown/eslint.config.mjs +6 -0
- package/node_modules/hasown/index.d.ts +3 -0
- package/node_modules/hasown/index.js +8 -0
- package/node_modules/hasown/package.json +91 -0
- package/node_modules/hasown/tsconfig.json +6 -0
- package/node_modules/hdb/.claude/skills/hdb-commit-msg/SKILL.md +132 -0
- package/node_modules/hdb/.hyperspace/pull_request_bot.json +26 -0
- package/node_modules/hdb/.jshintrc +41 -0
- package/node_modules/hdb/.pipeline/config.yml +21 -0
- package/node_modules/hdb/.reuse/dep5 +28 -0
- package/node_modules/hdb/CLAUDE.md +41 -0
- package/node_modules/hdb/LICENSE +202 -0
- package/node_modules/hdb/LICENSES/Apache-2.0.txt +73 -0
- package/node_modules/hdb/Makefile +41 -0
- package/node_modules/hdb/README.md +778 -0
- package/node_modules/hdb/cfg/VERSION +1 -0
- package/node_modules/hdb/cfg/xmake.cfg +7 -0
- package/node_modules/hdb/chrome/sockets/tcp.js +28 -0
- package/node_modules/hdb/index.js +21 -0
- package/node_modules/hdb/lib/Client.js +327 -0
- package/node_modules/hdb/lib/index.js +37 -0
- package/node_modules/hdb/lib/protocol/ClientInfo.js +77 -0
- package/node_modules/hdb/lib/protocol/Compressor.js +122 -0
- package/node_modules/hdb/lib/protocol/Connection.js +707 -0
- package/node_modules/hdb/lib/protocol/ConnectionManager.js +124 -0
- package/node_modules/hdb/lib/protocol/ConnectionTopology.js +303 -0
- package/node_modules/hdb/lib/protocol/ExecuteTask.js +266 -0
- package/node_modules/hdb/lib/protocol/Lob.js +168 -0
- package/node_modules/hdb/lib/protocol/MessageBuffer.js +74 -0
- package/node_modules/hdb/lib/protocol/Parser.js +258 -0
- package/node_modules/hdb/lib/protocol/PhysicalConnection.js +442 -0
- package/node_modules/hdb/lib/protocol/Proxy.js +373 -0
- package/node_modules/hdb/lib/protocol/Reader.js +470 -0
- package/node_modules/hdb/lib/protocol/Result.js +287 -0
- package/node_modules/hdb/lib/protocol/ResultSet.js +490 -0
- package/node_modules/hdb/lib/protocol/ResultSetTransform.js +126 -0
- package/node_modules/hdb/lib/protocol/Statement.js +219 -0
- package/node_modules/hdb/lib/protocol/Stringifier.js +82 -0
- package/node_modules/hdb/lib/protocol/Transaction.js +64 -0
- package/node_modules/hdb/lib/protocol/Writer.js +1205 -0
- package/node_modules/hdb/lib/protocol/auth/JWT.js +40 -0
- package/node_modules/hdb/lib/protocol/auth/LDAP.js +133 -0
- package/node_modules/hdb/lib/protocol/auth/Manager.js +162 -0
- package/node_modules/hdb/lib/protocol/auth/SAML.js +40 -0
- package/node_modules/hdb/lib/protocol/auth/SCRAMSHA256.js +175 -0
- package/node_modules/hdb/lib/protocol/auth/SessionCookie.js +43 -0
- package/node_modules/hdb/lib/protocol/auth/X509.js +211 -0
- package/node_modules/hdb/lib/protocol/auth/index.js +20 -0
- package/node_modules/hdb/lib/protocol/common/ClientContextOption.js +20 -0
- package/node_modules/hdb/lib/protocol/common/ClientDistributionMode.js +21 -0
- package/node_modules/hdb/lib/protocol/common/CommandOption.js +21 -0
- package/node_modules/hdb/lib/protocol/common/CommitOption.js +18 -0
- package/node_modules/hdb/lib/protocol/common/ConnectOption.js +43 -0
- package/node_modules/hdb/lib/protocol/common/ConnectOptionType.js +45 -0
- package/node_modules/hdb/lib/protocol/common/Constants.js +32 -0
- package/node_modules/hdb/lib/protocol/common/DataFormatVersion.js +29 -0
- package/node_modules/hdb/lib/protocol/common/DbConnectInfoOption.js +21 -0
- package/node_modules/hdb/lib/protocol/common/DistributionProtocolVersion.js +19 -0
- package/node_modules/hdb/lib/protocol/common/ErrorLevel.js +20 -0
- package/node_modules/hdb/lib/protocol/common/FunctionCode.js +41 -0
- package/node_modules/hdb/lib/protocol/common/IoType.js +20 -0
- package/node_modules/hdb/lib/protocol/common/LobOptions.js +20 -0
- package/node_modules/hdb/lib/protocol/common/LobSourceType.js +21 -0
- package/node_modules/hdb/lib/protocol/common/MessageType.js +41 -0
- package/node_modules/hdb/lib/protocol/common/NormalizedTypeCode.js +83 -0
- package/node_modules/hdb/lib/protocol/common/ParameterMode.js +23 -0
- package/node_modules/hdb/lib/protocol/common/PartAttributes.js +23 -0
- package/node_modules/hdb/lib/protocol/common/PartKind.js +70 -0
- package/node_modules/hdb/lib/protocol/common/ProxyConstants.js +129 -0
- package/node_modules/hdb/lib/protocol/common/ReadFunction.js +85 -0
- package/node_modules/hdb/lib/protocol/common/RedirectType.js +21 -0
- package/node_modules/hdb/lib/protocol/common/SegmentKind.js +21 -0
- package/node_modules/hdb/lib/protocol/common/SessionContext.js +23 -0
- package/node_modules/hdb/lib/protocol/common/StatementContext.js +19 -0
- package/node_modules/hdb/lib/protocol/common/StatementContextType.js +21 -0
- package/node_modules/hdb/lib/protocol/common/TopologyInformation.js +31 -0
- package/node_modules/hdb/lib/protocol/common/TransactionFlag.js +24 -0
- package/node_modules/hdb/lib/protocol/common/TransactionFlagType.js +26 -0
- package/node_modules/hdb/lib/protocol/common/TypeCode.js +93 -0
- package/node_modules/hdb/lib/protocol/common/index.js +70 -0
- package/node_modules/hdb/lib/protocol/data/Binary.js +42 -0
- package/node_modules/hdb/lib/protocol/data/Default.js +42 -0
- package/node_modules/hdb/lib/protocol/data/Fields.js +139 -0
- package/node_modules/hdb/lib/protocol/data/Int32.js +55 -0
- package/node_modules/hdb/lib/protocol/data/MultilineOptions.js +74 -0
- package/node_modules/hdb/lib/protocol/data/Options.js +188 -0
- package/node_modules/hdb/lib/protocol/data/ParameterMetadata.js +76 -0
- package/node_modules/hdb/lib/protocol/data/Parameters.js +52 -0
- package/node_modules/hdb/lib/protocol/data/ReadLobReply.js +72 -0
- package/node_modules/hdb/lib/protocol/data/ReadLobRequest.js +69 -0
- package/node_modules/hdb/lib/protocol/data/ResultSetMetadata.js +101 -0
- package/node_modules/hdb/lib/protocol/data/SqlError.js +70 -0
- package/node_modules/hdb/lib/protocol/data/Text.js +44 -0
- package/node_modules/hdb/lib/protocol/data/Text20.js +44 -0
- package/node_modules/hdb/lib/protocol/data/TextList.js +82 -0
- package/node_modules/hdb/lib/protocol/data/TransactionFlags.js +26 -0
- package/node_modules/hdb/lib/protocol/data/WriteLobReply.js +32 -0
- package/node_modules/hdb/lib/protocol/data/index.js +76 -0
- package/node_modules/hdb/lib/protocol/index.js +38 -0
- package/node_modules/hdb/lib/protocol/part/AbstractOptions.js +55 -0
- package/node_modules/hdb/lib/protocol/part/ClientContextOptions.js +46 -0
- package/node_modules/hdb/lib/protocol/part/ConnectOptions.js +155 -0
- package/node_modules/hdb/lib/protocol/part/DbConnectInfoOptions.js +41 -0
- package/node_modules/hdb/lib/protocol/part/StatementContext.js +52 -0
- package/node_modules/hdb/lib/protocol/part/index.js +19 -0
- package/node_modules/hdb/lib/protocol/reply/Part.js +126 -0
- package/node_modules/hdb/lib/protocol/reply/Segment.js +204 -0
- package/node_modules/hdb/lib/protocol/reply/index.js +17 -0
- package/node_modules/hdb/lib/protocol/request/Part.js +52 -0
- package/node_modules/hdb/lib/protocol/request/Segment.js +120 -0
- package/node_modules/hdb/lib/protocol/request/index.js +209 -0
- package/node_modules/hdb/lib/protocol/tcp.js +186 -0
- package/node_modules/hdb/lib/util/Network.js +230 -0
- package/node_modules/hdb/lib/util/Queue.js +124 -0
- package/node_modules/hdb/lib/util/bignum.js +844 -0
- package/node_modules/hdb/lib/util/calendar.js +121 -0
- package/node_modules/hdb/lib/util/convert.js +36 -0
- package/node_modules/hdb/lib/util/index.js +314 -0
- package/node_modules/hdb/lib/util/zeropad.js +110 -0
- package/node_modules/hdb/node_modules/iconv-lite/Changelog.md +236 -0
- package/node_modules/hdb/node_modules/iconv-lite/LICENSE +21 -0
- package/node_modules/hdb/node_modules/iconv-lite/README.md +138 -0
- package/node_modules/hdb/node_modules/iconv-lite/encodings/dbcs-codec.js +532 -0
- package/node_modules/hdb/node_modules/iconv-lite/encodings/dbcs-data.js +185 -0
- package/node_modules/hdb/node_modules/iconv-lite/encodings/index.js +23 -0
- package/node_modules/hdb/node_modules/iconv-lite/encodings/internal.js +218 -0
- package/node_modules/hdb/node_modules/iconv-lite/encodings/sbcs-codec.js +75 -0
- package/node_modules/hdb/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/node_modules/hdb/node_modules/iconv-lite/encodings/sbcs-data.js +178 -0
- package/node_modules/hdb/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/node_modules/hdb/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/node_modules/hdb/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/node_modules/hdb/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/node_modules/hdb/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/node_modules/hdb/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/node_modules/hdb/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
- package/node_modules/hdb/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/node_modules/hdb/node_modules/iconv-lite/encodings/utf16.js +187 -0
- package/node_modules/hdb/node_modules/iconv-lite/encodings/utf32.js +307 -0
- package/node_modules/hdb/node_modules/iconv-lite/encodings/utf7.js +283 -0
- package/node_modules/hdb/node_modules/iconv-lite/lib/bom-handling.js +48 -0
- package/node_modules/hdb/node_modules/iconv-lite/lib/helpers/merge-exports.js +13 -0
- package/node_modules/hdb/node_modules/iconv-lite/lib/index.d.ts +41 -0
- package/node_modules/hdb/node_modules/iconv-lite/lib/index.js +183 -0
- package/node_modules/hdb/node_modules/iconv-lite/lib/streams.js +105 -0
- package/node_modules/hdb/node_modules/iconv-lite/package.json +59 -0
- package/node_modules/hdb/package.json +58 -0
- package/node_modules/http-errors/HISTORY.md +186 -0
- package/node_modules/http-errors/LICENSE +23 -0
- package/node_modules/http-errors/README.md +169 -0
- package/node_modules/http-errors/index.js +290 -0
- package/node_modules/http-errors/package.json +54 -0
- package/node_modules/iconv-lite/LICENSE +21 -0
- package/node_modules/iconv-lite/README.md +138 -0
- package/node_modules/iconv-lite/encodings/dbcs-codec.js +532 -0
- package/node_modules/iconv-lite/encodings/dbcs-data.js +185 -0
- package/node_modules/iconv-lite/encodings/index.js +23 -0
- package/node_modules/iconv-lite/encodings/internal.js +218 -0
- package/node_modules/iconv-lite/encodings/sbcs-codec.js +75 -0
- package/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/node_modules/iconv-lite/encodings/sbcs-data.js +178 -0
- package/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
- package/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/node_modules/iconv-lite/encodings/utf16.js +187 -0
- package/node_modules/iconv-lite/encodings/utf32.js +307 -0
- package/node_modules/iconv-lite/encodings/utf7.js +283 -0
- package/node_modules/iconv-lite/lib/bom-handling.js +48 -0
- package/node_modules/iconv-lite/lib/helpers/merge-exports.js +13 -0
- package/node_modules/iconv-lite/lib/index.d.ts +129 -0
- package/node_modules/iconv-lite/lib/index.js +182 -0
- package/node_modules/iconv-lite/lib/streams.js +105 -0
- package/node_modules/iconv-lite/package.json +70 -0
- package/node_modules/iconv-lite/types/encodings.d.ts +423 -0
- package/node_modules/inherits/LICENSE +16 -0
- package/node_modules/inherits/README.md +42 -0
- package/node_modules/inherits/inherits.js +9 -0
- package/node_modules/inherits/inherits_browser.js +27 -0
- package/node_modules/inherits/package.json +29 -0
- package/node_modules/ipaddr.js/LICENSE +19 -0
- package/node_modules/ipaddr.js/README.md +233 -0
- package/node_modules/ipaddr.js/ipaddr.min.js +1 -0
- package/node_modules/ipaddr.js/lib/ipaddr.js +673 -0
- package/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +68 -0
- package/node_modules/ipaddr.js/package.json +35 -0
- package/node_modules/is-number/LICENSE +21 -0
- package/node_modules/is-number/README.md +187 -0
- package/node_modules/is-number/index.js +18 -0
- package/node_modules/is-number/package.json +82 -0
- package/node_modules/is-promise/LICENSE +19 -0
- package/node_modules/is-promise/index.d.ts +2 -0
- package/node_modules/is-promise/index.js +6 -0
- package/node_modules/is-promise/index.mjs +3 -0
- package/node_modules/is-promise/package.json +30 -0
- package/node_modules/is-promise/readme.md +33 -0
- package/node_modules/livereload-js/.github/workflows/main.yml +23 -0
- package/node_modules/livereload-js/LICENSE +20 -0
- package/node_modules/livereload-js/README.md +250 -0
- package/node_modules/livereload-js/dist/livereload.js +3795 -0
- package/node_modules/livereload-js/dist/livereload.min.js +1 -0
- package/node_modules/livereload-js/package.json +53 -0
- package/node_modules/livereload-js/src/connector.js +169 -0
- package/node_modules/livereload-js/src/customevents.js +37 -0
- package/node_modules/livereload-js/src/less.js +60 -0
- package/node_modules/livereload-js/src/livereload.js +245 -0
- package/node_modules/livereload-js/src/options.js +96 -0
- package/node_modules/livereload-js/src/protocol.js +98 -0
- package/node_modules/livereload-js/src/reloader.js +611 -0
- package/node_modules/livereload-js/src/startup.js +16 -0
- package/node_modules/livereload-js/src/timer.js +35 -0
- package/node_modules/lz4-wasm-nodejs/LICENSE_APACHE +176 -0
- package/node_modules/lz4-wasm-nodejs/LICENSE_MIT +25 -0
- package/node_modules/lz4-wasm-nodejs/README.md +71 -0
- package/node_modules/lz4-wasm-nodejs/lz4_wasm_nodejs.d.ts +12 -0
- package/node_modules/lz4-wasm-nodejs/lz4_wasm_nodejs.js +127 -0
- package/node_modules/lz4-wasm-nodejs/lz4_wasm_nodejs_bg.wasm +0 -0
- package/node_modules/lz4-wasm-nodejs/package.json +26 -0
- package/node_modules/math-intrinsics/.eslintrc +16 -0
- package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
- package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
- package/node_modules/math-intrinsics/LICENSE +21 -0
- package/node_modules/math-intrinsics/README.md +50 -0
- package/node_modules/math-intrinsics/abs.d.ts +1 -0
- package/node_modules/math-intrinsics/abs.js +4 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
- package/node_modules/math-intrinsics/floor.d.ts +1 -0
- package/node_modules/math-intrinsics/floor.js +4 -0
- package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
- package/node_modules/math-intrinsics/isFinite.js +12 -0
- package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/isInteger.js +16 -0
- package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
- package/node_modules/math-intrinsics/isNaN.js +6 -0
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
- package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
- package/node_modules/math-intrinsics/max.d.ts +1 -0
- package/node_modules/math-intrinsics/max.js +4 -0
- package/node_modules/math-intrinsics/min.d.ts +1 -0
- package/node_modules/math-intrinsics/min.js +4 -0
- package/node_modules/math-intrinsics/mod.d.ts +3 -0
- package/node_modules/math-intrinsics/mod.js +9 -0
- package/node_modules/math-intrinsics/package.json +86 -0
- package/node_modules/math-intrinsics/pow.d.ts +1 -0
- package/node_modules/math-intrinsics/pow.js +4 -0
- package/node_modules/math-intrinsics/round.d.ts +1 -0
- package/node_modules/math-intrinsics/round.js +4 -0
- package/node_modules/math-intrinsics/sign.d.ts +3 -0
- package/node_modules/math-intrinsics/sign.js +11 -0
- package/node_modules/math-intrinsics/test/index.js +192 -0
- package/node_modules/math-intrinsics/tsconfig.json +3 -0
- package/node_modules/media-typer/HISTORY.md +50 -0
- package/node_modules/media-typer/LICENSE +22 -0
- package/node_modules/media-typer/README.md +93 -0
- package/node_modules/media-typer/index.js +143 -0
- package/node_modules/media-typer/package.json +33 -0
- package/node_modules/merge-descriptors/index.d.ts +11 -0
- package/node_modules/merge-descriptors/index.js +26 -0
- package/node_modules/merge-descriptors/license +11 -0
- package/node_modules/merge-descriptors/package.json +50 -0
- package/node_modules/merge-descriptors/readme.md +55 -0
- package/node_modules/micromatch/LICENSE +21 -0
- package/node_modules/micromatch/README.md +1024 -0
- package/node_modules/micromatch/index.js +474 -0
- package/node_modules/micromatch/node_modules/picomatch/LICENSE +21 -0
- package/node_modules/micromatch/node_modules/picomatch/README.md +716 -0
- package/node_modules/micromatch/node_modules/picomatch/index.js +3 -0
- package/node_modules/micromatch/node_modules/picomatch/lib/constants.js +184 -0
- package/node_modules/micromatch/node_modules/picomatch/lib/parse.js +1392 -0
- package/node_modules/micromatch/node_modules/picomatch/lib/picomatch.js +342 -0
- package/node_modules/micromatch/node_modules/picomatch/lib/scan.js +391 -0
- package/node_modules/micromatch/node_modules/picomatch/lib/utils.js +64 -0
- package/node_modules/micromatch/node_modules/picomatch/package.json +81 -0
- package/node_modules/micromatch/package.json +119 -0
- package/node_modules/mime-db/HISTORY.md +541 -0
- package/node_modules/mime-db/LICENSE +23 -0
- package/node_modules/mime-db/README.md +109 -0
- package/node_modules/mime-db/db.json +9342 -0
- package/node_modules/mime-db/index.js +12 -0
- package/node_modules/mime-db/package.json +56 -0
- package/node_modules/mime-types/HISTORY.md +428 -0
- package/node_modules/mime-types/LICENSE +23 -0
- package/node_modules/mime-types/README.md +126 -0
- package/node_modules/mime-types/index.js +211 -0
- package/node_modules/mime-types/mimeScore.js +57 -0
- package/node_modules/mime-types/package.json +49 -0
- package/node_modules/minimist/.eslintrc +29 -0
- package/node_modules/minimist/.github/FUNDING.yml +12 -0
- package/node_modules/minimist/.nycrc +14 -0
- package/node_modules/minimist/CHANGELOG.md +298 -0
- package/node_modules/minimist/LICENSE +18 -0
- package/node_modules/minimist/README.md +121 -0
- package/node_modules/minimist/example/parse.js +4 -0
- package/node_modules/minimist/index.js +263 -0
- package/node_modules/minimist/package.json +75 -0
- package/node_modules/minimist/test/all_bool.js +34 -0
- package/node_modules/minimist/test/bool.js +177 -0
- package/node_modules/minimist/test/dash.js +43 -0
- package/node_modules/minimist/test/default_bool.js +37 -0
- package/node_modules/minimist/test/dotted.js +24 -0
- package/node_modules/minimist/test/kv_short.js +32 -0
- package/node_modules/minimist/test/long.js +33 -0
- package/node_modules/minimist/test/num.js +38 -0
- package/node_modules/minimist/test/parse.js +209 -0
- package/node_modules/minimist/test/parse_modified.js +11 -0
- package/node_modules/minimist/test/proto.js +64 -0
- package/node_modules/minimist/test/short.js +69 -0
- package/node_modules/minimist/test/stop_early.js +17 -0
- package/node_modules/minimist/test/unknown.js +104 -0
- package/node_modules/minimist/test/whitespace.js +10 -0
- package/node_modules/ms/index.js +162 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +38 -0
- package/node_modules/ms/readme.md +59 -0
- package/node_modules/mustache/CHANGELOG.md +618 -0
- package/node_modules/mustache/LICENSE +11 -0
- package/node_modules/mustache/README.md +621 -0
- package/node_modules/mustache/bin/mustache +150 -0
- package/node_modules/mustache/mustache.js +772 -0
- package/node_modules/mustache/mustache.min.js +1 -0
- package/node_modules/mustache/mustache.mjs +764 -0
- package/node_modules/mustache/package.json +67 -0
- package/node_modules/mustache/wrappers/dojo/mustache.js.post +4 -0
- package/node_modules/mustache/wrappers/dojo/mustache.js.pre +9 -0
- package/node_modules/mustache/wrappers/jquery/mustache.js.post +13 -0
- package/node_modules/mustache/wrappers/jquery/mustache.js.pre +9 -0
- package/node_modules/mustache/wrappers/mootools/mustache.js.post +5 -0
- package/node_modules/mustache/wrappers/mootools/mustache.js.pre +2 -0
- package/node_modules/mustache/wrappers/qooxdoo/mustache.js.post +9 -0
- package/node_modules/mustache/wrappers/qooxdoo/mustache.js.pre +172 -0
- package/node_modules/mustache/wrappers/yui3/mustache.js.post +4 -0
- package/node_modules/mustache/wrappers/yui3/mustache.js.pre +1 -0
- package/node_modules/negotiator/HISTORY.md +114 -0
- package/node_modules/negotiator/LICENSE +24 -0
- package/node_modules/negotiator/README.md +212 -0
- package/node_modules/negotiator/index.js +83 -0
- package/node_modules/negotiator/lib/charset.js +169 -0
- package/node_modules/negotiator/lib/encoding.js +205 -0
- package/node_modules/negotiator/lib/language.js +179 -0
- package/node_modules/negotiator/lib/mediaType.js +294 -0
- package/node_modules/negotiator/package.json +43 -0
- package/node_modules/neo-async/LICENSE +22 -0
- package/node_modules/neo-async/README.md +273 -0
- package/node_modules/neo-async/all.js +3 -0
- package/node_modules/neo-async/allLimit.js +3 -0
- package/node_modules/neo-async/allSeries.js +3 -0
- package/node_modules/neo-async/angelFall.js +3 -0
- package/node_modules/neo-async/any.js +3 -0
- package/node_modules/neo-async/anyLimit.js +3 -0
- package/node_modules/neo-async/anySeries.js +3 -0
- package/node_modules/neo-async/apply.js +3 -0
- package/node_modules/neo-async/applyEach.js +3 -0
- package/node_modules/neo-async/applyEachSeries.js +3 -0
- package/node_modules/neo-async/async.js +9184 -0
- package/node_modules/neo-async/async.min.js +80 -0
- package/node_modules/neo-async/asyncify.js +3 -0
- package/node_modules/neo-async/auto.js +3 -0
- package/node_modules/neo-async/autoInject.js +3 -0
- package/node_modules/neo-async/cargo.js +3 -0
- package/node_modules/neo-async/compose.js +3 -0
- package/node_modules/neo-async/concat.js +3 -0
- package/node_modules/neo-async/concatLimit.js +3 -0
- package/node_modules/neo-async/concatSeries.js +3 -0
- package/node_modules/neo-async/constant.js +3 -0
- package/node_modules/neo-async/createLogger.js +3 -0
- package/node_modules/neo-async/detect.js +3 -0
- package/node_modules/neo-async/detectLimit.js +3 -0
- package/node_modules/neo-async/detectSeries.js +3 -0
- package/node_modules/neo-async/dir.js +3 -0
- package/node_modules/neo-async/doDuring.js +3 -0
- package/node_modules/neo-async/doUntil.js +3 -0
- package/node_modules/neo-async/doWhilst.js +3 -0
- package/node_modules/neo-async/during.js +3 -0
- package/node_modules/neo-async/each.js +3 -0
- package/node_modules/neo-async/eachLimit.js +3 -0
- package/node_modules/neo-async/eachOf.js +3 -0
- package/node_modules/neo-async/eachOfLimit.js +3 -0
- package/node_modules/neo-async/eachOfSeries.js +3 -0
- package/node_modules/neo-async/eachSeries.js +3 -0
- package/node_modules/neo-async/ensureAsync.js +3 -0
- package/node_modules/neo-async/every.js +3 -0
- package/node_modules/neo-async/everyLimit.js +3 -0
- package/node_modules/neo-async/everySeries.js +3 -0
- package/node_modules/neo-async/fast.js +3 -0
- package/node_modules/neo-async/filter.js +3 -0
- package/node_modules/neo-async/filterLimit.js +3 -0
- package/node_modules/neo-async/filterSeries.js +3 -0
- package/node_modules/neo-async/find.js +3 -0
- package/node_modules/neo-async/findLimit.js +3 -0
- package/node_modules/neo-async/findSeries.js +3 -0
- package/node_modules/neo-async/foldl.js +3 -0
- package/node_modules/neo-async/foldr.js +3 -0
- package/node_modules/neo-async/forEach.js +3 -0
- package/node_modules/neo-async/forEachLimit.js +3 -0
- package/node_modules/neo-async/forEachOf.js +3 -0
- package/node_modules/neo-async/forEachOfLimit.js +3 -0
- package/node_modules/neo-async/forEachOfSeries.js +3 -0
- package/node_modules/neo-async/forEachSeries.js +3 -0
- package/node_modules/neo-async/forever.js +3 -0
- package/node_modules/neo-async/groupBy.js +3 -0
- package/node_modules/neo-async/groupByLimit.js +3 -0
- package/node_modules/neo-async/groupBySeries.js +3 -0
- package/node_modules/neo-async/inject.js +3 -0
- package/node_modules/neo-async/iterator.js +3 -0
- package/node_modules/neo-async/log.js +3 -0
- package/node_modules/neo-async/map.js +3 -0
- package/node_modules/neo-async/mapLimit.js +3 -0
- package/node_modules/neo-async/mapSeries.js +3 -0
- package/node_modules/neo-async/mapValues.js +3 -0
- package/node_modules/neo-async/mapValuesLimit.js +3 -0
- package/node_modules/neo-async/mapValuesSeries.js +3 -0
- package/node_modules/neo-async/memoize.js +3 -0
- package/node_modules/neo-async/nextTick.js +3 -0
- package/node_modules/neo-async/omit.js +3 -0
- package/node_modules/neo-async/omitLimit.js +3 -0
- package/node_modules/neo-async/omitSeries.js +3 -0
- package/node_modules/neo-async/package.json +57 -0
- package/node_modules/neo-async/parallel.js +3 -0
- package/node_modules/neo-async/parallelLimit.js +3 -0
- package/node_modules/neo-async/pick.js +3 -0
- package/node_modules/neo-async/pickLimit.js +3 -0
- package/node_modules/neo-async/pickSeries.js +3 -0
- package/node_modules/neo-async/priorityQueue.js +3 -0
- package/node_modules/neo-async/queue.js +3 -0
- package/node_modules/neo-async/race.js +3 -0
- package/node_modules/neo-async/reduce.js +3 -0
- package/node_modules/neo-async/reduceRight.js +3 -0
- package/node_modules/neo-async/reflect.js +3 -0
- package/node_modules/neo-async/reflectAll.js +3 -0
- package/node_modules/neo-async/reject.js +3 -0
- package/node_modules/neo-async/rejectLimit.js +3 -0
- package/node_modules/neo-async/rejectSeries.js +3 -0
- package/node_modules/neo-async/retry.js +3 -0
- package/node_modules/neo-async/retryable.js +3 -0
- package/node_modules/neo-async/safe.js +3 -0
- package/node_modules/neo-async/select.js +3 -0
- package/node_modules/neo-async/selectLimit.js +3 -0
- package/node_modules/neo-async/selectSeries.js +3 -0
- package/node_modules/neo-async/seq.js +3 -0
- package/node_modules/neo-async/series.js +3 -0
- package/node_modules/neo-async/setImmediate.js +3 -0
- package/node_modules/neo-async/some.js +3 -0
- package/node_modules/neo-async/someLimit.js +3 -0
- package/node_modules/neo-async/someSeries.js +3 -0
- package/node_modules/neo-async/sortBy.js +3 -0
- package/node_modules/neo-async/sortByLimit.js +3 -0
- package/node_modules/neo-async/sortBySeries.js +3 -0
- package/node_modules/neo-async/timeout.js +3 -0
- package/node_modules/neo-async/times.js +3 -0
- package/node_modules/neo-async/timesLimit.js +3 -0
- package/node_modules/neo-async/timesSeries.js +3 -0
- package/node_modules/neo-async/transform.js +3 -0
- package/node_modules/neo-async/transformLimit.js +3 -0
- package/node_modules/neo-async/transformSeries.js +3 -0
- package/node_modules/neo-async/tryEach.js +3 -0
- package/node_modules/neo-async/unmemoize.js +3 -0
- package/node_modules/neo-async/until.js +3 -0
- package/node_modules/neo-async/waterfall.js +3 -0
- package/node_modules/neo-async/whilst.js +3 -0
- package/node_modules/neo-async/wrapSync.js +3 -0
- package/node_modules/node-cache/.nvmrc +1 -0
- package/node_modules/node-cache/.nycrc.yaml +7 -0
- package/node_modules/node-cache/LICENSE +21 -0
- package/node_modules/node-cache/README.md +497 -0
- package/node_modules/node-cache/_src/test/typedefinition_test.ts +108 -0
- package/node_modules/node-cache/index.d.ts +380 -0
- package/node_modules/node-cache/index.js +17 -0
- package/node_modules/node-cache/lib/node_cache.js +802 -0
- package/node_modules/node-cache/package.json +68 -0
- package/node_modules/node-cache/tsconfig.json +8 -0
- package/node_modules/object-inspect/.eslintrc +53 -0
- package/node_modules/object-inspect/.github/FUNDING.yml +12 -0
- package/node_modules/object-inspect/.nycrc +13 -0
- package/node_modules/object-inspect/CHANGELOG.md +424 -0
- package/node_modules/object-inspect/LICENSE +21 -0
- package/node_modules/object-inspect/example/all.js +23 -0
- package/node_modules/object-inspect/example/circular.js +6 -0
- package/node_modules/object-inspect/example/fn.js +5 -0
- package/node_modules/object-inspect/example/inspect.js +10 -0
- package/node_modules/object-inspect/index.js +544 -0
- package/node_modules/object-inspect/package-support.json +20 -0
- package/node_modules/object-inspect/package.json +105 -0
- package/node_modules/object-inspect/readme.markdown +84 -0
- package/node_modules/object-inspect/test/bigint.js +58 -0
- package/node_modules/object-inspect/test/browser/dom.js +15 -0
- package/node_modules/object-inspect/test/circular.js +16 -0
- package/node_modules/object-inspect/test/deep.js +12 -0
- package/node_modules/object-inspect/test/element.js +53 -0
- package/node_modules/object-inspect/test/err.js +48 -0
- package/node_modules/object-inspect/test/fakes.js +29 -0
- package/node_modules/object-inspect/test/fn.js +76 -0
- package/node_modules/object-inspect/test/global.js +17 -0
- package/node_modules/object-inspect/test/has.js +15 -0
- package/node_modules/object-inspect/test/holes.js +15 -0
- package/node_modules/object-inspect/test/indent-option.js +271 -0
- package/node_modules/object-inspect/test/inspect.js +139 -0
- package/node_modules/object-inspect/test/lowbyte.js +12 -0
- package/node_modules/object-inspect/test/number.js +58 -0
- package/node_modules/object-inspect/test/quoteStyle.js +26 -0
- package/node_modules/object-inspect/test/toStringTag.js +40 -0
- package/node_modules/object-inspect/test/undef.js +12 -0
- package/node_modules/object-inspect/test/values.js +261 -0
- package/node_modules/object-inspect/test-core-js.js +26 -0
- package/node_modules/object-inspect/util.inspect.js +1 -0
- package/node_modules/on-finished/HISTORY.md +98 -0
- package/node_modules/on-finished/LICENSE +23 -0
- package/node_modules/on-finished/README.md +162 -0
- package/node_modules/on-finished/index.js +234 -0
- package/node_modules/on-finished/package.json +39 -0
- package/node_modules/once/LICENSE +15 -0
- package/node_modules/once/README.md +79 -0
- package/node_modules/once/once.js +42 -0
- package/node_modules/once/package.json +33 -0
- package/node_modules/parseurl/HISTORY.md +58 -0
- package/node_modules/parseurl/LICENSE +24 -0
- package/node_modules/parseurl/README.md +133 -0
- package/node_modules/parseurl/index.js +158 -0
- package/node_modules/parseurl/package.json +40 -0
- package/node_modules/path-to-regexp/LICENSE +21 -0
- package/node_modules/path-to-regexp/Readme.md +224 -0
- package/node_modules/path-to-regexp/dist/index.d.ts +147 -0
- package/node_modules/path-to-regexp/dist/index.js +431 -0
- package/node_modules/path-to-regexp/dist/index.js.map +1 -0
- package/node_modules/path-to-regexp/package.json +64 -0
- package/node_modules/pluralize/LICENSE +21 -0
- package/node_modules/pluralize/Readme.md +100 -0
- package/node_modules/pluralize/package.json +40 -0
- package/node_modules/pluralize/pluralize.js +503 -0
- package/node_modules/proxy-addr/HISTORY.md +161 -0
- package/node_modules/proxy-addr/LICENSE +22 -0
- package/node_modules/proxy-addr/README.md +139 -0
- package/node_modules/proxy-addr/index.js +327 -0
- package/node_modules/proxy-addr/package.json +47 -0
- package/node_modules/qs/.editorconfig +46 -0
- package/node_modules/qs/.github/FUNDING.yml +12 -0
- package/node_modules/qs/.github/SECURITY.md +11 -0
- package/node_modules/qs/.github/THREAT_MODEL.md +78 -0
- package/node_modules/qs/.nycrc +13 -0
- package/node_modules/qs/CHANGELOG.md +833 -0
- package/node_modules/qs/LICENSE.md +29 -0
- package/node_modules/qs/README.md +758 -0
- package/node_modules/qs/dist/qs.js +141 -0
- package/node_modules/qs/eslint.config.mjs +57 -0
- package/node_modules/qs/lib/formats.js +23 -0
- package/node_modules/qs/lib/index.js +11 -0
- package/node_modules/qs/lib/parse.js +414 -0
- package/node_modules/qs/lib/stringify.js +363 -0
- package/node_modules/qs/lib/utils.js +381 -0
- package/node_modules/qs/package.json +95 -0
- package/node_modules/qs/test/empty-keys-cases.js +267 -0
- package/node_modules/qs/test/parse.js +1933 -0
- package/node_modules/qs/test/stringify.js +1448 -0
- package/node_modules/qs/test/utils.js +626 -0
- package/node_modules/range-parser/HISTORY.md +56 -0
- package/node_modules/range-parser/LICENSE +23 -0
- package/node_modules/range-parser/README.md +85 -0
- package/node_modules/range-parser/index.js +181 -0
- package/node_modules/range-parser/package.json +48 -0
- package/node_modules/raw-body/LICENSE +22 -0
- package/node_modules/raw-body/README.md +223 -0
- package/node_modules/raw-body/index.d.ts +85 -0
- package/node_modules/raw-body/index.js +336 -0
- package/node_modules/raw-body/package.json +46 -0
- package/node_modules/router/HISTORY.md +228 -0
- package/node_modules/router/LICENSE +23 -0
- package/node_modules/router/README.md +416 -0
- package/node_modules/router/index.js +748 -0
- package/node_modules/router/lib/layer.js +247 -0
- package/node_modules/router/lib/route.js +242 -0
- package/node_modules/router/package.json +44 -0
- package/node_modules/safer-buffer/LICENSE +21 -0
- package/node_modules/safer-buffer/Porting-Buffer.md +268 -0
- package/node_modules/safer-buffer/Readme.md +156 -0
- package/node_modules/safer-buffer/dangerous.js +58 -0
- package/node_modules/safer-buffer/package.json +34 -0
- package/node_modules/safer-buffer/safer.js +77 -0
- package/node_modules/safer-buffer/tests.js +406 -0
- package/node_modules/sax/LICENSE.md +55 -0
- package/node_modules/sax/README.md +227 -0
- package/node_modules/sax/lib/sax.js +1848 -0
- package/node_modules/sax/package.json +34 -0
- package/node_modules/semver/LICENSE +15 -0
- package/node_modules/semver/README.md +680 -0
- package/node_modules/semver/bin/semver.js +195 -0
- package/node_modules/semver/classes/comparator.js +143 -0
- package/node_modules/semver/classes/index.js +7 -0
- package/node_modules/semver/classes/range.js +577 -0
- package/node_modules/semver/classes/semver.js +350 -0
- package/node_modules/semver/functions/clean.js +8 -0
- package/node_modules/semver/functions/cmp.js +54 -0
- package/node_modules/semver/functions/coerce.js +62 -0
- package/node_modules/semver/functions/compare-build.js +9 -0
- package/node_modules/semver/functions/compare-loose.js +5 -0
- package/node_modules/semver/functions/compare.js +7 -0
- package/node_modules/semver/functions/diff.js +60 -0
- package/node_modules/semver/functions/eq.js +5 -0
- package/node_modules/semver/functions/gt.js +5 -0
- package/node_modules/semver/functions/gte.js +5 -0
- package/node_modules/semver/functions/inc.js +21 -0
- package/node_modules/semver/functions/lt.js +5 -0
- package/node_modules/semver/functions/lte.js +5 -0
- package/node_modules/semver/functions/major.js +5 -0
- package/node_modules/semver/functions/minor.js +5 -0
- package/node_modules/semver/functions/neq.js +5 -0
- package/node_modules/semver/functions/parse.js +18 -0
- package/node_modules/semver/functions/patch.js +5 -0
- package/node_modules/semver/functions/prerelease.js +8 -0
- package/node_modules/semver/functions/rcompare.js +5 -0
- package/node_modules/semver/functions/rsort.js +5 -0
- package/node_modules/semver/functions/satisfies.js +12 -0
- package/node_modules/semver/functions/sort.js +5 -0
- package/node_modules/semver/functions/truncate.js +48 -0
- package/node_modules/semver/functions/valid.js +8 -0
- package/node_modules/semver/index.js +93 -0
- package/node_modules/semver/internal/constants.js +37 -0
- package/node_modules/semver/internal/debug.js +11 -0
- package/node_modules/semver/internal/identifiers.js +29 -0
- package/node_modules/semver/internal/lrucache.js +42 -0
- package/node_modules/semver/internal/parse-options.js +17 -0
- package/node_modules/semver/internal/re.js +223 -0
- package/node_modules/semver/package.json +78 -0
- package/node_modules/semver/preload.js +4 -0
- package/node_modules/semver/range.bnf +17 -0
- package/node_modules/semver/ranges/gtr.js +6 -0
- package/node_modules/semver/ranges/intersects.js +9 -0
- package/node_modules/semver/ranges/ltr.js +6 -0
- package/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/node_modules/semver/ranges/min-version.js +63 -0
- package/node_modules/semver/ranges/outside.js +82 -0
- package/node_modules/semver/ranges/simplify.js +49 -0
- package/node_modules/semver/ranges/subset.js +249 -0
- package/node_modules/semver/ranges/to-comparators.js +10 -0
- package/node_modules/semver/ranges/valid.js +13 -0
- package/node_modules/send/LICENSE +23 -0
- package/node_modules/send/README.md +317 -0
- package/node_modules/send/index.js +997 -0
- package/node_modules/send/package.json +63 -0
- package/node_modules/serve-static/LICENSE +25 -0
- package/node_modules/serve-static/README.md +253 -0
- package/node_modules/serve-static/index.js +208 -0
- package/node_modules/serve-static/package.json +44 -0
- package/node_modules/setprototypeof/LICENSE +13 -0
- package/node_modules/setprototypeof/README.md +31 -0
- package/node_modules/setprototypeof/index.d.ts +2 -0
- package/node_modules/setprototypeof/index.js +17 -0
- package/node_modules/setprototypeof/package.json +38 -0
- package/node_modules/setprototypeof/test/index.js +24 -0
- package/node_modules/side-channel/.editorconfig +9 -0
- package/node_modules/side-channel/.eslintrc +12 -0
- package/node_modules/side-channel/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel/.nycrc +13 -0
- package/node_modules/side-channel/CHANGELOG.md +120 -0
- package/node_modules/side-channel/LICENSE +21 -0
- package/node_modules/side-channel/README.md +61 -0
- package/node_modules/side-channel/index.d.ts +14 -0
- package/node_modules/side-channel/index.js +46 -0
- package/node_modules/side-channel/package.json +85 -0
- package/node_modules/side-channel/test/index.js +120 -0
- package/node_modules/side-channel/tsconfig.json +9 -0
- package/node_modules/side-channel-list/.editorconfig +9 -0
- package/node_modules/side-channel-list/.eslintrc +11 -0
- package/node_modules/side-channel-list/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-list/.nycrc +13 -0
- package/node_modules/side-channel-list/CHANGELOG.md +36 -0
- package/node_modules/side-channel-list/LICENSE +21 -0
- package/node_modules/side-channel-list/README.md +62 -0
- package/node_modules/side-channel-list/index.d.ts +13 -0
- package/node_modules/side-channel-list/index.js +111 -0
- package/node_modules/side-channel-list/list.d.ts +14 -0
- package/node_modules/side-channel-list/package.json +77 -0
- package/node_modules/side-channel-list/test/index.js +154 -0
- package/node_modules/side-channel-list/tsconfig.json +9 -0
- package/node_modules/side-channel-map/.editorconfig +9 -0
- package/node_modules/side-channel-map/.eslintrc +11 -0
- package/node_modules/side-channel-map/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-map/.nycrc +13 -0
- package/node_modules/side-channel-map/CHANGELOG.md +22 -0
- package/node_modules/side-channel-map/LICENSE +21 -0
- package/node_modules/side-channel-map/README.md +62 -0
- package/node_modules/side-channel-map/index.d.ts +15 -0
- package/node_modules/side-channel-map/index.js +68 -0
- package/node_modules/side-channel-map/package.json +80 -0
- package/node_modules/side-channel-map/test/index.js +114 -0
- package/node_modules/side-channel-map/tsconfig.json +9 -0
- package/node_modules/side-channel-weakmap/.editorconfig +9 -0
- package/node_modules/side-channel-weakmap/.eslintrc +12 -0
- package/node_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-weakmap/.nycrc +13 -0
- package/node_modules/side-channel-weakmap/CHANGELOG.md +28 -0
- package/node_modules/side-channel-weakmap/LICENSE +21 -0
- package/node_modules/side-channel-weakmap/README.md +62 -0
- package/node_modules/side-channel-weakmap/index.d.ts +15 -0
- package/node_modules/side-channel-weakmap/index.js +84 -0
- package/node_modules/side-channel-weakmap/package.json +87 -0
- package/node_modules/side-channel-weakmap/test/index.js +114 -0
- package/node_modules/side-channel-weakmap/tsconfig.json +9 -0
- package/node_modules/source-map/CHANGELOG.md +301 -0
- package/node_modules/source-map/LICENSE +28 -0
- package/node_modules/source-map/README.md +742 -0
- package/node_modules/source-map/dist/source-map.debug.js +3234 -0
- package/node_modules/source-map/dist/source-map.js +3233 -0
- package/node_modules/source-map/dist/source-map.min.js +2 -0
- package/node_modules/source-map/dist/source-map.min.js.map +1 -0
- package/node_modules/source-map/lib/array-set.js +121 -0
- package/node_modules/source-map/lib/base64-vlq.js +140 -0
- package/node_modules/source-map/lib/base64.js +67 -0
- package/node_modules/source-map/lib/binary-search.js +111 -0
- package/node_modules/source-map/lib/mapping-list.js +79 -0
- package/node_modules/source-map/lib/quick-sort.js +114 -0
- package/node_modules/source-map/lib/source-map-consumer.js +1145 -0
- package/node_modules/source-map/lib/source-map-generator.js +425 -0
- package/node_modules/source-map/lib/source-node.js +413 -0
- package/node_modules/source-map/lib/util.js +488 -0
- package/node_modules/source-map/package.json +73 -0
- package/node_modules/source-map/source-map.d.ts +98 -0
- package/node_modules/source-map/source-map.js +8 -0
- package/node_modules/statuses/HISTORY.md +87 -0
- package/node_modules/statuses/LICENSE +23 -0
- package/node_modules/statuses/README.md +139 -0
- package/node_modules/statuses/codes.json +65 -0
- package/node_modules/statuses/index.js +146 -0
- package/node_modules/statuses/package.json +49 -0
- package/node_modules/to-regex-range/LICENSE +21 -0
- package/node_modules/to-regex-range/README.md +305 -0
- package/node_modules/to-regex-range/index.js +288 -0
- package/node_modules/to-regex-range/package.json +88 -0
- package/node_modules/toidentifier/HISTORY.md +9 -0
- package/node_modules/toidentifier/LICENSE +21 -0
- package/node_modules/toidentifier/README.md +61 -0
- package/node_modules/toidentifier/index.js +32 -0
- package/node_modules/toidentifier/package.json +38 -0
- package/node_modules/type-is/HISTORY.md +292 -0
- package/node_modules/type-is/LICENSE +23 -0
- package/node_modules/type-is/README.md +198 -0
- package/node_modules/type-is/index.js +240 -0
- package/node_modules/type-is/node_modules/content-type/LICENSE +22 -0
- package/node_modules/type-is/node_modules/content-type/README.md +69 -0
- package/node_modules/type-is/node_modules/content-type/dist/index.d.ts +26 -0
- package/node_modules/type-is/node_modules/content-type/dist/index.js +170 -0
- package/node_modules/type-is/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/type-is/node_modules/content-type/package.json +52 -0
- package/node_modules/type-is/package.json +51 -0
- package/node_modules/uglify-js/LICENSE +29 -0
- package/node_modules/uglify-js/README.md +1479 -0
- package/node_modules/uglify-js/bin/uglifyjs +624 -0
- package/node_modules/uglify-js/lib/ast.js +2357 -0
- package/node_modules/uglify-js/lib/compress.js +14650 -0
- package/node_modules/uglify-js/lib/minify.js +278 -0
- package/node_modules/uglify-js/lib/mozilla-ast.js +1338 -0
- package/node_modules/uglify-js/lib/output.js +1983 -0
- package/node_modules/uglify-js/lib/parse.js +2589 -0
- package/node_modules/uglify-js/lib/propmangle.js +328 -0
- package/node_modules/uglify-js/lib/scope.js +883 -0
- package/node_modules/uglify-js/lib/sourcemap.js +195 -0
- package/node_modules/uglify-js/lib/transform.js +250 -0
- package/node_modules/uglify-js/lib/utils.js +300 -0
- package/node_modules/uglify-js/package.json +52 -0
- package/node_modules/uglify-js/tools/domprops.html +456 -0
- package/node_modules/uglify-js/tools/domprops.json +8327 -0
- package/node_modules/uglify-js/tools/exports.js +8 -0
- package/node_modules/uglify-js/tools/node.js +115 -0
- package/node_modules/uglify-js/tools/tty.js +22 -0
- package/node_modules/unpipe/HISTORY.md +4 -0
- package/node_modules/unpipe/LICENSE +22 -0
- package/node_modules/unpipe/README.md +43 -0
- package/node_modules/unpipe/index.js +69 -0
- package/node_modules/unpipe/package.json +27 -0
- package/node_modules/vary/HISTORY.md +39 -0
- package/node_modules/vary/LICENSE +22 -0
- package/node_modules/vary/README.md +101 -0
- package/node_modules/vary/index.js +149 -0
- package/node_modules/vary/package.json +43 -0
- package/node_modules/verror/CHANGES.md +28 -0
- package/node_modules/verror/CONTRIBUTING.md +16 -0
- package/node_modules/verror/LICENSE +19 -0
- package/node_modules/verror/README.md +528 -0
- package/node_modules/verror/lib/verror.js +451 -0
- package/node_modules/verror/package.json +30 -0
- package/node_modules/wordwrap/LICENSE +18 -0
- package/node_modules/wordwrap/README.markdown +70 -0
- package/node_modules/wordwrap/example/center.js +10 -0
- package/node_modules/wordwrap/example/meat.js +3 -0
- package/node_modules/wordwrap/index.js +76 -0
- package/node_modules/wordwrap/package.json +34 -0
- package/node_modules/wordwrap/test/break.js +32 -0
- package/node_modules/wordwrap/test/idleness.txt +63 -0
- package/node_modules/wordwrap/test/wrap.js +33 -0
- package/node_modules/wrappy/LICENSE +15 -0
- package/node_modules/wrappy/README.md +36 -0
- package/node_modules/wrappy/package.json +29 -0
- package/node_modules/wrappy/wrappy.js +33 -0
- package/node_modules/ws/LICENSE +20 -0
- package/node_modules/ws/README.md +548 -0
- package/node_modules/ws/browser.js +8 -0
- package/node_modules/ws/index.js +22 -0
- package/node_modules/ws/lib/buffer-util.js +131 -0
- package/node_modules/ws/lib/constants.js +19 -0
- package/node_modules/ws/lib/event-target.js +292 -0
- package/node_modules/ws/lib/extension.js +203 -0
- package/node_modules/ws/lib/limiter.js +55 -0
- package/node_modules/ws/lib/permessage-deflate.js +528 -0
- package/node_modules/ws/lib/receiver.js +760 -0
- package/node_modules/ws/lib/sender.js +607 -0
- package/node_modules/ws/lib/stream.js +161 -0
- package/node_modules/ws/lib/subprotocol.js +62 -0
- package/node_modules/ws/lib/validation.js +152 -0
- package/node_modules/ws/lib/websocket-server.js +562 -0
- package/node_modules/ws/lib/websocket.js +1407 -0
- package/node_modules/ws/package.json +70 -0
- package/node_modules/ws/wrapper.mjs +21 -0
- package/node_modules/xml-js/LICENSE +21 -0
- package/node_modules/xml-js/README.md +390 -0
- package/node_modules/xml-js/bin/cli-helper.js +47 -0
- package/node_modules/xml-js/bin/cli.js +83 -0
- package/node_modules/xml-js/bin/test.json +23 -0
- package/node_modules/xml-js/bin/test.xml +3 -0
- package/node_modules/xml-js/dist/xml-js.js +8310 -0
- package/node_modules/xml-js/dist/xml-js.min.js +8 -0
- package/node_modules/xml-js/index.js +1 -0
- package/node_modules/xml-js/lib/array-helper.js +11 -0
- package/node_modules/xml-js/lib/index.js +13 -0
- package/node_modules/xml-js/lib/js2xml.js +320 -0
- package/node_modules/xml-js/lib/json2xml.js +18 -0
- package/node_modules/xml-js/lib/options-helper.js +43 -0
- package/node_modules/xml-js/lib/xml2js.js +362 -0
- package/node_modules/xml-js/lib/xml2json.js +22 -0
- package/node_modules/xml-js/package.json +111 -0
- package/node_modules/xml-js/types/index.d.ts +154 -0
- package/node_modules/xml-js/types/tsconfig.json +14 -0
- package/node_modules/xml-js/types/typings.json +4 -0
- package/node_modules/xml-js/types/xml-js-tests.ts +60 -0
- package/node_modules/xml-js/webpack.config.js +28 -0
- package/node_modules/yaml/LICENSE +13 -0
- package/node_modules/yaml/README.md +172 -0
- package/node_modules/yaml/bin.mjs +11 -0
- package/node_modules/yaml/browser/dist/compose/compose-collection.js +88 -0
- package/node_modules/yaml/browser/dist/compose/compose-doc.js +43 -0
- package/node_modules/yaml/browser/dist/compose/compose-node.js +109 -0
- package/node_modules/yaml/browser/dist/compose/compose-scalar.js +86 -0
- package/node_modules/yaml/browser/dist/compose/composer.js +219 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-map.js +115 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +198 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +49 -0
- package/node_modules/yaml/browser/dist/compose/resolve-end.js +37 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +207 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +225 -0
- package/node_modules/yaml/browser/dist/compose/resolve-props.js +146 -0
- package/node_modules/yaml/browser/dist/compose/util-contains-newline.js +34 -0
- package/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +26 -0
- package/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +15 -0
- package/node_modules/yaml/browser/dist/compose/util-map-includes.js +13 -0
- package/node_modules/yaml/browser/dist/doc/Document.js +335 -0
- package/node_modules/yaml/browser/dist/doc/anchors.js +71 -0
- package/node_modules/yaml/browser/dist/doc/applyReviver.js +55 -0
- package/node_modules/yaml/browser/dist/doc/createNode.js +88 -0
- package/node_modules/yaml/browser/dist/doc/directives.js +176 -0
- package/node_modules/yaml/browser/dist/errors.js +57 -0
- package/node_modules/yaml/browser/dist/index.js +17 -0
- package/node_modules/yaml/browser/dist/log.js +11 -0
- package/node_modules/yaml/browser/dist/nodes/Alias.js +116 -0
- package/node_modules/yaml/browser/dist/nodes/Collection.js +147 -0
- package/node_modules/yaml/browser/dist/nodes/Node.js +38 -0
- package/node_modules/yaml/browser/dist/nodes/Pair.js +36 -0
- package/node_modules/yaml/browser/dist/nodes/Scalar.js +24 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLMap.js +144 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +113 -0
- package/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +63 -0
- package/node_modules/yaml/browser/dist/nodes/identity.js +36 -0
- package/node_modules/yaml/browser/dist/nodes/toJS.js +37 -0
- package/node_modules/yaml/browser/dist/parse/cst-scalar.js +214 -0
- package/node_modules/yaml/browser/dist/parse/cst-stringify.js +61 -0
- package/node_modules/yaml/browser/dist/parse/cst-visit.js +97 -0
- package/node_modules/yaml/browser/dist/parse/cst.js +98 -0
- package/node_modules/yaml/browser/dist/parse/lexer.js +721 -0
- package/node_modules/yaml/browser/dist/parse/line-counter.js +39 -0
- package/node_modules/yaml/browser/dist/parse/parser.js +975 -0
- package/node_modules/yaml/browser/dist/public-api.js +102 -0
- package/node_modules/yaml/browser/dist/schema/Schema.js +37 -0
- package/node_modules/yaml/browser/dist/schema/common/map.js +17 -0
- package/node_modules/yaml/browser/dist/schema/common/null.js +15 -0
- package/node_modules/yaml/browser/dist/schema/common/seq.js +17 -0
- package/node_modules/yaml/browser/dist/schema/common/string.js +14 -0
- package/node_modules/yaml/browser/dist/schema/core/bool.js +19 -0
- package/node_modules/yaml/browser/dist/schema/core/float.js +43 -0
- package/node_modules/yaml/browser/dist/schema/core/int.js +38 -0
- package/node_modules/yaml/browser/dist/schema/core/schema.js +23 -0
- package/node_modules/yaml/browser/dist/schema/json/schema.js +62 -0
- package/node_modules/yaml/browser/dist/schema/tags.js +96 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +58 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +26 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +46 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +71 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +67 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +74 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +78 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +39 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +93 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +101 -0
- package/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +146 -0
- package/node_modules/yaml/browser/dist/stringify/stringify.js +129 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +153 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyComment.js +20 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +85 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +25 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyPair.js +150 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyString.js +336 -0
- package/node_modules/yaml/browser/dist/util.js +11 -0
- package/node_modules/yaml/browser/dist/visit.js +233 -0
- package/node_modules/yaml/browser/index.js +5 -0
- package/{lib/init/template/esm/files/package.json.hbs → node_modules/yaml/browser/package.json} +1 -1
- package/node_modules/yaml/dist/cli.d.ts +8 -0
- package/node_modules/yaml/dist/cli.mjs +201 -0
- package/node_modules/yaml/dist/compose/compose-collection.d.ts +11 -0
- package/node_modules/yaml/dist/compose/compose-collection.js +90 -0
- package/node_modules/yaml/dist/compose/compose-doc.d.ts +7 -0
- package/node_modules/yaml/dist/compose/compose-doc.js +45 -0
- package/node_modules/yaml/dist/compose/compose-node.d.ts +29 -0
- package/node_modules/yaml/dist/compose/compose-node.js +112 -0
- package/node_modules/yaml/dist/compose/compose-scalar.d.ts +5 -0
- package/node_modules/yaml/dist/compose/compose-scalar.js +88 -0
- package/node_modules/yaml/dist/compose/composer.d.ts +63 -0
- package/node_modules/yaml/dist/compose/composer.js +224 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.js +117 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +11 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.js +200 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.js +51 -0
- package/node_modules/yaml/dist/compose/resolve-end.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-end.js +39 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.js +209 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +10 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +227 -0
- package/node_modules/yaml/dist/compose/resolve-props.d.ts +23 -0
- package/node_modules/yaml/dist/compose/resolve-props.js +148 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.js +28 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +3 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
- package/node_modules/yaml/dist/compose/util-map-includes.d.ts +4 -0
- package/node_modules/yaml/dist/compose/util-map-includes.js +15 -0
- package/node_modules/yaml/dist/doc/Document.d.ts +141 -0
- package/node_modules/yaml/dist/doc/Document.js +337 -0
- package/node_modules/yaml/dist/doc/anchors.d.ts +24 -0
- package/node_modules/yaml/dist/doc/anchors.js +76 -0
- package/node_modules/yaml/dist/doc/applyReviver.d.ts +9 -0
- package/node_modules/yaml/dist/doc/applyReviver.js +57 -0
- package/node_modules/yaml/dist/doc/createNode.d.ts +17 -0
- package/node_modules/yaml/dist/doc/createNode.js +90 -0
- package/node_modules/yaml/dist/doc/directives.d.ts +49 -0
- package/node_modules/yaml/dist/doc/directives.js +178 -0
- package/node_modules/yaml/dist/errors.d.ts +21 -0
- package/node_modules/yaml/dist/errors.js +62 -0
- package/node_modules/yaml/dist/index.d.ts +25 -0
- package/node_modules/yaml/dist/index.js +50 -0
- package/node_modules/yaml/dist/log.d.ts +3 -0
- package/node_modules/yaml/dist/log.js +19 -0
- package/node_modules/yaml/dist/nodes/Alias.d.ts +29 -0
- package/node_modules/yaml/dist/nodes/Alias.js +118 -0
- package/node_modules/yaml/dist/nodes/Collection.d.ts +73 -0
- package/node_modules/yaml/dist/nodes/Collection.js +151 -0
- package/node_modules/yaml/dist/nodes/Node.d.ts +53 -0
- package/node_modules/yaml/dist/nodes/Node.js +40 -0
- package/node_modules/yaml/dist/nodes/Pair.d.ts +22 -0
- package/node_modules/yaml/dist/nodes/Pair.js +39 -0
- package/node_modules/yaml/dist/nodes/Scalar.d.ts +47 -0
- package/node_modules/yaml/dist/nodes/Scalar.js +27 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.d.ts +53 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.js +147 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +60 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.js +115 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +4 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.js +65 -0
- package/node_modules/yaml/dist/nodes/identity.d.ts +23 -0
- package/node_modules/yaml/dist/nodes/identity.js +53 -0
- package/node_modules/yaml/dist/nodes/toJS.d.ts +29 -0
- package/node_modules/yaml/dist/nodes/toJS.js +39 -0
- package/node_modules/yaml/dist/options.d.ts +350 -0
- package/node_modules/yaml/dist/parse/cst-scalar.d.ts +64 -0
- package/node_modules/yaml/dist/parse/cst-scalar.js +218 -0
- package/node_modules/yaml/dist/parse/cst-stringify.d.ts +8 -0
- package/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
- package/node_modules/yaml/dist/parse/cst-visit.d.ts +39 -0
- package/node_modules/yaml/dist/parse/cst-visit.js +99 -0
- package/node_modules/yaml/dist/parse/cst.d.ts +109 -0
- package/node_modules/yaml/dist/parse/cst.js +112 -0
- package/node_modules/yaml/dist/parse/lexer.d.ts +87 -0
- package/node_modules/yaml/dist/parse/lexer.js +723 -0
- package/node_modules/yaml/dist/parse/line-counter.d.ts +22 -0
- package/node_modules/yaml/dist/parse/line-counter.js +41 -0
- package/node_modules/yaml/dist/parse/parser.d.ts +84 -0
- package/node_modules/yaml/dist/parse/parser.js +980 -0
- package/node_modules/yaml/dist/public-api.d.ts +44 -0
- package/node_modules/yaml/dist/public-api.js +107 -0
- package/node_modules/yaml/dist/schema/Schema.d.ts +17 -0
- package/node_modules/yaml/dist/schema/Schema.js +39 -0
- package/node_modules/yaml/dist/schema/common/map.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/map.js +19 -0
- package/node_modules/yaml/dist/schema/common/null.d.ts +4 -0
- package/node_modules/yaml/dist/schema/common/null.js +17 -0
- package/node_modules/yaml/dist/schema/common/seq.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/seq.js +19 -0
- package/node_modules/yaml/dist/schema/common/string.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/string.js +16 -0
- package/node_modules/yaml/dist/schema/core/bool.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/bool.js +21 -0
- package/node_modules/yaml/dist/schema/core/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/float.js +47 -0
- package/node_modules/yaml/dist/schema/core/int.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/int.js +42 -0
- package/node_modules/yaml/dist/schema/core/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/core/schema.js +25 -0
- package/node_modules/yaml/dist/schema/json/schema.d.ts +2 -0
- package/node_modules/yaml/dist/schema/json/schema.js +64 -0
- package/node_modules/yaml/dist/schema/json-schema.d.ts +69 -0
- package/node_modules/yaml/dist/schema/tags.d.ts +48 -0
- package/node_modules/yaml/dist/schema/tags.js +99 -0
- package/node_modules/yaml/dist/schema/types.d.ts +92 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +2 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.js +70 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +7 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +5 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +9 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.js +71 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +22 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.js +77 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +10 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.js +41 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +28 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.js +96 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +6 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +34 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.js +151 -0
- package/node_modules/yaml/dist/stringify/stringify.d.ts +21 -0
- package/node_modules/yaml/dist/stringify/stringify.js +132 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +17 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.js +155 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.d.ts +10 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.js +24 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +4 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.js +87 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +2 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.js +27 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.d.ts +3 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.js +152 -0
- package/node_modules/yaml/dist/stringify/stringifyString.d.ts +9 -0
- package/node_modules/yaml/dist/stringify/stringifyString.js +338 -0
- package/node_modules/yaml/dist/test-events.d.ts +4 -0
- package/node_modules/yaml/dist/test-events.js +134 -0
- package/node_modules/yaml/dist/util.d.ts +16 -0
- package/node_modules/yaml/dist/util.js +28 -0
- package/node_modules/yaml/dist/visit.d.ts +102 -0
- package/node_modules/yaml/dist/visit.js +236 -0
- package/node_modules/yaml/package.json +97 -0
- package/node_modules/yaml/util.js +2 -0
- package/package.json +116 -9
- package/bin/data-products/get-csn-via-dp-cli.js +0 -41
- package/bin/extend.js +0 -74
- package/bin/migrate.js +0 -66
- package/lib/init/template/containerize/index.js +0 -22
- package/lib/init/template/helm/index.js +0 -163
- package/lib/init/template/helm-unified-runtime/index.js +0 -65
- package/lib/init/template/html5-repo/files/html5-deployer.package.json.hbs +0 -11
- package/lib/mtx/download_legacy.js +0 -43
- package/lib/mtx/util/legacy_ext.js +0 -15
- package/npm-shrinkwrap.json +0 -1738
|
@@ -0,0 +1,2272 @@
|
|
|
1
|
+
// Compiler functions and utilities shared across all phases
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const { CompilerAssertion } = require('../base/error');
|
|
6
|
+
const { searchName } = require('../base/messages');
|
|
7
|
+
|
|
8
|
+
const {
|
|
9
|
+
setLink,
|
|
10
|
+
setArtifactLink,
|
|
11
|
+
dependsOn,
|
|
12
|
+
pathName,
|
|
13
|
+
userQuery,
|
|
14
|
+
definedViaCdl,
|
|
15
|
+
targetCantBeAspect,
|
|
16
|
+
pathStartsWithSelf,
|
|
17
|
+
columnRefStartsWithSelf,
|
|
18
|
+
isAssocToPrimaryKeys,
|
|
19
|
+
artifactRefLocation,
|
|
20
|
+
} = require('./utils');
|
|
21
|
+
|
|
22
|
+
const $inferred = Symbol.for( 'cds.$inferred' );
|
|
23
|
+
const $location = Symbol.for( 'cds.$location' );
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Main export function of this file. Attach "resolve" functions shared for phase
|
|
27
|
+
* "define" and "resolve" to `model.$functions`, where argument `model` is the XSN.
|
|
28
|
+
*
|
|
29
|
+
* Before calling `resolvePath`, make sure that the following function
|
|
30
|
+
* in model.$function is set:
|
|
31
|
+
* - `effectiveType`
|
|
32
|
+
*
|
|
33
|
+
* @param {XSN.Model} model
|
|
34
|
+
*/
|
|
35
|
+
// TODO: yes, this function will be renamed
|
|
36
|
+
function fns( model ) {
|
|
37
|
+
const { options } = model;
|
|
38
|
+
const {
|
|
39
|
+
info, error, warning, message,
|
|
40
|
+
} = model.$messageFunctions;
|
|
41
|
+
const Functions = model.$functions;
|
|
42
|
+
|
|
43
|
+
// Map `exprCtx` (is a param of traversal functions) to reference semantics
|
|
44
|
+
const referenceSemantics = {
|
|
45
|
+
// global: ------------------------------------------------------------------
|
|
46
|
+
using: { // only used to produce warnings
|
|
47
|
+
isMainRef: 'no-leaf-gap',
|
|
48
|
+
lexical: null,
|
|
49
|
+
dynamic: modelDefinitions,
|
|
50
|
+
notFound: undefinedDefinition,
|
|
51
|
+
messageMap: { 'ref-undefined-def': 'ref-undefined-using' },
|
|
52
|
+
},
|
|
53
|
+
// scope:'global': for cds.Association and auto-redirected targets
|
|
54
|
+
$global: {
|
|
55
|
+
isMainRef: 'all',
|
|
56
|
+
lexical: null,
|
|
57
|
+
dynamic: modelDefinitions,
|
|
58
|
+
notFound: undefinedDefinition,
|
|
59
|
+
},
|
|
60
|
+
// only used for the main annotate/extend statements, not inner ones:
|
|
61
|
+
annotate: {
|
|
62
|
+
isMainRef: 'no-leaf-gap',
|
|
63
|
+
lexical: userBlock,
|
|
64
|
+
dynamic: modelDefinitions,
|
|
65
|
+
notFound: undefinedForAnnotate,
|
|
66
|
+
accept: extendableArtifact,
|
|
67
|
+
},
|
|
68
|
+
'annotate-sec': {
|
|
69
|
+
isMainRef: 'no-leaf-gap',
|
|
70
|
+
lexical: userBlock,
|
|
71
|
+
dynamic: modelDefinitions,
|
|
72
|
+
notFound: undefinedDefinition,
|
|
73
|
+
messageMap: { 'ref-undefined-def': 'ext-undefined-def-sec' },
|
|
74
|
+
accept: extendableArtifact,
|
|
75
|
+
},
|
|
76
|
+
extend: {
|
|
77
|
+
isMainRef: 'no-generated',
|
|
78
|
+
lexical: userBlock,
|
|
79
|
+
dynamic: modelDefinitions,
|
|
80
|
+
notFound: undefinedForExtend,
|
|
81
|
+
accept: extendableArtifact,
|
|
82
|
+
},
|
|
83
|
+
_uncheckedExtension: { // to be used only with resolveUncheckedPath()
|
|
84
|
+
isMainRef: 'all',
|
|
85
|
+
lexical: userBlock,
|
|
86
|
+
dynamic: modelDefinitions,
|
|
87
|
+
notFound: () => null, // without message
|
|
88
|
+
},
|
|
89
|
+
include: {
|
|
90
|
+
isMainRef: 'no-generated',
|
|
91
|
+
lexical: userBlock,
|
|
92
|
+
dynamic: modelBuiltinsOrDefinitions,
|
|
93
|
+
notFound: undefinedDefinition,
|
|
94
|
+
accept: acceptStructOrBare,
|
|
95
|
+
},
|
|
96
|
+
target: {
|
|
97
|
+
isMainRef: 'no-autoexposed',
|
|
98
|
+
lexical: userBlock,
|
|
99
|
+
dynamic: modelBuiltinsOrDefinitions,
|
|
100
|
+
notFound: undefinedDefinition,
|
|
101
|
+
accept: acceptEntity,
|
|
102
|
+
noDep: true,
|
|
103
|
+
// special `scope`s for auto-redirections:
|
|
104
|
+
global: () => '$global',
|
|
105
|
+
},
|
|
106
|
+
targetAspect: {
|
|
107
|
+
isMainRef: 'no-autoexposed',
|
|
108
|
+
lexical: userBlock,
|
|
109
|
+
dynamic: modelBuiltinsOrDefinitions,
|
|
110
|
+
notFound: undefinedDefinition,
|
|
111
|
+
accept: acceptAspect,
|
|
112
|
+
},
|
|
113
|
+
from: {
|
|
114
|
+
isMainRef: 'no-autoexposed',
|
|
115
|
+
lexical: userBlock,
|
|
116
|
+
dynamic: modelBuiltinsOrDefinitions,
|
|
117
|
+
navigation: environment,
|
|
118
|
+
notFound: undefinedFromReference,
|
|
119
|
+
accept: acceptQuerySource,
|
|
120
|
+
noDep: '', // dependency special for from
|
|
121
|
+
args: () => 'from-args',
|
|
122
|
+
},
|
|
123
|
+
type: {
|
|
124
|
+
isMainRef: 'no-autoexposed',
|
|
125
|
+
lexical: userBlock,
|
|
126
|
+
dynamic: modelBuiltinsOrDefinitions,
|
|
127
|
+
navigation: staticTarget,
|
|
128
|
+
notFound: undefinedTypeReference,
|
|
129
|
+
accept: acceptTypeOrElement,
|
|
130
|
+
// special `scope`s for CDL parser - TYPE OF (TODO generated?), cds.Association:
|
|
131
|
+
typeOf: typeOfSemantics,
|
|
132
|
+
global: () => '$global', // TODO: do we need `navigation: staticTarget`?
|
|
133
|
+
},
|
|
134
|
+
$typeOf: {
|
|
135
|
+
dynamic: typeOfParentDict,
|
|
136
|
+
navigation: staticTarget,
|
|
137
|
+
},
|
|
138
|
+
// element references without lexical scope (except $self/$projection): -----
|
|
139
|
+
targetElement: {
|
|
140
|
+
lexical: null,
|
|
141
|
+
dollar: false,
|
|
142
|
+
dynamic: targetElements,
|
|
143
|
+
navigation: targetNavigation,
|
|
144
|
+
notFound: undefinedTargetElement,
|
|
145
|
+
param: () => '$scopePar',
|
|
146
|
+
},
|
|
147
|
+
filter: {
|
|
148
|
+
lexical: justDollarAliases,
|
|
149
|
+
dollar: true,
|
|
150
|
+
dynamic: targetElements,
|
|
151
|
+
notFound: undefinedTargetElement,
|
|
152
|
+
param: () => '$scopePar',
|
|
153
|
+
nestedColumn: () => 'filter',
|
|
154
|
+
},
|
|
155
|
+
'calc-filter': { // TODO: what is so special about this?
|
|
156
|
+
lexical: justDollarAliases,
|
|
157
|
+
dollar: true,
|
|
158
|
+
dynamic: targetElements,
|
|
159
|
+
navigation: calcElemNavigation,
|
|
160
|
+
notFound: undefinedTargetElement,
|
|
161
|
+
param: paramUnsupported,
|
|
162
|
+
filter: () => 'calc-filter',
|
|
163
|
+
},
|
|
164
|
+
default: {
|
|
165
|
+
lexical: null,
|
|
166
|
+
dollar: true,
|
|
167
|
+
dynamic: () => Object.create( null ),
|
|
168
|
+
notFound: undefinedVariable,
|
|
169
|
+
param: paramUnsupported,
|
|
170
|
+
},
|
|
171
|
+
'limit-rows': {
|
|
172
|
+
lexical: null,
|
|
173
|
+
dollar: true,
|
|
174
|
+
dynamic: () => Object.create( null ),
|
|
175
|
+
notFound: undefinedVariable,
|
|
176
|
+
param: () => '$scopePar',
|
|
177
|
+
},
|
|
178
|
+
'limit-offset': 'limit-rows',
|
|
179
|
+
// general element / variable references --------------------------------------
|
|
180
|
+
where: {
|
|
181
|
+
lexical: tableAliasesAndSelf,
|
|
182
|
+
dollar: true,
|
|
183
|
+
dynamic: combinedSourcesOrParentElements,
|
|
184
|
+
notFound: undefinedSourceElement,
|
|
185
|
+
check: checkRefInQuery,
|
|
186
|
+
param: () => '$scopePar',
|
|
187
|
+
},
|
|
188
|
+
having: 'where',
|
|
189
|
+
groupBy: 'where',
|
|
190
|
+
column: {
|
|
191
|
+
lexical: tableAliasesAndSelf,
|
|
192
|
+
dollar: true,
|
|
193
|
+
dynamic: combinedSourcesOrParentElements,
|
|
194
|
+
notFound: undefinedSourceElement,
|
|
195
|
+
check: checkColumnRef,
|
|
196
|
+
param: () => '$scopePar',
|
|
197
|
+
nestedColumn: () => '$srcRefInNestedColumn',
|
|
198
|
+
},
|
|
199
|
+
'from-args': {
|
|
200
|
+
lexical: null,
|
|
201
|
+
dollar: true,
|
|
202
|
+
dynamic: () => Object.create( null ),
|
|
203
|
+
notFound: undefinedVariable,
|
|
204
|
+
param: () => '$scopePar',
|
|
205
|
+
},
|
|
206
|
+
calc: {
|
|
207
|
+
lexical: justDollarAliases,
|
|
208
|
+
dollar: true,
|
|
209
|
+
dynamic: parentElements,
|
|
210
|
+
navigation: calcElemNavigation,
|
|
211
|
+
notFound: undefinedParentElement,
|
|
212
|
+
param: paramUnsupported,
|
|
213
|
+
filter: () => 'calc-filter',
|
|
214
|
+
},
|
|
215
|
+
'join-on': {
|
|
216
|
+
lexical: tableAliasesAndSelf,
|
|
217
|
+
dollar: true,
|
|
218
|
+
dynamic: combinedSourcesOrParentElements,
|
|
219
|
+
rejectRoot: rejectOwnExceptVisibleAliases,
|
|
220
|
+
notFound: undefinedSourceElement,
|
|
221
|
+
param: () => '$scopePar',
|
|
222
|
+
},
|
|
223
|
+
on: { // unmanaged assoc: outside query, redirected or new assoc in column
|
|
224
|
+
lexical: justDollarAliases,
|
|
225
|
+
dollar: true,
|
|
226
|
+
dynamic: parentElements,
|
|
227
|
+
navigation: assocOnNavigation,
|
|
228
|
+
notFound: undefinedParentElement,
|
|
229
|
+
accept: acceptElemOrVarOrSelf,
|
|
230
|
+
check: checkAssocOn,
|
|
231
|
+
param: paramUnsupported,
|
|
232
|
+
rewriteProjectionToSelf: true,
|
|
233
|
+
nestedColumn: () => '$projRefInNestedColumn',
|
|
234
|
+
},
|
|
235
|
+
'mixin-on': {
|
|
236
|
+
lexical: tableAliasesAndSelf,
|
|
237
|
+
dollar: true,
|
|
238
|
+
dynamic: combinedSourcesOrParentElements,
|
|
239
|
+
navigation: assocOnNavigation,
|
|
240
|
+
notFound: undefinedSourceElement,
|
|
241
|
+
accept: acceptElemOrVarOrSelf,
|
|
242
|
+
check: checkAssocOn,
|
|
243
|
+
param: () => '$scopePar', // TODO: check that assocs containing param in ON is not published
|
|
244
|
+
},
|
|
245
|
+
'rewrite-on': {}, // only for traversal when rewriting on condition
|
|
246
|
+
'orderBy-ref': {
|
|
247
|
+
lexical: tableAliasesAndSelf,
|
|
248
|
+
dollar: true,
|
|
249
|
+
dynamic: parentElements,
|
|
250
|
+
notFound: undefinedOrderByElement,
|
|
251
|
+
check: checkOrderByRef,
|
|
252
|
+
param: () => '$scopePar',
|
|
253
|
+
},
|
|
254
|
+
'orderBy-expr': {
|
|
255
|
+
lexical: tableAliasesAndSelf,
|
|
256
|
+
dollar: true,
|
|
257
|
+
dynamic: combinedSourcesOrParentElements,
|
|
258
|
+
notFound: undefinedSourceElement,
|
|
259
|
+
check: checkRefInQuery,
|
|
260
|
+
param: () => '$scopePar',
|
|
261
|
+
},
|
|
262
|
+
'orderBy-set-ref': {
|
|
263
|
+
lexical: tableAliasesAndSelf, // TODO: reject own tab aliases
|
|
264
|
+
dollar: true,
|
|
265
|
+
dynamic: queryElements,
|
|
266
|
+
rejectRoot: rejectOwnAliasesAndMixins,
|
|
267
|
+
notFound: undefinedParentElement,
|
|
268
|
+
check: checkOrderByRef,
|
|
269
|
+
param: () => '$scopePar',
|
|
270
|
+
},
|
|
271
|
+
'orderBy-set-expr': {
|
|
272
|
+
lexical: tableAliasesAndSelf, // TODO: reject own tab aliases
|
|
273
|
+
dollar: true,
|
|
274
|
+
dynamic: () => Object.create( null ),
|
|
275
|
+
rejectRoot: rejectAllOwn,
|
|
276
|
+
notFound: undefinedVariable,
|
|
277
|
+
check: checkRefInQuery,
|
|
278
|
+
param: () => '$scopePar',
|
|
279
|
+
},
|
|
280
|
+
annotation: { // annotation assignments
|
|
281
|
+
lexical: justDollarAliases,
|
|
282
|
+
dollar: true,
|
|
283
|
+
dynamic: parentElementsOrKeys,
|
|
284
|
+
navigation: assocOnNavigation,
|
|
285
|
+
noDep: true,
|
|
286
|
+
notFound: undefinedParentElement,
|
|
287
|
+
accept: acceptElemOrAnyVar,
|
|
288
|
+
variableFilter: (dict => dict),
|
|
289
|
+
messageMap: {
|
|
290
|
+
'ref-undefined-element': 'anno-undefined-element',
|
|
291
|
+
'ref-undefined-param': 'anno-undefined-param',
|
|
292
|
+
},
|
|
293
|
+
param: () => '$annotationScopePar',
|
|
294
|
+
nestedColumn: () => '$projRefInNestedColumn',
|
|
295
|
+
},
|
|
296
|
+
// TODO: introduce some kind of inheritance
|
|
297
|
+
// used by xpr-rewrite.js to resolve rewritten path roots.
|
|
298
|
+
annoRewrite: { // annotation assignments
|
|
299
|
+
lexical: justDollarAliases,
|
|
300
|
+
dollar: true,
|
|
301
|
+
dynamic: parentElements,
|
|
302
|
+
navigation: assocOnNavigation,
|
|
303
|
+
noDep: true,
|
|
304
|
+
notFound: null, // no error, just falsy links
|
|
305
|
+
accept: acceptElemOrAnyVar,
|
|
306
|
+
param: () => '$scopePar',
|
|
307
|
+
nestedColumn: () => '$projRefInNestedColumn',
|
|
308
|
+
},
|
|
309
|
+
$scopePar: {
|
|
310
|
+
dynamic: artifactParams,
|
|
311
|
+
notFound: undefinedParam,
|
|
312
|
+
},
|
|
313
|
+
$annotationScopePar: {
|
|
314
|
+
messageMap: {
|
|
315
|
+
'ref-undefined-element': 'anno-undefined-element',
|
|
316
|
+
'ref-undefined-param': 'anno-undefined-param',
|
|
317
|
+
},
|
|
318
|
+
dynamic: artifactParams,
|
|
319
|
+
notFound: undefinedParam,
|
|
320
|
+
},
|
|
321
|
+
// for `nestedColumn`, these two will be merged with base semantics:
|
|
322
|
+
$projRefInNestedColumn: { // for assoc-`on` and annotations
|
|
323
|
+
lexical: justDollarAliases,
|
|
324
|
+
dynamic: parentElements,
|
|
325
|
+
navigation: assocOnNavigation, // like std `environment`, but no dependency
|
|
326
|
+
rewriteProjectionToSelf: true,
|
|
327
|
+
},
|
|
328
|
+
$srcRefInNestedColumn: { // for column refs
|
|
329
|
+
lexical: justDollarAliases,
|
|
330
|
+
dollar: true,
|
|
331
|
+
dynamic: nestedElements,
|
|
332
|
+
navigation: environment,
|
|
333
|
+
notFound: undefinedNestedElement,
|
|
334
|
+
},
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
Object.assign( model.$functions, {
|
|
338
|
+
traverseExpr,
|
|
339
|
+
traverseTypedExpr,
|
|
340
|
+
resolveUncheckedPath,
|
|
341
|
+
resolveTypeArgumentsUnchecked, // TODO: move to some other file
|
|
342
|
+
resolvePathRoot,
|
|
343
|
+
resolvePath,
|
|
344
|
+
resolveDefinitionName,
|
|
345
|
+
checkExpr,
|
|
346
|
+
checkOnCondition,
|
|
347
|
+
navigationEnv,
|
|
348
|
+
nestedElements,
|
|
349
|
+
attachAndEmitValidNames,
|
|
350
|
+
userTargetElementPathIndex,
|
|
351
|
+
getQueryOperatorName,
|
|
352
|
+
traverseDollarSelfPairs,
|
|
353
|
+
} );
|
|
354
|
+
traverseExpr.STOP = Symbol( 'STOP' );
|
|
355
|
+
traverseExpr.SKIP = Symbol( 'SKIP' );
|
|
356
|
+
traverseTypedExpr.STOP = traverseExpr.STOP;
|
|
357
|
+
traverseTypedExpr.SKIP = traverseExpr.SKIP;
|
|
358
|
+
return;
|
|
359
|
+
|
|
360
|
+
// Expression traversal function ----------------------------------------------
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Recursively traverse the expression `expr` and call `callback` on the expression nodes.
|
|
364
|
+
*
|
|
365
|
+
* …
|
|
366
|
+
*
|
|
367
|
+
* Sub queries are not further traversed, but `callback` is called on the
|
|
368
|
+
* expression node having the property `query`.
|
|
369
|
+
*
|
|
370
|
+
* Callbacks can influence the traversal by returning a symbol:
|
|
371
|
+
*
|
|
372
|
+
* - `traverseExpr.STOP`: the traversal is stopped immediately
|
|
373
|
+
* - `traverseExpr.SKIP` on a node with a `path` property: the path items
|
|
374
|
+
* with its filters and arguments are not traversed
|
|
375
|
+
* - `traverseExpr.SKIP` on a path item: the expression in the `where`
|
|
376
|
+
* condition is not traversed
|
|
377
|
+
*/
|
|
378
|
+
function traverseExpr( expr, exprCtx, user, callback ) {
|
|
379
|
+
if (!expr || typeof expr === 'string') // parse error or keywords in {xpr:...}
|
|
380
|
+
return null;
|
|
381
|
+
|
|
382
|
+
let exit = null;
|
|
383
|
+
// `type` property for `cast, `query` for sub query
|
|
384
|
+
if (expr.path || expr.type || expr.query) {
|
|
385
|
+
exit = callback( expr, exprCtx, user );
|
|
386
|
+
if (exit === traverseExpr.STOP)
|
|
387
|
+
return exit;
|
|
388
|
+
}
|
|
389
|
+
if (expr.path && exit !== traverseExpr.SKIP) {
|
|
390
|
+
for (const step of expr.path) {
|
|
391
|
+
if (step && (step.args || step.where || step.cardinality) &&
|
|
392
|
+
traversePathItem( step, exprCtx, user, callback ))
|
|
393
|
+
return traverseExpr.STOP;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
if (expr.args) {
|
|
397
|
+
const args = Array.isArray( expr.args ) ? expr.args : Object.values( expr.args );
|
|
398
|
+
for (const arg of args) {
|
|
399
|
+
if (traverseExpr( arg, exprCtx, user, callback ) === traverseExpr.STOP)
|
|
400
|
+
return traverseExpr.STOP;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
if (expr.suffix) {
|
|
404
|
+
for (const arg of expr.suffix) {
|
|
405
|
+
if (traverseExpr( arg, exprCtx, user, callback ) === traverseExpr.STOP)
|
|
406
|
+
return traverseExpr.STOP;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
return false;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
function traversePathItem( step, exprCtx, user, callback ) {
|
|
413
|
+
const exit = callback( step, exprCtx, user );
|
|
414
|
+
if (exit === traverseExpr.STOP)
|
|
415
|
+
return true;
|
|
416
|
+
if (step.where && exit !== traverseExpr.SKIP) {
|
|
417
|
+
const ctx = referenceSemantics[exprCtx].filter?.() || 'filter';
|
|
418
|
+
if (traverseExpr( step.where, ctx, step, callback ) === traverseExpr.STOP)
|
|
419
|
+
return true;
|
|
420
|
+
}
|
|
421
|
+
if (step.args) {
|
|
422
|
+
const ctx = referenceSemantics[exprCtx].args?.() || exprCtx;
|
|
423
|
+
const args = Array.isArray( step.args ) ? step.args : Object.values( step.args );
|
|
424
|
+
// TODO: there should be no array `args` on path item
|
|
425
|
+
for (const arg of args) {
|
|
426
|
+
if (traverseExpr( arg, ctx, user, callback ) === traverseExpr.STOP)
|
|
427
|
+
return true;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
return false;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
// Special expression traversal function for `resolveExpr`. Let's see
|
|
434
|
+
// later whether we can use this version as the general one.
|
|
435
|
+
// If we continue to have separate ones, remove the STOP stuff – it is not
|
|
436
|
+
// needed for `resolveExpr`; SKIP is used, though.
|
|
437
|
+
|
|
438
|
+
function traverseTypedExpr( expr, exprCtx, user, type, callback ) {
|
|
439
|
+
if (!expr || typeof expr === 'string') // parse error or keywords in {xpr:...}
|
|
440
|
+
return null;
|
|
441
|
+
|
|
442
|
+
let { args } = expr;
|
|
443
|
+
let exit = null;
|
|
444
|
+
// `type` property for `cast, `query` for sub query
|
|
445
|
+
if (expr.path || expr.type || expr.sym || expr.query) {
|
|
446
|
+
exit = callback( expr, exprCtx, user, type );
|
|
447
|
+
if (exit === traverseExpr.STOP)
|
|
448
|
+
return exit;
|
|
449
|
+
// `args` with `cast` function
|
|
450
|
+
}
|
|
451
|
+
else if (!args) {
|
|
452
|
+
// empty on purpose
|
|
453
|
+
}
|
|
454
|
+
else if (expr.func) {
|
|
455
|
+
if (!Array.isArray( args ))
|
|
456
|
+
args = Object.values( args );
|
|
457
|
+
}
|
|
458
|
+
else if (expr.op?.val === 'list' || args.length === 1) {
|
|
459
|
+
exit = type;
|
|
460
|
+
}
|
|
461
|
+
else if (expr.op?.val === '?:') {
|
|
462
|
+
args = traverseChoiceArgs( args, exprCtx, user, type, callback );
|
|
463
|
+
exit = type;
|
|
464
|
+
}
|
|
465
|
+
else {
|
|
466
|
+
args = traverseSpecialArgs( args, exprCtx, user, type, callback );
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
if (expr.path && exit !== traverseExpr.SKIP) {
|
|
470
|
+
for (const step of expr.path) {
|
|
471
|
+
if (step && (step.args || step.where || step.cardinality) &&
|
|
472
|
+
traverseTypedPathItem( step, exprCtx, user, callback ))
|
|
473
|
+
return traverseExpr.STOP;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
if (expr.args) {
|
|
477
|
+
if (!args)
|
|
478
|
+
return traverseExpr.STOP;
|
|
479
|
+
for (const arg of args) {
|
|
480
|
+
if (traverseTypedExpr( arg, exprCtx, user, exit, callback ) === traverseExpr.STOP)
|
|
481
|
+
return traverseExpr.STOP;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
if (expr.suffix) {
|
|
485
|
+
for (const arg of expr.suffix) {
|
|
486
|
+
if (traverseTypedExpr( arg, exprCtx, user, null, callback ) === traverseExpr.STOP)
|
|
487
|
+
return traverseExpr.STOP;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
return exit;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Traverse arguments `args` if they match a specific pattern:
|
|
495
|
+
*
|
|
496
|
+
* - a (sub) expression is a comparison, i.e. uses one of the binary operators
|
|
497
|
+
* `=`, `<>`, '==', `!=`, `in` or `not in`,
|
|
498
|
+
* - one side of the comparison is a reference or a `cast` function call when
|
|
499
|
+
* typed with an enum type,
|
|
500
|
+
* - the other side is an enum reference, an enum reference in parentheses, or a
|
|
501
|
+
* list of enum references.
|
|
502
|
+
*
|
|
503
|
+
* Return an array of the arguments which are to be traversed normally, or
|
|
504
|
+
* `null` if the traversal is stopped immediately
|
|
505
|
+
*/
|
|
506
|
+
function traverseSpecialArgs( args, exprCtx, user, type, callback ) {
|
|
507
|
+
if (args.length <= 3) {
|
|
508
|
+
if (args.length === 3 && args[1].literal === 'token' &&
|
|
509
|
+
[ '=', '<>', '==', '!=', 'in' ].includes( args[1].val ))
|
|
510
|
+
return traverseComparison( args[0], args[2], exprCtx, user, callback );
|
|
511
|
+
}
|
|
512
|
+
else if (args[0].val === 'case' && args[0].literal === 'token') {
|
|
513
|
+
return traverseCaseWhen( args, exprCtx, user, type, callback );
|
|
514
|
+
}
|
|
515
|
+
else if (args.length === 4 && args[1].val === 'not' && args[2].val === 'in' &&
|
|
516
|
+
args[1].literal === 'token' && args[2].literal === 'token') {
|
|
517
|
+
return traverseComparison( args[0], args[3], exprCtx, user, callback );
|
|
518
|
+
}
|
|
519
|
+
return args;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
function traverseComparison( left, right, exprCtx, user, callback ) {
|
|
523
|
+
if (!left || !right) // can happen in old parser
|
|
524
|
+
return [ left || right ];
|
|
525
|
+
if (left.path || left.type) { // ref or cast fn
|
|
526
|
+
const type = traverseTypedExpr( left, exprCtx, user, null, callback );
|
|
527
|
+
if (type === traverseExpr.STOP ||
|
|
528
|
+
traverseTypedExpr( right, exprCtx, user, type, callback ) === traverseExpr.STOP)
|
|
529
|
+
return null;
|
|
530
|
+
return [];
|
|
531
|
+
}
|
|
532
|
+
if (right.path || right.type) { // ref or cast fn
|
|
533
|
+
const type = traverseTypedExpr( right, exprCtx, user, null, callback );
|
|
534
|
+
if (type === traverseExpr.STOP ||
|
|
535
|
+
traverseTypedExpr( left, exprCtx, user, type, callback ) === traverseExpr.STOP)
|
|
536
|
+
return null;
|
|
537
|
+
return [];
|
|
538
|
+
}
|
|
539
|
+
return [ left, right ];
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
// for '?:' operator, only via CDL (translates to `case…when` in CSN):
|
|
543
|
+
function traverseChoiceArgs( args, exprCtx, user, type, callback ) {
|
|
544
|
+
if (traverseTypedExpr( args[0], exprCtx, user, null, callback ) === traverseExpr.STOP)
|
|
545
|
+
return null;
|
|
546
|
+
return args.slice( 1 );
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
function traverseCaseWhen( args, exprCtx, user, type, callback ) {
|
|
550
|
+
let idx = 1;
|
|
551
|
+
let when = null;
|
|
552
|
+
let node = args[1];
|
|
553
|
+
// For `CASE <expr> WHEN <…> THEN <…>`
|
|
554
|
+
if (node?.val !== 'when' || node.literal !== 'token') {
|
|
555
|
+
when = traverseTypedExpr( node, exprCtx, user, null, callback );
|
|
556
|
+
if (when === traverseExpr.STOP)
|
|
557
|
+
return null;
|
|
558
|
+
++idx;
|
|
559
|
+
}
|
|
560
|
+
// Remark: no need to test `literal` in the following - ensured by CDL and CSN
|
|
561
|
+
// parser
|
|
562
|
+
while (args[idx]?.val === 'when' && ++idx < args.length) {
|
|
563
|
+
node = args[idx];
|
|
564
|
+
// be robust against corrupted sources:
|
|
565
|
+
if ((node.literal !== 'token' || ![ 'then', 'when', 'end' ].includes( node.val )) &&
|
|
566
|
+
traverseTypedExpr( args[idx++], exprCtx, user, when, callback ) === traverseExpr.STOP)
|
|
567
|
+
return null;
|
|
568
|
+
|
|
569
|
+
if (args[idx]?.val !== 'then')
|
|
570
|
+
continue;
|
|
571
|
+
node = args[++idx];
|
|
572
|
+
if (node &&
|
|
573
|
+
(node.literal !== 'token' || node.val !== 'when' && node.val !== 'end') &&
|
|
574
|
+
traverseTypedExpr( args[idx++], exprCtx, user, type, callback ) === traverseExpr.STOP)
|
|
575
|
+
return null;
|
|
576
|
+
}
|
|
577
|
+
if (args[idx]?.val === 'else') {
|
|
578
|
+
if (++idx < args.length &&
|
|
579
|
+
traverseTypedExpr( args[idx], exprCtx, user, type, callback ) === traverseExpr.STOP)
|
|
580
|
+
return null;
|
|
581
|
+
}
|
|
582
|
+
return [];
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
function traverseTypedPathItem( step, exprCtx, user, callback ) {
|
|
586
|
+
const exit = callback( step, exprCtx, user, null );
|
|
587
|
+
if (exit === traverseExpr.STOP)
|
|
588
|
+
return true;
|
|
589
|
+
if (step.where && exit !== traverseExpr.SKIP) {
|
|
590
|
+
const ctx = referenceSemantics[exprCtx].filter?.() || 'filter';
|
|
591
|
+
if (traverseTypedExpr( step.where, ctx, step, null, callback ) === traverseExpr.STOP)
|
|
592
|
+
return true;
|
|
593
|
+
}
|
|
594
|
+
if (step.args) {
|
|
595
|
+
const ctx = referenceSemantics[exprCtx].args?.() || exprCtx;
|
|
596
|
+
const args = Array.isArray( step.args ) ? step.args : Object.values( step.args );
|
|
597
|
+
// TODO: there should be no array `args` on path item
|
|
598
|
+
for (const arg of args) {
|
|
599
|
+
if (traverseTypedExpr( arg, ctx, user, arg.name, callback ) === traverseExpr.STOP)
|
|
600
|
+
return true;
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
return false;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
// Return absolute name for unchecked path `ref`. We first try searching for
|
|
607
|
+
// the path root starting from `env`. If it exists, return its absolute name
|
|
608
|
+
// appended with the name of the rest of the path. Otherwise, complain if
|
|
609
|
+
// `unchecked` is false, and set `ref.absolute` to the path name of `ref`.
|
|
610
|
+
// Used for collecting artifact extension.
|
|
611
|
+
//
|
|
612
|
+
// Return '' if the ref is good, but points to an element.
|
|
613
|
+
function resolveUncheckedPath( ref, refCtx, user ) {
|
|
614
|
+
const { path } = ref;
|
|
615
|
+
if (!path || path.broken) // incomplete type AST
|
|
616
|
+
return undefined;
|
|
617
|
+
const semantics = referenceSemantics[refCtx];
|
|
618
|
+
if (!semantics.isMainRef)
|
|
619
|
+
throw new CompilerAssertion( `resolveUncheckedPath() called for reference ctx '${ refCtx }'` );
|
|
620
|
+
if (!definedViaCdl( user ))
|
|
621
|
+
return (path.length === 1) ? path[0].id : '';
|
|
622
|
+
|
|
623
|
+
let art = getPathRoot( ref, semantics, user );
|
|
624
|
+
if (ref.scope && ref.scope !== 'global')
|
|
625
|
+
return ''; // TYPE OF, Main:elem
|
|
626
|
+
|
|
627
|
+
if (Array.isArray( art ))
|
|
628
|
+
art = art[0];
|
|
629
|
+
if (!art) {
|
|
630
|
+
return (semantics.dynamic !== modelDefinitions && !options.$cdsReplSupport)
|
|
631
|
+
? art
|
|
632
|
+
: pathName( path );
|
|
633
|
+
}
|
|
634
|
+
const first = (art.kind === 'using' ? art.extern : art.name).id;
|
|
635
|
+
return (path.length === 1) ? first : `${ first }.${ pathName( ref.path.slice(1) ) }`;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* Return artifact or element referred by the path in `ref`. The first
|
|
640
|
+
* environment we search in is `env`. If no such artifact or element exist,
|
|
641
|
+
* complain with message and return `undefined`. Record a dependency from
|
|
642
|
+
* `user` to the found artifact if `user` is provided.
|
|
643
|
+
*/
|
|
644
|
+
function resolvePath( ref, expected, user ) {
|
|
645
|
+
const origUser = user;
|
|
646
|
+
user = user._user || user;
|
|
647
|
+
if (ref == null) // no references -> nothing to do
|
|
648
|
+
return undefined;
|
|
649
|
+
if (ref._artifact !== undefined)
|
|
650
|
+
return ref._artifact;
|
|
651
|
+
|
|
652
|
+
const { path } = ref;
|
|
653
|
+
if (!path || path.broken || !path.length) {
|
|
654
|
+
// incomplete type AST or empty env (already reported)
|
|
655
|
+
return setArtifactLink( ref, undefined );
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
const s = referenceSemantics[expected];
|
|
659
|
+
const semantics = (typeof s === 'string') ? referenceSemantics[s] : s;
|
|
660
|
+
|
|
661
|
+
const r = getPathRoot( ref, semantics, origUser );
|
|
662
|
+
const root = r && acceptPathRoot( r, ref, semantics, origUser );
|
|
663
|
+
if (!root)
|
|
664
|
+
return setArtifactLink( ref, root );
|
|
665
|
+
|
|
666
|
+
let art = getPathItem( ref, semantics, user );
|
|
667
|
+
if (!art)
|
|
668
|
+
return setArtifactLink( ref, art );
|
|
669
|
+
|
|
670
|
+
// TODO: use isMainRef string value here?
|
|
671
|
+
const acceptFn = semantics.accept || (semantics.isMainRef ? a => a : acceptElemOrVar);
|
|
672
|
+
art = setArtifactLink( ref, acceptFn( art, user, ref, semantics ) );
|
|
673
|
+
|
|
674
|
+
// TODO TMP: remove noDep: an association does not depend on the target, only
|
|
675
|
+
// -- on its keys/on, which depend on certain target elements
|
|
676
|
+
if (art && user && !semantics.noDep) {
|
|
677
|
+
const location = artifactRefLocation( ref );
|
|
678
|
+
if (semantics.noDep === '' && art._main) { // assoc in FROM
|
|
679
|
+
environment( art, location, user );
|
|
680
|
+
const target = art._effectiveType?.target?._artifact;
|
|
681
|
+
if (target)
|
|
682
|
+
dependsOn( user._main, target, location, user );
|
|
683
|
+
if (target?.$calcDepElement)
|
|
684
|
+
dependsOn( user._main, target.$calcDepElement, location, user );
|
|
685
|
+
}
|
|
686
|
+
else if (art._main && art.kind !== 'select' || path[0]._navigation?.kind !== '$self') {
|
|
687
|
+
// no real dependency to bare $self (or actually: the underlying query)
|
|
688
|
+
dependsOn( user, art, location );
|
|
689
|
+
if (art.$calcDepElement)
|
|
690
|
+
dependsOn( user, art.$calcDepElement, location );
|
|
691
|
+
// Without on-demand resolve, we can simply signal 'undefined "x"'
|
|
692
|
+
// instead of 'illegal cycle' in the following case:
|
|
693
|
+
// element elem: type of elem.x;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
// TODO: really write dependency with expand/inline? write test
|
|
697
|
+
// (removing it is not incompatible => not urgent)
|
|
698
|
+
}
|
|
699
|
+
// TODO: follow FROM here, see csnRef - fromRef
|
|
700
|
+
return art;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* Resolve the type arguments of `artifact` according to the type `typeArtifact`.
|
|
705
|
+
* User is used for semantic message location.
|
|
706
|
+
*
|
|
707
|
+
* For builtins, for each property name `<prop>` in `typeArtifact.parameters`, we move a value
|
|
708
|
+
* from `art.$typeArgs` (a vector of numbers with locations) to `artifact.<prop>`.
|
|
709
|
+
*
|
|
710
|
+
* For non-builtins, we take either one or two arguments and interpret them
|
|
711
|
+
* as `length` or `precision`/`scale`.
|
|
712
|
+
*
|
|
713
|
+
* Left-over arguments are errors for non-builtins and warnings for builtins.
|
|
714
|
+
*
|
|
715
|
+
* TODO: move to define.js (and probably rename), rewrite (consider syntax-unexpected-argument)
|
|
716
|
+
*
|
|
717
|
+
* @param {object} artifact
|
|
718
|
+
* @param {object} typeArtifact
|
|
719
|
+
* @param {CSN.Artifact} user
|
|
720
|
+
*/
|
|
721
|
+
function resolveTypeArgumentsUnchecked( artifact, typeArtifact, user ) {
|
|
722
|
+
let args = artifact.$typeArgs || [];
|
|
723
|
+
const parameters = typeArtifact?.parameters || [];
|
|
724
|
+
|
|
725
|
+
if (args.length > 0 && parameters.length > 0) {
|
|
726
|
+
// For Builtins
|
|
727
|
+
for (let i = 0; i < parameters.length; ++i) {
|
|
728
|
+
const par = parameters[i].name || parameters[i];
|
|
729
|
+
if (!artifact[par] && i < args.length)
|
|
730
|
+
artifact[par] = args[i];
|
|
731
|
+
}
|
|
732
|
+
args = args.slice( parameters.length );
|
|
733
|
+
// TODO: we could issue syntax-unexpected-argument here
|
|
734
|
+
}
|
|
735
|
+
else if (args.length > 0 && !typeArtifact?.builtin) {
|
|
736
|
+
// One or two arguments are interpreted as either length or precision/scale.
|
|
737
|
+
// For builtins, we know what arguments are expected, and we do not need this mapping.
|
|
738
|
+
// Also, we expect non-structured types.
|
|
739
|
+
if (args.length === 1) {
|
|
740
|
+
artifact.length = args[0];
|
|
741
|
+
args = args.slice(1);
|
|
742
|
+
}
|
|
743
|
+
else if (args.length === 2) {
|
|
744
|
+
artifact.precision = args[0];
|
|
745
|
+
artifact.scale = args[1];
|
|
746
|
+
args = args.slice(2);
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
if (!artifact.$typeArgs)
|
|
751
|
+
return;
|
|
752
|
+
|
|
753
|
+
// Warn about left-over arguments.
|
|
754
|
+
if (args.length > 0) {
|
|
755
|
+
const loc = [ args[0].location, user ];
|
|
756
|
+
if (typeArtifact?.builtin)
|
|
757
|
+
message( 'type-ignoring-argument', loc, { art: typeArtifact } );
|
|
758
|
+
// when the parser exits rule unsuccessfully/prematurely, $typeArgs might
|
|
759
|
+
// still have a length > 2 → no testMode dump
|
|
760
|
+
}
|
|
761
|
+
artifact.$typeArgs = undefined;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
// Resolve the n-1 path steps before the definition name for LSP.
|
|
765
|
+
function resolveDefinitionName( art ) {
|
|
766
|
+
const path = art?.name?.path;
|
|
767
|
+
if (!art || art._main || !path || path.length <= 1)
|
|
768
|
+
return;
|
|
769
|
+
|
|
770
|
+
// Don't resolve paths in an annotation as a definition!
|
|
771
|
+
const definitions = art.kind === 'annotation' ? model.vocabularies : model.definitions;
|
|
772
|
+
|
|
773
|
+
let name = art.name.id;
|
|
774
|
+
if (art.kind === 'namespace') // namespace-statements are ref-only.
|
|
775
|
+
setArtifactLink( path[path.length - 1], definitions[name] || false );
|
|
776
|
+
|
|
777
|
+
for (let i = path.length - 1; i > 0; --i) {
|
|
778
|
+
name = name.substring(0, name.length - path[i].id.length - 1);
|
|
779
|
+
setArtifactLink( path[i - 1], definitions[name] || false );
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
function getPathRoot( { path, scope, location }, semantics, user ) {
|
|
784
|
+
// TODO: use string value of isMainRef?
|
|
785
|
+
const head = path[0];
|
|
786
|
+
if (!head || !head.id)
|
|
787
|
+
return undefined; // parse error
|
|
788
|
+
if (head._artifact !== undefined)
|
|
789
|
+
return head._artifact;
|
|
790
|
+
if (user.$extended && user._outer && !semantics.isMainRef)
|
|
791
|
+
user = user._outer;
|
|
792
|
+
let ruser = user._user || user; // TODO: nicer name if we keep this
|
|
793
|
+
// TODO: re-think _user link
|
|
794
|
+
if (ruser._outer && !semantics.isMainRef) {
|
|
795
|
+
if (ruser.kind === '$annotation')
|
|
796
|
+
ruser = ruser._outer; // for elem refs, use elem as real "user"
|
|
797
|
+
else if (ruser._outer.kind === '$annotation')
|
|
798
|
+
ruser = ruser._outer._outer;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
// Handle expand/inline before `type of`, :param, global (internally for CDL):
|
|
802
|
+
if (user._columnParent && !semantics.isMainRef) { // in expand/inline
|
|
803
|
+
const func = semantics.nestedColumn;
|
|
804
|
+
if (!func)
|
|
805
|
+
throw new CompilerAssertion( 'Unexpected ref context in nested column' );
|
|
806
|
+
const ctx = func();
|
|
807
|
+
semantics = (typeof ctx === 'string')
|
|
808
|
+
? ({ ...semantics, ...referenceSemantics[ctx] })
|
|
809
|
+
: ctx;
|
|
810
|
+
}
|
|
811
|
+
if (typeof scope === 'string') { // typeOf, param, global
|
|
812
|
+
const func = semantics[scope] || scope === 'param' && paramUnsupported;
|
|
813
|
+
// 'param' is a user scope → useful default (error msg ref-unexpected-param)
|
|
814
|
+
// 'global' and 'typeOf' are internal scopes of the compiler → dump if not provided
|
|
815
|
+
if (!func)
|
|
816
|
+
throw new CompilerAssertion( `Unexpected scope ${ scope }, no handler defined in context` );
|
|
817
|
+
const ctx = func( ruser, path, location, semantics );
|
|
818
|
+
semantics = (typeof ctx === 'string') ? referenceSemantics[ctx] : ctx;
|
|
819
|
+
if (!semantics)
|
|
820
|
+
return setArtifactLink( head, null );
|
|
821
|
+
}
|
|
822
|
+
const valid = [];
|
|
823
|
+
|
|
824
|
+
// Search in lexical environments, including $self/$projection:
|
|
825
|
+
const { isMainRef } = semantics;
|
|
826
|
+
const lexical = semantics.lexical?.( ruser ); // TODO: _columnParent?
|
|
827
|
+
if (lexical) {
|
|
828
|
+
const [ nextProp, dictProp ] = (isMainRef)
|
|
829
|
+
? [ '_block', 'artifacts' ]
|
|
830
|
+
: [ '_$next', '$tableAliases' ];
|
|
831
|
+
// let notApplicable = ...; // for table aliases in JOIN-ON and UNION orderBy
|
|
832
|
+
for (let env = lexical; env; env = env[nextProp]) {
|
|
833
|
+
const dict = env[dictProp] || Object.create( null );
|
|
834
|
+
const r = dict[head.id];
|
|
835
|
+
if (acceptLexical( r, path, semantics, user ))
|
|
836
|
+
return setArtifactLink( head, r );
|
|
837
|
+
valid.push( dict );
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
// Search in $special (excluding $self/$projection) and dynamic environment:
|
|
842
|
+
const dynamicDict = semantics.dynamic( ruser, user._user && user._artifact );
|
|
843
|
+
if (!dynamicDict) // avoid consequential errors
|
|
844
|
+
return setArtifactLink( head, null );
|
|
845
|
+
|
|
846
|
+
const isVar = (semantics.dollar && head.id.charAt( 0 ) === '$');
|
|
847
|
+
const dict = (isVar) ? model.$magicVariables.elements : dynamicDict;
|
|
848
|
+
const r = dict[head.id] || // or a ref like "MyEntity.texts" in CSN
|
|
849
|
+
isMainRef && Functions.generateOnDemand?.( head.id );
|
|
850
|
+
if (r)
|
|
851
|
+
return setArtifactLink( head, r );
|
|
852
|
+
|
|
853
|
+
if (!semantics.dollar) {
|
|
854
|
+
valid.push( dynamicDict );
|
|
855
|
+
const noGen = !definedViaCdl( ruser );
|
|
856
|
+
if (isMainRef) // eslint-disable-next-line no-return-assign
|
|
857
|
+
valid.forEach( ( d, idx ) => (valid[idx] = removeGapArtifact( d, noGen )) );
|
|
858
|
+
}
|
|
859
|
+
else {
|
|
860
|
+
const filterFn = semantics.variableFilter || removeRestrictedVariables;
|
|
861
|
+
valid.push( filterFn( model.$magicVariables.elements ),
|
|
862
|
+
removeDollarNames( dynamicDict ) );
|
|
863
|
+
}
|
|
864
|
+
// TODO: streamline function arguments (probably: user, path, semantics )
|
|
865
|
+
const undef = semantics.notFound?.( user._user || user, head, valid, dynamicDict,
|
|
866
|
+
!isMainRef && user._user && user._artifact,
|
|
867
|
+
path, semantics );
|
|
868
|
+
return setArtifactLink( head, undef || null );
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
// Return artifact or element referred by path (array of ids) `tail`. The
|
|
872
|
+
// search environment (for the first path item) is `arg`. For messages about
|
|
873
|
+
// missing artifacts (as opposed to elements), provide the `head` (first
|
|
874
|
+
// element item in the path)
|
|
875
|
+
// TODO - think about setting _navigation for all $navElement – the
|
|
876
|
+
// "ref: ['tabAlias']: inline: […]" handling might be easier
|
|
877
|
+
// (no _columnParent consultation for key prop and renaming support)
|
|
878
|
+
function getPathItem( ref, semantics, user ) {
|
|
879
|
+
// let art = (headArt && headArt.kind === '$tableAlias') ? headArt._origin : headArt;
|
|
880
|
+
const { path } = ref;
|
|
881
|
+
// how many path items are for artifacts (the rest are for elements):
|
|
882
|
+
let artItemsCount = 0;
|
|
883
|
+
const { isMainRef } = semantics;
|
|
884
|
+
if (isMainRef) {
|
|
885
|
+
artItemsCount = (typeof ref.scope === 'number' && ref.scope) ||
|
|
886
|
+
(ref.scope ? 1 : path.length);
|
|
887
|
+
}
|
|
888
|
+
let art = null;
|
|
889
|
+
const elementsEnv = semantics.navigation || environment;
|
|
890
|
+
let index = -1;
|
|
891
|
+
for (const item of path) {
|
|
892
|
+
++index;
|
|
893
|
+
--artItemsCount;
|
|
894
|
+
if (!item?.id) // incomplete AST due to parse error
|
|
895
|
+
return undefined;
|
|
896
|
+
if (item._artifact) { // should be there on first path element
|
|
897
|
+
art = item._artifact;
|
|
898
|
+
continue;
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
const prev = art;
|
|
902
|
+
const envFn = (artItemsCount >= 0) ? artifactsEnv : elementsEnv;
|
|
903
|
+
// TOOD: call envFn with location of last item (for dependency error)
|
|
904
|
+
const env = envFn( art, path[index - 1].location, user );
|
|
905
|
+
let found = env && env[item.id]; // not env?.[…] - keep a `0`
|
|
906
|
+
if (!found && found !== 0 && artItemsCount >= 0)
|
|
907
|
+
found = Functions.generateOnDemand?.( `${ prev.name.id }.${ item.id }` );
|
|
908
|
+
|
|
909
|
+
// Reject `$self.$_column_1`: TODO: necessary to do here again?
|
|
910
|
+
art = setArtifactLink( item, (found?.name?.$inferred === '$internal') ? undefined : found );
|
|
911
|
+
|
|
912
|
+
if (!art) {
|
|
913
|
+
// TODO (done?): if `env` was 0, we might set a dependency to induce an
|
|
914
|
+
// illegal-cycle error instead of reporting via `errorNotFound`.
|
|
915
|
+
const notFound = (artItemsCount >= 0) ? semantics.notFound : undefinedItemElement;
|
|
916
|
+
// TODO: streamline function arguments (probably: user, path, semantics, prev )
|
|
917
|
+
// false returned by semantics.navigation: no further error:
|
|
918
|
+
if (env !== false) {
|
|
919
|
+
const exp = (artItemsCount >= 0)
|
|
920
|
+
? removeGapArtifact( env, !definedViaCdl( user ) )
|
|
921
|
+
: env;
|
|
922
|
+
notFound( user, item, [ exp ], null, prev, path, semantics );
|
|
923
|
+
}
|
|
924
|
+
return null;
|
|
925
|
+
}
|
|
926
|
+
// need to do that here, because we also need to disallow Service.AutoExposed:elem
|
|
927
|
+
// TODO: but Service.AutoExposed.NotAuto should be fine
|
|
928
|
+
if (isMainRef && isMainRef !== 'all' && artItemsCount === 0) {
|
|
929
|
+
if (art.kind === 'namespace') {
|
|
930
|
+
if (Functions.generateOnDemand?.( art ) ||
|
|
931
|
+
isMainRef === 'no-leaf-gap' && art._subArtifacts)
|
|
932
|
+
continue; // art is generated entity assigned to gap object
|
|
933
|
+
if (env !== false) {
|
|
934
|
+
semantics.notFound( user, item, [ removeGapArtifact( env, !definedViaCdl( user ) ) ],
|
|
935
|
+
null, prev, path, semantics );
|
|
936
|
+
}
|
|
937
|
+
return null;
|
|
938
|
+
}
|
|
939
|
+
else if (art.$inferred === 'autoexposed' && !user.$inferred &&
|
|
940
|
+
isMainRef !== 'no-leaf-gap') {
|
|
941
|
+
// Depending on the processing sequence, the following could be a
|
|
942
|
+
// simple 'ref-undefined-def' - TODO: which we
|
|
943
|
+
// could "change" to this message at the end of compile():
|
|
944
|
+
// HINT: this does not appear anymore
|
|
945
|
+
error( 'ref-unexpected-autoexposed', [ item.location, user ], { art },
|
|
946
|
+
'An auto-exposed entity can\'t be referred to - expose entity $(ART) explicitly' );
|
|
947
|
+
return null; // continuation semantics: like “not found”
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
return art;
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* Resolve the _path-root_ only. Used for rewriting annotation paths.
|
|
956
|
+
*
|
|
957
|
+
* @param ref
|
|
958
|
+
* @param {string} expected
|
|
959
|
+
* @param user
|
|
960
|
+
*/
|
|
961
|
+
function resolvePathRoot( ref, expected, user ) {
|
|
962
|
+
if (ref == null || !ref.path) // no references -> nothing to do
|
|
963
|
+
return undefined;
|
|
964
|
+
const s = referenceSemantics[expected];
|
|
965
|
+
const semantics = (typeof s === 'string') ? referenceSemantics[s] : s;
|
|
966
|
+
const r = getPathRoot( ref, semantics, user );
|
|
967
|
+
return r && acceptPathRoot( r, ref, semantics, user );
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
// Helper functions for resolve[Unchecked]Path, getPath{Root,Item}: -----------
|
|
971
|
+
|
|
972
|
+
function acceptLexical( art, path, semantics, user ) {
|
|
973
|
+
if (semantics.isMainRef || !art)
|
|
974
|
+
return !!art;
|
|
975
|
+
|
|
976
|
+
// Non-global lexical are table aliases, mixins and $self, $projection, $parameters,
|
|
977
|
+
// Do not accept a lonely table alias and `$projection`
|
|
978
|
+
// TODO: test table alias and mixin named `$projection`
|
|
979
|
+
if (path.length !== 1 || user.expand || user.inline) {
|
|
980
|
+
if (semantics.rewriteProjectionToSelf &&
|
|
981
|
+
art.kind === '$self' && path[0].id === '$projection') {
|
|
982
|
+
// Rewrite $projection to $self
|
|
983
|
+
path[0].id = '$self';
|
|
984
|
+
}
|
|
985
|
+
return art.name?.$inferred !== '$internal'; // not a compiler-generated internal alias
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
// allow mixins, $self, and `up_` in anonymous target aspect (is $navElement):
|
|
989
|
+
return art.kind === 'mixin' ||
|
|
990
|
+
art.kind === '$self' && path[0].id === '$self' ||
|
|
991
|
+
art.kind === '$navElement';
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
function acceptPathRoot( art, ref, semantics, user ) {
|
|
995
|
+
const { path } = ref;
|
|
996
|
+
const [ head ] = path;
|
|
997
|
+
if (Array.isArray( art ))
|
|
998
|
+
return getAmbiguousRefLink( art, head, user );
|
|
999
|
+
if (semantics.rejectRoot?.( art, user, ref, semantics ))
|
|
1000
|
+
return null;
|
|
1001
|
+
|
|
1002
|
+
switch (art.kind) {
|
|
1003
|
+
case 'using': {
|
|
1004
|
+
const def = model.definitions[art.extern.id] ||
|
|
1005
|
+
Functions.createGapArtifact( art.extern.id, art.extern.location );
|
|
1006
|
+
if (def.$duplicates)
|
|
1007
|
+
return false;
|
|
1008
|
+
art = setArtifactLink( head, def ); // we do not want to see the using
|
|
1009
|
+
if (art.kind !== 'namespace')
|
|
1010
|
+
return art;
|
|
1011
|
+
}
|
|
1012
|
+
/* FALLTHROUGH */
|
|
1013
|
+
case 'namespace': {
|
|
1014
|
+
if (semantics.isMainRef === 'all' ||
|
|
1015
|
+
semantics.isMainRef === 'no-leaf-gap' && art._subArtifacts ||
|
|
1016
|
+
path.length !== 1 && ref.scope !== 1 ||
|
|
1017
|
+
// "MyEntity.texts" in CSN or via `using` which is (at the moment)
|
|
1018
|
+
// just a gap artifact
|
|
1019
|
+
Functions.generateOnDemand?.( art ))
|
|
1020
|
+
return art;
|
|
1021
|
+
|
|
1022
|
+
const valid = [];
|
|
1023
|
+
const lexical = userBlock( user );
|
|
1024
|
+
if (lexical) {
|
|
1025
|
+
for (let env = lexical; env; env = env._block)
|
|
1026
|
+
valid.push( removeGapArtifact( env.artifacts || Object.create( null ) ) );
|
|
1027
|
+
}
|
|
1028
|
+
const dynamicDict = semantics.dynamic( user );
|
|
1029
|
+
valid.push( removeGapArtifact( dynamicDict, !definedViaCdl( user ) ) );
|
|
1030
|
+
semantics.notFound?.( user._user || user, head, valid, model.definitions,
|
|
1031
|
+
null, path, semantics );
|
|
1032
|
+
|
|
1033
|
+
return null;
|
|
1034
|
+
}
|
|
1035
|
+
case 'mixin': {
|
|
1036
|
+
// use a source element having that name if in `extend … with` (columns or groupBy):
|
|
1037
|
+
const $extended = user._user?.$extended ?? user.$extended;
|
|
1038
|
+
const elem = $extended && art._parent._combined[head.id];
|
|
1039
|
+
if (elem) {
|
|
1040
|
+
path.$prefix = elem._parent.name.id; // prepend alias name
|
|
1041
|
+
if ($extended === 'columns') {
|
|
1042
|
+
warning( 'ref-special-in-extend', [ head.location, user ],
|
|
1043
|
+
{ '#': 'mixin', id: head.id, art: elem._origin._main } );
|
|
1044
|
+
}
|
|
1045
|
+
else {
|
|
1046
|
+
error( 'ref-unexpected-in-extend', [ head.location, user ], {
|
|
1047
|
+
'#': 'mixin',
|
|
1048
|
+
keyword: $extended,
|
|
1049
|
+
id: head.id,
|
|
1050
|
+
art: elem._origin._main,
|
|
1051
|
+
} );
|
|
1052
|
+
}
|
|
1053
|
+
setLink( head, '_navigation', elem );
|
|
1054
|
+
return setArtifactLink( head, elem._origin );
|
|
1055
|
+
}
|
|
1056
|
+
return setLink( head, '_navigation', art );
|
|
1057
|
+
}
|
|
1058
|
+
case '$navElement': {
|
|
1059
|
+
setLink( head, '_navigation', art );
|
|
1060
|
+
return setArtifactLink( head, art._origin );
|
|
1061
|
+
}
|
|
1062
|
+
case '$tableAlias': {
|
|
1063
|
+
// use a source element having that name if in `extend … with` (columns or groupBy):
|
|
1064
|
+
const $extended = user._user?.$extended ?? user.$extended;
|
|
1065
|
+
// if query source has duplicates, table alias has no elements
|
|
1066
|
+
const elem = $extended && art.elements?.[head.id];
|
|
1067
|
+
if (elem) {
|
|
1068
|
+
path.$prefix = art.name.id; // prepend alias name
|
|
1069
|
+
if ($extended === 'columns') {
|
|
1070
|
+
warning( 'ref-special-in-extend', [ head.location, user ],
|
|
1071
|
+
{ '#': 'alias', id: head.id, art: elem._origin._main } );
|
|
1072
|
+
}
|
|
1073
|
+
else {
|
|
1074
|
+
error( 'ref-unexpected-in-extend', [ head.location, user ], {
|
|
1075
|
+
'#': 'alias',
|
|
1076
|
+
keyword: $extended,
|
|
1077
|
+
id: head.id,
|
|
1078
|
+
art: elem._origin._main,
|
|
1079
|
+
} );
|
|
1080
|
+
}
|
|
1081
|
+
setLink( head, '_navigation', elem );
|
|
1082
|
+
return setArtifactLink( head, elem._origin );
|
|
1083
|
+
}
|
|
1084
|
+
else if ($extended && art.elements) {
|
|
1085
|
+
warning( 'ref-deprecated-in-extend', [ head.location, user ],
|
|
1086
|
+
{ '#': $extended, id: head.id } );
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
/* FALLTHROUGH */
|
|
1090
|
+
case '$self': { // TODO: remove $projection from CC
|
|
1091
|
+
setLink( head, '_navigation', art );
|
|
1092
|
+
setArtifactLink( head, art._origin ); // query source or leading query in FROM
|
|
1093
|
+
if (!art._origin)
|
|
1094
|
+
return art._origin;
|
|
1095
|
+
// if just table alias (with expand), mark `user` with `$noOrigin` to indicate
|
|
1096
|
+
// that the corresponding entity should not be put as $origin into the CSN.
|
|
1097
|
+
// TODO: remove again, should be easy enough in to-csn without.
|
|
1098
|
+
if (path.length === 1 && art.kind === '$tableAlias')
|
|
1099
|
+
(user._user || user).$noOrigin = true;
|
|
1100
|
+
if (head.id === '$projection' &&
|
|
1101
|
+
(user.kind === '$annotation' || user._outer?.kind === '$annotation')) {
|
|
1102
|
+
error( 'ref-unsupported-projection', [ head.location, user ],
|
|
1103
|
+
{ code: '$projection', newcode: '$self' },
|
|
1104
|
+
'$(CODE) is not supported in annotations; replace by $(NEWCODE)' );
|
|
1105
|
+
}
|
|
1106
|
+
return art;
|
|
1107
|
+
}
|
|
1108
|
+
case '$parameters': {
|
|
1109
|
+
// TODO: if ref.scope='param' is handled, test that here, too ?
|
|
1110
|
+
const id = path[1]?.id;
|
|
1111
|
+
const code = id ? `$parameters.${ id }` : '$parameters';
|
|
1112
|
+
const newcode = id ? `:${ id }` : ':‹param›';
|
|
1113
|
+
message( 'ref-obsolete-parameters', [ head.location, user ], { code, newcode },
|
|
1114
|
+
'Obsolete $(CODE) - replace by $(NEWCODE)' );
|
|
1115
|
+
return art;
|
|
1116
|
+
}
|
|
1117
|
+
case 'builtin': {
|
|
1118
|
+
// TODO: use properties in builtins
|
|
1119
|
+
if (art.name.id === '$at') {
|
|
1120
|
+
message( 'ref-deprecated-variable', [ head.location, user ],
|
|
1121
|
+
{ code: '$at', newcode: '$valid' },
|
|
1122
|
+
'$(CODE) is deprecated; use $(NEWCODE) instead' );
|
|
1123
|
+
}
|
|
1124
|
+
else if (art.$restricted && semantics.accept !== acceptElemOrAnyVar) {
|
|
1125
|
+
error( 'ref-unexpected-var', [ head.location, user ],
|
|
1126
|
+
{ '#': 'annotation', name: head.id } );
|
|
1127
|
+
return null; // no further error on `unknown` for $draft.unknown
|
|
1128
|
+
}
|
|
1129
|
+
return art;
|
|
1130
|
+
}
|
|
1131
|
+
default:
|
|
1132
|
+
return art;
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
function getAmbiguousRefLink( arr, head, user ) {
|
|
1137
|
+
if (arr[0].kind !== '$navElement' || arr.some( e => e._parent.$duplicates ))
|
|
1138
|
+
return false;
|
|
1139
|
+
// only complain about ambiguous source elements if we do not have
|
|
1140
|
+
// duplicate table aliases, only mention non-ambiguous source elems
|
|
1141
|
+
const uniqueNames = arr.filter( e => !e.$duplicates );
|
|
1142
|
+
if (uniqueNames.length) {
|
|
1143
|
+
const names = uniqueNames.filter( e => e._parent.name?.$inferred !== '$internal' )
|
|
1144
|
+
.map( e => `${ e._parent.name.id }.${ e.name.id }` );
|
|
1145
|
+
let variant = names.length === uniqueNames.length ? 'std' : 'few';
|
|
1146
|
+
if (names.length === 0)
|
|
1147
|
+
variant = 'none';
|
|
1148
|
+
error( 'ref-ambiguous', [ head.location, user ], { '#': variant, id: head.id, names } );
|
|
1149
|
+
}
|
|
1150
|
+
return false;
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
// Functions for the secondary reference semantics ----------------------------
|
|
1154
|
+
|
|
1155
|
+
function typeOfSemantics( user, [ head ] ) {
|
|
1156
|
+
// `type of` is only allowed for (sub) elements of main artifacts
|
|
1157
|
+
while (!user.kind && user._outer)
|
|
1158
|
+
user = user._outer;
|
|
1159
|
+
let struct = user;
|
|
1160
|
+
while (struct.kind === 'element')
|
|
1161
|
+
struct = struct._parent;
|
|
1162
|
+
if (struct === user._main && struct.kind !== 'annotation')
|
|
1163
|
+
return '$typeOf';
|
|
1164
|
+
error( 'type-unexpected-typeof', [ head.location, user ],
|
|
1165
|
+
{ keyword: 'type of', '#': struct.kind } );
|
|
1166
|
+
return false;
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
function paramUnsupported( user, _path, location ) {
|
|
1170
|
+
error( 'ref-unexpected-scope', [ location, user ], // TODO: ref-unexpected-param
|
|
1171
|
+
// why an extra text for calculated elements? or separate for all?
|
|
1172
|
+
{ '#': (user.$syntax === 'calc' ? 'calc' : 'std') } );
|
|
1173
|
+
return false;
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
// Functions for semantics.lexical: -------------------------------------------
|
|
1177
|
+
|
|
1178
|
+
function userBlock( user ) {
|
|
1179
|
+
return definedViaCdl( user ) && user._block;
|
|
1180
|
+
}
|
|
1181
|
+
function justDollarAliases( user ) {
|
|
1182
|
+
const query = userQuery( user );
|
|
1183
|
+
if (!query)
|
|
1184
|
+
return user._main || user; // TODO: also contains `up_` for aspects; remove
|
|
1185
|
+
// query.$tableAliases contains both aliases and $self/$projection
|
|
1186
|
+
const aliases = query.$tableAliases;
|
|
1187
|
+
const r = Object.create( null );
|
|
1188
|
+
if (aliases.$self.kind === '$self')
|
|
1189
|
+
r.$self = aliases.$self;
|
|
1190
|
+
// TODO: disallow $projection for ON conditions all together
|
|
1191
|
+
if (aliases.$projection?.kind === '$self')
|
|
1192
|
+
r.$projection = aliases.$projection;
|
|
1193
|
+
const { $parameters } = user._main.$tableAliases;
|
|
1194
|
+
if ($parameters) // no need to test `kind`, just compiler-set “aliases”
|
|
1195
|
+
r.$parameters = $parameters;
|
|
1196
|
+
return { $tableAliases: r };
|
|
1197
|
+
}
|
|
1198
|
+
function tableAliasesAndSelf( user ) {
|
|
1199
|
+
return userQuery( user ) || user._main || user;
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
// Functions called via semantics.dynamic: ------------------------------------
|
|
1203
|
+
|
|
1204
|
+
function modelDefinitions() {
|
|
1205
|
+
return model.definitions;
|
|
1206
|
+
}
|
|
1207
|
+
function modelBuiltinsOrDefinitions( user ) {
|
|
1208
|
+
if (!definedViaCdl( user ))
|
|
1209
|
+
return model.definitions;
|
|
1210
|
+
if (!options.$cdsReplSupport)
|
|
1211
|
+
return model.$builtins;
|
|
1212
|
+
return Object.assign( { __proto__: null }, model.definitions, model.$builtins );
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
function artifactParams( user ) {
|
|
1216
|
+
// TODO: already report error here if no parameters?
|
|
1217
|
+
return boundActionOrMain( user ).params || Object.create( null );
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
function boundActionOrMain( art ) {
|
|
1221
|
+
while (art._main) {
|
|
1222
|
+
if (art.kind === 'action' || art.kind === 'function')
|
|
1223
|
+
return art;
|
|
1224
|
+
art = art._parent;
|
|
1225
|
+
}
|
|
1226
|
+
return art;
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
function typeOfParentDict( user ) {
|
|
1230
|
+
// CDL produces the following XSN representation for `type of elem`:
|
|
1231
|
+
// { path: [{ id: 'type of'}, { id: 'elem'}], scope: 'typeOf' }
|
|
1232
|
+
return { 'type of': user._parent };
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
function targetElements( user, pathItemArtifact ) {
|
|
1236
|
+
// has already been computed - no further `navigationEnv` args needed
|
|
1237
|
+
const env = navigationEnv( pathItemArtifact || user._parent );
|
|
1238
|
+
// do not use env?.elements: a `0` should stay a `0`:
|
|
1239
|
+
return env && env.elements;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
function combinedSourcesOrParentElements( user ) {
|
|
1243
|
+
const query = userQuery( user );
|
|
1244
|
+
if (!query)
|
|
1245
|
+
return environment( user._main ? user._parent : user );
|
|
1246
|
+
return query._combined; // TODO: do we need query._parent._combined ?
|
|
1247
|
+
}
|
|
1248
|
+
function parentElements( user ) {
|
|
1249
|
+
// Note: We could have `$self` in bound actions refer to its entity, but reject it now.
|
|
1250
|
+
// If users request it, we can either allow it later or point them to binding parameters.
|
|
1251
|
+
const useParent = user._main &&
|
|
1252
|
+
user.kind !== 'select' &&
|
|
1253
|
+
user.kind !== 'action' &&
|
|
1254
|
+
user.kind !== 'function';
|
|
1255
|
+
return environment( useParent ? user._parent : user );
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
function parentElementsOrKeys( user ) {
|
|
1259
|
+
// annotations on foreign keys only ever have access to their keys (except of course via $self)
|
|
1260
|
+
if (user.kind === 'key')
|
|
1261
|
+
return user._parent?.foreignKeys || Object.create( null );
|
|
1262
|
+
return parentElements( user );
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
function queryElements( user ) {
|
|
1266
|
+
return environment( user );
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
function nestedElements( user ) {
|
|
1270
|
+
const colParent = user._columnParent;
|
|
1271
|
+
Functions.effectiveType( colParent ); // set _origin
|
|
1272
|
+
const path = colParent?.value?.path;
|
|
1273
|
+
if (!path?.length)
|
|
1274
|
+
return undefined;
|
|
1275
|
+
// also set dependency when navigating along assoc → provide location
|
|
1276
|
+
return environment( colParent._origin, path[path.length - 1].location, colParent );
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
// Function called via semantics.navigation: ----------------------------------
|
|
1280
|
+
// default is function `environment`
|
|
1281
|
+
|
|
1282
|
+
function artifactsEnv( art ) {
|
|
1283
|
+
return art._subArtifacts || Object.create( null );
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
function staticTarget( prev ) {
|
|
1287
|
+
let env = navigationEnv( prev ); // we do not write dependencies for assoc navigation
|
|
1288
|
+
if (env === 0)
|
|
1289
|
+
return 0;
|
|
1290
|
+
// Last try - Composition with targetAspect only (in aspect def):
|
|
1291
|
+
const target = env?.targetAspect;
|
|
1292
|
+
if (target) {
|
|
1293
|
+
if (target.elements)
|
|
1294
|
+
return target.elements;
|
|
1295
|
+
env = resolvePath( env.targetAspect, 'targetAspect', env );
|
|
1296
|
+
}
|
|
1297
|
+
return env?.elements || Object.create( null );
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
function targetNavigation( art, location, user ) {
|
|
1301
|
+
const env = navigationEnv( art, location, user, false );
|
|
1302
|
+
// do not use env?.elements: a `0`/false should stay a `0`/false:
|
|
1303
|
+
return env && env.elements;
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
function assocOnNavigation( art, location, user ) {
|
|
1307
|
+
const env = navigationEnv( art, location, user, null );
|
|
1308
|
+
// `null` means: do not write a dependency from target of any association
|
|
1309
|
+
// otherwise “following” own assoc would lead to cycle.
|
|
1310
|
+
// TODO: disallow navigation other than of own assoc, and to foreign keys
|
|
1311
|
+
// This way (not here though, but later in resolve.js)
|
|
1312
|
+
if (env === 0)
|
|
1313
|
+
return 0;
|
|
1314
|
+
return env?.elements || Object.create( null );
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
function calcElemNavigation( art, location, user ) {
|
|
1318
|
+
const env = navigationEnv( art, location, user, 'calc' );
|
|
1319
|
+
if (env === 0)
|
|
1320
|
+
return 0;
|
|
1321
|
+
return env?.elements || Object.create( null );
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
// Return effective search environment provided by artifact `art`, i.e. the
|
|
1325
|
+
// `artifacts` or `elements` dictionary. For the latter, follow the `type`
|
|
1326
|
+
// chain and resolve the association `target`. View elements are calculated
|
|
1327
|
+
// on demand.
|
|
1328
|
+
// TODO: what about location/user when called from getPath ?
|
|
1329
|
+
// TODO: think of removing `|| Object.create(null)`.
|
|
1330
|
+
// (if not possible, move to second param position)
|
|
1331
|
+
function environment( art, location, user ) {
|
|
1332
|
+
const env = navigationEnv( art, location, user, 'nav' );
|
|
1333
|
+
if (env === 0)
|
|
1334
|
+
return 0;
|
|
1335
|
+
return env?.elements || Object.create( null );
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
function navigationEnv( art, location, user, assocSpec ) {
|
|
1339
|
+
// = effectiveType() on from-path, TODO: should actually already part of
|
|
1340
|
+
// resolvePath() on FROM
|
|
1341
|
+
if (!art)
|
|
1342
|
+
return undefined;
|
|
1343
|
+
let type = Functions.effectiveType( art );
|
|
1344
|
+
while (type?.items) // TODO: disallow navigation to many sometimes
|
|
1345
|
+
type = Functions.effectiveType( type.items );
|
|
1346
|
+
if (!type?.target)
|
|
1347
|
+
return type;
|
|
1348
|
+
|
|
1349
|
+
if (assocSpec === false) { // TODO: move to getPathItem
|
|
1350
|
+
error( null, [ location, user ], {},
|
|
1351
|
+
'Following an association is not allowed in an association key definition' );
|
|
1352
|
+
return false;
|
|
1353
|
+
} // TODO: else warning for assoc usage with falsy assocSpec
|
|
1354
|
+
const target = type?.target._artifact;
|
|
1355
|
+
if (!target)
|
|
1356
|
+
return target;
|
|
1357
|
+
// TODO: really write final dependency with expand/inline?
|
|
1358
|
+
if (target && assocSpec && user) {
|
|
1359
|
+
if (assocSpec !== 'calc')
|
|
1360
|
+
dependsOn( user._main || user, target, location || user.location, user );
|
|
1361
|
+
else
|
|
1362
|
+
dependsOn( user.$calcDepElement, target, location || user.location, user );
|
|
1363
|
+
}
|
|
1364
|
+
const effectiveTarget = Functions.effectiveType( target );
|
|
1365
|
+
// if (effectiveTarget === 0 && location)
|
|
1366
|
+
// dependsOn( user, user, (user.target || user.type || user.value || user).location );
|
|
1367
|
+
// console.log('NT:',assocSpec,!!user,target)
|
|
1368
|
+
return effectiveTarget;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
// Functions called via semantics.notFound: -----------------------------------
|
|
1372
|
+
|
|
1373
|
+
function undefinedDefinition( user, item, valid, _dict, prev, _path, semantics ) {
|
|
1374
|
+
// in a CSN source, for `using`, or if not the first path item, only one env
|
|
1375
|
+
// was tested (valid.length 1) → don't mention `using` declaration
|
|
1376
|
+
const name = (prev) ? `${ prev.name.id }.${ item.id }` : item.id;
|
|
1377
|
+
const msg = (valid.length > 1 && proposeUsingDecl( name, valid.at( -2 ) ))
|
|
1378
|
+
? 'using'
|
|
1379
|
+
: 'std';
|
|
1380
|
+
signalNotFound( 'ref-undefined-def', [ item.location, user ], valid,
|
|
1381
|
+
{ '#': msg, art: name, keyword: 'using' }, semantics );
|
|
1382
|
+
// TODO: improve text, use text variant for: "or builtin" or "definitions" or none
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
function undefinedFromReference( user, item, valid, dict, prev, path, semantics ) {
|
|
1386
|
+
const base = Functions.effectiveType?.( prev );
|
|
1387
|
+
if (Functions.effectiveType?.( base?.elements?.[item.id] )?.target)
|
|
1388
|
+
signalElementHint( user, item, valid, prev, semantics, path );
|
|
1389
|
+
else
|
|
1390
|
+
undefinedDefinition( user, item, valid, dict, prev, path, semantics );
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
function undefinedTypeReference( user, item, valid, dict, prev, path, semantics ) {
|
|
1394
|
+
if (prev?.elements?.[item.id])
|
|
1395
|
+
signalElementHint( user, item, valid, prev, semantics, path );
|
|
1396
|
+
else
|
|
1397
|
+
undefinedDefinition( user, item, valid, dict, prev, path, semantics );
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
function undefinedForAnnotate( user, item, valid, _dict, prev, path ) {
|
|
1401
|
+
// in a CSN source, only one env was tested (valid.length 1):
|
|
1402
|
+
const name = (prev) ? `${ prev.name.id }.${ item.id }` : item.id;
|
|
1403
|
+
if (!user.elements && !user.actions && !user.enum && !user.params &&
|
|
1404
|
+
endsWithSuffix( name, '.drafts', art => art?._service && art.kind === 'entity' ) ||
|
|
1405
|
+
endsWithSuffix( name, '.DraftAdministrativeData',
|
|
1406
|
+
( art, prefix ) => (art?.kind === 'service' || prefix === 'DRAFT') ) ||
|
|
1407
|
+
name === 'DRAFT' && path?.length === 2 && path[1].id === 'DraftAdministrativeData' ||
|
|
1408
|
+
name.startsWith( 'localized.' )) // TODO: only if suffix is defined
|
|
1409
|
+
return;
|
|
1410
|
+
signalNotFound( 'ext-undefined-def', // TODO: ext-undefined-xyz
|
|
1411
|
+
[ item.location, user ], valid, { art: name } );
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
function undefinedForExtend( user, item, valid, _dict, prev ) {
|
|
1415
|
+
// in a CSN source, only one env was tested (valid.length 1):
|
|
1416
|
+
const name = (prev) ? `${ prev.name.id }.${ item.id }` : item.id;
|
|
1417
|
+
// TODO: do not “accept” `localized` as first path item for `extend`
|
|
1418
|
+
const msg = (name.startsWith( 'localized.' )) ? 'localized' : 'std';
|
|
1419
|
+
signalNotFound( 'ref-undefined-def', [ item.location, user ],
|
|
1420
|
+
valid, { '#': msg, art: name } );
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
function signalElementHint( user, item, valid, prev, semantics, path ) {
|
|
1424
|
+
const art = searchName( prev, item.id, 'absolute' );
|
|
1425
|
+
const addSeparators = p => ( p === item ? ':' : '.' ) + p.id;
|
|
1426
|
+
const code = path[0].id + path.slice( 1 ).map( addSeparators ).join( '' );
|
|
1427
|
+
signalNotFound( 'ref-undefined-def', [ item.location, user ], valid,
|
|
1428
|
+
{ '#': 'hint', art, code }, semantics );
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
function endsWithSuffix( name, suffix, cond ) {
|
|
1432
|
+
if (!name.endsWith( suffix ))
|
|
1433
|
+
return false;
|
|
1434
|
+
const prefix = name.slice( 0, -suffix.length );
|
|
1435
|
+
return cond( model.definitions[prefix], prefix, name );
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
function undefinedParam( user, head, valid, _dict, _art, _path, semantics ) {
|
|
1439
|
+
// TODO: text variant if there are no parameters, or in artifactParameters()
|
|
1440
|
+
// TODO: use prepared message variants
|
|
1441
|
+
signalNotFound( 'ref-undefined-param', [ head.location, user ], valid,
|
|
1442
|
+
{ art: boundActionOrMain( user ), id: head.id }, semantics );
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
function undefinedTargetElement( user, head, valid, _dict, pathItemArtifact ) {
|
|
1446
|
+
// `art.target` may not set in case target entities `myEntity[unknown > 2]`
|
|
1447
|
+
const art = pathItemArtifact?._effectiveType || user._parent;
|
|
1448
|
+
// TODO: better with $refs in filter conditions
|
|
1449
|
+
signalNotFound( 'ref-undefined-element', [ head.location, user ], valid,
|
|
1450
|
+
{ '#': 'target', art: art.target || art, id: head.id } );
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
function undefinedVariable( user, head, valid ) {
|
|
1454
|
+
// TODO: avoid message if we have already complained about `(exists …)`?
|
|
1455
|
+
const { id } = head;
|
|
1456
|
+
const isVar = id.charAt( 0 ) === '$' && id !== '$self';
|
|
1457
|
+
// TODO: for wrong $self, also use ref-undefined-var, but with extra msg id
|
|
1458
|
+
// otherwise, use s/th like ref-unexpected-element
|
|
1459
|
+
signalNotFound( ( isVar ? 'ref-undefined-var' : 'ref-expecting-const'),
|
|
1460
|
+
[ head.location, user ],
|
|
1461
|
+
valid, { '#': 'std', id } );
|
|
1462
|
+
// TODO: use s/th better than 'ref-expecting-const' !!
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
function undefinedSourceElement( user, head, valid, dynamicDict ) {
|
|
1466
|
+
// TODO: we might mention both the "direct" and the "effective" type and
|
|
1467
|
+
// always just mentioned one identifier as not found
|
|
1468
|
+
const { id } = head;
|
|
1469
|
+
if (id.charAt( 0 ) === '$') {
|
|
1470
|
+
const tableAlias = dynamicDict[id]?._parent;
|
|
1471
|
+
// TODO: probably better to pass param `semantics` and calculate dynamic dict explicitly
|
|
1472
|
+
const alias = tableAlias?.kind === '$tableAlias' ? tableAlias.name?.id : null;
|
|
1473
|
+
// TODO: mention $self without query
|
|
1474
|
+
signalNotFound( 'ref-undefined-var', [ head.location, user ], valid,
|
|
1475
|
+
{ '#': (alias ? 'alias' : 'std'), alias, id } );
|
|
1476
|
+
}
|
|
1477
|
+
else {
|
|
1478
|
+
const isVirtual = (user.name?.id === id && user.virtual?.val);
|
|
1479
|
+
const code = 'virtual null as ‹name›';
|
|
1480
|
+
signalNotFound( 'ref-undefined-element', [ head.location, user ], valid,
|
|
1481
|
+
{ art: head.id, '#': isVirtual ? 'virtual' : 'std', code } );
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
function undefinedParentElement( user, head, valid, dynamicDict, _art, _path, semantics ) {
|
|
1486
|
+
// TODO: we might mention both the "direct" and the "effective" type and
|
|
1487
|
+
// always just mentioned one identifier as not found
|
|
1488
|
+
const { id } = head;
|
|
1489
|
+
if (id.charAt( 0 ) === '$') {
|
|
1490
|
+
const queryOrMain = dynamicDict[id]?._parent;
|
|
1491
|
+
const withSelf = queryOrMain && (!queryOrMain._main || queryOrMain?.kind === 'select');
|
|
1492
|
+
signalNotFound( 'ref-undefined-var', [ head.location, user ], valid,
|
|
1493
|
+
{ '#': (withSelf ? 'self' : 'std'), alias: '$self', id } );
|
|
1494
|
+
}
|
|
1495
|
+
else {
|
|
1496
|
+
// TODO: extra msg like ref-rejected-on if elem found in source elements?
|
|
1497
|
+
// also whether users wrongly tried to refer to aliases/mixins?
|
|
1498
|
+
const msgVar = userQuery( user ) ? 'query' : null;
|
|
1499
|
+
// TODO: better with ON in expand if that is supported
|
|
1500
|
+
signalNotFound( 'ref-undefined-element', [ head.location, user ], valid,
|
|
1501
|
+
{ '#': msgVar, art: head.id }, semantics );
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
function undefinedOrderByElement( user, head, valid, dynamicDict, _art, path ) {
|
|
1506
|
+
const { id } = head;
|
|
1507
|
+
const src = id.charAt( 0 ) !== '$' && user._combined?.[id];
|
|
1508
|
+
if (src && !Array.isArray( src )) {
|
|
1509
|
+
path.$prefix = src._parent.name.id; // pushing it to path directly could be problematic
|
|
1510
|
+
// configurable error:
|
|
1511
|
+
signalNotFound( 'ref-deprecated-orderby', [ head.location, user ], valid,
|
|
1512
|
+
{ id: head.id, newcode: `${ path.$prefix }.${ head.id }` } );
|
|
1513
|
+
return src;
|
|
1514
|
+
}
|
|
1515
|
+
undefinedParentElement( user, head, valid, dynamicDict );
|
|
1516
|
+
return null;
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
function undefinedNestedElement( user, head, valid, _dict, _art, path, semantics ) {
|
|
1520
|
+
const art = user._columnParent._origin;
|
|
1521
|
+
if (!art)
|
|
1522
|
+
return null; // no consequential error
|
|
1523
|
+
return undefinedItemElement( user, head, valid, null, art, path, semantics );
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
function undefinedItemElement( user, item, valid, _dict, art, path, semantics ) {
|
|
1527
|
+
if (semantics.notFound === null)
|
|
1528
|
+
return;
|
|
1529
|
+
const query = userQuery( art );
|
|
1530
|
+
if (query?.name?.id > 1) {
|
|
1531
|
+
const root = userQuery( user ) !== query && path[0]._navigation;
|
|
1532
|
+
const alias = (root?.kind === '$navElement')
|
|
1533
|
+
? root._parent
|
|
1534
|
+
: root?.kind === '$tableAlias' && root;
|
|
1535
|
+
// TODO: improve alias retrieval if inside expand/inline
|
|
1536
|
+
signalNotFound( 'ref-undefined-element', [ item.location, user ], valid,
|
|
1537
|
+
{ '#': (alias ? 'alias' : 'query'), art: item.id, alias: alias?.name?.id },
|
|
1538
|
+
semantics );
|
|
1539
|
+
}
|
|
1540
|
+
else if (art.kind === '$parameters') {
|
|
1541
|
+
signalNotFound( 'ref-undefined-param', [ item.location, user ],
|
|
1542
|
+
valid, { art: art._main, id: item.id }, semantics );
|
|
1543
|
+
}
|
|
1544
|
+
else if (art.kind === 'builtin') { // magic variable / replacement variable
|
|
1545
|
+
// $magic.{ var } is a configurable error,
|
|
1546
|
+
// TODO: if it becomes non-configurable, we can omit this warning
|
|
1547
|
+
let id = pathName( path );
|
|
1548
|
+
let head = path[0]._artifact || { _parent: art };
|
|
1549
|
+
// eslint-disable-next-line sonarjs/no-nested-assignment
|
|
1550
|
+
while ((head = head?._parent) && head.kind === 'builtin')
|
|
1551
|
+
id = `${ head.name.id }.${ id }`;
|
|
1552
|
+
const msgId = (art.$uncheckedElements) ? 'ref-unknown-var' : 'ref-undefined-var';
|
|
1553
|
+
signalNotFound( msgId, [ item.location, user ], valid, { id }, semantics );
|
|
1554
|
+
}
|
|
1555
|
+
else if (art.kind === 'aspect' && !art.name) { // anonymous target aspect - TODO: still?
|
|
1556
|
+
signalNotFound( 'ref-undefined-element', [ item.location, user ], valid,
|
|
1557
|
+
{ '#': 'aspect', id: item.id }, semantics );
|
|
1558
|
+
}
|
|
1559
|
+
else {
|
|
1560
|
+
const target = art._effectiveType?.target;
|
|
1561
|
+
if (resolvePath( target, 'target', art )) {
|
|
1562
|
+
signalNotFound( 'ref-undefined-element', [ item.location, user ], valid,
|
|
1563
|
+
{ '#': 'target', art: target, id: item.id }, semantics );
|
|
1564
|
+
}
|
|
1565
|
+
else if (!target) {
|
|
1566
|
+
const variant = art.kind === 'aspect' && !art.name && 'aspect';
|
|
1567
|
+
const a = (variant) ? '' : searchName( art, item.id, 'element' );
|
|
1568
|
+
signalNotFound( 'ref-undefined-element', [ item.location, user ], valid,
|
|
1569
|
+
{ '#': variant, art: a, id: item.id }, semantics );
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
// Functions called via semantics.accept: -------------------------------------
|
|
1575
|
+
// function arguments ( art, user, ref, semantics ),
|
|
1576
|
+
// default (for elements only): acceptElemOrVar
|
|
1577
|
+
|
|
1578
|
+
function rejectOwnAliasesAndMixins( art, user, ref, semantics ) { // orderBy-set-ref
|
|
1579
|
+
switch (art.kind) {
|
|
1580
|
+
case '$tableAlias':
|
|
1581
|
+
case 'mixin':
|
|
1582
|
+
if (art._parent !== user)
|
|
1583
|
+
return false;
|
|
1584
|
+
break;
|
|
1585
|
+
case '$self':
|
|
1586
|
+
if (!semantics) // orderBy-set-expr
|
|
1587
|
+
break;
|
|
1588
|
+
// FALLTHROUGH
|
|
1589
|
+
default:
|
|
1590
|
+
return false;
|
|
1591
|
+
}
|
|
1592
|
+
error( 'ref-invalid-element', [ ref.path[0].location, user._user ],
|
|
1593
|
+
{ '#': art.kind, id: art.name.id } );
|
|
1594
|
+
return true;
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1597
|
+
function rejectAllOwn( art, user, ref ) { // orderBy-set-expr
|
|
1598
|
+
return rejectOwnAliasesAndMixins( art, user, ref, null );
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
function rejectOwnExceptVisibleAliases( art, user, ref ) { // for join-on
|
|
1602
|
+
switch (art.kind) {
|
|
1603
|
+
case '$navElement':
|
|
1604
|
+
art = art._parent;
|
|
1605
|
+
// FALLTHROUGH
|
|
1606
|
+
case '$tableAlias':
|
|
1607
|
+
case 'mixin':
|
|
1608
|
+
if (art._parent !== user._user || user.$tableAliases[art.name.id])
|
|
1609
|
+
return false;
|
|
1610
|
+
break;
|
|
1611
|
+
case '$self':
|
|
1612
|
+
// in the SQL backend, the $self.elem references are replaced by the
|
|
1613
|
+
// corresponding column expression; this might have references to elements
|
|
1614
|
+
// of invisible table aliases; at least one stakeholder uses this,
|
|
1615
|
+
// so it can't be an error (yet).
|
|
1616
|
+
message( 'ref-deprecated-self-element', [ ref.path[0].location, user._user ], {},
|
|
1617
|
+
// eslint-disable-next-line @stylistic/max-len
|
|
1618
|
+
'Referring to the query\'s own elements here might lead to invalid SQL references; use source elements only' );
|
|
1619
|
+
return false;
|
|
1620
|
+
default:
|
|
1621
|
+
return false;
|
|
1622
|
+
}
|
|
1623
|
+
error( 'ref-invalid-element', [ ref.path[0].location, user._user ],
|
|
1624
|
+
{ '#': art.kind, id: art.name.id } );
|
|
1625
|
+
return true;
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
function acceptElemOrVarOrSelf( art, user, ref ) {
|
|
1629
|
+
// TODO: make $self._artifact point to the $self alias, not the entity
|
|
1630
|
+
return (!(art._main && art.kind !== 'select') && ref.path[0]._navigation?.kind === '$self')
|
|
1631
|
+
? art
|
|
1632
|
+
: acceptElemOrVar( art, user, ref );
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
function acceptElemOrVar( art, user, ref ) {
|
|
1636
|
+
if (art.kind !== 'builtin' || !art.$restricted)
|
|
1637
|
+
return acceptElemOrAnyVar( art, user, ref );
|
|
1638
|
+
error( 'ref-unexpected-var', [ ref.location, user ],
|
|
1639
|
+
{ '#': 'annotation', name: pathName( ref.path ) } );
|
|
1640
|
+
return null;
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
function acceptElemOrAnyVar( art, user, ref ) {
|
|
1644
|
+
const { path } = ref;
|
|
1645
|
+
if (art.kind === 'builtin') {
|
|
1646
|
+
if (user.expand || user.inline) {
|
|
1647
|
+
const location = (user.expand || user.inline)[$location];
|
|
1648
|
+
const code = (user.expand) ? '{ ‹expand› }' : '.{ ‹inline› }';
|
|
1649
|
+
message( 'def-unexpected-nested-proj', [ location, user ], { '#': 'var', code } );
|
|
1650
|
+
}
|
|
1651
|
+
else if (art.$requireElementAccess) { // on some CDS variables
|
|
1652
|
+
// Path with only one item, but we expect an element, e.g. `$at.from`.
|
|
1653
|
+
signalMissingElementAccess( art, [ path[0].location, user ] );
|
|
1654
|
+
return null;
|
|
1655
|
+
}
|
|
1656
|
+
else if (art.$autoElement) {
|
|
1657
|
+
const { location } = path[0];
|
|
1658
|
+
const step = { id: art.$autoElement, $inferred: '$autoElement', location };
|
|
1659
|
+
path.push( step );
|
|
1660
|
+
art = art.elements[step.id];
|
|
1661
|
+
return setArtifactLink( step, art );
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
// TODO: combine $requireElementAccess/$autoElement to $bareRoot ?
|
|
1665
|
+
else if (!user.expand && !user.inline && // $self._artifact to main artifact
|
|
1666
|
+
!(art._main && art.kind !== 'select') && ref.path[0]._navigation?.kind === '$self') {
|
|
1667
|
+
// TODO: better ref-invalid-self
|
|
1668
|
+
const { location, id } = path[0];
|
|
1669
|
+
error( 'ref-unexpected-self', [ location, user ], { id } );
|
|
1670
|
+
// TODO: reject bare $projection here (new message id, configurable)
|
|
1671
|
+
// TODO: should we also attach valid names? Probably not...
|
|
1672
|
+
// TODO: return false; ??
|
|
1673
|
+
// return false;
|
|
1674
|
+
}
|
|
1675
|
+
return art;
|
|
1676
|
+
}
|
|
1677
|
+
|
|
1678
|
+
/**
|
|
1679
|
+
* Returns true, if the artifact is a _real_ artifact that can be used for `extend`/`annotate`.
|
|
1680
|
+
*/
|
|
1681
|
+
function extendableArtifact( art, user, ref ) {
|
|
1682
|
+
if (art.kind !== 'namespace')
|
|
1683
|
+
return art;
|
|
1684
|
+
const { location } = ref.path[ref.path.length - 1];
|
|
1685
|
+
if (user.kind === 'extend' && !(user.elements || user.actions || user.includes))
|
|
1686
|
+
return art; // allow `extend with definitions` and empty extends
|
|
1687
|
+
|
|
1688
|
+
// for `annotate`, handle "namespaces" just like unknown artifacts: only emit a warning
|
|
1689
|
+
signalNotFound( user.kind === 'annotate' ? 'ext-undefined-def' : 'ref-undefined-def',
|
|
1690
|
+
[ location, user ], null, { art } );
|
|
1691
|
+
return false;
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
function acceptStructOrBare( art, user, ref ) { // for includes[]
|
|
1695
|
+
// eslint-disable-next-line @stylistic/object-curly-newline
|
|
1696
|
+
if (user.kind in { context: 1, service: 1, action: 1, function: 1 })
|
|
1697
|
+
return false;
|
|
1698
|
+
// It had been checked before that `includes` is already forbidden for
|
|
1699
|
+
// non-entity/aspect/type/event.
|
|
1700
|
+
//
|
|
1701
|
+
// We currently disallow as include:
|
|
1702
|
+
// - non-structured types or derived type of structured:
|
|
1703
|
+
// would have to follow type in extend/include;
|
|
1704
|
+
// - entities with params: clarify inheritance, use of param in ON/DEFAULT;
|
|
1705
|
+
// - query entities/events: difficult sequence of resolve steps
|
|
1706
|
+
// - aspect with one ore more elements on query entities / events
|
|
1707
|
+
// - aspect with `elements` property on non-structured types
|
|
1708
|
+
|
|
1709
|
+
// TODO: adapt `user` if it is an `extend`? NOTE: we cannot call
|
|
1710
|
+
// effectiveType() on user - it might be in the process of being computed!
|
|
1711
|
+
// Also, it is not clear whether `art.elements` has been completed → testing
|
|
1712
|
+
// its length might be processing-sequence dependent, see #11346. We must
|
|
1713
|
+
// ensure that an include does not add the `elements` property!
|
|
1714
|
+
const base = (user.kind === 'extend' ? user.name._artifact : user);
|
|
1715
|
+
if (!base)
|
|
1716
|
+
return art;
|
|
1717
|
+
if (base.query || base.type || !base.elements) {
|
|
1718
|
+
// Remark: it is not necessary to test for user.elements[$inferred], because
|
|
1719
|
+
// the type could only have inferred elements if it has a type expression.
|
|
1720
|
+
// Including aspects with elements is forbidden for aspects without the
|
|
1721
|
+
// `elements` property. Testing for the length of `art.elements` requires
|
|
1722
|
+
// that we have applied potential `includes` of `art` before!
|
|
1723
|
+
// We might allow includes with elements in the future, they'd probably
|
|
1724
|
+
// count as specified elements with lower priority, i.e. annos, types, key
|
|
1725
|
+
// etc on columns beat those inherited from the include.
|
|
1726
|
+
// TODO v7 forbid `extend Proj with ZeroElemAspect` even if ZeroElemAspect has
|
|
1727
|
+
// 0 elements. Making the element-length check work requires that effectiveType()
|
|
1728
|
+
// has been called on the include already before.
|
|
1729
|
+
if (art.kind === 'aspect' &&
|
|
1730
|
+
(!art.elements || base.query && !Object.keys( art.elements ).length))
|
|
1731
|
+
return art;
|
|
1732
|
+
signalNotFound( 'ref-invalid-include', [ ref.location, user ], null,
|
|
1733
|
+
{ '#': 'bare' } );
|
|
1734
|
+
}
|
|
1735
|
+
else {
|
|
1736
|
+
if (!art.query && !art.type && !art.params && (art.elements || art.kind === 'aspect'))
|
|
1737
|
+
return art;
|
|
1738
|
+
const variant = art.params && 'param' || 'std';
|
|
1739
|
+
signalNotFound( 'ref-invalid-include', [ ref.location, user ], null, { '#': variant } );
|
|
1740
|
+
}
|
|
1741
|
+
return false;
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
// Remember: a valid aspect should have already been moved to XSN targetAspect, but
|
|
1745
|
+
// the error messages should still talk about potential aspects
|
|
1746
|
+
function acceptEntity( art, user, ref ) { // for target
|
|
1747
|
+
if (art.kind === 'entity')
|
|
1748
|
+
return art;
|
|
1749
|
+
// Extra msg text with Composition of NeitherEntityNorAspect:
|
|
1750
|
+
const bare = !art.elements || art.elements[$inferred];
|
|
1751
|
+
const std = targetCantBeAspect( user );
|
|
1752
|
+
const msg = std || (bare && art.kind === 'aspect' ? 'bare' : 'composition');
|
|
1753
|
+
signalNotFound( 'ref-invalid-target', [ ref.location, user ], null,
|
|
1754
|
+
{ '#': msg } );
|
|
1755
|
+
return false;
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
function acceptAspect( art, user, ref ) { // for targetAspect
|
|
1759
|
+
const bare = !art.elements || art.elements[$inferred];
|
|
1760
|
+
if (!bare) {
|
|
1761
|
+
if (art.kind === 'aspect')
|
|
1762
|
+
return art;
|
|
1763
|
+
if (art.kind === 'type') { // v4: Warning → config Error
|
|
1764
|
+
signalNotFound( 'ref-sloppy-target', [ ref.location, user ], null );
|
|
1765
|
+
return art;
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
signalNotFound( 'ref-invalid-target', [ ref.location, user ], null,
|
|
1769
|
+
{ '#': (bare ? 'bare' : 'aspect'), prop: 'targetAspect' } );
|
|
1770
|
+
return false;
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1773
|
+
function acceptQuerySource( art, user, ref ) { // for FROM
|
|
1774
|
+
const { path, scope } = ref;
|
|
1775
|
+
// see getPathItem(): how many path items are for the main artifact ref?
|
|
1776
|
+
const artItemsCount = (typeof scope === 'number' && scope) || (scope ? 1 : path.length);
|
|
1777
|
+
|
|
1778
|
+
// at least the last main definition should be an entity or an
|
|
1779
|
+
// event (if the user is an event) or type (if the user is a type)
|
|
1780
|
+
// an additional check for target would need effectiveType()
|
|
1781
|
+
const source = path[artItemsCount - 1]._artifact;
|
|
1782
|
+
if (user._main?.kind === 'type') {
|
|
1783
|
+
if (!acceptTypeProjectionSource( source )) {
|
|
1784
|
+
signalNotFound( 'ref-invalid-source', [ ref.location, user ], null,
|
|
1785
|
+
{ '#': 'type' } );
|
|
1786
|
+
return (source === art) ? art : false; // art to show cyclic issues
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
else if (source.kind !== 'entity' &&
|
|
1790
|
+
!acceptEventProjectionSource( source, user )) {
|
|
1791
|
+
signalNotFound( 'ref-invalid-source', [ ref.location, user ], null,
|
|
1792
|
+
{ '#': user._main.kind } );
|
|
1793
|
+
return (source === art) ? art : false; // art to show cyclic issues
|
|
1794
|
+
}
|
|
1795
|
+
if (source === art)
|
|
1796
|
+
return art;
|
|
1797
|
+
const assoc = Functions.effectiveType( art );
|
|
1798
|
+
if (assoc.target)
|
|
1799
|
+
return art; // TODO: use target here
|
|
1800
|
+
signalNotFound( 'ref-invalid-source', [ ref.location, user ], null, { '#': user._main.kind } );
|
|
1801
|
+
return false;
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
function acceptEventProjectionSource( source, user ) {
|
|
1805
|
+
if (user._main.kind !== 'event' || (source.kind !== 'event' && source.kind !== 'type'))
|
|
1806
|
+
return false;
|
|
1807
|
+
const effectiveType = Functions.effectiveType( source );
|
|
1808
|
+
if (!effectiveType)
|
|
1809
|
+
return false;
|
|
1810
|
+
const { kind } = effectiveType;
|
|
1811
|
+
return (kind === 'entity' || kind === 'event' || (kind === 'type' && effectiveType.elements));
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1814
|
+
function acceptTypeProjectionSource( source ) {
|
|
1815
|
+
// We require the projection source to be structured.
|
|
1816
|
+
// TODO: Also allow all associations?
|
|
1817
|
+
return Functions.effectiveType( source )?.elements;
|
|
1818
|
+
}
|
|
1819
|
+
|
|
1820
|
+
function acceptTypeOrElement( art, user, ref ) { // for type
|
|
1821
|
+
// was ['action', 'function'].includes( user._parent?.kind ))
|
|
1822
|
+
while (user._outer)
|
|
1823
|
+
user = user._outer;
|
|
1824
|
+
const kind = (user.kind !== 'param' || user._parent?.kind !== 'entity')
|
|
1825
|
+
? user.kind
|
|
1826
|
+
: 'entity-param';
|
|
1827
|
+
switch (art.kind) {
|
|
1828
|
+
case 'type':
|
|
1829
|
+
case 'element':
|
|
1830
|
+
return art;
|
|
1831
|
+
case 'entity':
|
|
1832
|
+
if (kind === 'param' && art._service)
|
|
1833
|
+
return art;
|
|
1834
|
+
// FALLTHROUGH
|
|
1835
|
+
case 'event':
|
|
1836
|
+
if (kind === 'event')
|
|
1837
|
+
return art;
|
|
1838
|
+
break;
|
|
1839
|
+
default:
|
|
1840
|
+
break;
|
|
1841
|
+
}
|
|
1842
|
+
signalNotFound( 'ref-invalid-type', [ ref.location, user ], null, { '#': kind } );
|
|
1843
|
+
return false;
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
// Functions called via semantics.check by checkExpr(): -----------------------
|
|
1847
|
+
//
|
|
1848
|
+
// function arguments: ( expr, exprCtx, user )
|
|
1849
|
+
// default: tbd (nothing for main artifac ref)
|
|
1850
|
+
|
|
1851
|
+
// Performs checks which would be too early to do via semantics.accept. It is
|
|
1852
|
+
// actually assumed that the foreign-keys / ON-condition rewrite has already
|
|
1853
|
+
// been done.
|
|
1854
|
+
|
|
1855
|
+
// Main check area "navigation" (see also semantics.navigation):
|
|
1856
|
+
// - navigation along any assoc
|
|
1857
|
+
// - navigation only along foreign keys
|
|
1858
|
+
// - (no navigation already via semantics.navigation for target refs of foreign keys)
|
|
1859
|
+
// - special (ON-condition of unmanaged associations)
|
|
1860
|
+
|
|
1861
|
+
// Main check area: checks on the referred artifact
|
|
1862
|
+
// - all artifacts are allowed
|
|
1863
|
+
// - all except unmanaged associations
|
|
1864
|
+
// - ...
|
|
1865
|
+
|
|
1866
|
+
function checkExpr( expr, exprCtx, user ) {
|
|
1867
|
+
if (!expr)
|
|
1868
|
+
return;
|
|
1869
|
+
const s = referenceSemantics[exprCtx];
|
|
1870
|
+
const semantics = (typeof s === 'string') ? referenceSemantics[s] : s;
|
|
1871
|
+
const checkFn = semantics.check; // || !semantics.isMainRef && checkElementStd;
|
|
1872
|
+
|
|
1873
|
+
if (checkFn) {
|
|
1874
|
+
traverseExpr( expr, exprCtx, user,
|
|
1875
|
+
( ...args ) => (checkFn( ...args ) ? traverseExpr.STOP : traverseExpr.SKIP) );
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1879
|
+
// TODO: Don't allow path args and filter!
|
|
1880
|
+
function checkOnCondition( expr, exprCtx, user ) { // TODO: move to tweak-assoc.js (or resolve.js)
|
|
1881
|
+
traverseDollarSelfPairs( expr, user, onPair, onLeaf );
|
|
1882
|
+
|
|
1883
|
+
function onPair( item, right ) {
|
|
1884
|
+
checkDollarSelfPairNavigation( item, user );
|
|
1885
|
+
checkDollarSelfPairNavigation( right, user );
|
|
1886
|
+
}
|
|
1887
|
+
function onLeaf( leaf ) {
|
|
1888
|
+
checkExpr( leaf, exprCtx, user );
|
|
1889
|
+
}
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
function checkDollarSelfPairNavigation( ref, user ) {
|
|
1893
|
+
const { path } = ref;
|
|
1894
|
+
if (path.length === 1 && path[0]._navigation?.kind === '$self')
|
|
1895
|
+
return;
|
|
1896
|
+
const index = userTargetElementPathIndex( user, path );
|
|
1897
|
+
checkOnlyForeignKeyNavigation( user, path, index );
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
// // standard element reference check;
|
|
1901
|
+
// function checkElementStd( art, _user, ref, semantics ) {
|
|
1902
|
+
// // No further checks on navigation: nothing to do
|
|
1903
|
+
// // Must not end with any association (TODO: allow managed?):
|
|
1904
|
+
// if (art.target) { // && art.on
|
|
1905
|
+
// // error
|
|
1906
|
+
// }
|
|
1907
|
+
// }
|
|
1908
|
+
|
|
1909
|
+
function checkColumnRef( expr, exprCtx, user ) {
|
|
1910
|
+
if (!expr.path)
|
|
1911
|
+
return;
|
|
1912
|
+
if (expr === user.value && // is already a syntax error with non-ref expression
|
|
1913
|
+
(user.expand || user.inline))
|
|
1914
|
+
checkExpandInlineRef( expr._artifact, user, expr );
|
|
1915
|
+
|
|
1916
|
+
const self = pathStartsWithSelf( expr );
|
|
1917
|
+
// console.log('NAV:',expr.path.map(r=>r.id),self)
|
|
1918
|
+
if (self || self == null && columnRefStartsWithSelf( user )) {
|
|
1919
|
+
checkOnlyForeignKeyNavigation( user, expr.path, 0, 'self-' );
|
|
1920
|
+
checkNoUnmanaged( expr, user, true, 'self-unmanaged' );
|
|
1921
|
+
}
|
|
1922
|
+
// TODO: set navigation dependencies later to avoid both ref-cyclic and
|
|
1923
|
+
// ref-invalid-navigation/ref-unexpected-assoc
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1926
|
+
function checkOrderByRef( expr, exprCtx, user ) {
|
|
1927
|
+
const { path } = expr;
|
|
1928
|
+
if (!path)
|
|
1929
|
+
return;
|
|
1930
|
+
const self = path?.[0]?._navigation?.kind !== '$tableAlias';
|
|
1931
|
+
if (self)
|
|
1932
|
+
checkOnlyForeignKeyNavigation( user, expr.path );
|
|
1933
|
+
checkNoUnmanaged( expr, user, self );
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1936
|
+
function checkRefInQuery( expr, exprCtx, user ) {
|
|
1937
|
+
const { path } = expr;
|
|
1938
|
+
if (!path)
|
|
1939
|
+
return;
|
|
1940
|
+
const self = pathStartsWithSelf( expr );
|
|
1941
|
+
if (self)
|
|
1942
|
+
checkOnlyForeignKeyNavigation( user, expr.path, 0, 'self-' );
|
|
1943
|
+
checkNoUnmanaged( expr, user, self );
|
|
1944
|
+
}
|
|
1945
|
+
|
|
1946
|
+
function checkExpandInlineRef( art, user, ref ) {
|
|
1947
|
+
if (!art || !art._main || // $self has entity as _artifact
|
|
1948
|
+
art.kind === 'builtin') // no repeated error for CDS variables
|
|
1949
|
+
return;
|
|
1950
|
+
const effective = art._effectiveType;
|
|
1951
|
+
if (!effective || effective.target || effective.elements)
|
|
1952
|
+
return;
|
|
1953
|
+
const { path } = ref;
|
|
1954
|
+
const location = (user.expand || user.inline)[$location];
|
|
1955
|
+
// mention `table alias` in text only with initial single path item ref,
|
|
1956
|
+
// but do not mention that $self { … } is allowed, shouldn't be advertised:
|
|
1957
|
+
const txt = (path.length > 1 || user._columnParent) ? 'struct' : 'init';
|
|
1958
|
+
const code = (user.expand) ? '{ ‹expand› }' : '.{ ‹inline› }';
|
|
1959
|
+
message( 'def-unexpected-nested-proj', [ location, user ], { '#': txt, code } );
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1962
|
+
function isDollarSelfPair( left, right, user ) {
|
|
1963
|
+
if (!left.path || !right.path || left.scope || right.scope)
|
|
1964
|
+
return false; // param ref `:$self` is not $self
|
|
1965
|
+
// $self in entity (TODO: mixin? new assoc in col? in aspect?)
|
|
1966
|
+
const kind = right._artifact?.kind;
|
|
1967
|
+
if (kind !== 'entity' && kind !== 'aspect' && kind !== 'select' && kind !== 'event')
|
|
1968
|
+
return false; // (ok, this would also return `false` for `:$self`)
|
|
1969
|
+
const { path } = left;
|
|
1970
|
+
// TODO: we might return true and issue an extra error here
|
|
1971
|
+
return userTargetElementPathIndex( user, path ) > 0;
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1974
|
+
function traverseDollarSelfPairs( expr, user, onPair, onLeaf ) {
|
|
1975
|
+
const { op } = expr;
|
|
1976
|
+
let { args } = expr;
|
|
1977
|
+
if (!op || !args) {
|
|
1978
|
+
if (onLeaf)
|
|
1979
|
+
onLeaf( expr );
|
|
1980
|
+
return;
|
|
1981
|
+
}
|
|
1982
|
+
if (op.val === '=') // TMP
|
|
1983
|
+
args = [ args[0], { val: '=', literal: 'token' }, args[1] ];
|
|
1984
|
+
|
|
1985
|
+
for (let index = 0; index < args.length; ++index) {
|
|
1986
|
+
const item = args[index];
|
|
1987
|
+
const eq = args[index + 1];
|
|
1988
|
+
if (eq?.val === '=' && eq.literal === 'token' && item.path && !item.scope) {
|
|
1989
|
+
const right = args[index + 2];
|
|
1990
|
+
if (right?.path && !right.scope) {
|
|
1991
|
+
const itemIsPath = isDollarSelfPair( item, right, user );
|
|
1992
|
+
const rightIsPath = !itemIsPath && isDollarSelfPair( right, item, user );
|
|
1993
|
+
if (itemIsPath || rightIsPath) {
|
|
1994
|
+
onPair( item, right, itemIsPath );
|
|
1995
|
+
index += 2;
|
|
1996
|
+
continue;
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
}
|
|
2000
|
+
traverseDollarSelfPairs( item, user, onPair, onLeaf );
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
|
|
2004
|
+
function checkAssocOn( ref, exprCtx, user ) {
|
|
2005
|
+
const { path } = ref;
|
|
2006
|
+
if (!path)
|
|
2007
|
+
return;
|
|
2008
|
+
if (path.length === 1 && path[0]._navigation?.kind === '$self') {
|
|
2009
|
+
// resolvePath() for `on` allowed bare $self: disallow except in checkAssocOnSelf
|
|
2010
|
+
const { location, id } = path[0];
|
|
2011
|
+
error( 'ref-unexpected-self', [ location, user ], { '#': 'on', id } );
|
|
2012
|
+
return;
|
|
2013
|
+
}
|
|
2014
|
+
const index = userTargetElementPathIndex( user, path );
|
|
2015
|
+
checkOnlyForeignKeyNavigation( user, path, index );
|
|
2016
|
+
// TODO: did we check for no filter/args, no `exists` etc?
|
|
2017
|
+
const last = path[path.length - 1];
|
|
2018
|
+
if (!last.where && ref._artifact?.on) { // filter already complained about - TODO: where?
|
|
2019
|
+
const target = index > 0 && index < path.length && ref._artifact?.target;
|
|
2020
|
+
const msg = (target?._artifact === user._main) ? 'self' : 'unmanaged';
|
|
2021
|
+
error( 'ref-unexpected-assoc', [ last.location, user ],
|
|
2022
|
+
{ '#': msg, code: '= $self' } );
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
2025
|
+
|
|
2026
|
+
|
|
2027
|
+
// right of union: parent = main → get correct operator
|
|
2028
|
+
// FROM subquery: parent = tab alias of outer query
|
|
2029
|
+
// other sub query: parent = outer query
|
|
2030
|
+
function getQueryOperatorName( query ) {
|
|
2031
|
+
if (query._parent !== query._main)
|
|
2032
|
+
return { txt: 'subQuery', op: '' };
|
|
2033
|
+
|
|
2034
|
+
for (let set = query._main.query; set.op; set = set.args[0]) {
|
|
2035
|
+
const right = set.args[1];
|
|
2036
|
+
if (query.name.id >= ((right._leadingQuery || right).name?.id ?? 0))
|
|
2037
|
+
return { txt: 'setQuery', op: set.op.val };
|
|
2038
|
+
}
|
|
2039
|
+
throw new CompilerAssertion( 'Did we pass the leading query as argument?' );
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
function userTargetElementPathIndex( user, path ) {
|
|
2043
|
+
const head = path[0];
|
|
2044
|
+
if (head._artifact === user) // standard case
|
|
2045
|
+
return 1;
|
|
2046
|
+
if (head._navigation?.kind !== '$self')
|
|
2047
|
+
return 0;
|
|
2048
|
+
for (let index = 1; index < path.length; ++index) {
|
|
2049
|
+
const assoc = path[index]?._artifact;
|
|
2050
|
+
if (assoc?.target)
|
|
2051
|
+
return (assoc === user) ? index + 1 : 0;
|
|
2052
|
+
}
|
|
2053
|
+
return 0;
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2056
|
+
function checkOnlyForeignKeyNavigation( user, path, startIndex = 0, msgPrefix = '' ) {
|
|
2057
|
+
// has to be run after foreign-key rewrite
|
|
2058
|
+
const outer = user._columnParent?._origin;
|
|
2059
|
+
let assoc = outer?.foreignKeys &&
|
|
2060
|
+
pathStartsWithSelf( { path } ) == null && // not $self or CDS var like $now
|
|
2061
|
+
outer;
|
|
2062
|
+
for (let index = startIndex; index < path.length; ++index) {
|
|
2063
|
+
if (assoc?.target) {
|
|
2064
|
+
if (!assoc.foreignKeys) {
|
|
2065
|
+
error( 'ref-unexpected-assoc', [ path[index - 1].location, user ],
|
|
2066
|
+
{ '#': `${ msgPrefix }unmanaged`, alias: '$self' } );
|
|
2067
|
+
return;
|
|
2068
|
+
}
|
|
2069
|
+
if (!assoc.$keysNavigation)
|
|
2070
|
+
Functions.addForeignKeyNavigations( assoc, true );
|
|
2071
|
+
index = checkCoveredByForeignKey( assoc, path, index, user, msgPrefix );
|
|
2072
|
+
}
|
|
2073
|
+
assoc = path[index]?._artifact;
|
|
2074
|
+
if (assoc?.target) {
|
|
2075
|
+
// testing this above is not enough: we would not complain about $self
|
|
2076
|
+
// assoc filter at end of ref with expand/inline. We might also move the
|
|
2077
|
+
// unmanaged test above to here.
|
|
2078
|
+
if (path[index]?.where) {
|
|
2079
|
+
error( 'ref-unexpected-assoc', [ path[index].location, user ],
|
|
2080
|
+
{ '#': `${ msgPrefix }with-filter`, alias: '$self' } );
|
|
2081
|
+
return;
|
|
2082
|
+
}
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
}
|
|
2086
|
+
|
|
2087
|
+
function checkCoveredByForeignKey( nav, path, index, user, msgPrefix = '' ) {
|
|
2088
|
+
const assoc = nav;
|
|
2089
|
+
while (index < path.length) {
|
|
2090
|
+
const item = path[index];
|
|
2091
|
+
nav = nav.$keysNavigation?.[item.id];
|
|
2092
|
+
if (!nav)
|
|
2093
|
+
break;
|
|
2094
|
+
if (nav._artifact)
|
|
2095
|
+
return index;
|
|
2096
|
+
++index;
|
|
2097
|
+
}
|
|
2098
|
+
const last = path[index] || path[index - 1];
|
|
2099
|
+
// TODO: or just location of `last`?
|
|
2100
|
+
// TODO: extra text variant if the foreign keys are the key elements !
|
|
2101
|
+
// eslint-disable-next-line no-nested-ternary
|
|
2102
|
+
const txt = index >= path.length
|
|
2103
|
+
? 'complete'
|
|
2104
|
+
: (isAssocToPrimaryKeys( assoc ) ? 'keys' : 'std');
|
|
2105
|
+
error( 'ref-invalid-navigation', [ last.location, user ], {
|
|
2106
|
+
'#': msgPrefix + txt, art: assoc, name: last.id, alias: '$self',
|
|
2107
|
+
}, {
|
|
2108
|
+
std: 'Can follow association $(ART) only to its foreign key references, not to $(NAME)',
|
|
2109
|
+
keys: 'Can follow managed association $(ART) only to the keys of its target, not to $(NAME)',
|
|
2110
|
+
complete: 'The reference must cover a full foreign key reference of association $(ART)',
|
|
2111
|
+
// eslint-disable-next-line @stylistic/max-len
|
|
2112
|
+
'self-std': 'In column ref starting with $(ALIAS), we can follow association $(ART) only to its foreign key references, not to $(NAME)',
|
|
2113
|
+
// eslint-disable-next-line @stylistic/max-len
|
|
2114
|
+
'self-keys': 'In column ref starting with $(ALIAS), we can follow managed association $(ART) only to the keys of its target, not to $(NAME)',
|
|
2115
|
+
// eslint-disable-next-line @stylistic/max-len
|
|
2116
|
+
'self-complete': 'The column reference starting with $(ALIAS) must cover a full foreign key reference of association $(ART)',
|
|
2117
|
+
} );
|
|
2118
|
+
// TODO later: mention allowed ones
|
|
2119
|
+
return path.length;
|
|
2120
|
+
}
|
|
2121
|
+
|
|
2122
|
+
function checkNoUnmanaged( ref, user, self, messageVariant = 'unmanaged' ) {
|
|
2123
|
+
if (ref._artifact?.on && ref.$syntax !== 'after-exists') {
|
|
2124
|
+
const { path } = ref;
|
|
2125
|
+
const last = path[path.length - 1];
|
|
2126
|
+
if (self && last.where) // already complained about filter
|
|
2127
|
+
return;
|
|
2128
|
+
error( 'ref-unexpected-assoc', [ last.location, user ],
|
|
2129
|
+
{ '#': messageVariant, alias: '$self' } );
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
|
|
2133
|
+
// Low-level functions --------------------------------------------------------
|
|
2134
|
+
|
|
2135
|
+
function proposeUsingDecl( name, sourceArtifacts ) {
|
|
2136
|
+
const art = model.definitions[name];
|
|
2137
|
+
// TODO: if there are sub artifacts, test whether at least one of them is real
|
|
2138
|
+
return art &&
|
|
2139
|
+
(art.kind !== 'namespace' || art._subArtifacts) &&
|
|
2140
|
+
!sourceArtifacts?.[name];
|
|
2141
|
+
;
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2144
|
+
/**
|
|
2145
|
+
* Make a "not found" error and optionally attach valid names.
|
|
2146
|
+
*
|
|
2147
|
+
* @param {string} msgId
|
|
2148
|
+
* @param {any} location
|
|
2149
|
+
* @param {object[]} valid
|
|
2150
|
+
* @param {object} [textParams]
|
|
2151
|
+
* @param {object} [semantics]
|
|
2152
|
+
*/
|
|
2153
|
+
function signalNotFound( msgId, location, valid, textParams, semantics ) {
|
|
2154
|
+
if (location.$notFound) // TODO: still necessary?
|
|
2155
|
+
return;
|
|
2156
|
+
location.$notFound = true;
|
|
2157
|
+
/** @type {object} */
|
|
2158
|
+
const err = message( semantics?.messageMap?.[msgId] || msgId, location, textParams );
|
|
2159
|
+
if (valid) {
|
|
2160
|
+
const user = Array.isArray( location ) && location[1];
|
|
2161
|
+
// TODO: see TODO missing param `viaCdl` in attachAndEmitValidNames:
|
|
2162
|
+
err.validNames = (user && definedViaCdl( user ));
|
|
2163
|
+
valid.reverse();
|
|
2164
|
+
attachAndEmitValidNames( err, ...valid );
|
|
2165
|
+
}
|
|
2166
|
+
}
|
|
2167
|
+
|
|
2168
|
+
/**
|
|
2169
|
+
* Emit a 'ref-expected-element' error for magic variable references
|
|
2170
|
+
* that require element accesses but don't do.
|
|
2171
|
+
* For example: `$at`, but `$at.from` or `$at.to` is required.
|
|
2172
|
+
*
|
|
2173
|
+
* @param {object} art
|
|
2174
|
+
* @param {any} location
|
|
2175
|
+
*/
|
|
2176
|
+
function signalMissingElementAccess( art, location ) {
|
|
2177
|
+
// TODO: ref-undefined-var ?
|
|
2178
|
+
const err = message( 'ref-expected-element', location,
|
|
2179
|
+
{ '#': 'magicVar', id: art.name.id } );
|
|
2180
|
+
// Mapping for better valid names: from -> $at.from
|
|
2181
|
+
const valid = Object.keys( art.elements || {} ).reduce( (prev, curr) => {
|
|
2182
|
+
prev[`${ art.name.id }.${ curr }`] = true;
|
|
2183
|
+
return prev;
|
|
2184
|
+
}, Object.create( null ) );
|
|
2185
|
+
attachAndEmitValidNames( err, valid );
|
|
2186
|
+
}
|
|
2187
|
+
|
|
2188
|
+
/**
|
|
2189
|
+
* Attaches a dictionary of valid names to the given compiler message.
|
|
2190
|
+
* In test mode, an info message is emitted with a list of valid names.
|
|
2191
|
+
*
|
|
2192
|
+
* @param {CompileMessage} msg CDS Compiler message
|
|
2193
|
+
* @param {...object} validDicts One ore more artifact dictionaries such as in `_block`.
|
|
2194
|
+
*/
|
|
2195
|
+
function attachAndEmitValidNames( msg, ...validDicts ) {
|
|
2196
|
+
const viaCdl = msg.validNames; // TODO: move to argument list
|
|
2197
|
+
if (!options.testMode && !options.attachValidNames)
|
|
2198
|
+
return;
|
|
2199
|
+
|
|
2200
|
+
const valid = Object.assign( Object.create( null ), ...validDicts );
|
|
2201
|
+
msg.validNames = Object.create( null );
|
|
2202
|
+
for (const name of Object.keys( valid )) {
|
|
2203
|
+
if (!name)
|
|
2204
|
+
continue;
|
|
2205
|
+
const art = valid[name];
|
|
2206
|
+
// ignore internal types such as cds.Association, ignore names with dot for
|
|
2207
|
+
// CDL references to main artifacts:
|
|
2208
|
+
if (!art.internal && !art.deprecated && art.name?.$inferred !== '$internal' &&
|
|
2209
|
+
(viaCdl ? art._main || !name.includes( '.' ) : art.kind !== 'namespace'))
|
|
2210
|
+
msg.validNames[name] = art;
|
|
2211
|
+
}
|
|
2212
|
+
|
|
2213
|
+
if (options.testMode && !options.$recompile) {
|
|
2214
|
+
// no semantic location => either first of [loc, semantic loc] pair or just location.
|
|
2215
|
+
const loc = msg.$location[0] || msg.$location;
|
|
2216
|
+
const names = Object.keys( msg.validNames );
|
|
2217
|
+
names.sort();
|
|
2218
|
+
if (names.length > 22) {
|
|
2219
|
+
names.length = 20;
|
|
2220
|
+
names[20] = '…';
|
|
2221
|
+
}
|
|
2222
|
+
info( null, [ loc, null ],
|
|
2223
|
+
{ '#': !names.length ? 'zero' : 'std' },
|
|
2224
|
+
{ std: `Valid: ${ names.join( ', ' ) }`, zero: 'No valid names' } );
|
|
2225
|
+
}
|
|
2226
|
+
}
|
|
2227
|
+
}
|
|
2228
|
+
|
|
2229
|
+
/**
|
|
2230
|
+
* Filter out restricted variables from a dictionary of variables.
|
|
2231
|
+
* Variables with the `$restricted` property set to true are excluded.
|
|
2232
|
+
*
|
|
2233
|
+
* @param {object} variables - Dictionary of variable objects
|
|
2234
|
+
* @returns {object} New dictionary with restricted variables removed
|
|
2235
|
+
*/
|
|
2236
|
+
function removeRestrictedVariables( variables ) {
|
|
2237
|
+
// TODO: we could also do something with `deprecated`, $requiresBetaFlag, …
|
|
2238
|
+
const valid = Object.create(null);
|
|
2239
|
+
for (const name in variables) {
|
|
2240
|
+
const variable = variables[name];
|
|
2241
|
+
if (!variable.$restricted)
|
|
2242
|
+
valid[name] = variable;
|
|
2243
|
+
}
|
|
2244
|
+
return valid;
|
|
2245
|
+
}
|
|
2246
|
+
|
|
2247
|
+
function removeDollarNames( dict ) {
|
|
2248
|
+
const r = Object.create( null );
|
|
2249
|
+
for (const name in dict) {
|
|
2250
|
+
if (name.charAt( 0 ) !== '$')
|
|
2251
|
+
r[name] = dict[name];
|
|
2252
|
+
}
|
|
2253
|
+
return r;
|
|
2254
|
+
}
|
|
2255
|
+
|
|
2256
|
+
function removeGapArtifact( dict, alsoRemoveInferred ) {
|
|
2257
|
+
const r = Object.create( null );
|
|
2258
|
+
for (const name in dict) {
|
|
2259
|
+
const art = dict[name];
|
|
2260
|
+
// TODO: for gaps with sub artifacts, use `${name}.` as name
|
|
2261
|
+
// TODO: clarify with LSP
|
|
2262
|
+
if (alsoRemoveInferred && art.$inferred)
|
|
2263
|
+
continue;
|
|
2264
|
+
if (art.kind !== 'namespace' || art._subArtifacts)
|
|
2265
|
+
r[name] = dict[name];
|
|
2266
|
+
}
|
|
2267
|
+
return r;
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2270
|
+
module.exports = {
|
|
2271
|
+
fns,
|
|
2272
|
+
};
|