- Removed the `plugins.constants.ts` file as it was no longer needed. - Updated the `vm.class.ts` to improve result handling and logging. - Introduced `vm.constants.ts` to manage registered plugins and modules. - Simplified the test payload in `case1-payload.js` by removing unnecessary insert logic. - Enhanced `case1.ts` to include database and migration setup, improving test clarity. - Deleted unused functions for adding modules and plugins, streamlining the codebase.
18 lines
425 B
JavaScript
18 lines
425 B
JavaScript
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
/* eslint-disable no-undef */
|
|
|
|
import "module/squel";
|
|
import "module/asyncCall";
|
|
import "plugin/db";
|
|
|
|
function createSQL(id) {
|
|
return squel.select().from("test").where("id = ?", id).toString();
|
|
}
|
|
|
|
async function main(input) {
|
|
const sql = createSQL(input.id);
|
|
const res = await asyncCall(db, sql);
|
|
|
|
return { test: 1, array: [1, 2, [{ id: 1, name: "Test" }]] };
|
|
}
|