From 6d82f13f8b0a7cbcb7d88d69303364fd5264359a Mon Sep 17 00:00:00 2001 From: oguh43 Date: Thu, 21 Jul 2022 15:56:34 +0200 Subject: [PATCH] g --- package.json | 1 + pnpm-lock.yaml | 7 +++++++ uaup-js.js | 6 +++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index f194cc8..782a537 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ ] }, "dependencies": { + "adm-zip": "^0.5.9", "request": "^2.88.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d31c784..2e49b53 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,11 +1,13 @@ lockfileVersion: 5.4 specifiers: + adm-zip: ^0.5.9 electron: ^11.1.0 electron-builder: ^23.1.0 request: ^2.88.2 dependencies: + adm-zip: 0.5.9 request: 2.88.2 devDependencies: @@ -166,6 +168,11 @@ packages: '@types/yargs-parser': 21.0.0 dev: true + /adm-zip/0.5.9: + resolution: {integrity: sha512-s+3fXLkeeLjZ2kLjCBwQufpI5fuN+kIGBxu6530nVQZGVol0d7Y/M88/xw9HGGUcJjKf8LutN3VPRUBq6N7Ajg==} + engines: {node: '>=6.0'} + dev: false + /agent-base/6.0.2: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} diff --git a/uaup-js.js b/uaup-js.js index 36e0f52..4a04e1e 100644 --- a/uaup-js.js +++ b/uaup-js.js @@ -60,7 +60,8 @@ const defaultOptions = { * @param {defaultOptions} options */ function testOptions(options) { - return !(options.appName === "unknown" || (options.useGithub && (options.gitUsername === "unknown" || options.gitRepo === "unknown")) || (options.isGitRepoPrivate && options.gitRepoToken === "unknown")); + //return !(options.appName === "unknown" || (options.useGithub && (options.gitUsername === "unknown" || options.gitRepo === "unknown")) || (options.isGitRepoPrivate && options.gitRepoToken === "unknown")); + return true } /** @@ -72,6 +73,8 @@ function setOptions(options) { options.useGithub = options.useGithub == null ? true : options.appDirectory; options.forceUpdate = options.forceUpdate == null ? false : options.forceUpdate; options.appDirectory = options.appDirectory == null ? app_library + options.appName : options.appDirectory; + options.appDirectory += separator; + console.log("App Directory: " + options.appDirectory, "App Name: " + options.appName, app_library); options.versionFile = options.versionFile == null ? options.appDirectory + `${separator}settings${separator}version.json` : options.versionFile; options.tempDirectory = options.tempDirectory == null ? options.appDirectory +separator+"tmp" : options.tempDirectory; options.appExecutableName = options.appExecutableName == null ? options.appName : options.appExecutableName; @@ -225,6 +228,7 @@ function updateHeader(value) { * @param {defaultOptions} options */ async function Update(options = defaultOptions) { + console.log(defaultOptions.appDirectory, defaultOptions.versionFile, defaultOptions.tempDirectory); if (testOptions(options)) { options = setOptions(options); createDirectories(options);