as commonjs

This commit is contained in:
2022-06-06 21:03:50 -05:00
parent 1e94d1a8ed
commit 4ef1440e3a
9 changed files with 57 additions and 42 deletions

View File

@@ -1,6 +1,8 @@
import { lstatSync, readFileSync } from 'fs';
import { BaseUrl, FileUrl, ScriptPath, SupportUrl } from './paths';
export default function (name) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const fs_1 = require("fs");
const paths_1 = require("./paths");
function default_1(name) {
var meta = {
name: name,
namespace: 'zomo.dev',
@@ -15,15 +17,15 @@ export default function (name) {
noframes: false,
grant: '',
injectinto: '',
downloadURL: FileUrl(name),
supportURL: SupportUrl,
homepageURL: BaseUrl,
downloadURL: paths_1.FileUrl(name),
supportURL: paths_1.SupportUrl,
homepageURL: paths_1.BaseUrl,
unwrap: false,
};
let metaPath = ScriptPath(name).meta;
if (lstatSync(metaPath).isFile()) {
let metaPath = paths_1.ScriptPath(name).meta;
if (fs_1.lstatSync(metaPath).isFile()) {
try {
let args = JSON.parse(readFileSync(metaPath).toString());
let args = JSON.parse(fs_1.readFileSync(metaPath).toString());
let key;
for (key in meta) {
let val = args[key];
@@ -86,4 +88,5 @@ ${Object.keys(meta)
`,
];
}
exports.default = default_1;
//# sourceMappingURL=readmeta.js.map