@sap/cds-dk 10.1.1 → 10.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +53 -0
- package/bin/add.js +7 -2
- package/bin/bind.js +0 -2
- package/bin/bindings.js +35 -0
- package/bin/build.js +11 -6
- package/bin/compile/index.js +1 -0
- package/bin/completion/index.js +10 -448
- package/bin/completion/scripts/cds.fish +24 -16
- package/bin/completion/scripts/cds.ps1 +26 -25
- package/bin/completion/scripts/cds.sh +22 -19
- package/bin/completion/scripts/cds.zsh +22 -19
- package/bin/deploy/index.js +1 -1
- package/bin/deploy/to-hana/hana.js +5 -4
- package/bin/env.js +0 -1
- package/bin/eval.js +9 -5
- package/bin/export.js +6 -4
- package/bin/help/export.md +28 -4
- package/bin/import.js +6 -5
- package/bin/inspect.js +0 -1
- package/bin/login.js +28 -3
- package/bin/repl.js +82 -26
- package/bin/run.js +6 -7
- package/bin/serve.js +6 -7
- package/bin/up.js +7 -2
- package/bin/upgrade/steps/install.js +6 -6
- package/bin/watch/index.js +1 -0
- package/lib/build/index.js +11 -7
- package/lib/build/plugins/featureToggles.js +2 -2
- package/lib/build/plugins/hana/index.js +1 -1
- package/lib/build/plugins/helm/files/subcharts/web-application/Chart.yaml +1 -1
- package/lib/build/plugins/helm/files/subcharts/web-application/templates/_helpers.tpl +7 -0
- package/lib/build/plugins/helm/files/subcharts/web-application/templates/api-rule.yaml +1 -0
- package/lib/build/plugins/helm/files/subcharts/web-application/templates/service-binding.yaml +4 -4
- package/lib/build/plugins/helm/files/subcharts/web-application/values.schema.json +13 -0
- package/lib/build/plugins/helm/files/subcharts/web-application/values.yaml +7 -1
- package/lib/build/plugins/internal.js +0 -26
- package/lib/build/plugins/java/index.js +5 -1
- package/lib/build/plugins/nodejs/index.js +13 -4
- package/lib/build/util.js +4 -5
- package/lib/cds.js +8 -2
- package/lib/env/schemas/cds-rc.js +5 -0
- package/lib/import/importapi.js +2 -3
- package/lib/init/constants.js +1 -1
- package/lib/init/index.js +8 -3
- package/lib/init/merge.js +21 -17
- package/lib/init/plugin.js +1 -1
- package/lib/init/projectReader.js +13 -10
- package/lib/init/registries/mta.js +0 -6
- package/lib/init/template/ai/index.js +4 -4
- package/lib/init/template/ams/files/extensionDeveloper.dcl +6 -0
- package/lib/init/template/ams/files/mta.yaml.hbs +6 -0
- package/lib/init/template/ams/files/sidecar.package.json.hbs +5 -0
- package/lib/init/template/ams/index.js +42 -40
- package/lib/init/template/app-frontend/files/mta.yaml.hbs +2 -0
- package/lib/init/template/app-frontend/files/ui5.yaml.hbs +0 -4
- package/lib/init/template/app-frontend/index.js +29 -24
- package/lib/init/template/application-logging/index.js +6 -6
- package/lib/init/template/approuter/files/xs-app.json.hbs +22 -0
- package/lib/init/template/approuter/index.js +20 -13
- package/lib/init/template/attachments/index.js +3 -3
- package/lib/init/template/audit-logging/index.js +4 -4
- package/lib/init/template/cloud-logging/index.js +12 -6
- package/lib/init/template/completion/completionSetup.js +19 -6
- package/lib/init/template/connectivity/index.js +3 -3
- package/lib/init/template/data/as-csv.js +7 -4
- package/lib/init/template/data/as-json.js +77 -20
- package/lib/init/template/destination/index.js +12 -9
- package/lib/init/template/dynatrace/index.js +5 -5
- package/lib/init/template/enterprise-messaging/index.js +10 -7
- package/lib/init/template/enterprise-messaging-shared/index.js +4 -4
- package/lib/init/template/event-mesh/index.js +3 -0
- package/lib/init/template/extensibility/index.js +2 -2
- package/lib/init/template/extension/index.js +26 -0
- package/lib/init/template/github-actions/index.js +3 -3
- package/lib/init/template/hana/files/package.json.hbs +3 -2
- package/lib/init/template/hana/index.js +5 -5
- package/lib/init/template/hana-serverless/index.js +3 -3
- package/lib/init/template/html5-repo/files/mta.yaml.hbs +2 -0
- package/lib/init/template/html5-repo/files/ui5.yaml.hbs +0 -4
- package/lib/init/template/html5-repo/index.js +68 -40
- package/lib/init/template/http/index.js +1 -1
- package/lib/init/template/ias/index.js +7 -7
- package/lib/init/template/initial/files/.gitignore.hbs +1 -0
- package/lib/init/template/kafka/index.js +3 -3
- package/lib/init/template/kyma/index.js +7 -9
- package/lib/init/template/malware-scanner/index.js +3 -3
- package/lib/init/template/mta/index.js +6 -3
- package/lib/init/template/multitenancy/index.js +6 -7
- package/lib/init/template/notifications/index.js +2 -2
- package/lib/init/template/portal/index.js +16 -10
- package/lib/init/template/postgres/index.js +5 -5
- package/lib/init/template/react/files/index.html.hbs +1 -1
- package/lib/init/template/react/files/package.json.hbs +3 -2
- package/lib/init/template/react/files/src/{App.jsx.hbs → App.{{jsxExtension}}.hbs} +8 -2
- package/lib/init/template/react/files/src/{main.jsx → main.{{jsxExtension}}.hbs} +2 -2
- package/lib/init/template/react/index.js +23 -4
- package/lib/init/template/react/typescript/src/vite-env.d.ts +1 -0
- package/lib/init/template/react/typescript/tsconfig.json.hbs +16 -0
- package/lib/init/template/redis/index.js +2 -2
- package/lib/init/template/side-by-side-extensibility/index.js +6 -3
- package/lib/init/template/typescript/files/tsconfig.json +3 -1
- package/lib/init/template/vue/files/index.html.hbs +1 -1
- package/lib/init/template/vue/files/package.json.hbs +2 -1
- package/lib/init/template/vue/files/src/App.vue.hbs +8 -2
- package/lib/init/template/vue/index.js +20 -4
- package/lib/init/template/vue/typescript/tsconfig.json +11 -0
- package/lib/init/template/workzone-standard/files/mta.yaml.hbs +2 -2
- package/lib/init/template/workzone-standard/index.js +30 -28
- package/lib/init/template/xsuaa/files/mta.yaml.hbs +1 -1
- package/lib/init/template/xsuaa/files/values.yaml.hbs +1 -1
- package/lib/init/template/xsuaa/index.js +34 -22
- package/lib/mtx/auth_manager.js +8 -2
- package/lib/mtx/browser_login.js +181 -0
- package/lib/mtx/params.js +6 -0
- package/lib/mtx/settings_manager.js +29 -4
- package/lib/util/cf.js +44 -8
- package/lib/util/fs.js +2 -2
- package/node_modules/@cap-js/db-service/CHANGELOG.md +23 -0
- package/node_modules/@cap-js/db-service/lib/cqn2pql.js +4 -0
- package/node_modules/@cap-js/db-service/lib/cqn2sql.js +3 -0
- package/node_modules/@cap-js/db-service/lib/cqn4sql.js +17 -28
- package/node_modules/@cap-js/db-service/lib/infer/index.js +20 -27
- package/node_modules/@cap-js/db-service/package.json +1 -1
- package/node_modules/@cap-js/openapi/cds-plugin.js +12 -0
- package/node_modules/@cap-js/openapi/index.js +3 -1
- package/node_modules/@cap-js/openapi/lib/compile/csdl2openapi.js +652 -413
- package/node_modules/@cap-js/openapi/lib/compile/diagram.js +16 -13
- package/node_modules/@cap-js/openapi/lib/compile/index.js +10 -7
- package/node_modules/@cap-js/openapi/lib/compile/property-util.js +51 -0
- package/{lib/import/openapi → node_modules/@cap-js/openapi/lib/import}/importOpenAPI.js +12 -9
- package/{lib/import/openapi → node_modules/@cap-js/openapi/lib/import}/index.js +4 -3
- package/node_modules/@cap-js/openapi/package.json +71 -3
- package/node_modules/@cap-js/sqlite/CHANGELOG.md +18 -0
- package/node_modules/@cap-js/sqlite/package.json +3 -3
- package/node_modules/@isaacs/fs-minipass/LICENSE +15 -0
- package/node_modules/@isaacs/fs-minipass/README.md +71 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts +118 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js +430 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js.map +1 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json +3 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts +118 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.js +420 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.js.map +1 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/package.json +3 -0
- package/node_modules/@isaacs/fs-minipass/package.json +72 -0
- package/node_modules/@sap/cds/CHANGELOG.md +71 -1
- package/node_modules/@sap/cds/_i18n/messages_ar.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_bg.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_cs.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_da.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_de.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_el.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_en.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_es.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_es_MX.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_fi.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_fr.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_he.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_hr.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_hu.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_it.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_ja.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_kk.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_ko.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_ms.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_nl.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_no.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_pl.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_pt.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_ro.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_ru.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_sh.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_sk.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_sl.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_sv.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_th.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_tr.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_uk.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_vi.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_zh_CN.properties +1 -0
- package/node_modules/@sap/cds/_i18n/messages_zh_TW.properties +1 -0
- package/node_modules/@sap/cds/app/index-client.js +164 -0
- package/node_modules/@sap/cds/app/index.css +598 -87
- package/node_modules/@sap/cds/app/index.html +54 -30
- package/node_modules/@sap/cds/app/index.js +311 -67
- package/node_modules/@sap/cds/app/table.html +226 -0
- package/node_modules/@sap/cds/app/table.js +302 -0
- package/node_modules/@sap/cds/bin/serve.js +3 -2
- package/node_modules/@sap/cds/common.cds +3 -3
- package/node_modules/@sap/cds/eslint.config.mjs +2 -0
- package/node_modules/@sap/cds/lib/compile/cdsc.js +7 -0
- package/node_modules/@sap/cds/lib/compile/for/embeddings.js +27 -0
- package/node_modules/@sap/cds/lib/compile/load.js +2 -2
- package/node_modules/@sap/cds/lib/compile/minify.js +17 -2
- package/node_modules/@sap/cds/lib/compile/parse.js +3 -0
- package/node_modules/@sap/cds/lib/compile/resolve.js +16 -14
- package/node_modules/@sap/cds/lib/core/classes.js +1 -0
- package/node_modules/@sap/cds/lib/dbs/cds-deploy.js +4 -5
- package/node_modules/@sap/cds/lib/env/cds-env.js +132 -70
- package/node_modules/@sap/cds/lib/env/cds-requires/auth-strategies.js +62 -0
- package/node_modules/@sap/cds/lib/env/cds-requires/databases.js +49 -0
- package/node_modules/@sap/cds/lib/env/cds-requires/embeddings.js +8 -0
- package/node_modules/@sap/cds/lib/env/cds-requires/index.js +27 -0
- package/node_modules/@sap/cds/lib/env/cds-requires/messaging.js +82 -0
- package/node_modules/@sap/cds/lib/env/cds-requires/platform.js +23 -0
- package/node_modules/@sap/cds/lib/env/cds-requires/queues.js +34 -0
- package/node_modules/@sap/cds/lib/env/cds-requires/services.js +32 -0
- package/node_modules/@sap/cds/lib/env/defaults.js +9 -1
- package/node_modules/@sap/cds/lib/i18n/files.js +4 -4
- package/node_modules/@sap/cds/lib/i18n/locale.js +1 -1
- package/node_modules/@sap/cds/lib/index.js +9 -9
- package/node_modules/@sap/cds/lib/log/cds-log.js +3 -3
- package/node_modules/@sap/cds/lib/ql/SELECT.js +2 -0
- package/node_modules/@sap/cds/lib/ql/UPDATE.js +1 -1
- package/node_modules/@sap/cds/lib/ql/cds.ql-Query.js +4 -1
- package/node_modules/@sap/cds/lib/ql/core/@types/cqn.d.ts +146 -0
- package/node_modules/@sap/cds/lib/ql/core/@types/exprs.d.ts +51 -0
- package/node_modules/@sap/cds/lib/ql/core/@types/index.d.ts +29 -0
- package/node_modules/@sap/cds/lib/ql/core/@types/package.json +7 -0
- package/node_modules/@sap/cds/lib/ql/core/@types/ql/delete.d.ts +8 -0
- package/node_modules/@sap/cds/lib/ql/core/@types/ql/insert.d.ts +19 -0
- package/node_modules/@sap/cds/lib/ql/core/@types/ql/select.d.ts +24 -0
- package/node_modules/@sap/cds/lib/ql/core/@types/ql/update.d.ts +10 -0
- package/node_modules/@sap/cds/lib/ql/core/@types/query.d.ts +18 -0
- package/node_modules/@sap/cds/lib/ql/core/cql/parser.min.js +1 -0
- package/node_modules/@sap/cds/lib/ql/core/lib/index.js +69 -0
- package/node_modules/@sap/cds/lib/ql/core/lib/ql/cache.js +34 -0
- package/node_modules/@sap/cds/lib/ql/core/lib/ql/call-action.js +6 -0
- package/node_modules/@sap/cds/lib/ql/core/lib/ql/delete.js +8 -0
- package/node_modules/@sap/cds/lib/ql/core/lib/ql/insert.js +26 -0
- package/node_modules/@sap/cds/lib/ql/core/lib/ql/select.js +22 -0
- package/node_modules/@sap/cds/lib/ql/core/lib/ql/update.js +26 -0
- package/node_modules/@sap/cds/lib/ql/core/lib/query.js +85 -0
- package/node_modules/@sap/cds/lib/ql/core/lib/xl/fluent.js +47 -0
- package/node_modules/@sap/cds/lib/ql/core/lib/xl/ttl.js +24 -0
- package/node_modules/@sap/cds/lib/ql/core/license +201 -0
- package/node_modules/@sap/cds/lib/ql/core/package.json +24 -0
- package/node_modules/@sap/cds/lib/ql/core/readme.md +99 -0
- package/node_modules/@sap/cds/lib/ql/core/upstream.json +5 -0
- package/node_modules/@sap/cds/lib/req/spawn.js +1 -1
- package/node_modules/@sap/cds/lib/srv/bindings.js +111 -115
- package/node_modules/@sap/cds/lib/srv/cds-connect.js +11 -10
- package/node_modules/@sap/cds/lib/srv/cds-serve.js +16 -7
- package/node_modules/@sap/cds/lib/srv/cds.Service.js +13 -7
- package/node_modules/@sap/cds/lib/srv/factory.js +8 -10
- package/node_modules/@sap/cds/lib/srv/middlewares/auth/ias-auth.js +35 -32
- package/node_modules/@sap/cds/lib/srv/middlewares/auth/jwt-auth.js +5 -1
- package/node_modules/@sap/cds/lib/srv/middlewares/auth/mocked-users.js +1 -1
- package/node_modules/@sap/cds/lib/srv/protocols/hcql.js +230 -79
- package/node_modules/@sap/cds/lib/srv/protocols/http.js +7 -3
- package/node_modules/@sap/cds/lib/srv/protocols/index.js +7 -2
- package/node_modules/@sap/cds/lib/srv/srv-dispatch.js +2 -2
- package/node_modules/@sap/cds/lib/utils/cds-utils.js +37 -0
- package/node_modules/@sap/cds/lib/utils/csv-reader.js +2 -2
- package/node_modules/@sap/cds/libx/_runtime/common/generic/assert.js +18 -27
- package/node_modules/@sap/cds/libx/_runtime/common/generic/crud.js +8 -2
- package/node_modules/@sap/cds/libx/_runtime/common/utils/cqn.js +1 -1
- package/node_modules/@sap/cds/libx/_runtime/common/utils/rewriteAsterisks.js +1 -1
- package/node_modules/@sap/cds/libx/_runtime/fiori/lean-draft.js +122 -85
- package/node_modules/@sap/cds/libx/_runtime/messaging/common-utils/authorizedRequest.js +24 -1
- package/node_modules/@sap/cds/libx/_runtime/messaging/common-utils/normalizeIncomingMessage.js +1 -1
- package/node_modules/@sap/cds/libx/_runtime/messaging/kafka.js +1 -1
- package/node_modules/@sap/cds/libx/_runtime/remote/Service.js +2 -2
- package/node_modules/@sap/cds/libx/_runtime/remote/utils/client.js +3 -2
- package/node_modules/@sap/cds/libx/_runtime/remote/utils/query.js +11 -6
- package/node_modules/@sap/cds/libx/http/location.js +10 -11
- package/node_modules/@sap/cds/libx/odata/middleware/create.js +4 -0
- package/node_modules/@sap/cds/libx/odata/middleware/metadata.js +1 -1
- package/node_modules/@sap/cds/libx/odata/middleware/operation.js +3 -0
- package/node_modules/@sap/cds/libx/odata/middleware/parse.js +9 -0
- package/node_modules/@sap/cds/libx/odata/middleware/read.js +7 -1
- package/node_modules/@sap/cds/libx/odata/middleware/update.js +5 -1
- package/node_modules/@sap/cds/libx/odata/parse/afterburner.js +3 -3
- package/node_modules/@sap/cds/libx/odata/parse/multipartToJson.js +1 -1
- package/node_modules/@sap/cds/libx/odata/utils/ieee754.js +20 -0
- package/node_modules/@sap/cds/libx/queue/SchedulingService.js +4 -0
- package/node_modules/@sap/cds/libx/queue/api.js +1 -1
- package/node_modules/@sap/cds/libx/queue/index.js +46 -10
- package/node_modules/@sap/cds/libx/queue/processing.js +52 -16
- package/node_modules/@sap/cds/libx/queue/utils.js +3 -0
- package/node_modules/@sap/cds/libx/rest/RestAdapter.js +1 -0
- package/node_modules/@sap/cds/package.json +2 -2
- package/node_modules/@sap/cds/server.js +1 -0
- package/node_modules/@sap/cds/srv/ucl-service.cds +1 -0
- package/node_modules/@sap/cds/tasks/enterprise-messaging-deploy.js +13 -5
- package/node_modules/@sap/cds-compiler/CHANGELOG.md +83 -0
- package/node_modules/@sap/cds-compiler/bin/cdsse.js +1 -1
- package/node_modules/@sap/cds-compiler/doc/EffectiveCSN.md +3314 -0
- package/node_modules/@sap/cds-compiler/lib/api/main.js +9 -6
- package/node_modules/@sap/cds-compiler/lib/api/options.js +3 -3
- package/node_modules/@sap/cds-compiler/lib/{model → base}/csnUtils.js +5 -5
- package/node_modules/@sap/cds-compiler/lib/base/message-registry.js +54 -6
- package/node_modules/@sap/cds-compiler/lib/base/optionProcessor.js +4 -4
- package/node_modules/@sap/cds-compiler/lib/{model → base}/sortViews.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/checks/assocOutsideService.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/checks/checkForTypes.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/checks/checkPathsInStoredCalcElement.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/checks/elements.js +37 -3
- package/node_modules/@sap/cds-compiler/lib/checks/enricher.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/checks/existsInForbiddenPlaces.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/checks/hasPersistedElements.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/checks/manyExpand.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/checks/manyNavigations.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/checks/onConditions.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/checks/parameters.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/checks/queryNoDbArtifacts.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/checks/selectItems.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/checks/structuredAnnoExpressions.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/checks/typeParameters.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/checks/types.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/checks/validator.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/compiler/assert-consistency.js +20 -12
- package/node_modules/@sap/cds-compiler/lib/compiler/builtins.js +9 -4
- package/node_modules/@sap/cds-compiler/lib/compiler/checks.js +50 -0
- package/node_modules/@sap/cds-compiler/lib/compiler/define.js +303 -323
- package/node_modules/@sap/cds-compiler/lib/compiler/dictionaries.js +5 -0
- package/node_modules/@sap/cds-compiler/lib/compiler/extend.js +1015 -1177
- package/node_modules/@sap/cds-compiler/lib/compiler/generate.js +55 -42
- package/node_modules/@sap/cds-compiler/lib/compiler/populate.js +74 -45
- package/node_modules/@sap/cds-compiler/lib/compiler/propagator.js +1 -0
- package/node_modules/@sap/cds-compiler/lib/compiler/resolve.js +6 -4
- package/node_modules/@sap/cds-compiler/lib/compiler/shared.js +30 -49
- package/node_modules/@sap/cds-compiler/lib/compiler/utils.js +32 -18
- package/node_modules/@sap/cds-compiler/lib/edm/annotations/edmJson.js +3 -3
- package/node_modules/@sap/cds-compiler/lib/edm/annotations/genericTranslation.js +2 -2
- package/node_modules/@sap/cds-compiler/lib/edm/annotations/preprocessAnnotations.js +2 -3
- package/node_modules/@sap/cds-compiler/lib/edm/csn2edm.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/edm/edm.js +6 -7
- package/node_modules/@sap/cds-compiler/lib/edm/edmAnnoPreprocessor.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/edm/edmInboundChecks.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/edm/edmPreprocessor.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/edm/edmUtils.js +12 -7
- package/node_modules/@sap/cds-compiler/lib/gen/CdlGrammar.checksum +1 -1
- package/node_modules/@sap/cds-compiler/lib/gen/CdlParser.js +15 -15
- package/node_modules/@sap/cds-compiler/lib/gen/Dictionary.json +7 -0
- package/node_modules/@sap/cds-compiler/lib/json/from-csn.js +30 -30
- package/node_modules/@sap/cds-compiler/lib/json/to-csn.js +2 -1
- package/node_modules/@sap/cds-compiler/lib/main.js +4 -1
- package/node_modules/@sap/cds-compiler/lib/parsers/AstBuildingParser.js +42 -15
- package/node_modules/@sap/cds-compiler/lib/render/DuplicateChecker.js +37 -11
- package/node_modules/@sap/cds-compiler/lib/render/manageConstraints.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/render/toCdl.js +11 -6
- package/node_modules/@sap/cds-compiler/lib/render/toRename.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/render/toSql.js +74 -24
- package/node_modules/@sap/cds-compiler/lib/render/utils/common.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/render/utils/operators.js +81 -0
- package/node_modules/@sap/cds-compiler/lib/render/utils/sql.js +17 -10
- package/node_modules/@sap/cds-compiler/lib/transform/db/assertUnique.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/transform/db/associations.js +3 -4
- package/node_modules/@sap/cds-compiler/lib/transform/db/assocsToQueries/transformExists.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/transform/db/backlinks.js +2 -2
- package/node_modules/@sap/cds-compiler/lib/transform/db/cdsPersistence.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/transform/db/constraints.js +6 -5
- package/node_modules/@sap/cds-compiler/lib/transform/db/expansion.js +7 -1
- package/node_modules/@sap/cds-compiler/lib/transform/db/flattening.js +2 -2
- package/node_modules/@sap/cds-compiler/lib/{modelCompare/compare.js → transform/db/migration/diffModels.js} +5 -5
- package/node_modules/@sap/cds-compiler/lib/{modelCompare/utils/filter.js → transform/db/migration/filterDiff.js} +2 -2
- package/node_modules/@sap/cds-compiler/lib/transform/db/processSqlServices.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/transform/db/rewriteCalculatedElements.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/transform/db/temporal.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/transform/db/views.js +2 -6
- package/node_modules/@sap/cds-compiler/lib/transform/draft/db.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/transform/draft/odata.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/transform/effective/annotations.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/transform/effective/associations.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/transform/effective/flattening.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/transform/effective/main.js +3 -2
- package/node_modules/@sap/cds-compiler/lib/transform/effective/misc.js +2 -1
- package/node_modules/@sap/cds-compiler/lib/transform/effective/queries.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/transform/effective/types.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/transform/forOdata.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/transform/forRelationalDB.js +9 -4
- package/node_modules/@sap/cds-compiler/lib/transform/localized.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/transform/odata/adaptAnnotationRefs.js +5 -11
- package/node_modules/@sap/cds-compiler/lib/transform/odata/createForeignKeys.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/transform/odata/flattening.js +4 -4
- package/node_modules/@sap/cds-compiler/lib/transform/odata/foreignKeyRefsInXprAnnos.js +5 -3
- package/node_modules/@sap/cds-compiler/lib/transform/odata/toFinalBaseType.js +29 -5
- package/node_modules/@sap/cds-compiler/lib/transform/odata/typesExposure.js +13 -3
- package/node_modules/@sap/cds-compiler/lib/transform/odata/utils.js +9 -0
- package/node_modules/@sap/cds-compiler/lib/transform/transformUtils.js +2 -2
- package/node_modules/@sap/cds-compiler/lib/transform/translateAssocsToJoins.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/transform/tupleExpansion.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/transform/universalCsn/coreComputed.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/transform/universalCsn/universalCsnEnricher.js +1 -1
- package/node_modules/@sap/cds-compiler/lib/transform/universalCsn/utils.js +1 -1
- package/node_modules/@sap/cds-compiler/package.json +1 -1
- package/node_modules/@sap/cds-mtxs/CHANGELOG.md +47 -0
- package/node_modules/@sap/cds-mtxs/bin/cds-mtx-migrate.js +4 -6
- package/node_modules/@sap/cds-mtxs/bin/cds-mtx.js +5 -4
- package/node_modules/@sap/cds-mtxs/cds-plugin.js +38 -2
- package/node_modules/@sap/cds-mtxs/db/t0.cds +7 -0
- package/node_modules/@sap/cds-mtxs/lib/utils.js +129 -20
- package/node_modules/@sap/cds-mtxs/package.json +15 -14
- package/node_modules/@sap/cds-mtxs/srv/cf/abstract-provisioning-service.js +13 -12
- package/node_modules/@sap/cds-mtxs/srv/cf/saas-provisioning-service.cds +1 -0
- package/node_modules/@sap/cds-mtxs/srv/cf/sms-provisioning-service.cds +1 -0
- package/node_modules/@sap/cds-mtxs/srv/extensibility/compat/update.js +5 -2
- package/node_modules/@sap/cds-mtxs/srv/extensibility/linter/config.js +1 -2
- package/node_modules/@sap/cds-mtxs/srv/extensibility/linter/csv-allowlist.js +64 -0
- package/node_modules/@sap/cds-mtxs/srv/extensibility/linter/index.js +4 -2
- package/node_modules/@sap/cds-mtxs/srv/extensibility/linter/protected-namespace.js +67 -5
- package/node_modules/@sap/cds-mtxs/srv/extensibility-service.js +179 -15
- package/node_modules/@sap/cds-mtxs/srv/jobs-service.js +12 -3
- package/node_modules/@sap/cds-mtxs/srv/plugins/common.js +33 -12
- package/node_modules/@sap/cds-mtxs/srv/plugins/hana/ctnr-mgr-base.js +24 -6
- package/node_modules/@sap/cds-mtxs/srv/plugins/hana/hdi-ctnr-mgr.js +3 -1
- package/node_modules/@sap/cds-mtxs/srv/plugins/hana/hdi-native.js +752 -0
- package/node_modules/@sap/cds-mtxs/srv/plugins/hana/serverless.js +17 -20
- package/node_modules/@sap/cds-mtxs/srv/plugins/hana/srv-mgr-v2.js +511 -0
- package/node_modules/@sap/cds-mtxs/srv/plugins/hana/srv-mgr.js +11 -4
- package/node_modules/@sap/cds-mtxs/srv/plugins/hana/tms.js +8 -0
- package/node_modules/@sap/cds-mtxs/srv/plugins/hana.js +27 -18
- package/node_modules/@sap/cds-mtxs/srv/worker/job-worker-pool.js +1 -1
- package/node_modules/@sap/cds-mtxs/srv/worker/job-worker.js +1 -1
- package/node_modules/chownr/LICENSE.md +63 -0
- package/node_modules/chownr/README.md +3 -0
- package/node_modules/chownr/dist/commonjs/index.d.ts +3 -0
- package/node_modules/chownr/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/chownr/dist/commonjs/index.js +93 -0
- package/node_modules/chownr/dist/commonjs/index.js.map +1 -0
- package/node_modules/chownr/dist/commonjs/package.json +3 -0
- package/node_modules/chownr/dist/esm/index.d.ts +3 -0
- package/node_modules/chownr/dist/esm/index.d.ts.map +1 -0
- package/node_modules/chownr/dist/esm/index.js +85 -0
- package/node_modules/chownr/dist/esm/index.js.map +1 -0
- package/node_modules/chownr/dist/esm/package.json +3 -0
- package/node_modules/chownr/package.json +69 -0
- package/node_modules/content-disposition/README.md +105 -35
- package/node_modules/content-disposition/dist/index.d.ts +72 -0
- package/node_modules/content-disposition/dist/index.js +388 -0
- package/node_modules/content-disposition/dist/index.js.map +1 -0
- package/node_modules/content-disposition/package.json +31 -19
- package/node_modules/content-type/README.md +34 -57
- package/node_modules/content-type/package.json +35 -25
- package/node_modules/express/Readme.md +15 -9
- package/node_modules/express/lib/application.js +2 -2
- package/node_modules/express/lib/request.js +32 -19
- package/node_modules/express/lib/response.js +27 -30
- package/node_modules/express/package.json +10 -10
- package/node_modules/handlebars/bin/handlebars +1 -1
- package/node_modules/handlebars/dist/amd/handlebars/base.js +2 -2
- package/node_modules/handlebars/dist/amd/handlebars/compiler/base.js +2 -59
- package/node_modules/handlebars/dist/amd/handlebars/compiler/code-gen.js +68 -5
- package/node_modules/handlebars/dist/amd/handlebars/compiler/compiler.js +160 -19
- package/node_modules/handlebars/dist/amd/handlebars/compiler/javascript-compiler.js +23 -7
- package/node_modules/handlebars/dist/amd/handlebars/compiler/node-types.js +12 -0
- package/node_modules/handlebars/dist/amd/handlebars/compiler/visitor.js +26 -7
- package/node_modules/handlebars/dist/amd/handlebars/compiler/whitespace-control.js +9 -4
- package/node_modules/handlebars/dist/amd/handlebars/exception.js +8 -4
- package/node_modules/handlebars/dist/amd/handlebars/helpers/each.js +40 -14
- package/node_modules/handlebars/dist/amd/handlebars/internal/proto-access.js +21 -1
- package/node_modules/handlebars/dist/amd/handlebars/runtime.js +24 -4
- package/node_modules/handlebars/dist/amd/handlebars/utils.js +4 -3
- package/node_modules/handlebars/dist/amd/precompiler.js +13 -7
- package/node_modules/handlebars/dist/cjs/handlebars/base.js +2 -2
- package/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js +1 -60
- package/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js +64 -4
- package/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js +161 -18
- package/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js +23 -7
- package/node_modules/handlebars/dist/cjs/handlebars/compiler/node-types.js +10 -0
- package/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js +29 -6
- package/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js +9 -4
- package/node_modules/handlebars/dist/cjs/handlebars/exception.js +8 -4
- package/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js +40 -14
- package/node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js +21 -1
- package/node_modules/handlebars/dist/cjs/handlebars/runtime.js +24 -4
- package/node_modules/handlebars/dist/cjs/handlebars/utils.js +4 -3
- package/node_modules/handlebars/dist/cjs/precompiler.js +14 -6
- package/node_modules/handlebars/dist/handlebars.amd.js +401 -130
- package/node_modules/handlebars/dist/handlebars.amd.min.js +4 -4
- package/node_modules/handlebars/dist/handlebars.js +396 -125
- package/node_modules/handlebars/dist/handlebars.min.js +4 -4
- package/node_modules/handlebars/dist/handlebars.runtime.amd.js +100 -29
- package/node_modules/handlebars/dist/handlebars.runtime.amd.min.js +2 -2
- package/node_modules/handlebars/dist/handlebars.runtime.js +94 -23
- package/node_modules/handlebars/dist/handlebars.runtime.min.js +2 -2
- package/node_modules/handlebars/lib/handlebars/base.js +1 -1
- package/node_modules/handlebars/lib/handlebars/compiler/base.js +0 -67
- package/node_modules/handlebars/lib/handlebars/compiler/code-gen.js +65 -11
- package/node_modules/handlebars/lib/handlebars/compiler/compiler.js +164 -23
- package/node_modules/handlebars/lib/handlebars/compiler/javascript-compiler.js +23 -7
- package/node_modules/handlebars/lib/handlebars/compiler/node-types.js +24 -0
- package/node_modules/handlebars/lib/handlebars/compiler/visitor.js +29 -5
- package/node_modules/handlebars/lib/handlebars/compiler/whitespace-control.js +16 -5
- package/node_modules/handlebars/lib/handlebars/exception.js +7 -3
- package/node_modules/handlebars/lib/handlebars/helpers/each.js +39 -16
- package/node_modules/handlebars/lib/handlebars/internal/proto-access.js +22 -0
- package/node_modules/handlebars/lib/handlebars/runtime.js +36 -4
- package/node_modules/handlebars/lib/handlebars/utils.js +3 -2
- package/node_modules/handlebars/lib/precompiler.js +14 -5
- package/node_modules/handlebars/package.json +2 -2
- package/node_modules/handlebars/release-notes.md +20 -1
- package/node_modules/handlebars/types/index.d.ts +8 -0
- package/node_modules/hdb/cfg/VERSION +1 -1
- package/node_modules/hdb/lib/Client.js +6 -2
- package/node_modules/hdb/lib/protocol/ClientInfo.js +28 -15
- package/node_modules/hdb/lib/protocol/Connection.js +30 -3
- package/node_modules/hdb/lib/protocol/Writer.js +2 -2
- package/node_modules/hdb/lib/protocol/common/ConnectOption.js +2 -0
- package/node_modules/hdb/lib/protocol/common/ConnectOptionFlagSet1.js +18 -0
- package/node_modules/hdb/lib/protocol/common/ConnectOptionType.js +2 -0
- package/node_modules/hdb/lib/protocol/common/Constants.js +1 -0
- package/node_modules/hdb/lib/protocol/common/MessageType.js +3 -2
- package/node_modules/hdb/lib/protocol/common/PartKind.js +2 -1
- package/node_modules/hdb/lib/protocol/common/index.js +1 -0
- package/node_modules/hdb/lib/protocol/data/TextList.js +25 -17
- package/node_modules/hdb/lib/protocol/data/index.js +1 -0
- package/node_modules/hdb/lib/protocol/part/ConnectOptions.js +7 -0
- package/node_modules/hdb/lib/protocol/request/index.js +7 -0
- package/node_modules/hdb/package.json +1 -2
- package/node_modules/livereload-js/.github/workflows/main.yml +4 -4
- package/node_modules/livereload-js/README.md +3 -3
- package/node_modules/livereload-js/dist/livereload.js +839 -2742
- package/node_modules/livereload-js/dist/livereload.min.js +1 -1
- package/node_modules/livereload-js/package.json +11 -11
- package/node_modules/minipass/LICENSE.md +55 -0
- package/node_modules/minipass/README.md +825 -0
- package/node_modules/minipass/dist/commonjs/index.d.ts +545 -0
- package/node_modules/minipass/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/minipass/dist/commonjs/index.js +1038 -0
- package/node_modules/minipass/dist/commonjs/index.js.map +1 -0
- package/node_modules/minipass/dist/commonjs/package.json +3 -0
- package/node_modules/minipass/dist/esm/index.d.ts +545 -0
- package/node_modules/minipass/dist/esm/index.d.ts.map +1 -0
- package/node_modules/minipass/dist/esm/index.js +1020 -0
- package/node_modules/minipass/dist/esm/index.js.map +1 -0
- package/node_modules/minipass/dist/esm/package.json +3 -0
- package/node_modules/minipass/package.json +77 -0
- package/node_modules/minizlib/LICENSE +26 -0
- package/node_modules/minizlib/README.md +64 -0
- package/node_modules/minizlib/dist/commonjs/constants.d.ts +2 -0
- package/node_modules/minizlib/dist/commonjs/constants.d.ts.map +1 -0
- package/node_modules/minizlib/dist/commonjs/constants.js +123 -0
- package/node_modules/minizlib/dist/commonjs/constants.js.map +1 -0
- package/node_modules/minizlib/dist/commonjs/index.d.ts +99 -0
- package/node_modules/minizlib/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/minizlib/dist/commonjs/index.js +416 -0
- package/node_modules/minizlib/dist/commonjs/index.js.map +1 -0
- package/node_modules/minizlib/dist/commonjs/package.json +3 -0
- package/node_modules/minizlib/dist/esm/constants.d.ts +2 -0
- package/node_modules/minizlib/dist/esm/constants.d.ts.map +1 -0
- package/node_modules/minizlib/dist/esm/constants.js +117 -0
- package/node_modules/minizlib/dist/esm/constants.js.map +1 -0
- package/node_modules/minizlib/dist/esm/index.d.ts +99 -0
- package/node_modules/minizlib/dist/esm/index.d.ts.map +1 -0
- package/node_modules/minizlib/dist/esm/index.js +363 -0
- package/node_modules/minizlib/dist/esm/index.js.map +1 -0
- package/node_modules/minizlib/dist/esm/package.json +3 -0
- package/node_modules/minizlib/package.json +80 -0
- package/node_modules/proxy-addr/HISTORY.md +60 -54
- package/node_modules/proxy-addr/README.md +1 -1
- package/node_modules/proxy-addr/index.js +32 -0
- package/node_modules/proxy-addr/package.json +8 -4
- package/node_modules/qs/.github/THREAT_MODEL.md +4 -2
- package/node_modules/qs/CHANGELOG.md +38 -14
- package/node_modules/qs/README.md +31 -3
- package/node_modules/qs/dist/qs.js +20 -20
- package/node_modules/qs/lib/parse.js +94 -4
- package/node_modules/qs/lib/stringify.js +4 -4
- package/node_modules/qs/lib/utils.js +130 -6
- package/node_modules/qs/package.json +4 -4
- package/node_modules/qs/test/parse.js +174 -0
- package/node_modules/qs/test/stringify.js +263 -33
- package/node_modules/qs/test/utils.js +184 -0
- package/node_modules/tar/LICENSE.md +55 -0
- package/node_modules/tar/README.md +1233 -0
- package/node_modules/tar/dist/commonjs/create.d.ts +3 -0
- package/node_modules/tar/dist/commonjs/create.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/create.js +82 -0
- package/node_modules/tar/dist/commonjs/create.js.map +1 -0
- package/node_modules/tar/dist/commonjs/cwd-error.d.ts +8 -0
- package/node_modules/tar/dist/commonjs/cwd-error.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/cwd-error.js +18 -0
- package/node_modules/tar/dist/commonjs/cwd-error.js.map +1 -0
- package/node_modules/tar/dist/commonjs/extract.d.ts +3 -0
- package/node_modules/tar/dist/commonjs/extract.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/extract.js +88 -0
- package/node_modules/tar/dist/commonjs/extract.js.map +1 -0
- package/node_modules/tar/dist/commonjs/get-write-flag.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/get-write-flag.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/get-write-flag.js +32 -0
- package/node_modules/tar/dist/commonjs/get-write-flag.js.map +1 -0
- package/node_modules/tar/dist/commonjs/header.d.ts +53 -0
- package/node_modules/tar/dist/commonjs/header.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/header.js +348 -0
- package/node_modules/tar/dist/commonjs/header.js.map +1 -0
- package/node_modules/tar/dist/commonjs/index.d.ts +20 -0
- package/node_modules/tar/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/index.js +64 -0
- package/node_modules/tar/dist/commonjs/index.js.map +1 -0
- package/node_modules/tar/dist/commonjs/index.min.js +4 -0
- package/node_modules/tar/dist/commonjs/index.min.js.map +7 -0
- package/node_modules/tar/dist/commonjs/large-numbers.d.ts +3 -0
- package/node_modules/tar/dist/commonjs/large-numbers.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/large-numbers.js +99 -0
- package/node_modules/tar/dist/commonjs/large-numbers.js.map +1 -0
- package/node_modules/tar/dist/commonjs/list.d.ts +7 -0
- package/node_modules/tar/dist/commonjs/list.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/list.js +153 -0
- package/node_modules/tar/dist/commonjs/list.js.map +1 -0
- package/node_modules/tar/dist/commonjs/make-command.d.ts +49 -0
- package/node_modules/tar/dist/commonjs/make-command.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/make-command.js +52 -0
- package/node_modules/tar/dist/commonjs/make-command.js.map +1 -0
- package/node_modules/tar/dist/commonjs/mkdir.d.ts +25 -0
- package/node_modules/tar/dist/commonjs/mkdir.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/mkdir.js +187 -0
- package/node_modules/tar/dist/commonjs/mkdir.js.map +1 -0
- package/node_modules/tar/dist/commonjs/mode-fix.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/mode-fix.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/mode-fix.js +29 -0
- package/node_modules/tar/dist/commonjs/mode-fix.js.map +1 -0
- package/node_modules/tar/dist/commonjs/normalize-unicode.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/normalize-unicode.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/normalize-unicode.js +38 -0
- package/node_modules/tar/dist/commonjs/normalize-unicode.js.map +1 -0
- package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/normalize-windows-path.js +12 -0
- package/node_modules/tar/dist/commonjs/normalize-windows-path.js.map +1 -0
- package/node_modules/tar/dist/commonjs/options.d.ts +604 -0
- package/node_modules/tar/dist/commonjs/options.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/options.js +66 -0
- package/node_modules/tar/dist/commonjs/options.js.map +1 -0
- package/node_modules/tar/dist/commonjs/pack.d.ts +105 -0
- package/node_modules/tar/dist/commonjs/pack.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/pack.js +544 -0
- package/node_modules/tar/dist/commonjs/pack.js.map +1 -0
- package/node_modules/tar/dist/commonjs/package.json +3 -0
- package/node_modules/tar/dist/commonjs/parse.d.ts +92 -0
- package/node_modules/tar/dist/commonjs/parse.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/parse.js +655 -0
- package/node_modules/tar/dist/commonjs/parse.js.map +1 -0
- package/node_modules/tar/dist/commonjs/path-reservations.d.ts +11 -0
- package/node_modules/tar/dist/commonjs/path-reservations.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/path-reservations.js +170 -0
- package/node_modules/tar/dist/commonjs/path-reservations.js.map +1 -0
- package/node_modules/tar/dist/commonjs/pax.d.ts +26 -0
- package/node_modules/tar/dist/commonjs/pax.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/pax.js +182 -0
- package/node_modules/tar/dist/commonjs/pax.js.map +1 -0
- package/node_modules/tar/dist/commonjs/process-umask.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/process-umask.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/process-umask.js +7 -0
- package/node_modules/tar/dist/commonjs/process-umask.js.map +1 -0
- package/node_modules/tar/dist/commonjs/read-entry.d.ts +36 -0
- package/node_modules/tar/dist/commonjs/read-entry.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/read-entry.js +136 -0
- package/node_modules/tar/dist/commonjs/read-entry.js.map +1 -0
- package/node_modules/tar/dist/commonjs/replace.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/replace.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/replace.js +227 -0
- package/node_modules/tar/dist/commonjs/replace.js.map +1 -0
- package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/strip-absolute-path.js +29 -0
- package/node_modules/tar/dist/commonjs/strip-absolute-path.js.map +1 -0
- package/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/strip-trailing-slashes.js +18 -0
- package/node_modules/tar/dist/commonjs/strip-trailing-slashes.js.map +1 -0
- package/node_modules/tar/dist/commonjs/symlink-error.d.ts +9 -0
- package/node_modules/tar/dist/commonjs/symlink-error.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/symlink-error.js +19 -0
- package/node_modules/tar/dist/commonjs/symlink-error.js.map +1 -0
- package/node_modules/tar/dist/commonjs/types.d.ts +16 -0
- package/node_modules/tar/dist/commonjs/types.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/types.js +70 -0
- package/node_modules/tar/dist/commonjs/types.js.map +1 -0
- package/node_modules/tar/dist/commonjs/unpack.d.ts +101 -0
- package/node_modules/tar/dist/commonjs/unpack.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/unpack.js +932 -0
- package/node_modules/tar/dist/commonjs/unpack.js.map +1 -0
- package/node_modules/tar/dist/commonjs/update.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/update.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/update.js +33 -0
- package/node_modules/tar/dist/commonjs/update.js.map +1 -0
- package/node_modules/tar/dist/commonjs/warn-method.d.ts +24 -0
- package/node_modules/tar/dist/commonjs/warn-method.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/warn-method.js +31 -0
- package/node_modules/tar/dist/commonjs/warn-method.js.map +1 -0
- package/node_modules/tar/dist/commonjs/winchars.d.ts +3 -0
- package/node_modules/tar/dist/commonjs/winchars.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/winchars.js +14 -0
- package/node_modules/tar/dist/commonjs/winchars.js.map +1 -0
- package/node_modules/tar/dist/commonjs/write-entry.d.ts +129 -0
- package/node_modules/tar/dist/commonjs/write-entry.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/write-entry.js +698 -0
- package/node_modules/tar/dist/commonjs/write-entry.js.map +1 -0
- package/node_modules/tar/dist/esm/create.d.ts +3 -0
- package/node_modules/tar/dist/esm/create.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/create.js +76 -0
- package/node_modules/tar/dist/esm/create.js.map +1 -0
- package/node_modules/tar/dist/esm/cwd-error.d.ts +8 -0
- package/node_modules/tar/dist/esm/cwd-error.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/cwd-error.js +14 -0
- package/node_modules/tar/dist/esm/cwd-error.js.map +1 -0
- package/node_modules/tar/dist/esm/extract.d.ts +3 -0
- package/node_modules/tar/dist/esm/extract.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/extract.js +49 -0
- package/node_modules/tar/dist/esm/extract.js.map +1 -0
- package/node_modules/tar/dist/esm/get-write-flag.d.ts +2 -0
- package/node_modules/tar/dist/esm/get-write-flag.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/get-write-flag.js +26 -0
- package/node_modules/tar/dist/esm/get-write-flag.js.map +1 -0
- package/node_modules/tar/dist/esm/header.d.ts +53 -0
- package/node_modules/tar/dist/esm/header.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/header.js +311 -0
- package/node_modules/tar/dist/esm/header.js.map +1 -0
- package/node_modules/tar/dist/esm/index.d.ts +20 -0
- package/node_modules/tar/dist/esm/index.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/index.js +20 -0
- package/node_modules/tar/dist/esm/index.js.map +1 -0
- package/node_modules/tar/dist/esm/index.min.js +4 -0
- package/node_modules/tar/dist/esm/index.min.js.map +7 -0
- package/node_modules/tar/dist/esm/large-numbers.d.ts +3 -0
- package/node_modules/tar/dist/esm/large-numbers.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/large-numbers.js +94 -0
- package/node_modules/tar/dist/esm/large-numbers.js.map +1 -0
- package/node_modules/tar/dist/esm/list.d.ts +7 -0
- package/node_modules/tar/dist/esm/list.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/list.js +113 -0
- package/node_modules/tar/dist/esm/list.js.map +1 -0
- package/node_modules/tar/dist/esm/make-command.d.ts +49 -0
- package/node_modules/tar/dist/esm/make-command.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/make-command.js +48 -0
- package/node_modules/tar/dist/esm/make-command.js.map +1 -0
- package/node_modules/tar/dist/esm/mkdir.d.ts +25 -0
- package/node_modules/tar/dist/esm/mkdir.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/mkdir.js +179 -0
- package/node_modules/tar/dist/esm/mkdir.js.map +1 -0
- package/node_modules/tar/dist/esm/mode-fix.d.ts +2 -0
- package/node_modules/tar/dist/esm/mode-fix.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/mode-fix.js +25 -0
- package/node_modules/tar/dist/esm/mode-fix.js.map +1 -0
- package/node_modules/tar/dist/esm/normalize-unicode.d.ts +2 -0
- package/node_modules/tar/dist/esm/normalize-unicode.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/normalize-unicode.js +34 -0
- package/node_modules/tar/dist/esm/normalize-unicode.js.map +1 -0
- package/node_modules/tar/dist/esm/normalize-windows-path.d.ts +2 -0
- package/node_modules/tar/dist/esm/normalize-windows-path.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/normalize-windows-path.js +9 -0
- package/node_modules/tar/dist/esm/normalize-windows-path.js.map +1 -0
- package/node_modules/tar/dist/esm/options.d.ts +604 -0
- package/node_modules/tar/dist/esm/options.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/options.js +54 -0
- package/node_modules/tar/dist/esm/options.js.map +1 -0
- package/node_modules/tar/dist/esm/pack.d.ts +105 -0
- package/node_modules/tar/dist/esm/pack.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/pack.js +502 -0
- package/node_modules/tar/dist/esm/pack.js.map +1 -0
- package/node_modules/tar/dist/esm/package.json +3 -0
- package/node_modules/tar/dist/esm/parse.d.ts +92 -0
- package/node_modules/tar/dist/esm/parse.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/parse.js +651 -0
- package/node_modules/tar/dist/esm/parse.js.map +1 -0
- package/node_modules/tar/dist/esm/path-reservations.d.ts +11 -0
- package/node_modules/tar/dist/esm/path-reservations.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/path-reservations.js +166 -0
- package/node_modules/tar/dist/esm/path-reservations.js.map +1 -0
- package/node_modules/tar/dist/esm/pax.d.ts +26 -0
- package/node_modules/tar/dist/esm/pax.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/pax.js +178 -0
- package/node_modules/tar/dist/esm/pax.js.map +1 -0
- package/node_modules/tar/dist/esm/process-umask.d.ts +2 -0
- package/node_modules/tar/dist/esm/process-umask.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/process-umask.js +3 -0
- package/node_modules/tar/dist/esm/process-umask.js.map +1 -0
- package/node_modules/tar/dist/esm/read-entry.d.ts +36 -0
- package/node_modules/tar/dist/esm/read-entry.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/read-entry.js +132 -0
- package/node_modules/tar/dist/esm/read-entry.js.map +1 -0
- package/node_modules/tar/dist/esm/replace.d.ts +2 -0
- package/node_modules/tar/dist/esm/replace.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/replace.js +221 -0
- package/node_modules/tar/dist/esm/replace.js.map +1 -0
- package/node_modules/tar/dist/esm/strip-absolute-path.d.ts +2 -0
- package/node_modules/tar/dist/esm/strip-absolute-path.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/strip-absolute-path.js +25 -0
- package/node_modules/tar/dist/esm/strip-absolute-path.js.map +1 -0
- package/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts +2 -0
- package/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/strip-trailing-slashes.js +14 -0
- package/node_modules/tar/dist/esm/strip-trailing-slashes.js.map +1 -0
- package/node_modules/tar/dist/esm/symlink-error.d.ts +9 -0
- package/node_modules/tar/dist/esm/symlink-error.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/symlink-error.js +15 -0
- package/node_modules/tar/dist/esm/symlink-error.js.map +1 -0
- package/node_modules/tar/dist/esm/types.d.ts +16 -0
- package/node_modules/tar/dist/esm/types.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/types.js +65 -0
- package/node_modules/tar/dist/esm/types.js.map +1 -0
- package/node_modules/tar/dist/esm/unpack.d.ts +101 -0
- package/node_modules/tar/dist/esm/unpack.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/unpack.js +891 -0
- package/node_modules/tar/dist/esm/unpack.js.map +1 -0
- package/node_modules/tar/dist/esm/update.d.ts +2 -0
- package/node_modules/tar/dist/esm/update.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/update.js +30 -0
- package/node_modules/tar/dist/esm/update.js.map +1 -0
- package/node_modules/tar/dist/esm/warn-method.d.ts +24 -0
- package/node_modules/tar/dist/esm/warn-method.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/warn-method.js +27 -0
- package/node_modules/tar/dist/esm/warn-method.js.map +1 -0
- package/node_modules/tar/dist/esm/winchars.d.ts +3 -0
- package/node_modules/tar/dist/esm/winchars.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/winchars.js +9 -0
- package/node_modules/tar/dist/esm/winchars.js.map +1 -0
- package/node_modules/tar/dist/esm/write-entry.d.ts +129 -0
- package/node_modules/tar/dist/esm/write-entry.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/write-entry.js +656 -0
- package/node_modules/tar/dist/esm/write-entry.js.map +1 -0
- package/node_modules/tar/package.json +298 -0
- package/node_modules/ws/lib/websocket.js +17 -3
- package/node_modules/ws/package.json +1 -1
- package/node_modules/yallist/LICENSE.md +63 -0
- package/node_modules/yallist/README.md +205 -0
- package/node_modules/yallist/dist/commonjs/index.d.ts +39 -0
- package/node_modules/yallist/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/yallist/dist/commonjs/index.js +384 -0
- package/node_modules/yallist/dist/commonjs/index.js.map +1 -0
- package/node_modules/yallist/dist/commonjs/package.json +3 -0
- package/node_modules/yallist/dist/esm/index.d.ts +39 -0
- package/node_modules/yallist/dist/esm/index.d.ts.map +1 -0
- package/node_modules/yallist/dist/esm/index.js +379 -0
- package/node_modules/yallist/dist/esm/index.js.map +1 -0
- package/node_modules/yallist/dist/esm/package.json +3 -0
- package/node_modules/yallist/package.json +68 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +19 -18
- package/node_modules/yaml/browser/dist/nodes/Alias.js +25 -23
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +19 -18
- package/node_modules/yaml/dist/nodes/Alias.js +25 -23
- package/node_modules/yaml/package.json +1 -1
- package/package.json +7 -1
- package/bin/completion/templates/cds-tmpl.fish +0 -65
- package/bin/completion/templates/cds-tmpl.ps1 +0 -217
- package/bin/completion/templates/cds-tmpl.sh +0 -93
- package/bin/completion/templates/cds-tmpl.zsh +0 -74
- package/node_modules/@cap-js/db-service/lib/recursion-guard.js +0 -40
- package/node_modules/@sap/cds/lib/env/cds-requires.js +0 -326
- package/node_modules/@sap/cds-mtxs/srv/bootstrap.cds +0 -2
- package/node_modules/@sap/cds-mtxs/srv/bootstrap.js +0 -33
- package/node_modules/body-parser/node_modules/content-type/LICENSE +0 -22
- package/node_modules/body-parser/node_modules/content-type/README.md +0 -71
- package/node_modules/body-parser/node_modules/content-type/package.json +0 -52
- package/node_modules/content-disposition/index.js +0 -536
- package/node_modules/content-type/HISTORY.md +0 -29
- package/node_modules/content-type/index.js +0 -225
- package/node_modules/negotiator/node_modules/content-type/LICENSE +0 -22
- package/node_modules/negotiator/node_modules/content-type/README.md +0 -71
- package/node_modules/negotiator/node_modules/content-type/dist/index.d.ts +0 -46
- package/node_modules/negotiator/node_modules/content-type/dist/index.js +0 -176
- package/node_modules/negotiator/node_modules/content-type/dist/index.js.map +0 -1
- package/node_modules/negotiator/node_modules/content-type/package.json +0 -52
- package/node_modules/type-is/node_modules/content-type/LICENSE +0 -22
- package/node_modules/type-is/node_modules/content-type/README.md +0 -71
- package/node_modules/type-is/node_modules/content-type/dist/index.d.ts +0 -46
- package/node_modules/type-is/node_modules/content-type/dist/index.js +0 -176
- package/node_modules/type-is/node_modules/content-type/dist/index.js.map +0 -1
- package/node_modules/type-is/node_modules/content-type/package.json +0 -52
- /package/lib/init/template/react/files/{vite.config.js.hbs → vite.config.{{extension}}.hbs} +0 -0
- /package/lib/init/template/vue/files/src/{main.js → main.{{extension}}.hbs} +0 -0
- /package/lib/init/template/vue/files/{vite.config.js.hbs → vite.config.{{extension}}.hbs} +0 -0
- /package/{lib/import/openapi → node_modules/@cap-js/openapi/lib/import}/utilities.js +0 -0
- /package/node_modules/{body-parser/node_modules/content-type → content-type}/dist/index.d.ts +0 -0
- /package/node_modules/{body-parser/node_modules/content-type → content-type}/dist/index.js +0 -0
- /package/node_modules/{body-parser/node_modules/content-type → content-type}/dist/index.js.map +0 -0
|
@@ -16,10 +16,10 @@ const tenant = lazyload('../transform/addTenantFields');
|
|
|
16
16
|
const toSql = lazyload('../render/toSql');
|
|
17
17
|
const toCdl = require('../render/toCdl');
|
|
18
18
|
const sqlRenderUtils = lazyload('../render/utils/sql');
|
|
19
|
-
const modelCompare = lazyload('../
|
|
20
|
-
const diffFilter = lazyload('../
|
|
21
|
-
const sortViews = lazyload('../
|
|
22
|
-
const csnUtils = lazyload('../
|
|
19
|
+
const modelCompare = lazyload('../transform/db/migration/diffModels');
|
|
20
|
+
const diffFilter = lazyload('../transform/db/migration/filterDiff');
|
|
21
|
+
const sortViews = lazyload('../base/sortViews');
|
|
22
|
+
const csnUtils = lazyload('../base/csnUtils');
|
|
23
23
|
const timetrace = lazyload('../utils/timetrace');
|
|
24
24
|
const forRelationalDB = lazyload('../transform/forRelationalDB');
|
|
25
25
|
const sqlUtils = lazyload('../render/utils/sql');
|
|
@@ -1164,8 +1164,11 @@ function publishCsnProcessor( processor, _name ) {
|
|
|
1164
1164
|
'CSN input had to be recompiled' );
|
|
1165
1165
|
if (options.internalMsg || options.testMode)
|
|
1166
1166
|
recompileMsg.error = err; // Attach original error;
|
|
1167
|
-
if (options.testMode) // Attach recompilation reason in testMode
|
|
1168
|
-
|
|
1167
|
+
if (options.testMode) { // Attach recompilation reason in testMode
|
|
1168
|
+
// Omit shuffle-dependent query-property enumeration to keep ref files stable.
|
|
1169
|
+
const cause = err.message.replace( /(elements not available): .*/, '$1' );
|
|
1170
|
+
recompileMsg.message += `\n ↳ cause: ${ cause }`;
|
|
1171
|
+
}
|
|
1169
1172
|
|
|
1170
1173
|
const xsn = compiler.recompileX(csn, options);
|
|
1171
1174
|
const recompiledCsn = toCsn.compactModel(xsn);
|
|
@@ -37,7 +37,7 @@ const publicOptionsNewAPI = [
|
|
|
37
37
|
'magicVars', // deprecated, not removed in v3 as we have specific error messages for it
|
|
38
38
|
'variableReplacements',
|
|
39
39
|
'pre2134ReferentialConstraintNames',
|
|
40
|
-
'
|
|
40
|
+
'draft_admin_integrity',
|
|
41
41
|
'betterSqliteSessionVariables',
|
|
42
42
|
'decimal_affinity',
|
|
43
43
|
'withHanaAssociations',
|
|
@@ -194,7 +194,7 @@ module.exports = {
|
|
|
194
194
|
booleanEquality: true,
|
|
195
195
|
dollarNowAsTimestamp: false,
|
|
196
196
|
decimal_affinity: 'real',
|
|
197
|
-
|
|
197
|
+
draft_admin_integrity: false,
|
|
198
198
|
};
|
|
199
199
|
const processed = translateOptions(options, defaultOptions, hardOptions, {}, [ 'sql-dialect-and-naming' ], 'to.sql');
|
|
200
200
|
|
|
@@ -209,7 +209,7 @@ module.exports = {
|
|
|
209
209
|
withHanaAssociations: false,
|
|
210
210
|
booleanEquality: true,
|
|
211
211
|
dollarNowAsTimestamp: false,
|
|
212
|
-
|
|
212
|
+
draft_admin_integrity: false,
|
|
213
213
|
};
|
|
214
214
|
return translateOptions(options, defaultOptions, hardOptions, { sqlDialect: generateStringValidator([ 'hana' ]) }, undefined, 'to.hdi');
|
|
215
215
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const { csnRefs, implicitAs, pathId } = require('
|
|
3
|
+
const { csnRefs, implicitAs, pathId } = require('./csnRefs');
|
|
4
4
|
const {
|
|
5
5
|
transformExpression,
|
|
6
6
|
transformAnnotationExpression,
|
|
@@ -10,11 +10,11 @@ const {
|
|
|
10
10
|
mergeTransformers,
|
|
11
11
|
isSimpleAnnoExprRef,
|
|
12
12
|
} = require('../transform/db/applyTransformations');
|
|
13
|
-
const { isBuiltinType, isAnnotationExpression, primaryExprProperties } = require('
|
|
14
|
-
const { ModelError, CompilerAssertion } = require('
|
|
13
|
+
const { isBuiltinType, isAnnotationExpression, primaryExprProperties } = require('./builtins');
|
|
14
|
+
const { ModelError, CompilerAssertion } = require('./error');
|
|
15
15
|
const { typeParameters } = require('../compiler/builtins');
|
|
16
16
|
const { forEach } = require('../utils/objectUtils');
|
|
17
|
-
const { cloneAnnotationValue } = require('
|
|
17
|
+
const { cloneAnnotationValue } = require('./cloneCsn');
|
|
18
18
|
|
|
19
19
|
// Low-level utility functions to work with compact CSN.
|
|
20
20
|
|
|
@@ -281,7 +281,7 @@ function getUtils( model, universalReady ) {
|
|
|
281
281
|
* @param {string} name Absolute name of artifact
|
|
282
282
|
*/
|
|
283
283
|
function getContextOfArtifact( name ) {
|
|
284
|
-
let lastDotIdx
|
|
284
|
+
let lastDotIdx;
|
|
285
285
|
while (model.definitions[name]) {
|
|
286
286
|
if (model.definitions[name].kind === 'context' || model.definitions[name].kind === 'service')
|
|
287
287
|
return name;
|
|
@@ -97,16 +97,20 @@ const centralMessages = {
|
|
|
97
97
|
'ext-undefined-def-sec': { severity: 'Error', configurableFor: true }, // … annotate statement
|
|
98
98
|
'ext-undefined-element': { severity: 'Warning' },
|
|
99
99
|
'ext-undefined-key': { severity: 'Warning' },
|
|
100
|
+
'ext-undefined-key-sec': { severity: 'Error', configurableFor: true },
|
|
100
101
|
'ext-undefined-param': { severity: 'Warning' },
|
|
101
102
|
'ext-undefined-element-sec': { severity: 'Error', configurableFor: true }, // for security-relevant…
|
|
103
|
+
'extend-undefined': { severity: 'Error' },
|
|
102
104
|
'ext-undefined-action-sec': { severity: 'Error', configurableFor: true }, // for security-relevant…
|
|
103
105
|
'ext-undefined-param-sec': { severity: 'Error', configurableFor: true }, // … annotate statement
|
|
106
|
+
'ext-unexpected-builtin': { severity: 'Warning', errorFor: [ 'v8' ] },
|
|
104
107
|
'ext-unexpected-type-property': { severity: 'Error', configurableFor: 'before_v8' },
|
|
105
108
|
'ext-unexpected-returns': { severity: 'Warning' },
|
|
106
109
|
'ext-unexpected-returns-sec': { severity: 'Error', configurableFor: true }, // … annotate statement
|
|
107
|
-
'anno-unexpected-ellipsis': { severity: 'Error', configurableFor: '
|
|
110
|
+
'anno-unexpected-ellipsis': { severity: 'Error', configurableFor: 'deprecated_before_v8' },
|
|
108
111
|
'anno-unexpected-localized-skip': { severity: 'Error', configurableFor: true },
|
|
109
112
|
|
|
113
|
+
'name-duplicate-artifact-exists': { severity: 'Warning', errorFor: [ 'v8' ] },
|
|
110
114
|
'name-invalid-dollar-alias': { severity: 'Error', configurableFor: true },
|
|
111
115
|
'name-deprecated-$self': { severity: 'Error' },
|
|
112
116
|
|
|
@@ -158,12 +162,15 @@ const centralMessages = {
|
|
|
158
162
|
|
|
159
163
|
'ext-duplicate-extend-type': { severity: 'Error' },
|
|
160
164
|
'ext-duplicate-extend-type-unrelated-layer': { severity: 'Error', configurableFor: true },
|
|
165
|
+
'ext-duplicate-includes': { severity: 'Warning' },
|
|
166
|
+
'ext-unstable-includes': { severity: 'Warning' },
|
|
161
167
|
|
|
162
168
|
'param-default': { severity: 'Error' }, // not supported yet
|
|
163
169
|
|
|
164
170
|
'query-ignoring-param-nullability': { severity: 'Info' },
|
|
165
171
|
'query-expected-identifier': { severity: 'Error' },
|
|
166
172
|
'query-invalid-identifier': { severity: 'Warning' },
|
|
173
|
+
'query-duplicate-reference': { severity: 'Warning' },
|
|
167
174
|
|
|
168
175
|
'recalculated-localized': { severity: 'Info' }, // KEEP: Downgrade in lib/transform/translateAssocsToJoins.js
|
|
169
176
|
'redirected-implicitly-ambiguous': { severity: 'Error', configurableFor: true }, // does not hurt us - TODO: ref-ambiguous-target
|
|
@@ -390,6 +397,10 @@ const centralMessageTexts = {
|
|
|
390
397
|
std: 'Duplicate assignment with $(ANNO)',
|
|
391
398
|
doc: 'Duplicate assignment with a doc comment',
|
|
392
399
|
},
|
|
400
|
+
'anno-duplicate-equal': {
|
|
401
|
+
std: 'Duplicate assignment with $(ANNO) (values are equal)',
|
|
402
|
+
doc: 'Duplicate assignment with a doc comment (values are equal)',
|
|
403
|
+
},
|
|
393
404
|
'anno-duplicate-same-file': {
|
|
394
405
|
std: 'Duplicate assignment with $(ANNO), using last',
|
|
395
406
|
doc: 'Duplicate assignment with a doc comment, using last',
|
|
@@ -427,6 +438,9 @@ const centralMessageTexts = {
|
|
|
427
438
|
'flatten-fkey-gen': 'Duplicate definition of foreign key element $(NAME) for association $(ART)',
|
|
428
439
|
'flatten-fkey-exists': 'Generated foreign key element $(NAME) for association $(ART) conflicts with existing element',
|
|
429
440
|
},
|
|
441
|
+
'name-duplicate-artifact-exists': {
|
|
442
|
+
std: 'Artifact name can\'t be mapped to a SQL compliant identifier in naming mode $(PROP) because it conflicts with existing definition $(NAME)',
|
|
443
|
+
},
|
|
430
444
|
'name-invalid-dollar-alias': {
|
|
431
445
|
std: 'An alias name starting with $(NAME) might shadow a special variable; replace by another name',
|
|
432
446
|
$tableAlias: 'A table alias name must not start with $(NAME); choose another name',
|
|
@@ -501,6 +515,7 @@ const centralMessageTexts = {
|
|
|
501
515
|
'syntax-unexpected-ellipsis': {
|
|
502
516
|
std: 'Unexpected array item $(CODE)',
|
|
503
517
|
duplicate: 'Unexpected array item $(CODE) after previous $(CODE) without $(KEYWORD)',
|
|
518
|
+
definition: 'Unexpected array item $(CODE) in the annotation value on a definition',
|
|
504
519
|
'csn-duplicate': 'Unexpected object with property $(PROP) after previous array item $(CODE)',
|
|
505
520
|
'csn-nested': 'Unexpected object with property $(PROP) in nested array',
|
|
506
521
|
},
|
|
@@ -1002,7 +1017,26 @@ const centralMessageTexts = {
|
|
|
1002
1017
|
returns: 'The return value has no element $(NAME)',
|
|
1003
1018
|
'enum-returns': 'The return value has no enum $(NAME)',
|
|
1004
1019
|
},
|
|
1005
|
-
'
|
|
1020
|
+
'def-unexpected-elements': 'Elements only exist in entities, types or typed constructs',
|
|
1021
|
+
'anno-unexpected-elements': {
|
|
1022
|
+
std: 'Elements only exist in entities, types or typed constructs',
|
|
1023
|
+
entity: 'Elements of parameters can\'t be annotated if they use an entity as type',
|
|
1024
|
+
},
|
|
1025
|
+
'def-unexpected-enum': 'Enum symbols can only be defined for types or typed constructs',
|
|
1026
|
+
'extend-type': 'Only structures or enum types can be extended with elements/enums',
|
|
1027
|
+
// for extensions
|
|
1028
|
+
'extend-undefined': { // TODO: better id (and texts)
|
|
1029
|
+
std: 'Artifact $(ART) does not have a member $(NAME) - nothing to extend',
|
|
1030
|
+
element: 'Artifact $(ART) has no element or enum $(NAME) - nothing to extend',
|
|
1031
|
+
returns: 'Artifact $(ART) has no element or enum $(NAME) - nothing to extend',
|
|
1032
|
+
enum: 'Artifact $(ART) has no element or enum $(NAME) - nothing to extend',
|
|
1033
|
+
'enum-returns': 'Artifact $(ART) has no element or enum $(NAME) - nothing to extend',
|
|
1034
|
+
},
|
|
1035
|
+
'ext-undefined-key': {
|
|
1036
|
+
std: 'Foreign key $(NAME) has not been found',
|
|
1037
|
+
dict: 'An unmanaged association has no foreign keys to annotate',
|
|
1038
|
+
},
|
|
1039
|
+
'ext-undefined-key-sec': 'Foreign key $(NAME) has not been found',
|
|
1006
1040
|
'ext-undefined-action': {
|
|
1007
1041
|
std: 'Action $(NAME) has not been found',
|
|
1008
1042
|
},
|
|
@@ -1027,6 +1061,10 @@ const centralMessageTexts = {
|
|
|
1027
1061
|
// function without `returns` can happen via CSN input! TODO: check in parser
|
|
1028
1062
|
function: 'Unexpected $(KEYWORD) for function without return parameter',
|
|
1029
1063
|
},
|
|
1064
|
+
'ext-unexpected-element': {
|
|
1065
|
+
std: 'Use $(CODE) when extending enums; $(NAMES) are certainly no enum symbols',
|
|
1066
|
+
one: 'Use $(CODE) when extending enums; $(NAMES) is certainly no enum symbol',
|
|
1067
|
+
},
|
|
1030
1068
|
|
|
1031
1069
|
// annotation checks against their definition
|
|
1032
1070
|
'anno-expecting-value': {
|
|
@@ -1096,8 +1134,9 @@ const centralMessageTexts = {
|
|
|
1096
1134
|
'def-invalid-texts-aspect': {
|
|
1097
1135
|
std: '$(ART) is not valid', // unused
|
|
1098
1136
|
'no-aspect': '$(ART) must be an aspect with elements',
|
|
1099
|
-
key: 'Element $(NAME) of $(ART) must be a key',
|
|
1100
1137
|
missing: '$(ART) must have a direct element $(NAME)',
|
|
1138
|
+
key: 'Element $(NAME) of $(ART) must be a key',
|
|
1139
|
+
language: '$(ART) must not have an element $(NAME) when option $(OPTION) is set',
|
|
1101
1140
|
},
|
|
1102
1141
|
'def-invalid-element-type': {
|
|
1103
1142
|
std: 'Element $(ELEMREF) of $(ART) must be of type $(TYPE)',
|
|
@@ -1170,7 +1209,7 @@ const centralMessageTexts = {
|
|
|
1170
1209
|
},
|
|
1171
1210
|
'ref-invalid-include': {
|
|
1172
1211
|
std: 'An explicitly structured entity, type, aspect, or event is expected here',
|
|
1173
|
-
bare : 'An aspect
|
|
1212
|
+
bare : 'An aspect with just annotations is expected here',
|
|
1174
1213
|
param: 'A type, entity, aspect or event without parameters is expected here',
|
|
1175
1214
|
},
|
|
1176
1215
|
'ref-invalid-type': {
|
|
@@ -1229,11 +1268,20 @@ const centralMessageTexts = {
|
|
|
1229
1268
|
},
|
|
1230
1269
|
'ext-unexpected-sql-clause': 'Artifact $(ART) can\'t be extended with a $(KEYWORD) clause, because it already exists',
|
|
1231
1270
|
'extend-repeated-intralayer': 'Unstable element order due to repeated extensions in same layer',
|
|
1232
|
-
'extend-unexpected-include':
|
|
1233
|
-
|
|
1271
|
+
'extend-unexpected-include': {
|
|
1272
|
+
std: 'Can\'t extend this artifact with any include',
|
|
1273
|
+
service: 'Can\'t extend this service with any include',
|
|
1274
|
+
context: 'Can\'t extend this context with any include',
|
|
1275
|
+
action: 'Can\'t extend this action with any include',
|
|
1276
|
+
function: 'Can\'t extend this function with any include',
|
|
1277
|
+
annotation: 'Can\'t extend this annotation definition with any include',
|
|
1278
|
+
},
|
|
1234
1279
|
'ext-duplicate-same-file': 'Duplicate extension with $(PROP) in same file',
|
|
1235
1280
|
'ext-duplicate-extend-type': 'Duplicate type extension for type $(TYPE)',
|
|
1236
1281
|
'ext-duplicate-extend-type-unrelated-layer': 'Duplicate type extension for type $(TYPE)',
|
|
1282
|
+
'ext-duplicate-includes': 'Some other extension also adds includes to $(TYPE); better combine this extension with it',
|
|
1283
|
+
'ext-unstable-includes': 'Some other extension also adds includes to $(TYPE); they might be applied in different order on a different installation',
|
|
1284
|
+
|
|
1237
1285
|
'ext-invalid-type-property': {
|
|
1238
1286
|
std: 'Type property $(PROP) can only be extended',
|
|
1239
1287
|
indirect: 'Type property $(PROP) can only be extended if directly provided at the definition',
|
|
@@ -303,7 +303,7 @@ optionProcessor.command('Q, toSql')
|
|
|
303
303
|
.option(' --assert-integrity-type <type>', { valid: [ 'RT', 'DB' ], ignoreCase: true })
|
|
304
304
|
.option(' --constraints-in-create-table')
|
|
305
305
|
.option(' --pre2134ReferentialConstraintNames')
|
|
306
|
-
.option(' --draft-admin-
|
|
306
|
+
.option(' --draft-admin-integrity', { optionName: 'draft_admin_integrity' })
|
|
307
307
|
.option(' --disable-hana-comments')
|
|
308
308
|
.option(' --generated-by-comment')
|
|
309
309
|
.option(' --better-sqlite-session-variables <bool>')
|
|
@@ -360,9 +360,9 @@ optionProcessor.command('Q, toSql')
|
|
|
360
360
|
part of the "CREATE TABLE" statements rather than as separate
|
|
361
361
|
"ALTER TABLE ADD CONSTRAINT" statements
|
|
362
362
|
--pre2134ReferentialConstraintNames Do not prefix the constraint identifier with "c__"
|
|
363
|
-
--draft-admin-
|
|
364
|
-
|
|
365
|
-
|
|
363
|
+
--draft-admin-integrity Generate an "ON DELETE CASCADE" referential constraint on the
|
|
364
|
+
DraftAdministrativeData_DraftUUID foreign key of draft shadow
|
|
365
|
+
tables. Independent of assertIntegrity / assertIntegrityType.
|
|
366
366
|
--disable-hana-comments Disable rendering of doc comments as SAP HANA comments.
|
|
367
367
|
--generated-by-comment Enable rendering of the initial SQL comment for HDI-based artifacts
|
|
368
368
|
--better-sqlite-session-variables <bool>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
// Only to be used with validator.js - a correct this value needs to be provided!
|
|
4
|
-
const { forEachMemberRecursively } = require('../
|
|
4
|
+
const { forEachMemberRecursively } = require('../base/csnUtils');
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Asserts that there is no association usage outside of the specified service.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const { requireForeignKeyAccess } = require('../checks/onConditions');
|
|
4
|
-
const { applyTransformationsOnNonDictionary } = require('../
|
|
4
|
+
const { applyTransformationsOnNonDictionary } = require('../base/csnUtils');
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Check that all paths in calculated elements-on write either access normal fields
|
|
@@ -5,7 +5,7 @@ const {
|
|
|
5
5
|
forEachMemberRecursively,
|
|
6
6
|
cardinality2str,
|
|
7
7
|
hasPersistenceSkipAnnotation,
|
|
8
|
-
} = require('../
|
|
8
|
+
} = require('../base/csnUtils');
|
|
9
9
|
const { isBuiltinType } = require('../base/builtins');
|
|
10
10
|
const { isGeoTypeName } = require('../compiler/builtins');
|
|
11
11
|
const { setProp } = require('../utils/objectUtils');
|
|
@@ -99,16 +99,50 @@ function checkPrimaryKey( art ) {
|
|
|
99
99
|
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
|
-
* Checks
|
|
103
|
-
* an association
|
|
102
|
+
* Checks whether an element is or contains a virtual association or composition.
|
|
104
103
|
*
|
|
105
104
|
* @param {CSN.Element} member Element to be checked
|
|
106
105
|
*/
|
|
107
106
|
function checkVirtualElement( member ) {
|
|
107
|
+
if (this.artifact.kind !== 'entity')
|
|
108
|
+
return;
|
|
109
|
+
|
|
108
110
|
if (member.virtual) {
|
|
109
111
|
if (this.csnUtils.isAssocOrComposition(member))
|
|
110
112
|
this.error('def-unexpected-virtual', member.$path, { keyword: 'virtual' });
|
|
113
|
+
else
|
|
114
|
+
checkForNestedAssociations.call(this, member, member.$path, undefined, true);
|
|
115
|
+
}
|
|
116
|
+
else if (!member.elements) {
|
|
117
|
+
checkForNestedAssociations.call(this, member, member.$path);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Check whether a virtual structured element contains an association or composition.
|
|
123
|
+
*
|
|
124
|
+
* @param {CSN.Element} member Element to be checked
|
|
125
|
+
* @param {CSN.Path} virtualPath Path of the element being checked
|
|
126
|
+
* @param {CSN.Path} [typeUsagePath] Path of the element using a structured type
|
|
127
|
+
* @param {boolean} [parentIsVirtual] Whether the containing element is virtual
|
|
128
|
+
* @param {Set<object>} [visited] Element dictionaries in the current type chain
|
|
129
|
+
*/
|
|
130
|
+
function checkForNestedAssociations( member, virtualPath, typeUsagePath, parentIsVirtual = false, visited = new Set() ) {
|
|
131
|
+
const elements = member.elements || member._type?.elements || this.csnUtils.getFinalTypeInfo(member.type)?.elements;
|
|
132
|
+
if (!elements || visited.has(elements))
|
|
133
|
+
return;
|
|
134
|
+
|
|
135
|
+
visited.add(elements);
|
|
136
|
+
// Elements of a referenced type keep their declaration paths, so report them at the type usage instead.
|
|
137
|
+
const nestedTypeUsagePath = typeUsagePath || (member.elements ? null : virtualPath);
|
|
138
|
+
for (const [ name, elem ] of Object.entries(elements)) {
|
|
139
|
+
const elementPath = nestedTypeUsagePath || elem.$path || virtualPath.concat([ 'elements', name ]);
|
|
140
|
+
const isVirtual = parentIsVirtual || elem.virtual;
|
|
141
|
+
if (isVirtual && this.csnUtils.isAssocOrComposition(elem))
|
|
142
|
+
this.error('def-unexpected-virtual', elementPath, { keyword: 'virtual' });
|
|
143
|
+
checkForNestedAssociations.call(this, elem, elementPath, nestedTypeUsagePath, isVirtual, visited);
|
|
111
144
|
}
|
|
145
|
+
visited.delete(elements);
|
|
112
146
|
}
|
|
113
147
|
|
|
114
148
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// This is very similar to lib/
|
|
1
|
+
// This is very similar to lib/tool-lib/enrichCsn - but the goal and the execution differ a bit:
|
|
2
2
|
// - enrichCsn is used to enhance ref files for testing.
|
|
3
3
|
// - this file is used as a "pre-loading" step of the CSN validations.
|
|
4
4
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const { applyTransformationsOnNonDictionary } = require('../
|
|
3
|
+
const { applyTransformationsOnNonDictionary } = require('../base/csnUtils');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Checks a query for forbidden usage of the `exists` predicate within `groupBy` and `orderBy`.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Only to be used with validator.js - a correct this value needs to be provided!
|
|
4
4
|
// not relevant for odata - entities need to be checked at the end of the transformation
|
|
5
5
|
|
|
6
|
-
const { isPersistedOnDatabase } = require('../
|
|
6
|
+
const { isPersistedOnDatabase } = require('../base/csnUtils.js');
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Ensure that empty/only virtual entities do not reach the db.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const { forEachGeneric } = require('../
|
|
3
|
+
const { forEachGeneric } = require('../base/csnUtils');
|
|
4
4
|
const { otherSideIsExpandableStructure, resolveArtifactType } = require('./utils');
|
|
5
5
|
const { pathId } = require('../base/csnRefs');
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const { isPersistedOnDatabase, applyTransformationsOnNonDictionary } = require('../
|
|
3
|
+
const { isPersistedOnDatabase, applyTransformationsOnNonDictionary } = require('../base/csnUtils');
|
|
4
4
|
const { isBuiltinType } = require('../base/builtins');
|
|
5
5
|
const { requireForeignKeyAccess } = require('./onConditions');
|
|
6
6
|
const { pathId } = require('../base/csnRefs');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// Only to be used with validator.js - a correct this value needs to be provided!
|
|
4
4
|
|
|
5
|
-
const { hasPersistenceSkipAnnotation } = require('../
|
|
5
|
+
const { hasPersistenceSkipAnnotation } = require('../base/csnUtils');
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Scale must not be 'variable' or 'floating'
|
|
@@ -4,7 +4,7 @@ const {
|
|
|
4
4
|
forEachDefinition, forEachMemberRecursively, forAllQueries,
|
|
5
5
|
forEachMember, getNormalizedQuery,
|
|
6
6
|
applyTransformations, functionList, mergeTransformers, hasPersistenceSkipAnnotation,
|
|
7
|
-
} = require('../
|
|
7
|
+
} = require('../base/csnUtils');
|
|
8
8
|
const enrichCsn = require('./enricher');
|
|
9
9
|
|
|
10
10
|
// forRelationalDB
|
|
@@ -212,7 +212,11 @@ function assertConsistency( model, stage ) {
|
|
|
212
212
|
],
|
|
213
213
|
schema: {
|
|
214
214
|
kind: { test: isString, enum: [ 'builtin' ] },
|
|
215
|
-
name: {
|
|
215
|
+
name: {
|
|
216
|
+
test: isObject,
|
|
217
|
+
instanceOf: XsnName,
|
|
218
|
+
requires: [ 'id', 'element' ],
|
|
219
|
+
},
|
|
216
220
|
$autoElement: { test: isString },
|
|
217
221
|
$uncheckedElements: { test: isBoolean },
|
|
218
222
|
$requireElementAccess: { test: isBoolean },
|
|
@@ -265,7 +269,6 @@ function assertConsistency( model, stage ) {
|
|
|
265
269
|
foreignKeys: {
|
|
266
270
|
kind: true,
|
|
267
271
|
inherits: 'definitions',
|
|
268
|
-
instanceOf: 'ignore',
|
|
269
272
|
also: [ false ],
|
|
270
273
|
},
|
|
271
274
|
$keysNavigation: { kind: true, test: TODO },
|
|
@@ -378,7 +381,7 @@ function assertConsistency( model, stage ) {
|
|
|
378
381
|
optional: [
|
|
379
382
|
'path', 'elements', '_outer', '_parent', '_main', '_block', 'kind',
|
|
380
383
|
'scope', '_artifact', '$inferred', '$expand', '$inCycle', '$backlink',
|
|
381
|
-
'$tableAliases', '_$next',
|
|
384
|
+
'$tableAliases', '_$next', '_deps',
|
|
382
385
|
'_origin', '_effectiveType', '$effectiveSeqNo', '_extensions', '$contains',
|
|
383
386
|
],
|
|
384
387
|
},
|
|
@@ -551,7 +554,7 @@ function assertConsistency( model, stage ) {
|
|
|
551
554
|
name: {
|
|
552
555
|
isRequired: stageParser && (() => false), // not required in parser
|
|
553
556
|
kind: true,
|
|
554
|
-
instanceOf:
|
|
557
|
+
instanceOf: XsnName,
|
|
555
558
|
schema: {
|
|
556
559
|
id: { test: isStringOrNumber },
|
|
557
560
|
select: { test: TODO }, // TODO: remove
|
|
@@ -594,6 +597,7 @@ function assertConsistency( model, stage ) {
|
|
|
594
597
|
},
|
|
595
598
|
items: {
|
|
596
599
|
kind: true,
|
|
600
|
+
instanceOf: XsnArtifact,
|
|
597
601
|
also: [ 0 ], // 0 for cyclic expansions
|
|
598
602
|
requires: [ 'location' ],
|
|
599
603
|
optional: [
|
|
@@ -603,7 +607,7 @@ function assertConsistency( model, stage ) {
|
|
|
603
607
|
'_origin', '_block', '$inferred', '$expand', '$inCycle', '_deps',
|
|
604
608
|
'localized', // really? see #13135
|
|
605
609
|
'$calcDepElement',
|
|
606
|
-
'$syntax', '_extensions',
|
|
610
|
+
'$syntax', '_extensions', '$postponeInclude',
|
|
607
611
|
'_status', '_redirected',
|
|
608
612
|
...typeProperties,
|
|
609
613
|
],
|
|
@@ -690,7 +694,7 @@ function assertConsistency( model, stage ) {
|
|
|
690
694
|
_status: { kind: true, test: TODO }, // TODO: $status
|
|
691
695
|
_projections: { kind: true, test: TODO },
|
|
692
696
|
_complexProjections: { kind: true, test: TODO }, // for projected paths with filters
|
|
693
|
-
_entities: { test: TODO },
|
|
697
|
+
_entities: { test: TODO }, // all definitions in dependency order
|
|
694
698
|
_associations: { test: TODO },
|
|
695
699
|
$compositionTargets: { test: isDictionary( isBoolean ) },
|
|
696
700
|
$collectedExtensions: { test: TODO },
|
|
@@ -706,6 +710,7 @@ function assertConsistency( model, stage ) {
|
|
|
706
710
|
_descendants: { kind: [ 'entity' ], test: isDictionary( isArray( TODO ) ) },
|
|
707
711
|
|
|
708
712
|
$errorReported: { parser: true, kind: true, test: isString }, // to avoid duplicate messages
|
|
713
|
+
// Remark: explain every occurence of $errorReported in code
|
|
709
714
|
$duplicates: { parser: true, kind: true, test: TODO }, // array of arts or true
|
|
710
715
|
$extension: { kind: true, test: TODO }, // TODO: introduce $applied instead or $status
|
|
711
716
|
$inferred: {
|
|
@@ -1071,13 +1076,16 @@ function assertConsistency( model, stage ) {
|
|
|
1071
1076
|
if (!node || typeof node !== 'object' )
|
|
1072
1077
|
throw new InternalConsistencyError( `Expected object${ at( [ null, parent ], prop, name ) }` );
|
|
1073
1078
|
const found = Object.getPrototypeOf( node )?.constructor?.name || 'null';
|
|
1074
|
-
if (!spec.instanceOf && Object.getPrototypeOf( node ) !== Object.prototype)
|
|
1079
|
+
if (!spec.instanceOf && Object.getPrototypeOf( node ) !== Object.prototype) {
|
|
1075
1080
|
throw new InternalConsistencyError( `Expected standard object but found ${ found }${ at( [ null, parent ], prop, name ) }` );
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
+
}
|
|
1082
|
+
else if (spec.instanceOf && spec.instanceOf !== 'ignore' &&
|
|
1083
|
+
Object.getPrototypeOf( node ) !== spec.instanceOf.prototype) {
|
|
1084
|
+
const err = new InternalConsistencyError( `Expected object of class ${ spec.instanceOf.name } but found ${ found }${ at( [ null, parent ], prop, name ) }` );
|
|
1085
|
+
if (Error.captureStackTrace)
|
|
1086
|
+
Error.captureStackTrace( err, isObject );
|
|
1087
|
+
throw err;
|
|
1088
|
+
}
|
|
1081
1089
|
}
|
|
1082
1090
|
|
|
1083
1091
|
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
const { builtinLocation } = require('../base/location');
|
|
11
11
|
const { setLink } = require('./utils');
|
|
12
12
|
const { isBetaEnabled } = require('../base/specialOptions');
|
|
13
|
+
const { XsnArtifact, XsnName } = require('./xsn-model');
|
|
13
14
|
|
|
14
15
|
// TODO: make type parameters a dict
|
|
15
16
|
const core = {
|
|
@@ -388,9 +389,10 @@ function initBuiltins( model ) {
|
|
|
388
389
|
|
|
389
390
|
function createNamespace( name, builtin ) {
|
|
390
391
|
const art = {
|
|
392
|
+
__proto__: XsnArtifact.prototype,
|
|
391
393
|
kind: 'namespace',
|
|
392
394
|
// builtin namespaces don't have a cds file, so no location available
|
|
393
|
-
name: { id: name, location: builtinLocation() },
|
|
395
|
+
name: { __proto__: XsnName.prototype, id: name, location: builtinLocation() },
|
|
394
396
|
blocks: [],
|
|
395
397
|
builtin,
|
|
396
398
|
location: builtinLocation(),
|
|
@@ -414,7 +416,10 @@ function initBuiltins( model ) {
|
|
|
414
416
|
const id = prefix + name;
|
|
415
417
|
// TODO: reconsider whether to set a type to itself - looks wrong
|
|
416
418
|
const art = {
|
|
417
|
-
|
|
419
|
+
__proto__: XsnArtifact.prototype,
|
|
420
|
+
kind: 'type',
|
|
421
|
+
builtin: true,
|
|
422
|
+
name: { __proto__: XsnName.prototype, id },
|
|
418
423
|
};
|
|
419
424
|
if (parent)
|
|
420
425
|
parent._subArtifacts[name] = art;
|
|
@@ -439,7 +444,7 @@ function initBuiltins( model ) {
|
|
|
439
444
|
// TODO: rename to $builtinFunction
|
|
440
445
|
const art = {
|
|
441
446
|
kind: 'builtin', // TODO: $var
|
|
442
|
-
name: { id },
|
|
447
|
+
name: { __proto__: XsnName.prototype, id },
|
|
443
448
|
};
|
|
444
449
|
elements[id] = art;
|
|
445
450
|
setLink( art, '_parent', model.$magicVariables );
|
|
@@ -473,7 +478,7 @@ function initBuiltins( model ) {
|
|
|
473
478
|
for (const id of names) {
|
|
474
479
|
const magic = {
|
|
475
480
|
kind: 'builtin', // TODO: '$var'
|
|
476
|
-
name: { id },
|
|
481
|
+
name: { __proto__: XsnName.prototype, id },
|
|
477
482
|
};
|
|
478
483
|
// Propagate this property so that it is available for sub-elements.
|
|
479
484
|
if (art.$uncheckedElements)
|