UNPKG

@sap/cds-dk

Version:

Command line client and development toolkit for the SAP Cloud Application Programming Model

67 lines (41 loc) 1.94 kB
module.exports = Object.assign(migrate, { options: ['--directory', '--tag', '--tagRule'], shortcuts: ['-d'], flags: ['--dry', '--force', '--skip-verification', '--cleanup', '--resolve-bindings'], help: ` # SYNOPSIS *cds migrate* <tenant1|"*">[,<tenant2>] [-d <directory>] [--tag <tag>] [--tagRule <tag rule>] [--dry] [--force] [--skip-verification] Migrate extensions created with @sap/cds-mtx to extensions for @sap/cds-mtxs This command only runs on the root directory of an application. # OPTIONS *-d* | *--directory* <extension-projects-directory> Specify the target directory of your migrated extension projects. By default, the migrated extension projects will not be stored. *--tag* <tag> Specify a default tag that is to be used to store the extension. If not specified "migrated" will be used. *--tagRule* <tag rule> Specify a regular expression that describes the mapping from file names to tags, e. g. "extension-(.*)\.cds" to map from "extension-123.cds" to tag "123". If the expression does not match, the default tag will be used. *--force* Force the re-migration of already migrated tenants. *--dry* Do a dry-run only. Only run a verification of the extension migration. *--skip-verification* Skip verification step. Does not check for potential deployment differences. *--cleanup* Removes all metadata containers created by @sap/cds-mtx. *--resolve-bindings* Resolve remote service bindings configured via *cds bind*. `}) async function migrate (param, options = {}) { await require(_local('@sap/cds-mtxs/bin/cds-mtx-migrate')).run(param[0], options) } function _local (id) { return require.resolve (id, { paths: [ process.cwd(), __dirname ] }) } /* eslint no-console: off */ /* eslint no-useless-escape: off */