-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #639 from SUI-Components/feat/sui-app-icons
feat(components/tool/app): Start to work on addBiometricConfig command
- Loading branch information
Showing
8 changed files
with
87 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* eslint-disable no-console */ | ||
|
||
const {reportError} = require('../infrastructure/utils.js') | ||
|
||
const {hasPackageJson, hasCapacitorConfig} = require('../domain/utils.js') | ||
|
||
// Command | ||
module.exports = () => { | ||
// If we are not placed on a webapp, we cannot continue | ||
if (!hasPackageJson()) { | ||
reportError( | ||
'\n\nsui-app should be executed from a web-app project.\nPlease be sure that there is a package.json file in your current directory.\n\n' | ||
) | ||
return | ||
} | ||
|
||
// If app has already been initialized | ||
if (!hasCapacitorConfig()) { | ||
reportError(`\n\nThis project has not been initialized. sui-app cannot perform a sync operation\n\n`) | ||
} | ||
|
||
// If biometric has not been added yet | ||
|
||
// Sync project | ||
console.log('\nThis command is still not implemented.\n') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const confirmQuestion = async message => { | ||
return new Promise((resolve, reject) => { | ||
const readline = require('readline') | ||
|
||
const rl = readline.createInterface({ | ||
input: process.stdin, | ||
output: process.stdout | ||
}) | ||
|
||
rl.question(`❓ ${message} (Y/n)`, answer => { | ||
if (answer.toLowerCase() === 'n') { | ||
resolve(false) | ||
} else { | ||
resolve(true) | ||
} | ||
rl.close() | ||
}) | ||
}) | ||
} | ||
|
||
module.exports = { | ||
confirmQuestion | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters