@sap/cds-dk 9.9.2 → 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 +95 -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/import.js +6 -1
- 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/common.js +3 -2
- package/lib/import/importapi.js +1 -1
- package/lib/import/odata/annotationParser.js +316 -0
- package/lib/import/odata/v2parser.js +217 -0
- package/lib/import/odata/v4parser.js +8 -232
- 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/lib/watch/watcher.js +27 -1
- 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 -1725
|
@@ -0,0 +1,2320 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/* eslint max-statements-per-line:off */
|
|
4
|
+
const { isBetaEnabled } = require('../base/specialOptions');
|
|
5
|
+
const {
|
|
6
|
+
forEachDefinition, forEachGeneric, forEachMemberRecursively,
|
|
7
|
+
isEdmPropertyRendered, getUtils,
|
|
8
|
+
applyTransformations, applyTransformationsOnNonDictionary,
|
|
9
|
+
transformAnnotationExpression, findAnnotationExpression,
|
|
10
|
+
cardinality2str,
|
|
11
|
+
} = require('../model/csnUtils');
|
|
12
|
+
const { isBuiltinType, isMagicVariable } = require('../base/builtins');
|
|
13
|
+
const edmUtils = require('./edmUtils.js');
|
|
14
|
+
const edmAnnoPreproc = require('./edmAnnoPreprocessor.js');
|
|
15
|
+
const { inboundQualificationChecks } = require('./edmInboundChecks.js');
|
|
16
|
+
const typesExposure = require('../transform/odata/typesExposure');
|
|
17
|
+
const expandCSNToFinalBaseType = require('../transform/odata/toFinalBaseType');
|
|
18
|
+
const { cloneCsnNonDict, cloneAnnotationValue } = require('../base/cloneCsn');
|
|
19
|
+
const { setProp, forEach, forEachKey } = require('../utils/objectUtils.js');
|
|
20
|
+
|
|
21
|
+
const NavResAnno = '@Capabilities.NavigationRestrictions.RestrictedProperties';
|
|
22
|
+
|
|
23
|
+
// Capabilities that can be pulled up to NavigationRestrictions
|
|
24
|
+
const capabilities = Object.keys(require('../gen/Dictionary.json')
|
|
25
|
+
.types['Capabilities.NavigationPropertyRestriction'].Properties)
|
|
26
|
+
.filter(c => ![ 'NavigationProperty', 'Navigability' ].includes(c))
|
|
27
|
+
.map(c => `@Capabilities.${ c }`);
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* edmPreprocessor warms up the model so that it can be converted into an EDM document and
|
|
31
|
+
* contains all late & application specific model transformations
|
|
32
|
+
* that should NOT become persistent in the published CSN model but only
|
|
33
|
+
* be presented in the resulting EDM files. These late tweaks or mods can
|
|
34
|
+
* be dependent to EDM version.
|
|
35
|
+
*
|
|
36
|
+
* @param {CSN.Model} csn
|
|
37
|
+
* @param {object} _options
|
|
38
|
+
*/
|
|
39
|
+
function initializeModel( csn, _options, messageFunctions, requestedServiceNames = undefined ) {
|
|
40
|
+
const {
|
|
41
|
+
info, warning, error, message,
|
|
42
|
+
} = messageFunctions;
|
|
43
|
+
const csnUtils = getUtils(csn);
|
|
44
|
+
|
|
45
|
+
// proxies are merged into the final model after all proxy elements are collected
|
|
46
|
+
const proxyCache = [];
|
|
47
|
+
// iterate only over those definitions that need to be preprocessed
|
|
48
|
+
// instead of mangling through the whole model each time
|
|
49
|
+
// preprocess steps removing adding to the model must co-modify this map
|
|
50
|
+
const reqDefs = { definitions: Object.create(null) };
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
// make sure options are complete
|
|
54
|
+
const options = edmUtils.validateOptions(_options);
|
|
55
|
+
|
|
56
|
+
const [ serviceRoots,
|
|
57
|
+
serviceRootNames,
|
|
58
|
+
fallBackSchemaName,
|
|
59
|
+
whatsMyServiceRootName ] = getAnOverviewOnTheServices();
|
|
60
|
+
|
|
61
|
+
if (serviceRootNames.length === 0)
|
|
62
|
+
return [ serviceRoots, Object.create(null), reqDefs, whatsMyServiceRootName, fallBackSchemaName, options ];
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
if (requestedServiceNames === undefined)
|
|
66
|
+
requestedServiceNames = options.serviceNames;
|
|
67
|
+
if (requestedServiceNames === undefined)
|
|
68
|
+
requestedServiceNames = serviceRootNames;
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
function isMyServiceRequested( n ) {
|
|
72
|
+
return requestedServiceNames.includes(whatsMyServiceRootName(n));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Structural CSN inbound QA checks
|
|
76
|
+
inboundQualificationChecks(csn, options, messageFunctions,
|
|
77
|
+
serviceRootNames, requestedServiceNames, isMyServiceRequested, whatsMyServiceRootName, csnUtils);
|
|
78
|
+
// not needed at the moment
|
|
79
|
+
// resolveForeignKeyRefs();
|
|
80
|
+
|
|
81
|
+
if (isBetaEnabled(options, undefined))
|
|
82
|
+
splitDottedDefinitionsIntoSeparateServices();
|
|
83
|
+
|
|
84
|
+
else
|
|
85
|
+
/*
|
|
86
|
+
Replace dots with underscores for all definitions below a context
|
|
87
|
+
or a service and rewrite refs and targets. MUST be done before type exposure.
|
|
88
|
+
*/
|
|
89
|
+
renameDottedDefinitionsInsideServiceOrContext();
|
|
90
|
+
|
|
91
|
+
/*
|
|
92
|
+
Final base type expansion is required here when:
|
|
93
|
+
1) The input CSN was already transformed for V4 but shall be rendered in V2 and the
|
|
94
|
+
edmx generator is called directly (bypassing OData transformation)
|
|
95
|
+
2) The input CSN was already transformed for V4 and persisted (all non-enumerables are
|
|
96
|
+
stripped of)
|
|
97
|
+
3) call via cdsc
|
|
98
|
+
|
|
99
|
+
At the end of the day, this module must be called only here, in the renderer and removed
|
|
100
|
+
as a step in the OData transformer with the goal to have a protocol agnostic OData CSN.
|
|
101
|
+
*/
|
|
102
|
+
if (csn.meta && csn.meta.options && csn.meta.options.odataVersion === 'v4' && options.isV2()) {
|
|
103
|
+
const { toFinalBaseType } = require('../transform/transformUtils').getTransformers(csn, options, messageFunctions);
|
|
104
|
+
expandCSNToFinalBaseType(csn, { toFinalBaseType }, csnUtils, serviceRootNames, options);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/*
|
|
108
|
+
Enrich the CSN by de-anonymizing and exposing types that are required to make the service self contained.
|
|
109
|
+
*/
|
|
110
|
+
// add cds.Map structured type into definitions to allow types exposure to pull in this type
|
|
111
|
+
if (options.isV4() && csn.definitions['cds.Map'] == null) {
|
|
112
|
+
const cdsMap = { '@open': true, elements: Object.create(null) };
|
|
113
|
+
setProp(cdsMap, '$emtpyMapType', true);
|
|
114
|
+
csn.definitions['cds.Map'] = cdsMap;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const schemas = typesExposure(csn, whatsMyServiceRootName, requestedServiceNames,
|
|
118
|
+
fallBackSchemaName, options, csnUtils, { error });
|
|
119
|
+
|
|
120
|
+
if (options.isV4() && csn.definitions['cds.Map']?.$emptyMapType)
|
|
121
|
+
csn.definitions['cds.Map'] = undefined;
|
|
122
|
+
|
|
123
|
+
// Get an overview about all schemas (including the services)
|
|
124
|
+
const schemaNames = [ ...serviceRootNames ];
|
|
125
|
+
schemaNames.push(...Object.keys(schemas));
|
|
126
|
+
// sort schemas in reverse order to allow longest match in whatsMySchemaName function
|
|
127
|
+
schemaNames.sort((a, b) => b.length - a.length);
|
|
128
|
+
function whatsMySchemaName( n ) {
|
|
129
|
+
return schemaNames.reduce((rc, sn) => (!rc && n && n.startsWith(`${ sn }.`) ? sn : rc), undefined);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
if (schemaNames.length) {
|
|
133
|
+
forEachDefinition(csn, [
|
|
134
|
+
attachNameProperty,
|
|
135
|
+
(def, defName) => {
|
|
136
|
+
const mySchemaName = whatsMySchemaName(defName);
|
|
137
|
+
if (mySchemaName)
|
|
138
|
+
setProp(def, '$mySchemaName', mySchemaName);
|
|
139
|
+
if (isMyServiceRequested(defName) && def.kind !== 'aspect' && def.kind !== 'event')
|
|
140
|
+
reqDefs.definitions[defName] = def;
|
|
141
|
+
},
|
|
142
|
+
linkAssociationTarget,
|
|
143
|
+
]);
|
|
144
|
+
forEachGeneric(csn, 'vocabularies', (term, termName) => {
|
|
145
|
+
const mySchemaName = whatsMySchemaName(termName);
|
|
146
|
+
if (mySchemaName)
|
|
147
|
+
setProp(term, '$mySchemaName', mySchemaName);
|
|
148
|
+
});
|
|
149
|
+
// initialize requested services
|
|
150
|
+
const skip = { skipArtifact: (_def, defName) => !isMyServiceRequested(defName) };
|
|
151
|
+
forEachDefinition({ definitions: serviceRoots }, initService, skip);
|
|
152
|
+
// Create data structures for containments
|
|
153
|
+
forEachDefinition(reqDefs, initContainments);
|
|
154
|
+
// Initialize entities with parameters (add Parameter entity)
|
|
155
|
+
forEachDefinition(reqDefs, initParameterizedEntityOrView);
|
|
156
|
+
// Initialize structures
|
|
157
|
+
forEachDefinition(csn, initStructure);
|
|
158
|
+
// Initialize associations after _parent linking
|
|
159
|
+
forEachDefinition(reqDefs, initConstraints);
|
|
160
|
+
// Mute V4 elements depending on constraint preparation
|
|
161
|
+
if (options.isV4())
|
|
162
|
+
forEachDefinition(reqDefs, ignoreProperties);
|
|
163
|
+
// calculate constraints based on ignoreProperties and initConstraints
|
|
164
|
+
forEachDefinition(reqDefs, finalizeConstraints);
|
|
165
|
+
// convert exposed types into cross schema references if required
|
|
166
|
+
// must be run before proxy exposure to avoid potential reference collisions
|
|
167
|
+
convertExposedTypesOfOtherServicesIntoCrossReferences();
|
|
168
|
+
// create association target proxies (v4)
|
|
169
|
+
// Decide if an entity set needs to be constructed or not
|
|
170
|
+
forEachDefinition(reqDefs, [
|
|
171
|
+
exposeTargetsAsProxiesOrSchemaRefs,
|
|
172
|
+
determineEntitySet,
|
|
173
|
+
annotateOptionalActFuncParams,
|
|
174
|
+
]);
|
|
175
|
+
// finalize proxy creation
|
|
176
|
+
mergeProxiesIntoModel();
|
|
177
|
+
|
|
178
|
+
// Calculate NavPropBinding Target paths
|
|
179
|
+
// Rewrite @Capabilities for containment mode
|
|
180
|
+
if (options.isV4()) {
|
|
181
|
+
forEachDefinition(reqDefs, [
|
|
182
|
+
initEdmNavPropBindingTargets,
|
|
183
|
+
pullupCapabilitiesAnnotations,
|
|
184
|
+
]);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// Things that can be done in one pass
|
|
188
|
+
// Create edmKeyRefPaths
|
|
189
|
+
// Create V4 NavigationPropertyBindings, requires determineEntitySet & initEdmNavPropBindingTargets
|
|
190
|
+
// Map /** doc comments */ to @CoreDescription
|
|
191
|
+
forEachDefinition(reqDefs, [
|
|
192
|
+
initEdmKeyRefPaths,
|
|
193
|
+
initEdmNavPropBindingPaths,
|
|
194
|
+
finalize,
|
|
195
|
+
]);
|
|
196
|
+
}
|
|
197
|
+
return [
|
|
198
|
+
serviceRoots,
|
|
199
|
+
schemas,
|
|
200
|
+
reqDefs,
|
|
201
|
+
whatsMyServiceRootName,
|
|
202
|
+
fallBackSchemaName,
|
|
203
|
+
options,
|
|
204
|
+
];
|
|
205
|
+
|
|
206
|
+
// ////////////////////////////////////////////////////////////////////
|
|
207
|
+
//
|
|
208
|
+
// Service initialization starts here
|
|
209
|
+
//
|
|
210
|
+
|
|
211
|
+
function getAnOverviewOnTheServices( ) {
|
|
212
|
+
const defs = csn.definitions || {};
|
|
213
|
+
const sroots = Object.create(null);
|
|
214
|
+
for (const defName in defs) {
|
|
215
|
+
const def = defs[defName];
|
|
216
|
+
if (def && def.kind === 'service')
|
|
217
|
+
sroots[defName] = Object.assign(def, { name: defName });
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// first of all we need to know about all 'real' user defined services
|
|
221
|
+
const srootNames = Object.keys(sroots).sort((a, b) => b.length - a.length);
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
// find a globally unambiguous schema name to collect all top level 'root' types
|
|
225
|
+
// TODO: work on service basis (this requires post exposure renaming)
|
|
226
|
+
let fbSchemaName = 'root';
|
|
227
|
+
let i = 1;
|
|
228
|
+
const defNames = Object.keys(defs);
|
|
229
|
+
// eslint-disable-next-line no-loop-func
|
|
230
|
+
while (defNames.some((artName) => {
|
|
231
|
+
const p = artName.split('.');
|
|
232
|
+
return p.length === 2 && p[0] === fbSchemaName;
|
|
233
|
+
}))
|
|
234
|
+
fbSchemaName = `root${ i++ }`;
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
return [
|
|
238
|
+
sroots,
|
|
239
|
+
srootNames,
|
|
240
|
+
fbSchemaName,
|
|
241
|
+
// whatsMyServiceRootName
|
|
242
|
+
( n, self = true ) => srootNames.reduce((rc, sn) => (!rc && n && n.startsWith(`${ sn }.`) || (n === sn && self) ? sn : rc), undefined),
|
|
243
|
+
];
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/*
|
|
247
|
+
Replace dots in sub-service and sub-context definitions with underscores to be
|
|
248
|
+
Odata ID compliant.
|
|
249
|
+
Replace the definitions in csn.definitions (such that linkAssociationTarget works)
|
|
250
|
+
All type refs and assoc targets must also be adjusted to refer to the new names.
|
|
251
|
+
*/
|
|
252
|
+
function renameDottedDefinitionsInsideServiceOrContext() {
|
|
253
|
+
// Find the first definition above the current definition or undefined otherwise.
|
|
254
|
+
// Definition can either be a context or a service
|
|
255
|
+
function getRootDef( name ) {
|
|
256
|
+
const scopeKinds = { service: 1, context: 1 };
|
|
257
|
+
let pos = name.lastIndexOf('.');
|
|
258
|
+
name = pos < 0 ? undefined : name.substring(0, pos);
|
|
259
|
+
while (name && !((csn.definitions[name] && csn.definitions[name].kind) in scopeKinds)) {
|
|
260
|
+
pos = name.lastIndexOf('.');
|
|
261
|
+
name = pos < 0 ? undefined : name.substring(0, pos);
|
|
262
|
+
}
|
|
263
|
+
return name;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
const dotEntityNameMap = Object.create(null);
|
|
267
|
+
const dotTypeNameMap = Object.create(null);
|
|
268
|
+
const kinds = {
|
|
269
|
+
entity: 1, type: 1, action: 1, function: 1,
|
|
270
|
+
};
|
|
271
|
+
forEachDefinition(csn, (def, defName) => {
|
|
272
|
+
if (def.kind in kinds) {
|
|
273
|
+
const rootDef = getRootDef(defName);
|
|
274
|
+
// if this definition has a root def and the root def is not the service/schema name
|
|
275
|
+
// => service C { type D.E }, replace the prefix dots with underscores
|
|
276
|
+
if (rootDef && defName !== rootDef && rootDef !== edmUtils.getSchemaPrefix(defName)) {
|
|
277
|
+
const underscoredDefName = defName
|
|
278
|
+
.replace(`${ rootDef }.`, '')
|
|
279
|
+
.replace(/\./g, '_');
|
|
280
|
+
const newDefName = `${ rootDef }.${ underscoredDefName }`;
|
|
281
|
+
// store renamed types in correlation maps for later renaming
|
|
282
|
+
if (def.kind === 'entity')
|
|
283
|
+
dotEntityNameMap[defName] = newDefName;
|
|
284
|
+
if (def.kind === 'type')
|
|
285
|
+
dotTypeNameMap[defName] = newDefName;
|
|
286
|
+
// rename in csn.definitions
|
|
287
|
+
const art = csn.definitions[newDefName];
|
|
288
|
+
if (art !== undefined) {
|
|
289
|
+
error(null, [ 'definitions', defName ], { name: newDefName },
|
|
290
|
+
'Artifact name containing dots can\'t be mapped to an OData compliant name because it conflicts with existing definition $(NAME)');
|
|
291
|
+
}
|
|
292
|
+
else {
|
|
293
|
+
csn.definitions[newDefName] = def;
|
|
294
|
+
delete csn.definitions[defName];
|
|
295
|
+
}
|
|
296
|
+
// dots are illegal in bound actions/functions, no actions required for them
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
});
|
|
300
|
+
// rename type refs to new type names
|
|
301
|
+
const rewrite = (def) => {
|
|
302
|
+
const rewriteReferencesInActions = (act) => {
|
|
303
|
+
if (act.params) {
|
|
304
|
+
Object.values(act.params).forEach((param) => {
|
|
305
|
+
param = param.items || param;
|
|
306
|
+
if (param.type && (dotEntityNameMap[param.type] || dotTypeNameMap[param.type]))
|
|
307
|
+
param.type = dotEntityNameMap[param.type] || dotTypeNameMap[param.type];
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
if (act.returns) {
|
|
311
|
+
const returnsObj = act.returns.items || act.returns;
|
|
312
|
+
if (returnsObj.type && dotEntityNameMap[returnsObj.type] || dotTypeNameMap[returnsObj.type])
|
|
313
|
+
returnsObj.type = dotEntityNameMap[returnsObj.type] || dotTypeNameMap[returnsObj.type];
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
const applyOnNode = (node) => {
|
|
318
|
+
node = node.items || node;
|
|
319
|
+
if (node.type && dotTypeNameMap[node.type])
|
|
320
|
+
node.type = dotTypeNameMap[node.type];
|
|
321
|
+
|
|
322
|
+
if (node.target && dotEntityNameMap[node.target])
|
|
323
|
+
node.target = dotEntityNameMap[node.target];
|
|
324
|
+
|
|
325
|
+
if (node.$path && dotEntityNameMap[node.$path[1]])
|
|
326
|
+
node.$path[1] = dotEntityNameMap[node.$path[1]];
|
|
327
|
+
|
|
328
|
+
if (node.projection || node.query) {
|
|
329
|
+
applyTransformationsOnNonDictionary(node.projection || node.query, undefined, {
|
|
330
|
+
ref: (parent, prop, ref) => {
|
|
331
|
+
if (dotEntityNameMap[ref[0]])
|
|
332
|
+
parent.ref[0] = dotEntityNameMap[ref[0]];
|
|
333
|
+
},
|
|
334
|
+
}, { directDict: true });
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
rewriteReferencesInActions(node);
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
const applyOnAnnoXprs = (node) => {
|
|
341
|
+
Object.keys(node).filter(pn => pn[0] === '@').forEach((anno) => {
|
|
342
|
+
transformAnnotationExpression(node, anno, {
|
|
343
|
+
ref: (elemRef, _prop, ref) => {
|
|
344
|
+
if (dotEntityNameMap[ref[0]] || dotTypeNameMap[ref[0]])
|
|
345
|
+
elemRef.ref[0] = dotEntityNameMap[ref[0]] || dotTypeNameMap[ref[0]];
|
|
346
|
+
},
|
|
347
|
+
});
|
|
348
|
+
});
|
|
349
|
+
};
|
|
350
|
+
|
|
351
|
+
forEachMemberRecursively(def, [ applyOnNode, applyOnAnnoXprs ]);
|
|
352
|
+
applyOnNode(def);
|
|
353
|
+
applyOnAnnoXprs(def);
|
|
354
|
+
// handle unbound action/function and params in views
|
|
355
|
+
rewriteReferencesInActions(def);
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
forEachDefinition(csn, rewrite);
|
|
359
|
+
forEachGeneric(csn, 'vocabularies', rewrite);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/*
|
|
363
|
+
Experimental: Move definitions with dots into separate (sub-)service that has the
|
|
364
|
+
namespace of the definition prefix. As not all such services end up with entity sets,
|
|
365
|
+
schemas should be packed after the preprocessing run in order to minimize the number
|
|
366
|
+
of services.
|
|
367
|
+
*/
|
|
368
|
+
function splitDottedDefinitionsIntoSeparateServices() {
|
|
369
|
+
forEachDefinition(csn, (def, defName) => {
|
|
370
|
+
if (def.kind !== 'service') {
|
|
371
|
+
const myServiceRoot = whatsMyServiceRootName(defName);
|
|
372
|
+
const mySchemaPrefix = edmUtils.getSchemaPrefix(defName);
|
|
373
|
+
if (myServiceRoot && options.isV4() &&
|
|
374
|
+
/* (options.odataProxies || options.odataXServiceRefs) && options.isStructFormat && */
|
|
375
|
+
defName !== myServiceRoot && myServiceRoot !== mySchemaPrefix) {
|
|
376
|
+
const service = { kind: 'service', name: mySchemaPrefix };
|
|
377
|
+
serviceRoots[mySchemaPrefix] = service;
|
|
378
|
+
serviceRootNames.push(mySchemaPrefix);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
serviceRootNames.sort((a, b) => b.length - a.length);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
function attachNameProperty( def, defName ) {
|
|
386
|
+
edmUtils.assignProp(def, 'name', defName);
|
|
387
|
+
// Attach name to bound actions, functions and parameters
|
|
388
|
+
forEachGeneric(def, 'actions', (a, an) => {
|
|
389
|
+
edmUtils.assignProp(a, 'name', an);
|
|
390
|
+
forEachGeneric(a, 'params', (p, pn) => {
|
|
391
|
+
edmUtils.assignProp(p, 'name', pn);
|
|
392
|
+
});
|
|
393
|
+
});
|
|
394
|
+
// Attach name unbound action parameters
|
|
395
|
+
forEachGeneric(def, 'params', (p, pn) => {
|
|
396
|
+
edmUtils.assignProp(p, 'name', pn);
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
// initialize the service itself
|
|
401
|
+
function initService( serviceRoot ) {
|
|
402
|
+
edmAnnoPreproc.setSAPSpecificV2AnnotationsToEntityContainer(options, serviceRoot);
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
// link association target to association and add @odata.contained to compositions in V4
|
|
406
|
+
function linkAssociationTarget( struct ) {
|
|
407
|
+
forEachMemberRecursively(struct, (element, name, prop, subpath) => {
|
|
408
|
+
if (element.target && !element._target) {
|
|
409
|
+
const target = csn.definitions[element.target];
|
|
410
|
+
if (target) {
|
|
411
|
+
setProp(element, '_target', target);
|
|
412
|
+
// If target has parameters, xref assoc at target for redirection
|
|
413
|
+
if (edmUtils.isParameterizedEntity(target)) {
|
|
414
|
+
if (!target.$sources)
|
|
415
|
+
setProp(target, '$sources', Object.create(null));
|
|
416
|
+
|
|
417
|
+
target.$sources[`${ struct.name }.${ name }`] = element;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
else {
|
|
421
|
+
error(null, subpath, { target: element.target }, 'Target $(TARGET) can\'t be found in the model');
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
// in V4 tag all compositions to be containments
|
|
425
|
+
if (options.odataContainment &&
|
|
426
|
+
options.isV4() &&
|
|
427
|
+
csnUtils.isComposition(element) &&
|
|
428
|
+
element['@odata.contained'] === undefined)
|
|
429
|
+
element['@odata.contained'] = true;
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
// Perform checks and add attributes for "contained" sub-entities:
|
|
434
|
+
// - A container is recognized by having an association/composition annotated with '@odata.contained'.
|
|
435
|
+
// - All targets of such associations ("containees") are marked with a property
|
|
436
|
+
// '$containerNames: []', having as value an array of container names (i.e. of entities
|
|
437
|
+
// that have a '@odata.contained' association pointing to the containee). Note that this
|
|
438
|
+
// may be multiple entities, possibly including the container itself.
|
|
439
|
+
// - All associations in the containee pointing back to the container are marked with
|
|
440
|
+
// a boolean property '_isToContainer : true', except if the association itself
|
|
441
|
+
// has the annotation '@odata.contained' (indicating the top-down link in a hierarchy).
|
|
442
|
+
// - Rewrite annotations that would be assigned to the containees entity set for the
|
|
443
|
+
// non-containment rendering. If containment rendering is active, the containee has no
|
|
444
|
+
// entity set. Instead try to rewrite the annotation in such a way that it is effective
|
|
445
|
+
// on the containment navigation property.
|
|
446
|
+
// $containeeAssociations stores the containees (children/outbound edges)
|
|
447
|
+
// $containerNames stores the containers (parents/inbound edges)
|
|
448
|
+
|
|
449
|
+
function initContainments( container ) {
|
|
450
|
+
if (container.kind === 'entity') {
|
|
451
|
+
if (!container.$containeeAssociations)
|
|
452
|
+
setProp(container, '$containeeAssociations', []);
|
|
453
|
+
forEachMemberRecursively(container, eachAssoc,
|
|
454
|
+
[], true, { pathWithoutProp: true, elementsOnly: true });
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
function eachAssoc( elt, _memberName, _prop, path ) {
|
|
458
|
+
if (elt.target && elt['@odata.contained']) {
|
|
459
|
+
// store all containment associations, required to create the containment paths later on
|
|
460
|
+
container.$containeeAssociations.push( { assoc: elt, path });
|
|
461
|
+
// Let the containee know its container
|
|
462
|
+
// (array because the contanee may contained more then once)
|
|
463
|
+
const containee = elt._target;
|
|
464
|
+
if (!containee.$containerNames)
|
|
465
|
+
setProp(containee, '$containerNames', []);
|
|
466
|
+
// add container only once per containee
|
|
467
|
+
if (!containee.$containerNames.includes(container.name))
|
|
468
|
+
containee.$containerNames.push(container.name);
|
|
469
|
+
// Mark associations in the containee pointing to the container (i.e. to this entity)
|
|
470
|
+
forEachMemberRecursively(containee, markToContainer,
|
|
471
|
+
[ 'definitions', containee.name ], true, { elementsOnly: true });
|
|
472
|
+
}
|
|
473
|
+
else if (elt.type && !elt.elements) {
|
|
474
|
+
// try to find elements to drill down further
|
|
475
|
+
while (elt && !isBuiltinType(elt.type) && !elt.elements)
|
|
476
|
+
elt = csn.definitions[elt.type];
|
|
477
|
+
|
|
478
|
+
if (elt && elt.elements && !elt.$visited) {
|
|
479
|
+
setProp(elt, '$visited', true);
|
|
480
|
+
forEachMemberRecursively(elt, eachAssoc,
|
|
481
|
+
path, true, { pathWithoutProp: true, elementsOnly: true });
|
|
482
|
+
delete elt.$visited;
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
function markToContainer( elt ) {
|
|
488
|
+
if (elt._target && elt._target.name) {
|
|
489
|
+
// If this is an association that points to the container (but is not by itself contained,
|
|
490
|
+
// which would indicate the top role in a hierarchy) mark it with '_isToContainer'
|
|
491
|
+
if (elt._target.name === container.name && !elt['odata.contained'])
|
|
492
|
+
setProp(elt, '_isToContainer', true);
|
|
493
|
+
}
|
|
494
|
+
else {
|
|
495
|
+
// try to find elements to drill down further
|
|
496
|
+
while (elt && !(isBuiltinType(elt.type) || elt.elements))
|
|
497
|
+
elt = csn.definitions[elt.type];
|
|
498
|
+
|
|
499
|
+
if (elt && elt.elements && !elt.$visited) {
|
|
500
|
+
setProp(elt, '$visited', true);
|
|
501
|
+
forEachMemberRecursively(elt, markToContainer,
|
|
502
|
+
[], true, { elementsOnly: true });
|
|
503
|
+
delete elt.$visited;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
// Split an entity with parameters into two entity types with their entity sets,
|
|
510
|
+
// one named <name>Parameter and one named <name>Type. Parameter contains Type.
|
|
511
|
+
// Containment processing must take place before because it might be that this
|
|
512
|
+
// artifact with parameters is already contained. In such a case the existing
|
|
513
|
+
// containment chain must be propagated and reused. This requires that the
|
|
514
|
+
// containment data structures must be manually added here.
|
|
515
|
+
// As a param entity is a potential proxy candidate, this split must be performed on
|
|
516
|
+
// all definitions
|
|
517
|
+
function initParameterizedEntityOrView( entityCsn, entityName ) {
|
|
518
|
+
if (!edmUtils.isParameterizedEntity(entityCsn))
|
|
519
|
+
return;
|
|
520
|
+
|
|
521
|
+
// Naming rules for aggregated views with parameters
|
|
522
|
+
// Parameters: EntityType <ViewName>Parameters, EntitySet <ViewName>
|
|
523
|
+
// with NavigationProperty "Results" pointing to the entity set of type <ViewName>Result
|
|
524
|
+
// Result: EntityType <ViewName>Result, EntitySet <ViewName>Results
|
|
525
|
+
|
|
526
|
+
// Naming rules for non aggregated views with parameters
|
|
527
|
+
// Parameters: EntityType <ViewName>Parameters, EntitySet <ViewName>
|
|
528
|
+
// with NavigationProperty "Set" pointing to the entity set of type <ViewName>Type
|
|
529
|
+
// Result: EntityType <ViewName>Type, EntitySet <ViewName>Set
|
|
530
|
+
// Backlink Navigation Property "Parameters" to <ViewName>Parameters
|
|
531
|
+
|
|
532
|
+
// this code can be extended for aggregated views
|
|
533
|
+
const typeEntityName = `${ entityName }Type`;
|
|
534
|
+
const typeEntitySetName = `${ entityName }Set`;
|
|
535
|
+
const typeToParameterAssocName = 'Parameters';
|
|
536
|
+
const hasBacklink = true;
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
// create the Parameter Definition
|
|
540
|
+
const parameterCsn = createParameterEntity(entityCsn, entityName, false);
|
|
541
|
+
setProp(parameterCsn, '_origin', entityCsn);
|
|
542
|
+
// create the Type Definition
|
|
543
|
+
// modify the original parameter entity with backlink and new name
|
|
544
|
+
if (csn.definitions[typeEntityName])
|
|
545
|
+
error('odata-duplicate-definition', [ 'definitions', entityName ], { '#': 'std', name: typeEntityName });
|
|
546
|
+
else
|
|
547
|
+
entityCsn.name = typeEntityName;
|
|
548
|
+
setProp(entityCsn, '$entitySetName', typeEntitySetName);
|
|
549
|
+
// add backlink association
|
|
550
|
+
if (hasBacklink) {
|
|
551
|
+
entityCsn.elements[typeToParameterAssocName] = {
|
|
552
|
+
name: typeToParameterAssocName,
|
|
553
|
+
target: parameterCsn.name,
|
|
554
|
+
type: 'cds.Association',
|
|
555
|
+
on: [ { ref: [ 'Parameters', 'Set' ] }, '=', { ref: [ '$self' ] } ],
|
|
556
|
+
};
|
|
557
|
+
setProp(entityCsn.elements[typeToParameterAssocName], '_selfReferences', []);
|
|
558
|
+
setProp(entityCsn.elements[typeToParameterAssocName], '_target', parameterCsn);
|
|
559
|
+
setProp(entityCsn.elements[typeToParameterAssocName], '$path',
|
|
560
|
+
[ 'definitions', entityName, 'elements', typeToParameterAssocName ] );
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/*
|
|
564
|
+
<EntitySet Name="ZRHA_TEST_CDSSet" EntityType="ZRHA_TEST_CDS_CDS.ZRHA_TEST_CDSType" sap:creatable="false" sap:updatable="false"
|
|
565
|
+
sap:deletable="false" sap:addressable="false" sap:content-version="1"/>
|
|
566
|
+
*/
|
|
567
|
+
edmUtils.assignProp(entityCsn, '_SetAttributes',
|
|
568
|
+
{
|
|
569
|
+
'@sap.creatable': false, '@sap.updatable': false, '@sap.deletable': false, '@sap.addressable': false,
|
|
570
|
+
});
|
|
571
|
+
|
|
572
|
+
// redirect inbound associations/compositions to the parameter entity
|
|
573
|
+
Object.keys(entityCsn.$sources || {}).forEach((n) => {
|
|
574
|
+
// preserve the original target for constraint calculation
|
|
575
|
+
setProp(entityCsn.$sources[n], '_originalTarget', entityCsn.$sources[n]._target);
|
|
576
|
+
entityCsn.$sources[n]._target = parameterCsn;
|
|
577
|
+
});
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
function createParameterEntity( entityCsn, entityName, isProxy ) {
|
|
581
|
+
const parameterEntityName = `${ entityName }Parameters`;
|
|
582
|
+
const parameterToTypeAssocName = 'Set';
|
|
583
|
+
|
|
584
|
+
// Construct the parameter entity
|
|
585
|
+
const parameterCsn = {
|
|
586
|
+
name: parameterEntityName,
|
|
587
|
+
kind: 'entity',
|
|
588
|
+
elements: Object.create(null),
|
|
589
|
+
'@sap.semantics': 'parameters',
|
|
590
|
+
};
|
|
591
|
+
if (!isProxy)
|
|
592
|
+
setProp(parameterCsn, '$entitySetName', entityName);
|
|
593
|
+
if (entityCsn.$location)
|
|
594
|
+
edmUtils.assignProp(parameterCsn, '$location', entityCsn.$location);
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
/*
|
|
598
|
+
<EntitySet Name="ZRHA_TEST_CDS" EntityType="ZRHA_TEST_CDS_CDS.ZRHA_TEST_CDSParameters" sap:creatable="false" sap:updatable="false"
|
|
599
|
+
sap:deletable="false" sap:pageable="false" sap:content-version="1"/>
|
|
600
|
+
*/
|
|
601
|
+
|
|
602
|
+
edmUtils.assignProp(parameterCsn, '_SetAttributes',
|
|
603
|
+
{
|
|
604
|
+
'@sap.creatable': false, '@sap.updatable': false, '@sap.deletable': false, '@sap.pageable': false,
|
|
605
|
+
});
|
|
606
|
+
|
|
607
|
+
setProp(parameterCsn, '$isParamEntity', true);
|
|
608
|
+
setProp(parameterCsn, '$mySchemaName', entityCsn.$mySchemaName);
|
|
609
|
+
|
|
610
|
+
forEachGeneric(entityCsn, 'params', (p, n) => {
|
|
611
|
+
const elt = cloneCsnNonDict(p, options);
|
|
612
|
+
elt.name = n;
|
|
613
|
+
delete elt.kind;
|
|
614
|
+
setProp(elt, '$path', [ 'definitions', parameterEntityName, 'elements', n ]);
|
|
615
|
+
elt.key = true; // params become primary key in parameter entity
|
|
616
|
+
/*
|
|
617
|
+
Spec meeting decision 28.02.22:
|
|
618
|
+
Annotation @sap.parameter allows two values "mandatory"/"optional".
|
|
619
|
+
Question was how to deal with incompatible "optional".
|
|
620
|
+
Only "mandatory" is allowed because in RAP all parameters are NOT NULL
|
|
621
|
+
and so they are in CAP (all view parameters become primary keys which are not null).
|
|
622
|
+
*/
|
|
623
|
+
if (options.isV2())
|
|
624
|
+
edmUtils.assignAnnotation(elt, '@sap.parameter', 'mandatory');
|
|
625
|
+
else
|
|
626
|
+
edmUtils.assignAnnotation(elt, '@Common.FieldControl', { '#': 'Mandatory' });
|
|
627
|
+
parameterCsn.elements[n] = elt;
|
|
628
|
+
});
|
|
629
|
+
linkAssociationTarget(parameterCsn);
|
|
630
|
+
initContainments(parameterCsn);
|
|
631
|
+
// add assoc to result set, FIXME: is the cardinality correct?
|
|
632
|
+
if (!isProxy) {
|
|
633
|
+
parameterCsn.elements[parameterToTypeAssocName] = {
|
|
634
|
+
'@odata.contained': true,
|
|
635
|
+
name: parameterToTypeAssocName,
|
|
636
|
+
target: entityCsn.name,
|
|
637
|
+
type: 'cds.Association',
|
|
638
|
+
cardinality: { src: 1, min: 0, max: '*' },
|
|
639
|
+
};
|
|
640
|
+
setProp(parameterCsn.elements[parameterToTypeAssocName], '_target', entityCsn);
|
|
641
|
+
setProp(parameterCsn.elements[parameterToTypeAssocName], '$path',
|
|
642
|
+
[ 'definitions', parameterEntityName, 'elements', parameterToTypeAssocName ] );
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
[ '@odata.singleton', '@odata.singleton.nullable' ].forEach((a) => {
|
|
646
|
+
if (entityCsn[a] != null)
|
|
647
|
+
parameterCsn[a] = entityCsn[a];
|
|
648
|
+
delete entityCsn[a];
|
|
649
|
+
});
|
|
650
|
+
|
|
651
|
+
// initialize containment
|
|
652
|
+
// propagate containment information, if containment is recursive, use parameterCsn.name as $containerNames
|
|
653
|
+
if (entityCsn.$containerNames) {
|
|
654
|
+
if (!parameterCsn.$containerNames)
|
|
655
|
+
setProp(parameterCsn, '$containerNames', []);
|
|
656
|
+
for (const c of entityCsn.$containerNames)
|
|
657
|
+
parameterCsn.$containerNames.push((c === entityCsn.name) ? parameterCsn.name : c);
|
|
658
|
+
}
|
|
659
|
+
entityCsn.$containerNames = [ parameterCsn ];
|
|
660
|
+
|
|
661
|
+
if (!parameterCsn.$containeeAssociations)
|
|
662
|
+
setProp(parameterCsn, '$containeeAssociations', [ ]);
|
|
663
|
+
parameterCsn.$containeeAssociations.push(
|
|
664
|
+
{
|
|
665
|
+
assoc: parameterCsn.elements[parameterToTypeAssocName],
|
|
666
|
+
path: [ parameterToTypeAssocName ],
|
|
667
|
+
}
|
|
668
|
+
);
|
|
669
|
+
|
|
670
|
+
// rewrite $path
|
|
671
|
+
setProp(parameterCsn, '$path', [ 'definitions', parameterEntityName ]);
|
|
672
|
+
|
|
673
|
+
// proxies are registered in model separately
|
|
674
|
+
if (!isProxy) {
|
|
675
|
+
if (csn.definitions[parameterCsn.name]) {
|
|
676
|
+
error('odata-duplicate-definition', [ 'definitions', entityName ], { '#': 'std', name: parameterCsn.name });
|
|
677
|
+
}
|
|
678
|
+
else {
|
|
679
|
+
csn.definitions[parameterCsn.name] = parameterCsn;
|
|
680
|
+
reqDefs.definitions[parameterCsn.name] = parameterCsn;
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
return parameterCsn;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
function initElement( element, name, struct ) {
|
|
687
|
+
setProp(element, 'name', name);
|
|
688
|
+
setProp(element, '_parent', struct);
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
// convert $path to path starting at main artifact
|
|
692
|
+
function $path2path( p ) {
|
|
693
|
+
const path = [];
|
|
694
|
+
/** @type {any} */
|
|
695
|
+
let env = csn;
|
|
696
|
+
for (let i = 0; p && env && i < p.length; i++) {
|
|
697
|
+
const ps = p[i];
|
|
698
|
+
env = env[ps];
|
|
699
|
+
if (env && env.constructor === Object) {
|
|
700
|
+
path.push(ps);
|
|
701
|
+
// jump over many items but not if this is an element
|
|
702
|
+
if (env.items) {
|
|
703
|
+
env = env.items;
|
|
704
|
+
if (p[i + 1] === 'items')
|
|
705
|
+
i++;
|
|
706
|
+
}
|
|
707
|
+
if (env.type && !isBuiltinType(env.type) && !env.elements)
|
|
708
|
+
env = csn.definitions[env.type];
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
return path;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
// Initialize a structured artifact
|
|
715
|
+
function initStructure( def ) {
|
|
716
|
+
// Don't operate on any structured types other than type and entity
|
|
717
|
+
// such as events and aspects
|
|
718
|
+
if (!edmUtils.isStructuredArtifact(def))
|
|
719
|
+
return;
|
|
720
|
+
|
|
721
|
+
const keys = Object.create(null);
|
|
722
|
+
// eslint-disable-next-line
|
|
723
|
+
const validFrom = [];
|
|
724
|
+
const validKey = [];
|
|
725
|
+
|
|
726
|
+
// Iterate all struct elements
|
|
727
|
+
forEachMemberRecursively(def.items || def, (element, elementName, prop, _path, construct) => {
|
|
728
|
+
if (prop !== 'elements')
|
|
729
|
+
return;
|
|
730
|
+
|
|
731
|
+
initElement(element, elementName, construct);
|
|
732
|
+
|
|
733
|
+
// collect temporal information
|
|
734
|
+
if (element['@cds.valid.key'])
|
|
735
|
+
validKey.push(element);
|
|
736
|
+
|
|
737
|
+
if (element['@cds.valid.from'])
|
|
738
|
+
validFrom.push(element);
|
|
739
|
+
|
|
740
|
+
// forward annotations from managed association element to its foreign keys
|
|
741
|
+
const elements = construct.items?.elements || construct.elements;
|
|
742
|
+
const assoc = elements[element['@odata.foreignKey4']];
|
|
743
|
+
if (assoc) {
|
|
744
|
+
Object.keys(assoc).filter(pn => pn[0] === '@' && !findAnnotationExpression(assoc, pn)).forEach((pn) => {
|
|
745
|
+
edmUtils.assignAnnotation(element, pn, assoc[pn]);
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
// and eventually remove some afterwards
|
|
749
|
+
if (options.isV2())
|
|
750
|
+
edmAnnoPreproc.setSAPSpecificV2AnnotationsToAssociation(element);
|
|
751
|
+
|
|
752
|
+
const absPath = $path2path(element.$path);
|
|
753
|
+
|
|
754
|
+
// initialize an association
|
|
755
|
+
if (element.target) {
|
|
756
|
+
// in case this is a forward assoc, store the backlink partners here, _selfReferences.length > 1 => error
|
|
757
|
+
edmUtils.assignProp(element, '_selfReferences', []);
|
|
758
|
+
edmUtils.assignProp(element._target, '$proxies', []);
|
|
759
|
+
// $abspath is used as partner path
|
|
760
|
+
edmUtils.assignProp(element, '$abspath', absPath);
|
|
761
|
+
}
|
|
762
|
+
// Collect keys
|
|
763
|
+
if (element.key)
|
|
764
|
+
keys[elementName] = element;
|
|
765
|
+
|
|
766
|
+
edmAnnoPreproc.applyAppSpecificLateCsnTransformationOnElement(options, element, def, error);
|
|
767
|
+
}, [], true, { elementsOnly: true });
|
|
768
|
+
|
|
769
|
+
// if artifact has a cds.valid.key mention it as @Core.AlternateKey
|
|
770
|
+
if (validKey.length) {
|
|
771
|
+
const altKeys = [ { Key: [] } ];
|
|
772
|
+
validKey.forEach(vk => altKeys[0].Key.push( { Name: vk.name, Alias: vk.name } ) );
|
|
773
|
+
edmUtils.assignAnnotation(def, '@Core.AlternateKeys', altKeys);
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
// prepare the structure itself
|
|
777
|
+
if (def.kind === 'entity') {
|
|
778
|
+
edmUtils.assignProp(def, '_SetAttributes', Object.create(null));
|
|
779
|
+
edmUtils.assignProp(def, '$keys', keys);
|
|
780
|
+
edmAnnoPreproc.applyAppSpecificLateCsnTransformationOnStructure(options, def, error);
|
|
781
|
+
edmAnnoPreproc.setSAPSpecificV2AnnotationsToEntitySet(options, def);
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
// Prepare the associations for the subsequent steps
|
|
786
|
+
function initConstraints( def ) {
|
|
787
|
+
if (!edmUtils.isStructuredArtifact(def))
|
|
788
|
+
return;
|
|
789
|
+
|
|
790
|
+
forEachMemberRecursively(def.items || def, initConstraintsOnAssoc, [], true, { elementsOnly: true });
|
|
791
|
+
}
|
|
792
|
+
function initConstraintsOnAssoc( element ) {
|
|
793
|
+
if (element.target && !element._constraints) {
|
|
794
|
+
// setup the constraints object
|
|
795
|
+
setProp(element, '_constraints', {
|
|
796
|
+
constraints: Object.create(null), selfs: [], _origins: [], termCount: 0,
|
|
797
|
+
});
|
|
798
|
+
// and crack the ON condition
|
|
799
|
+
edmUtils.resolveOnConditionAndPrepareConstraints(csn, element, messageFunctions);
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
/*
|
|
804
|
+
Do not render (ignore) elements as properties
|
|
805
|
+
In V4:
|
|
806
|
+
1) If this is a foreign key of an association to a container which *is* used
|
|
807
|
+
to establish the relation via composition and $self comparison.
|
|
808
|
+
The $self comparison can only be evaluated after the ON conditions have been
|
|
809
|
+
parsed in prepareConstraints().
|
|
810
|
+
2) For all other foreign keys let isEdmPropertyRendered() decide.
|
|
811
|
+
3) If an element/association is annotated with @odata.containment.ignore and containment is
|
|
812
|
+
active, assign @cds.api.ignore or @odata.navigable: false
|
|
813
|
+
4) All of this can be revoked with options.renderForeignKeys.
|
|
814
|
+
*/
|
|
815
|
+
function ignoreProperties( struct ) {
|
|
816
|
+
if (!edmUtils.isStructuredArtifact(struct))
|
|
817
|
+
return;
|
|
818
|
+
|
|
819
|
+
forEachMemberRecursively(struct.items || struct, (element) => {
|
|
820
|
+
if (!element.target) {
|
|
821
|
+
if (element['@odata.foreignKey4']) {
|
|
822
|
+
let isContainerAssoc = false;
|
|
823
|
+
let { elements } = struct.items || struct;
|
|
824
|
+
let assoc;
|
|
825
|
+
const paths = element['@odata.foreignKey4'].split('.');
|
|
826
|
+
for (const p of paths) {
|
|
827
|
+
assoc = elements[p];
|
|
828
|
+
if (assoc) // could be that the @odata.foreignKey4 was propagated...
|
|
829
|
+
elements = assoc.elements;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
if (assoc)
|
|
833
|
+
isContainerAssoc = !!(assoc._isToContainer && assoc._selfReferences.length || assoc['@odata.contained']);
|
|
834
|
+
/*
|
|
835
|
+
If this foreign key is NOT a container fk, let isEdmPropertyRendered() decide
|
|
836
|
+
Else, if fk is container fk, omit it if it wasn't requested in structured mode
|
|
837
|
+
*/
|
|
838
|
+
if ((!isContainerAssoc && !isEdmPropertyRendered(element, options)) ||
|
|
839
|
+
(isContainerAssoc && !options.renderForeignKeys))
|
|
840
|
+
edmUtils.assignAnnotation(element, '@cds.api.ignore', true);
|
|
841
|
+
// Only in containment:
|
|
842
|
+
// If this element is a foreign key and if it is rendered, remove it from the key ref vector (if available)
|
|
843
|
+
else if (options.odataContainment &&
|
|
844
|
+
isContainerAssoc &&
|
|
845
|
+
options.renderForeignKeys &&
|
|
846
|
+
struct.$keys)
|
|
847
|
+
delete struct.$keys[element.name];
|
|
848
|
+
}
|
|
849
|
+
// Only in containment:
|
|
850
|
+
// Ignore this (foreign key) element if renderForeignKeys is false
|
|
851
|
+
if (options.odataContainment && element['@odata.containment.ignore']) {
|
|
852
|
+
if (!options.renderForeignKeys)
|
|
853
|
+
edmUtils.assignAnnotation(element, '@cds.api.ignore', true);
|
|
854
|
+
else if (struct.$keys)
|
|
855
|
+
// If foreign keys shall be rendered, remove it from key ref vector (if available)
|
|
856
|
+
delete struct.$keys[element.name];
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
// it's an association
|
|
860
|
+
else if (element['@odata.containment.ignore'] && options.odataContainment && !options.renderForeignKeys) {
|
|
861
|
+
// if this is an explicitly containment ignore tagged association,
|
|
862
|
+
// ignore it if option odataContainment is true and no foreign keys should be rendered
|
|
863
|
+
edmUtils.assignAnnotation(element, '@odata.navigable', false);
|
|
864
|
+
}
|
|
865
|
+
}, [], true, { elementsOnly: true });
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
/*
|
|
869
|
+
Calculate the final referential constraints based on the assignments done in mutePropertiesForV4()
|
|
870
|
+
It may be that now a number of properties are not rendered and cannot act as constraints (see isConstraintCandidate())
|
|
871
|
+
in edmUtils
|
|
872
|
+
*/
|
|
873
|
+
function finalizeConstraints( def ) {
|
|
874
|
+
if (!edmUtils.isStructuredArtifact(def))
|
|
875
|
+
return;
|
|
876
|
+
|
|
877
|
+
forEachMemberRecursively(def.items || def, finalizeConstraintsOnAssoc, [], true, { elementsOnly: true });
|
|
878
|
+
}
|
|
879
|
+
function finalizeConstraintsOnAssoc( element ) {
|
|
880
|
+
if (element.target && element._constraints) {
|
|
881
|
+
edmUtils.finalizeReferentialConstraints(csn, element, options, info);
|
|
882
|
+
|
|
883
|
+
if (element._constraints?._partnerCsn) {
|
|
884
|
+
// if this is a partnership and this assoc has a set target cardinality, assign it as source cardinality to the partner
|
|
885
|
+
if (element._constraints._partnerCsn.cardinality) {
|
|
886
|
+
// if the forward association has set a src cardinality and it deviates from the backlink target cardinality raise a warning
|
|
887
|
+
// in V2 only, in V4 the source cardinality is rendered implicitly at the Type property
|
|
888
|
+
if (element._constraints._partnerCsn.cardinality.src) {
|
|
889
|
+
const partnerCsn = element._constraints._partnerCsn;
|
|
890
|
+
// eslint-disable-next-line eqeqeq
|
|
891
|
+
const srcMult = (partnerCsn.cardinality.src == 1) ? '0..1' : '*';
|
|
892
|
+
const newMult
|
|
893
|
+
= (element.cardinality?.min == 1 && element.cardinality?.max == 1) // eslint-disable-line
|
|
894
|
+
? 1
|
|
895
|
+
: (element.cardinality?.max === '*' || element.cardinality?.max > 1)
|
|
896
|
+
? '*'
|
|
897
|
+
: '0..1';
|
|
898
|
+
if (srcMult !== newMult) {
|
|
899
|
+
// TODO: Message should probably list actual cardinalities and not "normalized" ones.
|
|
900
|
+
warning('odata-unexpected-cardinality', element.$path, {
|
|
901
|
+
value: srcMult,
|
|
902
|
+
othervalue: newMult,
|
|
903
|
+
name: `${ partnerCsn._parent.name }/${ partnerCsn.name }`,
|
|
904
|
+
}, 'Explicit source cardinality $(VALUE) of $(NAME) conflicts with target cardinality $(OTHERVALUE)' );
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
else {
|
|
908
|
+
// .. but only if the original assoc hasn't set src yet
|
|
909
|
+
element._constraints._partnerCsn.cardinality.src = element.cardinality?.max ? element.cardinality.max : 1;
|
|
910
|
+
if (element.cardinality?.min !== undefined && element._constraints._partnerCsn.cardinality?.srcmin === undefined)
|
|
911
|
+
element._constraints._partnerCsn.cardinality.srcmin = element.cardinality.min;
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
else {
|
|
915
|
+
element._constraints._partnerCsn.cardinality = { src: element.cardinality?.max ? element.cardinality.max : 1 };
|
|
916
|
+
if (element.cardinality?.min !== undefined)
|
|
917
|
+
element._constraints._partnerCsn.cardinality.srcmin = element.cardinality.min;
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
setProp(element._constraints, '$finalized', true);
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
/*
|
|
925
|
+
convert sub schemas that represent another service into a service reference object and remove all
|
|
926
|
+
sub artifacts exposed by the initial type exposure
|
|
927
|
+
*/
|
|
928
|
+
function convertExposedTypesOfOtherServicesIntoCrossReferences() {
|
|
929
|
+
if (options.odataXServiceRefs && options.isV4()) {
|
|
930
|
+
serviceRootNames.forEach((srn) => {
|
|
931
|
+
schemaNames.forEach((fqSchemaName) => {
|
|
932
|
+
if (fqSchemaName.startsWith(`${ srn }.`)) {
|
|
933
|
+
const targetSchemaName = fqSchemaName.replace(`${ srn }.`, '');
|
|
934
|
+
if (serviceRootNames.includes(targetSchemaName)) {
|
|
935
|
+
// remove all definitions starting with < fqSchemaName >. and add a schema reference
|
|
936
|
+
forEachKey(csn.definitions, (dn) => {
|
|
937
|
+
if (dn.startsWith(fqSchemaName)) {
|
|
938
|
+
delete csn.definitions[dn];
|
|
939
|
+
delete reqDefs.definitions[dn];
|
|
940
|
+
}
|
|
941
|
+
});
|
|
942
|
+
if (!schemas[fqSchemaName])
|
|
943
|
+
schemaNames.push(fqSchemaName);
|
|
944
|
+
schemas[fqSchemaName] = edmUtils.createSchemaRef(serviceRoots, targetSchemaName);
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
});
|
|
948
|
+
});
|
|
949
|
+
}
|
|
950
|
+
schemaNames.sort((a, b) => b.length - a.length);
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
/*
|
|
954
|
+
If an association targets an artifact outside the service, expose the target entity type
|
|
955
|
+
as proxy.
|
|
956
|
+
|
|
957
|
+
A proxy represents the identity (or primary key tuple) of the target entity.
|
|
958
|
+
|
|
959
|
+
All proxies are registered in a sub context representing the schema, in which the proxy
|
|
960
|
+
is to be rendered (see csn2edm for details).
|
|
961
|
+
|
|
962
|
+
If the target resides outside any service, the schema is either it's CDS namespace if provided
|
|
963
|
+
or as 'root'.
|
|
964
|
+
|
|
965
|
+
If the target resides in another service, either a schema named by the target service is
|
|
966
|
+
created (option: odataProxies), or a reference object is created representing the target
|
|
967
|
+
service (option: odataExtReferences).
|
|
968
|
+
|
|
969
|
+
If option odataExtReferences is used, 'root' proxies are still created.
|
|
970
|
+
|
|
971
|
+
If the association leading to the proxy candidate refers to associations either directly
|
|
972
|
+
or indirectly (via structured elements), these dependent entity types are (recursively) exposed
|
|
973
|
+
(or referenced) as well to keep the navigation graph in tact.
|
|
974
|
+
*/
|
|
975
|
+
function exposeTargetsAsProxiesOrSchemaRefs( struct ) {
|
|
976
|
+
if (struct.kind === 'context' || struct.kind === 'service' || struct.$proxy)
|
|
977
|
+
return;
|
|
978
|
+
|
|
979
|
+
// globalSchemaPrefix is the prefix for all proxy registrations and must not change
|
|
980
|
+
// the service prefix is checked without '.' because we also want to inspect those
|
|
981
|
+
// definitions which are directly below the root service ($mySchemaName is the root)
|
|
982
|
+
const globalSchemaPrefix = whatsMyServiceRootName(struct.$mySchemaName);
|
|
983
|
+
// if this artifact is a service member check its associations
|
|
984
|
+
if (globalSchemaPrefix) {
|
|
985
|
+
forEachGeneric(struct.items || struct, 'elements', (element) => {
|
|
986
|
+
if (!edmUtils.isNavigable(element))
|
|
987
|
+
return;
|
|
988
|
+
/*
|
|
989
|
+
* Consider everything @cds.autoexpose: falsy to be a proxy candidate for now
|
|
990
|
+
*/
|
|
991
|
+
/*
|
|
992
|
+
if(element._target['@cds.autoexpose'] === false) {
|
|
993
|
+
// :TODO: Also ignore foreign keys to association?
|
|
994
|
+
edmUtils.foreach(struct.elements,
|
|
995
|
+
e =>
|
|
996
|
+
e['@odata.foreignKey4'] === element.name,
|
|
997
|
+
e => e.$ignore = true);
|
|
998
|
+
element.$ignore = true;
|
|
999
|
+
info(null, ['definitions', struct.name, 'elements', element.name]
|
|
1000
|
+
`${element.type.replace('cds.', '')} "${element.name}" excluded,
|
|
1001
|
+
target "${element._target.name}" is annotated '@cds.autoexpose: ${element._target['@cds.autoexpose']}'`
|
|
1002
|
+
);
|
|
1003
|
+
return;
|
|
1004
|
+
}
|
|
1005
|
+
*/
|
|
1006
|
+
// Create a proxy if the source schema and the target schema are different
|
|
1007
|
+
// That includes that the target doesn't have a schema.
|
|
1008
|
+
// If the target is in another schema, check if both the source and the target share the same service name.
|
|
1009
|
+
// If they share the same service name, then it is just a cross schema navigation within the same EDM, no
|
|
1010
|
+
// proxy required.
|
|
1011
|
+
// association must be managed and not unmanaged
|
|
1012
|
+
|
|
1013
|
+
// odataProxies (P) and odataXServiceRefs (X) are evaluated as follows:
|
|
1014
|
+
// P | X | Action
|
|
1015
|
+
// 0 | 0 | No out bound navigation
|
|
1016
|
+
// 0 | 1 | Cross service references are generated
|
|
1017
|
+
// 1 | 0 | Proxies for all out bound navigation targets are created
|
|
1018
|
+
// 1 | 1 | Cross service references and proxies are generated
|
|
1019
|
+
|
|
1020
|
+
const targetSchemaName = element._target.$mySchemaName;
|
|
1021
|
+
if (isProxyRequired(element)) {
|
|
1022
|
+
if (options.isV4() && (options.odataProxies || options.odataXServiceRefs)) {
|
|
1023
|
+
// must be a managed association with keys OR an unambiguous backlink to become a proxy
|
|
1024
|
+
const assocOK = element.keys ||
|
|
1025
|
+
(element.on && element._constraints.selfs.length === 1 && element._constraints.termCount === 1);
|
|
1026
|
+
// reuse proxy if available
|
|
1027
|
+
let proxy = getProxyForTargetOf(element);
|
|
1028
|
+
if (!proxy) {
|
|
1029
|
+
if (targetSchemaName && options.odataXServiceRefs)
|
|
1030
|
+
proxy = createSchemaRefFor(targetSchemaName);
|
|
1031
|
+
|
|
1032
|
+
// create a proxy for a 'good' association only
|
|
1033
|
+
else if (options.odataProxies && assocOK)
|
|
1034
|
+
proxy = createProxyFor(element, targetSchemaName);
|
|
1035
|
+
|
|
1036
|
+
proxy = registerProxy(proxy, element);
|
|
1037
|
+
}
|
|
1038
|
+
else if (!assocOK) {
|
|
1039
|
+
// if there is already a proxy (generated by a 'good' association)
|
|
1040
|
+
// and this association is not a good one, don't expose this association.
|
|
1041
|
+
muteNavProp(element);
|
|
1042
|
+
return;
|
|
1043
|
+
}
|
|
1044
|
+
if (proxy) {
|
|
1045
|
+
// if a proxy was either already created or could be created and
|
|
1046
|
+
// if it's a 'real' proxy, link the _target to it and remove constraints
|
|
1047
|
+
// otherwise proxy is a schema reference, then do nothing
|
|
1048
|
+
setProp(element, '$noPartner', true);
|
|
1049
|
+
element._constraints.constraints = Object.create(null);
|
|
1050
|
+
if (proxy.kind === 'entity') {
|
|
1051
|
+
if (!proxy.$isParamEntity)
|
|
1052
|
+
populateProxyElements(element, proxy, getForeignKeyDefinitions(element));
|
|
1053
|
+
element._target = proxy;
|
|
1054
|
+
}
|
|
1055
|
+
else {
|
|
1056
|
+
// No navigation property bindings on external references
|
|
1057
|
+
setProp(element, '$externalRef', true);
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
else {
|
|
1061
|
+
muteNavProp(element);
|
|
1062
|
+
return;
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
else {
|
|
1066
|
+
muteNavProp(element);
|
|
1067
|
+
return;
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
});
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
function muteNavProp( elt ) {
|
|
1074
|
+
edmUtils.assignAnnotation(elt, '@odata.navigable', false);
|
|
1075
|
+
if (elt._target['@cds.autoexpose'] !== false)
|
|
1076
|
+
info('odata-navigation', elt.$path, { target: elt._target.name, service: globalSchemaPrefix });
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
function createSchemaRefFor( targetSchemaName ) {
|
|
1080
|
+
let ref = csn.definitions[`${ globalSchemaPrefix }.${ targetSchemaName }`];
|
|
1081
|
+
if (!ref)
|
|
1082
|
+
ref = edmUtils.createSchemaRef(serviceRoots, targetSchemaName);
|
|
1083
|
+
|
|
1084
|
+
|
|
1085
|
+
return ref;
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
function createProxyFor( assoc, targetSchemaName ) {
|
|
1089
|
+
// If target is outside any service expose it in service of source entity
|
|
1090
|
+
// The proxySchemaName is not prepended with the service schema name to allow to share the proxy
|
|
1091
|
+
// if it is required in multiple services. The service schema name is prepended upon registration
|
|
1092
|
+
const proxySchemaName = targetSchemaName || edmUtils.getSchemaPrefix(assoc._target.name);
|
|
1093
|
+
|
|
1094
|
+
// if the target is a parameter entity, it's easy just create the parameter stub
|
|
1095
|
+
const isParamProxy = edmUtils.isParameterizedEntity(assoc._target);
|
|
1096
|
+
|
|
1097
|
+
// 1) construct the proxy definition
|
|
1098
|
+
// proxyDefinitionName: strip the serviceName and replace '.' with '_'
|
|
1099
|
+
const defName = assoc._target.name
|
|
1100
|
+
.replace(`${ proxySchemaName }.`, '')
|
|
1101
|
+
.replace(/\./g, '_');
|
|
1102
|
+
|
|
1103
|
+
// fullName: Prepend serviceName and if in same service add '_proxy'
|
|
1104
|
+
const proxy = isParamProxy
|
|
1105
|
+
? createParameterEntity(assoc._target, `${ proxySchemaName }.${ defName }`, true)
|
|
1106
|
+
: { name: `${ proxySchemaName }.${ defName }`, kind: 'entity', elements: Object.create(null) };
|
|
1107
|
+
|
|
1108
|
+
// Final proxyShortName for all further processing
|
|
1109
|
+
const proxyShortName = defName + (isParamProxy ? 'Parameters' : '');
|
|
1110
|
+
|
|
1111
|
+
setProp(proxy, '$proxy', true);
|
|
1112
|
+
setProp(proxy, '$mySchemaName', proxySchemaName);
|
|
1113
|
+
setProp(proxy, '$proxyShortName', proxyShortName);
|
|
1114
|
+
setProp(proxy, '$keys', Object.create(null));
|
|
1115
|
+
setProp(proxy, '$hasEntitySet', false);
|
|
1116
|
+
setProp(proxy, '$exposedTypes', Object.create(null));
|
|
1117
|
+
// copy all annotations of the target to the proxy
|
|
1118
|
+
forEach(assoc._target, ( k, v ) => {
|
|
1119
|
+
if (k[0] === '@' && k !== '@open')
|
|
1120
|
+
proxy[k] = v;
|
|
1121
|
+
});
|
|
1122
|
+
|
|
1123
|
+
// 2) create the elements and $keys
|
|
1124
|
+
if (isParamProxy) {
|
|
1125
|
+
// Reset param proxy elements to expose element tree
|
|
1126
|
+
const { elements } = proxy;
|
|
1127
|
+
proxy.elements = Object.create(null);
|
|
1128
|
+
populateProxyElements(assoc, proxy, elements);
|
|
1129
|
+
}
|
|
1130
|
+
else {
|
|
1131
|
+
populateProxyElements(assoc, proxy, assoc._target.$keys);
|
|
1132
|
+
}
|
|
1133
|
+
return proxy;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
// Return top level foreign key element definitions. The full top level
|
|
1137
|
+
// element is exposed instead of merging partial trees into the exposed type
|
|
1138
|
+
// def structure.
|
|
1139
|
+
function getForeignKeyDefinitions( e ) {
|
|
1140
|
+
return e.keys ? e.keys.map(fk => e._target.elements[fk.ref[0]]) : [];
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
// copy over the primary keys of the target and trigger the type exposure
|
|
1144
|
+
// if the element already exists we assume it was fully exposed
|
|
1145
|
+
function populateProxyElements( assoc, proxy, elements ) {
|
|
1146
|
+
Object.values(elements).forEach((e) => {
|
|
1147
|
+
if (isEdmPropertyRendered(e, options)) {
|
|
1148
|
+
let newElt = proxy.elements[e.name];
|
|
1149
|
+
if (!newElt) {
|
|
1150
|
+
if (csnUtils.isAssocOrComposition(e)) {
|
|
1151
|
+
if (!e.on && e.keys) {
|
|
1152
|
+
newElt = createProxyOrSchemaRefForManagedAssoc(e);
|
|
1153
|
+
}
|
|
1154
|
+
else {
|
|
1155
|
+
info(null, [ 'definitions', struct.name, 'elements', assoc.name ],
|
|
1156
|
+
{ name: proxy.nname, target: assoc._target.name },
|
|
1157
|
+
'Unmanaged associations are not supported as primary keys for proxy entity type $(NAME) of unexposed association target $(TARGET)');
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
else {
|
|
1161
|
+
newElt = Object.create(null);
|
|
1162
|
+
forEachKey(e, (prop) => {
|
|
1163
|
+
newElt[prop] = e[prop];
|
|
1164
|
+
});
|
|
1165
|
+
}
|
|
1166
|
+
if (newElt) {
|
|
1167
|
+
initElement(newElt, e.name, proxy);
|
|
1168
|
+
proxy.elements[newElt.name] = newElt;
|
|
1169
|
+
|
|
1170
|
+
if (csnUtils.isStructured(newElt)) {
|
|
1171
|
+
// argument proxySchemaName forces an anonymous type definition for newElt into the
|
|
1172
|
+
// proxy schema. If omitted, this exposure defaults to 'root', in case API flavor
|
|
1173
|
+
// of the day changes...
|
|
1174
|
+
exposeStructTypeForProxyOf(newElt, `${ proxy.$proxyShortName }_${ newElt.name }`,
|
|
1175
|
+
proxy.$mySchemaName, newElt.key, !!(newElt.key && newElt.elements));
|
|
1176
|
+
}
|
|
1177
|
+
if (newElt.key)
|
|
1178
|
+
proxy.$keys[newElt.name] = newElt;
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
});
|
|
1183
|
+
// 3) sort the exposed types so that they appear lexicographically ordered in the EDM
|
|
1184
|
+
proxy.$exposedTypes = Object.keys(proxy.$exposedTypes).sort().reduce((dict, tn) => {
|
|
1185
|
+
dict[tn] = proxy.$exposedTypes[tn];
|
|
1186
|
+
return dict;
|
|
1187
|
+
}, Object.create(null));
|
|
1188
|
+
|
|
1189
|
+
// If 'node' exists and has a structured type that is not exposed in 'service', (because the type is
|
|
1190
|
+
// anonymous or has a definition outside of 'service'), create an equivalent type in 'service', either
|
|
1191
|
+
// using the type's name or (if anonymous) 'artificialName', and make 'node' use that type instead.
|
|
1192
|
+
// Complain if there is an error.
|
|
1193
|
+
// isKey: Indicates top level element is key or not
|
|
1194
|
+
// forceToNotNull: if top level element is key, recursively set all anonymously exposed elements
|
|
1195
|
+
// to notNull until the first named type is exposed.
|
|
1196
|
+
function exposeStructTypeForProxyOf( node, artificialName,
|
|
1197
|
+
typeSchemaName = fallBackSchemaName,
|
|
1198
|
+
isKey = false, forceToNotNull = false ) {
|
|
1199
|
+
if (node.type && isBuiltinType(node.type))
|
|
1200
|
+
return;
|
|
1201
|
+
|
|
1202
|
+
// Always expose types referred to by a proxy, never reuse an eventually existing type
|
|
1203
|
+
// as the nested elements must all be not nullable
|
|
1204
|
+
// elements have precedence over type
|
|
1205
|
+
const typeDef = !node.elements && node.type ? csn.definitions[node.type] : node;
|
|
1206
|
+
|
|
1207
|
+
if (typeDef) {
|
|
1208
|
+
let typeClone;
|
|
1209
|
+
// the type clone must be produced for each service as this type may
|
|
1210
|
+
// produce references and/or proxies into multiple services
|
|
1211
|
+
// (but only once per service, therefore cache it).
|
|
1212
|
+
if (typeDef.$proxyTypes && typeDef.$proxyTypes[globalSchemaPrefix]) {
|
|
1213
|
+
// if type has been exposed in a schema use this type
|
|
1214
|
+
typeClone = typeDef.$proxyTypes[globalSchemaPrefix];
|
|
1215
|
+
}
|
|
1216
|
+
else {
|
|
1217
|
+
// Set the correct name
|
|
1218
|
+
let typeId = artificialName; // the artificialName has no namespace, it's the element
|
|
1219
|
+
if (node.type) {
|
|
1220
|
+
// same as for proxies, use schema or namespace, 'root' is last resort
|
|
1221
|
+
typeSchemaName = typeDef.$mySchemaName || edmUtils.getSchemaPrefix(node.type);
|
|
1222
|
+
typeId = node.type.replace(`${ typeSchemaName }.`, '').replace(/\./g, '_');
|
|
1223
|
+
// strip the service root of that type (if any)
|
|
1224
|
+
const myServiceRootName = whatsMyServiceRootName(typeSchemaName);
|
|
1225
|
+
if (myServiceRootName)
|
|
1226
|
+
typeSchemaName = typeSchemaName.replace(`${ myServiceRootName }.`, '');
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
if (edmUtils.isStructuredArtifact(typeDef)) {
|
|
1230
|
+
// pull forceNotNull to false for named types and non-key nodes
|
|
1231
|
+
// only toplevel nodes (elements) can be key
|
|
1232
|
+
forceToNotNull = !!(forceToNotNull && isKey && node.elements && !node.type);
|
|
1233
|
+
|
|
1234
|
+
typeClone = cloneStructTypeForProxy(`${ typeSchemaName }.${ typeId }`);
|
|
1235
|
+
if (typeClone) {
|
|
1236
|
+
// Recurse into elements of 'type' (if any)
|
|
1237
|
+
if (typeClone.elements) {
|
|
1238
|
+
forEach(typeClone.elements, ( elemName, elem ) => {
|
|
1239
|
+
// if this is a foreign key element, we must check whether or not the association
|
|
1240
|
+
// has been exposed as proxy. If it has not been exposed, no further structured
|
|
1241
|
+
// types must be exposed as 'Proxy_' types.
|
|
1242
|
+
|
|
1243
|
+
// TODO: expose types of assoc.keys and don't rely on exposed foreign keys
|
|
1244
|
+
if (!elem['@odata.foreignKey4'] ||
|
|
1245
|
+
(elem['@odata.foreignKey4'] && !typeClone.elements[elem['@odata.foreignKey4']].$exposed)) {
|
|
1246
|
+
exposeStructTypeForProxyOf(elem, `${ typeId }_${ elemName }`,
|
|
1247
|
+
typeSchemaName, isKey, forceToNotNull);
|
|
1248
|
+
}
|
|
1249
|
+
});
|
|
1250
|
+
}
|
|
1251
|
+
if (!typeDef.$proxyTypes)
|
|
1252
|
+
typeDef.$proxyTypes = Object.create(null);
|
|
1253
|
+
typeDef.$proxyTypes[globalSchemaPrefix] = typeClone;
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
else {
|
|
1257
|
+
// FUTURE: expose scalar type definition as well
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
if (typeClone) {
|
|
1261
|
+
// register the type clone at the proxy
|
|
1262
|
+
// Reminder: Each proxy receives a full set of type clones, even if the types are shared
|
|
1263
|
+
// (no scattered type clone caching). registerProxy() checks if a clone needs to be added to
|
|
1264
|
+
// csn.definitions.
|
|
1265
|
+
proxy.$exposedTypes[typeClone.name] = typeClone;
|
|
1266
|
+
|
|
1267
|
+
// set the node's new type name
|
|
1268
|
+
node.type = typeClone.name;
|
|
1269
|
+
// the key path generator must use the type clone directly, because it can't resolve
|
|
1270
|
+
// the type clone in the CSN (its name is the final name and not the definition name).
|
|
1271
|
+
setProp(node, '_type', typeClone);
|
|
1272
|
+
// Hack alert:
|
|
1273
|
+
// beta feature 'subElemRedirections' (now the default in v2) adds elements to the node by
|
|
1274
|
+
// default, without we must do it to get the primary key tuple calculation correct.
|
|
1275
|
+
// Remember: node.type is the service local type name (not prepended by the service name),
|
|
1276
|
+
// so it can't be resolved in definitions later on
|
|
1277
|
+
if (typeClone.elements)
|
|
1278
|
+
node.elements = typeClone.elements;
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
function cloneStructTypeForProxy( name ) {
|
|
1283
|
+
// Create type with empty elements
|
|
1284
|
+
const type = {
|
|
1285
|
+
kind: 'type',
|
|
1286
|
+
name,
|
|
1287
|
+
elements: Object.create(null),
|
|
1288
|
+
};
|
|
1289
|
+
setProp(type, '$mySchemaName', typeSchemaName);
|
|
1290
|
+
setProp(type, '$exposedBy', 'proxyExposure');
|
|
1291
|
+
if (typeDef['@open'] !== undefined)
|
|
1292
|
+
type['@open'] = typeDef['@open'];
|
|
1293
|
+
|
|
1294
|
+
if (typeDef.elements) {
|
|
1295
|
+
forEach(typeDef.elements, ( elemName, elem ) => {
|
|
1296
|
+
if (!elem.target) {
|
|
1297
|
+
type.elements[elemName] = Object.create(null);
|
|
1298
|
+
forEachKey(elem, (prop) => {
|
|
1299
|
+
type.elements[elemName][prop] = elem[prop];
|
|
1300
|
+
});
|
|
1301
|
+
}
|
|
1302
|
+
else if (elem.keys && !elem.on) {
|
|
1303
|
+
// a primary key can never be an unmanaged association
|
|
1304
|
+
type.elements[elemName] = createProxyOrSchemaRefForManagedAssoc(elem);
|
|
1305
|
+
}
|
|
1306
|
+
if (forceToNotNull) {
|
|
1307
|
+
const newElt = type.elements[elemName];
|
|
1308
|
+
if (newElt.target) {
|
|
1309
|
+
if (newElt.cardinality === undefined)
|
|
1310
|
+
newElt.cardinality = {};
|
|
1311
|
+
newElt.cardinality.min = 1;
|
|
1312
|
+
}
|
|
1313
|
+
// if odata-unexpected-nullable-key is checking on min>1, this can be an else
|
|
1314
|
+
newElt.notNull = true;
|
|
1315
|
+
}
|
|
1316
|
+
setProp(type.elements[elemName], 'name', elem.name);
|
|
1317
|
+
});
|
|
1318
|
+
}
|
|
1319
|
+
return type;
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
// create a new element and wire the proxy as new target.
|
|
1324
|
+
// Create a new proxy if:
|
|
1325
|
+
// 1) source and target schema names are different (otherwise)
|
|
1326
|
+
// the proxy that is just being created targets back into
|
|
1327
|
+
// its own serice
|
|
1328
|
+
// 2) or if no proxy for this source schema has been created yet
|
|
1329
|
+
function createProxyOrSchemaRefForManagedAssoc( e ) {
|
|
1330
|
+
let newProxy = e._target;
|
|
1331
|
+
const newElt = cloneCsnNonDict(e, options);
|
|
1332
|
+
|
|
1333
|
+
if (isProxyRequired(e)) {
|
|
1334
|
+
newProxy = getProxyForTargetOf(e);
|
|
1335
|
+
if (!newProxy) {
|
|
1336
|
+
// option odataXServiceRefs has precedence over odataProxies
|
|
1337
|
+
if (e._target.$mySchemaName && options.odataXServiceRefs) {
|
|
1338
|
+
newProxy = createSchemaRefFor(e._target.$mySchemaName);
|
|
1339
|
+
}
|
|
1340
|
+
else if (options.odataProxies) {
|
|
1341
|
+
newProxy = createProxyFor(e, e._target.$mySchemaName);
|
|
1342
|
+
if (!e._target.$isParamEntity)
|
|
1343
|
+
populateProxyElements(e, newProxy, getForeignKeyDefinitions(e));
|
|
1344
|
+
}
|
|
1345
|
+
newProxy = registerProxy(newProxy, e);
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
if (!newProxy) {
|
|
1349
|
+
newProxy = e._target;
|
|
1350
|
+
// no proxy: no navigation
|
|
1351
|
+
edmUtils.assignAnnotation(newElt, '@odata.navigable', false);
|
|
1352
|
+
}
|
|
1353
|
+
// either the proxy has exposed the type or
|
|
1354
|
+
// the assoc doesn't need to be exposed, so don't
|
|
1355
|
+
// try to drill further down in this type clone
|
|
1356
|
+
setProp(newElt, '$exposed', true);
|
|
1357
|
+
// _target must be set with (original) in case
|
|
1358
|
+
// a schema ref has been created
|
|
1359
|
+
setProp(newElt, '$noPartner', true);
|
|
1360
|
+
setProp(newElt, '_target', e._target);
|
|
1361
|
+
initConstraintsOnAssoc(e);
|
|
1362
|
+
finalizeConstraintsOnAssoc(e);
|
|
1363
|
+
setProp(newElt, '_constraints', e._constraints);
|
|
1364
|
+
setProp(newElt, '_selfReferences', []);
|
|
1365
|
+
if (newProxy.kind === 'entity') {
|
|
1366
|
+
newElt.target = newProxy.name;
|
|
1367
|
+
setProp(newElt, '_target', newProxy);
|
|
1368
|
+
}
|
|
1369
|
+
return newElt;
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
/*
|
|
1374
|
+
A proxy is required if the source and the target schemas differ.
|
|
1375
|
+
However, if two schemas are below the same root/top level service,
|
|
1376
|
+
these schemas are always exposed in the same Edm/DataServices. In
|
|
1377
|
+
this case no proxy is required. (This is especially true, if we
|
|
1378
|
+
decide to allow user defined schemas aka services with contexts)
|
|
1379
|
+
|
|
1380
|
+
Example:
|
|
1381
|
+
|
|
1382
|
+
service S {
|
|
1383
|
+
context T {
|
|
1384
|
+
entity A { ...; toB: association to S.B; };
|
|
1385
|
+
}
|
|
1386
|
+
entity B { ...; toA: association to S.T.A; };
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1389
|
+
In CSN the entity definitions are named 'S.T.A' and 'S.B', sharing
|
|
1390
|
+
the same service name 'S', which implies that they are always exposed
|
|
1391
|
+
in the same Edm => no proxy required.
|
|
1392
|
+
*/
|
|
1393
|
+
function isProxyRequired( element ) {
|
|
1394
|
+
const targetSchemaName = element._target.$mySchemaName;
|
|
1395
|
+
// longest match for service name
|
|
1396
|
+
return (!element._target.$proxy && globalSchemaPrefix !== targetSchemaName)
|
|
1397
|
+
? (!((targetSchemaName &&
|
|
1398
|
+
globalSchemaPrefix === whatsMyServiceRootName(targetSchemaName)))) : false;
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
// read a proxy from the elements target
|
|
1402
|
+
function getProxyForTargetOf( element ) {
|
|
1403
|
+
return element._target.$cachedProxy && element._target.$cachedProxy[globalSchemaPrefix];
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
// register the proxy at the elements target
|
|
1407
|
+
function registerProxy( proxy, element ) {
|
|
1408
|
+
if (proxy === undefined)
|
|
1409
|
+
return undefined;
|
|
1410
|
+
|
|
1411
|
+
setProp(proxy, '$globalSchemaPrefix', globalSchemaPrefix);
|
|
1412
|
+
setProp(proxy, '$origin', element);
|
|
1413
|
+
|
|
1414
|
+
const fqProxyName = `${ proxy.$globalSchemaPrefix }.${ proxy.name }`;
|
|
1415
|
+
|
|
1416
|
+
if (!element._target.$cachedProxy)
|
|
1417
|
+
edmUtils.assignProp(element._target, '$cachedProxy', Object.create(null));
|
|
1418
|
+
if (getProxyForTargetOf(element)) {
|
|
1419
|
+
info(null, [ 'definitions', struct.name, 'elements', element.name ],
|
|
1420
|
+
{ name: fqProxyName }, 'Proxy EDM entity type $(NAME) has already been registered');
|
|
1421
|
+
}
|
|
1422
|
+
else {
|
|
1423
|
+
determineEntitySet(proxy);
|
|
1424
|
+
proxyCache.push(proxy);
|
|
1425
|
+
element._target.$cachedProxy[globalSchemaPrefix] = proxy;
|
|
1426
|
+
}
|
|
1427
|
+
return proxy;
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
function mergeProxiesIntoModel() {
|
|
1432
|
+
proxyCache.forEach((proxy) => {
|
|
1433
|
+
const fqProxyName = `${ proxy.$globalSchemaPrefix }.${ proxy.name }`;
|
|
1434
|
+
const fqSchemaName = `${ proxy.$globalSchemaPrefix }.${ proxy.$mySchemaName }`;
|
|
1435
|
+
|
|
1436
|
+
if (proxy.kind === 'entity') {
|
|
1437
|
+
finalizeProxyContainments(proxy);
|
|
1438
|
+
// collect all schemas even for newly exposed types
|
|
1439
|
+
// (that may reside in another subcontext schema), but only once
|
|
1440
|
+
const schemaSet = new Set();
|
|
1441
|
+
// start with the schema name for the proxy
|
|
1442
|
+
schemaSet.add(fqSchemaName);
|
|
1443
|
+
// followed by all namespaces that are potentially exposed by the exposed types
|
|
1444
|
+
// don't forget to prepend the global namespace prefix
|
|
1445
|
+
// schemas are ordered in csn2edm.js for each service
|
|
1446
|
+
forEachKey(proxy.$exposedTypes, t => schemaSet.add(`${ proxy.$globalSchemaPrefix }.${ edmUtils.getSchemaPrefix(t) }`));
|
|
1447
|
+
schemaSet.forEach((schemaName) => {
|
|
1448
|
+
if (!schemas[schemaName]) {
|
|
1449
|
+
schemas[schemaName] = { kind: 'schema', name: schemaName };
|
|
1450
|
+
schemaNames.push(schemaName);
|
|
1451
|
+
}
|
|
1452
|
+
});
|
|
1453
|
+
const alreadyRegistered = csn.definitions[fqProxyName];
|
|
1454
|
+
if (!alreadyRegistered) {
|
|
1455
|
+
csn.definitions[fqProxyName] = proxy;
|
|
1456
|
+
reqDefs.definitions[fqProxyName] = proxy;
|
|
1457
|
+
setProp(proxy, '$path', [ 'definitions', fqProxyName ]);
|
|
1458
|
+
forEach(proxy.$exposedTypes, ( tn, v ) => {
|
|
1459
|
+
const fqtn = `${ proxy.$globalSchemaPrefix }.${ tn }`;
|
|
1460
|
+
if (csn.definitions[fqtn] === undefined) {
|
|
1461
|
+
csn.definitions[fqtn] = v;
|
|
1462
|
+
reqDefs.definitions[fqtn] = v;
|
|
1463
|
+
setProp(v, '$path', [ 'definitions', fqtn ]);
|
|
1464
|
+
}
|
|
1465
|
+
});
|
|
1466
|
+
|
|
1467
|
+
// default location is not always correct in case proxy has been created by a nested assoc
|
|
1468
|
+
// as foreign key targeting another proxy association
|
|
1469
|
+
let loc = [ 'definitions', proxy.$origin._parent.name, 'elements', proxy.$origin.name ];
|
|
1470
|
+
if (proxy.$origin._parent.$path)
|
|
1471
|
+
loc = [ ...proxy.$origin._parent.$path, 'elements', proxy.$origin.name ];
|
|
1472
|
+
info(null, loc,
|
|
1473
|
+
{ name: proxy.name }, 'Created proxy EDM entity type $(NAME)');
|
|
1474
|
+
}
|
|
1475
|
+
else if (alreadyRegistered && !alreadyRegistered.$proxy &&
|
|
1476
|
+
alreadyRegistered.kind !== 'entity') {
|
|
1477
|
+
warning('odata-duplicate-proxy', [ 'definitions', proxy.$origin._parent.name, 'elements', proxy.$origin.name ],
|
|
1478
|
+
{ name: fqProxyName, kind: alreadyRegistered.kind });
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
else if (!schemas[fqSchemaName]) {
|
|
1482
|
+
// it's a service reference, just add that reference proxy
|
|
1483
|
+
schemas[fqSchemaName] = proxy;
|
|
1484
|
+
schemaNames.push(fqSchemaName);
|
|
1485
|
+
info(null, [ 'definitions', proxy.$origin._parent.name, 'elements', proxy.$origin.name ],
|
|
1486
|
+
{ name: proxy.name }, 'Created EDM namespace reference $(NAME)');
|
|
1487
|
+
}
|
|
1488
|
+
// don't error on duplicate schemas, if it's already present then all is good....
|
|
1489
|
+
});
|
|
1490
|
+
schemaNames.sort((a, b) => b.length - a.length);
|
|
1491
|
+
|
|
1492
|
+
function finalizeProxyContainments( proxy ) {
|
|
1493
|
+
// initialise containments after all exposed types are collected
|
|
1494
|
+
// AND remove unfulfillable NavRestrictions
|
|
1495
|
+
initContainments(proxy);
|
|
1496
|
+
const assocPaths = proxy.$containeeAssociations.map(entry => entry.path.join('.'));
|
|
1497
|
+
const newNpr = [];
|
|
1498
|
+
const npr = proxy[NavResAnno];
|
|
1499
|
+
if (npr) {
|
|
1500
|
+
npr.forEach((np) => {
|
|
1501
|
+
const npath = np.NavigationProperty && np.NavigationProperty['='];
|
|
1502
|
+
if (npath && assocPaths.includes(npath))
|
|
1503
|
+
newNpr.push(np);
|
|
1504
|
+
});
|
|
1505
|
+
}
|
|
1506
|
+
if (newNpr.length)
|
|
1507
|
+
proxy[NavResAnno] = newNpr;
|
|
1508
|
+
|
|
1509
|
+
else
|
|
1510
|
+
delete proxy[NavResAnno];
|
|
1511
|
+
}
|
|
1512
|
+
}
|
|
1513
|
+
|
|
1514
|
+
/*
|
|
1515
|
+
Initialize the key ref paths into the property list
|
|
1516
|
+
Iterate over all keys and ignore the non-rendered elements
|
|
1517
|
+
* For Flat V2/V4 take all elements except associations/compositions,
|
|
1518
|
+
all elements are flat, no need to treat them any further
|
|
1519
|
+
* For Structured V4 flatten out all key elements, if the element
|
|
1520
|
+
is an association/composition, flatten out the foreign keys as well.
|
|
1521
|
+
* In Structured V4 do not render primary key 'parent' associations that
|
|
1522
|
+
establish the containment (_isToContainer=tue).
|
|
1523
|
+
* If in Structured V4, 'odataForeignKeys' is true, render all @foreignKey4,
|
|
1524
|
+
and do not render associations (this will include the foreign keys of
|
|
1525
|
+
the _isToContainer association).
|
|
1526
|
+
*/
|
|
1527
|
+
function initEdmKeyRefPaths( def, defName ) {
|
|
1528
|
+
if (def.$keys) {
|
|
1529
|
+
setProp(def, '$edmKeyPaths', []);
|
|
1530
|
+
// for all key elements that shouldn't be ignored produce the paths
|
|
1531
|
+
edmUtils.foreach(def.$keys, k => !(k._isToContainer && k._selfReferences.length), (k, kn) => {
|
|
1532
|
+
if (isEdmPropertyRendered(k, options) &&
|
|
1533
|
+
!(options.isV2() && k['@Core.MediaType'])) {
|
|
1534
|
+
if (options.isV4() && options.isStructFormat) {
|
|
1535
|
+
// This is structured OData ONLY
|
|
1536
|
+
// if the foreign keys are explicitly requested, ignore associations and use the flat foreign keys instead
|
|
1537
|
+
if (!options.renderForeignKeys || (options.renderForeignKeys && !k.target))
|
|
1538
|
+
def.$edmKeyPaths.push(...produceKeyRefPaths(k, kn, [ 'definitions', defName, 'elements', kn ]));
|
|
1539
|
+
}
|
|
1540
|
+
// In v2/v4 flat, associations are never rendered
|
|
1541
|
+
else if (!k.target) {
|
|
1542
|
+
def.$edmKeyPaths.push([ kn ]);
|
|
1543
|
+
}
|
|
1544
|
+
// check toplevel key for spec violations
|
|
1545
|
+
checkKeySpecViolations(k, [ 'definitions', defName, 'elements', k.name ]);
|
|
1546
|
+
}
|
|
1547
|
+
});
|
|
1548
|
+
}
|
|
1549
|
+
/*
|
|
1550
|
+
Produce the list of paths for this element
|
|
1551
|
+
- If element is not rendered in EDM, return empty array.
|
|
1552
|
+
- If element is structured type, do structure flattening and then check for each
|
|
1553
|
+
leaf element if it is a managed association and flatten further recursively.
|
|
1554
|
+
- If element is a managed association, use the FK path as prefix and flatten out
|
|
1555
|
+
all foreign keys (eventually recursively). This filters the association itself
|
|
1556
|
+
to become an entry in the path array which is correct as OData doesn't allow
|
|
1557
|
+
navprops to be key ref.
|
|
1558
|
+
If element is of scalar type, return it as an array.
|
|
1559
|
+
*/
|
|
1560
|
+
function produceKeyRefPaths( eltCsn, prefix, path ) {
|
|
1561
|
+
const keyPaths = [];
|
|
1562
|
+
// we want to point to the element in the entity which is the first path step
|
|
1563
|
+
const location = def.$path.concat([ 'elements' ]).concat(prefix.split('/')[0]);
|
|
1564
|
+
if (!isEdmPropertyRendered(eltCsn, options)) {
|
|
1565
|
+
// let annos = Object.keys(eltCsn).filter(a=>a[0]==='@').join(', ');
|
|
1566
|
+
// warning(null, ['definitions', struct.name, 'elements', eltCsn.name ],
|
|
1567
|
+
// `${struct.name}: OData V4 primary key path: "${prefix}" is unexposed by one of these annotations "${annos}"` );
|
|
1568
|
+
return keyPaths;
|
|
1569
|
+
}
|
|
1570
|
+
// OData requires all elements along the path to be nullable: false (that is either key or notNull)
|
|
1571
|
+
|
|
1572
|
+
let elements = eltCsn.elements || eltCsn.items?.elements;
|
|
1573
|
+
if (!elements) {
|
|
1574
|
+
const finalType = csnUtils.getFinalTypeInfo(eltCsn.items?.type || eltCsn.type);
|
|
1575
|
+
elements = finalType?.elements || finalType?.items?.elements;
|
|
1576
|
+
}
|
|
1577
|
+
if (elements) {
|
|
1578
|
+
forEach(elements, ( eltName, elt ) => {
|
|
1579
|
+
if (!elt.$visited) {
|
|
1580
|
+
setProp(elt, '$visited', true);
|
|
1581
|
+
let newRefs = [];
|
|
1582
|
+
// if the foreign keys are explicitly requested, ignore associations and use the flat foreign key instead
|
|
1583
|
+
// ignore nested unmanaged associations
|
|
1584
|
+
if ((!options.renderForeignKeys || (options.renderForeignKeys && !elt.target)) && !(elt.target && elt.on))
|
|
1585
|
+
newRefs = produceKeyRefPaths(elt, prefix + options.pathDelimiter + eltName, path);
|
|
1586
|
+
if (newRefs.length) {
|
|
1587
|
+
keyPaths.push(...newRefs);
|
|
1588
|
+
// check path step key for spec violations
|
|
1589
|
+
const pathSegment = `${ prefix }/${ eltName }`;
|
|
1590
|
+
checkKeySpecViolations(elt, location, pathSegment);
|
|
1591
|
+
}
|
|
1592
|
+
delete elt.$visited;
|
|
1593
|
+
}
|
|
1594
|
+
else {
|
|
1595
|
+
error('odata-key-recursive', path, { name: prefix });
|
|
1596
|
+
}
|
|
1597
|
+
});
|
|
1598
|
+
}
|
|
1599
|
+
/* If element is a managed association (can't be anything else),
|
|
1600
|
+
flatten foreign keys and use foreign key path as new starting prefix
|
|
1601
|
+
This also implies that the association itself is never added into the
|
|
1602
|
+
list of primary key refs
|
|
1603
|
+
*/
|
|
1604
|
+
else if (eltCsn.target && !eltCsn.on) {
|
|
1605
|
+
// if this association has no keys or if it is a redirected parameterized entity,
|
|
1606
|
+
// use the primary keys of the target
|
|
1607
|
+
const keys = (!eltCsn._target.$isParamEntity && !eltCsn.on && (eltCsn.keys ?? [])) ||
|
|
1608
|
+
Object.keys(eltCsn._target.$keys).map(k => ({ ref: [ k ] }));
|
|
1609
|
+
let pathSegment = prefix;
|
|
1610
|
+
keys.forEach((k) => {
|
|
1611
|
+
let art = eltCsn._target || csnUtils.getCsnDef(eltCsn.target);
|
|
1612
|
+
for (const ps of k.ref) {
|
|
1613
|
+
art = art.elements[ps];
|
|
1614
|
+
pathSegment += `/${ art.name }`;
|
|
1615
|
+
checkKeySpecViolations(art, location, pathSegment);
|
|
1616
|
+
if (art.type && !isBuiltinType(art.type))
|
|
1617
|
+
art = art._type || csnUtils.getCsnDef(art.type);
|
|
1618
|
+
}
|
|
1619
|
+
if (art === eltCsn)
|
|
1620
|
+
error('odata-key-recursive', path, { name: prefix });
|
|
1621
|
+
else
|
|
1622
|
+
keyPaths.push(...produceKeyRefPaths(art, prefix + options.pathDelimiter + k.ref.join(options.pathDelimiter), path));
|
|
1623
|
+
});
|
|
1624
|
+
}
|
|
1625
|
+
else {
|
|
1626
|
+
keyPaths.push([ prefix ]);
|
|
1627
|
+
}
|
|
1628
|
+
return keyPaths;
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
function checkKeySpecViolations( elt, location, pathSegment ) {
|
|
1632
|
+
// Nullability
|
|
1633
|
+
const eltDef = elt.items || elt;
|
|
1634
|
+
if ((!elt.key && (eltDef.notNull === undefined || eltDef.notNull === false)) ||
|
|
1635
|
+
elt.key && (eltDef.notNull !== undefined && eltDef.notNull === false)) {
|
|
1636
|
+
message('odata-unexpected-nullable-key', location,
|
|
1637
|
+
{ name: pathSegment || elt.name, '#': !pathSegment ? 'std' : 'scalar' });
|
|
1638
|
+
}
|
|
1639
|
+
// many is either directly on elements or on the type
|
|
1640
|
+
// due to added proxy types it might be that the type can't be found in definitions
|
|
1641
|
+
let type = elt.items ||
|
|
1642
|
+
(elt.type &&
|
|
1643
|
+
!isBuiltinType(elt.type) &&
|
|
1644
|
+
csn.definitions[elt.type] &&
|
|
1645
|
+
csnUtils.getFinalTypeInfo(elt.type).items);
|
|
1646
|
+
if (type ||
|
|
1647
|
+
(options.odataFormat !== 'flat' && !options.odataForeignKeys) &&
|
|
1648
|
+
elt.cardinality?.max && elt.cardinality.max !== 1) {
|
|
1649
|
+
// many primary key can be induced by a many parameter of a view
|
|
1650
|
+
message('odata-unexpected-arrayed-key', location,
|
|
1651
|
+
{
|
|
1652
|
+
name: pathSegment || elt.name,
|
|
1653
|
+
value: cardinality2str(elt),
|
|
1654
|
+
'#': elt.target ? 'assoc' : 'std',
|
|
1655
|
+
});
|
|
1656
|
+
}
|
|
1657
|
+
// type
|
|
1658
|
+
if (!elt.elements) {
|
|
1659
|
+
if (!type)
|
|
1660
|
+
type = isBuiltinType(elt.type) ? elt : csn.definitions[elt.type];
|
|
1661
|
+
|
|
1662
|
+
// check for legal scalar types, proxy exposed structured types are not resolvable in CSN
|
|
1663
|
+
// V2 allows any Edm.PrimitiveType (even Double and Binary), V4 is more specific:
|
|
1664
|
+
if (options.isV4() && type && !type.target && isBuiltinType(type.type)) {
|
|
1665
|
+
const edmType = edmUtils.mapCdsToEdmType(type, messageFunctions, _options);
|
|
1666
|
+
const legalEdmTypes = {
|
|
1667
|
+
'Edm.Boolean': 1,
|
|
1668
|
+
'Edm.Byte': 1,
|
|
1669
|
+
'Edm.Date': 1,
|
|
1670
|
+
'Edm.DateTimeOffset': 1,
|
|
1671
|
+
'Edm.Decimal': 1,
|
|
1672
|
+
'Edm.Duration': 1,
|
|
1673
|
+
'Edm.Guid': 1,
|
|
1674
|
+
'Edm.Int16': 1,
|
|
1675
|
+
'Edm.Int32': 1,
|
|
1676
|
+
'Edm.Int64': 1,
|
|
1677
|
+
'Edm.SByte': 1,
|
|
1678
|
+
'Edm.String': 1,
|
|
1679
|
+
'Edm.TimeOfDay': 1,
|
|
1680
|
+
};
|
|
1681
|
+
if (!(edmType in legalEdmTypes)) {
|
|
1682
|
+
message('odata-invalid-key-type', location,
|
|
1683
|
+
{
|
|
1684
|
+
name: pathSegment, type: type.type, id: edmType, '#': pathSegment ? 'std' : 'scalar',
|
|
1685
|
+
});
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
/*
|
|
1693
|
+
Calculate all reachable entity set paths for a given navigation start point
|
|
1694
|
+
|
|
1695
|
+
Rule: First non-containment association terminates Path, if association is
|
|
1696
|
+
containment enabling assoc, Target is own Struct/ plus the path down to the
|
|
1697
|
+
n-2nd path segment (which is the path to the n-1st implicit entity set).
|
|
1698
|
+
|
|
1699
|
+
Example:
|
|
1700
|
+
entity Header {
|
|
1701
|
+
items: composition of many {
|
|
1702
|
+
toF: association to F;
|
|
1703
|
+
subitems: composition of many {
|
|
1704
|
+
toG: association to G;
|
|
1705
|
+
subitems: composition of many {
|
|
1706
|
+
toG: association to G;
|
|
1707
|
+
};
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
Must produce:
|
|
1712
|
+
Path="items/up_" Target="Header"/>
|
|
1713
|
+
Path="items/toF" Target="F"/>
|
|
1714
|
+
Path="items/subitems/up_" Target="Header/items"/>
|
|
1715
|
+
Path="items/subitems/toG" Target="G"/>
|
|
1716
|
+
Path="items/subitems/subitems/up_" Target="Header/items/subitems"/>
|
|
1717
|
+
Path="items/subitems/subitems/toG" Target="G"/>
|
|
1718
|
+
*/
|
|
1719
|
+
function initEdmNavPropBindingTargets( def ) {
|
|
1720
|
+
if (def.$hasEntitySet) {
|
|
1721
|
+
forEachGeneric(def.items || def, 'elements', (element) => {
|
|
1722
|
+
produceTargetPath([ edmUtils.getBaseName(def.name) ], element, def);
|
|
1723
|
+
});
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
function produceTargetPath( prefix, elt, curDef ) {
|
|
1727
|
+
const newPrefix = [ ...prefix, elt.name ];
|
|
1728
|
+
if (isEdmPropertyRendered(elt, options)) {
|
|
1729
|
+
// Assoc can never be a derived TypeDefinition, no need to
|
|
1730
|
+
// unroll derived type chains for assocs
|
|
1731
|
+
if (elt.target && !elt.$visited) {
|
|
1732
|
+
if (!elt._target.$edmTgtPaths)
|
|
1733
|
+
setProp(elt._target, '$edmTgtPaths', []);
|
|
1734
|
+
// drill into target only if
|
|
1735
|
+
// 1) target has no entity set and this assoc is not going to the container
|
|
1736
|
+
// 2) current definition and target are the same (cycle)
|
|
1737
|
+
// 3) it's no external reference
|
|
1738
|
+
if (!elt.$externalRef &&
|
|
1739
|
+
!elt._target.$hasEntitySet &&
|
|
1740
|
+
!elt._isToContainer &&
|
|
1741
|
+
curDef !== elt._target) {
|
|
1742
|
+
// follow elements in the target but avoid cycles
|
|
1743
|
+
setProp(elt, '$visited', true);
|
|
1744
|
+
elt._target.$edmTgtPaths.push(newPrefix);
|
|
1745
|
+
Object.values(elt._target.elements).forEach(e => produceTargetPath(newPrefix, e, elt._target));
|
|
1746
|
+
delete elt.$visited;
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
else {
|
|
1750
|
+
// try to find elements to drill down further
|
|
1751
|
+
while (elt && !(isBuiltinType(elt.type) || elt.elements))
|
|
1752
|
+
elt = csn.definitions[elt.type];
|
|
1753
|
+
|
|
1754
|
+
if (elt && elt.elements && !elt.$visited) {
|
|
1755
|
+
setProp(elt, '$visited', true);
|
|
1756
|
+
Object.values(elt.elements).forEach(e => produceTargetPath(newPrefix, e, curDef));
|
|
1757
|
+
delete elt.$visited;
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
function initEdmNavPropBindingPaths( def ) {
|
|
1765
|
+
if (options.isV4() && def.$hasEntitySet) {
|
|
1766
|
+
let npbs = [];
|
|
1767
|
+
forEachGeneric(def.items || def, 'elements', (element) => {
|
|
1768
|
+
npbs = npbs.concat(produceNavigationPath(element, def));
|
|
1769
|
+
});
|
|
1770
|
+
setProp(def, '$edmNPBs', npbs);
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1773
|
+
// collect all paths originating from this element that end up in an entity set
|
|
1774
|
+
function produceNavigationPath( elt, curDef ) {
|
|
1775
|
+
let npbs = [];
|
|
1776
|
+
const prefix = elt.name;
|
|
1777
|
+
if (isEdmPropertyRendered(elt, options)) {
|
|
1778
|
+
// Assoc can never be a derived TypeDefinition, no need to
|
|
1779
|
+
// unroll derived type chains for assocs
|
|
1780
|
+
if (elt.target && !elt.$visited) {
|
|
1781
|
+
// drill into target only if
|
|
1782
|
+
// 1) target has no entity set and this assoc is not going to the container
|
|
1783
|
+
// 2) current definition and target are the same (cycle)
|
|
1784
|
+
// 3) it's no external reference
|
|
1785
|
+
if (!elt.$externalRef &&
|
|
1786
|
+
!elt._target.$hasEntitySet &&
|
|
1787
|
+
!elt._isToContainer &&
|
|
1788
|
+
curDef !== elt._target) {
|
|
1789
|
+
// follow elements in the target but avoid cycles
|
|
1790
|
+
setProp(elt, '$visited', true);
|
|
1791
|
+
Object.values(elt._target.elements).forEach((e) => {
|
|
1792
|
+
npbs = npbs.concat(produceNavigationPath(e, elt._target));
|
|
1793
|
+
});
|
|
1794
|
+
delete elt.$visited;
|
|
1795
|
+
}
|
|
1796
|
+
else if (!(options.odataContainment && options.isV4() && elt['@odata.contained'])) {
|
|
1797
|
+
// end point reached but must not be an external reference nor a proxy nor a composition itself
|
|
1798
|
+
// last assoc step must not be to-n and target a singleton
|
|
1799
|
+
let path;
|
|
1800
|
+
if (!elt.$externalRef &&
|
|
1801
|
+
!(edmUtils.isToMany(elt) &&
|
|
1802
|
+
edmUtils.isSingleton(elt._target) &&
|
|
1803
|
+
options.isV4())) {
|
|
1804
|
+
if (elt._target.$edmTgtPaths && elt._target.$edmTgtPaths.length) {
|
|
1805
|
+
path = elt._target.$edmTgtPaths.find(p => p[0] === edmUtils.getBaseName(def.name)) || elt._target.$edmTgtPaths[0];
|
|
1806
|
+
}
|
|
1807
|
+
else if (elt._target.$hasEntitySet) {
|
|
1808
|
+
const baseName = edmUtils.getBaseName(elt._target.$entitySetName || elt._target.name);
|
|
1809
|
+
// if own struct and target have a set they either are in the same $mySchemaName or not
|
|
1810
|
+
// if target is in another schema, target the full qualified entity set
|
|
1811
|
+
path = (elt._target.$mySchemaName === def.$mySchemaName)
|
|
1812
|
+
? [ baseName ] : [ `${ elt._target.$mySchemaName }.EntityContainer`, baseName ];
|
|
1813
|
+
}
|
|
1814
|
+
if (path) {
|
|
1815
|
+
// if own struct and target have a set they either are in the same $mySchemaName or not
|
|
1816
|
+
// if target is in another schema, target the full qualified entity set
|
|
1817
|
+
const npb = {
|
|
1818
|
+
Path: elt.name,
|
|
1819
|
+
Target: path.join('/'),
|
|
1820
|
+
};
|
|
1821
|
+
npbs.push( npb );
|
|
1822
|
+
}
|
|
1823
|
+
}
|
|
1824
|
+
// Do not prepend prefix here!
|
|
1825
|
+
return npbs;
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1828
|
+
else {
|
|
1829
|
+
// try to find elements to drill down further
|
|
1830
|
+
while (elt && !(isBuiltinType(elt.type) || elt.elements))
|
|
1831
|
+
elt = csn.definitions[elt.type];
|
|
1832
|
+
|
|
1833
|
+
if (elt && elt.elements && !elt.$visited) {
|
|
1834
|
+
setProp(elt, '$visited', true);
|
|
1835
|
+
Object.values(elt.elements).forEach((e) => {
|
|
1836
|
+
npbs = npbs.concat(produceNavigationPath(e, curDef));
|
|
1837
|
+
});
|
|
1838
|
+
delete elt.$visited;
|
|
1839
|
+
}
|
|
1840
|
+
}
|
|
1841
|
+
}
|
|
1842
|
+
npbs.forEach((p) => {
|
|
1843
|
+
p.Path = `${ prefix }/${ p.Path }`;
|
|
1844
|
+
});
|
|
1845
|
+
return npbs;
|
|
1846
|
+
}
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
function determineEntitySet( def ) {
|
|
1850
|
+
// if this is an entity or a view, determine if an entity set is required or not
|
|
1851
|
+
// 1) must not be a proxy and not a containee in V4
|
|
1852
|
+
// No annos are rendered for non-existing EntitySet targets.
|
|
1853
|
+
if (def.$hasEntitySet === undefined) {
|
|
1854
|
+
const hasEntitySet = def.kind === 'entity' && !(options.isV4() && edmUtils.isContainee(def)) && !def.$proxy;
|
|
1855
|
+
setProp(def, '$hasEntitySet', hasEntitySet);
|
|
1856
|
+
}
|
|
1857
|
+
}
|
|
1858
|
+
|
|
1859
|
+
function finalize( def, defName ) {
|
|
1860
|
+
// 1. let all doc props become @Core.Descriptions
|
|
1861
|
+
// 2. mark a member that will become a collection
|
|
1862
|
+
// 3. assign the edm primitive type to elements, to be used in the rendering later
|
|
1863
|
+
// 4. assign @Validation.AllowedValues to enums
|
|
1864
|
+
const defLocation = [ 'definitions', defName ];
|
|
1865
|
+
edmUtils.assignAnnotation(def, '@Core.Description', def.doc);
|
|
1866
|
+
markCollection(def);
|
|
1867
|
+
mapCdsToEdmProp(def);
|
|
1868
|
+
annotateAllowedValues(def, defLocation);
|
|
1869
|
+
if (def.returns) {
|
|
1870
|
+
markCollection(def.returns, true);
|
|
1871
|
+
mapCdsToEdmProp(def.returns);
|
|
1872
|
+
annotateAllowedValues(def.returns, [ ...defLocation, 'returns' ]);
|
|
1873
|
+
}
|
|
1874
|
+
forEachMemberRecursively(def, (member, _memberName, prop, location) => {
|
|
1875
|
+
edmUtils.assignAnnotation(member, '@Core.Description', member.doc);
|
|
1876
|
+
markCollection(member);
|
|
1877
|
+
mapCdsToEdmProp(member);
|
|
1878
|
+
annotateAllowedValues(member, location);
|
|
1879
|
+
ComputedDefaultValue(member, prop, location);
|
|
1880
|
+
rewriteAnnotationExpressions(member);
|
|
1881
|
+
if (member.returns) {
|
|
1882
|
+
edmUtils.assignAnnotation(member.returns, '@Core.Description', member.returns.doc);
|
|
1883
|
+
markCollection(member.returns, true);
|
|
1884
|
+
mapCdsToEdmProp(member.returns);
|
|
1885
|
+
annotateAllowedValues(member.returns, [ ...location, 'returns' ]);
|
|
1886
|
+
rewriteAnnotationExpressions(member.returns);
|
|
1887
|
+
}
|
|
1888
|
+
}, defLocation);
|
|
1889
|
+
// mark members that need to be rendered as collections
|
|
1890
|
+
function markCollection( obj, isReturns ) {
|
|
1891
|
+
const items = obj.items || csn.definitions[obj.type] && csn.definitions[obj.type].items;
|
|
1892
|
+
if (items) {
|
|
1893
|
+
edmUtils.assignProp(obj, '$NoNullableProperty',
|
|
1894
|
+
isReturns && items.type &&
|
|
1895
|
+
!isBuiltinType(items.type) &&
|
|
1896
|
+
csn.definitions[items.type]?.kind === 'entity');
|
|
1897
|
+
edmUtils.assignProp(obj, '_NotNullCollection', items.notNull !== undefined ? items.notNull : false);
|
|
1898
|
+
edmUtils.assignProp(obj, '$isCollection', true);
|
|
1899
|
+
}
|
|
1900
|
+
}
|
|
1901
|
+
|
|
1902
|
+
/*
|
|
1903
|
+
Add @Validation.AllowedValues annotation for all enum types
|
|
1904
|
+
A 'Value' is added if the enum symbol:
|
|
1905
|
+
- has a valid value other than 'null'
|
|
1906
|
+
- has no value but the base type is cds.String, use the
|
|
1907
|
+
symbol as value
|
|
1908
|
+
*/
|
|
1909
|
+
function annotateAllowedValues( node, location ) {
|
|
1910
|
+
let typeDef = node;
|
|
1911
|
+
if (!node.enum && node.type && !isBuiltinType(node.type))
|
|
1912
|
+
typeDef = csn.definitions[node.type];
|
|
1913
|
+
if (typeDef?.enum) {
|
|
1914
|
+
const enumValue = [];
|
|
1915
|
+
for (const enumSymbol in typeDef.enum) {
|
|
1916
|
+
const result = { '@Core.SymbolicName': enumSymbol };
|
|
1917
|
+
let enumSymbolDef = typeDef.enum[enumSymbol];
|
|
1918
|
+
while (enumSymbolDef && !enumSymbolDef.$visited && enumSymbolDef['#']) {
|
|
1919
|
+
setProp(enumSymbolDef, '$visited', true);
|
|
1920
|
+
enumSymbolDef = typeDef.enum[enumSymbolDef['#']];
|
|
1921
|
+
}
|
|
1922
|
+
// reset visited
|
|
1923
|
+
for (const es in typeDef.enum)
|
|
1924
|
+
delete typeDef.enum[es].$visited;
|
|
1925
|
+
|
|
1926
|
+
if (enumSymbolDef) {
|
|
1927
|
+
if (enumSymbolDef.val !== undefined) {
|
|
1928
|
+
// 'null' value is represented spec conform as empty record in AllowedValues collection
|
|
1929
|
+
result.Value = enumSymbolDef.val;
|
|
1930
|
+
enumValue.push(result);
|
|
1931
|
+
}
|
|
1932
|
+
else if (typeDef.type === 'cds.String') {
|
|
1933
|
+
// the symbol is used as value for type 'cds.String'
|
|
1934
|
+
result.Value = enumSymbol;
|
|
1935
|
+
enumValue.push(result);
|
|
1936
|
+
}
|
|
1937
|
+
else if (node.kind !== 'annotation') {
|
|
1938
|
+
// omit the entry and warn
|
|
1939
|
+
warning('odata-enum-missing-value', location,
|
|
1940
|
+
{ name: enumSymbol, anno: '@Validation.AllowedValues', type: typeDef.type },
|
|
1941
|
+
'Expected enum element $(NAME) of type $(TYPE) to have a value, not added to $(ANNO)');
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1944
|
+
else { // enumSymbolDef not found
|
|
1945
|
+
// omit the entry and warn
|
|
1946
|
+
warning('odata-enum-missing-value', location,
|
|
1947
|
+
{ name: enumSymbol, anno: '@Validation.AllowedValues', type: typeDef.type },
|
|
1948
|
+
'Expected enum element $(NAME) of type $(TYPE) to have a value, not added to $(ANNO)');
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
// Can't rely that @description has already been renamed to @Core.Description
|
|
1952
|
+
// Eval description according to precedence (doc comment must be considered already in Odata transformer
|
|
1953
|
+
// as in contrast to the other doc comments as it is used to annotate the @Validation.AllowedValues)
|
|
1954
|
+
const desc = enumSymbolDef ? enumSymbolDef['@Core.Description'] || enumSymbolDef['@description'] || enumSymbolDef.doc : undefined;
|
|
1955
|
+
if (desc)
|
|
1956
|
+
result['@Core.Description'] = desc;
|
|
1957
|
+
}
|
|
1958
|
+
if (enumValue.length > 0)
|
|
1959
|
+
edmUtils.assignAnnotation(node, '@Validation.AllowedValues', enumValue);
|
|
1960
|
+
}
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
|
|
1964
|
+
// If containment in V4 is active, annotations that would be assigned to the containees
|
|
1965
|
+
// entity set are not renderable anymore. In such a case try to reassign the annotations to
|
|
1966
|
+
// the containment navigation property.
|
|
1967
|
+
// Today only Capabilities.*Restrictions are known to be remapped as there exists a CDS
|
|
1968
|
+
// short cut annotation @readonly that gets expanded and can be safely remapped.
|
|
1969
|
+
function pullupCapabilitiesAnnotations( rootContainer ) {
|
|
1970
|
+
if (!options.odataCapabilitiesPullup)
|
|
1971
|
+
return;
|
|
1972
|
+
// @Capabilities is applicable to EntitySet/Collection only
|
|
1973
|
+
if (!rootContainer.$hasEntitySet)
|
|
1974
|
+
return;
|
|
1975
|
+
|
|
1976
|
+
const isRecursiveContainment
|
|
1977
|
+
= !!(rootContainer.$containerNames && rootContainer.$containeeAssociations &&
|
|
1978
|
+
rootContainer.$containerNames.length === 1 &&
|
|
1979
|
+
rootContainer.$containeeAssociations.some(entry => rootContainer.$containerNames.includes(entry.assoc.target)));
|
|
1980
|
+
|
|
1981
|
+
// Root nodes are not contained
|
|
1982
|
+
const isRootNode
|
|
1983
|
+
= !!(!rootContainer.$containerNames ||
|
|
1984
|
+
rootContainer.$containerNames && rootContainer.$containerNames.length === 0);
|
|
1985
|
+
|
|
1986
|
+
if (!isRecursiveContainment && !isRootNode)
|
|
1987
|
+
return;
|
|
1988
|
+
|
|
1989
|
+
const rootRestrictions = [];
|
|
1990
|
+
addContainmentAnnotationsRecursively([], rootContainer);
|
|
1991
|
+
if (rootRestrictions.length)
|
|
1992
|
+
rootContainer[NavResAnno] = rootRestrictions;
|
|
1993
|
+
|
|
1994
|
+
function addContainmentAnnotationsRecursively( prefix, container ) {
|
|
1995
|
+
if (container.$containeeAssociations) {
|
|
1996
|
+
// copy or create container restrictions, don't modify original
|
|
1997
|
+
const localRestrictions = container[NavResAnno]
|
|
1998
|
+
? cloneAnnotationValue(container[NavResAnno]) : [];
|
|
1999
|
+
|
|
2000
|
+
// prefix the existing navigation property restrictions on the container
|
|
2001
|
+
if (prefix.length) {
|
|
2002
|
+
localRestrictions.forEach((npe) => {
|
|
2003
|
+
if (npe.NavigationProperty &&
|
|
2004
|
+
npe.NavigationProperty['='] &&
|
|
2005
|
+
typeof npe.NavigationProperty['='] === 'string') {
|
|
2006
|
+
// TODO: replace with transformExpression
|
|
2007
|
+
applyTransformations({ definitions: { npe } }, {
|
|
2008
|
+
'=': (parent, prop, value) => {
|
|
2009
|
+
parent[prop] = prefix.concat(value).join('.');
|
|
2010
|
+
},
|
|
2011
|
+
});
|
|
2012
|
+
}
|
|
2013
|
+
});
|
|
2014
|
+
}
|
|
2015
|
+
|
|
2016
|
+
setProp(container, '$visited', true);
|
|
2017
|
+
// collect capabilities from containees
|
|
2018
|
+
container.$containeeAssociations.forEach((entry) => {
|
|
2019
|
+
const { assoc, path } = entry;
|
|
2020
|
+
const containee = assoc._target;
|
|
2021
|
+
|
|
2022
|
+
if (edmUtils.isNavigable(assoc) && isMyServiceRequested(containee.name) || containee.$proxy) {
|
|
2023
|
+
const localAssocPath = path.join('.');
|
|
2024
|
+
const laprefix = prefix.concat(localAssocPath).join('.');
|
|
2025
|
+
let navPropEntry = localRestrictions.find(p => p.NavigationProperty && p.NavigationProperty['='] === laprefix);
|
|
2026
|
+
const hasEntry = !!navPropEntry;
|
|
2027
|
+
|
|
2028
|
+
if (!hasEntry)
|
|
2029
|
+
navPropEntry = { NavigationProperty: { '=': laprefix } };
|
|
2030
|
+
|
|
2031
|
+
|
|
2032
|
+
const props = Object.entries(containee);
|
|
2033
|
+
let newEntry = false;
|
|
2034
|
+
capabilities.forEach((c) => {
|
|
2035
|
+
if (edmUtils.mergeIntoNavPropEntry(c, navPropEntry, prefix.concat(path), props))
|
|
2036
|
+
newEntry = true;
|
|
2037
|
+
});
|
|
2038
|
+
|
|
2039
|
+
if (newEntry && !hasEntry)
|
|
2040
|
+
localRestrictions.push(navPropEntry);
|
|
2041
|
+
|
|
2042
|
+
|
|
2043
|
+
if (!containee.$visited)
|
|
2044
|
+
addContainmentAnnotationsRecursively(prefix.concat(path), containee);
|
|
2045
|
+
}
|
|
2046
|
+
});
|
|
2047
|
+
|
|
2048
|
+
rootRestrictions.unshift(...localRestrictions);
|
|
2049
|
+
delete container.$visited;
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2053
|
+
|
|
2054
|
+
/*
|
|
2055
|
+
V4 Only:
|
|
2056
|
+
An action/function parameter is optional if
|
|
2057
|
+
1) it is explicitly annotated to be optional
|
|
2058
|
+
2) it has a default value (including null), regardless of it's nullability
|
|
2059
|
+
3) it has NO default value but is nullable (the implicit default value is null)
|
|
2060
|
+
|
|
2061
|
+
If a mandatory parameter (not null no default value) appears after an optional
|
|
2062
|
+
parameter, a warning is raised, Core.OptionalParameter requires that all optional
|
|
2063
|
+
parameters appear rightmost.
|
|
2064
|
+
*/
|
|
2065
|
+
function annotateOptionalActFuncParams( def, defName ) {
|
|
2066
|
+
// return if there is nothing to do
|
|
2067
|
+
const loc = [ 'definitions', defName ];
|
|
2068
|
+
if (def.kind === 'function' || def.kind === 'action')
|
|
2069
|
+
iterateParams(def, loc.concat('params'));
|
|
2070
|
+
if (def.actions) {
|
|
2071
|
+
for (const an in def.actions) {
|
|
2072
|
+
const a = def.actions[an];
|
|
2073
|
+
iterateParams(a, loc.concat([ 'actions', an, 'params' ]));
|
|
2074
|
+
}
|
|
2075
|
+
}
|
|
2076
|
+
|
|
2077
|
+
function iterateParams( action, location ) {
|
|
2078
|
+
let optPns = [];
|
|
2079
|
+
const isBP = p => (p.items?.type || p.type) === '$self' &&
|
|
2080
|
+
p === Object.values( action.params )[0];
|
|
2081
|
+
|
|
2082
|
+
if (action.params) {
|
|
2083
|
+
Object.entries(action.params).forEach(([ pn, p ]) => {
|
|
2084
|
+
// user assigned annotation, don't touch it
|
|
2085
|
+
const defT = reqDefs.definitions[p.items?.type || p.type];
|
|
2086
|
+
const isStructType = !!(defT?.items?.elements || defT?.elements);
|
|
2087
|
+
const isItems = !!(p.items || defT?.items);
|
|
2088
|
+
|
|
2089
|
+
if (Object.keys(p).some(a => a.startsWith('@Core.OptionalParameter') && p[a] != null)) {
|
|
2090
|
+
// expand short cut annotation for unspecified default value
|
|
2091
|
+
if (typeof p['@Core.OptionalParameter'] === 'boolean') {
|
|
2092
|
+
if (p['@Core.OptionalParameter'] && !isBP(p) && !options.isV2()) {
|
|
2093
|
+
if (p.default?.val !== undefined) {
|
|
2094
|
+
if (p.default.val !== null && (isStructType || isItems))
|
|
2095
|
+
warning('odata-ignoring-param-default', location.concat(pn), { '#': 'colitem' });
|
|
2096
|
+
else
|
|
2097
|
+
p['@Core.OptionalParameter'] = { DefaultValue: p.default.val };
|
|
2098
|
+
}
|
|
2099
|
+
else {
|
|
2100
|
+
p['@Core.OptionalParameter'] = { $Type: '' };
|
|
2101
|
+
}
|
|
2102
|
+
optPns.push(p);
|
|
2103
|
+
}
|
|
2104
|
+
else { // reset falsy annotation, param is NOT optional
|
|
2105
|
+
p['@Core.OptionalParameter'] = null;
|
|
2106
|
+
}
|
|
2107
|
+
}
|
|
2108
|
+
else {
|
|
2109
|
+
optPns.push(p);
|
|
2110
|
+
}
|
|
2111
|
+
}
|
|
2112
|
+
else if (!isBP(p) && !options.isV2()) {
|
|
2113
|
+
// default value automatically makes param optional
|
|
2114
|
+
if (p.default?.val !== undefined) {
|
|
2115
|
+
if (p.default.val !== null && (isStructType || isItems))
|
|
2116
|
+
warning('odata-ignoring-param-default', location.concat(pn), { '#': 'colitem' });
|
|
2117
|
+
else
|
|
2118
|
+
edmUtils.assignAnnotation(p, '@Core.OptionalParameter.DefaultValue', p.default.val);
|
|
2119
|
+
optPns.push(p);
|
|
2120
|
+
}
|
|
2121
|
+
// nullable action/function params are optional (implicit default null)
|
|
2122
|
+
else if (!p.notNull) {
|
|
2123
|
+
optPns.push(p);
|
|
2124
|
+
if (action.kind === 'function')
|
|
2125
|
+
p['@Core.OptionalParameter'] = { $Type: '' };
|
|
2126
|
+
}
|
|
2127
|
+
else if (action.kind === 'function') {
|
|
2128
|
+
// this is a mandatory parameter, warn about all previously collected optional parameters
|
|
2129
|
+
if (optPns.length)
|
|
2130
|
+
error('odata-parameter-order', location.concat(pn));
|
|
2131
|
+
optPns = [];
|
|
2132
|
+
}
|
|
2133
|
+
}
|
|
2134
|
+
});
|
|
2135
|
+
}
|
|
2136
|
+
}
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
// ////////////////////////////////////////////////////////////////////
|
|
2140
|
+
//
|
|
2141
|
+
// Helper section starts here
|
|
2142
|
+
//
|
|
2143
|
+
|
|
2144
|
+
|
|
2145
|
+
function mapCdsToEdmProp( obj ) {
|
|
2146
|
+
if (edmUtils.convertMapToOpenStruct(obj, _options.odataVersion === 'v4')) {
|
|
2147
|
+
return;
|
|
2148
|
+
}
|
|
2149
|
+
else if (obj.type && isBuiltinType(obj.type) && !obj.target && !obj.targetAspect) {
|
|
2150
|
+
const edmType = edmUtils.mapCdsToEdmType(obj, messageFunctions, _options, obj['@Core.MediaType']);
|
|
2151
|
+
edmUtils.assignProp(obj, '_edmType', edmType);
|
|
2152
|
+
}
|
|
2153
|
+
else if (obj.$isCollection && (obj.items && isBuiltinType(csnUtils.getFinalTypeInfo(obj.items.type)?.type))) {
|
|
2154
|
+
const edmType = edmUtils.mapCdsToEdmType(obj.items, messageFunctions, _options, obj['@Core.MediaType'], obj.$path);
|
|
2155
|
+
edmUtils.assignProp(obj, '_edmType', edmType);
|
|
2156
|
+
}
|
|
2157
|
+
// This is the special case when we have array of array, but will not be supported in the future
|
|
2158
|
+
else if (obj.$isCollection && obj.items && obj.items.type && obj.items.items && isBuiltinType(csnUtils.getFinalTypeInfo(obj.items.items.type)?.type)) {
|
|
2159
|
+
const edmType = edmUtils.mapCdsToEdmType(obj.items.items, messageFunctions, _options, obj['@Core.MediaType']);
|
|
2160
|
+
edmUtils.assignProp(obj, '_edmType', edmType);
|
|
2161
|
+
}
|
|
2162
|
+
}
|
|
2163
|
+
|
|
2164
|
+
function ComputedDefaultValue( member, prop, location ) {
|
|
2165
|
+
if (member.default && !csn['@Core.ComputedDefaultValue']) {
|
|
2166
|
+
let def = member.default;
|
|
2167
|
+
let noTailExpr = false;
|
|
2168
|
+
if (def.xpr) {
|
|
2169
|
+
let i = 0;
|
|
2170
|
+
// consume all unary signs
|
|
2171
|
+
while (def.xpr[i] === '-' || def.xpr[i] === '+')
|
|
2172
|
+
i++;
|
|
2173
|
+
// noTailExpr is true if there is nothing behind the next token in the stream
|
|
2174
|
+
noTailExpr = i < def.xpr.length - 1;
|
|
2175
|
+
def = def.xpr[i];
|
|
2176
|
+
}
|
|
2177
|
+
// it is a computed value if it is not a simple value or an annotation
|
|
2178
|
+
if (!((def.val !== undefined && !noTailExpr) || def['#'])) {
|
|
2179
|
+
if (prop === 'params')
|
|
2180
|
+
warning('odata-ignoring-param-default', location, { '#': 'xpr' });
|
|
2181
|
+
else
|
|
2182
|
+
edmUtils.assignAnnotation(member, '@Core.ComputedDefaultValue', true);
|
|
2183
|
+
}
|
|
2184
|
+
}
|
|
2185
|
+
}
|
|
2186
|
+
|
|
2187
|
+
function rewriteAnnotationExpressions( carrier ) {
|
|
2188
|
+
// rewrite annotation expression paths such that they are defined against the definition
|
|
2189
|
+
const absPath = $path2path(carrier.$path);
|
|
2190
|
+
let isSubTreeSpan = true;
|
|
2191
|
+
|
|
2192
|
+
let rootPrefix = absPath.slice(1, absPath.length - 1);
|
|
2193
|
+
|
|
2194
|
+
const subTreeSpan = {
|
|
2195
|
+
ref: (parent, _prop, xpr) => {
|
|
2196
|
+
const head = xpr[0].id || xpr[0];
|
|
2197
|
+
if (head === '$self' || parent.param) {
|
|
2198
|
+
let j = parent.param ? 0 : 1;
|
|
2199
|
+
const k = parent.param ? 1 : 0;
|
|
2200
|
+
isSubTreeSpan = isSubTreeSpan && (absPath.length - k <= xpr.length);
|
|
2201
|
+
for (let i = 1; i < absPath.length - 1 && isSubTreeSpan; i++, j++)
|
|
2202
|
+
isSubTreeSpan = isSubTreeSpan && (xpr[j].id || xpr[j]) === absPath[i];
|
|
2203
|
+
}
|
|
2204
|
+
},
|
|
2205
|
+
};
|
|
2206
|
+
// this element was not a top level element before type exposure
|
|
2207
|
+
// rectify all absolute annotation paths inside
|
|
2208
|
+
const relativize = {
|
|
2209
|
+
ref: (parent, _prop, xpr) => {
|
|
2210
|
+
const head = xpr[0].id || xpr[0];
|
|
2211
|
+
let absPathPrefixEqual = true;
|
|
2212
|
+
if (head === '$self' || parent.param) {
|
|
2213
|
+
let j = parent.param ? 0 : 1;
|
|
2214
|
+
for (let i = 1; i < absPath.length - 1 && absPathPrefixEqual; i++, j++)
|
|
2215
|
+
absPathPrefixEqual = (xpr[j].id || xpr[j]) === absPath[i];
|
|
2216
|
+
|
|
2217
|
+
if (absPathPrefixEqual) {
|
|
2218
|
+
// remove prefix between $self and leaf element name
|
|
2219
|
+
// or starting with the parameter name
|
|
2220
|
+
xpr.splice(parent.param ? 0 : 1, absPath.length - 2);
|
|
2221
|
+
if (parent.param)
|
|
2222
|
+
parent.param = null;
|
|
2223
|
+
}
|
|
2224
|
+
}
|
|
2225
|
+
},
|
|
2226
|
+
};
|
|
2227
|
+
|
|
2228
|
+
const absolutize = {
|
|
2229
|
+
ref: (parent, prop, xpr) => {
|
|
2230
|
+
const head = xpr[0].id || xpr[0];
|
|
2231
|
+
if (head !== '$self' && !parent.param && !isMagicVariable(head)) {
|
|
2232
|
+
parent[prop] = [ ...rootPrefix, ...xpr ];
|
|
2233
|
+
if (absolutize.scope === 'params')
|
|
2234
|
+
parent.param = true;
|
|
2235
|
+
else
|
|
2236
|
+
parent[prop].unshift('$self');
|
|
2237
|
+
}
|
|
2238
|
+
},
|
|
2239
|
+
};
|
|
2240
|
+
|
|
2241
|
+
if (absPath.length > 2) {
|
|
2242
|
+
const [ xprANames, nxprANames ] = Object.keys(carrier).reduce((acc, pn) => {
|
|
2243
|
+
if (pn[0] === '@')
|
|
2244
|
+
acc[findAnnotationExpression(carrier, pn) ? 0 : 1].push(pn);
|
|
2245
|
+
return acc;
|
|
2246
|
+
}, [ [], [] ]);
|
|
2247
|
+
|
|
2248
|
+
let scope = carrier.$path[2];
|
|
2249
|
+
let def = csn.definitions[carrier.$path[1]];
|
|
2250
|
+
// unbound
|
|
2251
|
+
if (scope === 'returns') {
|
|
2252
|
+
absPath[1] = '$ReturnType';
|
|
2253
|
+
rootPrefix = absPath.slice(3, absPath.length - 1);
|
|
2254
|
+
}
|
|
2255
|
+
let eltPath = absPath.slice(1).join('/');
|
|
2256
|
+
// bound action
|
|
2257
|
+
if (scope === 'actions' && def[scope][carrier.$path[3]]) {
|
|
2258
|
+
def = def[scope][carrier.$path[3]];
|
|
2259
|
+
scope = carrier.$path[4];
|
|
2260
|
+
if (scope === 'params') {
|
|
2261
|
+
rootPrefix = absPath.slice(2, absPath.length - 1);
|
|
2262
|
+
eltPath = absPath.slice(2).join('/');
|
|
2263
|
+
}
|
|
2264
|
+
if (scope === 'returns') {
|
|
2265
|
+
absPath[2] = '$ReturnType';
|
|
2266
|
+
rootPrefix = absPath.slice(3, absPath.length - 1);
|
|
2267
|
+
eltPath = absPath.slice(2).join('/');
|
|
2268
|
+
}
|
|
2269
|
+
}
|
|
2270
|
+
const proxyDict = `$${ scope }AnnoProxies`;
|
|
2271
|
+
|
|
2272
|
+
xprANames.forEach((xprAName) => {
|
|
2273
|
+
isSubTreeSpan = true;
|
|
2274
|
+
transformAnnotationExpression(carrier, xprAName, subTreeSpan);
|
|
2275
|
+
if (isSubTreeSpan) {
|
|
2276
|
+
transformAnnotationExpression(carrier, xprAName, relativize);
|
|
2277
|
+
}
|
|
2278
|
+
else {
|
|
2279
|
+
absolutize.scope = scope;
|
|
2280
|
+
transformAnnotationExpression(carrier, xprAName, absolutize);
|
|
2281
|
+
if (!def[proxyDict])
|
|
2282
|
+
setProp(def, proxyDict, Object.create(null));
|
|
2283
|
+
let proxyCarrier = def[proxyDict][eltPath];
|
|
2284
|
+
if (!proxyCarrier) {
|
|
2285
|
+
proxyCarrier = Object.create(null);
|
|
2286
|
+
// these attributes are needed to test for
|
|
2287
|
+
// Property, Parameter, NavigationProperty, Collection
|
|
2288
|
+
// Applicability
|
|
2289
|
+
[ 'target',
|
|
2290
|
+
'cardinality',
|
|
2291
|
+
'keys',
|
|
2292
|
+
'$isCollection',
|
|
2293
|
+
'$appliesToReturnType',
|
|
2294
|
+
'$path',
|
|
2295
|
+
'@cds.api.ignore',
|
|
2296
|
+
'@odata.navigable' ].forEach((prop) => {
|
|
2297
|
+
if (carrier[prop] != null)
|
|
2298
|
+
setProp(proxyCarrier, prop, carrier[prop]);
|
|
2299
|
+
});
|
|
2300
|
+
|
|
2301
|
+
Object.keys(carrier).filter(pn => pn[0] !== '@').forEach((pn) => {
|
|
2302
|
+
proxyCarrier[pn] = carrier[pn];
|
|
2303
|
+
});
|
|
2304
|
+
def[proxyDict][eltPath] = proxyCarrier;
|
|
2305
|
+
}
|
|
2306
|
+
proxyCarrier[xprAName] = carrier[xprAName];
|
|
2307
|
+
carrier[xprAName] = null;
|
|
2308
|
+
nxprANames.filter(an => an.startsWith(`${ xprAName }.`)).forEach((nxprAName) => {
|
|
2309
|
+
proxyCarrier[nxprAName] = carrier[nxprAName];
|
|
2310
|
+
carrier[nxprAName] = null;
|
|
2311
|
+
});
|
|
2312
|
+
}
|
|
2313
|
+
});
|
|
2314
|
+
}
|
|
2315
|
+
}
|
|
2316
|
+
}
|
|
2317
|
+
|
|
2318
|
+
module.exports = {
|
|
2319
|
+
initializeModel,
|
|
2320
|
+
};
|