1.2.1 • Published 4 years ago

mta-lib v1.2.1

Weekly downloads
24,649
License
Apache-2.0
Repository
-
Last release
4 years ago

mta-lib

Javascript wrapper library for creating, reading and modifying multi-target application development descriptor files.

Requirements

Cloud MTA minimal version should be 0.1.1 .

Sample usage

Adding a new module

import { mta } from "mta-lib";

mta = new mta(projectPath);

let mtaModule: mta.Module = {
    name: this.appName,
    type: "my-type",
    path: path.relative(this.appOptions.projectPath, this.appPath),
    parameters: {
       "disk-quota": "DISK_QUOTA",
        "memory": "MEMORY"
       },
    requires: [
       {
         name: this.appoptions.projectName + "suffix"
      }
        ]
     };
   
await mta.addModule(appMtaModule);

...

try{
    await mta.save(); 
   } catch (e) {
    console.log(e);
   }
 }

Release

1.2.1