scripter-x 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/commands.js +6 -0
- package/src/index.js +1 -0
package/package.json
CHANGED
package/src/commands.js
CHANGED
|
@@ -122,6 +122,12 @@ async function buildProvider(io, name) {
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
export async function run(io, api, args = {}) {
|
|
125
|
+
// TARGET: Flipkart (the backend campaign flow) or Zepto (local OTP → ZAUTH1 envelope).
|
|
126
|
+
const target = args.target || (args.number ? 'zepto' : (await io.select('what to extract?', [
|
|
127
|
+
{ label: 'Flipkart', value: 'flipkart', description: 'session JSON via OTP provider (campaign)' },
|
|
128
|
+
{ label: 'Zepto', value: 'zepto', description: 'local OTP login → ZAUTH1 envelope for AuthManager' }])).value);
|
|
129
|
+
if (target === 'zepto') return zeptoCmd(io, api, args);
|
|
130
|
+
|
|
125
131
|
api = api || await getApi(io);
|
|
126
132
|
|
|
127
133
|
// MODE: extract JSON only, or also link a newaddr.com email to each account.
|
package/src/index.js
CHANGED
|
@@ -106,6 +106,7 @@ async function main() {
|
|
|
106
106
|
concurrency: flags.concurrency ? +flags.concurrency : null, name: flags.name,
|
|
107
107
|
checkMinutes: flags['check-minutes'] === true ? true : (flags['check-minutes'] === false ? false : null),
|
|
108
108
|
mode: flags.email ? 'json_email' : flags.mode, // --email or --mode json_email
|
|
109
|
+
target: flags.target, // run: 'flipkart' | 'zepto'
|
|
109
110
|
number: flags.number, otp: flags.otp, cert: flags.cert, // zepto: local OTP login → ZAUTH1 envelope
|
|
110
111
|
campaign: flags._[0], out: flags.out, action: flags._[0], value: flags._[1],
|
|
111
112
|
};
|