ApiTestManager 소스 추가
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import APITester from './APITester';
|
||||
import APIScenario from "./APIScenario";
|
||||
// import { buildWorkerDefinition } from "monaco-editor-workers";
|
||||
//
|
||||
// buildWorkerDefinition('./node_modules/monaco-editor-workers/dist/workers', import.meta.url, false);
|
||||
|
||||
self.MonacoEnvironment = {
|
||||
getWorkerUrl: function (moduleId, label) {
|
||||
if (label === 'json') {
|
||||
return '/plugins/apitestmanager/json.worker.js';
|
||||
}
|
||||
if (label === 'css' || label === 'scss' || label === 'less') {
|
||||
return '/plugins/apitestmanager/css.worker.bundle.js';
|
||||
}
|
||||
if (label === 'html' || label === 'handlebars' || label === 'razor') {
|
||||
return '/plugins/apitestmanager/html.worker.bundle.js';
|
||||
}
|
||||
if (label === 'typescript' || label === 'javascript') {
|
||||
return '/plugins/apitestmanager/ts.worker.bundle.js';
|
||||
}
|
||||
return '/plugins/apitestmanager/editor.worker.bundle.js';
|
||||
}
|
||||
};
|
||||
|
||||
export default class APITestManager {
|
||||
|
||||
constructor(servers) {
|
||||
this.apiTester = new APITester();
|
||||
this.apiTester.init(servers);
|
||||
this.apiScenario = new APIScenario(this.apiTester);
|
||||
this.apiScenario.init();
|
||||
console.log("APITestManager initialized");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user