refactord paths.ts

This commit is contained in:
2022-06-11 00:05:32 -05:00
parent 29b40b4e43
commit 83570d9535
14 changed files with 148 additions and 97 deletions

View File

@@ -1,8 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const fs_1 = require("fs");
const paths_1 = require("./paths");
const main_1 = require("./main");
function readMeta(name) {
let paths = main_1.AllPaths.script(name);
let urls = main_1.AllPaths.url;
var meta = {
name: name,
namespace: 'zomo.dev',
@@ -17,12 +19,12 @@ function readMeta(name) {
noframes: false,
grant: '',
injectinto: '',
downloadURL: (0, paths_1.FileUrl)(name),
supportURL: paths_1.SupportUrl,
homepageURL: paths_1.BaseUrl,
downloadURL: paths.url,
supportURL: urls.support,
homepageURL: urls.base,
unwrap: false,
};
let metaPath = (0, paths_1.ScriptPath)(name).meta;
let metaPath = paths.meta;
if ((0, fs_1.existsSync)(metaPath) && (0, fs_1.lstatSync)(metaPath).isFile()) {
try {
let args = JSON.parse((0, fs_1.readFileSync)(metaPath).toString());