├── .cdsprettier.json ├── .devcontainer ├── Dockerfile └── devcontainer.json ├── .eslintrc.json ├── .github └── CODEOWNERS ├── .gitignore ├── CHANGELOG.js ├── CHANGELOG.json ├── CHANGELOG.md ├── LICENSE ├── LICENSES └── Apache-2.0.txt ├── README.md ├── REUSE.toml ├── _i18n └── messages.properties ├── app ├── .gitignore ├── README.md ├── appconfig │ └── fioriSandboxConfig.json ├── dfa │ └── help │ │ ├── catalog │ │ ├── Shell-home!whatsnew.json │ │ ├── Shell-home.json │ │ └── massconvert-ui.json │ │ ├── context │ │ ├── Shell-home!whatsnew.json │ │ ├── Shell-home.json │ │ ├── Shell-home │ │ │ ├── 1.html │ │ │ └── 2.html │ │ ├── massconvert-ui.json │ │ └── massconvert-ui │ │ │ ├── 1.html │ │ │ ├── beginConvert.html │ │ │ ├── chckCatalogPure.html │ │ │ ├── chkAdmin.html │ │ │ ├── chkHanaTypes.html │ │ │ ├── chkKeepPath.html │ │ │ ├── chkNoColons.html │ │ │ ├── debug.html │ │ │ ├── disableVerbose.html │ │ │ ├── inputConnFile.html │ │ │ ├── inputFolder.html │ │ │ ├── inputLimit.html │ │ │ ├── inputNamespace.html │ │ │ ├── inputSynonyms.html │ │ │ ├── logInfo.html │ │ │ ├── outputFormat.html │ │ │ ├── schema.html │ │ │ └── table.html │ │ ├── library-preload.js │ │ ├── library.js │ │ ├── utils │ │ └── adapters │ │ │ └── fiori │ │ │ └── Component.js │ │ └── wpb │ │ ├── files │ │ ├── IconFont.woff │ │ └── IconFont2.woff │ │ └── less │ │ ├── default.css │ │ ├── quartz.css │ │ ├── quartzlight.css │ │ ├── quartzlight2.css │ │ ├── text_styles_default.css │ │ ├── text_styles_quartz.css │ │ ├── text_styles_quartzlight.css │ │ └── text_styles_quartzlight2.css ├── resources │ ├── WebAssistant.js │ ├── common │ │ ├── Component.js │ │ ├── controller │ │ │ ├── BaseController.js │ │ │ └── handler.js │ │ ├── css │ │ │ └── style.css │ │ ├── images │ │ │ ├── favicon.ico │ │ │ ├── sap_18.png │ │ │ └── split.png │ │ ├── index.js │ │ ├── model │ │ │ └── models.js │ │ └── view │ │ │ ├── BusyDialog.fragment.xml │ │ │ ├── Connection.fragment.xml │ │ │ └── Debug.fragment.xml │ ├── favicon.ico │ ├── index.html │ ├── init.js │ ├── inspect │ │ ├── Component.js │ │ ├── controller │ │ │ ├── App.controller.js │ │ │ ├── inspectTable-ui.controller.js │ │ │ ├── inspectView-ui.controller.js │ │ │ └── querySimple-ui.controller.js │ │ ├── i18n │ │ │ └── i18n.properties │ │ ├── index.html │ │ ├── manifest.json │ │ └── view │ │ │ ├── inspectTable-ui.view.xml │ │ │ ├── inspectView-ui.view.xml │ │ │ └── querySimple-ui.view.xml │ ├── massConvert │ │ ├── Component.js │ │ ├── controller │ │ │ └── App.controller.js │ │ ├── i18n │ │ │ └── i18n.properties │ │ ├── index.html │ │ ├── manifest.json │ │ └── view │ │ │ └── App.view.xml │ ├── systemInfo │ │ ├── Component.js │ │ ├── controller │ │ │ └── App.controller.js │ │ ├── i18n │ │ │ └── i18n.properties │ │ ├── index.html │ │ ├── manifest.json │ │ └── view │ │ │ └── App.view.xml │ └── tables │ │ ├── Component.js │ │ ├── controller │ │ ├── App.controller.js │ │ ├── basic-ui.controller.js │ │ ├── containers-ui.controller.js │ │ ├── functions-ui.controller.js │ │ ├── schemas-ui.controller.js │ │ ├── tables-ui.controller.js │ │ └── views-ui.controller.js │ │ ├── i18n │ │ └── i18n.properties │ │ ├── index.html │ │ ├── manifest.json │ │ └── view │ │ ├── containers-ui.view.xml │ │ ├── dataTypes-ui.view.xml │ │ ├── featureUsage-ui.view.xml │ │ ├── features-ui.view.xml │ │ ├── functions-ui.view.xml │ │ ├── hdi-ui.view.xml │ │ ├── indexes-ui.view.xml │ │ ├── reuse │ │ ├── schema.fragment.xml │ │ ├── table.fragment.xml │ │ └── toolbar.fragment.xml │ │ ├── sbss-ui.view.xml │ │ ├── schemaInstances-ui.view.xml │ │ ├── schemas-ui.view.xml │ │ ├── securestore-ui.view.xml │ │ ├── tables-ui.view.xml │ │ ├── ups-ui.view.xml │ │ └── views-ui.view.xml ├── ui5-local.yaml └── ui5.yaml ├── bin ├── UI.js ├── activateHDI.js ├── adminHDI.js ├── adminHDIGroup.js ├── btp.js ├── btpInfo.js ├── btpSubs.js ├── callProcedure.js ├── cds.js ├── certificates.js ├── changeLog.js ├── changeLogUI.js ├── cli.js ├── connect.js ├── connectViaServiceKey.js ├── containers.js ├── containersUI.js ├── copy2DefaultEnv.js ├── copy2Env.js ├── copy2Secrets.js ├── createContainer.js ├── createContainerUsers.js ├── createGroup.js ├── createJWT.js ├── createModule.js ├── createXSAAdmin.js ├── dataTypes.js ├── dataTypesUI.js ├── dataVolumes.js ├── disks.js ├── dropContainer.js ├── dropGroup.js ├── featureUsage.js ├── featureUsageUI.js ├── features.js ├── featuresUI.js ├── functions.js ├── functionsUI.js ├── hanaCloudHDIInstances.js ├── hanaCloudHDIInstancesUI.js ├── hanaCloudInstances.js ├── hanaCloudSBSSInstances.js ├── hanaCloudSBSSInstancesUI.js ├── hanaCloudSchemaInstances.js ├── hanaCloudSchemaInstancesUI.js ├── hanaCloudSecureStoreInstances.js ├── hanaCloudSecureStoreInstancesUI.js ├── hanaCloudStart.js ├── hanaCloudStop.js ├── hanaCloudUPSInstances.js ├── hanaCloudUPSInstancesUI.js ├── hdbsql.js ├── hostInformation.js ├── index.js ├── indexTest.js ├── indexes.js ├── indexesUI.js ├── iniContents.js ├── iniFiles.js ├── inspectFunction.js ├── inspectIndex.js ├── inspectJWT.js ├── inspectLibMember.js ├── inspectLibrary.js ├── inspectProcedure.js ├── inspectTable.js ├── inspectTableUI.js ├── inspectTrigger.js ├── inspectUser.js ├── inspectView.js ├── issue.js ├── libraries.js ├── massConvert.js ├── massConvertUI.js ├── massRename.js ├── massUsers.js ├── matrix.js ├── objects.js ├── openBAS.js ├── openChangeLog.js ├── openDBExplorer.js ├── openReadMe.js ├── ports.js ├── privilegeError.js ├── procedures.js ├── querySimple.js ├── querySimpleUI.js ├── readMe.js ├── readMeUI.js ├── reclaim.js ├── rick.js ├── roles.js ├── schemas.js ├── schemasUI.js ├── sequences.js ├── status.js ├── synonyms.js ├── systemInfo.js ├── systemInfoUI.js ├── tables.js ├── tablesPG.js ├── tablesSQLite.js ├── tablesUI.js ├── test.js ├── traceContents.js ├── traces.js ├── triggers.js ├── users.js ├── version.js └── views.js ├── images └── ex1.png ├── index.js ├── install-btp.sh ├── npm-shrinkwrap.json ├── package.json ├── routes ├── dfa.js ├── docs.js ├── excel.js ├── hanaInspect.js ├── hanaList.js ├── index.js ├── static.js └── webSocket.js ├── tests ├── .mocharc.json ├── SystemInfo.Test.js ├── base.js ├── btpInfo.Test.js ├── btpSubs.Test.js ├── callProcedure.Test.js ├── helper.js ├── status.Test.js └── version.Test.js ├── tsconfig.json ├── types ├── CHANGELOG.d.ts ├── app │ ├── dfa │ │ └── help │ │ │ ├── library-preload.d.ts │ │ │ ├── library.d.ts │ │ │ └── utils │ │ │ └── adapters │ │ │ └── fiori │ │ │ └── Component.d.ts │ └── resources │ │ ├── WebAssistant.d.ts │ │ ├── common │ │ ├── Component.d.ts │ │ ├── controller │ │ │ ├── BaseController.d.ts │ │ │ └── handler.d.ts │ │ ├── index.d.ts │ │ └── model │ │ │ └── models.d.ts │ │ ├── init.d.ts │ │ ├── inspect │ │ ├── Component.d.ts │ │ └── controller │ │ │ ├── App.controller.d.ts │ │ │ ├── inspectTable-ui.controller.d.ts │ │ │ ├── inspectView-ui.controller.d.ts │ │ │ └── querySimple-ui.controller.d.ts │ │ ├── massConvert │ │ ├── Component.d.ts │ │ └── controller │ │ │ └── App.controller.d.ts │ │ ├── systemInfo │ │ ├── Component.d.ts │ │ └── controller │ │ │ └── App.controller.d.ts │ │ └── tables │ │ ├── Component.d.ts │ │ └── controller │ │ ├── App.controller.d.ts │ │ ├── basic-ui.controller.d.ts │ │ ├── containers-ui.controller.d.ts │ │ ├── functions-ui.controller.d.ts │ │ ├── schemas-ui.controller.d.ts │ │ ├── tables-ui.controller.d.ts │ │ └── views-ui.controller.d.ts ├── bin │ ├── UI.d.ts │ ├── activateHDI.d.ts │ ├── adminHDI.d.ts │ ├── adminHDIGroup.d.ts │ ├── btp.d.ts │ ├── btpInfo.d.ts │ ├── btpSubs.d.ts │ ├── callProcedure.d.ts │ ├── cds.d.ts │ ├── certificates.d.ts │ ├── changeLog.d.ts │ ├── changeLogUI.d.ts │ ├── cli.d.ts │ ├── connect.d.ts │ ├── connectViaServiceKey.d.ts │ ├── containers.d.ts │ ├── containersUI.d.ts │ ├── copy2DefaultEnv.d.ts │ ├── copy2Env.d.ts │ ├── copy2Secrets.d.ts │ ├── createContainer.d.ts │ ├── createContainerUsers.d.ts │ ├── createGroup.d.ts │ ├── createJWT.d.ts │ ├── createModule.d.ts │ ├── createXSAAdmin.d.ts │ ├── dataTypes.d.ts │ ├── dataTypesUI.d.ts │ ├── dataVolumes.d.ts │ ├── disks.d.ts │ ├── dropContainer.d.ts │ ├── dropGroup.d.ts │ ├── featureUsage.d.ts │ ├── featureUsageUI.d.ts │ ├── features.d.ts │ ├── featuresUI.d.ts │ ├── functions.d.ts │ ├── functionsUI.d.ts │ ├── hanaCloudHDIInstances.d.ts │ ├── hanaCloudHDIInstancesUI.d.ts │ ├── hanaCloudInstances.d.ts │ ├── hanaCloudSBSSInstances.d.ts │ ├── hanaCloudSBSSInstancesUI.d.ts │ ├── hanaCloudSchemaInstances.d.ts │ ├── hanaCloudSchemaInstancesUI.d.ts │ ├── hanaCloudSecureStoreInstances.d.ts │ ├── hanaCloudSecureStoreInstancesUI.d.ts │ ├── hanaCloudStart.d.ts │ ├── hanaCloudStop.d.ts │ ├── hanaCloudUPSInstances.d.ts │ ├── hanaCloudUPSInstancesUI.d.ts │ ├── hdbsql.d.ts │ ├── hostInformation.d.ts │ ├── index.d.ts │ ├── indexTest.d.ts │ ├── indexes.d.ts │ ├── indexesUI.d.ts │ ├── iniContents.d.ts │ ├── iniFiles.d.ts │ ├── inspectFunction.d.ts │ ├── inspectIndex.d.ts │ ├── inspectJWT.d.ts │ ├── inspectLibMember.d.ts │ ├── inspectLibrary.d.ts │ ├── inspectProcedure.d.ts │ ├── inspectTable.d.ts │ ├── inspectTableUI.d.ts │ ├── inspectTrigger.d.ts │ ├── inspectUser.d.ts │ ├── inspectView.d.ts │ ├── issue.d.ts │ ├── libraries.d.ts │ ├── massConvert.d.ts │ ├── massConvertUI.d.ts │ ├── massRename.d.ts │ ├── massUsers.d.ts │ ├── matrix.d.ts │ ├── objects.d.ts │ ├── openBAS.d.ts │ ├── openChangeLog.d.ts │ ├── openDBExplorer.d.ts │ ├── openReadMe.d.ts │ ├── ports.d.ts │ ├── privilegeError.d.ts │ ├── procedures.d.ts │ ├── querySimple.d.ts │ ├── querySimpleUI.d.ts │ ├── readMe.d.ts │ ├── readMeUI.d.ts │ ├── reclaim.d.ts │ ├── rick.d.ts │ ├── roles.d.ts │ ├── schemas.d.ts │ ├── schemasUI.d.ts │ ├── sequences.d.ts │ ├── status.d.ts │ ├── synonyms.d.ts │ ├── systemInfo.d.ts │ ├── systemInfoUI.d.ts │ ├── tables.d.ts │ ├── tablesPG.d.ts │ ├── tablesSQLite.d.ts │ ├── tablesUI.d.ts │ ├── test.d.ts │ ├── traceContents.d.ts │ ├── traces.d.ts │ ├── triggers.d.ts │ ├── users.d.ts │ ├── version.d.ts │ └── views.d.ts ├── index.d.ts ├── mochawesome-report │ └── assets │ │ └── app.d.ts ├── routes │ ├── dfa.d.ts │ ├── docs.d.ts │ ├── excel.d.ts │ ├── hanaInspect.d.ts │ ├── hanaList.d.ts │ ├── index.d.ts │ ├── static.d.ts │ ├── webSockerts.d.ts │ └── webSocket.d.ts ├── tests │ ├── SystemInfo.Test.d.ts │ ├── base.d.ts │ ├── btpInfo.Test.d.ts │ ├── btpSubs.Test.d.ts │ ├── callProcedure.Test.d.ts │ ├── helper.d.ts │ ├── status.Test.d.ts │ └── version.Test.d.ts ├── update-notifier.d.ts └── utils │ ├── base.d.ts │ ├── btp.d.ts │ ├── cf.d.ts │ ├── connections.d.ts │ ├── database │ ├── hanaCDS.d.ts │ ├── hanaDirect.d.ts │ ├── index.d.ts │ ├── postgres.d.ts │ └── sqlite.d.ts │ ├── dbInspect.d.ts │ ├── locale.d.ts │ ├── massConvert.d.ts │ ├── sqlInjection.d.ts │ ├── versionCheck.d.ts │ └── xs.d.ts ├── update-notifier.js └── utils ├── base.js ├── btp.js ├── cf.js ├── connections.js ├── database ├── hanaCDS.js ├── hanaDirect.js ├── index.js ├── postgres.js └── sqlite.js ├── dbInspect.js ├── inquirer-tree-prompt.js ├── locale.js ├── massConvert.js ├── sqlInjection.js ├── versionCheck.js └── xs.js /.cdsprettier.json: -------------------------------------------------------------------------------- 1 | { 2 | "cqlKeywordCapitalization": "upper" 3 | } -------------------------------------------------------------------------------- /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.187.0/containers/javascript-node/.devcontainer/base.Dockerfile 2 | 3 | # [Choice] Node.js version: 20, 18, 16 4 | ARG VARIANT="20-buster" 5 | FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT} 6 | 7 | # Prepare for apt-based install of Cloud Foundry CLI by adding Cloud Foundry Foundation public key & package repository 8 | # (see https://docs.cloudfoundry.org/cf-cli/install-go-cli.html#pkg-linux). 9 | RUN wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add - ; \ 10 | echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list 11 | 12 | # Install extra tools for CAP development & deployment. 13 | RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ 14 | && apt-get -y install --no-install-recommends cf8-cli git jq 15 | 16 | # Install global node modules for SAP CAP and frontend development. 17 | RUN su node -c "npm install -g @ui5/cli @sap/cds-dk yo @sapui5/generator-sapui5-templates @sap/generator-add-hdb-module @sap/generator-base-mta-module @sap/generator-cap-project @sap/generator-fiori @sap/generator-hdb-project typescript" 18 | 19 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "commonjs": false, 4 | "es6": true, 5 | "node": true, 6 | "mocha": true 7 | }, 8 | "extends": [ 9 | "eslint:recommended", 10 | "plugin:@sap/cds/recommended" 11 | ], 12 | "globals": { 13 | "Atomics": "readonly", 14 | "SharedArrayBuffer": "readonly" 15 | }, 16 | "parserOptions": { 17 | "ecmaVersion": 2022, 18 | "sourceType": "module" 19 | }, 20 | "rules": {} 21 | } 22 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @jung-thomas 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (https://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # TypeScript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | # next.js build output 61 | .next 62 | 63 | mta_archives/ 64 | default-*.json 65 | 66 | # dotenv environment variables file 67 | .env 68 | 69 | # Visual Studio Code 70 | .vscode 71 | 72 | #prevent potential private schemas publishing 73 | *.cds 74 | 75 | /secrets 76 | yarn.lock 77 | 78 | # added by cds bind 79 | .cdsrc-private.json 80 | 81 | # macos 82 | .DS_Store 83 | 84 | #Test Results 85 | /mochawesome-report -------------------------------------------------------------------------------- /CHANGELOG.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import changelog from 'stringify-changelog' 3 | let markdown = changelog("./CHANGELOG.json") 4 | 5 | markdown = `# Change Log 6 | 7 | All notable changes to this project will be documented in this file. 8 | 9 | The format is based on [Keep a Changelog](http://keepachangelog.com/). 10 | 11 | ${markdown}` 12 | 13 | import fs from 'fs' 14 | fs.writeFileSync('./CHANGELOG.md', markdown) 15 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | dist/ 3 | .scp/ 4 | .env 5 | Makefile*.mta 6 | mta_archives 7 | mta-* 8 | archive.zip 9 | .*_mta_build_tmp -------------------------------------------------------------------------------- /app/README.md: -------------------------------------------------------------------------------- 1 | ## Application Details 2 | | | 3 | | ------------- | 4 | |**Generation Date and Time**
Thu Jul 15 2021 13:03:12 GMT-0400 (Eastern Daylight Time)| 5 | |**App Generator**
@sap/generator-fiori| 6 | |**App Generator Version**
1.2.4| 7 | |**Generation Platform**
Visual Studio Code| 8 | |**Floorplan Used**
simple| 9 | |**Service Type**
None| 10 | |**Service URL**
N/A 11 | |**Module Name**
test1| 12 | |**Application Title**
App Title| 13 | |**Namespace**
| 14 | |**UI5 Theme**
sap_fiori_3_dark| 15 | |**UI5 Version**
Latest| 16 | |**Enable Telemetry**
False| 17 | 18 | ## test1 19 | 20 | A Fiori application. 21 | 22 | ### Starting the generated app 23 | 24 | - This app has been generated using the SAP Fiori tools - App Generator, as part of the SAP Fiori tools suite. In order to launch the generated app, simply run the following from the generated app root folder: 25 | 26 | ``` 27 | npm start 28 | ``` 29 | 30 | #### Pre-requisites: 31 | 32 | 1. Active NodeJS LTS (Long Term Support) version and associated supported NPM version. (See https://nodejs.org) 33 | 34 | 35 | -------------------------------------------------------------------------------- /app/dfa/help/catalog/Shell-home!whatsnew.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "Shell-home!whatsnew", 3 | "appUrl": "Shell-home!whatsnew", 4 | "product": "HANA_CLI", 5 | "version": "Cloud", 6 | "locale": "en-US", 7 | "language": "en-US", 8 | "state": "PRODUCTION", 9 | "system": "", 10 | "environment": "", 11 | "loio": "", 12 | "contextType": "HELP", 13 | "_standalone": true, 14 | "title": "HELP_WN_Shell-home", 15 | "shortDescription": "", 16 | "alias": "", 17 | "editable": "true", 18 | "lastModifiedDate": "2021-06-10 07:22:47 GMT+0000" 19 | } -------------------------------------------------------------------------------- /app/dfa/help/catalog/Shell-home.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "Shell-home", 3 | "appUrl": "Shell-home", 4 | "product": "HANA_CLI", 5 | "version": "Cloud", 6 | "locale": "en-US", 7 | "language": "en-US", 8 | "state": "PRODUCTION", 9 | "system": "", 10 | "environment": "", 11 | "loio": "", 12 | "contextType": "HELP", 13 | "_standalone": true, 14 | "title": "Static Help: hana-cli Landing Page", 15 | "shortDescription": "", 16 | "alias": "", 17 | "editable": "true", 18 | "lastModifiedDate": "2021-06-10 07:22:47 GMT+0000" 19 | } -------------------------------------------------------------------------------- /app/dfa/help/catalog/massconvert-ui.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "massconvert-ui", 3 | "appUrl": "massconvert-ui", 4 | "product": "HANA_CLI", 5 | "version": "Cloud", 6 | "locale": "en-US", 7 | "language": "en-US", 8 | "state": "PRODUCTION", 9 | "system": "", 10 | "environment": "", 11 | "loio": "", 12 | "contextType": "HELP", 13 | "_standalone": true, 14 | "title": "Convert a group of tables to CDS or HDBTable format", 15 | "shortDescription": "Convert a group of tables to CDS or HDBTable format", 16 | "alias": "", 17 | "editable": "true", 18 | "lastModifiedDate": "2021-06-10 07:22:47 GMT+0000" 19 | } -------------------------------------------------------------------------------- /app/dfa/help/context/Shell-home!whatsnew.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "Shell-home!whatsnew", 3 | "appUrl": "Shell-home!whatsnew", 4 | "product": "HANA_CLI", 5 | "version": "Cloud", 6 | "locale": "en-US", 7 | "state": "PRODUCTION", 8 | "system": "", 9 | "environment": "", 10 | "loio": "", 11 | "contextType": "HELP", 12 | "title": "HELP_WN_Shell-home", 13 | "shortDescription": "", 14 | "alias": "", 15 | "editable": "true", 16 | "lastModifiedDate": "2021-06-10 07:22:47 GMT+0000", 17 | "tiles": [ 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /app/dfa/help/context/Shell-home/1.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

General information related to this screen

4 |

Welcome to 5 | SAP HANA Developer Command Line Interface!

6 |

This 7 | page gathers the various browser based user interface versions of commands in the hana-cli tool.

8 |

See also:

9 |

README 13 | Documentation

14 |
15 | -------------------------------------------------------------------------------- /app/dfa/help/context/Shell-home/2.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Find relevant documentation.

4 |

5 | https://github.com/SAP-samples/hana-developer-cli-tool-example/blob/main/README.md 8 |

9 |
10 | -------------------------------------------------------------------------------- /app/dfa/help/context/massconvert-ui/1.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

General information related to this screen

4 |

Welcome to 5 | hana-cli massConvert command!

6 |

This command converts a group of tables to CDS, HDBTable, or HDBMigrationTable format.

7 |

See also:

8 |

README 12 | Documentation

13 |
14 | -------------------------------------------------------------------------------- /app/dfa/help/context/massconvert-ui/beginConvert.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Begin Conversion

4 |

5 | Press once you have completed all input and settings and are ready to start the conversion 6 |

7 |
8 | -------------------------------------------------------------------------------- /app/dfa/help/context/massconvert-ui/chckCatalogPure.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Conversion Using Catalog SQL APIs

4 |

5 | Normally conversion is done by reading the HANA Catalog and building a CDS entity defintion dynamically. We 6 | then use the cds.compile.to API to convert to the target output format. But this has restrictions of only 7 | supporting what CDS allows. 8 |

9 |

10 | With this option selected, we instead use the SYS.GET_OBJECT_DEFINITION stored procedure. We then strip out 11 | the Schema references and CS_* Types to make the output compatible with HDI and HANA Cloud 12 |

13 |
14 | -------------------------------------------------------------------------------- /app/dfa/help/context/massconvert-ui/chkAdmin.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Connect with Admin User (default-env-admin.json)

4 |

5 | This option will override the normal conneciton configuration logic (which looks for .env and then 6 | default-env.json) and instead connect with a file named default-env-admin.json. Normally you will create 7 | this sort of connection with a power user like SYSTEM or DBADMIN. This will often give you much more access 8 | to foreign schemas than a normal database connection. 9 |

10 | 11 |
12 | -------------------------------------------------------------------------------- /app/dfa/help/context/massconvert-ui/chkHanaTypes.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Use HANA Native Data Types

4 |

5 | Normally CAP CDS uses abstracted data types and therefore the normal conversion will produce an error 6 | message if it can't map a data type to one of the CDS Types. This option allows for additional mapping to 7 | the HANA specific data types. 8 |

9 | 10 |

See also:

11 |

README 15 | Documentation

16 |
17 | -------------------------------------------------------------------------------- /app/dfa/help/context/massconvert-ui/chkKeepPath.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Keep Source Table Path

4 |

5 | Use this option when you want to force the converison to maintain the original table path including any dots 6 | in the path 7 |

8 | 9 |
10 | -------------------------------------------------------------------------------- /app/dfa/help/context/massconvert-ui/chkNoColons.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Keep Source Table Path

4 |

5 | Use this option when you want to replace :: in the table path with a dot for better compatibility 6 |

7 | 8 |
9 | -------------------------------------------------------------------------------- /app/dfa/help/context/massconvert-ui/debug.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Lots of extra output

4 |

5 | This options causes a huge amount of internal information to be logged to the console output. Really only 6 | useful for technical debugging or if you are truely curious about what's happening behind the scenes. For 7 | instance this option will output all SQL Statements that are used internally. 8 |

9 | 10 |
11 | -------------------------------------------------------------------------------- /app/dfa/help/context/massconvert-ui/disableVerbose.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Limit Console Output Detail

4 |

5 | Use this option to limit the output from all commands. Primarily used from the terminal/cli in order to 6 | script commands more easily. Has little impact on the browser base UI. 7 |

8 | 9 |
10 | -------------------------------------------------------------------------------- /app/dfa/help/context/massconvert-ui/inputConnFile.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Keep Source Table Path

4 |

5 | This option overides all connection file logic. So instead of using a .env, default-env.json, or 6 | default-env-admin.json file, the conneciton logic will use any environment file you specify here. File must 7 | exist in the original directory where you triggered the hana-cli command or in up to 4 parent directories. 8 |

9 | 10 |
11 | -------------------------------------------------------------------------------- /app/dfa/help/context/massconvert-ui/inputFolder.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Target Folder for Conversion Output

4 |

5 | This is the target folder for output of the conversion. Remember this folder is relative to the start of the 6 | hana-cli command from the terminal. It defaults to the same folder where you started the command. 7 |

8 | 9 |
10 | -------------------------------------------------------------------------------- /app/dfa/help/context/massconvert-ui/inputLimit.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Limit Number of Tables to Convert

4 |

5 | To avoid accidentally exporting extremely large number of tables from schemas accidentally, we set the 6 | default limit to 200. Override it here if you know you want more results than that. 7 |

8 | 9 |
10 | -------------------------------------------------------------------------------- /app/dfa/help/context/massconvert-ui/inputNamespace.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Add Custom Namespace to Output

4 |

5 | Although namespace is largely unneeded in HANA HDI, it is still supported for backwards compatibility. By 6 | default we will not convert objects to include namespaces, but you can override that setting and supply the 7 | custom namespace with this option. 8 |

9 | 10 |
11 | -------------------------------------------------------------------------------- /app/dfa/help/context/massconvert-ui/inputSynonyms.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Filename to Store Synonyms

4 |

5 | The tool will automatically also generate synononyms for the conversion. Use this option to simply override 6 | the filename where the synonyms will be written to. 7 |

8 | 9 |
10 | -------------------------------------------------------------------------------- /app/dfa/help/context/massconvert-ui/logInfo.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Command Output Is Streamed Here

4 |

5 | Once you start the conversion, all output will be streamed here. You can check the progress of the conversion in real time. 6 |

7 |
8 | -------------------------------------------------------------------------------- /app/dfa/help/context/massconvert-ui/schema.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Target Database Schema

4 |

5 | This should be the name of the schema with in the target system where you want to extract table definitions. 6 | You can use the special value **CURRENT_SCHEMA**, and the tool will calculation your current default schema 7 | (and display it in the next field). 8 | This option can be useful when working with HDI containers in particular since you wouldn't know the 9 | generated schema but the HDI container connnection will default to the correct schema. 10 |

11 |

12 | You can also set the value to *, and the value help will display all tables. 13 |

14 |
15 | -------------------------------------------------------------------------------- /app/dfa/help/context/massconvert-ui/table.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

Target Database Table

4 |

5 | This should be the name of the Table with in the target system where you want to extract table definitions. 6 | You can supply just a partial name and a wildcard will be applied to the end of the table name automatically. 7 |

8 |

9 | You can also set the value to *, and the value help will display all tables. 10 |

11 |
12 | -------------------------------------------------------------------------------- /app/dfa/help/library.js: -------------------------------------------------------------------------------- 1 | jQuery.sap.declare("sap.dfa.help.library"); 2 | 3 | sap.ui.getCore().initLibrary( 4 | { name:"sap.dfa.help", 5 | dependencies:["sap.ui.core"], 6 | types:[], 7 | interfaces:[], 8 | controls:[], 9 | elements:[], 10 | noLibraryCSS:true, 11 | version:"3.0.8"} 12 | ); -------------------------------------------------------------------------------- /app/dfa/help/utils/adapters/fiori/Component.js: -------------------------------------------------------------------------------- 1 | sap.ui.define(["sap/ui/core/UIComponent"], function(e) { 2 | "use strict"; 3 | return e.extend("sap.dfa.help.utils.adapters.fiori.Component", { 4 | metadata: { 5 | version: "3.1.0" 6 | }, 7 | _getRendererExtensions: function() { 8 | var e = jQuery.Deferred() 9 | , r = jQuery.sap.getObject("sap.ushell.renderers.fiori2.RendererExtensions"); 10 | return r ? e.resolve(r) : sap.ui.getCore().getEventBus().subscribe("sap.ushell.renderers.fiori2.Renderer", "rendererLoaded", function() { 11 | e.resolve(jQuery.sap.getObject("sap.ushell.renderers.fiori2.RendererExtensions")) 12 | }), 13 | e.promise() 14 | }, 15 | init: function() { 16 | var i = this; 17 | e.prototype.init.apply(this, arguments), 18 | sap.ui.require(["sap/dfa/help/wpb/Help4"], function() { 19 | i._getRendererExtensions().done(function(e) { 20 | var r, n = i.getComponentData().config; 21 | "WPB" === n.backend ? r = "WPB" : "CP11" === n.backend && (r = "UACP"), 22 | Help4.TIMESTAMP = "", 23 | Help4.init(Help4.extendObject({ 24 | type: "fiori", 25 | rendererExtensions: e, 26 | isComponent: !0, 27 | serviceLayerVersion: r 28 | }, n, !1)) 29 | }) 30 | }) 31 | } 32 | }) 33 | }); 34 | -------------------------------------------------------------------------------- /app/dfa/help/wpb/files/IconFont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/app/dfa/help/wpb/files/IconFont.woff -------------------------------------------------------------------------------- /app/dfa/help/wpb/files/IconFont2.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/app/dfa/help/wpb/files/IconFont2.woff -------------------------------------------------------------------------------- /app/resources/WebAssistant.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | 'use strict'; 3 | sap.ui.require([ ], () => { 4 | const head = document.getElementsByTagName('head')[0] 5 | let wa = document.createElement('script') 6 | wa.src = 'https://webassistant.enable-now.cloud.sap/wa_cfg/hana_cloud_central_productive/WebAssistant.js' 7 | wa.type = 'text/javascript' 8 | wa.async = true 9 | wa.defer = true 10 | head.insertBefore(wa, null) 11 | }) -------------------------------------------------------------------------------- /app/resources/common/Component.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | /*eslint-env es6 */ 3 | sap.ui.define([ 4 | "sap/ui/core/UIComponent", 5 | "sap/ui/Device", 6 | "sap/hanacli/common/model/models" 7 | ], function (UIComponent, Device, models) { 8 | "use strict" 9 | 10 | return UIComponent.extend("sap.hanacli.common.Component", { 11 | 12 | superInit() { 13 | 14 | // call the base component's init function 15 | UIComponent.prototype.init.apply(this, arguments) 16 | 17 | // enable routing 18 | this.getRouter().initialize() 19 | 20 | // set the device model 21 | this.setModel(models.createDeviceModel(), "device") 22 | } 23 | 24 | }) 25 | }) -------------------------------------------------------------------------------- /app/resources/common/controller/handler.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | /*eslint-env es6 */ 3 | "use strict"; 4 | sap.ui.define([ 5 | "sap/m/MessageToast", 6 | ], function(MessageToast) { 7 | "use strict"; 8 | 9 | return function(controller) { 10 | const message = `Pressed from ${controller.getMetadata().getName()}` 11 | MessageToast.show(message) 12 | } 13 | }) -------------------------------------------------------------------------------- /app/resources/common/css/style.css: -------------------------------------------------------------------------------- 1 | /* Enter your custom styles here */ -------------------------------------------------------------------------------- /app/resources/common/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/app/resources/common/images/favicon.ico -------------------------------------------------------------------------------- /app/resources/common/images/sap_18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/app/resources/common/images/sap_18.png -------------------------------------------------------------------------------- /app/resources/common/images/split.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/app/resources/common/images/split.png -------------------------------------------------------------------------------- /app/resources/common/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | /*eslint no-console: 0, no-unused-vars: 0, no-use-before-define: 0, no-redeclare: 0, no-shadow:0 */ 3 | /*eslint-env es6 */ 4 | sap.ui.require(["sap/ui/core/Core", "sap/ui/core/Component"], (oCore, Component) => { 5 | 6 | Component.create({ 7 | id: "comp", 8 | name: "root", 9 | manifestFirst: true, 10 | async: true 11 | }).then((oComp) => { 12 | sap.ui.require(["sap/ui/core/ComponentContainer"], (ComponentContainer) => { 13 | let oCont = new ComponentContainer({ 14 | component: oComp, 15 | height: "100%" 16 | }) 17 | 18 | oCore.loadLibrary("sap.f", { 19 | async: true 20 | }).then(() => { 21 | let oShell = new sap.f.ShellBar({ 22 | id: "myShell", 23 | homeIcon: "../common/images/sap_18.png", 24 | showCopilot: true, 25 | showSearch: true, 26 | showNotifications: true, 27 | showProductSwitcher: true, 28 | profile: new sap.f.Avatar({ 29 | initials: "" 30 | }) 31 | }).placeAt("content") 32 | oCont.placeAt("content") 33 | }) 34 | }) 35 | }) 36 | 37 | }) -------------------------------------------------------------------------------- /app/resources/common/model/models.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | /*eslint-env es6 */ 3 | sap.ui.define([ 4 | "sap/ui/model/json/JSONModel", 5 | "sap/ui/Device" 6 | ], (JSONModel, Device) => { 7 | "use strict" 8 | 9 | return { 10 | 11 | createDeviceModel: () => { 12 | var oModel = new JSONModel(Device) 13 | oModel.setDefaultBindingMode("OneWay") 14 | return oModel 15 | } 16 | 17 | } 18 | }) -------------------------------------------------------------------------------- /app/resources/common/view/BusyDialog.fragment.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/resources/common/view/Connection.fragment.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | <Button id="connRefresh" icon="sap-icon://refresh" tooltip="{i18nReuse>gui.refreshConn}" press="refreshConnection" /> 10 | <ToolbarSpacer /> 11 | </Toolbar> 12 | <Label text="{i18nReuse>gui.admin}" tooltip="{i18nReuse>admin}"/> 13 | <CheckBox id="chkAdmin" selected="{/admin}" tooltip="{i18nReuse>admin}" select="refreshConnection"/> 14 | <Label text="{i18nReuse>gui.connFile}" tooltip="{i18nReuse>connFile}" /> 15 | <Input id="inputConnFile" value="{/conn}" tooltip="{i18nReuse>connFile}"/> 16 | 17 | </core:FragmentDefinition> -------------------------------------------------------------------------------- /app/resources/common/view/Debug.fragment.xml: -------------------------------------------------------------------------------- 1 | <core:FragmentDefinition xmlns="sap.m" 2 | xmlns:l="sap.ui.layout" 3 | xmlns:f="sap.ui.layout.form" 4 | xmlns:core="sap.ui.core"> 5 | 6 | <Toolbar ariaLabelledBy="Title5"> 7 | <Title id="Title5" text="{i18nReuse>grpDebug}"/> 8 | </Toolbar> 9 | <Label text="{i18nReuse>gui.quiet}" tooltip="{i18nReuse>disableVerbose}"/> 10 | <CheckBox id="disableVerbose" selected="{/disableVerbose}" tooltip="{i18nReuse>disableVerbose}"/> 11 | <Label text="{i18nReuse>gui.debug}" tooltip="{i18nReuse>debug}"/> 12 | <CheckBox id="debug" selected="{/debug}" tooltip="{i18nReuse>debug}"/> 13 | 14 | </core:FragmentDefinition> -------------------------------------------------------------------------------- /app/resources/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/app/resources/favicon.ico -------------------------------------------------------------------------------- /app/resources/index.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html> 3 | 4 | <head> 5 | 6 | <meta http-equiv="X-UA-Compatible" content="IE=edge" /> 7 | <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> 8 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> 9 | <title>hana-cli LaunchPad 10 | 11 | 17 | 18 | 24 | 33 | 34 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /app/resources/init.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | /*eslint no-console: 0, no-unused-vars: 0, no-use-before-define: 0, no-redeclare: 0, no-shadow:0 */ 3 | /*eslint-env es6 */ 4 | sap.ui.require(["sap/ui/core/Core", "sap/ui/core/Component"], (oCore, Component) => { 5 | 6 | sap.ushell.Container.createRenderer().placeAt('content') 7 | sap.ui 8 | .getCore() 9 | .getConfiguration() 10 | .setFlexibilityServices([{ 11 | connector: "SessionStorageConnector" 12 | }]) 13 | 14 | }) -------------------------------------------------------------------------------- /app/resources/inspect/Component.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | /*eslint-env es6 */ 3 | sap.ui.define([ 4 | "sap/hanacli/common/Component", 5 | "sap/base/util/UriParameters" 6 | ], function (UIComponent, UriParameters) { 7 | "use strict" 8 | 9 | return UIComponent.extend("sap.hanacli.inspect.Component", { 10 | 11 | metadata: { 12 | manifest: "json" 13 | }, 14 | 15 | 16 | createContent: function () { 17 | // create root view 18 | var oView = sap.ui.view({ 19 | id : "App", 20 | viewName : `sap.hanacli.inspect.view.${this.getModel("config").getProperty("/cmd")}`, 21 | type : "XML", 22 | async: true, 23 | viewData : { 24 | component : this 25 | } 26 | }) 27 | 28 | return oView 29 | 30 | }, 31 | 32 | init: function () { 33 | let model = this.getModel("config") 34 | let cmd = UriParameters.fromQuery(window.location.search).get("cmd") 35 | let tbl = UriParameters.fromQuery(window.location.search).get("tbl") 36 | let viewInput = UriParameters.fromQuery(window.location.search).get("viewInput") 37 | 38 | if (!cmd) { 39 | cmd = window.location.hash.substr(1) 40 | } 41 | model.setData({cmd: cmd, tbl: tbl, viewInput: viewInput}) 42 | this.superInit() 43 | } 44 | 45 | 46 | }) 47 | }) -------------------------------------------------------------------------------- /app/resources/inspect/controller/App.controller.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | /*eslint-env es6 */ 3 | "use strict"; 4 | sap.ui.define([ 5 | "sap/hanacli/common/controller/BaseController" 6 | 7 | ], 8 | function (BaseController) { 9 | 10 | return BaseController.extend("sap.hanacli.inspect.controller.App", { 11 | 12 | onAppInit: function () { 13 | 14 | this.getHanaStatus() 15 | this.getPrompts() 16 | let model = this.getModel("promptsModel") 17 | this.getView().setModel(model) 18 | 19 | }, 20 | 21 | downloadExcel: function () { 22 | //Excel Download 23 | window.open("/excel") 24 | return 25 | } 26 | 27 | 28 | }) 29 | } 30 | ) -------------------------------------------------------------------------------- /app/resources/inspect/i18n/i18n.properties: -------------------------------------------------------------------------------- 1 | title=Title 2 | appTitle=hana-cli 3 | appDescription=test 4 | types.table=Table 5 | types.json=JSON (JavaScript Object Notiation) 6 | types.excel=Microsoft Excel 7 | types.csv=Comma Separated File 8 | folder=Target Folder -------------------------------------------------------------------------------- /app/resources/inspect/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Tables 9 | 25 | 30 | 31 | 32 |
33 | 34 | -------------------------------------------------------------------------------- /app/resources/massConvert/Component.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | /*eslint-env es6 */ 3 | sap.ui.define([ 4 | "sap/hanacli/common/Component" 5 | ], function (UIComponent) { 6 | "use strict" 7 | 8 | return UIComponent.extend("sap.hanacli.massConvert.Component", { 9 | 10 | metadata: { 11 | manifest: "json" 12 | }, 13 | 14 | 15 | init: function () { 16 | this.superInit() 17 | // Log Model 18 | var oModel = this.getModel("logModel") 19 | oModel.setData({ 20 | log: "", 21 | message: "", 22 | progress: 0 23 | }) 24 | } 25 | 26 | 27 | }) 28 | }) -------------------------------------------------------------------------------- /app/resources/massConvert/i18n/i18n.properties: -------------------------------------------------------------------------------- 1 | title=Title 2 | appTitle=hana-cli Mass Convert 3 | appDescription=Convert a group of tables to CDS, HDBTable or HDBMigrationTable format 4 | target=Conversion Target 5 | conn=Connection Parameters 6 | targetDetails=Target System Details 7 | refreshConn=Refresh Connection 8 | admin=Admin Connection 9 | connFile=Connection Filename 10 | outputType = Output Format for Conversion 11 | convOptions=Conversion Options 12 | hanaTypes=Use HANA Types 13 | folder=Output Folder 14 | catalog=Use "Pure" Catalog Definitions 15 | convert=Begin Conversion 16 | connection.opened=hana-cli connection opened 17 | connection.error=Websocket connection error 18 | connection.close=Websocket connection closed 19 | types.cds=CAP Core Data Services (.cds) 20 | types.hdbmigrationtable=HANA Database Migration Table (.hdbmigrationtable) 21 | types.hdbtable=HANA Database Table (.hdbtable) 22 | progress=Progress 23 | log=Processing Log -------------------------------------------------------------------------------- /app/resources/massConvert/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Mass Convert 10 | 19 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | -------------------------------------------------------------------------------- /app/resources/systemInfo/Component.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | /*eslint-env es6 */ 3 | sap.ui.define([ 4 | "sap/hanacli/common/Component" 5 | ], function (UIComponent) { 6 | "use strict" 7 | 8 | return UIComponent.extend("sap.hanacli.systemInfo.Component", { 9 | 10 | metadata: { 11 | manifest: "json" 12 | }, 13 | 14 | init: function () { 15 | this.superInit() 16 | } 17 | }) 18 | }) -------------------------------------------------------------------------------- /app/resources/systemInfo/controller/App.controller.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | /*eslint-env es6 */ 3 | "use strict"; 4 | sap.ui.define([ 5 | "sap/hanacli/common/controller/BaseController" 6 | ], 7 | function (BaseController) { 8 | 9 | return BaseController.extend("sap.hanacli.systemInfo.controller.App", { 10 | onInit: function () { 11 | this.getHanaStatus() 12 | let hanaModel = this.getModel("hanaModel") 13 | this.getView().setModel(hanaModel) 14 | } 15 | }) 16 | } 17 | ) -------------------------------------------------------------------------------- /app/resources/systemInfo/i18n/i18n.properties: -------------------------------------------------------------------------------- 1 | title=Title 2 | appTitle=hana-cli System Info 3 | appDescription=Current HANA Connection System Details 4 | currentSession=Current Session 5 | versionInfo=Version Info 6 | system=System ID 7 | databaseName=Database Name 8 | startTime=Start Time 9 | systemOverview=System Overview 10 | name=Name 11 | status=Status 12 | -------------------------------------------------------------------------------- /app/resources/systemInfo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | System Info 9 | 24 | 29 | 30 | 31 |
32 | 33 | -------------------------------------------------------------------------------- /app/resources/tables/Component.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | /*eslint-env es6 */ 3 | sap.ui.define([ 4 | "sap/hanacli/common/Component", 5 | "sap/base/util/UriParameters" 6 | ], function (UIComponent, UriParameters) { 7 | "use strict" 8 | 9 | return UIComponent.extend("sap.hanacli.tables.Component", { 10 | 11 | metadata: { 12 | manifest: "json" 13 | }, 14 | 15 | 16 | createContent: function () { 17 | // create root view 18 | var oView = sap.ui.view({ 19 | id : "App", 20 | viewName : `sap.hanacli.tables.view.${this.getModel("config").getProperty("/cmd")}`, 21 | type : "XML", 22 | async: true, 23 | viewData : { 24 | component : this 25 | } 26 | }) 27 | 28 | return oView 29 | 30 | }, 31 | 32 | init: function () { 33 | let model = this.getModel("config") 34 | let cmd = UriParameters.fromQuery(window.location.search).get("cmd") 35 | if (!cmd) { 36 | cmd = window.location.hash.substr(1) 37 | } 38 | model.setData({cmd: cmd}) 39 | this.superInit() 40 | } 41 | 42 | 43 | }) 44 | }) -------------------------------------------------------------------------------- /app/resources/tables/controller/basic-ui.controller.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | /*eslint-env es6 */ 3 | "use strict"; 4 | sap.ui.define([ 5 | "sap/hanacli/tables/controller/App.controller" 6 | ], 7 | function (AppController) { 8 | 9 | return AppController.extend("sap.hanacli.tables.controller.basic-ui", { 10 | 11 | onInit: function () { 12 | 13 | this.onAppInit() 14 | this.setFilterAsContains("Schema") 15 | }, 16 | 17 | }) 18 | } 19 | ) -------------------------------------------------------------------------------- /app/resources/tables/controller/containers-ui.controller.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | /*eslint-env es6 */ 3 | "use strict"; 4 | sap.ui.define([ 5 | "sap/hanacli/tables/controller/App.controller" 6 | ], 7 | function (AppController) { 8 | 9 | return AppController.extend("sap.hanacli.tables.controller.containers-ui", { 10 | 11 | onInit: function () { 12 | 13 | this.onAppInit() 14 | 15 | }, 16 | 17 | }) 18 | } 19 | ) -------------------------------------------------------------------------------- /app/resources/tables/controller/functions-ui.controller.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | /*eslint-env es6 */ 3 | "use strict"; 4 | sap.ui.define([ 5 | "sap/hanacli/tables/controller/App.controller" 6 | ], 7 | function (AppController) { 8 | 9 | return AppController.extend("sap.hanacli.tables.controller.functions-ui", { 10 | 11 | onInit: function () { 12 | 13 | this.onAppInit() 14 | this.setFilterAsContains("Schema") 15 | this.setFilterAsContains("Function") 16 | 17 | }, 18 | 19 | }) 20 | } 21 | ) -------------------------------------------------------------------------------- /app/resources/tables/controller/schemas-ui.controller.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | /*eslint-env es6 */ 3 | "use strict"; 4 | sap.ui.define([ 5 | "sap/hanacli/tables/controller/App.controller" 6 | ], 7 | function (AppController) { 8 | 9 | return AppController.extend("sap.hanacli.tables.controller.schemas-ui", { 10 | 11 | onInit: function () { 12 | 13 | this.onAppInit() 14 | this.setFilterAsContains("Schema") 15 | 16 | }, 17 | 18 | }) 19 | } 20 | ) -------------------------------------------------------------------------------- /app/resources/tables/controller/tables-ui.controller.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | /*eslint-env es6 */ 3 | "use strict"; 4 | sap.ui.define([ 5 | "sap/hanacli/tables/controller/App.controller" 6 | ], 7 | function (AppController) { 8 | 9 | return AppController.extend("sap.hanacli.tables.controller.tables-ui", { 10 | 11 | onInit: function () { 12 | 13 | this.onAppInit() 14 | this.setFilterAsContains("Schema") 15 | this.setFilterAsContains("Table") 16 | 17 | }, 18 | 19 | }) 20 | } 21 | ) -------------------------------------------------------------------------------- /app/resources/tables/controller/views-ui.controller.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | /*eslint-env es6 */ 3 | "use strict"; 4 | sap.ui.define([ 5 | "sap/hanacli/tables/controller/App.controller" 6 | ], 7 | function (AppController) { 8 | 9 | return AppController.extend("sap.hanacli.tables.controller.views-ui", { 10 | 11 | onInit: function () { 12 | 13 | this.onAppInit() 14 | this.setFilterAsContains("Schema") 15 | this.setFilterAsContains("View") 16 | 17 | }, 18 | 19 | }) 20 | } 21 | ) -------------------------------------------------------------------------------- /app/resources/tables/i18n/i18n.properties: -------------------------------------------------------------------------------- 1 | title=Title 2 | appTitle=hana-cli 3 | appDescription=test -------------------------------------------------------------------------------- /app/resources/tables/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Tables 9 | 24 | 29 | 30 | 31 |
32 | 33 | -------------------------------------------------------------------------------- /app/resources/tables/view/containers-ui.view.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | <ToolbarSpacer /> 17 | <Button icon="sap-icon://settings" tooltip="{i18nReuse>gui.targetDetails}" press=".openUrl('/ui/#systeminfo-ui', true)" /> 18 | </Toolbar> 19 | 20 | <Label text="{i18nReuse>containerGroup}" required="true"/> 21 | <Input id="containerGroup" value="{/containerGroup}" > 22 | </Input> 23 | <Label text="{i18nReuse>container}" required="true"/> 24 | <Input id="container" value="{/container}"> 25 | </Input> 26 | <Label text="{i18nReuse>limit}" required="true"/> 27 | <Input value="{/limit}" /> 28 | 29 | <core:Fragment fragmentName="sap.hanacli.common.view.Connection" type="XML"/> 30 | <core:Fragment fragmentName="sap.hanacli.common.view.Debug" type="XML"/> 31 | 32 | </f:content> 33 | </f:SimpleForm> 34 | 35 | 36 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.table" type="XML"/> 37 | </ScrollContainer> 38 | </mvc:View> -------------------------------------------------------------------------------- /app/resources/tables/view/dataTypes-ui.view.xml: -------------------------------------------------------------------------------- 1 | <mvc:View controllerName="sap.hanacli.tables.controller.basic-ui" height="100%" width="100%" 2 | xmlns:l="sap.ui.layout" 3 | xmlns:f="sap.ui.layout.form" 4 | xmlns:mvc="sap.ui.core.mvc" 5 | xmlns:core="sap.ui.core" 6 | xmlns="sap.m"> 7 | <ScrollContainer height="100%" width="100%" vertical="true" focusable="true"> 8 | <f:SimpleForm id="SimpleFormToolbar" editable="true" layout="ResponsiveGridLayout" adjustLabelSpan="true" singleContainerFullSize="false" ariaLabelledBy="Title1"> 9 | <f:toolbar> 10 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.toolbar" type="XML"/> 11 | </f:toolbar> 12 | <f:content> 13 | 14 | 15 | <core:Fragment fragmentName="sap.hanacli.common.view.Connection" type="XML"/> 16 | <core:Fragment fragmentName="sap.hanacli.common.view.Debug" type="XML"/> 17 | 18 | </f:content> 19 | </f:SimpleForm> 20 | 21 | 22 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.table" type="XML"/> 23 | </ScrollContainer> 24 | </mvc:View> -------------------------------------------------------------------------------- /app/resources/tables/view/featureUsage-ui.view.xml: -------------------------------------------------------------------------------- 1 | <mvc:View controllerName="sap.hanacli.tables.controller.basic-ui" height="100%" width="100%" 2 | xmlns:l="sap.ui.layout" 3 | xmlns:f="sap.ui.layout.form" 4 | xmlns:mvc="sap.ui.core.mvc" 5 | xmlns:core="sap.ui.core" 6 | xmlns="sap.m"> 7 | <ScrollContainer height="100%" width="100%" vertical="true" focusable="true"> 8 | <f:SimpleForm id="SimpleFormToolbar" editable="true" layout="ResponsiveGridLayout" adjustLabelSpan="true" singleContainerFullSize="false" ariaLabelledBy="Title1"> 9 | <f:toolbar> 10 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.toolbar" type="XML"/> 11 | </f:toolbar> 12 | <f:content> 13 | 14 | 15 | <core:Fragment fragmentName="sap.hanacli.common.view.Connection" type="XML"/> 16 | <core:Fragment fragmentName="sap.hanacli.common.view.Debug" type="XML"/> 17 | 18 | </f:content> 19 | </f:SimpleForm> 20 | 21 | 22 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.table" type="XML"/> 23 | </ScrollContainer> 24 | </mvc:View> -------------------------------------------------------------------------------- /app/resources/tables/view/features-ui.view.xml: -------------------------------------------------------------------------------- 1 | <mvc:View controllerName="sap.hanacli.tables.controller.basic-ui" height="100%" width="100%" 2 | xmlns:l="sap.ui.layout" 3 | xmlns:f="sap.ui.layout.form" 4 | xmlns:mvc="sap.ui.core.mvc" 5 | xmlns:core="sap.ui.core" 6 | xmlns="sap.m"> 7 | <ScrollContainer height="100%" width="100%" vertical="true" focusable="true"> 8 | <f:SimpleForm id="SimpleFormToolbar" editable="true" layout="ResponsiveGridLayout" adjustLabelSpan="true" singleContainerFullSize="false" ariaLabelledBy="Title1"> 9 | <f:toolbar> 10 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.toolbar" type="XML"/> 11 | </f:toolbar> 12 | <f:content> 13 | 14 | 15 | <core:Fragment fragmentName="sap.hanacli.common.view.Connection" type="XML"/> 16 | <core:Fragment fragmentName="sap.hanacli.common.view.Debug" type="XML"/> 17 | 18 | </f:content> 19 | </f:SimpleForm> 20 | 21 | 22 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.table" type="XML"/> 23 | </ScrollContainer> 24 | </mvc:View> -------------------------------------------------------------------------------- /app/resources/tables/view/functions-ui.view.xml: -------------------------------------------------------------------------------- 1 | <mvc:View controllerName="sap.hanacli.tables.controller.functions-ui" height="100%" width="100%" 2 | xmlns:l="sap.ui.layout" 3 | xmlns:f="sap.ui.layout.form" 4 | xmlns:mvc="sap.ui.core.mvc" 5 | xmlns:core="sap.ui.core" 6 | xmlns="sap.m"> 7 | <ScrollContainer height="100%" width="100%" vertical="true" focusable="true"> 8 | <f:SimpleForm id="SimpleFormToolbar" editable="true" layout="ResponsiveGridLayout" adjustLabelSpan="true" singleContainerFullSize="false" ariaLabelledBy="Title1"> 9 | <f:toolbar> 10 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.toolbar" type="XML"/> 11 | </f:toolbar> 12 | <f:content> 13 | 14 | <Toolbar ariaLabelledBy="Title2"> 15 | <Title id="Title2" text="{i18nReuse>gui.target}"/> 16 | <ToolbarSpacer /> 17 | <Button icon="sap-icon://settings" tooltip="{i18nReuse>gui.targetDetails}" press=".openUrl('/ui/#systeminfo-ui', true)" /> 18 | </Toolbar> 19 | 20 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.schema" type="XML"/> 21 | 22 | <Label text="{i18nReuse>function}" required="true"/> 23 | <Input id="Function" value="{/function}" showSuggestion="true" suggest="loadFunctionFilter"> 24 | </Input> 25 | <Label text="{i18nReuse>limit}" required="true"/> 26 | <Input value="{/limit}" /> 27 | 28 | <core:Fragment fragmentName="sap.hanacli.common.view.Connection" type="XML"/> 29 | <core:Fragment fragmentName="sap.hanacli.common.view.Debug" type="XML"/> 30 | 31 | </f:content> 32 | </f:SimpleForm> 33 | 34 | 35 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.table" type="XML"/> 36 | </ScrollContainer> 37 | </mvc:View> -------------------------------------------------------------------------------- /app/resources/tables/view/hdi-ui.view.xml: -------------------------------------------------------------------------------- 1 | <mvc:View controllerName="sap.hanacli.tables.controller.basic-ui" height="100%" width="100%" 2 | xmlns:l="sap.ui.layout" 3 | xmlns:f="sap.ui.layout.form" 4 | xmlns:mvc="sap.ui.core.mvc" 5 | xmlns:core="sap.ui.core" 6 | xmlns="sap.m"> 7 | <ScrollContainer height="100%" width="100%" vertical="true" focusable="true"> 8 | <f:SimpleForm id="SimpleFormToolbar" editable="true" layout="ResponsiveGridLayout" adjustLabelSpan="true" singleContainerFullSize="false" ariaLabelledBy="Title1"> 9 | <f:toolbar> 10 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.toolbar" type="XML"/> 11 | </f:toolbar> 12 | <f:content> 13 | 14 | 15 | <Toolbar ariaLabelledBy="Title2"> 16 | <Title id="Title2" text="{i18nReuse>gui.target}"/> 17 | <ToolbarSpacer /> 18 | <Button icon="sap-icon://settings" tooltip="{i18nReuse>gui.targetDetails}" press=".openUrl('/ui/#systeminfo-ui', true)" /> 19 | </Toolbar> 20 | 21 | <Label text="{i18nReuse>cfxs}" /> 22 | <CheckBox selected="{/cf}" /> 23 | 24 | <core:Fragment fragmentName="sap.hanacli.common.view.Connection" type="XML"/> 25 | <core:Fragment fragmentName="sap.hanacli.common.view.Debug" type="XML"/> 26 | 27 | </f:content> 28 | </f:SimpleForm> 29 | 30 | 31 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.table" type="XML"/> 32 | </ScrollContainer> 33 | </mvc:View> -------------------------------------------------------------------------------- /app/resources/tables/view/indexes-ui.view.xml: -------------------------------------------------------------------------------- 1 | <mvc:View controllerName="sap.hanacli.tables.controller.basic-ui" height="100%" width="100%" 2 | xmlns:l="sap.ui.layout" 3 | xmlns:f="sap.ui.layout.form" 4 | xmlns:mvc="sap.ui.core.mvc" 5 | xmlns:core="sap.ui.core" 6 | xmlns="sap.m"> 7 | <ScrollContainer height="100%" width="100%" vertical="true" focusable="true"> 8 | <f:SimpleForm id="SimpleFormToolbar" editable="true" layout="ResponsiveGridLayout" adjustLabelSpan="true" singleContainerFullSize="false" ariaLabelledBy="Title1"> 9 | <f:toolbar> 10 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.toolbar" type="XML"/> 11 | </f:toolbar> 12 | <f:content> 13 | 14 | <Toolbar ariaLabelledBy="Title2"> 15 | <Title id="Title2" text="{i18nReuse>gui.target}"/> 16 | <ToolbarSpacer /> 17 | <Button icon="sap-icon://settings" tooltip="{i18nReuse>gui.targetDetails}" press=".openUrl('/ui/#systeminfo-ui', true)" /> 18 | </Toolbar> 19 | 20 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.schema" type="XML"/> 21 | 22 | <Label text="{i18nReuse>indexes}" required="true"/> 23 | <Input id="Indexes" value="{/indexes}" > 24 | </Input> 25 | <Label text="{i18nReuse>limit}" required="true"/> 26 | <Input value="{/limit}" /> 27 | 28 | <core:Fragment fragmentName="sap.hanacli.common.view.Connection" type="XML"/> 29 | <core:Fragment fragmentName="sap.hanacli.common.view.Debug" type="XML"/> 30 | 31 | </f:content> 32 | </f:SimpleForm> 33 | 34 | 35 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.table" type="XML"/> 36 | </ScrollContainer> 37 | </mvc:View> -------------------------------------------------------------------------------- /app/resources/tables/view/reuse/schema.fragment.xml: -------------------------------------------------------------------------------- 1 | <core:FragmentDefinition xmlns="sap.m" 2 | xmlns:core="sap.ui.core"> 3 | 4 | <Label text="{i18nReuse>scheam}" required="true" /> 5 | <Input id="Schema" value="{/schema}" valueLiveUpdate="true" showSuggestion="true" suggest="loadSchemaFilter"> 6 | </Input> 7 | <Input value="{hanaModel>/user/0/CURRENT_SCHEMA}" visible="{= ${/schema} === '**CURRENT_SCHEMA**'}" editable="false"/> 8 | 9 | </core:FragmentDefinition> -------------------------------------------------------------------------------- /app/resources/tables/view/reuse/table.fragment.xml: -------------------------------------------------------------------------------- 1 | <core:FragmentDefinition xmlns="sap.m" 2 | xmlns:core="sap.ui.core" 3 | xmlns:table="sap.ui.table"> 4 | 5 | <table:Table id="table" selectionMode="MultiToggle" visibleRowCount="10" enableSelectAll="false" rows="{resultsModel>/rows}" threshold="15" enableBusyIndicator="true" ariaLabelledBy="TableTitle"> 6 | <table:extension> 7 | <OverflowToolbar style="Clear"> 8 | <Title id="TableTitle" text="{i18nReuse>gui.cmdResults}"/> 9 | <ToolbarSpacer/> 10 | <Button icon="sap-icon://excel-attachment" tooltip="{i18nReuse>gui.DownloadExcel}" press="downloadExcel" /> 11 | </OverflowToolbar> 12 | </table:extension> 13 | <table:noData> 14 | <BusyIndicator class="sapUiMediumMargin"/> 15 | </table:noData> 16 | </table:Table> 17 | 18 | </core:FragmentDefinition> -------------------------------------------------------------------------------- /app/resources/tables/view/reuse/toolbar.fragment.xml: -------------------------------------------------------------------------------- 1 | <core:FragmentDefinition xmlns:mvc="sap.ui.core.mvc" 2 | xmlns:core="sap.ui.core" 3 | xmlns="sap.m"> 4 | <Toolbar id="TB1"> 5 | <Title id="Title1" text="{i18n>appTitle}: {config>/cmd}"/> 6 | <ToolbarSpacer /> 7 | <Button icon="sap-icon://refresh" tooltip="{i18nReuse>gui.execute}" press="executeCmd" /> 8 | </Toolbar> 9 | </core:FragmentDefinition> -------------------------------------------------------------------------------- /app/resources/tables/view/sbss-ui.view.xml: -------------------------------------------------------------------------------- 1 | <mvc:View controllerName="sap.hanacli.tables.controller.basic-ui" height="100%" width="100%" 2 | xmlns:l="sap.ui.layout" 3 | xmlns:f="sap.ui.layout.form" 4 | xmlns:mvc="sap.ui.core.mvc" 5 | xmlns:core="sap.ui.core" 6 | xmlns="sap.m"> 7 | <ScrollContainer height="100%" width="100%" vertical="true" focusable="true"> 8 | <f:SimpleForm id="SimpleFormToolbar" editable="true" layout="ResponsiveGridLayout" adjustLabelSpan="true" singleContainerFullSize="false" ariaLabelledBy="Title1"> 9 | <f:toolbar> 10 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.toolbar" type="XML"/> 11 | </f:toolbar> 12 | <f:content> 13 | 14 | 15 | <Toolbar ariaLabelledBy="Title2"> 16 | <Title id="Title2" text="{i18nReuse>gui.target}"/> 17 | <ToolbarSpacer /> 18 | <Button icon="sap-icon://settings" tooltip="{i18nReuse>gui.targetDetails}" press=".openUrl('/ui/#systeminfo-ui', true)" /> 19 | </Toolbar> 20 | 21 | <Label text="{i18nReuse>cfxs}" /> 22 | <CheckBox selected="{/cf}" /> 23 | 24 | <core:Fragment fragmentName="sap.hanacli.common.view.Connection" type="XML"/> 25 | <core:Fragment fragmentName="sap.hanacli.common.view.Debug" type="XML"/> 26 | 27 | </f:content> 28 | </f:SimpleForm> 29 | 30 | 31 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.table" type="XML"/> 32 | </ScrollContainer> 33 | </mvc:View> -------------------------------------------------------------------------------- /app/resources/tables/view/schemaInstances-ui.view.xml: -------------------------------------------------------------------------------- 1 | <mvc:View controllerName="sap.hanacli.tables.controller.basic-ui" height="100%" width="100%" 2 | xmlns:l="sap.ui.layout" 3 | xmlns:f="sap.ui.layout.form" 4 | xmlns:mvc="sap.ui.core.mvc" 5 | xmlns:core="sap.ui.core" 6 | xmlns="sap.m"> 7 | <ScrollContainer height="100%" width="100%" vertical="true" focusable="true"> 8 | <f:SimpleForm id="SimpleFormToolbar" editable="true" layout="ResponsiveGridLayout" adjustLabelSpan="true" singleContainerFullSize="false" ariaLabelledBy="Title1"> 9 | <f:toolbar> 10 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.toolbar" type="XML"/> 11 | </f:toolbar> 12 | <f:content> 13 | 14 | 15 | <Toolbar ariaLabelledBy="Title2"> 16 | <Title id="Title2" text="{i18nReuse>gui.target}"/> 17 | <ToolbarSpacer /> 18 | <Button icon="sap-icon://settings" tooltip="{i18nReuse>gui.targetDetails}" press=".openUrl('/ui/#systeminfo-ui', true)" /> 19 | </Toolbar> 20 | 21 | <Label text="{i18nReuse>cfxs}" /> 22 | <CheckBox selected="{/cf}" /> 23 | 24 | <core:Fragment fragmentName="sap.hanacli.common.view.Connection" type="XML"/> 25 | <core:Fragment fragmentName="sap.hanacli.common.view.Debug" type="XML"/> 26 | 27 | </f:content> 28 | </f:SimpleForm> 29 | 30 | 31 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.table" type="XML"/> 32 | </ScrollContainer> 33 | </mvc:View> -------------------------------------------------------------------------------- /app/resources/tables/view/schemas-ui.view.xml: -------------------------------------------------------------------------------- 1 | <mvc:View controllerName="sap.hanacli.tables.controller.schemas-ui" height="100%" width="100%" 2 | xmlns:l="sap.ui.layout" 3 | xmlns:f="sap.ui.layout.form" 4 | xmlns:mvc="sap.ui.core.mvc" 5 | xmlns:core="sap.ui.core" 6 | xmlns="sap.m"> 7 | <ScrollContainer height="100%" width="100%" vertical="true" focusable="true"> 8 | <f:SimpleForm id="SimpleFormToolbar" editable="true" layout="ResponsiveGridLayout" adjustLabelSpan="true" singleContainerFullSize="false" ariaLabelledBy="Title1"> 9 | <f:toolbar> 10 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.toolbar" type="XML"/> 11 | </f:toolbar> 12 | <f:content> 13 | 14 | <Toolbar ariaLabelledBy="Title2"> 15 | <Title id="Title2" text="{i18nReuse>gui.target}"/> 16 | <ToolbarSpacer /> 17 | <Button icon="sap-icon://settings" tooltip="{i18nReuse>gui.targetDetails}" press=".openUrl('/ui/#systeminfo-ui', true)" /> 18 | </Toolbar> 19 | 20 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.schema" type="XML"/> 21 | 22 | <Label text="{i18nReuse>limit}" required="true"/> 23 | <Input value="{/limit}" /> 24 | <Label text="{i18nReuse>allSchemas}" /> 25 | <CheckBox selected="{/all}" /> 26 | 27 | <core:Fragment fragmentName="sap.hanacli.common.view.Connection" type="XML"/> 28 | <core:Fragment fragmentName="sap.hanacli.common.view.Debug" type="XML"/> 29 | 30 | </f:content> 31 | </f:SimpleForm> 32 | 33 | 34 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.table" type="XML"/> 35 | </ScrollContainer> 36 | </mvc:View> -------------------------------------------------------------------------------- /app/resources/tables/view/securestore-ui.view.xml: -------------------------------------------------------------------------------- 1 | <mvc:View controllerName="sap.hanacli.tables.controller.basic-ui" height="100%" width="100%" 2 | xmlns:l="sap.ui.layout" 3 | xmlns:f="sap.ui.layout.form" 4 | xmlns:mvc="sap.ui.core.mvc" 5 | xmlns:core="sap.ui.core" 6 | xmlns="sap.m"> 7 | <ScrollContainer height="100%" width="100%" vertical="true" focusable="true"> 8 | <f:SimpleForm id="SimpleFormToolbar" editable="true" layout="ResponsiveGridLayout" adjustLabelSpan="true" singleContainerFullSize="false" ariaLabelledBy="Title1"> 9 | <f:toolbar> 10 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.toolbar" type="XML"/> 11 | </f:toolbar> 12 | <f:content> 13 | 14 | 15 | <Toolbar ariaLabelledBy="Title2"> 16 | <Title id="Title2" text="{i18nReuse>gui.target}"/> 17 | <ToolbarSpacer /> 18 | <Button icon="sap-icon://settings" tooltip="{i18nReuse>gui.targetDetails}" press=".openUrl('/ui/#systeminfo-ui', true)" /> 19 | </Toolbar> 20 | 21 | <Label text="{i18nReuse>cfxs}" /> 22 | <CheckBox selected="{/cf}" /> 23 | 24 | <core:Fragment fragmentName="sap.hanacli.common.view.Connection" type="XML"/> 25 | <core:Fragment fragmentName="sap.hanacli.common.view.Debug" type="XML"/> 26 | 27 | </f:content> 28 | </f:SimpleForm> 29 | 30 | 31 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.table" type="XML"/> 32 | </ScrollContainer> 33 | </mvc:View> -------------------------------------------------------------------------------- /app/resources/tables/view/tables-ui.view.xml: -------------------------------------------------------------------------------- 1 | <mvc:View controllerName="sap.hanacli.tables.controller.tables-ui" height="100%" width="100%" 2 | xmlns:l="sap.ui.layout" 3 | xmlns:f="sap.ui.layout.form" 4 | xmlns:mvc="sap.ui.core.mvc" 5 | xmlns:core="sap.ui.core" 6 | xmlns="sap.m"> 7 | <ScrollContainer id="scTable" height="100%" width="100%" vertical="true" focusable="true"> 8 | <f:SimpleForm id="SimpleFormToolbar" editable="true" layout="ResponsiveGridLayout" adjustLabelSpan="true" singleContainerFullSize="false" ariaLabelledBy="Title1"> 9 | <f:toolbar> 10 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.toolbar" type="XML"/> 11 | </f:toolbar> 12 | <f:content> 13 | 14 | <Toolbar id="tbTable" ariaLabelledBy="Title2"> 15 | <Title id="Title2" text="{i18nReuse>gui.target}"/> 16 | <ToolbarSpacer id="tbSpacerTable" /> 17 | <Button id="btnTargetDetails" icon="sap-icon://settings" tooltip="{i18nReuse>gui.targetDetails}" press=".openUrl('/ui/#systeminfo-ui', true)" /> 18 | </Toolbar> 19 | 20 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.schema" type="XML"/> 21 | 22 | <Label id="lblTable" text="{i18nReuse>table}" required="true"/> 23 | <Input id="Table" value="{/table}" showSuggestion="true" suggest="loadTableFilter"> 24 | </Input> 25 | <Label id="lblLimit" text="{i18nReuse>limit}" required="true"/> 26 | <Input id="Limit" value="{/limit}" /> 27 | 28 | <core:Fragment fragmentName="sap.hanacli.common.view.Connection" type="XML"/> 29 | <core:Fragment fragmentName="sap.hanacli.common.view.Debug" type="XML"/> 30 | 31 | </f:content> 32 | </f:SimpleForm> 33 | 34 | 35 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.table" type="XML"/> 36 | </ScrollContainer> 37 | </mvc:View> -------------------------------------------------------------------------------- /app/resources/tables/view/ups-ui.view.xml: -------------------------------------------------------------------------------- 1 | <mvc:View controllerName="sap.hanacli.tables.controller.basic-ui" height="100%" width="100%" 2 | xmlns:l="sap.ui.layout" 3 | xmlns:f="sap.ui.layout.form" 4 | xmlns:mvc="sap.ui.core.mvc" 5 | xmlns:core="sap.ui.core" 6 | xmlns="sap.m"> 7 | <ScrollContainer height="100%" width="100%" vertical="true" focusable="true"> 8 | <f:SimpleForm id="SimpleFormToolbar" editable="true" layout="ResponsiveGridLayout" adjustLabelSpan="true" singleContainerFullSize="false" ariaLabelledBy="Title1"> 9 | <f:toolbar> 10 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.toolbar" type="XML"/> 11 | </f:toolbar> 12 | <f:content> 13 | 14 | 15 | <Toolbar ariaLabelledBy="Title2"> 16 | <Title id="Title2" text="{i18nReuse>gui.target}"/> 17 | <ToolbarSpacer /> 18 | <Button icon="sap-icon://settings" tooltip="{i18nReuse>gui.targetDetails}" press=".openUrl('/ui/#systeminfo-ui', true)" /> 19 | </Toolbar> 20 | 21 | <Label text="{i18nReuse>cfxs}" /> 22 | <CheckBox selected="{/cf}" /> 23 | 24 | <core:Fragment fragmentName="sap.hanacli.common.view.Connection" type="XML"/> 25 | <core:Fragment fragmentName="sap.hanacli.common.view.Debug" type="XML"/> 26 | 27 | </f:content> 28 | </f:SimpleForm> 29 | 30 | 31 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.table" type="XML"/> 32 | </ScrollContainer> 33 | </mvc:View> -------------------------------------------------------------------------------- /app/resources/tables/view/views-ui.view.xml: -------------------------------------------------------------------------------- 1 | <mvc:View controllerName="sap.hanacli.tables.controller.views-ui" height="100%" width="100%" 2 | xmlns:l="sap.ui.layout" 3 | xmlns:f="sap.ui.layout.form" 4 | xmlns:mvc="sap.ui.core.mvc" 5 | xmlns:core="sap.ui.core" 6 | xmlns="sap.m"> 7 | <ScrollContainer height="100%" width="100%" vertical="true" focusable="true"> 8 | <f:SimpleForm id="SimpleFormToolbar" editable="true" layout="ResponsiveGridLayout" adjustLabelSpan="true" singleContainerFullSize="false" ariaLabelledBy="Title1"> 9 | <f:toolbar> 10 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.toolbar" type="XML"/> 11 | </f:toolbar> 12 | <f:content> 13 | 14 | <Toolbar ariaLabelledBy="Title2"> 15 | <Title id="Title2" text="{i18nReuse>gui.target}"/> 16 | <ToolbarSpacer /> 17 | <Button icon="sap-icon://settings" tooltip="{i18nReuse>gui.targetDetails}" press=".openUrl('/ui/#systeminfo-ui', true)" /> 18 | </Toolbar> 19 | 20 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.schema" type="XML"/> 21 | 22 | <Label text="{i18nReuse>view}" required="true"/> 23 | <Input id="View" value="{/view}" showSuggestion="true" suggest="loadViewFilter"> 24 | </Input> 25 | <Label text="{i18nReuse>limit}" required="true"/> 26 | <Input value="{/limit}" /> 27 | 28 | <core:Fragment fragmentName="sap.hanacli.common.view.Connection" type="XML"/> 29 | <core:Fragment fragmentName="sap.hanacli.common.view.Debug" type="XML"/> 30 | 31 | </f:content> 32 | </f:SimpleForm> 33 | 34 | 35 | <core:Fragment fragmentName="sap.hanacli.tables.view.reuse.table" type="XML"/> 36 | </ScrollContainer> 37 | </mvc:View> -------------------------------------------------------------------------------- /app/ui5-local.yaml: -------------------------------------------------------------------------------- 1 | specVersion: '2.0' 2 | metadata: 3 | name: 'test1' 4 | type: application 5 | framework: 6 | name: SAPUI5 7 | version: '1.95.0' 8 | libraries: 9 | - name: sap.f 10 | - name: sap.m 11 | - name: sap.suite.ui.generic.template 12 | - name: sap.ui.comp 13 | - name: sap.ui.core 14 | - name: sap.ui.generic.app 15 | - name: sap.ui.table 16 | - name: sap.ushell 17 | - name: themelib_sap_fiori_3 18 | server: 19 | customMiddleware: 20 | - name: fiori-tools-proxy 21 | afterMiddleware: compression 22 | configuration: 23 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted 24 | backend: 25 | - path: /sap/opu/odata 26 | url: http://localhost 27 | - name: fiori-tools-appreload 28 | afterMiddleware: compression 29 | configuration: 30 | port: 35729 31 | path: webapp 32 | -------------------------------------------------------------------------------- /app/ui5.yaml: -------------------------------------------------------------------------------- 1 | specVersion: '1.0' 2 | metadata: 3 | name: 'test1' 4 | type: application 5 | ui5Theme: sap_fiori_3_dark 6 | server: 7 | customMiddleware: 8 | - name: fiori-tools-proxy 9 | afterMiddleware: compression 10 | configuration: 11 | ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted 12 | backend: 13 | - path: /sap/opu/odata 14 | url: http://localhost 15 | ui5: 16 | path: 17 | - /resources 18 | - /test-resources 19 | url: https://ui5.sap.com 20 | version: # The UI5 version, for instance, 1.78.1. Empty means latest version 21 | - name: fiori-tools-appreload 22 | afterMiddleware: compression 23 | configuration: 24 | port: 35729 25 | path: webapp 26 | -------------------------------------------------------------------------------- /bin/UI.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'UI' 5 | export const aliases = ['ui', 'gui', 'GUI', 'launchpad', 'LaunchPad', 'launchPad'] 6 | export const describe = base.bundle.getText("UI") 7 | export const builder = base.getBuilder({}, false) 8 | export function handler (argv) { 9 | base.promptHandler(argv, UI, {}) 10 | } 11 | export async function UI(prompts){ 12 | base.debug('UI') 13 | try { 14 | base.setPrompts(prompts) 15 | await base.webServerSetup('/ui/#Shell-home') 16 | return base.end() 17 | } catch (error) { 18 | base.error(error) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /bin/activateHDI.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'activateHDI [tenant]' 5 | export const aliases = ['ahdi', 'ah'] 6 | export const describe = base.bundle.getText("activateHDI") 7 | 8 | export const builder = base.getBuilder({ 9 | tenant: { 10 | alias: ['t', 'Tenant'], 11 | type: 'string', 12 | desc: base.bundle.getText("tenant") 13 | } 14 | }) 15 | 16 | export function handler (argv) { 17 | base.promptHandler(argv, activate, { 18 | tenant: { 19 | description: base.bundle.getText("tenant"), 20 | type: 'string', 21 | required: true 22 | } 23 | }) 24 | } 25 | 26 | export async function activate(prompts) { 27 | base.debug('activate') 28 | try { 29 | base.setPrompts(prompts) 30 | const dbStatus = await base.createDBConnection() 31 | let results = await dbStatus.execSQL( 32 | `DO 33 | BEGIN 34 | DECLARE dbName NVARCHAR(25) = '${prompts.tenant}'; 35 | -- Start diserver 36 | DECLARE diserverCount INT = 0; 37 | SELECT COUNT(*) INTO diserverCount FROM SYS_DATABASES.M_SERVICES WHERE SERVICE_NAME = 'diserver' AND DATABASE_NAME = :dbName AND ACTIVE_STATUS = 'YES'; 38 | IF diserverCount = 0 THEN 39 | EXEC 'ALTER DATABASE ' || :dbName || ' ADD ''diserver'''; 40 | END IF; 41 | END;`) 42 | console.table(results) 43 | return base.end() 44 | } catch (error) { 45 | base.error(error) 46 | } 47 | } -------------------------------------------------------------------------------- /bin/btpSubs.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | import * as btp from '../utils/btp.js' 4 | const colors = base.colors 5 | 6 | export const command = 'sub' 7 | export const aliases = ['subs', 'Sub', 'Subs', 'btpsub', 'btpsubs', 'btpSub', 'btpSubs', 'btpsubscriptions', 'btpSubscriptions'] 8 | export const describe = base.bundle.getText("btpSub") 9 | 10 | export const builder = base.getBuilder({}, false) 11 | 12 | 13 | export async function handler(argv) { 14 | base.promptHandler(argv, getSubs, {}) 15 | } 16 | 17 | export async function getSubs(prompts) { 18 | base.debug('getSubs') 19 | base.startSpinnerInt() 20 | base.debug(prompts) 21 | try { 22 | base.setPrompts(prompts) 23 | 24 | let subs = await btp.getBTPSubscriptions() 25 | base.stopSpinnerInt() 26 | const subscribed = 'SUBSCRIBED' 27 | for (let item of subs.applications) { 28 | if (item.state === subscribed) { 29 | console.log(item.displayName) 30 | if (item.subscriptionUrl) { 31 | console.log(colors.blue(item.subscriptionUrl)) 32 | } 33 | } 34 | } 35 | 36 | return base.end() 37 | } catch (error) { 38 | base.error(error) 39 | } 40 | } -------------------------------------------------------------------------------- /bin/certificates.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'certificates' 5 | export const aliases = ['cert', "certs"] 6 | export const describe = base.bundle.getText("certificates") 7 | 8 | export const builder = base.getBuilder({}) 9 | 10 | export function handler (argv) { 11 | base.promptHandler(argv, certs, {}) 12 | } 13 | 14 | export async function certs(prompts) { 15 | base.debug('certs') 16 | try { 17 | base.setPrompts(prompts) 18 | const db = await base.createDBConnection() 19 | 20 | let results = await db.execSQL(`SELECT TOP 100 * FROM "CERTIFICATES"`) 21 | base.outputTableFancy(results) 22 | return base.end() 23 | } catch (error) { 24 | base.error(error) 25 | } 26 | } -------------------------------------------------------------------------------- /bin/changeLog.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | import * as fs from 'fs' 4 | import * as path from 'path' 5 | import { fileURLToPath } from 'url' 6 | // @ts-ignore 7 | const __dirname = fileURLToPath(new URL('.', import.meta.url)) 8 | 9 | export const command = 'changes' 10 | export const aliases = ['chg', 'changeLog', 'changelog'] 11 | export const describe = base.bundle.getText("changes") 12 | 13 | export function handler() { 14 | getChangeLog() 15 | } 16 | 17 | export async function getChangeLog() { 18 | const [{ marked }, { default: TerminalRenderer }] = await 19 | Promise.all([ 20 | import('marked'), 21 | import('marked-terminal') 22 | ]) 23 | 24 | marked.setOptions({ 25 | // Define custom renderer 26 | renderer: new TerminalRenderer({ 27 | showSectionPrefix: false 28 | }) 29 | }) 30 | 31 | try { 32 | const data = fs.readFileSync(path.join(__dirname, '..', '/CHANGELOG.md'), 'utf8') 33 | console.log(marked(data)) 34 | } catch (err) { 35 | console.error(err) 36 | } 37 | } -------------------------------------------------------------------------------- /bin/changeLogUI.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'changesUI' 5 | export const aliases = ['chgUI', 'chgui', 'changeLogUI', 'changelogui'] 6 | export const describe = base.bundle.getText("changes") 7 | export function handler (argv) { 8 | base.promptHandler(argv, getChangeLog, {}) 9 | } 10 | 11 | export async function getChangeLog(prompts) { 12 | base.debug('changeLogUI') 13 | try { 14 | base.setPrompts(prompts) 15 | await base.webServerSetup('/docs/changelog') 16 | return base.end() 17 | } catch (error) { 18 | base.error(error) 19 | } 20 | } -------------------------------------------------------------------------------- /bin/containersUI.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | import * as containers from './containers.js' 4 | 5 | export const command = 'containersUI [containerGroup] [container]' 6 | export const aliases = ['containersui', 'contUI', 'listContainersUI', 'listcontainersui'] 7 | export const describe = containers.describe 8 | export const builder = containers.builder 9 | 10 | export function handler (argv) { 11 | base.promptHandler(argv, getContainers, containers.inputPrompts) 12 | } 13 | 14 | export async function getContainers(prompts) { 15 | base.debug('getContainersUI') 16 | try { 17 | base.setPrompts(prompts) 18 | await base.webServerSetup('/ui/#containers-ui') 19 | return base.end() 20 | } catch (error) { 21 | base.error(error) 22 | } 23 | } -------------------------------------------------------------------------------- /bin/copy2Env.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | import * as conn from "../utils/connections.js" 4 | import * as fs from 'fs' 5 | import * as xsenv from '@sap/xsenv' 6 | 7 | export const command = 'copy2Env' 8 | export const aliases = ['copyEnv', 'copyenv', 'copy2env'] 9 | export const describe = base.bundle.getText("copy2Env") 10 | 11 | export const builder = base.getBuilder({}) 12 | 13 | export function handler(argv) { 14 | base.promptHandler(argv, copy, {}) 15 | } 16 | 17 | export async function copy(prompts) { 18 | base.debug('copy') 19 | let envFile = conn.resolveEnv(prompts) 20 | xsenv.loadEnv(envFile) 21 | base.debug(process.env.VCAP_SERVICES) 22 | fs.writeFile(".env", `VCAP_SERVICES=${process.env.VCAP_SERVICES}`, async (err) => { 23 | if (err) { 24 | base.error(err) 25 | } 26 | console.log(base.bundle.getText("saved2")) 27 | return base.end() 28 | }) 29 | return base.end() 30 | } -------------------------------------------------------------------------------- /bin/createGroup.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'createGroup [group]' 5 | export const aliases = ['cg', 'cGrp'] 6 | export const describe = base.bundle.getText("createGroup") 7 | 8 | export const builder = base.getBuilder({ 9 | group: { 10 | alias: ['g', 'Group'], 11 | type: 'string', 12 | desc: base.bundle.getText("group") 13 | } 14 | }) 15 | 16 | export function handler (argv) { 17 | base.promptHandler(argv, activate, { 18 | group: { 19 | description: base.bundle.getText("group"), 20 | required: true 21 | } 22 | }) 23 | } 24 | 25 | export async function activate(prompts) { 26 | base.debug('activate') 27 | try { 28 | base.setPrompts(prompts) 29 | const db = await base.createDBConnection() 30 | 31 | let results = await db.execSQL( 32 | `CALL _SYS_DI.CREATE_CONTAINER_GROUP('${prompts.group}', _SYS_DI.T_NO_PARAMETERS, ?, ?, ?);`) 33 | console.table(results) 34 | 35 | return base.end() 36 | } catch (error) { 37 | base.error(error) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /bin/createXSAAdmin.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'createXSAAdmin [user] [password]' 5 | export const aliases = ['cXSAAdmin', 'cXSAA', 'cxsaadmin', 'cxsaa'] 6 | export const describe = base.bundle.getText("createXSAAdmin") 7 | 8 | export const builder = base.getBuilder({ 9 | user: { 10 | alias: ['u', 'User'], 11 | desc: base.bundle.getText("user") 12 | }, 13 | password: { 14 | alias: ['p', 'Password'], 15 | desc: base.bundle.getText("password") 16 | } 17 | }) 18 | 19 | export function handler (argv) { 20 | base.promptHandler(argv, activate, { 21 | user: { 22 | description: base.bundle.getText("user"), 23 | required: true 24 | }, 25 | password: { 26 | description: base.bundle.getText("password"), 27 | hidden: true, 28 | replace: '*', 29 | required: true 30 | } 31 | }) 32 | } 33 | 34 | export async function activate(prompts) { 35 | base.debug('activate') 36 | try { 37 | base.setPrompts(prompts) 38 | const dbStatus = await base.createDBConnection() 39 | 40 | let results = await dbStatus.execSQL(`CREATE USER ${prompts.user} PASSWORD "${prompts.password}" NO FORCE_FIRST_PASSWORD_CHANGE;`) 41 | console.table(results) 42 | 43 | let resultsGrant = await dbStatus.execSQL( 44 | `ALTER USER ${prompts.user} DISABLE PASSWORD LIFETIME;`) 45 | console.table(resultsGrant) 46 | resultsGrant = await dbStatus.execSQL( 47 | `ALTER USER ${prompts.user} SET PARAMETER EMAIL ADDRESS = '${prompts.user}@sap.com';`) 48 | console.table(resultsGrant) 49 | resultsGrant = await dbStatus.execSQL( 50 | `ALTER USER ${prompts.user} SET PARAMETER XS_RC_XS_CONTROLLER_ADMIN = 'XS_CONTROLLER_ADMIN';`) 51 | console.table(resultsGrant) 52 | return base.end() 53 | } catch (error) { 54 | base.error(error) 55 | } 56 | } -------------------------------------------------------------------------------- /bin/dataTypes.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'dataTypes' 5 | export const aliases = ['dt', 'datatypes', 'dataType', 'datatype'] 6 | export const describe = base.bundle.getText("dataTypes") 7 | 8 | export const builder = base.getBuilder({}) 9 | export function handler (argv) { 10 | base.promptHandler(argv, dbStatus, {}) 11 | } 12 | 13 | export async function dbStatus(prompts) { 14 | base.debug('dbStatus') 15 | try { 16 | base.setPrompts(prompts) 17 | const dbStatus = await base.createDBConnection() 18 | 19 | let results = await dbStatus.execSQL(`SELECT TYPE_NAME, COLUMN_SIZE, CREATE_PARAMS FROM DATA_TYPES `) 20 | base.outputTableFancy(results) 21 | base.end() 22 | return results 23 | } catch (error) { 24 | base.error(error) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /bin/dataTypesUI.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | import * as dataTypes from './dataTypes.js' 4 | 5 | export const command = 'dataTypesUI' 6 | export const aliases = ['dtui', 'datatypesUI', 'dataTypeUI', 'datatypeui', 'datatypesui'] 7 | export const describe = dataTypes.describe 8 | 9 | export const builder = dataTypes.builder 10 | 11 | export function handler (argv) { 12 | base.promptHandler(argv, dbStatus, {}) 13 | } 14 | 15 | export async function dbStatus(prompts) { 16 | base.debug('getDataTypesUI') 17 | try { 18 | base.setPrompts(prompts) 19 | await base.webServerSetup('/ui/#dataTypes-ui') 20 | return base.end() 21 | } catch (error) { 22 | base.error(error) 23 | } 24 | } -------------------------------------------------------------------------------- /bin/dataVolumes.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'dataVolumes' 5 | export const aliases = ['dv', 'datavolumes'] 6 | export const describe = base.bundle.getText("dataVolumes") 7 | 8 | export const builder = base.getBuilder({}) 9 | export function handler (argv) { 10 | base.promptHandler(argv, dbStatus, {}) 11 | } 12 | 13 | export async function dbStatus(prompts) { 14 | base.debug('dbStatus') 15 | try { 16 | base.setPrompts(prompts) 17 | const dbStatus = await base.createDBConnection() 18 | 19 | let results = await dbStatus.execSQL( 20 | `SELECT * FROM M_DATA_VOLUMES`) 21 | base.outputTableFancy(results) 22 | 23 | results = await dbStatus.execSQL( 24 | `SELECT * FROM M_DATA_VOLUME_STATISTICS`) 25 | base.outputTableFancy(results) 26 | 27 | results = await dbStatus.execSQL( 28 | `SELECT * FROM M_DATA_VOLUME_PAGE_STATISTICS`) 29 | base.outputTableFancy(results) 30 | return base.end() 31 | } catch (error) { 32 | base.error(error) 33 | } 34 | } -------------------------------------------------------------------------------- /bin/disks.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'disks' 5 | export const aliases = ['di', 'Disks'] 6 | export const describe = base.bundle.getText("disks") 7 | 8 | export const builder = base.getBuilder({}) 9 | export function handler (argv) { 10 | base.promptHandler(argv, dbStatus, {}) 11 | } 12 | 13 | export async function dbStatus(prompts) { 14 | base.debug('dbStatus') 15 | try { 16 | base.setPrompts(prompts) 17 | const dbStatus = await base.createDBConnection() 18 | 19 | let results = await dbStatus.execSQL( 20 | `SELECT * FROM M_DISKS`) 21 | base.outputTableFancy(results) 22 | 23 | results = await dbStatus.execSQL( 24 | `SELECT * FROM M_DISK_USAGE`) 25 | base.outputTableFancy(results) 26 | return base.end() 27 | } catch (error) { 28 | base.error(error) 29 | } 30 | } -------------------------------------------------------------------------------- /bin/dropGroup.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'dropGroup [group]' 5 | export const aliases = ['dg', 'dropG'] 6 | export const describe = base.bundle.getText("dropGroup") 7 | 8 | export const builder = base.getBuilder({ 9 | group: { 10 | alias: ['g', 'Group'], 11 | type: 'string', 12 | desc: base.bundle.getText("group") 13 | } 14 | }) 15 | 16 | export function handler (argv) { 17 | base.promptHandler(argv, drop, { 18 | group: { 19 | description: base.bundle.getText("group"), 20 | required: true 21 | } 22 | }) 23 | } 24 | 25 | export async function drop(prompts) { 26 | base.debug('drop') 27 | try { 28 | base.setPrompts(prompts) 29 | const db = await base.createDBConnection() 30 | 31 | let results = await db.execSQL( 32 | `CALL _SYS_DI.DROP_CONTAINER_GROUP('${prompts.group}', _SYS_DI.T_NO_PARAMETERS, ?, ?, ?);`) 33 | console.table(results) 34 | 35 | return base.end() 36 | } catch (error) { 37 | base.error(error) 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /bin/featureUsage.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'featureUsage' 5 | export const aliases = ['fu', 'FeaturesUsage'] 6 | export const describe = base.bundle.getText("featureUsage") 7 | export const builder = base.getBuilder({}) 8 | export function handler (argv) { 9 | base.promptHandler(argv, dbStatus, {}) 10 | } 11 | export async function dbStatus(prompts) { 12 | base.debug('dbStatus') 13 | try { 14 | base.setPrompts(prompts) 15 | const dbStatus = await base.createDBConnection() 16 | 17 | let results = await dbStatus.execSQL( 18 | `SELECT COMPONENT_NAME, FEATURE_NAME, IS_DEPRECATED, OBJECT_COUNT, CALL_COUNT, LAST_TIMESTAMP, LAST_USER_NAME, LAST_APPLICATION_NAME FROM M_FEATURE_USAGE 19 | ORDER BY COMPONENT_NAME, FEATURE_NAME`) 20 | base.outputTableFancy(results) 21 | base.end() 22 | return results 23 | } catch (error) { 24 | base.error(error) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /bin/featureUsageUI.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | import * as featureUsage from './featureUsage.js' 4 | 5 | export const command = 'featureUsageUI' 6 | export const aliases = ['fuui', 'featureusageui', 'FeaturesUsageUI', 'featuresusageui'] 7 | export const describe = featureUsage.describe 8 | export const builder = featureUsage.builder 9 | 10 | export function handler (argv) { 11 | base.promptHandler(argv, dbStatus, {}) 12 | } 13 | export async function dbStatus(prompts) { 14 | base.debug('getFeatureUsageUI') 15 | try { 16 | base.setPrompts(prompts) 17 | await base.webServerSetup('/ui/#featureUsage-ui') 18 | return base.end() 19 | } catch (error) { 20 | base.error(error) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /bin/features.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'features' 5 | export const aliases = ['fe', 'Features'] 6 | export const describe = base.bundle.getText("features") 7 | 8 | export const builder = base.getBuilder({}) 9 | export function handler (argv) { 10 | base.promptHandler(argv, dbStatus, {}) 11 | } 12 | 13 | export async function dbStatus(prompts) { 14 | base.debug('dbStatus') 15 | try { 16 | base.setPrompts(prompts) 17 | const dbStatus = await base.createDBConnection() 18 | 19 | let results = await dbStatus.execSQL( 20 | `SELECT * FROM M_FEATURES`) 21 | base.outputTableFancy(results) 22 | base.end() 23 | return results 24 | } catch (error) { 25 | base.error(error) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /bin/featuresUI.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | import * as features from './dataTypes.js' 4 | 5 | export const command = 'featuresUI' 6 | export const aliases = ['feui', 'featuresui', 'FeaturesUI'] 7 | export const describe = features.describe 8 | 9 | export const builder = features.builder 10 | export function handler (argv) { 11 | base.promptHandler(argv, dbStatus, {}) 12 | } 13 | 14 | export async function dbStatus(prompts) { 15 | base.debug('getFeaturesUI') 16 | try { 17 | base.setPrompts(prompts) 18 | await base.webServerSetup('/ui/#features-ui') 19 | return base.end() 20 | } catch (error) { 21 | base.error(error) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /bin/functionsUI.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | import * as functions from './functions.js' 4 | 5 | export const command = 'functionsUI [schema] [function]' 6 | export const aliases = ['fui', 'listFuncsUI', 'ListFuncUI', 'listfuncsui', 'Listfuncui', "listFunctionsUI", "listfunctionsui"] 7 | export const describe = functions.describe 8 | 9 | export const builder = functions.builder 10 | export function handler (argv) { 11 | base.promptHandler(argv, getFunctions, functions.inputPrompts) 12 | } 13 | 14 | export async function getFunctions(prompts) { 15 | base.debug('getFunctionsUI') 16 | try { 17 | base.setPrompts(prompts) 18 | await base.webServerSetup('/ui/#functions-ui') 19 | return base.end() 20 | } catch (error) { 21 | base.error(error) 22 | } 23 | } -------------------------------------------------------------------------------- /bin/hanaCloudHDIInstancesUI.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | import * as hanaCloudHDIInstances from './hanaCloudHDIInstances.js' 4 | 5 | export const command = 'hdiUI' 6 | export const aliases = ['hdiInstancesUI', 'hdiinstancesui', 'hdiServicesUI', 'listhdiui', 'hdiservicesui', 'hdisui'] 7 | export const describe = hanaCloudHDIInstances.describe 8 | export const builder = hanaCloudHDIInstances.builder 9 | 10 | export function handler (argv) { 11 | base.promptHandler(argv, listInstances, hanaCloudHDIInstances.inputPrompts) 12 | } 13 | 14 | 15 | export async function listInstances(prompts) { 16 | base.debug('listInstancesUI') 17 | try { 18 | base.setPrompts(prompts) 19 | await base.webServerSetup('/ui/#hdi-ui') 20 | return base.end() 21 | } catch (error) { 22 | base.error(error) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /bin/hanaCloudSBSSInstancesUI.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | import * as sbss from './hanaCloudSBSSInstances.js' 4 | 5 | export const command = 'sbssUI' 6 | export const aliases = ['sbssInstancesUI', 'sbssinstancesui', 'sbssServicesUI', 'listsbssui', 'sbssservicesui', 'sbsssui'] 7 | export const describe = sbss.describe 8 | export const builder = sbss.builder 9 | 10 | export function handler (argv) { 11 | base.promptHandler(argv, listInstances, sbss.inputPrompts) 12 | } 13 | 14 | export async function listInstances(prompts) { 15 | base.debug('getSbssUI') 16 | try { 17 | base.setPrompts(prompts) 18 | await base.webServerSetup('/ui/#sbss-ui') 19 | return base.end() 20 | } catch (error) { 21 | base.error(error) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /bin/hanaCloudSchemaInstancesUI.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | import * as schemaInstances from './hanaCloudSchemaInstances.js' 4 | 5 | export const command = 'schemaInstancesUI' 6 | export const aliases = ['schemainstancesui', 'schemaServicesUI', 'listschemasui', 'schemaservicesui'] 7 | export const describe = schemaInstances.describe 8 | export const builder = schemaInstances.builder 9 | 10 | export function handler (argv) { 11 | base.promptHandler(argv, listInstances, schemaInstances.inputPrompts) 12 | } 13 | 14 | export async function listInstances(prompts) { 15 | base.debug('getSchemaInstancesUI') 16 | try { 17 | base.setPrompts(prompts) 18 | await base.webServerSetup('/ui/#schemaInstances-ui') 19 | return base.end() 20 | } catch (error) { 21 | base.error(error) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /bin/hanaCloudSecureStoreInstancesUI.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | import * as securestore from './hanaCloudSecureStoreInstances.js' 4 | 5 | export const command = 'securestoreUI' 6 | export const aliases = ['secureStoreInstancesUI', 'secureStoreUI', 'securestoreinstancesui', 'secureStoreServicesUI', 'listSecureStoreUI', 'securestoreservicesui', 'securestoresui'] 7 | export const describe = securestore.describe 8 | export const builder = securestore.builder 9 | 10 | export function handler (argv) { 11 | base.promptHandler(argv, listInstances, securestore.inputPrompts) 12 | } 13 | 14 | export async function listInstances(prompts) { 15 | base.debug('getSecureStoreUI') 16 | try { 17 | base.setPrompts(prompts) 18 | await base.webServerSetup('/ui/#securestore-ui') 19 | return base.end() 20 | } catch (error) { 21 | base.error(error) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /bin/hanaCloudUPSInstancesUI.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | import * as ups from './hanaCloudUPSInstances.js' 4 | 5 | export const command = 'upsUI' 6 | export const aliases = ['upsInstancesUI', 'upsinstancesui', 'upServicesUI', 'listupsui', 'upsservicesui'] 7 | export const describe = ups.describe 8 | 9 | export const builder = ups.builder 10 | export function handler (argv) { 11 | base.promptHandler(argv, listInstances, ups.inputPrompts) 12 | } 13 | 14 | 15 | 16 | export async function listInstances(prompts) { 17 | base.debug('getUpsUI') 18 | try { 19 | base.setPrompts(prompts) 20 | await base.webServerSetup('/ui/#ups-ui') 21 | return base.end() 22 | } catch (error) { 23 | base.error(error) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /bin/hdbsql.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | import * as conn from '../utils/connections.js' 4 | import * as xsenv from '@sap/xsenv' 5 | import { spawn } from 'child_process' 6 | 7 | export const command = 'hdbsql' 8 | export const describe = base.bundle.getText("hdbsql") 9 | export const builder = base.getBuilder({}) 10 | export function handler (argv) { 11 | base.promptHandler(argv, launchHdbsql, {}) 12 | } 13 | 14 | export async function launchHdbsql(prompts) { 15 | base.debug('launchHdbsql') 16 | try { 17 | let envFile = conn.resolveEnv(prompts) 18 | xsenv.loadEnv(envFile) 19 | 20 | let options = await xsenv.getServices({ hana: { tag: 'hana' }, }) 21 | let encrypt = '' 22 | if (options.hana.encrypt == true) { 23 | if (options.hana.sslValidateCertificate == true) { 24 | if (options.hana.sslTrustStore) { 25 | encrypt = `-e -ssltruststore ${options.hana.sslTrustStore} ` 26 | if (options.hana.sslCryptoProvider) { 27 | encrypt += `-sslprovider ${options.hana.sslCryptoProvider}` 28 | } 29 | } else { 30 | let str = options.hana.certificate.replace(/\r?\n|\r/g, " ") 31 | encrypt = `-e -ssltruststore "${str}" ` 32 | } 33 | } 34 | } 35 | base.debug(options) 36 | let cmd = `hdbsql -u ${options.hana.user} -n ${options.hana.host + ":" + options.hana.port} -p ${options.hana.password} ${encrypt} -A -m -j` 37 | await spawn(cmd, [], { shell: true, stdio: 'inherit' }) 38 | return base.end() 39 | } catch (error) { 40 | base.error(error) 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /bin/hostInformation.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'hostInformation' 5 | export const aliases = ['hi', 'HostInformation', 'hostInfo', 'hostinfo'] 6 | export const describe = base.bundle.getText("hostInformation") 7 | export const builder = base.getBuilder({}) 8 | export function handler (argv) { 9 | base.promptHandler(argv, hostInfo, {}) 10 | } 11 | 12 | export async function hostInfo(prompts) { 13 | base.debug('hostInfo') 14 | try { 15 | base.setPrompts(prompts) 16 | const dbStatus = await base.createDBConnection() 17 | 18 | let results = await dbStatus.execSQL( 19 | `SELECT * FROM M_HOST_INFORMATION 20 | ORDER BY HOST, KEY`) 21 | base.outputTableFancy(results) 22 | 23 | results = await dbStatus.execSQL( 24 | `SELECT * FROM M_HOST_RESOURCE_UTILIZATION 25 | ORDER BY HOST`) 26 | base.outputTableFancy(results) 27 | return base.end() 28 | } catch (error) { 29 | base.error(error) 30 | } 31 | } -------------------------------------------------------------------------------- /bin/indexTest.js: -------------------------------------------------------------------------------- 1 | 2 | import * as changeLog from './systemInfo.js' 3 | export const commands = [ 4 | changeLog 5 | ] 6 | -------------------------------------------------------------------------------- /bin/indexesUI.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | import * as indexes from './indexes.js' 4 | 5 | 6 | export const command = 'indexesUI [schema] [indexes]' 7 | export const aliases = ['indUI', 'listIndexesUI', 'ListIndUI', 'listindui', 'Listindui', "listfindexesui", "indexesui"] 8 | export const describe = indexes.describe 9 | 10 | export const builder = indexes.builder 11 | 12 | export function handler(argv) { 13 | base.promptHandler(argv, getIndexes, indexes.inputPrompts) 14 | } 15 | 16 | 17 | export async function getIndexes(prompts) { 18 | base.debug('getIndexesUI') 19 | try { 20 | base.setPrompts(prompts) 21 | await base.webServerSetup('/ui/#indexes-ui') 22 | return base.end() 23 | } catch (error) { 24 | base.error(error) 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /bin/iniFiles.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'iniFiles' 5 | export const aliases = ['if', 'inifiles', 'ini'] 6 | export const describe = base.bundle.getText("iniFiles") 7 | export const builder = base.getBuilder({}) 8 | export function handler (argv) { 9 | base.promptHandler(argv, iniFiles, {}) 10 | } 11 | 12 | export async function iniFiles(prompts) { 13 | base.debug('iniFiles') 14 | try { 15 | base.setPrompts(prompts) 16 | const dbStatus = await base.createDBConnection() 17 | 18 | let results = await dbStatus.execSQL( 19 | `SELECT * FROM M_INIFILES`) 20 | base.outputTableFancy(results) 21 | base.end() 22 | return results 23 | } catch (error) { 24 | base.error(error) 25 | } 26 | } -------------------------------------------------------------------------------- /bin/inspectJWT.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'inspectJWT' 5 | export const aliases = ['jwt', 'ijwt', 'iJWT', 'iJwt'] 6 | export const describe = base.bundle.getText("inspectJWT") 7 | export const builder = base.getBuilder({}) 8 | export function handler (argv) { 9 | base.promptHandler(argv, inspectJWT, {}) 10 | } 11 | 12 | export async function inspectJWT(prompts) { 13 | base.debug('inspectJWT') 14 | try { 15 | base.setPrompts(prompts) 16 | const dbStatus = await base.createDBConnection() 17 | 18 | let results = await dbStatus.execSQL(`SELECT TOP 100 * FROM "PSES" WHERE PURPOSE = 'JWT'`) 19 | base.outputTableFancy(results) 20 | 21 | results = await dbStatus.execSQL(`SELECT TOP 100 * FROM "CERTIFICATES"`) 22 | base.outputTableFancy(results) 23 | 24 | results = await dbStatus.execSQL(`SELECT TOP 100 * FROM "PSE_CERTIFICATES"`) 25 | base.outputTableFancy(results) 26 | 27 | results = await dbStatus.execSQL(`SELECT TOP 100 * FROM "JWT_PROVIDERS"`) 28 | base.outputTableFancy(results) 29 | 30 | return base.end() 31 | } catch (error) { 32 | base.error(error) 33 | } 34 | } -------------------------------------------------------------------------------- /bin/inspectTableUI.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | import * as inspectTable from './inspectTable.js' 4 | 5 | export const command = 'inspectTableUI [schema] [table]' 6 | export const aliases = ['itui', 'tableUI', 'tableui', 'insTblUI', 'inspecttableui', 'inspectableui'] 7 | export const describe = inspectTable.describe 8 | export const builder = inspectTable.builder 9 | export function handler (argv) { 10 | base.promptHandler(argv, tableInspect, inspectTable.inputPrompts) 11 | } 12 | 13 | export async function tableInspect(prompts) { 14 | base.debug('inspectTableUI') 15 | try { 16 | base.setPrompts(prompts) 17 | await base.webServerSetup('/ui/#inspectTable-ui') 18 | return base.end() 19 | } catch (error) { 20 | base.error(error) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /bin/issue.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'issue' 5 | export const aliases = ['Issue', 'openIssue', 'openissue', 'reportIssue', 'reportissue'] 6 | export const describe = base.bundle.getText("issue") 7 | export const builder = base.getBuilder({}, false) 8 | export function handler(argv) { 9 | base.promptHandler(argv, createIssue, {}) 10 | } 11 | 12 | export async function createIssue() { 13 | base.debug('createIssue') 14 | base.startSpinnerInt() 15 | const { default: open } = await import('open') 16 | const { getVersion } = await import('./version.js') 17 | try { 18 | const ver = await getVersion() 19 | let verString = `` 20 | Object.keys(ver).forEach(key => verString += `${key}: ${ver[key]}\n`) 21 | const encoded = encodeURI(verString) 22 | let issueURL = 23 | `https://github.com/SAP-samples/hana-developer-cli-tool-example/issues/new?` + 24 | `title=<Please+Describe+Your+Issue>` + 25 | `&labels=bug` + 26 | `&body=${encoded}` 27 | base.debug(issueURL) 28 | open(issueURL) 29 | base.stopSpinnerInt() 30 | return base.end() 31 | } catch (error) { 32 | base.error(error) 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /bin/massConvert.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | global.__xRef = [] 4 | 5 | export const command = 'massConvert [schema] [table] [view]' 6 | export const aliases = ['mc', 'massconvert', 'massConv', 'massconv'] 7 | export const describe = base.bundle.getText("massConvert") 8 | 9 | export const builder = base.getMassConvertBuilder(false) 10 | 11 | export function handler (argv) { 12 | base.promptHandler(argv, getTables, base.getMassConvertPrompts(false)) 13 | } 14 | 15 | export async function getTables(prompts) { 16 | base.debug('getTables') 17 | const massConvertLib = await import('../utils/massConvert.js') 18 | base.setPrompts(prompts) 19 | await massConvertLib.convert() 20 | return base.end() 21 | } 22 | 23 | -------------------------------------------------------------------------------- /bin/massConvertUI.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | global.__xRef = [] 4 | 5 | export const command = 'massConvertUI [schema] [table]' 6 | export const aliases = ['mcui', 'massconvertui', 'massConvUI', 'massconvui'] 7 | export const describe = base.bundle.getText("massConvertUI") 8 | 9 | 10 | export const builder = base.getMassConvertBuilder(true) 11 | 12 | 13 | export function handler (argv) { 14 | base.promptHandler(argv, startWebServer, base.getMassConvertPrompts(true)) 15 | } 16 | 17 | async function startWebServer(prompts) { 18 | base.debug('startWebServer') 19 | try { 20 | base.setPrompts(prompts) 21 | await base.webServerSetup('/ui/#massconvert-ui') 22 | return base.end() 23 | } catch (error) { 24 | base.error(error) 25 | } 26 | } -------------------------------------------------------------------------------- /bin/matrix.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'matrix' 5 | export const describe = base.bundle.getText("matrix") 6 | export const builder = base.getBuilder({}, false, false) 7 | export async function handler() { 8 | const tools = await import('terminaltools') 9 | try { 10 | await tools.default.fun.Matrix.start([0,1,2,3,4,5,6,7,8,9,'日','ハ','ミ','ヒ','ー','ウ','シ','ナ','モ','ニ','サ', 11 | 'ワ','ツ','オ','リ','ア','ホ','テ','マ','ケ','メ','エ','カ','キ','ム','ユ','ラ','セ','ネ','ス','タ','ヌ','ヘ','ç','リ','ク']) 12 | } catch (err) { 13 | return console.error(err) 14 | } 15 | } -------------------------------------------------------------------------------- /bin/openBAS.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | import * as btp from '../utils/btp.js' 4 | 5 | export const command = 'openbas' 6 | export const aliases = ['openBAS', 'openBas', 'openBusinessApplicationStudio', 'bas', 'BAS'] 7 | export const describe = base.bundle.getText("openbas") 8 | export const builder = base.getBuilder({}, false) 9 | export function handler (argv) { 10 | base.promptHandler(argv, getBAS, {}) 11 | } 12 | 13 | export async function getBAS() { 14 | base.startSpinnerInt() 15 | base.debug('openBAS') 16 | const { default:open } = await import('open') 17 | try { 18 | let basURL = await btp.getBASSubURL() 19 | open(basURL) 20 | base.stopSpinnerInt() 21 | console.log(basURL) 22 | return base.end() 23 | } catch (error) { 24 | base.error(error) 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /bin/openChangeLog.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'changelog' 5 | export const aliases = ['openrchangelog', 'openChangeLog', 'openChangelog', 'ChangeLog', 'Changelog', 'changes', 'Changes'] 6 | export const describe = base.bundle.getText("changelog") 7 | export const builder = base.getBuilder({}, false) 8 | export function handler (argv) { 9 | base.promptHandler(argv, getChangeLog, {}, false) 10 | } 11 | 12 | export async function getChangeLog() { 13 | base.debug('getChangeLog') 14 | const { default:open } = await import('open') 15 | let dbxReadmeURL = 'https://github.com/SAP-samples/hana-developer-cli-tool-example/blob/main/CHANGELOG.md' 16 | console.log(dbxReadmeURL) 17 | open(dbxReadmeURL) 18 | return base.end() 19 | } 20 | 21 | -------------------------------------------------------------------------------- /bin/openReadMe.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'readme' 5 | export const aliases = ['openreadme', 'openReadme', 'openReadMe', 'openHelp', 'openhelp'] 6 | export const describe = base.bundle.getText("readme") 7 | export const builder = base.getBuilder({}, false) 8 | export function handler (argv) { 9 | base.promptHandler(argv, getReadMe, {}, false) 10 | } 11 | 12 | export async function getReadMe() { 13 | base.debug('getReadMe') 14 | const { default:open } = await import('open') 15 | let dbxReadmeURL = 'https://github.com/SAP-samples/hana-developer-cli-tool-example/blob/main/README.md' 16 | console.log(dbxReadmeURL) 17 | open(dbxReadmeURL) 18 | return base.end() 19 | } 20 | 21 | -------------------------------------------------------------------------------- /bin/ports.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'ports' 5 | export const describe = base.bundle.getText("ports") 6 | export const builder = base.getBuilder({}) 7 | export function handler (argv) { 8 | base.promptHandler(argv, getPorts, {}) 9 | } 10 | export async function getPorts(prompts) { 11 | base.debug('getPorts') 12 | try { 13 | base.setPrompts(prompts) 14 | const dbStatus = await base.createDBConnection() 15 | let results = await dbStatus.execSQL( 16 | `SELECT SERVICE_NAME, 17 | PORT, 18 | SQL_PORT 19 | FROM SYS.M_SERVICES`) 20 | base.outputTableFancy(results) 21 | base.end() 22 | return results 23 | } catch (error) { 24 | base.error(error) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /bin/privilegeError.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'privilegeError [guid]' 5 | export const aliases = ['pe', 'privilegeerror', 'privilegerror', 'getInsuffficientPrivilegeErrorDetails'] 6 | export const describe = base.bundle.getText("privilegeError") 7 | 8 | export const builder = base.getBuilder({ 9 | guid: { 10 | alias: ['g', 'error'], 11 | type: 'string', 12 | desc: base.bundle.getText("errorGuid") 13 | } 14 | }) 15 | 16 | export function handler (argv) { 17 | base.promptHandler(argv, dbCall, { 18 | guid: { 19 | description: base.bundle.getText("errorGuid"), 20 | type: 'string', 21 | required: true 22 | } 23 | }) 24 | } 25 | 26 | export async function dbCall(prompts) { 27 | base.debug('dbCall') 28 | try { 29 | base.setPrompts(prompts) 30 | const db = await base.createDBConnection() 31 | 32 | let inputParams = { 33 | GUID: prompts.guid 34 | } 35 | base.debug(inputParams) 36 | let sp = await db.loadProcedurePromisified("SYS", "GET_INSUFFICIENT_PRIVILEGE_ERROR_DETAILS") 37 | let object = await db.callProcedurePromisified(sp, inputParams) 38 | if (object.results < 1) { 39 | throw new Error(base.bundle.getText("errGUID")) 40 | } 41 | base.outputTableFancy(object.results[0]) 42 | base.end() 43 | return object.results[0] 44 | } catch (error) { 45 | base.error(error) 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /bin/querySimpleUI.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | import * as querySimple from './querySimple.js' 4 | 5 | export const command = 'querySimpleUI' 6 | export const aliases = ['qsui', "querysimpleui", 'queryUI', 'sqlUI'] 7 | export const describe = querySimple.describe 8 | 9 | export const builder = querySimple.builder 10 | 11 | let tempInput = querySimple.inputPrompts 12 | tempInput.query.required = false 13 | tempInput.query.ask = () => { 14 | return false 15 | } 16 | export function handler (argv) { 17 | base.promptHandler(argv, dbQuery, tempInput) 18 | } 19 | 20 | export async function dbQuery(prompts) { 21 | base.debug('dbQueryUI') 22 | try { 23 | base.setPrompts(prompts) 24 | await base.webServerSetup('/ui/#querySimple-ui') 25 | return base.end() 26 | } catch (error) { 27 | base.error(error) 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /bin/readMe.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'readMe' 5 | export const aliases = ['readme'] 6 | export const describe = base.bundle.getText("readMe") 7 | export const builder = base.getBuilder({}, false) 8 | 9 | export const handler = async function () { 10 | 11 | const [{ marked }, { default: fs }, { default: path }, { fileURLToPath }, { URL }, { markedTerminal }] = await Promise.all([ 12 | import('marked'), 13 | import('fs'), 14 | import('path'), 15 | import('url'), 16 | import('url'), 17 | import('marked-terminal') 18 | ]) 19 | const __dirname = fileURLToPath(new URL('.', import.meta.url)) 20 | 21 | marked.use(markedTerminal({ 22 | showSectionPrefix: false, 23 | })) 24 | 25 | try { 26 | const data = fs.readFileSync(path.join(__dirname, '..', '/README.md'), 'utf8') 27 | console.log(marked(data)) 28 | 29 | } catch (err) { 30 | console.error(err) 31 | } 32 | } -------------------------------------------------------------------------------- /bin/readMeUI.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'readMeUI' 5 | export const aliases = ['readmeui', 'readMeUi', 'readmeUI'] 6 | export const describe = base.bundle.getText("readMe") 7 | export const builder = base.getBuilder({}, false) 8 | export function handler (argv) { 9 | base.promptHandler(argv, readMe, {}) 10 | } 11 | 12 | export async function readMe(prompts){ 13 | base.debug('readMeUI') 14 | try { 15 | base.setPrompts(prompts) 16 | await base.webServerSetup('/docs/readme') 17 | return base.end() 18 | } catch (error) { 19 | base.error(error) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /bin/reclaim.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'reclaim' 5 | export const aliases = 're' 6 | export const describe = base.bundle.getText("reclaim") 7 | export const builder = base.getBuilder({}) 8 | export function handler (argv) { 9 | base.promptHandler(argv, reclaim, {}) 10 | } 11 | 12 | export async function reclaim(prompts) { 13 | base.debug('reclaim') 14 | try { 15 | base.setPrompts(prompts) 16 | const dbStatus = await base.createDBConnection() 17 | 18 | let results = await dbStatus.execSQL(`ALTER SYSTEM RECLAIM LOB SPACE;`) 19 | base.outputTableFancy(results) 20 | 21 | results = await dbStatus.execSQL(`ALTER SYSTEM RECLAIM LOG;`) 22 | base.outputTableFancy(results) 23 | 24 | results = await dbStatus.execSQL(`ALTER SYSTEM RECLAIM DATAVOLUME 105 DEFRAGMENT;`) 25 | base.outputTableFancy(results) 26 | return base.end() 27 | } catch (error) { 28 | base.error(error) 29 | } 30 | } -------------------------------------------------------------------------------- /bin/rick.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | export const command = 'rick' 4 | 5 | export const describe = base.bundle.getText("rick") 6 | export const builder = base.getBuilder({}, false, false) 7 | export const handler = async () => { 8 | const { default:prompt } = await import('prompt') 9 | prompt.start() 10 | var property = { 11 | name: 'yesno', 12 | message: 'Are you sure?', 13 | validator: /y[es]*|n[o]?/, 14 | warning: 'Must respond yes or no', 15 | default: 'no' 16 | } 17 | prompt.get(property, (err, result) => { 18 | 19 | if (result.yesno === `yes`) { 20 | prompt.start() 21 | var property2 = { 22 | name: 'yesno', 23 | message: 'Are you REALLY sure?', 24 | validator: /y[es]*|n[o]?/, 25 | warning: 'Must respond yes or no', 26 | default: 'no' 27 | } 28 | prompt.get(property2, async (err, result) => { 29 | if (result.yesno === `yes`) { 30 | const { default:open } = await import('open') 31 | try { 32 | const helpVideoURL = `https://www.youtube.com/watch?v=j5a0jTc9S10&list=PL3KnTfyhrIlcudeMemKd6rZFGDWy` 33 | open(helpVideoURL) 34 | } catch (err) { 35 | console.error(err) 36 | } 37 | } 38 | }) 39 | } 40 | }) 41 | } -------------------------------------------------------------------------------- /bin/schemasUI.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | import * as schemas from './schemas.js' 4 | 5 | export const command = 'schemasUI [schema]' 6 | export const aliases = ['schui', 'getSchemasUI', 'listSchemasUI', 'schemasui', 'getschemasui', 'listschemasui'] 7 | export const describe = schemas.describe 8 | 9 | export const builder = schemas.builder 10 | 11 | export function handler (argv) { 12 | base.promptHandler(argv, getSchemas, schemas.inputPrompts) 13 | } 14 | 15 | export async function getSchemas(prompts) { 16 | base.debug('getSchemasUI') 17 | try { 18 | base.setPrompts(prompts) 19 | await base.webServerSetup('/ui/#schemas-ui') 20 | return base.end() 21 | } catch (error) { 22 | base.error(error) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /bin/systemInfoUI.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'systemInfoUI' 5 | export const aliases = ['sysUI', 'sysinfoui', 'sysInfoUI', 'systeminfoui'] 6 | export const describe = base.bundle.getText("systemInfoUI") 7 | export const builder = base.getBuilder({}) 8 | export function handler (argv) { 9 | base.promptHandler(argv, sysInfo, {}) 10 | } 11 | 12 | export async function sysInfo(prompts) { 13 | base.debug('sysInfoUI') 14 | try { 15 | base.setPrompts(prompts) 16 | await base.webServerSetup('/ui/#systeminfo-ui') 17 | return base.end() 18 | } catch (error) { 19 | base.error(error) 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /bin/tablesPG.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | const tables = await import("./tables.js") 4 | 5 | export const command = 'tablesPG [schema] [table]' 6 | export const aliases = ['tablespg', 'tablespostgres', 'tablesPostgres', 'tables-postgres', 'tables-postgressql', 'tablesPOSTGRES'] 7 | export const describe = base.bundle.getText("tablesPG") 8 | 9 | export const builder = base.getBuilder({ 10 | table: { 11 | alias: ['t', 'Table'], 12 | type: 'string', 13 | default: "*", 14 | desc: base.bundle.getText("table") 15 | }, schema: { 16 | alias: ['s', 'Schema'], 17 | type: 'string', 18 | default: '**CURRENT_SCHEMA**', 19 | desc: base.bundle.getText("schema") 20 | }, 21 | profile: { 22 | alias: ['p', 'Profile'], 23 | type: 'string', 24 | default: "pg", 25 | desc: base.bundle.getText("profile") 26 | }, 27 | limit: { 28 | alias: ['l'], 29 | type: 'number', 30 | default: 200, 31 | desc: base.bundle.getText("limit") 32 | } 33 | }, false) 34 | 35 | export let inputPrompts = { 36 | table: { 37 | description: base.bundle.getText("table"), 38 | type: 'string', 39 | required: true 40 | }, 41 | schema: { 42 | description: base.bundle.getText("schema"), 43 | type: 'string', 44 | required: true 45 | }, 46 | profile: { 47 | description: base.bundle.getText("profile"), 48 | type: 'string', 49 | required: true 50 | } 51 | } 52 | 53 | export function handler(argv) { 54 | base.promptHandler(argv, tables.getTables, inputPrompts, false) 55 | } 56 | 57 | -------------------------------------------------------------------------------- /bin/tablesSQLite.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | const tables = await import("./tables.js") 4 | 5 | export const command = 'tablesSQLite [table]' 6 | export const aliases = ['tablessqlite', 'tablesqlite', 'tablesSqlite', 'tables-sqlite', 'tables-sql', 'tablesSQL'] 7 | export const describe = base.bundle.getText("tablesSQLite") 8 | 9 | export const builder = base.getBuilder({ 10 | table: { 11 | alias: ['t', 'Table'], 12 | type: 'string', 13 | default: "*", 14 | desc: base.bundle.getText("table") 15 | }, 16 | profile: { 17 | alias: ['p', 'Profile'], 18 | type: 'string', 19 | default: "sqlite", 20 | desc: base.bundle.getText("profile") 21 | }, 22 | limit: { 23 | alias: ['l'], 24 | type: 'number', 25 | default: 200, 26 | desc: base.bundle.getText("limit") 27 | } 28 | }, false) 29 | 30 | export let inputPrompts = { 31 | table: { 32 | description: base.bundle.getText("table"), 33 | type: 'string', 34 | required: true 35 | }, 36 | profile: { 37 | description: base.bundle.getText("profile"), 38 | type: 'string', 39 | required: true 40 | } 41 | } 42 | 43 | export function handler(argv) { 44 | base.promptHandler(argv, tables.getTables, inputPrompts, false) 45 | } 46 | -------------------------------------------------------------------------------- /bin/tablesUI.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | import * as tables from './tables.js' 4 | 5 | export const command = 'tablesUI [schema] [table]' 6 | export const aliases = ['tui', 'listTablesUI', 'listtablesui', 'tablesui'] 7 | export const describe = tables.describe 8 | 9 | export const builder = tables.builder 10 | 11 | export function handler (argv) { 12 | base.promptHandler(argv, getTables, tables.inputPrompts) 13 | } 14 | 15 | export async function getTables(prompts) { 16 | base.debug('getTablesUI') 17 | try { 18 | base.setPrompts(prompts) 19 | await base.webServerSetup('/ui/#tables-ui') 20 | return base.end() 21 | } catch (error) { 22 | base.error(error) 23 | } 24 | } -------------------------------------------------------------------------------- /bin/test.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | import * as conn from '../utils/connections.js' 4 | 5 | export const command = 'test' 6 | export const describe = base.bundle.getText("test") 7 | 8 | export const builder = base.getBuilder({ 9 | }) 10 | 11 | export function handler (argv) { 12 | base.promptHandler(argv, test, {}) 13 | } 14 | 15 | export async function test(result) { 16 | base.debug('test') 17 | try { 18 | console.log( await conn.createConnection(result)) 19 | return base.end() 20 | } catch (error) { 21 | base.error(error) 22 | } 23 | } -------------------------------------------------------------------------------- /bin/traces.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | 4 | export const command = 'traces' 5 | export const aliases = ['tf', 'Traces'] 6 | export const describe = base.bundle.getText("traces") 7 | export const builder = base.getBuilder({}) 8 | export function handler (argv) { 9 | base.promptHandler(argv, traces, {}) 10 | } 11 | 12 | export async function traces(prompts) { 13 | base.debug('traces') 14 | try { 15 | base.setPrompts(prompts) 16 | const dbStatus = await base.createDBConnection() 17 | 18 | let results = await dbStatus.execSQL( 19 | `SELECT * FROM M_TRACEFILES`) 20 | base.outputTableFancy(results) 21 | base.end() 22 | return results 23 | } catch (error) { 24 | base.error(error) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /images/ex1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/images/ex1.png -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /*eslint no-console: 0 */ 2 | /*eslint-env node, es6 */ 3 | // @ts-check 4 | 5 | import * as btp from "./utils/btp.js" 6 | //import * as cf from "./utils/cf.js" 7 | 8 | export async function init(){ 9 | 10 | // let data = await btp.getBTPConfig() 11 | let data = await btp.getInfo() 12 | console.log(data) 13 | 14 | /* let data = await cf.getHANAInstanceByName('HANA_CLOUD_2') 15 | last_operation: [Object], 16 | relationships: [Object], 17 | metadata: [Object], 18 | links: [Object] 19 | console.table(data.resources[0].last_operation) */ 20 | } 21 | init() 22 | 23 | 24 | //console.info(`Nothing to see here yet`); 25 | //process.exit(1); -------------------------------------------------------------------------------- /install-btp.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | cd $HOME 4 | curl \ 5 | --remote-name \ 6 | --location \ 7 | --url "https://raw.githubusercontent.com/SAP-samples/sap-tech-bytes/2021-09-01-btp-cli/getbtpcli" \ 8 | && chmod +x getbtpcli \ 9 | && yes | ./getbtpcli 10 | 11 | echo "alias bu='source <(tail -1 $HOME/.bashrc)'" >> $HOME/.bashrc 12 | source <(tail -1 $HOME/.bashrc) 13 | echo 'export PATH=$PATH:$HOME/bin' >> $HOME/.bashrc -------------------------------------------------------------------------------- /routes/docs.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | import path from 'path' 4 | import { promises as fs } from 'fs' 5 | import showdown from 'showdown' 6 | const {Converter} = showdown 7 | 8 | import { fileURLToPath } from 'url' 9 | // @ts-ignore 10 | const __dirname = fileURLToPath(new URL('.', import.meta.url)) 11 | 12 | export function route(app) { 13 | app.get('/docs/readme', async (req, res) => { 14 | 15 | try { 16 | let mdReadMe = await fs.readFile(path.resolve(__dirname, "../README.md"), "utf-8") 17 | const converter = new Converter 18 | let html = converter.makeHtml(mdReadMe) 19 | res.type("text/html").status(200).send(html) 20 | } catch (error) { 21 | base.error(error) 22 | res.status(500).send(error.toString()) 23 | } 24 | 25 | }) 26 | 27 | app.get('/docs/changelog', async (req, res) => { 28 | 29 | try { 30 | let mdChangeLog = await fs.readFile(path.resolve(__dirname, "../CHANGELOG.md"), "utf-8") 31 | const converter = new Converter 32 | let html = converter.makeHtml(mdChangeLog) 33 | res.type("text/html").status(200).send(html) 34 | } catch (error) { 35 | base.error(error) 36 | res.status(500).send(error.toString()) 37 | } 38 | 39 | }) 40 | } -------------------------------------------------------------------------------- /routes/excel.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | //import * as excel from 'node-xlsx' 4 | 5 | export function route (app) { 6 | app.get('/excel', async (req, res) => { 7 | try { 8 | 9 | const results = base.getLastResults() 10 | let out = [] 11 | 12 | if(!results){ 13 | throw(base.bundle.getText("noResults")) 14 | } 15 | //Column Headers 16 | let header = [] 17 | for (const [key] of Object.entries(results[0])) { 18 | header.push(key) 19 | } 20 | out.push(header) 21 | 22 | for (let item of results) { 23 | let innerItem = [] 24 | for (const [key] of Object.entries(item)) { 25 | innerItem.push(item[key]) 26 | } 27 | out.push(innerItem) 28 | } 29 | // @ts-ignore 30 | let excelOutput = `` 31 | //base.error(`Excel Export temporarily disabled due to issue with install of required module in Business Application Studio`) 32 | res.status(500).send(`Excel Export temporarily disabled due to issue with install of required module in Business Application Studio`) 33 | 34 | /*excel.build([{ 35 | name: base.bundle.getText("gui.Results"), 36 | data: out 37 | }]) */ 38 | 39 | //res.header("Content-Disposition", "attachment; filename=Excel.xlsx") 40 | //return res.type("application/vnd.ms-excel").status(200).send(excelOutput) 41 | 42 | } catch (error) { 43 | base.error(error) 44 | res.status(500).send(error.toString()) 45 | } 46 | 47 | }) 48 | } -------------------------------------------------------------------------------- /routes/index.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from '../utils/base.js' 3 | import bodyParser from 'body-parser' 4 | let jsonParser = bodyParser.json() 5 | 6 | export function route (app) { 7 | base.debug('Index Route') 8 | app.get('/', async (req, res) => { 9 | try { 10 | res.type("application/json").status(200).send(base.getPrompts()) 11 | } catch (error) { 12 | base.error(error) 13 | res.status(500).send(error.toString()) 14 | } 15 | }) 16 | 17 | app.put('/', jsonParser, async (req, res) => { 18 | try { 19 | let body = req.body 20 | body.isGui = true 21 | await base.setPrompts(body) 22 | return res.status(200).send({ status: 'ok' }) 23 | } catch (error) { 24 | base.error(error) 25 | res.status(500).send(error.toString()) 26 | } 27 | }) 28 | } -------------------------------------------------------------------------------- /routes/static.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | 3 | import * as path from 'path' 4 | import express from 'express' 5 | import * as base from '../utils/base.js' 6 | import { fileURLToPath } from 'url' 7 | // @ts-ignore 8 | const __dirname = fileURLToPath(new URL('.', import.meta.url)) 9 | import { createRequire } from 'module' 10 | const require = createRequire(import.meta.url) 11 | import * as version from '../bin/version.js' 12 | 13 | export function route (app) { 14 | base.debug('Static Route') 15 | app.use('/ui', express.static(path.join(__dirname, '../app/resources'))) 16 | app.use('/sap/dfa/', express.static(path.join(__dirname, '../app/dfa'))) 17 | app.use('/resources/sap/dfa/', express.static(path.join(__dirname, '../app/dfa'))) 18 | app.use('/i18n', express.static(path.join(__dirname, '../_i18n'))) 19 | app.use('/favicon.ico', express.static(path.join(__dirname, '../app/resources/favicon.ico'))) 20 | 21 | app.get('/appconfig/fioriSandboxConfig.json', async (req, res) => { 22 | try { 23 | let jsonData = require('../app/appconfig/fioriSandboxConfig.json') 24 | const info = version.getVersion() 25 | jsonData.bootstrapPlugins.BootstrapXrayPlugin.config.version = info['hana-cli'] 26 | res.type("application/json").status(200).send(jsonData) 27 | } catch (error) { 28 | base.error(error) 29 | res.status(500).send(error.toString()) 30 | } 31 | }) 32 | 33 | } -------------------------------------------------------------------------------- /tests/.mocharc.json: -------------------------------------------------------------------------------- 1 | { 2 | "timeout": "10s", 3 | "parallel": true, 4 | "reporter": "mochawesome", 5 | "require": [ 6 | "./tests/helper.js", 7 | "mochawesome/register" 8 | ] 9 | } -------------------------------------------------------------------------------- /tests/SystemInfo.Test.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from './base.js' 3 | 4 | describe('systemInfo', function () { 5 | 6 | it("returns help output", function (done) { 7 | const localTest = base.myTest.bind(this) 8 | localTest("hana-cli systemInfo --help", done) 9 | }) 10 | 11 | it("returns normal output", function (done) { 12 | const localTest = base.myTest.bind(this) 13 | localTest("hana-cli systemInfo --quiet", done) 14 | }) 15 | 16 | it("returns output with env option", function (done) { 17 | const localTest = base.myTest.bind(this) 18 | localTest("hana-cli systemInfo -o env", done) 19 | }) 20 | 21 | it("returns output with dbx option", function (done) { 22 | const localTest = base.myTest.bind(this) 23 | localTest("hana-cli systemInfo -o dbx", done) 24 | }) 25 | }) 26 | 27 | -------------------------------------------------------------------------------- /tests/base.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | /** 3 | * @module base - Central Test Functionality shared by all test files 4 | */ 5 | 6 | import * as child_process from 'child_process' 7 | export const exec = child_process.exec 8 | export const fork = child_process.fork 9 | import addContextInt from 'mochawesome/addContext.js' 10 | export const addContext = addContextInt 11 | import * as assertInt from 'assert' 12 | export const assert = assertInt 13 | 14 | export function myTest(command, done){ 15 | exec(command, (error, stdout, stderr) => { 16 | if(stderr && stderr != '- \n\n'){throw stderr} 17 | addContextInt(this, { title: 'Stdout', value: stdout }) 18 | done() 19 | }) 20 | } 21 | 22 | -------------------------------------------------------------------------------- /tests/btpInfo.Test.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from './base.js' 3 | 4 | describe('btpInfo', function () { 5 | 6 | it("returns help output", function (done) { 7 | const localTest = base.myTest.bind(this) 8 | localTest("hana-cli btpInfo --help", done) 9 | }) 10 | 11 | it("returns normal output", function (done) { 12 | const localTest = base.myTest.bind(this) 13 | localTest("hana-cli btpInfo", done) 14 | }) 15 | 16 | it("returns output with json option", function (done) { 17 | const localTest = base.myTest.bind(this) 18 | localTest("hana-cli btpInfo -o json", done) 19 | }) 20 | 21 | }) 22 | 23 | -------------------------------------------------------------------------------- /tests/btpSubs.Test.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from './base.js' 3 | 4 | describe('btpSubs', function () { 5 | 6 | it("returns help output", function (done) { 7 | const localTest = base.myTest.bind(this) 8 | localTest("hana-cli btpSubs --help", done) 9 | }) 10 | 11 | it("returns normal output", function (done) { 12 | const localTest = base.myTest.bind(this) 13 | localTest("hana-cli btpSubs", done) 14 | }) 15 | 16 | }) 17 | 18 | -------------------------------------------------------------------------------- /tests/callProcedure.Test.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from './base.js' 3 | 4 | describe('callProcedure', function () { 5 | 6 | it("returns help output", function (done) { 7 | const localTest = base.myTest.bind(this) 8 | localTest("hana-cli callProcedure --help", done) 9 | }) 10 | 11 | it("returns normal output", function (done) { 12 | const localTest = base.myTest.bind(this) 13 | localTest("hana-cli callProcedure -s SYS -p GET_TYPE_MAP --quiet", done) 14 | }) 15 | 16 | }) 17 | 18 | -------------------------------------------------------------------------------- /tests/helper.js: -------------------------------------------------------------------------------- 1 | import * as assertInt from 'assert' 2 | export const assert = assertInt 3 | 4 | 5 | export const mochaHooks = { 6 | beforeAll(){ 7 | 8 | }, 9 | 10 | // teardown 11 | afterAll(){ 12 | 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /tests/status.Test.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from './base.js' 3 | 4 | describe('status', function () { 5 | 6 | it("returns help output", function (done) { 7 | const localTest = base.myTest.bind(this) 8 | localTest("hana-cli status --help", done) 9 | }) 10 | 11 | it("returns normal output", function (done) { 12 | const localTest = base.myTest.bind(this) 13 | localTest("hana-cli status --quiet", done) 14 | }) 15 | 16 | it("returns output with privileges", function (done) { 17 | const localTest = base.myTest.bind(this) 18 | localTest("hana-cli status -p --quiet", done) 19 | }) 20 | }) 21 | 22 | -------------------------------------------------------------------------------- /tests/version.Test.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from './base.js' 3 | 4 | describe('version', function () { 5 | 6 | it("returns help output", function (done) { 7 | const localTest = base.myTest.bind(this) 8 | localTest("hana-cli version --help", done) 9 | }) 10 | it("returns normal output", function (done) { 11 | base.exec("hana-cli version", (error, stdout) => { 12 | base.addContext(this, { title: 'Stdout', value: stdout }) 13 | base.assert.match(stdout, /hana-cli: /) 14 | done() 15 | }) 16 | }) 17 | 18 | }) -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // Change this to match your project 3 | "compilerOptions": { 4 | // Tells TypeScript to read JS files, as 5 | // normally they are ignored as source files 6 | "allowJs": true, 7 | // Generate d.ts files 8 | "declaration": true, 9 | // This compiler run should 10 | // only output d.ts files 11 | "emitDeclarationOnly": true, 12 | // Types should go into this directory. 13 | // Removing this would place the .d.ts files 14 | // next to the .js files 15 | "outDir": "types", 16 | "skipLibCheck": true, 17 | "lib": ["ES2022", "DOM"], 18 | "target": "ES2022", 19 | "moduleResolution": "Node", 20 | "module": "es2022", 21 | "allowSyntheticDefaultImports": true, 22 | "resolveJsonModule": true, 23 | "types": ["node", "mocha"] 24 | } 25 | } -------------------------------------------------------------------------------- /types/CHANGELOG.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /types/app/dfa/help/library-preload.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/dfa/help/library-preload.d.ts -------------------------------------------------------------------------------- /types/app/dfa/help/library.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/dfa/help/library.d.ts -------------------------------------------------------------------------------- /types/app/dfa/help/utils/adapters/fiori/Component.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/dfa/help/utils/adapters/fiori/Component.d.ts -------------------------------------------------------------------------------- /types/app/resources/WebAssistant.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/resources/WebAssistant.d.ts -------------------------------------------------------------------------------- /types/app/resources/common/Component.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/resources/common/Component.d.ts -------------------------------------------------------------------------------- /types/app/resources/common/controller/BaseController.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/resources/common/controller/BaseController.d.ts -------------------------------------------------------------------------------- /types/app/resources/common/controller/handler.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/resources/common/controller/handler.d.ts -------------------------------------------------------------------------------- /types/app/resources/common/index.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/resources/common/index.d.ts -------------------------------------------------------------------------------- /types/app/resources/common/model/models.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/resources/common/model/models.d.ts -------------------------------------------------------------------------------- /types/app/resources/init.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/resources/init.d.ts -------------------------------------------------------------------------------- /types/app/resources/inspect/Component.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/resources/inspect/Component.d.ts -------------------------------------------------------------------------------- /types/app/resources/inspect/controller/App.controller.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/resources/inspect/controller/App.controller.d.ts -------------------------------------------------------------------------------- /types/app/resources/inspect/controller/inspectTable-ui.controller.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/resources/inspect/controller/inspectTable-ui.controller.d.ts -------------------------------------------------------------------------------- /types/app/resources/inspect/controller/inspectView-ui.controller.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/resources/inspect/controller/inspectView-ui.controller.d.ts -------------------------------------------------------------------------------- /types/app/resources/inspect/controller/querySimple-ui.controller.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/resources/inspect/controller/querySimple-ui.controller.d.ts -------------------------------------------------------------------------------- /types/app/resources/massConvert/Component.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/resources/massConvert/Component.d.ts -------------------------------------------------------------------------------- /types/app/resources/massConvert/controller/App.controller.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/resources/massConvert/controller/App.controller.d.ts -------------------------------------------------------------------------------- /types/app/resources/systemInfo/Component.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/resources/systemInfo/Component.d.ts -------------------------------------------------------------------------------- /types/app/resources/systemInfo/controller/App.controller.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/resources/systemInfo/controller/App.controller.d.ts -------------------------------------------------------------------------------- /types/app/resources/tables/Component.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/resources/tables/Component.d.ts -------------------------------------------------------------------------------- /types/app/resources/tables/controller/App.controller.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/resources/tables/controller/App.controller.d.ts -------------------------------------------------------------------------------- /types/app/resources/tables/controller/basic-ui.controller.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/resources/tables/controller/basic-ui.controller.d.ts -------------------------------------------------------------------------------- /types/app/resources/tables/controller/containers-ui.controller.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/resources/tables/controller/containers-ui.controller.d.ts -------------------------------------------------------------------------------- /types/app/resources/tables/controller/functions-ui.controller.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/resources/tables/controller/functions-ui.controller.d.ts -------------------------------------------------------------------------------- /types/app/resources/tables/controller/schemas-ui.controller.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/resources/tables/controller/schemas-ui.controller.d.ts -------------------------------------------------------------------------------- /types/app/resources/tables/controller/tables-ui.controller.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/resources/tables/controller/tables-ui.controller.d.ts -------------------------------------------------------------------------------- /types/app/resources/tables/controller/views-ui.controller.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/app/resources/tables/controller/views-ui.controller.d.ts -------------------------------------------------------------------------------- /types/bin/UI.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function UI(prompts: any): Promise<void>; 3 | export const command: "UI"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/activateHDI.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function activate(prompts: any): Promise<void>; 3 | export const command: "activateHDI [tenant]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/adminHDI.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function activate(prompts: any): Promise<void>; 3 | export const command: "adminHDI [user] [password]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/adminHDIGroup.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function activate(prompts: any): Promise<void>; 3 | export const command: "adminHDIGroup [user] [group]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/btp.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): Promise<void>; 2 | export function callBTP(prompts: any): Promise<void>; 3 | export const command: "btp [directory] [subaccount]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/btpInfo.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): Promise<void>; 2 | export function getBTPInfo(prompts: any): Promise<void>; 3 | export const command: "btpInfo"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/btpSubs.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): Promise<void>; 2 | export function getSubs(prompts: any): Promise<void>; 3 | export const command: "sub"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/callProcedure.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): Promise<void>; 2 | export function callProc(prompts: any): Promise<void>; 3 | export const command: "callProcedure [schema] [procedure]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/certificates.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function certs(prompts: any): Promise<void>; 3 | export const command: "certificates"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/changeLog.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(): void; 2 | export function getChangeLog(): Promise<void>; 3 | export const command: "changes"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | -------------------------------------------------------------------------------- /types/bin/changeLogUI.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function getChangeLog(prompts: any): Promise<void>; 3 | export const command: "changesUI"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | -------------------------------------------------------------------------------- /types/bin/cli.d.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | export {}; 3 | -------------------------------------------------------------------------------- /types/bin/connect.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function dbConnect(input: any): Promise<void>; 3 | export function saveEnv(options: any): Promise<void>; 4 | export const command: "connect [user] [password]"; 5 | export const aliases: string[]; 6 | export const describe: string; 7 | export const builder: import("yargs").CommandBuilder<{}, {}>; 8 | -------------------------------------------------------------------------------- /types/bin/connectViaServiceKey.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function setKeyDetails(input: any): Promise<void>; 3 | export function saveEnv(options: any, input: any): Promise<void>; 4 | export const command: "serviceKey [instance] [key]"; 5 | export const aliases: string[]; 6 | export const describe: string; 7 | export const builder: import("yargs").CommandBuilder<{}, {}>; 8 | -------------------------------------------------------------------------------- /types/bin/containers.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function getContainers(prompts: any): Promise<any>; 3 | export function getContainersInt(containerGroup: any, container: any, client: any, limit: any): Promise<any>; 4 | export const command: "containers [containerGroup] [container]"; 5 | export const aliases: string[]; 6 | export const describe: string; 7 | export const builder: import("yargs").CommandBuilder<{}, {}>; 8 | export namespace inputPrompts { 9 | namespace container { 10 | let description: string; 11 | let type: string; 12 | let required: boolean; 13 | } 14 | namespace containerGroup { 15 | let description_1: string; 16 | export { description_1 as description }; 17 | let type_1: string; 18 | export { type_1 as type }; 19 | let required_1: boolean; 20 | export { required_1 as required }; 21 | } 22 | namespace limit { 23 | let description_2: string; 24 | export { description_2 as description }; 25 | let type_2: string; 26 | export { type_2 as type }; 27 | let required_2: boolean; 28 | export { required_2 as required }; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /types/bin/containersUI.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function getContainers(prompts: any): Promise<void>; 3 | export const command: "containersUI [containerGroup] [container]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/copy2DefaultEnv.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function copy(): Promise<void>; 3 | export const command: "copy2DefaultEnv"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/copy2Env.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function copy(prompts: any): Promise<void>; 3 | export const command: "copy2Env"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/copy2Secrets.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function makeSecrets({ envFile, secretsFolder, filter }: { 3 | envFile: any; 4 | secretsFolder: any; 5 | filter: any; 6 | }): Promise<void>; 7 | export const command: "copy2Secrets"; 8 | export const aliases: string[]; 9 | export const describe: string; 10 | export const builder: import("yargs").CommandBuilder<{}, {}>; 11 | -------------------------------------------------------------------------------- /types/bin/createContainer.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function activate(prompts: any): Promise<void>; 3 | export function saveEnv(options: any, container: any, userDT: any, userRT: any, passwordDT: any, passwordRT: any, encrypt: any): Promise<void>; 4 | export const command: "createContainer [container] [group]"; 5 | export const aliases: string[]; 6 | export const describe: string; 7 | export const builder: import("yargs").CommandBuilder<{}, {}>; 8 | -------------------------------------------------------------------------------- /types/bin/createContainerUsers.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function activate(prompts: any): Promise<void>; 3 | export const command: "createContainerUsers [container]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/createGroup.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function activate(prompts: any): Promise<void>; 3 | export const command: "createGroup [group]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/createJWT.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function activate(prompts: any): Promise<void>; 3 | export const command: "createJWT [name]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/createModule.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function save(prompts: any): Promise<void>; 3 | export const command: "createModule"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/createXSAAdmin.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function activate(prompts: any): Promise<void>; 3 | export const command: "createXSAAdmin [user] [password]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/dataTypes.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function dbStatus(prompts: any): Promise<any>; 3 | export const command: "dataTypes"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/dataTypesUI.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function dbStatus(prompts: any): Promise<void>; 3 | export const command: "dataTypesUI"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/dataVolumes.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function dbStatus(prompts: any): Promise<void>; 3 | export const command: "dataVolumes"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/disks.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function dbStatus(prompts: any): Promise<void>; 3 | export const command: "disks"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/dropContainer.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function drop(prompts: any): Promise<void>; 3 | export const command: "dropContainer [container] [group]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/dropGroup.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function drop(prompts: any): Promise<void>; 3 | export const command: "dropGroup [group]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/featureUsage.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function dbStatus(prompts: any): Promise<any>; 3 | export const command: "featureUsage"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/featureUsageUI.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function dbStatus(prompts: any): Promise<void>; 3 | export const command: "featureUsageUI"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/features.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function dbStatus(prompts: any): Promise<any>; 3 | export const command: "features"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/featuresUI.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function dbStatus(prompts: any): Promise<void>; 3 | export const command: "featuresUI"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/functions.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function getFunctions(prompts: any): Promise<any>; 3 | export const command: "functions [schema] [function]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | export namespace inputPrompts { 8 | export namespace _function { 9 | let description: string; 10 | let type: string; 11 | let required: boolean; 12 | } 13 | export { _function as function }; 14 | export namespace schema { 15 | let description_1: string; 16 | export { description_1 as description }; 17 | let type_1: string; 18 | export { type_1 as type }; 19 | let required_1: boolean; 20 | export { required_1 as required }; 21 | } 22 | export namespace limit { 23 | let description_2: string; 24 | export { description_2 as description }; 25 | let type_2: string; 26 | export { type_2 as type }; 27 | let required_2: boolean; 28 | export { required_2 as required }; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /types/bin/functionsUI.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function getFunctions(prompts: any): Promise<void>; 3 | export const command: "functionsUI [schema] [function]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/hanaCloudHDIInstances.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function listInstances(prompts: any): Promise<{ 3 | name: any; 4 | last_operation: string; 5 | }[]>; 6 | export const command: "hdi"; 7 | export const aliases: string[]; 8 | export const describe: string; 9 | export const builder: import("yargs").CommandBuilder<{}, {}>; 10 | export namespace inputPrompts { 11 | namespace cf { 12 | export let description: string; 13 | export let type: string; 14 | let _default: boolean; 15 | export { _default as default }; 16 | export let required: boolean; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /types/bin/hanaCloudHDIInstancesUI.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function listInstances(prompts: any): Promise<void>; 3 | export const command: "hdiUI"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/hanaCloudInstances.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function listInstances(prompts: any): Promise<void>; 3 | export const command: "hc [name]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/hanaCloudSBSSInstances.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function listInstances(prompts: any): Promise<{ 3 | name: any; 4 | last_operation: string; 5 | }[]>; 6 | export const command: "sbss"; 7 | export const aliases: string[]; 8 | export const describe: string; 9 | export const builder: import("yargs").CommandBuilder<{}, {}>; 10 | export namespace inputPrompts { 11 | namespace cf { 12 | export let description: string; 13 | export let type: string; 14 | let _default: boolean; 15 | export { _default as default }; 16 | export let required: boolean; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /types/bin/hanaCloudSBSSInstancesUI.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function listInstances(prompts: any): Promise<void>; 3 | export const command: "sbssUI"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/hanaCloudSchemaInstances.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function listInstances(prompts: any): Promise<{ 3 | name: any; 4 | last_operation: string; 5 | }[]>; 6 | export const command: "schemaInstances"; 7 | export const aliases: string[]; 8 | export const describe: string; 9 | export const builder: import("yargs").CommandBuilder<{}, {}>; 10 | export namespace inputPrompts { 11 | namespace cf { 12 | export let description: string; 13 | export let type: string; 14 | let _default: boolean; 15 | export { _default as default }; 16 | export let required: boolean; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /types/bin/hanaCloudSchemaInstancesUI.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function listInstances(prompts: any): Promise<void>; 3 | export const command: "schemaInstancesUI"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/hanaCloudSecureStoreInstances.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function listInstances(prompts: any): Promise<{ 3 | name: any; 4 | last_operation: string; 5 | }[]>; 6 | export const command: "securestore"; 7 | export const aliases: string[]; 8 | export const describe: string; 9 | export const builder: import("yargs").CommandBuilder<{}, {}>; 10 | export namespace inputPrompts { 11 | namespace cf { 12 | export let description: string; 13 | export let type: string; 14 | let _default: boolean; 15 | export { _default as default }; 16 | export let required: boolean; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /types/bin/hanaCloudSecureStoreInstancesUI.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function listInstances(prompts: any): Promise<void>; 3 | export const command: "securestoreUI"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/hanaCloudStart.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function hcStart(prompts: any): Promise<void>; 3 | export const command: "hcStart [name]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/hanaCloudStop.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function hcStop(prompts: any): Promise<void>; 3 | export const command: "hcStop [name]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/hanaCloudUPSInstances.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function listInstances(prompts: any): Promise<({ 3 | name: any; 4 | created_at: any; 5 | } | { 6 | name: any; 7 | credentials: string; 8 | })[]>; 9 | export const command: "ups"; 10 | export const aliases: string[]; 11 | export const describe: string; 12 | export const builder: import("yargs").CommandBuilder<{}, {}>; 13 | export namespace inputPrompts { 14 | namespace cf { 15 | export let description: string; 16 | export let type: string; 17 | let _default: boolean; 18 | export { _default as default }; 19 | export let required: boolean; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /types/bin/hanaCloudUPSInstancesUI.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function listInstances(prompts: any): Promise<void>; 3 | export const command: "upsUI"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/hdbsql.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function launchHdbsql(prompts: any): Promise<void>; 3 | export const command: "hdbsql"; 4 | export const describe: string; 5 | export const builder: import("yargs").CommandBuilder<{}, {}>; 6 | -------------------------------------------------------------------------------- /types/bin/hostInformation.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function hostInfo(prompts: any): Promise<void>; 3 | export const command: "hostInformation"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/indexTest.d.ts: -------------------------------------------------------------------------------- 1 | export const commands: (typeof changeLog)[]; 2 | import * as changeLog from './systemInfo.js'; 3 | -------------------------------------------------------------------------------- /types/bin/indexes.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function getIndexes(prompts: any): Promise<any>; 3 | export const command: "indexes [schema] [indexes]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | export namespace inputPrompts { 8 | namespace indexes { 9 | let description: string; 10 | let type: string; 11 | let required: boolean; 12 | } 13 | namespace schema { 14 | let description_1: string; 15 | export { description_1 as description }; 16 | let type_1: string; 17 | export { type_1 as type }; 18 | let required_1: boolean; 19 | export { required_1 as required }; 20 | } 21 | namespace limit { 22 | let description_2: string; 23 | export { description_2 as description }; 24 | let type_2: string; 25 | export { type_2 as type }; 26 | let required_2: boolean; 27 | export { required_2 as required }; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /types/bin/indexesUI.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function getIndexes(prompts: any): Promise<void>; 3 | export const command: "indexesUI [schema] [indexes]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/iniContents.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function iniContents(prompts: any): Promise<any>; 3 | export const command: "iniContents [file] [section]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/iniFiles.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function iniFiles(prompts: any): Promise<any>; 3 | export const command: "iniFiles"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/inspectFunction.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function functionInspect(prompts: any): Promise<void>; 3 | export const command: "inspectFunction [schema] [function]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/inspectIndex.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function indexInspect(prompts: any): Promise<void>; 3 | export const command: "inspectIndex [schema] [index]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/inspectJWT.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function inspectJWT(prompts: any): Promise<void>; 3 | export const command: "inspectJWT"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/inspectLibMember.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function libraryMemInspect(prompts: any): Promise<void>; 3 | export const command: "inspectLibMember [schema] [library] [libraryMem]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/inspectLibrary.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function libraryInspect(prompts: any): Promise<void>; 3 | export const command: "inspectLibrary [schema] [library]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/inspectProcedure.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function procedureInspect(prompts: any): Promise<void>; 3 | export const command: "inspectProcedure [schema] [procedure]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/inspectTableUI.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function tableInspect(prompts: any): Promise<void>; 3 | export const command: "inspectTableUI [schema] [table]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/inspectTrigger.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function triggerInspect(prompts: any): Promise<void>; 3 | export const command: "inspectTrigger [schema] [trigger]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/inspectUser.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function userInspect(prompts: any): Promise<void>; 3 | export const command: "inspectUser [user]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/issue.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function createIssue(): Promise<void>; 3 | export const command: "issue"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/libraries.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function getLibraries(prompts: any): Promise<any>; 3 | export const command: "libraries [schema] [library]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/massConvert.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function getTables(prompts: any): Promise<void>; 3 | export const command: "massConvert [schema] [table] [view]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/massConvertUI.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export const command: "massConvertUI [schema] [table]"; 3 | export const aliases: string[]; 4 | export const describe: string; 5 | export const builder: import("yargs").CommandBuilder<{}, {}>; 6 | -------------------------------------------------------------------------------- /types/bin/massRename.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function rename(result: any): Promise<void>; 3 | export const command: "massRename"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/massUsers.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function massUsers(prompts: any): Promise<void>; 3 | export const command: "massUsers [user] [password]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/matrix.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(): Promise<void>; 2 | export const command: "matrix"; 3 | export const describe: string; 4 | export const builder: import("yargs").CommandBuilder<{}, {}>; 5 | -------------------------------------------------------------------------------- /types/bin/objects.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function getObjects(prompts: any): Promise<any>; 3 | export const command: "objects [schema] [object]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/openBAS.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function getBAS(): Promise<void>; 3 | export const command: "openbas"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/openChangeLog.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function getChangeLog(): Promise<void>; 3 | export const command: "changelog"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/openDBExplorer.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function getDBX(prompts: any): Promise<void>; 3 | export const command: "opendbx"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/openReadMe.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function getReadMe(): Promise<void>; 3 | export const command: "readme"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/ports.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function getPorts(prompts: any): Promise<any>; 3 | export const command: "ports"; 4 | export const describe: string; 5 | export const builder: import("yargs").CommandBuilder<{}, {}>; 6 | -------------------------------------------------------------------------------- /types/bin/privilegeError.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function dbCall(prompts: any): Promise<any>; 3 | export const command: "privilegeError [guid]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/procedures.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function getProcedures(prompts: any): Promise<any>; 3 | export const command: "procedures [schema] [procedure]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/querySimple.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function removeNewlineCharacter(dataRow: any): {}; 3 | export function dbQuery(prompts: any): Promise<any>; 4 | export const command: "querySimple"; 5 | export const aliases: string[]; 6 | export const describe: string; 7 | export const builder: import("yargs").CommandBuilder<{}, {}>; 8 | export namespace inputPrompts { 9 | namespace query { 10 | let description: string; 11 | let type: string; 12 | let required: boolean; 13 | } 14 | namespace folder { 15 | let description_1: string; 16 | export { description_1 as description }; 17 | let type_1: string; 18 | export { type_1 as type }; 19 | let required_1: boolean; 20 | export { required_1 as required }; 21 | } 22 | namespace filename { 23 | let description_2: string; 24 | export { description_2 as description }; 25 | let type_2: string; 26 | export { type_2 as type }; 27 | let required_2: boolean; 28 | export { required_2 as required }; 29 | export function ask(): boolean; 30 | } 31 | namespace output { 32 | let description_3: string; 33 | export { description_3 as description }; 34 | let type_3: string; 35 | export { type_3 as type }; 36 | let required_3: boolean; 37 | export { required_3 as required }; 38 | } 39 | namespace profile { 40 | let description_4: string; 41 | export { description_4 as description }; 42 | let type_4: string; 43 | export { type_4 as type }; 44 | let required_4: boolean; 45 | export { required_4 as required }; 46 | export function ask_1(): void; 47 | export { ask_1 as ask }; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /types/bin/querySimpleUI.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function dbQuery(prompts: any): Promise<void>; 3 | export const command: "querySimpleUI"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/readMe.d.ts: -------------------------------------------------------------------------------- 1 | export const command: "readMe"; 2 | export const aliases: string[]; 3 | export const describe: string; 4 | export const builder: import("yargs").CommandBuilder<{}, {}>; 5 | export function handler(): Promise<void>; 6 | -------------------------------------------------------------------------------- /types/bin/readMeUI.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function readMe(prompts: any): Promise<void>; 3 | export const command: "readMeUI"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/reclaim.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function reclaim(prompts: any): Promise<void>; 3 | export const command: "reclaim"; 4 | export const aliases: "re"; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/rick.d.ts: -------------------------------------------------------------------------------- 1 | export const command: "rick"; 2 | export const describe: string; 3 | export const builder: import("yargs").CommandBuilder<{}, {}>; 4 | export function handler(): Promise<void>; 5 | -------------------------------------------------------------------------------- /types/bin/roles.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function getRoles(prompts: any): Promise<any>; 3 | export const command: "roles [schema] [role]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/schemas.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function getSchemas(prompts: any): Promise<any>; 3 | export const command: "schemas [schema]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | export namespace inputPrompts { 8 | namespace schema { 9 | let description: string; 10 | let type: string; 11 | let required: boolean; 12 | } 13 | namespace all { 14 | let description_1: string; 15 | export { description_1 as description }; 16 | let type_1: string; 17 | export { type_1 as type }; 18 | let required_1: boolean; 19 | export { required_1 as required }; 20 | export function ask(): boolean; 21 | } 22 | namespace limit { 23 | let description_2: string; 24 | export { description_2 as description }; 25 | let type_2: string; 26 | export { type_2 as type }; 27 | let required_2: boolean; 28 | export { required_2 as required }; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /types/bin/schemasUI.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function getSchemas(prompts: any): Promise<void>; 3 | export const command: "schemasUI [schema]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/sequences.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function getSequences(prompts: any): Promise<any>; 3 | export const command: "sequences [schema] [sequence]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/status.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function dbStatus(prompts: any): Promise<void>; 3 | export const command: "status"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/synonyms.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function getSynonyms(prompts: any): Promise<any>; 3 | export const command: "synonyms [schema] [synonym] [target]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/systemInfo.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function sysInfo(prompts: any): Promise<void>; 3 | export function basicOutput(): Promise<void>; 4 | export function environmentOutput(prompts: any): Promise<void>; 5 | export function dbxOutput(prompts: any): Promise<any>; 6 | export const command: "systemInfo"; 7 | export const aliases: string[]; 8 | export const describe: string; 9 | export const builder: import("yargs").CommandBuilder<{}, {}>; 10 | export namespace inputPrompts { 11 | namespace output { 12 | let description: string; 13 | let type: string; 14 | let required: boolean; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /types/bin/systemInfoUI.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function sysInfo(prompts: any): Promise<void>; 3 | export const command: "systemInfoUI"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/tables.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): Promise<void>; 2 | export function getTables(prompts: any): Promise<{ 3 | SCHEMA_NAME?: string; 4 | TABLE_NAME: string; 5 | TABLE_OID?: string; 6 | COMMENTS?: string; 7 | }[]>; 8 | export const command: "tables [schema] [table]"; 9 | export const aliases: string[]; 10 | export const describe: string; 11 | export const builder: import("yargs").CommandBuilder<{}, {}>; 12 | export namespace inputPrompts { 13 | namespace table { 14 | let description: string; 15 | let type: string; 16 | let required: boolean; 17 | } 18 | namespace schema { 19 | let description_1: string; 20 | export { description_1 as description }; 21 | let type_1: string; 22 | export { type_1 as type }; 23 | let required_1: boolean; 24 | export { required_1 as required }; 25 | } 26 | namespace limit { 27 | let description_2: string; 28 | export { description_2 as description }; 29 | let type_2: string; 30 | export { type_2 as type }; 31 | let required_2: boolean; 32 | export { required_2 as required }; 33 | } 34 | namespace profile { 35 | let description_3: string; 36 | export { description_3 as description }; 37 | let type_3: string; 38 | export { type_3 as type }; 39 | let required_3: boolean; 40 | export { required_3 as required }; 41 | export function ask(): void; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /types/bin/tablesPG.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export const command: "tablesPG [schema] [table]"; 3 | export const aliases: string[]; 4 | export const describe: string; 5 | export const builder: import("yargs").CommandBuilder<{}, {}>; 6 | export namespace inputPrompts { 7 | namespace table { 8 | let description: string; 9 | let type: string; 10 | let required: boolean; 11 | } 12 | namespace schema { 13 | let description_1: string; 14 | export { description_1 as description }; 15 | let type_1: string; 16 | export { type_1 as type }; 17 | let required_1: boolean; 18 | export { required_1 as required }; 19 | } 20 | namespace profile { 21 | let description_2: string; 22 | export { description_2 as description }; 23 | let type_2: string; 24 | export { type_2 as type }; 25 | let required_2: boolean; 26 | export { required_2 as required }; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /types/bin/tablesSQLite.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export const command: "tablesSQLite [table]"; 3 | export const aliases: string[]; 4 | export const describe: string; 5 | export const builder: import("yargs").CommandBuilder<{}, {}>; 6 | export namespace inputPrompts { 7 | namespace table { 8 | let description: string; 9 | let type: string; 10 | let required: boolean; 11 | } 12 | namespace profile { 13 | let description_1: string; 14 | export { description_1 as description }; 15 | let type_1: string; 16 | export { type_1 as type }; 17 | let required_1: boolean; 18 | export { required_1 as required }; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /types/bin/tablesUI.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function getTables(prompts: any): Promise<void>; 3 | export const command: "tablesUI [schema] [table]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/test.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function test(result: any): Promise<void>; 3 | export const command: "test"; 4 | export const describe: string; 5 | export const builder: import("yargs").CommandBuilder<{}, {}>; 6 | -------------------------------------------------------------------------------- /types/bin/traceContents.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function traceContents(prompts: any): Promise<any>; 3 | export const command: "traceContents [host] [file]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/traces.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function traces(prompts: any): Promise<any>; 3 | export const command: "traces"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/triggers.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function getTriggers(prompts: any): Promise<any>; 3 | export const command: "triggers [schema] [trigger] [target]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/users.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function getUsers(prompts: any): Promise<any>; 3 | export const command: "users [user]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/bin/version.d.ts: -------------------------------------------------------------------------------- 1 | export function verOutput(): Promise<void>; 2 | export function version4(pkgPath: string, info: {}, parentPath: any): {}; 3 | export function getVersion(): Promise<{}>; 4 | export const command: "version"; 5 | export const aliases: "ver"; 6 | export const describe: string; 7 | export const builder: import("yargs").CommandBuilder<{}, {}>; 8 | export function handler(argv: any): void; 9 | -------------------------------------------------------------------------------- /types/bin/views.d.ts: -------------------------------------------------------------------------------- 1 | export function handler(argv: any): void; 2 | export function getViews(prompts: any): Promise<any>; 3 | export const command: "views [schema] [view]"; 4 | export const aliases: string[]; 5 | export const describe: string; 6 | export const builder: import("yargs").CommandBuilder<{}, {}>; 7 | -------------------------------------------------------------------------------- /types/index.d.ts: -------------------------------------------------------------------------------- 1 | export function init(): Promise<void>; 2 | -------------------------------------------------------------------------------- /types/mochawesome-report/assets/app.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SAP-samples/hana-developer-cli-tool-example/8537290406effa4a16004e38dd8ed40ec2a27874/types/mochawesome-report/assets/app.d.ts -------------------------------------------------------------------------------- /types/routes/dfa.d.ts: -------------------------------------------------------------------------------- 1 | export function route(app: any): void; 2 | -------------------------------------------------------------------------------- /types/routes/docs.d.ts: -------------------------------------------------------------------------------- 1 | export function route(app: any): void; 2 | -------------------------------------------------------------------------------- /types/routes/excel.d.ts: -------------------------------------------------------------------------------- 1 | export function route(app: any): void; 2 | -------------------------------------------------------------------------------- /types/routes/hanaInspect.d.ts: -------------------------------------------------------------------------------- 1 | export function route(app: any): void; 2 | export function querySimpleHandler(res: any, lib: any, func: any): Promise<void>; 3 | export function inspectTableHandler(res: any, lib: any, func: any): Promise<void>; 4 | export function inspectViewHandler(res: any, lib: any, func: any): Promise<void>; 5 | export function inspectHandler(res: any, lib: any, func: any): Promise<void>; 6 | -------------------------------------------------------------------------------- /types/routes/hanaList.d.ts: -------------------------------------------------------------------------------- 1 | export function route(app: any): void; 2 | export function listHandler(res: any, lib: any, func: any): Promise<void>; 3 | -------------------------------------------------------------------------------- /types/routes/index.d.ts: -------------------------------------------------------------------------------- 1 | export function route(app: any): void; 2 | -------------------------------------------------------------------------------- /types/routes/static.d.ts: -------------------------------------------------------------------------------- 1 | export function route(app: any): void; 2 | -------------------------------------------------------------------------------- /types/routes/webSockerts.d.ts: -------------------------------------------------------------------------------- 1 | export default function _default(app: any, server: any): any; 2 | -------------------------------------------------------------------------------- /types/routes/webSocket.d.ts: -------------------------------------------------------------------------------- 1 | export function route(app: any, server: any): any; 2 | -------------------------------------------------------------------------------- /types/tests/SystemInfo.Test.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /types/tests/base.d.ts: -------------------------------------------------------------------------------- 1 | /// <reference types="node" /> 2 | /// <reference types="node" /> 3 | export function myTest(command: any, done: any): void; 4 | export const exec: typeof child_process.exec; 5 | export const fork: typeof child_process.fork; 6 | export const addContext: any; 7 | export const assert: typeof assertInt; 8 | import * as child_process from 'child_process'; 9 | import * as assertInt from 'assert'; 10 | -------------------------------------------------------------------------------- /types/tests/btpInfo.Test.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /types/tests/btpSubs.Test.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /types/tests/callProcedure.Test.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /types/tests/helper.d.ts: -------------------------------------------------------------------------------- 1 | /// <reference types="node" /> 2 | export const assert: typeof assertInt; 3 | export namespace mochaHooks { 4 | function beforeAll(): void; 5 | function afterAll(): void; 6 | } 7 | import * as assertInt from 'assert'; 8 | -------------------------------------------------------------------------------- /types/tests/status.Test.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /types/tests/version.Test.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /types/update-notifier.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /types/utils/database/hanaCDS.d.ts: -------------------------------------------------------------------------------- 1 | export default class _default extends DBClientClass { 2 | constructor(prompts: any, optionsCDS: any); 3 | listTables(): Promise<any>; 4 | #private; 5 | } 6 | import DBClientClass from "./index.js"; 7 | -------------------------------------------------------------------------------- /types/utils/database/hanaDirect.d.ts: -------------------------------------------------------------------------------- 1 | export default class _default extends DBClientClass { 2 | constructor(prompts: any); 3 | connect(): Promise<import("sap-hdb-promisfied").default>; 4 | listTables(): Promise<any>; 5 | execSQL(query: any): Promise<any>; 6 | #private; 7 | } 8 | import DBClientClass from "./index.js"; 9 | -------------------------------------------------------------------------------- /types/utils/database/postgres.d.ts: -------------------------------------------------------------------------------- 1 | export default class _default extends DBClientClass { 2 | constructor(prompts: any, optionsCDS: any); 3 | listTables(): Promise<any>; 4 | #private; 5 | } 6 | import DBClientClass from "./index.js"; 7 | -------------------------------------------------------------------------------- /types/utils/database/sqlite.d.ts: -------------------------------------------------------------------------------- 1 | export default class _default extends DBClientClass { 2 | constructor(prompts: any, optionsCDS: any); 3 | listTables(): Promise<any>; 4 | #private; 5 | } 6 | import DBClientClass from "./index.js"; 7 | -------------------------------------------------------------------------------- /types/utils/locale.d.ts: -------------------------------------------------------------------------------- 1 | export function getLocale(env: any): any; 2 | -------------------------------------------------------------------------------- /types/utils/massConvert.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Trigger Mass Conversion 3 | * @param {any} wss - Web Socket Server 4 | * @returns {Promise<any>} 5 | */ 6 | export function convert(wss: any): Promise<any>; 7 | -------------------------------------------------------------------------------- /types/utils/versionCheck.d.ts: -------------------------------------------------------------------------------- 1 | export function checkVersion(): Promise<any>; 2 | -------------------------------------------------------------------------------- /update-notifier.js: -------------------------------------------------------------------------------- 1 | import updateNotifier from 'update-notifier' 2 | 3 | // Run: $ node example 4 | 5 | // You have to run this file two times the first time 6 | // This is because it never reports updates on the first run 7 | // If you want to test your own usage, ensure you set an older version 8 | 9 | updateNotifier({ 10 | pkg: { 11 | name: 'hana-cli', 12 | version: '2.202108.1' 13 | }, 14 | updateCheckInterval: 0 15 | }).notify({isGlobal: true}) -------------------------------------------------------------------------------- /utils/database/hanaCDS.js: -------------------------------------------------------------------------------- 1 | import DBClientClass from "./index.js" 2 | import * as base from '../base.js' 3 | 4 | export default class extends DBClientClass { 5 | #clientType = 'hanaCDS' 6 | #schema 7 | constructor(prompts, optionsCDS) { 8 | super(prompts, optionsCDS) 9 | base.debug(`Database client specific class for profile: ${prompts.profile}`) 10 | this.#schema = super.schemaCalculation(prompts, optionsCDS) 11 | } 12 | 13 | async listTables() { 14 | base.debug(`listTables for ${this.#clientType}`) 15 | const tableName = super.adjustWildcard(super.getPrompts().table) 16 | let dbQuery = SELECT 17 | .columns("SCHEMA_NAME", "TABLE_NAME", 18 | {ref:["TABLE_OID"], as:'TABLE_OID', cast: {type:"cds.String"}},"COMMENTS" ) 19 | .from("TABLES") 20 | .where({ SCHEMA_NAME: {like: this.#schema}, TABLE_NAME: { like: tableName } }) 21 | .orderBy("SCHEMA_NAME", "TABLE_NAME") 22 | .limit(super.getPrompts().limit) 23 | 24 | base.debug(JSON.stringify(dbQuery)) 25 | let db = this.getDB() 26 | let results = await db.run(dbQuery) 27 | return results 28 | } 29 | } -------------------------------------------------------------------------------- /utils/database/postgres.js: -------------------------------------------------------------------------------- 1 | import DBClientClass from "./index.js" 2 | import * as base from '../base.js' 3 | 4 | export default class extends DBClientClass { 5 | #clientType = 'postgres' 6 | #schema 7 | constructor(prompts, optionsCDS) { 8 | super(prompts, optionsCDS) 9 | base.debug(`Database client specific class for profile: ${prompts.profile}`) 10 | this.#schema = super.schemaCalculation(prompts, optionsCDS) 11 | } 12 | 13 | async listTables() { 14 | base.debug(`listTables for ${this.#clientType}`) 15 | const tableName = super.adjustWildcard(super.getPrompts().table) 16 | 17 | await this.getDB().run(`SET search_path TO ${this.#schema}, information_schema`) 18 | let dbQuery = SELECT 19 | .columns( 20 | {ref:["table_schema"],as: `"SCHEMA_NAME"` }, 21 | {ref:["table_name"],as:'TABLE_NAME'} ) 22 | .from("tables") 23 | .where({ table_schema: this.#schema, table_name: { like: tableName }, table_type: 'BASE TABLE' }) 24 | .limit(super.getPrompts().limit) 25 | 26 | base.debug(JSON.stringify(dbQuery)) 27 | let results = await this.getDB().run(dbQuery) 28 | return results 29 | } 30 | } -------------------------------------------------------------------------------- /utils/database/sqlite.js: -------------------------------------------------------------------------------- 1 | import DBClientClass from "./index.js" 2 | import * as base from '../base.js' 3 | 4 | export default class extends DBClientClass { 5 | #clientType = 'sqlite' 6 | constructor(prompts, optionsCDS) { 7 | super(prompts, optionsCDS) 8 | base.debug(`Database client specific class for profile: ${prompts.profile}`) 9 | } 10 | 11 | async listTables() { 12 | base.debug(`listTables for for ${this.#clientType}`) 13 | const tableName = super.adjustWildcard(super.getPrompts().table) 14 | let dbQuery = SELECT 15 | .columns({ref:["name"],as:'TABLE_NAME'}) 16 | .from("sqlite_schema") 17 | .where({ type: 'table', name: { like: tableName } }) 18 | .limit(super.getPrompts().limit) 19 | base.debug(JSON.stringify(dbQuery)) 20 | let results = await this.getDB().run(dbQuery) 21 | return results 22 | 23 | } 24 | } -------------------------------------------------------------------------------- /utils/locale.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | export function getLocale (env) { 3 | env = env || process.env 4 | let locale = env.LC_ALL || env.LC_MESSAGES || env.LANG || env.LANGUAGE 5 | return locale 6 | } -------------------------------------------------------------------------------- /utils/versionCheck.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | import * as base from './base.js' 3 | import { createRequire } from 'module' 4 | const require = createRequire(import.meta.url) 5 | const check = require('check-node-version') 6 | import chalk from 'chalk' 7 | 8 | export function checkVersion() { 9 | return new Promise(resolve => { 10 | 11 | const version = require("../package.json").engines.node 12 | base.debug(base.bundle.getText('requestedVersion', [version])) 13 | check({ node: version }, 14 | (error, results) => { 15 | if (error) { 16 | base.error(error) 17 | resolve() 18 | } 19 | base.debug(results) 20 | if (results.isSatisfied) { 21 | resolve() 22 | } 23 | 24 | for (const packageName of Object.keys(results.versions)) { 25 | if (!results.versions[packageName].isSatisfied) { 26 | base.error( 27 | `${ chalk.red(base.bundle.getText('warning'))} ${base.bundle.getText('versionCheckFail', [results.versions[packageName].wanted, results.versions[packageName].version])}`) 28 | } 29 | } 30 | resolve() 31 | }) 32 | }) 33 | } 34 | --------------------------------------------------------------------------------