mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 10:46:00 +00:00
refgactor, code cleanup
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import _uniq from 'lodash/uniq';
|
||||
import { extractShellApiFunctionName, extractShellApiPlugins } from './packageTools';
|
||||
|
||||
export class ScriptWriter {
|
||||
export class ScriptWriterJavaScript {
|
||||
s = '';
|
||||
packageNames: string[] = [];
|
||||
varCount = 0;
|
||||
@@ -169,7 +169,7 @@ export class ScriptWriterJson {
|
||||
|
||||
export function jsonScriptToJavascript(json) {
|
||||
const { schedule, commands, packageNames } = json;
|
||||
const script = new ScriptWriter();
|
||||
const script = new ScriptWriterJavaScript();
|
||||
for (const packageName of packageNames) {
|
||||
if (!/^dbgate-plugin-.*$/.test(packageName)) {
|
||||
throw new Error('Unallowed package name:' + packageName);
|
||||
|
||||
Reference in New Issue
Block a user