Skip to content

Commit

Permalink
g
Browse files Browse the repository at this point in the history
  • Loading branch information
oguh43 committed Jul 21, 2022
1 parent 958fb4c commit 6d82f13
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
]
},
"dependencies": {
"adm-zip": "^0.5.9",
"request": "^2.88.2"
}
}
7 changes: 7 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion uaup-js.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

/**
Expand All @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 6d82f13

Please sign in to comment.