get node script from shell script

This commit is contained in:
Jan Prochazka
2021-10-17 09:50:32 +02:00
parent 5ed441aada
commit ee1c51e9f8
3 changed files with 44 additions and 17 deletions

View File

@@ -5,7 +5,7 @@
<script lang="ts">
import _ from 'lodash';
import { filterName } from 'dbgate-tools';
import { extractPackageName, filterName } from 'dbgate-tools';
import { currentArchive, currentDatabase } from '../stores';
@@ -28,7 +28,9 @@
tabComponent: 'ShellTab',
},
{
editor: `await dbgateApi.deployDb(${JSON.stringify(
editor: `// @require ${extractPackageName($currentDatabase.connection.engine)}
await dbgateApi.deployDb(${JSON.stringify(
{
connection: {
..._.omit($currentDatabase.connection, '_id', 'displayName'),